Plugin Directory

Changeset 3753434


Ignore:
Timestamp:
10/18/2026 06:09:50 PM (4 hours ago)
Author:
namishams
Message:

0.2.46

Location:
ai-rank-suite
Files:
357 added
10 edited

Legend:

Unmodified
Added
Removed
  • ai-rank-suite/trunk/ai-rank-suite.php

    r3740630 r3753434  
    44 * Plugin URI:        https://airanksuite.com
    55 * Description:       See whether ChatGPT, Claude, Perplexity and Google's AI answers name your site — and fix the pages that keep them from it. Full classic SEO included.
    6  * Version:           0.2.45
     6 * Version:           0.2.46
    77 * Requires at least: 6.4
    88 * Requires PHP:      8.1
    … …  
    4040}
    4141
    42 define( 'AIRANKSUITE_VERSION', '0.2.45' );
     42define( 'AIRANKSUITE_VERSION', '0.2.46' );
    4343// The vendor's Google connect service for "Sign in with Google" (Search
    4444// Console + Analytics without a customer-side Cloud project). Filled in by
  • ai-rank-suite/trunk/assets/admin/build/index.css

    r3740630 r3753434  
    11/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
    2 @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--spacing:.25rem;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1)}}@layer utilities{.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.top-0{top:0}.m-0{margin:0}.mx-auto{margin-inline:auto}.-mt-2{margin-top:calc(var(--spacing) * -2)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-auto{margin-top:auto}.mr-0\.5{margin-right:calc(var(--spacing) * .5)}.mr-1{margin-right:var(--spacing)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-\[27px\]{margin-left:27px}.ml-\[48px\]{margin-left:48px}.ml-\[52px\]{margin-left:52px}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1{height:var(--spacing)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-full{height:100%}.max-h-\[260px\]{max-height:260px}.min-h-\[60vh\]{min-height:60vh}.min-h-\[80vh\]{min-height:80vh}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-\[190px\]{width:190px}.w-full{width:100%}.max-w-\[62ch\]{max-width:62ch}.max-w-\[70ch\]{max-width:70ch}.max-w-\[74ch\]{max-width:74ch}.max-w-\[88ch\]{max-width:88ch}.max-w-\[320px\]{max-width:320px}.max-w-\[520px\]{max-width:520px}.max-w-\[560px\]{max-width:560px}.max-w-\[620px\]{max-width:620px}.max-w-\[720px\]{max-width:720px}.max-w-full{max-width:100%}.min-w-0{min-width:0}.min-w-\[220px\]{min-width:220px}.min-w-\[300px\]{min-width:300px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.scroll-mt-4{scroll-margin-top:calc(var(--spacing) * 4)}.list-none{list-style-type:none}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.place-items-start{place-items:start}.content-start{align-content:flex-start}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-\[2px\]{gap:2px}.gap-\[3px\]{gap:3px}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.gap-x-8{column-gap:calc(var(--spacing) * 8)}.gap-y-1{row-gap:var(--spacing)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.justify-self-start{justify-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.bg-transparent{background-color:#0000}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-5{padding-right:calc(var(--spacing) * 5)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pl-1{padding-left:var(--spacing)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-\[10\.5px\]{font-size:10.5px}.text-\[10px\]{font-size:10px}.text-\[11\.5px\]{font-size:11.5px}.text-\[11px\]{font-size:11px}.text-\[12\.5px\]{font-size:12.5px}.text-\[12px\]{font-size:12px}.text-\[13\.5px\]{font-size:13.5px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.text-\[18px\]{font-size:18px}.text-\[19px\]{font-size:19px}.text-\[20px\]{font-size:20px}.text-\[22px\]{font-size:22px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-all{word-break:break-all}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.\!filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}@media (width>=40rem){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:col-span-4{grid-column:span 4/span 4}.sm\:max-w-\[160px\]{max-width:160px}.sm\:max-w-\[260px\]{max-width:260px}.sm\:max-w-\[440px\]{max-width:440px}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-\[1fr_1fr_120px_auto\]{grid-template-columns:1fr 1fr 120px auto}.sm\:grid-cols-\[2fr_1\.4fr_1fr_1fr_auto\]{grid-template-columns:2fr 1.4fr 1fr 1fr auto}.sm\:grid-cols-\[2fr_1fr_1fr_auto\]{grid-template-columns:2fr 1fr 1fr auto}}@media (width>=48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-\[220px_140px_minmax\(0\,1fr\)\]{grid-template-columns:220px 140px minmax(0,1fr)}.md\:grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.md\:grid-cols-\[minmax\(0\,1fr\)_240px\]{grid-template-columns:minmax(0,1fr) 240px}.md\:grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}}@media (width>=64rem){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-\[auto_auto_minmax\(0\,1fr\)\]{grid-template-columns:auto auto minmax(0,1fr)}.lg\:grid-cols-\[minmax\(0\,1\.15fr\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}}@media (width>=80rem){.xl\:grid-cols-\[minmax\(0\,0\.9fr\)_minmax\(0\,1\.1fr\)\]{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)}.xl\:grid-cols-\[minmax\(0\,1\.15fr\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}}}#airanksuite-root{--ars-font:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;--ars-canvas:#f0f0f1;--ars-surface:#fff;--ars-surface-2:#f6f7f7;--ars-surface-3:#eeeff0;--ars-border:#c3c4c7;--ars-ink:#1d2327;--ars-ink-2:#50575e;--ars-ink-3:#646970;--ars-brand:#2271b1;--ars-brand-hover:#135e96;--ars-brand-ink:#2271b1;--ars-brand-tonal:#f0f6fc;--ars-brand-tonal-ink:#0a4b78;--ars-wp-line:#c3c4c7;--ars-wp-canvas:#f0f0f1;--ars-wp-field-line:#8c8f94;--ars-wp-button-bg:#f6f7f7;--ars-wp-notice-info:#72aee6;--ars-brand-fill:#2271b1;--ars-brand-fill-hover:#135e96;--ars-brand-2:#72aee6;--ars-accent:#f0a325;--ars-accent-tonal:#fff5dc;--ars-grad:linear-gradient(135deg, #2271b1, #72aee6);--ars-grad-soft:linear-gradient(135deg, #f0f6fc, #f6f7f7);--ars-good:#12a150;--ars-good-tonal:#e6f6ee;--ars-warning:#c98400;--ars-warning-tonal:#fff7d6;--ars-serious:#e0393f;--ars-serious-tonal:#fdecea;--ars-r-xs:3px;--ars-r-sm:4px;--ars-r-md:4px;--ars-r-lg:6px;--ars-r-xl:8px;--ars-e1:0 1px 2px #16161e0a;--ars-e2:0 1px 3px #16161e0f;--ars-e3:0 4px 16px #16161e1a;--ars-c-blue:#ece9ff;--ars-c-blue-ink:#4c37cc;--ars-c-green:#dff3e8;--ars-c-green-ink:#0f7a4d;--ars-c-yellow:#fff1cc;--ars-c-yellow-ink:#9a5a0a;--ars-c-red:#fbdcd8;--ars-c-red-ink:#c02b21;--ars-c-violet:#eee1fd;--ars-c-violet-ink:#6a3fc0;--ars-series-1:#6753ff;--ars-series-2:#12a150;--ars-series-3:#f0a325;--ars-series-4:#8b7bff;--ars-line:var(--ars-border);--ars-line-soft:#edecf5;--ars-wash:#00000005;--ars-solid:#171717;--ars-solid-hover:#000;--ars-solid-ink:#fff;--ars-btn-border:#ddddea;--ars-btn-border-hover:#c6c5d9;--ars-good-ink:#0f7a4d;--ars-warning-ink:#9a5a0a;--ars-serious-ink:#c02b21;--ars-info:#0b57d0;--ars-info-ink:#0b57d0;--ars-info-tonal:#e8f1fd;--ars-on-brand:#fff;--ars-focus-ring:0 0 0 3px #2271b147;--ars-disabled-bg:#e3e6ea;--ars-disabled-ink:#8a8d94;--ars-border-strong:#c8c9d0;--ars-c-amber:#fdf1de;--ars-c-amber-ink:#9a5a0a;--ars-c-teal-ink:#0f7a4d;--ars-c-green-bg:#dff3e8;--ars-c-green-line:#b7e4cc;--ars-wire:#8a8d94;--ars-font-mono:ui-monospace, SFMono-Regular, Menlo, monospace;--ars-font-display:inherit;--ars-shadow-sm:0 2px 8px #0000000f;--ars-shadow-card:0 1px 1px #16161e08, 0 8px 24px -16px #16161e2e;--ars-code-bg:#1f2430;--ars-code-ink:#d5dae5;--ars-track:#d5dbe4;--ars-select-bg:#f1efff;--ars-knob:#fff;color:var(--ars-ink);-webkit-font-smoothing:antialiased;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:13.5px;line-height:1.55}#airanksuite-root *{box-sizing:border-box}#airanksuite-root[data-theme=dark],body.airanksuite-dark{--ars-canvas:#131218;--ars-wp-line:#35353b;--ars-wp-canvas:#141416;--ars-wp-field-line:#4a4a52;--ars-wp-button-bg:#2b2b30;--ars-wp-notice-info:#6cb2ff;--ars-brand-fill:#2271b1;--ars-brand-fill-hover:#3582c4;--ars-surface:#1b1a22;--ars-surface-2:#212029;--ars-surface-3:#2a2934;--ars-border:#34333f;--ars-ink:#ececef;--ars-ink-2:#a9abb3;--ars-ink-3:#8d8f97;--ars-brand:#72aee6;--ars-brand-hover:#9ec2e6;--ars-brand-ink:#72aee6;--ars-brand-tonal:#1a2a3a;--ars-brand-tonal-ink:#9ec2e6;--ars-brand-2:#4f94d4;--ars-select-bg:#20304a;--ars-accent:#f0a325;--ars-accent-tonal:#3a2c12;--ars-grad:linear-gradient(135deg, #2271b1, #72aee6);--ars-grad-soft:linear-gradient(135deg, #1a2a3a, #212c3a);--ars-good:#34c98d;--ars-good-tonal:#16302132;--ars-warning:#e6a24a;--ars-warning-tonal:#3a2e1332;--ars-serious:#f2685d;--ars-serious-tonal:#3a201d32;--ars-e1:0 1px 2px #0000004d;--ars-e2:0 1px 3px #0006;--ars-e3:0 8px 28px #0000008c;--ars-c-blue:#232a52;--ars-c-blue-ink:#9fa8ff;--ars-c-green:#143528;--ars-c-green-ink:#4bd299;--ars-c-yellow:#3a2c12;--ars-c-yellow-ink:#f0b657;--ars-c-red:#3a201d;--ars-c-red-ink:#f4867b;--ars-c-violet:#2a2350;--ars-c-violet-ink:#c3acff;--ars-series-1:#9c8dff;--ars-series-2:#b3a4fb;--ars-series-3:#e8a33d;--ars-series-4:#2fc39c;--ars-line:#30313b;--ars-line-soft:#26262f;--ars-solid:#3582c4;--ars-solid-hover:#4f94d4;--ars-solid-ink:#fff;--ars-btn-border:#3a3b46;--ars-btn-border-hover:#474956;--ars-good-ink:#34c98d;--ars-warning-ink:#e6a24a;--ars-serious-ink:#f2685d;--ars-info:#6cb2ff;--ars-info-ink:#8ec2ff;--ars-info-tonal:#20304a;--ars-on-brand:#17123a;--ars-focus-ring:0 0 0 3px #9d86f059;--ars-disabled-bg:#2b2b30;--ars-disabled-ink:#8d8f97;--ars-border-strong:#474956;--ars-c-amber:#3a2c12;--ars-c-amber-ink:#f0b657;--ars-c-teal-ink:#4bd299;--ars-c-green-bg:#143528;--ars-c-green-line:#2c5c44;--ars-wire:#8d8f97;--ars-shadow-sm:0 2px 8px #00000059;--ars-shadow-card:0 1px 2px #00000059, 0 8px 24px -16px #0000008c;--ars-code-bg:#16181f;--ars-code-ink:#c9cedb;--ars-track:#3a3b46;--ars-knob:#e6e6ea;--ars-wash:#8f74f214;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}#airanksuite-root h1,#airanksuite-root h2,#airanksuite-root h3,#airanksuite-root h4,#airanksuite-root h5,#airanksuite-root h6{letter-spacing:-.01em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:inherit;color:inherit;margin:0;padding:0;font-weight:600;line-height:1.35}#airanksuite-root .ars-page-title{letter-spacing:-.02em;color:var(--ars-ink);font-size:22px;font-weight:650;line-height:1.2}#airanksuite-root .ars-app{background:var(--ars-surface);border-radius:var(--ars-r-xl);box-shadow:var(--ars-e3);overflow:clip}#airanksuite-root .ars-card{background:var(--ars-surface);border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);transition:box-shadow .2s cubic-bezier(.2,0,0,1),border-color .2s;box-shadow:0 1px 2px #16161e0d,0 10px 28px -14px #16161e24}#airanksuite-root .ars-card-head{border-bottom:1px solid var(--ars-border);justify-content:space-between;align-items:flex-start;gap:16px;padding:14px 18px;display:flex}#airanksuite-root .ars-card-head+.ars-card-body{padding-top:16px}#airanksuite-root .ars-card-icon{border-radius:var(--ars-r-md);background:var(--ars-brand-tonal);width:30px;height:30px;color:var(--ars-brand-tonal-ink);flex:0 0 30px;justify-content:center;align-items:center;display:inline-flex}#airanksuite-root .ars-hero{background:var(--ars-surface);border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);box-shadow:var(--ars-e1);position:relative;overflow:hidden}#airanksuite-root .ars-hero:after{content:"";background:var(--ars-grad);opacity:.55;height:2px;position:absolute;inset:0 0 auto}#airanksuite-root .ars-grad-text{background:var(--ars-grad);color:#0000;-webkit-background-clip:text;background-clip:text}#airanksuite-root .ars-btn{border-radius:var(--ars-r-md);cursor:pointer;white-space:nowrap;border:1px solid #0000;justify-content:center;align-items:center;gap:8px;padding:7px 15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:13px;font-weight:500;line-height:1.45;transition:background .15s,box-shadow .15s,border-color .15s,transform 90ms;display:inline-flex}#airanksuite-root .ars-btn:active:not(:disabled){transform:translateY(.5px)}#airanksuite-root .ars-btn-primary:disabled{background:var(--ars-disabled-bg);color:var(--ars-disabled-ink);cursor:default;box-shadow:none}#airanksuite-root .ars-btn-ghost:hover{border-color:var(--ars-btn-border-hover);background:#2271b10d}#airanksuite-root .ars-btn-ghost:disabled{color:var(--ars-ink-3);cursor:default;background:0 0}#airanksuite-root .ars-btn-tonal{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink)}#airanksuite-root .ars-btn-tonal:hover{box-shadow:0 1px 2px #3c40434d}#airanksuite-root .ars-btn-danger{color:var(--ars-serious);background:0 0;border-color:#c4c7cc}#airanksuite-root .ars-btn-danger:hover{background:#c5221f0f}#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-switch.is-on:after{transform:translate(-17px)}#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-scorerow-caret,#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-grid-pager button,#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-nav-item.is-back svg,#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-crumb-sep{transform:scaleX(-1)}#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .t-num,#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .tabular-nums,#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-mono,#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-url,#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) code{text-align:start;direction:ltr;unicode-bidi:isolate}#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-pageskel-bar,#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-pageskel-block,#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-grid-skeleton td span{animation-direction:reverse}#airanksuite-root .ars-pageskel-bar,#airanksuite-root .ars-pageskel-block{border-radius:var(--ars-r-lg);background:linear-gradient(90deg, var(--ars-surface-3) 25%, var(--ars-surface-2) 50%, var(--ars-surface-3) 75%);background-size:200% 100%;animation:1.3s ease-in-out infinite ars-shimmer}#airanksuite-root .ars-pageskel-bar{height:44px}#airanksuite-root .ars-pageskel-grid{grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;display:grid}#airanksuite-root .ars-pageskel-block{height:180px}#airanksuite-root .ars-pageskel-block.is-tall{height:260px}@media (prefers-reduced-motion:reduce){#airanksuite-root .ars-pageskel-bar,#airanksuite-root .ars-pageskel-block{animation:none}}#airanksuite-root .ars-routing-actions{border:1px solid var(--ars-brand);border-radius:var(--ars-r-lg);background:var(--ars-brand-tonal);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-top:14px;padding:10px 12px;display:flex}#airanksuite-root .ars-review{border:1px solid var(--ars-brand);border-radius:var(--ars-r-lg);background:var(--ars-brand-tonal);gap:12px;padding:14px;display:grid}#airanksuite-root .ars-review-head{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;display:flex}#airanksuite-root .ars-review-field{border-radius:var(--ars-r-md);background:var(--ars-surface);border:1px solid var(--ars-border);gap:6px;padding:10px 12px;display:grid}#airanksuite-root .ars-review-orig,#airanksuite-root .ars-review-diff{color:var(--ars-ink-2);font-size:12.5px;line-height:1.5}#airanksuite-root .ars-diff-add{background:var(--ars-good-tonal);color:var(--ars-good);border-radius:3px;padding:0 2px}#airanksuite-root .ars-diff-del{background:var(--ars-serious-tonal);color:var(--ars-serious);border-radius:3px;padding:0 2px;text-decoration:line-through}#airanksuite-root .ars-review-meta{color:var(--ars-ink-3);flex-wrap:wrap;gap:6px 14px;font-size:11px;display:flex}#airanksuite-root .ars-review-field.is-applied{opacity:.7}#airanksuite-root .ars-alt-row{border:1px solid var(--ars-border);border-radius:var(--ars-r-md);background:var(--ars-surface);grid-template-columns:72px minmax(0,1fr);align-items:start;gap:10px;padding:8px;display:grid}#airanksuite-root .ars-alt-row img{object-fit:cover;border-radius:var(--ars-r-sm);background:var(--ars-surface-2);width:72px;height:72px}#airanksuite-root .ars-copilot-group{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface);gap:8px;padding:12px 14px;display:grid}#airanksuite-root .ars-copilot-rank{background:var(--ars-brand);color:#fff;border-radius:999px;place-items:center;width:22px;height:22px;font-size:11.5px;font-weight:700;display:inline-grid}#airanksuite-root .ars-letai{gap:18px;display:grid}#airanksuite-root .ars-letai-group{gap:6px;display:grid}#airanksuite-root .ars-letai-head{border-bottom:1px solid var(--ars-border);align-items:baseline;gap:10px;padding-bottom:4px;display:flex}#airanksuite-root .ars-letai-row{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface);grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;padding:10px 12px;display:grid}#airanksuite-root .ars-letai-row.is-disabled{opacity:.6}#airanksuite-root .ars-letai.is-compact .ars-letai-row{padding:7px 10px}#airanksuite-root .ars-letai-cell{flex-shrink:0;align-items:center;gap:12px;display:flex}#airanksuite-root .ars-letai-open{text-align:end;justify-items:end;line-height:1.15;display:grid}#airanksuite-root .ars-letai-open strong{color:var(--ars-ink);font-size:17px;font-weight:700}#airanksuite-root .ars-letai-open span{color:var(--ars-ink-3);white-space:nowrap;font-size:10.5px}#airanksuite-root .ars-letai-open.is-clear{color:var(--ars-good);font-size:12px;font-weight:600}#airanksuite-root .ars-letai-route{color:var(--ars-ink-3);background:var(--ars-surface-2);border-radius:var(--ars-r-sm);justify-self:start;padding:1px 6px;font-size:10.5px}#airanksuite-root .ars-briefing{white-space:pre-wrap;word-break:break-word;max-height:420px;color:var(--ars-ink-2);background:var(--ars-surface-2);border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);margin:0;padding:12px 14px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11.5px;line-height:1.55;overflow:auto}#airanksuite-root .ars-kwsuggest{flex-wrap:wrap;gap:6px;display:flex}#airanksuite-root .ars-kwchip{border:1px solid var(--ars-border);background:var(--ars-surface);cursor:pointer;border-radius:999px;align-items:center;gap:7px;padding:5px 8px 5px 11px;transition:border-color .12s,background .12s,transform .12s;display:inline-flex}#airanksuite-root .ars-kwchip:hover:not(:disabled){border-color:var(--ars-brand);background:var(--ars-brand-tonal);transform:translateY(-1px)}#airanksuite-root .ars-kwchip:disabled{cursor:default;opacity:.65}#airanksuite-root .ars-kwchip-word{color:var(--ars-ink);font-size:12.5px;font-weight:600}#airanksuite-root .ars-barometer-delta{vertical-align:middle;margin-inline-start:4px;font-size:11px;font-weight:700}#airanksuite-root .ars-analyzer-table{gap:2px;display:grid}#airanksuite-root .ars-analyzer-row{border-radius:var(--ars-r-md);color:var(--ars-ink);text-align:start;cursor:default;background:0 0;border:1px solid #0000;grid-template-columns:minmax(0,1fr) 70px 70px 56px 56px 80px;align-items:center;gap:10px;width:100%;padding:7px 10px;font-size:12.5px;display:grid}#airanksuite-root .ars-analyzer-table.is-pages .ars-analyzer-row{grid-template-columns:minmax(0,1fr) 90px 56px 56px 60px}#airanksuite-root .ars-analyzer-row>span,#airanksuite-root .ars-analyzer-row>a{min-width:0}#airanksuite-root .ars-analyzer-row>span:not(:first-child),#airanksuite-root .ars-analyzer-row>a:not(:first-child){text-align:end}#airanksuite-root .ars-analyzer-row.is-head{letter-spacing:.06em;text-transform:uppercase;color:var(--ars-ink-3);border-bottom:1px solid var(--ars-border);border-radius:0;font-size:10.5px;font-weight:700}#airanksuite-root button.ars-analyzer-row{cursor:pointer}#airanksuite-root button.ars-analyzer-row:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-analyzer-row.is-active{background:var(--ars-brand-tonal);border-color:var(--ars-brand)}#airanksuite-root .ars-analyzer-row:nth-child(2n):not(.is-head):not(.is-active){background:var(--ars-surface-2)}#airanksuite-root .ars-analyzer-area{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface);gap:6px;padding:10px 12px;display:grid}@media (width<=720px){#airanksuite-root .ars-analyzer-row{grid-template-columns:minmax(0,1fr) 56px 56px}#airanksuite-root .ars-analyzer-row>:nth-child(2),#airanksuite-root .ars-analyzer-row>:nth-child(3),#airanksuite-root .ars-analyzer-row>:nth-child(6){display:none}}#airanksuite-root .ars-vendor-grid{grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:14px;display:grid}#airanksuite-root .ars-vendor-metrics{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface-2);grid-template-columns:repeat(auto-fit,minmax(88px,1fr));gap:8px;padding:10px;display:grid}#airanksuite-root .ars-vendor-metric{gap:1px;min-width:0;display:grid}#airanksuite-root .ars-vendor-metric-n{letter-spacing:-.01em;font-size:17px;font-weight:700;line-height:1.15}#airanksuite-root .ars-vendor-metric-l{color:var(--ars-ink-3);font-size:10.5px;line-height:1.3}#airanksuite-root .ars-serp-list{gap:2px;display:grid}#airanksuite-root .ars-serp-row{border-radius:var(--ars-r-md);border:1px solid #0000;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;padding:8px 10px;display:grid}#airanksuite-root .ars-serp-row:nth-child(odd){background:var(--ars-surface-2)}#airanksuite-root .ars-serp-row.is-mine,#airanksuite-root .ars-serp-row.is-mine:nth-child(odd){background:var(--ars-brand-tonal);border-color:var(--ars-brand)}#airanksuite-root .ars-serp-title{color:var(--ars-ink);text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:600;text-decoration:none;overflow:hidden}#airanksuite-root .ars-serp-title:hover{color:var(--ars-brand);text-decoration:underline}#airanksuite-root .ars-serp-url{color:var(--ars-ink-3);text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;overflow:hidden}#airanksuite-root .ars-trendcard{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface);align-content:start;gap:8px;min-width:0;padding:12px 14px;display:grid}#airanksuite-root .ars-trendcard-head{justify-content:space-between;align-items:flex-start;gap:10px;display:flex}#airanksuite-root .ars-jump-wrap{position:relative}#airanksuite-root .ars-jump-wrap .ars-jump{width:100%;padding-inline-end:26px}#airanksuite-root .ars-jump::-webkit-search-cancel-button{display:none}#airanksuite-root .ars-jump-clear{color:var(--ars-ink-3);cursor:pointer;inset-inline-end:6px;background:0 0;border:0;border-radius:999px;padding:4px;font-size:11px;line-height:1;position:absolute;top:50%;transform:translateY(-50%)}#airanksuite-root .ars-jump-clear:hover{color:var(--ars-serious);background:var(--ars-surface-3)}#airanksuite-root .ars-letai-card{border-color:var(--ars-brand)}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-letai-card{border-color:color-mix(in srgb, var(--ars-brand) 35%, var(--ars-line))}}#airanksuite-root .ars-letai-card{background:var(--ars-surface)}#airanksuite-root .ars-letai-card.is-live{box-shadow:0 1px 3px #16161e0d, 0 0 0 1px var(--ars-brand)}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-letai-card.is-live{box-shadow:0 1px 3px #16161e0d, 0 0 0 1px color-mix(in srgb, var(--ars-brand) 22%, transparent)}}#airanksuite-root .ars-letai-icon{color:#fff;background:var(--ars-brand);width:34px;height:34px;box-shadow:0 2px 8px var(--ars-brand);border-radius:10px;place-items:center;display:grid}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-letai-icon{box-shadow:0 2px 8px color-mix(in srgb, var(--ars-brand) 34%, transparent)}}#airanksuite-root .ars-letai-title{flex-wrap:wrap;align-items:center;gap:10px;display:inline-flex}#airanksuite-root .ars-letai-count{font-variant-numeric:tabular-nums;background:var(--ars-brand);color:#fff;border-radius:999px;padding:2px 9px;font-size:12.5px;font-weight:700}#airanksuite-root .ars-bands{gap:2px;display:grid}#airanksuite-root .ars-band{border-radius:var(--ars-r-sm);grid-template-columns:10px minmax(120px,auto) 62px 44px minmax(0,1fr);align-items:baseline;gap:10px;padding:6px 8px;font-size:12.5px;display:grid}#airanksuite-root .ars-band:nth-child(odd){background:var(--ars-surface-2)}#airanksuite-root .ars-band.is-zero{opacity:.5}#airanksuite-root .ars-band-swatch{border-radius:3px;align-self:center;width:10px;height:10px}#airanksuite-root .ars-band-label{color:var(--ars-ink);font-weight:600}#airanksuite-root .ars-band-n{text-align:end;font-weight:700}#airanksuite-root .ars-band-pct{text-align:end;color:var(--ars-ink-3)}#airanksuite-root .ars-band-note-text{color:var(--ars-ink-3);font-size:11.5px;line-height:1.45}@media (width<=720px){#airanksuite-root .ars-band{grid-template-columns:10px minmax(0,1fr) 56px 40px}#airanksuite-root .ars-band-note-text{grid-column:2/-1}}#airanksuite-root .ars-empty-band{border:1px dashed var(--ars-line);border-radius:var(--ars-r-lg);color:var(--ars-ink-3);text-align:center;padding:14px;font-size:12.5px}#airanksuite-root .ars-local-head{grid-template-columns:auto minmax(0,1fr);align-items:center;gap:22px;display:grid}@media (width<=640px){#airanksuite-root .ars-local-head{grid-template-columns:1fr}}#airanksuite-root .ars-local-bar{gap:3px;height:8px;display:flex}#airanksuite-root .ars-local-seg{background:var(--ars-surface-3);border-radius:999px;flex:1 1 0;transition:background .2s}#airanksuite-root .ars-local-seg.is-ok{background:var(--ars-good)}#airanksuite-root .ars-levels{grid-template-columns:repeat(auto-fit,minmax(215px,1fr));gap:10px;display:grid}#airanksuite-root .ars-level{text-align:start;overflow-wrap:break-word;border:1px solid var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);min-width:0;font:inherit;color:inherit;cursor:pointer;align-content:start;gap:5px;padding:13px 14px;transition:border-color .14s,background .14s,transform .14s;display:grid}#airanksuite-root .ars-level:hover{border-color:var(--ars-brand);transform:translateY(-1px)}#airanksuite-root .ars-level.is-active{border-color:var(--ars-brand);background:var(--ars-brand-tonal);box-shadow:inset 0 0 0 1px var(--ars-brand)}#airanksuite-root .ars-level.is-writing.is-active{border-color:var(--ars-warning);background:var(--ars-warning-tonal);box-shadow:inset 0 0 0 1px var(--ars-warning)}#airanksuite-root .ars-level-head{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:4px 8px;min-width:0;display:flex}#airanksuite-root .ars-level-name{min-width:0;font-size:13.5px;font-weight:650}#airanksuite-root .ars-level-tag{letter-spacing:.04em;text-transform:uppercase;background:var(--ars-good-tonal);color:var(--ars-good);white-space:normal;border-radius:999px;max-width:100%;padding:2px 7px;font-size:9.5px;font-weight:700;line-height:1.35}#airanksuite-root .ars-level-tag.is-writing{background:var(--ars-warning-tonal);color:var(--ars-warning)}#airanksuite-root .ars-level-one{color:var(--ars-ink);font-size:12px;font-weight:600}#airanksuite-root .ars-level-detail{color:var(--ars-ink-2);font-size:11.5px;line-height:1.5}#airanksuite-root .ars-level-policy{border-radius:var(--ars-r-lg,14px);background:var(--ars-warning-tonal);border:1px solid var(--ars-warning);grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin-top:12px;padding:12px 14px;display:grid}#airanksuite-root .ars-boundary{border:1px solid var(--ars-line,#e6e7eb);background:var(--ars-surface,#fff);color:var(--ars-ink,#16161e);border-radius:16px;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:16px;margin:8px 0;padding:22px 24px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;display:grid}#airanksuite-root .ars-boundary-mark{background:var(--ars-warning-tonal,#fef7e0);width:34px;height:34px;color:var(--ars-warning,#b06000);border-radius:50%;place-items:center;font-size:17px;font-weight:800;display:grid}#airanksuite-root .ars-boundary-detail{background:var(--ars-surface-2,#f7f7f9);color:var(--ars-ink-2,#5b5e6b);white-space:pre-wrap;overflow-wrap:anywhere;border-radius:10px;margin:6px 0 0;padding:10px 12px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;line-height:1.55}#airanksuite-root .ars-hero{border:1px solid var(--ars-line);border-radius:var(--ars-r-xl,18px);background:var(--ars-surface);grid-template-columns:auto minmax(26rem,1fr) auto;align-items:center;gap:24px;padding:22px 24px;display:grid}@media (width<=1320px){#airanksuite-root .ars-hero{grid-template-columns:auto minmax(0,1fr)}#airanksuite-root .ars-hero-stats{grid-column:1/-1;grid-template-columns:repeat(4,minmax(0,1fr))}}@media (width<=700px){#airanksuite-root .ars-hero{grid-template-columns:1fr;justify-items:start;gap:16px}#airanksuite-root .ars-hero-stats{grid-template-columns:repeat(2,minmax(0,1fr))}#airanksuite-root .ars-hero-title{font-size:18px}}#airanksuite-root .ars-hero-ring{place-items:center;display:grid}#airanksuite-root .ars-hero-body{gap:8px;min-width:0;display:grid}#airanksuite-root .ars-hero-badge{letter-spacing:.04em;text-transform:uppercase;background:var(--ars-surface-3);color:var(--ars-ink-2);border-radius:999px;justify-self:start;padding:3px 10px;font-size:11px;font-weight:700}#airanksuite-root .ars-hero-badge.is-good{background:var(--ars-good-tonal);color:var(--ars-good)}#airanksuite-root .ars-hero-badge.is-warning{background:var(--ars-warning-tonal);color:var(--ars-warning)}#airanksuite-root .ars-hero-badge.is-bad{background:var(--ars-serious-tonal);color:var(--ars-serious)}#airanksuite-root .ars-hero-title{letter-spacing:-.015em;color:var(--ars-ink);text-wrap:balance;margin:0;font-size:21px;font-weight:640;line-height:1.28}#airanksuite-root .ars-hero-why{color:var(--ars-ink-2);max-width:68ch;margin:0;font-size:13px;line-height:1.55}#airanksuite-root .ars-hero-actions{flex-wrap:wrap;align-items:center;gap:10px;margin-top:4px;display:flex}#airanksuite-root .ars-hero-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}#airanksuite-root .ars-hero-stat{border:1px solid var(--ars-line);border-radius:var(--ars-r-md,10px);background:var(--ars-surface);justify-items:start;gap:1px;min-width:116px;padding:9px 13px;display:grid}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-hero-stat{background:color-mix(in srgb, var(--ars-surface) 72%, transparent)}}#airanksuite-root .ars-hero-stat{font:inherit;text-align:start;cursor:pointer;transition:border-color .14s,transform .14s}#airanksuite-root .ars-hero-stat:hover{border-color:var(--ars-brand);transform:translateY(-1px)}#airanksuite-root .ars-hero-stat-v{font-variant-numeric:tabular-nums;letter-spacing:-.01em;color:var(--ars-ink);font-size:16px;font-weight:700}#airanksuite-root .ars-hero-stat-l{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-hero-stat-h{color:var(--ars-ink-3);opacity:.85;max-width:30ch;margin-top:3px;font-size:11px;line-height:1.45}#airanksuite-root .ars-hero-ring-note{text-align:center;max-width:30ch;margin:8px 0 0;line-height:1.5}@media (width<=782px){#airanksuite-root .ars-hero-stat-h,#airanksuite-root .ars-hero-ring-note{max-width:none}}#airanksuite-root .ars-trendband{border:1px solid var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface-2);gap:12px;padding:14px;display:grid}#airanksuite-root .ars-trendband-head{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}#airanksuite-root .ars-firstread{border-radius:var(--ars-r-lg,14px);background:var(--ars-surface-2);border:1px dashed var(--ars-line);align-items:center;gap:16px;padding:18px 16px;display:flex}#airanksuite-root .ars-firstread-v{letter-spacing:-.02em;font-variant-numeric:tabular-nums;font-size:34px;font-weight:700;line-height:1}#airanksuite-root .ars-barometer{justify-items:center;gap:2px;min-width:150px;display:grid}#airanksuite-root .ars-barometer svg{width:150px;height:88px;display:block}#airanksuite-root .ars-barometer-read{justify-items:center;gap:1px;margin-top:-4px;display:grid}#airanksuite-root .ars-barometer-value{font-variant-numeric:tabular-nums;letter-spacing:-.02em;font-size:26px;font-weight:700;line-height:1}#airanksuite-root .ars-barometer-label{letter-spacing:.07em;text-transform:uppercase;color:var(--ars-ink-3);font-size:10px;font-weight:700}#airanksuite-root .ars-barometer-verdict{font-size:12.5px;font-weight:600}#airanksuite-root .ars-spread{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface-2);grid-template-columns:repeat(5,1fr);align-items:end;gap:8px;height:92px;padding:8px 10px;display:grid}#airanksuite-root .ars-spread-col{grid-template-rows:auto 1fr auto;justify-items:center;gap:3px;min-width:0;height:100%;display:grid}#airanksuite-root .ars-spread-n{color:var(--ars-ink-2);font-size:11px;font-weight:700}#airanksuite-root .ars-spread-bar{border-radius:var(--ars-r-sm) var(--ars-r-sm) 0 0;align-self:end;width:100%;max-width:34px;transition:height .6s cubic-bezier(.2,0,0,1)}#airanksuite-root .ars-spread-label{color:var(--ars-ink-3);white-space:nowrap;font-size:10px}#airanksuite-root .ars-module-band{border-radius:var(--ars-r-md);background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);flex-direction:column;gap:1px;padding:10px 14px;display:flex}#airanksuite-root .ars-module-band.is-seo{background:var(--ars-c-blue);color:var(--ars-c-blue-ink)}#airanksuite-root .ars-module-tile{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface);align-items:flex-start;gap:12px;padding:12px 14px;transition:opacity .15s,box-shadow .15s,border-color .15s;display:flex}#airanksuite-root .ars-module-tile:hover{border-color:var(--ars-btn-border-hover);box-shadow:0 6px 18px -10px #16161e2e}#airanksuite-root .ars-module-tile.is-off{opacity:.6}#airanksuite-root .ars-module-icon{background:var(--ars-brand-tonal);width:34px;height:34px;color:var(--ars-brand-tonal-ink);border-radius:9px;flex:none;place-items:center;display:grid}#airanksuite-root .ars-module-tile.is-off .ars-module-icon{background:var(--ars-surface-3);color:var(--ars-ink-3)}#airanksuite-root .ars-vendor-card{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface);justify-items:center;gap:8px;padding:18px 14px 14px;transition:box-shadow .15s,transform .15s,border-color .15s;display:grid}#airanksuite-root .ars-vendor-card:hover{border-color:var(--ars-btn-border-hover);transform:translateY(-1px);box-shadow:0 6px 18px -8px #16161e2e}#airanksuite-root .ars-vendor-icon{border-radius:10px;place-items:center;width:44px;height:44px;display:grid;overflow:hidden}#airanksuite-root .ars-vendor-icon svg{width:100%;height:100%}#airanksuite-root .ars-vendor-icon.is-small{border-radius:6px;width:24px;height:24px}#airanksuite-root .ars-vendor-icon.is-small .ars-vendor-icon{border-radius:6px;width:24px;height:24px;font-size:12px}#airanksuite-root .ars-vendor-icon.is-initial{color:#fff;font-size:19px;font-weight:700}#airanksuite-root .ars-chart-line{stroke-dasharray:1;stroke-dashoffset:1px;animation:.7s cubic-bezier(.2,0,0,1) forwards ars-draw}#airanksuite-root .ars-chart-area{opacity:0;animation:.5s .25s forwards ars-fadeup}@keyframes ars-draw{to{stroke-dashoffset:0}}@keyframes ars-fadeup{to{opacity:1}}@media (prefers-reduced-motion:reduce){#airanksuite-root .ars-chart-line{stroke-dasharray:none;stroke-dashoffset:0;animation:none}#airanksuite-root .ars-chart-area{opacity:1;animation:none}}#airanksuite-root .ars-grid{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface);overflow:hidden}#airanksuite-root .ars-grid-toolbar{border-block-end:1px solid var(--ars-line-soft);flex-wrap:wrap;align-items:center;gap:10px;padding:10px 12px;display:flex}#airanksuite-root .ars-grid-search{border:1px solid var(--ars-border);border-radius:var(--ars-r-md);background:var(--ars-surface-2);height:30px;color:var(--ars-ink-3);align-items:center;gap:7px;min-width:220px;padding-inline:10px;transition:border-color .15s,background .15s;display:inline-flex}#airanksuite-root .ars-grid-search:focus-within{border-color:var(--ars-brand);background:var(--ars-surface)}#airanksuite-root .ars-grid-search input{color:var(--ars-ink);flex:1;font-size:12.5px;box-shadow:none!important;background:0 0!important;border:0!important;min-height:0!important;padding:0!important}#airanksuite-root .ars-grid-search input:focus{outline:none}#airanksuite-root .ars-grid-reset{color:var(--ars-brand);cursor:pointer;background:0 0;border:0;padding:4px 6px;font-size:12px;font-weight:600}#airanksuite-root .ars-grid-total{color:var(--ars-ink-3);font-variant-numeric:tabular-nums;margin-inline-start:auto;font-size:12px}#airanksuite-root .ars-grid-scroll{max-height:70vh;overflow:auto}#airanksuite-root .ars-grid-table{width:100%}#airanksuite-root .ars-grid-table thead th{z-index:2;background:var(--ars-surface-2);position:sticky;top:0}#airanksuite-root .ars-grid-sort{font:inherit;color:inherit;text-transform:inherit;letter-spacing:inherit;cursor:pointer;background:0 0;border:0;align-items:center;gap:4px;padding:0;display:inline-flex}#airanksuite-root .ars-grid-sort:hover,#airanksuite-root .ars-grid-caret{color:var(--ars-brand)}#airanksuite-root .ars-grid-table tbody tr:hover td{background:var(--ars-surface-2)}#airanksuite-root .ars-grid-actions{text-align:end;white-space:nowrap}#airanksuite-root .ars-grid-skeleton td span{background:linear-gradient(90deg, var(--ars-surface-3) 25%, var(--ars-surface-2) 50%, var(--ars-surface-3) 75%);background-size:200% 100%;border-radius:5px;height:10px;animation:1.2s ease-in-out infinite ars-shimmer;display:block}@keyframes ars-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){#airanksuite-root .ars-grid-skeleton td span{animation:none}}#airanksuite-root .ars-grid-state{text-align:center;color:var(--ars-ink-2);justify-items:center;gap:6px;padding:34px 16px;font-size:13px;display:grid}#airanksuite-root .ars-grid-footer{border-block-start:1px solid var(--ars-line-soft);color:var(--ars-ink-2);align-items:center;gap:14px;padding:8px 12px;font-size:12px;display:flex}#airanksuite-root .ars-grid-perpage{align-items:center;gap:6px;display:inline-flex}#airanksuite-root .ars-grid-perpage select{min-height:26px!important;padding:2px 22px 2px 8px!important;font-size:12px!important}#airanksuite-root .ars-grid-range{font-variant-numeric:tabular-nums}#airanksuite-root .ars-grid-pager{font-variant-numeric:tabular-nums;align-items:center;gap:8px;margin-inline-start:auto;display:inline-flex}#airanksuite-root .ars-grid-pager button{border:1px solid var(--ars-border);border-radius:var(--ars-r-sm);background:var(--ars-surface);width:26px;height:26px;color:var(--ars-ink);cursor:pointer;justify-content:center;align-items:center;font-size:15px;line-height:1;display:inline-flex}#airanksuite-root .ars-grid-pager button:hover:not(:disabled){background:var(--ars-surface-2);border-color:var(--ars-btn-border-hover)}#airanksuite-root .ars-grid-pager button:disabled{opacity:.4;cursor:default}#airanksuite-root .ars-theme-toggle{border:1px solid var(--ars-border);border-radius:var(--ars-r-md);background:var(--ars-surface);width:30px;height:30px;color:var(--ars-ink-2);cursor:pointer;justify-content:center;align-items:center;padding:0;transition:background .15s,color .15s,border-color .15s;display:inline-flex}#airanksuite-root .ars-theme-toggle:hover{background:var(--ars-surface-2);color:var(--ars-ink);border-color:var(--ars-btn-border-hover)}#airanksuite-root .ars-header-chip{width:auto;padding:0 10px;font-size:12px;font-weight:600;text-decoration:none}#airanksuite-root input[type=text],#airanksuite-root input[type=password],#airanksuite-root input[type=number],#airanksuite-root input[type=date],#airanksuite-root input[type=datetime-local],#airanksuite-root select,#airanksuite-root textarea{border:1px solid var(--ars-border);border-radius:var(--ars-r-md);background:var(--ars-surface);color:var(--ars-ink);width:100%;max-width:100%;margin:0;padding:7px 11px;font-family:inherit;font-size:13px;line-height:1.45;transition:border-color .12s,box-shadow .12s}#airanksuite-root textarea{line-height:1.55}#airanksuite-root select{appearance:none;cursor:pointer;background-image:linear-gradient(45deg,#0000 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,#0000 50%);background-position:calc(100% - 18px) calc(50% + 1px),calc(100% - 13px) calc(50% + 1px);background-repeat:no-repeat;background-size:5px 5px,5px 5px;padding-inline-end:34px}#airanksuite-root select:disabled{color:var(--ars-ink-3);background-color:var(--ars-surface-2);cursor:default}#airanksuite-root input:hover,#airanksuite-root select:hover,#airanksuite-root textarea:hover{border-color:var(--ars-btn-border-hover)}#airanksuite-root input[type=checkbox]{accent-color:var(--ars-brand)}#airanksuite-root :where(:focus-visible){outline:2px solid var(--ars-brand);outline-offset:2px}#airanksuite-root :where(input,select,textarea):focus-visible{outline:none}#airanksuite-root .ars-mono{font-family:Roboto Mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px}#airanksuite-root .ars-nav{background:0 0}#airanksuite-root .ars-nav-item{text-align:start;border-radius:var(--ars-r-md);white-space:nowrap;width:100%;color:var(--ars-ink-2);cursor:pointer;background:0 0;border:0;align-items:center;gap:11px;padding:7px 14px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:13.5px;font-weight:500;transition:background .12s,color .12s;display:flex}#airanksuite-root .ars-nav-item svg{color:var(--ars-ink-3);transition:color .12s}#airanksuite-root .ars-nav-item:hover svg{color:var(--ars-ink)}#airanksuite-root .ars-nav-item.is-active{background:var(--ars-solid);color:var(--ars-solid-ink);font-weight:600;position:relative;box-shadow:0 2px 8px #2271b147}#airanksuite-root .ars-nav-group{letter-spacing:.06em;text-transform:uppercase;color:var(--ars-ink-3);padding:10px 16px 3px;font-size:11px;font-weight:600}#airanksuite-root .ars-table{border-collapse:collapse;width:100%;font-size:13px}#airanksuite-root .ars-table th{z-index:1;text-align:start;letter-spacing:.06em;text-transform:uppercase;color:var(--ars-ink-3);background:var(--ars-surface-2);border-bottom:1px solid var(--ars-border);white-space:nowrap;padding:9px 14px;font-size:10.5px;font-weight:700;position:sticky;top:0}#airanksuite-root .ars-table th:first-child{border-top-left-radius:var(--ars-r-sm)}#airanksuite-root .ars-table th:last-child{border-top-right-radius:var(--ars-r-sm)}#airanksuite-root .ars-table td{vertical-align:middle;border-bottom:1px solid #eef1f5;padding:10px 14px}#airanksuite-root .ars-table tbody td:first-child{color:var(--ars-ink);font-weight:500}#airanksuite-root .ars-table th.is-num,#airanksuite-root .ars-table td.is-num{text-align:end;font-variant-numeric:tabular-nums}#airanksuite-root .ars-table th.is-num>button{justify-content:flex-end;width:100%}#airanksuite-root .ars-table th.is-narrow,#airanksuite-root .ars-table td.is-narrow{width:92px}#airanksuite-root .ars-table th.is-mid,#airanksuite-root .ars-table td.is-mid{width:120px}#airanksuite-root .ars-table td.is-muted{color:var(--ars-ink-3);font-size:12px}#airanksuite-root .ars-drawer{background:var(--ars-surface);border:0;border-inline-start:1px solid var(--ars-border);z-index:9999;top:32px;inset-inline-end:0;border-radius:0;grid-template-rows:auto auto minmax(0,1fr) auto;grid-template-columns:minmax(0,1fr);width:min(1080px,97vw);display:grid;position:fixed;bottom:0;overflow:hidden;box-shadow:-8px 0 24px #3c40431f}#airanksuite-root .ars-drawer>*{min-width:0}@media screen and (width<=782px){#airanksuite-root .ars-drawer{top:46px;width:auto;inset-inline-start:0}}#airanksuite-root .ars-drawer.is-wide{width:min(1080px,97vw)}#airanksuite-root .ars-drawer.is-max{border-inline-start:0;width:100vw;inset-inline-start:0}#airanksuite-root .ars-sheet-head{border-bottom:1px solid var(--ars-border);background:var(--ars-surface);padding:14px 16px 10px}#airanksuite-root .ars-sheet-tabs{border-bottom:1px solid var(--ars-border);background:var(--ars-surface-2);flex-wrap:wrap;gap:2px;padding:0 10px;display:flex}#airanksuite-root .ars-sheet-tabs::-webkit-scrollbar{display:none}#airanksuite-root .ars-sheet-tab{appearance:none;color:var(--ars-ink-3);cursor:pointer;white-space:nowrap;border:0;background:0 0;border-bottom:2px solid #0000;align-items:center;gap:6px;padding:9px 11px;font-size:12.5px;font-weight:600;transition:color .12s,border-color .12s;display:inline-flex}#airanksuite-root .ars-sheet-tab:hover{color:var(--ars-ink)}#airanksuite-root .ars-sheet-tab[aria-selected=true]{color:var(--ars-brand);border-bottom-color:var(--ars-brand);background:var(--ars-surface)}#airanksuite-root .ars-sheet-tab .ars-pip{border-radius:var(--ars-r-xs);background:var(--ars-c-red);color:var(--ars-c-red-ink);padding:2px 5px;font-size:10px;font-weight:700;line-height:1}#airanksuite-root .ars-sheet-body{grid-template-columns:minmax(0,1fr) 340px;min-width:0;min-height:0;display:grid;overflow:hidden}#airanksuite-root .ars-sheet-main{overscroll-behavior:contain;scroll-behavior:smooth;min-width:0;padding:14px 18px 22px;overflow-y:auto}#airanksuite-root .ars-sheet-rail{border-inline-start:1px solid var(--ars-border);background:var(--ars-surface-2);overscroll-behavior:contain;align-content:start;gap:16px;min-width:0;padding:14px 16px 22px;display:grid;overflow:hidden auto}@media (width<=1100px){#airanksuite-root .ars-sheet-body{grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr);overflow-y:auto}#airanksuite-root .ars-sheet-rail{border-inline-start:0;border-bottom:1px solid var(--ars-border);order:-1;overflow:visible}#airanksuite-root .ars-sheet-main{overflow:visible}}#airanksuite-root .ars-sheet-foot{border-top:1px solid var(--ars-border);background:var(--ars-surface);flex-wrap:wrap;align-items:center;gap:8px;padding:10px 16px;display:flex}#airanksuite-root .ars-sheet-split{grid-template-columns:minmax(0,1fr);gap:18px;display:grid}@media screen and (width>=1180px){#airanksuite-root .ars-drawer.is-wide .ars-sheet-split,#airanksuite-root .ars-drawer.is-max .ars-sheet-split,#airanksuite-root .ars-sheet-split{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}}#airanksuite-root .ars-sheet-aside{align-self:start;position:sticky;top:0}#airanksuite-root .ars-scorechip{border-radius:var(--ars-r-xs);letter-spacing:.04em;text-transform:uppercase;align-items:baseline;gap:5px;padding:3px 8px;font-size:11px;font-weight:600;display:inline-flex}#airanksuite-root .ars-scorechip b{letter-spacing:0;font-variant-numeric:tabular-nums;font-size:15px;font-weight:700}#airanksuite-root ::-webkit-scrollbar{width:8px;height:8px}#airanksuite-root ::-webkit-scrollbar-thumb{border-radius:var(--ars-r-md);background:0 0;transition:background .16s}#airanksuite-root ::-webkit-scrollbar-track{background:0 0}#airanksuite-root :hover::-webkit-scrollbar-thumb{background:var(--ars-btn-border-hover)}#airanksuite-root :focus-within::-webkit-scrollbar-thumb{background:var(--ars-btn-border-hover)}#airanksuite-root ::-webkit-scrollbar-thumb:hover{background:#aeb6c4}@supports (scrollbar-width:thin){#airanksuite-root .ars-table-wrap,#airanksuite-root .ars-scroll{scrollbar-width:thin;scrollbar-color:var(--ars-btn-border-hover) transparent}}#airanksuite-root .ars-noscroll{scrollbar-width:none;overflow:visible}#airanksuite-root .ars-noscroll::-webkit-scrollbar{display:none}@keyframes ars-view-in{0%{opacity:0}to{opacity:1}}#airanksuite-root .ars-view{animation:.24s cubic-bezier(.2,0,0,1) ars-view-in}@media (prefers-reduced-motion:reduce){#airanksuite-root .ars-view{animation:none}}#airanksuite-root .ars-card,#airanksuite-root .ars-hero{transition:border-color .18s}#airanksuite-root .ars-jump{width:100%;color:var(--ars-ink);transition:background .15s,box-shadow .15s;box-shadow:inset 0 0 0 1px #3c404314;border-radius:var(--ars-r-md)!important;background:#ffffffbf!important;border:0!important;padding:8px 16px!important;font-size:12.5px!important}#airanksuite-root .ars-jump:focus{background:var(--ars-surface)!important;box-shadow:inset 0 0 0 2px var(--ars-brand)!important;outline:none!important}#airanksuite-root .ars-jump::placeholder{color:var(--ars-ink-3)}#airanksuite-root .ars-btn:focus-visible,#airanksuite-root .ars-nav-item:focus-visible{outline:2px solid var(--ars-brand);outline-offset:2px}@keyframes ars-drawer-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}#airanksuite-root .ars-drawer{animation:.22s cubic-bezier(.2,0,0,1) forwards ars-drawer-in}#airanksuite-root .ars-scrim{-webkit-backdrop-filter:blur(1.5px);backdrop-filter:blur(1.5px);z-index:9998;cursor:pointer;background:#1f1f1f47;border:0;padding:0;animation:.18s ars-view-in;position:fixed;inset:0}#airanksuite-root .ars-table td{font-variant-numeric:tabular-nums}#airanksuite-root .ars-table tbody tr:hover td:first-child{color:var(--ars-brand)}#airanksuite-root .ars-tile{border:1px solid var(--ars-line);border-radius:var(--ars-r-md,10px);background:var(--ars-surface);flex-direction:column;min-height:74px;padding:11px 14px 12px 15px;font-family:inherit;transition:border-color .16s,background .16s;display:flex;position:relative;overflow:hidden}#airanksuite-root .ars-tile:before{content:"";opacity:.9;background:currentColor;width:2px;position:absolute;inset:0 auto 0 0}#airanksuite-root .ars-tile:after{content:none}#airanksuite-root .ars-tile>*{z-index:1;position:relative}#airanksuite-root .ars-tile.is-plain:after{opacity:0}#airanksuite-root .ars-tile.is-plain:before{opacity:1;background:#c4ccda}#airanksuite-root .ars-tile.is-clickable{cursor:pointer}#airanksuite-root .ars-tile.is-clickable:hover{box-shadow:var(--ars-e3);border-color:#cfd6e4;transform:translateY(-2px)}#airanksuite-root .ars-tile.is-clickable:active{transform:translateY(0)}#airanksuite-root .ars-tile.is-clickable:focus-visible{outline:2px solid var(--ars-brand);outline-offset:2px}#airanksuite-root .ars-tile-group{letter-spacing:.09em;text-transform:uppercase;color:var(--ars-ink-3);margin-bottom:2px;font-size:11px;font-weight:700}#airanksuite-root .ars-scopebar{flex-wrap:wrap;align-items:center;gap:10px;display:flex}#airanksuite-root .ars-scope{align-items:center;gap:6px;min-width:0;display:inline-flex}#airanksuite-root .ars-scope-label{color:var(--ars-ink-3);white-space:nowrap;font-size:11.5px;font-weight:500}#airanksuite-root .ars-scope select{max-width:260px;padding-block:5px;font-size:12.5px}#airanksuite-root .ars-filterbar{z-index:5;border-radius:var(--ars-r-lg);background:var(--ars-surface);padding:10px 14px;position:sticky;top:32px}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-filterbar{background:color-mix(in srgb, var(--ars-surface) 88%, transparent)}}#airanksuite-root .ars-filterbar{-webkit-backdrop-filter:saturate(180%)blur(12px);border:1px solid var(--ars-border);box-shadow:0 1px 2px #3c404314}#airanksuite-root .ars-seg{border-radius:var(--ars-r-md);background:var(--ars-surface-2);flex-wrap:wrap;gap:2px;padding:3px;display:inline-flex}#airanksuite-root .ars-seg-item{appearance:none;cursor:pointer;font:inherit;border-radius:var(--ars-r-md);color:var(--ars-ink-2);background:0 0;border:0;padding:7px 14px;font-size:12.5px;font-weight:500;line-height:1;transition:background .16s,color .16s}#airanksuite-root .ars-seg-item:hover{background:var(--ars-surface-3)}#airanksuite-root .ars-seg-item.is-active{background:var(--ars-brand);color:#fff;box-shadow:0 1px 2px #2271b14d}#airanksuite-root .ars-seg-item.is-active:hover{background:var(--ars-brand)}#airanksuite-root .ars-rankrow{border-radius:var(--ars-r-sm);grid-template-columns:minmax(0,1fr) minmax(140px,.9fr) 74px;align-items:center;gap:12px;padding:5px 8px;transition:background .14s;display:grid}#airanksuite-root .ars-rankrow.is-clickable{cursor:pointer}#airanksuite-root .ars-rankrow.is-clickable:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-rankrow-label{color:var(--ars-ink-2);text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;overflow:hidden}#airanksuite-root .ars-rankrow-track{border-radius:var(--ars-r-sm);background:var(--ars-surface-3);height:8px;display:block;overflow:hidden}#airanksuite-root .ars-rankrow-fill{border-radius:var(--ars-r-sm);height:100%;transition:width .42s cubic-bezier(.2,0,0,1);display:block}#airanksuite-root .ars-rankrow-value{text-align:end;white-space:nowrap;color:var(--ars-ink);font-size:12.5px;font-weight:600}@media (width<=782px){#airanksuite-root .ars-filterbar{border-radius:var(--ars-r-lg);position:static}#airanksuite-root .ars-rankrow{grid-template-columns:minmax(0,1fr) 70px 64px}}#airanksuite-root .ars-cell{border-radius:var(--ars-r-sm);flex:none;width:13px;height:22px;transition:transform .14s cubic-bezier(.2,0,0,1);display:inline-block;position:relative}#airanksuite-root .ars-cell:hover{transform:scaleY(1.14)}#airanksuite-root .ars-cell-dot{border-radius:var(--ars-r-xs);background:var(--ars-surface);opacity:.9;width:4px;height:4px;margin-inline-start:-2px;position:absolute;bottom:3px;left:50%}#airanksuite-root .ars-app-wide{grid-template-columns:232px 1fr}#airanksuite-root .ars-app-mini{grid-template-columns:60px 1fr}@media (width<=782px){#airanksuite-root .ars-app-wide,#airanksuite-root .ars-app-mini{grid-template-columns:1fr}}#airanksuite-root .ars-brand{cursor:pointer;width:100%;font:inherit;color:inherit;border-radius:var(--ars-r-md);background:0 0;border:0;align-items:center;gap:10px;padding:6px 8px 10px;display:flex}#airanksuite-root .ars-brand:hover .ars-brand-mark{transform:translateY(-1px);box-shadow:0 3px 14px #2271b173}#airanksuite-root .ars-brand-mark{background:var(--ars-grad);color:#fff;border-radius:9px;flex:none;place-items:center;width:34px;height:34px;transition:box-shadow .15s,transform .15s;display:grid;box-shadow:0 2px 10px #2271b159}#airanksuite-root .ars-brand-mark svg{color:#fff}#airanksuite-root .ars-rail.is-mini .ars-brand{justify-content:center;padding:6px 0 10px}#airanksuite-root .ars-rail.is-mini .ars-nav-item{justify-content:center;gap:0;padding:9px 0}#airanksuite-root .ars-nav-rule{background:var(--ars-border);height:1px;margin:7px 10px 5px}#airanksuite-root .ars-nav-group:first-child,#airanksuite-root .ars-nav-rule:first-child{margin-top:0}#airanksuite-root .ars-header{border-bottom:1px solid var(--ars-border);background:var(--ars-surface);min-height:70px;padding-top:12px;padding-bottom:12px}#airanksuite-root .t-display{letter-spacing:-.02em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:30px;font-weight:500;line-height:1.1}#airanksuite-root .t-title{letter-spacing:-.005em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:15px;font-weight:600;line-height:1.35}#airanksuite-root .t-body{color:var(--ars-ink-2);font-size:13px;line-height:1.55}#airanksuite-root .t-caption{color:var(--ars-ink-3);font-size:11.5px;line-height:1.45}#airanksuite-root .t-overline{letter-spacing:.09em;text-transform:uppercase;color:var(--ars-ink-3);font-size:11px;font-weight:700;line-height:1}#airanksuite-root .t-num{font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1;letter-spacing:-.03em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;line-height:1}@keyframes ars-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}#airanksuite-root .ars-view>*{animation:.34s cubic-bezier(.2,0,0,1) both ars-rise}#airanksuite-root .ars-view>:first-child{animation-delay:0s}#airanksuite-root .ars-view>:nth-child(2){animation-delay:40ms}#airanksuite-root .ars-view>:nth-child(3){animation-delay:80ms}#airanksuite-root .ars-view>:nth-child(4){animation-delay:.12s}#airanksuite-root .ars-view>:nth-child(n+5){animation-delay:.15s}@media (prefers-reduced-motion:reduce){#airanksuite-root .ars-view>*,#airanksuite-root .ars-tile,#airanksuite-root .ars-card{transition:none!important;animation:none!important}}@keyframes ars-sweep{0%{stroke-dasharray:0 10000}}#airanksuite-root .ars-r-sm{border-radius:var(--ars-r-sm)}#airanksuite-root .ars-r-md{border-radius:var(--ars-r-md)}#airanksuite-root .ars-r-lg{border-radius:var(--ars-r-lg)}#airanksuite-root .ars-r-xl{border-radius:var(--ars-r-xl)}#airanksuite-root .ars-r-sm-top{border-radius:var(--ars-r-sm) var(--ars-r-sm) 0 0}#airanksuite-root .ars-page{gap:20px;max-width:1060px;display:grid}#airanksuite-root .ars-prose{max-width:88ch}#airanksuite-root .ars-cardgrid{flex-wrap:wrap;gap:8px;display:flex}#airanksuite-root .ars-cardgrid>*{flex:1 1 var(--min,250px);min-width:0}#airanksuite-root .ars-chipbar{flex-wrap:wrap;align-items:center;gap:6px;display:flex}#airanksuite-root .ars-chip{appearance:none;border:1px solid var(--ars-border);border-radius:var(--ars-r-md);background:var(--ars-surface);color:var(--ars-ink-2);font:inherit;cursor:pointer;white-space:nowrap;align-items:center;gap:6px;padding:7px 12px;font-size:12.5px;font-weight:500;line-height:1;transition:background .12s,border-color .12s,color .12s;display:inline-flex}#airanksuite-root .ars-chip:hover{background:var(--ars-surface-2);border-color:var(--ars-ink-3)}#airanksuite-root .ars-chip.is-active{background:var(--ars-brand-tonal);border-color:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);font-weight:600}#airanksuite-root .ars-chip-count{font-variant-numeric:tabular-nums;color:var(--ars-ink-3);font-size:11px;font-weight:600}#airanksuite-root .ars-chip.is-active .ars-chip-count{color:var(--ars-brand-tonal-ink);opacity:.7}#airanksuite-root .ars-url{text-overflow:ellipsis;white-space:nowrap;word-break:normal;max-width:100%;display:block;overflow:hidden}#airanksuite-root .ars-table td:has(>.ars-url){max-width:360px}#airanksuite-root .ars-table td.is-action,#airanksuite-root .ars-table th.is-action{text-align:end;white-space:nowrap;width:1%}#airanksuite-root .ars-table td.is-action>*{white-space:nowrap}#airanksuite-root .ars-actions{justify-content:flex-end;align-items:center;gap:6px;display:flex}#airanksuite-root .ars-move{border:1px solid var(--ars-border);border-radius:var(--ars-r-sm);background:var(--ars-surface);width:24px;height:24px;color:var(--ars-ink-2);cursor:pointer;place-items:center;font-size:12px;line-height:1;transition:background .12s,border-color .12s;display:inline-grid}#airanksuite-root .ars-move:hover:not(:disabled){background:var(--ars-surface-2);border-color:var(--ars-ink-3)}#airanksuite-root .ars-move:disabled{opacity:.35;cursor:default}#airanksuite-root .ars-pick{text-align:start;border:1px solid var(--ars-border);border-radius:var(--ars-r-sm);background:var(--ars-surface);cursor:pointer;flex-direction:column;justify-content:flex-start;align-items:stretch;width:100%;padding:10px 12px;transition:border-color .12s,background .12s,box-shadow .12s;display:flex;position:relative}#airanksuite-root .ars-pick:hover{border-color:var(--ars-ink-3);background:var(--ars-surface-2)}#airanksuite-root .ars-pick.is-active{border-color:var(--ars-brand);background:var(--ars-brand)}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-pick.is-active{background:color-mix(in srgb, var(--ars-brand) 5%, white)}}#airanksuite-root .ars-pick.is-active{box-shadow:inset 3px 0 0 var(--ars-brand)}#airanksuite-root .ars-pick-title{align-items:center;gap:6px;font-size:13px;font-weight:600;line-height:1.25;display:flex}#airanksuite-root .ars-pick-note{color:var(--ars-ink-3);margin-top:3px;font-size:11.5px;line-height:1.35}#airanksuite-root .ars-pick.is-active .ars-pick-note{color:var(--ars-ink-2)}#airanksuite-root .ars-tag{letter-spacing:.06em;text-transform:uppercase;border-radius:var(--ars-r-xs);white-space:nowrap;padding:2px 5px;font-size:9.5px;font-weight:700;line-height:1}#airanksuite-root .ars-disclosure{border:1px solid var(--ars-border);border-radius:var(--ars-r-sm);background:var(--ars-surface-2)}#airanksuite-root .ars-disclosure>summary{cursor:pointer;color:var(--ars-ink-2);-webkit-user-select:none;user-select:none;align-items:center;gap:7px;padding:8px 11px;font-size:12.5px;font-weight:600;list-style:none;display:flex}#airanksuite-root .ars-disclosure>summary::-webkit-details-marker{display:none}#airanksuite-root .ars-disclosure>summary:before{content:"";border-inline-start:5px solid;border-top:4px solid #0000;border-bottom:4px solid #0000;flex:none;width:0;height:0;transition:transform .14s}#airanksuite-root .ars-disclosure[open]>summary{color:var(--ars-ink);border-bottom:1px solid var(--ars-border)}#airanksuite-root .ars-disclosure-body{color:var(--ars-ink-2);background:var(--ars-surface);padding:11px;font-size:12.5px;line-height:1.55}#airanksuite-root .ars-disclosure-body p:first-child{margin-top:0}#airanksuite-root .ars-disclosure-body p:last-child{margin-bottom:0}#airanksuite-root .ars-table-wrap{max-width:100%;overflow-x:auto}#airanksuite-root .ars-savebar{z-index:20;background:var(--ars-surface);border:1px solid var(--ars-border);border-radius:var(--ars-r-md);box-shadow:var(--ars-e2);flex-wrap:wrap;align-items:center;gap:10px;margin-top:4px;padding:10px 14px;display:flex;position:sticky;bottom:0}.airanksuite-hours{border-collapse:collapse}.airanksuite-hours th,.airanksuite-hours td{text-align:start;font-weight:inherit;padding:2px 12px 2px 0}.airanksuite-hours tr.airanksuite-hours-special th{font-weight:600}.airanksuite-open-now:before{content:"";vertical-align:baseline;background:currentColor;border-radius:50%;width:8px;height:8px;margin-inline-end:6px;display:inline-block}.airanksuite-open-now.is-open{color:#188038}.airanksuite-open-now.is-closed{color:#c5221f}.airanksuite-services{margin:0;padding:0;list-style:none}.airanksuite-services li{border-bottom:1px solid #00000014;padding:6px 0}.airanksuite-service-price{float:right;font-variant-numeric:tabular-nums}.airanksuite-service-desc{opacity:.75;font-size:.9em;display:block}#airanksuite-root .ars-chip-tag{border:1px solid var(--ars-border);border-radius:var(--ars-r-sm);background:var(--ars-surface-2);max-width:100%;color:var(--ars-ink-2);align-items:center;padding:3px 4px 3px 8px;font-size:12px;font-weight:500;line-height:1.4;display:inline-flex}#airanksuite-root .ars-chip-tag.is-suggestion{color:var(--ars-ink-3);cursor:pointer;background:0 0;border-style:dashed;padding-inline-end:8px}#airanksuite-root .ars-chip-tag.is-suggestion:hover{color:var(--ars-brand);border-color:var(--ars-brand)}#airanksuite-root .ars-tabbar{border-bottom:1px solid var(--ars-border);flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:2px;display:flex}#airanksuite-root .ars-tab{appearance:none;font:inherit;color:var(--ars-ink-3);cursor:pointer;white-space:nowrap;background:0 0;border:0;border-bottom:2px solid #0000;align-items:center;gap:7px;margin-bottom:-1px;padding:9px 14px 8px;font-size:13px;font-weight:500;line-height:1.3;transition:color .14s,border-color .14s,background .14s;display:inline-flex}#airanksuite-root .ars-tab:hover{color:var(--ars-ink);background:#2271b10a}#airanksuite-root .ars-tab.is-active{color:var(--ars-brand);border-bottom-color:var(--ars-brand);font-weight:600}#airanksuite-root .ars-tab:focus-visible{outline:2px solid var(--ars-brand);outline-offset:-2px}#airanksuite-root .ars-tab-count{border-radius:var(--ars-r-xs);background:var(--ars-surface-3);color:var(--ars-ink-3);font-variant-numeric:tabular-nums;padding:3px 5px;font-size:10.5px;font-weight:700;line-height:1}#airanksuite-root .ars-masthead{border-bottom:1px solid var(--ars-border);flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:18px;padding:0 0 14px;display:flex}#airanksuite-root .ars-card>.ars-table-wrap>.ars-table th:first-child,#airanksuite-root .ars-card>.ars-table-wrap>.ars-table td:first-child{padding-inline-start:18px}#airanksuite-root .ars-card>.ars-table-wrap>.ars-table th:last-child,#airanksuite-root .ars-card>.ars-table-wrap>.ars-table td:last-child{padding-inline-end:18px}#airanksuite-root .ars-card>.ars-table-wrap>.ars-table th{border-radius:0}#airanksuite-root .ars-empty{text-align:center;color:var(--ars-ink-2);flex-direction:column;align-items:center;gap:6px;padding:30px 24px;display:flex}#airanksuite-root .ars-empty-mark{border-radius:var(--ars-r-md);background:var(--ars-surface-2);border:1px solid var(--ars-border);width:40px;height:40px;color:var(--ars-ink-3);justify-content:center;align-items:center;margin-bottom:4px;display:inline-flex}#airanksuite-root .ars-switch{border-radius:var(--ars-r-md);cursor:pointer;background:#dbe1ea;border:1px solid #c3ccd9;flex:none;width:38px;height:21px;transition:background .16s cubic-bezier(.2,0,0,1),border-color .16s;display:inline-block;position:relative}#airanksuite-root .ars-switch:after{content:"";border-radius:var(--ars-r-sm);background:var(--ars-surface);width:15px;height:15px;transition:transform .16s cubic-bezier(.2,0,0,1);position:absolute;top:2px;left:2px;box-shadow:0 1px 2px #3c404347}#airanksuite-root .ars-switch.is-on{background:var(--ars-brand);border-color:var(--ars-brand)}#airanksuite-root .ars-switch.is-on:after{transform:translate(17px)}#airanksuite-root .ars-switch.is-disabled{opacity:.45;cursor:default}#airanksuite-root .ars-switch:focus-visible{outline:2px solid var(--ars-brand);outline-offset:2px}#airanksuite-root label{color:var(--ars-ink)}#airanksuite-root .ars-disclosure>summary:before{content:"▸";color:var(--ars-ink-3);font-size:10px;transition:transform .16s;display:inline-block}#airanksuite-root .ars-disclosure[open]>summary:before{transform:rotate(90deg)}#airanksuite-root .ars-disclosure>summary:hover{color:var(--ars-ink)}#airanksuite-root .ars-disclosure[open]>summary{border-bottom:1px solid var(--ars-border)}#airanksuite-root .ars-head-strip{border:1px solid var(--ars-border);background:var(--ars-surface-2);border-radius:6px;flex-wrap:wrap;align-items:center;gap:18px;padding:10px 12px;display:flex}#airanksuite-root .ars-head-stat{align-items:baseline;gap:6px;display:flex}#airanksuite-root .ars-head-stat b{font-variant-numeric:tabular-nums;font-size:16px;font-weight:700;line-height:1}#airanksuite-root .ars-head-stat span{color:var(--ars-ink-3);font-size:11.5px}#airanksuite-root .ars-head-stat.is-bad b{color:var(--ars-serious)}#airanksuite-root .ars-head-stat.is-warn b{color:var(--ars-warning)}#airanksuite-root .ars-head-group{border:1px solid var(--ars-border);background:var(--ars-surface);border-radius:6px;overflow:hidden}#airanksuite-root .ars-head-group-head{background:var(--ars-surface-2);border-bottom:1px solid var(--ars-border);justify-content:space-between;align-items:flex-start;gap:12px;padding:9px 12px;display:flex}#airanksuite-root .ars-head-rows{display:grid}#airanksuite-root .ars-head-row+.ars-head-row{border-top:1px solid var(--ars-border)}#airanksuite-root .ars-head-row-main{text-align:start;cursor:pointer;width:100%;font:inherit;background:0 0;border:0;grid-template-columns:168px minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:7px 12px;display:grid}#airanksuite-root .ars-head-row-main:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-head-key{color:var(--ars-ink);text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600;overflow:hidden}#airanksuite-root .ars-head-val{color:var(--ars-ink-2);text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-family:var(--ars-font-mono,ui-monospace, SFMono-Regular, Menlo, monospace);overflow:hidden}#airanksuite-root .ars-head-len{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-head-row.is-missing{background:var(--ars-c-red)}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-head-row.is-missing{background:color-mix(in srgb, var(--ars-c-red) 55%, transparent)}}#airanksuite-root .ars-head-row-body{border-top:1px dashed var(--ars-border);background:var(--ars-surface-2);gap:8px;padding:2px 12px 12px;display:grid}#airanksuite-root .ars-head-code{background:var(--ars-surface-3);color:var(--ars-ink-2);border-radius:3px;padding:1px 6px;font-size:11px}#airanksuite-root .ars-head-pre{background:var(--ars-ink);color:var(--ars-border);white-space:pre-wrap;word-break:break-word;tab-size:2;border-radius:4px;max-height:260px;margin:0;padding:10px 12px;font-size:11.5px;line-height:1.65;overflow:auto}#airanksuite-root .ars-head-pre.is-tall{max-height:460px}#airanksuite-root .ars-card.is-flush .ars-head-pre{border-radius:0}#airanksuite-root .ars-head-issue{border:1px solid var(--ars-border);background:var(--ars-surface-2);border-radius:5px;gap:10px;padding:9px 12px;display:flex}#airanksuite-root .ars-head-issue.is-error{background:var(--ars-c-red);border-color:#0000}#airanksuite-root .ars-head-issue.is-warn{background:var(--ars-c-yellow);border-color:#0000}#airanksuite-root .ars-head-issue-mark{background:#ffffffb3;border-radius:50%;flex:none;place-items:center;width:18px;height:18px;font-size:11px;font-weight:700;display:grid}#airanksuite-root .ars-head-issue.is-error .ars-head-issue-mark{color:var(--ars-c-red-ink)}#airanksuite-root .ars-head-issue.is-warn .ars-head-issue-mark{color:var(--ars-c-yellow-ink)}#airanksuite-root .ars-head-drift{border:1px solid var(--ars-border);background:var(--ars-surface);border-radius:5px;gap:4px;padding:9px 12px;display:grid}#airanksuite-root .ars-head-drift-row{grid-template-columns:56px minmax(0,1fr);align-items:baseline;gap:8px;display:grid}#airanksuite-root .ars-head-drift-row code{color:var(--ars-ink-2);word-break:break-word;font-size:11.5px}#airanksuite-root .ars-linkbtn{cursor:pointer;font:inherit;color:var(--ars-brand);background:0 0;border:0;padding:0;font-size:12px;font-weight:600}@media (width<=900px){#airanksuite-root .ars-head-row-main{grid-template-columns:minmax(0,1fr) auto;row-gap:2px}#airanksuite-root .ars-head-val{grid-column:1/-1}}#airanksuite-root .ars-snip-head{border:1px solid var(--ars-border);background:var(--ars-surface);box-shadow:var(--ars-e1);border-radius:8px;flex-wrap:wrap;align-items:center;gap:16px;padding:12px 16px;display:flex}#airanksuite-root .ars-snip-stats{flex-wrap:wrap;align-items:center;gap:20px;display:flex}#airanksuite-root .ars-snip-stat{line-height:1.15;display:grid}#airanksuite-root .ars-snip-stat b{font-variant-numeric:tabular-nums;font-size:19px;font-weight:700}#airanksuite-root .ars-snip-stat span{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-snip-stat.is-live b{color:var(--ars-good,var(--ars-good))}#airanksuite-root .ars-snip-stat.is-bad b{color:var(--ars-serious)}#airanksuite-root .ars-snip-actions{flex-wrap:wrap;align-items:center;gap:8px;margin-inline-start:auto;display:flex}#airanksuite-root .ars-snip-list{display:grid}#airanksuite-root .ars-snip-row+.ars-snip-row{border-top:1px solid var(--ars-border)}#airanksuite-root .ars-snip-row.is-open{background:var(--ars-surface-2)}#airanksuite-root .ars-snip-row-head{align-items:center;gap:8px;padding-inline-end:12px;display:flex}#airanksuite-root .ars-snip-row-main{text-align:start;min-width:0;font:inherit;cursor:pointer;background:0 0;border:0;flex:1;grid-template-columns:14px auto minmax(0,1fr) auto auto auto auto;align-items:center;gap:10px;padding:9px 12px;display:grid}#airanksuite-root .ars-snip-row-main:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-snip-caret{color:var(--ars-ink-3);font-size:10px}#airanksuite-root .ars-snip-type{letter-spacing:.03em;text-transform:uppercase;text-align:center;border-radius:3px;min-width:40px;padding:2px 6px;font-size:10px;font-weight:700}#airanksuite-root .ars-snip-name{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:13px;font-weight:600;overflow:hidden}#airanksuite-root .ars-snip-note{color:var(--ars-ink-3);text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;font-weight:400;display:block;overflow:hidden}#airanksuite-root .ars-snip-meta{color:var(--ars-ink-3);white-space:nowrap;font-size:11.5px}#airanksuite-root .ars-snip-row-tools{flex:none;align-items:center;gap:8px;display:flex}#airanksuite-root .ars-snip-body{border-top:1px dashed var(--ars-border);gap:12px;padding:4px 12px 16px;display:grid}#airanksuite-root .ars-live-dot{background:var(--ars-good);width:7px;height:7px;box-shadow:0 0 0 3px var(--ars-good);border-radius:50%}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-live-dot{box-shadow:0 0 0 3px color-mix(in srgb, var(--ars-good) 18%, transparent)}}#airanksuite-root .ars-snip-chain{border-bottom:1px solid var(--ars-border);flex-wrap:wrap;align-items:center;gap:6px;padding:10px 14px;display:flex}#airanksuite-root .ars-snip-chain-node{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);border-radius:4px;padding:3px 8px;font-size:11.5px;font-weight:600}#airanksuite-root .ars-snip-chain-arrow{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-code-wrap{border:1px solid var(--ars-border);background:var(--ars-ink);border-radius:5px;grid-template-columns:44px minmax(0,1fr);display:grid;overflow:hidden}#airanksuite-root .ars-code-gutter{color:#5a6070;font:11.5px/1.6 var(--ars-font-mono,ui-monospace, SFMono-Regular, Menlo, monospace);text-align:end;-webkit-user-select:none;user-select:none;background:#14161c;align-content:start;padding:10px 0;display:grid;overflow:hidden}#airanksuite-root .ars-code-gutter span{padding-inline-end:10px}#airanksuite-root textarea.ars-code-area{color:var(--ars-border);tab-size:4;white-space:pre;resize:vertical;box-shadow:none;background:0 0;border:0;border-radius:0;margin:0;padding:10px 12px;font-size:11.5px;line-height:1.6}#airanksuite-root textarea.ars-code-area:focus{box-shadow:none;background:#1c1f28;outline:0}#airanksuite-root .ars-lib-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px;display:grid}#airanksuite-root .ars-lib-card{border:1px solid var(--ars-border);background:var(--ars-surface);border-radius:8px;flex-direction:column;gap:6px;padding:14px;display:flex}#airanksuite-root .ars-lib-code{background:var(--ars-ink);color:#cfd3e4;white-space:pre;border-radius:4px;max-height:116px;margin:0;padding:9px 10px;font-size:10.5px;line-height:1.55;overflow:hidden}#airanksuite-root .ars-search{border:1px solid var(--ars-border);background:var(--ars-surface);color:var(--ars-ink-3);border-radius:5px;align-items:center;gap:6px;padding:0 8px;display:flex}#airanksuite-root .ars-search input{box-shadow:none;background:0 0;border:0;min-width:200px;padding:5px 0}#airanksuite-root .ars-search input:focus{box-shadow:none;outline:0}#airanksuite-root .ars-floor{background:var(--ars-surface-2);color:var(--ars-ink);padding:20px 18px 16px;position:relative;overflow:hidden}#airanksuite-root .ars-floor.is-dark{padding:26px 18px}#airanksuite-root .ars-floor-off{border:1px solid var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);color:var(--ars-ink-2);flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:14px;padding:12px 14px;display:flex}#airanksuite-root .ars-floor-off>.ars-btn{margin-inline-start:auto}#airanksuite-root .ars-floor-desks.is-dark{opacity:.72}#airanksuite-root .ars-desk.is-dark{background:0 0;border-style:dashed}#airanksuite-root .ars-desk.is-dark .ars-desk-eng{background:var(--ars-surface-3);color:var(--ars-ink-3);border-color:#0000}#airanksuite-root .ars-circuits-wrap{border:1px solid var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);margin-bottom:16px;padding:12px 12px 14px}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-circuits-wrap{background:color-mix(in srgb, var(--ars-surface) 70%, transparent)}}#airanksuite-root .ars-floor-rail-label{justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:10px;display:flex}#airanksuite-root .ars-circuits-wrap .ars-circuits{margin-bottom:0}#airanksuite-root .ars-floor-off-mark{background:var(--ars-btn-border-hover);border-radius:50%;flex:none;width:10px;height:10px;margin-top:4px}#airanksuite-root .ars-floor-off .font-semibold{color:var(--ars-ink)}#airanksuite-root .ars-floor-bus{background:var(--ars-border);border-radius:2px;height:3px;margin-bottom:16px;position:relative;overflow:hidden}#airanksuite-root .ars-floor.is-live .ars-floor-bus{background:var(--ars-brand);box-shadow:0 0 14px #2271b12e}#airanksuite-root .ars-floor-bus-flow{background:var(--ars-brand-tonal);opacity:0;width:22%;position:absolute;inset:0;transform:translate(-30%)}#airanksuite-root .ars-floor.is-live .ars-floor-bus-flow{opacity:1;animation:3.4s linear infinite ars-bus}@keyframes ars-bus{0%{transform:translate(-30%)}to{transform:translate(460%)}}#airanksuite-root .ars-floor-engines{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px;margin-bottom:18px;display:grid}#airanksuite-root .ars-eng{border:1px solid var(--ars-border);background:linear-gradient(#fff,#fff);border-radius:7px;padding:10px 12px 11px;position:relative}#airanksuite-root .ars-eng.is-default{border-color:var(--ars-brand-ink)}#airanksuite-root .ars-eng-lead{background:var(--ars-border);top:-17px;width:1px;height:17px;position:absolute;inset-inline-start:22px}#airanksuite-root .ars-floor.is-live .ars-eng-lead{background:var(--ars-brand)}#airanksuite-root .ars-eng-head{align-items:center;gap:7px;display:flex}#airanksuite-root .ars-eng-dot{background:var(--ars-btn-border-hover);border-radius:50%;flex:none;width:7px;height:7px}#airanksuite-root .ars-floor.is-live .ars-eng-dot{background:#1fa06a;box-shadow:0 0 0 3px #1fa06a26}#airanksuite-root .ars-eng.is-busy .ars-eng-dot{background:var(--ars-accent);animation:1.1s ease-in-out infinite ars-pulse;box-shadow:0 0 0 3px #e8a33d38}@keyframes ars-pulse{0%,to{box-shadow:0 0 0 3px #e8a33d38}50%{box-shadow:0 0 0 7px #e8a33d0d}}#airanksuite-root .ars-eng-name{color:var(--ars-ink);text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;font-weight:600;overflow:hidden}#airanksuite-root .ars-eng-flag{letter-spacing:.04em;text-transform:uppercase;color:var(--ars-brand);margin-inline-start:auto;font-size:9.5px;font-weight:700}#airanksuite-root .ars-eng-model{color:var(--ars-ink-3);text-overflow:ellipsis;white-space:nowrap;margin-top:2px;font-size:10.5px;overflow:hidden}#airanksuite-root .ars-eng-load{color:var(--ars-ink-3);align-items:center;gap:8px;margin-top:8px;font-size:10.5px;display:flex}#airanksuite-root .ars-eng-load-bar{background:var(--ars-border);border-radius:2px;flex:1;height:3px;overflow:hidden}#airanksuite-root .ars-eng-load-bar span{background:var(--ars-brand);height:100%;transition:width .4s cubic-bezier(.2,0,0,1);display:block}#airanksuite-root .ars-floor-desks{grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;display:grid}#airanksuite-root .ars-desk{border:1px solid var(--ars-surface-3);background:#16161e05;border-radius:7px;min-width:0;padding:9px 11px 10px;transition:border-color .24s,background .24s;overflow:hidden}#airanksuite-root .ars-desk.is-active{border-color:var(--ars-brand);background:#6d5cf017}#airanksuite-root .ars-desk-head{justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:6px;display:flex}#airanksuite-root .ars-desk-name{letter-spacing:.05em;text-transform:uppercase;color:var(--ars-ink-2);font-size:11px;font-weight:700}#airanksuite-root .ars-desk-hint{color:var(--ars-ink-3);font-size:10px}#airanksuite-root .ars-desk-jobs{gap:3px;margin:0;padding:0;list-style:none;display:grid}#airanksuite-root .ars-desk-jobs li{border-top:1px solid #16161e0a;gap:1px;padding:4px 0;display:grid}#airanksuite-root .ars-desk-jobs li:first-child{border-top:0}#airanksuite-root .ars-desk-job{min-width:0;color:var(--ars-ink-2);text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;overflow:hidden}#airanksuite-root .ars-desk-jobs li.is-on .ars-desk-job{color:var(--ars-brand-ink);font-weight:600}#airanksuite-root .ars-desk-eng{text-overflow:ellipsis;white-space:nowrap;max-width:100%;color:var(--ars-wire,var(--ars-ink-3));justify-self:start;padding-inline-start:12px;font-size:10.5px;font-weight:600;position:relative;overflow:hidden}#airanksuite-root .ars-desk-eng:before{content:"";opacity:.7;inset-inline-start:0;background:currentColor;border-radius:1px;width:8px;height:2px;position:absolute;top:50%}#airanksuite-root .ars-desk-eng.is-cold{color:var(--ars-ink-3);text-decoration:line-through}#airanksuite-root .ars-desk-jobs li.is-on .ars-desk-eng:before{opacity:1;box-shadow:0 0 6px}#airanksuite-root .ars-floor-now{background:var(--ars-surface-2);border:1px solid var(--ars-surface-3);border-radius:6px;align-items:center;gap:10px;min-height:38px;margin-top:14px;padding:9px 12px;display:flex}#airanksuite-root .ars-floor-now.is-on{border-color:var(--ars-brand);background:var(--ars-brand-tonal)}#airanksuite-root .ars-floor-now-mark{background:var(--ars-accent);border-radius:50%;flex:none;width:8px;height:8px;animation:1.1s ease-in-out infinite ars-pulse}#airanksuite-root .ars-floor-now-text{color:var(--ars-ink);text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:12.5px;overflow:hidden}#airanksuite-root .ars-floor-now-text.is-idle{color:var(--ars-ink-3)}#airanksuite-root .ars-floor-now-time{color:var(--ars-brand-tonal-ink);flex:none;margin-inline-start:auto;font-size:11.5px}#airanksuite-root .ars-floor.is-still .ars-floor-bus-flow,#airanksuite-root .ars-floor.is-still .ars-eng-dot,#airanksuite-root .ars-floor.is-still .ars-floor-now-mark{animation:none}#airanksuite-root .ars-routing{border-top:1px solid var(--ars-border);padding:14px 16px 16px}#airanksuite-root .ars-routing-head{flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:12px;display:flex}#airanksuite-root .ars-routing-head p{max-width:62ch}#airanksuite-root .ars-routing-grid{grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:8px;display:grid}#airanksuite-root .ars-routing-row{border:1px solid var(--ars-border);background:var(--ars-surface);border-radius:6px;grid-template-columns:minmax(0,1fr) 150px;align-items:center;gap:12px;padding:9px 11px;display:grid}#airanksuite-root .ars-routing-row select{width:100%}#airanksuite-root .ars-trait{letter-spacing:.02em;background:var(--ars-surface-3);color:var(--ars-ink-3);border-radius:3px;padding:1px 6px;font-size:10px;font-weight:600}@media (width<=782px){#airanksuite-root .ars-routing-row{grid-template-columns:minmax(0,1fr)}#airanksuite-root .ars-snip-row-main{grid-template-columns:14px auto minmax(0,1fr) auto;row-gap:4px}#airanksuite-root .ars-snip-meta:nth-of-type(n+2){display:none}}#airanksuite-root .ars-sheet-rail>*{min-width:0;max-width:100%}#airanksuite-root .ars-sheet-rail :where(a,code,span,div,p){overflow-wrap:anywhere}#airanksuite-root .ars-sheet-rail .grid,#airanksuite-root .ars-sheet-rail{grid-template-columns:minmax(0,1fr)}#airanksuite-root .ars-sheet-rail .grid>*{min-width:0;max-width:100%}#airanksuite-root .ars-sheet-rail .ars-frame{box-sizing:border-box;width:100%;max-width:100%!important}#airanksuite-root .ars-sheet-rail .ars-seg-item{padding:6px 9px;font-size:12px}#airanksuite-root .ars-typebar{border:1px solid var(--ars-border);background:var(--ars-surface);box-shadow:var(--ars-e1);border-radius:8px;flex-wrap:wrap;align-items:stretch;gap:2px;padding:3px;display:flex}#airanksuite-root .ars-typetab{cursor:pointer;font:inherit;color:var(--ars-ink-2);background:0 0;border:0;border-radius:5px;align-items:baseline;gap:7px;padding:7px 12px;display:flex;position:relative}#airanksuite-root .ars-typetab:hover{background:var(--ars-surface-2);color:var(--ars-ink)}#airanksuite-root .ars-typetab.is-active{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink)}#airanksuite-root .ars-typetab-label{font-size:12.5px;font-weight:600}#airanksuite-root .ars-typetab-count{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-typetab.is-active .ars-typetab-count{color:inherit;opacity:.72}#airanksuite-root .ars-typetab-dot{background:var(--ars-warning);top:5px;border-radius:50%;width:5px;height:5px;position:absolute;inset-inline-end:6px}#airanksuite-root .ars-typehealth{border:1px solid var(--ars-border);background:var(--ars-surface);box-shadow:var(--ars-e1);border-radius:8px;flex-wrap:wrap;align-items:center;gap:24px;padding:13px 16px;display:flex}#airanksuite-root .ars-typehealth-main{flex:1;gap:5px;min-width:240px;display:grid}#airanksuite-root .ars-typehealth-bar{background:var(--ars-surface-3);border-radius:3px;max-width:420px;height:6px;overflow:hidden}#airanksuite-root .ars-typehealth-bar span{background:var(--ars-grad);height:100%;transition:width .38s cubic-bezier(.2,0,0,1);display:block}#airanksuite-root .ars-typehealth-figs{flex-wrap:wrap;gap:6px;display:flex}#airanksuite-root .ars-healthfig{border:1px solid var(--ars-border);background:var(--ars-surface-2);cursor:pointer;font:inherit;text-align:start;border-radius:6px;gap:1px;min-width:84px;padding:7px 11px;display:grid}#airanksuite-root .ars-healthfig:hover:not(:disabled){border-color:var(--ars-brand)}#airanksuite-root .ars-healthfig:disabled{cursor:default;opacity:.55}#airanksuite-root .ars-healthfig b{font-size:16px;font-weight:700;line-height:1.1}#airanksuite-root .ars-healthfig span{color:var(--ars-ink-3);font-size:10.5px}#airanksuite-root .ars-healthfig.is-bad b{color:var(--ars-serious)}#airanksuite-root .ars-healthfig.is-warn b{color:var(--ars-warning)}#airanksuite-root .ars-report-head{border:1px solid var(--ars-border);background:var(--ars-surface);border-radius:8px;align-items:flex-start;gap:16px;padding:14px 16px;display:flex}#airanksuite-root .ars-report-head.is-green{border-inline-start:3px solid var(--ars-good)}#airanksuite-root .ars-report-head.is-amber{border-inline-start:3px solid var(--ars-warning)}#airanksuite-root .ars-report-head.is-red{border-inline-start:3px solid var(--ars-serious)}#airanksuite-root .ars-report-score{flex:none;align-items:baseline;gap:1px;display:flex}#airanksuite-root .ars-report-score b{letter-spacing:-.02em;font-size:34px;font-weight:700;line-height:1}#airanksuite-root .ars-report-score span{color:var(--ars-ink-3);font-size:14px}#airanksuite-root .ars-report-bar{background:var(--ars-surface-3);border-radius:3px;max-width:420px;height:6px;overflow:hidden}#airanksuite-root .ars-report-bar span{background:var(--ars-grad);height:100%;transition:width .42s cubic-bezier(.2,0,0,1);display:block}#airanksuite-root .ars-report-group{border:1px solid var(--ars-border);background:var(--ars-surface);border-radius:6px;overflow:hidden}#airanksuite-root .ars-report-group-head{background:var(--ars-surface-2);border-bottom:1px solid var(--ars-border);justify-content:space-between;align-items:flex-start;gap:12px;padding:9px 12px;display:flex}#airanksuite-root .ars-report-tally{font-variant-numeric:tabular-nums;color:var(--ars-good);font-size:11.5px;font-weight:700}#airanksuite-root .ars-report-tally.is-bad{color:var(--ars-serious)}#airanksuite-root .ars-report-row{align-items:flex-start;gap:10px;padding:9px 12px;display:flex}#airanksuite-root .ars-report-row+.ars-report-row{border-top:1px solid var(--ars-border)}#airanksuite-root .ars-report-row.is-pass{opacity:.72}#airanksuite-root .ars-report-mark{background:var(--ars-c-red);width:18px;height:18px;color:var(--ars-c-red-ink);border-radius:50%;flex:none;place-items:center;margin-top:1px;font-size:10px;font-weight:700;display:grid}#airanksuite-root .ars-report-row.is-pass .ars-report-mark{background:var(--ars-c-green);color:var(--ars-c-green-ink)}#airanksuite-root .ars-report-weight{letter-spacing:1px;color:var(--ars-ink-3);font-size:7px}#airanksuite-root .ars-report-value{background:var(--ars-surface-2);max-width:100%;color:var(--ars-ink-2);text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom;border-radius:3px;margin-top:4px;padding:1px 6px;font-size:11px;display:inline-block;overflow:hidden}#airanksuite-root .ars-band-notes{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px;margin-top:14px;display:grid}#airanksuite-root .ars-band-note{align-items:flex-start;gap:8px;display:flex}#airanksuite-root .ars-band-swatch{border-radius:3px;flex:none;width:10px;height:10px;margin-top:3px}#airanksuite-root .ars-areamap{display:grid}#airanksuite-root .ars-arearow{border:0;border-top:1px solid var(--ars-border);width:100%;font:inherit;text-align:start;cursor:pointer;background:0 0;grid-template-columns:52px 200px minmax(80px,1fr) 200px 16px;align-items:center;gap:14px;padding:10px 16px;display:grid}#airanksuite-root .ars-arearow:first-child{border-top:0}#airanksuite-root .ars-arearow:hover:not(:disabled){background:var(--ars-surface-2)}#airanksuite-root .ars-arearow:disabled{cursor:default;opacity:.6}#airanksuite-root .ars-arearow.is-open{background:var(--ars-brand-tonal)}#airanksuite-root .ars-area-score{text-align:end;letter-spacing:-.02em;font-size:22px;font-weight:700;line-height:1}#airanksuite-root .ars-arearow.is-good .ars-area-score{color:var(--ars-good)}#airanksuite-root .ars-arearow.is-warn .ars-area-score{color:var(--ars-warning)}#airanksuite-root .ars-arearow.is-bad .ars-area-score{color:var(--ars-serious)}#airanksuite-root .ars-arearow.is-none .ars-area-score{color:var(--ars-ink-3)}#airanksuite-root .ars-area-label{min-width:0;display:grid}#airanksuite-root .ars-area-label b{font-size:13px;font-weight:600}#airanksuite-root .ars-area-label span{color:var(--ars-ink-3);text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;overflow:hidden}#airanksuite-root .ars-area-bar{background:var(--ars-surface-3);border-radius:5px;height:10px;display:flex;overflow:hidden}#airanksuite-root .ars-area-bar i{flex-basis:0;display:block}#airanksuite-root .ars-area-bar i.is-bad{background:#d1495b}#airanksuite-root .ars-area-bar i.is-warn{background:#e2952b}#airanksuite-root .ars-area-bar i.is-good{background:#2b7a4b}#airanksuite-root .ars-area-bar i.is-none{background:var(--ars-surface-3)}#airanksuite-root .ars-area-counts{color:var(--ars-ink-3);text-align:end;font-size:11.5px}#airanksuite-root .ars-area-counts b{color:var(--ars-ink);font-variant-numeric:tabular-nums}#airanksuite-root .ars-area-caret{color:var(--ars-ink-3);font-size:10px}@media (width<=960px){#airanksuite-root .ars-arearow{grid-template-columns:44px minmax(0,1fr) 16px;row-gap:6px}#airanksuite-root .ars-area-bar,#airanksuite-root .ars-area-counts{text-align:start;grid-column:2/3}}#airanksuite-root .ars-rr-stat{border:1px solid var(--ars-border);background:var(--ars-surface);box-shadow:var(--ars-e1);border-radius:8px;gap:1px;padding:12px 14px;display:grid}#airanksuite-root .ars-rr-stat b{font-variant-numeric:tabular-nums;font-size:24px;font-weight:700;line-height:1.05}#airanksuite-root .ars-rr-stat span{color:var(--ars-ink-3);font-size:11.5px}#airanksuite-root .ars-rr-stat.is-bad b{color:var(--ars-serious)}#airanksuite-root .ars-rr-row+.ars-rr-row{border-top:1px solid var(--ars-border)}#airanksuite-root .ars-rr-main{text-align:start;width:100%;font:inherit;cursor:pointer;background:0 0;border:0;grid-template-columns:14px minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:11px 14px;display:grid}#airanksuite-root .ars-rr-main:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-rr-caret{color:var(--ars-ink-3);font-size:10px}#airanksuite-root .ars-rr-about{color:var(--ars-ink-3);margin-top:2px;font-size:11.5px;display:block}#airanksuite-root .ars-rr-count{color:var(--ars-ink-2);white-space:nowrap;font-size:12px}#airanksuite-root .ars-rr-body{background:var(--ars-surface-2);border-top:1px dashed var(--ars-border);gap:14px;padding:4px 14px 16px 40px;display:grid}#airanksuite-root .ars-rr-props{grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:6px;display:grid}#airanksuite-root .ars-rr-prop{border:1px solid var(--ars-border);border-inline-start:3px solid var(--ars-ink-3);background:var(--ars-surface);border-radius:5px;gap:1px;padding:7px 10px;display:grid}#airanksuite-root .ars-rr-prop.is-required{border-inline-start-color:var(--ars-serious)}#airanksuite-root .ars-rr-prop code{color:var(--ars-ink);background:0 0;justify-self:start;padding:0;font-size:11.5px;font-weight:600}#airanksuite-root .ars-rr-prop span{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-rr-prop em{color:var(--ars-ink-2);margin-top:3px;font-size:11.5px;font-style:normal}#airanksuite-root .ars-rr-sample{flex-wrap:wrap;align-items:baseline;gap:10px;display:flex}#airanksuite-root .ars-crawl-region{background:var(--ars-surface-2);border-top:1px solid var(--ars-border);border-bottom:1px solid var(--ars-border);flex-wrap:wrap;align-items:baseline;gap:10px;padding:9px 14px;display:flex}#airanksuite-root .ars-crawl-region b{letter-spacing:.05em;text-transform:uppercase;font-size:11px;font-weight:700}#airanksuite-root .ars-crawl-region span{color:var(--ars-ink-3);min-width:0;font-size:11.5px}#airanksuite-root .ars-crawl-row{grid-template-columns:minmax(0,1fr) 100px 120px;align-items:center;gap:14px;padding:10px 14px;display:grid}#airanksuite-root .ars-crawl-row+.ars-crawl-row{border-top:1px solid var(--ars-border)}#airanksuite-root .ars-crawl-row.is-defiant{background:var(--ars-c-red)}#airanksuite-root .ars-crawl-meta{color:var(--ars-ink-3);margin-top:3px;font-size:11.5px}#airanksuite-root .ars-crawl-meta b{color:var(--ars-ink);font-weight:600}#airanksuite-root .ars-crawl-spark{opacity:.85;min-width:0}#airanksuite-root .ars-crawl-switch{justify-content:flex-end;align-items:center;gap:8px;display:flex}@media (width<=782px){#airanksuite-root .ars-crawl-row{grid-template-columns:minmax(0,1fr) auto}#airanksuite-root .ars-crawl-spark{display:none}}#airanksuite-root .ars-nav-toggle{border:1px solid var(--ars-border);background:var(--ars-surface);cursor:pointer;border-radius:8px;flex:none;width:38px;height:38px;margin-inline-start:-6px;display:none;position:relative}#airanksuite-root .ars-nav-toggle span{background:var(--ars-ink);height:2px;box-shadow:0 -6px 0 var(--ars-ink), 0 6px 0 var(--ars-ink);border-radius:1px;position:absolute;inset:50% 10px auto}#airanksuite-root .ars-nav-scrim{z-index:98;cursor:pointer;background:#10121a6b;border:0;display:none;position:fixed;inset:0}@media (width<=782px){#airanksuite-root .ars-nav-toggle{display:block}#airanksuite-root .ars-rail{z-index:99;overscroll-behavior:contain;background:var(--ars-surface);border-inline-end:1px solid var(--ars-border);visibility:hidden;top:32px;bottom:0;width:min(300px,86vw);transition:transform .24s cubic-bezier(.2,0,0,1),visibility .24s;position:fixed;inset-inline-start:0;overflow-y:auto;transform:translate(-102%);box-shadow:0 0 40px #10121a2e}#airanksuite-root .ars-app.is-nav-open .ars-rail{visibility:visible;transform:none}#airanksuite-root .ars-app.is-nav-open .ars-nav-scrim{display:block}#airanksuite-root .ars-rail.is-mini{width:min(300px,86vw)}#airanksuite-root .ars-rail.is-mini .ars-nav-item span,#airanksuite-root .ars-rail.is-mini .ars-nav-group{display:revert}#airanksuite-root .ars-header,#airanksuite-root .ars-page,#airanksuite-root .ars-main>*{padding-inline:12px}#airanksuite-root .ars-nav-item{min-height:42px}#airanksuite-root button,#airanksuite-root .ars-chip,#airanksuite-root .ars-seg-item{min-height:36px}#airanksuite-root input,#airanksuite-root select,#airanksuite-root textarea{min-height:40px;font-size:16px}#airanksuite-root .ars-page .grid.sm\:grid-cols-2,#airanksuite-root .ars-page .lg\:grid-cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}#airanksuite-root .ars-table-wrap{-webkit-overflow-scrolling:touch;overflow-x:auto}#airanksuite-root .ars-table-wrap .ars-table{min-width:560px}#airanksuite-root .ars-app,#airanksuite-root .ars-main,#airanksuite-root .ars-card,#airanksuite-root .ars-page{min-width:0;max-width:100%}#airanksuite-root .ars-typebar{scrollbar-width:none;flex-wrap:nowrap;overflow-x:auto}#airanksuite-root .ars-typebar::-webkit-scrollbar{display:none}#airanksuite-root .ars-drawer,#airanksuite-root .ars-drawer.is-wide,#airanksuite-root .ars-drawer.is-max{width:100vw;inset-inline-start:0}#airanksuite-root .ars-sheet-tabs{scrollbar-width:none;overflow-x:auto}#airanksuite-root .ars-sheet-tabs::-webkit-scrollbar{display:none}#airanksuite-root .ars-sheet-foot{flex-wrap:wrap;gap:8px}#airanksuite-root .ars-card-head{flex-wrap:wrap;row-gap:8px}#airanksuite-root .ars-typehealth,#airanksuite-root .ars-snip-head,#airanksuite-root .ars-head-strip{gap:12px}#airanksuite-root .ars-snip-actions{width:100%;margin-inline-start:0}#airanksuite-root .ars-lib-grid,#airanksuite-root .ars-routing-grid,#airanksuite-root .ars-rr-props{grid-template-columns:minmax(0,1fr)}#airanksuite-root .ars-rr-main{grid-template-columns:14px minmax(0,1fr);row-gap:6px}#airanksuite-root .ars-rr-count,#airanksuite-root .ars-rr-body{grid-column:1/-1}#airanksuite-root .ars-rr-body{padding-inline-start:14px}#airanksuite-root .ars-floor-engines,#airanksuite-root .ars-floor-desks{grid-template-columns:minmax(0,1fr)}}@media (width<=600px){#airanksuite-root .ars-page .grid.sm\:grid-cols-2,#airanksuite-root .ars-page .lg\:grid-cols-4,#airanksuite-root .ars-page .sm\:grid-cols-3,#airanksuite-root .ars-page .lg\:grid-cols-2{grid-template-columns:minmax(0,1fr)}#airanksuite-root .ars-page-title{font-size:17px}#airanksuite-root .ars-typehealth-figs{width:100%}#airanksuite-root .ars-healthfig{flex:1}}#airanksuite-root .ars-auth{justify-content:flex-end;align-items:center;gap:7px;min-width:84px;display:inline-flex}#airanksuite-root .ars-auth-bar{background:var(--ars-surface-3);border-radius:3px;width:46px;height:6px;display:block;overflow:hidden}#airanksuite-root .ars-auth-bar i{background:var(--ars-grad);height:100%;display:block}#airanksuite-root .ars-auth b{text-align:end;min-width:22px;font-size:11.5px}#airanksuite-root .ars-circuits{grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;margin-bottom:16px;display:grid}#airanksuite-root .ars-circuit{border:1px solid var(--ars-surface-3);text-align:start;font:inherit;color:inherit;cursor:pointer;background:#16161e05;border-radius:7px;gap:1px;padding:9px 11px 10px;transition:border-color .2s,background .2s;display:grid;position:relative}#airanksuite-root .ars-circuit:hover{border-color:var(--ars-btn-border-hover);background:var(--ars-surface-2)}#airanksuite-root .ars-circuit.is-core{border-color:#cabdf7}#airanksuite-root .ars-circuit-led{background:var(--ars-btn-border-hover);top:10px;border-radius:50%;width:7px;height:7px;position:absolute;inset-inline-end:10px}#airanksuite-root .ars-circuit.is-live .ars-circuit-led{background:#1fa06a;box-shadow:0 0 0 3px #1fa06a26,0 0 10px #46d07f80}#airanksuite-root .ars-circuit.is-core.is-live .ars-circuit-led{background:var(--ars-brand-2);box-shadow:0 0 0 3px #8b5cf033,0 0 12px #8b5cf08c}#airanksuite-root .ars-circuit-name{color:var(--ars-ink);padding-inline-end:14px;font-size:12px;font-weight:600}#airanksuite-root .ars-circuit.is-live .ars-circuit-name{color:var(--ars-ink)}#airanksuite-root .ars-circuit-detail{color:var(--ars-ink-3);text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;overflow:hidden}#airanksuite-root .ars-floor-body{grid-template-columns:minmax(0,1fr) 258px;align-items:start;gap:12px;display:grid}#airanksuite-root .ars-clock{border:1px solid var(--ars-surface-3);background:#16161e05;border-radius:7px;padding:10px 12px 12px}#airanksuite-root .ars-clock-head{justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;display:flex}#airanksuite-root .ars-clock-title{letter-spacing:.05em;text-transform:uppercase;color:var(--ars-ink-2);font-size:11px;font-weight:700}#airanksuite-root .ars-clock-flag{background:var(--ars-surface-2);color:var(--ars-ink-3);border-radius:3px;padding:1px 6px;font-size:10px;font-weight:600}#airanksuite-root .ars-clock-flag.is-bad{color:var(--ars-serious);background:#f2545b2e}#airanksuite-root .ars-clock-flag.is-warn{color:var(--ars-accent);background:#ffc23d29}#airanksuite-root .ars-clock-gears{gap:7px;margin:0;padding:0;list-style:none;display:grid}#airanksuite-root .ars-gear{grid-template-columns:14px minmax(0,1fr);align-items:start;gap:9px;display:grid}#airanksuite-root .ars-gear-wheel{border:2px dotted var(--ars-btn-border-hover);border-radius:50%;width:12px;height:12px;margin-top:2px}#airanksuite-root .ars-gear-wheel.is-turning{border-color:var(--ars-brand);animation:6s linear infinite ars-gear}@keyframes ars-gear{to{transform:rotate(360deg)}}#airanksuite-root .ars-gear.is-late .ars-gear-wheel{border-style:solid;border-color:var(--ars-serious);animation:none}#airanksuite-root .ars-gear.is-off .ars-gear-wheel{border-color:var(--ars-border)}#airanksuite-root .ars-gear-name{color:var(--ars-ink);text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;font-weight:600;display:block;overflow:hidden}#airanksuite-root .ars-gear.is-off .ars-gear-name{color:var(--ars-ink-3)}#airanksuite-root .ars-gear-when{color:var(--ars-ink-3);font-size:10.5px;display:block}#airanksuite-root .ars-gear.is-late .ars-gear-when{color:var(--ars-serious)}#airanksuite-root .ars-clock-note{color:var(--ars-ink-3);margin:10px 0 0;font-size:10.5px;line-height:1.55}#airanksuite-root .ars-floor.is-still .ars-gear-wheel{animation:none}@media (width<=1100px){#airanksuite-root .ars-floor-body{grid-template-columns:minmax(0,1fr)}}#airanksuite-root .ars-verdict{border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);border:1px solid var(--ars-line);grid-template-columns:4px minmax(0,1fr) auto;align-items:center;gap:0 16px;padding:16px 18px 16px 0;display:grid;overflow:hidden}#airanksuite-root .ars-verdict-mark{background:var(--ars-ink-3);border-radius:4px 0 0 4px;align-self:stretch}#airanksuite-root .ars-verdict.is-good .ars-verdict-mark{background:var(--ars-c-green-ink)}#airanksuite-root .ars-verdict.is-warning .ars-verdict-mark{background:var(--ars-c-amber-ink,var(--ars-accent))}#airanksuite-root .ars-verdict.is-bad .ars-verdict-mark{background:var(--ars-c-red-ink)}#airanksuite-root .ars-verdict.is-neutral .ars-verdict-mark{background:var(--ars-brand)}#airanksuite-root .ars-verdict-body{min-width:0;padding-inline-start:18px}#airanksuite-root .ars-verdict-text{letter-spacing:-.012em;color:var(--ars-ink);margin:0;font-size:16px;font-weight:640;line-height:1.35}#airanksuite-root .ars-verdict-why{color:var(--ars-ink-2);max-width:92ch;margin:5px 0 0;font-size:12.5px;line-height:1.55}#airanksuite-root .ars-verdict-action{flex-shrink:0}#airanksuite-root .ars-empty{text-align:start;align-items:center;gap:14px;padding:26px 22px;display:flex}#airanksuite-root .ars-empty.is-compact{padding:16px 18px}#airanksuite-root .ars-empty-icon{background:var(--ars-surface-2);width:36px;height:36px;color:var(--ars-ink-3);border-radius:10px;flex:0 0 36px;place-items:center;display:grid}#airanksuite-root .ars-empty-text{flex:1;min-width:0}#airanksuite-root .ars-empty-title{color:var(--ars-ink);font-size:13px;font-weight:620}#airanksuite-root .ars-empty-body{color:var(--ars-ink-2);max-width:78ch;margin:3px 0 0;font-size:12.5px;line-height:1.55}#airanksuite-root .ars-board{margin:0;padding:0;list-style:none}#airanksuite-root .ars-board-row+.ars-board-row{border-top:1px solid var(--ars-line-soft,var(--ars-line))}#airanksuite-root .ars-board-hit{text-align:start;width:100%;font:inherit;color:inherit;cursor:default;background:0 0;border:0;grid-template-columns:minmax(0,34ch) minmax(70px,1fr) auto;align-items:center;gap:14px;padding:9px 4px;display:grid}#airanksuite-root .ars-board-row.is-clickable .ars-board-hit{cursor:pointer}#airanksuite-root .ars-board-row.is-clickable:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-board-label{color:var(--ars-ink);text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;overflow:hidden}#airanksuite-root .ars-board-track{background:var(--ars-surface-2);border-radius:999px;height:8px;overflow:hidden}#airanksuite-root .ars-board-fill{background:var(--ars-brand);border-radius:999px;height:100%;transition:width .24s;display:block}#airanksuite-root .ars-board-value{color:var(--ars-ink);text-align:end;min-width:8ch;font-size:12.5px;font-weight:620}#airanksuite-root .ars-board-unit{color:var(--ars-ink-3);margin-inline-start:4px;font-weight:500}#airanksuite-root .ars-panel{border:1px solid var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);overflow:hidden}#airanksuite-root .ars-panel-head{width:100%;font:inherit;color:var(--ars-ink);cursor:pointer;text-align:start;background:0 0;border:0;align-items:center;gap:10px;padding:11px 16px;display:flex}#airanksuite-root .ars-panel-head:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-panel-title{font-size:12.5px;font-weight:620}#airanksuite-root .ars-panel-note{color:var(--ars-ink-3);margin-inline-start:auto;font-size:11.5px}#airanksuite-root .ars-panel-caret{width:14px;height:14px;color:var(--ars-ink-3);transition:transform .16s}#airanksuite-root .ars-panel.is-open .ars-panel-caret{transform:rotate(90deg)}#airanksuite-root .ars-panel-body{border-top:1px solid var(--ars-line-soft,var(--ars-line));padding:4px 16px 16px}@media (width<=820px){#airanksuite-root .ars-verdict{grid-template-columns:4px minmax(0,1fr);row-gap:12px;padding-inline-end:16px}#airanksuite-root .ars-verdict-action{grid-column:2;padding-inline-start:18px}#airanksuite-root .ars-board-hit{grid-template-columns:minmax(0,1fr) auto}#airanksuite-root .ars-board-track{display:none}}#airanksuite-root .ars-metricstrip{border-bottom:1px solid var(--ars-line);grid-template-columns:repeat(4,minmax(0,1fr));display:grid}#airanksuite-root .ars-metric{border:0;border-inline-start:1px solid var(--ars-line);font:inherit;text-align:start;cursor:pointer;background:0 0;border-bottom:2px solid #0000;justify-items:start;gap:2px;padding:14px 16px 13px;transition:background .14s,border-color .14s;display:grid}#airanksuite-root .ars-metric:first-child{border-inline-start:0}#airanksuite-root .ars-metric:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-metric.is-active{border-bottom-color:var(--ars-brand);background:var(--ars-surface-2)}#airanksuite-root .ars-metric-label{letter-spacing:.06em;text-transform:uppercase;color:var(--ars-ink-3);font-size:10.5px;font-weight:640}#airanksuite-root .ars-metric-value{letter-spacing:-.02em;color:var(--ars-ink);font-size:26px;font-weight:660;line-height:1.1}#airanksuite-root .ars-metric-suffix{color:var(--ars-ink-3);margin-inline-start:2px;font-size:14px;font-weight:560}#airanksuite-root .ars-cov{background:var(--ars-surface-2);border-radius:999px;width:68px;height:6px;display:block;overflow:hidden}#airanksuite-root .ars-cov-fill{border-radius:999px;height:100%;display:block}#airanksuite-root .ars-mini{border-radius:var(--ars-r-md,10px);background:var(--ars-surface-2);gap:1px;padding:10px 12px;display:grid}#airanksuite-root .ars-mini-label{letter-spacing:.05em;text-transform:uppercase;color:var(--ars-ink-3);font-size:10.5px;font-weight:640}#airanksuite-root .ars-mini-value{color:var(--ars-ink);font-size:20px;font-weight:660;line-height:1.15}#airanksuite-root .ars-mini-sub{color:var(--ars-ink-3);font-size:11px}@media (width<=900px){#airanksuite-root .ars-metricstrip{grid-template-columns:repeat(2,minmax(0,1fr))}#airanksuite-root .ars-metric:nth-child(3){border-inline-start:0}#airanksuite-root .ars-metric:nth-child(-n+2){border-bottom:1px solid var(--ars-line)}}#airanksuite-root .ars-issue{border:1px solid var(--ars-line);border-inline-start:3px solid var(--ars-ink-3);border-radius:var(--ars-r-md,10px);background:var(--ars-surface);overflow:hidden}#airanksuite-root .ars-issue.is-critical{border-inline-start-color:var(--ars-c-red-ink)}#airanksuite-root .ars-issue.is-warning{border-inline-start-color:var(--ars-accent)}#airanksuite-root .ars-issue.is-notice{border-inline-start-color:var(--ars-brand)}#airanksuite-root .ars-issue-head{width:100%;font:inherit;text-align:start;cursor:pointer;color:var(--ars-ink);background:0 0;border:0;grid-template-columns:auto minmax(0,1fr) auto 16px;align-items:center;gap:10px;padding:10px 14px;display:grid}#airanksuite-root .ars-issue-head:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-issue-sev{letter-spacing:.07em;text-transform:uppercase;background:var(--ars-surface-2);color:var(--ars-ink-2);border-radius:5px;padding:3px 7px;font-size:9.5px;font-weight:700}#airanksuite-root .ars-issue.is-critical .ars-issue-sev{background:var(--ars-c-red);color:var(--ars-c-red-ink)}#airanksuite-root .ars-issue.is-warning .ars-issue-sev{background:var(--ars-c-amber,#fdf1de);color:var(--ars-c-amber-ink)}#airanksuite-root .ars-issue.is-notice .ars-issue-sev{background:var(--ars-c-blue,var(--ars-brand-tonal));color:var(--ars-brand)}#airanksuite-root .ars-issue-label{text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;font-weight:600;overflow:hidden}#airanksuite-root .ars-issue-count{color:var(--ars-ink-3);font-size:11.5px}#airanksuite-root .ars-issue-caret{width:14px;height:14px;color:var(--ars-ink-3);transition:transform .16s}#airanksuite-root .ars-issue.is-open .ars-issue-caret{transform:rotate(90deg)}#airanksuite-root .ars-issue-body{padding:0 14px 12px}#airanksuite-root .ars-issue-fix{color:var(--ars-ink-2);max-width:90ch;margin:0 0 8px;font-size:12px;line-height:1.55}#airanksuite-root .ars-issue-pages{margin:0;padding:0;list-style:none}#airanksuite-root .ars-issue-pages li{border-top:1px solid var(--ars-line-soft,var(--ars-line));grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:6px 0;font-size:12px;display:grid}#airanksuite-root .ars-issue-page{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#airanksuite-root .ars-issue-detail{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-issue-links{align-items:center;gap:10px;font-size:11.5px;display:inline-flex}@media (width<=820px){#airanksuite-root .ars-issue-pages li{grid-template-columns:minmax(0,1fr)}}#airanksuite-root .ars-setup-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:10px;display:grid}#airanksuite-root .ars-setup-card{border:1px solid var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);text-align:start;font:inherit;color:inherit;cursor:pointer;align-items:flex-start;gap:12px;padding:14px 15px;transition:border-color .14s,background .14s,transform .14s;display:flex}#airanksuite-root .ars-setup-card:hover{border-color:var(--ars-brand);background:var(--ars-surface-2);transform:translateY(-1px)}#airanksuite-root .ars-setup-icon{background:var(--ars-surface-2);width:34px;height:34px;color:var(--ars-brand);border-radius:9px;flex:0 0 34px;place-items:center;display:grid}#airanksuite-root .ars-setup-card:hover .ars-setup-icon{background:var(--ars-c-blue,var(--ars-brand-tonal))}#airanksuite-root .ars-setup-text{gap:2px;min-width:0;display:grid}#airanksuite-root .ars-setup-name{color:var(--ars-ink);font-size:13px;font-weight:620}#airanksuite-root .ars-setup-what{color:var(--ars-ink-2);font-size:11.5px;line-height:1.5}#airanksuite-root .ars-setup-hero{border-radius:var(--ars-r-xl,18px);border:1px solid var(--ars-line);background:var(--ars-surface);grid-template-columns:auto minmax(0,1fr);align-items:center;gap:22px;padding:20px 22px;display:grid}@media (width<=720px){#airanksuite-root .ars-setup-hero{grid-template-columns:1fr}}#airanksuite-root .ars-setup-hero-ring{place-items:center;display:grid}#airanksuite-root .ars-setup-group{gap:2px;padding-inline-start:2px;display:grid}#airanksuite-root .ars-setup-card{align-items:center;position:relative}#airanksuite-root .ars-setup-name{flex-wrap:wrap;align-items:center;gap:8px;display:flex}#airanksuite-root .ars-setup-status{letter-spacing:.02em;background:var(--ars-surface-3);color:var(--ars-ink-2);border-radius:999px;padding:1px 8px;font-size:10.5px;font-weight:700;display:inline-block}#airanksuite-root .ars-setup-status.is-good{background:var(--ars-good-tonal);color:var(--ars-good)}#airanksuite-root .ars-setup-status.is-warning{background:var(--ars-warning-tonal,var(--ars-surface-3));color:var(--ars-warning,var(--ars-ink-2))}#airanksuite-root .ars-setup-status.is-serious{background:var(--ars-serious-tonal);color:var(--ars-serious)}#airanksuite-root .ars-setup-card.is-serious{border-color:var(--ars-serious)}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-setup-card.is-serious{border-color:color-mix(in srgb, var(--ars-serious) 40%, var(--ars-line))}}#airanksuite-root .ars-setup-go{color:var(--ars-ink-3);margin-inline-start:auto;font-size:18px;line-height:1;transition:transform .14s,color .14s}#airanksuite-root .ars-setup-card:hover .ars-setup-go{color:var(--ars-brand);transform:translate(3px)}[dir=rtl] #airanksuite-root .ars-setup-go{transform:scaleX(-1)}[dir=rtl] #airanksuite-root .ars-setup-card:hover .ars-setup-go{transform:scaleX(-1)translate(3px)}#airanksuite-root .ars-nav-item.is-setup{color:var(--ars-ink-2)}#airanksuite-root .ars-nav-item.is-back{color:var(--ars-brand);font-weight:600}#airanksuite-root .ars-greeting{letter-spacing:.02em;color:var(--ars-ink-3);margin:4px 0 0;font-size:12px;font-weight:560}#airanksuite-root .ars-scorerow{width:100%;font:inherit;color:inherit;text-align:start;cursor:pointer;background:0 0;border:0;border-radius:8px;grid-template-columns:40px minmax(0,1fr) 220px auto 14px;align-items:center;gap:14px;padding:10px 8px;display:grid}#airanksuite-root .ars-scorerow.is-static{cursor:default;grid-template-columns:40px minmax(0,1fr) 220px auto}#airanksuite-root .ars-scorerow:not(.is-static):hover{background:var(--ars-surface-2)}#airanksuite-root .ars-scorerow+.ars-scorerow{border-top:1px solid var(--ars-line-soft,var(--ars-line))}#airanksuite-root .ars-scorerow-score{letter-spacing:-.01em;text-align:end;font-variant-numeric:tabular-nums;font-size:16px;font-weight:660;line-height:1}#airanksuite-root .ars-scorerow-score.is-good{color:var(--ars-c-green-ink)}#airanksuite-root .ars-scorerow-score.is-mid{color:var(--ars-warning-ink)}#airanksuite-root .ars-scorerow-score.is-bad{color:var(--ars-c-red-ink)}#airanksuite-root .ars-scorerow-text{gap:1px;min-width:0;display:grid}#airanksuite-root .ars-scorerow-label{color:var(--ars-ink);text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;font-weight:600;overflow:hidden}#airanksuite-root .ars-scorerow-sub{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-scorerow-bar{background:var(--ars-surface-2);border-radius:999px;height:6px;display:flex;overflow:hidden}#airanksuite-root .ars-scorerow-bar>span{height:100%;display:block}#airanksuite-root .ars-scorerow-bar>span+span{box-shadow:inset 1px 0 0 var(--ars-surface)}#airanksuite-root .ars-scorerow-reach{color:var(--ars-ink-2);white-space:nowrap;font-size:11.5px}#airanksuite-root .ars-scorerow-caret{width:14px;height:14px;color:var(--ars-ink-3)}@media (width<=860px){#airanksuite-root .ars-scorerow,#airanksuite-root .ars-scorerow.is-static{grid-template-columns:40px minmax(0,1fr) auto}#airanksuite-root .ars-scorerow-bar,#airanksuite-root .ars-scorerow-caret{display:none}}#airanksuite-root .ars-scorerow.is-wide{grid-template-columns:40px minmax(0,1fr) 220px auto 14px}#airanksuite-root .ars-scorerow.is-wide.is-static{grid-template-columns:40px minmax(0,1fr) 220px auto}#airanksuite-root .ars-scorerow.is-wide .ars-scorerow-label{white-space:normal;overflow:visible}#airanksuite-root .ars-scorerow.is-wide .ars-scorerow-sub{white-space:normal}#airanksuite-root .ars-metrics{grid-template-columns:repeat(var(--ars-metrics-cols,3), minmax(0, 1fr));border:1px solid var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);display:grid;overflow:hidden}#airanksuite-root .ars-metrics-cell{border-inline-end:1px solid var(--ars-line);border-bottom:1px solid var(--ars-line);font:inherit;color:inherit;text-align:start;background:0 0;align-content:start;gap:3px;padding:13px 16px 15px;display:grid;position:relative}#airanksuite-root .ars-metrics-cell.is-clickable{cursor:pointer}#airanksuite-root .ars-metrics-cell.is-clickable:hover,#airanksuite-root .ars-metrics-cell.is-active{background:var(--ars-surface-2)}#airanksuite-root .ars-metrics[data-columns="3"] .ars-metrics-cell:nth-child(3n),#airanksuite-root .ars-metrics[data-columns="4"] .ars-metrics-cell:nth-child(4n){border-inline-end:0}#airanksuite-root .ars-metrics-label{color:var(--ars-ink-2);align-items:center;gap:5px;font-size:12px;font-weight:560;display:inline-flex}#airanksuite-root .ars-metrics-help{background:var(--ars-surface-2);width:13px;height:13px;color:var(--ars-ink-3);cursor:help;border-radius:999px;place-items:center;font-size:9px;font-weight:700;display:grid}#airanksuite-root .ars-metrics-row{flex-wrap:wrap;align-items:baseline;gap:8px;display:flex}#airanksuite-root .ars-metrics-value{letter-spacing:-.022em;color:var(--ars-ink);font-size:27px;font-weight:660;line-height:1.12}#airanksuite-root .ars-metrics-unit{color:var(--ars-ink-3);margin-inline-start:3px;font-size:13px;font-weight:560}#airanksuite-root .ars-metrics-sub{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-metrics-spark{margin-top:4px;display:block}#airanksuite-root .ars-metrics-rule{background:var(--ars-metric-accent,transparent);inset-inline:0;height:2px;position:absolute;bottom:-1px}#airanksuite-root .ars-donut{grid-template-columns:148px minmax(0,1fr);align-items:center;gap:20px;display:grid}#airanksuite-root .ars-donut-svg{width:148px;height:148px}#airanksuite-root .ars-donut-value{fill:var(--ars-ink);font-size:34px;font-weight:680}#airanksuite-root .ars-donut-max{fill:var(--ars-ink-3);font-size:12px}#airanksuite-root .ars-donut-legend{gap:2px;min-width:0;display:grid}#airanksuite-root .ars-donut-row{border-bottom:1px solid var(--ars-line-soft,var(--ars-line));grid-template-columns:10px minmax(0,1fr) auto;align-items:center;gap:9px;padding:5px 0;font-size:12.5px;display:grid}#airanksuite-root .ars-donut-row:last-of-type{border-bottom:0}#airanksuite-root .ars-donut-dot{border-radius:3px;width:10px;height:10px}#airanksuite-root .ars-donut-name{color:var(--ars-ink-2);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#airanksuite-root .ars-donut-count{font-weight:660}#airanksuite-root .ars-donut-note{color:var(--ars-ink-3);margin:8px 0 0;font-size:11px;line-height:1.5}@media (width<=900px){#airanksuite-root .ars-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}#airanksuite-root .ars-donut{grid-template-columns:minmax(0,1fr);justify-items:center}}#airanksuite-root .ars-app{box-shadow:none;border:1px solid var(--ars-border)}#airanksuite-root .ars-rail{background:var(--ars-surface);border-inline-end:1px solid var(--ars-border)}#airanksuite-root .ars-card,#airanksuite-root .ars-hero{box-shadow:none}#airanksuite-root .ars-btn-primary{background:var(--ars-solid);color:var(--ars-solid-ink)}#airanksuite-root .ars-btn-primary:hover{background:var(--ars-solid-hover);box-shadow:none}#airanksuite-root .ars-btn-ghost{color:var(--ars-ink);border-color:var(--ars-btn-border);box-shadow:none}#airanksuite-root .ars-btn-ghost:hover{background:var(--ars-surface-2);border-color:var(--ars-btn-border-hover);color:var(--ars-ink)}#airanksuite-root .ars-metrics-cell.is-clickable .ars-metrics-value{color:var(--ars-brand)}#airanksuite-root .ars-metrics-cell.is-clickable:hover .ars-metrics-value{color:var(--ars-brand-hover)}#airanksuite-root .ars-tab.is-active{color:var(--ars-ink);border-bottom-color:var(--ars-ink)}#airanksuite-root .ars-tab:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-tab.is-active .ars-tab-count{background:var(--ars-surface-3);color:var(--ars-ink)}#airanksuite-root .ars-metrics-cell{border-top:0;border-inline-start:0}#airanksuite-root .ars-advisor{background:var(--ars-surface);border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);overflow:hidden}#airanksuite-root .ars-advisor-row{align-items:center;gap:14px;padding:6px 14px 6px 0;display:flex}#airanksuite-root .ars-advisor-head{min-width:0;font:inherit;color:inherit;text-align:start;cursor:pointer;background:0 0;border:0;flex:auto;align-items:center;gap:10px;padding:10px 0 10px 16px;display:flex}#airanksuite-root .ars-advisor-head:disabled{cursor:default}#airanksuite-root .ars-advisor-dot{background:var(--ars-ink-3);border-radius:999px;flex:0 0 8px;width:8px;height:8px}#airanksuite-root .ars-advisor.is-good .ars-advisor-dot{background:var(--ars-good)}#airanksuite-root .ars-advisor.is-warning .ars-advisor-dot{background:var(--ars-accent)}#airanksuite-root .ars-advisor.is-bad .ars-advisor-dot{background:var(--ars-serious)}#airanksuite-root .ars-advisor.is-neutral .ars-advisor-dot{background:var(--ars-brand)}#airanksuite-root .ars-advisor-text{color:var(--ars-ink);-webkit-line-clamp:2;text-wrap:pretty;-webkit-box-orient:vertical;font-size:13.5px;font-weight:640;display:-webkit-box;overflow:hidden}#airanksuite-root .ars-advisor-sub{color:var(--ars-ink-3);white-space:nowrap;text-overflow:ellipsis;flex:0 auto;min-width:0;font-size:12px;overflow:hidden}#airanksuite-root .ars-advisor-count{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);font-variant-numeric:tabular-nums;border-radius:999px;flex:none;padding:4px 7px;font-size:10.5px;font-weight:700;line-height:1}#airanksuite-root .ars-advisor-caret{width:14px;height:14px;color:var(--ars-ink-3);flex:0 0 14px;transition:transform .16s}#airanksuite-root .ars-advisor.is-open .ars-advisor-caret{transform:rotate(90deg)}#airanksuite-root .ars-advisor-action{flex:none}#airanksuite-root .ars-advisor-body{border-top:1px solid var(--ars-line-soft);padding:12px 16px 14px}#airanksuite-root .ars-gauge{text-align:center;width:150px}#airanksuite-root .ars-gauge svg{width:100%;height:auto;display:block}#airanksuite-root .ars-gauge-value{letter-spacing:-.02em;fill:var(--ars-ink);font-size:33px;font-weight:680}#airanksuite-root .ars-gauge-max{fill:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-gauge-delta{margin-top:2px}#airanksuite-root .ars-scoreband{grid-template-columns:150px minmax(0,1fr);align-items:center;gap:22px;display:grid}#airanksuite-root .ars-dimrow{grid-template-columns:86px minmax(0,1fr) 34px;align-items:center;gap:12px;padding:6px 0;display:grid}#airanksuite-root .ars-dimrow+.ars-dimrow{border-top:1px solid var(--ars-line-soft)}#airanksuite-root .ars-dimrow-label{color:var(--ars-ink-2);font-size:12.5px}#airanksuite-root .ars-dimrow-track{background:var(--ars-surface-3);border-radius:999px;height:6px;overflow:hidden}#airanksuite-root .ars-dimrow-fill{background:var(--ars-brand);border-radius:999px;height:100%;transition:width .5s cubic-bezier(.2,0,0,1);display:block}#airanksuite-root .ars-dimrow-value{text-align:end;font-variant-numeric:tabular-nums;font-size:13px;font-weight:640}#airanksuite-root .ars-engrows{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:22px;display:grid}#airanksuite-root .ars-engrow{font:inherit;color:inherit;text-align:start;cursor:pointer;border-radius:var(--ars-r-sm);background:0 0;border:0;grid-template-columns:minmax(0,1fr) 64px 40px;align-items:center;gap:12px;padding:8px 6px;display:grid}#airanksuite-root .ars-engrow:hover,#airanksuite-root .ars-engrow.is-active{background:var(--ars-surface-2)}#airanksuite-root .ars-engrow-name{color:var(--ars-ink);white-space:nowrap;text-overflow:ellipsis;font-size:12.5px;font-weight:550;overflow:hidden}#airanksuite-root .ars-engrow-track{background:var(--ars-surface-3);border-radius:999px;height:5px;overflow:hidden}#airanksuite-root .ars-engrow-fill{border-radius:999px;height:100%;display:block}#airanksuite-root .ars-engrow-value{text-align:end;font-variant-numeric:tabular-nums;font-size:12.5px;font-weight:660}@media (width<=760px){#airanksuite-root .ars-engrows{grid-template-columns:minmax(0,1fr)}#airanksuite-root .ars-scoreband{grid-template-columns:minmax(0,1fr);justify-items:center}}#airanksuite-root .ars-advisor-text{flex:auto;min-width:22ch}#airanksuite-root .ars-advisor-sub{flex:1 1 0}#airanksuite-root .ars-engrow{grid-template-columns:minmax(0,1fr) 54px 38px;gap:10px}#airanksuite-root .ars-card-tag{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);letter-spacing:.01em;border-radius:6px;margin-bottom:5px;padding:3px 10px;font-size:11px;font-weight:650;line-height:1.4;display:inline-block}#airanksuite-root .ars-engrow-name{align-items:center;gap:8px;min-width:0;display:inline-flex}#airanksuite-root .ars-engrow-name>svg{flex:none}#airanksuite-root .ars-scorepill{border-radius:var(--ars-r-md);justify-content:center;align-items:center;gap:6px;min-width:44px;padding:3px 9px;font-size:12px;font-weight:650;line-height:1.5;display:inline-flex}#airanksuite-root .ars-scorepill-dot{opacity:.7;background:currentColor;border-radius:999px;width:6px;height:6px}#airanksuite-root .ars-scorepill.is-good{background:var(--ars-good-tonal);color:var(--ars-good-ink)}#airanksuite-root .ars-scorepill.is-mid{background:var(--ars-accent-tonal);color:var(--ars-warning-ink)}#airanksuite-root .ars-scorepill.is-bad{background:var(--ars-serious-tonal);color:var(--ars-serious-ink)}#airanksuite-root .ars-circuits{flex-wrap:wrap;gap:8px;display:flex}#airanksuite-root .ars-circuit{flex:175px;min-width:150px}#airanksuite-root .ars-priority-number{width:26px;height:26px;color:var(--ars-ink-2);background:var(--ars-surface-3);border-radius:50%;flex:0 0 26px;place-items:center;font-size:12px;font-weight:700;display:inline-grid}#airanksuite-root .ars-priority-number.is-warning{color:var(--ars-warning);background:var(--ars-warning-tonal)}#airanksuite-root .ars-priority-number.is-bad{color:var(--ars-serious);background:var(--ars-serious-tonal)}#airanksuite-root .ars-areagrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;display:grid}@media (width<=1100px){#airanksuite-root .ars-areagrid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width<=640px){#airanksuite-root .ars-areagrid{grid-template-columns:1fr}}#airanksuite-root .ars-areacard{border:1px solid var(--ars-line);border-radius:var(--ars-r-md,10px);background:var(--ars-surface);font:inherit;color:inherit;text-align:start;cursor:pointer;border-left-width:4px;grid-template-rows:auto auto;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:8px 12px;padding:12px 14px 12px 12px;transition:border-color .14s,transform .14s,box-shadow .14s;display:grid}#airanksuite-root .ars-areacard:hover{box-shadow:var(--ars-shadow-sm,0 2px 8px #0000000f);transform:translateY(-1px)}#airanksuite-root .ars-areacard.is-active{border-color:var(--ars-brand);box-shadow:0 0 0 2px var(--ars-brand-tonal)}#airanksuite-root .ars-areacard.is-bad{border-left-color:var(--ars-c-red-ink)}#airanksuite-root .ars-areacard.is-mid{border-left-color:var(--ars-accent)}#airanksuite-root .ars-areacard.is-good{border-left-color:var(--ars-c-green-ink)}#airanksuite-root .ars-areacard-score{letter-spacing:-.02em;grid-row:1/span 2;align-self:center;min-width:44px;font-size:22px;font-weight:700;line-height:1}#airanksuite-root .ars-areacard.is-bad .ars-areacard-score{color:var(--ars-c-red-ink)}#airanksuite-root .ars-areacard.is-mid .ars-areacard-score{color:var(--ars-accent)}#airanksuite-root .ars-areacard.is-good .ars-areacard-score{color:var(--ars-c-green-ink)}#airanksuite-root .ars-areacard-body{gap:3px;min-width:0;display:grid}#airanksuite-root .ars-areacard-label{color:var(--ars-ink);font-size:13.5px;font-weight:600}#airanksuite-root .ars-areacard-sub{color:var(--ars-ink-3);white-space:nowrap;text-overflow:ellipsis;font-size:11.5px;overflow:hidden}#airanksuite-root .ars-areacard-bar{background:var(--ars-surface-3);border-radius:999px;height:6px;margin-top:4px;display:flex;overflow:hidden}#airanksuite-root .ars-areacard-bar>span{height:100%;display:block}#airanksuite-root .ars-areacard-reach{color:var(--ars-brand);grid-column:2;justify-self:start;font-size:11.5px;font-weight:600}#airanksuite-root .ars-areacard-reach:after{content:" →"}#airanksuite-root .ars-areacard-reach.is-clear{color:var(--ars-c-green-ink)}#airanksuite-root .ars-areacard-reach.is-clear:after{content:""}#airanksuite-root .ars-winbar{background:var(--ars-surface-3);border-radius:999px;width:120px;height:6px;display:block;overflow:hidden}#airanksuite-root .ars-winbar>span{border-radius:999px;height:100%;display:block}@media (width<=640px){#airanksuite-root .ars-winbar{display:none}}#airanksuite-root .ars-copilot-idle{border-radius:var(--ars-r-md,10px);background:var(--ars-brand-tonal);color:var(--ars-ink-2);align-items:flex-start;gap:10px;padding:10px 12px;font-size:12.5px;line-height:1.5;display:flex}#airanksuite-root .ars-copilot-idle-mark{background:var(--ars-surface);width:24px;height:24px;color:var(--ars-brand);border-radius:8px;flex:none;place-items:center;display:grid}#airanksuite-root .ars-opstrip{grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;display:grid}@media (width<=1280px){#airanksuite-root .ars-opstrip{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (width<=640px){#airanksuite-root .ars-opstrip{grid-template-columns:repeat(2,minmax(0,1fr))}}#airanksuite-root .ars-optile{border:1px solid var(--ars-line);border-top:3px solid var(--ars-ink-3);border-radius:var(--ars-r-md,10px);background:var(--ars-surface);font:inherit;color:inherit;text-align:start;cursor:pointer;justify-items:start;gap:2px;min-width:0;padding:10px 12px;transition:border-color .14s,transform .14s,box-shadow .14s;display:grid}#airanksuite-root .ars-optile:hover{box-shadow:var(--ars-shadow-sm,0 2px 8px #0000000f);transform:translateY(-1px)}#airanksuite-root .ars-optile.is-active{box-shadow:0 0 0 2px var(--ars-brand-tonal);border-color:var(--ars-brand)}#airanksuite-root .ars-optile.is-seen{border-top-color:var(--ars-c-green-ink)}#airanksuite-root .ars-optile.is-quiet{border-top-color:var(--ars-brand)}#airanksuite-root .ars-optile.is-blocked{border-top-color:var(--ars-c-red-ink)}#airanksuite-root .ars-optile-name{color:var(--ars-ink);text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-size:13px;font-weight:700;overflow:hidden}#airanksuite-root .ars-optile-state{color:var(--ars-ink-2);font-size:11.5px;font-weight:600}#airanksuite-root .ars-optile.is-blocked .ars-optile-state{color:var(--ars-c-red-ink)}#airanksuite-root .ars-optile-seen{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-optile.is-seen .ars-optile-seen{color:var(--ars-c-green-ink);font-weight:600}#airanksuite-root .ars-typeempty{border:1px dashed var(--ars-line);border-radius:var(--ars-r-md,10px);color:var(--ars-ink-3);align-items:baseline;gap:10px;padding:10px 16px;font-size:12.5px;display:flex}#airanksuite-root .ars-typeempty b{color:var(--ars-ink-2);font-weight:600}#airanksuite-root .ars-tag-quiet{background:var(--ars-surface-3);color:var(--ars-ink-3);font-weight:600}#airanksuite-root .ars-sources{border:1px solid var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);flex-wrap:wrap;align-items:stretch;gap:8px;padding:8px 10px;display:flex}#airanksuite-root .ars-sources-lead{letter-spacing:.04em;text-transform:uppercase;color:var(--ars-ink-3);align-self:center;padding:0 6px;font-size:11px;font-weight:700}#airanksuite-root .ars-source{border:1px solid var(--ars-line);border-radius:var(--ars-r-md,10px);background:var(--ars-surface-2);min-width:0;font:inherit;color:inherit;text-align:start;cursor:pointer;flex:160px;grid-template-columns:auto 1fr;align-items:center;column-gap:8px;padding:8px 10px;transition:border-color .14s,background .14s;display:grid}#airanksuite-root .ars-source:hover{border-color:var(--ars-brand)}#airanksuite-root .ars-source.is-live{background:var(--ars-surface)}#airanksuite-root .ars-source-dot{background:var(--ars-accent);width:9px;height:9px;box-shadow:0 0 0 3px var(--ars-accent);border-radius:999px;grid-row:1/span 2}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-source-dot{box-shadow:0 0 0 3px color-mix(in srgb, var(--ars-accent) 18%, transparent)}}#airanksuite-root .ars-source.is-live .ars-source-dot{background:var(--ars-c-green-ink);box-shadow:0 0 0 3px var(--ars-c-green-ink)}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-source.is-live .ars-source-dot{box-shadow:0 0 0 3px color-mix(in srgb, var(--ars-c-green-ink) 18%, transparent)}}#airanksuite-root .ars-source-label{color:var(--ars-ink);white-space:nowrap;text-overflow:ellipsis;font-size:12.5px;font-weight:600;overflow:hidden}#airanksuite-root .ars-source-state{color:var(--ars-ink-3);white-space:nowrap;text-overflow:ellipsis;font-size:11px;overflow:hidden}#airanksuite-root .ars-source:not(.is-live) .ars-source-state{color:var(--ars-brand);font-weight:600}#airanksuite-root .ars-provider-grid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:12px;display:grid}@media (width<=1180px){#airanksuite-root .ars-provider-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width<=680px){#airanksuite-root .ars-provider-grid{grid-template-columns:1fr}}#airanksuite-root .ars-provider{border:1px solid var(--ars-line);border-top:3px solid var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);grid-template-rows:auto 1fr auto;gap:10px;min-width:0;padding:14px 16px;transition:box-shadow .15s,transform .15s,border-color .15s;display:grid}#airanksuite-root .ars-provider:hover{border-color:var(--ars-btn-border-hover);transform:translateY(-1px);box-shadow:0 6px 18px -8px #16161e2e}#airanksuite-root .ars-provider.is-connected{border-top-color:var(--ars-c-green-ink)}#airanksuite-root .ars-provider.is-open{border-color:var(--ars-brand);box-shadow:0 0 0 2px var(--ars-brand-tonal)}#airanksuite-root .ars-provider-head{align-items:flex-start;gap:10px;display:flex}#airanksuite-root .ars-provider-mark{letter-spacing:.02em;width:38px;height:38px;color:hsl(var(--mark-h) 55% 32%);background:hsl(var(--mark-h) 70% 92%);border-radius:10px;flex:none;place-items:center;font-size:13px;font-weight:800;display:grid}[data-theme=dark] #airanksuite-root .ars-provider-mark,.ars-dark #airanksuite-root .ars-provider-mark{color:hsl(var(--mark-h) 70% 80%);background:hsl(var(--mark-h) 40% 22%)}#airanksuite-root .ars-provider-name{color:var(--ars-ink);font-size:14px;font-weight:650}#airanksuite-root .ars-provider-state{background:var(--ars-surface-3);color:var(--ars-ink-3);border-radius:999px;padding:2px 7px;font-size:11px;font-weight:600}#airanksuite-root .ars-provider-state.is-on{background:var(--ars-good-tonal);color:var(--ars-good)}#airanksuite-root .ars-provider-caps{flex-wrap:wrap;gap:6px;display:flex}#airanksuite-root .ars-provider-cap{letter-spacing:.03em;text-transform:uppercase;font-size:10.5px;font-weight:700}#airanksuite-root .ars-provider-cap.is-metrics{color:var(--ars-brand)}#airanksuite-root .ars-provider-cap.is-serp{color:var(--ars-accent)}#airanksuite-root .ars-provider-docs{color:var(--ars-ink-3);border-radius:6px;flex:none;padding:2px 6px;font-size:13px;text-decoration:none}#airanksuite-root .ars-provider-docs:hover{color:var(--ars-brand);background:var(--ars-brand-tonal)}#airanksuite-root .ars-provider-blurb{color:var(--ars-ink-2);-webkit-line-clamp:3;-webkit-box-orient:vertical;margin:0;font-size:12.5px;line-height:1.5;display:-webkit-box;overflow:hidden}#airanksuite-root .ars-provider-foot{border-top:1px dashed var(--ars-line);flex-wrap:wrap;align-items:center;gap:6px;margin-top:auto;padding-top:4px;display:flex}#airanksuite-root .ars-destlist{display:grid}#airanksuite-root .ars-dest{border-top:1px solid var(--ars-line);grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:9px 16px;display:grid}#airanksuite-root .ars-dest:first-child{border-top:0}#airanksuite-root .ars-dest-url{text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}#airanksuite-root .ars-dest-pages{color:var(--ars-ink-2);white-space:nowrap;font-size:12px;font-weight:600}#airanksuite-root .ars-dest-actions{gap:4px;display:flex}@media (width<=760px){#airanksuite-root .ars-dest{grid-template-columns:auto minmax(0,1fr)}#airanksuite-root .ars-dest-pages,#airanksuite-root .ars-dest-actions{grid-column:2}}#airanksuite-root .items-stretch>.ars-card{box-sizing:border-box;height:100%}#airanksuite-root .ars-worklist,#airanksuite-root .ars-citelist{display:grid}#airanksuite-root .ars-work{border:0;border-top:1px solid var(--ars-line);font:inherit;color:inherit;text-align:start;cursor:pointer;background:0 0;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;padding:10px 16px;display:grid}#airanksuite-root .ars-work:first-child{border-top:0}#airanksuite-root .ars-work:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-work-score{letter-spacing:-.02em;min-width:36px;font-size:18px;font-weight:700}#airanksuite-root .ars-work-score.is-bad{color:var(--ars-c-red-ink)}#airanksuite-root .ars-work-score.is-mid{color:var(--ars-accent)}#airanksuite-root .ars-work-score.is-good{color:var(--ars-c-green-ink)}#airanksuite-root .ars-work-body{gap:2px;min-width:0;display:grid}#airanksuite-root .ars-work-label{color:var(--ars-ink);text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:600;overflow:hidden}#airanksuite-root .ars-work-sub{color:var(--ars-ink-3);text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;overflow:hidden}#airanksuite-root .ars-work-go{color:var(--ars-ink-3);font-size:18px;line-height:1}#airanksuite-root .ars-cite{border-top:1px solid var(--ars-line);color:inherit;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 16px;text-decoration:none;display:grid}#airanksuite-root .ars-cite:first-child{border-top:0}#airanksuite-root .ars-cite:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-cite-url{text-overflow:ellipsis;white-space:nowrap;color:var(--ars-brand);font-size:12px;overflow:hidden}#airanksuite-root .ars-cite-n{color:var(--ars-ink-2);white-space:nowrap;font-size:12px;font-weight:600}#airanksuite-root .ars-place{border:1px solid var(--ars-line);border-radius:var(--ars-r-md,10px);background:var(--ars-surface);font:inherit;color:inherit;text-align:start;cursor:pointer;justify-content:space-between;align-items:center;gap:10px;padding:8px 12px;display:flex}#airanksuite-root .ars-place:hover{border-color:var(--ars-brand);background:var(--ars-brand-tonal)}#airanksuite-root .ars-listing-head{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}#airanksuite-root .ars-listing-rating{flex:none;justify-items:end;gap:2px;display:grid}#airanksuite-root .ars-listing-stars{letter-spacing:-.02em;color:var(--ars-accent);font-size:26px;font-weight:700;line-height:1}#airanksuite-root .ars-eventgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}@media (width<=800px){#airanksuite-root .ars-eventgrid{grid-template-columns:1fr}}#airanksuite-root .ars-event{border:1px solid var(--ars-line);border-radius:var(--ars-r-md,10px);background:var(--ars-surface);cursor:pointer;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:10px;padding:8px 10px;display:grid}#airanksuite-root .ars-event.is-on{border-color:var(--ars-brand);background:var(--ars-brand-tonal)}#airanksuite-root .ars-event input{margin-top:3px}#airanksuite-root .ars-card-body>*,#airanksuite-root .ars-card-body .grid>*{min-width:0}#airanksuite-root .ars-card pre{max-width:100%}#airanksuite-root .ars-selbar{z-index:5;border:1px solid var(--ars-brand);border-radius:var(--ars-r-lg,14px);background:var(--ars-brand-tonal);flex-wrap:wrap;align-items:center;gap:14px;padding:8px 14px;display:flex;position:sticky;top:8px;box-shadow:0 6px 18px -10px #16161e4d}#airanksuite-root .ars-table tr.is-selected td{background:var(--ars-brand-tonal)}#airanksuite-root .ars-steps{gap:8px;margin:0;padding:0;list-style:none;display:grid}#airanksuite-root .ars-step{border:1px solid var(--ars-line);border-radius:var(--ars-r-md,10px);background:var(--ars-surface);grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 14px;display:grid}#airanksuite-root .ars-step.is-next{border-color:var(--ars-brand);box-shadow:0 0 0 2px var(--ars-brand-tonal)}#airanksuite-root .ars-step-n{background:var(--ars-surface-3);width:26px;height:26px;color:var(--ars-ink-2);border-radius:999px;place-items:center;font-size:12px;font-weight:700;display:grid}#airanksuite-root .ars-step.is-done .ars-step-n{background:var(--ars-good-tonal);color:var(--ars-good)}#airanksuite-root .ars-step.is-next .ars-step-n{background:var(--ars-brand);color:#fff}#airanksuite-root .ars-step-label{color:var(--ars-ink);font-size:13px;font-weight:600}#airanksuite-root .ars-step.is-done .ars-step-label{color:var(--ars-ink-2);text-decoration:line-through;-webkit-text-decoration-color:var(--ars-ink-3);-webkit-text-decoration-color:var(--ars-ink-3);-webkit-text-decoration-color:var(--ars-ink-3);text-decoration-color:var(--ars-ink-3)}#airanksuite-root .ars-step-detail{color:var(--ars-ink-3);font-size:12px}#airanksuite-root .ars-previews{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;display:grid}@media (width<=900px){#airanksuite-root .ars-previews{grid-template-columns:1fr}}#airanksuite-root .ars-preview{border:1px dashed var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);gap:4px;padding:14px 16px;display:grid}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-preview{background:color-mix(in srgb, var(--ars-surface) 60%, transparent)}}#airanksuite-root .ars-preview-title{color:var(--ars-ink);font-size:13px;font-weight:650}#airanksuite-root .ars-preview-text{color:var(--ars-ink-2);font-size:12.5px;line-height:1.5}#airanksuite-root .ars-provider-mark.is-image{background:var(--ars-surface);border:1px solid var(--ars-line);box-sizing:border-box;padding:4px}#airanksuite-root .ars-provider-mark.is-image img{object-fit:contain;width:100%;height:100%;display:block}#airanksuite-root .ars-signals{flex:none;gap:2px;display:inline-flex}#airanksuite-root .ars-signals i{background:var(--ars-surface-3);width:15px;height:15px;color:var(--ars-ink-3);border-radius:4px;place-items:center;font-size:9px;font-style:normal;font-weight:800;display:inline-grid}#airanksuite-root .ars-signals i.is-on{background:var(--ars-good-tonal);color:var(--ars-good)}#airanksuite-root .ars-rowmeta{white-space:nowrap;justify-content:flex-end;align-items:center;gap:10px;display:inline-flex}#airanksuite-root .ars-rowacts{opacity:0;gap:8px;font-size:11px;transition:opacity .12s;display:inline-flex}#airanksuite-root .ars-rowacts a{color:var(--ars-brand);font-weight:600;text-decoration:none}#airanksuite-root .ars-table tr:hover .ars-rowacts{opacity:1}#airanksuite-root .ars-hero-stat.is-active{border-color:var(--ars-brand);box-shadow:0 0 0 2px var(--ars-brand-tonal)}#airanksuite-root .ars-brand-mono{color:#fff;width:34px;height:34px;font-family:var(--ars-font-display);place-items:center;font-size:19px;font-weight:700;display:grid}#airanksuite-root .ars-grad-text{-webkit-text-fill-color:currentColor;color:var(--ars-brand);background:0 0}#airanksuite-root{font-family:var(--ars-font)}#airanksuite-root .ars-page-title{letter-spacing:-.01em;font-size:20px;font-weight:600}#airanksuite-root .ars-hero{border-left:1px solid var(--ars-border);background:var(--ars-surface);border-radius:10px;padding:24px 26px;box-shadow:0 1px 1px #16161e08,0 8px 24px -16px #16161e2e}#airanksuite-root .ars-hero-title{letter-spacing:-.01em;font-size:19px;font-weight:600}#airanksuite-root .ars-hero-badge{letter-spacing:0;text-transform:none;border-radius:4px;padding:2px 8px;font-size:12px;font-weight:600}#airanksuite-root .ars-hero-stat{background:var(--ars-surface);border-radius:8px;transition:border-color .14s,box-shadow .14s}#airanksuite-root .ars-hero-stat-v{color:var(--ars-ink);letter-spacing:-.01em;font-size:20px;font-weight:650}#airanksuite-root .ars-hero-stat-v.is-good{color:var(--ars-good-ink)}#airanksuite-root .ars-hero-stat-v.is-warn{color:var(--ars-warning-ink)}#airanksuite-root .ars-hero-stat-v.is-bad{color:var(--ars-serious-ink)}#airanksuite-root .ars-btn{border-radius:8px;min-height:34px;font-weight:600;transition:background .14s,border-color .14s,transform .14s,box-shadow .14s}#airanksuite-root .ars-btn-primary,#airanksuite-root .ars-btn.ars-btn-primary{background:var(--ars-solid);border-color:var(--ars-solid);color:var(--ars-solid-ink);box-shadow:0 1px 2px #16161e2e,inset 0 1px #ffffff0f}#airanksuite-root .ars-btn-primary:hover{background:var(--ars-solid-hover);border-color:var(--ars-solid-hover);transform:translateY(-.5px)}#airanksuite-root .ars-card{border:1px solid var(--ars-border);border-radius:10px}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-card{border:1px solid color-mix(in srgb, var(--ars-border) 80%, transparent)}}#airanksuite-root .ars-card{box-shadow:0 1px 1px #16161e08,0 8px 24px -16px #16161e2e}#airanksuite-root .ars-card-head .t-title{letter-spacing:-.005em;font-size:14.5px;font-weight:650}#airanksuite-root .ars-nav-item{color:var(--ars-ink-2);border-radius:8px;font-weight:500}#airanksuite-root .ars-nav-item svg{color:var(--ars-ink-3)}#airanksuite-root .ars-nav-item:hover{background:var(--ars-surface-2);color:var(--ars-ink)}#airanksuite-root .ars-nav-group{color:var(--ars-ink-3);letter-spacing:.06em;font-size:11px}#airanksuite-root .ars-brand-mark{background:#171717;border-radius:8px}#airanksuite-root .ars-brand-mono{font-family:inherit;font-size:17px}#airanksuite-root .ars-grad-text{color:var(--ars-brand)}#airanksuite-root .ars-metrics-value,#airanksuite-root .ars-metric-value,#airanksuite-root .t-num.font-bold{color:var(--ars-ink)}#airanksuite-root .ars-verdict{border-radius:8px}#airanksuite-root .ars-tabs [aria-selected=true],#airanksuite-root .ars-tab.is-active{color:var(--ars-ink);border-color:var(--ars-ink)}#airanksuite-root .ars-chip.is-active,#airanksuite-root .ars-chipbar .is-active{background:var(--ars-brand-tonal);color:var(--ars-brand-ink)}#airanksuite-root .ars-hero:after,#airanksuite-root .ars-hero:before{display:none}#airanksuite-root .ars-hero{border-top:1px solid var(--ars-border)}#airanksuite-root .ars-table th{letter-spacing:.06em;text-transform:uppercase;color:var(--ars-ink-3);font-size:10.5px;font-weight:650}#airanksuite-root .ars-table td.is-num,#airanksuite-root .ars-table .tabular-nums{font-variant-numeric:tabular-nums}#airanksuite-root .ars-pro{border:1px solid var(--ars-border);background:var(--ars-surface-2);border-radius:10px;align-items:center;gap:12px;padding:14px 16px;display:flex}#airanksuite-root .ars-pro.is-compact{gap:10px;padding:10px 12px}#airanksuite-root .ars-pro-badge{letter-spacing:.06em;text-transform:uppercase;background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);border-radius:999px;flex:none;padding:3px 8px;font-size:10.5px;font-weight:700}#airanksuite-root .ars-pro-title{font-size:13.5px;font-weight:650}#airanksuite-root .ars-pro-text{color:var(--ars-ink-2);margin:2px 0 0;font-size:12.5px}#airanksuite-root .ars-pro-cta{flex:none;margin-inline-start:auto}#airanksuite-root{color:var(--ars-ink-2);background:0 0;font-size:13px}.airanksuite-wrap #airanksuite-root{margin:0}#airanksuite-root .ars-app,#airanksuite-root .ars-app-wide,#airanksuite-root .ars-app-mini{box-shadow:none!important;background:0 0!important;border-radius:0!important;grid-template-columns:none!important;gap:0!important;display:block!important;overflow:visible!important}#airanksuite-root .ars-page{max-width:none}#airanksuite-root .ars-rail,#airanksuite-root .ars-nav-scrim,#airanksuite-root .ars-header{display:none!important}#airanksuite-root .ars-main{background:0 0}#airanksuite-root .ars-page-title{display:none}#airanksuite-root .ars-tabbar{border-bottom:1px solid var(--ars-wp-line);background:0 0;border-radius:0;margin:0 0 16px;padding:0}#airanksuite-root .ars-btn{border:1px solid var(--ars-brand);background:var(--ars-wp-button-bg);min-height:30px;color:var(--ars-brand);box-shadow:none;cursor:pointer;border-radius:3px;align-items:center;gap:6px;padding:0 10px;font-size:13px;font-weight:400;line-height:2.15385;text-decoration:none;display:inline-flex}#airanksuite-root .ars-btn:hover{background:var(--ars-wp-canvas);border-color:var(--ars-brand-hover);color:var(--ars-brand-hover)}#airanksuite-root .ars-btn:focus-visible{outline:2px solid var(--ars-brand);outline-offset:0;box-shadow:0 0 0 1px var(--ars-surface)}#airanksuite-root .ars-btn-primary,#airanksuite-root .ars-btn.ars-btn-primary{background:var(--ars-brand-fill);border-color:var(--ars-brand-fill);color:var(--ars-on-brand);box-shadow:none;transform:none}#airanksuite-root .ars-btn-primary:hover{background:var(--ars-brand-fill-hover);border-color:var(--ars-brand-fill-hover);color:var(--ars-on-brand);transform:none}#airanksuite-root .ars-btn-ghost{background:var(--ars-wp-button-bg)}#airanksuite-root .ars-btn:disabled{background:var(--ars-wp-button-bg);border-color:var(--ars-border);color:var(--ars-ink-3);cursor:default}#airanksuite-root .ars-card,#airanksuite-root .ars-hero{border:1px solid var(--ars-border);box-shadow:none;background:var(--ars-surface);border-radius:4px}#airanksuite-root .ars-card-head{border-bottom:1px solid var(--ars-border)}#airanksuite-root .ars-card-head .t-title{color:var(--ars-ink);font-size:14px;font-weight:600}#airanksuite-root input[type=text],#airanksuite-root input[type=url],#airanksuite-root input[type=email],#airanksuite-root input[type=number],#airanksuite-root input[type=search],#airanksuite-root input[type=password],#airanksuite-root select,#airanksuite-root textarea{border:1px solid var(--ars-wp-field-line);background:var(--ars-surface);color:var(--ars-ink);min-height:30px;box-shadow:none;border-radius:3px;font-size:14px}#airanksuite-root .ars-tab{color:var(--ars-ink-2);background:0 0;border:1px solid #0000;border-bottom:none;border-radius:3px 3px 0 0;margin:0 4px -1px 0;padding:6px 10px;font-size:14px;line-height:1.71429}#airanksuite-root .ars-tab:hover{background:var(--ars-surface);color:var(--ars-ink)}#airanksuite-root .ars-tab.is-active{border-color:var(--ars-wp-line);border-bottom-color:var(--ars-wp-canvas);background:var(--ars-wp-canvas);color:var(--ars-ink);font-weight:600}#airanksuite-root .ars-table{border:1px solid var(--ars-border);background:var(--ars-surface);border-radius:4px}#airanksuite-root .ars-table th{background:var(--ars-wp-button-bg);color:var(--ars-ink);letter-spacing:0;text-transform:none;font-size:12px;font-weight:600}#airanksuite-root .ars-table td{font-size:13px}#airanksuite-root .ars-lictable{display:grid}#airanksuite-root .ars-licrow{border-top:1px solid var(--ars-line);grid-template-columns:220px minmax(0,1fr);align-items:baseline;gap:12px;padding:10px 16px;display:grid}#airanksuite-root .ars-licrow:first-child{border-top:0}#airanksuite-root .ars-licrow-l{color:var(--ars-ink-2);gap:1px;font-size:12.5px;display:grid}#airanksuite-root .ars-licrow-hint{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-licrow-v{color:var(--ars-ink);font-size:13px}@media (width<=720px){#airanksuite-root .ars-licrow{grid-template-columns:1fr}}#airanksuite-root .ars-areacard,#airanksuite-root .ars-report-head.is-green,#airanksuite-root .ars-report-head.is-amber,#airanksuite-root .ars-report-head.is-red,#airanksuite-root .ars-rr-prop,#airanksuite-root .ars-rr-prop.is-required,#airanksuite-root .ars-issue,#airanksuite-root .ars-hero{border-inline-start:1px solid var(--ars-border);border-left-width:1px}#airanksuite-root .ars-areacard.is-bad,#airanksuite-root .ars-areacard.is-mid,#airanksuite-root .ars-areacard.is-good,#airanksuite-root .ars-issue.is-critical,#airanksuite-root .ars-issue.is-warning,#airanksuite-root .ars-issue.is-notice{border-inline-start-color:var(--ars-border)}#airanksuite-root .ars-provider,#airanksuite-root .ars-provider.is-connected,#airanksuite-root .ars-optile,#airanksuite-root .ars-optile.is-seen,#airanksuite-root .ars-optile.is-quiet,#airanksuite-root .ars-optile.is-blocked{border-top:1px solid var(--ars-border)}#airanksuite-root .ars-provider.is-connected{box-shadow:inset 0 0 0 1px var(--ars-good-tonal)}#airanksuite-root .ars-optile.is-seen .ars-optile-seen{color:var(--ars-good)}#airanksuite-root .ars-verdict{border:1px solid var(--ars-border);grid-template-columns:minmax(0,1fr) auto;padding-inline-start:18px}#airanksuite-root .ars-verdict .ars-verdict-mark{display:none}#airanksuite-root .ars-verdict.is-bad .ars-verdict-text{color:var(--ars-ink)}#airanksuite-root .ars-step.is-next{box-shadow:none;border-color:var(--ars-ink-3)}#airanksuite-root .ars-delta-strip{flex-wrap:wrap;gap:6px;display:inline-flex}#airanksuite-root .ars-delta-strip>span{background:var(--ars-surface-3);color:var(--ars-ink-2);border-radius:4px;padding:2px 8px;font-size:11.5px;font-weight:600}#airanksuite-root .ars-delta-strip .is-new{background:var(--ars-serious-tonal);color:var(--ars-serious)}#airanksuite-root .ars-delta-strip .is-fixed{background:var(--ars-good-tonal);color:var(--ars-good)}#airanksuite-root .ars-nav{align-self:flex-start;max-height:calc(100vh - 32px);position:sticky;top:32px;overflow-y:auto}@media (width<=782px){#airanksuite-root .ars-nav{max-height:calc(100vh - 46px);top:46px}}#airanksuite-root .ars-accepted-rules{flex-wrap:wrap;align-items:center;gap:6px;display:flex}#airanksuite-root .ars-signin{justify-items:start;gap:10px;margin-bottom:14px;display:grid}#airanksuite-root .ars-google-btn{color:#1f1f1f;cursor:pointer;background:#fff;border:1px solid #dadce0;border-radius:6px;align-items:center;gap:10px;padding:9px 16px 9px 12px;font:600 14px/1 inherit;display:inline-flex;box-shadow:0 1px 2px #00000014}#airanksuite-root .ars-google-btn:hover{background:var(--ars-surface-2);border-color:var(--ars-border)}#airanksuite-root .ars-google-btn:disabled{opacity:.6;cursor:default}#airanksuite-root .ars-checklist{margin:0;padding:0;list-style:none;display:grid}#airanksuite-root .ars-checklist-item{border-top:1px solid var(--ars-border);grid-template-columns:26px minmax(0,1fr);align-items:start;gap:10px;padding:10px 0;display:grid}#airanksuite-root .ars-checklist-item:first-child{border-top:0}#airanksuite-root .ars-checklist-mark{border:1px solid var(--ars-border-strong);width:22px;height:22px;color:var(--ars-ink-2);background:var(--ars-surface-2);border-radius:999px;justify-content:center;align-items:center;font-size:11.5px;font-weight:600;display:inline-flex}#airanksuite-root .ars-checklist-mark.is-done{background:var(--ars-c-green-bg);border-color:var(--ars-c-green-line);color:var(--ars-c-green-ink)}#airanksuite-root .ars-checklist-item.is-done .font-medium{color:var(--ars-ink-2)}#airanksuite-root .ars-tier{text-transform:uppercase;letter-spacing:.04em;border:1px solid var(--ars-border);color:var(--ars-ink-3);border-radius:999px;padding:1px 6px;font-size:10.5px}#airanksuite-root .ars-tier.is-required{color:var(--ars-ink);border-color:var(--ars-border-strong)}#airanksuite-root .ars-wiz{background:var(--ars-canvas);box-sizing:border-box;min-height:100vh;color:var(--ars-ink);grid-template-columns:300px minmax(0,1fr);gap:28px;padding:40px 44px 56px 36px;font-size:13.5px;display:grid}@media (width<=960px){#airanksuite-root .ars-wiz{grid-template-columns:1fr;padding:24px 18px 40px}#airanksuite-root .ars-wiz-rail{position:static}}#airanksuite-root .ars-wiz-rail{align-self:start;position:sticky;top:40px}#airanksuite-root .ars-wiz-rail-title{letter-spacing:-.02em;color:var(--ars-ink);margin:0 0 22px;font-size:26px;font-weight:700}#airanksuite-root .ars-wiz-steps{gap:2px;display:grid}#airanksuite-root .ars-wiz-step{cursor:pointer;text-align:left;font:inherit;color:var(--ars-ink-3);border-radius:var(--ars-r-sm);background:0 0;border:0;align-items:center;gap:12px;padding:7px 8px 7px 0;display:flex}#airanksuite-root .ars-wiz-step:hover{color:var(--ars-ink-2)}#airanksuite-root .ars-wiz-step.is-active{color:var(--ars-ink);font-weight:600}#airanksuite-root .ars-wiz-step.is-done{color:var(--ars-ink-2)}#airanksuite-root .ars-wiz-step[disabled]{cursor:default}#airanksuite-root .ars-wiz-num{background:var(--ars-brand-tonal);width:26px;height:26px;color:var(--ars-brand);border-radius:999px;flex:none;place-items:center;font-size:12.5px;font-weight:600;transition:background .16s,color .16s;display:grid}#airanksuite-root .ars-wiz-step.is-active .ars-wiz-num,#airanksuite-root .ars-wiz-step.is-done .ars-wiz-num{background:var(--ars-brand);color:#fff}#airanksuite-root .ars-wiz-step.is-done .ars-wiz-num svg{display:block}#airanksuite-root .ars-wiz-subs{margin:2px 0 6px 12px;padding-left:0;display:grid}#airanksuite-root .ars-wiz-sub{font:inherit;text-align:left;cursor:pointer;color:var(--ars-ink-3);border:0;border-left:2px solid var(--ars-border);background:0 0;padding:7px 8px 7px 22px;position:relative}#airanksuite-root .ars-wiz-sub:hover{color:var(--ars-ink-2)}#airanksuite-root .ars-wiz-sub.is-active{color:var(--ars-ink);border-left-color:var(--ars-brand);font-weight:600}#airanksuite-root .ars-wiz-card{background:var(--ars-surface);box-shadow:var(--ars-shadow-card,0 1px 2px #1414180f, 0 8px 24px #1414180d);box-sizing:border-box;border-radius:12px;flex-direction:column;max-width:1160px;min-height:540px;padding:40px 44px 32px;display:flex}@media (width<=782px){#airanksuite-root .ars-wiz-card{padding:24px 20px}}#airanksuite-root .ars-wiz-card h1{letter-spacing:-.01em;color:var(--ars-ink);margin:0 0 6px;font-size:21px;font-weight:700}#airanksuite-root .ars-wiz-lede{color:var(--ars-ink-2);max-width:72ch;margin:0 0 24px;font-size:14px;line-height:1.55}#airanksuite-root .ars-wiz-body{flex:auto}#airanksuite-root .ars-wiz-footer{justify-content:flex-end;align-items:center;gap:14px;margin-top:32px;display:flex}#airanksuite-root .ars-wiz-back{font:inherit;color:var(--ars-brand);cursor:pointer;text-underline-offset:3px;background:0 0;border:0;align-items:center;gap:6px;margin-right:auto;padding:8px 6px;font-weight:600;text-decoration:underline;display:inline-flex}#airanksuite-root .ars-wiz-skip-link{font:inherit;color:var(--ars-brand);cursor:pointer;text-underline-offset:3px;background:0 0;border:0;padding:8px 6px;font-weight:600;text-decoration:underline}#airanksuite-root .ars-wiz-callout{background:var(--ars-brand-tonal);border-left:4px solid var(--ars-brand);color:var(--ars-ink);border-radius:6px;margin:0 0 22px;padding:14px 18px;font-size:13.5px;line-height:1.55;display:block}#airanksuite-root .ars-wiz-callout.is-warning{background:var(--ars-accent-tonal);border-left-color:var(--ars-accent)}#airanksuite-root .ars-wiz-callout p{margin:0}#airanksuite-root .ars-wiz-callout p+p{margin-top:8px}#airanksuite-root .ars-wiz-code{background:var(--ars-surface-3,var(--ars-surface-2));border:1px solid var(--ars-border);color:var(--ars-ink);border-radius:4px;padding:1.5px 7px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}#airanksuite-root .ars-wiz-checks{gap:4px;display:grid}#airanksuite-root .ars-wiz-check{border-radius:var(--ars-r-sm);padding:9px 4px}#airanksuite-root .ars-wiz-check>label{cursor:pointer;color:var(--ars-ink);align-items:center;gap:10px;font-size:13.5px;display:flex}#airanksuite-root .ars-wiz-check input[type=checkbox]{margin:0}#airanksuite-root .ars-wiz-check-sub{color:var(--ars-ink-3);margin:4px 0 0 30px;font-size:12.5px;line-height:1.5}#airanksuite-root .ars-wiz-sources{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:14px;margin-bottom:6px;display:grid}#airanksuite-root .ars-wiz-source{background:var(--ars-brand);border:1.5px solid #0000;border-radius:10px;align-items:center;gap:12px;min-height:84px;padding:10px;display:flex}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-wiz-source{background:color-mix(in srgb, var(--ars-brand) 4%, var(--ars-surface))}}#airanksuite-root .ars-wiz-source{cursor:pointer;font:inherit;text-align:left;color:var(--ars-ink);transition:border-color .14s,background .14s}#airanksuite-root .ars-wiz-source:hover{border-color:var(--ars-border-strong,var(--ars-border))}#airanksuite-root .ars-wiz-source.is-selected{border-color:var(--ars-brand);background:var(--ars-brand-tonal)}#airanksuite-root .ars-wiz-source[disabled]{opacity:.45;cursor:default;background:var(--ars-surface-2)}#airanksuite-root .ars-wiz-source .ars-vendor-icon{border-radius:9px;flex:none;width:40px;height:40px}#airanksuite-root .ars-wiz-source-name{font-size:13.5px;font-weight:600;line-height:1.3}#airanksuite-root .ars-wiz-source-sub{color:var(--ars-ink-3);margin-top:2px;font-size:11.5px}#airanksuite-root .ars-wiz-hero{grid-template-columns:1.2fr 1fr;gap:20px;margin-bottom:22px;display:grid}@media (width<=900px){#airanksuite-root .ars-wiz-hero{grid-template-columns:1fr}}#airanksuite-root .ars-wiz-hero-card{border:1px solid var(--ars-border);border-radius:10px;padding:22px 24px}#airanksuite-root .ars-wiz-quote-mark{color:var(--ars-brand);margin-bottom:10px}#airanksuite-root .ars-wiz-quote{color:var(--ars-ink);margin:0 0 14px;font-size:15px;font-weight:600;line-height:1.55}#airanksuite-root .ars-wiz-quote-by{font-weight:700}#airanksuite-root .ars-wiz-quote-role{color:var(--ars-ink-3);margin-top:2px;font-size:12.5px}#airanksuite-root .ars-wiz-counts{align-content:center;gap:18px;display:grid}#airanksuite-root .ars-wiz-count{align-items:center;gap:14px;display:flex}#airanksuite-root .ars-wiz-count-icon{background:var(--ars-brand-tonal);width:44px;height:44px;color:var(--ars-brand);border-radius:999px;flex:none;place-items:center;display:grid}#airanksuite-root .ars-wiz-count-num{letter-spacing:-.01em;font-size:22px;font-weight:700;line-height:1.1}#airanksuite-root .ars-wiz-count-label{color:var(--ars-ink-2);font-size:12.5px}#airanksuite-root .ars-wiz-strip{background:var(--ars-brand-tonal);border-radius:10px;align-items:center;gap:18px;margin-bottom:4px;padding:16px 20px;display:flex}#airanksuite-root .ars-wiz-strip-text{flex:auto}#airanksuite-root .ars-wiz-strip-title{color:var(--ars-brand);align-items:center;gap:8px;margin-bottom:3px;font-weight:700;display:flex}#airanksuite-root .ars-wiz-strip-sub{color:var(--ars-ink-2);font-size:12.5px;line-height:1.5}#airanksuite-root .ars-wiz-drop{border:1.5px dashed var(--ars-brand)}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-wiz-drop{border:1.5px dashed color-mix(in srgb, var(--ars-brand) 35%, var(--ars-border))}}#airanksuite-root .ars-wiz-drop{background:var(--ars-brand)}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-wiz-drop{background:color-mix(in srgb, var(--ars-brand) 4%, var(--ars-surface))}}#airanksuite-root .ars-wiz-drop{text-align:center;border-radius:10px;justify-items:center;gap:8px;margin-bottom:20px;padding:40px 24px;transition:border-color .14s,background .14s;display:grid}#airanksuite-root .ars-wiz-drop.is-over{border-color:var(--ars-brand);background:var(--ars-brand-tonal)}#airanksuite-root .ars-wiz-drop-icon{color:var(--ars-brand)}#airanksuite-root .ars-wiz-drop-title{font-size:14.5px;font-weight:700}#airanksuite-root .ars-wiz-drop-sub{color:var(--ars-ink-3);font-size:12.5px}#airanksuite-root .ars-wiz-drop-file{color:var(--ars-good-ink,var(--ars-good));font-size:12.5px;font-weight:600}#airanksuite-root .ars-wiz-donelist{border:1px solid var(--ars-border);border-radius:10px;margin-bottom:22px;overflow:hidden}#airanksuite-root .ars-wiz-done{align-items:center;gap:12px;padding:13px 18px;font-size:13.5px;display:flex}#airanksuite-root .ars-wiz-done+.ars-wiz-done{border-top:1px solid var(--ars-line-soft,var(--ars-border))}#airanksuite-root .ars-wiz-done-check{color:var(--ars-good);flex:none;place-items:center;display:grid}#airanksuite-root .ars-wiz-done.is-off .ars-wiz-done-check,#airanksuite-root .ars-wiz-done.is-off{color:var(--ars-ink-3)}#airanksuite-root .ars-wiz-rosette{float:right;border:2px dashed var(--ars-good);width:92px;height:92px;color:var(--ars-good-ink,var(--ars-good));text-align:center;letter-spacing:.06em;text-transform:uppercase;border-radius:999px;place-items:center;margin:-6px 0 12px 18px;font-size:10px;font-weight:700;line-height:1.35;display:grid;transform:rotate(6deg)}#airanksuite-root .ars-notice{background:var(--ars-surface);border:1px solid var(--ars-wp-line);border-left:4px solid var(--ars-wp-notice-info);color:var(--ars-ink);border-radius:0;margin:0;padding:1px 12px;font-size:13px}#airanksuite-root .ars-notice p{margin:.5em 0;padding:2px}#airanksuite-root .ars-notice.is-error{border-left-color:var(--ars-serious)}#airanksuite-root .ars-notice.is-warning{border-left-color:var(--ars-warning)}#airanksuite-root .ars-notice.is-success{border-left-color:var(--ars-good)}#airanksuite-root .ars-notice.is-info{border-left-color:var(--ars-wp-notice-info)}#airanksuite-root .ars-tabbar{box-shadow:none;padding-top:3px;flex-wrap:wrap;align-items:flex-end;gap:0;padding-inline:0;display:flex}#airanksuite-root .ars-tabbar+*{margin-top:0}#airanksuite-root .ars-grouptabs{border-bottom:1px solid var(--ars-wp-line);line-height:inherit;flex-wrap:wrap;align-items:flex-end;gap:0;margin:0 0 16px;padding:9px 0 0;display:flex}#airanksuite-root .ars-grouptab{appearance:none;color:var(--ars-brand);cursor:pointer;white-space:nowrap;background:0 0;border:1px solid #0000;border-bottom:none;border-radius:3px 3px 0 0;align-items:center;gap:6px;margin:0 4px -1px 0;padding:5px 10px;font-size:14px;font-weight:600;line-height:1.71429;text-decoration:none;display:inline-flex}#airanksuite-root .ars-grouptab:hover{background:var(--ars-surface);color:var(--ars-brand-hover)}#airanksuite-root .ars-grouptab:focus-visible{outline:1px solid var(--ars-brand);outline-offset:-1px}#airanksuite-root .ars-grouptab.is-active{border-color:var(--ars-wp-line);border-bottom:1px solid var(--ars-wp-canvas);background:var(--ars-wp-canvas);color:var(--ars-ink)}#airanksuite-root .ars-grouptab-pro{letter-spacing:.04em;text-transform:uppercase;background:var(--ars-warning-tonal);color:var(--ars-warning);border-radius:2px;padding:1px 5px;font-size:10px;font-weight:700}#airanksuite-root[data-theme=dark] .ars-grouptabs{border-bottom-color:var(--ars-border)}#airanksuite-root[data-theme=dark] .ars-grouptab.is-active{border-color:var(--ars-border);border-bottom-color:var(--ars-canvas);background:var(--ars-canvas)}#airanksuite-root[data-theme=dark] .ars-grouptab:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-tab{color:var(--ars-brand);background:0 0;border:0;border-radius:0;margin:0;padding:2px 4px;font-size:13px;font-weight:400;line-height:2;position:relative}#airanksuite-root .ars-tab:after{content:"|";color:var(--ars-ink-3);margin-left:8px;margin-right:2px;font-weight:400}#airanksuite-root [role=tablist]>.ars-tab:last-child:after{content:none}#airanksuite-root .ars-tab.is-active{color:var(--ars-ink);background:0 0;border:0;font-weight:600}#airanksuite-root .ars-tab.is-active:hover{text-decoration:none}body.airanksuite-dark #wpcontent,body.airanksuite-dark #wpbody,body.airanksuite-dark #wpbody-content,body.airanksuite-dark #wpfooter{background:var(--ars-canvas)}body.airanksuite-dark .wrap>h1,body.airanksuite-dark .wrap>h2,body.airanksuite-dark .wrap .wp-heading-inline,body.airanksuite-dark #wpfooter,body.airanksuite-dark #wpfooter a{color:var(--ars-ink)}body.airanksuite-dark .wrap>hr.wp-header-end{border-top-color:var(--ars-border)}body.airanksuite-dark #screen-meta,body.airanksuite-dark #screen-meta-links .show-settings{background:var(--ars-surface);border-color:var(--ars-border);color:var(--ars-ink-2)}#airanksuite-root .ars-upsell{background:var(--ars-surface);border:1px solid var(--ars-wp-line);border-inline-start:4px solid var(--ars-brand);border-radius:4px;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:20px;padding:14px 18px;display:flex}#airanksuite-root .ars-upsell-kicker{letter-spacing:.06em;text-transform:uppercase;color:var(--ars-brand);margin-bottom:2px;font-size:11px;font-weight:700}#airanksuite-root .ars-upsell-title{color:var(--ars-ink);font-size:15.5px;font-weight:600}#airanksuite-root .ars-upsell-text{color:var(--ars-ink-2);max-width:68ch;margin:4px 0 0;font-size:13px}#airanksuite-root .ars-upsell-cta{flex-direction:column;flex:none;align-items:center;gap:4px;display:flex}#airanksuite-root .ars-upsell-price{color:var(--ars-ink-3);white-space:nowrap;font-size:11.5px}#airanksuite-root .ars-richhead{align-items:flex-start;gap:10px;display:flex}#airanksuite-root .ars-richhead-name{flex-wrap:wrap;flex:auto;align-items:center;gap:6px;min-width:0;display:flex}#airanksuite-root .ars-richhead-count{white-space:nowrap;flex:none;padding-top:1px;font-size:11px;line-height:18px}#airanksuite-root .ars-wiz-callout.is-success{border-color:var(--ars-c-green);background:var(--ars-c-green)}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-wiz-callout.is-success{background:color-mix(in srgb, var(--ars-c-green) 18%, transparent)}}#airanksuite-root .ars-scorerow-note{color:var(--ars-ink-3);margin-top:2px;font-size:11px;font-weight:400;line-height:1.35;display:block}#airanksuite-root .ars-tabbar{border-bottom:0;align-items:center;gap:10px;margin:0 0 14px;padding:0}#airanksuite-root [role=tablist]{background:var(--ars-surface-2);border:1px solid var(--ars-border);border-radius:10px;align-items:center;gap:2px;padding:3px;display:inline-flex}#airanksuite-root .ars-tab{color:var(--ars-ink-2);background:0 0;border:0;border-radius:7px;margin:0;padding:6px 13px;font-size:13px;font-weight:500;line-height:1.45;text-decoration:none;transition:background .14s,color .14s,box-shadow .14s;position:relative}#airanksuite-root .ars-tab:after,#airanksuite-root [role=tablist]>.ars-tab:last-child:after{content:none}#airanksuite-root .ars-tab:hover{color:var(--ars-ink);background:#16161e0d;text-decoration:none}#airanksuite-root .ars-tab.is-active,#airanksuite-root .ars-tab[aria-selected=true]{background:var(--ars-surface);color:var(--ars-ink);border:0;font-weight:600;box-shadow:0 1px 2px #16161e1a,0 0 0 1px #16161e0d}#airanksuite-root .ars-tab.is-active:hover{background:var(--ars-surface)}#airanksuite-root[data-theme=dark] .ars-tab:hover{background:#ffffff0f}#airanksuite-root[data-theme=dark] .ars-tab.is-active{box-shadow:0 1px 2px #0006}#airanksuite-root .ars-checklist-item{grid-template-columns:24px minmax(0,1fr);gap:12px;padding:13px 18px;transition:background .12s}#airanksuite-root .ars-checklist-item:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-checklist-item a{color:var(--ars-ink);font-weight:600;text-decoration:none}#airanksuite-root .ars-checklist-item a:hover{color:var(--ars-brand);text-underline-offset:2px;text-decoration:underline}#airanksuite-root .ars-checklist-item.is-done a{color:var(--ars-ink-2);font-weight:500}#airanksuite-root .ars-checklist-mark{width:24px;height:24px;font-size:12px}#airanksuite-root .ars-tier{letter-spacing:.05em;background:var(--ars-surface-2);color:var(--ars-ink-3);border-color:#0000;border-radius:999px;padding:2px 7px;font-size:9.5px;font-weight:600;line-height:1.5}#airanksuite-root .ars-tier.is-required{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);border-color:#0000}#airanksuite-root .ars-scorerow{grid-template-columns:44px minmax(0,1fr) 220px 250px 14px;min-height:54px;padding:11px 10px}#airanksuite-root .ars-scorerow.is-static{grid-template-columns:44px minmax(0,1fr) 220px 250px}#airanksuite-root .ars-scorerow-reach{text-align:end}#airanksuite-root .ars-scorerow-note{white-space:normal;color:var(--ars-ink-3);margin-top:3px;font-size:10.5px;line-height:1.4;display:block}#airanksuite-root .ars-scorerow-score{text-align:center;background:var(--ars-surface-2);min-width:36px;color:var(--ars-ink-2);border-radius:7px;justify-self:start;padding:5px 0;font-size:14px;font-weight:700}#airanksuite-root .ars-scorerow-score.is-good{background:var(--ars-c-green-bg);color:var(--ars-c-green-ink)}#airanksuite-root .ars-scorerow-score.is-mid{background:var(--ars-c-amber);color:var(--ars-c-amber-ink)}#airanksuite-root .ars-scorerow-score.is-bad{background:var(--ars-c-red,#fde8ea);color:var(--ars-c-red-ink)}#airanksuite-root .ars-scorerow-bar{height:7px}#airanksuite-root .ars-scorerow-label{font-size:13px}#airanksuite-root .ars-connect{border:1px solid var(--ars-border);background:var(--ars-surface-2);border-radius:10px;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:18px;padding:14px 16px;display:flex}#airanksuite-root .ars-connect.is-good{border-color:var(--ars-c-green-line);background:var(--ars-c-green-bg)}#airanksuite-root .ars-connect.is-good .t-caption{color:var(--ars-ink-2)}#airanksuite-root .ars-connect>span{flex:none}#airanksuite-root .ars-progress{gap:8px;display:grid}#airanksuite-root .ars-progress-head{color:var(--ars-ink-2);justify-content:space-between;align-items:baseline;gap:16px;font-size:13px;display:flex}#airanksuite-root .ars-progress-pct{color:var(--ars-ink);font-size:13px;font-weight:650}#airanksuite-root .ars-progress-track{background:var(--ars-surface-3);border-radius:999px;height:10px;overflow:hidden}#airanksuite-root .ars-progress-fill{background:var(--ars-brand);background-image:linear-gradient(115deg,#ffffff38 25%,#0000 25% 50%,#ffffff38 50% 75%,#0000 75%);background-size:22px 22px;border-radius:999px;height:100%;transition:width .35s cubic-bezier(.2,0,0,1);animation:.9s linear infinite airanksuite-progress-stripes}@keyframes airanksuite-progress-stripes{to{background-position:22px 0}}@media (prefers-reduced-motion:reduce){#airanksuite-root .ars-progress-fill{background-image:none;animation:none}}#airanksuite-root,#airanksuite-root button,#airanksuite-root input,#airanksuite-root select,#airanksuite-root textarea,#airanksuite-root h1,#airanksuite-root h2,#airanksuite-root h3,#airanksuite-root h4,#airanksuite-root h5,#airanksuite-root p,#airanksuite-root span,#airanksuite-root div,#airanksuite-root a,#airanksuite-root label,#airanksuite-root li,#airanksuite-root td,#airanksuite-root th,#airanksuite-root dt,#airanksuite-root dd,#airanksuite-root small,#airanksuite-root strong,#airanksuite-root b,#airanksuite-root em{font-family:var(--ars-font)}#airanksuite-root code,#airanksuite-root pre,#airanksuite-root kbd,#airanksuite-root samp,#airanksuite-root code *,#airanksuite-root pre *{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}#airanksuite-root .tabular-nums,#airanksuite-root .ars-num,#airanksuite-root .ars-metrics-value,#airanksuite-root .ars-metric-value,#airanksuite-root .ars-hero-stat-v,#airanksuite-root .ars-scorerow-score,#airanksuite-root table td,#airanksuite-root table th{font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1}#airanksuite-root h1,#airanksuite-root h2,#airanksuite-root h3,#airanksuite-root .ars-card-title,#airanksuite-root .ars-hero-title,#airanksuite-root .t-title{letter-spacing:0}#airanksuite-root .ars-card{border-radius:var(--ars-r-lg);box-shadow:0 1px 1px #0000000a}#airanksuite-root[data-theme=dark] .ars-card{box-shadow:0 1px 1px #0006}#airanksuite-root input[type=text],#airanksuite-root input[type=url],#airanksuite-root input[type=email],#airanksuite-root input[type=number],#airanksuite-root input[type=search],#airanksuite-root input[type=password],#airanksuite-root select,#airanksuite-root textarea{border:1px solid var(--ars-border);border-radius:var(--ars-r-sm);background:var(--ars-surface);color:var(--ars-ink);min-height:34px;padding:6px 11px;font-size:13.5px;transition:border-color .14s,box-shadow .14s,background .14s}#airanksuite-root textarea{padding:9px 11px;line-height:1.6}#airanksuite-root select{padding-inline-end:28px}#airanksuite-root input::placeholder,#airanksuite-root textarea::placeholder{color:var(--ars-ink-3)}#airanksuite-root input:hover:not(:disabled),#airanksuite-root select:hover:not(:disabled),#airanksuite-root textarea:hover:not(:disabled){border-color:var(--ars-btn-border-hover)}#airanksuite-root input:focus,#airanksuite-root select:focus,#airanksuite-root textarea:focus{border-color:var(--ars-brand);box-shadow:var(--ars-focus-ring);outline:2px solid #0000}#airanksuite-root input:disabled,#airanksuite-root select:disabled,#airanksuite-root textarea:disabled{background:var(--ars-disabled-bg);color:var(--ars-disabled-ink);cursor:default}#airanksuite-root label.block,#airanksuite-root .ars-field-label{color:var(--ars-ink-2);letter-spacing:.002em;font-size:12.5px;font-weight:600}#airanksuite-root .ars-btn{border-radius:var(--ars-r-sm);min-height:34px;padding:7px 16px;font-size:13px;font-weight:600;transition:background .14s,border-color .14s,color .14s,box-shadow .14s,transform 90ms}#airanksuite-root .ars-btn-primary{background:var(--ars-brand-fill);color:var(--ars-on-brand);box-shadow:0 1px 2px #18162e29,0 6px 16px -8px #2271b1a6}#airanksuite-root .ars-btn-primary:hover:not(:disabled){background:var(--ars-brand-fill-hover);transform:translateY(-1px);box-shadow:0 2px 4px #18162e2e,0 10px 22px -10px #2271b1bf}#airanksuite-root .ars-btn-primary:active:not(:disabled){transform:translateY(0)}#airanksuite-root .ars-btn-ghost{background:var(--ars-surface);border-color:var(--ars-btn-border);color:var(--ars-ink);box-shadow:0 1px 1px #18162e0a}#airanksuite-root .ars-btn-ghost:hover:not(:disabled){background:var(--ars-surface-2);border-color:var(--ars-btn-border-hover);color:var(--ars-ink)}#airanksuite-root .ars-btn-tonal{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);border-color:#0000}#airanksuite-root .ars-btn-tonal:hover:not(:disabled){background:var(--ars-brand-tonal);filter:brightness(.97)}#airanksuite-root .ars-btn:focus-visible{box-shadow:var(--ars-focus-ring);outline:2px solid #0000}#airanksuite-root .ars-linkbtn{border-radius:var(--ars-r-sm);color:var(--ars-brand-ink);padding:5px 8px;font-weight:600;text-decoration:none;transition:background .12s,color .12s}#airanksuite-root .ars-linkbtn:hover{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink)}#airanksuite-root .ars-table th{background:var(--ars-surface);border-bottom:1px solid var(--ars-border);padding:11px 14px}#airanksuite-root .ars-table td{border-bottom:1px solid var(--ars-line-soft);padding:11px 14px}#airanksuite-root .ars-table tbody tr:last-child td{border-bottom:0}#airanksuite-root .ars-table tbody tr{transition:background .11s}#airanksuite-root .ars-table tbody tr:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-nav-item{border-radius:var(--ars-r-sm);padding:8px 12px;font-weight:500}#airanksuite-root .ars-nav-item.is-active{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);box-shadow:inset 2px 0 0 var(--ars-brand);font-weight:650}#airanksuite-root .ars-nav-item.is-active svg{color:var(--ars-brand)}#airanksuite-root .ars-nav-item:hover:not(.is-active){background:var(--ars-surface-2)}#airanksuite-root .ars-badge,#airanksuite-root .ars-chip,#airanksuite-root .ars-pill{letter-spacing:.01em;border-radius:999px;font-weight:650}#airanksuite-root .ars-hero{border-radius:var(--ars-r-lg);position:relative;overflow:hidden}#airanksuite-root .ars-hero:before{content:"";pointer-events:none;background:linear-gradient(112deg,#2271b11a 0%,#8b7bff0d 46%,#0000 78%);width:62%;display:block;position:absolute;inset:-40% auto -40% -10%}#airanksuite-root[data-theme=dark] .ars-hero:before{background:linear-gradient(112deg,#9c8dff29 0%,#7a68ff12 46%,#0000 78%)}#airanksuite-root .ars-hero>*{position:relative}#airanksuite-root .ars-hero-title{letter-spacing:0;font-size:19px;font-weight:680;line-height:1.28}#airanksuite-root .ars-hero-why{font-size:13.5px;line-height:1.6}#airanksuite-root .ars-hero-stat-v{letter-spacing:0;font-size:21px;font-weight:700}#airanksuite-root .ars-upsell{border-radius:var(--ars-r-lg);background:var(--ars-grad);color:var(--ars-on-brand);border:0;padding:20px 24px;box-shadow:0 10px 30px -18px #3f328cbf}#airanksuite-root .ars-upsell,#airanksuite-root .ars-upsell-title,#airanksuite-root .ars-upsell h3,#airanksuite-root .ars-upsell strong{color:var(--ars-on-brand)}#airanksuite-root .ars-upsell-title{letter-spacing:0;font-size:16.5px;font-weight:680}#airanksuite-root .ars-upsell-kicker{color:#ffffffbd;letter-spacing:.1em;font-weight:700}#airanksuite-root .ars-upsell-text,#airanksuite-root .ars-upsell p{color:#ffffffdb}#airanksuite-root .ars-upsell-price{color:#ffffffbd}#airanksuite-root .ars-upsell-cta{text-align:end;justify-items:end;gap:8px;display:grid}#airanksuite-root .ars-upsell .ars-btn-primary{background:var(--ars-on-brand);color:var(--ars-brand-tonal-ink);box-shadow:0 2px 10px #18162e47}#airanksuite-root .ars-upsell .ars-btn-primary:hover:not(:disabled){background:var(--ars-on-brand);filter:brightness(.95)}#airanksuite-root .ars-empty-band{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface-2);color:var(--ars-ink-2);padding:26px 20px;font-size:13px;line-height:1.6}#airanksuite-root .ars-empty{border-radius:var(--ars-r-lg);padding:30px 20px}#airanksuite-root .ars-chart-area,#airanksuite-root .recharts-area-area{opacity:.9}#airanksuite-root .ars-chart-grid line,#airanksuite-root .recharts-cartesian-grid line{stroke:var(--ars-line-soft)}#airanksuite-root .ars-card-icon{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);border-radius:var(--ars-r-sm)}#airanksuite-root .ars-card-title{font-size:14.5px;font-weight:660}.airanksuite-wrap{margin:12px 24px 0 20px}#airanksuite-root .ars-view,#airanksuite-root main.ars-view{padding:0 0 32px!important}#airanksuite-root .ars-card-head{padding:15px 20px}#airanksuite-root .ars-card-body{padding:18px 20px}#airanksuite-root .ars-checklist-item{padding:14px 20px}#airanksuite-root .ars-table th,#airanksuite-root .ars-table td,#airanksuite-root .ars-scorerow{padding-inline:20px}@media (width<=782px){.airanksuite-wrap{margin:10px 12px 0 10px}#airanksuite-root .ars-card-head,#airanksuite-root .ars-card-body,#airanksuite-root .ars-checklist-item,#airanksuite-root .ars-table th,#airanksuite-root .ars-table td,#airanksuite-root .ars-scorerow{padding-inline:14px}}#airanksuite-root .ars-trend-note{color:var(--ars-ink-3);margin:12px 0 0;font-size:12px;line-height:1.55}#airanksuite-root .ars-bandscale{width:100%;padding:6px 2px 2px}#airanksuite-root .ars-gauge-track,#airanksuite-root .ars-gauge-scale{width:100%}#airanksuite-root .ars-gauge-head{align-items:baseline;gap:8px;margin-bottom:14px;display:flex}#airanksuite-root .ars-gauge-n{letter-spacing:0;font-variant-numeric:tabular-nums;font-size:40px;font-weight:760;line-height:1}#airanksuite-root .ars-gauge-of{color:var(--ars-ink-3);font-size:14px;font-weight:500}#airanksuite-root .ars-gauge-zone{letter-spacing:.05em;text-transform:uppercase;color:var(--ars-ink-3);margin-inline-start:auto;font-size:11.5px;font-weight:700}#airanksuite-root .ars-gauge-track{border-radius:999px;height:12px;display:flex;position:relative;overflow:hidden}#airanksuite-root .ars-gauge-band{height:100%;display:block}#airanksuite-root .ars-gauge-mark{width:4px;height:20px;box-shadow:0 0 0 3px var(--ars-surface);border-radius:999px;margin-inline-start:-2px;transition:left .5s cubic-bezier(.2,0,0,1);position:absolute;top:-4px}#airanksuite-root .ars-gauge-scale{letter-spacing:.04em;text-transform:uppercase;color:var(--ars-ink-3);margin-top:7px;font-size:10.5px;display:flex}#airanksuite-root .ars-gauge-scale>span{text-align:center}#airanksuite-root .ars-comp{width:100%;padding:6px 2px 2px}#airanksuite-root .ars-comp-bar{background:var(--ars-surface-3);border-radius:999px;height:14px;display:flex;overflow:hidden}#airanksuite-root .ars-comp-bar>span{height:100%;display:block}#airanksuite-root .ars-comp-bar>span+span{box-shadow:inset 1px 0 0 var(--ars-surface)}#airanksuite-root .ars-comp-keys{flex-wrap:wrap;gap:8px 22px;margin-top:16px;display:flex}#airanksuite-root .ars-comp-key{color:var(--ars-ink-3);align-items:baseline;gap:7px;font-size:12.5px;display:inline-flex}#airanksuite-root .ars-comp-key i{border-radius:3px;align-self:center;width:9px;height:9px}#airanksuite-root .ars-comp-key b{color:var(--ars-ink);letter-spacing:0;font-variant-numeric:tabular-nums;font-size:17px;font-weight:700}#airanksuite-root .ars-comp-total{color:var(--ars-ink-3);margin:12px 0 0;font-size:12px}#airanksuite-root .ars-num,#airanksuite-root .t-num,#airanksuite-root .ars-metrics-value,#airanksuite-root .ars-metric-value,#airanksuite-root .ars-hero-stat-v,#airanksuite-root .ars-gauge-n,#airanksuite-root .ars-comp-key b,#airanksuite-root .ars-scorerow-score,#airanksuite-root .ars-kpi-value{font-variant-numeric:tabular-nums lining;font-feature-settings:"tnum" 1, "lnum" 1;letter-spacing:0;font-weight:700}#airanksuite-root .ars-unit,#airanksuite-root .ars-metrics-unit,#airanksuite-root .ars-metric-unit{opacity:.62;letter-spacing:0;margin-inline-start:2px;font-size:.62em;font-weight:500}#airanksuite-root .ars-legend{color:var(--ars-ink-3);flex-wrap:wrap;align-items:center;gap:6px 16px;padding:0 0 12px;font-size:12px;display:flex}#airanksuite-root .ars-legend-label{color:var(--ars-ink-2)}#airanksuite-root .ars-legend-key{align-items:center;gap:6px;display:inline-flex}#airanksuite-root .ars-legend-key i{border-radius:2px;width:10px;height:6px}#airanksuite-root .ars-report-legend{color:var(--ars-ink-3);white-space:nowrap;align-items:center;gap:6px;font-size:11px;display:inline-flex}#airanksuite-root .ars-report-fix{flex:none;align-self:start;margin-inline-start:auto}#airanksuite-root .ars-report-row{align-items:start;position:relative}#airanksuite-root .ars-report-row:not(.is-pass){box-shadow:inset 2px 0 0 var(--ars-c-red-ink)}#airanksuite-root .ars-report-row.is-pass .ars-report-weight{opacity:.45}#airanksuite-root .ars-spread{gap:10px;height:148px;padding:12px 14px}#airanksuite-root .ars-spread-col{grid-template-rows:auto 1fr auto auto;gap:4px}#airanksuite-root .ars-spread-n{color:var(--ars-ink);letter-spacing:0;font-size:13px;font-weight:700}#airanksuite-root .ars-spread-bar{border-radius:var(--ars-r-sm) var(--ars-r-sm) 2px 2px;max-width:46px}#airanksuite-root .ars-spread-bar.is-empty{background:var(--ars-border);border-radius:999px;height:2px}#airanksuite-root .ars-spread-label{font-size:10.5px}#airanksuite-root .ars-spread-share{color:var(--ars-ink-3);font-size:10.5px;font-weight:600}#airanksuite-root .ars-progress-track.is-indeterminate{max-width:320px;margin-top:14px}#airanksuite-root .ars-progress-track.is-indeterminate .ars-progress-fill{width:38%;animation:1.15s cubic-bezier(.5,0,.5,1) infinite airanksuite-progress-slide,.9s linear infinite airanksuite-progress-stripes}@keyframes airanksuite-progress-slide{0%{transform:translate(-105%)}to{transform:translate(275%)}}@media (prefers-reduced-motion:reduce){#airanksuite-root .ars-progress-track.is-indeterminate .ars-progress-fill{opacity:.5;width:100%;animation:none}}#airanksuite-root .ars-hero-stat-v.is-warn,#airanksuite-root .ars-hero-stat-v.is-bad,#airanksuite-root .ars-hero-stat-v.is-good{letter-spacing:0;border-radius:999px;padding:3px 11px;font-size:15px;line-height:1.45;display:inline-block}#airanksuite-root .ars-hero-stat-v.is-warn{background:var(--ars-warning-tonal);color:var(--ars-warning-ink)}#airanksuite-root .ars-hero-stat-v.is-bad{background:var(--ars-serious-tonal);color:var(--ars-serious-ink)}#airanksuite-root .ars-hero-stat-v.is-good{background:var(--ars-good-tonal);color:var(--ars-good-ink)}#airanksuite-root .ars-status-warn{background:var(--ars-warning-tonal);color:var(--ars-warning-ink);border-radius:999px;padding:2px 9px}.ars-aiwork-head{letter-spacing:-.01em;color:var(--ars-ink);align-items:flex-start;gap:10px;font-size:15px;font-weight:600;display:flex}.ars-aiwork-dot{background:var(--ars-ink-3);border-radius:99px;flex:none;width:9px;height:9px;margin-top:6px}.ars-aiwork-head.is-good .ars-aiwork-dot{background:var(--ars-good)}.ars-aiwork-head.is-warning .ars-aiwork-dot{background:var(--ars-warning)}.ars-aiwork-head.is-good .ars-aiwork-dot{animation:1.8s ease-in-out infinite ars-aiwork-pulse}@keyframes ars-aiwork-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.45;transform:scale(.82)}}.ars-aiwork-line{min-width:0}.ars-aiwork-why{color:var(--ars-ink-2);max-width:74ch;margin:0;font-size:13px;line-height:1.55}.ars-aiwork-bar{background:var(--ars-canvas);border:1px solid var(--ars-border);border-radius:99px;height:8px;overflow:hidden}.ars-aiwork-bar i{background:var(--ars-brand);border-radius:99px;height:100%;transition:width .5s cubic-bezier(.22,1,.36,1);display:block}.ars-aiwork-figures{background:var(--ars-border);border:1px solid var(--ars-border);border-radius:10px;flex-wrap:wrap;gap:1px;display:flex;overflow:hidden}.ars-aiwork-figures div{background:var(--ars-surface);flex-direction:column;flex:150px;gap:3px;padding:12px 14px;display:flex}.ars-aiwork-figures span{letter-spacing:.08em;text-transform:uppercase;color:var(--ars-ink-3);font-size:11px;font-weight:700}.ars-aiwork-figures strong{color:var(--ars-ink);font-variant-numeric:tabular-nums;font-size:16px;font-weight:680}.ars-aiwork-figures em{color:var(--ars-ink-3);max-width:34ch;font-size:11.5px;font-style:normal;line-height:1.5}.ars-vein{background:var(--ars-border);border-radius:2px;height:3px;margin:2px 0 0;position:relative;overflow:hidden}.ars-floor.is-live .ars-vein{background:var(--ars-brand);box-shadow:0 0 14px #2271b12e}.ars-vein-flow{background:var(--ars-brand-tonal);opacity:0;width:18%;position:absolute;inset:0;transform:translate(-30%)}.ars-floor.is-live .ars-vein-flow{opacity:1;animation:3.4s linear infinite ars-bus}.ars-floor.is-still .ars-vein-flow{opacity:.5;width:100%;animation:none;transform:none}.ars-circuits-wrap .ars-circuits{flex-wrap:wrap;gap:8px;margin-top:0;display:flex}.ars-circuits-wrap .ars-circuit{flex:168px;min-width:0}.ars-circuit-stem{background:var(--ars-border);top:-9px;width:2px;height:9px;position:absolute;inset-inline-start:16px}.ars-floor.is-live .ars-circuit.is-live .ars-circuit-stem{background:var(--ars-brand)}.ars-circuit{margin-top:9px}.ars-circuit-powers{color:var(--ars-ink-3);margin-top:5px;font-size:11.5px;line-height:1.5;display:block}.ars-circuit:not(.is-live) .ars-circuit-powers{color:var(--ars-ink-4,var(--ars-ink-3));opacity:.75}.ars-floor.is-compact{background:0 0;border:0;padding:0}.ars-floor.is-compact .ars-floor-body{grid-template-columns:1fr}.ars-floor.is-compact .ars-circuits{grid-template-columns:repeat(auto-fit,minmax(168px,1fr))}.ars-floor.is-compact .ars-floor-rail-label{margin-top:14px}@media (width<=782px){.ars-aiwork-figures div{flex:100%}.ars-aiwork-figures em{max-width:none}.ars-circuits-wrap .ars-circuit{flex-basis:150px}}@media (width<=600px){.ars-circuits-wrap .ars-circuit{flex-basis:100%}.ars-circuit-stem{inset-inline-start:12px}}@media (prefers-reduced-motion:reduce){.ars-aiwork-head .ars-aiwork-dot{animation:none}.ars-aiwork-bar i{transition:none}}#airanksuite-root .ars-chart-bleed{margin-inline:-14px}#airanksuite-root .ars-chart-bleed>div:first-child{margin-inline:14px}@media (width<=600px){#airanksuite-root .ars-chart-bleed{margin-inline:-8px}#airanksuite-root .ars-chart-bleed>div:first-child{margin-inline:8px}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}
     2@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--spacing:.25rem;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1)}}@layer utilities{.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.top-0{top:0}.m-0{margin:0}.mx-auto{margin-inline:auto}.-mt-2{margin-top:calc(var(--spacing) * -2)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-auto{margin-top:auto}.mr-0\.5{margin-right:calc(var(--spacing) * .5)}.mr-1{margin-right:var(--spacing)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-\[27px\]{margin-left:27px}.ml-\[48px\]{margin-left:48px}.ml-\[52px\]{margin-left:52px}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1{height:var(--spacing)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-full{height:100%}.max-h-\[260px\]{max-height:260px}.min-h-\[60vh\]{min-height:60vh}.min-h-\[80vh\]{min-height:80vh}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-\[190px\]{width:190px}.w-full{width:100%}.max-w-\[62ch\]{max-width:62ch}.max-w-\[70ch\]{max-width:70ch}.max-w-\[74ch\]{max-width:74ch}.max-w-\[88ch\]{max-width:88ch}.max-w-\[320px\]{max-width:320px}.max-w-\[520px\]{max-width:520px}.max-w-\[560px\]{max-width:560px}.max-w-\[620px\]{max-width:620px}.max-w-\[720px\]{max-width:720px}.max-w-full{max-width:100%}.min-w-0{min-width:0}.min-w-\[220px\]{min-width:220px}.min-w-\[300px\]{min-width:300px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.scroll-mt-4{scroll-margin-top:calc(var(--spacing) * 4)}.list-none{list-style-type:none}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.place-items-start{place-items:start}.content-start{align-content:flex-start}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-\[2px\]{gap:2px}.gap-\[3px\]{gap:3px}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.gap-x-8{column-gap:calc(var(--spacing) * 8)}.gap-y-1{row-gap:var(--spacing)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.justify-self-start{justify-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.bg-transparent{background-color:#0000}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-5{padding-right:calc(var(--spacing) * 5)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pl-1{padding-left:var(--spacing)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-\[10\.5px\]{font-size:10.5px}.text-\[10px\]{font-size:10px}.text-\[11\.5px\]{font-size:11.5px}.text-\[11px\]{font-size:11px}.text-\[12\.5px\]{font-size:12.5px}.text-\[12px\]{font-size:12px}.text-\[13\.5px\]{font-size:13.5px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.text-\[18px\]{font-size:18px}.text-\[19px\]{font-size:19px}.text-\[20px\]{font-size:20px}.text-\[22px\]{font-size:22px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-all{word-break:break-all}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.\!filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}@media (width>=40rem){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:col-span-4{grid-column:span 4/span 4}.sm\:max-w-\[160px\]{max-width:160px}.sm\:max-w-\[260px\]{max-width:260px}.sm\:max-w-\[440px\]{max-width:440px}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-\[1fr_1fr_120px_auto\]{grid-template-columns:1fr 1fr 120px auto}.sm\:grid-cols-\[2fr_1\.4fr_1fr_1fr_auto\]{grid-template-columns:2fr 1.4fr 1fr 1fr auto}.sm\:grid-cols-\[2fr_1fr_1fr_auto\]{grid-template-columns:2fr 1fr 1fr auto}}@media (width>=48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-\[220px_140px_minmax\(0\,1fr\)\]{grid-template-columns:220px 140px minmax(0,1fr)}.md\:grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.md\:grid-cols-\[minmax\(0\,1fr\)_240px\]{grid-template-columns:minmax(0,1fr) 240px}.md\:grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}}@media (width>=64rem){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-\[auto_auto_minmax\(0\,1fr\)\]{grid-template-columns:auto auto minmax(0,1fr)}.lg\:grid-cols-\[minmax\(0\,1\.15fr\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}}@media (width>=80rem){.xl\:grid-cols-\[minmax\(0\,0\.9fr\)_minmax\(0\,1\.1fr\)\]{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)}.xl\:grid-cols-\[minmax\(0\,1\.15fr\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}}}#airanksuite-root{--ars-font:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;--ars-canvas:#f0f0f1;--ars-surface:#fff;--ars-surface-2:#f6f7f7;--ars-surface-3:#eeeff0;--ars-border:#c3c4c7;--ars-ink:#1d2327;--ars-ink-2:#50575e;--ars-ink-3:#646970;--ars-brand:#2271b1;--ars-brand-hover:#135e96;--ars-brand-ink:#2271b1;--ars-brand-tonal:#f0f6fc;--ars-brand-tonal-ink:#0a4b78;--ars-wp-line:#c3c4c7;--ars-wp-canvas:#f0f0f1;--ars-wp-field-line:#8c8f94;--ars-wp-button-bg:#f6f7f7;--ars-wp-notice-info:#72aee6;--ars-brand-fill:#2271b1;--ars-brand-fill-hover:#135e96;--ars-brand-2:#72aee6;--ars-accent:#f0a325;--ars-accent-tonal:#fff5dc;--ars-grad:linear-gradient(135deg, #2271b1, #72aee6);--ars-grad-soft:linear-gradient(135deg, #f0f6fc, #f6f7f7);--ars-good:#12a150;--ars-good-tonal:#e6f6ee;--ars-warning:#c98400;--ars-warning-tonal:#fff7d6;--ars-serious:#e0393f;--ars-serious-tonal:#fdecea;--ars-r-xs:3px;--ars-r-sm:4px;--ars-r-md:4px;--ars-r-lg:6px;--ars-r-xl:8px;--ars-e1:0 1px 2px #16161e0a;--ars-e2:0 1px 3px #16161e0f;--ars-e3:0 4px 16px #16161e1a;--ars-c-blue:#ece9ff;--ars-c-blue-ink:#4c37cc;--ars-c-green:#dff3e8;--ars-c-green-ink:#0f7a4d;--ars-c-yellow:#fff1cc;--ars-c-yellow-ink:#9a5a0a;--ars-c-red:#fbdcd8;--ars-c-red-ink:#c02b21;--ars-c-violet:#eee1fd;--ars-c-violet-ink:#6a3fc0;--ars-series-1:#6753ff;--ars-series-2:#12a150;--ars-series-3:#f0a325;--ars-series-4:#8b7bff;--ars-line:var(--ars-border);--ars-line-soft:#edecf5;--ars-wash:#00000005;--ars-solid:#171717;--ars-solid-hover:#000;--ars-solid-ink:#fff;--ars-btn-border:#ddddea;--ars-btn-border-hover:#c6c5d9;--ars-good-ink:#0f7a4d;--ars-warning-ink:#9a5a0a;--ars-serious-ink:#c02b21;--ars-info:#0b57d0;--ars-info-ink:#0b57d0;--ars-info-tonal:#e8f1fd;--ars-on-brand:#fff;--ars-focus-ring:0 0 0 3px #2271b147;--ars-disabled-bg:#e3e6ea;--ars-disabled-ink:#8a8d94;--ars-border-strong:#c8c9d0;--ars-c-amber:#fdf1de;--ars-c-amber-ink:#9a5a0a;--ars-c-teal-ink:#0f7a4d;--ars-c-green-bg:#dff3e8;--ars-c-green-line:#b7e4cc;--ars-wire:#8a8d94;--ars-font-mono:ui-monospace, SFMono-Regular, Menlo, monospace;--ars-font-display:inherit;--ars-shadow-sm:0 2px 8px #0000000f;--ars-shadow-card:0 1px 1px #16161e08, 0 8px 24px -16px #16161e2e;--ars-code-bg:#1f2430;--ars-code-ink:#d5dae5;--ars-track:#d5dbe4;--ars-select-bg:#f1efff;--ars-knob:#fff;color:var(--ars-ink);-webkit-font-smoothing:antialiased;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:13.5px;line-height:1.55}#airanksuite-root *{box-sizing:border-box}#airanksuite-root[data-theme=dark],body.airanksuite-dark{--ars-canvas:#131218;--ars-wp-line:#35353b;--ars-wp-canvas:#141416;--ars-wp-field-line:#4a4a52;--ars-wp-button-bg:#2b2b30;--ars-wp-notice-info:#6cb2ff;--ars-brand-fill:#2271b1;--ars-brand-fill-hover:#3582c4;--ars-surface:#1b1a22;--ars-surface-2:#212029;--ars-surface-3:#2a2934;--ars-border:#34333f;--ars-ink:#ececef;--ars-ink-2:#a9abb3;--ars-ink-3:#8d8f97;--ars-brand:#72aee6;--ars-brand-hover:#9ec2e6;--ars-brand-ink:#72aee6;--ars-brand-tonal:#1a2a3a;--ars-brand-tonal-ink:#9ec2e6;--ars-brand-2:#4f94d4;--ars-select-bg:#20304a;--ars-accent:#f0a325;--ars-accent-tonal:#3a2c12;--ars-grad:linear-gradient(135deg, #2271b1, #72aee6);--ars-grad-soft:linear-gradient(135deg, #1a2a3a, #212c3a);--ars-good:#34c98d;--ars-good-tonal:#16302132;--ars-warning:#e6a24a;--ars-warning-tonal:#3a2e1332;--ars-serious:#f2685d;--ars-serious-tonal:#3a201d32;--ars-e1:0 1px 2px #0000004d;--ars-e2:0 1px 3px #0006;--ars-e3:0 8px 28px #0000008c;--ars-c-blue:#232a52;--ars-c-blue-ink:#9fa8ff;--ars-c-green:#143528;--ars-c-green-ink:#4bd299;--ars-c-yellow:#3a2c12;--ars-c-yellow-ink:#f0b657;--ars-c-red:#3a201d;--ars-c-red-ink:#f4867b;--ars-c-violet:#2a2350;--ars-c-violet-ink:#c3acff;--ars-series-1:#9c8dff;--ars-series-2:#b3a4fb;--ars-series-3:#e8a33d;--ars-series-4:#2fc39c;--ars-line:#30313b;--ars-line-soft:#26262f;--ars-solid:#3582c4;--ars-solid-hover:#4f94d4;--ars-solid-ink:#fff;--ars-btn-border:#3a3b46;--ars-btn-border-hover:#474956;--ars-good-ink:#34c98d;--ars-warning-ink:#e6a24a;--ars-serious-ink:#f2685d;--ars-info:#6cb2ff;--ars-info-ink:#8ec2ff;--ars-info-tonal:#20304a;--ars-on-brand:#17123a;--ars-focus-ring:0 0 0 3px #9d86f059;--ars-disabled-bg:#2b2b30;--ars-disabled-ink:#8d8f97;--ars-border-strong:#474956;--ars-c-amber:#3a2c12;--ars-c-amber-ink:#f0b657;--ars-c-teal-ink:#4bd299;--ars-c-green-bg:#143528;--ars-c-green-line:#2c5c44;--ars-wire:#8d8f97;--ars-shadow-sm:0 2px 8px #00000059;--ars-shadow-card:0 1px 2px #00000059, 0 8px 24px -16px #0000008c;--ars-code-bg:#16181f;--ars-code-ink:#c9cedb;--ars-track:#3a3b46;--ars-knob:#e6e6ea;--ars-wash:#8f74f214;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}#airanksuite-root h1,#airanksuite-root h2,#airanksuite-root h3,#airanksuite-root h4,#airanksuite-root h5,#airanksuite-root h6{letter-spacing:-.01em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:inherit;color:inherit;margin:0;padding:0;font-weight:600;line-height:1.35}#airanksuite-root .ars-page-title{letter-spacing:-.02em;color:var(--ars-ink);font-size:22px;font-weight:650;line-height:1.2}#airanksuite-root .ars-app{background:var(--ars-surface);border-radius:var(--ars-r-xl);box-shadow:var(--ars-e3);overflow:clip}#airanksuite-root .ars-card{background:var(--ars-surface);border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);transition:box-shadow .2s cubic-bezier(.2,0,0,1),border-color .2s;box-shadow:0 1px 2px #16161e0d,0 10px 28px -14px #16161e24}#airanksuite-root .ars-card-head{border-bottom:1px solid var(--ars-border);justify-content:space-between;align-items:flex-start;gap:16px;padding:14px 18px;display:flex}#airanksuite-root .ars-card-head+.ars-card-body{padding-top:16px}#airanksuite-root .ars-card-icon{border-radius:var(--ars-r-md);background:var(--ars-brand-tonal);width:30px;height:30px;color:var(--ars-brand-tonal-ink);flex:0 0 30px;justify-content:center;align-items:center;display:inline-flex}#airanksuite-root .ars-hero{background:var(--ars-surface);border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);box-shadow:var(--ars-e1);position:relative;overflow:hidden}#airanksuite-root .ars-hero:after{content:"";background:var(--ars-grad);opacity:.55;height:2px;position:absolute;inset:0 0 auto}#airanksuite-root .ars-grad-text{background:var(--ars-grad);color:#0000;-webkit-background-clip:text;background-clip:text}#airanksuite-root .ars-btn{border-radius:var(--ars-r-md);cursor:pointer;white-space:nowrap;border:1px solid #0000;justify-content:center;align-items:center;gap:8px;padding:7px 15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:13px;font-weight:500;line-height:1.45;transition:background .15s,box-shadow .15s,border-color .15s,transform 90ms;display:inline-flex}#airanksuite-root .ars-btn:active:not(:disabled){transform:translateY(.5px)}#airanksuite-root .ars-btn-primary:disabled{background:var(--ars-disabled-bg);color:var(--ars-disabled-ink);cursor:default;box-shadow:none}#airanksuite-root .ars-btn-ghost:hover{border-color:var(--ars-btn-border-hover);background:#2271b10d}#airanksuite-root .ars-btn-ghost:disabled{color:var(--ars-ink-3);cursor:default;background:0 0}#airanksuite-root .ars-btn-tonal{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink)}#airanksuite-root .ars-btn-tonal:hover{box-shadow:0 1px 2px #3c40434d}#airanksuite-root .ars-btn-danger{color:var(--ars-serious);background:0 0;border-color:#c4c7cc}#airanksuite-root .ars-btn-danger:hover{background:#c5221f0f}#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-switch.is-on:after{transform:translate(-17px)}#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-scorerow-caret,#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-grid-pager button,#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-nav-item.is-back svg,#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-crumb-sep{transform:scaleX(-1)}#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .t-num,#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .tabular-nums,#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-mono,#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-url,#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) code{text-align:start;direction:ltr;unicode-bidi:isolate}#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-pageskel-bar,#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-pageskel-block,#airanksuite-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .ars-grid-skeleton td span{animation-direction:reverse}#airanksuite-root .ars-pageskel-bar,#airanksuite-root .ars-pageskel-block{border-radius:var(--ars-r-lg);background:linear-gradient(90deg, var(--ars-surface-3) 25%, var(--ars-surface-2) 50%, var(--ars-surface-3) 75%);background-size:200% 100%;animation:1.3s ease-in-out infinite ars-shimmer}#airanksuite-root .ars-pageskel-bar{height:44px}#airanksuite-root .ars-pageskel-grid{grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;display:grid}#airanksuite-root .ars-pageskel-block{height:180px}#airanksuite-root .ars-pageskel-block.is-tall{height:260px}@media (prefers-reduced-motion:reduce){#airanksuite-root .ars-pageskel-bar,#airanksuite-root .ars-pageskel-block{animation:none}}#airanksuite-root .ars-routing-actions{border:1px solid var(--ars-brand);border-radius:var(--ars-r-lg);background:var(--ars-brand-tonal);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-top:14px;padding:10px 12px;display:flex}#airanksuite-root .ars-review{border:1px solid var(--ars-brand);border-radius:var(--ars-r-lg);background:var(--ars-brand-tonal);gap:12px;padding:14px;display:grid}#airanksuite-root .ars-review-head{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;display:flex}#airanksuite-root .ars-review-field{border-radius:var(--ars-r-md);background:var(--ars-surface);border:1px solid var(--ars-border);gap:6px;padding:10px 12px;display:grid}#airanksuite-root .ars-review-orig,#airanksuite-root .ars-review-diff{color:var(--ars-ink-2);font-size:12.5px;line-height:1.5}#airanksuite-root .ars-diff-add{background:var(--ars-good-tonal);color:var(--ars-good);border-radius:3px;padding:0 2px}#airanksuite-root .ars-diff-del{background:var(--ars-serious-tonal);color:var(--ars-serious);border-radius:3px;padding:0 2px;text-decoration:line-through}#airanksuite-root .ars-review-meta{color:var(--ars-ink-3);flex-wrap:wrap;gap:6px 14px;font-size:11px;display:flex}#airanksuite-root .ars-review-field.is-applied{opacity:.7}#airanksuite-root .ars-alt-row{border:1px solid var(--ars-border);border-radius:var(--ars-r-md);background:var(--ars-surface);grid-template-columns:72px minmax(0,1fr);align-items:start;gap:10px;padding:8px;display:grid}#airanksuite-root .ars-alt-row img{object-fit:cover;border-radius:var(--ars-r-sm);background:var(--ars-surface-2);width:72px;height:72px}#airanksuite-root .ars-copilot-group{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface);gap:8px;padding:12px 14px;display:grid}#airanksuite-root .ars-copilot-rank{background:var(--ars-brand);color:#fff;border-radius:999px;place-items:center;width:22px;height:22px;font-size:11.5px;font-weight:700;display:inline-grid}#airanksuite-root .ars-letai{gap:18px;display:grid}#airanksuite-root .ars-letai-group{gap:6px;display:grid}#airanksuite-root .ars-letai-head{border-bottom:1px solid var(--ars-border);align-items:baseline;gap:10px;padding-bottom:4px;display:flex}#airanksuite-root .ars-letai-row{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface);grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;padding:10px 12px;display:grid}#airanksuite-root .ars-letai-row.is-disabled{opacity:.6}#airanksuite-root .ars-letai.is-compact .ars-letai-row{padding:7px 10px}#airanksuite-root .ars-letai-cell{flex-shrink:0;align-items:center;gap:12px;display:flex}#airanksuite-root .ars-letai-open{text-align:end;justify-items:end;line-height:1.15;display:grid}#airanksuite-root .ars-letai-open strong{color:var(--ars-ink);font-size:17px;font-weight:700}#airanksuite-root .ars-letai-open span{color:var(--ars-ink-3);white-space:nowrap;font-size:10.5px}#airanksuite-root .ars-letai-open.is-clear{color:var(--ars-good);font-size:12px;font-weight:600}#airanksuite-root .ars-letai-route{color:var(--ars-ink-3);background:var(--ars-surface-2);border-radius:var(--ars-r-sm);justify-self:start;padding:1px 6px;font-size:10.5px}#airanksuite-root .ars-briefing{white-space:pre-wrap;word-break:break-word;max-height:420px;color:var(--ars-ink-2);background:var(--ars-surface-2);border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);margin:0;padding:12px 14px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11.5px;line-height:1.55;overflow:auto}#airanksuite-root .ars-kwsuggest{flex-wrap:wrap;gap:6px;display:flex}#airanksuite-root .ars-kwchip{border:1px solid var(--ars-border);background:var(--ars-surface);cursor:pointer;border-radius:999px;align-items:center;gap:7px;padding:5px 8px 5px 11px;transition:border-color .12s,background .12s,transform .12s;display:inline-flex}#airanksuite-root .ars-kwchip:hover:not(:disabled){border-color:var(--ars-brand);background:var(--ars-brand-tonal);transform:translateY(-1px)}#airanksuite-root .ars-kwchip:disabled{cursor:default;opacity:.65}#airanksuite-root .ars-kwchip-word{color:var(--ars-ink);font-size:12.5px;font-weight:600}#airanksuite-root .ars-barometer-delta{vertical-align:middle;margin-inline-start:4px;font-size:11px;font-weight:700}#airanksuite-root .ars-analyzer-table{gap:2px;display:grid}#airanksuite-root .ars-analyzer-row{border-radius:var(--ars-r-md);color:var(--ars-ink);text-align:start;cursor:default;background:0 0;border:1px solid #0000;grid-template-columns:minmax(0,1fr) 70px 70px 56px 56px 80px;align-items:center;gap:10px;width:100%;padding:7px 10px;font-size:12.5px;display:grid}#airanksuite-root .ars-analyzer-table.is-pages .ars-analyzer-row{grid-template-columns:minmax(0,1fr) 90px 56px 56px 60px}#airanksuite-root .ars-analyzer-row>span,#airanksuite-root .ars-analyzer-row>a{min-width:0}#airanksuite-root .ars-analyzer-row>span:not(:first-child),#airanksuite-root .ars-analyzer-row>a:not(:first-child){text-align:end}#airanksuite-root .ars-analyzer-row.is-head{letter-spacing:.06em;text-transform:uppercase;color:var(--ars-ink-3);border-bottom:1px solid var(--ars-border);border-radius:0;font-size:10.5px;font-weight:700}#airanksuite-root button.ars-analyzer-row{cursor:pointer}#airanksuite-root button.ars-analyzer-row:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-analyzer-row.is-active{background:var(--ars-brand-tonal);border-color:var(--ars-brand)}#airanksuite-root .ars-analyzer-row:nth-child(2n):not(.is-head):not(.is-active){background:var(--ars-surface-2)}#airanksuite-root .ars-analyzer-area{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface);gap:6px;padding:10px 12px;display:grid}@media (width<=720px){#airanksuite-root .ars-analyzer-row{grid-template-columns:minmax(0,1fr) 56px 56px}#airanksuite-root .ars-analyzer-row>:nth-child(2),#airanksuite-root .ars-analyzer-row>:nth-child(3),#airanksuite-root .ars-analyzer-row>:nth-child(6){display:none}}#airanksuite-root .ars-vendor-grid{grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:14px;display:grid}#airanksuite-root .ars-vendor-metrics{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface-2);grid-template-columns:repeat(auto-fit,minmax(88px,1fr));gap:8px;padding:10px;display:grid}#airanksuite-root .ars-vendor-metric{gap:1px;min-width:0;display:grid}#airanksuite-root .ars-vendor-metric-n{letter-spacing:-.01em;font-size:17px;font-weight:700;line-height:1.15}#airanksuite-root .ars-vendor-metric-l{color:var(--ars-ink-3);font-size:10.5px;line-height:1.3}#airanksuite-root .ars-serp-list{gap:2px;display:grid}#airanksuite-root .ars-serp-row{border-radius:var(--ars-r-md);border:1px solid #0000;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;padding:8px 10px;display:grid}#airanksuite-root .ars-serp-row:nth-child(odd){background:var(--ars-surface-2)}#airanksuite-root .ars-serp-row.is-mine,#airanksuite-root .ars-serp-row.is-mine:nth-child(odd){background:var(--ars-brand-tonal);border-color:var(--ars-brand)}#airanksuite-root .ars-serp-title{color:var(--ars-ink);text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:600;text-decoration:none;overflow:hidden}#airanksuite-root .ars-serp-title:hover{color:var(--ars-brand);text-decoration:underline}#airanksuite-root .ars-serp-url{color:var(--ars-ink-3);text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;overflow:hidden}#airanksuite-root .ars-trendcard{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface);align-content:start;gap:8px;min-width:0;padding:12px 14px;display:grid}#airanksuite-root .ars-trendcard-head{justify-content:space-between;align-items:flex-start;gap:10px;display:flex}#airanksuite-root .ars-jump-wrap{position:relative}#airanksuite-root .ars-jump-wrap .ars-jump{width:100%;padding-inline-end:26px}#airanksuite-root .ars-jump::-webkit-search-cancel-button{display:none}#airanksuite-root .ars-jump-clear{color:var(--ars-ink-3);cursor:pointer;inset-inline-end:6px;background:0 0;border:0;border-radius:999px;padding:4px;font-size:11px;line-height:1;position:absolute;top:50%;transform:translateY(-50%)}#airanksuite-root .ars-jump-clear:hover{color:var(--ars-serious);background:var(--ars-surface-3)}#airanksuite-root .ars-letai-card{border-color:var(--ars-brand)}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-letai-card{border-color:color-mix(in srgb, var(--ars-brand) 35%, var(--ars-line))}}#airanksuite-root .ars-letai-card{background:var(--ars-surface)}#airanksuite-root .ars-letai-card.is-live{box-shadow:0 1px 3px #16161e0d, 0 0 0 1px var(--ars-brand)}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-letai-card.is-live{box-shadow:0 1px 3px #16161e0d, 0 0 0 1px color-mix(in srgb, var(--ars-brand) 22%, transparent)}}#airanksuite-root .ars-letai-icon{color:#fff;background:var(--ars-brand);width:34px;height:34px;box-shadow:0 2px 8px var(--ars-brand);border-radius:10px;place-items:center;display:grid}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-letai-icon{box-shadow:0 2px 8px color-mix(in srgb, var(--ars-brand) 34%, transparent)}}#airanksuite-root .ars-letai-title{flex-wrap:wrap;align-items:center;gap:10px;display:inline-flex}#airanksuite-root .ars-letai-count{font-variant-numeric:tabular-nums;background:var(--ars-brand);color:#fff;border-radius:999px;padding:2px 9px;font-size:12.5px;font-weight:700}#airanksuite-root .ars-bands{gap:2px;display:grid}#airanksuite-root .ars-band{border-radius:var(--ars-r-sm);grid-template-columns:10px minmax(120px,auto) 62px 44px minmax(0,1fr);align-items:baseline;gap:10px;padding:6px 8px;font-size:12.5px;display:grid}#airanksuite-root .ars-band:nth-child(odd){background:var(--ars-surface-2)}#airanksuite-root .ars-band.is-zero{opacity:.5}#airanksuite-root .ars-band-swatch{border-radius:3px;align-self:center;width:10px;height:10px}#airanksuite-root .ars-band-label{color:var(--ars-ink);font-weight:600}#airanksuite-root .ars-band-n{text-align:end;font-weight:700}#airanksuite-root .ars-band-pct{text-align:end;color:var(--ars-ink-3)}#airanksuite-root .ars-band-note-text{color:var(--ars-ink-3);font-size:11.5px;line-height:1.45}@media (width<=720px){#airanksuite-root .ars-band{grid-template-columns:10px minmax(0,1fr) 56px 40px}#airanksuite-root .ars-band-note-text{grid-column:2/-1}}#airanksuite-root .ars-empty-band{border:1px dashed var(--ars-line);border-radius:var(--ars-r-lg);color:var(--ars-ink-3);text-align:center;padding:14px;font-size:12.5px}#airanksuite-root .ars-local-head{grid-template-columns:auto minmax(0,1fr);align-items:center;gap:22px;display:grid}@media (width<=640px){#airanksuite-root .ars-local-head{grid-template-columns:1fr}}#airanksuite-root .ars-local-bar{gap:3px;height:8px;display:flex}#airanksuite-root .ars-local-seg{background:var(--ars-surface-3);border-radius:999px;flex:1 1 0;transition:background .2s}#airanksuite-root .ars-local-seg.is-ok{background:var(--ars-good)}#airanksuite-root .ars-levels{grid-template-columns:repeat(auto-fit,minmax(215px,1fr));gap:10px;display:grid}#airanksuite-root .ars-level{text-align:start;overflow-wrap:break-word;border:1px solid var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);min-width:0;font:inherit;color:inherit;cursor:pointer;align-content:start;gap:5px;padding:13px 14px;transition:border-color .14s,background .14s,transform .14s;display:grid}#airanksuite-root .ars-level:hover{border-color:var(--ars-brand);transform:translateY(-1px)}#airanksuite-root .ars-level.is-active{border-color:var(--ars-brand);background:var(--ars-brand-tonal);box-shadow:inset 0 0 0 1px var(--ars-brand)}#airanksuite-root .ars-level.is-writing.is-active{border-color:var(--ars-warning);background:var(--ars-warning-tonal);box-shadow:inset 0 0 0 1px var(--ars-warning)}#airanksuite-root .ars-level-head{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:4px 8px;min-width:0;display:flex}#airanksuite-root .ars-level-name{min-width:0;font-size:13.5px;font-weight:650}#airanksuite-root .ars-level-tag{letter-spacing:.04em;text-transform:uppercase;background:var(--ars-good-tonal);color:var(--ars-good);white-space:normal;border-radius:999px;max-width:100%;padding:2px 7px;font-size:9.5px;font-weight:700;line-height:1.35}#airanksuite-root .ars-level-tag.is-writing{background:var(--ars-warning-tonal);color:var(--ars-warning)}#airanksuite-root .ars-level-one{color:var(--ars-ink);font-size:12px;font-weight:600}#airanksuite-root .ars-level-detail{color:var(--ars-ink-2);font-size:11.5px;line-height:1.5}#airanksuite-root .ars-level-policy{border-radius:var(--ars-r-lg,14px);background:var(--ars-warning-tonal);border:1px solid var(--ars-warning);grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin-top:12px;padding:12px 14px;display:grid}#airanksuite-root .ars-boundary{border:1px solid var(--ars-line,#e6e7eb);background:var(--ars-surface,#fff);color:var(--ars-ink,#16161e);border-radius:16px;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:16px;margin:8px 0;padding:22px 24px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;display:grid}#airanksuite-root .ars-boundary-mark{background:var(--ars-warning-tonal,#fef7e0);width:34px;height:34px;color:var(--ars-warning,#b06000);border-radius:50%;place-items:center;font-size:17px;font-weight:800;display:grid}#airanksuite-root .ars-boundary-detail{background:var(--ars-surface-2,#f7f7f9);color:var(--ars-ink-2,#5b5e6b);white-space:pre-wrap;overflow-wrap:anywhere;border-radius:10px;margin:6px 0 0;padding:10px 12px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;line-height:1.55}#airanksuite-root .ars-hero{border:1px solid var(--ars-line);border-radius:var(--ars-r-xl,18px);background:var(--ars-surface);grid-template-columns:auto minmax(26rem,1fr) auto;align-items:center;gap:24px;padding:22px 24px;display:grid}@media (width<=1320px){#airanksuite-root .ars-hero{grid-template-columns:auto minmax(0,1fr)}#airanksuite-root .ars-hero-stats{grid-column:1/-1;grid-template-columns:repeat(4,minmax(0,1fr))}}@media (width<=700px){#airanksuite-root .ars-hero{grid-template-columns:1fr;justify-items:start;gap:16px}#airanksuite-root .ars-hero-stats{grid-template-columns:repeat(2,minmax(0,1fr))}#airanksuite-root .ars-hero-title{font-size:18px}}#airanksuite-root .ars-hero-ring{place-items:center;display:grid}#airanksuite-root .ars-hero-body{gap:8px;min-width:0;display:grid}#airanksuite-root .ars-hero-badge{letter-spacing:.04em;text-transform:uppercase;background:var(--ars-surface-3);color:var(--ars-ink-2);border-radius:999px;justify-self:start;padding:3px 10px;font-size:11px;font-weight:700}#airanksuite-root .ars-hero-badge.is-good{background:var(--ars-good-tonal);color:var(--ars-good)}#airanksuite-root .ars-hero-badge.is-warning{background:var(--ars-warning-tonal);color:var(--ars-warning)}#airanksuite-root .ars-hero-badge.is-bad{background:var(--ars-serious-tonal);color:var(--ars-serious)}#airanksuite-root .ars-hero-title{letter-spacing:-.015em;color:var(--ars-ink);text-wrap:balance;margin:0;font-size:21px;font-weight:640;line-height:1.28}#airanksuite-root .ars-hero-why{color:var(--ars-ink-2);max-width:68ch;margin:0;font-size:13px;line-height:1.55}#airanksuite-root .ars-hero-actions{flex-wrap:wrap;align-items:center;gap:10px;margin-top:4px;display:flex}#airanksuite-root .ars-hero-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}#airanksuite-root .ars-hero-stat{border:1px solid var(--ars-line);border-radius:var(--ars-r-md,10px);background:var(--ars-surface);justify-items:start;gap:1px;min-width:116px;padding:9px 13px;display:grid}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-hero-stat{background:color-mix(in srgb, var(--ars-surface) 72%, transparent)}}#airanksuite-root .ars-hero-stat{font:inherit;text-align:start;cursor:pointer;transition:border-color .14s,transform .14s}#airanksuite-root .ars-hero-stat:hover{border-color:var(--ars-brand);transform:translateY(-1px)}#airanksuite-root .ars-hero-stat-v{font-variant-numeric:tabular-nums;letter-spacing:-.01em;color:var(--ars-ink);font-size:16px;font-weight:700}#airanksuite-root .ars-hero-stat-l{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-hero-stat-h{color:var(--ars-ink-3);opacity:.85;max-width:30ch;margin-top:3px;font-size:11px;line-height:1.45}#airanksuite-root .ars-hero-ring-note{text-align:center;max-width:30ch;margin:8px 0 0;line-height:1.5}@media (width<=782px){#airanksuite-root .ars-hero-stat-h,#airanksuite-root .ars-hero-ring-note{max-width:none}}#airanksuite-root .ars-trendband{border:1px solid var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface-2);gap:12px;padding:14px;display:grid}#airanksuite-root .ars-trendband-head{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}#airanksuite-root .ars-firstread{border-radius:var(--ars-r-lg,14px);background:var(--ars-surface-2);border:1px dashed var(--ars-line);align-items:center;gap:16px;padding:18px 16px;display:flex}#airanksuite-root .ars-firstread-v{letter-spacing:-.02em;font-variant-numeric:tabular-nums;font-size:34px;font-weight:700;line-height:1}#airanksuite-root .ars-barometer{justify-items:center;gap:2px;min-width:150px;display:grid}#airanksuite-root .ars-barometer svg{width:150px;height:88px;display:block}#airanksuite-root .ars-barometer-read{justify-items:center;gap:1px;margin-top:-4px;display:grid}#airanksuite-root .ars-barometer-value{font-variant-numeric:tabular-nums;letter-spacing:-.02em;font-size:26px;font-weight:700;line-height:1}#airanksuite-root .ars-barometer-label{letter-spacing:.07em;text-transform:uppercase;color:var(--ars-ink-3);font-size:10px;font-weight:700}#airanksuite-root .ars-barometer-verdict{font-size:12.5px;font-weight:600}#airanksuite-root .ars-spread{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface-2);grid-template-columns:repeat(5,1fr);align-items:end;gap:8px;height:92px;padding:8px 10px;display:grid}#airanksuite-root .ars-spread-col{grid-template-rows:auto 1fr auto;justify-items:center;gap:3px;min-width:0;height:100%;display:grid}#airanksuite-root .ars-spread-n{color:var(--ars-ink-2);font-size:11px;font-weight:700}#airanksuite-root .ars-spread-bar{border-radius:var(--ars-r-sm) var(--ars-r-sm) 0 0;align-self:end;width:100%;max-width:34px;transition:height .6s cubic-bezier(.2,0,0,1)}#airanksuite-root .ars-spread-label{color:var(--ars-ink-3);white-space:nowrap;font-size:10px}#airanksuite-root .ars-module-band{border-radius:var(--ars-r-md);background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);flex-direction:column;gap:1px;padding:10px 14px;display:flex}#airanksuite-root .ars-module-band.is-seo{background:var(--ars-c-blue);color:var(--ars-c-blue-ink)}#airanksuite-root .ars-module-tile{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface);align-items:flex-start;gap:12px;padding:12px 14px;transition:opacity .15s,box-shadow .15s,border-color .15s;display:flex}#airanksuite-root .ars-module-tile:hover{border-color:var(--ars-btn-border-hover);box-shadow:0 6px 18px -10px #16161e2e}#airanksuite-root .ars-module-tile.is-off{opacity:.6}#airanksuite-root .ars-module-icon{background:var(--ars-brand-tonal);width:34px;height:34px;color:var(--ars-brand-tonal-ink);border-radius:9px;flex:none;place-items:center;display:grid}#airanksuite-root .ars-module-tile.is-off .ars-module-icon{background:var(--ars-surface-3);color:var(--ars-ink-3)}#airanksuite-root .ars-vendor-card{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface);justify-items:center;gap:8px;padding:18px 14px 14px;transition:box-shadow .15s,transform .15s,border-color .15s;display:grid}#airanksuite-root .ars-vendor-card:hover{border-color:var(--ars-btn-border-hover);transform:translateY(-1px);box-shadow:0 6px 18px -8px #16161e2e}#airanksuite-root .ars-vendor-icon{border-radius:10px;place-items:center;width:44px;height:44px;display:grid;overflow:hidden}#airanksuite-root .ars-vendor-icon svg{width:100%;height:100%}#airanksuite-root .ars-vendor-icon.is-small{border-radius:6px;width:24px;height:24px}#airanksuite-root .ars-vendor-icon.is-small .ars-vendor-icon{border-radius:6px;width:24px;height:24px;font-size:12px}#airanksuite-root .ars-vendor-icon.is-initial{color:#fff;font-size:19px;font-weight:700}#airanksuite-root .ars-chart-line{stroke-dasharray:1;stroke-dashoffset:1px;animation:.7s cubic-bezier(.2,0,0,1) forwards ars-draw}#airanksuite-root .ars-chart-area{opacity:0;animation:.5s .25s forwards ars-fadeup}@keyframes ars-draw{to{stroke-dashoffset:0}}@keyframes ars-fadeup{to{opacity:1}}@media (prefers-reduced-motion:reduce){#airanksuite-root .ars-chart-line{stroke-dasharray:none;stroke-dashoffset:0;animation:none}#airanksuite-root .ars-chart-area{opacity:1;animation:none}}#airanksuite-root .ars-grid{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface);overflow:hidden}#airanksuite-root .ars-grid-toolbar{border-block-end:1px solid var(--ars-line-soft);flex-wrap:wrap;align-items:center;gap:10px;padding:10px 12px;display:flex}#airanksuite-root .ars-grid-search{border:1px solid var(--ars-border);border-radius:var(--ars-r-md);background:var(--ars-surface-2);height:30px;color:var(--ars-ink-3);align-items:center;gap:7px;min-width:220px;padding-inline:10px;transition:border-color .15s,background .15s;display:inline-flex}#airanksuite-root .ars-grid-search:focus-within{border-color:var(--ars-brand);background:var(--ars-surface)}#airanksuite-root .ars-grid-search input{color:var(--ars-ink);flex:1;font-size:12.5px;box-shadow:none!important;background:0 0!important;border:0!important;min-height:0!important;padding:0!important}#airanksuite-root .ars-grid-search input:focus{outline:none}#airanksuite-root .ars-grid-reset{color:var(--ars-brand);cursor:pointer;background:0 0;border:0;padding:4px 6px;font-size:12px;font-weight:600}#airanksuite-root .ars-grid-total{color:var(--ars-ink-3);font-variant-numeric:tabular-nums;margin-inline-start:auto;font-size:12px}#airanksuite-root .ars-grid-scroll{max-height:70vh;overflow:auto}#airanksuite-root .ars-grid-table{width:100%}#airanksuite-root .ars-grid-table thead th{z-index:2;background:var(--ars-surface-2);position:sticky;top:0}#airanksuite-root .ars-grid-sort{font:inherit;color:inherit;text-transform:inherit;letter-spacing:inherit;cursor:pointer;background:0 0;border:0;align-items:center;gap:4px;padding:0;display:inline-flex}#airanksuite-root .ars-grid-sort:hover,#airanksuite-root .ars-grid-caret{color:var(--ars-brand)}#airanksuite-root .ars-grid-table tbody tr:hover td{background:var(--ars-surface-2)}#airanksuite-root .ars-grid-actions{text-align:end;white-space:nowrap}#airanksuite-root .ars-grid-skeleton td span{background:linear-gradient(90deg, var(--ars-surface-3) 25%, var(--ars-surface-2) 50%, var(--ars-surface-3) 75%);background-size:200% 100%;border-radius:5px;height:10px;animation:1.2s ease-in-out infinite ars-shimmer;display:block}@keyframes ars-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){#airanksuite-root .ars-grid-skeleton td span{animation:none}}#airanksuite-root .ars-grid-state{text-align:center;color:var(--ars-ink-2);justify-items:center;gap:6px;padding:34px 16px;font-size:13px;display:grid}#airanksuite-root .ars-grid-footer{border-block-start:1px solid var(--ars-line-soft);color:var(--ars-ink-2);align-items:center;gap:14px;padding:8px 12px;font-size:12px;display:flex}#airanksuite-root .ars-grid-perpage{align-items:center;gap:6px;display:inline-flex}#airanksuite-root .ars-grid-perpage select{min-height:26px!important;padding:2px 22px 2px 8px!important;font-size:12px!important}#airanksuite-root .ars-grid-range{font-variant-numeric:tabular-nums}#airanksuite-root .ars-grid-pager{font-variant-numeric:tabular-nums;align-items:center;gap:8px;margin-inline-start:auto;display:inline-flex}#airanksuite-root .ars-grid-pager button{border:1px solid var(--ars-border);border-radius:var(--ars-r-sm);background:var(--ars-surface);width:26px;height:26px;color:var(--ars-ink);cursor:pointer;justify-content:center;align-items:center;font-size:15px;line-height:1;display:inline-flex}#airanksuite-root .ars-grid-pager button:hover:not(:disabled){background:var(--ars-surface-2);border-color:var(--ars-btn-border-hover)}#airanksuite-root .ars-grid-pager button:disabled{opacity:.4;cursor:default}#airanksuite-root .ars-theme-toggle{border:1px solid var(--ars-border);border-radius:var(--ars-r-md);background:var(--ars-surface);width:30px;height:30px;color:var(--ars-ink-2);cursor:pointer;justify-content:center;align-items:center;padding:0;transition:background .15s,color .15s,border-color .15s;display:inline-flex}#airanksuite-root .ars-theme-toggle:hover{background:var(--ars-surface-2);color:var(--ars-ink);border-color:var(--ars-btn-border-hover)}#airanksuite-root .ars-header-chip{width:auto;padding:0 10px;font-size:12px;font-weight:600;text-decoration:none}#airanksuite-root input[type=text],#airanksuite-root input[type=password],#airanksuite-root input[type=number],#airanksuite-root input[type=date],#airanksuite-root input[type=datetime-local],#airanksuite-root select,#airanksuite-root textarea{border:1px solid var(--ars-border);border-radius:var(--ars-r-md);background:var(--ars-surface);color:var(--ars-ink);width:100%;max-width:100%;margin:0;padding:7px 11px;font-family:inherit;font-size:13px;line-height:1.45;transition:border-color .12s,box-shadow .12s}#airanksuite-root textarea{line-height:1.55}#airanksuite-root select{appearance:none;cursor:pointer;background-image:linear-gradient(45deg,#0000 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,#0000 50%);background-position:calc(100% - 18px) calc(50% + 1px),calc(100% - 13px) calc(50% + 1px);background-repeat:no-repeat;background-size:5px 5px,5px 5px;padding-inline-end:34px}#airanksuite-root select:disabled{color:var(--ars-ink-3);background-color:var(--ars-surface-2);cursor:default}#airanksuite-root input:hover,#airanksuite-root select:hover,#airanksuite-root textarea:hover{border-color:var(--ars-btn-border-hover)}#airanksuite-root input[type=checkbox]{accent-color:var(--ars-brand)}#airanksuite-root :where(:focus-visible){outline:2px solid var(--ars-brand);outline-offset:2px}#airanksuite-root :where(input,select,textarea):focus-visible{outline:none}#airanksuite-root .ars-mono{font-family:Roboto Mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px}#airanksuite-root .ars-nav{background:0 0}#airanksuite-root .ars-nav-item{text-align:start;border-radius:var(--ars-r-md);white-space:nowrap;width:100%;color:var(--ars-ink-2);cursor:pointer;background:0 0;border:0;align-items:center;gap:11px;padding:7px 14px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:13.5px;font-weight:500;transition:background .12s,color .12s;display:flex}#airanksuite-root .ars-nav-item svg{color:var(--ars-ink-3);transition:color .12s}#airanksuite-root .ars-nav-item:hover svg{color:var(--ars-ink)}#airanksuite-root .ars-nav-item.is-active{background:var(--ars-solid);color:var(--ars-solid-ink);font-weight:600;position:relative;box-shadow:0 2px 8px #2271b147}#airanksuite-root .ars-nav-group{letter-spacing:.06em;text-transform:uppercase;color:var(--ars-ink-3);padding:10px 16px 3px;font-size:11px;font-weight:600}#airanksuite-root .ars-table{border-collapse:collapse;width:100%;font-size:13px}#airanksuite-root .ars-table th{z-index:1;text-align:start;letter-spacing:.06em;text-transform:uppercase;color:var(--ars-ink-3);background:var(--ars-surface-2);border-bottom:1px solid var(--ars-border);white-space:nowrap;padding:9px 14px;font-size:10.5px;font-weight:700;position:sticky;top:0}#airanksuite-root .ars-table th:first-child{border-top-left-radius:var(--ars-r-sm)}#airanksuite-root .ars-table th:last-child{border-top-right-radius:var(--ars-r-sm)}#airanksuite-root .ars-table td{vertical-align:middle;border-bottom:1px solid #eef1f5;padding:10px 14px}#airanksuite-root .ars-table tbody td:first-child{color:var(--ars-ink);font-weight:500}#airanksuite-root .ars-table th.is-num,#airanksuite-root .ars-table td.is-num{text-align:end;font-variant-numeric:tabular-nums}#airanksuite-root .ars-table th.is-num>button{justify-content:flex-end;width:100%}#airanksuite-root .ars-table th.is-narrow,#airanksuite-root .ars-table td.is-narrow{width:92px}#airanksuite-root .ars-table th.is-mid,#airanksuite-root .ars-table td.is-mid{width:120px}#airanksuite-root .ars-table td.is-muted{color:var(--ars-ink-3);font-size:12px}#airanksuite-root .ars-drawer{background:var(--ars-surface);border:0;border-inline-start:1px solid var(--ars-border);z-index:9999;top:32px;inset-inline-end:0;border-radius:0;grid-template-rows:auto auto minmax(0,1fr) auto;grid-template-columns:minmax(0,1fr);width:min(1080px,97vw);display:grid;position:fixed;bottom:0;overflow:hidden;box-shadow:-8px 0 24px #3c40431f}#airanksuite-root .ars-drawer>*{min-width:0}@media screen and (width<=782px){#airanksuite-root .ars-drawer{top:46px;width:auto;inset-inline-start:0}}#airanksuite-root .ars-drawer.is-wide{width:min(1080px,97vw)}#airanksuite-root .ars-drawer.is-max{border-inline-start:0;width:100vw;inset-inline-start:0}#airanksuite-root .ars-sheet-head{border-bottom:1px solid var(--ars-border);background:var(--ars-surface);padding:14px 16px 10px}#airanksuite-root .ars-sheet-tabs{border-bottom:1px solid var(--ars-border);background:var(--ars-surface-2);flex-wrap:wrap;gap:2px;padding:0 10px;display:flex}#airanksuite-root .ars-sheet-tabs::-webkit-scrollbar{display:none}#airanksuite-root .ars-sheet-tab{appearance:none;color:var(--ars-ink-3);cursor:pointer;white-space:nowrap;border:0;background:0 0;border-bottom:2px solid #0000;align-items:center;gap:6px;padding:9px 11px;font-size:12.5px;font-weight:600;transition:color .12s,border-color .12s;display:inline-flex}#airanksuite-root .ars-sheet-tab:hover{color:var(--ars-ink)}#airanksuite-root .ars-sheet-tab[aria-selected=true]{color:var(--ars-brand);border-bottom-color:var(--ars-brand);background:var(--ars-surface)}#airanksuite-root .ars-sheet-tab .ars-pip{border-radius:var(--ars-r-xs);background:var(--ars-c-red);color:var(--ars-c-red-ink);padding:2px 5px;font-size:10px;font-weight:700;line-height:1}#airanksuite-root .ars-sheet-body{grid-template-columns:minmax(0,1fr) 340px;min-width:0;min-height:0;display:grid;overflow:hidden}#airanksuite-root .ars-sheet-main{overscroll-behavior:contain;scroll-behavior:smooth;min-width:0;padding:14px 18px 22px;overflow-y:auto}#airanksuite-root .ars-sheet-rail{border-inline-start:1px solid var(--ars-border);background:var(--ars-surface-2);overscroll-behavior:contain;align-content:start;gap:16px;min-width:0;padding:14px 16px 22px;display:grid;overflow:hidden auto}@media (width<=1100px){#airanksuite-root .ars-sheet-body{grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr);overflow-y:auto}#airanksuite-root .ars-sheet-rail{border-inline-start:0;border-bottom:1px solid var(--ars-border);order:-1;overflow:visible}#airanksuite-root .ars-sheet-main{overflow:visible}}#airanksuite-root .ars-sheet-foot{border-top:1px solid var(--ars-border);background:var(--ars-surface);flex-wrap:wrap;align-items:center;gap:8px;padding:10px 16px;display:flex}#airanksuite-root .ars-sheet-split{grid-template-columns:minmax(0,1fr);gap:18px;display:grid}@media screen and (width>=1180px){#airanksuite-root .ars-drawer.is-wide .ars-sheet-split,#airanksuite-root .ars-drawer.is-max .ars-sheet-split,#airanksuite-root .ars-sheet-split{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}}#airanksuite-root .ars-sheet-aside{align-self:start;position:sticky;top:0}#airanksuite-root .ars-scorechip{border-radius:var(--ars-r-xs);letter-spacing:.04em;text-transform:uppercase;align-items:baseline;gap:5px;padding:3px 8px;font-size:11px;font-weight:600;display:inline-flex}#airanksuite-root .ars-scorechip b{letter-spacing:0;font-variant-numeric:tabular-nums;font-size:15px;font-weight:700}#airanksuite-root ::-webkit-scrollbar{width:8px;height:8px}#airanksuite-root ::-webkit-scrollbar-thumb{border-radius:var(--ars-r-md);background:0 0;transition:background .16s}#airanksuite-root ::-webkit-scrollbar-track{background:0 0}#airanksuite-root :hover::-webkit-scrollbar-thumb{background:var(--ars-btn-border-hover)}#airanksuite-root :focus-within::-webkit-scrollbar-thumb{background:var(--ars-btn-border-hover)}#airanksuite-root ::-webkit-scrollbar-thumb:hover{background:#aeb6c4}@supports (scrollbar-width:thin){#airanksuite-root .ars-table-wrap,#airanksuite-root .ars-scroll{scrollbar-width:thin;scrollbar-color:var(--ars-btn-border-hover) transparent}}#airanksuite-root .ars-noscroll{scrollbar-width:none;overflow:visible}#airanksuite-root .ars-noscroll::-webkit-scrollbar{display:none}@keyframes ars-view-in{0%{opacity:0}to{opacity:1}}#airanksuite-root .ars-view{animation:.24s cubic-bezier(.2,0,0,1) ars-view-in}@media (prefers-reduced-motion:reduce){#airanksuite-root .ars-view{animation:none}}#airanksuite-root .ars-card,#airanksuite-root .ars-hero{transition:border-color .18s}#airanksuite-root .ars-jump{width:100%;color:var(--ars-ink);transition:background .15s,box-shadow .15s;box-shadow:inset 0 0 0 1px #3c404314;border-radius:var(--ars-r-md)!important;background:#ffffffbf!important;border:0!important;padding:8px 16px!important;font-size:12.5px!important}#airanksuite-root .ars-jump:focus{background:var(--ars-surface)!important;box-shadow:inset 0 0 0 2px var(--ars-brand)!important;outline:none!important}#airanksuite-root .ars-jump::placeholder{color:var(--ars-ink-3)}#airanksuite-root .ars-btn:focus-visible,#airanksuite-root .ars-nav-item:focus-visible{outline:2px solid var(--ars-brand);outline-offset:2px}@keyframes ars-drawer-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}#airanksuite-root .ars-drawer{animation:.22s cubic-bezier(.2,0,0,1) forwards ars-drawer-in}#airanksuite-root .ars-scrim{-webkit-backdrop-filter:blur(1.5px);backdrop-filter:blur(1.5px);z-index:9998;cursor:pointer;background:#1f1f1f47;border:0;padding:0;animation:.18s ars-view-in;position:fixed;inset:0}#airanksuite-root .ars-table td{font-variant-numeric:tabular-nums}#airanksuite-root .ars-table tbody tr:hover td:first-child{color:var(--ars-brand)}#airanksuite-root .ars-tile{border:1px solid var(--ars-line);border-radius:var(--ars-r-md,10px);background:var(--ars-surface);flex-direction:column;min-height:74px;padding:11px 14px 12px 15px;font-family:inherit;transition:border-color .16s,background .16s;display:flex;position:relative;overflow:hidden}#airanksuite-root .ars-tile:before{content:"";opacity:.9;background:currentColor;width:2px;position:absolute;inset:0 auto 0 0}#airanksuite-root .ars-tile:after{content:none}#airanksuite-root .ars-tile>*{z-index:1;position:relative}#airanksuite-root .ars-tile.is-plain:after{opacity:0}#airanksuite-root .ars-tile.is-plain:before{opacity:1;background:#c4ccda}#airanksuite-root .ars-tile.is-clickable{cursor:pointer}#airanksuite-root .ars-tile.is-clickable:hover{box-shadow:var(--ars-e3);border-color:#cfd6e4;transform:translateY(-2px)}#airanksuite-root .ars-tile.is-clickable:active{transform:translateY(0)}#airanksuite-root .ars-tile.is-clickable:focus-visible{outline:2px solid var(--ars-brand);outline-offset:2px}#airanksuite-root .ars-tile-group{letter-spacing:.09em;text-transform:uppercase;color:var(--ars-ink-3);margin-bottom:2px;font-size:11px;font-weight:700}#airanksuite-root .ars-scopebar{flex-wrap:wrap;align-items:center;gap:10px;display:flex}#airanksuite-root .ars-scope{align-items:center;gap:6px;min-width:0;display:inline-flex}#airanksuite-root .ars-scope-label{color:var(--ars-ink-3);white-space:nowrap;font-size:11.5px;font-weight:500}#airanksuite-root .ars-scope select{max-width:260px;padding-block:5px;font-size:12.5px}#airanksuite-root .ars-filterbar{z-index:5;border-radius:var(--ars-r-lg);background:var(--ars-surface);padding:10px 14px;position:sticky;top:32px}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-filterbar{background:color-mix(in srgb, var(--ars-surface) 88%, transparent)}}#airanksuite-root .ars-filterbar{-webkit-backdrop-filter:saturate(180%)blur(12px);border:1px solid var(--ars-border);box-shadow:0 1px 2px #3c404314}#airanksuite-root .ars-seg{border-radius:var(--ars-r-md);background:var(--ars-surface-2);flex-wrap:wrap;gap:2px;padding:3px;display:inline-flex}#airanksuite-root .ars-seg-item{appearance:none;cursor:pointer;font:inherit;border-radius:var(--ars-r-md);color:var(--ars-ink-2);background:0 0;border:0;padding:7px 14px;font-size:12.5px;font-weight:500;line-height:1;transition:background .16s,color .16s}#airanksuite-root .ars-seg-item:hover{background:var(--ars-surface-3)}#airanksuite-root .ars-seg-item.is-active{background:var(--ars-brand);color:#fff;box-shadow:0 1px 2px #2271b14d}#airanksuite-root .ars-seg-item.is-active:hover{background:var(--ars-brand)}#airanksuite-root .ars-rankrow{border-radius:var(--ars-r-sm);grid-template-columns:minmax(0,1fr) minmax(140px,.9fr) 74px;align-items:center;gap:12px;padding:5px 8px;transition:background .14s;display:grid}#airanksuite-root .ars-rankrow.is-clickable{cursor:pointer}#airanksuite-root .ars-rankrow.is-clickable:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-rankrow-label{color:var(--ars-ink-2);text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;overflow:hidden}#airanksuite-root .ars-rankrow-track{border-radius:var(--ars-r-sm);background:var(--ars-surface-3);height:8px;display:block;overflow:hidden}#airanksuite-root .ars-rankrow-fill{border-radius:var(--ars-r-sm);height:100%;transition:width .42s cubic-bezier(.2,0,0,1);display:block}#airanksuite-root .ars-rankrow-value{text-align:end;white-space:nowrap;color:var(--ars-ink);font-size:12.5px;font-weight:600}@media (width<=782px){#airanksuite-root .ars-filterbar{border-radius:var(--ars-r-lg);position:static}#airanksuite-root .ars-rankrow{grid-template-columns:minmax(0,1fr) 70px 64px}}#airanksuite-root .ars-cell{border-radius:var(--ars-r-sm);flex:none;width:13px;height:22px;transition:transform .14s cubic-bezier(.2,0,0,1);display:inline-block;position:relative}#airanksuite-root .ars-cell:hover{transform:scaleY(1.14)}#airanksuite-root .ars-cell-dot{border-radius:var(--ars-r-xs);background:var(--ars-surface);opacity:.9;width:4px;height:4px;margin-inline-start:-2px;position:absolute;bottom:3px;left:50%}#airanksuite-root .ars-app-wide{grid-template-columns:232px 1fr}#airanksuite-root .ars-app-mini{grid-template-columns:60px 1fr}@media (width<=782px){#airanksuite-root .ars-app-wide,#airanksuite-root .ars-app-mini{grid-template-columns:1fr}}#airanksuite-root .ars-brand{cursor:pointer;width:100%;font:inherit;color:inherit;border-radius:var(--ars-r-md);background:0 0;border:0;align-items:center;gap:10px;padding:6px 8px 10px;display:flex}#airanksuite-root .ars-brand:hover .ars-brand-mark{transform:translateY(-1px);box-shadow:0 3px 14px #2271b173}#airanksuite-root .ars-brand-mark{background:var(--ars-grad);color:#fff;border-radius:9px;flex:none;place-items:center;width:34px;height:34px;transition:box-shadow .15s,transform .15s;display:grid;box-shadow:0 2px 10px #2271b159}#airanksuite-root .ars-brand-mark svg{color:#fff}#airanksuite-root .ars-rail.is-mini .ars-brand{justify-content:center;padding:6px 0 10px}#airanksuite-root .ars-rail.is-mini .ars-nav-item{justify-content:center;gap:0;padding:9px 0}#airanksuite-root .ars-nav-rule{background:var(--ars-border);height:1px;margin:7px 10px 5px}#airanksuite-root .ars-nav-group:first-child,#airanksuite-root .ars-nav-rule:first-child{margin-top:0}#airanksuite-root .ars-header{border-bottom:1px solid var(--ars-border);background:var(--ars-surface);min-height:70px;padding-top:12px;padding-bottom:12px}#airanksuite-root .t-display{letter-spacing:-.02em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:30px;font-weight:500;line-height:1.1}#airanksuite-root .t-title{letter-spacing:-.005em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:15px;font-weight:600;line-height:1.35}#airanksuite-root .t-body{color:var(--ars-ink-2);font-size:13px;line-height:1.55}#airanksuite-root .t-caption{color:var(--ars-ink-3);font-size:11.5px;line-height:1.45}#airanksuite-root .t-overline{letter-spacing:.09em;text-transform:uppercase;color:var(--ars-ink-3);font-size:11px;font-weight:700;line-height:1}#airanksuite-root .t-num{font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1;letter-spacing:-.03em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;line-height:1}@keyframes ars-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}#airanksuite-root .ars-view>*{animation:.34s cubic-bezier(.2,0,0,1) both ars-rise}#airanksuite-root .ars-view>:first-child{animation-delay:0s}#airanksuite-root .ars-view>:nth-child(2){animation-delay:40ms}#airanksuite-root .ars-view>:nth-child(3){animation-delay:80ms}#airanksuite-root .ars-view>:nth-child(4){animation-delay:.12s}#airanksuite-root .ars-view>:nth-child(n+5){animation-delay:.15s}@media (prefers-reduced-motion:reduce){#airanksuite-root .ars-view>*,#airanksuite-root .ars-tile,#airanksuite-root .ars-card{transition:none!important;animation:none!important}}@keyframes ars-sweep{0%{stroke-dasharray:0 10000}}#airanksuite-root .ars-r-sm{border-radius:var(--ars-r-sm)}#airanksuite-root .ars-r-md{border-radius:var(--ars-r-md)}#airanksuite-root .ars-r-lg{border-radius:var(--ars-r-lg)}#airanksuite-root .ars-r-xl{border-radius:var(--ars-r-xl)}#airanksuite-root .ars-r-sm-top{border-radius:var(--ars-r-sm) var(--ars-r-sm) 0 0}#airanksuite-root .ars-page{gap:20px;max-width:1060px;display:grid}#airanksuite-root .ars-prose{max-width:88ch}#airanksuite-root .ars-cardgrid{flex-wrap:wrap;gap:8px;display:flex}#airanksuite-root .ars-cardgrid>*{flex:1 1 var(--min,250px);min-width:0}#airanksuite-root .ars-chipbar{flex-wrap:wrap;align-items:center;gap:6px;display:flex}#airanksuite-root .ars-chip{appearance:none;border:1px solid var(--ars-border);border-radius:var(--ars-r-md);background:var(--ars-surface);color:var(--ars-ink-2);font:inherit;cursor:pointer;white-space:nowrap;align-items:center;gap:6px;padding:7px 12px;font-size:12.5px;font-weight:500;line-height:1;transition:background .12s,border-color .12s,color .12s;display:inline-flex}#airanksuite-root .ars-chip:hover{background:var(--ars-surface-2);border-color:var(--ars-ink-3)}#airanksuite-root .ars-chip.is-active{background:var(--ars-brand-tonal);border-color:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);font-weight:600}#airanksuite-root .ars-chip-count{font-variant-numeric:tabular-nums;color:var(--ars-ink-3);font-size:11px;font-weight:600}#airanksuite-root .ars-chip.is-active .ars-chip-count{color:var(--ars-brand-tonal-ink);opacity:.7}#airanksuite-root .ars-url{text-overflow:ellipsis;white-space:nowrap;word-break:normal;max-width:100%;display:block;overflow:hidden}#airanksuite-root .ars-table td:has(>.ars-url){max-width:360px}#airanksuite-root .ars-table td.is-action,#airanksuite-root .ars-table th.is-action{text-align:end;white-space:nowrap;width:1%}#airanksuite-root .ars-table td.is-action>*{white-space:nowrap}#airanksuite-root .ars-actions{justify-content:flex-end;align-items:center;gap:6px;display:flex}#airanksuite-root .ars-move{border:1px solid var(--ars-border);border-radius:var(--ars-r-sm);background:var(--ars-surface);width:24px;height:24px;color:var(--ars-ink-2);cursor:pointer;place-items:center;font-size:12px;line-height:1;transition:background .12s,border-color .12s;display:inline-grid}#airanksuite-root .ars-move:hover:not(:disabled){background:var(--ars-surface-2);border-color:var(--ars-ink-3)}#airanksuite-root .ars-move:disabled{opacity:.35;cursor:default}#airanksuite-root .ars-pick{text-align:start;border:1px solid var(--ars-border);border-radius:var(--ars-r-sm);background:var(--ars-surface);cursor:pointer;flex-direction:column;justify-content:flex-start;align-items:stretch;width:100%;padding:10px 12px;transition:border-color .12s,background .12s,box-shadow .12s;display:flex;position:relative}#airanksuite-root .ars-pick:hover{border-color:var(--ars-ink-3);background:var(--ars-surface-2)}#airanksuite-root .ars-pick.is-active{border-color:var(--ars-brand);background:var(--ars-brand)}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-pick.is-active{background:color-mix(in srgb, var(--ars-brand) 5%, white)}}#airanksuite-root .ars-pick.is-active{box-shadow:inset 3px 0 0 var(--ars-brand)}#airanksuite-root .ars-pick-title{align-items:center;gap:6px;font-size:13px;font-weight:600;line-height:1.25;display:flex}#airanksuite-root .ars-pick-note{color:var(--ars-ink-3);margin-top:3px;font-size:11.5px;line-height:1.35}#airanksuite-root .ars-pick.is-active .ars-pick-note{color:var(--ars-ink-2)}#airanksuite-root .ars-tag{letter-spacing:.06em;text-transform:uppercase;border-radius:var(--ars-r-xs);white-space:nowrap;padding:2px 5px;font-size:9.5px;font-weight:700;line-height:1}#airanksuite-root .ars-disclosure{border:1px solid var(--ars-border);border-radius:var(--ars-r-sm);background:var(--ars-surface-2)}#airanksuite-root .ars-disclosure>summary{cursor:pointer;color:var(--ars-ink-2);-webkit-user-select:none;user-select:none;align-items:center;gap:7px;padding:8px 11px;font-size:12.5px;font-weight:600;list-style:none;display:flex}#airanksuite-root .ars-disclosure>summary::-webkit-details-marker{display:none}#airanksuite-root .ars-disclosure>summary:before{content:"";border-inline-start:5px solid;border-top:4px solid #0000;border-bottom:4px solid #0000;flex:none;width:0;height:0;transition:transform .14s}#airanksuite-root .ars-disclosure[open]>summary{color:var(--ars-ink);border-bottom:1px solid var(--ars-border)}#airanksuite-root .ars-disclosure-body{color:var(--ars-ink-2);background:var(--ars-surface);padding:11px;font-size:12.5px;line-height:1.55}#airanksuite-root .ars-disclosure-body p:first-child{margin-top:0}#airanksuite-root .ars-disclosure-body p:last-child{margin-bottom:0}#airanksuite-root .ars-table-wrap{max-width:100%;overflow-x:auto}#airanksuite-root .ars-savebar{z-index:20;background:var(--ars-surface);border:1px solid var(--ars-border);border-radius:var(--ars-r-md);box-shadow:var(--ars-e2);flex-wrap:wrap;align-items:center;gap:10px;margin-top:4px;padding:10px 14px;display:flex;position:sticky;bottom:0}.airanksuite-hours{border-collapse:collapse}.airanksuite-hours th,.airanksuite-hours td{text-align:start;font-weight:inherit;padding:2px 12px 2px 0}.airanksuite-hours tr.airanksuite-hours-special th{font-weight:600}.airanksuite-open-now:before{content:"";vertical-align:baseline;background:currentColor;border-radius:50%;width:8px;height:8px;margin-inline-end:6px;display:inline-block}.airanksuite-open-now.is-open{color:#188038}.airanksuite-open-now.is-closed{color:#c5221f}.airanksuite-services{margin:0;padding:0;list-style:none}.airanksuite-services li{border-bottom:1px solid #00000014;padding:6px 0}.airanksuite-service-price{float:right;font-variant-numeric:tabular-nums}.airanksuite-service-desc{opacity:.75;font-size:.9em;display:block}#airanksuite-root .ars-chip-tag{border:1px solid var(--ars-border);border-radius:var(--ars-r-sm);background:var(--ars-surface-2);max-width:100%;color:var(--ars-ink-2);align-items:center;padding:3px 4px 3px 8px;font-size:12px;font-weight:500;line-height:1.4;display:inline-flex}#airanksuite-root .ars-chip-tag.is-suggestion{color:var(--ars-ink-3);cursor:pointer;background:0 0;border-style:dashed;padding-inline-end:8px}#airanksuite-root .ars-chip-tag.is-suggestion:hover{color:var(--ars-brand);border-color:var(--ars-brand)}#airanksuite-root .ars-tabbar{border-bottom:1px solid var(--ars-border);flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:2px;display:flex}#airanksuite-root .ars-tab{appearance:none;font:inherit;color:var(--ars-ink-3);cursor:pointer;white-space:nowrap;background:0 0;border:0;border-bottom:2px solid #0000;align-items:center;gap:7px;margin-bottom:-1px;padding:9px 14px 8px;font-size:13px;font-weight:500;line-height:1.3;transition:color .14s,border-color .14s,background .14s;display:inline-flex}#airanksuite-root .ars-tab:hover{color:var(--ars-ink);background:#2271b10a}#airanksuite-root .ars-tab.is-active{color:var(--ars-brand);border-bottom-color:var(--ars-brand);font-weight:600}#airanksuite-root .ars-tab:focus-visible{outline:2px solid var(--ars-brand);outline-offset:-2px}#airanksuite-root .ars-tab-count{border-radius:var(--ars-r-xs);background:var(--ars-surface-3);color:var(--ars-ink-3);font-variant-numeric:tabular-nums;padding:3px 5px;font-size:10.5px;font-weight:700;line-height:1}#airanksuite-root .ars-masthead{border-bottom:1px solid var(--ars-border);flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:18px;padding:0 0 14px;display:flex}#airanksuite-root .ars-card>.ars-table-wrap>.ars-table th:first-child,#airanksuite-root .ars-card>.ars-table-wrap>.ars-table td:first-child{padding-inline-start:18px}#airanksuite-root .ars-card>.ars-table-wrap>.ars-table th:last-child,#airanksuite-root .ars-card>.ars-table-wrap>.ars-table td:last-child{padding-inline-end:18px}#airanksuite-root .ars-card>.ars-table-wrap>.ars-table th{border-radius:0}#airanksuite-root .ars-empty{text-align:center;color:var(--ars-ink-2);flex-direction:column;align-items:center;gap:6px;padding:30px 24px;display:flex}#airanksuite-root .ars-empty-mark{border-radius:var(--ars-r-md);background:var(--ars-surface-2);border:1px solid var(--ars-border);width:40px;height:40px;color:var(--ars-ink-3);justify-content:center;align-items:center;margin-bottom:4px;display:inline-flex}#airanksuite-root .ars-switch{border-radius:var(--ars-r-md);cursor:pointer;background:#dbe1ea;border:1px solid #c3ccd9;flex:none;width:38px;height:21px;transition:background .16s cubic-bezier(.2,0,0,1),border-color .16s;display:inline-block;position:relative}#airanksuite-root .ars-switch:after{content:"";border-radius:var(--ars-r-sm);background:var(--ars-surface);width:15px;height:15px;transition:transform .16s cubic-bezier(.2,0,0,1);position:absolute;top:2px;left:2px;box-shadow:0 1px 2px #3c404347}#airanksuite-root .ars-switch.is-on{background:var(--ars-brand);border-color:var(--ars-brand)}#airanksuite-root .ars-switch.is-on:after{transform:translate(17px)}#airanksuite-root .ars-switch.is-disabled{opacity:.45;cursor:default}#airanksuite-root .ars-switch:focus-visible{outline:2px solid var(--ars-brand);outline-offset:2px}#airanksuite-root label{color:var(--ars-ink)}#airanksuite-root .ars-disclosure>summary:before{content:"▸";color:var(--ars-ink-3);font-size:10px;transition:transform .16s;display:inline-block}#airanksuite-root .ars-disclosure[open]>summary:before{transform:rotate(90deg)}#airanksuite-root .ars-disclosure>summary:hover{color:var(--ars-ink)}#airanksuite-root .ars-disclosure[open]>summary{border-bottom:1px solid var(--ars-border)}#airanksuite-root .ars-head-strip{border:1px solid var(--ars-border);background:var(--ars-surface-2);border-radius:6px;flex-wrap:wrap;align-items:center;gap:18px;padding:10px 12px;display:flex}#airanksuite-root .ars-head-stat{align-items:baseline;gap:6px;display:flex}#airanksuite-root .ars-head-stat b{font-variant-numeric:tabular-nums;font-size:16px;font-weight:700;line-height:1}#airanksuite-root .ars-head-stat span{color:var(--ars-ink-3);font-size:11.5px}#airanksuite-root .ars-head-stat.is-bad b{color:var(--ars-serious)}#airanksuite-root .ars-head-stat.is-warn b{color:var(--ars-warning)}#airanksuite-root .ars-head-group{border:1px solid var(--ars-border);background:var(--ars-surface);border-radius:6px;overflow:hidden}#airanksuite-root .ars-head-group-head{background:var(--ars-surface-2);border-bottom:1px solid var(--ars-border);justify-content:space-between;align-items:flex-start;gap:12px;padding:9px 12px;display:flex}#airanksuite-root .ars-head-rows{display:grid}#airanksuite-root .ars-head-row+.ars-head-row{border-top:1px solid var(--ars-border)}#airanksuite-root .ars-head-row-main{text-align:start;cursor:pointer;width:100%;font:inherit;background:0 0;border:0;grid-template-columns:168px minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:7px 12px;display:grid}#airanksuite-root .ars-head-row-main:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-head-key{color:var(--ars-ink);text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600;overflow:hidden}#airanksuite-root .ars-head-val{color:var(--ars-ink-2);text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-family:var(--ars-font-mono,ui-monospace, SFMono-Regular, Menlo, monospace);overflow:hidden}#airanksuite-root .ars-head-len{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-head-row.is-missing{background:var(--ars-c-red)}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-head-row.is-missing{background:color-mix(in srgb, var(--ars-c-red) 55%, transparent)}}#airanksuite-root .ars-head-row-body{border-top:1px dashed var(--ars-border);background:var(--ars-surface-2);gap:8px;padding:2px 12px 12px;display:grid}#airanksuite-root .ars-head-code{background:var(--ars-surface-3);color:var(--ars-ink-2);border-radius:3px;padding:1px 6px;font-size:11px}#airanksuite-root .ars-head-pre{background:var(--ars-ink);color:var(--ars-border);white-space:pre-wrap;word-break:break-word;tab-size:2;border-radius:4px;max-height:260px;margin:0;padding:10px 12px;font-size:11.5px;line-height:1.65;overflow:auto}#airanksuite-root .ars-head-pre.is-tall{max-height:460px}#airanksuite-root .ars-card.is-flush .ars-head-pre{border-radius:0}#airanksuite-root .ars-head-issue{border:1px solid var(--ars-border);background:var(--ars-surface-2);border-radius:5px;gap:10px;padding:9px 12px;display:flex}#airanksuite-root .ars-head-issue.is-error{background:var(--ars-c-red);border-color:#0000}#airanksuite-root .ars-head-issue.is-warn{background:var(--ars-c-yellow);border-color:#0000}#airanksuite-root .ars-head-issue-mark{background:#ffffffb3;border-radius:50%;flex:none;place-items:center;width:18px;height:18px;font-size:11px;font-weight:700;display:grid}#airanksuite-root .ars-head-issue.is-error .ars-head-issue-mark{color:var(--ars-c-red-ink)}#airanksuite-root .ars-head-issue.is-warn .ars-head-issue-mark{color:var(--ars-c-yellow-ink)}#airanksuite-root .ars-head-drift{border:1px solid var(--ars-border);background:var(--ars-surface);border-radius:5px;gap:4px;padding:9px 12px;display:grid}#airanksuite-root .ars-head-drift-row{grid-template-columns:56px minmax(0,1fr);align-items:baseline;gap:8px;display:grid}#airanksuite-root .ars-head-drift-row code{color:var(--ars-ink-2);word-break:break-word;font-size:11.5px}#airanksuite-root .ars-linkbtn{cursor:pointer;font:inherit;color:var(--ars-brand);background:0 0;border:0;padding:0;font-size:12px;font-weight:600}@media (width<=900px){#airanksuite-root .ars-head-row-main{grid-template-columns:minmax(0,1fr) auto;row-gap:2px}#airanksuite-root .ars-head-val{grid-column:1/-1}}#airanksuite-root .ars-snip-head{border:1px solid var(--ars-border);background:var(--ars-surface);box-shadow:var(--ars-e1);border-radius:8px;flex-wrap:wrap;align-items:center;gap:16px;padding:12px 16px;display:flex}#airanksuite-root .ars-snip-stats{flex-wrap:wrap;align-items:center;gap:20px;display:flex}#airanksuite-root .ars-snip-stat{line-height:1.15;display:grid}#airanksuite-root .ars-snip-stat b{font-variant-numeric:tabular-nums;font-size:19px;font-weight:700}#airanksuite-root .ars-snip-stat span{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-snip-stat.is-live b{color:var(--ars-good,var(--ars-good))}#airanksuite-root .ars-snip-stat.is-bad b{color:var(--ars-serious)}#airanksuite-root .ars-snip-actions{flex-wrap:wrap;align-items:center;gap:8px;margin-inline-start:auto;display:flex}#airanksuite-root .ars-snip-list{display:grid}#airanksuite-root .ars-snip-row+.ars-snip-row{border-top:1px solid var(--ars-border)}#airanksuite-root .ars-snip-row.is-open{background:var(--ars-surface-2)}#airanksuite-root .ars-snip-row-head{align-items:center;gap:8px;padding-inline-end:12px;display:flex}#airanksuite-root .ars-snip-row-main{text-align:start;min-width:0;font:inherit;cursor:pointer;background:0 0;border:0;flex:1;grid-template-columns:14px auto minmax(0,1fr) auto auto auto auto;align-items:center;gap:10px;padding:9px 12px;display:grid}#airanksuite-root .ars-snip-row-main:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-snip-caret{color:var(--ars-ink-3);font-size:10px}#airanksuite-root .ars-snip-type{letter-spacing:.03em;text-transform:uppercase;text-align:center;border-radius:3px;min-width:40px;padding:2px 6px;font-size:10px;font-weight:700}#airanksuite-root .ars-snip-name{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:13px;font-weight:600;overflow:hidden}#airanksuite-root .ars-snip-note{color:var(--ars-ink-3);text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;font-weight:400;display:block;overflow:hidden}#airanksuite-root .ars-snip-meta{color:var(--ars-ink-3);white-space:nowrap;font-size:11.5px}#airanksuite-root .ars-snip-row-tools{flex:none;align-items:center;gap:8px;display:flex}#airanksuite-root .ars-snip-body{border-top:1px dashed var(--ars-border);gap:12px;padding:4px 12px 16px;display:grid}#airanksuite-root .ars-live-dot{background:var(--ars-good);width:7px;height:7px;box-shadow:0 0 0 3px var(--ars-good);border-radius:50%}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-live-dot{box-shadow:0 0 0 3px color-mix(in srgb, var(--ars-good) 18%, transparent)}}#airanksuite-root .ars-snip-chain{border-bottom:1px solid var(--ars-border);flex-wrap:wrap;align-items:center;gap:6px;padding:10px 14px;display:flex}#airanksuite-root .ars-snip-chain-node{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);border-radius:4px;padding:3px 8px;font-size:11.5px;font-weight:600}#airanksuite-root .ars-snip-chain-arrow{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-code-wrap{border:1px solid var(--ars-border);background:var(--ars-ink);border-radius:5px;grid-template-columns:44px minmax(0,1fr);display:grid;overflow:hidden}#airanksuite-root .ars-code-gutter{color:#5a6070;font:11.5px/1.6 var(--ars-font-mono,ui-monospace, SFMono-Regular, Menlo, monospace);text-align:end;-webkit-user-select:none;user-select:none;background:#14161c;align-content:start;padding:10px 0;display:grid;overflow:hidden}#airanksuite-root .ars-code-gutter span{padding-inline-end:10px}#airanksuite-root textarea.ars-code-area{color:var(--ars-border);tab-size:4;white-space:pre;resize:vertical;box-shadow:none;background:0 0;border:0;border-radius:0;margin:0;padding:10px 12px;font-size:11.5px;line-height:1.6}#airanksuite-root textarea.ars-code-area:focus{box-shadow:none;background:#1c1f28;outline:0}#airanksuite-root .ars-lib-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px;display:grid}#airanksuite-root .ars-lib-card{border:1px solid var(--ars-border);background:var(--ars-surface);border-radius:8px;flex-direction:column;gap:6px;padding:14px;display:flex}#airanksuite-root .ars-lib-code{background:var(--ars-ink);color:#cfd3e4;white-space:pre;border-radius:4px;max-height:116px;margin:0;padding:9px 10px;font-size:10.5px;line-height:1.55;overflow:hidden}#airanksuite-root .ars-search{border:1px solid var(--ars-border);background:var(--ars-surface);color:var(--ars-ink-3);border-radius:5px;align-items:center;gap:6px;padding:0 8px;display:flex}#airanksuite-root .ars-search input{box-shadow:none;background:0 0;border:0;min-width:200px;padding:5px 0}#airanksuite-root .ars-search input:focus{box-shadow:none;outline:0}#airanksuite-root .ars-floor{background:var(--ars-surface-2);color:var(--ars-ink);padding:20px 18px 16px;position:relative;overflow:hidden}#airanksuite-root .ars-floor.is-dark{padding:26px 18px}#airanksuite-root .ars-floor-off{border:1px solid var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);color:var(--ars-ink-2);flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:14px;padding:12px 14px;display:flex}#airanksuite-root .ars-floor-off>.ars-btn{margin-inline-start:auto}#airanksuite-root .ars-floor-desks.is-dark{opacity:.72}#airanksuite-root .ars-desk.is-dark{background:0 0;border-style:dashed}#airanksuite-root .ars-desk.is-dark .ars-desk-eng{background:var(--ars-surface-3);color:var(--ars-ink-3);border-color:#0000}#airanksuite-root .ars-circuits-wrap{border:1px solid var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);margin-bottom:16px;padding:12px 12px 14px}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-circuits-wrap{background:color-mix(in srgb, var(--ars-surface) 70%, transparent)}}#airanksuite-root .ars-floor-rail-label{justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:10px;display:flex}#airanksuite-root .ars-circuits-wrap .ars-circuits{margin-bottom:0}#airanksuite-root .ars-floor-off-mark{background:var(--ars-btn-border-hover);border-radius:50%;flex:none;width:10px;height:10px;margin-top:4px}#airanksuite-root .ars-floor-off .font-semibold{color:var(--ars-ink)}#airanksuite-root .ars-floor-bus{background:var(--ars-border);border-radius:2px;height:3px;margin-bottom:16px;position:relative;overflow:hidden}#airanksuite-root .ars-floor.is-live .ars-floor-bus{background:var(--ars-brand);box-shadow:0 0 14px #2271b12e}#airanksuite-root .ars-floor-bus-flow{background:var(--ars-brand-tonal);opacity:0;width:22%;position:absolute;inset:0;transform:translate(-30%)}#airanksuite-root .ars-floor.is-live .ars-floor-bus-flow{opacity:1;animation:3.4s linear infinite ars-bus}@keyframes ars-bus{0%{transform:translate(-30%)}to{transform:translate(460%)}}#airanksuite-root .ars-floor-engines{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px;margin-bottom:18px;display:grid}#airanksuite-root .ars-eng{border:1px solid var(--ars-border);background:linear-gradient(#fff,#fff);border-radius:7px;padding:10px 12px 11px;position:relative}#airanksuite-root .ars-eng.is-default{border-color:var(--ars-brand-ink)}#airanksuite-root .ars-eng-lead{background:var(--ars-border);top:-17px;width:1px;height:17px;position:absolute;inset-inline-start:22px}#airanksuite-root .ars-floor.is-live .ars-eng-lead{background:var(--ars-brand)}#airanksuite-root .ars-eng-head{align-items:center;gap:7px;display:flex}#airanksuite-root .ars-eng-dot{background:var(--ars-btn-border-hover);border-radius:50%;flex:none;width:7px;height:7px}#airanksuite-root .ars-floor.is-live .ars-eng-dot{background:#1fa06a;box-shadow:0 0 0 3px #1fa06a26}#airanksuite-root .ars-eng.is-busy .ars-eng-dot{background:var(--ars-accent);animation:1.1s ease-in-out infinite ars-pulse;box-shadow:0 0 0 3px #e8a33d38}@keyframes ars-pulse{0%,to{box-shadow:0 0 0 3px #e8a33d38}50%{box-shadow:0 0 0 7px #e8a33d0d}}#airanksuite-root .ars-eng-name{color:var(--ars-ink);text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;font-weight:600;overflow:hidden}#airanksuite-root .ars-eng-flag{letter-spacing:.04em;text-transform:uppercase;color:var(--ars-brand);margin-inline-start:auto;font-size:9.5px;font-weight:700}#airanksuite-root .ars-eng-model{color:var(--ars-ink-3);text-overflow:ellipsis;white-space:nowrap;margin-top:2px;font-size:10.5px;overflow:hidden}#airanksuite-root .ars-eng-load{color:var(--ars-ink-3);align-items:center;gap:8px;margin-top:8px;font-size:10.5px;display:flex}#airanksuite-root .ars-eng-load-bar{background:var(--ars-border);border-radius:2px;flex:1;height:3px;overflow:hidden}#airanksuite-root .ars-eng-load-bar span{background:var(--ars-brand);height:100%;transition:width .4s cubic-bezier(.2,0,0,1);display:block}#airanksuite-root .ars-floor-desks{grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;display:grid}#airanksuite-root .ars-desk{border:1px solid var(--ars-surface-3);background:#16161e05;border-radius:7px;min-width:0;padding:9px 11px 10px;transition:border-color .24s,background .24s;overflow:hidden}#airanksuite-root .ars-desk.is-active{border-color:var(--ars-brand);background:#6d5cf017}#airanksuite-root .ars-desk-head{justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:6px;display:flex}#airanksuite-root .ars-desk-name{letter-spacing:.05em;text-transform:uppercase;color:var(--ars-ink-2);font-size:11px;font-weight:700}#airanksuite-root .ars-desk-hint{color:var(--ars-ink-3);font-size:10px}#airanksuite-root .ars-desk-jobs{gap:3px;margin:0;padding:0;list-style:none;display:grid}#airanksuite-root .ars-desk-jobs li{border-top:1px solid #16161e0a;gap:1px;padding:4px 0;display:grid}#airanksuite-root .ars-desk-jobs li:first-child{border-top:0}#airanksuite-root .ars-desk-job{min-width:0;color:var(--ars-ink-2);text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;overflow:hidden}#airanksuite-root .ars-desk-jobs li.is-on .ars-desk-job{color:var(--ars-brand-ink);font-weight:600}#airanksuite-root .ars-desk-eng{text-overflow:ellipsis;white-space:nowrap;max-width:100%;color:var(--ars-wire,var(--ars-ink-3));justify-self:start;padding-inline-start:12px;font-size:10.5px;font-weight:600;position:relative;overflow:hidden}#airanksuite-root .ars-desk-eng:before{content:"";opacity:.7;inset-inline-start:0;background:currentColor;border-radius:1px;width:8px;height:2px;position:absolute;top:50%}#airanksuite-root .ars-desk-eng.is-cold{color:var(--ars-ink-3);text-decoration:line-through}#airanksuite-root .ars-desk-jobs li.is-on .ars-desk-eng:before{opacity:1;box-shadow:0 0 6px}#airanksuite-root .ars-floor-now{background:var(--ars-surface-2);border:1px solid var(--ars-surface-3);border-radius:6px;align-items:center;gap:10px;min-height:38px;margin-top:14px;padding:9px 12px;display:flex}#airanksuite-root .ars-floor-now.is-on{border-color:var(--ars-brand);background:var(--ars-brand-tonal)}#airanksuite-root .ars-floor-now-mark{background:var(--ars-accent);border-radius:50%;flex:none;width:8px;height:8px;animation:1.1s ease-in-out infinite ars-pulse}#airanksuite-root .ars-floor-now-text{color:var(--ars-ink);text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:12.5px;overflow:hidden}#airanksuite-root .ars-floor-now-text.is-idle{color:var(--ars-ink-3)}#airanksuite-root .ars-floor-now-time{color:var(--ars-brand-tonal-ink);flex:none;margin-inline-start:auto;font-size:11.5px}#airanksuite-root .ars-floor.is-still .ars-floor-bus-flow,#airanksuite-root .ars-floor.is-still .ars-eng-dot,#airanksuite-root .ars-floor.is-still .ars-floor-now-mark{animation:none}#airanksuite-root .ars-routing{border-top:1px solid var(--ars-border);padding:14px 16px 16px}#airanksuite-root .ars-routing-head{flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:12px;display:flex}#airanksuite-root .ars-routing-head p{max-width:62ch}#airanksuite-root .ars-routing-grid{grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:8px;display:grid}#airanksuite-root .ars-routing-row{border:1px solid var(--ars-border);background:var(--ars-surface);border-radius:6px;grid-template-columns:minmax(0,1fr) 150px;align-items:center;gap:12px;padding:9px 11px;display:grid}#airanksuite-root .ars-routing-row select{width:100%}#airanksuite-root .ars-trait{letter-spacing:.02em;background:var(--ars-surface-3);color:var(--ars-ink-3);border-radius:3px;padding:1px 6px;font-size:10px;font-weight:600}@media (width<=782px){#airanksuite-root .ars-routing-row{grid-template-columns:minmax(0,1fr)}#airanksuite-root .ars-snip-row-main{grid-template-columns:14px auto minmax(0,1fr) auto;row-gap:4px}#airanksuite-root .ars-snip-meta:nth-of-type(n+2){display:none}}#airanksuite-root .ars-sheet-rail>*{min-width:0;max-width:100%}#airanksuite-root .ars-sheet-rail :where(a,code,span,div,p){overflow-wrap:anywhere}#airanksuite-root .ars-sheet-rail .grid,#airanksuite-root .ars-sheet-rail{grid-template-columns:minmax(0,1fr)}#airanksuite-root .ars-sheet-rail .grid>*{min-width:0;max-width:100%}#airanksuite-root .ars-sheet-rail .ars-frame{box-sizing:border-box;width:100%;max-width:100%!important}#airanksuite-root .ars-sheet-rail .ars-seg-item{padding:6px 9px;font-size:12px}#airanksuite-root .ars-typebar{border:1px solid var(--ars-border);background:var(--ars-surface);box-shadow:var(--ars-e1);border-radius:8px;flex-wrap:wrap;align-items:stretch;gap:2px;padding:3px;display:flex}#airanksuite-root .ars-typetab{cursor:pointer;font:inherit;color:var(--ars-ink-2);background:0 0;border:0;border-radius:5px;align-items:baseline;gap:7px;padding:7px 12px;display:flex;position:relative}#airanksuite-root .ars-typetab:hover{background:var(--ars-surface-2);color:var(--ars-ink)}#airanksuite-root .ars-typetab.is-active{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink)}#airanksuite-root .ars-typetab-label{font-size:12.5px;font-weight:600}#airanksuite-root .ars-typetab-count{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-typetab.is-active .ars-typetab-count{color:inherit;opacity:.72}#airanksuite-root .ars-typetab-dot{background:var(--ars-warning);top:5px;border-radius:50%;width:5px;height:5px;position:absolute;inset-inline-end:6px}#airanksuite-root .ars-typehealth{border:1px solid var(--ars-border);background:var(--ars-surface);box-shadow:var(--ars-e1);border-radius:8px;flex-wrap:wrap;align-items:center;gap:24px;padding:13px 16px;display:flex}#airanksuite-root .ars-typehealth-main{flex:1;gap:5px;min-width:240px;display:grid}#airanksuite-root .ars-typehealth-bar{background:var(--ars-surface-3);border-radius:3px;max-width:420px;height:6px;overflow:hidden}#airanksuite-root .ars-typehealth-bar span{background:var(--ars-grad);height:100%;transition:width .38s cubic-bezier(.2,0,0,1);display:block}#airanksuite-root .ars-typehealth-figs{flex-wrap:wrap;gap:6px;display:flex}#airanksuite-root .ars-healthfig{border:1px solid var(--ars-border);background:var(--ars-surface-2);cursor:pointer;font:inherit;text-align:start;border-radius:6px;gap:1px;min-width:84px;padding:7px 11px;display:grid}#airanksuite-root .ars-healthfig:hover:not(:disabled){border-color:var(--ars-brand)}#airanksuite-root .ars-healthfig:disabled{cursor:default;opacity:.55}#airanksuite-root .ars-healthfig b{font-size:16px;font-weight:700;line-height:1.1}#airanksuite-root .ars-healthfig span{color:var(--ars-ink-3);font-size:10.5px}#airanksuite-root .ars-healthfig.is-bad b{color:var(--ars-serious)}#airanksuite-root .ars-healthfig.is-warn b{color:var(--ars-warning)}#airanksuite-root .ars-report-head{border:1px solid var(--ars-border);background:var(--ars-surface);border-radius:8px;align-items:flex-start;gap:16px;padding:14px 16px;display:flex}#airanksuite-root .ars-report-head.is-green{border-inline-start:3px solid var(--ars-good)}#airanksuite-root .ars-report-head.is-amber{border-inline-start:3px solid var(--ars-warning)}#airanksuite-root .ars-report-head.is-red{border-inline-start:3px solid var(--ars-serious)}#airanksuite-root .ars-report-score{flex:none;align-items:baseline;gap:1px;display:flex}#airanksuite-root .ars-report-score b{letter-spacing:-.02em;font-size:34px;font-weight:700;line-height:1}#airanksuite-root .ars-report-score span{color:var(--ars-ink-3);font-size:14px}#airanksuite-root .ars-report-bar{background:var(--ars-surface-3);border-radius:3px;max-width:420px;height:6px;overflow:hidden}#airanksuite-root .ars-report-bar span{background:var(--ars-grad);height:100%;transition:width .42s cubic-bezier(.2,0,0,1);display:block}#airanksuite-root .ars-report-group{border:1px solid var(--ars-border);background:var(--ars-surface);border-radius:6px;overflow:hidden}#airanksuite-root .ars-report-group-head{background:var(--ars-surface-2);border-bottom:1px solid var(--ars-border);justify-content:space-between;align-items:flex-start;gap:12px;padding:9px 12px;display:flex}#airanksuite-root .ars-report-tally{font-variant-numeric:tabular-nums;color:var(--ars-good);font-size:11.5px;font-weight:700}#airanksuite-root .ars-report-tally.is-bad{color:var(--ars-serious)}#airanksuite-root .ars-report-row{align-items:flex-start;gap:10px;padding:9px 12px;display:flex}#airanksuite-root .ars-report-row+.ars-report-row{border-top:1px solid var(--ars-border)}#airanksuite-root .ars-report-row.is-pass{opacity:.72}#airanksuite-root .ars-report-mark{background:var(--ars-c-red);width:18px;height:18px;color:var(--ars-c-red-ink);border-radius:50%;flex:none;place-items:center;margin-top:1px;font-size:10px;font-weight:700;display:grid}#airanksuite-root .ars-report-row.is-pass .ars-report-mark{background:var(--ars-c-green);color:var(--ars-c-green-ink)}#airanksuite-root .ars-report-weight{letter-spacing:1px;color:var(--ars-ink-3);font-size:7px}#airanksuite-root .ars-report-value{background:var(--ars-surface-2);max-width:100%;color:var(--ars-ink-2);text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom;border-radius:3px;margin-top:4px;padding:1px 6px;font-size:11px;display:inline-block;overflow:hidden}#airanksuite-root .ars-band-notes{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px;margin-top:14px;display:grid}#airanksuite-root .ars-band-note{align-items:flex-start;gap:8px;display:flex}#airanksuite-root .ars-band-swatch{border-radius:3px;flex:none;width:10px;height:10px;margin-top:3px}#airanksuite-root .ars-areamap{display:grid}#airanksuite-root .ars-arearow{border:0;border-top:1px solid var(--ars-border);width:100%;font:inherit;text-align:start;cursor:pointer;background:0 0;grid-template-columns:52px 200px minmax(80px,1fr) 200px 16px;align-items:center;gap:14px;padding:10px 16px;display:grid}#airanksuite-root .ars-arearow:first-child{border-top:0}#airanksuite-root .ars-arearow:hover:not(:disabled){background:var(--ars-surface-2)}#airanksuite-root .ars-arearow:disabled{cursor:default;opacity:.6}#airanksuite-root .ars-arearow.is-open{background:var(--ars-brand-tonal)}#airanksuite-root .ars-area-score{text-align:end;letter-spacing:-.02em;font-size:22px;font-weight:700;line-height:1}#airanksuite-root .ars-arearow.is-good .ars-area-score{color:var(--ars-good)}#airanksuite-root .ars-arearow.is-warn .ars-area-score{color:var(--ars-warning)}#airanksuite-root .ars-arearow.is-bad .ars-area-score{color:var(--ars-serious)}#airanksuite-root .ars-arearow.is-none .ars-area-score{color:var(--ars-ink-3)}#airanksuite-root .ars-area-label{min-width:0;display:grid}#airanksuite-root .ars-area-label b{font-size:13px;font-weight:600}#airanksuite-root .ars-area-label span{color:var(--ars-ink-3);text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;overflow:hidden}#airanksuite-root .ars-area-bar{background:var(--ars-surface-3);border-radius:5px;height:10px;display:flex;overflow:hidden}#airanksuite-root .ars-area-bar i{flex-basis:0;display:block}#airanksuite-root .ars-area-bar i.is-bad{background:#d1495b}#airanksuite-root .ars-area-bar i.is-warn{background:#e2952b}#airanksuite-root .ars-area-bar i.is-good{background:#2b7a4b}#airanksuite-root .ars-area-bar i.is-none{background:var(--ars-surface-3)}#airanksuite-root .ars-area-counts{color:var(--ars-ink-3);text-align:end;font-size:11.5px}#airanksuite-root .ars-area-counts b{color:var(--ars-ink);font-variant-numeric:tabular-nums}#airanksuite-root .ars-area-caret{color:var(--ars-ink-3);font-size:10px}@media (width<=960px){#airanksuite-root .ars-arearow{grid-template-columns:44px minmax(0,1fr) 16px;row-gap:6px}#airanksuite-root .ars-area-bar,#airanksuite-root .ars-area-counts{text-align:start;grid-column:2/3}}#airanksuite-root .ars-rr-stat{border:1px solid var(--ars-border);background:var(--ars-surface);box-shadow:var(--ars-e1);border-radius:8px;gap:1px;padding:12px 14px;display:grid}#airanksuite-root .ars-rr-stat b{font-variant-numeric:tabular-nums;font-size:24px;font-weight:700;line-height:1.05}#airanksuite-root .ars-rr-stat span{color:var(--ars-ink-3);font-size:11.5px}#airanksuite-root .ars-rr-stat.is-bad b{color:var(--ars-serious)}#airanksuite-root .ars-rr-row+.ars-rr-row{border-top:1px solid var(--ars-border)}#airanksuite-root .ars-rr-main{text-align:start;width:100%;font:inherit;cursor:pointer;background:0 0;border:0;grid-template-columns:14px minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:11px 14px;display:grid}#airanksuite-root .ars-rr-main:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-rr-caret{color:var(--ars-ink-3);font-size:10px}#airanksuite-root .ars-rr-about{color:var(--ars-ink-3);margin-top:2px;font-size:11.5px;display:block}#airanksuite-root .ars-rr-count{color:var(--ars-ink-2);white-space:nowrap;font-size:12px}#airanksuite-root .ars-rr-body{background:var(--ars-surface-2);border-top:1px dashed var(--ars-border);gap:14px;padding:4px 14px 16px 40px;display:grid}#airanksuite-root .ars-rr-props{grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:6px;display:grid}#airanksuite-root .ars-rr-prop{border:1px solid var(--ars-border);border-inline-start:3px solid var(--ars-ink-3);background:var(--ars-surface);border-radius:5px;gap:1px;padding:7px 10px;display:grid}#airanksuite-root .ars-rr-prop.is-required{border-inline-start-color:var(--ars-serious)}#airanksuite-root .ars-rr-prop code{color:var(--ars-ink);background:0 0;justify-self:start;padding:0;font-size:11.5px;font-weight:600}#airanksuite-root .ars-rr-prop span{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-rr-prop em{color:var(--ars-ink-2);margin-top:3px;font-size:11.5px;font-style:normal}#airanksuite-root .ars-rr-sample{flex-wrap:wrap;align-items:baseline;gap:10px;display:flex}#airanksuite-root .ars-crawl-region{background:var(--ars-surface-2);border-top:1px solid var(--ars-border);border-bottom:1px solid var(--ars-border);flex-wrap:wrap;align-items:baseline;gap:10px;padding:9px 14px;display:flex}#airanksuite-root .ars-crawl-region b{letter-spacing:.05em;text-transform:uppercase;font-size:11px;font-weight:700}#airanksuite-root .ars-crawl-region span{color:var(--ars-ink-3);min-width:0;font-size:11.5px}#airanksuite-root .ars-crawl-row{grid-template-columns:minmax(0,1fr) 100px 120px;align-items:center;gap:14px;padding:10px 14px;display:grid}#airanksuite-root .ars-crawl-row+.ars-crawl-row{border-top:1px solid var(--ars-border)}#airanksuite-root .ars-crawl-row.is-defiant{background:var(--ars-c-red)}#airanksuite-root .ars-crawl-meta{color:var(--ars-ink-3);margin-top:3px;font-size:11.5px}#airanksuite-root .ars-crawl-meta b{color:var(--ars-ink);font-weight:600}#airanksuite-root .ars-crawl-spark{opacity:.85;min-width:0}#airanksuite-root .ars-crawl-switch{justify-content:flex-end;align-items:center;gap:8px;display:flex}@media (width<=782px){#airanksuite-root .ars-crawl-row{grid-template-columns:minmax(0,1fr) auto}#airanksuite-root .ars-crawl-spark{display:none}}#airanksuite-root .ars-nav-toggle{border:1px solid var(--ars-border);background:var(--ars-surface);cursor:pointer;border-radius:8px;flex:none;width:38px;height:38px;margin-inline-start:-6px;display:none;position:relative}#airanksuite-root .ars-nav-toggle span{background:var(--ars-ink);height:2px;box-shadow:0 -6px 0 var(--ars-ink), 0 6px 0 var(--ars-ink);border-radius:1px;position:absolute;inset:50% 10px auto}#airanksuite-root .ars-nav-scrim{z-index:98;cursor:pointer;background:#10121a6b;border:0;display:none;position:fixed;inset:0}@media (width<=782px){#airanksuite-root .ars-nav-toggle{display:block}#airanksuite-root .ars-rail{z-index:99;overscroll-behavior:contain;background:var(--ars-surface);border-inline-end:1px solid var(--ars-border);visibility:hidden;top:32px;bottom:0;width:min(300px,86vw);transition:transform .24s cubic-bezier(.2,0,0,1),visibility .24s;position:fixed;inset-inline-start:0;overflow-y:auto;transform:translate(-102%);box-shadow:0 0 40px #10121a2e}#airanksuite-root .ars-app.is-nav-open .ars-rail{visibility:visible;transform:none}#airanksuite-root .ars-app.is-nav-open .ars-nav-scrim{display:block}#airanksuite-root .ars-rail.is-mini{width:min(300px,86vw)}#airanksuite-root .ars-rail.is-mini .ars-nav-item span,#airanksuite-root .ars-rail.is-mini .ars-nav-group{display:revert}#airanksuite-root .ars-header,#airanksuite-root .ars-page,#airanksuite-root .ars-main>*{padding-inline:12px}#airanksuite-root .ars-nav-item{min-height:42px}#airanksuite-root button,#airanksuite-root .ars-chip,#airanksuite-root .ars-seg-item{min-height:36px}#airanksuite-root input,#airanksuite-root select,#airanksuite-root textarea{min-height:40px;font-size:16px}#airanksuite-root .ars-page .grid.sm\:grid-cols-2,#airanksuite-root .ars-page .lg\:grid-cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}#airanksuite-root .ars-table-wrap{-webkit-overflow-scrolling:touch;overflow-x:auto}#airanksuite-root .ars-table-wrap .ars-table{min-width:560px}#airanksuite-root .ars-app,#airanksuite-root .ars-main,#airanksuite-root .ars-card,#airanksuite-root .ars-page{min-width:0;max-width:100%}#airanksuite-root .ars-typebar{scrollbar-width:none;flex-wrap:nowrap;overflow-x:auto}#airanksuite-root .ars-typebar::-webkit-scrollbar{display:none}#airanksuite-root .ars-drawer,#airanksuite-root .ars-drawer.is-wide,#airanksuite-root .ars-drawer.is-max{width:100vw;inset-inline-start:0}#airanksuite-root .ars-sheet-tabs{scrollbar-width:none;overflow-x:auto}#airanksuite-root .ars-sheet-tabs::-webkit-scrollbar{display:none}#airanksuite-root .ars-sheet-foot{flex-wrap:wrap;gap:8px}#airanksuite-root .ars-card-head{flex-wrap:wrap;row-gap:8px}#airanksuite-root .ars-typehealth,#airanksuite-root .ars-snip-head,#airanksuite-root .ars-head-strip{gap:12px}#airanksuite-root .ars-snip-actions{width:100%;margin-inline-start:0}#airanksuite-root .ars-lib-grid,#airanksuite-root .ars-routing-grid,#airanksuite-root .ars-rr-props{grid-template-columns:minmax(0,1fr)}#airanksuite-root .ars-rr-main{grid-template-columns:14px minmax(0,1fr);row-gap:6px}#airanksuite-root .ars-rr-count,#airanksuite-root .ars-rr-body{grid-column:1/-1}#airanksuite-root .ars-rr-body{padding-inline-start:14px}#airanksuite-root .ars-floor-engines,#airanksuite-root .ars-floor-desks{grid-template-columns:minmax(0,1fr)}}@media (width<=600px){#airanksuite-root .ars-page .grid.sm\:grid-cols-2,#airanksuite-root .ars-page .lg\:grid-cols-4,#airanksuite-root .ars-page .sm\:grid-cols-3,#airanksuite-root .ars-page .lg\:grid-cols-2{grid-template-columns:minmax(0,1fr)}#airanksuite-root .ars-page-title{font-size:17px}#airanksuite-root .ars-typehealth-figs{width:100%}#airanksuite-root .ars-healthfig{flex:1}}#airanksuite-root .ars-auth{justify-content:flex-end;align-items:center;gap:7px;min-width:84px;display:inline-flex}#airanksuite-root .ars-auth-bar{background:var(--ars-surface-3);border-radius:3px;width:46px;height:6px;display:block;overflow:hidden}#airanksuite-root .ars-auth-bar i{background:var(--ars-grad);height:100%;display:block}#airanksuite-root .ars-auth b{text-align:end;min-width:22px;font-size:11.5px}#airanksuite-root .ars-circuits{grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;margin-bottom:16px;display:grid}#airanksuite-root .ars-circuit{border:1px solid var(--ars-surface-3);text-align:start;font:inherit;color:inherit;cursor:pointer;background:#16161e05;border-radius:7px;gap:1px;padding:9px 11px 10px;transition:border-color .2s,background .2s;display:grid;position:relative}#airanksuite-root .ars-circuit:hover{border-color:var(--ars-btn-border-hover);background:var(--ars-surface-2)}#airanksuite-root .ars-circuit.is-core{border-color:#cabdf7}#airanksuite-root .ars-circuit-led{background:var(--ars-btn-border-hover);top:10px;border-radius:50%;width:7px;height:7px;position:absolute;inset-inline-end:10px}#airanksuite-root .ars-circuit.is-live .ars-circuit-led{background:#1fa06a;box-shadow:0 0 0 3px #1fa06a26,0 0 10px #46d07f80}#airanksuite-root .ars-circuit.is-core.is-live .ars-circuit-led{background:var(--ars-brand-2);box-shadow:0 0 0 3px #8b5cf033,0 0 12px #8b5cf08c}#airanksuite-root .ars-circuit-name{color:var(--ars-ink);padding-inline-end:14px;font-size:12px;font-weight:600}#airanksuite-root .ars-circuit.is-live .ars-circuit-name{color:var(--ars-ink)}#airanksuite-root .ars-circuit-detail{color:var(--ars-ink-3);text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;overflow:hidden}#airanksuite-root .ars-floor-body{grid-template-columns:minmax(0,1fr) 258px;align-items:start;gap:12px;display:grid}#airanksuite-root .ars-clock{border:1px solid var(--ars-surface-3);background:#16161e05;border-radius:7px;padding:10px 12px 12px}#airanksuite-root .ars-clock-head{justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;display:flex}#airanksuite-root .ars-clock-title{letter-spacing:.05em;text-transform:uppercase;color:var(--ars-ink-2);font-size:11px;font-weight:700}#airanksuite-root .ars-clock-flag{background:var(--ars-surface-2);color:var(--ars-ink-3);border-radius:3px;padding:1px 6px;font-size:10px;font-weight:600}#airanksuite-root .ars-clock-flag.is-bad{color:var(--ars-serious);background:#f2545b2e}#airanksuite-root .ars-clock-flag.is-warn{color:var(--ars-accent);background:#ffc23d29}#airanksuite-root .ars-clock-gears{gap:7px;margin:0;padding:0;list-style:none;display:grid}#airanksuite-root .ars-gear{grid-template-columns:14px minmax(0,1fr);align-items:start;gap:9px;display:grid}#airanksuite-root .ars-gear-wheel{border:2px dotted var(--ars-btn-border-hover);border-radius:50%;width:12px;height:12px;margin-top:2px}#airanksuite-root .ars-gear-wheel.is-turning{border-color:var(--ars-brand);animation:6s linear infinite ars-gear}@keyframes ars-gear{to{transform:rotate(360deg)}}#airanksuite-root .ars-gear.is-late .ars-gear-wheel{border-style:solid;border-color:var(--ars-serious);animation:none}#airanksuite-root .ars-gear.is-off .ars-gear-wheel{border-color:var(--ars-border)}#airanksuite-root .ars-gear-name{color:var(--ars-ink);text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;font-weight:600;display:block;overflow:hidden}#airanksuite-root .ars-gear.is-off .ars-gear-name{color:var(--ars-ink-3)}#airanksuite-root .ars-gear-when{color:var(--ars-ink-3);font-size:10.5px;display:block}#airanksuite-root .ars-gear.is-late .ars-gear-when{color:var(--ars-serious)}#airanksuite-root .ars-clock-note{color:var(--ars-ink-3);margin:10px 0 0;font-size:10.5px;line-height:1.55}#airanksuite-root .ars-floor.is-still .ars-gear-wheel{animation:none}@media (width<=1100px){#airanksuite-root .ars-floor-body{grid-template-columns:minmax(0,1fr)}}#airanksuite-root .ars-verdict{border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);border:1px solid var(--ars-line);grid-template-columns:4px minmax(0,1fr) auto;align-items:center;gap:0 16px;padding:16px 18px 16px 0;display:grid;overflow:hidden}#airanksuite-root .ars-verdict-mark{background:var(--ars-ink-3);border-radius:4px 0 0 4px;align-self:stretch}#airanksuite-root .ars-verdict.is-good .ars-verdict-mark{background:var(--ars-c-green-ink)}#airanksuite-root .ars-verdict.is-warning .ars-verdict-mark{background:var(--ars-c-amber-ink,var(--ars-accent))}#airanksuite-root .ars-verdict.is-bad .ars-verdict-mark{background:var(--ars-c-red-ink)}#airanksuite-root .ars-verdict.is-neutral .ars-verdict-mark{background:var(--ars-brand)}#airanksuite-root .ars-verdict-body{min-width:0;padding-inline-start:18px}#airanksuite-root .ars-verdict-text{letter-spacing:-.012em;color:var(--ars-ink);margin:0;font-size:16px;font-weight:640;line-height:1.35}#airanksuite-root .ars-verdict-why{color:var(--ars-ink-2);max-width:92ch;margin:5px 0 0;font-size:12.5px;line-height:1.55}#airanksuite-root .ars-verdict-action{flex-shrink:0}#airanksuite-root .ars-empty{text-align:start;align-items:center;gap:14px;padding:26px 22px;display:flex}#airanksuite-root .ars-empty.is-compact{padding:16px 18px}#airanksuite-root .ars-empty-icon{background:var(--ars-surface-2);width:36px;height:36px;color:var(--ars-ink-3);border-radius:10px;flex:0 0 36px;place-items:center;display:grid}#airanksuite-root .ars-empty-text{flex:1;min-width:0}#airanksuite-root .ars-empty-title{color:var(--ars-ink);font-size:13px;font-weight:620}#airanksuite-root .ars-empty-body{color:var(--ars-ink-2);max-width:78ch;margin:3px 0 0;font-size:12.5px;line-height:1.55}#airanksuite-root .ars-board{margin:0;padding:0;list-style:none}#airanksuite-root .ars-board-row+.ars-board-row{border-top:1px solid var(--ars-line-soft,var(--ars-line))}#airanksuite-root .ars-board-hit{text-align:start;width:100%;font:inherit;color:inherit;cursor:default;background:0 0;border:0;grid-template-columns:minmax(0,34ch) minmax(70px,1fr) auto;align-items:center;gap:14px;padding:9px 4px;display:grid}#airanksuite-root .ars-board-row.is-clickable .ars-board-hit{cursor:pointer}#airanksuite-root .ars-board-row.is-clickable:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-board-label{color:var(--ars-ink);text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;overflow:hidden}#airanksuite-root .ars-board-track{background:var(--ars-surface-2);border-radius:999px;height:8px;overflow:hidden}#airanksuite-root .ars-board-fill{background:var(--ars-brand);border-radius:999px;height:100%;transition:width .24s;display:block}#airanksuite-root .ars-board-value{color:var(--ars-ink);text-align:end;min-width:8ch;font-size:12.5px;font-weight:620}#airanksuite-root .ars-board-unit{color:var(--ars-ink-3);margin-inline-start:4px;font-weight:500}#airanksuite-root .ars-panel{border:1px solid var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);overflow:hidden}#airanksuite-root .ars-panel-head{width:100%;font:inherit;color:var(--ars-ink);cursor:pointer;text-align:start;background:0 0;border:0;align-items:center;gap:10px;padding:11px 16px;display:flex}#airanksuite-root .ars-panel-head:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-panel-title{font-size:12.5px;font-weight:620}#airanksuite-root .ars-panel-note{color:var(--ars-ink-3);margin-inline-start:auto;font-size:11.5px}#airanksuite-root .ars-panel-caret{width:14px;height:14px;color:var(--ars-ink-3);transition:transform .16s}#airanksuite-root .ars-panel.is-open .ars-panel-caret{transform:rotate(90deg)}#airanksuite-root .ars-panel-body{border-top:1px solid var(--ars-line-soft,var(--ars-line));padding:4px 16px 16px}@media (width<=820px){#airanksuite-root .ars-verdict{grid-template-columns:4px minmax(0,1fr);row-gap:12px;padding-inline-end:16px}#airanksuite-root .ars-verdict-action{grid-column:2;padding-inline-start:18px}#airanksuite-root .ars-board-hit{grid-template-columns:minmax(0,1fr) auto}#airanksuite-root .ars-board-track{display:none}}#airanksuite-root .ars-metricstrip{border-bottom:1px solid var(--ars-line);grid-template-columns:repeat(4,minmax(0,1fr));display:grid}#airanksuite-root .ars-metric{border:0;border-inline-start:1px solid var(--ars-line);font:inherit;text-align:start;cursor:pointer;background:0 0;border-bottom:2px solid #0000;justify-items:start;gap:2px;padding:14px 16px 13px;transition:background .14s,border-color .14s;display:grid}#airanksuite-root .ars-metric:first-child{border-inline-start:0}#airanksuite-root .ars-metric:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-metric.is-active{border-bottom-color:var(--ars-brand);background:var(--ars-surface-2)}#airanksuite-root .ars-metric-label{letter-spacing:.06em;text-transform:uppercase;color:var(--ars-ink-3);font-size:10.5px;font-weight:640}#airanksuite-root .ars-metric-value{letter-spacing:-.02em;color:var(--ars-ink);font-size:26px;font-weight:660;line-height:1.1}#airanksuite-root .ars-metric-suffix{color:var(--ars-ink-3);margin-inline-start:2px;font-size:14px;font-weight:560}#airanksuite-root .ars-cov{background:var(--ars-surface-2);border-radius:999px;width:68px;height:6px;display:block;overflow:hidden}#airanksuite-root .ars-cov-fill{border-radius:999px;height:100%;display:block}#airanksuite-root .ars-mini{border-radius:var(--ars-r-md,10px);background:var(--ars-surface-2);gap:1px;padding:10px 12px;display:grid}#airanksuite-root .ars-mini-label{letter-spacing:.05em;text-transform:uppercase;color:var(--ars-ink-3);font-size:10.5px;font-weight:640}#airanksuite-root .ars-mini-value{color:var(--ars-ink);font-size:20px;font-weight:660;line-height:1.15}#airanksuite-root .ars-mini-sub{color:var(--ars-ink-3);font-size:11px}@media (width<=900px){#airanksuite-root .ars-metricstrip{grid-template-columns:repeat(2,minmax(0,1fr))}#airanksuite-root .ars-metric:nth-child(3){border-inline-start:0}#airanksuite-root .ars-metric:nth-child(-n+2){border-bottom:1px solid var(--ars-line)}}#airanksuite-root .ars-issue{border:1px solid var(--ars-line);border-inline-start:3px solid var(--ars-ink-3);border-radius:var(--ars-r-md,10px);background:var(--ars-surface);overflow:hidden}#airanksuite-root .ars-issue.is-critical{border-inline-start-color:var(--ars-c-red-ink)}#airanksuite-root .ars-issue.is-warning{border-inline-start-color:var(--ars-accent)}#airanksuite-root .ars-issue.is-notice{border-inline-start-color:var(--ars-brand)}#airanksuite-root .ars-issue-head{width:100%;font:inherit;text-align:start;cursor:pointer;color:var(--ars-ink);background:0 0;border:0;grid-template-columns:auto minmax(0,1fr) auto 16px;align-items:center;gap:10px;padding:10px 14px;display:grid}#airanksuite-root .ars-issue-head:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-issue-sev{letter-spacing:.07em;text-transform:uppercase;background:var(--ars-surface-2);color:var(--ars-ink-2);border-radius:5px;padding:3px 7px;font-size:9.5px;font-weight:700}#airanksuite-root .ars-issue.is-critical .ars-issue-sev{background:var(--ars-c-red);color:var(--ars-c-red-ink)}#airanksuite-root .ars-issue.is-warning .ars-issue-sev{background:var(--ars-c-amber,#fdf1de);color:var(--ars-c-amber-ink)}#airanksuite-root .ars-issue.is-notice .ars-issue-sev{background:var(--ars-c-blue,var(--ars-brand-tonal));color:var(--ars-brand)}#airanksuite-root .ars-issue-label{text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;font-weight:600;overflow:hidden}#airanksuite-root .ars-issue-count{color:var(--ars-ink-3);font-size:11.5px}#airanksuite-root .ars-issue-caret{width:14px;height:14px;color:var(--ars-ink-3);transition:transform .16s}#airanksuite-root .ars-issue.is-open .ars-issue-caret{transform:rotate(90deg)}#airanksuite-root .ars-issue-body{padding:0 14px 12px}#airanksuite-root .ars-issue-fix{color:var(--ars-ink-2);max-width:90ch;margin:0 0 8px;font-size:12px;line-height:1.55}#airanksuite-root .ars-issue-pages{margin:0;padding:0;list-style:none}#airanksuite-root .ars-issue-pages li{border-top:1px solid var(--ars-line-soft,var(--ars-line));grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:6px 0;font-size:12px;display:grid}#airanksuite-root .ars-issue-page{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#airanksuite-root .ars-issue-detail{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-issue-links{align-items:center;gap:10px;font-size:11.5px;display:inline-flex}@media (width<=820px){#airanksuite-root .ars-issue-pages li{grid-template-columns:minmax(0,1fr)}}#airanksuite-root .ars-setup-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:10px;display:grid}#airanksuite-root .ars-setup-card{border:1px solid var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);text-align:start;font:inherit;color:inherit;cursor:pointer;align-items:flex-start;gap:12px;padding:14px 15px;transition:border-color .14s,background .14s,transform .14s;display:flex}#airanksuite-root .ars-setup-card:hover{border-color:var(--ars-brand);background:var(--ars-surface-2);transform:translateY(-1px)}#airanksuite-root .ars-setup-icon{background:var(--ars-surface-2);width:34px;height:34px;color:var(--ars-brand);border-radius:9px;flex:0 0 34px;place-items:center;display:grid}#airanksuite-root .ars-setup-card:hover .ars-setup-icon{background:var(--ars-c-blue,var(--ars-brand-tonal))}#airanksuite-root .ars-setup-text{gap:2px;min-width:0;display:grid}#airanksuite-root .ars-setup-name{color:var(--ars-ink);font-size:13px;font-weight:620}#airanksuite-root .ars-setup-what{color:var(--ars-ink-2);font-size:11.5px;line-height:1.5}#airanksuite-root .ars-setup-hero{border-radius:var(--ars-r-xl,18px);border:1px solid var(--ars-line);background:var(--ars-surface);grid-template-columns:auto minmax(0,1fr);align-items:center;gap:22px;padding:20px 22px;display:grid}@media (width<=720px){#airanksuite-root .ars-setup-hero{grid-template-columns:1fr}}#airanksuite-root .ars-setup-hero-ring{place-items:center;display:grid}#airanksuite-root .ars-setup-group{gap:2px;padding-inline-start:2px;display:grid}#airanksuite-root .ars-setup-card{align-items:center;position:relative}#airanksuite-root .ars-setup-name{flex-wrap:wrap;align-items:center;gap:8px;display:flex}#airanksuite-root .ars-setup-status{letter-spacing:.02em;background:var(--ars-surface-3);color:var(--ars-ink-2);border-radius:999px;padding:1px 8px;font-size:10.5px;font-weight:700;display:inline-block}#airanksuite-root .ars-setup-status.is-good{background:var(--ars-good-tonal);color:var(--ars-good)}#airanksuite-root .ars-setup-status.is-warning{background:var(--ars-warning-tonal,var(--ars-surface-3));color:var(--ars-warning,var(--ars-ink-2))}#airanksuite-root .ars-setup-status.is-serious{background:var(--ars-serious-tonal);color:var(--ars-serious)}#airanksuite-root .ars-setup-card.is-serious{border-color:var(--ars-serious)}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-setup-card.is-serious{border-color:color-mix(in srgb, var(--ars-serious) 40%, var(--ars-line))}}#airanksuite-root .ars-setup-go{color:var(--ars-ink-3);margin-inline-start:auto;font-size:18px;line-height:1;transition:transform .14s,color .14s}#airanksuite-root .ars-setup-card:hover .ars-setup-go{color:var(--ars-brand);transform:translate(3px)}[dir=rtl] #airanksuite-root .ars-setup-go{transform:scaleX(-1)}[dir=rtl] #airanksuite-root .ars-setup-card:hover .ars-setup-go{transform:scaleX(-1)translate(3px)}#airanksuite-root .ars-nav-item.is-setup{color:var(--ars-ink-2)}#airanksuite-root .ars-nav-item.is-back{color:var(--ars-brand);font-weight:600}#airanksuite-root .ars-greeting{letter-spacing:.02em;color:var(--ars-ink-3);margin:4px 0 0;font-size:12px;font-weight:560}#airanksuite-root .ars-scorerow{width:100%;font:inherit;color:inherit;text-align:start;cursor:pointer;background:0 0;border:0;border-radius:8px;grid-template-columns:40px minmax(0,1fr) 220px auto 14px;align-items:center;gap:14px;padding:10px 8px;display:grid}#airanksuite-root .ars-scorerow.is-static{cursor:default;grid-template-columns:40px minmax(0,1fr) 220px auto}#airanksuite-root .ars-scorerow:not(.is-static):hover{background:var(--ars-surface-2)}#airanksuite-root .ars-scorerow+.ars-scorerow{border-top:1px solid var(--ars-line-soft,var(--ars-line))}#airanksuite-root .ars-scorerow-score{letter-spacing:-.01em;text-align:end;font-variant-numeric:tabular-nums;font-size:16px;font-weight:660;line-height:1}#airanksuite-root .ars-scorerow-score.is-good{color:var(--ars-c-green-ink)}#airanksuite-root .ars-scorerow-score.is-mid{color:var(--ars-warning-ink)}#airanksuite-root .ars-scorerow-score.is-bad{color:var(--ars-c-red-ink)}#airanksuite-root .ars-scorerow-text{gap:1px;min-width:0;display:grid}#airanksuite-root .ars-scorerow-label{color:var(--ars-ink);text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;font-weight:600;overflow:hidden}#airanksuite-root .ars-scorerow-sub{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-scorerow-bar{background:var(--ars-surface-2);border-radius:999px;height:6px;display:flex;overflow:hidden}#airanksuite-root .ars-scorerow-bar>span{height:100%;display:block}#airanksuite-root .ars-scorerow-bar>span+span{box-shadow:inset 1px 0 0 var(--ars-surface)}#airanksuite-root .ars-scorerow-reach{color:var(--ars-ink-2);white-space:nowrap;font-size:11.5px}#airanksuite-root .ars-scorerow-caret{width:14px;height:14px;color:var(--ars-ink-3)}@media (width<=860px){#airanksuite-root .ars-scorerow,#airanksuite-root .ars-scorerow.is-static{grid-template-columns:40px minmax(0,1fr) auto}#airanksuite-root .ars-scorerow-bar,#airanksuite-root .ars-scorerow-caret{display:none}}#airanksuite-root .ars-scorerow.is-wide{grid-template-columns:40px minmax(0,1fr) 220px auto 14px}#airanksuite-root .ars-scorerow.is-wide.is-static{grid-template-columns:40px minmax(0,1fr) 220px auto}#airanksuite-root .ars-scorerow.is-wide .ars-scorerow-label{white-space:normal;overflow:visible}#airanksuite-root .ars-scorerow.is-wide .ars-scorerow-sub{white-space:normal}#airanksuite-root .ars-metrics{grid-template-columns:repeat(var(--ars-metrics-cols,3), minmax(0, 1fr));border:1px solid var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);display:grid;overflow:hidden}#airanksuite-root .ars-metrics-cell{border-inline-end:1px solid var(--ars-line);border-bottom:1px solid var(--ars-line);font:inherit;color:inherit;text-align:start;background:0 0;align-content:start;gap:3px;padding:13px 16px 15px;display:grid;position:relative}#airanksuite-root .ars-metrics-cell.is-clickable{cursor:pointer}#airanksuite-root .ars-metrics-cell.is-clickable:hover,#airanksuite-root .ars-metrics-cell.is-active{background:var(--ars-surface-2)}#airanksuite-root .ars-metrics[data-columns="3"] .ars-metrics-cell:nth-child(3n),#airanksuite-root .ars-metrics[data-columns="4"] .ars-metrics-cell:nth-child(4n){border-inline-end:0}#airanksuite-root .ars-metrics-label{color:var(--ars-ink-2);align-items:center;gap:5px;font-size:12px;font-weight:560;display:inline-flex}#airanksuite-root .ars-metrics-help{background:var(--ars-surface-2);width:13px;height:13px;color:var(--ars-ink-3);cursor:help;border-radius:999px;place-items:center;font-size:9px;font-weight:700;display:grid}#airanksuite-root .ars-metrics-row{flex-wrap:wrap;align-items:baseline;gap:8px;display:flex}#airanksuite-root .ars-metrics-value{letter-spacing:-.022em;color:var(--ars-ink);font-size:27px;font-weight:660;line-height:1.12}#airanksuite-root .ars-metrics-unit{color:var(--ars-ink-3);margin-inline-start:3px;font-size:13px;font-weight:560}#airanksuite-root .ars-metrics-sub{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-metrics-spark{margin-top:4px;display:block}#airanksuite-root .ars-metrics-rule{background:var(--ars-metric-accent,transparent);inset-inline:0;height:2px;position:absolute;bottom:-1px}#airanksuite-root .ars-donut{grid-template-columns:148px minmax(0,1fr);align-items:center;gap:20px;display:grid}#airanksuite-root .ars-donut-svg{width:148px;height:148px}#airanksuite-root .ars-donut-value{fill:var(--ars-ink);font-size:34px;font-weight:680}#airanksuite-root .ars-donut-max{fill:var(--ars-ink-3);font-size:12px}#airanksuite-root .ars-donut-legend{gap:2px;min-width:0;display:grid}#airanksuite-root .ars-donut-row{border-bottom:1px solid var(--ars-line-soft,var(--ars-line));grid-template-columns:10px minmax(0,1fr) auto;align-items:center;gap:9px;padding:5px 0;font-size:12.5px;display:grid}#airanksuite-root .ars-donut-row:last-of-type{border-bottom:0}#airanksuite-root .ars-donut-dot{border-radius:3px;width:10px;height:10px}#airanksuite-root .ars-donut-name{color:var(--ars-ink-2);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#airanksuite-root .ars-donut-count{font-weight:660}#airanksuite-root .ars-donut-note{color:var(--ars-ink-3);margin:8px 0 0;font-size:11px;line-height:1.5}@media (width<=900px){#airanksuite-root .ars-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}#airanksuite-root .ars-donut{grid-template-columns:minmax(0,1fr);justify-items:center}}#airanksuite-root .ars-app{box-shadow:none;border:1px solid var(--ars-border)}#airanksuite-root .ars-rail{background:var(--ars-surface);border-inline-end:1px solid var(--ars-border)}#airanksuite-root .ars-card,#airanksuite-root .ars-hero{box-shadow:none}#airanksuite-root .ars-btn-primary{background:var(--ars-solid);color:var(--ars-solid-ink)}#airanksuite-root .ars-btn-primary:hover{background:var(--ars-solid-hover);box-shadow:none}#airanksuite-root .ars-btn-ghost{color:var(--ars-ink);border-color:var(--ars-btn-border);box-shadow:none}#airanksuite-root .ars-btn-ghost:hover{background:var(--ars-surface-2);border-color:var(--ars-btn-border-hover);color:var(--ars-ink)}#airanksuite-root .ars-metrics-cell.is-clickable .ars-metrics-value{color:var(--ars-brand)}#airanksuite-root .ars-metrics-cell.is-clickable:hover .ars-metrics-value{color:var(--ars-brand-hover)}#airanksuite-root .ars-tab.is-active{color:var(--ars-ink);border-bottom-color:var(--ars-ink)}#airanksuite-root .ars-tab:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-tab.is-active .ars-tab-count{background:var(--ars-surface-3);color:var(--ars-ink)}#airanksuite-root .ars-metrics-cell{border-top:0;border-inline-start:0}#airanksuite-root .ars-advisor{background:var(--ars-surface);border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);overflow:hidden}#airanksuite-root .ars-advisor-row{align-items:center;gap:14px;padding:6px 14px 6px 0;display:flex}#airanksuite-root .ars-advisor-head{min-width:0;font:inherit;color:inherit;text-align:start;cursor:pointer;background:0 0;border:0;flex:auto;align-items:center;gap:10px;padding:10px 0 10px 16px;display:flex}#airanksuite-root .ars-advisor-head:disabled{cursor:default}#airanksuite-root .ars-advisor-dot{background:var(--ars-ink-3);border-radius:999px;flex:0 0 8px;width:8px;height:8px}#airanksuite-root .ars-advisor.is-good .ars-advisor-dot{background:var(--ars-good)}#airanksuite-root .ars-advisor.is-warning .ars-advisor-dot{background:var(--ars-accent)}#airanksuite-root .ars-advisor.is-bad .ars-advisor-dot{background:var(--ars-serious)}#airanksuite-root .ars-advisor.is-neutral .ars-advisor-dot{background:var(--ars-brand)}#airanksuite-root .ars-advisor-text{color:var(--ars-ink);-webkit-line-clamp:2;text-wrap:pretty;-webkit-box-orient:vertical;font-size:13.5px;font-weight:640;display:-webkit-box;overflow:hidden}#airanksuite-root .ars-advisor-sub{color:var(--ars-ink-3);white-space:nowrap;text-overflow:ellipsis;flex:0 auto;min-width:0;font-size:12px;overflow:hidden}#airanksuite-root .ars-advisor-count{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);font-variant-numeric:tabular-nums;border-radius:999px;flex:none;padding:4px 7px;font-size:10.5px;font-weight:700;line-height:1}#airanksuite-root .ars-advisor-caret{width:14px;height:14px;color:var(--ars-ink-3);flex:0 0 14px;transition:transform .16s}#airanksuite-root .ars-advisor.is-open .ars-advisor-caret{transform:rotate(90deg)}#airanksuite-root .ars-advisor-action{flex:none}#airanksuite-root .ars-advisor-body{border-top:1px solid var(--ars-line-soft);padding:12px 16px 14px}#airanksuite-root .ars-gauge{text-align:center;width:150px}#airanksuite-root .ars-gauge svg{width:100%;height:auto;display:block}#airanksuite-root .ars-gauge-value{letter-spacing:-.02em;fill:var(--ars-ink);font-size:33px;font-weight:680}#airanksuite-root .ars-gauge-max{fill:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-gauge-delta{margin-top:2px}#airanksuite-root .ars-scoreband{grid-template-columns:150px minmax(0,1fr);align-items:center;gap:22px;display:grid}#airanksuite-root .ars-dimrow{grid-template-columns:86px minmax(0,1fr) 34px;align-items:center;gap:12px;padding:6px 0;display:grid}#airanksuite-root .ars-dimrow+.ars-dimrow{border-top:1px solid var(--ars-line-soft)}#airanksuite-root .ars-dimrow-label{color:var(--ars-ink-2);font-size:12.5px}#airanksuite-root .ars-dimrow-track{background:var(--ars-surface-3);border-radius:999px;height:6px;overflow:hidden}#airanksuite-root .ars-dimrow-fill{background:var(--ars-brand);border-radius:999px;height:100%;transition:width .5s cubic-bezier(.2,0,0,1);display:block}#airanksuite-root .ars-dimrow-value{text-align:end;font-variant-numeric:tabular-nums;font-size:13px;font-weight:640}#airanksuite-root .ars-engrows{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:22px;display:grid}#airanksuite-root .ars-engrow{font:inherit;color:inherit;text-align:start;cursor:pointer;border-radius:var(--ars-r-sm);background:0 0;border:0;grid-template-columns:minmax(0,1fr) 64px 40px;align-items:center;gap:12px;padding:8px 6px;display:grid}#airanksuite-root .ars-engrow:hover,#airanksuite-root .ars-engrow.is-active{background:var(--ars-surface-2)}#airanksuite-root .ars-engrow-name{color:var(--ars-ink);white-space:nowrap;text-overflow:ellipsis;font-size:12.5px;font-weight:550;overflow:hidden}#airanksuite-root .ars-engrow-track{background:var(--ars-surface-3);border-radius:999px;height:5px;overflow:hidden}#airanksuite-root .ars-engrow-fill{border-radius:999px;height:100%;display:block}#airanksuite-root .ars-engrow-value{text-align:end;font-variant-numeric:tabular-nums;font-size:12.5px;font-weight:660}@media (width<=760px){#airanksuite-root .ars-engrows{grid-template-columns:minmax(0,1fr)}#airanksuite-root .ars-scoreband{grid-template-columns:minmax(0,1fr);justify-items:center}}#airanksuite-root .ars-advisor-text{flex:auto;min-width:22ch}#airanksuite-root .ars-advisor-sub{flex:1 1 0}#airanksuite-root .ars-engrow{grid-template-columns:minmax(0,1fr) 54px 38px;gap:10px}#airanksuite-root .ars-card-tag{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);letter-spacing:.01em;border-radius:6px;margin-bottom:5px;padding:3px 10px;font-size:11px;font-weight:650;line-height:1.4;display:inline-block}#airanksuite-root .ars-engrow-name{align-items:center;gap:8px;min-width:0;display:inline-flex}#airanksuite-root .ars-engrow-name>svg{flex:none}#airanksuite-root .ars-scorepill{border-radius:var(--ars-r-md);justify-content:center;align-items:center;gap:6px;min-width:44px;padding:3px 9px;font-size:12px;font-weight:650;line-height:1.5;display:inline-flex}#airanksuite-root .ars-scorepill-dot{opacity:.7;background:currentColor;border-radius:999px;width:6px;height:6px}#airanksuite-root .ars-scorepill.is-good{background:var(--ars-good-tonal);color:var(--ars-good-ink)}#airanksuite-root .ars-scorepill.is-mid{background:var(--ars-accent-tonal);color:var(--ars-warning-ink)}#airanksuite-root .ars-scorepill.is-bad{background:var(--ars-serious-tonal);color:var(--ars-serious-ink)}#airanksuite-root .ars-circuits{flex-wrap:wrap;gap:8px;display:flex}#airanksuite-root .ars-circuit{flex:175px;min-width:150px}#airanksuite-root .ars-priority-number{width:26px;height:26px;color:var(--ars-ink-2);background:var(--ars-surface-3);border-radius:50%;flex:0 0 26px;place-items:center;font-size:12px;font-weight:700;display:inline-grid}#airanksuite-root .ars-priority-number.is-warning{color:var(--ars-warning);background:var(--ars-warning-tonal)}#airanksuite-root .ars-priority-number.is-bad{color:var(--ars-serious);background:var(--ars-serious-tonal)}#airanksuite-root .ars-areagrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;display:grid}@media (width<=1100px){#airanksuite-root .ars-areagrid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width<=640px){#airanksuite-root .ars-areagrid{grid-template-columns:1fr}}#airanksuite-root .ars-areacard{border:1px solid var(--ars-line);border-radius:var(--ars-r-md,10px);background:var(--ars-surface);font:inherit;color:inherit;text-align:start;cursor:pointer;border-left-width:4px;grid-template-rows:auto auto;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:8px 12px;padding:12px 14px 12px 12px;transition:border-color .14s,transform .14s,box-shadow .14s;display:grid}#airanksuite-root .ars-areacard:hover{box-shadow:var(--ars-shadow-sm,0 2px 8px #0000000f);transform:translateY(-1px)}#airanksuite-root .ars-areacard.is-active{border-color:var(--ars-brand);box-shadow:0 0 0 2px var(--ars-brand-tonal)}#airanksuite-root .ars-areacard.is-bad{border-left-color:var(--ars-c-red-ink)}#airanksuite-root .ars-areacard.is-mid{border-left-color:var(--ars-accent)}#airanksuite-root .ars-areacard.is-good{border-left-color:var(--ars-c-green-ink)}#airanksuite-root .ars-areacard-score{letter-spacing:-.02em;grid-row:1/span 2;align-self:center;min-width:44px;font-size:22px;font-weight:700;line-height:1}#airanksuite-root .ars-areacard.is-bad .ars-areacard-score{color:var(--ars-c-red-ink)}#airanksuite-root .ars-areacard.is-mid .ars-areacard-score{color:var(--ars-accent)}#airanksuite-root .ars-areacard.is-good .ars-areacard-score{color:var(--ars-c-green-ink)}#airanksuite-root .ars-areacard-body{gap:3px;min-width:0;display:grid}#airanksuite-root .ars-areacard-label{color:var(--ars-ink);font-size:13.5px;font-weight:600}#airanksuite-root .ars-areacard-sub{color:var(--ars-ink-3);white-space:nowrap;text-overflow:ellipsis;font-size:11.5px;overflow:hidden}#airanksuite-root .ars-areacard-bar{background:var(--ars-surface-3);border-radius:999px;height:6px;margin-top:4px;display:flex;overflow:hidden}#airanksuite-root .ars-areacard-bar>span{height:100%;display:block}#airanksuite-root .ars-areacard-reach{color:var(--ars-brand);grid-column:2;justify-self:start;font-size:11.5px;font-weight:600}#airanksuite-root .ars-areacard-reach:after{content:" →"}#airanksuite-root .ars-areacard-reach.is-clear{color:var(--ars-c-green-ink)}#airanksuite-root .ars-areacard-reach.is-clear:after{content:""}#airanksuite-root .ars-winbar{background:var(--ars-surface-3);border-radius:999px;width:120px;height:6px;display:block;overflow:hidden}#airanksuite-root .ars-winbar>span{border-radius:999px;height:100%;display:block}@media (width<=640px){#airanksuite-root .ars-winbar{display:none}}#airanksuite-root .ars-copilot-idle{border-radius:var(--ars-r-md,10px);background:var(--ars-brand-tonal);color:var(--ars-ink-2);align-items:flex-start;gap:10px;padding:10px 12px;font-size:12.5px;line-height:1.5;display:flex}#airanksuite-root .ars-copilot-idle-mark{background:var(--ars-surface);width:24px;height:24px;color:var(--ars-brand);border-radius:8px;flex:none;place-items:center;display:grid}#airanksuite-root .ars-opstrip{grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;display:grid}@media (width<=1280px){#airanksuite-root .ars-opstrip{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (width<=640px){#airanksuite-root .ars-opstrip{grid-template-columns:repeat(2,minmax(0,1fr))}}#airanksuite-root .ars-optile{border:1px solid var(--ars-line);border-top:3px solid var(--ars-ink-3);border-radius:var(--ars-r-md,10px);background:var(--ars-surface);font:inherit;color:inherit;text-align:start;cursor:pointer;justify-items:start;gap:2px;min-width:0;padding:10px 12px;transition:border-color .14s,transform .14s,box-shadow .14s;display:grid}#airanksuite-root .ars-optile:hover{box-shadow:var(--ars-shadow-sm,0 2px 8px #0000000f);transform:translateY(-1px)}#airanksuite-root .ars-optile.is-active{box-shadow:0 0 0 2px var(--ars-brand-tonal);border-color:var(--ars-brand)}#airanksuite-root .ars-optile.is-seen{border-top-color:var(--ars-c-green-ink)}#airanksuite-root .ars-optile.is-quiet{border-top-color:var(--ars-brand)}#airanksuite-root .ars-optile.is-blocked{border-top-color:var(--ars-c-red-ink)}#airanksuite-root .ars-optile-name{color:var(--ars-ink);text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-size:13px;font-weight:700;overflow:hidden}#airanksuite-root .ars-optile-state{color:var(--ars-ink-2);font-size:11.5px;font-weight:600}#airanksuite-root .ars-optile.is-blocked .ars-optile-state{color:var(--ars-c-red-ink)}#airanksuite-root .ars-optile-seen{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-optile.is-seen .ars-optile-seen{color:var(--ars-c-green-ink);font-weight:600}#airanksuite-root .ars-typeempty{border:1px dashed var(--ars-line);border-radius:var(--ars-r-md,10px);color:var(--ars-ink-3);align-items:baseline;gap:10px;padding:10px 16px;font-size:12.5px;display:flex}#airanksuite-root .ars-typeempty b{color:var(--ars-ink-2);font-weight:600}#airanksuite-root .ars-tag-quiet{background:var(--ars-surface-3);color:var(--ars-ink-3);font-weight:600}#airanksuite-root .ars-sources{border:1px solid var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);flex-wrap:wrap;align-items:stretch;gap:8px;padding:8px 10px;display:flex}#airanksuite-root .ars-sources-lead{letter-spacing:.04em;text-transform:uppercase;color:var(--ars-ink-3);align-self:center;padding:0 6px;font-size:11px;font-weight:700}#airanksuite-root .ars-source{border:1px solid var(--ars-line);border-radius:var(--ars-r-md,10px);background:var(--ars-surface-2);min-width:0;font:inherit;color:inherit;text-align:start;cursor:pointer;flex:160px;grid-template-columns:auto 1fr;align-items:center;column-gap:8px;padding:8px 10px;transition:border-color .14s,background .14s;display:grid}#airanksuite-root .ars-source:hover{border-color:var(--ars-brand)}#airanksuite-root .ars-source.is-live{background:var(--ars-surface)}#airanksuite-root .ars-source-dot{background:var(--ars-accent);width:9px;height:9px;box-shadow:0 0 0 3px var(--ars-accent);border-radius:999px;grid-row:1/span 2}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-source-dot{box-shadow:0 0 0 3px color-mix(in srgb, var(--ars-accent) 18%, transparent)}}#airanksuite-root .ars-source.is-live .ars-source-dot{background:var(--ars-c-green-ink);box-shadow:0 0 0 3px var(--ars-c-green-ink)}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-source.is-live .ars-source-dot{box-shadow:0 0 0 3px color-mix(in srgb, var(--ars-c-green-ink) 18%, transparent)}}#airanksuite-root .ars-source-label{color:var(--ars-ink);white-space:nowrap;text-overflow:ellipsis;font-size:12.5px;font-weight:600;overflow:hidden}#airanksuite-root .ars-source-state{color:var(--ars-ink-3);white-space:nowrap;text-overflow:ellipsis;font-size:11px;overflow:hidden}#airanksuite-root .ars-source:not(.is-live) .ars-source-state{color:var(--ars-brand);font-weight:600}#airanksuite-root .ars-provider-grid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:12px;display:grid}@media (width<=1180px){#airanksuite-root .ars-provider-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width<=680px){#airanksuite-root .ars-provider-grid{grid-template-columns:1fr}}#airanksuite-root .ars-provider{border:1px solid var(--ars-line);border-top:3px solid var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);grid-template-rows:auto 1fr auto;gap:10px;min-width:0;padding:14px 16px;transition:box-shadow .15s,transform .15s,border-color .15s;display:grid}#airanksuite-root .ars-provider:hover{border-color:var(--ars-btn-border-hover);transform:translateY(-1px);box-shadow:0 6px 18px -8px #16161e2e}#airanksuite-root .ars-provider.is-connected{border-top-color:var(--ars-c-green-ink)}#airanksuite-root .ars-provider.is-open{border-color:var(--ars-brand);box-shadow:0 0 0 2px var(--ars-brand-tonal)}#airanksuite-root .ars-provider-head{align-items:flex-start;gap:10px;display:flex}#airanksuite-root .ars-provider-mark{letter-spacing:.02em;width:38px;height:38px;color:hsl(var(--mark-h) 55% 32%);background:hsl(var(--mark-h) 70% 92%);border-radius:10px;flex:none;place-items:center;font-size:13px;font-weight:800;display:grid}[data-theme=dark] #airanksuite-root .ars-provider-mark,.ars-dark #airanksuite-root .ars-provider-mark{color:hsl(var(--mark-h) 70% 80%);background:hsl(var(--mark-h) 40% 22%)}#airanksuite-root .ars-provider-name{color:var(--ars-ink);font-size:14px;font-weight:650}#airanksuite-root .ars-provider-state{background:var(--ars-surface-3);color:var(--ars-ink-3);border-radius:999px;padding:2px 7px;font-size:11px;font-weight:600}#airanksuite-root .ars-provider-state.is-on{background:var(--ars-good-tonal);color:var(--ars-good)}#airanksuite-root .ars-provider-caps{flex-wrap:wrap;gap:6px;display:flex}#airanksuite-root .ars-provider-cap{letter-spacing:.03em;text-transform:uppercase;font-size:10.5px;font-weight:700}#airanksuite-root .ars-provider-cap.is-metrics{color:var(--ars-brand)}#airanksuite-root .ars-provider-cap.is-serp{color:var(--ars-accent)}#airanksuite-root .ars-provider-docs{color:var(--ars-ink-3);border-radius:6px;flex:none;padding:2px 6px;font-size:13px;text-decoration:none}#airanksuite-root .ars-provider-docs:hover{color:var(--ars-brand);background:var(--ars-brand-tonal)}#airanksuite-root .ars-provider-blurb{color:var(--ars-ink-2);-webkit-line-clamp:3;-webkit-box-orient:vertical;margin:0;font-size:12.5px;line-height:1.5;display:-webkit-box;overflow:hidden}#airanksuite-root .ars-provider-foot{border-top:1px dashed var(--ars-line);flex-wrap:wrap;align-items:center;gap:6px;margin-top:auto;padding-top:4px;display:flex}#airanksuite-root .ars-destlist{display:grid}#airanksuite-root .ars-dest{border-top:1px solid var(--ars-line);grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:9px 16px;display:grid}#airanksuite-root .ars-dest:first-child{border-top:0}#airanksuite-root .ars-dest-url{text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}#airanksuite-root .ars-dest-pages{color:var(--ars-ink-2);white-space:nowrap;font-size:12px;font-weight:600}#airanksuite-root .ars-dest-actions{gap:4px;display:flex}@media (width<=760px){#airanksuite-root .ars-dest{grid-template-columns:auto minmax(0,1fr)}#airanksuite-root .ars-dest-pages,#airanksuite-root .ars-dest-actions{grid-column:2}}#airanksuite-root .items-stretch>.ars-card{box-sizing:border-box;height:100%}#airanksuite-root .ars-worklist,#airanksuite-root .ars-citelist{display:grid}#airanksuite-root .ars-work{border:0;border-top:1px solid var(--ars-line);font:inherit;color:inherit;text-align:start;cursor:pointer;background:0 0;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;padding:10px 16px;display:grid}#airanksuite-root .ars-work:first-child{border-top:0}#airanksuite-root .ars-work:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-work-score{letter-spacing:-.02em;min-width:36px;font-size:18px;font-weight:700}#airanksuite-root .ars-work-score.is-bad{color:var(--ars-c-red-ink)}#airanksuite-root .ars-work-score.is-mid{color:var(--ars-accent)}#airanksuite-root .ars-work-score.is-good{color:var(--ars-c-green-ink)}#airanksuite-root .ars-work-body{gap:2px;min-width:0;display:grid}#airanksuite-root .ars-work-label{color:var(--ars-ink);text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:600;overflow:hidden}#airanksuite-root .ars-work-sub{color:var(--ars-ink-3);text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;overflow:hidden}#airanksuite-root .ars-work-go{color:var(--ars-ink-3);font-size:18px;line-height:1}#airanksuite-root .ars-cite{border-top:1px solid var(--ars-line);color:inherit;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 16px;text-decoration:none;display:grid}#airanksuite-root .ars-cite:first-child{border-top:0}#airanksuite-root .ars-cite:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-cite-url{text-overflow:ellipsis;white-space:nowrap;color:var(--ars-brand);font-size:12px;overflow:hidden}#airanksuite-root .ars-cite-n{color:var(--ars-ink-2);white-space:nowrap;font-size:12px;font-weight:600}#airanksuite-root .ars-place{border:1px solid var(--ars-line);border-radius:var(--ars-r-md,10px);background:var(--ars-surface);font:inherit;color:inherit;text-align:start;cursor:pointer;justify-content:space-between;align-items:center;gap:10px;padding:8px 12px;display:flex}#airanksuite-root .ars-place:hover{border-color:var(--ars-brand);background:var(--ars-brand-tonal)}#airanksuite-root .ars-listing-head{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}#airanksuite-root .ars-listing-rating{flex:none;justify-items:end;gap:2px;display:grid}#airanksuite-root .ars-listing-stars{letter-spacing:-.02em;color:var(--ars-accent);font-size:26px;font-weight:700;line-height:1}#airanksuite-root .ars-eventgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}@media (width<=800px){#airanksuite-root .ars-eventgrid{grid-template-columns:1fr}}#airanksuite-root .ars-event{border:1px solid var(--ars-line);border-radius:var(--ars-r-md,10px);background:var(--ars-surface);cursor:pointer;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:10px;padding:8px 10px;display:grid}#airanksuite-root .ars-event.is-on{border-color:var(--ars-brand);background:var(--ars-brand-tonal)}#airanksuite-root .ars-event input{margin-top:3px}#airanksuite-root .ars-card-body>*,#airanksuite-root .ars-card-body .grid>*{min-width:0}#airanksuite-root .ars-card pre{max-width:100%}#airanksuite-root .ars-selbar{z-index:5;border:1px solid var(--ars-brand);border-radius:var(--ars-r-lg,14px);background:var(--ars-brand-tonal);flex-wrap:wrap;align-items:center;gap:14px;padding:8px 14px;display:flex;position:sticky;top:8px;box-shadow:0 6px 18px -10px #16161e4d}#airanksuite-root .ars-table tr.is-selected td{background:var(--ars-brand-tonal)}#airanksuite-root .ars-steps{gap:8px;margin:0;padding:0;list-style:none;display:grid}#airanksuite-root .ars-step{border:1px solid var(--ars-line);border-radius:var(--ars-r-md,10px);background:var(--ars-surface);grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 14px;display:grid}#airanksuite-root .ars-step.is-next{border-color:var(--ars-brand);box-shadow:0 0 0 2px var(--ars-brand-tonal)}#airanksuite-root .ars-step-n{background:var(--ars-surface-3);width:26px;height:26px;color:var(--ars-ink-2);border-radius:999px;place-items:center;font-size:12px;font-weight:700;display:grid}#airanksuite-root .ars-step.is-done .ars-step-n{background:var(--ars-good-tonal);color:var(--ars-good)}#airanksuite-root .ars-step.is-next .ars-step-n{background:var(--ars-brand);color:#fff}#airanksuite-root .ars-step-label{color:var(--ars-ink);font-size:13px;font-weight:600}#airanksuite-root .ars-step.is-done .ars-step-label{color:var(--ars-ink-2);text-decoration:line-through;-webkit-text-decoration-color:var(--ars-ink-3);-webkit-text-decoration-color:var(--ars-ink-3);-webkit-text-decoration-color:var(--ars-ink-3);text-decoration-color:var(--ars-ink-3)}#airanksuite-root .ars-step-detail{color:var(--ars-ink-3);font-size:12px}#airanksuite-root .ars-previews{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;display:grid}@media (width<=900px){#airanksuite-root .ars-previews{grid-template-columns:1fr}}#airanksuite-root .ars-preview{border:1px dashed var(--ars-line);border-radius:var(--ars-r-lg,14px);background:var(--ars-surface);gap:4px;padding:14px 16px;display:grid}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-preview{background:color-mix(in srgb, var(--ars-surface) 60%, transparent)}}#airanksuite-root .ars-preview-title{color:var(--ars-ink);font-size:13px;font-weight:650}#airanksuite-root .ars-preview-text{color:var(--ars-ink-2);font-size:12.5px;line-height:1.5}#airanksuite-root .ars-provider-mark.is-image{background:var(--ars-surface);border:1px solid var(--ars-line);box-sizing:border-box;padding:4px}#airanksuite-root .ars-provider-mark.is-image img{object-fit:contain;width:100%;height:100%;display:block}#airanksuite-root .ars-signals{flex:none;gap:2px;display:inline-flex}#airanksuite-root .ars-signals i{background:var(--ars-surface-3);width:15px;height:15px;color:var(--ars-ink-3);border-radius:4px;place-items:center;font-size:9px;font-style:normal;font-weight:800;display:inline-grid}#airanksuite-root .ars-signals i.is-on{background:var(--ars-good-tonal);color:var(--ars-good)}#airanksuite-root .ars-rowmeta{white-space:nowrap;justify-content:flex-end;align-items:center;gap:10px;display:inline-flex}#airanksuite-root .ars-rowacts{opacity:0;gap:8px;font-size:11px;transition:opacity .12s;display:inline-flex}#airanksuite-root .ars-rowacts a{color:var(--ars-brand);font-weight:600;text-decoration:none}#airanksuite-root .ars-table tr:hover .ars-rowacts{opacity:1}#airanksuite-root .ars-hero-stat.is-active{border-color:var(--ars-brand);box-shadow:0 0 0 2px var(--ars-brand-tonal)}#airanksuite-root .ars-brand-mono{color:#fff;width:34px;height:34px;font-family:var(--ars-font-display);place-items:center;font-size:19px;font-weight:700;display:grid}#airanksuite-root .ars-grad-text{-webkit-text-fill-color:currentColor;color:var(--ars-brand);background:0 0}#airanksuite-root{font-family:var(--ars-font)}#airanksuite-root .ars-page-title{letter-spacing:-.01em;font-size:20px;font-weight:600}#airanksuite-root .ars-hero{border-left:1px solid var(--ars-border);background:var(--ars-surface);border-radius:10px;padding:24px 26px;box-shadow:0 1px 1px #16161e08,0 8px 24px -16px #16161e2e}#airanksuite-root .ars-hero-title{letter-spacing:-.01em;font-size:19px;font-weight:600}#airanksuite-root .ars-hero-badge{letter-spacing:0;text-transform:none;border-radius:4px;padding:2px 8px;font-size:12px;font-weight:600}#airanksuite-root .ars-hero-stat{background:var(--ars-surface);border-radius:8px;transition:border-color .14s,box-shadow .14s}#airanksuite-root .ars-hero-stat-v{color:var(--ars-ink);letter-spacing:-.01em;font-size:20px;font-weight:650}#airanksuite-root .ars-hero-stat-v.is-good{color:var(--ars-good-ink)}#airanksuite-root .ars-hero-stat-v.is-warn{color:var(--ars-warning-ink)}#airanksuite-root .ars-hero-stat-v.is-bad{color:var(--ars-serious-ink)}#airanksuite-root .ars-btn{border-radius:8px;min-height:34px;font-weight:600;transition:background .14s,border-color .14s,transform .14s,box-shadow .14s}#airanksuite-root .ars-btn-primary,#airanksuite-root .ars-btn.ars-btn-primary{background:var(--ars-solid);border-color:var(--ars-solid);color:var(--ars-solid-ink);box-shadow:0 1px 2px #16161e2e,inset 0 1px #ffffff0f}#airanksuite-root .ars-btn-primary:hover{background:var(--ars-solid-hover);border-color:var(--ars-solid-hover);transform:translateY(-.5px)}#airanksuite-root .ars-card{border:1px solid var(--ars-border);border-radius:10px}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-card{border:1px solid color-mix(in srgb, var(--ars-border) 80%, transparent)}}#airanksuite-root .ars-card{box-shadow:0 1px 1px #16161e08,0 8px 24px -16px #16161e2e}#airanksuite-root .ars-card-head .t-title{letter-spacing:-.005em;font-size:14.5px;font-weight:650}#airanksuite-root .ars-nav-item{color:var(--ars-ink-2);border-radius:8px;font-weight:500}#airanksuite-root .ars-nav-item svg{color:var(--ars-ink-3)}#airanksuite-root .ars-nav-item:hover{background:var(--ars-surface-2);color:var(--ars-ink)}#airanksuite-root .ars-nav-group{color:var(--ars-ink-3);letter-spacing:.06em;font-size:11px}#airanksuite-root .ars-brand-mark{background:#171717;border-radius:8px}#airanksuite-root .ars-brand-mono{font-family:inherit;font-size:17px}#airanksuite-root .ars-grad-text{color:var(--ars-brand)}#airanksuite-root .ars-metrics-value,#airanksuite-root .ars-metric-value,#airanksuite-root .t-num.font-bold{color:var(--ars-ink)}#airanksuite-root .ars-verdict{border-radius:8px}#airanksuite-root .ars-tabs [aria-selected=true],#airanksuite-root .ars-tab.is-active{color:var(--ars-ink);border-color:var(--ars-ink)}#airanksuite-root .ars-chip.is-active,#airanksuite-root .ars-chipbar .is-active{background:var(--ars-brand-tonal);color:var(--ars-brand-ink)}#airanksuite-root .ars-hero:after,#airanksuite-root .ars-hero:before{display:none}#airanksuite-root .ars-hero{border-top:1px solid var(--ars-border)}#airanksuite-root .ars-table th{letter-spacing:.06em;text-transform:uppercase;color:var(--ars-ink-3);font-size:10.5px;font-weight:650}#airanksuite-root .ars-table td.is-num,#airanksuite-root .ars-table .tabular-nums{font-variant-numeric:tabular-nums}#airanksuite-root .ars-pro{border:1px solid var(--ars-border);background:var(--ars-surface-2);border-radius:10px;align-items:center;gap:12px;padding:14px 16px;display:flex}#airanksuite-root .ars-pro.is-compact{gap:10px;padding:10px 12px}#airanksuite-root .ars-pro-badge{letter-spacing:.06em;text-transform:uppercase;background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);border-radius:999px;flex:none;padding:3px 8px;font-size:10.5px;font-weight:700}#airanksuite-root .ars-pro-title{font-size:13.5px;font-weight:650}#airanksuite-root .ars-pro-text{color:var(--ars-ink-2);margin:2px 0 0;font-size:12.5px}#airanksuite-root .ars-pro-cta{flex:none;margin-inline-start:auto}#airanksuite-root{color:var(--ars-ink-2);background:0 0;font-size:13px}.airanksuite-wrap #airanksuite-root{margin:0}#airanksuite-root .ars-app,#airanksuite-root .ars-app-wide,#airanksuite-root .ars-app-mini{box-shadow:none!important;background:0 0!important;border-radius:0!important;grid-template-columns:none!important;gap:0!important;display:block!important;overflow:visible!important}#airanksuite-root .ars-page{max-width:none}#airanksuite-root .ars-rail,#airanksuite-root .ars-nav-scrim,#airanksuite-root .ars-header{display:none!important}#airanksuite-root .ars-main{background:0 0}#airanksuite-root .ars-page-title{display:none}#airanksuite-root .ars-tabbar{border-bottom:1px solid var(--ars-wp-line);background:0 0;border-radius:0;margin:0 0 16px;padding:0}#airanksuite-root .ars-btn{border:1px solid var(--ars-brand);background:var(--ars-wp-button-bg);min-height:30px;color:var(--ars-brand);box-shadow:none;cursor:pointer;border-radius:3px;align-items:center;gap:6px;padding:0 10px;font-size:13px;font-weight:400;line-height:2.15385;text-decoration:none;display:inline-flex}#airanksuite-root .ars-btn:hover{background:var(--ars-wp-canvas);border-color:var(--ars-brand-hover);color:var(--ars-brand-hover)}#airanksuite-root .ars-btn-primary,#airanksuite-root .ars-btn.ars-btn-primary{background:var(--ars-brand-fill);border-color:var(--ars-brand-fill);color:var(--ars-on-brand);box-shadow:none;transform:none}#airanksuite-root .ars-btn-primary:hover{background:var(--ars-brand-fill-hover);border-color:var(--ars-brand-fill-hover);color:var(--ars-on-brand);transform:none}#airanksuite-root .ars-btn-ghost{background:var(--ars-wp-button-bg)}#airanksuite-root .ars-btn:disabled{background:var(--ars-wp-button-bg);border-color:var(--ars-border);color:var(--ars-ink-3);cursor:default}#airanksuite-root .ars-card,#airanksuite-root .ars-hero{border:1px solid var(--ars-border);box-shadow:none;background:var(--ars-surface);border-radius:4px}#airanksuite-root .ars-card-head{border-bottom:1px solid var(--ars-border)}#airanksuite-root input[type=text],#airanksuite-root input[type=url],#airanksuite-root input[type=email],#airanksuite-root input[type=number],#airanksuite-root input[type=search],#airanksuite-root input[type=password],#airanksuite-root select,#airanksuite-root textarea{border:1px solid var(--ars-wp-field-line);background:var(--ars-surface);color:var(--ars-ink);min-height:30px;box-shadow:none;border-radius:3px;font-size:14px}#airanksuite-root .ars-tab{color:var(--ars-ink-2);background:0 0;border:1px solid #0000;border-bottom:none;border-radius:3px 3px 0 0;margin:0 4px -1px 0;padding:6px 10px;font-size:14px;line-height:1.71429}#airanksuite-root .ars-tab:hover{background:var(--ars-surface);color:var(--ars-ink)}#airanksuite-root .ars-tab.is-active{border-color:var(--ars-wp-line);border-bottom-color:var(--ars-wp-canvas);background:var(--ars-wp-canvas);color:var(--ars-ink);font-weight:600}#airanksuite-root .ars-table{border:1px solid var(--ars-border);background:var(--ars-surface);border-radius:4px}#airanksuite-root .ars-table th{background:var(--ars-wp-button-bg);color:var(--ars-ink);letter-spacing:0;text-transform:none;font-size:12px;font-weight:600}#airanksuite-root .ars-table td{font-size:13px}#airanksuite-root .ars-lictable{display:grid}#airanksuite-root .ars-licrow{border-top:1px solid var(--ars-line);grid-template-columns:220px minmax(0,1fr);align-items:baseline;gap:12px;padding:10px 16px;display:grid}#airanksuite-root .ars-licrow:first-child{border-top:0}#airanksuite-root .ars-licrow-l{color:var(--ars-ink-2);gap:1px;font-size:12.5px;display:grid}#airanksuite-root .ars-licrow-hint{color:var(--ars-ink-3);font-size:11px}#airanksuite-root .ars-licrow-v{color:var(--ars-ink);font-size:13px}@media (width<=720px){#airanksuite-root .ars-licrow{grid-template-columns:1fr}}#airanksuite-root .ars-areacard,#airanksuite-root .ars-report-head.is-green,#airanksuite-root .ars-report-head.is-amber,#airanksuite-root .ars-report-head.is-red,#airanksuite-root .ars-rr-prop,#airanksuite-root .ars-rr-prop.is-required,#airanksuite-root .ars-issue,#airanksuite-root .ars-hero{border-inline-start:1px solid var(--ars-border);border-left-width:1px}#airanksuite-root .ars-areacard.is-bad,#airanksuite-root .ars-areacard.is-mid,#airanksuite-root .ars-areacard.is-good,#airanksuite-root .ars-issue.is-critical,#airanksuite-root .ars-issue.is-warning,#airanksuite-root .ars-issue.is-notice{border-inline-start-color:var(--ars-border)}#airanksuite-root .ars-provider,#airanksuite-root .ars-provider.is-connected,#airanksuite-root .ars-optile,#airanksuite-root .ars-optile.is-seen,#airanksuite-root .ars-optile.is-quiet,#airanksuite-root .ars-optile.is-blocked{border-top:1px solid var(--ars-border)}#airanksuite-root .ars-provider.is-connected{box-shadow:inset 0 0 0 1px var(--ars-good-tonal)}#airanksuite-root .ars-optile.is-seen .ars-optile-seen{color:var(--ars-good)}#airanksuite-root .ars-verdict{border:1px solid var(--ars-border);grid-template-columns:minmax(0,1fr) auto;padding-inline-start:18px}#airanksuite-root .ars-verdict .ars-verdict-mark{display:none}#airanksuite-root .ars-verdict.is-bad .ars-verdict-text{color:var(--ars-ink)}#airanksuite-root .ars-step.is-next{box-shadow:none;border-color:var(--ars-ink-3)}#airanksuite-root .ars-delta-strip{flex-wrap:wrap;gap:6px;display:inline-flex}#airanksuite-root .ars-delta-strip>span{background:var(--ars-surface-3);color:var(--ars-ink-2);border-radius:4px;padding:2px 8px;font-size:11.5px;font-weight:600}#airanksuite-root .ars-delta-strip .is-new{background:var(--ars-serious-tonal);color:var(--ars-serious)}#airanksuite-root .ars-delta-strip .is-fixed{background:var(--ars-good-tonal);color:var(--ars-good)}#airanksuite-root .ars-nav{align-self:flex-start;max-height:calc(100vh - 32px);position:sticky;top:32px;overflow-y:auto}@media (width<=782px){#airanksuite-root .ars-nav{max-height:calc(100vh - 46px);top:46px}}#airanksuite-root .ars-accepted-rules{flex-wrap:wrap;align-items:center;gap:6px;display:flex}#airanksuite-root .ars-signin{justify-items:start;gap:10px;margin-bottom:14px;display:grid}#airanksuite-root .ars-google-btn{color:#1f1f1f;cursor:pointer;background:#fff;border:1px solid #dadce0;border-radius:6px;align-items:center;gap:10px;padding:9px 16px 9px 12px;font:600 14px/1 inherit;display:inline-flex;box-shadow:0 1px 2px #00000014}#airanksuite-root .ars-google-btn:hover{background:var(--ars-surface-2);border-color:var(--ars-border)}#airanksuite-root .ars-google-btn:disabled{opacity:.6;cursor:default}#airanksuite-root .ars-checklist{margin:0;padding:0;list-style:none;display:grid}#airanksuite-root .ars-checklist-item{border-top:1px solid var(--ars-border);grid-template-columns:26px minmax(0,1fr);align-items:start;gap:10px;padding:10px 0;display:grid}#airanksuite-root .ars-checklist-item:first-child{border-top:0}#airanksuite-root .ars-checklist-mark{border:1px solid var(--ars-border-strong);width:22px;height:22px;color:var(--ars-ink-2);background:var(--ars-surface-2);border-radius:999px;justify-content:center;align-items:center;font-size:11.5px;font-weight:600;display:inline-flex}#airanksuite-root .ars-checklist-mark.is-done{background:var(--ars-c-green-bg);border-color:var(--ars-c-green-line);color:var(--ars-c-green-ink)}#airanksuite-root .ars-checklist-item.is-done .font-medium{color:var(--ars-ink-2)}#airanksuite-root .ars-tier{text-transform:uppercase;letter-spacing:.04em;border:1px solid var(--ars-border);color:var(--ars-ink-3);border-radius:999px;padding:1px 6px;font-size:10.5px}#airanksuite-root .ars-tier.is-required{color:var(--ars-ink);border-color:var(--ars-border-strong)}#airanksuite-root .ars-wiz{background:var(--ars-canvas);box-sizing:border-box;min-height:100vh;color:var(--ars-ink);grid-template-columns:300px minmax(0,1fr);gap:28px;padding:40px 44px 56px 36px;font-size:13.5px;display:grid}@media (width<=960px){#airanksuite-root .ars-wiz{grid-template-columns:1fr;padding:24px 18px 40px}#airanksuite-root .ars-wiz-rail{position:static}}#airanksuite-root .ars-wiz-rail{align-self:start;position:sticky;top:40px}#airanksuite-root .ars-wiz-rail-title{letter-spacing:-.02em;color:var(--ars-ink);margin:0 0 22px;font-size:26px;font-weight:700}#airanksuite-root .ars-wiz-steps{gap:2px;display:grid}#airanksuite-root .ars-wiz-step{cursor:pointer;text-align:left;font:inherit;color:var(--ars-ink-3);border-radius:var(--ars-r-sm);background:0 0;border:0;align-items:center;gap:12px;padding:7px 8px 7px 0;display:flex}#airanksuite-root .ars-wiz-step:hover{color:var(--ars-ink-2)}#airanksuite-root .ars-wiz-step.is-active{color:var(--ars-ink);font-weight:600}#airanksuite-root .ars-wiz-step.is-done{color:var(--ars-ink-2)}#airanksuite-root .ars-wiz-step[disabled]{cursor:default}#airanksuite-root .ars-wiz-num{background:var(--ars-brand-tonal);width:26px;height:26px;color:var(--ars-brand);border-radius:999px;flex:none;place-items:center;font-size:12.5px;font-weight:600;transition:background .16s,color .16s;display:grid}#airanksuite-root .ars-wiz-step.is-active .ars-wiz-num,#airanksuite-root .ars-wiz-step.is-done .ars-wiz-num{background:var(--ars-brand);color:#fff}#airanksuite-root .ars-wiz-step.is-done .ars-wiz-num svg{display:block}#airanksuite-root .ars-wiz-subs{margin:2px 0 6px 12px;padding-left:0;display:grid}#airanksuite-root .ars-wiz-sub{font:inherit;text-align:left;cursor:pointer;color:var(--ars-ink-3);border:0;border-left:2px solid var(--ars-border);background:0 0;padding:7px 8px 7px 22px;position:relative}#airanksuite-root .ars-wiz-sub:hover{color:var(--ars-ink-2)}#airanksuite-root .ars-wiz-sub.is-active{color:var(--ars-ink);border-left-color:var(--ars-brand);font-weight:600}#airanksuite-root .ars-wiz-card{background:var(--ars-surface);box-shadow:var(--ars-shadow-card,0 1px 2px #1414180f, 0 8px 24px #1414180d);box-sizing:border-box;border-radius:12px;flex-direction:column;max-width:1160px;min-height:540px;padding:40px 44px 32px;display:flex}@media (width<=782px){#airanksuite-root .ars-wiz-card{padding:24px 20px}}#airanksuite-root .ars-wiz-card h1{letter-spacing:-.01em;color:var(--ars-ink);margin:0 0 6px;font-size:21px;font-weight:700}#airanksuite-root .ars-wiz-lede{color:var(--ars-ink-2);max-width:72ch;margin:0 0 24px;font-size:14px;line-height:1.55}#airanksuite-root .ars-wiz-body{flex:auto}#airanksuite-root .ars-wiz-footer{justify-content:flex-end;align-items:center;gap:14px;margin-top:32px;display:flex}#airanksuite-root .ars-wiz-back{font:inherit;color:var(--ars-brand);cursor:pointer;text-underline-offset:3px;background:0 0;border:0;align-items:center;gap:6px;margin-right:auto;padding:8px 6px;font-weight:600;text-decoration:underline;display:inline-flex}#airanksuite-root .ars-wiz-skip-link{font:inherit;color:var(--ars-brand);cursor:pointer;text-underline-offset:3px;background:0 0;border:0;padding:8px 6px;font-weight:600;text-decoration:underline}#airanksuite-root .ars-wiz-callout{background:var(--ars-brand-tonal);border-left:4px solid var(--ars-brand);color:var(--ars-ink);border-radius:6px;margin:0 0 22px;padding:14px 18px;font-size:13.5px;line-height:1.55;display:block}#airanksuite-root .ars-wiz-callout.is-warning{background:var(--ars-accent-tonal);border-left-color:var(--ars-accent)}#airanksuite-root .ars-wiz-callout p{margin:0}#airanksuite-root .ars-wiz-callout p+p{margin-top:8px}#airanksuite-root .ars-wiz-code{background:var(--ars-surface-3,var(--ars-surface-2));border:1px solid var(--ars-border);color:var(--ars-ink);border-radius:4px;padding:1.5px 7px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}#airanksuite-root .ars-wiz-checks{gap:4px;display:grid}#airanksuite-root .ars-wiz-check{border-radius:var(--ars-r-sm);padding:9px 4px}#airanksuite-root .ars-wiz-check>label{cursor:pointer;color:var(--ars-ink);align-items:center;gap:10px;font-size:13.5px;display:flex}#airanksuite-root .ars-wiz-check input[type=checkbox]{margin:0}#airanksuite-root .ars-wiz-check-sub{color:var(--ars-ink-3);margin:4px 0 0 30px;font-size:12.5px;line-height:1.5}#airanksuite-root .ars-wiz-sources{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:14px;margin-bottom:6px;display:grid}#airanksuite-root .ars-wiz-source{background:var(--ars-brand);border:1.5px solid #0000;border-radius:10px;align-items:center;gap:12px;min-height:84px;padding:10px;display:flex}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-wiz-source{background:color-mix(in srgb, var(--ars-brand) 4%, var(--ars-surface))}}#airanksuite-root .ars-wiz-source{cursor:pointer;font:inherit;text-align:left;color:var(--ars-ink);transition:border-color .14s,background .14s}#airanksuite-root .ars-wiz-source:hover{border-color:var(--ars-border-strong,var(--ars-border))}#airanksuite-root .ars-wiz-source.is-selected{border-color:var(--ars-brand);background:var(--ars-brand-tonal)}#airanksuite-root .ars-wiz-source[disabled]{opacity:.45;cursor:default;background:var(--ars-surface-2)}#airanksuite-root .ars-wiz-source .ars-vendor-icon{border-radius:9px;flex:none;width:40px;height:40px}#airanksuite-root .ars-wiz-source-name{font-size:13.5px;font-weight:600;line-height:1.3}#airanksuite-root .ars-wiz-source-sub{color:var(--ars-ink-3);margin-top:2px;font-size:11.5px}#airanksuite-root .ars-wiz-hero{grid-template-columns:1.2fr 1fr;gap:20px;margin-bottom:22px;display:grid}@media (width<=900px){#airanksuite-root .ars-wiz-hero{grid-template-columns:1fr}}#airanksuite-root .ars-wiz-hero-card{border:1px solid var(--ars-border);border-radius:10px;padding:22px 24px}#airanksuite-root .ars-wiz-quote-mark{color:var(--ars-brand);margin-bottom:10px}#airanksuite-root .ars-wiz-quote{color:var(--ars-ink);margin:0 0 14px;font-size:15px;font-weight:600;line-height:1.55}#airanksuite-root .ars-wiz-quote-by{font-weight:700}#airanksuite-root .ars-wiz-quote-role{color:var(--ars-ink-3);margin-top:2px;font-size:12.5px}#airanksuite-root .ars-wiz-counts{align-content:center;gap:18px;display:grid}#airanksuite-root .ars-wiz-count{align-items:center;gap:14px;display:flex}#airanksuite-root .ars-wiz-count-icon{background:var(--ars-brand-tonal);width:44px;height:44px;color:var(--ars-brand);border-radius:999px;flex:none;place-items:center;display:grid}#airanksuite-root .ars-wiz-count-num{letter-spacing:-.01em;font-size:22px;font-weight:700;line-height:1.1}#airanksuite-root .ars-wiz-count-label{color:var(--ars-ink-2);font-size:12.5px}#airanksuite-root .ars-wiz-strip{background:var(--ars-brand-tonal);border-radius:10px;align-items:center;gap:18px;margin-bottom:4px;padding:16px 20px;display:flex}#airanksuite-root .ars-wiz-strip-text{flex:auto}#airanksuite-root .ars-wiz-strip-title{color:var(--ars-brand);align-items:center;gap:8px;margin-bottom:3px;font-weight:700;display:flex}#airanksuite-root .ars-wiz-strip-sub{color:var(--ars-ink-2);font-size:12.5px;line-height:1.5}#airanksuite-root .ars-wiz-drop{border:1.5px dashed var(--ars-brand)}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-wiz-drop{border:1.5px dashed color-mix(in srgb, var(--ars-brand) 35%, var(--ars-border))}}#airanksuite-root .ars-wiz-drop{background:var(--ars-brand)}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-wiz-drop{background:color-mix(in srgb, var(--ars-brand) 4%, var(--ars-surface))}}#airanksuite-root .ars-wiz-drop{text-align:center;border-radius:10px;justify-items:center;gap:8px;margin-bottom:20px;padding:40px 24px;transition:border-color .14s,background .14s;display:grid}#airanksuite-root .ars-wiz-drop.is-over{border-color:var(--ars-brand);background:var(--ars-brand-tonal)}#airanksuite-root .ars-wiz-drop-icon{color:var(--ars-brand)}#airanksuite-root .ars-wiz-drop-title{font-size:14.5px;font-weight:700}#airanksuite-root .ars-wiz-drop-sub{color:var(--ars-ink-3);font-size:12.5px}#airanksuite-root .ars-wiz-drop-file{color:var(--ars-good-ink,var(--ars-good));font-size:12.5px;font-weight:600}#airanksuite-root .ars-wiz-donelist{border:1px solid var(--ars-border);border-radius:10px;margin-bottom:22px;overflow:hidden}#airanksuite-root .ars-wiz-done{align-items:center;gap:12px;padding:13px 18px;font-size:13.5px;display:flex}#airanksuite-root .ars-wiz-done+.ars-wiz-done{border-top:1px solid var(--ars-line-soft,var(--ars-border))}#airanksuite-root .ars-wiz-done-check{color:var(--ars-good);flex:none;place-items:center;display:grid}#airanksuite-root .ars-wiz-done.is-off .ars-wiz-done-check,#airanksuite-root .ars-wiz-done.is-off{color:var(--ars-ink-3)}#airanksuite-root .ars-wiz-rosette{float:right;border:2px dashed var(--ars-good);width:92px;height:92px;color:var(--ars-good-ink,var(--ars-good));text-align:center;letter-spacing:.06em;text-transform:uppercase;border-radius:999px;place-items:center;margin:-6px 0 12px 18px;font-size:10px;font-weight:700;line-height:1.35;display:grid;transform:rotate(6deg)}#airanksuite-root .ars-notice{background:var(--ars-surface);border:1px solid var(--ars-wp-line);border-left:4px solid var(--ars-wp-notice-info);color:var(--ars-ink);border-radius:0;margin:0;padding:1px 12px;font-size:13px}#airanksuite-root .ars-notice p{margin:.5em 0;padding:2px}#airanksuite-root .ars-notice.is-error{border-left-color:var(--ars-serious)}#airanksuite-root .ars-notice.is-warning{border-left-color:var(--ars-warning)}#airanksuite-root .ars-notice.is-success{border-left-color:var(--ars-good)}#airanksuite-root .ars-notice.is-info{border-left-color:var(--ars-wp-notice-info)}#airanksuite-root .ars-tabbar{box-shadow:none;padding-top:3px;flex-wrap:wrap;align-items:flex-end;gap:0;padding-inline:0;display:flex}#airanksuite-root .ars-tabbar+*{margin-top:0}#airanksuite-root .ars-grouptabs{border-bottom:1px solid var(--ars-wp-line);line-height:inherit;flex-wrap:wrap;align-items:flex-end;gap:0;margin:0 0 16px;padding:9px 0 0;display:flex}#airanksuite-root .ars-grouptab{appearance:none;color:var(--ars-brand);cursor:pointer;white-space:nowrap;background:0 0;border:1px solid #0000;border-bottom:none;border-radius:3px 3px 0 0;align-items:center;gap:6px;margin:0 4px -1px 0;padding:5px 10px;font-size:14px;font-weight:600;line-height:1.71429;text-decoration:none;display:inline-flex}#airanksuite-root .ars-grouptab:hover{background:var(--ars-surface);color:var(--ars-brand-hover)}#airanksuite-root .ars-grouptab:focus-visible{outline:1px solid var(--ars-brand);outline-offset:-1px}#airanksuite-root .ars-grouptab.is-active{border-color:var(--ars-wp-line);border-bottom:1px solid var(--ars-wp-canvas);background:var(--ars-wp-canvas);color:var(--ars-ink)}#airanksuite-root .ars-grouptab-pro{letter-spacing:.04em;text-transform:uppercase;background:var(--ars-warning-tonal);color:var(--ars-warning);border-radius:2px;padding:1px 5px;font-size:10px;font-weight:700}#airanksuite-root[data-theme=dark] .ars-grouptabs{border-bottom-color:var(--ars-border)}#airanksuite-root[data-theme=dark] .ars-grouptab.is-active{border-color:var(--ars-border);border-bottom-color:var(--ars-canvas);background:var(--ars-canvas)}#airanksuite-root[data-theme=dark] .ars-grouptab:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-tab{color:var(--ars-brand);background:0 0;border:0;border-radius:0;margin:0;padding:2px 4px;font-size:13px;font-weight:400;line-height:2;position:relative}#airanksuite-root .ars-tab:after{content:"|";color:var(--ars-ink-3);margin-left:8px;margin-right:2px;font-weight:400}#airanksuite-root [role=tablist]>.ars-tab:last-child:after{content:none}#airanksuite-root .ars-tab.is-active{color:var(--ars-ink);background:0 0;border:0;font-weight:600}#airanksuite-root .ars-tab.is-active:hover{text-decoration:none}body.airanksuite-dark #wpcontent,body.airanksuite-dark #wpbody,body.airanksuite-dark #wpbody-content,body.airanksuite-dark #wpfooter{background:var(--ars-canvas)}body.airanksuite-dark .wrap>h1,body.airanksuite-dark .wrap>h2,body.airanksuite-dark .wrap .wp-heading-inline,body.airanksuite-dark #wpfooter,body.airanksuite-dark #wpfooter a{color:var(--ars-ink)}body.airanksuite-dark .wrap>hr.wp-header-end{border-top-color:var(--ars-border)}body.airanksuite-dark #screen-meta,body.airanksuite-dark #screen-meta-links .show-settings{background:var(--ars-surface);border-color:var(--ars-border);color:var(--ars-ink-2)}#airanksuite-root .ars-upsell{background:var(--ars-surface);border:1px solid var(--ars-wp-line);border-inline-start:4px solid var(--ars-brand);border-radius:4px;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:20px;padding:14px 18px;display:flex}#airanksuite-root .ars-upsell-kicker{letter-spacing:.06em;text-transform:uppercase;color:var(--ars-brand);margin-bottom:2px;font-size:11px;font-weight:700}#airanksuite-root .ars-upsell-title{color:var(--ars-ink);font-size:15.5px;font-weight:600}#airanksuite-root .ars-upsell-text{color:var(--ars-ink-2);max-width:68ch;margin:4px 0 0;font-size:13px}#airanksuite-root .ars-upsell-cta{flex-direction:column;flex:none;align-items:center;gap:4px;display:flex}#airanksuite-root .ars-upsell-price{color:var(--ars-ink-3);white-space:nowrap;font-size:11.5px}#airanksuite-root .ars-richhead{align-items:flex-start;gap:10px;display:flex}#airanksuite-root .ars-richhead-name{flex-wrap:wrap;flex:auto;align-items:center;gap:6px;min-width:0;display:flex}#airanksuite-root .ars-richhead-count{white-space:nowrap;flex:none;padding-top:1px;font-size:11px;line-height:18px}#airanksuite-root .ars-wiz-callout.is-success{border-color:var(--ars-c-green);background:var(--ars-c-green)}@supports (color:color-mix(in lab, red, red)){#airanksuite-root .ars-wiz-callout.is-success{background:color-mix(in srgb, var(--ars-c-green) 18%, transparent)}}#airanksuite-root .ars-scorerow-note{color:var(--ars-ink-3);margin-top:2px;font-size:11px;font-weight:400;line-height:1.35;display:block}#airanksuite-root .ars-tabbar{border-bottom:0;align-items:center;gap:10px;margin:0 0 14px;padding:0}#airanksuite-root [role=tablist]{background:var(--ars-surface-2);border:1px solid var(--ars-border);border-radius:10px;align-items:center;gap:2px;padding:3px;display:inline-flex}#airanksuite-root .ars-tab{color:var(--ars-ink-2);background:0 0;border:0;border-radius:7px;margin:0;padding:6px 13px;font-size:13px;font-weight:500;line-height:1.45;text-decoration:none;transition:background .14s,color .14s,box-shadow .14s;position:relative}#airanksuite-root .ars-tab:after,#airanksuite-root [role=tablist]>.ars-tab:last-child:after{content:none}#airanksuite-root .ars-tab:hover{color:var(--ars-ink);background:#16161e0d;text-decoration:none}#airanksuite-root .ars-tab.is-active,#airanksuite-root .ars-tab[aria-selected=true]{background:var(--ars-surface);color:var(--ars-ink);border:0;font-weight:600;box-shadow:0 1px 2px #16161e1a,0 0 0 1px #16161e0d}#airanksuite-root .ars-tab.is-active:hover{background:var(--ars-surface)}#airanksuite-root[data-theme=dark] .ars-tab:hover{background:#ffffff0f}#airanksuite-root[data-theme=dark] .ars-tab.is-active{box-shadow:0 1px 2px #0006}#airanksuite-root .ars-checklist-item{grid-template-columns:24px minmax(0,1fr);gap:12px;padding:13px 18px;transition:background .12s}#airanksuite-root .ars-checklist-item:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-checklist-item a{color:var(--ars-ink);font-weight:600;text-decoration:none}#airanksuite-root .ars-checklist-item a:hover{color:var(--ars-brand);text-underline-offset:2px;text-decoration:underline}#airanksuite-root .ars-checklist-item.is-done a{color:var(--ars-ink-2);font-weight:500}#airanksuite-root .ars-checklist-mark{width:24px;height:24px;font-size:12px}#airanksuite-root .ars-tier{letter-spacing:.05em;background:var(--ars-surface-2);color:var(--ars-ink-3);border-color:#0000;border-radius:999px;padding:2px 7px;font-size:9.5px;font-weight:600;line-height:1.5}#airanksuite-root .ars-tier.is-required{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);border-color:#0000}#airanksuite-root .ars-scorerow{grid-template-columns:44px minmax(0,1fr) 220px 250px 14px;min-height:54px;padding:11px 10px}#airanksuite-root .ars-scorerow.is-static{grid-template-columns:44px minmax(0,1fr) 220px 250px}#airanksuite-root .ars-scorerow-reach{text-align:end}#airanksuite-root .ars-scorerow-note{white-space:normal;color:var(--ars-ink-3);margin-top:3px;font-size:10.5px;line-height:1.4;display:block}#airanksuite-root .ars-scorerow-score{text-align:center;background:var(--ars-surface-2);min-width:36px;color:var(--ars-ink-2);border-radius:7px;justify-self:start;padding:5px 0;font-size:14px;font-weight:700}#airanksuite-root .ars-scorerow-score.is-good{background:var(--ars-c-green-bg);color:var(--ars-c-green-ink)}#airanksuite-root .ars-scorerow-score.is-mid{background:var(--ars-c-amber);color:var(--ars-c-amber-ink)}#airanksuite-root .ars-scorerow-score.is-bad{background:var(--ars-c-red,#fde8ea);color:var(--ars-c-red-ink)}#airanksuite-root .ars-scorerow-bar{height:7px}#airanksuite-root .ars-scorerow-label{font-size:13px}#airanksuite-root .ars-connect{border:1px solid var(--ars-border);background:var(--ars-surface-2);border-radius:10px;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:18px;padding:14px 16px;display:flex}#airanksuite-root .ars-connect.is-good{border-color:var(--ars-c-green-line);background:var(--ars-c-green-bg)}#airanksuite-root .ars-connect.is-good .t-caption{color:var(--ars-ink-2)}#airanksuite-root .ars-connect>span{flex:none}#airanksuite-root .ars-progress{gap:8px;display:grid}#airanksuite-root .ars-progress-head{color:var(--ars-ink-2);justify-content:space-between;align-items:baseline;gap:16px;font-size:13px;display:flex}#airanksuite-root .ars-progress-pct{color:var(--ars-ink);font-size:13px;font-weight:650}#airanksuite-root .ars-progress-track{background:var(--ars-surface-3);border-radius:999px;height:10px;overflow:hidden}#airanksuite-root .ars-progress-fill{background:var(--ars-brand);background-image:linear-gradient(115deg,#ffffff38 25%,#0000 25% 50%,#ffffff38 50% 75%,#0000 75%);background-size:22px 22px;border-radius:999px;height:100%;transition:width .35s cubic-bezier(.2,0,0,1);animation:.9s linear infinite airanksuite-progress-stripes}@keyframes airanksuite-progress-stripes{to{background-position:22px 0}}@media (prefers-reduced-motion:reduce){#airanksuite-root .ars-progress-fill{background-image:none;animation:none}}#airanksuite-root,#airanksuite-root button,#airanksuite-root input,#airanksuite-root select,#airanksuite-root textarea,#airanksuite-root h1,#airanksuite-root h2,#airanksuite-root h3,#airanksuite-root h4,#airanksuite-root h5,#airanksuite-root p,#airanksuite-root span,#airanksuite-root div,#airanksuite-root a,#airanksuite-root label,#airanksuite-root li,#airanksuite-root td,#airanksuite-root th,#airanksuite-root dt,#airanksuite-root dd,#airanksuite-root small,#airanksuite-root strong,#airanksuite-root b,#airanksuite-root em{font-family:var(--ars-font)}#airanksuite-root code,#airanksuite-root pre,#airanksuite-root kbd,#airanksuite-root samp,#airanksuite-root code *,#airanksuite-root pre *{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}#airanksuite-root .tabular-nums,#airanksuite-root .ars-num,#airanksuite-root .ars-metrics-value,#airanksuite-root .ars-metric-value,#airanksuite-root .ars-hero-stat-v,#airanksuite-root .ars-scorerow-score,#airanksuite-root table td,#airanksuite-root table th{font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1}#airanksuite-root h1,#airanksuite-root h2,#airanksuite-root h3,#airanksuite-root .ars-card-title,#airanksuite-root .ars-hero-title,#airanksuite-root .t-title{letter-spacing:0}#airanksuite-root .ars-card{border-radius:var(--ars-r-lg);box-shadow:0 1px 1px #0000000a}#airanksuite-root[data-theme=dark] .ars-card{box-shadow:0 1px 1px #0006}#airanksuite-root input[type=text],#airanksuite-root input[type=url],#airanksuite-root input[type=email],#airanksuite-root input[type=number],#airanksuite-root input[type=search],#airanksuite-root input[type=password],#airanksuite-root select,#airanksuite-root textarea{border:1px solid var(--ars-border);border-radius:var(--ars-r-sm);background:var(--ars-surface);color:var(--ars-ink);min-height:34px;padding:6px 11px;font-size:13.5px;transition:border-color .14s,box-shadow .14s,background .14s}#airanksuite-root textarea{padding:9px 11px;line-height:1.6}#airanksuite-root select{padding-inline-end:28px}#airanksuite-root input::placeholder,#airanksuite-root textarea::placeholder{color:var(--ars-ink-3)}#airanksuite-root input:hover:not(:disabled),#airanksuite-root select:hover:not(:disabled),#airanksuite-root textarea:hover:not(:disabled){border-color:var(--ars-btn-border-hover)}#airanksuite-root input:focus,#airanksuite-root select:focus,#airanksuite-root textarea:focus{border-color:var(--ars-brand);box-shadow:var(--ars-focus-ring);outline:2px solid #0000}#airanksuite-root input:disabled,#airanksuite-root select:disabled,#airanksuite-root textarea:disabled{background:var(--ars-disabled-bg);color:var(--ars-disabled-ink);cursor:default}#airanksuite-root label.block,#airanksuite-root .ars-field-label{color:var(--ars-ink-2);letter-spacing:.002em;font-size:12.5px;font-weight:600}#airanksuite-root .ars-btn{border-radius:var(--ars-r-sm);min-height:34px;padding:7px 16px;font-size:13px;font-weight:600;transition:background .14s,border-color .14s,color .14s,box-shadow .14s,transform 90ms}#airanksuite-root .ars-btn-primary{background:var(--ars-brand-fill);color:var(--ars-on-brand);box-shadow:0 1px 2px #18162e29,0 6px 16px -8px #2271b1a6}#airanksuite-root .ars-btn-primary:hover:not(:disabled){background:var(--ars-brand-fill-hover);transform:translateY(-1px);box-shadow:0 2px 4px #18162e2e,0 10px 22px -10px #2271b1bf}#airanksuite-root .ars-btn-primary:active:not(:disabled){transform:translateY(0)}#airanksuite-root .ars-btn-ghost{background:var(--ars-surface);border-color:var(--ars-btn-border);color:var(--ars-ink);box-shadow:0 1px 1px #18162e0a}#airanksuite-root .ars-btn-ghost:hover:not(:disabled){background:var(--ars-surface-2);border-color:var(--ars-btn-border-hover);color:var(--ars-ink)}#airanksuite-root .ars-btn-tonal{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);border-color:#0000}#airanksuite-root .ars-btn-tonal:hover:not(:disabled){background:var(--ars-brand-tonal);filter:brightness(.97)}#airanksuite-root .ars-btn:focus-visible{box-shadow:var(--ars-focus-ring);outline:2px solid #0000}#airanksuite-root .ars-linkbtn{border-radius:var(--ars-r-sm);color:var(--ars-brand-ink);padding:5px 8px;font-weight:600;text-decoration:none;transition:background .12s,color .12s}#airanksuite-root .ars-linkbtn:hover{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink)}#airanksuite-root .ars-table th{background:var(--ars-surface);border-bottom:1px solid var(--ars-border);padding:11px 14px}#airanksuite-root .ars-table td{border-bottom:1px solid var(--ars-line-soft);padding:11px 14px}#airanksuite-root .ars-table tbody tr:last-child td{border-bottom:0}#airanksuite-root .ars-table tbody tr{transition:background .11s}#airanksuite-root .ars-table tbody tr:hover{background:var(--ars-surface-2)}#airanksuite-root .ars-nav-item{border-radius:var(--ars-r-sm);padding:8px 12px;font-weight:500}#airanksuite-root .ars-nav-item.is-active{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);box-shadow:inset 2px 0 0 var(--ars-brand);font-weight:650}#airanksuite-root .ars-nav-item.is-active svg{color:var(--ars-brand)}#airanksuite-root .ars-nav-item:hover:not(.is-active){background:var(--ars-surface-2)}#airanksuite-root .ars-badge,#airanksuite-root .ars-chip,#airanksuite-root .ars-pill{letter-spacing:.01em;border-radius:999px;font-weight:650}#airanksuite-root .ars-hero{border-radius:var(--ars-r-lg);position:relative;overflow:hidden}#airanksuite-root .ars-hero:before{content:"";pointer-events:none;background:linear-gradient(112deg,#2271b11a 0%,#8b7bff0d 46%,#0000 78%);width:62%;display:block;position:absolute;inset:-40% auto -40% -10%}#airanksuite-root[data-theme=dark] .ars-hero:before{background:linear-gradient(112deg,#9c8dff29 0%,#7a68ff12 46%,#0000 78%)}#airanksuite-root .ars-hero>*{position:relative}#airanksuite-root .ars-hero-title{letter-spacing:0;font-size:19px;font-weight:680;line-height:1.28}#airanksuite-root .ars-hero-why{font-size:13.5px;line-height:1.6}#airanksuite-root .ars-hero-stat-v{letter-spacing:0;font-size:21px;font-weight:700}#airanksuite-root .ars-upsell{border-radius:var(--ars-r-lg);background:var(--ars-grad);color:var(--ars-on-brand);border:0;padding:20px 24px;box-shadow:0 10px 30px -18px #3f328cbf}#airanksuite-root .ars-upsell,#airanksuite-root .ars-upsell-title,#airanksuite-root .ars-upsell h3,#airanksuite-root .ars-upsell strong{color:var(--ars-on-brand)}#airanksuite-root .ars-upsell-title{letter-spacing:0;font-size:16.5px;font-weight:680}#airanksuite-root .ars-upsell-kicker{color:#ffffffbd;letter-spacing:.1em;font-weight:700}#airanksuite-root .ars-upsell-text,#airanksuite-root .ars-upsell p{color:#ffffffdb}#airanksuite-root .ars-upsell-price{color:#ffffffbd}#airanksuite-root .ars-upsell-cta{text-align:end;justify-items:end;gap:8px;display:grid}#airanksuite-root .ars-upsell .ars-btn-primary{background:var(--ars-on-brand);color:var(--ars-brand-tonal-ink);box-shadow:0 2px 10px #18162e47}#airanksuite-root .ars-upsell .ars-btn-primary:hover:not(:disabled){background:var(--ars-on-brand);filter:brightness(.95)}#airanksuite-root .ars-empty-band{border:1px solid var(--ars-border);border-radius:var(--ars-r-lg);background:var(--ars-surface-2);color:var(--ars-ink-2);padding:26px 20px;font-size:13px;line-height:1.6}#airanksuite-root .ars-empty{border-radius:var(--ars-r-lg);padding:30px 20px}#airanksuite-root .ars-chart-area,#airanksuite-root .recharts-area-area{opacity:.9}#airanksuite-root .ars-chart-grid line,#airanksuite-root .recharts-cartesian-grid line{stroke:var(--ars-line-soft)}#airanksuite-root .ars-card-icon{background:var(--ars-brand-tonal);color:var(--ars-brand-tonal-ink);border-radius:var(--ars-r-sm)}#airanksuite-root .ars-card-title{font-size:14.5px;font-weight:660}.airanksuite-wrap{margin:12px 24px 0 20px}#airanksuite-root .ars-view,#airanksuite-root main.ars-view{padding:0 0 32px!important}#airanksuite-root .ars-card-head{padding:15px 20px}#airanksuite-root .ars-card-body{padding:18px 20px}#airanksuite-root .ars-checklist-item{padding:14px 20px}#airanksuite-root .ars-table th,#airanksuite-root .ars-table td,#airanksuite-root .ars-scorerow{padding-inline:20px}@media (width<=782px){.airanksuite-wrap{margin:10px 12px 0 10px}#airanksuite-root .ars-card-head,#airanksuite-root .ars-card-body,#airanksuite-root .ars-checklist-item,#airanksuite-root .ars-table th,#airanksuite-root .ars-table td,#airanksuite-root .ars-scorerow{padding-inline:14px}}#airanksuite-root .ars-trend-note{color:var(--ars-ink-3);margin:12px 0 0;font-size:12px;line-height:1.55}#airanksuite-root .ars-bandscale{width:100%;padding:6px 2px 2px}#airanksuite-root .ars-gauge-track,#airanksuite-root .ars-gauge-scale{width:100%}#airanksuite-root .ars-gauge-head{align-items:baseline;gap:8px;margin-bottom:14px;display:flex}#airanksuite-root .ars-gauge-n{letter-spacing:0;font-variant-numeric:tabular-nums;font-size:40px;font-weight:760;line-height:1}#airanksuite-root .ars-gauge-of{color:var(--ars-ink-3);font-size:14px;font-weight:500}#airanksuite-root .ars-gauge-zone{letter-spacing:.05em;text-transform:uppercase;color:var(--ars-ink-3);margin-inline-start:auto;font-size:11.5px;font-weight:700}#airanksuite-root .ars-gauge-track{border-radius:999px;height:12px;display:flex;position:relative;overflow:hidden}#airanksuite-root .ars-gauge-band{height:100%;display:block}#airanksuite-root .ars-gauge-mark{width:4px;height:20px;box-shadow:0 0 0 3px var(--ars-surface);border-radius:999px;margin-inline-start:-2px;transition:left .5s cubic-bezier(.2,0,0,1);position:absolute;top:-4px}#airanksuite-root .ars-gauge-scale{letter-spacing:.04em;text-transform:uppercase;color:var(--ars-ink-3);margin-top:7px;font-size:10.5px;display:flex}#airanksuite-root .ars-gauge-scale>span{text-align:center}#airanksuite-root .ars-comp{width:100%;padding:6px 2px 2px}#airanksuite-root .ars-comp-bar{background:var(--ars-surface-3);border-radius:999px;height:14px;display:flex;overflow:hidden}#airanksuite-root .ars-comp-bar>span{height:100%;display:block}#airanksuite-root .ars-comp-bar>span+span{box-shadow:inset 1px 0 0 var(--ars-surface)}#airanksuite-root .ars-comp-keys{flex-wrap:wrap;gap:8px 22px;margin-top:16px;display:flex}#airanksuite-root .ars-comp-key{color:var(--ars-ink-3);align-items:baseline;gap:7px;font-size:12.5px;display:inline-flex}#airanksuite-root .ars-comp-key i{border-radius:3px;align-self:center;width:9px;height:9px}#airanksuite-root .ars-comp-key b{color:var(--ars-ink);letter-spacing:0;font-variant-numeric:tabular-nums;font-size:17px;font-weight:700}#airanksuite-root .ars-comp-total{color:var(--ars-ink-3);margin:12px 0 0;font-size:12px}#airanksuite-root .ars-num,#airanksuite-root .t-num,#airanksuite-root .ars-metrics-value,#airanksuite-root .ars-metric-value,#airanksuite-root .ars-hero-stat-v,#airanksuite-root .ars-gauge-n,#airanksuite-root .ars-comp-key b,#airanksuite-root .ars-scorerow-score,#airanksuite-root .ars-kpi-value{font-variant-numeric:tabular-nums lining;font-feature-settings:"tnum" 1, "lnum" 1;letter-spacing:0;font-weight:700}#airanksuite-root .ars-unit,#airanksuite-root .ars-metrics-unit,#airanksuite-root .ars-metric-unit{opacity:.62;letter-spacing:0;margin-inline-start:2px;font-size:.62em;font-weight:500}#airanksuite-root .ars-legend{color:var(--ars-ink-3);flex-wrap:wrap;align-items:center;gap:6px 16px;padding:0 0 12px;font-size:12px;display:flex}#airanksuite-root .ars-legend-label{color:var(--ars-ink-2)}#airanksuite-root .ars-legend-key{align-items:center;gap:6px;display:inline-flex}#airanksuite-root .ars-legend-key i{border-radius:2px;width:10px;height:6px}#airanksuite-root .ars-report-legend{color:var(--ars-ink-3);white-space:nowrap;align-items:center;gap:6px;font-size:11px;display:inline-flex}#airanksuite-root .ars-report-fix{flex:none;align-self:start;margin-inline-start:auto}#airanksuite-root .ars-report-row{align-items:start;position:relative}#airanksuite-root .ars-report-row:not(.is-pass){box-shadow:inset 2px 0 0 var(--ars-c-red-ink)}#airanksuite-root .ars-report-row.is-pass .ars-report-weight{opacity:.45}#airanksuite-root .ars-spread{gap:10px;height:148px;padding:12px 14px}#airanksuite-root .ars-spread-col{grid-template-rows:auto 1fr auto auto;gap:4px}#airanksuite-root .ars-spread-n{color:var(--ars-ink);letter-spacing:0;font-size:13px;font-weight:700}#airanksuite-root .ars-spread-bar{border-radius:var(--ars-r-sm) var(--ars-r-sm) 2px 2px;max-width:46px}#airanksuite-root .ars-spread-bar.is-empty{background:var(--ars-border);border-radius:999px;height:2px}#airanksuite-root .ars-spread-label{font-size:10.5px}#airanksuite-root .ars-spread-share{color:var(--ars-ink-3);font-size:10.5px;font-weight:600}#airanksuite-root .ars-progress-track.is-indeterminate{max-width:320px;margin-top:14px}#airanksuite-root .ars-progress-track.is-indeterminate .ars-progress-fill{width:38%;animation:1.15s cubic-bezier(.5,0,.5,1) infinite airanksuite-progress-slide,.9s linear infinite airanksuite-progress-stripes}@keyframes airanksuite-progress-slide{0%{transform:translate(-105%)}to{transform:translate(275%)}}@media (prefers-reduced-motion:reduce){#airanksuite-root .ars-progress-track.is-indeterminate .ars-progress-fill{opacity:.5;width:100%;animation:none}}#airanksuite-root .ars-hero-stat-v.is-warn,#airanksuite-root .ars-hero-stat-v.is-bad,#airanksuite-root .ars-hero-stat-v.is-good{letter-spacing:0;border-radius:999px;padding:3px 11px;font-size:15px;line-height:1.45;display:inline-block}#airanksuite-root .ars-hero-stat-v.is-warn{background:var(--ars-warning-tonal);color:var(--ars-warning-ink)}#airanksuite-root .ars-hero-stat-v.is-bad{background:var(--ars-serious-tonal);color:var(--ars-serious-ink)}#airanksuite-root .ars-hero-stat-v.is-good{background:var(--ars-good-tonal);color:var(--ars-good-ink)}#airanksuite-root .ars-status-warn{background:var(--ars-warning-tonal);color:var(--ars-warning-ink);border-radius:999px;padding:2px 9px}.ars-aiwork-head{letter-spacing:-.01em;color:var(--ars-ink);align-items:flex-start;gap:10px;font-size:15px;font-weight:600;display:flex}.ars-aiwork-dot{background:var(--ars-ink-3);border-radius:99px;flex:none;width:9px;height:9px;margin-top:6px}.ars-aiwork-head.is-good .ars-aiwork-dot{background:var(--ars-good)}.ars-aiwork-head.is-warning .ars-aiwork-dot{background:var(--ars-warning)}.ars-aiwork-head.is-good .ars-aiwork-dot{animation:1.8s ease-in-out infinite ars-aiwork-pulse}@keyframes ars-aiwork-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.45;transform:scale(.82)}}.ars-aiwork-line{min-width:0}.ars-aiwork-why{color:var(--ars-ink-2);max-width:74ch;margin:0;font-size:13px;line-height:1.55}.ars-aiwork-bar{background:var(--ars-canvas);border:1px solid var(--ars-border);border-radius:99px;height:8px;overflow:hidden}.ars-aiwork-bar i{background:var(--ars-brand);border-radius:99px;height:100%;transition:width .5s cubic-bezier(.22,1,.36,1);display:block}.ars-aiwork-figures{background:var(--ars-border);border:1px solid var(--ars-border);border-radius:10px;flex-wrap:wrap;gap:1px;display:flex;overflow:hidden}.ars-aiwork-figures div{background:var(--ars-surface);flex-direction:column;flex:150px;gap:3px;padding:12px 14px;display:flex}.ars-aiwork-figures span{letter-spacing:.08em;text-transform:uppercase;color:var(--ars-ink-3);font-size:11px;font-weight:700}.ars-aiwork-figures strong{color:var(--ars-ink);font-variant-numeric:tabular-nums;font-size:16px;font-weight:680}.ars-aiwork-figures em{color:var(--ars-ink-3);max-width:34ch;font-size:11.5px;font-style:normal;line-height:1.5}.ars-vein{background:var(--ars-border);border-radius:2px;height:3px;margin:2px 0 0;position:relative;overflow:hidden}.ars-floor.is-live .ars-vein{background:var(--ars-brand);box-shadow:0 0 14px #2271b12e}.ars-vein-flow{background:var(--ars-brand-tonal);opacity:0;width:18%;position:absolute;inset:0;transform:translate(-30%)}.ars-floor.is-live .ars-vein-flow{opacity:1;animation:3.4s linear infinite ars-bus}.ars-floor.is-still .ars-vein-flow{opacity:.5;width:100%;animation:none;transform:none}.ars-circuits-wrap .ars-circuits{flex-wrap:wrap;gap:8px;margin-top:0;display:flex}.ars-circuits-wrap .ars-circuit{flex:168px;min-width:0}.ars-circuit-stem{background:var(--ars-border);top:-9px;width:2px;height:9px;position:absolute;inset-inline-start:16px}.ars-floor.is-live .ars-circuit.is-live .ars-circuit-stem{background:var(--ars-brand)}.ars-circuit{margin-top:9px}.ars-circuit-powers{color:var(--ars-ink-3);margin-top:5px;font-size:11.5px;line-height:1.5;display:block}.ars-circuit:not(.is-live) .ars-circuit-powers{color:var(--ars-ink-4,var(--ars-ink-3));opacity:.75}.ars-floor.is-compact{background:0 0;border:0;padding:0}.ars-floor.is-compact .ars-floor-body{grid-template-columns:1fr}.ars-floor.is-compact .ars-circuits{grid-template-columns:repeat(auto-fit,minmax(168px,1fr))}.ars-floor.is-compact .ars-floor-rail-label{margin-top:14px}@media (width<=782px){.ars-aiwork-figures div{flex:100%}.ars-aiwork-figures em{max-width:none}.ars-circuits-wrap .ars-circuit{flex-basis:150px}}@media (width<=600px){.ars-circuits-wrap .ars-circuit{flex-basis:100%}.ars-circuit-stem{inset-inline-start:12px}}@media (prefers-reduced-motion:reduce){.ars-aiwork-head .ars-aiwork-dot{animation:none}.ars-aiwork-bar i{transition:none}}#airanksuite-root .ars-chart-bleed{margin-inline:-14px}#airanksuite-root .ars-chart-bleed>div:first-child{margin-inline:14px}@media (width<=600px){#airanksuite-root .ars-chart-bleed{margin-inline:-8px}#airanksuite-root .ars-chart-bleed>div:first-child{margin-inline:8px}}#airanksuite-root .ars-btn{min-height:32px;box-shadow:none;background:var(--ars-wp-button-bg);border-color:var(--ars-brand);color:var(--ars-brand-ink);border-radius:3px;padding:4px 14px;font-weight:500;line-height:22px}#airanksuite-root .ars-btn:hover:not(:disabled){border-color:var(--ars-brand-hover);color:var(--ars-brand-hover);background:#f0f0f1}#airanksuite-root .ars-btn.ars-btn-ghost{border-color:var(--ars-border);color:var(--ars-ink);background:0 0}#airanksuite-root .ars-btn.ars-btn-ghost:hover:not(:disabled){background:var(--ars-surface-2);border-color:var(--ars-wp-field-line);color:var(--ars-ink)}#airanksuite-root .ars-btn.ars-btn-primary{background:var(--ars-brand-fill);border-color:var(--ars-brand-fill);color:#fff}#airanksuite-root .ars-btn.ars-btn-primary:hover:not(:disabled){background:var(--ars-brand-fill-hover);border-color:var(--ars-brand-fill-hover);color:#fff}#airanksuite-root .ars-btn:focus-visible{outline:2px solid var(--ars-brand);outline-offset:1px;box-shadow:none}#airanksuite-root .ars-tabbar{border-bottom:1px solid var(--ars-wp-line);gap:0;padding-bottom:0}#airanksuite-root .ars-tab{color:var(--ars-brand-ink);box-shadow:none;background:0 0;border:1px solid #0000;border-bottom:none;border-radius:3px 3px 0 0;margin-bottom:-1px;padding:7px 12px;font-weight:400}#airanksuite-root .ars-tab:hover:not(.is-active){background:var(--ars-surface-2);color:var(--ars-brand-hover)}#airanksuite-root .ars-tab.is-active{background:var(--ars-surface);border-color:var(--ars-wp-line);border-bottom:1px solid var(--ars-surface);color:var(--ars-ink);font-weight:600}#airanksuite-root .ars-card{border-radius:8px}#airanksuite-root .ars-card-head .t-title{color:var(--ars-ink);font-size:14px;font-weight:600}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}
    33/*$vite$:1*/
  • ai-rank-suite/trunk/assets/admin/build/index.js

    r3740630 r3753434  
    1 (function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,o)=>(o=n==null?{}:e(i(n)),l(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),d=s((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`setState(...): takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function ee(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)S.call(n,i)&&!w.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:C.current}}function T(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function te(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var E=/\/+/g;function re(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ie(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+re(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(E,`$&/`)+`/`),ie(o,r,i,``,function(e){return e})):o!=null&&(te(o)&&(o=T(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(E,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,x(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+re(s,l);c+=ie(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+re(s,l++),c+=ie(s,r,i,u,o);else if(s===`object`)throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`);return c}function D(e,t,n){if(e==null)return e;var r=[],i=0;return ie(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ae(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var oe={current:null},se={transition:null},ce={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:se,ReactCurrentOwner:C};function le(){throw Error(`act(...) is not supported in production builds of React.`)}e.Children={map:D,forEach:function(e,t,n){D(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return D(e,function(){t++}),t},toArray:function(e){return D(e,function(e){return e})||[]},only:function(e){if(!te(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ce,e.act=le,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=C.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)S.call(n,l)&&!w.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=ee,e.createFactory=function(e){var t=ee.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=te,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ae}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=se.transition;se.transition={};try{e()}finally{se.transition=t}},e.unstable_act=le,e.useCallback=function(e,t){return oe.current.useCallback(e,t)},e.useContext=function(e){return oe.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return oe.current.useDeferredValue(e)},e.useEffect=function(e,t){return oe.current.useEffect(e,t)},e.useId=function(){return oe.current.useId()},e.useImperativeHandle=function(e,t,n){return oe.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return oe.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return oe.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return oe.current.useMemo(e,t)},e.useReducer=function(e,t,n){return oe.current.useReducer(e,t,n)},e.useRef=function(e){return oe.current.useRef(e)},e.useState=function(e){return oe.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return oe.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return oe.current.useTransition()},e.version=`18.3.1`})),f=s(((e,t)=>{t.exports=d()})),p=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m)if(n(c)!==null)m=!0,D(x);else{var t=n(l);t!==null&&ae(b,t.startTime-e)}}function x(t,i){m=!1,h&&(h=!1,_(w),w=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!te());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&ae(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var S=!1,C=null,w=-1,ee=5,T=-1;function te(){return!(e.unstable_now()-T<ee)}function ne(){if(C!==null){var t=e.unstable_now();T=t;var n=!0;try{n=C(!0,t)}finally{n?E():(S=!1,C=null)}}else S=!1}var E;if(typeof v==`function`)E=function(){v(ne)};else if(typeof MessageChannel<`u`){var re=new MessageChannel,ie=re.port2;re.port1.onmessage=ne,E=function(){ie.postMessage(null)}}else E=function(){g(ne,0)};function D(e){C=e,S||(S=!0,E())}function ae(t,n){w=g(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,D(x))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):ee=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(w),w=-1):h=!0,ae(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,D(x))),r},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),m=s(((e,t)=>{t.exports=p()})),h=s((e=>{var t=f(),n=m();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var i=new Set,a={};function o(e,t){s(e,t),s(e+`Capture`,t)}function s(e,t){for(a[e]=t,e=0;e<t.length;e++)i.add(t[e])}var c=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),l=Object.prototype.hasOwnProperty,u=/^[: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]*$/,d={},p={};function h(e){return l.call(p,e)?!0:l.call(d,e)?!1:u.test(e)?p[e]=!0:(d[e]=!0,!1)}function g(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function _(e,t,n,r){if(t==null||g(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function v(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var y={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){y[e]=new v(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];y[t]=new v(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){y[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){y[e]=new v(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){y[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){y[e]=new v(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){y[e]=new v(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){y[e]=new v(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){y[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function x(e){return e[1].toUpperCase()}`accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height`.split(` `).forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)}),y.xlinkHref=new v(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)});function S(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(_(t,n,i,r)&&(n=null),r||i===null?h(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type!==3&&``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var C=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for(`react.element`),ee=Symbol.for(`react.portal`),T=Symbol.for(`react.fragment`),te=Symbol.for(`react.strict_mode`),ne=Symbol.for(`react.profiler`),E=Symbol.for(`react.provider`),re=Symbol.for(`react.context`),ie=Symbol.for(`react.forward_ref`),D=Symbol.for(`react.suspense`),ae=Symbol.for(`react.suspense_list`),oe=Symbol.for(`react.memo`),se=Symbol.for(`react.lazy`),ce=Symbol.for(`react.offscreen`),le=Symbol.iterator;function ue(e){return typeof e!=`object`||!e?null:(e=le&&e[le]||e[`@@iterator`],typeof e==`function`?e:null)}var de=Object.assign,O;function fe(e){if(O===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);O=t&&t[1]||``}return`
    2 `+O+e}var pe=!1;function k(e,t){if(!e||pe)return``;pe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(`
     1(function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,o)=>(o=n==null?{}:e(i(n)),l(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),d=s((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`setState(...): takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function T(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)S.call(n,i)&&!w.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:C.current}}function E(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function ee(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var D=/\/+/g;function ne(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function re(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+ne(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(D,`$&/`)+`/`),re(o,r,i,``,function(e){return e})):o!=null&&(ee(o)&&(o=E(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(D,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,x(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+ne(s,l);c+=re(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+ne(s,l++),c+=re(s,r,i,u,o);else if(s===`object`)throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`);return c}function O(e,t,n){if(e==null)return e;var r=[],i=0;return re(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ie(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ae={current:null},oe={transition:null},se={ReactCurrentDispatcher:ae,ReactCurrentBatchConfig:oe,ReactCurrentOwner:C};function ce(){throw Error(`act(...) is not supported in production builds of React.`)}e.Children={map:O,forEach:function(e,t,n){O(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return O(e,function(){t++}),t},toArray:function(e){return O(e,function(e){return e})||[]},only:function(e){if(!ee(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,e.act=ce,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=C.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)S.call(n,l)&&!w.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=T,e.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ee,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ie}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=oe.transition;oe.transition={};try{e()}finally{oe.transition=t}},e.unstable_act=ce,e.useCallback=function(e,t){return ae.current.useCallback(e,t)},e.useContext=function(e){return ae.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return ae.current.useDeferredValue(e)},e.useEffect=function(e,t){return ae.current.useEffect(e,t)},e.useId=function(){return ae.current.useId()},e.useImperativeHandle=function(e,t,n){return ae.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return ae.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return ae.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return ae.current.useMemo(e,t)},e.useReducer=function(e,t,n){return ae.current.useReducer(e,t,n)},e.useRef=function(e){return ae.current.useRef(e)},e.useState=function(e){return ae.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return ae.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return ae.current.useTransition()},e.version=`18.3.1`})),f=s(((e,t)=>{t.exports=d()})),p=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m)if(n(c)!==null)m=!0,O(x);else{var t=n(l);t!==null&&ie(b,t.startTime-e)}}function x(t,i){m=!1,h&&(h=!1,_(w),w=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!ee());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&ie(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var S=!1,C=null,w=-1,T=5,E=-1;function ee(){return!(e.unstable_now()-E<T)}function te(){if(C!==null){var t=e.unstable_now();E=t;var n=!0;try{n=C(!0,t)}finally{n?D():(S=!1,C=null)}}else S=!1}var D;if(typeof v==`function`)D=function(){v(te)};else if(typeof MessageChannel<`u`){var ne=new MessageChannel,re=ne.port2;ne.port1.onmessage=te,D=function(){re.postMessage(null)}}else D=function(){g(te,0)};function O(e){C=e,S||(S=!0,D())}function ie(t,n){w=g(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,O(x))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):T=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(w),w=-1):h=!0,ie(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,O(x))),r},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),m=s(((e,t)=>{t.exports=p()})),h=s((e=>{var t=f(),n=m();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var i=new Set,a={};function o(e,t){s(e,t),s(e+`Capture`,t)}function s(e,t){for(a[e]=t,e=0;e<t.length;e++)i.add(t[e])}var c=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),l=Object.prototype.hasOwnProperty,u=/^[: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]*$/,d={},p={};function h(e){return l.call(p,e)?!0:l.call(d,e)?!1:u.test(e)?p[e]=!0:(d[e]=!0,!1)}function g(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function _(e,t,n,r){if(t==null||g(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function v(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var y={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){y[e]=new v(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];y[t]=new v(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){y[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){y[e]=new v(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){y[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){y[e]=new v(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){y[e]=new v(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){y[e]=new v(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){y[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function x(e){return e[1].toUpperCase()}`accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height`.split(` `).forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)}),y.xlinkHref=new v(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)});function S(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(_(t,n,i,r)&&(n=null),r||i===null?h(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type!==3&&``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var C=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for(`react.element`),T=Symbol.for(`react.portal`),E=Symbol.for(`react.fragment`),ee=Symbol.for(`react.strict_mode`),te=Symbol.for(`react.profiler`),D=Symbol.for(`react.provider`),ne=Symbol.for(`react.context`),re=Symbol.for(`react.forward_ref`),O=Symbol.for(`react.suspense`),ie=Symbol.for(`react.suspense_list`),ae=Symbol.for(`react.memo`),oe=Symbol.for(`react.lazy`),se=Symbol.for(`react.offscreen`),ce=Symbol.iterator;function le(e){return typeof e!=`object`||!e?null:(e=ce&&e[ce]||e[`@@iterator`],typeof e==`function`?e:null)}var ue=Object.assign,de;function fe(e){if(de===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||``}return`
     2`+de+e}var pe=!1;function me(e,t){if(!e||pe)return``;pe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(`
    33`),a=r.stack.split(`
    44`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=`
    5 `+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{pe=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?fe(e):``}function me(e){switch(e.tag){case 5:return fe(e.type);case 16:return fe(`Lazy`);case 13:return fe(`Suspense`);case 19:return fe(`SuspenseList`);case 0:case 2:case 15:return e=k(e.type,!1),e;case 11:return e=k(e.type.render,!1),e;case 1:return e=k(e.type,!0),e;default:return``}}function he(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case T:return`Fragment`;case ee:return`Portal`;case ne:return`Profiler`;case te:return`StrictMode`;case D:return`Suspense`;case ae:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case re:return(e.displayName||`Context`)+`.Consumer`;case E:return(e._context.displayName||`Context`)+`.Provider`;case ie:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case oe:return t=e.displayName||null,t===null?he(e.type)||`Memo`:t;case se:t=e._payload,e=e._init;try{return he(e(t))}catch{}}return null}function ge(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return he(t);case 8:return t===te?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function _e(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function ve(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function ye(e){var t=ve(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function be(e){e._valueTracker||=ye(e)}function xe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=ve(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Se(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Ce(e,t){var n=t.checked;return de({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function we(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=_e(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function A(e,t){t=t.checked,t!=null&&S(e,`checked`,t,!1)}function Te(e,t){A(e,t);var n=_e(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?j(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&j(e,t.type,_e(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ee(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function j(e,t,n){(t!==`number`||Se(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var De=Array.isArray;function Oe(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+_e(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ke(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return de({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function Ae(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(De(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:_e(n)}}function je(e,t){var n=_e(t.value),r=_e(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function Me(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function Ne(e){switch(e){case`svg`:return`http://www.w3.org/2000/svg`;case`math`:return`http://www.w3.org/1998/Math/MathML`;default:return`http://www.w3.org/1999/xhtml`}}function Pe(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?Ne(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var M,Fe=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(M||=document.createElement(`div`),M.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=M.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ie(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Le={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Re=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Le).forEach(function(e){Re.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Le[t]=Le[e]})});function ze(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Le.hasOwnProperty(e)&&Le[e]?(``+t).trim():t+`px`}function Be(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=ze(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Ve=de({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function He(e,t){if(t){if(Ve[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function Ue(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var We=null;function Ge(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ke=null,qe=null,Je=null;function Ye(e){if(e=qi(e)){if(typeof Ke!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Yi(t),Ke(e.stateNode,e.type,t))}}function Xe(e){qe?Je?Je.push(e):Je=[e]:qe=e}function Ze(){if(qe){var e=qe,t=Je;if(Je=qe=null,Ye(e),t)for(e=0;e<t.length;e++)Ye(t[e])}}function Qe(e,t){return e(t)}function $e(){}var et=!1;function N(e,t,n){if(et)return e(t,n);et=!0;try{return Qe(e,t,n)}finally{et=!1,(qe!==null||Je!==null)&&($e(),Ze())}}function tt(e,t){var n=e.stateNode;if(n===null)return null;var i=Yi(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var nt=!1;if(c)try{var rt={};Object.defineProperty(rt,"passive",{get:function(){nt=!0}}),window.addEventListener(`test`,rt,rt),window.removeEventListener(`test`,rt,rt)}catch{nt=!1}function it(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var at=!1,ot=null,st=!1,ct=null,lt={onError:function(e){at=!0,ot=e}};function ut(e,t,n,r,i,a,o,s,c){at=!1,ot=null,it.apply(lt,arguments)}function dt(e,t,n,i,a,o,s,c,l){if(ut.apply(this,arguments),at){if(at){var u=ot;at=!1,ot=null}else throw Error(r(198));st||(st=!0,ct=u)}}function ft(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function pt(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function mt(e){if(ft(e)!==e)throw Error(r(188))}function ht(e){var t=e.alternate;if(!t){if(t=ft(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return mt(a),e;if(o===i)return mt(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function gt(e){return e=ht(e),e===null?null:_t(e)}function _t(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=_t(e);if(t!==null)return t;e=e.sibling}return null}var vt=n.unstable_scheduleCallback,yt=n.unstable_cancelCallback,bt=n.unstable_shouldYield,xt=n.unstable_requestPaint,St=n.unstable_now,Ct=n.unstable_getCurrentPriorityLevel,wt=n.unstable_ImmediatePriority,Tt=n.unstable_UserBlockingPriority,Et=n.unstable_NormalPriority,Dt=n.unstable_LowPriority,Ot=n.unstable_IdlePriority,kt=null,At=null;function jt(e){if(At&&typeof At.onCommitFiberRoot==`function`)try{At.onCommitFiberRoot(kt,e,void 0,(e.current.flags&128)==128)}catch{}}var Mt=Math.clz32?Math.clz32:Ft,Nt=Math.log,Pt=Math.LN2;function Ft(e){return e>>>=0,e===0?32:31-(Nt(e)/Pt|0)|0}var It=64,Lt=4194304;function Rt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function zt(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=Rt(a))):r=Rt(s)}else o=n&~i,o===0?a!==0&&(r=Rt(a)):r=Rt(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Mt(t),i=1<<n,r|=e[n],t&=~i;return r}function Bt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vt(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Mt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Bt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function Ht(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Ut(){var e=It;return It<<=1,!(It&4194240)&&(It=64),e}function Wt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Gt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Mt(t),e[t]=n}function Kt(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Mt(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function qt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Mt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Jt=0;function Yt(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Xt,Zt,Qt,$t,en,tn=!1,nn=[],rn=null,an=null,on=null,sn=new Map,cn=new Map,ln=[],un=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit`.split(` `);function dn(e,t){switch(e){case`focusin`:case`focusout`:rn=null;break;case`dragenter`:case`dragleave`:an=null;break;case`mouseover`:case`mouseout`:on=null;break;case`pointerover`:case`pointerout`:sn.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:cn.delete(t.pointerId)}}function fn(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=qi(t),t!==null&&Zt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function pn(e,t,n,r,i){switch(t){case`focusin`:return rn=fn(rn,e,t,n,r,i),!0;case`dragenter`:return an=fn(an,e,t,n,r,i),!0;case`mouseover`:return on=fn(on,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return sn.set(a,fn(sn.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,cn.set(a,fn(cn.get(a)||null,e,t,n,r,i)),!0}return!1}function mn(e){var t=Ki(e.target);if(t!==null){var n=ft(t);if(n!==null){if(t=n.tag,t===13){if(t=pt(n),t!==null){e.blockedOn=t,en(e.priority,function(){Qt(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function hn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=En(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);We=r,n.target.dispatchEvent(r),We=null}else return t=qi(n),t!==null&&Zt(t),e.blockedOn=n,!1;t.shift()}return!0}function gn(e,t,n){hn(e)&&n.delete(t)}function _n(){tn=!1,rn!==null&&hn(rn)&&(rn=null),an!==null&&hn(an)&&(an=null),on!==null&&hn(on)&&(on=null),sn.forEach(gn),cn.forEach(gn)}function vn(e,t){e.blockedOn===t&&(e.blockedOn=null,tn||(tn=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,_n)))}function yn(e){function t(t){return vn(t,e)}if(0<nn.length){vn(nn[0],e);for(var n=1;n<nn.length;n++){var r=nn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(rn!==null&&vn(rn,e),an!==null&&vn(an,e),on!==null&&vn(on,e),sn.forEach(t),cn.forEach(t),n=0;n<ln.length;n++)r=ln[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ln.length&&(n=ln[0],n.blockedOn===null);)mn(n),n.blockedOn===null&&ln.shift()}var bn=C.ReactCurrentBatchConfig,xn=!0;function Sn(e,t,n,r){var i=Jt,a=bn.transition;bn.transition=null;try{Jt=1,wn(e,t,n,r)}finally{Jt=i,bn.transition=a}}function Cn(e,t,n,r){var i=Jt,a=bn.transition;bn.transition=null;try{Jt=4,wn(e,t,n,r)}finally{Jt=i,bn.transition=a}}function wn(e,t,n,r){if(xn){var i=En(e,t,n,r);if(i===null)vi(e,t,r,Tn,n),dn(e,r);else if(pn(i,e,t,n,r))r.stopPropagation();else if(dn(e,r),t&4&&-1<un.indexOf(e)){for(;i!==null;){var a=qi(i);if(a!==null&&Xt(a),a=En(e,t,n,r),a===null&&vi(e,t,r,Tn,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else vi(e,t,r,null,n)}}var Tn=null;function En(e,t,n,r){if(Tn=null,e=Ge(r),e=Ki(e),e!==null)if(t=ft(e),t===null)e=null;else if(n=t.tag,n===13){if(e=pt(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Tn=e,null}function Dn(e){switch(e){case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 1;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`toggle`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 4;case`message`:switch(Ct()){case wt:return 1;case Tt:return 4;case Et:case Dt:return 16;case Ot:return 536870912;default:return 16}default:return 16}}var On=null,kn=null,An=null;function jn(){if(An)return An;var e,t=kn,n=t.length,r,i=`value`in On?On.value:On.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return An=i.slice(e,1<r?1-r:void 0)}function P(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Mn(){return!0}function Nn(){return!1}function Pn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Mn:Nn,this.isPropagationStopped=Nn,this}return de(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Mn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Mn)},persist:function(){},isPersistent:Mn}),t}var Fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},In=Pn(Fn),Ln=de({},Fn,{view:0,detail:0}),Rn=Pn(Ln),zn,Bn,Vn,Hn=de({},Ln,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Vn&&(Vn&&e.type===`mousemove`?(zn=e.screenX-Vn.screenX,Bn=e.screenY-Vn.screenY):Bn=zn=0,Vn=e),zn)},movementY:function(e){return`movementY`in e?e.movementY:Bn}}),Un=Pn(Hn),Wn=Pn(de({},Hn,{dataTransfer:0})),Gn=Pn(de({},Ln,{relatedTarget:0})),F=Pn(de({},Fn,{animationName:0,elapsedTime:0,pseudoElement:0})),Kn=Pn(de({},Fn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),qn=Pn(de({},Fn,{data:0})),Jn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Yn={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`},Xn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Zn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Xn[e])?!!t[e]:!1}function Qn(){return Zn}var $n=Pn(de({},Ln,{key:function(e){if(e.key){var t=Jn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=P(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Yn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qn,charCode:function(e){return e.type===`keypress`?P(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?P(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),er=Pn(de({},Hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),tr=Pn(de({},Ln,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qn})),nr=Pn(de({},Fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),rr=Pn(de({},Hn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),ir=[9,13,27,32],ar=c&&`CompositionEvent`in window,or=null;c&&`documentMode`in document&&(or=document.documentMode);var sr=c&&`TextEvent`in window&&!or,cr=c&&(!ar||or&&8<or&&11>=or),lr=` `,ur=!1;function dr(e,t){switch(e){case`keyup`:return ir.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function fr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var pr=!1;function mr(e,t){switch(e){case`compositionend`:return fr(t);case`keypress`:return t.which===32?(ur=!0,lr):null;case`textInput`:return e=t.data,e===lr&&ur?null:e;default:return null}}function hr(e,t){if(pr)return e===`compositionend`||!ar&&dr(e,t)?(e=jn(),An=kn=On=null,pr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return cr&&t.locale!==`ko`?null:t.data;default:return null}}var gr={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 _r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!gr[e.type]:t===`textarea`}function vr(e,t,n,r){Xe(r),t=bi(t,`onChange`),0<t.length&&(n=new In(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var yr=null,br=null;function xr(e){fi(e,0)}function Sr(e){if(xe(Ji(e)))return e}function Cr(e,t){if(e===`change`)return t}var wr=!1;if(c){var Tr;if(c){var Er=`oninput`in document;if(!Er){var Dr=document.createElement(`div`);Dr.setAttribute(`oninput`,`return;`),Er=typeof Dr.oninput==`function`}Tr=Er}else Tr=!1;wr=Tr&&(!document.documentMode||9<document.documentMode)}function Or(){yr&&(yr.detachEvent(`onpropertychange`,kr),br=yr=null)}function kr(e){if(e.propertyName===`value`&&Sr(br)){var t=[];vr(t,br,e,Ge(e)),N(xr,t)}}function Ar(e,t,n){e===`focusin`?(Or(),yr=t,br=n,yr.attachEvent(`onpropertychange`,kr)):e===`focusout`&&Or()}function jr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Sr(br)}function Mr(e,t){if(e===`click`)return Sr(t)}function Nr(e,t){if(e===`input`||e===`change`)return Sr(t)}function Pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Fr=typeof Object.is==`function`?Object.is:Pr;function Ir(e,t){if(Fr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!l.call(t,i)||!Fr(e[i],t[i]))return!1}return!0}function Lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rr(e,t){var n=Lr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Lr(n)}}function zr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Br(){for(var e=window,t=Se();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Se(e.document)}return t}function Vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}function Hr(e){var t=Br(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&zr(n.ownerDocument.documentElement,n)){if(r!==null&&Vr(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Rr(n,a);var o=Rr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ur=c&&`documentMode`in document&&11>=document.documentMode,Wr=null,Gr=null,Kr=null,qr=!1;function Jr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qr||Wr==null||Wr!==Se(r)||(r=Wr,`selectionStart`in r&&Vr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Kr&&Ir(Kr,r)||(Kr=r,r=bi(Gr,`onSelect`),0<r.length&&(t=new In(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Wr)))}function Yr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Xr={animationend:Yr(`Animation`,`AnimationEnd`),animationiteration:Yr(`Animation`,`AnimationIteration`),animationstart:Yr(`Animation`,`AnimationStart`),transitionend:Yr(`Transition`,`TransitionEnd`)},Zr={},Qr={};c&&(Qr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Xr.animationend.animation,delete Xr.animationiteration.animation,delete Xr.animationstart.animation),`TransitionEvent`in window||delete Xr.transitionend.transition);function $r(e){if(Zr[e])return Zr[e];if(!Xr[e])return e;var t=Xr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Qr)return Zr[e]=t[n];return e}var ei=$r(`animationend`),ti=$r(`animationiteration`),ni=$r(`animationstart`),ri=$r(`transitionend`),ii=new Map,ai=`abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);function oi(e,t){ii.set(e,t),o(t,[e])}for(var si=0;si<ai.length;si++){var ci=ai[si];oi(ci.toLowerCase(),`on`+(ci[0].toUpperCase()+ci.slice(1)))}oi(ei,`onAnimationEnd`),oi(ti,`onAnimationIteration`),oi(ni,`onAnimationStart`),oi(`dblclick`,`onDoubleClick`),oi(`focusin`,`onFocus`),oi(`focusout`,`onBlur`),oi(ri,`onTransitionEnd`),s(`onMouseEnter`,[`mouseout`,`mouseover`]),s(`onMouseLeave`,[`mouseout`,`mouseover`]),s(`onPointerEnter`,[`pointerout`,`pointerover`]),s(`onPointerLeave`,[`pointerout`,`pointerover`]),o(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),o(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),o(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),o(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var li=`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(` `),ui=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(li));function di(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,dt(r,t,void 0,e),e.currentTarget=null}function fi(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;di(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;di(i,s,l),a=c}}}if(st)throw e=ct,st=!1,ct=null,e}function pi(e,t){var n=t[Ui];n===void 0&&(n=t[Ui]=new Set);var r=e+`__bubble`;n.has(r)||(_i(t,e,2,!1),n.add(r))}function mi(e,t,n){var r=0;t&&(r|=4),_i(n,e,r,t)}var hi=`_reactListening`+Math.random().toString(36).slice(2);function gi(e){if(!e[hi]){e[hi]=!0,i.forEach(function(t){t!==`selectionchange`&&(ui.has(t)||mi(t,!1,e),mi(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hi]||(t[hi]=!0,mi(`selectionchange`,!1,t))}}function _i(e,t,n,r){switch(Dn(t)){case 1:var i=Sn;break;case 4:i=Cn;break;default:i=wn}n=i.bind(null,t,n,e),i=void 0,!nt||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function vi(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Ki(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}N(function(){var r=a,i=Ge(n),o=[];a:{var s=ii.get(e);if(s!==void 0){var c=In,l=e;switch(e){case`keypress`:if(P(n)===0)break a;case`keydown`:case`keyup`:c=$n;break;case`focusin`:l=`focus`,c=Gn;break;case`focusout`:l=`blur`,c=Gn;break;case`beforeblur`:case`afterblur`:c=Gn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Un;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Wn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=tr;break;case ei:case ti:case ni:c=F;break;case ri:c=nr;break;case`scroll`:c=Rn;break;case`wheel`:c=rr;break;case`copy`:case`cut`:case`paste`:c=Kn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=er}var u=!!(t&4),d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=tt(p,f),h!=null&&u.push(yi(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==We&&(l=n.relatedTarget||n.fromElement)&&(Ki(l)||l[Hi]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Ki(l):null,l!==null&&(d=ft(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Un,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=er,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Ji(c),m=l==null?s:Ji(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Ki(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=xi(m))p++;for(m=0,h=f;h;h=xi(h))m++;for(;0<p-m;)u=xi(u),p--;for(;0<m-p;)f=xi(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=xi(u),f=xi(f)}u=null}else u=null;c!==null&&Si(o,s,c,u,!1),l!==null&&d!==null&&Si(o,d,l,u,!0)}}a:{if(s=r?Ji(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=Cr;else if(_r(s))if(wr)g=Nr;else{g=jr;var _=Ar}else(c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Mr);if(g&&=g(e,r)){vr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&j(s,`number`,s.value)}switch(_=r?Ji(r):window,e){case`focusin`:(_r(_)||_.contentEditable===`true`)&&(Wr=_,Gr=r,Kr=null);break;case`focusout`:Kr=Gr=Wr=null;break;case`mousedown`:qr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:qr=!1,Jr(o,n,i);break;case`selectionchange`:if(Ur)break;case`keydown`:case`keyup`:Jr(o,n,i)}var v;if(ar)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else pr?dr(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(cr&&n.locale!==`ko`&&(pr||y!==`onCompositionStart`?y===`onCompositionEnd`&&pr&&(v=jn()):(On=i,kn=`value`in On?On.value:On.textContent,pr=!0)),_=bi(r,y),0<_.length&&(y=new qn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=fr(n),v!==null&&(y.data=v)))),(v=sr?mr(e,n):hr(e,n))&&(r=bi(r,`onBeforeInput`),0<r.length&&(i=new qn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}fi(o,t)})}function yi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function bi(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=tt(e,n),a!=null&&r.unshift(yi(e,a,i)),a=tt(e,t),a!=null&&r.push(yi(e,a,i))),e=e.return}return r}function xi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Si(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=tt(n,a),c!=null&&o.unshift(yi(n,c,s))):i||(c=tt(n,a),c!=null&&o.push(yi(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ci=/\r\n?/g,wi=/\u0000|\uFFFD/g;function Ti(e){return(typeof e==`string`?e:``+e).replace(Ci,`
    6 `).replace(wi,``)}function Ei(e,t,n){if(t=Ti(t),Ti(e)!==t&&n)throw Error(r(425))}function Di(){}var Oi=null,ki=null;function Ai(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ji=typeof setTimeout==`function`?setTimeout:void 0,Mi=typeof clearTimeout==`function`?clearTimeout:void 0,Ni=typeof Promise==`function`?Promise:void 0,Pi=typeof queueMicrotask==`function`?queueMicrotask:Ni===void 0?ji:function(e){return Ni.resolve(null).then(e).catch(Fi)};function Fi(e){setTimeout(function(){throw e})}function Ii(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),yn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);yn(t)}function Li(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function Ri(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var zi=Math.random().toString(36).slice(2),Bi=`__reactFiber$`+zi,Vi=`__reactProps$`+zi,Hi=`__reactContainer$`+zi,Ui=`__reactEvents$`+zi,Wi=`__reactListeners$`+zi,Gi=`__reactHandles$`+zi;function Ki(e){var t=e[Bi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Hi]||n[Bi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ri(e);e!==null;){if(n=e[Bi])return n;e=Ri(e)}return t}e=n,n=e.parentNode}return null}function qi(e){return e=e[Bi]||e[Hi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ji(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Yi(e){return e[Vi]||null}var Xi=[],Zi=-1;function Qi(e){return{current:e}}function $i(e){0>Zi||(e.current=Xi[Zi],Xi[Zi]=null,Zi--)}function I(e,t){Zi++,Xi[Zi]=e.current,e.current=t}var ea={},ta=Qi(ea),na=Qi(!1),ra=ea;function ia(e,t){var n=e.type.contextTypes;if(!n)return ea;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function aa(e){return e=e.childContextTypes,e!=null}function oa(){$i(na),$i(ta)}function sa(e,t,n){if(ta.current!==ea)throw Error(r(168));I(ta,t),I(na,n)}function ca(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,ge(e)||`Unknown`,a));return de({},n,i)}function la(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ea,ra=ta.current,I(ta,e),I(na,na.current),!0}function ua(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=ca(e,t,ra),i.__reactInternalMemoizedMergedChildContext=e,$i(na),$i(ta),I(ta,e)):$i(na),I(na,n)}var L=null,da=!1,fa=!1;function pa(e){L===null?L=[e]:L.push(e)}function ma(e){da=!0,pa(e)}function ha(){if(!fa&&L!==null){fa=!0;var e=0,t=Jt;try{var n=L;for(Jt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}L=null,da=!1}catch(t){throw L!==null&&(L=L.slice(e+1)),vt(wt,ha),t}finally{Jt=t,fa=!1}}return null}var ga=[],_a=0,va=null,ya=0,ba=[],xa=0,Sa=null,Ca=1,wa=``;function Ta(e,t){ga[_a++]=ya,ga[_a++]=va,va=e,ya=t}function Ea(e,t,n){ba[xa++]=Ca,ba[xa++]=wa,ba[xa++]=Sa,Sa=e;var r=Ca;e=wa;var i=32-Mt(r)-1;r&=~(1<<i),n+=1;var a=32-Mt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ca=1<<32-Mt(t)+i|n<<i|r,wa=a+e}else Ca=1<<a|n<<i|r,wa=e}function Da(e){e.return!==null&&(Ta(e,1),Ea(e,1,0))}function Oa(e){for(;e===va;)va=ga[--_a],ga[_a]=null,ya=ga[--_a],ga[_a]=null;for(;e===Sa;)Sa=ba[--xa],ba[xa]=null,wa=ba[--xa],ba[xa]=null,Ca=ba[--xa],ba[xa]=null}var ka=null,Aa=null,R=!1,ja=null;function Ma(e,t){var n=Xl(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Na(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null&&(e.stateNode=t,ka=e,Aa=Li(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t!==null&&(e.stateNode=t,ka=e,Aa=null,!0);case 13:return t=t.nodeType===8?t:null,t!==null&&(n=Sa===null?null:{id:Ca,overflow:wa},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Xl(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ka=e,Aa=null,!0);default:return!1}}function Pa(e){return!!(e.mode&1)&&!(e.flags&128)}function Fa(e){if(R){var t=Aa;if(t){var n=t;if(!Na(e,t)){if(Pa(e))throw Error(r(418));t=Li(n.nextSibling);var i=ka;t&&Na(e,t)?Ma(i,n):(e.flags=e.flags&-4097|2,R=!1,ka=e)}}else{if(Pa(e))throw Error(r(418));e.flags=e.flags&-4097|2,R=!1,ka=e}}}function Ia(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ka=e}function La(e){if(e!==ka)return!1;if(!R)return Ia(e),R=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!Ai(e.type,e.memoizedProps)),t&&=Aa){if(Pa(e))throw Ra(),Error(r(418));for(;t;)Ma(e,t),t=Li(t.nextSibling)}if(Ia(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){Aa=Li(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}Aa=null}}else Aa=ka?Li(e.stateNode.nextSibling):null;return!0}function Ra(){for(var e=Aa;e;)e=Li(e.nextSibling)}function za(){Aa=ka=null,R=!1}function Ba(e){ja===null?ja=[e]:ja.push(e)}var Va=C.ReactCurrentBatchConfig;function z(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function Ha(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function Ua(e){var t=e._init;return t(e._payload)}function Wa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=$l(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ru(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===T?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===se&&Ua(i)===t.type)?(r=a(t,n.props),r.ref=z(e,t,n),r.return=e,r):(r=eu(n.type,n.key,n.props,null,e.mode,r),r.ref=z(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=X(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=tu(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=ru(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case w:return n=eu(t.type,t.key,t.props,null,e.mode,n),n.ref=z(e,null,t),n.return=e,n;case ee:return t=X(t,e.mode,n),t.return=e,t;case se:var r=t._init;return f(e,r(t._payload),n)}if(De(t)||ue(t))return t=tu(t,e.mode,n,null),t.return=e,t;Ha(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case w:return n.key===i?l(e,t,n,r):null;case ee:return n.key===i?u(e,t,n,r):null;case se:return i=n._init,p(e,t,i(n._payload),r)}if(De(n)||ue(n))return i===null?d(e,t,n,r,null):null;Ha(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case w:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case ee:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case se:var a=r._init;return m(e,t,n,a(r._payload),i)}if(De(r)||ue(r))return e=e.get(n)||null,d(t,e,r,i,null);Ha(t,r)}return null}function h(r,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),R&&Ta(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return R&&Ta(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),R&&Ta(r,h),l}function g(a,s,c,l){var u=ue(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),R&&Ta(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return R&&Ta(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),R&&Ta(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===T&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case w:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===T){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===se&&Ua(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=z(e,l,i),r.return=e,e=r;break a}n(e,l);break}t(e,l),l=l.sibling}i.type===T?(r=tu(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=eu(i.type,i.key,i.props,null,e.mode,o),o.ref=z(e,r,i),o.return=e,e=o)}return s(e);case ee:a:{for(l=i.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}else{n(e,r);break}t(e,r),r=r.sibling}r=X(i,e.mode,o),r.return=e,e=r}return s(e);case se:return l=i._init,_(e,r,l(i._payload),o)}if(De(i))return h(e,r,i,o);if(ue(i))return g(e,r,i,o);Ha(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=ru(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Ga=Wa(!0),Ka=Wa(!1),qa=Qi(null),Ja=null,Ya=null,Xa=null;function Za(){Xa=Ya=Ja=null}function Qa(e){var t=qa.current;$i(qa),e._currentValue=t}function $a(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function eo(e,t){Ja=e,Xa=Ya=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Bs=!0),e.firstContext=null)}function to(e){var t=e._currentValue;if(Xa!==e)if(e={context:e,memoizedValue:t,next:null},Ya===null){if(Ja===null)throw Error(r(308));Ya=e,Ja.dependencies={lanes:0,firstContext:e}}else Ya=Ya.next=e;return t}var no=null;function ro(e){no===null?no=[e]:no.push(e)}function io(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,ro(t)):(n.next=i.next,i.next=n),t.interleaved=n,ao(e,r)}function ao(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var oo=!1;function B(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function so(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function co(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function lo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Jc&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ao(e,n)}return i=r.interleaved,i===null?(t.next=t,ro(r)):(t.next=i.next,i.next=t),r.interleaved=t,ao(e,n)}function uo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qt(e,n)}}function fo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function po(e,t,n,r){var i=e.updateQueue;oo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=de({},d,f);break a;case 2:oo=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);nl|=o,e.lanes=o,e.memoizedState=d}}function mo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var ho={},go=Qi(ho),_o=Qi(ho),vo=Qi(ho);function V(e){if(e===ho)throw Error(r(174));return e}function yo(e,t){switch(I(vo,t),I(_o,e),I(go,ho),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Pe(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Pe(t,e)}$i(go),I(go,t)}function bo(){$i(go),$i(_o),$i(vo)}function xo(e){V(vo.current);var t=V(go.current),n=Pe(t,e.type);t!==n&&(I(_o,e),I(go,n))}function So(e){_o.current===e&&($i(go),$i(_o))}var Co=Qi(0);function wo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var To=[];function Eo(){for(var e=0;e<To.length;e++)To[e]._workInProgressVersionPrimary=null;To.length=0}var Do=C.ReactCurrentDispatcher,Oo=C.ReactCurrentBatchConfig,ko=0,Ao=null,jo=null,Mo=null,No=!1,Po=!1,Fo=0,Io=0;function Lo(){throw Error(r(321))}function Ro(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fr(e[n],t[n]))return!1;return!0}function zo(e,t,n,i,a,o){if(ko=o,Ao=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Do.current=e===null||e.memoizedState===null?bs:xs,e=n(i,a),Po){o=0;do{if(Po=!1,Fo=0,25<=o)throw Error(r(301));o+=1,Mo=jo=null,t.updateQueue=null,Do.current=Ss,e=n(i,a)}while(Po)}if(Do.current=ys,t=jo!==null&&jo.next!==null,ko=0,Mo=jo=Ao=null,No=!1,t)throw Error(r(300));return e}function Bo(){var e=Fo!==0;return Fo=0,e}function Vo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mo===null?Ao.memoizedState=Mo=e:Mo=Mo.next=e,Mo}function Ho(){if(jo===null){var e=Ao.alternate;e=e===null?null:e.memoizedState}else e=jo.next;var t=Mo===null?Ao.memoizedState:Mo.next;if(t!==null)Mo=t,jo=e;else{if(e===null)throw Error(r(310));jo=e,e={memoizedState:jo.memoizedState,baseState:jo.baseState,baseQueue:jo.baseQueue,queue:jo.queue,next:null},Mo===null?Ao.memoizedState=Mo=e:Mo=Mo.next=e}return Mo}function Uo(e,t){return typeof t==`function`?t(e):t}function Wo(e){var t=Ho(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=jo,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((ko&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,Ao.lanes|=d,nl|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Fr(i,t.memoizedState)||(Bs=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,Ao.lanes|=o,nl|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Go(e){var t=Ho(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Fr(o,t.memoizedState)||(Bs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Ko(){}function qo(e,t){var n=Ao,i=Ho(),a=t(),o=!Fr(i.memoizedState,a);if(o&&(i.memoizedState=a,Bs=!0),i=i.queue,is(Xo.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||Mo!==null&&Mo.memoizedState.tag&1){if(n.flags|=2048,H(9,Yo.bind(null,n,i,a,t),void 0,null),Yc===null)throw Error(r(349));ko&30||Jo(n,t,a)}return a}function Jo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ao.updateQueue,t===null?(t={lastEffect:null,stores:null},Ao.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Yo(e,t,n,r){t.value=n,t.getSnapshot=r,Zo(t)&&Qo(e)}function Xo(e,t,n){return n(function(){Zo(t)&&Qo(e)})}function Zo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Fr(e,n)}catch{return!0}}function Qo(e){var t=ao(e,1);t!==null&&bl(t,e,1,-1)}function $o(e){var t=Vo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:e},t.queue=e,e=e.dispatch=gs.bind(null,Ao,e),[t.memoizedState,e]}function H(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ao.updateQueue,t===null?(t={lastEffect:null,stores:null},Ao.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function es(){return Ho().memoizedState}function ts(e,t,n,r){var i=Vo();Ao.flags|=e,i.memoizedState=H(1|t,n,void 0,r===void 0?null:r)}function ns(e,t,n,r){var i=Ho();r=r===void 0?null:r;var a=void 0;if(jo!==null){var o=jo.memoizedState;if(a=o.destroy,r!==null&&Ro(r,o.deps)){i.memoizedState=H(t,n,a,r);return}}Ao.flags|=e,i.memoizedState=H(1|t,n,a,r)}function rs(e,t){return ts(8390656,8,e,t)}function is(e,t){return ns(2048,8,e,t)}function as(e,t){return ns(4,2,e,t)}function os(e,t){return ns(4,4,e,t)}function ss(e,t){if(typeof t==`function`)return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function cs(e,t,n){return n=n==null?null:n.concat([e]),ns(4,4,ss.bind(null,t,e),n)}function ls(){}function us(e,t){var n=Ho();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ro(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ds(e,t){var n=Ho();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ro(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function fs(e,t,n){return ko&21?(Fr(n,t)||(n=Ut(),Ao.lanes|=n,nl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Bs=!0),e.memoizedState=n)}function ps(e,t){var n=Jt;Jt=n!==0&&4>n?n:4,e(!0);var r=Oo.transition;Oo.transition={};try{e(!1),t()}finally{Jt=n,Oo.transition=r}}function ms(){return Ho().memoizedState}function hs(e,t,n){var r=yl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},U(e))_s(t,n);else if(n=io(e,t,n,r),n!==null){var i=vl();bl(n,e,r,i),vs(n,t,r)}}function gs(e,t,n){var r=yl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(U(e))_s(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Fr(s,o)){var c=t.interleaved;c===null?(i.next=i,ro(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=io(e,t,i,r),n!==null&&(i=vl(),bl(n,e,r,i),vs(n,t,r))}}function U(e){var t=e.alternate;return e===Ao||t!==null&&t===Ao}function _s(e,t){Po=No=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vs(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qt(e,n)}}var ys={readContext:to,useCallback:Lo,useContext:Lo,useEffect:Lo,useImperativeHandle:Lo,useInsertionEffect:Lo,useLayoutEffect:Lo,useMemo:Lo,useReducer:Lo,useRef:Lo,useState:Lo,useDebugValue:Lo,useDeferredValue:Lo,useTransition:Lo,useMutableSource:Lo,useSyncExternalStore:Lo,useId:Lo,unstable_isNewReconciler:!1},bs={readContext:to,useCallback:function(e,t){return Vo().memoizedState=[e,t===void 0?null:t],e},useContext:to,useEffect:rs,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),ts(4194308,4,ss.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ts(4194308,4,e,t)},useInsertionEffect:function(e,t){return ts(4,2,e,t)},useMemo:function(e,t){var n=Vo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Vo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=hs.bind(null,Ao,e),[r.memoizedState,e]},useRef:function(e){var t=Vo();return e={current:e},t.memoizedState=e},useState:$o,useDebugValue:ls,useDeferredValue:function(e){return Vo().memoizedState=e},useTransition:function(){var e=$o(!1),t=e[0];return e=ps.bind(null,e[1]),Vo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=Ao,a=Vo();if(R){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Yc===null)throw Error(r(349));ko&30||Jo(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,rs(Xo.bind(null,i,o,e),[e]),i.flags|=2048,H(9,Yo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=Vo(),t=Yc.identifierPrefix;if(R){var n=wa,r=Ca;n=(r&~(1<<32-Mt(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Fo++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=Io++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},xs={readContext:to,useCallback:us,useContext:to,useEffect:is,useImperativeHandle:cs,useInsertionEffect:as,useLayoutEffect:os,useMemo:ds,useReducer:Wo,useRef:es,useState:function(){return Wo(Uo)},useDebugValue:ls,useDeferredValue:function(e){return fs(Ho(),jo.memoizedState,e)},useTransition:function(){return[Wo(Uo)[0],Ho().memoizedState]},useMutableSource:Ko,useSyncExternalStore:qo,useId:ms,unstable_isNewReconciler:!1},Ss={readContext:to,useCallback:us,useContext:to,useEffect:is,useImperativeHandle:cs,useInsertionEffect:as,useLayoutEffect:os,useMemo:ds,useReducer:Go,useRef:es,useState:function(){return Go(Uo)},useDebugValue:ls,useDeferredValue:function(e){var t=Ho();return jo===null?t.memoizedState=e:fs(t,jo.memoizedState,e)},useTransition:function(){return[Go(Uo)[0],Ho().memoizedState]},useMutableSource:Ko,useSyncExternalStore:qo,useId:ms,unstable_isNewReconciler:!1};function Cs(e,t){if(e&&e.defaultProps){for(var n in t=de({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ws(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:de({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ts={isMounted:function(e){return(e=e._reactInternals)?ft(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=vl(),i=yl(e),a=co(r,i);a.payload=t,n!=null&&(a.callback=n),t=lo(e,a,i),t!==null&&(bl(t,e,i,r),uo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=vl(),i=yl(e),a=co(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=lo(e,a,i),t!==null&&(bl(t,e,i,r),uo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=vl(),r=yl(e),i=co(n,r);i.tag=2,t!=null&&(i.callback=t),t=lo(e,i,r),t!==null&&(bl(t,e,r,n),uo(t,e,r))}};function Es(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ir(n,r)||!Ir(i,a):!0}function Ds(e,t,n){var r=!1,i=ea,a=t.contextType;return typeof a==`object`&&a?a=to(a):(i=aa(t)?ra:ta.current,r=t.contextTypes,a=(r=r!=null)?ia(e,i):ea),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ts,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Os(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ts.enqueueReplaceState(t,t.state,null)}function ks(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},B(e);var a=t.contextType;typeof a==`object`&&a?i.context=to(a):(a=aa(t)?ra:ta.current,i.context=ia(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(ws(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&Ts.enqueueReplaceState(i,i.state,null),po(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function As(e,t){try{var n=``,r=t;do n+=me(r),r=r.return;while(r);var i=n}catch(e){i=`
     5`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{pe=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?fe(e):``}function he(e){switch(e.tag){case 5:return fe(e.type);case 16:return fe(`Lazy`);case 13:return fe(`Suspense`);case 19:return fe(`SuspenseList`);case 0:case 2:case 15:return e=me(e.type,!1),e;case 11:return e=me(e.type.render,!1),e;case 1:return e=me(e.type,!0),e;default:return``}}function ge(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case E:return`Fragment`;case T:return`Portal`;case te:return`Profiler`;case ee:return`StrictMode`;case O:return`Suspense`;case ie:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case ne:return(e.displayName||`Context`)+`.Consumer`;case D:return(e._context.displayName||`Context`)+`.Provider`;case re:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ae:return t=e.displayName||null,t===null?ge(e.type)||`Memo`:t;case oe:t=e._payload,e=e._init;try{return ge(e(t))}catch{}}return null}function _e(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return ge(t);case 8:return t===ee?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function ve(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function ye(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function k(e){var t=ye(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function be(e){e._valueTracker||=k(e)}function xe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=ye(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Se(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Ce(e,t){var n=t.checked;return ue({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function we(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=ve(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function Te(e,t){t=t.checked,t!=null&&S(e,`checked`,t,!1)}function Ee(e,t){Te(e,t);var n=ve(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?Oe(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&Oe(e,t.type,ve(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function De(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function Oe(e,t,n){(t!==`number`||Se(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var ke=Array.isArray;function Ae(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+ve(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function A(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return ue({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function je(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(ke(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:ve(n)}}function Me(e,t){var n=ve(t.value),r=ve(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function j(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function Ne(e){switch(e){case`svg`:return`http://www.w3.org/2000/svg`;case`math`:return`http://www.w3.org/1998/Math/MathML`;default:return`http://www.w3.org/1999/xhtml`}}function Pe(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?Ne(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var Fe,Ie=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(Fe||=document.createElement(`div`),Fe.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=Fe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Le(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Re={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ze=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Re).forEach(function(e){ze.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Re[t]=Re[e]})});function Be(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Re.hasOwnProperty(e)&&Re[e]?(``+t).trim():t+`px`}function M(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Be(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Ve=ue({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function He(e,t){if(t){if(Ve[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function Ue(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var We=null;function Ge(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ke=null,qe=null,Je=null;function Ye(e){if(e=qi(e)){if(typeof Ke!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Yi(t),Ke(e.stateNode,e.type,t))}}function Xe(e){qe?Je?Je.push(e):Je=[e]:qe=e}function Ze(){if(qe){var e=qe,t=Je;if(Je=qe=null,Ye(e),t)for(e=0;e<t.length;e++)Ye(t[e])}}function Qe(e,t){return e(t)}function $e(){}var et=!1;function tt(e,t,n){if(et)return e(t,n);et=!0;try{return Qe(e,t,n)}finally{et=!1,(qe!==null||Je!==null)&&($e(),Ze())}}function nt(e,t){var n=e.stateNode;if(n===null)return null;var i=Yi(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var rt=!1;if(c)try{var it={};Object.defineProperty(it,"passive",{get:function(){rt=!0}}),window.addEventListener(`test`,it,it),window.removeEventListener(`test`,it,it)}catch{rt=!1}function at(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var ot=!1,N=null,st=!1,ct=null,lt={onError:function(e){ot=!0,N=e}};function ut(e,t,n,r,i,a,o,s,c){ot=!1,N=null,at.apply(lt,arguments)}function dt(e,t,n,i,a,o,s,c,l){if(ut.apply(this,arguments),ot){if(ot){var u=N;ot=!1,N=null}else throw Error(r(198));st||(st=!0,ct=u)}}function ft(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function pt(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function mt(e){if(ft(e)!==e)throw Error(r(188))}function ht(e){var t=e.alternate;if(!t){if(t=ft(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return mt(a),e;if(o===i)return mt(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function gt(e){return e=ht(e),e===null?null:_t(e)}function _t(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=_t(e);if(t!==null)return t;e=e.sibling}return null}var vt=n.unstable_scheduleCallback,yt=n.unstable_cancelCallback,bt=n.unstable_shouldYield,xt=n.unstable_requestPaint,St=n.unstable_now,Ct=n.unstable_getCurrentPriorityLevel,wt=n.unstable_ImmediatePriority,Tt=n.unstable_UserBlockingPriority,Et=n.unstable_NormalPriority,Dt=n.unstable_LowPriority,Ot=n.unstable_IdlePriority,kt=null,At=null;function jt(e){if(At&&typeof At.onCommitFiberRoot==`function`)try{At.onCommitFiberRoot(kt,e,void 0,(e.current.flags&128)==128)}catch{}}var Mt=Math.clz32?Math.clz32:Ft,Nt=Math.log,Pt=Math.LN2;function Ft(e){return e>>>=0,e===0?32:31-(Nt(e)/Pt|0)|0}var It=64,Lt=4194304;function Rt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function zt(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=Rt(a))):r=Rt(s)}else o=n&~i,o===0?a!==0&&(r=Rt(a)):r=Rt(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Mt(t),i=1<<n,r|=e[n],t&=~i;return r}function Bt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vt(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Mt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Bt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function Ht(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Ut(){var e=It;return It<<=1,!(It&4194240)&&(It=64),e}function Wt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Gt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Mt(t),e[t]=n}function Kt(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Mt(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function qt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Mt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Jt=0;function Yt(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Xt,Zt,Qt,$t,en,tn=!1,nn=[],rn=null,an=null,on=null,sn=new Map,cn=new Map,ln=[],un=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit`.split(` `);function dn(e,t){switch(e){case`focusin`:case`focusout`:rn=null;break;case`dragenter`:case`dragleave`:an=null;break;case`mouseover`:case`mouseout`:on=null;break;case`pointerover`:case`pointerout`:sn.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:cn.delete(t.pointerId)}}function fn(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=qi(t),t!==null&&Zt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function pn(e,t,n,r,i){switch(t){case`focusin`:return rn=fn(rn,e,t,n,r,i),!0;case`dragenter`:return an=fn(an,e,t,n,r,i),!0;case`mouseover`:return on=fn(on,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return sn.set(a,fn(sn.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,cn.set(a,fn(cn.get(a)||null,e,t,n,r,i)),!0}return!1}function mn(e){var t=Ki(e.target);if(t!==null){var n=ft(t);if(n!==null){if(t=n.tag,t===13){if(t=pt(n),t!==null){e.blockedOn=t,en(e.priority,function(){Qt(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function hn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=En(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);We=r,n.target.dispatchEvent(r),We=null}else return t=qi(n),t!==null&&Zt(t),e.blockedOn=n,!1;t.shift()}return!0}function gn(e,t,n){hn(e)&&n.delete(t)}function _n(){tn=!1,rn!==null&&hn(rn)&&(rn=null),an!==null&&hn(an)&&(an=null),on!==null&&hn(on)&&(on=null),sn.forEach(gn),cn.forEach(gn)}function vn(e,t){e.blockedOn===t&&(e.blockedOn=null,tn||(tn=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,_n)))}function yn(e){function t(t){return vn(t,e)}if(0<nn.length){vn(nn[0],e);for(var n=1;n<nn.length;n++){var r=nn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(rn!==null&&vn(rn,e),an!==null&&vn(an,e),on!==null&&vn(on,e),sn.forEach(t),cn.forEach(t),n=0;n<ln.length;n++)r=ln[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ln.length&&(n=ln[0],n.blockedOn===null);)mn(n),n.blockedOn===null&&ln.shift()}var bn=C.ReactCurrentBatchConfig,xn=!0;function Sn(e,t,n,r){var i=Jt,a=bn.transition;bn.transition=null;try{Jt=1,wn(e,t,n,r)}finally{Jt=i,bn.transition=a}}function Cn(e,t,n,r){var i=Jt,a=bn.transition;bn.transition=null;try{Jt=4,wn(e,t,n,r)}finally{Jt=i,bn.transition=a}}function wn(e,t,n,r){if(xn){var i=En(e,t,n,r);if(i===null)vi(e,t,r,Tn,n),dn(e,r);else if(pn(i,e,t,n,r))r.stopPropagation();else if(dn(e,r),t&4&&-1<un.indexOf(e)){for(;i!==null;){var a=qi(i);if(a!==null&&Xt(a),a=En(e,t,n,r),a===null&&vi(e,t,r,Tn,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else vi(e,t,r,null,n)}}var Tn=null;function En(e,t,n,r){if(Tn=null,e=Ge(r),e=Ki(e),e!==null)if(t=ft(e),t===null)e=null;else if(n=t.tag,n===13){if(e=pt(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Tn=e,null}function Dn(e){switch(e){case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 1;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`toggle`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 4;case`message`:switch(Ct()){case wt:return 1;case Tt:return 4;case Et:case Dt:return 16;case Ot:return 536870912;default:return 16}default:return 16}}var On=null,kn=null,An=null;function jn(){if(An)return An;var e,t=kn,n=t.length,r,i=`value`in On?On.value:On.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return An=i.slice(e,1<r?1-r:void 0)}function Mn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Nn(){return!0}function Pn(){return!1}function Fn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Nn:Pn,this.isPropagationStopped=Pn,this}return ue(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Nn)},persist:function(){},isPersistent:Nn}),t}var In={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ln=Fn(In),P=ue({},In,{view:0,detail:0}),Rn=Fn(P),zn,Bn,Vn,Hn=ue({},P,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Vn&&(Vn&&e.type===`mousemove`?(zn=e.screenX-Vn.screenX,Bn=e.screenY-Vn.screenY):Bn=zn=0,Vn=e),zn)},movementY:function(e){return`movementY`in e?e.movementY:Bn}}),Un=Fn(Hn),Wn=Fn(ue({},Hn,{dataTransfer:0})),Gn=Fn(ue({},P,{relatedTarget:0})),Kn=Fn(ue({},In,{animationName:0,elapsedTime:0,pseudoElement:0})),qn=Fn(ue({},In,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Jn=Fn(ue({},In,{data:0})),Yn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Xn={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`},Zn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function F(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zn[e])?!!t[e]:!1}function Qn(){return F}var $n=Fn(ue({},P,{key:function(e){if(e.key){var t=Yn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Mn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Xn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qn,charCode:function(e){return e.type===`keypress`?Mn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Mn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),er=Fn(ue({},Hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),tr=Fn(ue({},P,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qn})),nr=Fn(ue({},In,{propertyName:0,elapsedTime:0,pseudoElement:0})),rr=Fn(ue({},Hn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),ir=[9,13,27,32],ar=c&&`CompositionEvent`in window,or=null;c&&`documentMode`in document&&(or=document.documentMode);var sr=c&&`TextEvent`in window&&!or,cr=c&&(!ar||or&&8<or&&11>=or),lr=` `,ur=!1;function dr(e,t){switch(e){case`keyup`:return ir.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function fr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var pr=!1;function mr(e,t){switch(e){case`compositionend`:return fr(t);case`keypress`:return t.which===32?(ur=!0,lr):null;case`textInput`:return e=t.data,e===lr&&ur?null:e;default:return null}}function hr(e,t){if(pr)return e===`compositionend`||!ar&&dr(e,t)?(e=jn(),An=kn=On=null,pr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return cr&&t.locale!==`ko`?null:t.data;default:return null}}var gr={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 _r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!gr[e.type]:t===`textarea`}function vr(e,t,n,r){Xe(r),t=bi(t,`onChange`),0<t.length&&(n=new Ln(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var yr=null,br=null;function xr(e){fi(e,0)}function Sr(e){if(xe(Ji(e)))return e}function Cr(e,t){if(e===`change`)return t}var wr=!1;if(c){var Tr;if(c){var Er=`oninput`in document;if(!Er){var Dr=document.createElement(`div`);Dr.setAttribute(`oninput`,`return;`),Er=typeof Dr.oninput==`function`}Tr=Er}else Tr=!1;wr=Tr&&(!document.documentMode||9<document.documentMode)}function Or(){yr&&(yr.detachEvent(`onpropertychange`,kr),br=yr=null)}function kr(e){if(e.propertyName===`value`&&Sr(br)){var t=[];vr(t,br,e,Ge(e)),tt(xr,t)}}function Ar(e,t,n){e===`focusin`?(Or(),yr=t,br=n,yr.attachEvent(`onpropertychange`,kr)):e===`focusout`&&Or()}function jr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Sr(br)}function Mr(e,t){if(e===`click`)return Sr(t)}function Nr(e,t){if(e===`input`||e===`change`)return Sr(t)}function Pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Fr=typeof Object.is==`function`?Object.is:Pr;function Ir(e,t){if(Fr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!l.call(t,i)||!Fr(e[i],t[i]))return!1}return!0}function Lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rr(e,t){var n=Lr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Lr(n)}}function zr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Br(){for(var e=window,t=Se();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Se(e.document)}return t}function Vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}function Hr(e){var t=Br(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&zr(n.ownerDocument.documentElement,n)){if(r!==null&&Vr(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Rr(n,a);var o=Rr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ur=c&&`documentMode`in document&&11>=document.documentMode,Wr=null,Gr=null,Kr=null,qr=!1;function Jr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qr||Wr==null||Wr!==Se(r)||(r=Wr,`selectionStart`in r&&Vr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Kr&&Ir(Kr,r)||(Kr=r,r=bi(Gr,`onSelect`),0<r.length&&(t=new Ln(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Wr)))}function Yr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Xr={animationend:Yr(`Animation`,`AnimationEnd`),animationiteration:Yr(`Animation`,`AnimationIteration`),animationstart:Yr(`Animation`,`AnimationStart`),transitionend:Yr(`Transition`,`TransitionEnd`)},Zr={},Qr={};c&&(Qr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Xr.animationend.animation,delete Xr.animationiteration.animation,delete Xr.animationstart.animation),`TransitionEvent`in window||delete Xr.transitionend.transition);function $r(e){if(Zr[e])return Zr[e];if(!Xr[e])return e;var t=Xr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Qr)return Zr[e]=t[n];return e}var ei=$r(`animationend`),ti=$r(`animationiteration`),ni=$r(`animationstart`),ri=$r(`transitionend`),ii=new Map,ai=`abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);function oi(e,t){ii.set(e,t),o(t,[e])}for(var si=0;si<ai.length;si++){var ci=ai[si];oi(ci.toLowerCase(),`on`+(ci[0].toUpperCase()+ci.slice(1)))}oi(ei,`onAnimationEnd`),oi(ti,`onAnimationIteration`),oi(ni,`onAnimationStart`),oi(`dblclick`,`onDoubleClick`),oi(`focusin`,`onFocus`),oi(`focusout`,`onBlur`),oi(ri,`onTransitionEnd`),s(`onMouseEnter`,[`mouseout`,`mouseover`]),s(`onMouseLeave`,[`mouseout`,`mouseover`]),s(`onPointerEnter`,[`pointerout`,`pointerover`]),s(`onPointerLeave`,[`pointerout`,`pointerover`]),o(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),o(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),o(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),o(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var li=`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(` `),ui=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(li));function di(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,dt(r,t,void 0,e),e.currentTarget=null}function fi(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;di(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;di(i,s,l),a=c}}}if(st)throw e=ct,st=!1,ct=null,e}function pi(e,t){var n=t[Ui];n===void 0&&(n=t[Ui]=new Set);var r=e+`__bubble`;n.has(r)||(_i(t,e,2,!1),n.add(r))}function mi(e,t,n){var r=0;t&&(r|=4),_i(n,e,r,t)}var hi=`_reactListening`+Math.random().toString(36).slice(2);function gi(e){if(!e[hi]){e[hi]=!0,i.forEach(function(t){t!==`selectionchange`&&(ui.has(t)||mi(t,!1,e),mi(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hi]||(t[hi]=!0,mi(`selectionchange`,!1,t))}}function _i(e,t,n,r){switch(Dn(t)){case 1:var i=Sn;break;case 4:i=Cn;break;default:i=wn}n=i.bind(null,t,n,e),i=void 0,!rt||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function vi(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Ki(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}tt(function(){var r=a,i=Ge(n),o=[];a:{var s=ii.get(e);if(s!==void 0){var c=Ln,l=e;switch(e){case`keypress`:if(Mn(n)===0)break a;case`keydown`:case`keyup`:c=$n;break;case`focusin`:l=`focus`,c=Gn;break;case`focusout`:l=`blur`,c=Gn;break;case`beforeblur`:case`afterblur`:c=Gn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Un;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Wn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=tr;break;case ei:case ti:case ni:c=Kn;break;case ri:c=nr;break;case`scroll`:c=Rn;break;case`wheel`:c=rr;break;case`copy`:case`cut`:case`paste`:c=qn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=er}var u=!!(t&4),d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=nt(p,f),h!=null&&u.push(yi(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==We&&(l=n.relatedTarget||n.fromElement)&&(Ki(l)||l[Hi]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Ki(l):null,l!==null&&(d=ft(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Un,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=er,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Ji(c),m=l==null?s:Ji(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Ki(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=xi(m))p++;for(m=0,h=f;h;h=xi(h))m++;for(;0<p-m;)u=xi(u),p--;for(;0<m-p;)f=xi(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=xi(u),f=xi(f)}u=null}else u=null;c!==null&&Si(o,s,c,u,!1),l!==null&&d!==null&&Si(o,d,l,u,!0)}}a:{if(s=r?Ji(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=Cr;else if(_r(s))if(wr)g=Nr;else{g=jr;var _=Ar}else(c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Mr);if(g&&=g(e,r)){vr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&Oe(s,`number`,s.value)}switch(_=r?Ji(r):window,e){case`focusin`:(_r(_)||_.contentEditable===`true`)&&(Wr=_,Gr=r,Kr=null);break;case`focusout`:Kr=Gr=Wr=null;break;case`mousedown`:qr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:qr=!1,Jr(o,n,i);break;case`selectionchange`:if(Ur)break;case`keydown`:case`keyup`:Jr(o,n,i)}var v;if(ar)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else pr?dr(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(cr&&n.locale!==`ko`&&(pr||y!==`onCompositionStart`?y===`onCompositionEnd`&&pr&&(v=jn()):(On=i,kn=`value`in On?On.value:On.textContent,pr=!0)),_=bi(r,y),0<_.length&&(y=new Jn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=fr(n),v!==null&&(y.data=v)))),(v=sr?mr(e,n):hr(e,n))&&(r=bi(r,`onBeforeInput`),0<r.length&&(i=new Jn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}fi(o,t)})}function yi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function bi(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=nt(e,n),a!=null&&r.unshift(yi(e,a,i)),a=nt(e,t),a!=null&&r.push(yi(e,a,i))),e=e.return}return r}function xi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Si(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=nt(n,a),c!=null&&o.unshift(yi(n,c,s))):i||(c=nt(n,a),c!=null&&o.push(yi(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ci=/\r\n?/g,wi=/\u0000|\uFFFD/g;function Ti(e){return(typeof e==`string`?e:``+e).replace(Ci,`
     6`).replace(wi,``)}function Ei(e,t,n){if(t=Ti(t),Ti(e)!==t&&n)throw Error(r(425))}function Di(){}var Oi=null,ki=null;function Ai(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ji=typeof setTimeout==`function`?setTimeout:void 0,Mi=typeof clearTimeout==`function`?clearTimeout:void 0,Ni=typeof Promise==`function`?Promise:void 0,Pi=typeof queueMicrotask==`function`?queueMicrotask:Ni===void 0?ji:function(e){return Ni.resolve(null).then(e).catch(Fi)};function Fi(e){setTimeout(function(){throw e})}function Ii(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),yn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);yn(t)}function Li(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function Ri(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var zi=Math.random().toString(36).slice(2),Bi=`__reactFiber$`+zi,Vi=`__reactProps$`+zi,Hi=`__reactContainer$`+zi,Ui=`__reactEvents$`+zi,Wi=`__reactListeners$`+zi,Gi=`__reactHandles$`+zi;function Ki(e){var t=e[Bi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Hi]||n[Bi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ri(e);e!==null;){if(n=e[Bi])return n;e=Ri(e)}return t}e=n,n=e.parentNode}return null}function qi(e){return e=e[Bi]||e[Hi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ji(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Yi(e){return e[Vi]||null}var Xi=[],Zi=-1;function Qi(e){return{current:e}}function $i(e){0>Zi||(e.current=Xi[Zi],Xi[Zi]=null,Zi--)}function ea(e,t){Zi++,Xi[Zi]=e.current,e.current=t}var ta={},na=Qi(ta),ra=Qi(!1),ia=ta;function aa(e,t){var n=e.type.contextTypes;if(!n)return ta;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function I(e){return e=e.childContextTypes,e!=null}function oa(){$i(ra),$i(na)}function sa(e,t,n){if(na.current!==ta)throw Error(r(168));ea(na,t),ea(ra,n)}function ca(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,_e(e)||`Unknown`,a));return ue({},n,i)}function la(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ta,ia=na.current,ea(na,e),ea(ra,ra.current),!0}function ua(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=ca(e,t,ia),i.__reactInternalMemoizedMergedChildContext=e,$i(ra),$i(na),ea(na,e)):$i(ra),ea(ra,n)}var da=null,fa=!1,pa=!1;function ma(e){da===null?da=[e]:da.push(e)}function ha(e){fa=!0,ma(e)}function ga(){if(!pa&&da!==null){pa=!0;var e=0,t=Jt;try{var n=da;for(Jt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}da=null,fa=!1}catch(t){throw da!==null&&(da=da.slice(e+1)),vt(wt,ga),t}finally{Jt=t,pa=!1}}return null}var L=[],_a=0,va=null,ya=0,ba=[],xa=0,Sa=null,Ca=1,wa=``;function Ta(e,t){L[_a++]=ya,L[_a++]=va,va=e,ya=t}function Ea(e,t,n){ba[xa++]=Ca,ba[xa++]=wa,ba[xa++]=Sa,Sa=e;var r=Ca;e=wa;var i=32-Mt(r)-1;r&=~(1<<i),n+=1;var a=32-Mt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ca=1<<32-Mt(t)+i|n<<i|r,wa=a+e}else Ca=1<<a|n<<i|r,wa=e}function Da(e){e.return!==null&&(Ta(e,1),Ea(e,1,0))}function Oa(e){for(;e===va;)va=L[--_a],L[_a]=null,ya=L[--_a],L[_a]=null;for(;e===Sa;)Sa=ba[--xa],ba[xa]=null,wa=ba[--xa],ba[xa]=null,Ca=ba[--xa],ba[xa]=null}var ka=null,Aa=null,ja=!1,Ma=null;function Na(e,t){var n=Xl(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Pa(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null&&(e.stateNode=t,ka=e,Aa=Li(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t!==null&&(e.stateNode=t,ka=e,Aa=null,!0);case 13:return t=t.nodeType===8?t:null,t!==null&&(n=Sa===null?null:{id:Ca,overflow:wa},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Xl(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ka=e,Aa=null,!0);default:return!1}}function Fa(e){return!!(e.mode&1)&&!(e.flags&128)}function Ia(e){if(ja){var t=Aa;if(t){var n=t;if(!Pa(e,t)){if(Fa(e))throw Error(r(418));t=Li(n.nextSibling);var i=ka;t&&Pa(e,t)?Na(i,n):(e.flags=e.flags&-4097|2,ja=!1,ka=e)}}else{if(Fa(e))throw Error(r(418));e.flags=e.flags&-4097|2,ja=!1,ka=e}}}function R(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ka=e}function La(e){if(e!==ka)return!1;if(!ja)return R(e),ja=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!Ai(e.type,e.memoizedProps)),t&&=Aa){if(Fa(e))throw Ra(),Error(r(418));for(;t;)Na(e,t),t=Li(t.nextSibling)}if(R(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){Aa=Li(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}Aa=null}}else Aa=ka?Li(e.stateNode.nextSibling):null;return!0}function Ra(){for(var e=Aa;e;)e=Li(e.nextSibling)}function za(){Aa=ka=null,ja=!1}function Ba(e){Ma===null?Ma=[e]:Ma.push(e)}var Va=C.ReactCurrentBatchConfig;function Ha(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function Ua(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function Wa(e){var t=e._init;return t(e._payload)}function Ga(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=$l(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ru(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===E?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===oe&&Wa(i)===t.type)?(r=a(t,n.props),r.ref=Ha(e,t,n),r.return=e,r):(r=eu(n.type,n.key,n.props,null,e.mode,r),r.ref=Ha(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=iu(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=tu(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=ru(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case w:return n=eu(t.type,t.key,t.props,null,e.mode,n),n.ref=Ha(e,null,t),n.return=e,n;case T:return t=iu(t,e.mode,n),t.return=e,t;case oe:var r=t._init;return f(e,r(t._payload),n)}if(ke(t)||le(t))return t=tu(t,e.mode,n,null),t.return=e,t;Ua(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case w:return n.key===i?l(e,t,n,r):null;case T:return n.key===i?u(e,t,n,r):null;case oe:return i=n._init,p(e,t,i(n._payload),r)}if(ke(n)||le(n))return i===null?d(e,t,n,r,null):null;Ua(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case w:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case T:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case oe:var a=r._init;return m(e,t,n,a(r._payload),i)}if(ke(r)||le(r))return e=e.get(n)||null,d(t,e,r,i,null);Ua(t,r)}return null}function h(r,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),ja&&Ta(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return ja&&Ta(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),ja&&Ta(r,h),l}function g(a,s,c,l){var u=le(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),ja&&Ta(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return ja&&Ta(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),ja&&Ta(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===E&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case w:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===E){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===oe&&Wa(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Ha(e,l,i),r.return=e,e=r;break a}n(e,l);break}t(e,l),l=l.sibling}i.type===E?(r=tu(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=eu(i.type,i.key,i.props,null,e.mode,o),o.ref=Ha(e,r,i),o.return=e,e=o)}return s(e);case T:a:{for(l=i.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}else{n(e,r);break}t(e,r),r=r.sibling}r=iu(i,e.mode,o),r.return=e,e=r}return s(e);case oe:return l=i._init,_(e,r,l(i._payload),o)}if(ke(i))return h(e,r,i,o);if(le(i))return g(e,r,i,o);Ua(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=ru(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Ka=Ga(!0),qa=Ga(!1),z=Qi(null),Ja=null,Ya=null,Xa=null;function Za(){Xa=Ya=Ja=null}function Qa(e){var t=z.current;$i(z),e._currentValue=t}function $a(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function eo(e,t){Ja=e,Xa=Ya=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Bs=!0),e.firstContext=null)}function to(e){var t=e._currentValue;if(Xa!==e)if(e={context:e,memoizedValue:t,next:null},Ya===null){if(Ja===null)throw Error(r(308));Ya=e,Ja.dependencies={lanes:0,firstContext:e}}else Ya=Ya.next=e;return t}var no=null;function ro(e){no===null?no=[e]:no.push(e)}function io(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,ro(t)):(n.next=i.next,i.next=n),t.interleaved=n,ao(e,r)}function ao(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var oo=!1;function so(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function co(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function lo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function uo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Yc&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ao(e,n)}return i=r.interleaved,i===null?(t.next=t,ro(r)):(t.next=i.next,i.next=t),r.interleaved=t,ao(e,n)}function fo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qt(e,n)}}function po(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function B(e,t,n,r){var i=e.updateQueue;oo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=ue({},d,f);break a;case 2:oo=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);nl|=o,e.lanes=o,e.memoizedState=d}}function mo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var ho={},go=Qi(ho),_o=Qi(ho),vo=Qi(ho);function yo(e){if(e===ho)throw Error(r(174));return e}function bo(e,t){switch(ea(vo,t),ea(_o,e),ea(go,ho),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Pe(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Pe(t,e)}$i(go),ea(go,t)}function xo(){$i(go),$i(_o),$i(vo)}function So(e){yo(vo.current);var t=yo(go.current),n=Pe(t,e.type);t!==n&&(ea(_o,e),ea(go,n))}function Co(e){_o.current===e&&($i(go),$i(_o))}var wo=Qi(0);function V(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var To=[];function Eo(){for(var e=0;e<To.length;e++)To[e]._workInProgressVersionPrimary=null;To.length=0}var Do=C.ReactCurrentDispatcher,Oo=C.ReactCurrentBatchConfig,ko=0,Ao=null,jo=null,Mo=null,No=!1,Po=!1,Fo=0,Io=0;function Lo(){throw Error(r(321))}function Ro(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fr(e[n],t[n]))return!1;return!0}function zo(e,t,n,i,a,o){if(ko=o,Ao=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Do.current=e===null||e.memoizedState===null?xs:Ss,e=n(i,a),Po){o=0;do{if(Po=!1,Fo=0,25<=o)throw Error(r(301));o+=1,Mo=jo=null,t.updateQueue=null,Do.current=U,e=n(i,a)}while(Po)}if(Do.current=bs,t=jo!==null&&jo.next!==null,ko=0,Mo=jo=Ao=null,No=!1,t)throw Error(r(300));return e}function Bo(){var e=Fo!==0;return Fo=0,e}function Vo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mo===null?Ao.memoizedState=Mo=e:Mo=Mo.next=e,Mo}function Ho(){if(jo===null){var e=Ao.alternate;e=e===null?null:e.memoizedState}else e=jo.next;var t=Mo===null?Ao.memoizedState:Mo.next;if(t!==null)Mo=t,jo=e;else{if(e===null)throw Error(r(310));jo=e,e={memoizedState:jo.memoizedState,baseState:jo.baseState,baseQueue:jo.baseQueue,queue:jo.queue,next:null},Mo===null?Ao.memoizedState=Mo=e:Mo=Mo.next=e}return Mo}function Uo(e,t){return typeof t==`function`?t(e):t}function Wo(e){var t=Ho(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=jo,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((ko&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,Ao.lanes|=d,nl|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Fr(i,t.memoizedState)||(Bs=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,Ao.lanes|=o,nl|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Go(e){var t=Ho(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Fr(o,t.memoizedState)||(Bs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Ko(){}function qo(e,t){var n=Ao,i=Ho(),a=t(),o=!Fr(i.memoizedState,a);if(o&&(i.memoizedState=a,Bs=!0),i=i.queue,as(Xo.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||Mo!==null&&Mo.memoizedState.tag&1){if(n.flags|=2048,es(9,Yo.bind(null,n,i,a,t),void 0,null),Xc===null)throw Error(r(349));ko&30||Jo(n,t,a)}return a}function Jo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ao.updateQueue,t===null?(t={lastEffect:null,stores:null},Ao.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Yo(e,t,n,r){t.value=n,t.getSnapshot=r,Zo(t)&&Qo(e)}function Xo(e,t,n){return n(function(){Zo(t)&&Qo(e)})}function Zo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Fr(e,n)}catch{return!0}}function Qo(e){var t=ao(e,1);t!==null&&bl(t,e,1,-1)}function $o(e){var t=Vo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:e},t.queue=e,e=e.dispatch=gs.bind(null,Ao,e),[t.memoizedState,e]}function es(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ao.updateQueue,t===null?(t={lastEffect:null,stores:null},Ao.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ts(){return Ho().memoizedState}function ns(e,t,n,r){var i=Vo();Ao.flags|=e,i.memoizedState=es(1|t,n,void 0,r===void 0?null:r)}function rs(e,t,n,r){var i=Ho();r=r===void 0?null:r;var a=void 0;if(jo!==null){var o=jo.memoizedState;if(a=o.destroy,r!==null&&Ro(r,o.deps)){i.memoizedState=es(t,n,a,r);return}}Ao.flags|=e,i.memoizedState=es(1|t,n,a,r)}function is(e,t){return ns(8390656,8,e,t)}function as(e,t){return rs(2048,8,e,t)}function H(e,t){return rs(4,2,e,t)}function os(e,t){return rs(4,4,e,t)}function ss(e,t){if(typeof t==`function`)return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function cs(e,t,n){return n=n==null?null:n.concat([e]),rs(4,4,ss.bind(null,t,e),n)}function ls(){}function us(e,t){var n=Ho();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ro(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ds(e,t){var n=Ho();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ro(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function fs(e,t,n){return ko&21?(Fr(n,t)||(n=Ut(),Ao.lanes|=n,nl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Bs=!0),e.memoizedState=n)}function ps(e,t){var n=Jt;Jt=n!==0&&4>n?n:4,e(!0);var r=Oo.transition;Oo.transition={};try{e(!1),t()}finally{Jt=n,Oo.transition=r}}function ms(){return Ho().memoizedState}function hs(e,t,n){var r=yl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},_s(e))vs(t,n);else if(n=io(e,t,n,r),n!==null){var i=vl();bl(n,e,r,i),ys(n,t,r)}}function gs(e,t,n){var r=yl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(_s(e))vs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Fr(s,o)){var c=t.interleaved;c===null?(i.next=i,ro(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=io(e,t,i,r),n!==null&&(i=vl(),bl(n,e,r,i),ys(n,t,r))}}function _s(e){var t=e.alternate;return e===Ao||t!==null&&t===Ao}function vs(e,t){Po=No=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ys(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qt(e,n)}}var bs={readContext:to,useCallback:Lo,useContext:Lo,useEffect:Lo,useImperativeHandle:Lo,useInsertionEffect:Lo,useLayoutEffect:Lo,useMemo:Lo,useReducer:Lo,useRef:Lo,useState:Lo,useDebugValue:Lo,useDeferredValue:Lo,useTransition:Lo,useMutableSource:Lo,useSyncExternalStore:Lo,useId:Lo,unstable_isNewReconciler:!1},xs={readContext:to,useCallback:function(e,t){return Vo().memoizedState=[e,t===void 0?null:t],e},useContext:to,useEffect:is,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),ns(4194308,4,ss.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ns(4194308,4,e,t)},useInsertionEffect:function(e,t){return ns(4,2,e,t)},useMemo:function(e,t){var n=Vo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Vo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=hs.bind(null,Ao,e),[r.memoizedState,e]},useRef:function(e){var t=Vo();return e={current:e},t.memoizedState=e},useState:$o,useDebugValue:ls,useDeferredValue:function(e){return Vo().memoizedState=e},useTransition:function(){var e=$o(!1),t=e[0];return e=ps.bind(null,e[1]),Vo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=Ao,a=Vo();if(ja){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Xc===null)throw Error(r(349));ko&30||Jo(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,is(Xo.bind(null,i,o,e),[e]),i.flags|=2048,es(9,Yo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=Vo(),t=Xc.identifierPrefix;if(ja){var n=wa,r=Ca;n=(r&~(1<<32-Mt(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Fo++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=Io++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},Ss={readContext:to,useCallback:us,useContext:to,useEffect:as,useImperativeHandle:cs,useInsertionEffect:H,useLayoutEffect:os,useMemo:ds,useReducer:Wo,useRef:ts,useState:function(){return Wo(Uo)},useDebugValue:ls,useDeferredValue:function(e){return fs(Ho(),jo.memoizedState,e)},useTransition:function(){return[Wo(Uo)[0],Ho().memoizedState]},useMutableSource:Ko,useSyncExternalStore:qo,useId:ms,unstable_isNewReconciler:!1},U={readContext:to,useCallback:us,useContext:to,useEffect:as,useImperativeHandle:cs,useInsertionEffect:H,useLayoutEffect:os,useMemo:ds,useReducer:Go,useRef:ts,useState:function(){return Go(Uo)},useDebugValue:ls,useDeferredValue:function(e){var t=Ho();return jo===null?t.memoizedState=e:fs(t,jo.memoizedState,e)},useTransition:function(){return[Go(Uo)[0],Ho().memoizedState]},useMutableSource:Ko,useSyncExternalStore:qo,useId:ms,unstable_isNewReconciler:!1};function Cs(e,t){if(e&&e.defaultProps){for(var n in t=ue({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ws(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ue({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ts={isMounted:function(e){return(e=e._reactInternals)?ft(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=vl(),i=yl(e),a=lo(r,i);a.payload=t,n!=null&&(a.callback=n),t=uo(e,a,i),t!==null&&(bl(t,e,i,r),fo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=vl(),i=yl(e),a=lo(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=uo(e,a,i),t!==null&&(bl(t,e,i,r),fo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=vl(),r=yl(e),i=lo(n,r);i.tag=2,t!=null&&(i.callback=t),t=uo(e,i,r),t!==null&&(bl(t,e,r,n),fo(t,e,r))}};function Es(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ir(n,r)||!Ir(i,a):!0}function Ds(e,t,n){var r=!1,i=ta,a=t.contextType;return typeof a==`object`&&a?a=to(a):(i=I(t)?ia:na.current,r=t.contextTypes,a=(r=r!=null)?aa(e,i):ta),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ts,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Os(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ts.enqueueReplaceState(t,t.state,null)}function ks(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},so(e);var a=t.contextType;typeof a==`object`&&a?i.context=to(a):(a=I(t)?ia:na.current,i.context=aa(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(ws(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&Ts.enqueueReplaceState(i,i.state,null),B(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function As(e,t){try{var n=``,r=t;do n+=he(r),r=r.return;while(r);var i=n}catch(e){i=`
    77Error generating stack: `+e.message+`
    8 `+e.stack}return{value:e,source:t,stack:i,digest:null}}function js(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ms(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Ns=typeof WeakMap==`function`?WeakMap:Map;function Ps(e,t,n){n=co(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ll||(ll=!0,ul=r),Ms(e,t)},n}function Fs(e,t,n){n=co(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Ms(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Ms(e,t),typeof r!=`function`&&(q===null?q=new Set([this]):q.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Is(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ns;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Ul.bind(null,e,t,n),t.then(e,e))}function Ls(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null||t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Rs(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=co(-1,1),t.tag=2,lo(n,t,1))),n.lanes|=1),e)}var zs=C.ReactCurrentOwner,Bs=!1;function Vs(e,t,n,r){t.child=e===null?Ka(t,null,n,r):Ga(t,e.child,n,r)}function Hs(e,t,n,r,i){n=n.render;var a=t.ref;return eo(t,i),r=zo(e,t,n,r,a,i),n=Bo(),e!==null&&!Bs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,cc(e,t,i)):(R&&n&&Da(t),t.flags|=1,Vs(e,t,r,i),t.child)}function Us(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Zl(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Ws(e,t,a,r,i)):(e=eu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ir:n,n(o,r)&&e.ref===t.ref)return cc(e,t,i)}return t.flags|=1,e=$l(a,r),e.ref=t.ref,e.return=t,t.child=e}function Ws(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ir(a,r)&&e.ref===t.ref)if(Bs=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Bs=!0);else return t.lanes=e.lanes,cc(e,t,i)}return qs(e,t,n,r,i)}function Gs(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},I($c,Qc),Qc|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,I($c,Qc),Qc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,I($c,Qc),Qc|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),I($c,Qc),Qc|=r;return Vs(e,t,i,n),t.child}function Ks(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function qs(e,t,n,r,i){var a=aa(n)?ra:ta.current;return a=ia(t,a),eo(t,i),n=zo(e,t,n,r,a,i),r=Bo(),e!==null&&!Bs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,cc(e,t,i)):(R&&r&&Da(t),t.flags|=1,Vs(e,t,n,i),t.child)}function Js(e,t,n,r,i){if(aa(n)){var a=!0;la(t)}else a=!1;if(eo(t,i),t.stateNode===null)sc(e,t),Ds(t,n,r),ks(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=to(l):(l=aa(n)?ra:ta.current,l=ia(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&Os(t,o,r,l),oo=!1;var f=t.memoizedState;o.state=f,po(t,r,o,i),c=t.memoizedState,s!==r||f!==c||na.current||oo?(typeof u==`function`&&(ws(t,n,u,r),c=t.memoizedState),(s=oo||Es(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,so(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Cs(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=to(c):(c=aa(n)?ra:ta.current,c=ia(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&Os(t,o,r,c),oo=!1,f=t.memoizedState,o.state=f,po(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||na.current||oo?(typeof p==`function`&&(ws(t,n,p,r),m=t.memoizedState),(l=oo||Es(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Ys(e,t,n,r,a,i)}function Ys(e,t,n,r,i,a){Ks(e,t);var o=!!(t.flags&128);if(!r&&!o)return i&&ua(t,n,!1),cc(e,t,a);r=t.stateNode,zs.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ga(t,e.child,null,a),t.child=Ga(t,null,s,a)):Vs(e,t,s,a),t.memoizedState=r.state,i&&ua(t,n,!0),t.child}function Xs(e){var t=e.stateNode;t.pendingContext?sa(e,t.pendingContext,t.pendingContext!==t.context):t.context&&sa(e,t.context,!1),yo(e,t.containerInfo)}function Zs(e,t,n,r,i){return za(),Ba(i),t.flags|=256,Vs(e,t,n,r),t.child}var Qs={dehydrated:null,treeContext:null,retryLane:0};function $s(e){return{baseLanes:e,cachePool:null,transitions:null}}function ec(e,t,n){var r=t.pendingProps,i=Co.current,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(i&2)),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),I(Co,i&1),e===null)return Fa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.lanes=t.mode&1?e.data===`$!`?8:1073741824:1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=nu(o,r,0,null),e=tu(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=$s(n),t.memoizedState=Qs,e):tc(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return rc(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=$l(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=tu(a,o,n,null),a.flags|=2):a=$l(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?$s(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Qs,r}return a=e.child,e=a.sibling,r=$l(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function tc(e,t){return t=nu({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function nc(e,t,n,r){return r!==null&&Ba(r),Ga(t,e.child,null,n),e=tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function rc(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=js(Error(r(422))),nc(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=nu({mode:`visible`,children:i.children},a,0,null),o=tu(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Ga(t,e.child,null,s),t.child.memoizedState=$s(s),t.memoizedState=Qs,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return nc(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=js(o,i,void 0),nc(e,t,s,i)}if(c=(s&e.childLanes)!==0,Bs||c){if(i=Yc,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,ao(e,a),bl(i,e,a,-1))}return Y(),i=js(Error(r(421))),nc(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=Gl.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Aa=Li(a.nextSibling),ka=t,R=!0,ja=null,e!==null&&(ba[xa++]=Ca,ba[xa++]=wa,ba[xa++]=Sa,Ca=e.id,wa=e.overflow,Sa=t),t=tc(t,i.children),t.flags|=4096,t)}function ic(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$a(e.return,t,n)}function ac(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function oc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Vs(e,t,r.children,n),r=Co.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ic(e,n,t);else if(e.tag===19)ic(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(I(Co,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&wo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ac(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&wo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ac(t,!0,n,null,a);break;case`together`:ac(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function sc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function cc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nl|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=$l(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=$l(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function lc(e,t,n){switch(t.tag){case 3:Xs(t),za();break;case 5:xo(t);break;case 1:aa(t.type)&&la(t);break;case 4:yo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;I(qa,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(I(Co,Co.current&1),e=cc(e,t,n),e===null?null:e.sibling):ec(e,t,n):(I(Co,Co.current&1),t.flags|=128,null);I(Co,Co.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return oc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),I(Co,Co.current),r)break;return null;case 22:case 23:return t.lanes=0,Gs(e,t,n)}return cc(e,t,n)}var uc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},dc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,V(go.current);var o=null;switch(n){case`input`:i=Ce(e,i),r=Ce(e,r),o=[];break;case`select`:i=de({},i,{value:void 0}),r=de({},r,{value:void 0}),o=[];break;case`textarea`:i=ke(e,i),r=ke(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=Di)}He(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null));for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null))if(u===`style`)if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l;else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&pi(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},fc=function(e,t,n,r){n!==r&&(t.flags|=4)};function pc(e,t){if(!R)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function mc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function hc(e,t,n){var i=t.pendingProps;switch(Oa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mc(t),null;case 1:return aa(t.type)&&oa(),mc(t),null;case 3:return i=t.stateNode,bo(),$i(na),$i(ta),Eo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(La(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ja!==null&&(wl(ja),ja=null))),mc(t),null;case 5:So(t);var o=V(vo.current);if(n=t.type,e!==null&&t.stateNode!=null)dc(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return mc(t),null}if(e=V(go.current),La(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Bi]=t,i[Vi]=s,e=!!(t.mode&1),n){case`dialog`:pi(`cancel`,i),pi(`close`,i);break;case`iframe`:case`object`:case`embed`:pi(`load`,i);break;case`video`:case`audio`:for(o=0;o<li.length;o++)pi(li[o],i);break;case`source`:pi(`error`,i);break;case`img`:case`image`:case`link`:pi(`error`,i),pi(`load`,i);break;case`details`:pi(`toggle`,i);break;case`input`:we(i,s),pi(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},pi(`invalid`,i);break;case`textarea`:Ae(i,s),pi(`invalid`,i)}for(var c in He(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&Ei(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&Ei(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&pi(`scroll`,i)}switch(n){case`input`:be(i),Ee(i,s,!0);break;case`textarea`:be(i),Me(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=Di)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=Ne(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Bi]=t,e[Vi]=i,uc(e,t,!1,!1),t.stateNode=e;a:{switch(c=Ue(n,i),n){case`dialog`:pi(`cancel`,e),pi(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:pi(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<li.length;o++)pi(li[o],e);o=i;break;case`source`:pi(`error`,e),o=i;break;case`img`:case`image`:case`link`:pi(`error`,e),pi(`load`,e),o=i;break;case`details`:pi(`toggle`,e),o=i;break;case`input`:we(e,i),o=Ce(e,i),pi(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=de({},i,{value:void 0}),pi(`invalid`,e);break;case`textarea`:Ae(e,i),o=ke(e,i),pi(`invalid`,e);break;default:o=i}for(s in He(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?Be(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Fe(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Ie(e,u):typeof u==`number`&&Ie(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&pi(`scroll`,e):u!=null&&S(e,s,u,c))}switch(n){case`input`:be(e),Ee(e,i,!1);break;case`textarea`:be(e),Me(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+_e(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&Oe(e,!!i.multiple,i.defaultValue,!0):Oe(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=Di)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return mc(t),null;case 6:if(e&&t.stateNode!=null)fc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=V(vo.current),V(go.current),La(t)){if(i=t.stateNode,n=t.memoizedProps,i[Bi]=t,(s=i.nodeValue!==n)&&(e=ka,e!==null))switch(e.tag){case 3:Ei(i.nodeValue,n,!!(e.mode&1));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Ei(i.nodeValue,n,!!(e.mode&1))}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Bi]=t,t.stateNode=i}return mc(t),null;case 13:if($i(Co),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(R&&Aa!==null&&t.mode&1&&!(t.flags&128))Ra(),za(),t.flags|=98560,s=!1;else if(s=La(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[Bi]=t}else za(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;mc(t),s=!1}else ja!==null&&(wl(ja),ja=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||Co.current&1?el===0&&(el=3):Y())),t.updateQueue!==null&&(t.flags|=4),mc(t),null);case 4:return bo(),e===null&&gi(t.stateNode.containerInfo),mc(t),null;case 10:return Qa(t.type._context),mc(t),null;case 17:return aa(t.type)&&oa(),mc(t),null;case 19:if($i(Co),s=t.memoizedState,s===null)return mc(t),null;if(i=!!(t.flags&128),c=s.rendering,c===null)if(i)pc(s,!1);else{if(el!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=wo(e),c!==null){for(t.flags|=128,pc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return I(Co,Co.current&1|2),t.child}e=e.sibling}s.tail!==null&&St()>sl&&(t.flags|=128,i=!0,pc(s,!1),t.lanes=4194304)}else{if(!i)if(e=wo(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),pc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!R)return mc(t),null}else 2*St()-s.renderingStartTime>sl&&n!==1073741824&&(t.flags|=128,i=!0,pc(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(mc(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=St(),t.sibling=null,n=Co.current,I(Co,i?n&1|2:n&1),t);case 22:case 23:return kl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Qc&1073741824&&(mc(t),t.subtreeFlags&6&&(t.flags|=8192)):mc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function gc(e,t){switch(Oa(t),t.tag){case 1:return aa(t.type)&&oa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bo(),$i(na),$i(ta),Eo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return So(t),null;case 13:if($i(Co),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));za()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return $i(Co),null;case 4:return bo(),null;case 10:return Qa(t.type._context),null;case 22:case 23:return kl(),null;case 24:return null;default:return null}}var _c=!1,vc=!1,yc=typeof WeakSet==`function`?WeakSet:Set,bc=null;function xc(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){Hl(e,t,n)}else n.current=null}function Sc(e,t,n){try{n()}catch(n){Hl(e,t,n)}}var Cc=!1;function wc(e,t){if(Oi=xn,e=Br(),Vr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(ki={focusedElem:e,selectionRange:n},xn=!1,bc=t;bc!==null;)if(t=bc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,bc=e;else for(;bc!==null;){t=bc;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Cs(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){Hl(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,bc=e;break}bc=t.return}return h=Cc,Cc=!1,h}function Tc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Sc(t,n,a)}i=i.next}while(i!==r)}}function Ec(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Dc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Oc(e){var t=e.alternate;t!==null&&(e.alternate=null,Oc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Bi],delete t[Vi],delete t[Ui],delete t[Wi],delete t[Gi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function kc(e){return e.tag===5||e.tag===3||e.tag===4}function Ac(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||kc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Di));else if(r!==4&&(e=e.child,e!==null))for(jc(e,t,n),e=e.sibling;e!==null;)jc(e,t,n),e=e.sibling}function W(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(W(e,t,n),e=e.sibling;e!==null;)W(e,t,n),e=e.sibling}var Mc=null,Nc=!1;function Pc(e,t,n){for(n=n.child;n!==null;)Fc(e,t,n),n=n.sibling}function Fc(e,t,n){if(At&&typeof At.onCommitFiberUnmount==`function`)try{At.onCommitFiberUnmount(kt,n)}catch{}switch(n.tag){case 5:vc||xc(n,t);case 6:var r=Mc,i=Nc;Mc=null,Pc(e,t,n),Mc=r,Nc=i,Mc!==null&&(Nc?(e=Mc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Mc.removeChild(n.stateNode));break;case 18:Mc!==null&&(Nc?(e=Mc,n=n.stateNode,e.nodeType===8?Ii(e.parentNode,n):e.nodeType===1&&Ii(e,n),yn(e)):Ii(Mc,n.stateNode));break;case 4:r=Mc,i=Nc,Mc=n.stateNode.containerInfo,Nc=!0,Pc(e,t,n),Mc=r,Nc=i;break;case 0:case 11:case 14:case 15:if(!vc&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Sc(n,t,o),i=i.next}while(i!==r)}Pc(e,t,n);break;case 1:if(!vc&&(xc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Hl(n,t,e)}Pc(e,t,n);break;case 21:Pc(e,t,n);break;case 22:n.mode&1?(vc=(r=vc)||n.memoizedState!==null,Pc(e,t,n),vc=r):Pc(e,t,n);break;default:Pc(e,t,n)}}function Ic(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new yc),t.forEach(function(t){var r=Kl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Lc(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:Mc=c.stateNode,Nc=!1;break a;case 3:Mc=c.stateNode.containerInfo,Nc=!0;break a;case 4:Mc=c.stateNode.containerInfo,Nc=!0;break a}c=c.return}if(Mc===null)throw Error(r(160));Fc(o,s,a),Mc=null,Nc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){Hl(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Rc(t,e),t=t.sibling}function Rc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Lc(t,e),zc(e),i&4){try{Tc(3,e,e.return),Ec(3,e)}catch(t){Hl(e,e.return,t)}try{Tc(5,e,e.return)}catch(t){Hl(e,e.return,t)}}break;case 1:Lc(t,e),zc(e),i&512&&n!==null&&xc(n,n.return);break;case 5:if(Lc(t,e),zc(e),i&512&&n!==null&&xc(n,n.return),e.flags&32){var a=e.stateNode;try{Ie(a,``)}catch(t){Hl(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&A(a,o),Ue(c,s);var u=Ue(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?Be(a,f):d===`dangerouslySetInnerHTML`?Fe(a,f):d===`children`?Ie(a,f):S(a,d,f,u)}switch(c){case`input`:Te(a,o);break;case`textarea`:je(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?Oe(a,!!o.multiple,o.multiple?[]:``,!1):Oe(a,!!o.multiple,o.defaultValue,!0)):Oe(a,!!o.multiple,m,!1)}a[Vi]=o}catch(t){Hl(e,e.return,t)}}break;case 6:if(Lc(t,e),zc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){Hl(e,e.return,t)}}break;case 3:if(Lc(t,e),zc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{yn(t.containerInfo)}catch(t){Hl(e,e.return,t)}break;case 4:Lc(t,e),zc(e);break;case 13:Lc(t,e),zc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(ol=St())),i&4&&Ic(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(vc=(u=vc)||d,Lc(t,e),vc=u):Lc(t,e),zc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(bc=e,d=e.child;d!==null;){for(f=bc=d;bc!==null;){switch(p=bc,m=p.child,p.tag){case 0:case 11:case 14:case 15:Tc(4,p,p.return);break;case 1:xc(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){Hl(i,n,e)}}break;case 5:xc(p,p.return);break;case 22:if(p.memoizedState!==null){Uc(f);continue}}m===null?Uc(f):(m.return=p,bc=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=ze(`display`,s))}catch(t){Hl(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){Hl(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Lc(t,e),zc(e),i&4&&Ic(e);break;case 21:break;default:Lc(t,e),zc(e)}}function zc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(kc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Ie(a,``),i.flags&=-33),W(e,Ac(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;jc(e,Ac(e),o);break;default:throw Error(r(161))}}catch(t){Hl(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Bc(e,t,n){bc=e,Vc(e,t,n)}function Vc(e,t,n){for(var r=!!(e.mode&1);bc!==null;){var i=bc,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||_c;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||vc;s=_c;var l=vc;if(_c=o,(vc=c)&&!l)for(bc=i;bc!==null;)o=bc,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?Wc(i):(c.return=o,bc=c);for(;a!==null;)bc=a,Vc(a,t,n),a=a.sibling;bc=i,_c=s,vc=l}Hc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,bc=a):Hc(e,t,n)}}function Hc(e){for(;bc!==null;){var t=bc;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:vc||Ec(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!vc)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Cs(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&mo(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}mo(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&yn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}vc||t.flags&512&&Dc(t)}catch(e){Hl(t,t.return,e)}}if(t===e){bc=null;break}if(n=t.sibling,n!==null){n.return=t.return,bc=n;break}bc=t.return}}function Uc(e){for(;bc!==null;){var t=bc;if(t===e){bc=null;break}var n=t.sibling;if(n!==null){n.return=t.return,bc=n;break}bc=t.return}}function Wc(e){for(;bc!==null;){var t=bc;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ec(4,t)}catch(e){Hl(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){Hl(t,i,e)}}var a=t.return;try{Dc(t)}catch(e){Hl(t,a,e)}break;case 5:var o=t.return;try{Dc(t)}catch(e){Hl(t,o,e)}}}catch(e){Hl(t,t.return,e)}if(t===e){bc=null;break}var s=t.sibling;if(s!==null){s.return=t.return,bc=s;break}bc=t.return}}var Gc=Math.ceil,Kc=C.ReactCurrentDispatcher,qc=C.ReactCurrentOwner,G=C.ReactCurrentBatchConfig,Jc=0,Yc=null,Xc=null,Zc=0,Qc=0,$c=Qi(0),el=0,tl=null,nl=0,rl=0,K=0,il=null,al=null,ol=0,sl=1/0,cl=null,ll=!1,ul=null,q=null,dl=!1,fl=null,pl=0,ml=0,hl=null,gl=-1,_l=0;function vl(){return Jc&6?St():gl===-1?gl=St():gl}function yl(e){return e.mode&1?Jc&2&&Zc!==0?Zc&-Zc:Va.transition===null?(e=Jt,e===0?(e=window.event,e=e===void 0?16:Dn(e.type),e):e):(_l===0&&(_l=Ut()),_l):1}function bl(e,t,n,i){if(50<ml)throw ml=0,hl=null,Error(r(185));Gt(e,n,i),(!(Jc&2)||e!==Yc)&&(e===Yc&&(!(Jc&2)&&(rl|=n),el===4&&Tl(e,Zc)),xl(e,i),n===1&&Jc===0&&!(t.mode&1)&&(sl=St()+500,da&&ha()))}function xl(e,t){var n=e.callbackNode;Vt(e,t);var r=zt(e,e===Yc?Zc:0);if(r===0)n!==null&&yt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&yt(n),t===1)e.tag===0?ma(El.bind(null,e)):pa(El.bind(null,e)),Pi(function(){!(Jc&6)&&ha()}),n=null;else{switch(Yt(r)){case 1:n=wt;break;case 4:n=Tt;break;case 16:n=Et;break;case 536870912:n=Ot;break;default:n=Et}n=Jl(n,Sl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Sl(e,t){if(gl=-1,_l=0,Jc&6)throw Error(r(327));var n=e.callbackNode;if(Bl()&&e.callbackNode!==n)return null;var i=zt(e,e===Yc?Zc:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Nl(e,i);else{t=i;var a=Jc;Jc|=2;var o=Ml();(Yc!==e||Zc!==t)&&(cl=null,sl=St()+500,Al(e,t));do try{Fl();break}catch(t){jl(e,t)}while(1);Za(),Kc.current=o,Jc=a,Xc===null?(Yc=null,Zc=0,t=el):t=0}if(t!==0){if(t===2&&(a=Ht(e),a!==0&&(i=a,t=Cl(e,a))),t===1)throw n=tl,Al(e,0),Tl(e,i),xl(e,St()),n;if(t===6)Tl(e,i);else{if(a=e.current.alternate,!(i&30)&&!J(a)&&(t=Nl(e,i),t===2&&(o=Ht(e),o!==0&&(i=o,t=Cl(e,o))),t===1))throw n=tl,Al(e,0),Tl(e,i),xl(e,St()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:Rl(e,al,cl);break;case 3:if(Tl(e,i),(i&130023424)===i&&(t=ol+500-St(),10<t)){if(zt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){vl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=ji(Rl.bind(null,e,al,cl),t);break}Rl(e,al,cl);break;case 4:if(Tl(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-Mt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=St()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Gc(i/1960))-i,10<i){e.timeoutHandle=ji(Rl.bind(null,e,al,cl),i);break}Rl(e,al,cl);break;case 5:Rl(e,al,cl);break;default:throw Error(r(329))}}}return xl(e,St()),e.callbackNode===n?Sl.bind(null,e):null}function Cl(e,t){var n=il;return e.current.memoizedState.isDehydrated&&(Al(e,t).flags|=256),e=Nl(e,t),e!==2&&(t=al,al=n,t!==null&&wl(t)),e}function wl(e){al===null?al=e:al.push.apply(al,e)}function J(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Fr(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Tl(e,t){for(t&=~K,t&=~rl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Mt(t),r=1<<n;e[n]=-1,t&=~r}}function El(e){if(Jc&6)throw Error(r(327));Bl();var t=zt(e,0);if(!(t&1))return xl(e,St()),null;var n=Nl(e,t);if(e.tag!==0&&n===2){var i=Ht(e);i!==0&&(t=i,n=Cl(e,i))}if(n===1)throw n=tl,Al(e,0),Tl(e,t),xl(e,St()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Rl(e,al,cl),xl(e,St()),null}function Dl(e,t){var n=Jc;Jc|=1;try{return e(t)}finally{Jc=n,Jc===0&&(sl=St()+500,da&&ha())}}function Ol(e){fl!==null&&fl.tag===0&&!(Jc&6)&&Bl();var t=Jc;Jc|=1;var n=G.transition,r=Jt;try{if(G.transition=null,Jt=1,e)return e()}finally{Jt=r,G.transition=n,Jc=t,!(Jc&6)&&ha()}}function kl(){Qc=$c.current,$i($c)}function Al(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Mi(n)),Xc!==null)for(n=Xc.return;n!==null;){var r=n;switch(Oa(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&oa();break;case 3:bo(),$i(na),$i(ta),Eo();break;case 5:So(r);break;case 4:bo();break;case 13:$i(Co);break;case 19:$i(Co);break;case 10:Qa(r.type._context);break;case 22:case 23:kl()}n=n.return}if(Yc=e,Xc=e=$l(e.current,null),Zc=Qc=t,el=0,tl=null,K=rl=nl=0,al=il=null,no!==null){for(t=0;t<no.length;t++)if(n=no[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}no=null}return e}function jl(e,t){do{var n=Xc;try{if(Za(),Do.current=ys,No){for(var i=Ao.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}No=!1}if(ko=0,Mo=jo=Ao=null,Po=!1,Fo=0,qc.current=null,n===null||n.return===null){el=1,tl=t,Xc=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=Zc,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Ls(s);if(m!==null){m.flags&=-257,Rs(m,s,c,o,t),m.mode&1&&Is(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}if(!(t&1)){Is(o,u,t),Y();break a}l=Error(r(426))}else if(R&&c.mode&1){var _=Ls(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Rs(_,s,c,o,t),Ba(As(l,c));break a}}o=l=As(l,c),el!==4&&(el=2),il===null?il=[o]:il.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Ps(o,l,t);fo(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(q===null||!q.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Fs(o,c,t);fo(o,x);break a}}o=o.return}while(o!==null)}Ll(n)}catch(e){t=e,Xc===n&&n!==null&&(Xc=n=n.return);continue}break}while(1)}function Ml(){var e=Kc.current;return Kc.current=ys,e===null?ys:e}function Y(){(el===0||el===3||el===2)&&(el=4),Yc===null||!(nl&268435455)&&!(rl&268435455)||Tl(Yc,Zc)}function Nl(e,t){var n=Jc;Jc|=2;var i=Ml();(Yc!==e||Zc!==t)&&(cl=null,Al(e,t));do try{Pl();break}catch(t){jl(e,t)}while(1);if(Za(),Jc=n,Kc.current=i,Xc!==null)throw Error(r(261));return Yc=null,Zc=0,el}function Pl(){for(;Xc!==null;)Il(Xc)}function Fl(){for(;Xc!==null&&!bt();)Il(Xc)}function Il(e){var t=ql(e.alternate,e,Qc);e.memoizedProps=e.pendingProps,t===null?Ll(e):Xc=t,qc.current=null}function Ll(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=gc(n,t),n!==null){n.flags&=32767,Xc=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{el=6,Xc=null;return}}else if(n=hc(n,t,Qc),n!==null){Xc=n;return}if(t=t.sibling,t!==null){Xc=t;return}Xc=t=e}while(t!==null);el===0&&(el=5)}function Rl(e,t,n){var r=Jt,i=G.transition;try{G.transition=null,Jt=1,zl(e,t,n,r)}finally{G.transition=i,Jt=r}return null}function zl(e,t,n,i){do Bl();while(fl!==null);if(Jc&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Kt(e,o),e===Yc&&(Xc=Yc=null,Zc=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||dl||(dl=!0,Jl(Et,function(){return Bl(),null})),o=!!(n.flags&15990),n.subtreeFlags&15990||o){o=G.transition,G.transition=null;var s=Jt;Jt=1;var c=Jc;Jc|=4,qc.current=null,wc(e,n),Rc(n,e),Hr(ki),xn=!!Oi,ki=Oi=null,e.current=n,Bc(n,e,a),xt(),Jc=c,Jt=s,G.transition=o}else e.current=n;if(dl&&(dl=!1,fl=e,pl=a),o=e.pendingLanes,o===0&&(q=null),jt(n.stateNode,i),xl(e,St()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(ll)throw ll=!1,e=ul,ul=null,e;return pl&1&&e.tag!==0&&Bl(),o=e.pendingLanes,o&1?e===hl?ml++:(ml=0,hl=e):ml=0,ha(),null}function Bl(){if(fl!==null){var e=Yt(pl),t=G.transition,n=Jt;try{if(G.transition=null,Jt=16>e?16:e,fl===null)var i=!1;else{if(e=fl,fl=null,pl=0,Jc&6)throw Error(r(331));var a=Jc;for(Jc|=4,bc=e.current;bc!==null;){var o=bc,s=o.child;if(bc.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(bc=u;bc!==null;){var d=bc;switch(d.tag){case 0:case 11:case 15:Tc(8,d,o)}var f=d.child;if(f!==null)f.return=d,bc=f;else for(;bc!==null;){d=bc;var p=d.sibling,m=d.return;if(Oc(d),d===u){bc=null;break}if(p!==null){p.return=m,bc=p;break}bc=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}bc=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,bc=s;else b:for(;bc!==null;){if(o=bc,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Tc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,bc=v;break b}bc=o.return}}var y=e.current;for(bc=y;bc!==null;){s=bc;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,bc=b;else b:for(s=y;bc!==null;){if(c=bc,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:Ec(9,c)}}catch(e){Hl(c,c.return,e)}if(c===s){bc=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,bc=x;break b}bc=c.return}}if(Jc=a,ha(),At&&typeof At.onPostCommitFiberRoot==`function`)try{At.onPostCommitFiberRoot(kt,e)}catch{}i=!0}return i}finally{Jt=n,G.transition=t}}return!1}function Vl(e,t,n){t=As(n,t),t=Ps(e,t,1),e=lo(e,t,1),t=vl(),e!==null&&(Gt(e,1,t),xl(e,t))}function Hl(e,t,n){if(e.tag===3)Vl(e,e,n);else for(;t!==null;){if(t.tag===3){Vl(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(q===null||!q.has(r))){e=As(n,e),e=Fs(t,e,1),t=lo(t,e,1),e=vl(),t!==null&&(Gt(t,1,e),xl(t,e));break}}t=t.return}}function Ul(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=vl(),e.pingedLanes|=e.suspendedLanes&n,Yc===e&&(Zc&n)===n&&(el===4||el===3&&(Zc&130023424)===Zc&&500>St()-ol?Al(e,0):K|=n),xl(e,t)}function Wl(e,t){t===0&&(e.mode&1?(t=Lt,Lt<<=1,!(Lt&130023424)&&(Lt=4194304)):t=1);var n=vl();e=ao(e,t),e!==null&&(Gt(e,t,n),xl(e,n))}function Gl(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Wl(e,n)}function Kl(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),Wl(e,n)}var ql=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||na.current)Bs=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Bs=!1,lc(e,t,n);Bs=!!(e.flags&131072)}else Bs=!1,R&&t.flags&1048576&&Ea(t,ya,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;sc(e,t),e=t.pendingProps;var a=ia(t,ta.current);eo(t,n),a=zo(null,t,i,e,a,n);var o=Bo();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,aa(i)?(o=!0,la(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,B(t),a.updater=Ts,t.stateNode=a,a._reactInternals=t,ks(t,i,e,n),t=Ys(null,t,i,!0,o,n)):(t.tag=0,R&&o&&Da(t),Vs(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(sc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=Ql(i),e=Cs(i,e),a){case 0:t=qs(null,t,i,e,n);break a;case 1:t=Js(null,t,i,e,n);break a;case 11:t=Hs(null,t,i,e,n);break a;case 14:t=Us(null,t,i,Cs(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),qs(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),Js(e,t,i,a,n);case 3:a:{if(Xs(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,so(e,t),po(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=As(Error(r(423)),t),t=Zs(e,t,i,n,a);break a}else if(i!==a){a=As(Error(r(424)),t),t=Zs(e,t,i,n,a);break a}else for(Aa=Li(t.stateNode.containerInfo.firstChild),ka=t,R=!0,ja=null,n=Ka(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(za(),i===a){t=cc(e,t,n);break a}Vs(e,t,i,n)}t=t.child}return t;case 5:return xo(t),e===null&&Fa(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Ai(i,a)?s=null:o!==null&&Ai(i,o)&&(t.flags|=32),Ks(e,t),Vs(e,t,s,n),t.child;case 6:return e===null&&Fa(t),null;case 13:return ec(e,t,n);case 4:return yo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ga(t,null,i,n):Vs(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),Hs(e,t,i,a,n);case 7:return Vs(e,t,t.pendingProps,n),t.child;case 8:return Vs(e,t,t.pendingProps.children,n),t.child;case 12:return Vs(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,I(qa,i._currentValue),i._currentValue=s,o!==null)if(Fr(o.value,s)){if(o.children===a.children&&!na.current){t=cc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=co(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),$a(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),$a(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Vs(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,eo(t,n),a=to(a),i=i(a),t.flags|=1,Vs(e,t,i,n),t.child;case 14:return i=t.type,a=Cs(i,t.pendingProps),a=Cs(i.type,a),Us(e,t,i,a,n);case 15:return Ws(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),sc(e,t),t.tag=1,aa(i)?(e=!0,la(t)):e=!1,eo(t,n),Ds(t,i,a),ks(t,i,a,n),Ys(null,t,i,!0,e,n);case 19:return oc(e,t,n);case 22:return Gs(e,t,n)}throw Error(r(156,t.tag))};function Jl(e,t){return vt(e,t)}function Yl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xl(e,t,n,r){return new Yl(e,t,n,r)}function Zl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ql(e){if(typeof e==`function`)return+!!Zl(e);if(e!=null){if(e=e.$$typeof,e===ie)return 11;if(e===oe)return 14}return 2}function $l(e,t){var n=e.alternate;return n===null?(n=Xl(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function eu(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)Zl(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case T:return tu(n.children,a,o,t);case te:s=8,a|=8;break;case ne:return e=Xl(12,n,t,a|2),e.elementType=ne,e.lanes=o,e;case D:return e=Xl(13,n,t,a),e.elementType=D,e.lanes=o,e;case ae:return e=Xl(19,n,t,a),e.elementType=ae,e.lanes=o,e;case ce:return nu(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case E:s=10;break a;case re:s=9;break a;case ie:s=11;break a;case oe:s=14;break a;case se:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=Xl(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function tu(e,t,n,r){return e=Xl(7,e,r,t),e.lanes=n,e}function nu(e,t,n,r){return e=Xl(22,e,r,t),e.elementType=ce,e.lanes=n,e.stateNode={isHidden:!1},e}function ru(e,t,n){return e=Xl(6,e,null,t),e.lanes=n,e}function X(e,t,n){return t=Xl(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function iu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wt(0),this.expirationTimes=Wt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function au(e,t,n,r,i,a,o,s,c){return e=new iu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=Xl(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},B(a),e}function ou(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ee,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function su(e){if(!e)return ea;e=e._reactInternals;a:{if(ft(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(aa(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(aa(n))return ca(e,n,t)}return t}function cu(e,t,n,r,i,a,o,s,c){return e=au(n,r,!0,e,i,a,o,s,c),e.context=su(null),n=e.current,r=vl(),i=yl(n),a=co(r,i),a.callback=t??null,lo(n,a,i),e.current.lanes=i,Gt(e,i,r),xl(e,r),e}function lu(e,t,n,r){var i=t.current,a=vl(),o=yl(i);return n=su(n),t.context===null?t.context=n:t.pendingContext=n,t=co(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=lo(i,t,o),e!==null&&(bl(e,i,o,a),uo(e,i,o)),o}function uu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function du(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function fu(e,t){du(e,t),(e=e.alternate)&&du(e,t)}function pu(){return null}var mu=typeof reportError==`function`?reportError:function(e){console.error(e)};function hu(e){this._internalRoot=e}gu.prototype.render=hu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));lu(e,t,null,null)},gu.prototype.unmount=hu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ol(function(){lu(null,e,null,null)}),t[Hi]=null}};function gu(e){this._internalRoot=e}gu.prototype.unstable_scheduleHydration=function(e){if(e){var t=$t();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ln.length&&t!==0&&t<ln[n].priority;n++);ln.splice(n,0,e),n===0&&mn(e)}};function _u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function yu(){}function bu(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=uu(o);a.call(e)}}var o=cu(t,r,e,0,null,!1,!1,``,yu);return e._reactRootContainer=o,e[Hi]=o.current,gi(e.nodeType===8?e.parentNode:e),Ol(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=uu(c);s.call(e)}}var c=au(e,0,!1,null,null,!1,!1,``,yu);return e._reactRootContainer=c,e[Hi]=c.current,gi(e.nodeType===8?e.parentNode:e),Ol(function(){lu(t,c,n,r)}),c}function xu(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=uu(o);s.call(e)}}lu(t,o,e,i)}else o=bu(n,t,e,i,r);return uu(o)}Xt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Rt(t.pendingLanes);n!==0&&(qt(t,n|1),xl(t,St()),!(Jc&6)&&(sl=St()+500,ha()))}break;case 13:Ol(function(){var t=ao(e,1);t!==null&&bl(t,e,1,vl())}),fu(e,1)}},Zt=function(e){if(e.tag===13){var t=ao(e,134217728);t!==null&&bl(t,e,134217728,vl()),fu(e,134217728)}},Qt=function(e){if(e.tag===13){var t=yl(e),n=ao(e,t);n!==null&&bl(n,e,t,vl()),fu(e,t)}},$t=function(){return Jt},en=function(e,t){var n=Jt;try{return Jt=e,t()}finally{Jt=n}},Ke=function(e,t,n){switch(t){case`input`:if(Te(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=Yi(i);if(!a)throw Error(r(90));xe(i),Te(i,a)}}}break;case`textarea`:je(e,n);break;case`select`:t=n.value,t!=null&&Oe(e,!!n.multiple,t,!1)}},Qe=Dl,$e=Ol;var Z={usingClientEntryPoint:!1,Events:[qi,Ji,Yi,Xe,Ze,Dl]},Su={findFiberByHostInstance:Ki,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},Cu={bundleType:Su.bundleType,version:Su.version,rendererPackageName:Su.rendererPackageName,rendererConfig:Su.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=gt(e),e===null?null:e.stateNode},findFiberByHostInstance:Su.findFiberByHostInstance||pu,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var wu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wu.isDisabled&&wu.supportsFiber)try{kt=wu.inject(Cu),At=wu}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_u(t))throw Error(r(200));return ou(e,t,null,n)},e.createRoot=function(e,t){if(!_u(e))throw Error(r(299));var n=!1,i=``,a=mu;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=au(e,1,!1,null,null,n,!1,i,a),e[Hi]=t.current,gi(e.nodeType===8?e.parentNode:e),new hu(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=gt(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return Ol(e)},e.hydrate=function(e,t,n){if(!vu(t))throw Error(r(200));return xu(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!_u(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=mu;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=cu(t,null,e,1,n??null,a,!1,o,s),e[Hi]=t.current,gi(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new gu(t)},e.render=function(e,t,n){if(!vu(t))throw Error(r(200));return xu(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!vu(e))throw Error(r(40));return e._reactRootContainer?(Ol(function(){xu(null,null,e,!1,function(){e._reactRootContainer=null,e[Hi]=null})}),!0):!1},e.unstable_batchedUpdates=Dl,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!vu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return xu(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),g=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=s((e=>{var t=g();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot}));function v(e,...t){let n=0;return String(e).replace(/%(?:(\d+)\$)?([sdf%])/g,(e,r,i)=>{if(i===`%`)return`%`;let a=r?t[Number(r)-1]:t[n++];return a==null?``:String(i===`d`?parseInt(a,10)||0:i===`f`?parseFloat(a)||0:a)})}var y,b,x,S,C=o((()=>{y=()=>window.wp&&window.wp.i18n||null,b=(e,t)=>y()?y().__(e,t):e,x=(e,t,n,r)=>y()?y()._n(e,t,n,r):n===1?e:t,S=(...e)=>y()&&typeof y().sprintf==`function`?y().sprintf(...e):v(...e)}));async function w(){try{let e=te.ajaxUrl||typeof window.ajaxurl==`string`&&window.ajaxurl||``;if(!e)return!1;let t=(await(await fetch(`${e}?action=rest-nonce`,{credentials:`same-origin`})).text()).trim();if(/^[a-z0-9]{8,20}$/i.test(t))return ne=t,!0}catch{}return!1}function ee(e,t){if(e!==401&&e!==403)return!1;let n=t&&t.code||``;return n===`rest_cookie_invalid_nonce`||n===`rest_forbidden`||n===``}async function T(e,t={},n=!1){let r=t.method||`GET`,i=r===`PUT`||r===`PATCH`||r===`DELETE`,a=te.restUrl.includes(`?`)?`${te.restUrl}${e.replace(`?`,`&`)}`:`${te.restUrl}${e}`;a+=(a.includes(`?`)?`&`:`?`)+`_locale=user`;let o=await fetch(a,{...t,method:i?`POST`:r,headers:{"Content-Type":`application/json`,"X-WP-Nonce":ne,...i?{"X-HTTP-Method-Override":r}:{},...t.headers||{}},credentials:`same-origin`}),s=await o.json().catch(()=>null);if(!o.ok&&!n&&ee(o.status,s)&&await w())return T(e,t,!0);if(!o.ok){if(r!==`GET`)try{window.dispatchEvent(new CustomEvent(`airanksuite:request-failed`,{detail:{path:e,method:r,status:o.status,message:s&&s.message||``}}))}catch{}let t=s&&s.message||(o.status===403?S(b(`The server refused the request (403). Some hosts block %s requests — send this to your host if it persists.`,`ai-rank-suite`),r):S(b(`Request failed (%d)`,`ai-rank-suite`),o.status)),n=Error(t);throw n.status=o.status,n.code=s&&s.code||``,n.isMissingModule=o.status===404&&n.code===`rest_no_route`,n.isMissingModule&&(n.message=b(`This is a Pro feature and is not part of this installation.`,`ai-rank-suite`)),n.isLicense=o.status===402||n.code===`airanksuite_license_required`||n.isMissingModule,n.isLicense&&(n.manageUrl=s&&s.data&&s.data.manageUrl||``),n}return s}var te,ne,E,re,ie,D=o((()=>{C(),te=Object.assign({restUrl:`/wp-json/airanksuite/v1`,nonce:``,siteName:``,tagline:``,homeUrl:``,version:``,screens:[]},window.airanksuiteData||{}),ne=te.nonce,E={get:e=>T(e),post:(e,t)=>T(e,{method:`POST`,body:t?JSON.stringify(t):void 0}),put:(e,t)=>T(e,{method:`PUT`,body:JSON.stringify(t)}),del:e=>T(e,{method:`DELETE`})},re=te,ie=e=>!Array.isArray(te.modules)||te.modules.includes(e)}));function ae(){try{return window.localStorage.getItem(ce)===`dark`?`dark`:`light`}catch{return`light`}}function oe(e){let t=e===`dark`?`dark`:`light`;try{window.localStorage.setItem(ce,t)}catch{}let n=document.getElementById(`airanksuite-root`);return n&&n.setAttribute(`data-theme`,t),document.body&&document.body.classList.toggle(`airanksuite-dark`,t===`dark`),le.forEach(e=>e(t)),t}function se(e){return le.add(e),()=>le.delete(e)}var ce,le,ue=o((()=>{ce=`airanksuite-theme`,le=new Set})),de=s((e=>{var t=f(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),O=s(((e,t)=>{t.exports=de()}));async function fe(e){let t=String(e??``);if(!t)return!1;if(navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(t),!0}catch{}try{let e=document.createElement(`textarea`);e.value=t,e.setAttribute(`readonly`,``),e.style.position=`fixed`,e.style.top=`-1000px`,e.style.opacity=`0`,document.body.appendChild(e),e.select(),e.setSelectionRange(0,t.length);let n=document.execCommand(`copy`);return document.body.removeChild(e),n}catch{return!1}}var pe=o((()=>{}));function k({title:e,subtitle:t,action:n,icon:r,tag:i,children:a,className:o=``,flush:s=!1}){let c=e||n||r;return(0,N.jsxs)(`section`,{className:`ars-card${s?` is-flush`:``} ${o}`,children:[c&&(0,N.jsxs)(`header`,{className:`ars-card-head`,children:[(0,N.jsxs)(`div`,{className:`flex items-start gap-3 min-w-0`,children:[r&&(0,N.jsx)(`span`,{className:`ars-card-icon`,children:r}),(0,N.jsxs)(`div`,{className:`min-w-0`,children:[i&&(0,N.jsx)(`span`,{className:`ars-card-tag`,children:i}),e&&(0,N.jsx)(`h2`,{className:`t-title m-0`,children:e}),t&&(0,N.jsx)(`p`,{className:`t-body m-0 mt-0.5 max-w-[88ch]`,children:t})]})]}),n&&(0,N.jsx)(`div`,{className:`shrink-0 flex items-center gap-2`,children:n})]}),(0,N.jsx)(`div`,{className:s?``:`ars-card-body`,children:a})]})}function me({tone:e=`neutral`,text:t,why:n,action:r,onAction:i,busy:a=!1,children:o}){return(0,N.jsxs)(`section`,{className:`ars-verdict is-${e}`,children:[(0,N.jsx)(`span`,{className:`ars-verdict-mark`,"aria-hidden":!0}),(0,N.jsxs)(`div`,{className:`ars-verdict-body`,children:[(0,N.jsx)(`p`,{className:`ars-verdict-text`,children:t}),n&&(0,N.jsx)(`p`,{className:`ars-verdict-why`,children:n}),o]}),r&&(0,N.jsx)(`div`,{className:`ars-verdict-action`,children:(0,N.jsx)(A,{variant:e===`bad`||e===`warning`?`primary`:`ghost`,busy:a,onClick:i,children:r})})]})}function he({tone:e=`neutral`,text:t,sub:n,count:r=0,action:i,onAction:a,busy:o=!1,defaultOpen:s=!1,children:c}){let[l,u]=et.useState(s),d=!!c;return(0,N.jsxs)(`section`,{className:`ars-advisor is-${e}${l?` is-open`:``}`,children:[(0,N.jsxs)(`div`,{className:`ars-advisor-row`,children:[(0,N.jsxs)(`button`,{type:`button`,className:`ars-advisor-head`,onClick:d?()=>u(e=>!e):void 0,"aria-expanded":d?l:void 0,disabled:!d,children:[(0,N.jsx)(`span`,{className:`ars-advisor-dot`,"aria-hidden":!0}),(0,N.jsx)(`span`,{className:`ars-advisor-text`,children:t}),n&&(0,N.jsx)(`span`,{className:`ars-advisor-sub`,children:n}),r>0&&(0,N.jsx)(`span`,{className:`ars-advisor-count`,children:r}),d&&(0,N.jsx)(`svg`,{className:`ars-advisor-caret`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,N.jsx)(`path`,{d:`m9 6 6 6-6 6`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`})})]}),i&&(0,N.jsx)(`span`,{className:`ars-advisor-action`,children:(0,N.jsx)(A,{variant:e===`bad`||e===`warning`?`primary`:`ghost`,busy:o,onClick:a,children:i})})]}),l&&c&&(0,N.jsx)(`div`,{className:`ars-advisor-body`,children:c})]})}function ge({value:e,max:t=100,label:n=`Score`,delta:r}){let i=Math.PI*58,a=Math.max(0,Math.min(1,(Number(e)||0)/t)),o=et.useId();return(0,N.jsxs)(`div`,{className:`ars-gauge`,children:[(0,N.jsxs)(`svg`,{viewBox:`0 0 140 86`,role:`img`,"aria-label":S(b(`%1$s: %2$s of %3$s`,`ai-rank-suite`),n,e,t),children:[(0,N.jsx)(`defs`,{children:(0,N.jsxs)(`linearGradient`,{id:`${o}-arc`,x1:`0`,y1:`1`,x2:`1`,y2:`0`,children:[(0,N.jsx)(`stop`,{offset:`0%`,stopColor:`var(--ars-brand)`}),(0,N.jsx)(`stop`,{offset:`100%`,stopColor:`var(--ars-brand-2)`})]})}),(0,N.jsx)(`path`,{d:`M 12 78 A 58 58 0 0 1 128 78`,fill:`none`,stroke:`var(--ars-surface-3)`,strokeWidth:`12`,strokeLinecap:`round`}),a>0&&(0,N.jsx)(`path`,{d:`M 12 78 A 58 58 0 0 1 128 78`,fill:`none`,stroke:`url(#${o}-arc)`,strokeWidth:`12`,strokeLinecap:`round`,strokeDasharray:`${a*i} ${i}`,style:{transition:`stroke-dasharray 600ms cubic-bezier(0.2,0,0,1)`}}),(0,N.jsx)(`text`,{x:`70`,y:`64`,textAnchor:`middle`,className:`ars-gauge-value`,children:e}),(0,N.jsxs)(`text`,{x:`70`,y:`80`,textAnchor:`middle`,className:`ars-gauge-max`,children:[`/ `,t]})]}),r!=null&&(0,N.jsx)(`div`,{className:`ars-gauge-delta`,children:(0,N.jsx)(Re,{value:r})})]})}function _e({error:e,licensed:t=!0,proTitle:n,proNote:r,label:i=b(`Loading`,`ai-rank-suite`)}){return t?e?(0,N.jsx)(`div`,{className:`ars-page`,children:(0,N.jsx)(k,{title:b(`This screen could not load`,`ai-rank-suite`),subtitle:b(`The request to your site's REST API failed`,`ai-rank-suite`),children:(0,N.jsxs)(`div`,{className:`grid gap-3`,children:[(0,N.jsx)(M,{tone:`serious`,children:e}),(0,N.jsxs)(`div`,{className:`flex gap-2 flex-wrap`,children:[(0,N.jsx)(A,{onClick:()=>window.location.reload(),children:b(`Try again`,`ai-rank-suite`)}),(0,N.jsx)(A,{variant:`ghost`,onClick:()=>{window.location.hash=`/developer`},children:b(`Open developer tools`,`ai-rank-suite`)})]}),(0,N.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Usual causes: a security plugin or host firewall blocking /wp-json/, an expired login, or a module quarantined after an error — the developer tools show which.`,`ai-rank-suite`)})]})})}):(0,N.jsxs)(`div`,{className:`ars-page ars-pageskel`,"aria-busy":`true`,"aria-label":i,children:[(0,N.jsx)(`div`,{className:`ars-pageskel-bar`}),(0,N.jsxs)(`div`,{className:`ars-pageskel-grid`,children:[(0,N.jsx)(`div`,{className:`ars-pageskel-block`}),(0,N.jsx)(`div`,{className:`ars-pageskel-block`})]}),(0,N.jsx)(`div`,{className:`ars-pageskel-block is-tall`})]}):(0,N.jsx)(`div`,{className:`ars-page`,children:(0,N.jsx)(k,{title:n||b(`Part of AI Rank Suite Pro`,`ai-rank-suite`),children:(0,N.jsxs)(`div`,{className:`ars-pro is-compact`,children:[(0,N.jsx)(`span`,{className:`ars-pro-badge`,children:b(`Pro`,`ai-rank-suite`)}),(0,N.jsx)(`div`,{className:`min-w-0`,children:(0,N.jsx)(`p`,{className:`ars-pro-text`,children:r||b(`This screen reads data that Pro collects. Activating your licence turns it on; nothing here has been deleted.`,`ai-rank-suite`)})}),(0,N.jsx)(`a`,{className:`ars-btn ars-btn-ghost ars-pro-cta`,href:`#/settings/license`,children:b(`See Pro`,`ai-rank-suite`)})]})})})}function ve({icon:e,title:t,children:n,action:r,onAction:i,compact:a=!1}){return(0,N.jsxs)(`div`,{className:`ars-empty${a?` is-compact`:``}`,children:[e&&(0,N.jsx)(`span`,{className:`ars-empty-icon`,"aria-hidden":!0,children:e}),(0,N.jsxs)(`div`,{className:`ars-empty-text`,children:[(0,N.jsx)(`div`,{className:`ars-empty-title`,children:t}),n&&(0,N.jsx)(`p`,{className:`ars-empty-body`,children:n})]}),r&&(0,N.jsx)(A,{variant:`ghost`,onClick:i,children:r})]})}function ye({items:e,onItem:t,empty:n}){let r=Math.max(1,...e.map(e=>e.value||0));return e.length?(0,N.jsx)(`ul`,{className:`ars-board`,children:e.map(e=>(0,N.jsx)(`li`,{className:`ars-board-row${t?` is-clickable`:``}`,children:(0,N.jsxs)(`button`,{type:`button`,className:`ars-board-hit`,onClick:t?()=>t(e):void 0,disabled:!t,children:[(0,N.jsx)(`span`,{className:`ars-board-label`,title:e.hint||e.label,children:e.label}),(0,N.jsx)(`span`,{className:`ars-board-track`,children:(0,N.jsx)(`span`,{className:`ars-board-fill`,style:{width:`${Math.round((e.value||0)/r*100)}%`,background:e.color}})}),(0,N.jsxs)(`span`,{className:`ars-board-value tabular-nums`,children:[e.display??e.value,e.unit&&(0,N.jsx)(`span`,{className:`ars-board-unit`,children:e.unit})]})]})},e.id))}):n||null}function be({metrics:e,columns:t=3,onSelect:n,active:r}){let i=Math.max(1,Math.min(t,(e||[]).length||1));return(0,N.jsx)(`div`,{className:`ars-metrics`,"data-columns":i,style:{"--ars-metrics-cols":i},children:e.map(e=>(0,N.jsxs)(n?`button`:`div`,{type:n?`button`:void 0,className:`ars-metrics-cell${r===(e.id||e.label)?` is-active`:``}${n?` is-clickable`:``}`,onClick:n?()=>n(e.id||e.label):void 0,style:e.accent?{"--ars-metric-accent":e.accent}:void 0,children:[(0,N.jsxs)(`span`,{className:`ars-metrics-label`,children:[e.label,e.hint&&(0,N.jsx)(`span`,{className:`ars-metrics-help`,title:e.hint,"aria-label":e.hint,children:`?`})]}),(0,N.jsxs)(`span`,{className:`ars-metrics-row`,children:[(0,N.jsxs)(`span`,{className:`ars-metrics-value tabular-nums`,children:[e.value,e.unit&&(0,N.jsx)(`span`,{className:`ars-metrics-unit`,children:e.unit})]}),e.delta!==void 0&&e.delta!==null&&(0,N.jsx)(Re,{value:e.delta,invert:e.invert})]}),e.spark&&e.spark.length>1&&(0,N.jsx)(`span`,{className:`ars-metrics-spark`,children:(0,N.jsx)(Le,{data:e.spark,color:e.accent||`var(--ars-brand)`,height:26})}),e.sub&&(0,N.jsx)(`span`,{className:`ars-metrics-sub`,children:e.sub}),e.accent&&(0,N.jsx)(`span`,{className:`ars-metrics-rule`,"aria-hidden":!0})]},e.id||e.label))})}function xe({score:e,label:t,sub:n,segments:r=[],reach:i,note:a,tone:o,onClick:s,wide:c=!1}){let l=r.reduce((e,t)=>e+(t.value||0),0)||1;return(0,N.jsxs)(`button`,{type:`button`,className:`ars-scorerow${s?``:` is-static`}${c?` is-wide`:``}`,onClick:s,disabled:!s,children:[e==null?(0,N.jsx)(`span`,{className:`ars-scorerow-score`,style:{color:`var(--ars-ink-3)`},children:`—`}):(0,N.jsx)(`span`,{className:`ars-scorerow-score is-${o||(e=>e>=80?`good`:e>=50?`mid`:`bad`)(e)} tabular-nums`,children:e}),(0,N.jsxs)(`span`,{className:`ars-scorerow-text`,children:[(0,N.jsx)(`span`,{className:`ars-scorerow-label`,children:t}),n&&(0,N.jsx)(`span`,{className:`ars-scorerow-sub`,children:n})]}),(0,N.jsx)(`span`,{className:`ars-scorerow-bar`,role:`img`,"aria-label":r.map(e=>`${e.label}: ${e.value}`).join(`, `),children:r.filter(e=>(e.value||0)>0).map((e,t)=>(0,N.jsx)(`span`,{title:`${e.label}: ${e.value}`,style:{width:`${(e.value||0)/l*100}%`,background:e.color}},t))}),(0,N.jsxs)(`span`,{className:`ars-scorerow-reach`,title:a||void 0,children:[i,a&&(0,N.jsx)(`span`,{className:`ars-scorerow-note`,children:a})]}),s&&(0,N.jsx)(`svg`,{className:`ars-scorerow-caret`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,N.jsx)(`path`,{d:`m9 6 6 6-6 6`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`})})]})}function Se({title:e,note:t,defaultOpen:n=!1,children:r}){let[i,a]=et.useState(n);return(0,N.jsxs)(`section`,{className:`ars-panel${i?` is-open`:``}`,children:[(0,N.jsxs)(`button`,{type:`button`,className:`ars-panel-head`,onClick:()=>a(e=>!e),"aria-expanded":i,children:[(0,N.jsx)(`svg`,{className:`ars-panel-caret`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,N.jsx)(`path`,{d:`m9 6 6 6-6 6`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`})}),(0,N.jsx)(`span`,{className:`ars-panel-title`,children:e}),t&&(0,N.jsx)(`span`,{className:`ars-panel-note`,children:t})]}),i&&(0,N.jsx)(`div`,{className:`ars-panel-body`,children:r})]})}function Ce({children:e,hint:t,action:n}){return(0,N.jsxs)(`div`,{className:`flex items-baseline justify-between gap-4 mt-1`,children:[(0,N.jsxs)(`div`,{className:`flex items-baseline gap-3 min-w-0`,children:[(0,N.jsx)(`span`,{className:`t-overline shrink-0`,children:e}),t&&(0,N.jsx)(`span`,{className:`t-caption min-w-0`,style:{letterSpacing:0},children:t})]}),n]})}function we(e,t=620){let n=typeof e==`number`?e:null,[r,i]=et.useState(n===null?e:0);return et.useEffect(()=>{if(n===null){i(e);return}if(window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches){i(n);return}let r,a=performance.now(),o=e=>{let s=Math.min(1,(e-a)/t);i(Math.round(n*(1-(1-s)**3))),s<1&&(r=requestAnimationFrame(o))};return r=requestAnimationFrame(o),()=>cancelAnimationFrame(r)},[n,e,t]),r}function A({variant:e=`primary`,busy:t=!1,children:n,...r}){return(0,N.jsxs)(`button`,{type:`button`,className:tt[e]||tt.primary,disabled:t||r.disabled,...r,children:[t&&(0,N.jsx)(Te,{}),n]})}function Te(){return(0,N.jsxs)(`svg`,{className:`animate-spin`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:[(0,N.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeOpacity:`0.25`,strokeWidth:`4`}),(0,N.jsx)(`path`,{d:`M22 12a10 10 0 0 0-10-10`,stroke:`currentColor`,strokeWidth:`4`,strokeLinecap:`round`})]})}function Ee({checked:e,onChange:t,label:n,disabled:r=!1}){return(0,N.jsxs)(`label`,{className:`inline-flex items-center gap-2.5 cursor-pointer select-none`,children:[(0,N.jsx)(`span`,{role:`switch`,"aria-checked":e,"aria-disabled":r||void 0,tabIndex:r?-1:0,onClick:()=>!r&&t(!e),onKeyDown:n=>{!r&&(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),t(!e))},className:`ars-switch${e?` is-on`:``}${r?` is-disabled`:``}`}),n&&(0,N.jsx)(`span`,{className:`text-[13px]`,children:n})]})}function j({tone:e=`neutral`,children:t}){let n={neutral:{bg:`var(--ars-surface-3)`,fg:`var(--ars-ink-2)`},brand:{bg:`var(--ars-brand-tonal)`,fg:`var(--ars-brand-tonal-ink)`},good:{bg:`var(--ars-good-tonal)`,fg:`var(--ars-good)`},warning:{bg:`var(--ars-warning-tonal)`,fg:`var(--ars-warning)`},serious:{bg:`var(--ars-serious-tonal)`,fg:`var(--ars-serious)`}},r=n[e]||n.neutral;return(0,N.jsx)(`span`,{className:`inline-flex items-center gap-1 px-2 py-0.5 ars-r-sm text-[11.5px] font-semibold`,style:{background:r.bg,color:r.fg},children:t})}function De({status:e}){let t=nt[e]||nt.warn;return(0,N.jsxs)(j,{tone:t.tone,children:[(0,N.jsx)(`span`,{"aria-hidden":!0,children:t.icon}),` `,t.label]})}function Oe({value:e,size:t=152,label:n=`AI Score`,onLight:r=!1}){let i=(t-14)/2,a=2*Math.PI*i,o=Math.max(0,Math.min(100,e??0)),s=et.useId();return(0,N.jsxs)(`div`,{className:`relative inline-flex items-center justify-center`,style:{width:t,height:t},children:[(0,N.jsxs)(`svg`,{width:t,height:t,role:`img`,"aria-label":e==null?`${n}: ${b(`not scored yet`,`ai-rank-suite`)}`:`${n}: ${o} / 100`,children:[(0,N.jsx)(`defs`,{children:(0,N.jsxs)(`linearGradient`,{id:s,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`,children:[(0,N.jsx)(`stop`,{offset:`0%`,stopColor:`var(--ars-brand)`}),(0,N.jsx)(`stop`,{offset:`100%`,stopColor:`var(--ars-brand-2)`})]})}),(0,N.jsx)(`circle`,{cx:t/2,cy:t/2,r:i,fill:`none`,stroke:r?`var(--ars-surface-3)`:`var(--ars-surface-2)`,strokeWidth:14}),(0,N.jsx)(`circle`,{cx:t/2,cy:t/2,r:i,fill:`none`,stroke:`url(#${s})`,strokeWidth:14,strokeLinecap:`round`,strokeDasharray:`${a*o/100} ${a}`,transform:`rotate(-90 ${t/2} ${t/2})`,style:{animation:`ars-sweep 900ms cubic-bezier(0.2, 0, 0, 1) both`,"--ars-dash":`${a*o/100}`}})]}),(0,N.jsxs)(`div`,{className:`absolute text-center`,style:{color:`var(--ars-ink)`},children:[(0,N.jsx)(`div`,{className:`t-num`,style:{fontSize:40,fontWeight:600},children:e??`–`}),(0,N.jsx)(`div`,{className:`t-caption mt-1.5 font-medium`,children:`/ 100`})]})]})}function ke({value:e}){if(e==null)return(0,N.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`—`});let t=Number(e);return(0,N.jsxs)(`span`,{className:`ars-scorepill is-${t>=80?`good`:t>=50?`mid`:`bad`} tabular-nums`,children:[(0,N.jsx)(`span`,{className:`ars-scorepill-dot`,"aria-hidden":!0}),t]})}function Ae({tabs:e,active:t,onChange:n,right:r}){return(0,N.jsxs)(`div`,{className:`ars-tabbar`,children:[(0,N.jsx)(`div`,{className:`ars-noscroll flex items-end gap-1 flex-wrap min-w-0`,role:`tablist`,children:e.map(e=>(0,N.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t===e.id,onClick:()=>n(e.id),className:`ars-tab${t===e.id?` is-active`:``}`,children:[e.icon,e.label,e.count!==void 0&&(0,N.jsx)(`span`,{className:`ars-tab-count`,children:e.count})]},e.id))}),r&&(0,N.jsx)(`div`,{className:`shrink-0 flex items-center gap-2 pb-1.5`,children:r})]})}function je({data:e,color:t=`var(--ars-series-1)`,label:n,height:r=140,formatValue:i=e=>e,invert:a=!1,axisMax:o=null,bleed:s=!1}){let[c,l]=et.useState(null),u=et.useId(),[d,f]=et.useState(640),p=et.useRef(null),m=et.useRef(null),h=et.useCallback(e=>{if(m.current&&=(m.current.disconnect(),null),p.current=e,!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(e=>{let t=Math.round(e[0]?.contentRect.width||0);t>0&&f(Math.max(320,t))});t.observe(e),m.current=t},[]);et.useLayoutEffect(()=>{let e=p.current;if(!e)return;let t=Math.round(e.getBoundingClientRect().width);t>0&&f(e=>Math.abs(e-t)>1?Math.max(320,t):e)});let g={l:30,r:6,t:12,b:20};if(!e||e.length<2){let r=e&&e.length===1?e[0]:null;return(0,N.jsxs)(`div`,{className:`ars-firstread`,style:r?void 0:{justifyContent:`center`},children:[r&&(0,N.jsx)(`div`,{className:`ars-firstread-v`,style:{color:t},children:i(r.value)}),(0,N.jsxs)(`div`,{className:`grid gap-0.5 min-w-0`,children:[(0,N.jsx)(`span`,{className:`font-semibold text-[13px]`,children:r?r.date?S(b(`First reading · %s`,`ai-rank-suite`),r.date):b(`First reading`,`ai-rank-suite`):S(b(`No %s recorded yet`,`ai-rank-suite`),String(n))}),(0,N.jsx)(`span`,{className:`t-caption`,children:r?b(`A line needs two points. The next reading draws it.`,`ai-rank-suite`):S(b(`%s appears here once there are two readings.`,`ai-rank-suite`),n)})]})]})}let _=e.map(e=>e.value),v=Math.max(..._),y=Math.min(..._),x=Math.max(v-y,1e-6),C=a?x*.2:0,w=a?y-C:0,ee=a?v+C:Math.max(1,o??v),T=Math.max(ee-w,1e-6),te=e=>a?w+e*T:ee-e*T;g.l=Math.max(30,Math.round(Math.max(...rt.map(e=>String(i(Math.round(te(e)*10)/10)).length))*5.4+8));let ne=t=>g.l+t*(d-g.l-g.r)/(e.length-1),E=e=>{let t=(e-w)/T;return g.t+(a?t:1-t)*(r-g.t-g.b)},re=e.map((e,t)=>[ne(t),E(e.value)]),ie=`M${re[0][0].toFixed(1)},${re[0][1].toFixed(1)}`;for(let e=0;e<re.length-1;e++){let t=re[Math.max(0,e-1)],n=re[e],r=re[e+1],i=re[Math.min(re.length-1,e+2)],a=[n[0]+(r[0]-t[0])/6,n[1]+(r[1]-t[1])/6],o=[r[0]-(i[0]-n[0])/6,r[1]-(i[1]-n[1])/6];ie+=` C${a[0].toFixed(1)},${a[1].toFixed(1)} ${o[0].toFixed(1)},${o[1].toFixed(1)} ${r[0].toFixed(1)},${r[1].toFixed(1)}`}let D=`${ie} L${re[re.length-1][0].toFixed(1)},${r-g.b} L${re[0][0].toFixed(1)},${r-g.b} Z`,ae=rt,oe=re[re.length-1],se=a?_[_.length-1]<_[0]:_[_.length-1]>_[0];return(0,N.jsxs)(`div`,{ref:h,className:s?`ars-chart-bleed`:void 0,children:[(0,N.jsxs)(`div`,{className:`flex items-center justify-between mb-1.5`,children:[(0,N.jsxs)(`span`,{className:`text-[12px] font-semibold flex items-center gap-1.5`,children:[(0,N.jsx)(`span`,{"aria-hidden":!0,className:`inline-block w-2.5 h-2.5 ars-r-sm`,style:{background:t}}),n]}),(0,N.jsx)(`span`,{className:`text-[11.5px] tabular-nums font-medium px-2 py-0.5 ars-r-sm`,style:{background:se?`var(--ars-good-tonal)`:`var(--ars-surface-3)`,color:se?`var(--ars-good)`:`var(--ars-ink-2)`},children:a?S(b(`best %s`,`ai-rank-suite`),i(y)):S(b(`peak %s`,`ai-rank-suite`),i(v))})]}),(0,N.jsxs)(`svg`,{viewBox:`0 0 ${d} ${r}`,className:`w-full block`,style:{height:r},onMouseLeave:()=>l(null),onMouseMove:t=>{let n=t.currentTarget.getBoundingClientRect(),r=(t.clientX-n.left)/n.width*d,i=Math.round((r-g.l)/(d-g.l-g.r)*(e.length-1));l({i:Math.max(0,Math.min(e.length-1,i))})},role:`img`,"aria-label":n,children:[(0,N.jsx)(`defs`,{children:(0,N.jsxs)(`linearGradient`,{id:`${u}-a`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,N.jsx)(`stop`,{offset:`0%`,stopColor:t,stopOpacity:`0.26`}),(0,N.jsx)(`stop`,{offset:`60%`,stopColor:t,stopOpacity:`0.07`}),(0,N.jsx)(`stop`,{offset:`100%`,stopColor:t,stopOpacity:`0`})]})}),ae.map(e=>(0,N.jsxs)(`g`,{children:[(0,N.jsx)(`line`,{x1:g.l,x2:d-g.r,y1:g.t+e*(r-g.t-g.b),y2:g.t+e*(r-g.t-g.b),stroke:`var(--ars-border)`,strokeDasharray:e===1?``:`3 5`}),(0,N.jsx)(`text`,{x:g.l-6,y:g.t+e*(r-g.t-g.b)+3,fontSize:`9.5`,fill:`var(--ars-ink-3)`,textAnchor:`end`,className:`tabular-nums`,children:i(Math.round(te(e)*10)/10)})]},e)),(0,N.jsx)(`path`,{d:D,fill:`url(#${u}-a)`,className:`ars-chart-area`}),(0,N.jsx)(`path`,{d:ie,fill:`none`,stroke:t,strokeWidth:`2.5`,strokeLinejoin:`round`,strokeLinecap:`round`,className:`ars-chart-line`,pathLength:`1`}),(0,N.jsx)(`circle`,{cx:oe[0],cy:oe[1],r:`7`,fill:t,opacity:`0.15`}),(0,N.jsx)(`circle`,{cx:oe[0],cy:oe[1],r:`3.5`,fill:t,stroke:`var(--ars-surface)`,strokeWidth:`1.5`}),c&&(0,N.jsxs)(`g`,{children:[(0,N.jsx)(`line`,{x1:ne(c.i),x2:ne(c.i),y1:g.t,y2:r-g.b,stroke:`var(--ars-ink-3)`,strokeDasharray:`2 3`}),(0,N.jsx)(`circle`,{cx:ne(c.i),cy:E(e[c.i].value),r:`4.5`,fill:t,stroke:`var(--ars-surface)`,strokeWidth:`2`}),(()=>{let t=`${e[c.i].date} · ${i(e[c.i].value)}`,n=t.length*6.2+18,r=Math.max(g.l,Math.min(d-g.r-n,ne(c.i)-n/2)),a=Math.max(2,E(e[c.i].value)-30);return(0,N.jsxs)(`g`,{children:[(0,N.jsx)(`rect`,{x:r,y:a,rx:`4`,ry:`4`,width:n,height:`21`,fill:`var(--ars-ink)`,opacity:`0.94`}),(0,N.jsx)(`text`,{x:r+n/2,y:a+14,fontSize:`10.5`,fill:`var(--ars-surface)`,textAnchor:`middle`,children:t})]})})()]}),(0,N.jsx)(`text`,{x:g.l,y:r-5,fontSize:`9.5`,fill:`var(--ars-ink-3)`,children:e[0].date}),(0,N.jsx)(`text`,{x:d-g.r,y:r-5,fontSize:`9.5`,fill:`var(--ars-ink-3)`,textAnchor:`end`,children:e[e.length-1].date})]})]})}function Me({value:e}){if(e==null||e===0)return(0,N.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`—`});let t=Math.round(e*10)/10,n=t<=3?{bg:`var(--ars-good-tonal)`,fg:`var(--ars-good)`}:t<=10?{bg:`var(--ars-brand-tonal)`,fg:`var(--ars-brand-tonal-ink)`}:{bg:`var(--ars-surface-3)`,fg:`var(--ars-ink-2)`};return(0,N.jsx)(`span`,{className:`inline-flex items-center justify-center ars-r-sm text-[12px] font-bold tabular-nums`,style:{minWidth:34,height:24,padding:`0 8px`,background:n.bg,color:n.fg},children:t})}function Ne({label:e,done:t,total:n,percent:r,note:i}){let a=Number(n)>0,o=Math.max(0,Math.min(100,r==null?a?Math.round(Number(t)/Number(n)*100):100:Math.round(r)));return(0,N.jsxs)(`div`,{className:`ars-progress`,children:[(0,N.jsxs)(`div`,{className:`ars-progress-head`,children:[(0,N.jsx)(`span`,{children:e}),a&&(0,N.jsxs)(`span`,{className:`ars-progress-pct tabular-nums`,children:[o,`%`]})]}),(0,N.jsx)(`div`,{className:`ars-progress-track`,role:`progressbar`,"aria-valuenow":a?o:void 0,"aria-valuemin":0,"aria-valuemax":100,"aria-label":e,children:(0,N.jsx)(`div`,{className:`ars-progress-fill`,style:{width:`${o}%`}})}),i&&(0,N.jsx)(`p`,{className:`m-0 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:i})]})}function Pe({value:e,color:t,running:n=!1}){let r=Math.max(0,Math.min(100,e??0));return(0,N.jsx)(`div`,{className:`overflow-hidden`,style:{height:6,borderRadius:`var(--ars-r-sm)`,background:`var(--ars-surface-3)`},role:`progressbar`,"aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,children:(0,N.jsx)(`div`,{className:`h-full${n?` ars-progress-fill`:``}`,style:{width:`${r}%`,borderRadius:3,background:t||`var(--ars-brand)`,transition:`width 620ms cubic-bezier(0.2, 0, 0, 1)`}})})}function M({tone:e=`warning`,children:t}){let n={warning:{klass:`is-warning`,edge:`var(--ars-warning)`},serious:{klass:`is-error`,edge:`var(--ars-serious)`},info:{klass:`is-info`,edge:`var(--ars-info-ink)`},good:{klass:`is-success`,edge:`var(--ars-good)`}},r=n[e]||n.warning;return(0,N.jsx)(`div`,{className:`ars-notice ${r.klass}`,role:r.klass===`is-error`?`alert`:void 0,style:{borderInlineStartColor:r.edge},children:(0,N.jsx)(`p`,{children:t})})}function Fe(e,t=`title`){let n=it[t];return e===0?{tone:`empty`,color:`var(--ars-ink-3)`,text:b(`Empty — falls back to the page title`,`ai-rank-suite`)}:e>n.max?{tone:`bad`,color:`var(--ars-serious)`,text:S(x(`%d character too long — Google will cut it off`,`%d characters too long — Google will cut it off`,e-n.max,`ai-rank-suite`),e-n.max)}:e<n.ok?{tone:`bad`,color:`var(--ars-serious)`,text:b(`Too short to be persuasive`,`ai-rank-suite`)}:e<n.good?{tone:`warn`,color:`var(--ars-warning)`,text:b(`Usable — a little more detail would help`,`ai-rank-suite`)}:{tone:`good`,color:`var(--ars-good)`,text:b(`Perfect length`,`ai-rank-suite`)}}function Ie({value:e=``,kind:t=`title`,showText:n=!0}){let r=it[t],i=String(e||``).length,a=Fe(i,t),o=r.max*1.25,s=e=>Math.min(100,e/o*100);return(0,N.jsxs)(`div`,{className:`grid gap-1`,children:[(0,N.jsxs)(`div`,{className:`relative ars-r-sm overflow-hidden`,style:{height:4,background:`var(--ars-surface-3)`},children:[(0,N.jsx)(`span`,{className:`absolute top-0 h-full`,style:{left:`${s(r.good)}%`,width:`${s(r.max)-s(r.good)}%`,background:`var(--ars-good)`,opacity:.16}}),(0,N.jsx)(`span`,{className:`absolute top-0 h-full ars-r-sm transition-all`,style:{left:0,width:`${s(i)}%`,background:a.color}}),i>0&&(0,N.jsx)(`span`,{className:`absolute ars-r-sm transition-all`,style:{left:`calc(${s(i)}% - 4px)`,top:-1,width:8,height:8,background:`var(--ars-knob)`,boxShadow:`0 0 0 2px ${a.color}`}})]}),n&&(0,N.jsxs)(`div`,{className:`flex items-center justify-between text-[11px]`,children:[(0,N.jsx)(`span`,{style:{color:a.color,fontWeight:600},children:a.text}),(0,N.jsxs)(`span`,{className:`tabular-nums`,style:{color:`var(--ars-ink-3)`},children:[i,` / `,r.max]})]})]})}function Le({data:e,color:t=`currentColor`,height:n=28,fill:r=!0}){let i=et.useId(),a=(e||[]).filter(e=>typeof e==`number`);if(a.length<3)return null;let o=Math.min(...a),s=Math.max(...a),c=Math.max(s-o,1e-6),l=e=>3+e*94/(a.length-1),u=e=>3+(1-(e-o)/c)*(n-6),d=a.map((e,t)=>[l(t),u(e)]),f=`M${d[0][0].toFixed(1)},${d[0][1].toFixed(1)}`;for(let e=0;e<d.length-1;e++){let t=d[Math.max(0,e-1)],n=d[e],r=d[e+1],i=d[Math.min(d.length-1,e+2)],a=[n[0]+(r[0]-t[0])/6,n[1]+(r[1]-t[1])/6],o=[r[0]-(i[0]-n[0])/6,r[1]-(i[1]-n[1])/6];f+=` C${a[0].toFixed(1)},${a[1].toFixed(1)} ${o[0].toFixed(1)},${o[1].toFixed(1)} ${r[0].toFixed(1)},${r[1].toFixed(1)}`}return(0,N.jsxs)(`svg`,{viewBox:`0 0 100 ${n}`,preserveAspectRatio:`none`,style:{width:`100%`,height:n,display:`block`,color:t},"aria-hidden":!0,children:[(0,N.jsx)(`defs`,{children:(0,N.jsxs)(`linearGradient`,{id:i,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,N.jsx)(`stop`,{offset:`0%`,stopColor:`currentColor`,stopOpacity:`0.22`}),(0,N.jsx)(`stop`,{offset:`100%`,stopColor:`currentColor`,stopOpacity:`0`})]})}),r&&(0,N.jsx)(`path`,{d:`${f} L97,${n} L3,${n} Z`,fill:`url(#${i})`}),(0,N.jsx)(`path`,{d:f,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,vectorEffect:`non-scaling-stroke`})]})}function Re({value:e,suffix:t=``,invert:n=!1}){if(e==null||e===0)return(0,N.jsxs)(`span`,{className:`text-[11px] font-medium`,style:{color:`var(--ars-ink-3)`},children:[`±0`,t]});let r=e>0,i=n?!r:r;return(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 text-[11px] font-semibold px-1.5 py-0.5 ars-r-sm`,style:{background:i?`var(--ars-good-tonal)`:`var(--ars-serious-tonal)`,color:i?`var(--ars-good)`:`var(--ars-serious)`},children:[(0,N.jsx)(`span`,{"aria-hidden":!0,children:r?`▲`:`▼`}),Math.abs(e),t]})}function ze({label:e,value:t,unit:n,sub:r,tone:i=`plain`,chart:a,delta:o,onClick:s,status:c,disabled:l=!1}){let u={plain:{bg:`var(--ars-surface-2)`,fg:`var(--ars-ink)`,mute:`var(--ars-ink-3)`,accent:`var(--ars-ink-3)`},blue:{bg:`var(--ars-c-blue)`,fg:`var(--ars-c-blue-ink)`,mute:`var(--ars-c-blue-ink)`,accent:`var(--ars-c-blue-ink)`},green:{bg:`var(--ars-c-green)`,fg:`var(--ars-c-green-ink)`,mute:`var(--ars-c-green-ink)`,accent:`var(--ars-c-green-ink)`},yellow:{bg:`var(--ars-c-yellow)`,fg:`var(--ars-c-yellow-ink)`,mute:`var(--ars-c-yellow-ink)`,accent:`var(--ars-c-yellow-ink)`},red:{bg:`var(--ars-c-red)`,fg:`var(--ars-c-red-ink)`,mute:`var(--ars-c-red-ink)`,accent:`var(--ars-c-red-ink)`},violet:{bg:`var(--ars-c-violet)`,fg:`var(--ars-c-violet-ink)`,mute:`var(--ars-c-violet-ink)`,accent:`var(--ars-c-violet-ink)`}},d=u[i]||u.plain,f=s?`button`:`div`,p=we(t),m=typeof t==`number`||/^[\d.,%/\s-]+$/.test(String(t??``).trim()||`x`);return(0,N.jsxs)(f,{type:s?`button`:void 0,onClick:l?void 0:s,className:`ars-tile text-left w-full${i===`plain`?` is-plain`:``}${s&&!l?` is-clickable`:``}`,style:{color:d.accent,opacity:l?.55:1},children:[(0,N.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,N.jsx)(`span`,{className:`t-overline`,style:{color:`var(--ars-ink-3)`,letterSpacing:`0.055em`,fontSize:10.5},children:e}),c]}),(0,N.jsxs)(`div`,{className:`flex items-baseline gap-2 mt-1`,children:[(0,N.jsx)(`span`,{className:`t-num`,style:{fontSize:m?26:17,fontWeight:m?600:550,letterSpacing:m?`-0.032em`:`-0.01em`,color:`var(--ars-ink)`},children:p}),n&&(0,N.jsx)(`span`,{className:`text-[12px] font-medium`,style:{color:`var(--ars-ink-3)`},children:n}),o]}),r&&(0,N.jsx)(`div`,{className:`t-caption mt-1`,style:{color:`var(--ars-ink-3)`},children:r}),a&&(0,N.jsx)(`div`,{className:`mt-auto pt-2.5`,children:a})]})}function Be({children:e,right:t}){return(0,N.jsxs)(`div`,{className:`ars-filterbar flex flex-wrap items-center gap-3`,children:[(0,N.jsx)(`div`,{className:`flex flex-wrap items-center gap-3 min-w-0`,children:e}),t&&(0,N.jsx)(`div`,{className:`ml-auto flex items-center gap-2`,children:t})]})}function Ve({options:e,value:t,onChange:n,label:r,className:i=``,collapseAt:a=24}){let[o,s]=et.useState(!1),c=e;if(!o&&e.length>a){c=e.slice(0,a);let n=e.find(e=>e.id===t);n&&!c.some(e=>e.id===t)&&(c=[...c,n])}let l=e.length-c.length;return(0,N.jsxs)(`div`,{className:`ars-chipbar${i?` ${i}`:``}`,role:`group`,"aria-label":r,children:[r&&(0,N.jsx)(`span`,{className:`text-[11.5px] font-medium mr-0.5`,style:{color:`var(--ars-ink-3)`},children:r}),c.map(e=>(0,N.jsxs)(`button`,{type:`button`,className:`ars-chip${t===e.id?` is-active`:``}`,"aria-pressed":t===e.id,onClick:()=>n(e.id),children:[e.label,e.count!==void 0&&e.count!==null&&(0,N.jsx)(`span`,{className:`ars-chip-count`,children:e.count})]},e.id)),l>0&&(0,N.jsx)(`button`,{type:`button`,className:`ars-chip`,onClick:()=>s(!0),children:S(x(`+%d more`,`+%d more`,l,`ai-rank-suite`),l)}),o&&e.length>a&&(0,N.jsx)(`button`,{type:`button`,className:`ars-chip`,onClick:()=>s(!1),children:b(`Show fewer`,`ai-rank-suite`)})]})}function He({options:e,value:t,onChange:n,label:r}){return(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[r&&(0,N.jsx)(`span`,{className:`text-[11.5px] font-medium`,style:{color:`var(--ars-ink-3)`},children:r}),(0,N.jsx)(`div`,{className:`ars-seg`,role:`group`,"aria-label":r,children:e.map(e=>(0,N.jsx)(`button`,{type:`button`,className:`ars-seg-item${t===e.id?` is-active`:``}`,"aria-pressed":t===e.id,onClick:()=>n(e.id),children:e.label},e.id))})]})}function Ue({segments:e,height:t=12,showLegend:n=!0}){let r=(e||[]).filter(e=>e.value>0),i=r.reduce((e,t)=>e+t.value,0);return i===0?(0,N.jsx)(`div`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Nothing measured yet.`,`ai-rank-suite`)}):(0,N.jsxs)(`div`,{className:`grid gap-2`,children:[(0,N.jsx)(`div`,{className:`flex overflow-hidden`,style:{height:t,borderRadius:`var(--ars-r-xs)`},children:r.map(e=>(0,N.jsx)(`span`,{title:`${e.label}: ${e.value}`,style:{width:`${e.value/i*100}%`,background:e.color,transition:`width 400ms cubic-bezier(0.2,0,0,1)`}},e.label))}),n&&(0,N.jsx)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-1`,children:r.map(e=>(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-[11.5px]`,style:{color:`var(--ars-ink-2)`},children:[(0,N.jsx)(`span`,{"aria-hidden":!0,style:{width:8,height:8,borderRadius:`var(--ars-r-xs)`,background:e.color,display:`inline-block`}}),e.label,(0,N.jsx)(`b`,{className:`tabular-nums`,style:{color:`var(--ars-ink)`},children:e.value})]},e.label))})]})}function We({items:e,max:t,color:n=`var(--ars-brand)`,onItem:r,format:i=e=>e}){let a=e||[],o=t??Math.max(...a.map(e=>e.value),1);return(0,N.jsx)(`div`,{className:`grid gap-1.5`,children:a.map((e,t)=>(0,N.jsxs)(`div`,{className:`ars-rankrow${r?` is-clickable`:``}`,onClick:r?()=>r(e):void 0,role:r?`button`:void 0,tabIndex:r?0:void 0,onKeyDown:r?t=>t.key===`Enter`&&r(e):void 0,children:[(0,N.jsx)(`span`,{className:`ars-rankrow-label`,title:e.label,children:e.label}),(0,N.jsx)(`span`,{className:`ars-rankrow-track`,children:(0,N.jsx)(`span`,{className:`ars-rankrow-fill`,style:{width:`${Math.max(2,e.value/o*100)}%`,background:e.color||n}})}),(0,N.jsx)(`span`,{className:`ars-rankrow-value tabular-nums`,children:i(e.value)})]},e.key??e.label??t))})}function Ge({data:e,series:t,height:n=110,stacked:r=!1}){let i=e||[],a=t||[],o=r?Math.max(1,...i.map(e=>a.reduce((t,n)=>t+(Number(e[n.key])||0),0))):Math.max(1,...i.map(e=>a.reduce((t,n)=>Math.max(t,Number(e[n.key])||0),0))),s=Math.max(1,Math.ceil(i.length/8));return(0,N.jsxs)(`div`,{className:`grid gap-2`,children:[(0,N.jsx)(`div`,{className:`flex items-end gap-[3px]`,style:{height:n},children:i.map((e,t)=>r?(0,N.jsx)(`div`,{className:`flex-1 flex items-end justify-center`,style:{height:n},title:`${e.label} · ${a.map(t=>`${t.label}: ${Number(e[t.key])||0}`).join(` · `)}`,children:(0,N.jsx)(`span`,{className:`flex flex-col-reverse`,style:{width:`100%`,maxWidth:12},children:a.map((t,r)=>{let i=Number(e[t.key])||0;return(0,N.jsx)(`span`,{style:{height:`${i/o*n}px`,background:t.color,borderRadius:a.slice(r+1).every(t=>!Number(e[t.key]))&&i>0?`var(--ars-r-xs) var(--ars-r-xs) 0 0`:0,transition:`height 380ms cubic-bezier(0.2,0,0,1)`}},t.key)})})},t):(0,N.jsx)(`div`,{className:`flex-1 flex items-end justify-center gap-[2px]`,style:{height:n},children:a.map(t=>{let r=Number(e[t.key])||0;return(0,N.jsx)(`span`,{title:`${e.label} · ${t.label}: ${r}`,style:{width:`${100/a.length}%`,maxWidth:10,height:`${Math.max(2,r/o*n)}px`,background:r===0?`var(--ars-surface-3)`:t.color,borderRadius:`var(--ars-r-xs) var(--ars-r-xs) 0 0`,transition:`height 380ms cubic-bezier(0.2,0,0,1)`}},t.key)})},t))}),(0,N.jsx)(`div`,{className:`flex justify-between text-[10.5px]`,style:{color:`var(--ars-ink-3)`},children:i.filter((e,t)=>t%s===0).map((e,t)=>(0,N.jsx)(`span`,{children:e.label},t))}),(0,N.jsx)(`div`,{className:`flex gap-4`,children:a.map(e=>(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-[11.5px]`,style:{color:`var(--ars-ink-2)`},children:[(0,N.jsx)(`span`,{"aria-hidden":!0,style:{width:8,height:8,borderRadius:`var(--ars-r-xs)`,background:e.color,display:`inline-block`}}),e.label]},e.key))})]})}function Ke({label:e,hint:t,htmlFor:n,children:r,className:i=``,span:a=!1}){return(0,N.jsxs)(`div`,{className:i,style:a?{gridColumn:`1 / -1`}:void 0,children:[e&&(0,N.jsx)(`label`,{className:`block font-medium mb-1`,htmlFor:n,children:e}),r,t&&(0,N.jsx)(`p`,{className:`m-0 mt-1.5 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:t})]})}function qe({value:e,onChange:t,label:n,hint:r,title:i=b(`Select image`,`ai-rank-suite`),height:a=96}){let o=()=>{let e=window.wp?.media;if(!e)return;let n=e({title:i,button:{text:b(`Use this image`,`ai-rank-suite`)},multiple:!1,library:{type:`image`}});n.on(`select`,()=>{let e=n.state().get(`selection`).first().toJSON();t(e.sizes?.full?.url||e.url||``)}),n.open()},s=!!window.wp?.media;return(0,N.jsx)(Ke,{label:n,hint:r,children:(0,N.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,N.jsx)(`div`,{className:`ars-r-sm shrink-0 flex items-center justify-center overflow-hidden`,style:{width:a,height:a,border:`1px solid var(--ars-border)`,background:`var(--ars-surface-2)`},children:e?(0,N.jsx)(`img`,{src:e,alt:``,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`}}):(0,N.jsx)(`span`,{className:`t-caption`,style:{fontSize:11},children:b(`None`,`ai-rank-suite`)})}),(0,N.jsxs)(`div`,{className:`grid gap-1.5 flex-1 min-w-0`,children:[(0,N.jsx)(`input`,{type:`url`,value:e||``,placeholder:`https://…`,onChange:e=>t(e.target.value)}),(0,N.jsxs)(`div`,{className:`flex gap-2`,children:[s&&(0,N.jsx)(A,{variant:`ghost`,onClick:o,type:`button`,children:b(`Choose from library`,`ai-rank-suite`)}),e&&(0,N.jsx)(A,{variant:`ghost`,onClick:()=>t(``),type:`button`,children:b(`Remove`,`ai-rank-suite`)})]})]})]})})}function Je({value:e=[],onChange:t,placeholder:n=b(`Add and press Enter`,`ai-rank-suite`),suggestions:r=[]}){let[i,a]=et.useState(``),o=n=>{let r=String(n).split(`,`).map(e=>e.trim()).filter(Boolean);if(!r.length)return;let i=[...e];r.forEach(e=>{i.includes(e)||i.push(e)}),t(i),a(``)},s=r.filter(t=>!e.includes(t)).slice(0,8);return(0,N.jsxs)(`div`,{className:`grid gap-2`,children:[e.length>0&&(0,N.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.map(n=>(0,N.jsxs)(`span`,{className:`ars-chip-tag`,title:n,children:[(0,N.jsx)(`span`,{className:`truncate`,style:{maxWidth:260},children:n}),(0,N.jsx)(`button`,{type:`button`,"aria-label":S(b(`Remove %s`,`ai-rank-suite`),n),onClick:()=>t(e.filter(e=>e!==n)),className:`border-0 bg-transparent cursor-pointer p-0 ml-1`,style:{color:`inherit`,lineHeight:1,opacity:.65},children:`×`})]},n))}),(0,N.jsx)(`input`,{type:`text`,value:i,placeholder:n,onChange:e=>a(e.target.value),onKeyDown:n=>{n.key===`Enter`||n.key===`,`?(n.preventDefault(),o(i)):n.key===`Backspace`&&i===``&&e.length&&t(e.slice(0,-1))},onBlur:()=>o(i)}),s.length>0&&(0,N.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:s.map(e=>(0,N.jsxs)(`button`,{type:`button`,onClick:()=>o(e),className:`ars-chip-tag is-suggestion`,children:[`+ `,e]},e))})]})}function Ye({options:e,value:t=[],onChange:n,min:r=`180px`}){let i=e=>n(t.includes(e)?t.filter(t=>t!==e):[...t,e]);return(0,N.jsx)(`div`,{className:`ars-cardgrid`,style:{"--min":r,gap:6},children:e.map(e=>(0,N.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer text-[12.5px] px-2 py-1.5 ars-r-sm`,style:{border:`1px solid var(--ars-border)`,background:t.includes(e.key)?`var(--ars-brand-tonal)`:`var(--ars-surface)`,color:t.includes(e.key)?`var(--ars-brand-tonal-ink)`:`var(--ars-ink-2)`},children:[(0,N.jsx)(`input`,{type:`checkbox`,checked:t.includes(e.key),onChange:()=>i(e.key)}),(0,N.jsx)(`span`,{className:`truncate`,children:e.label})]},e.key))})}function Xe({code:e,max:t=420,language:n=``}){let[r,i]=et.useState(!1);return(0,N.jsxs)(`div`,{className:`relative`,children:[(0,N.jsx)(`div`,{className:`absolute`,style:{top:6,right:6,zIndex:1},children:(0,N.jsx)(A,{variant:`ghost`,onClick:async()=>{let t=await fe(e);i(t?`yes`:`no`),setTimeout(()=>i(!1),1600)},children:r===`yes`?`✓ ${b(`Copied`,`ai-rank-suite`)}`:b(r===`no`?`Select and copy`:`Copy`,`ai-rank-suite`)})}),(0,N.jsx)(`pre`,{className:`ars-mono ars-r-sm m-0 overflow-auto p-3 text-[11.5px]`,style:{maxHeight:t,background:`var(--ars-surface-2)`,border:`1px solid var(--ars-border)`,lineHeight:1.55,whiteSpace:`pre`},"data-language":n,children:e})]})}function Ze({blocks:e=3,hero:t=!0,label:n=`Loading`}){return(0,N.jsxs)(`div`,{className:`ars-page`,"aria-busy":`true`,"aria-label":n,children:[t&&(0,N.jsx)(`div`,{className:`ars-pageskel-bar`,style:{height:132}}),(0,N.jsx)(`div`,{className:`ars-pageskel-grid`,children:Array.from({length:e},(e,t)=>(0,N.jsx)(`div`,{className:`ars-pageskel-block${t===0?` is-tall`:``}`},t))}),(0,N.jsxs)(`span`,{className:`sr-only`,children:[n,`…`]})]})}function Qe({value:e,color:t,bands:n}){if(!Array.isArray(n)||n.length===0)return null;let r=Math.max(0,Math.min(100,Number(e)||0)),i=n.find(e=>r<e.to)||n[n.length-1];return(0,N.jsxs)(`div`,{className:`ars-bandscale`,children:[(0,N.jsxs)(`div`,{className:`ars-gauge-head`,children:[(0,N.jsx)(`span`,{className:`ars-gauge-n`,style:{color:t},children:r}),(0,N.jsx)(`span`,{className:`ars-gauge-of`,children:`/ 100`}),(0,N.jsx)(`span`,{className:`ars-gauge-zone`,children:i.label})]}),(0,N.jsxs)(`div`,{className:`ars-gauge-track`,children:[n.map((e,t)=>(0,N.jsx)(`span`,{className:`ars-gauge-band`,style:{width:`${e.to-(t?n[t-1].to:0)}%`,background:e.tint}},e.label)),(0,N.jsx)(`span`,{className:`ars-gauge-mark`,style:{left:`${r}%`,background:t}})]}),(0,N.jsx)(`div`,{className:`ars-gauge-scale`,children:n.map((e,t)=>(0,N.jsx)(`span`,{style:{width:`${e.to-(t?n[t-1].to:0)}%`},children:e.label},e.label))})]})}function $e({parts:e,total:t}){let n=e.reduce((e,t)=>e+(t.value||0),0)||1;return(0,N.jsxs)(`div`,{className:`ars-comp`,children:[(0,N.jsx)(`div`,{className:`ars-comp-bar`,role:`img`,"aria-label":e.map(e=>`${e.label}: ${e.value}`).join(`, `),children:e.filter(e=>(e.value||0)>0).map(e=>(0,N.jsx)(`span`,{title:`${e.label}: ${e.value}`,style:{width:`${e.value/n*100}%`,background:e.color}},e.label))}),(0,N.jsx)(`div`,{className:`ars-comp-keys`,children:e.map(e=>(0,N.jsxs)(`span`,{className:`ars-comp-key`,children:[(0,N.jsx)(`i`,{style:{background:e.color}}),(0,N.jsx)(`b`,{children:Number(e.value||0).toLocaleString()}),(0,N.jsx)(`span`,{children:e.label})]},e.label))}),t!=null&&(0,N.jsx)(`p`,{className:`ars-comp-total`,children:S(b(`%s in total right now`,`ai-rank-suite`),Number(t).toLocaleString())})]})}var et,N,tt,nt,rt,it,at=o((()=>{et=u(f(),1),C(),pe(),N=O(),tt={primary:`ars-btn ars-btn-primary`,tonal:`ars-btn ars-btn-tonal`,ghost:`ars-btn ars-btn-ghost`,danger:`ars-btn ars-btn-danger`},nt={pass:{tone:`good`,icon:`✓`,label:b(`Pass`,`ai-rank-suite`)},warn:{tone:`warning`,icon:`!`,label:b(`Improve`,`ai-rank-suite`)},fail:{tone:`serious`,icon:`✕`,label:b(`Fix`,`ai-rank-suite`)}},rt=[0,.5,1],it={title:{ok:30,good:50,best:60,max:60,label:b(`SEO title`,`ai-rank-suite`)},description:{ok:70,good:120,best:158,max:160,label:b(`Meta description`,`ai-rank-suite`)}}}));function ot({title:e=b(`What does this do?`,`ai-rank-suite`),children:t,open:n=!1}){return(0,st.jsxs)(`details`,{className:`ars-disclosure`,open:n,children:[(0,st.jsx)(`summary`,{children:e}),(0,st.jsx)(`div`,{className:`ars-disclosure-body`,children:t})]})}var st,ct=o((()=>{f(),C(),st=O()})),lt,ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft=o((()=>{f(),lt=O(),ut=({children:e,size:t=16})=>(0,lt.jsx)(`svg`,{width:t,height:t,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:e}),dt=e=>(0,lt.jsxs)(ut,{...e,children:[(0,lt.jsx)(`path`,{d:`M12 21a9 9 0 1 1 9-9`}),(0,lt.jsx)(`path`,{d:`M12 12l5-3`}),(0,lt.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1.5`,fill:`currentColor`,stroke:`none`})]}),ft=e=>(0,lt.jsxs)(ut,{...e,children:[(0,lt.jsx)(`path`,{d:`M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z`}),(0,lt.jsx)(`path`,{d:`M14 2v6h6`}),(0,lt.jsx)(`path`,{d:`M8 13h8M8 17h5`})]}),pt=e=>(0,lt.jsx)(ut,{...e,children:(0,lt.jsx)(`path`,{d:`M4 6h16M4 12h16M4 18h10`})}),mt=e=>(0,lt.jsxs)(ut,{...e,children:[(0,lt.jsx)(`rect`,{x:`4`,y:`8`,width:`16`,height:`12`,rx:`2`}),(0,lt.jsx)(`path`,{d:`M12 8V4M8 4h8`}),(0,lt.jsx)(`circle`,{cx:`9`,cy:`14`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,lt.jsx)(`circle`,{cx:`15`,cy:`14`,r:`1`,fill:`currentColor`,stroke:`none`})]}),ht=e=>(0,lt.jsxs)(ut,{...e,children:[(0,lt.jsx)(`path`,{d:`M3 3v18h18`}),(0,lt.jsx)(`path`,{d:`M7 15l4-5 3 3 5-7`})]}),gt=e=>(0,lt.jsxs)(ut,{...e,children:[(0,lt.jsx)(`circle`,{cx:`11`,cy:`11`,r:`7`}),(0,lt.jsx)(`path`,{d:`m21 21-4.3-4.3`})]}),_t=e=>(0,lt.jsxs)(ut,{...e,children:[(0,lt.jsx)(`path`,{d:`M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3`}),(0,lt.jsx)(`path`,{d:`M2 14h4M10 8h4M18 16h4`})]}),vt=e=>(0,lt.jsxs)(ut,{...e,children:[(0,lt.jsx)(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),(0,lt.jsx)(`path`,{d:`M15 3h6v6M10 14 21 3`})]}),yt=e=>(0,lt.jsxs)(ut,{...e,children:[(0,lt.jsx)(`path`,{d:`M21 12a9 9 0 1 1-2.6-6.4L21 8`}),(0,lt.jsx)(`path`,{d:`M21 3v5h-5`})]}),bt=e=>(0,lt.jsxs)(ut,{...e,children:[(0,lt.jsx)(`circle`,{cx:`12`,cy:`12`,r:`8`}),(0,lt.jsx)(`circle`,{cx:`12`,cy:`12`,r:`2.6`,fill:`currentColor`,stroke:`none`}),(0,lt.jsx)(`path`,{d:`M12 2v3M12 19v3M2 12h3M19 12h3`})]}),xt=e=>(0,lt.jsx)(ut,{...e,children:(0,lt.jsx)(`path`,{d:`m16 18 6-6-6-6M8 6l-6 6 6 6`})}),St=e=>(0,lt.jsxs)(ut,{...e,children:[(0,lt.jsx)(`path`,{d:`M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.7 1.7`}),(0,lt.jsx)(`path`,{d:`M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7`})]}),Ct=e=>(0,lt.jsx)(ut,{...e,children:(0,lt.jsx)(`path`,{d:`M3 7h13l-3-3M21 17H8l3 3`})}),wt=e=>(0,lt.jsxs)(ut,{...e,children:[(0,lt.jsx)(`path`,{d:`m12 2 9 5-9 5-9-5 9-5Z`}),(0,lt.jsx)(`path`,{d:`m3 12 9 5 9-5M3 17l9 5 9-5`})]}),Tt=e=>(0,lt.jsxs)(ut,{...e,children:[(0,lt.jsx)(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),(0,lt.jsx)(`path`,{d:`M7 10l5 5 5-5M12 15V3`})]}),Et=e=>(0,lt.jsxs)(ut,{...e,children:[(0,lt.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,lt.jsx)(`path`,{d:`M12 8h4.5a5 5 0 1 1-1.5-3.6`}),(0,lt.jsx)(`path`,{d:`M12 12h4.5`})]}),Dt=e=>(0,lt.jsxs)(ut,{...e,children:[(0,lt.jsx)(`path`,{d:`M9 4 3 6v14l6-2 6 2 6-2V4l-6 2-6-2Z`}),(0,lt.jsx)(`path`,{d:`M9 4v14M15 6v14`})]}),Ot=e=>(0,lt.jsxs)(ut,{...e,children:[(0,lt.jsx)(`path`,{d:`M12 3l7 3v6c0 4.5-3 7.9-7 9-4-1.1-7-4.5-7-9V6l7-3Z`}),(0,lt.jsx)(`path`,{d:`m9 12 2 2 4-4`})]}),kt=e=>(0,lt.jsxs)(ut,{...e,children:[(0,lt.jsx)(`path`,{d:`M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z`}),(0,lt.jsx)(`circle`,{cx:`12`,cy:`10`,r:`3`})]}),At=e=>(0,lt.jsxs)(ut,{...e,children:[(0,lt.jsx)(`path`,{d:`m3 17 6-6 4 4 8-8`}),(0,lt.jsx)(`path`,{d:`M14 7h7v7`})]}),jt=e=>(0,lt.jsxs)(ut,{...e,children:[(0,lt.jsx)(`rect`,{x:`3`,y:`5`,width:`18`,height:`14`,rx:`2`}),(0,lt.jsx)(`path`,{d:`m3 7 9 6 9-6`})]}),Mt=e=>(0,lt.jsx)(ut,{...e,children:(0,lt.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`})}),Nt=({size:e=16,fill:t})=>(0,lt.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,"aria-hidden":!0,children:[(0,lt.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`,fill:`none`,stroke:t||`currentColor`,strokeWidth:`2.4`}),(0,lt.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3.2`,fill:t||`currentColor`})]}),Pt=e=>(0,lt.jsxs)(ut,{...e,children:[(0,lt.jsx)(`path`,{d:`M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z`}),(0,lt.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})}));function It({onOpen:e}){let[t,n]=(0,Lt.useState)(null),[r,i]=(0,Lt.useState)(null),[a,o]=(0,Lt.useState)(!1),s=(e=!1)=>{o(!0),E.get(`/content/words${e?`?fresh=1`:``}`).then(n).catch(e=>i(e.message)).finally(()=>o(!1))};if((0,Lt.useEffect)(()=>{s()},[]),r)return(0,Rt.jsx)(M,{tone:`serious`,children:r});if(!t)return(0,Rt.jsx)(k,{children:b(`Counting…`,`ai-rank-suite`)});let c=t.bands||{},l=t.catalog||[],u=(t.posts||0)-(c.unknown||0);return(0,Rt.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Rt.jsx)(be,{columns:4,metrics:[{id:`words`,label:b(`Words on the site`,`ai-rank-suite`),hint:b(`Counted from the rendered page, not the raw post content. Reading time assumes 220 words per minute.`,`ai-rank-suite`),value:(t.words||0).toLocaleString(),sub:S(b(`about %s minutes of reading`,`ai-rank-suite`),(t.reading||0).toLocaleString())},{id:`average`,label:b(`Average page`,`ai-rank-suite`),hint:b(`The distribution below matters more — an average of 640 can hide half the site at 80 words.`,`ai-rank-suite`),value:u>0?t.average||0:`—`,sub:u>0?S(b(`across %s counted pages`,`ai-rank-suite`),u.toLocaleString()):b(`nothing counted yet`,`ai-rank-suite`)},{id:`thin`,label:b(`Thin or empty`,`ai-rank-suite`),hint:b(`Too little for an assistant to quote or a search engine to rank.`,`ai-rank-suite`),value:(c.thin||0)+(c.empty||0),accent:(c.thin||0)+(c.empty||0)>0?`var(--ars-accent)`:void 0,sub:b(`under 300 words`,`ai-rank-suite`)},{id:`deep`,label:b(`In depth`,`ai-rank-suite`),value:(c.deep||0)+(c.long||0),sub:b(`800 words and over`,`ai-rank-suite`)}]}),(0,Rt.jsx)(k,{icon:(0,Rt.jsx)(pt,{size:16}),title:b(`How long your pages are`,`ai-rank-suite`),subtitle:b(`Counted from the rendered page, not the raw post content — so a page built entirely of blocks is counted properly`,`ai-rank-suite`),action:(0,Rt.jsxs)(A,{variant:`ghost`,busy:a,onClick:()=>s(!0),children:[(0,Rt.jsx)(yt,{size:13}),b(`Recount`,`ai-rank-suite`)]}),children:(()=>{let e=l.reduce((e,t)=>e+(c[t.id]||0),0),t=c.unknown||0,n=e+t,r=t=>e>0?Math.round(100*t/e):0;return(0,Rt.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Rt.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,Rt.jsx)(`span`,{className:`text-[13px] font-semibold`,children:S(x(`%s page counted`,`%s pages counted`,e,`ai-rank-suite`),e.toLocaleString())}),(0,Rt.jsx)(`span`,{className:`t-caption`,children:n>0?S(b(`%1$s%% of %2$s published`,`ai-rank-suite`),Math.round(100*e/n),n.toLocaleString()):b(`nothing published`,`ai-rank-suite`)})]}),e===0?(0,Rt.jsx)(`div`,{className:`ars-empty-band`,children:b(`Nothing has been counted yet — run the site audit and this fills in.`,`ai-rank-suite`)}):(0,Rt.jsxs)(Rt.Fragment,{children:[(0,Rt.jsx)(Ue,{height:16,segments:l.map(e=>({label:e.label,value:c[e.id]||0,color:zt[e.id]}))}),(0,Rt.jsx)(`div`,{className:`ars-bands`,children:l.map(e=>{let t=c[e.id]||0;return(0,Rt.jsxs)(`div`,{className:`ars-band${t===0?` is-zero`:``}`,children:[(0,Rt.jsx)(`span`,{className:`ars-band-swatch`,style:{background:zt[e.id]},"aria-hidden":!0}),(0,Rt.jsx)(`span`,{className:`ars-band-label`,children:e.label}),(0,Rt.jsx)(`span`,{className:`ars-band-n tabular-nums`,children:t.toLocaleString()}),(0,Rt.jsxs)(`span`,{className:`ars-band-pct tabular-nums`,children:[r(t),`%`]}),(0,Rt.jsx)(`span`,{className:`ars-band-note-text`,children:e.note})]},e.id)})})]}),t>0&&(0,Rt.jsx)(M,{tone:`warning`,children:S(x(`%s published page has never been analysed, so it is not in the bar above at all — counting it as empty would be a guess. Run the site audit, or use the analyzer on the dashboard, and it joins the distribution.`,`%s published pages have never been analysed, so they are not in the bar above at all — counting them as empty would be a guess. Run the site audit, or use the analyzer on the dashboard, and they join the distribution.`,t,`ai-rank-suite`),t.toLocaleString())})]})})()}),(0,Rt.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:[(0,Rt.jsx)(k,{title:b(`By content type`,`ai-rank-suite`),flush:!0,children:(0,Rt.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Rt.jsxs)(`table`,{className:`ars-table`,children:[(0,Rt.jsx)(`thead`,{children:(0,Rt.jsxs)(`tr`,{children:[(0,Rt.jsx)(`th`,{children:b(`Type`,`ai-rank-suite`)}),(0,Rt.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Pages`,`ai-rank-suite`)}),(0,Rt.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Average`,`ai-rank-suite`)}),(0,Rt.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Longest`,`ai-rank-suite`)}),(0,Rt.jsx)(`th`,{style:{width:150},children:b(`Spread`,`ai-rank-suite`)})]})}),(0,Rt.jsx)(`tbody`,{children:(t.types||[]).map(e=>(0,Rt.jsxs)(`tr`,{children:[(0,Rt.jsx)(`td`,{className:`font-medium`,children:e.label}),(0,Rt.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.total.toLocaleString()}),(0,Rt.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.average??`—`}),(0,Rt.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.longest.toLocaleString()}),(0,Rt.jsx)(`td`,{children:(0,Rt.jsx)(Ue,{height:8,showLegend:!1,segments:l.map(t=>({label:t.label,value:e.bands[t.id]||0,color:zt[t.id]}))})})]},e.type))})]})})}),(0,Rt.jsx)(k,{title:b(`The shortest published pages`,`ai-rank-suite`),subtitle:b(`Where the work is, in order`,`ai-rank-suite`),flush:!0,children:(0,Rt.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Rt.jsxs)(`table`,{className:`ars-table`,children:[(0,Rt.jsx)(`thead`,{children:(0,Rt.jsxs)(`tr`,{children:[(0,Rt.jsx)(`th`,{children:b(`Page`,`ai-rank-suite`)}),(0,Rt.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Words`,`ai-rank-suite`)})]})}),(0,Rt.jsx)(`tbody`,{children:(t.shortest||[]).map(t=>(0,Rt.jsxs)(`tr`,{onClick:()=>e?.(t.id),style:e?{cursor:`pointer`}:void 0,children:[(0,Rt.jsx)(`td`,{className:`truncate`,children:t.title||`#${t.id}`}),(0,Rt.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:(0,Rt.jsx)(`b`,{style:{color:t.words<300?`var(--ars-serious)`:`inherit`},children:t.words})})]},t.id))})]})})})]}),(0,Rt.jsxs)(ot,{title:b(`Why this number differs from the one in the editor`,`ai-rank-suite`),children:[(0,Rt.jsx)(`p`,{children:b(`WordPress counts the raw post content, so it counts shortcode attributes, block comments and the alt text inside an image block — and it counts nothing that a block renders at display time. On a site built with blocks or a page builder the two numbers can differ by hundreds of words.`,`ai-rank-suite`)}),(0,Rt.jsx)(`p`,{children:b(`This counts the rendered page, which is what a crawler and an assistant actually read. It is stored on each post when the page is analyzed, so listing a thousand rows does not mean rendering a thousand pages.`,`ai-rank-suite`)}),(0,Rt.jsx)(`p`,{children:b(`Reading time uses 220 words per minute, the middle of the range for adult silent reading of general prose. Treat it as an estimate, not a measurement.`,`ai-rank-suite`)})]})]})}var Lt,Rt,zt,Bt=o((()=>{Lt=u(f(),1),C(),D(),at(),ct(),Ft(),Rt=O(),zt={empty:`#c0392b`,thin:`#e2952b`,standard:`#4436c8`,deep:`#2b7a4b`,long:`#8b5cf0`,unknown:`#b7bcca`}}));function Vt(){let[e,t]=(0,Ht.useState)(null),[n,r]=(0,Ht.useState)(null),[i,a]=(0,Ht.useState)(!1),o=(e=!1)=>{a(!0),E.get(`/store/audit${e?`?fresh=1`:``}`).then(t).catch(e=>r(e.message)).finally(()=>a(!1))};if((0,Ht.useEffect)(()=>{o()},[]),n)return(0,Ut.jsx)(M,{tone:`serious`,children:n});if(!e)return(0,Ut.jsx)(k,{children:b(`Reading the catalogue…`,`ai-rank-suite`)});if(!e.active)return(0,Ut.jsx)(M,{tone:`warning`,children:b(`WooCommerce is not active on this site.`,`ai-rank-suite`)});let s=e.counts||{},c=t=>e.products>0?Math.round(t/e.products*100):0,l=e=>{window.location.hash=e};return(0,Ut.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Ut.jsx)(be,{columns:4,metrics:[{id:`products`,label:b(`Products`,`ai-rank-suite`),value:e.products.toLocaleString(),sub:b(`published`,`ai-rank-suite`)},{id:`stranded`,label:b(`Dead ends`,`ai-rank-suite`),hint:b(`Out of stock and still indexable — a crawler is sent to a page nobody can buy from.`,`ai-rank-suite`),value:s.stranded??`—`,accent:s.stranded>0?`var(--ars-c-red-ink)`:void 0,sub:b(`out of stock, still indexable`,`ai-rank-suite`)},{id:`thin`,label:b(`Thin descriptions`,`ai-rank-suite`),hint:b(`Under 200 characters, there is nothing for a search engine to rank or an assistant to quote.`,`ai-rank-suite`),value:s.thin??`—`,accent:c(s.thin)>25?`var(--ars-c-red-ink)`:void 0,sub:S(b(`%d%% under 200 characters`,`ai-rank-suite`),c(s.thin))},{id:`gtin`,label:b(`No GTIN`,`ai-rank-suite`),hint:b(`Google cannot match the product to the same item elsewhere without a global identifier.`,`ai-rank-suite`),value:s.no_gtin??`—`,accent:c(s.no_gtin)>50?`var(--ars-accent)`:void 0,sub:S(b(`%d%% cannot be matched`,`ai-rank-suite`),c(s.no_gtin))}]}),(e.issues||[]).length>0?(0,Ut.jsx)(k,{title:b(`What is costing you traffic`,`ai-rank-suite`),subtitle:b(`Ordered by consequence, not by count`,`ai-rank-suite`),action:(0,Ut.jsxs)(A,{variant:`ghost`,busy:i,onClick:()=>o(!0),children:[(0,Ut.jsx)(yt,{size:13}),b(`Re-check`,`ai-rank-suite`)]}),children:(0,Ut.jsx)(`div`,{className:`grid gap-2`,children:e.issues.map((e,t)=>(0,Ut.jsxs)(`div`,{className:`ars-head-issue is-${e.level}`,children:[(0,Ut.jsx)(`span`,{"aria-hidden":!0,className:`ars-head-issue-mark`,children:e.level===`error`?`✕`:`!`}),(0,Ut.jsxs)(`div`,{children:[(0,Ut.jsx)(`div`,{className:`font-semibold text-[12.5px]`,children:e.title}),(0,Ut.jsx)(`div`,{className:`text-[12px] mt-0.5`,style:{color:`var(--ars-ink-2)`},children:e.text}),Wt[e.fix]&&(0,Ut.jsxs)(`button`,{type:`button`,className:`ars-linkbtn mt-1.5`,onClick:()=>l(Wt[e.fix].hash),children:[Wt[e.fix].label,` →`]})]})]},t))})}):(0,Ut.jsx)(M,{tone:`good`,children:b(`Nothing in the catalogue is failing the checks above.`,`ai-rank-suite`)}),(0,Ut.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:[(0,Ut.jsx)(k,{title:b(`Product data`,`ai-rank-suite`),subtitle:b(`What each listing is missing`,`ai-rank-suite`),flush:!0,children:(0,Ut.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Ut.jsx)(`table`,{className:`ars-table`,children:(0,Ut.jsx)(`tbody`,{children:[[b(`No SKU`,`ai-rank-suite`),s.no_sku,b(`Not required by Google, but every feed and every integration wants one.`,`ai-rank-suite`)],[b(`No GTIN`,`ai-rank-suite`),s.no_gtin,b(`Google cannot match the product to the same item elsewhere without it.`,`ai-rank-suite`)],[b(`No price`,`ai-rank-suite`),s.no_price,b(`A product with no price cannot be a rich result at all.`,`ai-rank-suite`)],[b(`No image`,`ai-rank-suite`),s.no_image,b(`No Shopping listing, no image in the result, a grey box when shared.`,`ai-rank-suite`)],[b(`No short description`,`ai-rank-suite`),s.no_short_desc,b(`WooCommerce shows it beside the price; it is also the best source for a meta description.`,`ai-rank-suite`)],[b(`No meta description`,`ai-rank-suite`),s.no_meta_desc,b(`The autopilot can write these for the whole catalogue in one run.`,`ai-rank-suite`)],[b(`Out of stock`,`ai-rank-suite`),s.out_of_stock,b(`Fine in itself. The problem is only the indexable ones.`,`ai-rank-suite`)]].map(([t,n,r])=>(0,Ut.jsxs)(`tr`,{children:[(0,Ut.jsxs)(`td`,{children:[(0,Ut.jsx)(`div`,{className:`font-medium`,children:t}),(0,Ut.jsx)(`div`,{className:`t-caption`,children:r})]}),(0,Ut.jsxs)(`td`,{className:`is-num is-narrow tabular-nums`,children:[(0,Ut.jsx)(`b`,{style:{color:n>0?`var(--ars-ink)`:`var(--ars-ink-3)`},children:n}),n>0&&e.products>0&&(0,Ut.jsxs)(`div`,{className:`t-caption`,children:[c(n),`%`]})]})]},t))})})})}),(0,Ut.jsx)(k,{title:b(`Category pages with no text`,`ai-rank-suite`),subtitle:b(`Biggest first — a description on a category with 400 products is worth 400 times the one on a category with one`,`ai-rank-suite`),flush:!0,children:(e.categories?.rows||[]).length===0?(0,Ut.jsx)(`p`,{className:`m-0 p-4 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Every category with products in it has a description.`,`ai-rank-suite`)}):(0,Ut.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Ut.jsxs)(`table`,{className:`ars-table`,children:[(0,Ut.jsx)(`thead`,{children:(0,Ut.jsxs)(`tr`,{children:[(0,Ut.jsx)(`th`,{children:b(`Category`,`ai-rank-suite`)}),(0,Ut.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Products`,`ai-rank-suite`)}),(0,Ut.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Words`,`ai-rank-suite`)})]})}),(0,Ut.jsx)(`tbody`,{children:e.categories.rows.map(e=>(0,Ut.jsxs)(`tr`,{children:[(0,Ut.jsx)(`td`,{className:`font-medium`,children:(0,Ut.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1`,children:[e.name,` `,(0,Ut.jsx)(vt,{size:10})]})}),(0,Ut.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.products}),(0,Ut.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.words})]},e.id))})]})})})]}),(0,Ut.jsxs)(k,{title:b(`Faceted navigation`,`ai-rank-suite`),subtitle:b(`The filter URLs a crawler can reach, and whether anything stops it`,`ai-rank-suite`),children:[(0,Ut.jsx)(be,{columns:3,metrics:[{id:`attributes`,label:b(`Filter attributes`,`ai-rank-suite`),hint:b(`Colour, size, brand and so on — each one multiplies the crawlable URL space.`,`ai-rank-suite`),value:(e.facets?.attributes||[]).length},{id:`combos`,label:b(`Possible combinations`,`ai-rank-suite`),hint:b(`Each combination is a crawlable near-duplicate competing with the category page it came from.`,`ai-rank-suite`),value:(e.facets?.combos||0).toLocaleString(),accent:e.facets?.combos>100?`var(--ars-c-red-ink)`:void 0},{id:`open`,label:b(`Unblocked parameters`,`ai-rank-suite`),hint:b(`Filter parameters no robots.txt rule names — a crawler may follow every combination of them.`,`ai-rank-suite`),value:(e.facets?.open||[]).length,accent:(e.facets?.open||[]).length>0?`var(--ars-accent)`:void 0,sub:S(b(`%d named in robots.txt`,`ai-rank-suite`),(e.facets?.guarded||[]).length)}]}),(0,Ut.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-1.5`,children:[(e.facets?.guarded||[]).map(e=>(0,Ut.jsx)(`span`,{className:`ars-tag`,style:{background:`var(--ars-c-green)`,color:`var(--ars-c-green-ink)`},children:e},e)),(e.facets?.open||[]).map(e=>(0,Ut.jsx)(`span`,{className:`ars-tag`,children:e},e))]}),(0,Ut.jsxs)(ot,{title:b(`Why this is the most damaging problem a shop can have`,`ai-rank-suite`),children:[(0,Ut.jsx)(`p`,{children:b(`A shop with six filter attributes can generate more crawlable URLs than it has products — every one a near-duplicate of a category page, every one competing with the category page it came from. Google spends its crawl budget on them instead of your products, and the category page it should have ranked is diluted across a thousand variants of itself.`,`ai-rank-suite`)}),(0,Ut.jsx)(`p`,{children:b(`None of those URLs exist until a crawler follows a filter link, which is why the problem is invisible from the admin and why it is usually found months later in a Search Console coverage report. The fix is to disallow the parameters in robots.txt — the AI Crawlers screen writes robots.txt, and the Advanced screen has the raw editor.`,`ai-rank-suite`)}),(0,Ut.jsx)(`p`,{children:b(`The count above is the number of parameters in play and whether anything names them in robots.txt. It is deliberately not a count of junk URLs, because nobody can know that without crawling the site, and a made-up number here would be worse than none.`,`ai-rank-suite`)})]})]}),(e.thin_list||[]).length>0&&(0,Ut.jsx)(k,{title:b(`The thinnest products`,`ai-rank-suite`),subtitle:b(`Shortest first — the autopilot can write descriptions for all of them`,`ai-rank-suite`),action:(0,Ut.jsx)(A,{variant:`ghost`,onClick:()=>l(`/autopilot`),children:b(`Open the autopilot`,`ai-rank-suite`)}),flush:!0,children:(0,Ut.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Ut.jsxs)(`table`,{className:`ars-table`,children:[(0,Ut.jsx)(`thead`,{children:(0,Ut.jsxs)(`tr`,{children:[(0,Ut.jsx)(`th`,{children:b(`Product`,`ai-rank-suite`)}),(0,Ut.jsx)(`th`,{className:`is-mid`,style:{width:120},children:b(`SKU`,`ai-rank-suite`)}),(0,Ut.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Characters`,`ai-rank-suite`)})]})}),(0,Ut.jsx)(`tbody`,{children:e.thin_list.map(e=>(0,Ut.jsxs)(`tr`,{style:{cursor:`pointer`},onClick:()=>l(`/content/${e.id}`),children:[(0,Ut.jsx)(`td`,{className:`font-medium truncate`,children:e.title}),(0,Ut.jsx)(`td`,{className:`is-mid t-caption`,children:e.sku||`—`}),(0,Ut.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.body===0?(0,Ut.jsx)(j,{tone:`serious`,children:b(`empty`,`ai-rank-suite`)}):e.body})]},e.id))})]})})})]})}var Ht,Ut,Wt,Gt=o((()=>{Ht=u(f(),1),C(),D(),at(),ct(),Ft(),Ut=O(),Wt={crawl:{hash:`/crawlers`,label:b(`Open crawler controls`,`ai-rank-suite`)},content:{hash:`/content?type=product`,label:b(`Open the product list`,`ai-rank-suite`)},products:{hash:`/content?type=product`,label:b(`Open the product list`,`ai-rank-suite`)},categories:{hash:`/schema`,label:b(`Open schema settings`,`ai-rank-suite`)},autopilot:{hash:`/autopilot`,label:b(`Let the autopilot write them`,`ai-rank-suite`)}}})),Kt,qt=o((()=>{Kt=function(e,t,n){let r=Promise.resolve();function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})}}));function Jt(){let e=re.license||{};return!e.enforced||!!e.licensed}function Yt(){return re.edition===`pro`}function Xt(){let e=re.license||{};return Yt()&&e.enforced&&!e.licensed&&e.activateUrl?e.activateUrl:!Yt()&&e.upgradeUrl?e.upgradeUrl:e.manageUrl||`#/settings/license`}var Zt=o((()=>{f(),D(),O()}));function Qt({routing:e,systems:t,now:n,running:r,compact:i=!1}){let a=e?.engines||[],o=e?.jobs||[],s=a.length>0,c=tn(),l=(0,ln.useMemo)(()=>{let e=new Map;o.forEach(t=>{let n=fn(t);e.has(n)||e.set(n,[]),e.get(n).push(t)});let t=dn.filter(t=>e.has(t.id)).map(t=>({...t,jobs:e.get(t.id)})),n=[...e.keys()].filter(e=>e&&!dn.some(t=>t.id===e)).map(t=>({id:t,label:e.get(t)[0]?.desk||t,hint:``,jobs:e.get(t)}));return[...t,...n]},[o]),u=(0,ln.useMemo)(()=>{if(!n)return null;let e=o.find(e=>e.id===an(n.task));return e?fn(e):null},[n,o]),d=(0,ln.useMemo)(()=>{let e=new Map;return a.forEach((t,n)=>e.set(t.id,n)),e},[a]),f=t?.circuits||[],p=t?.clockwork||null,m=Number(e?.jobs_total)||o.length||1;return(0,un.jsxs)(`div`,{className:`ars-floor${s?` is-live`:``}${c?` is-still`:``}${i?` is-compact`:``}`,children:[f.length>0&&(0,un.jsxs)(`div`,{className:`ars-circuits-wrap`,children:[(0,un.jsxs)(`div`,{className:`ars-floor-rail-label`,children:[(0,un.jsx)(`span`,{className:`t-overline`,children:b(`Connected to`,`ai-rank-suite`)}),(0,un.jsx)(`span`,{className:`t-caption`,children:S(b(`%1$s of %2$s services are plugged in. Each one below says what stops working while it is dark.`,`ai-rank-suite`),f.filter(e=>e.live).length,f.length)})]}),(0,un.jsx)(`div`,{className:`ars-vein`,"aria-hidden":!0,children:(0,un.jsx)(`span`,{className:`ars-vein-flow`})}),(0,un.jsx)(`div`,{className:`ars-circuits`,children:f.map(e=>(0,un.jsxs)(`button`,{type:`button`,className:`ars-circuit${e.live?` is-live`:``}${e.core?` is-core`:``}`,title:e.powers,onClick:()=>{e.href&&(window.location.hash=`/${e.href}`)},children:[(0,un.jsx)(`span`,{className:`ars-circuit-stem`,"aria-hidden":!0}),(0,un.jsx)(`span`,{className:`ars-circuit-led`,"aria-hidden":!0}),(0,un.jsx)(`span`,{className:`ars-circuit-name`,children:e.label}),(0,un.jsx)(`span`,{className:`ars-circuit-detail`,children:e.detail}),(0,un.jsx)(`span`,{className:`ars-circuit-powers`,children:e.powers})]},e.id))})]}),!s&&(0,un.jsxs)(un.Fragment,{children:[(0,un.jsxs)(`div`,{className:`ars-floor-off`,children:[(0,un.jsx)(`span`,{className:`ars-floor-off-mark`,"aria-hidden":!0}),(0,un.jsxs)(`div`,{className:`min-w-0`,children:[(0,un.jsx)(`div`,{className:`font-semibold text-[13px]`,children:b(`The floor is dark`,`ai-rank-suite`)}),(0,un.jsx)(`p`,{className:`m-0 mt-1 text-[12.5px]`,children:b(`No API key is stored, so nothing downstream can run. Connect one engine and every desk below wakes up at once — the assignments already exist, they are just unpowered.`,`ai-rank-suite`)})]}),(0,un.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:()=>{window.location.hash=`/ai`},children:b(`Connect an engine`,`ai-rank-suite`)})]}),!i&&p&&(0,un.jsx)($t,{clock:p,still:c}),l.length>0&&(0,un.jsxs)(un.Fragment,{children:[(0,un.jsxs)(`div`,{className:`ars-floor-rail-label`,children:[(0,un.jsx)(`span`,{className:`t-overline`,children:b(`Would be done with AI`,`ai-rank-suite`)}),(0,un.jsx)(`span`,{className:`t-caption`,children:S(b(`%s kinds of work are wired up and waiting for a key. Nothing here is running.`,`ai-rank-suite`),m)})]}),(0,un.jsx)(`div`,{className:`ars-floor-desks is-dark`,children:l.map(e=>(0,un.jsxs)(`div`,{className:`ars-desk is-dark`,children:[(0,un.jsxs)(`div`,{className:`ars-desk-head`,children:[(0,un.jsx)(`span`,{className:`ars-desk-name`,children:e.label||e.id}),(0,un.jsx)(`span`,{className:`ars-desk-hint`,children:e.hint})]}),(0,un.jsx)(`ul`,{className:`ars-desk-jobs`,children:(e.jobs||[]).map(e=>(0,un.jsxs)(`li`,{children:[(0,un.jsx)(`span`,{className:`ars-desk-job`,children:e.label}),(0,un.jsx)(`span`,{className:`ars-desk-eng is-cold`,children:b(`unpowered`,`ai-rank-suite`)})]},e.id))})]},e.id))})]})]}),s&&(0,un.jsxs)(un.Fragment,{children:[(0,un.jsx)(`div`,{className:`ars-floor-engines`,children:a.map(e=>{let t=n&&(e.jobs||[]).some(e=>e.id===an(n.task));return(0,un.jsxs)(`div`,{className:`ars-eng${t?` is-busy`:``}${e.default?` is-default`:``}`,children:[(0,un.jsx)(`span`,{className:`ars-eng-lead`,"aria-hidden":!0}),(0,un.jsxs)(`div`,{className:`ars-eng-head`,children:[(0,un.jsx)(`span`,{className:`ars-eng-dot`,"aria-hidden":!0}),(0,un.jsx)(`span`,{className:`ars-eng-name`,children:e.label}),e.default&&(0,un.jsx)(`span`,{className:`ars-eng-flag`,children:b(`default`,`ai-rank-suite`)})]}),(0,un.jsx)(`div`,{className:`ars-eng-model`,children:e.model}),(0,un.jsxs)(`div`,{className:`ars-eng-load`,title:S(b(`%1$s of the %2$s kinds of work on this site are routed to this engine. It counts assignments, not calls made and not money spent.`,`ai-rank-suite`),e.load,m),children:[(0,un.jsx)(`div`,{className:`ars-eng-load-bar`,children:(0,un.jsx)(`span`,{style:{width:`${Math.min(100,e.load/Math.max(1,m)*100)}%`}})}),(0,un.jsx)(`span`,{className:`tabular-nums`,children:S(b(`%1$s of %2$s job types`,`ai-rank-suite`),e.load,m)})]})]},e.id)})}),(0,un.jsxs)(`div`,{className:`ars-floor-rail-label`,children:[(0,un.jsx)(`span`,{className:`t-overline`,children:b(`Done with AI`,`ai-rank-suite`)}),(0,un.jsx)(`span`,{className:`t-caption`,children:S(b(`%s kinds of work, each one sent to the engine named beside it. A line lights up only while that work is actually running.`,`ai-rank-suite`),m)})]}),(0,un.jsxs)(`div`,{className:`ars-floor-body`,children:[(0,un.jsx)(`div`,{className:`ars-floor-desks`,children:l.map(e=>{let t=u===e.id;return(0,un.jsxs)(`div`,{className:`ars-desk${t?` is-active`:``}`,children:[(0,un.jsxs)(`div`,{className:`ars-desk-head`,children:[(0,un.jsx)(`span`,{className:`ars-desk-name`,children:e.label||e.id}),(0,un.jsx)(`span`,{className:`ars-desk-hint`,children:e.hint})]}),(0,un.jsx)(`ul`,{className:`ars-desk-jobs`,children:(e.jobs||[]).map(e=>{let t=n&&an(n.task)===e.id;return(0,un.jsxs)(`li`,{className:t?`is-on`:``,children:[(0,un.jsx)(`span`,{className:`ars-desk-job`,children:e.label}),(0,un.jsxs)(`span`,{className:`ars-desk-eng${e.ready?``:` is-cold`}`,title:e.fell_back?b(`Assigned elsewhere, but that engine has no key — this is where the work is really going.`,`ai-rank-suite`):e.assigned?b(`Assigned explicitly`,`ai-rank-suite`):b(`Uses the default engine`,`ai-rank-suite`),style:d.has(e.provider)?{"--ars-wire":cn(d.get(e.provider))}:void 0,children:[e.fell_back?`↳ `:``,sn(a.find(t=>t.id===e.provider)?.label||e.provider)]})]},e.id)})})]},e.id)})}),!i&&p&&(0,un.jsx)($t,{clock:p,still:c})]})]}),(0,un.jsx)(`div`,{className:`ars-floor-now${n?` is-on`:``}`,"aria-live":`polite`,children:n?(0,un.jsxs)(un.Fragment,{children:[(0,un.jsx)(`span`,{className:`ars-floor-now-mark`,"aria-hidden":!0}),(0,un.jsxs)(`span`,{className:`ars-floor-now-text`,children:[(0,un.jsx)(`b`,{children:on(n.task)}),` `,S(b(`for “%1$s” — %2$s`,`ai-rank-suite`),n.title,n.engine)]}),(0,un.jsx)(en,{since:n.since})]}):(0,un.jsx)(`span`,{className:`ars-floor-now-text is-idle`,children:b(r?`Between tasks…`:s?`Powered. Nothing running right now.`:`Idle. Nothing is running.`,`ai-rank-suite`)})})]})}function $t({clock:e,still:t}){return(0,un.jsxs)(`div`,{className:`ars-clock`,children:[(0,un.jsxs)(`div`,{className:`ars-clock-head`,children:[(0,un.jsx)(`span`,{className:`ars-clock-title`,children:b(`Clockwork`,`ai-rank-suite`)}),e.overdue>0?(0,un.jsx)(`span`,{className:`ars-clock-flag is-bad`,children:S(b(`%d overdue`,`ai-rank-suite`),e.overdue)}):e.disabled?(0,un.jsx)(`span`,{className:`ars-clock-flag is-warn`,children:b(`cron handed off`,`ai-rank-suite`)}):(0,un.jsx)(`span`,{className:`ars-clock-flag`,children:b(`on time`,`ai-rank-suite`)})]}),(0,un.jsx)(`ul`,{className:`ars-clock-gears`,children:(e.gears||[]).map(e=>(0,un.jsxs)(`li`,{className:`ars-gear${e.late?` is-late`:``}${e.scheduled?``:` is-off`}`,children:[(0,un.jsx)(`span`,{className:`ars-gear-wheel${e.scheduled&&!e.late&&!t?` is-turning`:``}`,"aria-hidden":!0}),(0,un.jsxs)(`span`,{className:`min-w-0`,children:[(0,un.jsx)(`span`,{className:`ars-gear-name`,title:e.about,children:e.label}),(0,un.jsxs)(`span`,{className:`ars-gear-when`,children:[e.scheduled?e.late?S(b(`overdue by %s`,`ai-rank-suite`),nn(-e.in)):S(b(`in %s`,`ai-rank-suite`),nn(e.in)):b(`not scheduled`,`ai-rank-suite`),e.last>0&&` · ${S(b(`last ran %s`,`ai-rank-suite`),rn(e.last))}`,e.last===0&&e.scheduled&&` · ${b(`never run yet`,`ai-rank-suite`)}`]})]})]},e.hook))}),(0,un.jsx)(`p`,{className:`ars-clock-note`,children:e.note})]})}function en({since:e}){let[t,n]=(0,ln.useState)(()=>Math.floor(Date.now()/1e3));(0,ln.useEffect)(()=>{let e=setInterval(()=>n(Math.floor(Date.now()/1e3)),1e3);return()=>clearInterval(e)},[]);let r=Math.max(0,t-(e||t));return(0,un.jsxs)(`span`,{className:`ars-floor-now-time tabular-nums`,children:[r,`s`]})}function tn(){let[e,t]=(0,ln.useState)(!1),n=(0,ln.useRef)(null);return(0,ln.useEffect)(()=>{if(n.current=window.matchMedia?.(`(prefers-reduced-motion: reduce)`),!n.current)return;let e=()=>t(n.current.matches);return e(),n.current.addEventListener?.(`change`,e),()=>n.current?.removeEventListener?.(`change`,e)},[]),e}function nn(e){let t=Math.max(0,e);if(t<60)return b(`under a minute`,`ai-rank-suite`);if(t<3600)return S(b(`%d min`,`ai-rank-suite`),Math.round(t/60));if(t<86400)return S(b(`%dh`,`ai-rank-suite`),Math.round(t/3600));let n=Math.round(t/86400);return S(x(`%d day`,`%d days`,n,`ai-rank-suite`),n)}function rn(e){return S(b(`%s ago`,`ai-rank-suite`),nn(Math.floor(Date.now()/1e3)-e))}function an(e){return pn[e]||`autopilot`}function on(e){return mn[e]||e}function sn(e){return e?e.length>22?`${e.slice(0,21)}…`:e:``}function cn(e){let t=[`var(--ars-brand)`,`var(--ars-accent)`,`var(--ars-c-green-ink)`,`var(--ars-c-blue-ink)`,`var(--ars-c-violet-ink)`];return t[e%t.length]}var ln,un,dn,fn,pn,mn,hn=o((()=>{ln=u(f(),1),C(),un=O(),dn=[{id:`copy`,label:b(`Copy desk`,`ai-rank-suite`),hint:b(`Writes`,`ai-rank-suite`)},{id:`research`,label:b(`Research`,`ai-rank-suite`),hint:b(`Finds`,`ai-rank-suite`)},{id:`technical`,label:b(`Technical`,`ai-rank-suite`),hint:b(`Structures`,`ai-rank-suite`)},{id:`analysis`,label:b(`Analysis`,`ai-rank-suite`),hint:b(`Measures`,`ai-rank-suite`)},{id:`operations`,label:b(`Operations`,`ai-rank-suite`),hint:b(`Runs at scale`,`ai-rank-suite`)}],fn=e=>e?.desk_id||e?.desk||``,pn={description:`meta`,title:`meta`,faq:`faq`},mn={description:b(`Writing a meta description`,`ai-rank-suite`),title:b(`Writing an SEO title`,`ai-rank-suite`),faq:b(`Generating questions`,`ai-rank-suite`)}}));function gn(){let[e,t]=(0,_n.useState)(null),[n,r]=(0,_n.useState)(null),[i,a]=(0,_n.useState)(!1),[o,s]=(0,_n.useState)(null),c=(0,_n.useRef)(null),l=()=>{if(!ie(`autopilot`)){t(!1);return}E.get(`/autopilot/status`).then(t).catch(()=>t(!1)),ie(`ai`)&&E.get(`/ai/usage`).then(r).catch(()=>{})};if((0,_n.useEffect)(()=>(l(),()=>clearTimeout(c.current)),[]),(0,_n.useEffect)(()=>(clearTimeout(c.current),e&&e.running&&(c.current=setTimeout(l,4e3)),()=>clearTimeout(c.current)),[e]),e===!1||e===null)return null;let u=e.state||{},d=!!e.has_key,f=!!e.running,p=!!e.stalled&&!f&&u.total>0&&!u.finished,m=Number(u.done)||0,h=Number(u.total)||0,g=h>0?Math.min(100,Math.round(m/h*100)):0,_=n?.spend?.today_calls??null,v=n?.spend?.today??null,y=e.tasks?.[e.now?.task]||null,x=Number(e.spent?.cost_micro)||0,C=Number(e.finished)||0,w=h>0&&!f&&C>0,ee=n?.spend?.timezone||``,T=/^[+-]\d{2}:\d{2}$/.test(ee)?``:ee,te=async()=>{a(!0),s(null);try{await E.post(`/autopilot/resume`,{}),s(b(`Picked up again — the next batch runs on the next page view.`,`ai-rank-suite`)),l()}catch(e){s(e.message)}finally{a(!1)}},ne,re=`neutral`;return d?f?(re=`good`,ne=y?S(b(`%1$s — %2$s of %3$s`,`ai-rank-suite`),y.label,m.toLocaleString(),h.toLocaleString()):S(b(`Working — %1$s of %2$s`,`ai-rank-suite`),m.toLocaleString(),h.toLocaleString())):p?(re=`warning`,ne=S(b(`A run is open at %1$s of %2$s and is not ticking.`,`ai-rank-suite`),m.toLocaleString(),h.toLocaleString())):_>0?(re=`good`,ne=S(b(`%1$s AI calls today, %2$s spent. Nothing running right now.`,`ai-rank-suite`),_.toLocaleString(),yn(v))):w?(re=`good`,ne=S(b(`Last run finished: %1$s of %2$s pages. Nothing running right now.`,`ai-rank-suite`),m.toLocaleString(),h.toLocaleString())):ne=b(`The engine is connected and idle.`,`ai-rank-suite`):ne=b(`No engine connected yet — the AI cannot do anything for you.`,`ai-rank-suite`),(0,vn.jsx)(k,{title:b(`The AI at work`,`ai-rank-suite`),subtitle:b(`What the agent is doing on this site, and what it has cost — counted, not estimated`,`ai-rank-suite`),action:d?(0,vn.jsx)(j,{tone:f?`good`:`neutral`,children:b(f?`running`:`idle`,`ai-rank-suite`)}):(0,vn.jsx)(j,{tone:`warning`,children:b(`no key`,`ai-rank-suite`)}),children:(0,vn.jsxs)(`div`,{className:`grid gap-3`,children:[(0,vn.jsxs)(`div`,{className:`ars-aiwork-head is-${re}`,children:[(0,vn.jsx)(`span`,{className:`ars-aiwork-dot`,"aria-hidden":!0}),(0,vn.jsx)(`span`,{className:`ars-aiwork-line`,children:ne})]}),(f||p)&&h>0&&(0,vn.jsx)(`div`,{className:`ars-aiwork-bar`,role:`progressbar`,"aria-valuenow":g,"aria-valuemin":0,"aria-valuemax":100,children:(0,vn.jsx)(`i`,{style:{width:`${g}%`}})}),y?.why&&f&&(0,vn.jsx)(`p`,{className:`ars-aiwork-why`,children:y.why}),p&&(0,vn.jsx)(`p`,{className:`ars-aiwork-why`,children:b(`WordPress runs scheduled work on page views, not on the clock, so a quiet site runs it late. This picks it up now.`,`ai-rank-suite`)}),d&&(_!==null||h>0)&&(0,vn.jsxs)(`div`,{className:`ars-aiwork-figures`,children:[_!==null&&(0,vn.jsxs)(`div`,{children:[(0,vn.jsx)(`span`,{children:b(`Calls today`,`ai-rank-suite`)}),(0,vn.jsx)(`strong`,{children:_.toLocaleString()}),(0,vn.jsx)(`em`,{children:T?S(b(`Requests to a model since midnight, %s. One page can take several.`,`ai-rank-suite`),T):b(`Requests to a model since midnight, in your site timezone. One page can take several.`,`ai-rank-suite`)})]}),v!==null&&(0,vn.jsxs)(`div`,{children:[(0,vn.jsx)(`span`,{children:b(`Spent today`,`ai-rank-suite`)}),(0,vn.jsx)(`strong`,{children:yn(v)}),(0,vn.jsx)(`em`,{children:b(`Metered from the tokens each call actually used, at your provider’s list price. Not an estimate.`,`ai-rank-suite`)})]}),h>0&&(0,vn.jsxs)(`div`,{children:[(0,vn.jsx)(`span`,{children:b(w?`Last run`:`This run`,`ai-rank-suite`)}),(0,vn.jsxs)(`strong`,{children:[m.toLocaleString(),` / `,h.toLocaleString()]}),(0,vn.jsx)(`em`,{children:b(w?`Pages the last run got through, out of the queue it planned up front. It is over; nothing is waiting.`:`Pages done, out of the queue planned when the run started. The queue cannot grow while it runs.`,`ai-rank-suite`)})]}),x>0?(0,vn.jsxs)(`div`,{children:[(0,vn.jsx)(`span`,{children:b(w?`That run cost`:`This run so far`,`ai-rank-suite`)}),(0,vn.jsx)(`strong`,{children:yn(x)}),(0,vn.jsx)(`em`,{children:b(`Measured: the sum of every call this run made, not the estimate it started with.`,`ai-rank-suite`)})]}):u.estimate?.cost?(0,vn.jsxs)(`div`,{children:[(0,vn.jsx)(`span`,{children:b(`Estimated for the run`,`ai-rank-suite`)}),(0,vn.jsx)(`strong`,{children:u.estimate.cost}),(0,vn.jsx)(`em`,{children:b(`A forecast made before the first call, from an average page. The measured figure replaces it as soon as anything is spent.`,`ai-rank-suite`)})]}):null]}),o&&(0,vn.jsx)(`p`,{className:`ars-aiwork-why`,children:o}),(0,vn.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[!d&&(0,vn.jsx)(A,{onClick:()=>bn(`/ai`),children:b(`Connect an engine`,`ai-rank-suite`)}),p&&(0,vn.jsx)(A,{busy:i,onClick:te,children:b(`Pick it up now`,`ai-rank-suite`)}),(0,vn.jsx)(A,{variant:`ghost`,onClick:()=>bn(`/autopilot`),children:b(`Open the autopilot`,`ai-rank-suite`)})]}),e.routing&&(0,vn.jsx)(Qt,{routing:e.routing,systems:e.systems,now:e.now,running:f,compact:!0})]})})}var _n,vn,yn,bn,xn=o((()=>{_n=u(f(),1),C(),D(),at(),hn(),vn=O(),yn=e=>{let t=(Number(e)||0)/1e6;return t===0?`$0`:t<.01?`$${t.toFixed(3)}`:`$${t.toFixed(2)}`},bn=e=>{window.location.hash=e}}));function Sn({title:e,subtitle:t,series:n,color:r,label:i,formatValue:a,invert:o=!1,tiles:s=[],breakdown:c=null,bands:l=null,note:u=null,status:d=null,statusAction:f=null}){let p=n.length>1?n[0].value:null,m=n.length?n[n.length-1].value:null,h=p===null?null:m-p,g=n.length>=3&&new Set(n.map(e=>e.value)).size>1;return(0,Tn.jsxs)(k,{title:e,subtitle:t,action:h===null?null:(0,Tn.jsx)(Re,{value:h,invert:o,suffix:` ${b(`since first reading`,`ai-rank-suite`)}`}),children:[g?(0,Tn.jsx)(je,{data:n,label:i,color:r,height:140,formatValue:a,bleed:!0}):c?(0,Tn.jsx)($e,{parts:c,total:m}):Array.isArray(l)&&l.length?(0,Tn.jsx)(Qe,{value:m,color:r,bands:l}):null,!g&&(0,Tn.jsx)(`p`,{className:`ars-trend-note`,children:n.length<=1?b(`The line starts once there are three readings — then its shape means something.`,`ai-rank-suite`):S(b(`%s readings so far, and nothing has moved. The line replaces this the moment it does.`,`ai-rank-suite`),n.length.toLocaleString())}),u&&(0,Tn.jsx)(`p`,{className:`ars-trend-note`,children:u}),d&&(0,Tn.jsxs)(`div`,{className:`ars-trend-status flex flex-wrap items-center gap-3`,children:[(0,Tn.jsx)(`p`,{className:`ars-trend-note m-0`,children:d}),f]}),s.length>0&&(0,Tn.jsx)(`div`,{className:`grid gap-3 mt-3 ${s.length===3?`sm:grid-cols-3`:`sm:grid-cols-2`}`,children:s.map(e=>(0,Tn.jsxs)(`div`,{className:`ars-r-md px-3 py-2.5`,style:{background:`var(--ars-surface-2)`},children:[(0,Tn.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,Tn.jsx)(`span`,{className:`text-[12px] font-semibold`,style:{color:e.color},children:e.label}),e.delta!==null&&e.delta!==void 0&&(0,Tn.jsx)(Re,{value:e.delta,invert:!!e.invert})]}),(0,Tn.jsx)(`div`,{className:`t-num text-[18px] font-bold mt-0.5`,children:e.text??(e.value===null||e.value===void 0?`–`:Number(e.value).toLocaleString())})]},e.label))})]})}function Cn({charts:e=[`score`,`findings`,`scored`],revision:t=0}){let[n,r]=(0,wn.useState)(null),[i,a]=(0,wn.useState)(!1);if((0,wn.useEffect)(()=>{E.get(`/dashboard/trends`).then(r).catch(()=>r({score:[],findings:[],scored:[]}))},[t]),!n)return null;let o=n.score||[],s=n.findings||[],c=n.scored||[],l=n.coverage||{published:0,analyzed:0,unanalyzed:0},u=n.meta||{},d=u.score_last?u.score_next?S(b(`Last reading %1$s · next automatic reading %2$s`,`ai-rank-suite`),u.score_last,u.score_next):S(b(`Last reading %s · a new one is taken once a day and whenever you press Recalculate`,`ai-rank-suite`),u.score_last):null,f=u.audit_running?(0,Tn.jsx)(A,{variant:`ghost`,onClick:()=>{window.location.hash=`/audit`},children:b(`Open Site Audit`,`ai-rank-suite`)}):(0,Tn.jsx)(A,{variant:`ghost`,onClick:async()=>{a(!0);try{await E.post(`/audit/start`,{})}catch{}window.location.hash=`/audit`},disabled:i,children:b(i?`Starting…`:`Run an audit now`,`ai-rank-suite`)}),p=u.audit_running?b(`An audit is running; its findings appear here when it finishes.`,`ai-rank-suite`):u.findings_last?u.audit_next?S(b(`Last audit %1$s · next scheduled audit %2$s`,`ai-rank-suite`),u.findings_last,u.audit_next):S(b(`Last audit %s · no audit is scheduled. Run one now, or switch on scheduled audits under Site Audit.`,`ai-rank-suite`),u.findings_last):b(`No audit has run yet. Run one now, or switch on scheduled audits under Site Audit.`,`ai-rank-suite`);if(o.length===0&&s.length===0&&c.length===0)return null;let m=s.length?s[s.length-1]:null,h=s.length>1?s[0]:null,g=e=>({value:m?m[e]:null,delta:h?m[e]-h[e]:null});return(0,Tn.jsxs)(`div`,{className:`grid gap-4`,children:[e.includes(`score`)&&(0,Tn.jsx)(Sn,{title:b(`AI search score over time`,`ai-rank-suite`),subtitle:b(`One point per recalculation — the number that should be rising`,`ai-rank-suite`),note:b(`One point each time the score was recalculated, by hand or on schedule; the last 180 are kept. The figure in the header compares the newest reading with the oldest one still on this line.`,`ai-rank-suite`),series:o,status:d,color:`var(--ars-brand)`,label:b(`Score`,`ai-rank-suite`),formatValue:e=>`${e}`,bands:[{to:50,label:b(`needs work`,`ai-rank-suite`),tint:`var(--ars-serious-tonal)`},{to:80,label:b(`solid`,`ai-rank-suite`),tint:`var(--ars-warning-tonal)`},{to:100,label:b(`strong`,`ai-rank-suite`),tint:`var(--ars-good-tonal)`}],tiles:[{label:b(`Now`,`ai-rank-suite`),value:o.length?o[o.length-1].value:null,delta:o.length>1?o[o.length-1].value-o[0].value:null,color:`var(--ars-brand)`},{label:b(`Best so far`,`ai-rank-suite`),value:o.length?Math.max(...o.map(e=>e.value)):null,delta:null,color:`var(--ars-ink-2)`}]}),e.includes(`findings`)&&(0,Tn.jsx)(Sn,{title:b(`Findings over time`,`ai-rank-suite`),subtitle:b(`One point per audit run — the number that should be falling`,`ai-rank-suite`),note:b(`One point per completed audit, last 30. A run still crawling is left out until it finishes, so the line cannot dip and then correct itself an hour later.`,`ai-rank-suite`),series:s,status:p,statusAction:f,color:`var(--ars-accent)`,label:b(`Open findings`,`ai-rank-suite`),formatValue:e=>`${e}`,invert:!0,breakdown:m?[{label:b(`Critical`,`ai-rank-suite`),value:m.critical||0,color:`var(--ars-c-red-ink)`},{label:b(`Warning`,`ai-rank-suite`),value:m.warning||0,color:`var(--ars-accent)`},{label:b(`Notice`,`ai-rank-suite`),value:m.notice||0,color:`var(--ars-brand)`}]:null,tiles:[{label:b(`Critical`,`ai-rank-suite`),...g(`critical`),color:`var(--ars-c-red-ink)`,invert:!0},{label:b(`Warning`,`ai-rank-suite`),...g(`warning`),color:`var(--ars-accent)`,invert:!0},{label:b(`Notice`,`ai-rank-suite`),...g(`notice`),color:`var(--ars-brand)`,invert:!0}]}),e.includes(`scored`)&&(0,Tn.jsx)(Sn,{title:b(`Pages scored over time`,`ai-rank-suite`),subtitle:b(`Cumulative, from the day each page was analysed — coverage should keep pace with the site`,`ai-rank-suite`),note:b(`The running total of pages carrying a score, by the day each one was analysed in your site’s timezone, over the last 60 days. It starts from everything scored before that window, not from zero.`,`ai-rank-suite`),series:c,color:`var(--ars-good)`,label:b(`Pages scored`,`ai-rank-suite`),formatValue:e=>e.toLocaleString(),tiles:c.length>1?[{label:b(`Scored`,`ai-rank-suite`),value:c[c.length-1].value,delta:c[c.length-1].value-c[0].value,color:`var(--ars-good)`},{label:b(`Added on the last day`,`ai-rank-suite`),value:c[c.length-1].value-c[c.length-2].value,delta:null,color:`var(--ars-ink-2)`}]:l.published>0?[{label:b(`Not scored yet`,`ai-rank-suite`),value:l.unanalyzed,delta:null,color:l.unanalyzed>0?`var(--ars-accent)`:`var(--ars-good)`},{label:b(`Coverage`,`ai-rank-suite`),value:null,text:S(b(`%d%%`,`ai-rank-suite`),Math.round(l.analyzed/Math.max(1,l.published)*100)),delta:null,color:`var(--ars-ink-2)`}]:[]})]})}var wn,Tn,En=o((()=>{wn=u(f(),1),C(),D(),at(),Tn=O()})),Dn=c({default:()=>On});function On(){let[e,t]=(0,jn.useState)(null),[n,r]=(0,jn.useState)(null),[i,a]=(0,jn.useState)(null),[o,s]=(0,jn.useState)(null),[c,l]=(0,jn.useState)(!1),[u,d]=(0,jn.useState)(null),[f,p]=(0,jn.useState)(0),[m,h]=(0,jn.useState)(null);(0,jn.useEffect)(()=>{E.get(`/boot`).then(e=>{e.score?t(e.score):d(b(`The score could not be loaded.`,`ai-rank-suite`)),r(e.kpis),a(e.content),s(e.setup)}).catch(()=>{E.get(`/score`).then(t).catch(e=>d(e.message)),E.get(`/dashboard/kpis`).then(r).catch(()=>{}),E.get(`/score/content`).then(a).catch(()=>{}),E.get(`/setup/status`).then(s).catch(()=>{})})},[]);let g=async()=>{l(!0),d(null);try{t(await E.post(`/score/recalculate`)),r(await E.get(`/dashboard/kpis`)),p(e=>e+1)}catch(e){d(e.message)}finally{l(!1)}},_=e?.checks||[],v=_.filter(e=>e.status!==`pass`),y=e?.dimensions?.overall,C=(()=>{let e=n||{},t=(e.links||{}).broken??0,r=(e.content||{}).analyzed??0,a=v.filter(e=>e.status===`fail`).length,s=o?!!o.ai:null,c=i?.missing_desc??0;if(s===!1)return{tone:`warning`,text:b(`No AI engine is connected, so the half of this plugin that writes and measures cannot run.`,`ai-rank-suite`),why:b(`Meta descriptions, FAQs, the autopilot and every answer simulation need a model. One key, stored encrypted on your own server, switches all of them on.`,`ai-rank-suite`),action:b(`Connect an engine`,`ai-rank-suite`),href:`/ai`};let l=e.audit||{};return(l.critical??0)>0?{tone:`bad`,text:S(x(`%d critical audit finding needs attention.`,`%d critical audit findings need attention.`,l.critical,`ai-rank-suite`),l.critical),why:b(`Critical means a page is blocked, duplicated or unreadable to a crawler. Nothing else on this screen matters until these are gone.`,`ai-rank-suite`),action:b(`Open the audit`,`ai-rank-suite`),href:`/audit`}:a>0?{tone:`bad`,text:S(x(`%d check is failing across the site.`,`%d checks are failing across the site.`,a,`ai-rank-suite`),a),why:b(`These are the ones that cost traffic today rather than eventually. Next best actions below lists them in the order worth fixing.`,`ai-rank-suite`),action:b(`Open the audit`,`ai-rank-suite`),href:`/audit`}:t>0?{tone:`warning`,text:S(x(`%d link is broken on this site.`,`%d links are broken on this site.`,t,`ai-rank-suite`),t),why:b(`A dead link is a trust signal pointing the wrong way, and crawlers spend budget rediscovering it every time.`,`ai-rank-suite`),action:b(`Open the checker`,`ai-rank-suite`),href:`/links`}:(l.warning??0)>0?{tone:`warning`,text:S(x(`The audit found %d warning across the site.`,`The audit found %d warnings across the site.`,l.warning,`ai-rank-suite`),l.warning),why:b(`Thin content, duplicate descriptions and unlinked pages are the usual weight. Work by rule, not by page: one fix clears hundreds.`,`ai-rank-suite`),action:b(`Open the audit`,`ai-rank-suite`),href:`/audit`}:c>0?{tone:`warning`,text:S(x(`%d published page has no meta description.`,`%d published pages have no meta description.`,c,`ai-rank-suite`),c),why:b(`Without one Google writes the snippet from whatever sentence it scrapes, and llms.txt has nothing to describe the page with. The autopilot can write all of them in one run.`,`ai-rank-suite`),action:b(`Let the autopilot write them`,`ai-rank-suite`),href:`/autopilot`}:r===0?{tone:`neutral`,text:b(`Nothing has been analysed yet, so there is nothing to score.`,`ai-rank-suite`),why:b(`The audit walks your published content and stores a result per page. Everything else on this screen reads from those results.`,`ai-rank-suite`),action:b(`Run the audit`,`ai-rank-suite`),href:`/audit`}:y!=null&&y>=80?{tone:`good`,text:S(b(`Your site scores %d out of 100 for AI search.`,`ai-rank-suite`),y),why:b(`No failing check, no broken link, no open warning and every page described. Keep an eye on the answer-simulation trend — that is the number that moves last.`,`ai-rank-suite`),action:b(`See what changed`,`ai-rank-suite`),href:`/insights`}:{tone:`neutral`,text:y==null?b(`Ready when you are.`,`ai-rank-suite`):S(b(`Your site scores %d out of 100 for AI search.`,`ai-rank-suite`),y),why:b(`Nothing is broken. The fastest way up from here is the weakest dimension below — the same fix repeated across pages beats a perfect single page.`,`ai-rank-suite`),action:b(`See where it is weak`,`ai-rank-suite`),href:`/audit`}})(),w=n||{};w.visibility,w.search;let ee=w.links||{};w.indexing,w.content;let T=w.commerce||{};w.health;let te=[...o&&!o.ai?[{label:b(`Connect an AI engine`,`ai-rank-suite`),detail:b(`Unlock writing, Autopilot and answer simulations`,`ai-rank-suite`),action:b(`Connect`,`ai-rank-suite`),href:`/ai`,tone:`warning`}]:[],...v.filter(e=>e.status===`fail`).length>0?[{label:b(`Fix failing site checks`,`ai-rank-suite`),detail:S(x(`%d check is failing now`,`%d checks are failing now`,v.filter(e=>e.status===`fail`).length,`ai-rank-suite`),v.filter(e=>e.status===`fail`).length),action:b(`Open audit`,`ai-rank-suite`),href:`/audit`,tone:`bad`}]:[],...ee.broken>0?[{label:b(`Repair broken links`,`ai-rank-suite`),detail:S(x(`%d broken link found`,`%d broken links found`,ee.broken,`ai-rank-suite`),ee.broken),action:b(`Open checker`,`ai-rank-suite`),href:`/links/checker`,tone:`warning`}]:[],...i?.missing_desc>0?[{label:b(`Write missing descriptions`,`ai-rank-suite`),detail:S(x(`%d published page has none`,`%d published pages have none`,i.missing_desc,`ai-rank-suite`),i.missing_desc),action:b(`Open Autopilot`,`ai-rank-suite`),href:`/autopilot`,tone:`warning`}]:[],...i?.unanalyzed>0?[{label:b(`Analyse the remaining content`,`ai-rank-suite`),detail:S(b(`%d pages have no score yet`,`ai-rank-suite`),i.unanalyzed),action:b(`Open analysis`,`ai-rank-suite`),href:`/analyzer`,tone:`neutral`}]:[],...o&&!o.google?[{label:b(`Connect Search Console`,`ai-rank-suite`),detail:b(`Add real clicks, impressions and positions`,`ai-rank-suite`),action:b(`Connect`,`ai-rank-suite`),href:`/search-console`,tone:`neutral`}]:[],...o&&o.visibility_prompts===0?[{label:b(`Add answer-test prompts`,`ai-rank-suite`),detail:b(`Start a repeatable AI mention baseline`,`ai-rank-suite`),action:b(`Add prompts`,`ai-rank-suite`),href:`/ai-visibility`,tone:`neutral`}]:[]].slice(0,3);return(0,P.jsxs)(`div`,{className:`ars-page`,children:[!Jt()&&(Yt()?(0,P.jsxs)(`div`,{className:`ars-upsell`,children:[(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`div`,{className:`ars-upsell-kicker`,children:b(`AI Rank Suite Pro`,`ai-rank-suite`)}),(0,P.jsx)(`div`,{className:`ars-upsell-title`,children:b(`Your Pro license is not connected yet.`,`ai-rank-suite`)}),(0,P.jsx)(`p`,{className:`ars-upsell-text`,children:b(`This is the full Pro build — every feature is installed. Connect the license from your purchase email and everything unlocks. No re-purchase, no extra cost.`,`ai-rank-suite`)})]}),(0,P.jsxs)(`div`,{className:`ars-upsell-cta`,children:[(0,P.jsx)(`a`,{className:`ars-btn ars-btn-primary`,href:Xt(),children:b(`Activate license`,`ai-rank-suite`)}),(0,P.jsx)(`span`,{className:`ars-upsell-price`,children:b(`The key is in your purchase email.`,`ai-rank-suite`)})]})]}):(0,P.jsxs)(`div`,{className:`ars-upsell`,children:[(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`div`,{className:`ars-upsell-kicker`,children:b(`AI Rank Suite Pro`,`ai-rank-suite`)}),(0,P.jsx)(`div`,{className:`ars-upsell-title`,children:b(`Does ChatGPT recommend you — or your competitor?`,`ai-rank-suite`)}),(0,P.jsx)(`p`,{className:`ars-upsell-text`,children:b(`Pro asks the assistants the 25 questions your customers ask, tells you who was named instead of you, and writes what is missing — on your own AI key. No credits, no seats.`,`ai-rank-suite`)})]}),(0,P.jsxs)(`div`,{className:`ars-upsell-cta`,children:[(0,P.jsx)(`a`,{className:`ars-btn ars-btn-primary`,href:Xt(),children:b(`Upgrade to Pro`,`ai-rank-suite`)}),(0,P.jsx)(`span`,{className:`ars-upsell-price`,children:b(`$49/year · 14-day money back`,`ai-rank-suite`)})]})]})),u&&(0,P.jsx)(M,{tone:`serious`,children:u}),(0,P.jsxs)(`div`,{className:`ars-hero`,children:[(0,P.jsxs)(`div`,{className:`ars-hero-ring`,children:[(0,P.jsx)(Oe,{value:y??null,size:132,label:b(`AI search`,`ai-rank-suite`),onLight:!0}),(0,P.jsx)(`p`,{className:`t-caption ars-hero-ring-note`,children:b(`The share of the plugin’s checks this site passes, weighted by area; a half-pass counts half. Under 40 is critical, 70 and over is good.`,`ai-rank-suite`)})]}),(0,P.jsxs)(`div`,{className:`ars-hero-body`,children:[(0,P.jsx)(`span`,{className:`ars-hero-badge is-${C.tone}`,children:C.tone===`good`?b(`Healthy`,`ai-rank-suite`):C.tone===`bad`?b(`Needs attention`,`ai-rank-suite`):C.tone===`warning`?b(`Room to improve`,`ai-rank-suite`):b(`Getting started`,`ai-rank-suite`)}),(0,P.jsx)(`h2`,{className:`ars-hero-title`,children:C.text}),(0,P.jsx)(`p`,{className:`ars-hero-why`,children:C.why}),(0,P.jsxs)(`div`,{className:`ars-hero-actions`,children:[(0,P.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:()=>Mn(C.href),children:C.action}),(0,P.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,onClick:g,disabled:c,children:b(c?`Recalculating…`:`Recalculate`,`ai-rank-suite`)})]}),c&&(0,P.jsx)(`div`,{className:`ars-progress-track is-indeterminate`,role:`progressbar`,"aria-label":b(`Recalculating…`,`ai-rank-suite`),children:(0,P.jsx)(`div`,{className:`ars-progress-fill`})})]}),(0,P.jsx)(`div`,{className:`ars-hero-stats`,children:[{label:b(`Pages scored`,`ai-rank-suite`),value:i?`${(i.analyzed??0).toLocaleString()} / ${(i.pages??0).toLocaleString()}`:`–`,href:`/content`,help:b(`Pages analysed at least once, out of the published pages on this site.`,`ai-rank-suite`)},{label:b(`Open findings`,`ai-rank-suite`),value:(w.audit?.total??0).toLocaleString(),href:`/audit`,tone:w.audit?.critical?`bad`:w.audit?.total?`warn`:`good`,help:b(`Problems the last completed audit found and nobody has fixed or dismissed yet.`,`ai-rank-suite`)},{label:b(`Broken links`,`ai-rank-suite`),value:(ee.broken??0).toLocaleString(),href:`/links/checker`,tone:ee.broken?`warn`:`good`,help:b(`Links checked from your own pages that answered with an error the last time they were fetched.`,`ai-rank-suite`)},{label:b(`AI engine`,`ai-rank-suite`),value:o===null?`–`:o.ai?b(`Connected`,`ai-rank-suite`):b(`Not connected`,`ai-rank-suite`),href:`/ai`,tone:o===null?void 0:o.ai?`good`:`warn`,help:b(`Whether a model key is stored. Without one, nothing here writes, rewrites or simulates an answer.`,`ai-rank-suite`)}].map(e=>(0,P.jsxs)(`button`,{type:`button`,className:`ars-hero-stat`,onClick:()=>Mn(e.href),title:e.help,children:[(0,P.jsx)(`span`,{className:`ars-hero-stat-v${e.tone?` is-`+e.tone:``}`,children:e.value}),(0,P.jsx)(`span`,{className:`ars-hero-stat-l`,children:e.label}),(0,P.jsx)(`span`,{className:`ars-hero-stat-h`,children:e.help})]},e.label))})]}),(0,P.jsx)(gn,{}),te.length>0&&(0,P.jsx)(k,{title:b(`Your next 3 actions`,`ai-rank-suite`),subtitle:b(`Ordered by impact — finish one, then come back for the next`,`ai-rank-suite`),children:(0,P.jsx)(`div`,{className:`grid gap-2`,children:te.map((e,t)=>(0,P.jsxs)(`div`,{className:`flex items-center gap-3 ars-r-md px-3 py-2.5`,style:{background:`var(--ars-surface-2)`,border:`1px solid var(--ars-border)`},children:[(0,P.jsx)(`span`,{className:`ars-priority-number is-${e.tone}`,"aria-hidden":!0,children:t+1}),(0,P.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,P.jsx)(`div`,{className:`font-semibold text-[13px]`,children:e.label}),(0,P.jsx)(`div`,{className:`t-caption mt-0.5`,children:e.detail})]}),(0,P.jsx)(A,{variant:t===0?`primary`:`ghost`,onClick:()=>Mn(e.href),children:e.action})]},e.label))})}),T.active&&typeof T.readiness==`number`&&(0,P.jsx)(k,{title:b(`Shop`,`ai-rank-suite`),subtitle:S(x(`%s published product`,`%s published products`,T.products||0,`ai-rank-suite`),(T.products||0).toLocaleString()),action:(0,P.jsx)(A,{variant:`ghost`,onClick:()=>Mn(`/shop`),children:b(`Open the shop screen`,`ai-rank-suite`)}),children:(0,P.jsx)(`div`,{className:`ars-hero-stats`,children:[{label:b(`Shop readiness`,`ai-rank-suite`),value:`${T.readiness} / 100`,tone:T.readiness>=80?`good`:T.readiness>=50?`warn`:`bad`,help:b(`Product data, product text, sellable pages and product schema, weighed together.`,`ai-rank-suite`)},{label:b(`Without image`,`ai-rank-suite`),value:(T.counts?.no_image??0).toLocaleString(),tone:T.counts?.no_image?`warn`:`good`,help:b(`A product without an image is not shown as a product by Google.`,`ai-rank-suite`)},{label:b(`Thin description`,`ai-rank-suite`),value:(T.counts?.thin??0).toLocaleString(),tone:T.counts?.thin?`warn`:`good`,help:b(`Under 200 characters. An AI answer has nothing to quote.`,`ai-rank-suite`)},{label:b(`Not scored yet`,`ai-rank-suite`),value:(T.unscored??0).toLocaleString(),tone:T.unscored?`warn`:`good`,help:b(`Products the analyser has not read. Analyse them under Content.`,`ai-rank-suite`)}].map(e=>(0,P.jsxs)(`button`,{type:`button`,className:`ars-hero-stat`,onClick:()=>Mn(`/shop`),title:e.help,children:[(0,P.jsx)(`span`,{className:`ars-hero-stat-v is-${e.tone}`,children:e.value}),(0,P.jsx)(`span`,{className:`ars-hero-stat-l`,children:e.label}),(0,P.jsx)(`span`,{className:`ars-hero-stat-h`,children:e.help})]},e.label))})}),(0,P.jsx)(Cn,{charts:[`score`,`findings`],revision:f}),i&&(i.areas||[]).length>0&&(0,P.jsxs)(k,{title:b(`Where this site is weak`,`ai-rank-suite`),subtitle:i.unanalyzed>0?S(b(`Averaged across all %1$s analyzed pages — %2$s not analyzed yet`,`ai-rank-suite`),i.analyzed.toLocaleString(),i.unanalyzed.toLocaleString()):S(b(`Averaged across all %s pages`,`ai-rank-suite`),i.analyzed.toLocaleString()),action:(0,P.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>Mn(`/analyzer`),children:b(`Open the full analysis →`,`ai-rank-suite`)}),flush:!0,children:[(0,P.jsx)(kn,{areas:i.areas,onDrill:e=>h(e===m?null:e),active:m,analyzed:i.analyzed}),m&&(0,P.jsx)(An,{area:m,onOpen:e=>Mn(`/content/${e}`)})]}),i&&i.needs_attention.length>0&&(0,P.jsx)(k,{title:b(`Pages needing attention`,`ai-rank-suite`),subtitle:b(`Lowest combined GEO + SEO across the whole site — ranked in the database, not from a sample`,`ai-rank-suite`),action:(0,P.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>Mn(`/content?filter=weak_geo`),children:b(`See all weak pages →`,`ai-rank-suite`)}),flush:!0,children:(0,P.jsx)(`div`,{className:`ars-table-wrap`,children:(0,P.jsxs)(`table`,{className:`ars-table`,children:[(0,P.jsx)(`thead`,{children:(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`th`,{children:b(`Page`,`ai-rank-suite`)}),(0,P.jsx)(`th`,{className:`is-mid`,style:{width:90},children:b(`Type`,`ai-rank-suite`)}),(0,P.jsx)(`th`,{className:`is-num is-narrow`,children:b(`GEO`,`ai-rank-suite`)}),(0,P.jsx)(`th`,{className:`is-num is-narrow`,children:b(`SEO`,`ai-rank-suite`)})]})}),(0,P.jsx)(`tbody`,{children:i.needs_attention.slice(0,5).map(e=>(0,P.jsxs)(`tr`,{style:{cursor:`pointer`},onClick:()=>Mn(`/content/${e.id}`),children:[(0,P.jsx)(`td`,{className:`font-medium truncate`,children:e.title}),(0,P.jsx)(`td`,{className:`is-mid t-caption`,children:e.type}),(0,P.jsx)(`td`,{className:`is-num is-narrow`,children:(0,P.jsx)(ke,{value:e.geo_score})}),(0,P.jsx)(`td`,{className:`is-num is-narrow`,children:(0,P.jsx)(ke,{value:e.seo_score})})]},e.id))})]})})}),(0,P.jsx)(k,{title:b(`System status`,`ai-rank-suite`),subtitle:b(`Connections and coexistence at a glance`,`ai-rank-suite`),children:(0,P.jsxs)(`div`,{className:`grid gap-1.5`,children:[[{label:b(`AI engine`,`ai-rank-suite`),ok:!!o?.ai,text:o===null?`–`:o.ai?b(`Connected`,`ai-rank-suite`):b(`Not connected`,`ai-rank-suite`),action:o?.ai?b(`Open`,`ai-rank-suite`):b(`Connect`,`ai-rank-suite`),href:`/ai`},{label:b(`Search Console`,`ai-rank-suite`),ok:!!o?.google,text:o===null?`–`:o.google?b(`Connected`,`ai-rank-suite`):b(`Not connected`,`ai-rank-suite`),action:o?.google?b(`Open`,`ai-rank-suite`):b(`Connect`,`ai-rank-suite`),href:`/search-console`},...o?.other_seo_plugin?[{label:b(`Other SEO plugin`,`ai-rank-suite`),ok:!1,text:S(b(`%s is still active — import its settings, then deactivate it so only one plugin controls SEO output.`,`ai-rank-suite`),o.other_seo_plugin),action:b(`Open import`,`ai-rank-suite`),href:`/import`}]:[],{label:b(`Modules`,`ai-rank-suite`),ok:!0,text:b(`Enable or disable every module under Settings.`,`ai-rank-suite`),action:b(`Manage`,`ai-rank-suite`),href:`/settings`}].map(e=>(0,P.jsxs)(`div`,{className:`flex items-center gap-3 ars-r-md px-3 py-2`,style:{background:`var(--ars-surface-2)`},children:[(0,P.jsx)(`span`,{"aria-hidden":!0,style:{width:8,height:8,borderRadius:999,flex:`none`,background:e.ok?`var(--ars-good)`:`var(--ars-warning)`}}),(0,P.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,P.jsx)(`span`,{className:`font-medium text-[13px]`,children:e.label}),(0,P.jsx)(`span`,{className:`t-caption`,style:{marginInlineStart:8},children:e.text})]}),(0,P.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>Mn(e.href),children:e.action})]},e.label)),(0,P.jsxs)(`p`,{className:`m-0 mt-1 t-caption`,children:[(0,P.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>Mn(`/wizard`),children:b(`Setup wizard`,`ai-rank-suite`)}),` · `,(0,P.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>{window.location.hash=`/ai-wizard`},children:b(`AI setup`,`ai-rank-suite`)}),` · `,(0,P.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>Mn(`/ai`),children:b(`Let AI do — open the catalogue`,`ai-rank-suite`)})]})]})}),(0,P.jsx)(Se,{title:b(`All checks`,`ai-rank-suite`),note:S(b(`%1$d of %2$d passing`,`ai-rank-suite`),_.filter(e=>e.status===`pass`).length,_.length),children:(0,P.jsx)(`div`,{className:`ars-table-wrap`,children:(0,P.jsxs)(`table`,{className:`ars-table`,children:[(0,P.jsx)(`thead`,{children:(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`th`,{children:b(`Check`,`ai-rank-suite`)}),(0,P.jsx)(`th`,{className:`is-mid`,children:b(`Dimension`,`ai-rank-suite`)}),(0,P.jsx)(`th`,{className:`is-action`,children:b(`Status`,`ai-rank-suite`)})]})}),(0,P.jsx)(`tbody`,{children:_.map(e=>(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`td`,{children:e.label}),(0,P.jsx)(`td`,{className:`capitalize is-mid`,style:{color:`var(--ars-ink-2)`},children:e.dimension}),(0,P.jsx)(`td`,{className:`is-action`,children:(0,P.jsx)(De,{status:e.status})})]},e.id))})]})})})]})}function kn({areas:e,onDrill:t,active:n,analyzed:r=0}){return(0,P.jsxs)(`div`,{className:`px-4 py-2`,children:[(0,P.jsxs)(`div`,{className:`ars-legend`,children:[(0,P.jsx)(`span`,{className:`ars-legend-label`,children:b(`Each bar is every page in this area:`,`ai-rank-suite`)}),(0,P.jsxs)(`span`,{className:`ars-legend-key`,children:[(0,P.jsx)(`i`,{style:{background:`var(--ars-c-red-ink)`}}),b(`critical`,`ai-rank-suite`)]}),(0,P.jsxs)(`span`,{className:`ars-legend-key`,children:[(0,P.jsx)(`i`,{style:{background:`var(--ars-accent)`}}),b(`weak`,`ai-rank-suite`)]}),(0,P.jsxs)(`span`,{className:`ars-legend-key`,children:[(0,P.jsx)(`i`,{style:{background:`var(--ars-c-green-ink)`}}),b(`good`,`ai-rank-suite`)]})]}),e.map(e=>{let n=e.pages>0&&e.average!==null;return(0,P.jsx)(xe,{score:n?e.average:void 0,label:e.label,sub:e.hint,segments:n?[{label:b(`Critical`,`ai-rank-suite`),value:e.critical||0,color:`var(--ars-c-red-ink)`},{label:b(`Weak`,`ai-rank-suite`),value:e.weak||0,color:`var(--ars-accent)`},{label:b(`Good`,`ai-rank-suite`),value:e.good||0,color:`var(--ars-c-green-ink)`}]:[{label:b(`Not analysed`,`ai-rank-suite`),value:1,color:`var(--ars-ink-3)`}],reach:n?S(b(`%1$s of %2$s pages need work here`,`ai-rank-suite`),(e.critical+e.weak).toLocaleString(),e.pages.toLocaleString()):b(`not analysed yet`,`ai-rank-suite`),note:n&&r>0&&e.pages<r?S(b(`%s pages are not counted here because this does not apply to them yet`,`ai-rank-suite`),(r-e.pages).toLocaleString()):void 0,onClick:n?()=>t(e.key):void 0},e.key)}),(0,P.jsx)(`p`,{className:`m-0 px-1 py-2 t-caption`,children:b(`Click a row to see the pages behind it.`,`ai-rank-suite`)})]})}function An({area:e,onOpen:t}){let[n,r]=(0,jn.useState)(null);return(0,jn.useEffect)(()=>{r(null),E.get(`/score/area/${e}`).then(e=>r(e.rows||[])).catch(()=>r([]))},[e]),n?n.length===0?(0,P.jsx)(`p`,{className:`m-0 px-4 pb-4 t-caption`,children:b(`No pages scored in this area yet.`,`ai-rank-suite`)}):(0,P.jsx)(`div`,{className:`ars-table-wrap`,style:{borderTop:`1px solid var(--ars-border)`},children:(0,P.jsxs)(`table`,{className:`ars-table`,children:[(0,P.jsx)(`thead`,{children:(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`th`,{children:b(`The 20 worst pages in this area`,`ai-rank-suite`)}),(0,P.jsx)(`th`,{className:`is-mid`,style:{width:90},children:b(`Type`,`ai-rank-suite`)}),(0,P.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Score`,`ai-rank-suite`)})]})}),(0,P.jsx)(`tbody`,{children:n.map(e=>(0,P.jsxs)(`tr`,{style:{cursor:`pointer`},onClick:()=>t(e.id),children:[(0,P.jsx)(`td`,{className:`font-medium truncate`,children:e.title||`#${e.id}`}),(0,P.jsx)(`td`,{className:`is-mid t-caption`,children:e.type}),(0,P.jsx)(`td`,{className:`is-num is-narrow`,children:(0,P.jsx)(ke,{value:e.score})})]},e.id))})]})}):(0,P.jsx)(`p`,{className:`m-0 px-4 pb-4 t-caption`,children:b(`Loading the worst pages…`,`ai-rank-suite`)})}var jn,P,Mn,Nn=o((()=>{jn=u(f(),1),C(),D(),Zt(),xn(),at(),En(),P=O(),Mn=e=>{window.location.hash=e}}));function Pn({metrics:e,columns:t=4}){return(0,Ln.jsx)(be,{columns:t,metrics:e,onSelect:t=>{let n=e.find(e=>(e.id||e.label)===t);n&&n.href&&Rn(n.href)}})}function Fn(){let[e,t]=(0,In.useState)(null),[n,r]=(0,In.useState)(null),[i,a]=(0,In.useState)(null);if((0,In.useEffect)(()=>{E.get(`/dashboard/kpis`).then(t).catch(()=>{}),E.get(`/setup/status`).then(r).catch(()=>{}),E.get(`/score/content`).then(a).catch(()=>{})},[]),!e)return null;let o=e,s=o.visibility||{},c=o.search||{},l=o.links||{},u=o.indexing||{},d=o.content||{},f=o.commerce||{},p=o.health||{};return(0,Ln.jsx)(Se,{title:b(`All site metrics`,`ai-rank-suite`),note:b(`16 live signals · open when you need the detail`,`ai-rank-suite`),children:(0,Ln.jsxs)(`div`,{className:`grid gap-5 p-4`,children:[(0,Ln.jsxs)(`section`,{className:`grid gap-2`,children:[(0,Ln.jsx)(Ce,{hint:b(`Where the next decade of traffic comes from`,`ai-rank-suite`),children:b(`AI search`,`ai-rank-suite`)}),(0,Ln.jsx)(Pn,{metrics:[{id:`geo`,label:b(`AI search readiness`,`ai-rank-suite`),hint:b(`Site-wide AI optimization, averaged across every analyzed page. The score the rest of this suite works to raise.`,`ai-rank-suite`),value:zn(o.geo?.value),unit:`/ 100`,delta:o.geo?.delta,spark:o.geo?.series,href:`/content`},{id:`visibility`,label:b(`AI Answer Simulation`,`ai-rank-suite`),hint:b(`How often a simulated AI answer mentions this site when asked the prompts you monitor.`,`ai-rank-suite`),value:s.value==null?`—`:s.value,unit:s.value==null?``:`/ 100`,delta:s.delta,spark:s.series,sub:s.total?S(b(`mentioned in %1$d of %2$d prompts`,`ai-rank-suite`),s.mentioned,s.total):b(`add prompts to start monitoring`,`ai-rank-suite`),href:`/ai-visibility`},{id:`llms`,label:`llms.txt`,hint:b(`A curated map of this site for AI assistants, served at /llms.txt. One click to turn on, no config.`,`ai-rank-suite`),value:u.llms_txt?b(`Live`,`ai-rank-suite`):b(`Off`,`ai-rank-suite`),accent:u.llms_txt?`var(--ars-c-green-ink)`:`var(--ars-accent)`,href:`/llms-txt`},{id:`engine`,label:b(`AI engine`,`ai-rank-suite`),hint:b(`The connected model powers titles, descriptions, FAQs and the autopilot. One key, stored encrypted on your own server.`,`ai-rank-suite`),value:n?.ai?b(`Connected`,`ai-rank-suite`):b(`Not set`,`ai-rank-suite`),accent:n?.ai?void 0:`var(--ars-accent)`,href:`/ai`}]})]}),(0,Ln.jsxs)(`section`,{className:`grid gap-2`,children:[(0,Ln.jsx)(Ce,{hint:c.connected?b(`Live from Search Console`,`ai-rank-suite`):b(`Connect Search Console for live data`,`ai-rank-suite`),children:b(`Search`,`ai-rank-suite`)}),(0,Ln.jsx)(Pn,{metrics:[{id:`position`,label:b(`Avg. position`,`ai-rank-suite`),hint:b(`Averaged across every tracked keyword. Lower is better.`,`ai-rank-suite`),value:zn(c.avg_position),sub:`${c.tracked||0} keywords tracked`,href:`/search-console/keywords`},{id:`top10`,label:b(`Top 10 positions`,`ai-rank-suite`),hint:b(`Keywords at an average Search Console position on page one — the only page most people ever see.`,`ai-rank-suite`),value:c.top10??0,sub:S(b(`%s in the top 3`,`ai-rank-suite`),c.top3??0),href:`/search-console/keywords`},{id:`clicks`,label:b(`Clicks`,`ai-rank-suite`),hint:b(`Times somebody chose your result and arrived on the site, in the reporting period.`,`ai-rank-suite`),value:(c.clicks??0).toLocaleString(),spark:c.series,sub:`${(c.impressions??0).toLocaleString()} impressions`,href:`/search-console`},{id:`indexnow`,label:b(`Instant indexing`,`ai-rank-suite`),hint:b(`URLs pushed to search engines via IndexNow the moment they change. No account needed.`,`ai-rank-suite`),value:u.indexnow_on?u.indexnow_week??0:b(`Off`,`ai-rank-suite`),unit:u.indexnow_on?b(`this week`,`ai-rank-suite`):``,accent:u.indexnow_on?void 0:`var(--ars-accent)`,href:`/google`}]})]}),(0,Ln.jsxs)(`section`,{className:`grid gap-2`,children:[(0,Ln.jsx)(Ce,{hint:b(`Scores stored per page — nothing is recomputed here`,`ai-rank-suite`),children:b(`Content health`,`ai-rank-suite`)}),(0,Ln.jsx)(Pn,{metrics:[{id:`analyzed`,label:b(`Pages analyzed`,`ai-rank-suite`),hint:b(`Published content with a stored score. Everything else on this screen reads from these results.`,`ai-rank-suite`),value:d.analyzed??0,href:`/content`},{id:`avg-geo`,label:b(`Avg. AI score`,`ai-rank-suite`),hint:b(`How ready the analyzed pages are for AI search, averaged. The distribution behind it is in "Where this site is weak" below.`,`ai-rank-suite`),value:d.avg_geo??0,unit:`/ 100`,href:`/content`},{id:`avg-seo`,label:b(`Avg. SEO score`,`ai-rank-suite`),hint:b(`Classic search readiness of the same pages.`,`ai-rank-suite`),value:d.avg_seo??0,unit:`/ 100`,href:`/content`},{id:`missing-desc`,label:b(`Missing descriptions`,`ai-rank-suite`),hint:b(`Published pages with no meta description. Google scrapes its own snippet and llms.txt has nothing to describe the page with. The autopilot can write all of them in one run.`,`ai-rank-suite`),value:i?.missing_desc??0,accent:i?.missing_desc>0?`var(--ars-accent)`:void 0,sub:S(b(`%s thin pages`,`ai-rank-suite`),i?.thin_content??0),href:`/content/bulk`}]})]}),(0,Ln.jsxs)(`section`,{className:`grid gap-2`,children:[(0,Ln.jsx)(Ce,{hint:f.active?b(`Broken paths cost crawl budget — WooCommerce feeds included`,`ai-rank-suite`):b(`Broken paths cost you crawl budget and rankings`,`ai-rank-suite`),children:f.active?b(`Technical health & store`,`ai-rank-suite`):b(`Technical health`,`ai-rank-suite`)}),(0,Ln.jsx)(Pn,{columns:f.active?3:4,metrics:[{id:`broken`,label:b(`Broken links`,`ai-rank-suite`),hint:b(`A dead link is a trust signal pointing the wrong way, and crawlers spend budget rediscovering it every time.`,`ai-rank-suite`),value:l.broken??0,accent:l.broken>0?`var(--ars-c-red-ink)`:void 0,sub:f.active?S(b(`%1$s checked · %2$s redirected`,`ai-rank-suite`),(l.checked??0).toLocaleString(),l.redirected??0):S(b(`%s links checked`,`ai-rank-suite`),(l.checked??0).toLocaleString()),href:`/links/checker`},{id:`notfound`,label:b(`404 errors`,`ai-rank-suite`),hint:b(`Requests that hit nothing. A redirect rule turns each one back into a page.`,`ai-rank-suite`),value:l.not_found??0,accent:l.not_found>0?`var(--ars-accent)`:void 0,sub:S(x(`%s redirect rule active`,`%s redirect rules active`,l.redirects??0,`ai-rank-suite`),(l.redirects??0).toLocaleString()),href:`/links/redirects`},...f.active?[]:[{id:`redirected`,label:b(`Redirected links`,`ai-rank-suite`),hint:b(`Links that only resolve after a redirect hop. Point them at the final URL and save the hop.`,`ai-rank-suite`),value:l.redirected??0,href:`/links/checker`}],{id:`system`,label:b(`System`,`ai-rank-suite`),hint:b(`Module health. A failing module is quarantined so it cannot take the site down; a second SEO plugin active means output may collide.`,`ai-rank-suite`),value:p.quarantined>0?S(b(`%d failed`,`ai-rank-suite`),p.quarantined):b(`Healthy`,`ai-rank-suite`),accent:p.quarantined>0||p.conflict?`var(--ars-c-red-ink)`:void 0,sub:p.conflict?`${p.conflict} also active`:`${p.modules??0} modules running`,href:`/developer`},...f.active?[{id:`products`,label:b(`Products`,`ai-rank-suite`),hint:b(`Published products carrying Product, Offer, Review and Shipping structured data.`,`ai-rank-suite`),value:f.products??0,sub:`schema-enriched`,href:`/schema`},{id:`feed-google`,label:b(`Google Merchant feed`,`ai-rank-suite`),hint:b(`The product feed Google Merchant Center reads. Built once, cached, served instantly.`,`ai-rank-suite`),value:zn(f.feed_google),unit:f.feed_google==null?``:`items`,sub:f.feed_google==null?`not built yet`:`cached, served instantly`,href:`/feeds`},{id:`feed-meta`,label:b(`Meta catalog feed`,`ai-rank-suite`),hint:b(`The catalog feed Facebook & Instagram Shops read.`,`ai-rank-suite`),value:zn(f.feed_meta),unit:f.feed_meta==null?``:`items`,sub:f.feed_meta==null?`not built yet`:`Facebook & Instagram Shops`,href:`/feeds`}]:[]]})]})]})})}var In,Ln,Rn,zn,Bn=o((()=>{In=u(f(),1),C(),D(),at(),Ln=O(),Rn=e=>{window.location.hash=e},zn=e=>e??`–`})),Vn=c({default:()=>Hn});function Hn(){let[e,t]=(0,Gn.useState)(28),[n,r]=(0,Gn.useState)(``),[i,a]=(0,Gn.useState)(null),[o,s]=(0,Gn.useState)(!0),[c,l]=(0,Gn.useState)(null),[u,d]=(0,Gn.useState)(`clicks`),f=(t=e,r=n,i=!1)=>{s(!0),l(null),E.get(`/insights?days=${t}&post_type=${encodeURIComponent(r)}${i?`&refresh=1`:``}`).then(a).catch(e=>l(e.message)).finally(()=>s(!1))};if((0,Gn.useEffect)(()=>{f(e,n)},[e,n]),!i&&o)return(0,F.jsx)(k,{children:b(`Reading the period…`,`ai-rank-suite`)});if(c)return(0,F.jsx)(M,{tone:`serious`,children:c});if(!i)return(0,F.jsx)(Ze,{blocks:4,label:b(`Loading insights`,`ai-rank-suite`)});let p=i.search,m=i.visibility,h=i.content,g=i.headline||{},_=[{id:`clicks`,label:b(`Clicks`,`ai-rank-suite`),value:p.clicks,prev:p.prev.clicks,key:`clicks`},{id:`impressions`,label:b(`Impressions`,`ai-rank-suite`),value:p.impressions,prev:p.prev.impressions,key:`impressions`},{id:`ctr`,label:b(`Click-through`,`ai-rank-suite`),value:p.ctr,suffix:`%`,key:null},{id:`position`,label:b(`Position`,`ai-rank-suite`),value:p.position,prev:p.prev.position,key:`position`,invert:!0}],v=_.find(e=>e.id===u)||_[0],y=[{id:`gsc`,label:b(`Search Console`,`ai-rank-suite`),live:!!p.has_data,on:b(`clicks, impressions, position`,`ai-rank-suite`),off:b(`Connect`,`ai-rank-suite`),href:`#/search-console`},{id:`analysis`,label:b(`Page analysis`,`ai-rank-suite`),live:(h.scored||0)>0,on:S(b(`%1$s of %2$s scored`,`ai-rank-suite`),qn(h.scored),qn(h.total)),off:b(`Score pages`,`ai-rank-suite`),href:`#/audit`},{id:`sim`,label:b(`Answer simulation`,`ai-rank-suite`),live:!!m.has_data||!!m.ever,on:m.has_data?b(`runs in this period`,`ai-rank-suite`):b(`no runs in this period`,`ai-rank-suite`),off:b(`Set up`,`ai-rank-suite`),href:`#/ai-visibility`},{id:`links`,label:b(`Link checker`,`ai-rank-suite`),live:!!i.links?.has_data,on:b(`links checked`,`ai-rank-suite`),off:b(`Run once`,`ai-rank-suite`),href:`#/links`},{id:`indexing`,label:b(`Instant indexing`,`ai-rank-suite`),live:(i.activity?.total||0)>0,on:S(b(`%s submitted`,`ai-rank-suite`),qn(i.activity?.total||0)),off:b(`Set up`,`ai-rank-suite`),href:`#/google`}],C=y.filter(e=>e.live).length;return(0,F.jsxs)(`div`,{className:`grid gap-4`,children:[(0,F.jsx)(he,{tone:g.tone||`neutral`,text:g.text,sub:g.why,action:g.action,onAction:()=>Jn(`#/${g.href||`dashboard`}`)}),(0,F.jsxs)(Be,{right:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[i.cached&&(0,F.jsx)(j,{tone:`neutral`,children:`cached`}),(0,F.jsx)(A,{variant:`ghost`,busy:o,onClick:()=>f(e,n,!0),children:b(`Refresh`,`ai-rank-suite`)})]}),children:[(0,F.jsx)(He,{options:Kn,value:e,onChange:t,label:b(`Period`,`ai-rank-suite`)}),(0,F.jsxs)(`label`,{className:`flex items-center gap-2 text-[12px]`,style:{color:`var(--ars-ink-2)`},children:[b(`Content`,`ai-rank-suite`),(0,F.jsxs)(`select`,{className:`ars-select`,value:n,onChange:e=>r(e.target.value),children:[(0,F.jsx)(`option`,{value:``,children:b(`All types`,`ai-rank-suite`)}),(i.post_types||[]).map(e=>(0,F.jsx)(`option`,{value:e.name,children:e.label},e.name))]})]}),(0,F.jsxs)(`span`,{className:`t-caption`,children:[i.period.from,` → `,i.period.to,` · `,S(b(`vs. %s`,`ai-rank-suite`),i.period.prev)]})]}),(0,F.jsxs)(`div`,{className:`ars-sources`,role:`list`,"aria-label":b(`Data sources`,`ai-rank-suite`),children:[(0,F.jsx)(`span`,{className:`ars-sources-lead`,children:C===y.length?b(`Every source is live`,`ai-rank-suite`):S(b(`%1$d of %2$d sources live`,`ai-rank-suite`),C,y.length)}),y.map(e=>(0,F.jsxs)(`button`,{type:`button`,role:`listitem`,className:`ars-source${e.live?` is-live`:``}`,onClick:()=>Jn(e.href),title:e.live?`${e.label}: ${e.on}`:S(b(`%1$s is not feeding this screen yet — %2$s`,`ai-rank-suite`),e.label,e.off),children:[(0,F.jsx)(`span`,{className:`ars-source-dot`,"aria-hidden":!0}),(0,F.jsx)(`span`,{className:`ars-source-label`,children:e.label}),(0,F.jsx)(`span`,{className:`ars-source-state`,children:e.live?e.on:e.off+` →`})]},e.id))]}),p.has_data&&(0,F.jsxs)(k,{flush:!0,children:[p.has_data&&(0,F.jsx)(`div`,{className:`ars-metricstrip`,children:_.map(e=>(0,F.jsxs)(`button`,{type:`button`,className:`ars-metric${u===e.id?` is-active`:``}`,onClick:()=>d(e.id),children:[(0,F.jsx)(`span`,{className:`ars-metric-label`,children:e.label}),(0,F.jsxs)(`span`,{className:`ars-metric-value tabular-nums`,children:[e.value===null||e.value===void 0?`—`:qn(e.value),e.suffix&&(0,F.jsx)(`span`,{className:`ars-metric-suffix`,children:e.suffix})]}),e.prev!==void 0&&e.prev!==null&&(0,F.jsx)(Re,{value:Math.round(((e.value??0)-e.prev)*10)/10,invert:e.invert})]},e.id))}),(0,F.jsx)(`div`,{className:`px-4 pb-4 pt-1`,children:p.has_data?(0,F.jsx)(je,{label:v.label,color:v.id===`position`?`var(--ars-series-2)`:`var(--ars-series-1)`,data:p.series.map(e=>({label:e.label,value:e[v.key||`clicks`]})),height:200,invert:v.id===`position`}):null})]}),(0,F.jsx)(k,{title:b(`Where the leverage is`,`ai-rank-suite`),subtitle:b(`The same fix repeated across pages, ranked by weight × how many pages fail it`,`ai-rank-suite`),action:(0,F.jsx)(A,{variant:`ghost`,onClick:()=>Jn(`#/content`),children:b(`Open content`,`ai-rank-suite`)}),children:(i.issues.top||[]).length===0?(0,F.jsx)(ve,{title:b(`Nothing is failing across enough pages to rank`,`ai-rank-suite`),action:b(`Run the site audit`,`ai-rank-suite`),onAction:()=>Jn(`#/audit`),compact:!0,children:b(`Either the analysed pages pass every check, or not enough of them have been analysed to find a pattern.`,`ai-rank-suite`)}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(ye,{items:i.issues.top.map(e=>({id:e.id,label:e.label,hint:S(b(`%1$d failing, %2$d warning · weight %3$s`,`ai-rank-suite`),e.fail,e.warn,e.weight),value:e.fail*2+e.warn,display:e.fail+e.warn,unit:b(`pages`,`ai-rank-suite`),color:e.fail>e.warn?`var(--ars-c-red-ink)`:`var(--ars-accent)`})),onItem:()=>Jn(`#/content`)}),(0,F.jsx)(`p`,{className:`t-caption m-0 mt-3`,children:i.issues.truncated?S(b(`Measured over %s analysed pages (capped — the newest pages first). Reflects the current state of the site, not the selected period.`,`ai-rank-suite`),qn(i.issues.scanned)):S(b(`Measured over %s analysed pages. Reflects the current state of the site, not the selected period.`,`ai-rank-suite`),qn(i.issues.scanned))})]})}),p.has_data&&(0,F.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2 items-stretch`,children:[(0,F.jsx)(k,{title:b(`Biggest gains`,`ai-rank-suite`),subtitle:b(`Keywords that climbed inside this period`,`ai-rank-suite`),flush:!0,children:(0,F.jsx)(Un,{rows:i.movers.up,empty:b(`No keyword improved inside this period.`,`ai-rank-suite`)})}),(0,F.jsx)(k,{title:b(`Biggest drops`,`ai-rank-suite`),subtitle:b(`Fix these before they cost you the ranking`,`ai-rank-suite`),flush:!0,children:(0,F.jsx)(Un,{rows:i.movers.down,empty:b(`Nothing lost ground.`,`ai-rank-suite`)})})]}),(m.has_data||m.ever)&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Ce,{hint:b(`The measurement this product exists for`,`ai-rank-suite`),children:b(`AI search`,`ai-rank-suite`)}),(0,F.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2 items-stretch`,children:[(0,F.jsx)(k,{title:b(`Answer simulation trend`,`ai-rank-suite`),subtitle:b(`Share of monitored prompts where a simulated assistant answer mentions you`,`ai-rank-suite`),action:(0,F.jsx)(A,{variant:`ghost`,onClick:()=>Jn(`#/ai-visibility`),children:b(`Open`,`ai-rank-suite`)}),children:m.has_data?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(je,{label:b(`Mentioned`,`ai-rank-suite`),color:`var(--ars-series-3)`,data:m.series.map(e=>({label:e.label,value:e.value})),height:160,formatValue:e=>`${e}%`}),(0,F.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3 mt-3`,children:[(0,F.jsx)(Wn,{label:b(`Cited with a link`,`ai-rank-suite`),value:m.cited,sub:b(`assistant linked to you`,`ai-rank-suite`)}),(0,F.jsx)(Wn,{label:b(`Positive tone`,`ai-rank-suite`),value:m.positive,sub:b(`answers in your favour`,`ai-rank-suite`)}),(0,F.jsx)(Wn,{label:b(`Negative tone`,`ai-rank-suite`),value:m.negative,sub:b(`nothing negative`,`ai-rank-suite`),tone:m.negative>0?`bad`:null})]})]}):(0,F.jsx)(ve,{title:m.ever?b(`No runs inside this period`,`ai-rank-suite`):b(`No answer simulations yet`,`ai-rank-suite`),action:m.ever?b(`Open AI Answer Simulation`,`ai-rank-suite`):b(`Set up monitoring`,`ai-rank-suite`),onAction:()=>Jn(`#/ai-visibility`),children:m.ever?b(`There are older runs. Widen the period, or run the check again to add a fresh point to the trend.`,`ai-rank-suite`):b(`Add the questions your customers actually ask an assistant. Each run records whether you were named, how early, and who was named instead.`,`ai-rank-suite`)})}),(0,F.jsx)(k,{title:b(`Share of voice`,`ai-rank-suite`),subtitle:b(`Who else is named in the same answers`,`ai-rank-suite`),flush:!0,children:(m.competitors||[]).length===0?(0,F.jsx)(ve,{title:b(`No competitor has been named yet`,`ai-rank-suite`),compact:!0,children:b(`Once a run finds other brands in the same answers, they are counted here.`,`ai-rank-suite`)}):(0,F.jsx)(`div`,{className:`px-4 pb-4 pt-1`,children:(0,F.jsx)(ye,{items:m.competitors.map(e=>({id:e.name,label:e.name,value:e.count,display:`${e.count}×`,color:`var(--ars-c-teal-ink, var(--ars-c-green-ink))`}))})})})]})]}),(0,F.jsx)(Ce,{hint:b(`Everything above describes the analysed part of your site`,`ai-rank-suite`),children:b(`Coverage`,`ai-rank-suite`)}),(0,F.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2 items-stretch`,children:[(0,F.jsxs)(k,{title:b(`How much has been analysed`,`ai-rank-suite`),subtitle:S(b(`%1$s of %2$s published items`,`ai-rank-suite`),qn(h.scored),qn(h.total)),action:h.coverage<100&&(0,F.jsx)(A,{variant:`ghost`,onClick:()=>Jn(`#/audit`),children:b(`Continue`,`ai-rank-suite`)}),flush:!0,children:[(0,F.jsx)(`div`,{className:`ars-table-wrap`,children:(0,F.jsxs)(`table`,{className:`ars-table`,children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:b(`Type`,`ai-rank-suite`)}),(0,F.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Published`,`ai-rank-suite`)}),(0,F.jsx)(`th`,{className:`is-num`,style:{width:150},children:b(`Analysed`,`ai-rank-suite`)}),(0,F.jsx)(`th`,{className:`is-num is-narrow`,children:b(`GEO`,`ai-rank-suite`)}),(0,F.jsx)(`th`,{className:`is-num is-narrow`,children:b(`SEO`,`ai-rank-suite`)})]})}),(0,F.jsx)(`tbody`,{children:(h.types||[]).map(e=>(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`font-medium`,children:e.label}),(0,F.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:qn(e.count)}),(0,F.jsx)(`td`,{className:`is-num`,children:(0,F.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,F.jsx)(`span`,{className:`ars-cov`,children:(0,F.jsx)(`span`,{className:`ars-cov-fill`,style:{width:`${e.coverage}%`,background:e.coverage===0?`var(--ars-c-red-ink)`:e.coverage<60?`var(--ars-accent)`:`var(--ars-c-green-ink)`}})}),(0,F.jsx)(`span`,{className:`tabular-nums t-caption`,style:{minWidth:`6ch`},children:qn(e.scored)})]})}),(0,F.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.avg_geo===null?(0,F.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`—`}):e.avg_geo}),(0,F.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.avg_seo===null?(0,F.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`—`}):e.avg_seo})]},e.type))})]})}),h.scored<h.total&&(0,F.jsx)(`p`,{className:`t-caption m-0 px-4 pb-4`,children:b(`A dash means nothing in that type has been scored yet, which is not the same as scoring zero. On a large site the audit works through the backlog in batches.`,`ai-rank-suite`)})]}),(0,F.jsx)(k,{title:b(`Score distribution`,`ai-rank-suite`),subtitle:S(x(`%s scored page by GEO band — a fat left tail is where the work is`,`%s scored pages by GEO band — a fat left tail is where the work is`,h.scored,`ai-rank-suite`),qn(h.scored)),children:h.scored===0?(0,F.jsx)(ve,{title:b(`Nothing scored yet`,`ai-rank-suite`),action:b(`Run the site audit`,`ai-rank-suite`),onAction:()=>Jn(`#/audit`),children:b(`The distribution needs stored analyses to draw. It fills in as the audit works through your content.`,`ai-rank-suite`)}):(0,F.jsx)(Ge,{data:h.bands.map((e,t)=>({label:e,value:h.distribution[t]})),series:[{key:`value`,label:b(`Pages`,`ai-rank-suite`),color:`var(--ars-brand)`}],height:160})})]}),(i.links?.has_data||(i.activity?.total||0)>0)&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Ce,{children:b(`Underneath`,`ai-rank-suite`)}),(0,F.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2 items-stretch`,children:[(0,F.jsx)(k,{title:b(`Link health`,`ai-rank-suite`),subtitle:b(`Every checked link by HTTP status class`,`ai-rank-suite`),action:(0,F.jsx)(A,{variant:`ghost`,onClick:()=>Jn(`#/links`),children:b(`Open checker`,`ai-rank-suite`)}),children:i.links.has_data?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Ue,{segments:[{label:b(`OK`,`ai-rank-suite`),value:i.links.classes.ok,color:`var(--ars-c-green-ink)`},{label:b(`Redirect`,`ai-rank-suite`),value:i.links.classes.redirect,color:`var(--ars-accent)`},{label:b(`Not found`,`ai-rank-suite`),value:i.links.classes.client,color:`var(--ars-c-red-ink)`},{label:b(`Server error`,`ai-rank-suite`),value:i.links.classes.server,color:`#8b1d24`},{label:b(`Unreachable`,`ai-rank-suite`),value:i.links.classes.unreachable,color:`var(--ars-ink-3)`}]}),(0,F.jsxs)(`p`,{className:`t-caption m-0 mt-2`,children:[qn(i.links.internal),` internal · `,qn(i.links.external),` external`]}),(i.links.worst||[]).length>0&&(0,F.jsx)(`div`,{className:`ars-table-wrap mt-3`,children:(0,F.jsxs)(`table`,{className:`ars-table`,children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:b(`Most-linked broken URL`,`ai-rank-suite`)}),(0,F.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Status`,`ai-rank-suite`)}),(0,F.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Uses`,`ai-rank-suite`)})]})}),(0,F.jsx)(`tbody`,{children:i.links.worst.map(e=>(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`truncate ars-mono text-[11.5px]`,children:e.url}),(0,F.jsx)(`td`,{className:`is-num is-narrow`,children:(0,F.jsx)(j,{tone:e.status===0?`neutral`:`serious`,children:e.status===0?b(`no reply`,`ai-rank-suite`):e.status})}),(0,F.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.refs})]},e.url))})]})})]}):(0,F.jsx)(ve,{title:b(`No links have been checked yet`,`ai-rank-suite`),action:b(`Open the link checker`,`ai-rank-suite`),onAction:()=>Jn(`#/links`),children:b(`The checker crawls the links inside your own content and records what each one answers.`,`ai-rank-suite`)})}),(0,F.jsx)(k,{title:b(`Indexing activity`,`ai-rank-suite`),subtitle:b(`URLs submitted per day — proof search engines were told about your changes`,`ai-rank-suite`),action:(0,F.jsxs)(j,{tone:i.activity.total>0?`good`:`neutral`,children:[qn(i.activity.total),` submitted`]}),children:i.activity.total>0?(0,F.jsx)(Ge,{data:i.activity.series,series:[{key:`indexnow`,label:b(`IndexNow`,`ai-rank-suite`),color:`var(--ars-brand)`},{key:`google`,label:b(`Google Indexing API`,`ai-rank-suite`),color:`var(--ars-c-green-ink)`}],height:150}):(0,F.jsx)(ve,{title:b(`Nothing submitted in this period`,`ai-rank-suite`),action:b(`Set up instant indexing`,`ai-rank-suite`),onAction:()=>Jn(`#/google`),children:b(`IndexNow tells Bing, Yandex, Seznam and Naver the moment a page changes. The Google Indexing API covers job postings and live streams.`,`ai-rank-suite`)})})]})]}),(0,F.jsx)(Fn,{}),(0,F.jsx)(Cn,{charts:[`scored`]})]})}function Un({rows:e,empty:t}){return!e||e.length===0?(0,F.jsx)(ve,{title:t,compact:!0,children:b(`Nothing to show for this period.`,`ai-rank-suite`)}):(0,F.jsx)(`div`,{className:`ars-table-wrap`,children:(0,F.jsxs)(`table`,{className:`ars-table`,children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:b(`Keyword`,`ai-rank-suite`)}),(0,F.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Was`,`ai-rank-suite`)}),(0,F.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Now`,`ai-rank-suite`)}),(0,F.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Change`,`ai-rank-suite`)})]})}),(0,F.jsx)(`tbody`,{children:e.map(e=>(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`font-medium truncate`,children:e.keyword}),(0,F.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,style:{color:`var(--ars-ink-3)`},children:e.was}),(0,F.jsx)(`td`,{className:`is-num is-narrow`,children:(0,F.jsx)(Me,{value:e.now})}),(0,F.jsx)(`td`,{className:`is-num is-narrow`,children:(0,F.jsx)(Re,{value:e.delta,invert:!0})})]},e.keyword))})]})})}function Wn({label:e,value:t,sub:n,tone:r}){return(0,F.jsxs)(`div`,{className:`ars-mini`,children:[(0,F.jsx)(`span`,{className:`ars-mini-label`,children:e}),(0,F.jsx)(`span`,{className:`ars-mini-value tabular-nums`,style:r===`bad`?{color:`var(--ars-c-red-ink)`}:void 0,children:t??0}),(0,F.jsx)(`span`,{className:`ars-mini-sub`,children:n})]})}var Gn,F,Kn,qn,Jn,Yn=o((()=>{Bn(),En(),Gn=u(f(),1),C(),D(),at(),F=O(),Kn=[{id:7,label:b(`7 days`,`ai-rank-suite`)},{id:28,label:b(`28 days`,`ai-rank-suite`)},{id:90,label:b(`90 days`,`ai-rank-suite`)}],qn=e=>(e??0).toLocaleString(),Jn=e=>{window.location.hash=e}}));function Xn({value:e,label:t,sub:n,delta:r}){let i=Math.max(0,Math.min(100,Number(e)||0)),a=-90+i/100*180,o=Math.PI*70,s=sr(i);return(0,rr.jsxs)(`div`,{className:`ars-barometer`,children:[(0,rr.jsxs)(`svg`,{viewBox:`0 0 170 100`,role:`img`,"aria-label":S(b(`%1$s: %2$s of 100 — %3$s`,`ai-rank-suite`),t,i,or(i)),children:[(0,rr.jsx)(`path`,{d:`M 15 90 A 70 70 0 0 1 155 90`,fill:`none`,stroke:`var(--ars-surface-3)`,strokeWidth:`14`,strokeLinecap:`round`}),(0,rr.jsx)(`path`,{d:`M 15 90 A 70 70 0 0 1 155 90`,fill:`none`,stroke:s,strokeWidth:`14`,strokeLinecap:`round`,strokeDasharray:`${i/100*o} ${o}`,style:{transition:`stroke-dasharray 700ms cubic-bezier(0.2,0,0,1), stroke 300ms ease`}}),(0,rr.jsx)(`g`,{style:{transform:`rotate(${a}deg)`,transformOrigin:`85px 90px`,transition:`transform 700ms cubic-bezier(0.2,0,0,1)`},children:(0,rr.jsx)(`line`,{x1:`85`,y1:`90`,x2:`85`,y2:`34`,stroke:`var(--ars-ink)`,strokeWidth:`2.5`,strokeLinecap:`round`})}),(0,rr.jsx)(`circle`,{cx:`85`,cy:`90`,r:`5`,fill:`var(--ars-ink)`})]}),(0,rr.jsxs)(`div`,{className:`ars-barometer-read`,children:[(0,rr.jsxs)(`span`,{className:`ars-barometer-value`,style:{color:s},children:[i,typeof r==`number`&&r!==0&&(0,rr.jsxs)(`span`,{className:`ars-barometer-delta`,style:{color:r>0?`var(--ars-good)`:`var(--ars-serious)`},children:[r>0?`▲`:`▼`,Math.abs(r)]})]}),(0,rr.jsx)(`span`,{className:`ars-barometer-label`,children:t}),(0,rr.jsx)(`span`,{className:`ars-barometer-verdict`,style:{color:s},children:or(i)}),n&&(0,rr.jsx)(`span`,{className:`t-caption`,children:n})]})]})}function Zn({dist:e,label:t}){let n=Math.max(1,...e),r=e.reduce((e,t)=>e+t,0);return(0,rr.jsxs)(`div`,{className:`grid gap-1`,children:[(0,rr.jsx)(`span`,{className:`t-overline`,children:t}),(0,rr.jsx)(`span`,{className:`t-caption`,children:b(`How many pages fall in each score range`,`ai-rank-suite`)}),(0,rr.jsx)(`div`,{className:`ars-spread`,children:e.map((e,t)=>(0,rr.jsxs)(`div`,{className:`ars-spread-col`,title:S(b(`%1$s pages scored %2$s`,`ai-rank-suite`),e,ir[t]),children:[(0,rr.jsx)(`span`,{className:`ars-spread-n tabular-nums`,children:e.toLocaleString()}),(0,rr.jsx)(`span`,{className:`ars-spread-bar${e===0?` is-empty`:``}`,style:e===0?void 0:{height:`${Math.max(6,e/n*100)}%`,background:ar[t]}}),(0,rr.jsx)(`span`,{className:`ars-spread-label`,children:ir[t]}),(0,rr.jsx)(`span`,{className:`ars-spread-share tabular-nums`,children:r>0?`${Math.round(e/r*100)}%`:`—`})]},ir[t]))})]})}function Qn({rows:e,keyField:t,labelField:n,onPick:r,active:i}){return(0,rr.jsxs)(`div`,{className:`ars-analyzer-table`,children:[(0,rr.jsxs)(`div`,{className:`ars-analyzer-row is-head`,children:[(0,rr.jsx)(`span`,{}),(0,rr.jsx)(`span`,{children:b(`Entries`,`ai-rank-suite`)}),(0,rr.jsx)(`span`,{children:b(`Scored`,`ai-rank-suite`)}),(0,rr.jsx)(`span`,{children:b(`GEO`,`ai-rank-suite`)}),(0,rr.jsx)(`span`,{children:b(`SEO`,`ai-rank-suite`)}),(0,rr.jsx)(`span`,{children:b(`Under 40`,`ai-rank-suite`)})]}),e.map(e=>(0,rr.jsxs)(`button`,{type:`button`,className:`ars-analyzer-row${i===e[t]?` is-active`:``}`,onClick:()=>r(i===e[t]?``:e[t]),title:b(`Click to scope the analyzer to this`,`ai-rank-suite`),children:[(0,rr.jsxs)(`span`,{className:`font-medium truncate`,children:[e[n],e.rtl?(0,rr.jsx)(j,{tone:`neutral`,children:b(`RTL`,`ai-rank-suite`)}):null]}),(0,rr.jsx)(`span`,{className:`tabular-nums`,children:e.total.toLocaleString()}),(0,rr.jsxs)(`span`,{className:`tabular-nums`,style:{color:e.analyzed<e.total?`var(--ars-accent)`:`var(--ars-ink-2)`},children:[e.total>0?Math.round(100*e.analyzed/e.total):0,`%`]}),(0,rr.jsx)(`span`,{className:`tabular-nums font-semibold`,style:{color:sr(e.avg_geo)},children:e.analyzed?e.avg_geo:`–`}),(0,rr.jsx)(`span`,{className:`tabular-nums font-semibold`,style:{color:sr(e.avg_seo)},children:e.analyzed?e.avg_seo:`–`}),(0,rr.jsx)(`span`,{className:`tabular-nums`,style:{color:e.weak>0?`var(--ars-serious)`:`var(--ars-ink-3)`},children:e.weak.toLocaleString()})]},e[t]))]})}function $n(e,t){let n=String(e||``).replace(`_`,`-`);try{let t=new Intl.DisplayNames([document.documentElement.lang||`en`],{type:`language`}).of(n);if(t&&t.toLowerCase()!==n.toLowerCase())return`${t} (${e})`}catch{}return t||e}function er({postType:e,lang:t}){let[n,r]=(0,nr.useState)(`geo`),[i,a]=(0,nr.useState)(1),[o,s]=(0,nr.useState)(null);return(0,nr.useEffect)(()=>{a(1)},[e,t,n]),(0,nr.useEffect)(()=>{let r=new URLSearchParams({metric:n,page:String(i),per_page:`25`});e&&r.set(`post_type`,e),t&&r.set(`lang`,t),E.get(`/site-analyzer/weakest?${r}`).then(s).catch(()=>s({items:[],pagination:{pages:0,total:0}}))},[e,t,n,i]),o?(0,rr.jsxs)(`div`,{className:`grid gap-2`,children:[(0,rr.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,rr.jsx)(`span`,{className:`t-overline`,children:b(`Weakest pages`,`ai-rank-suite`)}),(0,rr.jsx)(He,{value:n,onChange:r,options:[{id:`geo`,label:b(`by GEO`,`ai-rank-suite`)},{id:`seo`,label:b(`by SEO`,`ai-rank-suite`)}]})]}),o.items.length===0?(0,rr.jsx)(`span`,{className:`t-caption`,children:b(`No scored pages in this scope yet.`,`ai-rank-suite`)}):(0,rr.jsx)(`div`,{className:`ars-analyzer-table is-pages`,children:o.items.map(e=>(0,rr.jsxs)(`div`,{className:`ars-analyzer-row`,children:[(0,rr.jsx)(`a`,{href:`#/content/${e.id}`,className:`truncate font-medium`,children:e.title||`#${e.id}`}),(0,rr.jsx)(`span`,{className:`t-caption`,children:e.type}),(0,rr.jsx)(`span`,{className:`tabular-nums font-semibold`,style:{color:sr(e.geo)},children:e.geo}),(0,rr.jsx)(`span`,{className:`tabular-nums font-semibold`,style:{color:sr(e.seo)},children:e.seo}),(0,rr.jsxs)(`a`,{href:e.edit,target:`_blank`,rel:`noreferrer noopener`,className:`ars-linkbtn`,children:[b(`Edit`,`ai-rank-suite`),` ↗`]})]},e.id))}),o.pagination.pages>1&&(0,rr.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,rr.jsxs)(`span`,{className:`t-caption`,children:[b(`Page`,`ai-rank-suite`),` `,i,` `,b(`of`,`ai-rank-suite`),` `,o.pagination.pages,` · `,o.pagination.total.toLocaleString(),` `,b(`pages`,`ai-rank-suite`)]}),(0,rr.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,rr.jsx)(A,{variant:`ghost`,disabled:i<=1,onClick:()=>a(e=>e-1),children:`‹`}),(0,rr.jsx)(A,{variant:`ghost`,disabled:i>=o.pagination.pages,onClick:()=>a(e=>e+1),children:`›`})]})]})]}):null}function tr({onRefresh:e}){let[t,n]=(0,nr.useState)(null),[r,i]=(0,nr.useState)(null),[a,o]=(0,nr.useState)(`missing`),[s,c]=(0,nr.useState)(``),[l,u]=(0,nr.useState)(``),[d,f]=(0,nr.useState)(!1),[p,m]=(0,nr.useState)(null),[h,g]=(0,nr.useState)(`overview`),_=(0,nr.useRef)(!1),v=(0,nr.useRef)(!0),[y,x]=(0,nr.useState)(!1),C=(0,nr.useRef)(e);C.current=e;let w=(0,nr.useCallback)(async()=>{let e=new URLSearchParams;s&&e.set(`post_type`,s),l&&e.set(`lang`,l);try{n(await E.get(`/site-analyzer${e.toString()?`?${e}`:``}`))}catch(e){m(e.message)}},[s,l]);(0,nr.useEffect)(()=>{w()},[w]),(0,nr.useEffect)(()=>(ie(`bulk`)&&E.get(`/bulk/status`).then(i).catch(()=>{}),()=>{v.current=!1}),[]);let ee=(0,nr.useCallback)(async()=>{if(!_.current){_.current=!0;try{let e=await E.post(`/bulk/tick`);i(e);let t=0;for(;e.state===`running`&&v.current;)e=await E.post(`/bulk/tick`),i(e),++t%40==0&&await w();await w(),C.current&&C.current()}catch(e){m(e.message)}finally{_.current=!1,f(!1)}}},[w]),T=!Array.isArray(re.modules)||re.modules.includes(`bulk`),te=async()=>{f(!0),m(null),x(!0);let e=new Set,t=1;try{for(;;){let n=await E.get(a===`all`?`/content?type=any&per_page=50&page=${t}`:`/content?type=any&filter=unscored&per_page=50&page=1`);if(!Array.isArray(n)||n.length===0)break;let r=n.filter(t=>!e.has(t.id));if(r.length===0&&a!==`all`)break;for(let t of r)e.add(t.id),await E.post(`/content/${t.id}/analyze`);a===`all`&&(t+=1),await w()}await w(),C.current&&C.current()}catch(e){m(e.message)}finally{f(!1)}},ne=async()=>{if(!T){te();return}f(!0),m(null);try{x(!0),i(await E.post(`/bulk/start`,{action:`analyze`,scope:a})),ee()}catch(e){m(e.message),f(!1)}},D=async()=>{try{i(await E.post(`/bulk/cancel`,{}))}catch(e){m(e.message)}},ae=r?.state===`running`,oe=ae&&r?.action===`analyze`,se=oe&&!_.current,ce=t,le=ce?.samples||[],ue=e=>e.day.slice(5).replace(`-`,`/`),de=le.map(e=>({date:ue(e),label:ue(e),value:e.geo})),O=le.map(e=>({date:ue(e),label:ue(e),value:e.seo})),fe=e=>e.length>1?e[0].value:null,pe=e=>e.length?e[e.length-1].value:null,me=de.length>1?pe(de)-fe(de):null,he=O.length>1?pe(O)-fe(O):null,ge=ce&&ce.total>0?Math.round(100*ce.analyzed/ce.total):0,_e=!!ce&&(ce.total||0)>0&&(ce.unscored||0)===0;(0,nr.useEffect)(()=>{_e&&a!==`all`&&o(`all`)},[_e,a]);let ve=(ce?.areas||[]).filter(e=>e.pages>0&&e.average!==null).sort((e,t)=>e.average-t.average).slice(0,4);return(0,rr.jsxs)(k,{title:b(`Full website analyzer`,`ai-rank-suite`),subtitle:b(`Score every published page for AI search and for Google, then see where the site stands as a whole — by type, by language, over time.`,`ai-rank-suite`),action:oe&&_.current?(0,rr.jsx)(A,{variant:`ghost`,onClick:D,children:b(`Stop`,`ai-rank-suite`)}):(0,rr.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[_e?null:(0,rr.jsx)(He,{value:a,onChange:o,options:[{id:`missing`,label:b(`Unscored only`,`ai-rank-suite`)},{id:`all`,label:b(`Re-score everything`,`ai-rank-suite`)}]}),se?(0,rr.jsxs)(A,{onClick:()=>{f(!0),ee()},busy:d,children:[b(`Resume run`,`ai-rank-suite`),` (`,(r.remaining||0).toLocaleString(),` `,b(`left`,`ai-rank-suite`),`)`]}):(0,rr.jsx)(A,{onClick:ne,busy:d,disabled:ae&&!oe,children:_e?b(`Re-score everything`,`ai-rank-suite`):ce&&ce.analyzed>0?b(`Analyze site`,`ai-rank-suite`):b(`Run first analysis`,`ai-rank-suite`)})]}),children:[p&&(0,rr.jsx)(M,{tone:`serious`,children:p}),ae&&!oe&&(0,rr.jsxs)(M,{tone:`warning`,children:[b(`Another bulk job is running`,`ai-rank-suite`),` (`,r.action,`). `,b(`The analyzer waits until it finishes.`,`ai-rank-suite`)]}),(oe||y&&r?.state===`done`&&r?.action===`analyze`)&&(0,rr.jsx)(`div`,{className:`mb-4`,children:(0,rr.jsx)(Ne,{label:(0,rr.jsxs)(rr.Fragment,{children:[b(oe?`Scoring pages…`:`Finished`,`ai-rank-suite`),` `,(r.done||0).toLocaleString(),` `,b(`of`,`ai-rank-suite`),` `,(r.total||0).toLocaleString(),r.failed?` · ${r.failed} ${b(`failed`,`ai-rank-suite`)}`:``,oe&&ce?.estimate?.per_post_ms&&r.remaining?` · ~${cr(Math.ceil(r.remaining*ce.estimate.per_post_ms/1e3))} ${b(`left`,`ai-rank-suite`)}`:``]}),total:100,percent:r.progress??0})}),ce&&(ce.types.length>1||ce.languages.length>1)&&(0,rr.jsxs)(`div`,{className:`ars-scopebar mb-4`,children:[ce.types.length>1&&(0,rr.jsxs)(`label`,{className:`ars-scope`,children:[(0,rr.jsx)(`span`,{className:`ars-scope-label`,children:b(`Type`,`ai-rank-suite`)}),(0,rr.jsxs)(`select`,{value:s,onChange:e=>c(e.target.value),children:[(0,rr.jsx)(`option`,{value:``,children:S(b(`All types (%d)`,`ai-rank-suite`),ce.types.length)}),ce.types.map(e=>(0,rr.jsx)(`option`,{value:e.id,children:e.label},e.id))]})]}),ce.languages.length>1&&(0,rr.jsxs)(`label`,{className:`ars-scope`,children:[(0,rr.jsx)(`span`,{className:`ars-scope-label`,children:b(`Language`,`ai-rank-suite`)}),(0,rr.jsxs)(`select`,{value:l,onChange:e=>u(e.target.value),children:[(0,rr.jsx)(`option`,{value:``,children:S(b(`All languages (%d)`,`ai-rank-suite`),ce.languages.length)}),ce.languages.map(e=>(0,rr.jsx)(`option`,{value:e.code,children:$n(e.code,e.label)},e.code))]})]})]}),ce?ce.analyzed===0?(0,rr.jsxs)(`div`,{className:`grid gap-2 py-4 text-center`,children:[(0,rr.jsxs)(`span`,{className:`font-semibold text-[13.5px]`,children:[ce.total.toLocaleString(),` `,b(`published pages, none scored yet`,`ai-rank-suite`)]}),(0,rr.jsxs)(`span`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:[b(`The analysis runs on your own server, costs nothing, and can be stopped at any time. Every page gets a AI score for AI search and an SEO score for Google.`,`ai-rank-suite`),ce.estimate.seconds>0?` ${b(`Estimated`,`ai-rank-suite`)}: ~${cr(ce.estimate.seconds)}.`:``]})]}):(0,rr.jsxs)(`div`,{className:`grid gap-5`,children:[(0,rr.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-[auto_auto_minmax(0,1fr)] items-center`,children:[(0,rr.jsx)(Xn,{value:ce.avg_geo,label:b(`GEO`,`ai-rank-suite`),sub:b(`AI search readiness`,`ai-rank-suite`),delta:me}),(0,rr.jsx)(Xn,{value:ce.avg_seo,label:b(`SEO`,`ai-rank-suite`),sub:b(`Classic search`,`ai-rank-suite`),delta:he}),(0,rr.jsxs)(`div`,{className:`grid gap-3 min-w-0`,children:[(0,rr.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,rr.jsxs)(`span`,{className:`text-[13px]`,children:[S(b(`%1$s of %2$s %3$s scored (%4$s%%)`,`ai-rank-suite`),ce.analyzed.toLocaleString(),ce.total.toLocaleString(),s&&(ce.types||[]).find(e=>e.id===s)?.label||b(`entries`,`ai-rank-suite`),ge),ce.unscored>0&&ce.estimate.seconds>0?` · `+S(b(`%1$s unscored, about %2$s`,`ai-rank-suite`),ce.unscored.toLocaleString(),cr(ce.estimate.seconds)):``]}),(0,rr.jsxs)(`span`,{className:`flex items-center gap-1.5 flex-wrap`,children:[ce.weak.geo>0?(0,rr.jsxs)(j,{tone:`serious`,children:[ce.weak.geo.toLocaleString(),` `,b(`GEO under 40`,`ai-rank-suite`)]}):(0,rr.jsx)(j,{tone:`good`,children:b(`No GEO page under 40`,`ai-rank-suite`)}),ce.strong.geo>0&&(0,rr.jsxs)(j,{tone:`good`,children:[ce.strong.geo.toLocaleString(),` `,b(`GEO 80+`,`ai-rank-suite`)]})]})]}),(0,rr.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,rr.jsx)(Zn,{dist:ce.dist.geo,label:b(`GEO spread`,`ai-rank-suite`)}),(0,rr.jsx)(Zn,{dist:ce.dist.seo,label:b(`SEO spread`,`ai-rank-suite`)})]})]})]}),(0,rr.jsx)(He,{value:h,onChange:g,options:[{id:`overview`,label:b(`Where it is weak`,`ai-rank-suite`)},{id:`types`,label:b(`By type`,`ai-rank-suite`)},...ce.by_lang.length>0?[{id:`langs`,label:b(`By language`,`ai-rank-suite`)}]:[],{id:`pages`,label:b(`Weakest pages`,`ai-rank-suite`)}]}),h===`overview`&&(0,rr.jsxs)(`div`,{className:`grid gap-3`,children:[(0,rr.jsx)(`span`,{className:`t-overline`,children:b(`Coldest areas across the site`,`ai-rank-suite`)}),ve.length===0?(0,rr.jsx)(`span`,{className:`t-caption`,children:b(`Area scores appear after the first analysis.`,`ai-rank-suite`)}):(0,rr.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:ve.map(e=>(0,rr.jsxs)(`div`,{className:`ars-analyzer-area`,children:[(0,rr.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,rr.jsx)(`span`,{className:`font-semibold text-[13px]`,children:e.label}),(0,rr.jsx)(`span`,{className:`tabular-nums font-bold`,style:{color:sr(e.average)},children:e.average})]}),(0,rr.jsx)(Pe,{value:e.average,color:sr(e.average)}),(0,rr.jsxs)(`span`,{className:`t-caption`,children:[e.critical.toLocaleString(),` `,b(`critical`,`ai-rank-suite`),` · `,e.weak.toLocaleString(),` `,b(`weak`,`ai-rank-suite`),` · `,e.good.toLocaleString(),` `,b(`good`,`ai-rank-suite`),` · `,e.pages.toLocaleString(),` `,b(`pages`,`ai-rank-suite`)]}),e.hint&&(0,rr.jsx)(`span`,{className:`t-caption`,children:e.hint})]},e.key))}),(0,rr.jsx)(`span`,{className:`t-caption`,children:b(`The same fix repeated across pages beats a perfect single page: start with the coldest area, and the autopilot or "Let AI do" can apply it site-wide.`,`ai-rank-suite`)})]}),h===`types`&&(0,rr.jsx)(Qn,{rows:ce.by_type,keyField:`type`,labelField:`label`,onPick:c,active:s}),h===`langs`&&(ce.by_lang.length>1&&ce.by_lang.every(e=>e.total===ce.by_lang[0].total&&e.avg_geo===ce.by_lang[0].avg_geo&&e.avg_seo===ce.by_lang[0].avg_seo)?(0,rr.jsx)(`p`,{className:`m-0 px-4 py-3 t-caption`,children:S(b(`Your translation plugin translates per request, so every entry exists in all %d languages and every language mirrors the source content — a per-language table would repeat the same line %d times. Scores are shown for the source content above.`,`ai-rank-suite`),ce.by_lang.length,ce.by_lang.length)}):(0,rr.jsx)(Qn,{rows:ce.by_lang,keyField:`code`,labelField:`label`,onPick:u,active:l})),h===`pages`&&(0,rr.jsx)(er,{postType:s,lang:l})]}):(0,rr.jsx)(`span`,{className:`t-caption`,children:b(`Loading…`,`ai-rank-suite`)})]})}var nr,rr,ir,ar,or,sr,cr,lr=o((()=>{nr=u(f(),1),C(),D(),at(),rr=O(),ir=[`0–19`,`20–39`,`40–59`,`60–79`,`80–100`],ar=[`var(--ars-serious)`,`var(--ars-serious)`,`var(--ars-accent)`,`var(--ars-brand)`,`var(--ars-good)`],or=e=>b(e>=80?`Strong`:e>=60?`Solid`:e>=40?`Needs work`:`Weak`,`ai-rank-suite`),sr=e=>e>=80?`var(--ars-good)`:e>=60?`var(--ars-brand)`:e>=40?`var(--ars-accent)`:`var(--ars-serious)`,cr=e=>e<60?`${e}s`:e<3600?`${Math.round(e/60)} min`:`${(e/3600).toFixed(1)} h`}));function ur({id:e,size:t=14}){let n=br[e]||(String(e).startsWith(`google`)?mr:null);return n?(0,dr.jsx)(n,{size:t}):null}var dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr=o((()=>{f(),dr=O(),fr={display:`inline-block`,flex:`none`,verticalAlign:`middle`},pr=({size:e})=>(0,dr.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,style:fr,"aria-hidden":!0,children:[0,60,120,180,240,300].map(e=>(0,dr.jsx)(`path`,{d:`M12 3.2 a8.8 8.8 0 0 1 7.62 4.4`,fill:`none`,stroke:`#16161e`,strokeWidth:`2.5`,strokeLinecap:`round`,transform:`rotate(${e} 12 12)`},e))}),mr=({size:e})=>(0,dr.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,style:fr,"aria-hidden":!0,children:[(0,dr.jsx)(`path`,{fill:`#4285F4`,d:`M23.49 12.27c0-.79-.07-1.54-.19-2.27H12v4.51h6.47c-.29 1.48-1.14 2.73-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z`}),(0,dr.jsx)(`path`,{fill:`#34A853`,d:`M12 24c3.24 0 5.95-1.08 7.93-2.91l-3.86-3c-1.08.72-2.45 1.16-4.07 1.16-3.13 0-5.78-2.11-6.73-4.96H1.29v3.09C3.26 21.3 7.31 24 12 24z`}),(0,dr.jsx)(`path`,{fill:`#FBBC05`,d:`M5.27 14.29c-.25-.72-.38-1.49-.38-2.29s.14-1.57.38-2.29V6.62H1.29C.47 8.24 0 10.06 0 12s.47 3.76 1.29 5.38l3.98-3.09z`}),(0,dr.jsx)(`path`,{fill:`#EA4335`,d:`M12 4.75c1.77 0 3.35.61 4.6 1.8l3.42-3.42C17.95 1.19 15.24 0 12 0 7.31 0 3.26 2.7 1.29 6.62l3.98 3.09c.95-2.85 3.6-4.96 6.73-4.96z`})]}),hr=({size:e})=>(0,dr.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,style:fr,"aria-hidden":!0,children:[(0,dr.jsx)(`defs`,{children:(0,dr.jsxs)(`linearGradient`,{id:`airanksuite-gem`,x1:`0`,y1:`0`,x2:`1`,y2:`1`,children:[(0,dr.jsx)(`stop`,{offset:`0%`,stopColor:`#4E86FF`}),(0,dr.jsx)(`stop`,{offset:`100%`,stopColor:`#9476F5`})]})}),(0,dr.jsx)(`path`,{fill:`url(#airanksuite-gem)`,d:`M12 1.5c.5 5.5 4.9 9.9 10.5 10.5C16.9 12.6 12.5 17 12 22.5 11.5 17 7.1 12.6 1.5 12 7.1 11.4 11.5 7 12 1.5z`})]}),gr=({size:e})=>(0,dr.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,style:fr,"aria-hidden":!0,children:[(0,dr.jsx)(`rect`,{x:`2`,y:`2`,width:`9.4`,height:`9.4`,fill:`#F25022`}),(0,dr.jsx)(`rect`,{x:`12.6`,y:`2`,width:`9.4`,height:`9.4`,fill:`#7FBA00`}),(0,dr.jsx)(`rect`,{x:`2`,y:`12.6`,width:`9.4`,height:`9.4`,fill:`#00A4EF`}),(0,dr.jsx)(`rect`,{x:`12.6`,y:`12.6`,width:`9.4`,height:`9.4`,fill:`#FFB900`})]}),_r=({size:e})=>(0,dr.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,style:fr,"aria-hidden":!0,children:Array.from({length:12},(e,t)=>(0,dr.jsx)(`rect`,{x:`11`,y:`1.6`,width:`2`,height:`7`,rx:`1`,fill:`#D97757`,transform:`rotate(${t*30} 12 12)`},t))}),vr=({size:e})=>(0,dr.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,style:fr,"aria-hidden":!0,children:(0,dr.jsxs)(`g`,{fill:`none`,stroke:`#20808D`,strokeWidth:`1.9`,strokeLinejoin:`round`,children:[(0,dr.jsx)(`path`,{d:`M12 2.5v19`}),(0,dr.jsx)(`path`,{d:`M4.5 8.5h15v7h-15z`}),(0,dr.jsx)(`path`,{d:`M4.5 8.5 12 2.8l7.5 5.7M4.5 15.5 12 21.2l7.5-5.7`})]})}),yr=({size:e})=>(0,dr.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,style:fr,"aria-hidden":!0,children:(0,dr.jsxs)(`g`,{fill:`none`,stroke:`#C0392B`,strokeWidth:`1.9`,children:[(0,dr.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,dr.jsx)(`path`,{d:`M3 12h18M12 3c3.2 2.4 3.2 15.6 0 18M12 3c-3.2 2.4-3.2 15.6 0 18`})]})}),br={chatgpt:pr,overviews:mr,gemini:hr,perplexity:vr,copilot:gr,claude:_r,china:yr}}));function Sr(){let[e,t]=(0,Cr.useState)(null),[n,r]=(0,Cr.useState)(null),[i,a]=(0,Cr.useState)(null);if((0,Cr.useEffect)(()=>{E.get(`/score/engines`).then(t).catch(e=>a(e.message))},[]),!e)return(0,wr.jsx)(k,{title:b(`Answer engines`,`ai-rank-suite`),children:i?(0,wr.jsx)(M,{tone:`serious`,children:i}):(0,wr.jsx)(`div`,{className:`ars-pageskel-block`,style:{height:120},"aria-busy":`true`})});let o=e=>e>=85?`green`:e>=60?`yellow`:`red`;return(0,wr.jsx)(k,{title:b(`Answer engines`,`ai-rank-suite`),subtitle:b(`Where you stand with each one — they retrieve differently, so they reward different things`,`ai-rank-suite`),action:(0,wr.jsx)(j,{tone:e.overall>=85?`good`:e.overall>=60?`warning`:`serious`,children:S(b(`%d%% overall`,`ai-rank-suite`),e.overall)}),children:(0,wr.jsxs)(`div`,{className:`grid gap-3`,children:[(0,wr.jsx)(`div`,{className:`ars-engrows`,children:e.engines.map(e=>{let t=o(e.score),i=n===e.id;return(0,wr.jsxs)(`button`,{type:`button`,onClick:()=>r(i?null:e.id),className:`ars-engrow${i?` is-active`:``}`,"aria-expanded":i,title:e.open.length===0?S(b(`%s — nothing outstanding`,`ai-rank-suite`),e.label):S(x(`%1$s — %2$d thing to fix (%3$s)`,`%1$s — %2$d things to fix (%3$s)`,e.open.length,`ai-rank-suite`),e.label,e.open.length,e.vendor),children:[(0,wr.jsxs)(`span`,{className:`ars-engrow-name`,children:[(0,wr.jsx)(ur,{id:e.id}),e.label]}),(0,wr.jsx)(`span`,{className:`ars-engrow-track`,children:(0,wr.jsx)(`span`,{className:`ars-engrow-fill`,style:{width:`${e.score}%`,background:`var(--ars-c-${t}-ink)`}})}),(0,wr.jsxs)(`span`,{className:`ars-engrow-value`,style:{color:`var(--ars-c-${t}-ink)`},children:[e.score,`%`]})]},e.id)})}),n&&(()=>{let t=e.engines.find(e=>e.id===n);return t?(0,wr.jsxs)(`div`,{className:`grid gap-3 p-3`,style:{background:`var(--ars-surface-2)`,borderRadius:`var(--ars-r-sm)`},children:[(0,wr.jsxs)(`div`,{children:[(0,wr.jsx)(`div`,{className:`t-overline mb-1`,children:S(b(`How %s decides`,`ai-rank-suite`),t.label)}),(0,wr.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:t.why})]}),(0,wr.jsx)(`div`,{className:`grid gap-1.5`,children:t.checks.map(e=>(0,wr.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,wr.jsx)(`span`,{"aria-hidden":`true`,style:{marginTop:2,color:e.pass?`var(--ars-good)`:`var(--ars-warning)`,fontWeight:700,fontSize:12},children:e.pass?`✓`:`!`}),(0,wr.jsxs)(`span`,{className:`min-w-0`,children:[(0,wr.jsx)(`span`,{className:`block text-[12.5px] font-medium`,style:{color:e.pass?`var(--ars-ink-3)`:`var(--ars-ink)`},children:e.label}),!e.pass&&(0,wr.jsx)(`span`,{className:`block text-[11.5px]`,style:{color:`var(--ars-ink-2)`},children:e.fix})]})]},e.id))})]}):null})(),(0,wr.jsxs)(ot,{title:b(`Why six scores instead of one`,`ai-rank-suite`),children:[(0,wr.jsx)(`p`,{children:b(`“Optimise for AI” is not one job. ChatGPT reads its own crawl and honours llms.txt. Google AI Overviews are built on the classic index, so ordinary technical SEO decides eligibility and nothing AI-specific does. Perplexity is search-grounded and rewards freshness. Copilot retrieves through Bing, so if Bing has not indexed the page nothing else matters.`,`ai-rank-suite`)}),(0,wr.jsx)(`p`,{children:b(`A single blended number averages those away and hides the only thing worth knowing — which engine you are invisible to.`,`ai-rank-suite`)})]})]})})}var Cr,wr,Tr=o((()=>{Cr=u(f(),1),C(),D(),at(),ct(),xr(),wr=O()})),Er=c({default:()=>Dr});function Dr(){let[e,t]=(0,Or.useState)(null),[n,r]=(0,Or.useState)(!1),[i,a]=(0,Or.useState)(null);(0,Or.useEffect)(()=>{E.get(`/score`).then(t).catch(e=>a(e.message))},[]);let o=async()=>{r(!0),a(null);try{t(await E.post(`/score/recalculate`))}catch(e){a(e.message)}finally{r(!1)}},s=e?.dimensions?.overall;return(0,kr.jsxs)(`div`,{className:`ars-page`,children:[i&&(0,kr.jsx)(M,{tone:`serious`,children:i}),(0,kr.jsx)(tr,{}),(0,kr.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[minmax(0,0.9fr)_minmax(0,1.1fr)] items-stretch`,children:[(0,kr.jsxs)(k,{title:b(`AI Score`,`ai-rank-suite`),subtitle:b(`How ready this site is for AI search and assistants`,`ai-rank-suite`),action:(0,kr.jsx)(A,{variant:`ghost`,onClick:o,busy:n,children:b(n?`Recalculating…`:`Recalculate`,`ai-rank-suite`)}),children:[(0,kr.jsxs)(`div`,{className:`ars-scoreband`,children:[(0,kr.jsx)(ge,{value:s??0,label:b(`AI Score`,`ai-rank-suite`)}),(0,kr.jsx)(`div`,{children:Ar.map(t=>{let n=e?.dimensions?.[t.key]??0;return(0,kr.jsxs)(`div`,{className:`ars-dimrow`,title:t.hint,children:[(0,kr.jsx)(`span`,{className:`ars-dimrow-label`,children:t.label}),(0,kr.jsx)(`span`,{className:`ars-dimrow-track`,children:(0,kr.jsx)(`span`,{className:`ars-dimrow-fill`,style:{width:`${n}%`}})}),(0,kr.jsx)(`span`,{className:`ars-dimrow-value`,children:n})]},t.key)})})]}),(0,kr.jsx)(`p`,{className:`m-0 mt-3 t-caption`,children:e?.calculated_at?S(b(`Last run %s · each area is weighted, so the score is these four and nothing else`,`ai-rank-suite`),new Date(e.calculated_at*1e3).toLocaleString()):b(`Not calculated yet.`,`ai-rank-suite`)})]}),(0,kr.jsx)(Sr,{})]})]})}var Or,kr,Ar,jr=o((()=>{Or=u(f(),1),C(),D(),at(),lr(),Tr(),kr=O(),Ar=[{key:`discovery`,label:b(`Discovery`,`ai-rank-suite`),hint:b(`Can AI crawlers find and map your site?`,`ai-rank-suite`)},{key:`structure`,label:b(`Structure`,`ai-rank-suite`),hint:b(`Is content chunkable for LLMs?`,`ai-rank-suite`)},{key:`answers`,label:b(`Answers`,`ai-rank-suite`),hint:b(`Does content answer questions directly?`,`ai-rank-suite`)},{key:`schema`,label:b(`Schema`,`ai-rank-suite`),hint:b(`Is meaning machine-readable?`,`ai-rank-suite`)}]}));function Mr({field:e,value:t,onChange:n}){let r={value:t??``,placeholder:e.hint,onChange:e=>n(e.target.value)};return(0,Ir.jsxs)(`div`,{className:e.type===`lines`?``:`sm:max-w-[440px]`,children:[(0,Ir.jsxs)(`label`,{className:`block font-medium mb-1 flex items-center gap-1.5`,children:[e.label,e.required&&(0,Ir.jsx)(j,{tone:`serious`,children:b(`required`,`ai-rank-suite`)}),!e.required&&e.recommended&&(0,Ir.jsx)(j,{tone:`warning`,children:b(`recommended`,`ai-rank-suite`)})]}),e.type===`lines`?(0,Ir.jsx)(`textarea`,{rows:4,...r}):e.type===`select`?(0,Ir.jsxs)(`select`,{value:t??``,onChange:e=>n(e.target.value),children:[(0,Ir.jsx)(`option`,{value:``,children:`—`}),e.options.map(e=>(0,Ir.jsx)(`option`,{value:e,children:e},e))]}):(0,Ir.jsx)(`input`,{type:e.type===`date`||e.type===`datetime-local`?e.type:`text`,...r}),e.hint&&e.type!==`lines`&&(0,Ir.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:e.hint})]})}function Nr({grouped:e,value:t,onChange:n}){let[r,i]=(0,Fr.useState)(``),a=r.trim().toLowerCase(),o=Object.entries(e||{}).map(([e,t])=>[e,t.filter(e=>!a||e.label.toLowerCase().includes(a))]).filter(([,e])=>e.length>0);return(0,Ir.jsxs)(`div`,{className:`grid gap-2 sm:max-w-[440px]`,children:[(0,Ir.jsx)(`input`,{type:`text`,placeholder:b(`Search 77 schema types…`,`ai-rank-suite`),value:r,onChange:e=>i(e.target.value)}),(0,Ir.jsx)(`select`,{value:t,onChange:e=>n(e.target.value),size:a?8:void 0,children:o.map(([e,t])=>(0,Ir.jsx)(`optgroup`,{label:e,children:t.map(e=>(0,Ir.jsx)(`option`,{value:e.value,children:e.label},e.value))},e))})]})}function Pr({data:e,onChange:t,showVariables:n=!0}){let r=e?.items||[],i=e?.types||{},a=e?.validation||[],o=(e,n)=>t(r.map((t,r)=>r===e?{...t,...n}:t)),s=Object.keys(e?.grouped?.[Object.keys(e?.grouped||{})[0]]||{}).length?Object.values(e.grouped)[0][0].value:`Article`;return(0,Ir.jsxs)(`div`,{className:`grid gap-4`,children:[e?.templates?.length>0&&(0,Ir.jsx)(M,{children:e.templates.length===1?S(b(`The template “%1$s” also applies %2$s schema to this page.`,`ai-rank-suite`),e.templates[0].name,e.templates[0].type):S(b(`%d global templates also apply schema to this page.`,`ai-rank-suite`),e.templates.length)}),r.length===0&&(0,Ir.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`No custom schema on this page yet — Article/WebPage and breadcrumbs are always emitted automatically.`,`ai-rank-suite`)}),r.map((n,s)=>{let c=i[n.type],l=a[s];return(0,Ir.jsxs)(`div`,{className:`ars-r-md p-4`,style:{background:`var(--ars-surface-2)`},children:[(0,Ir.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-3`,children:[(0,Ir.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Ir.jsx)(`span`,{className:`font-semibold text-[13.5px]`,children:c?.label||n.type}),l&&!l.valid&&(0,Ir.jsx)(j,{tone:`serious`,children:S(b(`%d required missing`,`ai-rank-suite`),l.missing_required.length)}),l&&l.valid&&l.missing_recommended.length>0&&(0,Ir.jsx)(j,{tone:`warning`,children:S(b(`%d recommended missing`,`ai-rank-suite`),l.missing_recommended.length)}),l&&l.valid&&l.missing_recommended.length===0&&(0,Ir.jsxs)(j,{tone:`good`,children:[`✓ `,b(`complete`,`ai-rank-suite`)]})]}),(0,Ir.jsx)(`button`,{type:`button`,"aria-label":b(`Remove schema`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer`,style:{color:`var(--ars-ink-3)`},onClick:()=>t(r.filter((e,t)=>t!==s)),children:(0,Ir.jsx)(Mt,{size:15})})]}),(0,Ir.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Ir.jsx)(Nr,{grouped:e.grouped,value:n.type,onChange:e=>o(s,{type:e,data:{}})}),l&&l.missing_required.length>0&&(0,Ir.jsx)(M,{tone:`serious`,children:S(b(`Google will ignore this schema until you fill in: %s.`,`ai-rank-suite`),l.missing_required.join(`, `))}),(c?.fields||[]).map(e=>(0,Ir.jsx)(Mr,{field:e,value:n.data?.[e.key],onChange:t=>o(s,{data:{...n.data,[e.key]:t}})},e.key))]})]},s)}),(0,Ir.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Ir.jsxs)(A,{variant:`ghost`,onClick:()=>t([...r,{type:s,data:{}}]),disabled:r.length>=20,children:[`+ `,b(`Add schema`,`ai-rank-suite`)]}),n&&(0,Ir.jsxs)(`details`,{className:`text-[12px]`,children:[(0,Ir.jsx)(`summary`,{className:`cursor-pointer`,style:{color:`var(--ars-ink-2)`},children:b(`Available variables`,`ai-rank-suite`)}),(0,Ir.jsx)(`div`,{className:`flex flex-wrap gap-1.5 mt-2`,children:Object.entries(e?.variables||{}).map(([e,t])=>(0,Ir.jsx)(`code`,{className:`ars-mono px-1.5 py-0.5 rounded`,style:{background:`var(--ars-surface-2)`},title:t,children:e},e))})]})]}),e?.preview?.length>0&&(0,Ir.jsxs)(`details`,{children:[(0,Ir.jsx)(`summary`,{className:`cursor-pointer text-[12.5px] font-medium`,children:S(x(`Preview JSON-LD (%d node)`,`Preview JSON-LD (%d nodes)`,e.preview.length,`ai-rank-suite`),e.preview.length)}),(0,Ir.jsx)(`pre`,{className:`ars-mono m-0 mt-2 p-3 ars-r-md overflow-auto`,style:{background:`var(--ars-surface-2)`,maxHeight:300},children:JSON.stringify(e.preview,null,2)})]})]})}var Fr,Ir,Lr=o((()=>{Fr=u(f(),1),C(),at(),Ft(),Ir=O()}));function Rr({postId:e=0,group:t=`shorttail`,onPick:n,taken:r=[],label:i}){let[a,o]=(0,zr.useState)(!1),[s,c]=(0,zr.useState)(null),[l,u]=(0,zr.useState)(null),[d,f]=(0,zr.useState)([]),p=r.map(e=>String(e).toLowerCase()),m=async()=>{o(!0),u(null);try{let n=await E.post(`/ai/keywords`,{group:t,...e?{post_id:e}:{}});c(n.keywords||[])}catch(e){u(e.message)}finally{o(!1)}},h=e=>{f(t=>[...t,e.toLowerCase()]),n(e)};return(0,Br.jsxs)(`div`,{className:`grid gap-2`,children:[(0,Br.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Br.jsxs)(A,{variant:`ghost`,onClick:m,busy:a,children:[(0,Br.jsx)(bt,{width:14,height:14}),i||b(`Suggest keywords with AI`,`ai-rank-suite`)]}),s&&s.length>0&&(0,Br.jsx)(`span`,{className:`t-caption`,children:b(`Pick the ones worth tracking.`,`ai-rank-suite`)})]}),l&&(0,Br.jsx)(M,{tone:`serious`,children:l}),s&&s.length===0&&(0,Br.jsx)(M,{tone:`warning`,children:b(`The engine returned no usable suggestions. Try again, or add a keyword by hand.`,`ai-rank-suite`)}),s&&s.length>0&&(0,Br.jsx)(`div`,{className:`ars-kwsuggest`,children:s.map(e=>{let t=d.includes(e.keyword.toLowerCase())||p.includes(e.keyword.toLowerCase());return(0,Br.jsxs)(`button`,{type:`button`,className:`ars-kwchip${t?` is-done`:``}`,disabled:t,title:e.why,onClick:()=>h(e.keyword),children:[(0,Br.jsx)(`span`,{className:`ars-kwchip-word`,children:e.keyword}),(0,Br.jsx)(j,{tone:t?`good`:`neutral`,children:t?b(`added`,`ai-rank-suite`):e.intent})]},e.keyword)})})]})}var zr,Br,Vr=o((()=>{zr=u(f(),1),C(),D(),at(),Ft(),Br=O()}));function Hr({score:e}){return(0,Gr.jsx)(`span`,{className:`inline-block ars-r-sm shrink-0`,style:{width:8,height:8,background:e>=70?`var(--ars-good)`:e>=40?`var(--ars-warning)`:`var(--ars-serious)`},"aria-hidden":!0})}function Ur({keywords:e,coverage:t,max:n=100,onChange:r,postId:i=0}){let[a,o]=(0,Wr.useState)(`shorttail`),[s,c]=(0,Wr.useState)(``),[l,u]=(0,Wr.useState)(!1),[d,f]=(0,Wr.useState)(null),[p,m]=(0,Wr.useState)(``),h=(e,t)=>{if(t){let t=p.trim(),n=g.some((n,r)=>r!==e&&n.toLowerCase()===t.toLowerCase());C(t&&!n?g.map((n,r)=>r===e?t:n):g.filter((t,n)=>n!==e))}f(null),m(``)},g=e?.[a]||[],_=Kr.find(e=>e.id===a),v=(t?.rows||[]).filter(e=>e.group===a),y=t?.summary?.[a],C=t=>r({...e,[a]:t.slice(0,n)}),w=e=>{let t=e.split(/[\n,]/).map(e=>e.trim()).filter(Boolean);if(!t.length)return;let n=new Set(g.map(e=>e.toLowerCase())),r=[...g];t.forEach(e=>{n.has(e.toLowerCase())||(n.add(e.toLowerCase()),r.push(e))}),C(r),c(``)},ee=e=>v.find(t=>t.keyword===e)?.score??null,T=s.split(/[\n,]/).filter(e=>e.trim()).length;return(0,Gr.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Gr.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,Gr.jsx)(Ae,{tabs:Kr.map(t=>({id:t.id,label:`${t.label} (${(e?.[t.id]||[]).length})`})),active:a,onChange:o}),y&&y.total>0&&(0,Gr.jsx)(j,{tone:y.coverage>=70?`good`:y.coverage>=40?`warning`:`serious`,children:S(b(`%1$s/%2$s covered`,`ai-rank-suite`),y.covered,y.total)})]}),(0,Gr.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:_.hint}),l?(0,Gr.jsxs)(`div`,{className:`grid gap-2`,children:[(0,Gr.jsx)(`textarea`,{rows:6,placeholder:`${S(b(`One per line — paste up to %d`,`ai-rank-suite`),n)}\n${_.placeholder}`,value:s,onChange:e=>c(e.target.value)}),(0,Gr.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Gr.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:()=>w(s),children:S(x(`Add %d keyword`,`Add %d keywords`,T,`ai-rank-suite`),T)}),(0,Gr.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,onClick:()=>{u(!1),c(``)},children:b(`Cancel`,`ai-rank-suite`)})]})]}):(0,Gr.jsxs)(`form`,{className:`flex gap-2`,onSubmit:e=>{e.preventDefault(),w(s)},children:[(0,Gr.jsx)(`input`,{type:`text`,placeholder:_.placeholder,value:s,onChange:e=>c(e.target.value),disabled:g.length>=n}),(0,Gr.jsx)(`button`,{type:`submit`,className:`ars-btn ars-btn-ghost`,disabled:!s.trim()||g.length>=n,children:b(`Add`,`ai-rank-suite`)}),(0,Gr.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,onClick:()=>u(!0),children:b(`Bulk`,`ai-rank-suite`)})]}),g.length<n&&(0,Gr.jsx)(Rr,{postId:i,group:a,taken:g,label:b(a===`geo`?`Suggest prompts with AI`:a===`longtail`?`Suggest long-tail with AI`:`Suggest keywords with AI`,`ai-rank-suite`),onPick:e=>w(e)}),(0,Gr.jsxs)(`div`,{className:`flex items-center justify-between text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:[(0,Gr.jsxs)(`span`,{children:[g.length,` / `,n]}),g.length>0&&(0,Gr.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent cursor-pointer p-0 text-[11.5px]`,style:{color:`var(--ars-serious)`},onClick:()=>C([]),children:b(`Clear all`,`ai-rank-suite`)})]}),g.length===0?(0,Gr.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`No keywords in this group yet.`,`ai-rank-suite`)}):(0,Gr.jsx)(`div`,{className:`grid gap-1 max-h-[260px] overflow-y-auto pr-1`,style:{scrollbarWidth:`thin`},children:g.map((e,t)=>{let n=ee(e),r=v.find(t=>t.keyword===e);return(0,Gr.jsxs)(`div`,{className:`flex items-center gap-2 ars-r-md px-2.5 py-1.5`,style:{background:`var(--ars-surface-2)`},children:[n!==null&&(0,Gr.jsx)(Hr,{score:n}),a===`shorttail`&&(0,Gr.jsx)(`button`,{type:`button`,title:b(t===0?`Primary — coverage is scored against this one`:`Make primary`,`ai-rank-suite`),disabled:t===0,onClick:()=>C([e,...g.filter((e,n)=>n!==t)]),className:`border-0 bg-transparent p-0 shrink-0`,style:{cursor:t===0?`default`:`pointer`,color:t===0?`var(--ars-brand)`:`var(--ars-ink-3)`,fontSize:12,lineHeight:1},children:t===0?`★`:`☆`}),d===t?(0,Gr.jsx)(`input`,{type:`text`,autoFocus:!0,value:p,onChange:e=>m(e.target.value),onBlur:()=>h(t,!0),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),h(t,!0)):e.key===`Escape`&&(e.preventDefault(),h(t,!1))},className:`flex-1`,style:{height:26,fontSize:12.5,padding:`2px 6px`}}):(0,Gr.jsx)(`span`,{className:`flex-1 text-[12.5px] truncate`,title:b(`Click to edit`,`ai-rank-suite`),style:{cursor:`text`},onClick:()=>{f(t),m(e)},children:e}),r&&(0,Gr.jsx)(`span`,{className:`text-[11px] tabular-nums shrink-0`,style:{color:`var(--ars-ink-3)`},title:a===`geo`?b(`Share of prompt terms found on this page`,`ai-rank-suite`):S(b(`%1$s× in text · %2$s%% density`,`ai-rank-suite`),r.occurrences,r.density),children:a===`geo`?Object.keys(r.signals).filter(e=>r.signals[e]).join(`, `)||b(`not answered`,`ai-rank-suite`):Object.keys(r.signals).filter(e=>r.signals[e]).join(`, `)||b(`not found`,`ai-rank-suite`)}),(0,Gr.jsx)(`button`,{type:`button`,"aria-label":S(b(`Remove %s`,`ai-rank-suite`),e),className:`border-0 bg-transparent cursor-pointer p-0 shrink-0`,style:{color:`var(--ars-ink-3)`},onClick:()=>C(g.filter((e,n)=>n!==t)),children:(0,Gr.jsx)(Mt,{size:13})})]},`${e}-${t}`)})})]})}var Wr,Gr,Kr,qr=o((()=>{Wr=u(f(),1),C(),at(),Vr(),Ft(),Gr=O(),Kr=[{id:`shorttail`,label:b(`Short-tail`,`ai-rank-suite`),hint:b(`Broad terms, 1–2 words. The first one is your primary focus keyword.`,`ai-rank-suite`),placeholder:b(`geo optimization`,`ai-rank-suite`)},{id:`longtail`,label:b(`Long-tail`,`ai-rank-suite`),hint:b(`Specific phrases, 3+ words. These win the most AI citations.`,`ai-rank-suite`),placeholder:b(`how to optimize a website for ChatGPT`,`ai-rank-suite`)},{id:`geo`,label:b(`AI search prompts`,`ai-rank-suite`),hint:b(`Questions people actually type into ChatGPT, Claude or Perplexity.`,`ai-rank-suite`),placeholder:b(`What is GEO optimization and how do I start?`,`ai-rank-suite`)}]}));function Jr(e,t){let n=String(e||``);return n.length>t?`${n.slice(0,t-1).trimEnd()}…`:n}function Yr(e){try{let t=new URL(e),n=t.pathname.split(`/`).filter(Boolean);return[t.hostname.replace(/^www\./,``),...n].join(` › `)}catch{return e}}function Xr({src:e,style:t,placeholder:n,placeholderStyle:r}){let[i,a]=(0,ri.useState)(!1);return!e||i?(0,ii.jsx)(`div`,{className:`flex items-center justify-center text-center text-[11.5px] px-3`,style:r,children:e?b(`That image URL could not be loaded`,`ai-rank-suite`):n}):(0,ii.jsx)(`img`,{src:e,alt:``,style:t,onError:()=>a(!0)})}function Zr({children:e,width:t=500}){return(0,ii.jsx)(`div`,{className:`ars-r-md p-4 ars-frame`,style:{background:`#fff`,border:`1px solid var(--ars-border)`,maxWidth:t},children:e})}function Qr({serp:e,device:t=`desktop`,emptyTitle:n,emptyDesc:r}){let i=t===`mobile`?55:60,a=t===`mobile`?120:160;return(0,ii.jsx)(Zr,{width:t===`mobile`?380:560,children:(0,ii.jsxs)(`div`,{style:{fontFamily:`arial, sans-serif`},children:[(0,ii.jsxs)(`div`,{className:`flex items-center gap-2 mb-1.5`,children:[(0,ii.jsx)(`span`,{className:`inline-flex items-center justify-center ars-r-sm text-[11px] font-bold`,style:{width:26,height:26,background:`#f1f3f4`,color:`#5f6368`},children:(e.site||`?`).slice(0,1).toUpperCase()}),(0,ii.jsxs)(`div`,{className:`leading-tight`,children:[(0,ii.jsx)(`div`,{style:{fontSize:12,color:`#202124`},children:e.site}),(0,ii.jsx)(`div`,{style:{fontSize:12,color:`#4d5156`},children:Jr(Yr(e.url),60)})]})]}),(0,ii.jsx)(`div`,{style:{fontSize:t===`mobile`?18:20,color:`#1a0dab`,lineHeight:1.3},children:Jr(e.title,i)||n||b(`Untitled`,`ai-rank-suite`)}),(0,ii.jsx)(`div`,{style:{fontSize:14,color:`#4d5156`,lineHeight:1.58,marginTop:3},children:Jr(e.desc,a)||r||b(`No meta description — Google will invent one from the page text.`,`ai-rank-suite`)})]})})}function $r({card:e,url:t}){let n=t;try{n=new URL(t).hostname.replace(/^www\./,``)}catch{}return(0,ii.jsx)(Zr,{width:500,children:(0,ii.jsxs)(`div`,{style:{fontFamily:`Helvetica, Arial, sans-serif`},children:[(0,ii.jsx)(Xr,{src:e.og_image,style:{width:`100%`,aspectRatio:`1.91 / 1`,objectFit:`cover`,display:`block`,borderRadius:3},placeholder:b(`No image — add a featured image or an OpenGraph image`,`ai-rank-suite`),placeholderStyle:{width:`100%`,aspectRatio:`1.91 / 1`,background:`#f0f2f5`,color:`#65676b`,borderRadius:3}}),(0,ii.jsxs)(`div`,{style:{background:`#f2f3f5`,padding:`10px 12px`,borderRadius:`0 0 3px 3px`},children:[(0,ii.jsx)(`div`,{style:{fontSize:12,color:`#65676b`,textTransform:`uppercase`},children:n}),(0,ii.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#050505`,lineHeight:1.3,marginTop:2},children:Jr(e.og_title,88)}),(0,ii.jsx)(`div`,{style:{fontSize:14,color:`#65676b`,lineHeight:1.4,marginTop:2},children:Jr(e.og_desc,110)})]})]})})}function ei({card:e,url:t}){let n=t;try{n=new URL(t).hostname.replace(/^www\./,``)}catch{}let r=e.tw_card===`summary_large_image`;return(0,ii.jsx)(Zr,{width:440,children:(0,ii.jsxs)(`div`,{style:{fontFamily:`Helvetica, Arial, sans-serif`,border:`1px solid #cfd9de`,borderRadius:4,overflow:`hidden`,display:r?`block`:`flex`},children:[(0,ii.jsx)(Xr,{src:e.tw_image,style:r?{width:`100%`,aspectRatio:`1.91 / 1`,objectFit:`cover`,display:`block`}:{width:128,height:128,objectFit:`cover`,flexShrink:0},placeholder:b(`No image`,`ai-rank-suite`),placeholderStyle:r?{width:`100%`,aspectRatio:`1.91 / 1`,background:`#f7f9f9`,color:`#536471`}:{width:128,height:128,background:`#f7f9f9`,color:`#536471`,flexShrink:0}}),(0,ii.jsxs)(`div`,{style:{padding:`10px 12px`},children:[(0,ii.jsx)(`div`,{style:{fontSize:13,color:`#536471`},children:n}),(0,ii.jsx)(`div`,{style:{fontSize:15,color:`#0f1419`,lineHeight:1.3,marginTop:2},children:Jr(e.tw_title,70)}),(0,ii.jsx)(`div`,{style:{fontSize:13,color:`#536471`,lineHeight:1.4,marginTop:2},children:Jr(e.tw_desc,r?100:60)})]})]})})}function ti({serp:e,engine:t,brand:n}){let r={chatgpt:{name:`ChatGPT`,accent:`#10a37f`,lead:b(`Based on the sources I found:`,`ai-rank-suite`)},overview:{name:b(`Google AI Overview`,`ai-rank-suite`),accent:`#4285f4`,lead:b(`AI Overview`,`ai-rank-suite`)},perplexity:{name:`Perplexity`,accent:`#20808d`,lead:b(`Answer`,`ai-rank-suite`)},copilot:{name:`Copilot`,accent:`#0067b8`,lead:b(`Here is what I found:`,`ai-rank-suite`)}},i=r[t]||r.chatgpt,a=(e.summary||e.desc||``).trim(),o=n||e.site;return(0,ii.jsx)(Zr,{width:560,children:(0,ii.jsxs)(`div`,{style:{fontFamily:`inherit`},children:[(0,ii.jsxs)(`div`,{style:{display:`inline-flex`,alignItems:`center`,gap:6,fontSize:11,fontWeight:700,letterSpacing:`0.04em`,textTransform:`uppercase`,color:i.accent,marginBottom:8},children:[(0,ii.jsx)(`span`,{style:{width:8,height:8,background:i.accent,borderRadius:2}}),i.lead]}),a?(0,ii.jsxs)(`p`,{style:{margin:`0 0 12px`,fontSize:14,lineHeight:1.6,color:`#1f1f1f`},children:[Jr(a,260),` `,(0,ii.jsx)(`sup`,{style:{fontSize:10,fontWeight:700,color:i.accent,background:`color-mix(in srgb, ${i.accent} 12%, white)`,padding:`1px 4px`,borderRadius:2},children:`1`})]}):(0,ii.jsx)(`p`,{style:{margin:`0 0 12px`,fontSize:13.5,lineHeight:1.6,color:`#8a4b00`},children:b(`This page has no summary or meta description, so an assistant has to build a sentence from whatever text it happens to extract — and it will attribute that sentence to you.`,`ai-rank-suite`)}),(0,ii.jsx)(`div`,{style:{fontSize:11,fontWeight:600,color:`#5f6368`,marginBottom:6},children:b(`Sources`,`ai-rank-suite`)}),(0,ii.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:8,border:`1px solid #e1e6ef`,borderRadius:3,padding:`8px 10px`},children:[(0,ii.jsx)(`span`,{style:{width:18,height:18,flex:`none`,borderRadius:2,background:`#f0f4f9`,color:`#5f6368`,fontSize:10,fontWeight:700,display:`grid`,placeItems:`center`},children:(o||`?`).slice(0,1).toUpperCase()}),(0,ii.jsxs)(`span`,{style:{minWidth:0},children:[(0,ii.jsx)(`span`,{style:{display:`block`,fontSize:12.5,fontWeight:600,color:`#1f1f1f`},children:Jr(e.title,70)||b(`Untitled`,`ai-rank-suite`)}),(0,ii.jsxs)(`span`,{style:{display:`block`,fontSize:11.5,color:`#5f6368`},children:[o,` · `,Jr(Yr(e.url),52)]})]})]})]})})}function ni({serp:e,card:t,brand:n}){let[r,i]=(0,ri.useState)(`google`),[a,o]=(0,ri.useState)(`desktop`),[s,c]=(0,ri.useState)(`chatgpt`);return e?(0,ii.jsxs)(`div`,{className:`grid gap-3`,children:[(0,ii.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,ii.jsx)(Ae,{tabs:[{id:`google`,label:b(`Google`,`ai-rank-suite`)},{id:`ai`,label:b(`AI answer`,`ai-rank-suite`)},{id:`facebook`,label:b(`Social`,`ai-rank-suite`)},{id:`twitter`,label:`X`}],active:r,onChange:i}),r===`google`&&(0,ii.jsx)(Ae,{tabs:[{id:`desktop`,label:b(`Desktop`,`ai-rank-suite`)},{id:`mobile`,label:b(`Mobile`,`ai-rank-suite`)}],active:a,onChange:o}),r===`ai`&&(0,ii.jsx)(Ae,{tabs:[{id:`chatgpt`,label:b(`ChatGPT`,`ai-rank-suite`)},{id:`overview`,label:b(`AI Overview`,`ai-rank-suite`)},{id:`perplexity`,label:b(`Perplexity`,`ai-rank-suite`)},{id:`copilot`,label:b(`Copilot`,`ai-rank-suite`)}],active:s,onChange:c})]}),r===`google`&&(0,ii.jsx)(Qr,{serp:e,device:a}),r===`ai`&&(0,ii.jsx)(ti,{serp:e,engine:s,brand:n}),r===`facebook`&&t&&(0,ii.jsx)($r,{card:t,url:e.url}),r===`twitter`&&t&&(0,ii.jsx)(ei,{card:t,url:e.url}),(0,ii.jsx)(`p`,{className:`m-0 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:b(r===`ai`?`Assistants redraw their interfaces constantly; what does not change is the shape — a paragraph they wrote, and a short source list. This is the surface your page actually gets.`:`Rendered from the same resolver that writes your <head> — save to refresh after an edit.`,`ai-rank-suite`)})]}):null}var ri,ii,ai=o((()=>{ri=u(f(),1),C(),at(),ii=O()}));function oi({item:e,onChange:t}){let n=e.previews||{},r=e.social||{},i=e.preview_options||{},a=(e,r)=>t({previews:{...n,[e]:r}}),o=(e,n)=>t({social:{...r,[e]:n}}),s=e.social_card?.image_warn,c=e.social_card?.image_meta;return(0,si.jsxs)(`div`,{className:`grid gap-4`,children:[s===`none`&&(0,si.jsx)(`div`,{className:`ars-r-lg px-4 py-3 text-[12.5px]`,style:{background:`var(--ars-warning-tonal)`},children:b(`No share image — set a featured image, a social override below, or a site-wide default under Social & sharing. Links shared without an image get far fewer clicks.`,`ai-rank-suite`)}),(s===`small`||s===`too_small`)&&c&&(0,si.jsxs)(`div`,{className:`ars-r-lg px-4 py-3 text-[12.5px]`,style:{background:s===`too_small`?`var(--ars-serious-tonal)`:`var(--ars-warning-tonal)`},children:[`The share image is `,c.width,`×`,c.height,`px —`,` `,s===`too_small`?`below the 600×315 minimum, some platforms will drop it entirely.`:`sharp previews need 1200×630 or larger.`]}),(0,si.jsxs)(`div`,{children:[(0,si.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Permalink`,`ai-rank-suite`)}),(0,si.jsx)(`input`,{type:`text`,value:e.slug||``,onChange:e=>t({slug:e.target.value}),placeholder:e.slug}),(0,si.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`The last part of the address. Change it and this plugin writes a redirect from the old one, so existing links keep working.`,`ai-rank-suite`)})]}),(0,si.jsxs)(`div`,{children:[(0,si.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Canonical URL`,`ai-rank-suite`)}),(0,si.jsx)(`input`,{type:`text`,value:e.canonical||``,placeholder:e.canonical_auto,onChange:e=>t({canonical:e.target.value})}),(0,si.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`Leave empty to point at this page itself. Set it only when this page duplicates another one — a wrong canonical removes the page from search entirely.`,`ai-rank-suite`)})]}),(0,si.jsxs)(`div`,{children:[(0,si.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Breadcrumb title`,`ai-rank-suite`)}),(0,si.jsx)(`input`,{type:`text`,value:e.breadcrumb_title||``,placeholder:e.title,onChange:e=>t({breadcrumb_title:e.target.value})}),(0,si.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`A shorter label for the breadcrumb trail and the BreadcrumbList schema.`,`ai-rank-suite`)})]}),(0,si.jsx)(`div`,{className:`grid gap-3`,children:Object.entries(ci).map(([e,t])=>(0,si.jsxs)(`div`,{className:`sm:max-w-[440px]`,children:[(0,si.jsx)(`label`,{className:`block font-medium mb-1`,children:t.label}),(0,si.jsxs)(`select`,{value:n[e]??``,onChange:t=>a(e,t.target.value),children:[(0,si.jsx)(`option`,{value:``,children:b(`Use the site default`,`ai-rank-suite`)}),(i[e]||[]).filter(Boolean).map(e=>(0,si.jsx)(`option`,{value:e,children:t.names[e]||e},e))]}),(0,si.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:t.hint})]},e))}),(0,si.jsxs)(`details`,{children:[(0,si.jsx)(`summary`,{className:`cursor-pointer font-medium text-[13px]`,children:b(`Social overrides`,`ai-rank-suite`)}),(0,si.jsxs)(`div`,{className:`grid gap-3 mt-3`,children:[(0,si.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-2)`},children:b(`Empty fields fall back to the SEO title, the meta description and the featured image.`,`ai-rank-suite`)}),li.map(e=>(0,si.jsxs)(`div`,{className:e.type===`textarea`?``:`sm:max-w-[440px]`,children:[(0,si.jsx)(`label`,{className:`block font-medium mb-1`,children:e.label}),e.type===`textarea`?(0,si.jsx)(`textarea`,{rows:2,value:r[e.key]||``,onChange:t=>o(e.key,t.target.value)}):(0,si.jsx)(`input`,{type:`text`,value:r[e.key]||``,onChange:t=>o(e.key,t.target.value)})]},e.key)),(0,si.jsxs)(`div`,{className:`sm:max-w-[440px]`,children:[(0,si.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`X card type`,`ai-rank-suite`)}),(0,si.jsxs)(`select`,{value:r.tw_card||``,onChange:e=>o(`tw_card`,e.target.value),children:[(0,si.jsx)(`option`,{value:``,children:b(`Automatic`,`ai-rank-suite`)}),(0,si.jsx)(`option`,{value:`summary`,children:b(`Small image`,`ai-rank-suite`)}),(0,si.jsx)(`option`,{value:`summary_large_image`,children:b(`Large image`,`ai-rank-suite`)})]})]})]})]})]})}var si,ci,li,ui=o((()=>{f(),C(),si=O(),ci={max_snippet:{label:b(`Max snippet length`,`ai-rank-suite`),hint:b(`How many characters Google may quote. −1 = no limit, 0 = no snippet at all.`,`ai-rank-suite`),names:{"-1":b(`No limit`,`ai-rank-suite`),0:b(`No snippet`,`ai-rank-suite`),50:b(`50 characters`,`ai-rank-suite`),100:b(`100 characters`,`ai-rank-suite`),160:b(`160 characters`,`ai-rank-suite`),200:b(`200 characters`,`ai-rank-suite`)}},max_image_preview:{label:b(`Max image preview`,`ai-rank-suite`),hint:b(`Size of the image Google may show next to this result.`,`ai-rank-suite`),names:{none:`No image`,standard:`Standard`,large:`Large`}},max_video_preview:{label:b(`Max video preview`,`ai-rank-suite`),hint:b(`Seconds of video Google may play in the result. −1 = no limit.`,`ai-rank-suite`),names:{"-1":`No limit`,0:`No preview`,15:`15 seconds`,30:`30 seconds`}}},li=[{key:`og_title`,label:b(`Facebook title`,`ai-rank-suite`),type:`text`},{key:`og_desc`,label:b(`Facebook description`,`ai-rank-suite`),type:`textarea`},{key:`og_image`,label:b(`Facebook image URL`,`ai-rank-suite`),type:`text`},{key:`tw_title`,label:b(`X title`,`ai-rank-suite`),type:`text`},{key:`tw_desc`,label:b(`X description`,`ai-rank-suite`),type:`textarea`},{key:`tw_image`,label:b(`X image URL`,`ai-rank-suite`),type:`text`}]}));function di({check:e,onFix:t,fixing:n}){let[r,i]=(0,pi.useState)(!1),a=hi[e.status]||hi.warn,o=e.status!==`pass`&&!!e.fix;return(0,mi.jsxs)(`li`,{className:`px-3 py-2`,style:{borderRadius:`var(--ars-r-sm)`,background:e.status===`pass`?`transparent`:`var(--ars-surface-2)`},children:[(0,mi.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,mi.jsx)(`span`,{"aria-hidden":!0,className:`shrink-0 inline-flex items-center justify-center`,style:{width:17,height:17,marginTop:1,borderRadius:`var(--ars-r-xs)`,background:a.bg,color:a.tone,fontSize:11,fontWeight:700,lineHeight:1},children:a.glyph}),(0,mi.jsx)(`span`,{className:`flex-1 min-w-0 text-[13px]`,style:{lineHeight:1.45},children:e.label}),(0,mi.jsxs)(`span`,{className:`flex items-center gap-1.5 shrink-0`,children:[e.ai&&e.status!==`pass`&&t&&(0,mi.jsx)(A,{variant:`ghost`,busy:n,onClick:()=>t(e),children:b(`Fix with AI`,`ai-rank-suite`)}),o&&(0,mi.jsx)(`button`,{type:`button`,"aria-expanded":r,"aria-label":b(r?`Hide explanation`:`Why this matters`,`ai-rank-suite`),onClick:()=>i(!r),className:`cursor-pointer inline-flex items-center justify-center`,style:{width:18,height:18,borderRadius:`var(--ars-r-xs)`,border:`1px solid var(--ars-border)`,background:`var(--ars-surface)`,color:`var(--ars-ink-3)`,fontSize:11,fontWeight:700,lineHeight:1},children:`?`})]})]}),r&&o&&(0,mi.jsx)(`p`,{className:`m-0 mt-1.5 ml-[27px] text-[12px]`,style:{color:`var(--ars-ink-2)`},children:e.fix})]})}function fi({checks:e=[],sections:t={},onFix:n,fixing:r=null}){let i=Object.keys(t).length?Object.entries(t):[[`basics`,b(`Checks`,`ai-rank-suite`)]],a=new Set(i.map(([e])=>e)),o=e.filter(e=>!a.has(e.section)),[s,c]=(0,pi.useState)({}),l=(e,t,i)=>{if(!i.length)return null;let a=i.filter(e=>e.status!==`pass`),o=a.length===0,l=s[e]===void 0?!o:!s[e];return(0,mi.jsxs)(`div`,{className:`ars-r-sm`,style:{border:`1px solid var(--ars-border)`},children:[(0,mi.jsxs)(`button`,{type:`button`,"aria-expanded":l,onClick:()=>c({...s,[e]:l}),className:`w-full flex items-center gap-2.5 px-3 py-2 cursor-pointer`,style:{background:`var(--ars-surface-2)`,border:0,borderRadius:`var(--ars-r-sm)`},children:[(0,mi.jsx)(`span`,{"aria-hidden":!0,style:{color:`var(--ars-ink-3)`,width:10,fontSize:11},children:l?`▾`:`▸`}),(0,mi.jsx)(`span`,{className:`font-semibold text-[13px]`,children:t}),o?(0,mi.jsxs)(j,{tone:`good`,children:[`✓ `,b(`All good`,`ai-rank-suite`)]}):(0,mi.jsx)(j,{tone:a.some(e=>e.status===`fail`)?`serious`:`warning`,children:S(x(`%d to fix`,`%d to fix`,a.length,`ai-rank-suite`),a.length)}),(0,mi.jsx)(`span`,{className:`ml-auto t-caption`,children:i.length})]}),l&&(0,mi.jsx)(`ul`,{className:`m-0 p-2 list-none grid gap-1`,children:i.map(e=>(0,mi.jsx)(di,{check:e,onFix:n,fixing:r===e.id},e.id))})]},e)};return(0,mi.jsxs)(`div`,{className:`grid gap-2`,children:[i.map(([t,n])=>l(t,n,e.filter(e=>e.section===t))),l(`other`,b(`Other`,`ai-rank-suite`),o)]})}var pi,mi,hi,gi=o((()=>{pi=u(f(),1),C(),at(),mi=O(),hi={pass:{glyph:`✓`,tone:`var(--ars-good)`,bg:`var(--ars-good-tonal)`},warn:{glyph:`!`,tone:`var(--ars-warning)`,bg:`var(--ars-warning-tonal)`},fail:{glyph:`✕`,tone:`var(--ars-serious)`,bg:`var(--ars-serious-tonal)`}}}));function _i({postId:e,initial:t=null,onLoad:n,onGoTo:r}){let[i,a]=(0,yi.useState)(t),[o,s]=(0,yi.useState)(null),[c,l]=(0,yi.useState)(null),[u,d]=(0,yi.useState)(!1),[f,p]=(0,yi.useState)(`tags`),[m,h]=(0,yi.useState)(!1),[g,_]=(0,yi.useState)({}),v=()=>{s(null),E.get(`/content/${e}/head`).then(e=>{a(e),n?.(e)}).catch(e=>s(e.message))};(0,yi.useEffect)(()=>{if(l(null),t){a(t);return}a(null),v()},[e,t]);let y=async()=>{d(!0);try{l(await E.get(`/content/${e}/head/live`))}catch(e){l({ok:!1,reason:e.message})}finally{d(!1)}},x=(0,yi.useMemo)(()=>i?i.groups.map(e=>({...e,tags:i.tags.filter(t=>t.group===e.id)})).filter(e=>e.tags.length>0):[],[i]);if(o)return(0,bi.jsx)(M,{tone:`serious`,children:o});if(!i)return(0,bi.jsx)(`div`,{className:`t-caption p-2`,children:b(`Reading the head…`,`ai-rank-suite`)});let C=i.counts||{};return(0,bi.jsxs)(`div`,{className:`grid gap-4`,children:[(0,bi.jsxs)(`div`,{className:`ars-head-strip`,children:[(0,bi.jsxs)(`div`,{className:`ars-head-stat`,children:[(0,bi.jsx)(`b`,{children:i.tags.filter(e=>e.status===`ok`).length}),(0,bi.jsx)(`span`,{children:`tags in order`})]}),C.missing>0&&(0,bi.jsxs)(`div`,{className:`ars-head-stat is-bad`,children:[(0,bi.jsx)(`b`,{children:C.missing}),(0,bi.jsx)(`span`,{children:`missing`})]}),C.long>0&&(0,bi.jsxs)(`div`,{className:`ars-head-stat is-warn`,children:[(0,bi.jsx)(`b`,{children:C.long}),(0,bi.jsx)(`span`,{children:`over length`})]}),C.empty>0&&(0,bi.jsxs)(`div`,{className:`ars-head-stat`,children:[(0,bi.jsx)(`b`,{children:C.empty}),(0,bi.jsx)(`span`,{children:`optional, unset`})]}),(0,bi.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,bi.jsx)(He,{value:f,onChange:p,options:[{id:`tags`,label:b(`Tags`,`ai-rank-suite`)},{id:`source`,label:b(`Source`,`ai-rank-suite`)},{id:`live`,label:b(`Live check`,`ai-rank-suite`)}]}),(0,bi.jsx)(`button`,{type:`button`,className:`ars-move`,title:b(`Reload`,`ai-rank-suite`),onClick:v,children:(0,bi.jsx)(yt,{size:12})})]})]}),i.coexist&&(0,bi.jsxs)(M,{tone:`warning`,children:[i.coexist,` is active on this site, so some of these surfaces are written by it rather than by AI Rank Suite. Rows marked `,(0,bi.jsx)(`b`,{children:`other plugin`}),` are the ones it owns — nothing here is duplicated, which is the point.`]}),f===`tags`&&(0,bi.jsxs)(bi.Fragment,{children:[i.issues.length>0&&(0,bi.jsx)(`div`,{className:`grid gap-1.5`,children:i.issues.map((e,t)=>(0,bi.jsxs)(`div`,{className:`ars-head-issue is-${e.level}`,children:[(0,bi.jsx)(`span`,{"aria-hidden":!0,className:`ars-head-issue-mark`,children:e.level===`error`?`✕`:e.level===`warn`?`!`:`i`}),(0,bi.jsxs)(`div`,{children:[(0,bi.jsx)(`div`,{className:`font-semibold text-[12.5px]`,children:e.title}),(0,bi.jsx)(`div`,{className:`text-[12px] mt-0.5`,style:{color:`var(--ars-ink-2)`},children:e.text})]})]},t))}),x.map(e=>(0,bi.jsxs)(`div`,{className:`ars-head-group`,children:[(0,bi.jsxs)(`div`,{className:`ars-head-group-head`,children:[(0,bi.jsxs)(`div`,{children:[(0,bi.jsx)(`div`,{className:`font-semibold text-[12.5px]`,children:e.label}),(0,bi.jsx)(`div`,{className:`t-caption`,children:e.note})]}),(0,bi.jsx)(`span`,{className:`t-caption tabular-nums`,children:e.tags.length})]}),(0,bi.jsx)(`div`,{className:`ars-head-rows`,children:e.tags.map(t=>{let n=`${e.id}:${t.key}`,i=!!g[n],a=xi[t.status]||xi.ok;return(0,bi.jsxs)(`div`,{className:`ars-head-row is-${t.status}`,children:[(0,bi.jsxs)(`button`,{type:`button`,className:`ars-head-row-main`,onClick:()=>_({...g,[n]:!i}),"aria-expanded":i,children:[(0,bi.jsx)(`span`,{className:`ars-head-key`,title:t.key,children:t.label}),(0,bi.jsx)(`span`,{className:`ars-head-val`,children:t.value?t.block?S(b(`%s characters of JSON-LD`,`ai-rank-suite`),t.value.length.toLocaleString()):t.value:(0,bi.jsx)(`i`,{style:{color:`var(--ars-ink-3)`},children:`—`})}),t.limit>0&&t.value&&(0,bi.jsxs)(`span`,{className:`ars-head-len tabular-nums`,children:[t.length,`/`,t.limit]}),(0,bi.jsx)(j,{tone:a.tone,children:a.label})]}),i&&(0,bi.jsxs)(`div`,{className:`ars-head-row-body`,children:[t.why&&(0,bi.jsx)(`p`,{className:`m-0 text-[12px]`,children:t.why}),t.note&&(0,bi.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:t.note}),t.limit>0&&t.value&&(0,bi.jsx)(Ie,{value:t.value,kind:t.limit>100?`desc`:`title`}),t.block&&t.value&&(0,bi.jsx)(`pre`,{className:`ars-head-pre`,children:t.value.slice(0,4e3)}),(0,bi.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,bi.jsx)(`code`,{className:`ars-head-code`,children:t.key}),(0,bi.jsxs)(`span`,{className:`t-caption`,children:[`written by`,` `,t.owner===`airs`?`AI Rank Suite`:t.owner===`wp`?`WordPress`:t.owner]}),r&&vi(t.key)&&(0,bi.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>r(vi(t.key)),children:b(`Edit this →`,`ai-rank-suite`)})]})]})]},t.key)})})]},e.id))]}),f===`source`&&(0,bi.jsxs)(`div`,{className:`grid gap-2`,children:[(0,bi.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,bi.jsx)(A,{variant:`ghost`,onClick:async()=>{await fe(i.source)&&(h(!0),setTimeout(()=>h(!1),1800))},children:m?`✓ `+b(`Copied`,`ai-rank-suite`):b(`Copy source`,`ai-rank-suite`)}),(0,bi.jsxs)(`a`,{href:i.url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 text-[12px]`,children:[b(`Open the page`,`ai-rank-suite`),(0,bi.jsx)(vt,{size:11})]}),(0,bi.jsxs)(`span`,{className:`ml-auto t-caption`,children:[i.source.split(`
    9 `).length,` lines`]})]}),(0,bi.jsx)(`pre`,{className:`ars-head-pre is-tall`,children:i.source||`(nothing would be written)`}),(0,bi.jsx)(`p`,{className:`m-0 t-caption`,children:b(`This is what AI Rank Suite writes. The finished head will also contain whatever your theme and other plugins add — use the live check to see the whole thing.`,`ai-rank-suite`)})]}),f===`live`&&(0,bi.jsxs)(`div`,{className:`grid gap-3`,children:[(0,bi.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,bi.jsxs)(A,{onClick:y,busy:u,children:[(0,bi.jsx)(Ot,{size:13}),b(`Fetch the real head`,`ai-rank-suite`)]}),(0,bi.jsxs)(`span`,{className:`t-caption`,children:[`Requests `,i.url,` and reads what came back — the only way to catch a second plugin writing the same tag.`]})]}),c&&!c.ok&&(0,bi.jsx)(M,{tone:`warning`,children:c.reason}),c&&c.ok&&(0,bi.jsxs)(bi.Fragment,{children:[(0,bi.jsxs)(`div`,{className:`ars-head-strip`,children:[(0,bi.jsxs)(`div`,{className:`ars-head-stat`,children:[(0,bi.jsx)(`b`,{children:c.tags.length}),(0,bi.jsx)(`span`,{children:`tags on the page`})]}),(0,bi.jsxs)(`div`,{className:`ars-head-stat${c.duplicates.length?` is-bad`:``}`,children:[(0,bi.jsx)(`b`,{children:c.duplicates.length}),(0,bi.jsx)(`span`,{children:`duplicated`})]}),(0,bi.jsxs)(`div`,{className:`ars-head-stat${c.drift.length?` is-warn`:``}`,children:[(0,bi.jsx)(`b`,{children:c.drift.length}),(0,bi.jsx)(`span`,{children:`differ from plan`})]}),(0,bi.jsxs)(`div`,{className:`ars-head-stat`,children:[(0,bi.jsx)(`b`,{children:c.jsonld}),(0,bi.jsx)(`span`,{children:b(`JSON-LD blocks`,`ai-rank-suite`)})]})]}),c.duplicates.length>0&&(0,bi.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,bi.jsx)(`div`,{className:`t-overline`,children:b(`Written more than once`,`ai-rank-suite`)}),c.duplicates.map(e=>(0,bi.jsxs)(`div`,{className:`ars-head-issue is-error`,children:[(0,bi.jsx)(`span`,{"aria-hidden":!0,className:`ars-head-issue-mark`,children:`✕`}),(0,bi.jsxs)(`div`,{children:[(0,bi.jsxs)(`div`,{className:`font-semibold text-[12.5px]`,children:[e.key,` appears `,e.count,` times`]}),(0,bi.jsx)(`div`,{className:`text-[12px] mt-0.5`,style:{color:`var(--ars-ink-2)`},children:b(`Two sources are writing this tag. Crawlers pick one, and which one is not something you control — usually the theme or a second SEO plugin. Switch the duplicate off at its source.`,`ai-rank-suite`)})]})]},e.key))]}),c.drift.length>0&&(0,bi.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,bi.jsx)(`div`,{className:`t-overline`,children:b(`Different from what we write`,`ai-rank-suite`)}),c.drift.map((e,t)=>(0,bi.jsxs)(`div`,{className:`ars-head-drift`,children:[(0,bi.jsx)(`div`,{className:`font-semibold text-[12px]`,children:e.label}),(0,bi.jsxs)(`div`,{className:`ars-head-drift-row`,children:[(0,bi.jsx)(`span`,{className:`t-caption`,children:`planned`}),(0,bi.jsx)(`code`,{children:e.planned})]}),(0,bi.jsxs)(`div`,{className:`ars-head-drift-row`,children:[(0,bi.jsx)(`span`,{className:`t-caption`,children:`live`}),(0,bi.jsx)(`code`,{children:e.live||(0,bi.jsx)(`i`,{children:`absent`})})]})]},t)),(0,bi.jsx)(`p`,{className:`m-0 t-caption`,children:b(`A difference here is almost always a page cache serving an older head. If it survives a cache purge, something else is overwriting the tag.`,`ai-rank-suite`)})]}),c.duplicates.length===0&&c.drift.length===0&&(0,bi.jsx)(M,{tone:`good`,children:b(`The head on the page matches what this plugin writes, and nothing is duplicated.`,`ai-rank-suite`)})]})]})]})}function vi(e){return e===`title`||e===`name:description`?`optimize`:e.startsWith(`property:og`)||e.startsWith(`name:twitter`)?`preview`:e===`name:robots`||e.startsWith(`rel:canonical`)?`advanced`:e===`application/ld+json`?`schema`:null}var yi,bi,xi,Si=o((()=>{yi=u(f(),1),C(),D(),at(),Ft(),pe(),bi=O(),xi={ok:{tone:`good`,label:`ok`},missing:{tone:`serious`,label:`missing`},empty:{tone:`neutral`,label:b(`not set`,`ai-rank-suite`)},long:{tone:`warning`,label:b(`too long`,`ai-rank-suite`)},off:{tone:`neutral`,label:b(`switched off`,`ai-rank-suite`)},delegated:{tone:`warning`,label:b(`other plugin`,`ai-rank-suite`)}}}));function Ci({postId:e,onGoTo:t}){let[n,r]=(0,wi.useState)(null),[i,a]=(0,wi.useState)(null),[o,s]=(0,wi.useState)(!1),[c,l]=(0,wi.useState)(!1),u=()=>{s(!0),E.get(`/content/${e}/report`).then(r).catch(e=>a(e.message)).finally(()=>s(!1))};if((0,wi.useEffect)(()=>{r(null),u()},[e]),i)return(0,Ti.jsx)(M,{tone:`serious`,children:i});if(!n)return(0,Ti.jsx)(`div`,{className:`t-caption p-2`,children:b(`Checking every requirement…`,`ai-rank-suite`)});let d=n.score>=85?`green`:n.score>=60?`amber`:`red`,f=c?n.items.filter(e=>!e.pass):n.items;return(0,Ti.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Ti.jsxs)(`div`,{className:`ars-report-head is-${d}`,children:[(0,Ti.jsxs)(`div`,{className:`ars-report-score`,children:[(0,Ti.jsx)(`b`,{className:`tabular-nums`,children:n.score}),(0,Ti.jsx)(`span`,{children:`%`})]}),(0,Ti.jsxs)(`div`,{className:`min-w-0`,children:[(0,Ti.jsx)(`div`,{className:`font-semibold text-[13.5px]`,children:n.failed===0?b(`Everything checked out`,`ai-rank-suite`):S(b(`%1$s of %2$s requirements not met`,`ai-rank-suite`),n.failed,n.passed+n.failed)}),(0,Ti.jsx)(`p`,{className:`m-0 mt-0.5 text-[12px]`,style:{color:`var(--ars-ink-2)`},children:S(b(`%1$s words · about %2$s min read · %3$s headings · %4$s images · %5$s internal and %6$s external links`,`ai-rank-suite`),n.words.toLocaleString(),n.reading,n.headings,n.images,n.internal,n.external)}),(0,Ti.jsx)(`div`,{className:`ars-report-bar mt-2`,children:(0,Ti.jsx)(`span`,{style:{width:`${n.score}%`}})}),(0,Ti.jsx)(`p`,{className:`m-0 mt-1 t-caption`,children:S(b(`Weighted by consequence — %1$s of %2$s points. A missing description counts for more than a missing card type, because it costs more.`,`ai-rank-suite`),n.earned,n.possible)})]}),(0,Ti.jsxs)(`div`,{className:`flex flex-col items-end gap-2 shrink-0`,children:[(0,Ti.jsxs)(A,{variant:`ghost`,busy:o,onClick:u,children:[(0,Ti.jsx)(yt,{size:13}),b(`Re-check`,`ai-rank-suite`)]}),(0,Ti.jsxs)(`label`,{className:`flex items-center gap-1.5 text-[12px] cursor-pointer`,style:{color:`var(--ars-ink-2)`},children:[(0,Ti.jsx)(`input`,{type:`checkbox`,checked:c,onChange:e=>l(e.target.checked)}),b(`Only what failed`,`ai-rank-suite`)]})]})]}),n.sections.map(e=>{let n=f.filter(t=>t.section===e.id);if(n.length===0)return null;let r=n.filter(e=>!e.pass).length;return(0,Ti.jsxs)(`div`,{className:`ars-report-group`,children:[(0,Ti.jsxs)(`div`,{className:`ars-report-group-head`,children:[(0,Ti.jsxs)(`div`,{children:[(0,Ti.jsx)(`div`,{className:`font-semibold text-[12.5px]`,children:e.label}),(0,Ti.jsx)(`div`,{className:`t-caption`,children:e.note})]}),(0,Ti.jsxs)(`span`,{className:`flex items-center gap-3`,children:[(0,Ti.jsxs)(`span`,{className:`ars-report-legend`,children:[(0,Ti.jsx)(`span`,{className:`ars-report-weight`,"aria-hidden":!0,children:`●●●`}),b(`= weight in the score`,`ai-rank-suite`)]}),(0,Ti.jsxs)(`span`,{className:`ars-report-tally${r>0?` is-bad`:``}`,children:[n.length-r,`/`,n.length]})]})]}),(0,Ti.jsx)(`div`,{children:n.map(e=>(0,Ti.jsxs)(`div`,{className:`ars-report-row${e.pass?` is-pass`:``}`,children:[(0,Ti.jsx)(`span`,{className:`ars-report-mark`,"aria-hidden":!0,children:e.pass?`✓`:`✕`}),(0,Ti.jsxs)(`div`,{className:`min-w-0`,children:[(0,Ti.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Ti.jsx)(`span`,{className:`font-medium text-[12.5px]`,children:e.label}),(0,Ti.jsx)(`span`,{className:`ars-report-weight`,title:b(`How much this counts toward the score`,`ai-rank-suite`),children:`●`.repeat(Math.min(5,e.weight))})]}),(0,Ti.jsx)(`p`,{className:`m-0 mt-0.5 text-[12px]`,style:{color:`var(--ars-ink-2)`},children:e.detail}),e.value&&(0,Ti.jsx)(`code`,{className:`ars-report-value`,title:e.value,children:e.value})]}),!e.pass&&t&&Ei[e.id]&&(0,Ti.jsx)(`button`,{type:`button`,className:`ars-linkbtn ars-report-fix`,onClick:()=>t(Ei[e.id]),children:b(`Fix →`,`ai-rank-suite`)})]},e.id))})]},e.id)}),c&&n.failed===0&&(0,Ti.jsx)(M,{tone:`good`,children:b(`Nothing failed. Untick the filter to see everything that passed.`,`ai-rank-suite`)})]})}var wi,Ti,Ei,Di=o((()=>{wi=u(f(),1),C(),D(),at(),Ft(),Ti=O(),Ei={title:`optimize`,description:`optimize`,keyword:`keywords`,keyword_title:`optimize`,keyword_opening:`checks`,canonical:`advanced`,indexable:`advanced`,snippet_limit:`advanced`,schema:`schema`,faq:`faq`,og_image:`preview`,og_title:`preview`,tw_card:`preview`,llms:`advanced`,h1:`checks`,structure:`checks`,opening:`checks`,length:`checks`,alt:`checks`}}));function Oi({from:e,to:t}){let n=String(e||``).split(/\s+/).filter(Boolean),r=String(t||``).split(/\s+/).filter(Boolean),i=n.length,a=r.length,o=Array.from({length:i+1},()=>Array(a+1).fill(0));for(let e=i-1;e>=0;e--)for(let t=a-1;t>=0;t--)o[e][t]=n[e]===r[t]?o[e+1][t+1]+1:Math.max(o[e+1][t],o[e][t+1]);let s=[],c=0,l=0;for(;c<i&&l<a;)n[c]===r[l]?(s.push([`=`,n[c]]),c++,l++):o[c+1][l]>=o[c][l+1]?(s.push([`-`,n[c]]),c++):(s.push([`+`,r[l]]),l++);for(;c<i;)s.push([`-`,n[c++]]);for(;l<a;)s.push([`+`,r[l++]]);return n.length===0?(0,ji.jsx)(`span`,{className:`ars-diff-add`,children:r.join(` `)}):(0,ji.jsx)(`span`,{children:s.map(([e,t],n)=>(0,ji.jsxs)(`span`,{className:e===`+`?`ars-diff-add`:e===`-`?`ars-diff-del`:``,children:[t,` `]},n))})}function ki({postId:e,onApplied:t}){let[n,r]=(0,Ai.useState)(null),[i,a]=(0,Ai.useState)(``),[o,s]=(0,Ai.useState)(``),[c,l]=(0,Ai.useState)(``),[u,d]=(0,Ai.useState)(null),[f,p]=(0,Ai.useState)(!1),m=()=>E.get(`/ai/suggest/${e}`).then(e=>{r(e),e.pending&&(a(e.pending.proposal.title||``),s(e.pending.proposal.description||``))}).catch(e=>d(e.message));(0,Ai.useEffect)(()=>{m()},[e]);let h=async(e,t)=>{l(e),d(null);try{await t()}catch(e){d(e.message)}finally{l(``)}},g=(t=!1)=>h(`propose`,async()=>{let n=await E.post(`/ai/suggest/${e}`,{force:t});r({pending:n,stale:!1,history:n.history||[],current:n.current}),a(n.proposal.title||``),s(n.proposal.description||``)}),_=()=>h(`apply`,async()=>{let n=await E.post(`/ai/suggest/${e}/apply`,{title:i,description:o});r(e=>({...e||{},current:{title:n.title||``,description:n.description||``}})),r(e=>({pending:null,stale:!1,history:n.history||[],current:n.current||e?.current})),t&&t({seo_title:n.title,seo_desc:n.description})}),v=()=>h(`reject`,async()=>{let t=await E.post(`/ai/suggest/${e}/reject`,{});r(e=>({pending:null,stale:!1,history:t.history||[],current:t.current||e?.current}))}),y=()=>h(`undo`,async()=>{let n=await E.post(`/ai/suggest/${e}/undo`,{});r(e=>({...e,history:n.history||[]})),t&&t({seo_title:n.restored.title||``,seo_desc:n.restored.description||``})});if(!n)return null;let x=n.pending,S=(n.history||[]).some(e=>e.action===`applied`&&!e.undone),C=x&&(i!==x.proposal.title||o!==x.proposal.description),w=x?.original??{title:``,description:``,fallback_title:``},ee=n?.current?{...w,title:n.current.title||``,description:n.current.description||``}:w,T=!!(n?.current&&x?.original&&(n.current.title!==(x.original.title||``)||n.current.description!==(x.original.description||``))),te=x?.model??{},ne=x?x.proposal.confidence:0,re=ne>=75?`good`:ne>=50?`warning`:`serious`;return(0,ji.jsxs)(`div`,{className:`ars-review`,children:[(0,ji.jsxs)(`div`,{className:`ars-review-head`,children:[(0,ji.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,ji.jsx)(bt,{size:14}),(0,ji.jsx)(`span`,{className:`font-semibold text-[13px]`,children:b(`AI proposal`,`ai-rank-suite`)}),x&&(0,ji.jsxs)(ji.Fragment,{children:[(0,ji.jsxs)(j,{tone:re,children:[ne,`% `,b(`confident`,`ai-rank-suite`)]}),x.cached&&(0,ji.jsx)(j,{tone:`neutral`,children:b(`unchanged page — no new call`,`ai-rank-suite`)}),n.stale&&(0,ji.jsx)(j,{tone:`warning`,children:b(`page changed since`,`ai-rank-suite`)}),T&&(0,ji.jsx)(j,{tone:`warning`,title:b(`The title or description was changed after this proposal was written; the proposal compares against what the page carries now.`,`ai-rank-suite`),children:b(`metadata changed since`,`ai-rank-suite`)})]})]}),(0,ji.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[S&&(0,ji.jsx)(A,{variant:`ghost`,busy:c===`undo`,onClick:y,children:b(`Undo last apply`,`ai-rank-suite`)}),(0,ji.jsx)(A,{variant:x?`ghost`:`primary`,busy:c===`propose`,onClick:()=>g(!!x),children:b(x?`Propose again`:`Propose title & description`,`ai-rank-suite`)})]})]}),u&&(0,ji.jsx)(M,{tone:`serious`,children:u}),x&&(0,ji.jsxs)(`div`,{className:`grid gap-3`,children:[(0,ji.jsxs)(`div`,{className:`ars-review-field`,children:[(0,ji.jsx)(`div`,{className:`t-overline`,children:b(`SEO title`,`ai-rank-suite`)}),(0,ji.jsxs)(`div`,{className:`ars-review-orig`,children:[(0,ji.jsxs)(`span`,{className:`t-caption`,children:[b(`Now`,`ai-rank-suite`),`:`]}),` `,ee.title||(0,ji.jsxs)(`em`,{style:{color:`var(--ars-ink-3)`},children:[b(`empty — falls back to`,`ai-rank-suite`),` “`,ee.fallback_title,`”`]})]}),(0,ji.jsxs)(`div`,{className:`ars-review-diff`,children:[(0,ji.jsxs)(`span`,{className:`t-caption`,children:[b(`Change`,`ai-rank-suite`),`:`]}),` `,(0,ji.jsx)(Oi,{from:ee.title||ee.fallback_title,to:i})]}),(0,ji.jsx)(`input`,{type:`text`,value:i,onChange:e=>a(e.target.value)}),(0,ji.jsx)(Ie,{value:i,kind:`title`}),x.proposal.title_reason&&(0,ji.jsx)(`div`,{className:`t-caption`,children:x.proposal.title_reason})]}),(0,ji.jsxs)(`div`,{className:`ars-review-field`,children:[(0,ji.jsx)(`div`,{className:`t-overline`,children:b(`Meta description`,`ai-rank-suite`)}),(0,ji.jsxs)(`div`,{className:`ars-review-orig`,children:[(0,ji.jsxs)(`span`,{className:`t-caption`,children:[b(`Now`,`ai-rank-suite`),`:`]}),` `,ee.description||(0,ji.jsx)(`em`,{style:{color:`var(--ars-ink-3)`},children:b(`empty`,`ai-rank-suite`)})]}),(0,ji.jsxs)(`div`,{className:`ars-review-diff`,children:[(0,ji.jsxs)(`span`,{className:`t-caption`,children:[b(`Change`,`ai-rank-suite`),`:`]}),` `,(0,ji.jsx)(Oi,{from:ee.description,to:o})]}),(0,ji.jsx)(`textarea`,{rows:3,value:o,onChange:e=>s(e.target.value)}),(0,ji.jsx)(Ie,{value:o,kind:`description`}),x.proposal.description_reason&&(0,ji.jsx)(`div`,{className:`t-caption`,children:x.proposal.description_reason})]}),(x.proposal.risks||[]).length>0&&(0,ji.jsxs)(M,{tone:`warning`,children:[(0,ji.jsx)(`strong`,{children:b(`Check before applying:`,`ai-rank-suite`)}),` `,(x.proposal.risks||[]).join(` · `)]}),(0,ji.jsxs)(`div`,{className:`ars-review-meta`,children:[(te.provider||te.model)&&(0,ji.jsx)(`span`,{children:[te.provider,te.model].filter(Boolean).join(` · `)}),te.prompt&&(0,ji.jsx)(`span`,{children:te.prompt}),typeof te.tokens==`number`&&(0,ji.jsxs)(`span`,{children:[te.tokens.toLocaleString(),` `,b(`tokens`,`ai-rank-suite`),te.cost?` · ${te.cost}`:``,te.latency_ms?` · ${te.latency_ms} ms`:``]}),(0,ji.jsxs)(`span`,{children:[b(`language`,`ai-rank-suite`),` `,x.proposal.language,x.proposal.chars_sent?` · ${x.proposal.chars_sent.toLocaleString()} ${b(`chars sent`,`ai-rank-suite`)}`:``,x.proposal.redacted&&Object.keys(x.proposal.redacted).length>0?` · ${b(`redacted`,`ai-rank-suite`)}: ${Object.entries(x.proposal.redacted).map(([e,t])=>`${t} ${e}`).join(`, `)}`:``]})]}),(0,ji.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,ji.jsx)(A,{busy:c===`apply`,onClick:_,children:b(C?`Apply my edited version`:`Apply proposal`,`ai-rank-suite`)}),(0,ji.jsx)(A,{variant:`ghost`,busy:c===`reject`,onClick:v,children:b(`Reject`,`ai-rank-suite`)})]})]}),(n.history||[]).length>0&&(0,ji.jsxs)(`div`,{className:`mt-1`,children:[(0,ji.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>p(e=>!e),children:f?b(`Hide history`,`ai-rank-suite`):`${b(`History`,`ai-rank-suite`)} (${n.history.length})`}),f&&(0,ji.jsx)(`div`,{className:`grid gap-1 mt-2`,children:[...n.history].reverse().map((e,t)=>(0,ji.jsxs)(`div`,{className:`text-[12px]`,style:{color:`var(--ars-ink-2)`},children:[new Date(e.time*1e3).toLocaleString(),` · `,(0,ji.jsx)(`strong`,{children:e.action}),e.edited?` (${b(`edited`,`ai-rank-suite`)})`:``,e.undone?` · ${b(`undone`,`ai-rank-suite`)}`:``,e.model?.model?` · ${e.model.model}`:``,e.model?.cost?` · ${e.model.cost}`:``,e.after?.title?` — “${e.after.title}”`:``]},t))})]})]})}var Ai,ji,Mi=o((()=>{Ai=u(f(),1),C(),D(),at(),Ft(),ji=O()}));function Ni(){let[e,t]=(0,Bi.useState)(``),[n,r]=(0,Bi.useState)(null);return{busy:e,error:n,run:async(e,n)=>{t(e),r(null);try{return await n()}catch(e){return r(e.message),null}finally{t(``)}},setError:r}}function Pi({postId:e,onServerEdit:t}){let{busy:n,error:r,run:i}=Ni(),[a,o]=(0,Bi.useState)(null),[s,c]=(0,Bi.useState)(``),[l,u]=(0,Bi.useState)({}),[d,f]=(0,Bi.useState)({}),[p,m]=(0,Bi.useState)(!1),h=()=>i(`propose`,async()=>{let t=await E.post(`/ai/rewrite/${e}`,{focus:s});o(t),u(Object.fromEntries((t.edits||[]).map((e,t)=>[t,e.rewritten]))),f({})}),g=n=>i(`apply${n}`,async()=>{let r=a.edits[n];await E.post(`/ai/rewrite/${e}/apply`,{original:r.original,rewritten:l[n]}),f(e=>({...e,[n]:!0})),m(!0),t&&t()});return(0,Vi.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Vi.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`The AI picks the passages where a change most improves quotability or clarity and rewrites only those — no new facts, same language and register. Apply the ones you agree with; each apply is undoable.`,`ai-rank-suite`)}),(0,Vi.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Vi.jsx)(`input`,{type:`text`,placeholder:b(`Optional focus, e.g. "answer the question in the first line"`,`ai-rank-suite`),value:s,onChange:e=>c(e.target.value),style:{flex:`1 1 260px`}}),(0,Vi.jsxs)(A,{onClick:h,busy:n===`propose`,children:[(0,Vi.jsx)(bt,{size:13}),` `,b(a?`Propose again`:`Propose rewrites`,`ai-rank-suite`)]}),p&&(0,Vi.jsx)(A,{variant:`ghost`,onClick:()=>i(`undo`,async()=>{await E.post(`/ai/rewrite/${e}/undo`,{}),m(!1),f({}),t&&t()}),busy:n===`undo`,children:b(`Undo last apply`,`ai-rank-suite`)})]}),r&&(0,Vi.jsx)(M,{tone:`serious`,children:r}),a&&a.edits.length===0&&(0,Vi.jsx)(M,{tone:`good`,children:b(`The AI found nothing worth changing.`,`ai-rank-suite`)}),a&&a.edits.map((e,t)=>(0,Vi.jsxs)(`div`,{className:`ars-review-field${d[t]?` is-applied`:``}`,children:[(0,Vi.jsxs)(`div`,{className:`flex items-center justify-between gap-2 flex-wrap`,children:[(0,Vi.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Vi.jsx)(j,{tone:`brand`,children:e.kind.replace(`_`,` `)}),typeof e.confidence==`number`&&(0,Vi.jsxs)(j,{tone:e.confidence>=70?`good`:`warning`,children:[e.confidence,`%`]}),!e.locatable&&(0,Vi.jsx)(j,{tone:`warning`,children:b(`passage not found verbatim — copy by hand`,`ai-rank-suite`)}),d[t]&&(0,Vi.jsxs)(j,{tone:`good`,children:[`✓ `,b(`applied`,`ai-rank-suite`)]})]}),e.locatable&&!d[t]&&(0,Vi.jsx)(A,{onClick:()=>g(t),busy:n===`apply${t}`,children:b(`Apply this`,`ai-rank-suite`)})]}),(0,Vi.jsxs)(`div`,{className:`ars-review-orig`,children:[(0,Vi.jsxs)(`span`,{className:`t-caption`,children:[b(`Now`,`ai-rank-suite`),`:`]}),` `,e.original]}),(0,Vi.jsx)(`textarea`,{rows:Math.min(8,Math.max(2,Math.ceil((l[t]||``).length/90))),value:l[t]||``,onChange:e=>u({...l,[t]:e.target.value}),disabled:!!d[t]}),e.reason&&(0,Vi.jsx)(`div`,{className:`t-caption`,children:e.reason})]},t)),a&&(0,Vi.jsxs)(`div`,{className:`ars-review-meta`,children:[(0,Vi.jsx)(Hi,{r:a.receipt}),a.chars_sent?(0,Vi.jsxs)(`span`,{children:[a.chars_sent.toLocaleString(),` `,b(`chars sent`,`ai-rank-suite`)]}):null,a.redacted&&Object.keys(a.redacted).length>0?(0,Vi.jsxs)(`span`,{children:[b(`redacted`,`ai-rank-suite`),`: `,Object.entries(a.redacted).map(([e,t])=>`${t} ${e}`).join(`, `)]}):null]})]})}function Fi({postId:e,onApply:t}){let{busy:n,error:r,run:i}=Ni(),[a,o]=(0,Bi.useState)(null),[s,c]=(0,Bi.useState)({});return(0,Vi.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Vi.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`The AI proposes the best-fitting schema type this plugin supports and fills only fields whose values appear on the page — never a price, rating or date it did not read. You review, then hand it to the schema editor.`,`ai-rank-suite`)}),(0,Vi.jsx)(`div`,{children:(0,Vi.jsxs)(A,{onClick:()=>i(`propose`,async()=>{let t=await E.post(`/ai/schema/${e}`,{});o(t),c(t.fields||{})}),busy:n===`propose`,children:[(0,Vi.jsx)(bt,{size:13}),` `,b(a?`Propose again`:`Propose schema`,`ai-rank-suite`)]})}),r&&(0,Vi.jsx)(M,{tone:`serious`,children:r}),a&&(0,Vi.jsxs)(`div`,{className:`ars-review-field`,children:[(0,Vi.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Vi.jsx)(`span`,{className:`font-semibold text-[13.5px]`,children:a.type}),(0,Vi.jsxs)(j,{tone:a.confidence>=70?`good`:`warning`,children:[a.confidence,`% `,b(`confident`,`ai-rank-suite`)]})]}),a.why&&(0,Vi.jsx)(`div`,{className:`t-caption`,children:a.why}),Object.keys(s).length===0?(0,Vi.jsx)(M,{tone:`warning`,children:b(`The page did not contain enough facts to fill any field. Add the details to the page, or fill the schema by hand.`,`ai-rank-suite`)}):(0,Vi.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:Object.entries(s).map(([e,t])=>(0,Vi.jsxs)(`label`,{className:`grid gap-1 text-[12px]`,children:[(0,Vi.jsx)(`span`,{className:`t-caption`,children:a.labels?.[e]||e}),(0,Vi.jsx)(`input`,{type:`text`,value:t,onChange:t=>c({...s,[e]:t.target.value})})]},e))}),(0,Vi.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Vi.jsx)(A,{onClick:()=>t&&t({type:a.type,data:s}),disabled:Object.keys(s).length===0,children:b(`Add to this page’s schema`,`ai-rank-suite`)}),(0,Vi.jsx)(Hi,{r:a.receipt})]})]})]})}function Ii({postId:e,onServerEdit:t}){let{busy:n,error:r,run:i}=Ni(),[a,o]=(0,Bi.useState)(null),[s,c]=(0,Bi.useState)(null),[l,u]=(0,Bi.useState)({}),[d,f]=(0,Bi.useState)(0);return(0,Bi.useEffect)(()=>{E.get(`/ai/alt/${e}`).then(e=>o(e.images||[])).catch(()=>o([]))},[e]),a===null?null:(0,Vi.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Vi.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`One plain sentence per image that has none, from the page context and file name — written into the media library, so every page that uses the image gets it.`,`ai-rank-suite`)}),a.length===0&&!s?(0,Vi.jsx)(M,{tone:`good`,children:d?`${d} ${b(`alt texts written.`,`ai-rank-suite`)}`:b(`Every media-library image on this page already has alt text.`,`ai-rank-suite`)}):(0,Vi.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Vi.jsxs)(j,{tone:`warning`,children:[a.length,` `,b(`images without alt text`,`ai-rank-suite`)]}),(0,Vi.jsxs)(A,{onClick:()=>i(`propose`,async()=>{let t=await E.post(`/ai/alt/${e}`,{});c(t),u(Object.fromEntries((t.alts||[]).map(e=>[e.id,e.alt])))}),busy:n===`propose`,children:[(0,Vi.jsx)(bt,{size:13}),` `,b(`Write alt text`,`ai-rank-suite`)]})]}),r&&(0,Vi.jsx)(M,{tone:`serious`,children:r}),s&&s.alts.length>0&&(0,Vi.jsxs)(`div`,{className:`grid gap-2`,children:[s.alts.map(e=>(0,Vi.jsxs)(`div`,{className:`ars-alt-row`,children:[(0,Vi.jsx)(`img`,{src:e.url,alt:``}),(0,Vi.jsxs)(`div`,{className:`grid gap-1 min-w-0`,children:[(0,Vi.jsx)(`span`,{className:`t-caption truncate`,children:e.file}),(0,Vi.jsx)(`input`,{type:`text`,value:l[e.id]||``,onChange:t=>u({...l,[e.id]:t.target.value}),maxLength:160}),(0,Vi.jsxs)(`span`,{className:`t-caption`,children:[(l[e.id]||``).length,`/125 `,e.confidence<60?`· ${b(`low confidence — check`,`ai-rank-suite`)}`:``]})]})]},e.id)),(0,Vi.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Vi.jsx)(A,{onClick:()=>i(`apply`,async()=>{let e=await E.post(`/ai/alt/apply`,{alts:Object.entries(l).map(([e,t])=>({id:Number(e),alt:t}))});t&&t(),f(e.applied||0),o([])}),busy:n===`apply`,children:b(`Save all to media library`,`ai-rank-suite`)}),(0,Vi.jsx)(Hi,{r:s.receipt})]})]})]})}function Li({postId:e,onServerEdit:t}){let{busy:n,error:r,run:i}=Ni(),[a,o]=(0,Bi.useState)(null),[s,c]=(0,Bi.useState)({}),l=()=>i(`propose`,async()=>{o(await E.post(`/ai/links/${e}`,{})),c({})}),u=n=>i(`apply${n}`,async()=>{let r=a.links[n];await E.post(`/ai/links/${e}/apply`,{anchor:r.anchor,target_id:r.target_id}),t&&t(),c(e=>({...e,[n]:!0}))});return(0,Vi.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Vi.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`The link module finds candidates locally; the AI reads this page and picks which of them a reader would actually want, with natural anchor text from a sentence already on the page. Same language only.`,`ai-rank-suite`)}),(0,Vi.jsx)(`div`,{children:(0,Vi.jsxs)(A,{onClick:l,busy:n===`propose`,children:[(0,Vi.jsx)(bt,{size:13}),` `,b(a?`Propose again`:`Propose internal links`,`ai-rank-suite`)]})}),r&&(0,Vi.jsx)(M,{tone:`serious`,children:r}),a&&a.links.length===0&&(0,Vi.jsx)(M,{tone:`warning`,children:b(`None of the candidates fit this page well enough.`,`ai-rank-suite`)}),a&&a.links.map((e,t)=>(0,Vi.jsxs)(`div`,{className:`ars-review-field`,children:[(0,Vi.jsxs)(`div`,{className:`flex items-center justify-between gap-2 flex-wrap`,children:[(0,Vi.jsxs)(`span`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Vi.jsxs)(`span`,{className:`font-semibold text-[13px]`,children:[`→ `,e.title]}),typeof e.confidence==`number`&&(0,Vi.jsxs)(j,{tone:e.confidence>=70?`good`:`warning`,children:[e.confidence,`%`]}),!e.locatable&&(0,Vi.jsx)(j,{tone:`warning`,children:b(`anchor not found verbatim`,`ai-rank-suite`)}),s[t]&&(0,Vi.jsxs)(j,{tone:`good`,children:[`✓ `,b(`linked`,`ai-rank-suite`)]})]}),e.locatable&&!s[t]&&(0,Vi.jsx)(A,{onClick:()=>u(t),busy:n===`apply${t}`,children:b(`Insert link`,`ai-rank-suite`)})]}),(0,Vi.jsxs)(`div`,{className:`ars-review-orig`,children:[b(`Anchor`,`ai-rank-suite`),`: `,(0,Vi.jsx)(`strong`,{children:e.anchor}),` — `,(0,Vi.jsx)(`span`,{className:`t-caption`,children:e.passage})]}),e.reason&&(0,Vi.jsx)(`div`,{className:`t-caption`,children:e.reason})]},t)),a&&(0,Vi.jsx)(Hi,{r:a.receipt})]})}function Ri({postId:e,onUse:t}){let{busy:n,error:r,run:i}=Ni(),[a,o]=(0,Bi.useState)(`de`),[s,c]=(0,Bi.useState)(null);return(0,Vi.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Vi.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`Translate this page’s SEO title and description for its counterpart in another language, keeping brand words and length limits. Copy the result into the translated page.`,`ai-rank-suite`)}),(0,Vi.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Vi.jsx)(`select`,{value:a,onChange:e=>o(e.target.value),children:[`en`,`de`,`ar`,`fr`,`es`,`it`,`nl`,`tr`,`ru`,`zh`,`ja`,`pt`].map(e=>(0,Vi.jsx)(`option`,{value:e,children:e},e))}),(0,Vi.jsxs)(A,{onClick:()=>i(`propose`,async()=>c(await E.post(`/ai/translate/${e}`,{to:a}))),busy:n===`propose`,children:[(0,Vi.jsx)(bt,{size:13}),` `,b(`Translate metadata`,`ai-rank-suite`)]})]}),r&&(0,Vi.jsx)(M,{tone:`serious`,children:r}),s&&(0,Vi.jsxs)(`div`,{className:`ars-review-field`,dir:[`ar`,`he`,`fa`,`ur`].includes(s.to)?`rtl`:`ltr`,children:[(0,Vi.jsxs)(`div`,{className:`t-overline`,children:[s.from,` → `,s.to]}),(0,Vi.jsx)(`div`,{className:`font-semibold text-[13.5px]`,children:s.title}),(0,Vi.jsx)(`div`,{className:`text-[12.5px]`,children:s.description}),(0,Vi.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,dir:`ltr`,children:[(0,Vi.jsx)(A,{variant:`ghost`,onClick:()=>navigator.clipboard&&navigator.clipboard.writeText(`${s.title}\n${s.description}`),children:b(`Copy`,`ai-rank-suite`)}),t&&(0,Vi.jsx)(A,{variant:`ghost`,onClick:()=>t(s),children:b(`Use on this page`,`ai-rank-suite`)}),(0,Vi.jsx)(Hi,{r:s.receipt})]})]})]})}function zi({postId:e,onSchema:t,onTranslate:n,onServerEdit:r}){let[i,a]=(0,Bi.useState)(`rewrite`);return(0,Vi.jsxs)(`div`,{className:`ars-review`,children:[(0,Vi.jsxs)(`div`,{className:`ars-review-head`,children:[(0,Vi.jsxs)(`span`,{className:`flex items-center gap-2 font-semibold text-[13px]`,children:[(0,Vi.jsx)(bt,{size:14}),` `,b(`AI tools for this page`,`ai-rank-suite`)]}),(0,Vi.jsx)(He,{value:i,onChange:a,options:[{id:`rewrite`,label:b(`Rewrite`,`ai-rank-suite`)},{id:`schema`,label:b(`Schema`,`ai-rank-suite`)},{id:`alt`,label:b(`Alt text`,`ai-rank-suite`)},{id:`links`,label:b(`Links`,`ai-rank-suite`)},{id:`translate`,label:b(`Translate`,`ai-rank-suite`)}]})]}),i===`rewrite`&&(0,Vi.jsx)(Pi,{postId:e,onServerEdit:r}),i===`schema`&&(0,Vi.jsx)(Fi,{postId:e,onApply:t}),i===`alt`&&(0,Vi.jsx)(Ii,{postId:e,onServerEdit:r}),i===`links`&&(0,Vi.jsx)(Li,{postId:e,onServerEdit:r}),i===`translate`&&(0,Vi.jsx)(Ri,{postId:e,onUse:n})]})}var Bi,Vi,Hi,Ui=o((()=>{Bi=u(f(),1),C(),D(),at(),Ft(),Vi=O(),Hi=({r:e})=>e&&e.model?(0,Vi.jsxs)(`span`,{className:`t-caption`,children:[e.provider,` · `,e.model,` · `,(e.prompt_tokens||0)+(e.completion_tokens||0),` `,b(`tokens`,`ai-rank-suite`),` · `,e.cost,` · `,e.latency_ms,` ms`]}):null})),Wi=c({default:()=>Yi});function Gi({id:e,onClose:t,onChanged:n,onNavigate:r,position:i}){let[a,o]=(0,Qi.useState)(null),[s,c]=(0,Qi.useState)(!1),[l,u]=(0,Qi.useState)(null),[d,f]=(0,Qi.useState)(null),[p,m]=(0,Qi.useState)(!1),[h,g]=(0,Qi.useState)(null),[_,v]=(0,Qi.useState)([]),[y,C]=(0,Qi.useState)(!1),[w,ee]=(0,Qi.useState)(null),[T,te]=(0,Qi.useState)(!1),[ne,re]=(0,Qi.useState)(`optimize`),[ie,D]=(0,Qi.useState)(!1),[ae,oe]=(0,Qi.useState)(null),[se,ce]=(0,Qi.useState)(null),le=(0,Qi.useRef)(null);(0,Qi.useEffect)(()=>{o(null),v([]),ee(null),oe(null),re(`optimize`),E.get(`/content/${e}`).then(e=>{o(e),ce(na(e))}).catch(e=>g(e.message)),E.get(`/schema/post/${e}`).then(ee).catch(()=>{}),E.get(`/content/${e}/head`).then(oe).catch(()=>{}),E.get(`/ai/faq/${e}`).then(e=>v(e.items||[])).catch(()=>{})},[e]);let ue=se!==null&&a!==null&&na(a)!==se,de=()=>!ue||window.confirm(b(`You have unsaved changes on this page. Leave without saving?`,`ai-rank-suite`)),O=()=>{de()&&t()},fe=e=>{if(!r||!i)return;let t=i.index+e;t<0||t>=i.total||de()&&r(t)};(0,Qi.useEffect)(()=>{let e=e=>{if(e.key===`Escape`){O();return}e.altKey&&(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),fe(e.key===`ArrowDown`?1:-1))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[ue,i?.index,i?.total]),(0,Qi.useEffect)(()=>{le.current&&(le.current.scrollTop=0)},[ne]);let pe=async()=>{u(`schema`),g(null);try{let t=await E.put(`/schema/post/${e}`,{items:w.items});ee(t),te(!0),setTimeout(()=>te(!1),2200)}catch(e){g(e.message)}finally{u(null)}},k=async()=>{u(`title`),g(null);try{let t=((await E.post(`/ai/titles/${e}`)).titles||[])[0];t&&o(e=>({...e,seo_title:t}))}catch(e){g(e.message)}finally{u(null)}},me=async()=>{u(`desc`),g(null);try{let t=await E.post(`/ai/describe/${e}`);o(e=>({...e,seo_desc:t.meta_description}))}catch(e){g(e.message)}finally{u(null)}},he=async t=>{let n=[`title_number`,`title_sentiment`,`title_power`,`kw_title_start`];u(t.id),g(null);try{if(n.includes(t.id)){let t=((await E.post(`/ai/titles/${e}`)).titles||[])[0];t&&(o(e=>({...e,seo_title:t})),re(`optimize`));return}let r=await E.post(`/ai/improve/${e}`);f({check:t.id,suggestions:r.suggestions||r.improvements||[]})}catch(e){g(e.message)}finally{u(null)}},ge=async()=>{u(`faq`),g(null);try{let t=await E.post(`/ai/faq/${e}`);v(t.items||[])}catch(e){g(e.message)}finally{u(null)}},_e=async()=>{u(`faq-save`);try{await E.put(`/ai/faq/${e}`,{items:_}),C(!0),setTimeout(()=>C(!1),2200)}catch(e){g(e.message)}finally{u(null)}},ve=async t=>{o(e=>({...e,...t}));try{let t=await E.get(`/content/${e}`);o(t),ce(na(t)),n(t),E.get(`/content/${e}/head`).then(oe).catch(()=>{}),E.get(`/schema/post/${e}`).then(ee).catch(()=>{})}catch{}},ye=async e=>{c(!0),g(null);try{let t=await e();o(t),ce(na(t)),n(t)}catch(e){g(e.message)}finally{c(!1)}},be=()=>ye(async()=>{let t=await E.put(`/content/${e}/meta`,{seo_title:a.seo_title,seo_desc:a.seo_desc,exclude:a.exclude,robots:a.robots||[],keywords:a.keywords||{},canonical:a.canonical||``,slug:a.slug||``,breadcrumb_title:a.breadcrumb_title||``,previews:a.previews||{},social:a.social||{}});return m(!0),setTimeout(()=>m(!1),2200),t});b(`GEO — AI readiness`,`ai-rank-suite`),b(`Focus keyword`,`ai-rank-suite`),b(`SEO — classic search`,`ai-rank-suite`);let xe=a?a.checks.filter(e=>e.status!==`pass`).length:0,Se=ae?ae.issues.filter(e=>e.level!==`info`).length:0,Ce=ne===`schema`||ne===`keywords`,we=[{id:`optimize`,label:b(`Optimize`,`ai-rank-suite`)},{id:`report`,label:b(`Full report`,`ai-rank-suite`)},{id:`preview`,label:b(`Preview`,`ai-rank-suite`)},{id:`head`,label:b(`Head`,`ai-rank-suite`),count:Se,tone:`quiet`},{id:`keywords`,label:b(`Keywords`,`ai-rank-suite`)},{id:`schema`,label:b(`Schema`,`ai-rank-suite`)},{id:`faq`,label:b(`FAQ`,`ai-rank-suite`),count:_.length||0,tone:`quiet`},{id:`advanced`,label:b(`Advanced`,`ai-rank-suite`)},{id:`checks`,label:b(`Checks`,`ai-rank-suite`),count:xe}];return(0,$i.createPortal)((0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`button`,{type:`button`,className:`ars-scrim`,"aria-label":b(`Close panel`,`ai-rank-suite`),onClick:O}),(0,I.jsx)(`aside`,{className:`ars-drawer${ie?` is-max`:Ce?` is-wide`:``}`,role:`dialog`,"aria-modal":`true`,"aria-label":b(`Page analysis`,`ai-rank-suite`),children:a?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`header`,{className:`ars-sheet-head`,children:(0,I.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,I.jsxs)(`div`,{className:`min-w-0`,children:[(0,I.jsx)(`h2`,{className:`m-0 text-[15px] font-bold leading-snug truncate`,title:a.title,children:a.title}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mt-1 text-[11.5px] flex-wrap`,style:{color:`var(--ars-ink-3)`},children:[(0,I.jsx)(`span`,{className:`uppercase font-semibold`,children:a.type}),(0,I.jsx)(`span`,{children:`·`}),(0,I.jsx)(`span`,{children:S(x(`%s word`,`%s words`,Number(a.words)||0,`ai-rank-suite`),a.words)}),(0,I.jsx)(`span`,{children:`·`}),(0,I.jsxs)(`a`,{href:a.url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1`,children:[b(`View`,`ai-rank-suite`),(0,I.jsx)(vt,{size:11})]}),(0,I.jsx)(`a`,{href:a.edit_url,target:`_blank`,rel:`noreferrer`,children:b(`Edit`,`ai-rank-suite`)})]})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[i&&i.total>1&&(0,I.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,I.jsx)(`button`,{type:`button`,onClick:()=>fe(-1),disabled:i.index<=0,"aria-label":b(`Previous page`,`ai-rank-suite`),title:b(`Previous page (Alt+↑)`,`ai-rank-suite`),className:`ars-move`,children:`↑`}),(0,I.jsxs)(`span`,{className:`text-[11px] tabular-nums`,style:{color:`var(--ars-ink-3)`},children:[i.index+1,`/`,i.total]}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>fe(1),disabled:i.index>=i.total-1,"aria-label":b(`Next page`,`ai-rank-suite`),title:b(`Next page (Alt+↓)`,`ai-rank-suite`),className:`ars-move`,children:`↓`})]}),ue&&(0,I.jsx)(`span`,{className:`ars-tag`,style:{background:`var(--ars-c-yellow)`,color:`var(--ars-c-yellow-ink)`},title:b(`You have changes that are not saved yet`,`ai-rank-suite`),children:b(`Unsaved`,`ai-rank-suite`)}),(0,I.jsx)(qi,{label:b(`GEO`,`ai-rank-suite`),value:a.geo_score}),(0,I.jsx)(qi,{label:b(`SEO`,`ai-rank-suite`),value:a.seo_score}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>D(!ie),"aria-label":b(ie?`Restore panel width`:`Expand panel`,`ai-rank-suite`),title:b(ie?`Restore width`:`Expand to full width`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer p-1`,style:{color:`var(--ars-ink-3)`,fontSize:13,lineHeight:1},children:ie?`⤡`:`⤢`}),(0,I.jsx)(`button`,{type:`button`,onClick:O,"aria-label":b(`Close`,`ai-rank-suite`),title:b(`Close (Esc)`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer p-1`,style:{color:`var(--ars-ink-3)`},children:(0,I.jsx)(Mt,{size:17})})]})]})}),(0,I.jsx)(`div`,{className:`ars-sheet-tabs`,role:`tablist`,children:we.map(e=>(0,I.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":ne===e.id,className:`ars-sheet-tab`,onClick:()=>re(e.id),children:[e.label,e.count>0&&(0,I.jsx)(`span`,{className:`ars-pip`,style:e.tone===`quiet`?{background:`var(--ars-surface-3, #eceff3)`,color:`var(--ars-ink-2)`}:void 0,children:e.count})]},e.id))}),(0,I.jsxs)(`div`,{className:`ars-sheet-body`,ref:le,children:[(0,I.jsxs)(`div`,{className:`ars-sheet-main`,children:[ne===`optimize`&&(0,I.jsxs)(`div`,{className:`grid gap-4`,children:[(0,I.jsx)(ki,{postId:e,onApplied:ve}),(0,I.jsx)(zi,{postId:e,onSchema:e=>{ee(t=>({...t||{},items:[...t&&t.items||[],e]})),re(`schema`)},onTranslate:e=>o(t=>({...t,seo_title:e.title,seo_desc:e.description})),onServerEdit:()=>ve({})}),(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between gap-2 mb-1`,children:[(0,I.jsx)(`label`,{className:`block font-medium`,children:b(`SEO title`,`ai-rank-suite`)}),ea&&(0,I.jsxs)(A,{variant:`ghost`,busy:l===`title`,onClick:k,children:[(0,I.jsx)(bt,{size:13}),b(`Write with AI`,`ai-rank-suite`)]})]}),(0,I.jsx)(`input`,{type:`text`,value:a.seo_title,placeholder:a.title,onChange:e=>o({...a,seo_title:e.target.value})}),(0,I.jsx)(`div`,{className:`mt-1.5`,children:(0,I.jsx)(Ie,{value:a.seo_title||a.title,kind:`title`})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between gap-2 mb-1`,children:[(0,I.jsx)(`label`,{className:`block font-medium`,children:b(`Meta description`,`ai-rank-suite`)}),ea&&(0,I.jsxs)(A,{variant:`ghost`,busy:l===`desc`,onClick:me,children:[(0,I.jsx)(bt,{size:13}),b(`Write with AI`,`ai-rank-suite`)]})]}),(0,I.jsx)(`textarea`,{rows:3,value:a.seo_desc,placeholder:a.excerpt||b(`Describe this page in one or two sentences…`,`ai-rank-suite`),onChange:e=>o({...a,seo_desc:e.target.value})}),(0,I.jsx)(`div`,{className:`mt-1.5`,children:(0,I.jsx)(Ie,{value:a.seo_desc||a.excerpt,kind:`description`})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block font-medium mb-1.5`,children:b(`Search engine visibility`,`ai-rank-suite`)}),(0,I.jsx)(`div`,{className:`flex flex-wrap gap-3 text-[12.5px]`,children:[`noindex`,`nofollow`,`noarchive`,`nosnippet`,`noimageindex`].map(e=>(0,I.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,I.jsx)(`input`,{type:`checkbox`,checked:(a.robots||[]).includes(e),onChange:t=>o({...a,robots:t.target.checked?[...a.robots||[],e]:(a.robots||[]).filter(t=>t!==e)})}),e]},e))})]}),(0,I.jsx)(Ee,{checked:!a.exclude,onChange:e=>o({...a,exclude:!e}),label:b(`Include in llms.txt`,`ai-rank-suite`)}),xe>0&&(0,I.jsx)(`button`,{type:`button`,onClick:()=>re(`checks`),className:`text-left px-3 py-2 cursor-pointer`,style:{border:`1px solid var(--ars-border)`,borderRadius:`var(--ars-r-sm)`,background:`var(--ars-c-yellow)`,color:`var(--ars-c-yellow-ink)`,fontSize:12.5,fontWeight:600},children:S(x(`%d check needs attention → open Checks`,`%d checks need attention → open Checks`,xe,`ai-rank-suite`),xe)})]}),ne===`preview`&&(0,I.jsxs)(`div`,{className:`grid gap-3`,children:[(0,I.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`How this page appears in search results and when it is shared.`,`ai-rank-suite`)}),(0,I.jsx)(ni,{serp:a.serp,card:a.social_card})]}),ne===`keywords`&&(0,I.jsxs)(`div`,{className:`grid gap-3`,children:[(0,I.jsxs)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:[`Up to `,a.max_keywords||100,` per group — short-tail, long-tail and the prompts people ask AI.`]}),(0,I.jsx)(Ur,{keywords:a.keywords,coverage:a.coverage,max:a.max_keywords||100,postId:a.id,onChange:e=>o({...a,keywords:e})})]}),ne===`schema`&&(w?(0,I.jsxs)(`div`,{className:`grid gap-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between gap-2 flex-wrap`,children:[(0,I.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Add as many types as the page needs — validated against Google’s requirements.`,`ai-rank-suite`)}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[T&&(0,I.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,I.jsx)(A,{variant:`ghost`,busy:l===`schema`,onClick:pe,children:b(`Save schema`,`ai-rank-suite`)})]})]}),(0,I.jsx)(Pr,{data:w,onChange:e=>ee({...w,items:e})})]}):(0,I.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Loading structured data…`,`ai-rank-suite`)})),ne===`faq`&&(0,I.jsxs)(`div`,{className:`grid gap-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between gap-2 flex-wrap`,children:[(0,I.jsxs)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:[b(`Grounded Q&A — feeds FAQPage schema and the`,`ai-rank-suite`),` `,(0,I.jsx)(`code`,{className:`ars-mono`,children:`[airanksuite_faq]`}),` `,b(`shortcode.`,`ai-rank-suite`)]}),(0,I.jsxs)(A,{variant:`ghost`,busy:l===`faq`,onClick:ge,children:[(0,I.jsx)(bt,{size:13}),b(`Generate`,`ai-rank-suite`)]})]}),_.length===0?(0,I.jsxs)(`div`,{className:`grid gap-2 place-items-start`,children:[(0,I.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`No FAQ items yet. Generate them from this page’s content (requires an AI key), or write one yourself.`,`ai-rank-suite`)}),(0,I.jsx)(A,{variant:`ghost`,onClick:()=>v([{question:``,answer:``}]),children:b(`Add a question`,`ai-rank-suite`)})]}):(0,I.jsxs)(`div`,{className:`grid gap-3`,children:[_.map((e,t)=>(0,I.jsxs)(`div`,{className:`grid gap-1.5 p-3`,style:{background:`var(--ars-surface-2)`,borderRadius:`var(--ars-r-sm)`},children:[(0,I.jsx)(`input`,{type:`text`,value:e.question,onChange:e=>v(_.map((n,r)=>t===r?{...n,question:e.target.value}:n))}),(0,I.jsx)(`textarea`,{rows:2,value:e.answer,onChange:e=>v(_.map((n,r)=>t===r?{...n,answer:e.target.value}:n))}),(0,I.jsx)(`div`,{children:(0,I.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent cursor-pointer text-[12px] p-0`,style:{color:`var(--ars-serious)`},onClick:()=>v(_.filter((e,n)=>n!==t)),children:b(`Remove`,`ai-rank-suite`)})})]},t)),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,I.jsx)(A,{onClick:_e,busy:l===`faq-save`,children:b(`Save FAQ`,`ai-rank-suite`)}),(0,I.jsx)(A,{variant:`ghost`,onClick:()=>v([..._,{question:``,answer:``}]),children:b(`Add a question`,`ai-rank-suite`)}),y&&(0,I.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]})]})]})]}),ne===`report`&&(0,I.jsx)(Ci,{postId:e,onGoTo:re}),ne===`head`&&(0,I.jsx)(_i,{postId:e,initial:ae,onLoad:oe,onGoTo:re}),ne===`advanced`&&(0,I.jsxs)(`div`,{className:`grid gap-3`,children:[(0,I.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Canonical, breadcrumb label, Google preview limits and social overrides.`,`ai-rank-suite`)}),(0,I.jsx)(oi,{item:a,onChange:e=>o({...a,...e})})]}),ne===`optimize`&&(0,I.jsx)(`p`,{className:`m-0 mt-1 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Permalink, canonical URL, breadcrumb title and social overrides are under Advanced.`,`ai-rank-suite`)}),ne===`checks`&&d&&(0,I.jsxs)(`div`,{className:`ars-r-sm p-3 mb-2`,style:{background:`var(--ars-brand-tonal)`,color:`var(--ars-brand-tonal-ink)`},children:[(0,I.jsx)(`div`,{className:`font-semibold text-[12.5px] mb-1`,children:b(`Suggestions`,`ai-rank-suite`)}),(()=>{let e=(d.suggestions||[]).map(e=>typeof e==`string`?{title:e,detail:``}:{title:e.title||e.text||e.suggestion||``,detail:e.detail||e.description||``}).filter(e=>e.title||e.detail);return e.length===0?(0,I.jsx)(`p`,{className:`m-0 text-[12.5px]`,children:b(`The model had nothing to add for this one.`,`ai-rank-suite`)}):(0,I.jsx)(`ol`,{className:`m-0 pl-4 grid gap-2 text-[12.5px]`,children:e.map((e,t)=>(0,I.jsxs)(`li`,{children:[e.title&&(0,I.jsx)(`strong`,{children:e.title}),e.title&&e.detail?(0,I.jsx)(`br`,{}):null,e.detail]},t))})})()]}),ne===`checks`&&(0,I.jsx)(fi,{checks:a.checks,sections:a.sections,fixing:l,onFix:he})]}),(0,I.jsxs)(`aside`,{className:`ars-sheet-rail`,children:[(0,I.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,I.jsx)(`div`,{className:`t-overline`,children:b(`This page`,`ai-rank-suite`)}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(ke,{value:a.geo_score}),a.stale&&(0,I.jsx)(`span`,{className:`t-caption`,title:b(`This page changed after it was last scored — run the analyzer to refresh it.`,`ai-rank-suite`),children:`·\xA0stale`}),(0,I.jsx)(`span`,{className:`t-caption`,children:b(`GEO`,`ai-rank-suite`)}),(0,I.jsx)(ke,{value:a.seo_score}),(0,I.jsx)(`span`,{className:`t-caption`,children:b(`SEO`,`ai-rank-suite`)})]}),(0,I.jsx)(`div`,{className:`t-caption`,children:S(x(`%1$s words · %2$s open check`,`%1$s words · %2$s open checks`,xe,`ai-rank-suite`),Number(a.words||0).toLocaleString(),Number(xe).toLocaleString())}),a.readability?.sentences>0&&(0,I.jsxs)(`div`,{className:`grid gap-1 mt-1`,children:[(0,I.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,I.jsx)(`span`,{className:`t-caption`,children:b(`Readability`,`ai-rank-suite`)}),(0,I.jsx)(`span`,{className:`t-caption`,children:S(b(`%1$d / 100 · %2$s`,`ai-rank-suite`),a.readability.flesch,a.readability.label)})]}),(0,I.jsx)(Pe,{value:Math.max(2,Math.min(100,a.readability.flesch)),color:a.readability.flesch>=60?`var(--ars-good)`:a.readability.flesch>=30?`var(--ars-warning)`:`var(--ars-serious)`}),(0,I.jsx)(`span`,{className:`t-caption`,children:S(b(`%1$s words a sentence · %2$d%% passive`,`ai-rank-suite`),a.readability.words_per_sentence,a.readability.passive_share)})]})]}),(0,I.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,I.jsx)(`div`,{className:`t-overline`,children:b(`Live preview`,`ai-rank-suite`)}),(0,I.jsx)(ni,{serp:{...a.serp,title:Ki(a.seo_title,a.serp?.title),desc:Ki(a.seo_desc,a.serp?.desc)},card:a.social_card,brand:a.serp?.site})]}),xe>0&&(0,I.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,I.jsx)(`div`,{className:`t-overline`,children:b(`Next to fix`,`ai-rank-suite`)}),(0,I.jsx)(`ul`,{className:`m-0 p-0 list-none grid gap-1`,children:a.checks.filter(e=>e.status!==`pass`).slice(0,4).map(e=>(0,I.jsxs)(`li`,{className:`text-[12px] flex gap-2 items-start px-2 py-1.5 ars-r-xs`,style:{background:`var(--ars-surface-2)`,color:`var(--ars-ink-2)`},children:[(0,I.jsx)(`span`,{"aria-hidden":!0,style:{color:e.status===`fail`?`var(--ars-serious)`:`var(--ars-warning)`,fontWeight:700},children:e.status===`fail`?`✕`:`!`}),(0,I.jsx)(`span`,{children:e.label})]},e.id))}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>re(`checks`),className:`border-0 bg-transparent cursor-pointer p-0 text-[12px] font-semibold text-left`,style:{color:`var(--ars-brand)`},children:S(b(`All %s checks →`,`ai-rank-suite`),xe)})]})]})]}),(0,I.jsxs)(`footer`,{className:`ars-sheet-foot`,children:[(0,I.jsx)(A,{onClick:be,busy:s,disabled:!ue&&!s,children:b(ue?`Save & re-analyze`:`Saved`,`ai-rank-suite`)}),(0,I.jsxs)(A,{variant:`ghost`,busy:s,onClick:()=>ye(()=>E.post(`/content/${e}/analyze`)),children:[(0,I.jsx)(yt,{size:13}),b(`Re-analyze`,`ai-rank-suite`)]}),p&&(0,I.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),h&&(0,I.jsx)(`span`,{className:`text-[12px]`,style:{color:`var(--ars-serious)`},children:h}),(0,I.jsx)(`span`,{className:`ml-auto text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:i&&i.total>1?b(`Alt+↑ / Alt+↓ to move · Esc to close`,`ai-rank-suite`):b(`Esc to close`,`ai-rank-suite`)})]})]}):(0,I.jsx)(`div`,{className:`p-6`,style:{gridRow:`1 / -1`},children:h||`Loading…`})})]}),document.getElementById(`airanksuite-root`)||document.body)}function Ki(e,t){let n=(e||``).trim();return n?/%[a-z_]+%/i.test(n)&&t||n:t}function qi({label:e,value:t}){if(t==null)return(0,I.jsxs)(`span`,{className:`ars-scorechip`,style:{background:`var(--ars-surface-3)`,color:`var(--ars-ink-3)`},title:`${e} — not analysed yet`,children:[e,` `,(0,I.jsx)(`b`,{children:`—`})]});let n=t>=80?`green`:t>=50?`yellow`:`red`;return(0,I.jsxs)(`span`,{className:`ars-scorechip`,style:{background:`var(--ars-c-${n})`,color:`var(--ars-c-${n}-ink)`},title:`${e} score`,children:[e,` `,(0,I.jsx)(`b`,{children:t})]})}function Ji({id:e,label:t,sort:n,onSort:r,align:i=`left`,width:a=`narrow`}){let o=n.by===e;return(0,I.jsx)(`th`,{className:i===`right`?`is-num is-${a}`:``,children:(0,I.jsxs)(`button`,{type:`button`,onClick:()=>r(e),className:`border-0 bg-transparent cursor-pointer p-0 font-medium inline-flex items-center gap-1`,style:{color:o?`var(--ars-brand)`:`inherit`,font:`inherit`},children:[t,(0,I.jsx)(`span`,{"aria-hidden":!0,style:{opacity:o?1:.25},children:o&&n.dir===`asc`?`▲`:`▼`})]})})}function Yi(){let e=()=>{let e=/#\/content\/(\d+)/.exec(window.location.hash||``);return e?Number(e[1]):null},t=(()=>{let e=new URLSearchParams(window.location.hash.split(`?`)[1]||``);return{filter:e.get(`filter`)||``,type:e.get(`type`)||`any`,status:e.get(`status`)||``,search:e.get(`q`)||``,perPage:[20,50,100].includes(Number(e.get(`per_page`)))?Number(e.get(`per_page`)):20}})(),[n,r]=(0,Qi.useState)(null),[i,a]=(0,Qi.useState)(t.perPage),[o,s]=(0,Qi.useState)(()=>new Set),[c,l]=(0,Qi.useState)(``),[u,d]=(0,Qi.useState)({total:0,pages:1}),[f,p]=(0,Qi.useState)(1),[m,h]=(0,Qi.useState)(t.search),[g,_]=(0,Qi.useState)(t.filter),[v,y]=(0,Qi.useState)(t.type),[x,C]=(0,Qi.useState)(``),[w,ee]=(0,Qi.useState)([]),[T,te]=(0,Qi.useState)(null),[ne,D]=(0,Qi.useState)({tax:``,term:``}),[ae,oe]=(0,Qi.useState)(t.status),[se,ce]=(0,Qi.useState)({by:`modified`,dir:`desc`}),[le,ue]=(0,Qi.useState)(e);(0,Qi.useEffect)(()=>{let t=()=>{let t=e();t&&ue(t)};return window.addEventListener(`hashchange`,t),()=>window.removeEventListener(`hashchange`,t)},[]);let[de,O]=(0,Qi.useState)(!1),[fe,pe]=(0,Qi.useState)(null),[me,he]=(0,Qi.useState)(null),[ge,_e]=(0,Qi.useState)(0),ve=async e=>{if(o.size!==0){l(e),pe(null);try{await E.post(`/bulk/start`,{action:e,scope:`ids`,ids:[...o]}),window.location.hash=`/content/bulk`}catch(e){pe(e.message)}finally{l(``)}}},ye=async()=>{l(`describe-all`),pe(null);try{await E.post(`/bulk/start`,{action:`describe`,scope:`missing`}),window.location.hash=`/content/bulk`}catch(e){pe(e.message)}finally{l(``)}},be=async()=>{if(ta){l(`site`),pe(null);try{await E.post(`/bulk/start`,{action:`analyze`,scope:`missing`}),window.location.hash=`/content/bulk`}catch(e){pe(e.message)}finally{l(``)}return}l(`site`),pe(null);let e=new Set,t=0;try{for(;;){let n=await E.get(`/content?type=any&filter=unscored&per_page=50&page=1`);if(!Array.isArray(n)||n.length===0)break;let r=n.filter(t=>!e.has(t.id));if(r.length===0)break;for(let n of r)e.add(n.id),await E.post(`/content/${n.id}/analyze`),t+=1,_e(t)}let n=await E.get(`/content/library`);te(n.types||[]),we(f,m,g,v,se,x,ne,ae,i)}catch(e){pe(e.message)}finally{l(``),_e(0)}},xe=e=>s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),Se=e=>s(t=>{let n=new Set(t),r=e.every(e=>n.has(e.id));return e.forEach(e=>r?n.delete(e.id):n.add(e.id)),n}),Ce=async(e,t)=>{he(e);try{for(let e of t)try{let t=await E.post(`/content/${e.id}/analyze`);r(n=>n.map(n=>n.id===e.id?{...n,...t}:n))}catch(e){pe(e.message)}E.get(`/content/library`).then(e=>te(e.types||[])).catch(()=>{})}finally{he(null)}},we=(0,Qi.useCallback)(async(e,t,n,i,a,o=``,s={tax:``,term:``},c=``,l=20)=>{O(!0);try{let u=new URLSearchParams({page:String(e),per_page:String(l),search:t,filter:n,type:i,orderby:a.by,order:a.dir,lang:o,tax:s.tax||``,term:s.term||``,status:c||``}),f=await fetch(`${window.airanksuiteData.restUrl}/content?${u}`,{headers:{"X-WP-Nonce":window.airanksuiteData.nonce},credentials:`same-origin`});if(!f.ok)throw Error(`Request failed (${f.status})`);d({total:Number(f.headers.get(`X-WP-Total`)),pages:Number(f.headers.get(`X-WP-TotalPages`))}),r(await f.json()),pe(null)}catch(e){pe(e.message)}finally{O(!1)}},[]);(0,Qi.useEffect)(()=>{we(f,m,g,v,se,x,ne,ae,i),s(new Set);let e=new URLSearchParams;g&&e.set(`filter`,g),v!==`any`&&e.set(`type`,v),ae&&e.set(`status`,ae),m&&e.set(`q`,m),i!==20&&e.set(`per_page`,String(i));let t=window.location.hash.split(`?`)[0]||`#/content`;if(/^#\/content(\/|$|\?)/.test(t)&&!/#\/content\/\d+/.test(t)){let n=e.toString()?`${t}?${e}`:t;window.location.hash!==n&&window.history.replaceState(null,``,n)}},[f,g,v,se,x,ne,ae,i,we]),(0,Qi.useEffect)(()=>{ie(`insights`)&&E.get(`/insights?days=7`).then(e=>ee(e.post_types||[])).catch(()=>{}),E.get(`/content/library`).then(e=>te(e.types||[])).catch(()=>{})},[]);let Te=e=>{y(e),D({tax:``,term:``}),p(1)},Ee=(()=>{let e=(T||[]).find(e=>e.name===v);if(e)return e;if(v!==`any`||!T||T.length===0)return null;let t=T.filter(e=>e.total>0);if(t.length===0)return null;let n=e=>t.reduce((t,n)=>t+(n[e]||0),0),r=e=>{let n=t.filter(t=>t[e]!==null&&t[e]!==void 0),r=n.reduce((e,t)=>e+t.total,0);return r?Math.round(n.reduce((t,n)=>t+n[e]*n.total,0)/r):null};return{name:`any`,label:b(`Everything`,`ai-rank-suite`),total:n(`total`),published:n(`published`),drafts:n(`drafts`),no_desc:n(`no_desc`),no_keyword:n(`no_keyword`),weak_geo:n(`weak_geo`),noindex:n(`noindex`),unanalyzed:n(`unanalyzed`),avg_geo:r(`avg_geo`),avg_seo:r(`avg_seo`)}})(),j=e=>{p(1),ce(t=>t.by===e?{by:e,dir:t.dir===`asc`?`desc`:`asc`}:{by:e,dir:e===`title`?`asc`:`desc`})},De=re.i18n||{multilingual:!1,perPost:!1,languages:[]},Oe=g!==``||v!==`any`||m!==``||x!==``||ne.term!==``||ae!==``,Ae=()=>{_(``),y(`any`),C(``),h(``),D({tax:``,term:``}),oe(``),ce({by:`modified`,dir:`desc`}),p(1)};return(0,I.jsxs)(`div`,{className:`ars-page`,children:[T&&T.filter(e=>e.total>0).length>1&&(0,I.jsx)(Xi,{library:T,value:v,onChange:Te}),Ee&&(0,I.jsx)(Zi,{type:Ee,filter:g,onFilter:e=>{_(g===e?``:e),p(1)},onScoreAll:be,onDescribeAll:ye,busy:c,scoreDone:ge}),o.size>0&&(0,I.jsxs)(`div`,{className:`ars-selbar`,children:[(0,I.jsxs)(`span`,{className:`font-semibold text-[13px]`,children:[o.size,` selected`]}),(0,I.jsxs)(`span`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,I.jsx)(A,{variant:`tonal`,busy:c===`analyze`||me===`selection`,onClick:()=>ta?ve(`analyze`):Ce(`selection`,n.filter(e=>o.has(e.id))),children:b(`Score`,`ai-rank-suite`)}),ea&&ta&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(A,{variant:`tonal`,busy:c===`describe`,onClick:()=>ve(`describe`),title:b(`AI writes a meta description for each selected page`,`ai-rank-suite`),children:b(`Write descriptions (AI)`,`ai-rank-suite`)}),(0,I.jsx)(A,{variant:`tonal`,busy:c===`faq`,onClick:()=>ve(`faq`),title:b(`AI generates FAQs for each selected page`,`ai-rank-suite`),children:b(`Generate FAQs (AI)`,`ai-rank-suite`)})]}),(0,I.jsx)(A,{variant:`ghost`,onClick:()=>s(new Set),children:b(`Clear`,`ai-rank-suite`)})]}),(0,I.jsx)(`span`,{className:`t-caption`,children:b(`Runs on the Bulk tab, where you can watch it and undo it.`,`ai-rank-suite`)})]}),(0,I.jsxs)(Be,{children:[(0,I.jsx)(`div`,{className:`w-full flex flex-wrap items-center gap-3`,children:(0,I.jsx)(Ve,{options:ra,value:g,onChange:e=>{_(e),p(1)},label:b(`Show`,`ai-rank-suite`)})}),(0,I.jsxs)(`div`,{className:`w-full flex flex-wrap items-center gap-3`,children:[De.multilingual&&!De.perPost&&(0,I.jsx)(`a`,{href:`#/content/urls`,className:`ars-btn ars-btn-ghost`,title:b(`This site translates by URL, not by post. The filter here selects posts that have a page in that language; the per-language scores live under URLs & languages.`,`ai-rank-suite`),children:S(b(`%d languages → URLs`,`ai-rank-suite`),De.languages.length)}),De.multilingual&&(De.perPost||De.urlLangs)&&(0,I.jsxs)(`select`,{value:x,onChange:e=>{C(e.target.value),p(1)},style:{minWidth:`10rem`},"aria-label":b(`Language`,`ai-rank-suite`),children:[(0,I.jsx)(`option`,{value:``,children:b(`All languages`,`ai-rank-suite`)}),De.languages.map(e=>(0,I.jsx)(`option`,{value:e.code,children:e.label},e.code))]}),w.length>1&&!T&&(0,I.jsxs)(`select`,{value:v,onChange:e=>Te(e.target.value),style:{minWidth:`10.5rem`},"aria-label":b(`Content type`,`ai-rank-suite`),children:[(0,I.jsx)(`option`,{value:`any`,children:b(`All types`,`ai-rank-suite`)}),w.map(e=>(0,I.jsx)(`option`,{value:e.name,children:e.label},e.name))]}),(Ee?.taxonomies||[]).map(e=>(0,I.jsxs)(`select`,{value:ne.tax===e.name?ne.term:``,onChange:t=>{D(t.target.value?{tax:e.name,term:t.target.value}:{tax:``,term:``}),p(1)},style:{minWidth:`10.5rem`,maxWidth:260},"aria-label":e.label,children:[(0,I.jsxs)(`option`,{value:``,children:[`All `,e.label]}),e.terms.map(e=>(0,I.jsxs)(`option`,{value:e.slug,children:[e.name,` (`,e.count,`)`]},e.slug))]},e.name)),Ee&&Ee.drafts>0&&(0,I.jsxs)(`select`,{value:ae,onChange:e=>{oe(e.target.value),p(1)},style:{minWidth:`11rem`},"aria-label":b(`Status`,`ai-rank-suite`),children:[(0,I.jsx)(`option`,{value:``,children:b(`Any status`,`ai-rank-suite`)}),(0,I.jsx)(`option`,{value:`publish`,children:b(`Published`,`ai-rank-suite`)}),(0,I.jsx)(`option`,{value:`draft`,children:b(`Drafts`,`ai-rank-suite`)}),(0,I.jsx)(`option`,{value:`pending`,children:b(`Pending`,`ai-rank-suite`)}),(0,I.jsx)(`option`,{value:`future`,children:b(`Scheduled`,`ai-rank-suite`)}),(0,I.jsx)(`option`,{value:`private`,children:b(`Private`,`ai-rank-suite`)})]}),(0,I.jsx)(`form`,{className:`ml-auto`,onSubmit:e=>{e.preventDefault(),p(1),we(1,m,g,v,se,x,ne,ae)},children:(0,I.jsx)(`input`,{type:`text`,placeholder:b(`Search pages…`,`ai-rank-suite`),value:m,onChange:e=>h(e.target.value),style:{width:220},"aria-label":b(`Search pages`,`ai-rank-suite`)})}),Oe&&(0,I.jsx)(A,{variant:`ghost`,onClick:Ae,children:b(`Clear`,`ai-rank-suite`)})]})]}),fe&&(0,I.jsx)(k,{title:b(`Content analysis`,`ai-rank-suite`),children:(0,I.jsx)(`p`,{className:`m-0`,style:{color:`var(--ars-serious)`},children:fe})}),!n&&!fe&&(0,I.jsx)(k,{title:b(`Content analysis`,`ai-rank-suite`),children:(0,I.jsx)(`p`,{className:`m-0`,style:{color:`var(--ars-ink-2)`},children:b(`Analyzing content…`,`ai-rank-suite`)})}),n&&n.length===0&&(0,I.jsx)(k,{title:b(`Content analysis`,`ai-rank-suite`),children:(0,I.jsxs)(`div`,{className:`ars-r-lg px-4 py-5 grid gap-2 place-items-start`,style:{background:`var(--ars-surface-2)`},children:[(0,I.jsx)(`div`,{className:`font-medium text-[13px]`,children:b(`Nothing matches this filter`,`ai-rank-suite`)}),(0,I.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(g===``?`No published content found.`:`That is good news — no page has this problem.`,`ai-rank-suite`)}),Oe&&(0,I.jsx)(A,{variant:`tonal`,onClick:Ae,children:b(`Show all pages`,`ai-rank-suite`)})]})}),n&&n.length>0&&(()=>{let e=e=>{let t=(T||[]).find(t=>t.name===e);return t?t.label:e},t=new Map;n.forEach(e=>{t.has(e.type)||t.set(e.type,[]),t.get(e.type).push(e)});let r=(T||[]).map(e=>e.name);return t.forEach((e,t)=>{r.includes(t)||r.push(t)}),r.map(n=>{let r=t.get(n)||[],i=(T||[]).find(e=>e.name===n);if(r.length===0)return(0,I.jsxs)(`div`,{className:`ars-typeempty`,children:[(0,I.jsx)(`b`,{children:e(n)}),(0,I.jsx)(`span`,{children:i&&i.total>0?S(b(`none of its %s items on this page of results`,`ai-rank-suite`),i.total.toLocaleString()):b(`nothing published in this type yet`,`ai-rank-suite`)})]},n);let a=r.filter(e=>e.geo_score===null||e.geo_score===void 0);return(0,I.jsx)(k,{title:e(n),subtitle:b(`Scored for AI readiness (GEO) and classic search (SEO) — click a row to fix it. The three letters before each title show whether it has an SEO title, a meta description and a focus keyword: green means set, grey means missing.`,`ai-rank-suite`),action:(0,I.jsxs)(`span`,{className:`flex items-center gap-2`,children:[a.length>0&&!de&&(0,I.jsx)(A,{variant:`tonal`,busy:me===n,onClick:()=>Ce(n,a),title:b(`Runs the local analyzer on the unscored rows in view — free, no AI call`,`ai-rank-suite`),children:S(b(`Score %s unscored`,`ai-rank-suite`),a.length)}),!de&&i&&i.total>r.length&&v===`any`&&(0,I.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>Te(n),children:S(b(`Show all %s`,`ai-rank-suite`),i.total.toLocaleString())}),(0,I.jsx)(`span`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:de?b(`Loading…`,`ai-rank-suite`):S(b(`%1$s of %2$s`,`ai-rank-suite`),r.length.toLocaleString(),(i?i.total:r.length).toLocaleString())})]}),flush:!0,children:(0,I.jsx)(`div`,{className:`ars-table-wrap`,children:(0,I.jsxs)(`table`,{className:`ars-table`,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`th`,{style:{width:34},children:(0,I.jsx)(`input`,{type:`checkbox`,"aria-label":b(`Select all in view`,`ai-rank-suite`),checked:r.length>0&&r.every(e=>o.has(e.id)),onChange:()=>Se(r)})}),(0,I.jsx)(Ji,{id:`title`,label:e(n),sort:se,onSort:j}),De.multilingual&&De.perPost&&(0,I.jsx)(`th`,{className:`is-narrow`,children:b(`Lang`,`ai-rank-suite`)}),(0,I.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Words`,`ai-rank-suite`)}),(0,I.jsx)(Ji,{id:`geo`,label:b(`GEO`,`ai-rank-suite`),sort:se,onSort:j,align:`right`}),(0,I.jsx)(Ji,{id:`seo`,label:b(`SEO`,`ai-rank-suite`),sort:se,onSort:j,align:`right`}),(0,I.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Issues`,`ai-rank-suite`)}),(0,I.jsx)(Ji,{id:`modified`,label:b(`Updated`,`ai-rank-suite`),sort:se,onSort:j,align:`right`,width:`mid`})]})}),(0,I.jsx)(`tbody`,{children:r.map(e=>(0,I.jsxs)(`tr`,{onClick:()=>ue(e.id),style:{cursor:`pointer`},className:o.has(e.id)?`is-selected`:``,children:[(0,I.jsx)(`td`,{onClick:e=>e.stopPropagation(),style:{width:34},children:(0,I.jsx)(`input`,{type:`checkbox`,"aria-label":`Select ${e.title}`,checked:o.has(e.id),onChange:()=>xe(e.id)})}),(0,I.jsx)(`td`,{className:`font-medium`,style:{maxWidth:420},children:(0,I.jsxs)(`span`,{className:`inline-flex items-center gap-2 max-w-full`,children:[(0,I.jsxs)(`span`,{className:`ars-signals`,"aria-label":S(b(`SEO title %1$s, meta description %2$s, focus keyword %3$s`,`ai-rank-suite`),e.has_title?b(`set`,`ai-rank-suite`):b(`missing`,`ai-rank-suite`),e.has_desc?b(`set`,`ai-rank-suite`):b(`missing`,`ai-rank-suite`),e.has_keyword?b(`set`,`ai-rank-suite`):b(`missing`,`ai-rank-suite`)),children:[(0,I.jsx)(`i`,{className:e.has_title?`is-on`:``,title:e.has_title?b(`SEO title: set`,`ai-rank-suite`):b(`SEO title: missing`,`ai-rank-suite`),children:b(`T`,`ai-rank-suite`)}),(0,I.jsx)(`i`,{className:e.has_desc?`is-on`:``,title:e.has_desc?b(`Meta description: set`,`ai-rank-suite`):b(`Meta description: missing`,`ai-rank-suite`),children:b(`D`,`ai-rank-suite`)}),(0,I.jsx)(`i`,{className:e.has_keyword?`is-on`:``,title:e.has_keyword?b(`Focus keyword: set`,`ai-rank-suite`):b(`Focus keyword: missing`,`ai-rank-suite`),children:b(`K`,`ai-rank-suite`)})]}),(0,I.jsxs)(`span`,{className:`truncate`,children:[e.title,e.seo_title&&e.seo_title!==e.title&&(0,I.jsxs)(`em`,{className:`is-muted`,title:b(`The SEO title, which is what search engines show`,`ai-rank-suite`),style:{fontStyle:`normal`,marginLeft:8,opacity:.75},children:[`→ `,e.seo_title]})]}),e.status&&e.status!==`publish`&&(0,I.jsx)(`span`,{className:`ars-tag shrink-0`,style:{color:`var(--ars-c-yellow-ink)`,background:`var(--ars-c-yellow)`},children:e.status})]})}),De.multilingual&&De.perPost&&(0,I.jsx)(`td`,{className:`is-muted uppercase`,children:e.lang||`—`}),(0,I.jsx)(`td`,{className:`is-num`,children:e.words?e.words.toLocaleString():(0,I.jsx)(`span`,{className:`is-muted`,children:`—`})}),(0,I.jsx)(`td`,{className:`is-num`,children:(0,I.jsx)(ke,{value:e.geo_score})}),(0,I.jsx)(`td`,{className:`is-num`,children:(0,I.jsx)(ke,{value:e.seo_score})}),(0,I.jsx)(`td`,{className:`is-num`,children:e.geo_score===null||e.geo_score===void 0?(0,I.jsx)(`span`,{className:`ars-tag ars-tag-quiet`,title:b(`Not analysed yet — open the row or press “Score unscored”`,`ai-rank-suite`),children:b(`unscored`,`ai-rank-suite`)}):e.issues}),(0,I.jsx)(`td`,{className:`is-num is-muted`,children:(0,I.jsxs)(`span`,{className:`ars-rowmeta`,children:[(0,I.jsxs)(`span`,{className:`ars-rowacts`,onClick:e=>e.stopPropagation(),children:[e.edit_url&&(0,I.jsx)(`a`,{href:e.edit_url,target:`_blank`,rel:`noreferrer`,title:b(`Edit in WordPress`,`ai-rank-suite`),children:b(`Edit`,`ai-rank-suite`)}),e.url&&(0,I.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,title:b(`View the page`,`ai-rank-suite`),children:b(`View`,`ai-rank-suite`)})]}),(0,I.jsx)(`span`,{className:`ars-rowmeta-time`,children:e.modified_human||`—`})]})})]},e.id))})]})})},n)})})(),n&&n.length>0&&u.pages>1&&(0,I.jsxs)(`div`,{className:`flex items-center justify-between flex-wrap gap-2`,children:[(0,I.jsxs)(`span`,{className:`flex items-center gap-3 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[(0,I.jsx)(`span`,{children:S(b(`Page %1$s of %2$s · %3$s entries`,`ai-rank-suite`),f.toLocaleString(),Math.max(1,u.pages||1).toLocaleString(),(u.total||0).toLocaleString())}),(0,I.jsxs)(`label`,{className:`flex items-center gap-1.5`,children:[b(`Rows`,`ai-rank-suite`),(0,I.jsx)(`select`,{className:`ars-select`,value:i,onChange:e=>{a(Number(e.target.value)),p(1)},children:[20,50,100].map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))})]})]}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(A,{variant:`ghost`,disabled:f<=1,onClick:()=>p(f-1),children:b(`← Previous`,`ai-rank-suite`)}),(0,I.jsx)(A,{variant:`ghost`,disabled:f>=u.pages,onClick:()=>p(f+1),children:b(`Next →`,`ai-rank-suite`)})]})]}),le&&(0,I.jsx)(Gi,{id:le,onClose:()=>ue(null),position:(()=>{let e=(n||[]).findIndex(e=>e.id===le);return e<0?null:{index:e,total:(n||[]).length}})(),onNavigate:e=>{let t=(n||[])[e];t&&ue(t.id)},onChanged:e=>r(t=>t.map(t=>t.id===e.id?{...t,...e}:t))})]})}function Xi({library:e,value:t,onChange:n}){let r=e.filter(e=>e.total>0),i=r.reduce((e,t)=>e+t.total,0);return(0,I.jsxs)(`div`,{className:`ars-typebar`,role:`tablist`,"aria-label":b(`Content type`,`ai-rank-suite`),children:[(0,I.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t===`any`,className:`ars-typetab${t===`any`?` is-active`:``}`,onClick:()=>n(`any`),children:[(0,I.jsx)(`span`,{className:`ars-typetab-label`,children:b(`Everything`,`ai-rank-suite`)}),(0,I.jsx)(`span`,{className:`ars-typetab-count tabular-nums`,children:i.toLocaleString()})]}),r.map(e=>(0,I.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t===e.name,className:`ars-typetab${t===e.name?` is-active`:``}`,onClick:()=>n(e.name),title:S(b(`%1$s: %2$s items`,`ai-rank-suite`),e.label,e.total.toLocaleString()),children:[(0,I.jsx)(`span`,{className:`ars-typetab-label`,children:e.label}),(0,I.jsx)(`span`,{className:`ars-typetab-count tabular-nums`,children:e.total.toLocaleString()}),e.no_desc>0&&(0,I.jsx)(`span`,{className:`ars-typetab-dot`,"aria-hidden":!0})]},e.name))]})}function Zi({type:e,filter:t,onFilter:n,onScoreAll:r,onDescribeAll:i,busy:a,scoreDone:o}){if(e.total===0)return null;let s=t=>Math.round(t/Math.max(1,e.total)*100),c=Math.max(0,e.total-(e.unanalyzed||0));s(e.total-e.no_desc);let l=e.avg_geo,u=l===null?`neutral`:l>=80?`good`:l>=50?`warning`:`bad`,d=b(l===null?`Not scored yet`:l>=80?`Healthy`:l>=50?`Room to improve`:`Needs attention`,`ai-rank-suite`),f=e.name===`any`?b(`items`,`ai-rank-suite`):e.label,p=Math.max(0,e.total-(e.published??e.total)),m=p>0?S(b(` (%1$s published, %2$s drafts)`,`ai-rank-suite`),(e.published??0).toLocaleString(),p.toLocaleString()):``,h=l===null?S(b(`%1$s %2$s%3$s, none scored yet.`,`ai-rank-suite`),e.total.toLocaleString(),f,m):S(b(`%1$s of %2$s %3$s%4$s scored — average GEO %5$d%6$s.`,`ai-rank-suite`),c.toLocaleString(),e.total.toLocaleString(),f,m,l,e.avg_seo===null?``:S(b(`, SEO %d`,`ai-rank-suite`),e.avg_seo)),g=e.no_desc>0?S(b(`%1$s of these pages have a meta description, %2$s do not — the cheapest gap to close, and the one an assistant quotes first. %3$s`,`ai-rank-suite`),Math.max(0,(e.total||0)-(e.no_desc||0)).toLocaleString(),e.no_desc.toLocaleString(),e.weak_geo?S(b(`%s score weak on AI readiness.`,`ai-rank-suite`),e.weak_geo.toLocaleString()):``):e.weak_geo>0?S(b(`Every page has a description. %s still score weak on AI readiness — the list below, worst first, is the work.`,`ai-rank-suite`),e.weak_geo.toLocaleString()):b(`Descriptions filled, nothing weak: keep scoring after each publishing sprint so the numbers stay true.`,`ai-rank-suite`);return(0,I.jsxs)(`div`,{className:`ars-hero`,children:[(0,I.jsx)(`div`,{className:`ars-hero-ring`,children:(0,I.jsx)(Oe,{value:l,size:132,label:b(`Avg GEO`,`ai-rank-suite`),onLight:!0})}),(0,I.jsxs)(`div`,{className:`ars-hero-body`,children:[(0,I.jsx)(`span`,{className:`ars-hero-badge is-${u}`,children:d}),(0,I.jsx)(`h2`,{className:`ars-hero-title`,children:h}),(0,I.jsx)(`p`,{className:`ars-hero-why`,children:g}),(0,I.jsxs)(`div`,{className:`ars-hero-actions`,children:[(e.unanalyzed||0)>0&&(0,I.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:r,disabled:a===`site`,title:b(`The local analyzer. Free, and it runs on this site — nothing is sent anywhere.`,`ai-rank-suite`),children:a===`site`?S(b(`Scoring… %s done`,`ai-rank-suite`),(o||0).toLocaleString()):S(b(`Score %s unscored`,`ai-rank-suite`),e.unanalyzed.toLocaleString())}),e.no_desc>0&&ea&&ta&&(0,I.jsx)(`button`,{type:`button`,className:`ars-btn ${(e.unanalyzed||0)>0?`ars-btn-ghost`:`ars-btn-primary`}`,onClick:i,disabled:a===`describe-all`,title:b(`AI writes a description for every page without one — reviewable and undoable on the Bulk tab`,`ai-rank-suite`),children:a===`describe-all`?b(`Queuing…`,`ai-rank-suite`):S(b(`Write %s descriptions (AI)`,`ai-rank-suite`),e.no_desc.toLocaleString())}),(0,I.jsxs)(`span`,{className:`t-caption`,children:[S(b(`%s published`,`ai-rank-suite`),e.published.toLocaleString()),e.drafts>0?` · `+S(x(`%s draft`,`%s drafts`,e.drafts,`ai-rank-suite`),e.drafts.toLocaleString()):``]})]})]}),(0,I.jsx)(`div`,{className:`ars-hero-stats`,children:[{key:`no_desc`,label:b(`No description`,`ai-rank-suite`),value:e.no_desc,tone:e.no_desc?`bad`:`good`},{key:`no_keyword`,label:b(`No keyword`,`ai-rank-suite`),value:e.no_keyword,tone:e.no_keyword?`warn`:`good`},{key:`weak_geo`,label:b(`Weak GEO`,`ai-rank-suite`),value:e.weak_geo,tone:e.weak_geo?`warn`:`good`},{key:`noindex`,label:b(`Noindex`,`ai-rank-suite`),value:e.noindex}].map(e=>(0,I.jsxs)(`button`,{type:`button`,className:`ars-hero-stat${t===e.key?` is-active`:``}`,onClick:()=>n(e.key),title:t===e.key?b(`Show all`,`ai-rank-suite`):S(b(`Show only: %s`,`ai-rank-suite`),e.label),children:[(0,I.jsx)(`span`,{className:`ars-hero-stat-v${e.tone?` is-`+e.tone:``}`,children:e.value.toLocaleString()}),(0,I.jsx)(`span`,{className:`ars-hero-stat-l`,children:e.label})]},e.key))})]})}var Qi,$i,I,ea,ta,na,ra,ia=o((()=>{Qi=u(f(),1),C(),$i=g(),D(),I=O(),at(),Ft(),Lr(),qr(),ai(),ui(),gi(),Si(),Di(),Mi(),Ui(),ea=!Array.isArray(re.modules)||re.modules.includes(`ai`),ta=!Array.isArray(re.modules)||re.modules.includes(`bulk`),na=e=>JSON.stringify({seo_title:e?.seo_title||``,seo_desc:e?.seo_desc||``,exclude:!!e?.exclude,robots:e?.robots||[],keywords:e?.keywords||{},canonical:e?.canonical||``,breadcrumb_title:e?.breadcrumb_title||``,previews:e?.previews||{},social:e?.social||{}}),ra=[{id:``,label:b(`All pages`,`ai-rank-suite`)},{id:`weak_geo`,label:b(`Weak GEO`,`ai-rank-suite`)},{id:`weak_seo`,label:b(`Weak SEO`,`ai-rank-suite`)},{id:`no_desc`,label:b(`No description`,`ai-rank-suite`)},{id:`no_keyword`,label:b(`No keyword`,`ai-rank-suite`)},{id:`thin`,label:b(`Thin content`,`ai-rank-suite`)},{id:`noindex`,label:b(`Noindex`,`ai-rank-suite`)},{id:`excluded`,label:b(`Not in llms`,`ai-rank-suite`)}]})),aa=c({default:()=>ca});function oa(){let[e,t]=(0,ua.useState)(`short`),[n,r]=(0,ua.useState)(null),[i,a]=(0,ua.useState)(!1),[o,s]=(0,ua.useState)(null),[c,l]=(0,ua.useState)(!1),u=async e=>{a(!0),s(null);try{r(await E.get(`/llms-txt/raw?variant=${e}`))}catch(e){s(e.message)}finally{a(!1)}};return(0,ua.useEffect)(()=>{u(e)},[e]),(0,L.jsxs)(`div`,{className:`ars-page`,children:[(0,L.jsxs)(k,{title:b(`Raw output`,`ai-rank-suite`),subtitle:b(`The exact bytes served at the endpoint, not a rendering of them`,`ai-rank-suite`),action:(0,L.jsx)(Ae,{tabs:[{id:`short`,label:`llms.txt`},{id:`full`,label:`llms-full.txt`}],active:e,onChange:t}),children:[o&&(0,L.jsx)(M,{tone:`serious`,children:o}),n&&(0,L.jsxs)(`div`,{className:`grid gap-3`,children:[(0,L.jsx)(be,{columns:4,metrics:[{id:`tokens`,label:b(`Tokens`,`ai-rank-suite`),hint:b(`What a retriever spends reading this variant. Past roughly 100,000 most truncate the file — and the truncation point is not your choice.`,`ai-rank-suite`),value:(n.tokens??0).toLocaleString(),accent:n.heavy?`var(--ars-accent)`:void 0},{id:`size`,label:b(`Size`,`ai-rank-suite`),hint:b(`The exact bytes on the wire.`,`ai-rank-suite`),value:(n.bytes/1024).toFixed(1),unit:b(`KB`,`ai-rank-suite`)},{id:`lines`,label:b(`Lines`,`ai-rank-suite`),hint:b(`Lines of markdown in the served file.`,`ai-rank-suite`),value:n.lines},{id:`links`,label:b(`Links`,`ai-rank-suite`),hint:b(`Curated URLs in the file — each with a sentence of meaning attached.`,`ai-rank-suite`),value:n.links}]}),n.heavy&&(0,L.jsx)(M,{tone:`warning`,children:b(`Past roughly 100,000 tokens most retrievers truncate the file — and the truncation point is not your choice. Reduce the number of pages in the full variant so the cut is one you made.`,`ai-rank-suite`)}),n.lighthouse&&(0,L.jsx)(sa,{checks:n.lighthouse}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,L.jsxs)(`a`,{href:n.url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 text-[12.5px]`,children:[n.url,` `,(0,L.jsx)(vt,{size:12})]}),(0,L.jsxs)(`span`,{className:`ml-auto flex items-center gap-2`,children:[c&&(0,L.jsx)(j,{tone:`good`,children:`✓ Copied`}),(0,L.jsx)(A,{variant:`ghost`,onClick:async()=>{n?.body&&await fe(n.body)&&(l(!0),setTimeout(()=>l(!1),1800))},disabled:i,children:b(`Copy`,`ai-rank-suite`)})]})]}),(0,L.jsx)(`pre`,{className:`ars-mono m-0 p-3 text-[11.5px]`,style:{background:`var(--ars-surface-2)`,border:`1px solid var(--ars-line-soft)`,color:`var(--ars-ink)`,borderRadius:`var(--ars-r-md)`,maxHeight:420,overflow:`auto`,whiteSpace:`pre-wrap`},children:n.body})]})]}),n&&(0,L.jsx)(k,{title:b(`Hooks`,`ai-rank-suite`),subtitle:b(`Everything you can change without touching the plugin`,`ai-rank-suite`),children:(0,L.jsx)(`div`,{className:`ars-table-wrap`,children:(0,L.jsxs)(`table`,{className:`ars-table`,children:[(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{children:b(`Hook`,`ai-rank-suite`)}),(0,L.jsx)(`th`,{children:b(`Signature`,`ai-rank-suite`)}),(0,L.jsx)(`th`,{children:b(`What it changes`,`ai-rank-suite`)})]})}),(0,L.jsx)(`tbody`,{children:n.hooks.map(e=>(0,L.jsxs)(`tr`,{children:[(0,L.jsxs)(`td`,{children:[(0,L.jsx)(`code`,{className:`ars-mono text-[11.5px]`,children:e.name}),(0,L.jsx)(`div`,{className:`text-[11px] mt-0.5`,style:{color:`var(--ars-ink-3)`},children:e.type})]}),(0,L.jsx)(`td`,{children:(0,L.jsx)(`code`,{className:`ars-mono text-[11.5px]`,children:e.args})}),(0,L.jsx)(`td`,{className:`text-[12.5px]`,children:e.desc})]},e.name))})]})})})]})}function sa({checks:e}){let t=[{id:`h1`,ok:!!e.h1,label:b(`Starts with an H1 heading`,`ai-rank-suite`)},{id:`link`,ok:!!e.link,label:b(`Contains a markdown link`,`ai-rank-suite`)},{id:`length`,ok:!!e.length,label:b(`Long enough to be a document`,`ai-rank-suite`)}],n=t.every(e=>e.ok);return(0,L.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,L.jsx)(`span`,{className:`t-overline`,children:b(`PageSpeed — Agentic Browsing`,`ai-rank-suite`)}),(0,L.jsx)(j,{tone:n?`good`:`serious`,children:b(n?`Passes`:`Fails`,`ai-rank-suite`)})]}),(0,L.jsx)(`div`,{className:`flex gap-4 flex-wrap text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:t.map(e=>(0,L.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,L.jsx)(`span`,{"aria-hidden":!0,style:{color:e.ok?`var(--ars-good)`:`var(--ars-serious)`},children:e.ok?`✓`:`✗`}),e.label]},e.id))})]})}function ca({tab:e=`short`,onTab:t}){let[n,r]=(0,ua.useState)(null),[i,a]=(0,ua.useState)(!1),[o,s]=(0,ua.useState)(!1),[c,l]=(0,ua.useState)(null);(0,ua.useEffect)(()=>{E.get(`/llms-txt`).then(r).catch(e=>l(e.message))},[]);let u=n?.settings,d=e=>r(t=>({...t,settings:{...t.settings,...e}})),f=async()=>{a(!0),l(null),s(!1);try{r(await E.put(`/llms-txt`,u)),s(!0),setTimeout(()=>s(!1),2500)}catch(e){l(e.message)}finally{a(!1)}},p=async()=>{a(!0),l(null);try{r(await E.put(`/llms-txt`,{...u,enabled:!0}))}catch(e){l(e.message)}finally{a(!1)}},[m,h]=(0,ua.useState)(null),[g,_]=(0,ua.useState)(!1),v=async()=>{_(!0);try{for(;;){let e=await E.post(`/llms-txt/write/tick`,{});if(h(e),e.state!==`running`)break}r(await E.get(`/llms-txt`))}catch(e){l(e.message)}finally{_(!1)}},y=async(e=!1)=>{l(null),_(!0);try{h(await E.post(`/llms-txt/write`,{overwrite:e})),await v()}catch(e){l(e.message),_(!1)}},C=async()=>{try{h(await E.post(`/llms-txt/write/cancel`,{}))}catch(e){l(e.message)}};(0,ua.useEffect)(()=>{E.get(`/llms-txt/write`).then(e=>{h(e),e&&e.state===`running`&&v()}).catch(()=>{})},[]);let w=async()=>{a(!0);try{r(await E.post(`/llms-txt/regenerate`))}catch(e){l(e.message)}finally{a(!1)}};if(!n)return(0,L.jsx)(_e,{error:c});let ee=n.stats||{},T=(ee.tokens??0)>8e3,te=(u.key_pages||[]).length,ne=u.enabled?T?{tone:`warning`,text:S(b(`llms.txt is live, but at %s tokens the tail is at risk.`,`ai-rank-suite`),(ee.tokens??0).toLocaleString()),why:b(`Past roughly 8,000 tokens many assistants stop reading — and the cut is theirs, not yours. Lower the max items or unpin pages under Generation below, so the cut is one you made.`,`ai-rank-suite`),action:b(`Open the file`,`ai-rank-suite`),onAction:()=>window.open(n.url,`_blank`,`noopener`)}:{tone:`good`,text:S(b(`llms.txt is live — %1$d curated links, %2$s tokens.`,`ai-rank-suite`),ee.links??0,(ee.tokens??0).toLocaleString()),why:b(`An assistant fetches a handful of URLs per answer; this file is where you choose the handful. The preview below is the exact bytes served.`,`ai-rank-suite`),action:b(`Open the file`,`ai-rank-suite`),onAction:()=>window.open(n.url,`_blank`,`noopener`)}:{tone:`warning`,text:b(`llms.txt is off — an assistant asking about this site gets nothing.`,`ai-rank-suite`),why:b(`The file is generated from your published content and served at /llms.txt the moment it is on. The panels below decide what goes into it.`,`ai-rank-suite`),action:b(`Turn it on`,`ai-rank-suite`),onAction:p},re=(e=null)=>(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(A,{onClick:f,busy:i,children:b(`Save`,`ai-rank-suite`)}),e,o&&(0,L.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]})]});return(0,L.jsxs)(`div`,{className:`ars-page`,children:[c&&(0,L.jsx)(M,{tone:`serious`,children:c}),(0,L.jsx)(he,{tone:ne.tone,text:ne.text,sub:ne.why,action:ne.action,onAction:ne.onAction,busy:i}),(0,L.jsx)(k,{title:b(`Write everything`,`ai-rank-suite`),subtitle:b(`One click: a summary for every page in both files, the lead paragraph for the site, and both files rebuilt.`,`ai-rank-suite`),action:m&&m.state===`running`?(0,L.jsx)(A,{variant:`ghost`,onClick:C,children:b(`Stop`,`ai-rank-suite`)}):(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(A,{onClick:()=>y(!1),busy:g,children:b(`Write everything`,`ai-rank-suite`)}),(0,L.jsx)(A,{variant:`ghost`,onClick:()=>y(!0),disabled:g,children:b(`Rewrite all summaries`,`ai-rank-suite`)})]}),children:m&&m.state===`running`?(0,L.jsx)(Ne,{label:m.current?S(b(`Writing: %s`,`ai-rank-suite`),m.current):b(`Collecting the pages…`,`ai-rank-suite`),done:m.done,total:m.total,note:S(b(`%1$d of %2$d pages · %3$d written, %4$d kept as they were`,`ai-rank-suite`),m.done,m.total,m.written,m.kept)}):m&&m.state===`done`?(0,L.jsxs)(`div`,{className:`grid gap-2`,children:[(0,L.jsxs)(`p`,{className:`m-0 text-[13px]`,children:[S(b(`Done: %1$d summaries written, %2$d kept as they were, %3$d could not be written. Both files are rebuilt.`,`ai-rank-suite`),m.written,m.kept,m.failed),` `,m.ai?b(`Summaries came from the AI engine.`,`ai-rank-suite`):b(`No AI engine is connected, so each summary is the page’s own first sentences.`,`ai-rank-suite`)]}),m.lead?(0,L.jsxs)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:[b(`Site lead written:`,`ai-rank-suite`),` `,m.lead]}):null,m.errors&&m.errors.length?(0,L.jsxs)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:[b(`Skipped (no text):`,`ai-rank-suite`),` `,m.errors.join(`, `)]}):null]}):(0,L.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-3)`},children:b(`The files are only as good as the summaries under each link. Most sites have none, so the long file is raw page text and the short one lists titles with a cut-off paragraph. This writes them all: with the AI engine when a key is stored, from each page’s first sentences otherwise. Pages that already have a summary are kept unless you choose to rewrite.`,`ai-rank-suite`)})}),(0,L.jsx)(be,{columns:4,metrics:[{id:`tokens`,label:b(`Tokens`,`ai-rank-suite`),hint:b(`What an assistant actually spends reading the file. Past roughly 8,000 the tail gets dropped — and the tail is the part nobody checks.`,`ai-rank-suite`),value:(ee.tokens??0).toLocaleString(),accent:T?`var(--ars-accent)`:void 0,sub:b(T?`long — the tail may be truncated`:`inside a context window`,`ai-rank-suite`)},{id:`size`,label:b(`Size`,`ai-rank-suite`),hint:b(`The exact bytes served at /llms.txt.`,`ai-rank-suite`),value:((ee.bytes??0)/1024).toFixed(1),unit:b(`KB`,`ai-rank-suite`),sub:S(x(`%d line`,`%d lines`,ee.lines??0,`ai-rank-suite`),ee.lines??0)},{id:`links`,label:b(`Links listed`,`ai-rank-suite`),hint:b(`Curated URLs with a sentence of meaning each — the part an XML sitemap cannot do.`,`ai-rank-suite`),value:ee.links??0},{id:`pinned`,label:b(`Pinned pages`,`ai-rank-suite`),hint:b(`Placed at the very top of the file, in your order. An assistant that stops after ten links has still read the ten you chose.`,`ai-rank-suite`),value:te,unit:`/ 20`,sub:b(te?`read before everything else`:`nothing pinned yet`,`ai-rank-suite`)}]}),(0,L.jsx)(k,{title:b(`Preview`,`ai-rank-suite`),subtitle:b(`Exactly what AI crawlers will receive`,`ai-rank-suite`),action:(0,L.jsx)(Ae,{tabs:[{id:`short`,label:`llms.txt`},{id:`full`,label:`llms-full.txt`},{id:`dev`,label:b(`Developer`,`ai-rank-suite`)}],active:e,onChange:t}),children:e===`dev`?(0,L.jsx)(oa,{}):e===`short`?(0,L.jsx)(`pre`,{className:`ars-mono m-0 p-4 ars-r-md overflow-auto`,style:{background:`var(--ars-surface-2)`,maxHeight:560,whiteSpace:`pre-wrap`},children:n.preview}):(0,L.jsxs)(`div`,{className:`text-[12.5px] grid gap-2`,style:{color:`var(--ars-ink-2)`},children:[(0,L.jsxs)(`p`,{className:`m-0`,children:[b(`The long version contains the`,`ai-rank-suite`),` `,(0,L.jsx)(`strong`,{children:S(x(`full text of up to %d page`,`full text of up to %d pages`,Number(u.full_max_items)||0,`ai-rank-suite`),u.full_max_items)}),` `,b(`as clean markdown — too large for an inline preview.`,`ai-rank-suite`)]}),(0,L.jsx)(`p`,{className:`m-0`,children:(0,L.jsxs)(`a`,{href:n.full_url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1`,children:[S(b(`Open %s`,`ai-rank-suite`),n.full_url),` `,(0,L.jsx)(vt,{size:11})]})})]})}),(0,L.jsx)(la,{}),(0,L.jsx)(Se,{title:b(`Generation`,`ai-rank-suite`),note:[u.enabled?b(`on`,`ai-rank-suite`):b(`off`,`ai-rank-suite`),S(b(`max %s per section`,`ai-rank-suite`),u.max_items),u.full_enabled?b(`full variant on`,`ai-rank-suite`):null].filter(Boolean).join(` · `),defaultOpen:!u.enabled,children:(0,L.jsxs)(`div`,{className:`grid gap-4`,style:{maxWidth:560},children:[(0,L.jsx)(Ee,{checked:!!u.enabled,onChange:e=>d({enabled:e}),label:b(`Serve /llms.txt on this site`,`ai-rank-suite`)}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Intro paragraph (optional)`,`ai-rank-suite`)}),(0,L.jsx)(`textarea`,{rows:3,value:u.intro,onChange:e=>d({intro:e.target.value}),placeholder:b(`One or two sentences telling AI systems what this site is about and who it is for.`,`ai-rank-suite`)})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Included content`,`ai-rank-suite`)}),(0,L.jsxs)(`div`,{className:`flex gap-4`,children:[[`page`,`post`].map(e=>(0,L.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:u.post_types.includes(e),onChange:t=>d({post_types:t.target.checked?[...u.post_types,e]:u.post_types.filter(t=>t!==e)})}),e===`page`?`Pages`:`Posts`]},e)),(0,L.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:!!u.include_tax,onChange:e=>d({include_tax:e.target.checked})}),b(`Topics`,`ai-rank-suite`)]})]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Max items per section`,`ai-rank-suite`)}),(0,L.jsx)(`input`,{type:`number`,min:`5`,max:`200`,value:u.max_items,onChange:e=>d({max_items:Number(e.target.value)}),style:{width:110}})]}),(0,L.jsxs)(`div`,{className:`ars-r-md p-3 grid gap-3`,style:{background:`var(--ars-surface-2)`},children:[(0,L.jsx)(Ee,{checked:!!u.full_enabled,onChange:e=>d({full_enabled:e}),label:b(`Also serve /llms-full.txt (long version, full page content)`,`ai-rank-suite`)}),u.full_enabled&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Max pages in full version`,`ai-rank-suite`)}),(0,L.jsx)(`input`,{type:`number`,min:`5`,max:`200`,value:u.full_max_items,onChange:e=>d({full_max_items:Number(e.target.value)}),style:{width:110}})]})]}),re((0,L.jsx)(A,{variant:`ghost`,onClick:w,busy:i,children:b(`Regenerate preview`,`ai-rank-suite`)})),(0,L.jsxs)(`div`,{className:`m-0 text-[12px] grid gap-1`,style:{color:`var(--ars-ink-3)`},children:[(0,L.jsxs)(`span`,{children:[(0,L.jsxs)(`a`,{href:n.url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1`,children:[`/llms.txt `,(0,L.jsx)(vt,{size:11})]}),` `,`— curated index (short)`]}),u.full_enabled&&(0,L.jsxs)(`span`,{children:[(0,L.jsxs)(`a`,{href:n.full_url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1`,children:[`/llms-full.txt `,(0,L.jsx)(vt,{size:11})]}),` `,`— full page content (long)`]}),(0,L.jsx)(`span`,{children:b(`Requires pretty permalinks. AI summaries as descriptions arrive with the AI modules.`,`ai-rank-suite`)})]})]})}),(0,L.jsx)(Se,{title:b(`Identity & citation`,`ai-rank-suite`),note:u.brand||window.airanksuiteData?.siteName||``,children:(0,L.jsxs)(`div`,{className:`grid gap-3`,children:[(0,L.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Read verbatim by the model. Everything here is a sentence you get to write instead of one it invents.`,`ai-rank-suite`)}),(0,L.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Brand name`,`ai-rank-suite`)}),(0,L.jsx)(`input`,{type:`text`,placeholder:window.airanksuiteData?.siteName,value:u.brand||``,onChange:e=>d({brand:e.target.value})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Preferred citation`,`ai-rank-suite`)}),(0,L.jsx)(`input`,{type:`text`,placeholder:b(`Brand Name (example.com)`,`ai-rank-suite`),value:u.citation||``,onChange:e=>d({citation:e.target.value})})]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`One-sentence summary`,`ai-rank-suite`)}),(0,L.jsx)(`textarea`,{rows:2,placeholder:b(`Independent guides to X for Y.`,`ai-rank-suite`),value:u.summary||``,onChange:e=>d({summary:e.target.value})}),(0,L.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`This becomes the blockquote under your name — the line an assistant repeats when asked what your site is. Write it as the answer to that question, not as a slogan.`,`ai-rank-suite`)})]}),(0,L.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Contact URL`,`ai-rank-suite`)}),(0,L.jsx)(`input`,{type:`text`,placeholder:`https://example.com/contact`,value:u.contact||``,onChange:e=>d({contact:e.target.value})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Content usage`,`ai-rank-suite`)}),(0,L.jsx)(`input`,{type:`text`,placeholder:b(`Quote freely with a link back.`,`ai-rank-suite`),value:u.license||``,onChange:e=>d({license:e.target.value})})]})]}),(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[(0,L.jsx)(Ee,{checked:!!u.declare_lang,onChange:e=>d({declare_lang:e}),label:b(`Declare the site language`,`ai-rank-suite`)}),(0,L.jsx)(Ee,{checked:!!u.link_sitemap,onChange:e=>d({link_sitemap:e}),label:b(`Link the XML sitemap`,`ai-rank-suite`)}),(0,L.jsx)(Ee,{checked:!!u.link_feed,onChange:e=>d({link_feed:e}),label:b(`Link the RSS feed`,`ai-rank-suite`)})]}),re()]})}),(0,L.jsx)(Se,{title:b(`Pinned pages`,`ai-rank-suite`),note:te?S(b(`%d / 20 pinned`,`ai-rank-suite`),te):b(`nothing pinned yet`,`ai-rank-suite`),children:(0,L.jsxs)(`div`,{className:`grid gap-3`,children:[(0,L.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Placed at the very top, in this order. An assistant that stops reading after ten links has still read the ten you chose.`,`ai-rank-suite`)}),te>0&&(0,L.jsx)(`div`,{className:`grid gap-1.5`,children:(u.key_pages||[]).map((e,t)=>{let r=(n.candidates||[]).find(t=>t.id===e),i=e=>{let n=[...u.key_pages];e<0||e>=n.length||([n[t],n[e]]=[n[e],n[t]],d({key_pages:n}))};return(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-3 ars-r-md px-3 py-2`,style:{background:`var(--ars-surface-2)`},children:[(0,L.jsxs)(`span`,{className:`flex items-center gap-2.5 min-w-0`,children:[(0,L.jsx)(`span`,{className:`t-num text-[12px]`,style:{color:`var(--ars-ink-3)`,width:16},children:t+1}),(0,L.jsx)(`span`,{className:`text-[13px] truncate`,children:r?r.title:`#${e}`})]}),(0,L.jsxs)(`span`,{className:`flex items-center gap-1 shrink-0`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:()=>i(t-1),disabled:t===0,className:`ars-move`,"aria-label":b(`Move up`,`ai-rank-suite`),children:`↑`}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>i(t+1),disabled:t===u.key_pages.length-1,className:`ars-move`,"aria-label":b(`Move down`,`ai-rank-suite`),children:`↓`}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>d({key_pages:u.key_pages.filter(t=>t!==e)}),className:`ars-move`,"aria-label":b(`Remove`,`ai-rank-suite`),children:(0,L.jsx)(Mt,{size:12})})]})]},e)})}),(0,L.jsxs)(`select`,{value:``,onChange:e=>{let t=Number(e.target.value);if(!t)return;let n=u.key_pages||[];n.includes(t)||n.length>=20||d({key_pages:[...n,t]})},"aria-label":b(`Pin a page`,`ai-rank-suite`),children:[(0,L.jsx)(`option`,{value:``,children:b(`Pin a page…`,`ai-rank-suite`)}),(n.candidates||[]).filter(e=>!(u.key_pages||[]).includes(e.id)).map(e=>(0,L.jsx)(`option`,{value:e.id,children:e.title},e.id))]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Section heading`,`ai-rank-suite`)}),(0,L.jsx)(`input`,{type:`text`,placeholder:b(`Start here`,`ai-rank-suite`),value:u.key_label||``,onChange:e=>d({key_label:e.target.value}),style:{maxWidth:260}})]}),re()]})}),(0,L.jsx)(Se,{title:b(`Anything the generator cannot know`,`ai-rank-suite`),note:u.extra?b(`custom markdown appended`,`ai-rank-suite`):b(`nothing appended`,`ai-rank-suite`),children:(0,L.jsxs)(`div`,{className:`grid gap-3`,children:[(0,L.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Appended as markdown at the end — products, service areas, pricing, or a note distinguishing you from a similarly named company.`,`ai-rank-suite`)}),(0,L.jsx)(`textarea`,{rows:5,className:`ars-mono`,placeholder:`## Coverage
     8`+e.stack}return{value:e,source:t,stack:i,digest:null}}function js(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ms(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Ns=typeof WeakMap==`function`?WeakMap:Map;function Ps(e,t,n){n=lo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){K||(K=!0,ul=r),Ms(e,t)},n}function Fs(e,t,n){n=lo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Ms(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Ms(e,t),typeof r!=`function`&&(dl===null?dl=new Set([this]):dl.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Is(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ns;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Ul.bind(null,e,t,n),t.then(e,e))}function Ls(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null||t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Rs(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=lo(-1,1),t.tag=2,uo(n,t,1))),n.lanes|=1),e)}var zs=C.ReactCurrentOwner,Bs=!1;function Vs(e,t,n,r){t.child=e===null?qa(t,null,n,r):Ka(t,e.child,n,r)}function Hs(e,t,n,r,i){n=n.render;var a=t.ref;return eo(t,i),r=zo(e,t,n,r,a,i),n=Bo(),e!==null&&!Bs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,cc(e,t,i)):(ja&&n&&Da(t),t.flags|=1,Vs(e,t,r,i),t.child)}function Us(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Zl(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Ws(e,t,a,r,i)):(e=eu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ir:n,n(o,r)&&e.ref===t.ref)return cc(e,t,i)}return t.flags|=1,e=$l(a,r),e.ref=t.ref,e.return=t,t.child=e}function Ws(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ir(a,r)&&e.ref===t.ref)if(Bs=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Bs=!0);else return t.lanes=e.lanes,cc(e,t,i)}return qs(e,t,n,r,i)}function Gs(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ea(G,$c),$c|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ea(G,$c),$c|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,ea(G,$c),$c|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),ea(G,$c),$c|=r;return Vs(e,t,i,n),t.child}function Ks(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function qs(e,t,n,r,i){var a=I(n)?ia:na.current;return a=aa(t,a),eo(t,i),n=zo(e,t,n,r,a,i),r=Bo(),e!==null&&!Bs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,cc(e,t,i)):(ja&&r&&Da(t),t.flags|=1,Vs(e,t,n,i),t.child)}function Js(e,t,n,r,i){if(I(n)){var a=!0;la(t)}else a=!1;if(eo(t,i),t.stateNode===null)sc(e,t),Ds(t,n,r),ks(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=to(l):(l=I(n)?ia:na.current,l=aa(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&Os(t,o,r,l),oo=!1;var f=t.memoizedState;o.state=f,B(t,r,o,i),c=t.memoizedState,s!==r||f!==c||ra.current||oo?(typeof u==`function`&&(ws(t,n,u,r),c=t.memoizedState),(s=oo||Es(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,co(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Cs(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=to(c):(c=I(n)?ia:na.current,c=aa(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&Os(t,o,r,c),oo=!1,f=t.memoizedState,o.state=f,B(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||ra.current||oo?(typeof p==`function`&&(ws(t,n,p,r),m=t.memoizedState),(l=oo||Es(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Ys(e,t,n,r,a,i)}function Ys(e,t,n,r,i,a){Ks(e,t);var o=!!(t.flags&128);if(!r&&!o)return i&&ua(t,n,!1),cc(e,t,a);r=t.stateNode,zs.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ka(t,e.child,null,a),t.child=Ka(t,null,s,a)):Vs(e,t,s,a),t.memoizedState=r.state,i&&ua(t,n,!0),t.child}function Xs(e){var t=e.stateNode;t.pendingContext?sa(e,t.pendingContext,t.pendingContext!==t.context):t.context&&sa(e,t.context,!1),bo(e,t.containerInfo)}function Zs(e,t,n,r,i){return za(),Ba(i),t.flags|=256,Vs(e,t,n,r),t.child}var Qs={dehydrated:null,treeContext:null,retryLane:0};function $s(e){return{baseLanes:e,cachePool:null,transitions:null}}function ec(e,t,n){var r=t.pendingProps,i=wo.current,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(i&2)),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ea(wo,i&1),e===null)return Ia(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.lanes=t.mode&1?e.data===`$!`?8:1073741824:1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=nu(o,r,0,null),e=tu(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=$s(n),t.memoizedState=Qs,e):tc(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return rc(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=$l(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=tu(a,o,n,null),a.flags|=2):a=$l(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?$s(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Qs,r}return a=e.child,e=a.sibling,r=$l(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function tc(e,t){return t=nu({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function nc(e,t,n,r){return r!==null&&Ba(r),Ka(t,e.child,null,n),e=tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function rc(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=js(Error(r(422))),nc(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=nu({mode:`visible`,children:i.children},a,0,null),o=tu(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Ka(t,e.child,null,s),t.child.memoizedState=$s(s),t.memoizedState=Qs,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return nc(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=js(o,i,void 0),nc(e,t,s,i)}if(c=(s&e.childLanes)!==0,Bs||c){if(i=Xc,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,ao(e,a),bl(i,e,a,-1))}return Nl(),i=js(Error(r(421))),nc(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=Gl.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Aa=Li(a.nextSibling),ka=t,ja=!0,Ma=null,e!==null&&(ba[xa++]=Ca,ba[xa++]=wa,ba[xa++]=Sa,Ca=e.id,wa=e.overflow,Sa=t),t=tc(t,i.children),t.flags|=4096,t)}function ic(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$a(e.return,t,n)}function ac(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function oc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Vs(e,t,r.children,n),r=wo.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ic(e,n,t);else if(e.tag===19)ic(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ea(wo,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&V(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ac(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&V(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ac(t,!0,n,null,a);break;case`together`:ac(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function sc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function cc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nl|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=$l(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=$l(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function lc(e,t,n){switch(t.tag){case 3:Xs(t),za();break;case 5:So(t);break;case 1:I(t.type)&&la(t);break;case 4:bo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ea(z,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ea(wo,wo.current&1),e=cc(e,t,n),e===null?null:e.sibling):ec(e,t,n):(ea(wo,wo.current&1),t.flags|=128,null);ea(wo,wo.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return oc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ea(wo,wo.current),r)break;return null;case 22:case 23:return t.lanes=0,Gs(e,t,n)}return cc(e,t,n)}var uc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},dc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,yo(go.current);var o=null;switch(n){case`input`:i=Ce(e,i),r=Ce(e,r),o=[];break;case`select`:i=ue({},i,{value:void 0}),r=ue({},r,{value:void 0}),o=[];break;case`textarea`:i=A(e,i),r=A(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=Di)}He(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null));for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null))if(u===`style`)if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l;else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&pi(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},fc=function(e,t,n,r){n!==r&&(t.flags|=4)};function pc(e,t){if(!ja)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function mc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function hc(e,t,n){var i=t.pendingProps;switch(Oa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mc(t),null;case 1:return I(t.type)&&oa(),mc(t),null;case 3:return i=t.stateNode,xo(),$i(ra),$i(na),Eo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(La(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ma!==null&&(wl(Ma),Ma=null))),mc(t),null;case 5:Co(t);var o=yo(vo.current);if(n=t.type,e!==null&&t.stateNode!=null)dc(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return mc(t),null}if(e=yo(go.current),La(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Bi]=t,i[Vi]=s,e=!!(t.mode&1),n){case`dialog`:pi(`cancel`,i),pi(`close`,i);break;case`iframe`:case`object`:case`embed`:pi(`load`,i);break;case`video`:case`audio`:for(o=0;o<li.length;o++)pi(li[o],i);break;case`source`:pi(`error`,i);break;case`img`:case`image`:case`link`:pi(`error`,i),pi(`load`,i);break;case`details`:pi(`toggle`,i);break;case`input`:we(i,s),pi(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},pi(`invalid`,i);break;case`textarea`:je(i,s),pi(`invalid`,i)}for(var c in He(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&Ei(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&Ei(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&pi(`scroll`,i)}switch(n){case`input`:be(i),De(i,s,!0);break;case`textarea`:be(i),j(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=Di)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=Ne(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Bi]=t,e[Vi]=i,uc(e,t,!1,!1),t.stateNode=e;a:{switch(c=Ue(n,i),n){case`dialog`:pi(`cancel`,e),pi(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:pi(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<li.length;o++)pi(li[o],e);o=i;break;case`source`:pi(`error`,e),o=i;break;case`img`:case`image`:case`link`:pi(`error`,e),pi(`load`,e),o=i;break;case`details`:pi(`toggle`,e),o=i;break;case`input`:we(e,i),o=Ce(e,i),pi(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=ue({},i,{value:void 0}),pi(`invalid`,e);break;case`textarea`:je(e,i),o=A(e,i),pi(`invalid`,e);break;default:o=i}for(s in He(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?M(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Ie(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Le(e,u):typeof u==`number`&&Le(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&pi(`scroll`,e):u!=null&&S(e,s,u,c))}switch(n){case`input`:be(e),De(e,i,!1);break;case`textarea`:be(e),j(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+ve(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&Ae(e,!!i.multiple,i.defaultValue,!0):Ae(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=Di)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return mc(t),null;case 6:if(e&&t.stateNode!=null)fc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=yo(vo.current),yo(go.current),La(t)){if(i=t.stateNode,n=t.memoizedProps,i[Bi]=t,(s=i.nodeValue!==n)&&(e=ka,e!==null))switch(e.tag){case 3:Ei(i.nodeValue,n,!!(e.mode&1));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Ei(i.nodeValue,n,!!(e.mode&1))}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Bi]=t,t.stateNode=i}return mc(t),null;case 13:if($i(wo),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ja&&Aa!==null&&t.mode&1&&!(t.flags&128))Ra(),za(),t.flags|=98560,s=!1;else if(s=La(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[Bi]=t}else za(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;mc(t),s=!1}else Ma!==null&&(wl(Ma),Ma=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||wo.current&1?el===0&&(el=3):Nl())),t.updateQueue!==null&&(t.flags|=4),mc(t),null);case 4:return xo(),e===null&&gi(t.stateNode.containerInfo),mc(t),null;case 10:return Qa(t.type._context),mc(t),null;case 17:return I(t.type)&&oa(),mc(t),null;case 19:if($i(wo),s=t.memoizedState,s===null)return mc(t),null;if(i=!!(t.flags&128),c=s.rendering,c===null)if(i)pc(s,!1);else{if(el!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=V(e),c!==null){for(t.flags|=128,pc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ea(wo,wo.current&1|2),t.child}e=e.sibling}s.tail!==null&&St()>cl&&(t.flags|=128,i=!0,pc(s,!1),t.lanes=4194304)}else{if(!i)if(e=V(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),pc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!ja)return mc(t),null}else 2*St()-s.renderingStartTime>cl&&n!==1073741824&&(t.flags|=128,i=!0,pc(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(mc(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=St(),t.sibling=null,n=wo.current,ea(wo,i?n&1|2:n&1),t);case 22:case 23:return Al(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?$c&1073741824&&(mc(t),t.subtreeFlags&6&&(t.flags|=8192)):mc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function gc(e,t){switch(Oa(t),t.tag){case 1:return I(t.type)&&oa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xo(),$i(ra),$i(na),Eo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Co(t),null;case 13:if($i(wo),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));za()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return $i(wo),null;case 4:return xo(),null;case 10:return Qa(t.type._context),null;case 22:case 23:return Al(),null;case 24:return null;default:return null}}var _c=!1,vc=!1,yc=typeof WeakSet==`function`?WeakSet:Set,bc=null;function xc(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){Hl(e,t,n)}else n.current=null}function Sc(e,t,n){try{n()}catch(n){Hl(e,t,n)}}var Cc=!1;function wc(e,t){if(Oi=xn,e=Br(),Vr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(ki={focusedElem:e,selectionRange:n},xn=!1,bc=t;bc!==null;)if(t=bc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,bc=e;else for(;bc!==null;){t=bc;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Cs(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){Hl(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,bc=e;break}bc=t.return}return h=Cc,Cc=!1,h}function Tc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Sc(t,n,a)}i=i.next}while(i!==r)}}function Ec(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Dc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Oc(e){var t=e.alternate;t!==null&&(e.alternate=null,Oc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Bi],delete t[Vi],delete t[Ui],delete t[Wi],delete t[Gi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function kc(e){return e.tag===5||e.tag===3||e.tag===4}function Ac(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||kc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Di));else if(r!==4&&(e=e.child,e!==null))for(jc(e,t,n),e=e.sibling;e!==null;)jc(e,t,n),e=e.sibling}function Mc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Mc(e,t,n),e=e.sibling;e!==null;)Mc(e,t,n),e=e.sibling}var Nc=null,Pc=!1;function Fc(e,t,n){for(n=n.child;n!==null;)Ic(e,t,n),n=n.sibling}function Ic(e,t,n){if(At&&typeof At.onCommitFiberUnmount==`function`)try{At.onCommitFiberUnmount(kt,n)}catch{}switch(n.tag){case 5:vc||xc(n,t);case 6:var r=Nc,i=Pc;Nc=null,Fc(e,t,n),Nc=r,Pc=i,Nc!==null&&(Pc?(e=Nc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Nc.removeChild(n.stateNode));break;case 18:Nc!==null&&(Pc?(e=Nc,n=n.stateNode,e.nodeType===8?Ii(e.parentNode,n):e.nodeType===1&&Ii(e,n),yn(e)):Ii(Nc,n.stateNode));break;case 4:r=Nc,i=Pc,Nc=n.stateNode.containerInfo,Pc=!0,Fc(e,t,n),Nc=r,Pc=i;break;case 0:case 11:case 14:case 15:if(!vc&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Sc(n,t,o),i=i.next}while(i!==r)}Fc(e,t,n);break;case 1:if(!vc&&(xc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Hl(n,t,e)}Fc(e,t,n);break;case 21:Fc(e,t,n);break;case 22:n.mode&1?(vc=(r=vc)||n.memoizedState!==null,Fc(e,t,n),vc=r):Fc(e,t,n);break;default:Fc(e,t,n)}}function Lc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new yc),t.forEach(function(t){var r=Kl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function W(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:Nc=c.stateNode,Pc=!1;break a;case 3:Nc=c.stateNode.containerInfo,Pc=!0;break a;case 4:Nc=c.stateNode.containerInfo,Pc=!0;break a}c=c.return}if(Nc===null)throw Error(r(160));Ic(o,s,a),Nc=null,Pc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){Hl(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Rc(t,e),t=t.sibling}function Rc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(W(t,e),zc(e),i&4){try{Tc(3,e,e.return),Ec(3,e)}catch(t){Hl(e,e.return,t)}try{Tc(5,e,e.return)}catch(t){Hl(e,e.return,t)}}break;case 1:W(t,e),zc(e),i&512&&n!==null&&xc(n,n.return);break;case 5:if(W(t,e),zc(e),i&512&&n!==null&&xc(n,n.return),e.flags&32){var a=e.stateNode;try{Le(a,``)}catch(t){Hl(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&Te(a,o),Ue(c,s);var u=Ue(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?M(a,f):d===`dangerouslySetInnerHTML`?Ie(a,f):d===`children`?Le(a,f):S(a,d,f,u)}switch(c){case`input`:Ee(a,o);break;case`textarea`:Me(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?Ae(a,!!o.multiple,o.multiple?[]:``,!1):Ae(a,!!o.multiple,o.defaultValue,!0)):Ae(a,!!o.multiple,m,!1)}a[Vi]=o}catch(t){Hl(e,e.return,t)}}break;case 6:if(W(t,e),zc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){Hl(e,e.return,t)}}break;case 3:if(W(t,e),zc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{yn(t.containerInfo)}catch(t){Hl(e,e.return,t)}break;case 4:W(t,e),zc(e);break;case 13:W(t,e),zc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(sl=St())),i&4&&Lc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(vc=(u=vc)||d,W(t,e),vc=u):W(t,e),zc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(bc=e,d=e.child;d!==null;){for(f=bc=d;bc!==null;){switch(p=bc,m=p.child,p.tag){case 0:case 11:case 14:case 15:Tc(4,p,p.return);break;case 1:xc(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){Hl(i,n,e)}}break;case 5:xc(p,p.return);break;case 22:if(p.memoizedState!==null){Uc(f);continue}}m===null?Uc(f):(m.return=p,bc=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=Be(`display`,s))}catch(t){Hl(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){Hl(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:W(t,e),zc(e),i&4&&Lc(e);break;case 21:break;default:W(t,e),zc(e)}}function zc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(kc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Le(a,``),i.flags&=-33),Mc(e,Ac(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;jc(e,Ac(e),o);break;default:throw Error(r(161))}}catch(t){Hl(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Bc(e,t,n){bc=e,Vc(e,t,n)}function Vc(e,t,n){for(var r=!!(e.mode&1);bc!==null;){var i=bc,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||_c;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||vc;s=_c;var l=vc;if(_c=o,(vc=c)&&!l)for(bc=i;bc!==null;)o=bc,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?Wc(i):(c.return=o,bc=c);for(;a!==null;)bc=a,Vc(a,t,n),a=a.sibling;bc=i,_c=s,vc=l}Hc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,bc=a):Hc(e,t,n)}}function Hc(e){for(;bc!==null;){var t=bc;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:vc||Ec(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!vc)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Cs(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&mo(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}mo(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&yn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}vc||t.flags&512&&Dc(t)}catch(e){Hl(t,t.return,e)}}if(t===e){bc=null;break}if(n=t.sibling,n!==null){n.return=t.return,bc=n;break}bc=t.return}}function Uc(e){for(;bc!==null;){var t=bc;if(t===e){bc=null;break}var n=t.sibling;if(n!==null){n.return=t.return,bc=n;break}bc=t.return}}function Wc(e){for(;bc!==null;){var t=bc;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ec(4,t)}catch(e){Hl(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){Hl(t,i,e)}}var a=t.return;try{Dc(t)}catch(e){Hl(t,a,e)}break;case 5:var o=t.return;try{Dc(t)}catch(e){Hl(t,o,e)}}}catch(e){Hl(t,t.return,e)}if(t===e){bc=null;break}var s=t.sibling;if(s!==null){s.return=t.return,bc=s;break}bc=t.return}}var Gc=Math.ceil,Kc=C.ReactCurrentDispatcher,qc=C.ReactCurrentOwner,Jc=C.ReactCurrentBatchConfig,Yc=0,Xc=null,Zc=null,Qc=0,$c=0,G=Qi(0),el=0,tl=null,nl=0,rl=0,il=0,al=null,ol=null,sl=0,cl=1/0,ll=null,K=!1,ul=null,dl=null,fl=!1,pl=null,ml=0,hl=0,gl=null,q=-1,_l=0;function vl(){return Yc&6?St():q===-1?q=St():q}function yl(e){return e.mode&1?Yc&2&&Qc!==0?Qc&-Qc:Va.transition===null?(e=Jt,e===0?(e=window.event,e=e===void 0?16:Dn(e.type),e):e):(_l===0&&(_l=Ut()),_l):1}function bl(e,t,n,i){if(50<hl)throw hl=0,gl=null,Error(r(185));Gt(e,n,i),(!(Yc&2)||e!==Xc)&&(e===Xc&&(!(Yc&2)&&(rl|=n),el===4&&El(e,Qc)),xl(e,i),n===1&&Yc===0&&!(t.mode&1)&&(cl=St()+500,fa&&ga()))}function xl(e,t){var n=e.callbackNode;Vt(e,t);var r=zt(e,e===Xc?Qc:0);if(r===0)n!==null&&yt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&yt(n),t===1)e.tag===0?ha(Dl.bind(null,e)):ma(Dl.bind(null,e)),Pi(function(){!(Yc&6)&&ga()}),n=null;else{switch(Yt(r)){case 1:n=wt;break;case 4:n=Tt;break;case 16:n=Et;break;case 536870912:n=Ot;break;default:n=Et}n=Jl(n,Sl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Sl(e,t){if(q=-1,_l=0,Yc&6)throw Error(r(327));var n=e.callbackNode;if(Bl()&&e.callbackNode!==n)return null;var i=zt(e,e===Xc?Qc:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Pl(e,i);else{t=i;var a=Yc;Yc|=2;var o=Ml();(Xc!==e||Qc!==t)&&(ll=null,cl=St()+500,J(e,t));do try{Il();break}catch(t){jl(e,t)}while(1);Za(),Kc.current=o,Yc=a,Zc===null?(Xc=null,Qc=0,t=el):t=0}if(t!==0){if(t===2&&(a=Ht(e),a!==0&&(i=a,t=Cl(e,a))),t===1)throw n=tl,J(e,0),El(e,i),xl(e,St()),n;if(t===6)El(e,i);else{if(a=e.current.alternate,!(i&30)&&!Tl(a)&&(t=Pl(e,i),t===2&&(o=Ht(e),o!==0&&(i=o,t=Cl(e,o))),t===1))throw n=tl,J(e,0),El(e,i),xl(e,St()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:Y(e,ol,ll);break;case 3:if(El(e,i),(i&130023424)===i&&(t=sl+500-St(),10<t)){if(zt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){vl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=ji(Y.bind(null,e,ol,ll),t);break}Y(e,ol,ll);break;case 4:if(El(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-Mt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=St()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Gc(i/1960))-i,10<i){e.timeoutHandle=ji(Y.bind(null,e,ol,ll),i);break}Y(e,ol,ll);break;case 5:Y(e,ol,ll);break;default:throw Error(r(329))}}}return xl(e,St()),e.callbackNode===n?Sl.bind(null,e):null}function Cl(e,t){var n=al;return e.current.memoizedState.isDehydrated&&(J(e,t).flags|=256),e=Pl(e,t),e!==2&&(t=ol,ol=n,t!==null&&wl(t)),e}function wl(e){ol===null?ol=e:ol.push.apply(ol,e)}function Tl(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Fr(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function El(e,t){for(t&=~il,t&=~rl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Mt(t),r=1<<n;e[n]=-1,t&=~r}}function Dl(e){if(Yc&6)throw Error(r(327));Bl();var t=zt(e,0);if(!(t&1))return xl(e,St()),null;var n=Pl(e,t);if(e.tag!==0&&n===2){var i=Ht(e);i!==0&&(t=i,n=Cl(e,i))}if(n===1)throw n=tl,J(e,0),El(e,t),xl(e,St()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Y(e,ol,ll),xl(e,St()),null}function Ol(e,t){var n=Yc;Yc|=1;try{return e(t)}finally{Yc=n,Yc===0&&(cl=St()+500,fa&&ga())}}function kl(e){pl!==null&&pl.tag===0&&!(Yc&6)&&Bl();var t=Yc;Yc|=1;var n=Jc.transition,r=Jt;try{if(Jc.transition=null,Jt=1,e)return e()}finally{Jt=r,Jc.transition=n,Yc=t,!(Yc&6)&&ga()}}function Al(){$c=G.current,$i(G)}function J(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Mi(n)),Zc!==null)for(n=Zc.return;n!==null;){var r=n;switch(Oa(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&oa();break;case 3:xo(),$i(ra),$i(na),Eo();break;case 5:Co(r);break;case 4:xo();break;case 13:$i(wo);break;case 19:$i(wo);break;case 10:Qa(r.type._context);break;case 22:case 23:Al()}n=n.return}if(Xc=e,Zc=e=$l(e.current,null),Qc=$c=t,el=0,tl=null,il=rl=nl=0,ol=al=null,no!==null){for(t=0;t<no.length;t++)if(n=no[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}no=null}return e}function jl(e,t){do{var n=Zc;try{if(Za(),Do.current=bs,No){for(var i=Ao.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}No=!1}if(ko=0,Mo=jo=Ao=null,Po=!1,Fo=0,qc.current=null,n===null||n.return===null){el=1,tl=t,Zc=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=Qc,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Ls(s);if(m!==null){m.flags&=-257,Rs(m,s,c,o,t),m.mode&1&&Is(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}if(!(t&1)){Is(o,u,t),Nl();break a}l=Error(r(426))}else if(ja&&c.mode&1){var _=Ls(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Rs(_,s,c,o,t),Ba(As(l,c));break a}}o=l=As(l,c),el!==4&&(el=2),al===null?al=[o]:al.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Ps(o,l,t);po(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(dl===null||!dl.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Fs(o,c,t);po(o,x);break a}}o=o.return}while(o!==null)}Rl(n)}catch(e){t=e,Zc===n&&n!==null&&(Zc=n=n.return);continue}break}while(1)}function Ml(){var e=Kc.current;return Kc.current=bs,e===null?bs:e}function Nl(){(el===0||el===3||el===2)&&(el=4),Xc===null||!(nl&268435455)&&!(rl&268435455)||El(Xc,Qc)}function Pl(e,t){var n=Yc;Yc|=2;var i=Ml();(Xc!==e||Qc!==t)&&(ll=null,J(e,t));do try{Fl();break}catch(t){jl(e,t)}while(1);if(Za(),Yc=n,Kc.current=i,Zc!==null)throw Error(r(261));return Xc=null,Qc=0,el}function Fl(){for(;Zc!==null;)Ll(Zc)}function Il(){for(;Zc!==null&&!bt();)Ll(Zc)}function Ll(e){var t=ql(e.alternate,e,$c);e.memoizedProps=e.pendingProps,t===null?Rl(e):Zc=t,qc.current=null}function Rl(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=gc(n,t),n!==null){n.flags&=32767,Zc=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{el=6,Zc=null;return}}else if(n=hc(n,t,$c),n!==null){Zc=n;return}if(t=t.sibling,t!==null){Zc=t;return}Zc=t=e}while(t!==null);el===0&&(el=5)}function Y(e,t,n){var r=Jt,i=Jc.transition;try{Jc.transition=null,Jt=1,zl(e,t,n,r)}finally{Jc.transition=i,Jt=r}return null}function zl(e,t,n,i){do Bl();while(pl!==null);if(Yc&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Kt(e,o),e===Xc&&(Zc=Xc=null,Qc=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||fl||(fl=!0,Jl(Et,function(){return Bl(),null})),o=!!(n.flags&15990),n.subtreeFlags&15990||o){o=Jc.transition,Jc.transition=null;var s=Jt;Jt=1;var c=Yc;Yc|=4,qc.current=null,wc(e,n),Rc(n,e),Hr(ki),xn=!!Oi,ki=Oi=null,e.current=n,Bc(n,e,a),xt(),Yc=c,Jt=s,Jc.transition=o}else e.current=n;if(fl&&(fl=!1,pl=e,ml=a),o=e.pendingLanes,o===0&&(dl=null),jt(n.stateNode,i),xl(e,St()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(K)throw K=!1,e=ul,ul=null,e;return ml&1&&e.tag!==0&&Bl(),o=e.pendingLanes,o&1?e===gl?hl++:(hl=0,gl=e):hl=0,ga(),null}function Bl(){if(pl!==null){var e=Yt(ml),t=Jc.transition,n=Jt;try{if(Jc.transition=null,Jt=16>e?16:e,pl===null)var i=!1;else{if(e=pl,pl=null,ml=0,Yc&6)throw Error(r(331));var a=Yc;for(Yc|=4,bc=e.current;bc!==null;){var o=bc,s=o.child;if(bc.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(bc=u;bc!==null;){var d=bc;switch(d.tag){case 0:case 11:case 15:Tc(8,d,o)}var f=d.child;if(f!==null)f.return=d,bc=f;else for(;bc!==null;){d=bc;var p=d.sibling,m=d.return;if(Oc(d),d===u){bc=null;break}if(p!==null){p.return=m,bc=p;break}bc=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}bc=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,bc=s;else b:for(;bc!==null;){if(o=bc,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Tc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,bc=v;break b}bc=o.return}}var y=e.current;for(bc=y;bc!==null;){s=bc;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,bc=b;else b:for(s=y;bc!==null;){if(c=bc,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:Ec(9,c)}}catch(e){Hl(c,c.return,e)}if(c===s){bc=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,bc=x;break b}bc=c.return}}if(Yc=a,ga(),At&&typeof At.onPostCommitFiberRoot==`function`)try{At.onPostCommitFiberRoot(kt,e)}catch{}i=!0}return i}finally{Jt=n,Jc.transition=t}}return!1}function Vl(e,t,n){t=As(n,t),t=Ps(e,t,1),e=uo(e,t,1),t=vl(),e!==null&&(Gt(e,1,t),xl(e,t))}function Hl(e,t,n){if(e.tag===3)Vl(e,e,n);else for(;t!==null;){if(t.tag===3){Vl(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(dl===null||!dl.has(r))){e=As(n,e),e=Fs(t,e,1),t=uo(t,e,1),e=vl(),t!==null&&(Gt(t,1,e),xl(t,e));break}}t=t.return}}function Ul(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=vl(),e.pingedLanes|=e.suspendedLanes&n,Xc===e&&(Qc&n)===n&&(el===4||el===3&&(Qc&130023424)===Qc&&500>St()-sl?J(e,0):il|=n),xl(e,t)}function Wl(e,t){t===0&&(e.mode&1?(t=Lt,Lt<<=1,!(Lt&130023424)&&(Lt=4194304)):t=1);var n=vl();e=ao(e,t),e!==null&&(Gt(e,t,n),xl(e,n))}function Gl(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Wl(e,n)}function Kl(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),Wl(e,n)}var ql=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ra.current)Bs=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Bs=!1,lc(e,t,n);Bs=!!(e.flags&131072)}else Bs=!1,ja&&t.flags&1048576&&Ea(t,ya,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;sc(e,t),e=t.pendingProps;var a=aa(t,na.current);eo(t,n),a=zo(null,t,i,e,a,n);var o=Bo();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,I(i)?(o=!0,la(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,so(t),a.updater=Ts,t.stateNode=a,a._reactInternals=t,ks(t,i,e,n),t=Ys(null,t,i,!0,o,n)):(t.tag=0,ja&&o&&Da(t),Vs(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(sc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=Ql(i),e=Cs(i,e),a){case 0:t=qs(null,t,i,e,n);break a;case 1:t=Js(null,t,i,e,n);break a;case 11:t=Hs(null,t,i,e,n);break a;case 14:t=Us(null,t,i,Cs(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),qs(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),Js(e,t,i,a,n);case 3:a:{if(Xs(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,co(e,t),B(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=As(Error(r(423)),t),t=Zs(e,t,i,n,a);break a}else if(i!==a){a=As(Error(r(424)),t),t=Zs(e,t,i,n,a);break a}else for(Aa=Li(t.stateNode.containerInfo.firstChild),ka=t,ja=!0,Ma=null,n=qa(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(za(),i===a){t=cc(e,t,n);break a}Vs(e,t,i,n)}t=t.child}return t;case 5:return So(t),e===null&&Ia(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Ai(i,a)?s=null:o!==null&&Ai(i,o)&&(t.flags|=32),Ks(e,t),Vs(e,t,s,n),t.child;case 6:return e===null&&Ia(t),null;case 13:return ec(e,t,n);case 4:return bo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ka(t,null,i,n):Vs(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),Hs(e,t,i,a,n);case 7:return Vs(e,t,t.pendingProps,n),t.child;case 8:return Vs(e,t,t.pendingProps.children,n),t.child;case 12:return Vs(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,ea(z,i._currentValue),i._currentValue=s,o!==null)if(Fr(o.value,s)){if(o.children===a.children&&!ra.current){t=cc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=lo(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),$a(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),$a(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Vs(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,eo(t,n),a=to(a),i=i(a),t.flags|=1,Vs(e,t,i,n),t.child;case 14:return i=t.type,a=Cs(i,t.pendingProps),a=Cs(i.type,a),Us(e,t,i,a,n);case 15:return Ws(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),sc(e,t),t.tag=1,I(i)?(e=!0,la(t)):e=!1,eo(t,n),Ds(t,i,a),ks(t,i,a,n),Ys(null,t,i,!0,e,n);case 19:return oc(e,t,n);case 22:return Gs(e,t,n)}throw Error(r(156,t.tag))};function Jl(e,t){return vt(e,t)}function Yl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xl(e,t,n,r){return new Yl(e,t,n,r)}function Zl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ql(e){if(typeof e==`function`)return+!!Zl(e);if(e!=null){if(e=e.$$typeof,e===re)return 11;if(e===ae)return 14}return 2}function $l(e,t){var n=e.alternate;return n===null?(n=Xl(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function eu(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)Zl(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case E:return tu(n.children,a,o,t);case ee:s=8,a|=8;break;case te:return e=Xl(12,n,t,a|2),e.elementType=te,e.lanes=o,e;case O:return e=Xl(13,n,t,a),e.elementType=O,e.lanes=o,e;case ie:return e=Xl(19,n,t,a),e.elementType=ie,e.lanes=o,e;case se:return nu(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case D:s=10;break a;case ne:s=9;break a;case re:s=11;break a;case ae:s=14;break a;case oe:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=Xl(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function tu(e,t,n,r){return e=Xl(7,e,r,t),e.lanes=n,e}function nu(e,t,n,r){return e=Xl(22,e,r,t),e.elementType=se,e.lanes=n,e.stateNode={isHidden:!1},e}function ru(e,t,n){return e=Xl(6,e,null,t),e.lanes=n,e}function iu(e,t,n){return t=Xl(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function au(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wt(0),this.expirationTimes=Wt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ou(e,t,n,r,i,a,o,s,c){return e=new au(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=Xl(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},so(a),e}function su(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function cu(e){if(!e)return ta;e=e._reactInternals;a:{if(ft(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(I(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(I(n))return ca(e,n,t)}return t}function lu(e,t,n,r,i,a,o,s,c){return e=ou(n,r,!0,e,i,a,o,s,c),e.context=cu(null),n=e.current,r=vl(),i=yl(n),a=lo(r,i),a.callback=t??null,uo(n,a,i),e.current.lanes=i,Gt(e,i,r),xl(e,r),e}function X(e,t,n,r){var i=t.current,a=vl(),o=yl(i);return n=cu(n),t.context===null?t.context=n:t.pendingContext=n,t=lo(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=uo(i,t,o),e!==null&&(bl(e,i,o,a),fo(e,i,o)),o}function uu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function du(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function fu(e,t){du(e,t),(e=e.alternate)&&du(e,t)}function pu(){return null}var mu=typeof reportError==`function`?reportError:function(e){console.error(e)};function hu(e){this._internalRoot=e}gu.prototype.render=hu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));X(e,t,null,null)},gu.prototype.unmount=hu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;kl(function(){X(null,e,null,null)}),t[Hi]=null}};function gu(e){this._internalRoot=e}gu.prototype.unstable_scheduleHydration=function(e){if(e){var t=$t();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ln.length&&t!==0&&t<ln[n].priority;n++);ln.splice(n,0,e),n===0&&mn(e)}};function _u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function yu(){}function bu(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=uu(o);a.call(e)}}var o=lu(t,r,e,0,null,!1,!1,``,yu);return e._reactRootContainer=o,e[Hi]=o.current,gi(e.nodeType===8?e.parentNode:e),kl(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=uu(c);s.call(e)}}var c=ou(e,0,!1,null,null,!1,!1,``,yu);return e._reactRootContainer=c,e[Hi]=c.current,gi(e.nodeType===8?e.parentNode:e),kl(function(){X(t,c,n,r)}),c}function xu(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=uu(o);s.call(e)}}X(t,o,e,i)}else o=bu(n,t,e,i,r);return uu(o)}Xt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Rt(t.pendingLanes);n!==0&&(qt(t,n|1),xl(t,St()),!(Yc&6)&&(cl=St()+500,ga()))}break;case 13:kl(function(){var t=ao(e,1);t!==null&&bl(t,e,1,vl())}),fu(e,1)}},Zt=function(e){if(e.tag===13){var t=ao(e,134217728);t!==null&&bl(t,e,134217728,vl()),fu(e,134217728)}},Qt=function(e){if(e.tag===13){var t=yl(e),n=ao(e,t);n!==null&&bl(n,e,t,vl()),fu(e,t)}},$t=function(){return Jt},en=function(e,t){var n=Jt;try{return Jt=e,t()}finally{Jt=n}},Ke=function(e,t,n){switch(t){case`input`:if(Ee(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=Yi(i);if(!a)throw Error(r(90));xe(i),Ee(i,a)}}}break;case`textarea`:Me(e,n);break;case`select`:t=n.value,t!=null&&Ae(e,!!n.multiple,t,!1)}},Qe=Ol,$e=kl;var Su={usingClientEntryPoint:!1,Events:[qi,Ji,Yi,Xe,Ze,Ol]},Cu={findFiberByHostInstance:Ki,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},wu={bundleType:Cu.bundleType,version:Cu.version,rendererPackageName:Cu.rendererPackageName,rendererConfig:Cu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=gt(e),e===null?null:e.stateNode},findFiberByHostInstance:Cu.findFiberByHostInstance||pu,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tu.isDisabled&&Tu.supportsFiber)try{kt=Tu.inject(wu),At=Tu}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Su,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_u(t))throw Error(r(200));return su(e,t,null,n)},e.createRoot=function(e,t){if(!_u(e))throw Error(r(299));var n=!1,i=``,a=mu;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=ou(e,1,!1,null,null,n,!1,i,a),e[Hi]=t.current,gi(e.nodeType===8?e.parentNode:e),new hu(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=gt(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return kl(e)},e.hydrate=function(e,t,n){if(!vu(t))throw Error(r(200));return xu(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!_u(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=mu;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=lu(t,null,e,1,n??null,a,!1,o,s),e[Hi]=t.current,gi(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new gu(t)},e.render=function(e,t,n){if(!vu(t))throw Error(r(200));return xu(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!vu(e))throw Error(r(40));return e._reactRootContainer?(kl(function(){xu(null,null,e,!1,function(){e._reactRootContainer=null,e[Hi]=null})}),!0):!1},e.unstable_batchedUpdates=Ol,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!vu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return xu(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),g=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=s((e=>{var t=g();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot}));function v(e,...t){let n=0;return String(e).replace(/%(?:(\d+)\$)?([sdf%])/g,(e,r,i)=>{if(i===`%`)return`%`;let a=r?t[Number(r)-1]:t[n++];return a==null?``:String(i===`d`?parseInt(a,10)||0:i===`f`?parseFloat(a)||0:a)})}var y,b,x,S,C=o((()=>{y=()=>window.wp&&window.wp.i18n||null,b=(e,t)=>y()?y().__(e,t):e,x=(e,t,n,r)=>y()?y()._n(e,t,n,r):n===1?e:t,S=(...e)=>y()&&typeof y().sprintf==`function`?y().sprintf(...e):v(...e)}));async function w(){try{let e=ee.ajaxUrl||typeof window.ajaxurl==`string`&&window.ajaxurl||``;if(!e)return!1;let t=(await(await fetch(`${e}?action=rest-nonce`,{credentials:`same-origin`})).text()).trim();if(/^[a-z0-9]{8,20}$/i.test(t))return te=t,!0}catch{}return!1}function T(e,t){if(e!==401&&e!==403)return!1;let n=t&&t.code||``;return n===`rest_cookie_invalid_nonce`||n===`rest_forbidden`||n===``}async function E(e,t={},n=!1){let r=t.method||`GET`,i=r===`PUT`||r===`PATCH`||r===`DELETE`,a=ee.restUrl.includes(`?`)?`${ee.restUrl}${e.replace(`?`,`&`)}`:`${ee.restUrl}${e}`;a+=(a.includes(`?`)?`&`:`?`)+`_locale=user`;let o=await fetch(a,{...t,method:i?`POST`:r,headers:{"Content-Type":`application/json`,"X-WP-Nonce":te,...i?{"X-HTTP-Method-Override":r}:{},...t.headers||{}},credentials:`same-origin`}),s=await o.json().catch(()=>null);if(!o.ok&&!n&&T(o.status,s)&&await w())return E(e,t,!0);if(!o.ok){if(r!==`GET`)try{window.dispatchEvent(new CustomEvent(`airanksuite:request-failed`,{detail:{path:e,method:r,status:o.status,message:s&&s.message||``}}))}catch{}let t=s&&s.message||(o.status===403?S(b(`The server refused the request (403). Some hosts block %s requests — send this to your host if it persists.`,`ai-rank-suite`),r):S(b(`Request failed (%d)`,`ai-rank-suite`),o.status)),n=Error(t);throw n.status=o.status,n.code=s&&s.code||``,n.isMissingModule=o.status===404&&n.code===`rest_no_route`,n.isMissingModule&&(n.message=b(`This is a Pro feature and is not part of this installation.`,`ai-rank-suite`)),n.isLicense=o.status===402||n.code===`airanksuite_license_required`||n.isMissingModule,n.isLicense&&(n.manageUrl=s&&s.data&&s.data.manageUrl||``),n}return s}var ee,te,D,ne,re,O=o((()=>{C(),ee=Object.assign({restUrl:`/wp-json/airanksuite/v1`,nonce:``,siteName:``,tagline:``,homeUrl:``,version:``,screens:[]},window.airanksuiteData||{}),te=ee.nonce,D={get:e=>E(e),post:(e,t)=>E(e,{method:`POST`,body:t?JSON.stringify(t):void 0}),put:(e,t)=>E(e,{method:`PUT`,body:JSON.stringify(t)}),del:e=>E(e,{method:`DELETE`})},ne=ee,re=e=>!Array.isArray(ee.modules)||ee.modules.includes(e)}));function ie(){try{return window.localStorage.getItem(le)===`dark`?`dark`:`light`}catch{return`light`}}function ae(e){let t=e===`dark`?`dark`:`light`;try{window.localStorage.setItem(le,t)}catch{}let n=document.getElementById(`airanksuite-root`);return n&&n.setAttribute(`data-theme`,t),document.body&&document.body.classList.toggle(`airanksuite-dark`,t===`dark`),ue.forEach(e=>e(t)),t}function oe(e){return ue.add(e),()=>ue.delete(e)}function se(){let e=document.getElementById(`airanksuite-root`);if(!e||e.getAttribute(`data-theme`)===`dark`)return null;let t;try{t=document.createElement(`button`),t.className=`button button-primary`,t.setAttribute(`aria-hidden`,`true`),t.tabIndex=-1,t.style.cssText=`position:fixed;left:-9999px;top:-9999px;width:1px;height:1px;pointer-events:none`,document.body.appendChild(t);let n=de(window.getComputedStyle(t).backgroundColor);if(t.remove(),!n)return null;let r=0;for(;1.05/(fe(n)+.05)<4.5&&r<12;)n=pe(n,.08),r+=1;let i=me(n),a=me(pe(n,.14));return e.style.setProperty(`--ars-brand`,i),e.style.setProperty(`--ars-brand-ink`,i),e.style.setProperty(`--ars-brand-hover`,a),e.style.setProperty(`--ars-brand-fill`,i),e.style.setProperty(`--ars-brand-fill-hover`,a),i}catch{return t&&t.remove&&t.remove(),null}}function ce(){let e=document.getElementById(`airanksuite-root`);if(e)for(let t of[`--ars-brand`,`--ars-brand-ink`,`--ars-brand-hover`,`--ars-brand-fill`,`--ars-brand-fill-hover`])e.style.removeProperty(t)}var le,ue,de,fe,pe,me,he=o((()=>{le=`airanksuite-theme`,ue=new Set,de=e=>{let t=/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)/.exec(e||``);return!t||(/^rgba\(/.test(e)?Number((/[\d.]+\s*\)$/.exec(e)||[`1`])[0].replace(`)`,``)):1)<.9?null:[Number(t[1]),Number(t[2]),Number(t[3])]},fe=([e,t,n])=>{let r=e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(e)+.7152*r(t)+.0722*r(n)},pe=([e,t,n],r)=>[Math.round(e*(1-r)),Math.round(t*(1-r)),Math.round(n*(1-r))],me=([e,t,n])=>`rgb(${e}, ${t}, ${n})`})),ge=s((e=>{var t=f(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),_e=s(((e,t)=>{t.exports=ge()}));async function ve(e){let t=String(e??``);if(!t)return!1;if(navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(t),!0}catch{}try{let e=document.createElement(`textarea`);e.value=t,e.setAttribute(`readonly`,``),e.style.position=`fixed`,e.style.top=`-1000px`,e.style.opacity=`0`,document.body.appendChild(e),e.select(),e.setSelectionRange(0,t.length);let n=document.execCommand(`copy`);return document.body.removeChild(e),n}catch{return!1}}var ye=o((()=>{}));function k({title:e,subtitle:t,action:n,icon:r,tag:i,children:a,className:o=``,flush:s=!1}){let c=e||n||r;return(0,N.jsxs)(`section`,{className:`ars-card${s?` is-flush`:``} ${o}`,children:[c&&(0,N.jsxs)(`header`,{className:`ars-card-head`,children:[(0,N.jsxs)(`div`,{className:`flex items-start gap-3 min-w-0`,children:[r&&(0,N.jsx)(`span`,{className:`ars-card-icon`,children:r}),(0,N.jsxs)(`div`,{className:`min-w-0`,children:[i&&(0,N.jsx)(`span`,{className:`ars-card-tag`,children:i}),e&&(0,N.jsx)(`h2`,{className:`t-title m-0`,children:e}),t&&(0,N.jsx)(`p`,{className:`t-body m-0 mt-0.5 max-w-[88ch]`,children:t})]})]}),n&&(0,N.jsx)(`div`,{className:`shrink-0 flex items-center gap-2`,children:n})]}),(0,N.jsx)(`div`,{className:s?``:`ars-card-body`,children:a})]})}function be({tone:e=`neutral`,text:t,why:n,action:r,onAction:i,busy:a=!1,children:o}){return(0,N.jsxs)(`section`,{className:`ars-verdict is-${e}`,children:[(0,N.jsx)(`span`,{className:`ars-verdict-mark`,"aria-hidden":!0}),(0,N.jsxs)(`div`,{className:`ars-verdict-body`,children:[(0,N.jsx)(`p`,{className:`ars-verdict-text`,children:t}),n&&(0,N.jsx)(`p`,{className:`ars-verdict-why`,children:n}),o]}),r&&(0,N.jsx)(`div`,{className:`ars-verdict-action`,children:(0,N.jsx)(A,{variant:e===`bad`||e===`warning`?`primary`:`ghost`,busy:a,onClick:i,children:r})})]})}function xe({tone:e=`neutral`,text:t,sub:n,count:r=0,action:i,onAction:a,busy:o=!1,defaultOpen:s=!1,children:c}){let[l,u]=ot.useState(s),d=!!c;return(0,N.jsxs)(`section`,{className:`ars-advisor is-${e}${l?` is-open`:``}`,children:[(0,N.jsxs)(`div`,{className:`ars-advisor-row`,children:[(0,N.jsxs)(`button`,{type:`button`,className:`ars-advisor-head`,onClick:d?()=>u(e=>!e):void 0,"aria-expanded":d?l:void 0,disabled:!d,children:[(0,N.jsx)(`span`,{className:`ars-advisor-dot`,"aria-hidden":!0}),(0,N.jsx)(`span`,{className:`ars-advisor-text`,children:t}),n&&(0,N.jsx)(`span`,{className:`ars-advisor-sub`,children:n}),r>0&&(0,N.jsx)(`span`,{className:`ars-advisor-count`,children:r}),d&&(0,N.jsx)(`svg`,{className:`ars-advisor-caret`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,N.jsx)(`path`,{d:`m9 6 6 6-6 6`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`})})]}),i&&(0,N.jsx)(`span`,{className:`ars-advisor-action`,children:(0,N.jsx)(A,{variant:e===`bad`||e===`warning`?`primary`:`ghost`,busy:o,onClick:a,children:i})})]}),l&&c&&(0,N.jsx)(`div`,{className:`ars-advisor-body`,children:c})]})}function Se({value:e,max:t=100,label:n=`Score`,delta:r}){let i=Math.PI*58,a=Math.max(0,Math.min(1,(Number(e)||0)/t)),o=ot.useId();return(0,N.jsxs)(`div`,{className:`ars-gauge`,children:[(0,N.jsxs)(`svg`,{viewBox:`0 0 140 86`,role:`img`,"aria-label":S(b(`%1$s: %2$s of %3$s`,`ai-rank-suite`),n,e,t),children:[(0,N.jsx)(`defs`,{children:(0,N.jsxs)(`linearGradient`,{id:`${o}-arc`,x1:`0`,y1:`1`,x2:`1`,y2:`0`,children:[(0,N.jsx)(`stop`,{offset:`0%`,stopColor:`var(--ars-brand)`}),(0,N.jsx)(`stop`,{offset:`100%`,stopColor:`var(--ars-brand-2)`})]})}),(0,N.jsx)(`path`,{d:`M 12 78 A 58 58 0 0 1 128 78`,fill:`none`,stroke:`var(--ars-surface-3)`,strokeWidth:`12`,strokeLinecap:`round`}),a>0&&(0,N.jsx)(`path`,{d:`M 12 78 A 58 58 0 0 1 128 78`,fill:`none`,stroke:`url(#${o}-arc)`,strokeWidth:`12`,strokeLinecap:`round`,strokeDasharray:`${a*i} ${i}`,style:{transition:`stroke-dasharray 600ms cubic-bezier(0.2,0,0,1)`}}),(0,N.jsx)(`text`,{x:`70`,y:`64`,textAnchor:`middle`,className:`ars-gauge-value`,children:e}),(0,N.jsxs)(`text`,{x:`70`,y:`80`,textAnchor:`middle`,className:`ars-gauge-max`,children:[`/ `,t]})]}),r!=null&&(0,N.jsx)(`div`,{className:`ars-gauge-delta`,children:(0,N.jsx)(We,{value:r})})]})}function Ce({error:e,licensed:t=!0,proTitle:n,proNote:r,label:i=b(`Loading`,`ai-rank-suite`)}){return t?e?(0,N.jsx)(`div`,{className:`ars-page`,children:(0,N.jsx)(k,{title:b(`This screen could not load`,`ai-rank-suite`),subtitle:b(`The request to your site's REST API failed`,`ai-rank-suite`),children:(0,N.jsxs)(`div`,{className:`grid gap-3`,children:[(0,N.jsx)(M,{tone:`serious`,children:e}),(0,N.jsxs)(`div`,{className:`flex gap-2 flex-wrap`,children:[(0,N.jsx)(A,{onClick:()=>window.location.reload(),children:b(`Try again`,`ai-rank-suite`)}),(0,N.jsx)(A,{variant:`ghost`,onClick:()=>{window.location.hash=`/developer`},children:b(`Open developer tools`,`ai-rank-suite`)})]}),(0,N.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Usual causes: a security plugin or host firewall blocking /wp-json/, an expired login, or a module quarantined after an error — the developer tools show which.`,`ai-rank-suite`)})]})})}):(0,N.jsxs)(`div`,{className:`ars-page ars-pageskel`,"aria-busy":`true`,"aria-label":i,children:[(0,N.jsx)(`div`,{className:`ars-pageskel-bar`}),(0,N.jsxs)(`div`,{className:`ars-pageskel-grid`,children:[(0,N.jsx)(`div`,{className:`ars-pageskel-block`}),(0,N.jsx)(`div`,{className:`ars-pageskel-block`})]}),(0,N.jsx)(`div`,{className:`ars-pageskel-block is-tall`})]}):(0,N.jsx)(`div`,{className:`ars-page`,children:(0,N.jsx)(k,{title:n||b(`Part of AI Rank Suite Pro`,`ai-rank-suite`),children:(0,N.jsxs)(`div`,{className:`ars-pro is-compact`,children:[(0,N.jsx)(`span`,{className:`ars-pro-badge`,children:b(`Pro`,`ai-rank-suite`)}),(0,N.jsx)(`div`,{className:`min-w-0`,children:(0,N.jsx)(`p`,{className:`ars-pro-text`,children:r||b(`This screen reads data that Pro collects. Activating your licence turns it on; nothing here has been deleted.`,`ai-rank-suite`)})}),(0,N.jsx)(`a`,{className:`ars-btn ars-btn-ghost ars-pro-cta`,href:`#/settings/license`,children:b(`See Pro`,`ai-rank-suite`)})]})})})}function we({icon:e,title:t,children:n,action:r,onAction:i,compact:a=!1}){return(0,N.jsxs)(`div`,{className:`ars-empty${a?` is-compact`:``}`,children:[e&&(0,N.jsx)(`span`,{className:`ars-empty-icon`,"aria-hidden":!0,children:e}),(0,N.jsxs)(`div`,{className:`ars-empty-text`,children:[(0,N.jsx)(`div`,{className:`ars-empty-title`,children:t}),n&&(0,N.jsx)(`p`,{className:`ars-empty-body`,children:n})]}),r&&(0,N.jsx)(A,{variant:`ghost`,onClick:i,children:r})]})}function Te({items:e,onItem:t,empty:n}){let r=Math.max(1,...e.map(e=>e.value||0));return e.length?(0,N.jsx)(`ul`,{className:`ars-board`,children:e.map(e=>(0,N.jsx)(`li`,{className:`ars-board-row${t?` is-clickable`:``}`,children:(0,N.jsxs)(`button`,{type:`button`,className:`ars-board-hit`,onClick:t?()=>t(e):void 0,disabled:!t,children:[(0,N.jsx)(`span`,{className:`ars-board-label`,title:e.hint||e.label,children:e.label}),(0,N.jsx)(`span`,{className:`ars-board-track`,children:(0,N.jsx)(`span`,{className:`ars-board-fill`,style:{width:`${Math.round((e.value||0)/r*100)}%`,background:e.color}})}),(0,N.jsxs)(`span`,{className:`ars-board-value tabular-nums`,children:[e.display??e.value,e.unit&&(0,N.jsx)(`span`,{className:`ars-board-unit`,children:e.unit})]})]})},e.id))}):n||null}function Ee({metrics:e,columns:t=3,onSelect:n,active:r}){let i=Math.max(1,Math.min(t,(e||[]).length||1));return(0,N.jsx)(`div`,{className:`ars-metrics`,"data-columns":i,style:{"--ars-metrics-cols":i},children:e.map(e=>(0,N.jsxs)(n?`button`:`div`,{type:n?`button`:void 0,className:`ars-metrics-cell${r===(e.id||e.label)?` is-active`:``}${n?` is-clickable`:``}`,onClick:n?()=>n(e.id||e.label):void 0,style:e.accent?{"--ars-metric-accent":e.accent}:void 0,children:[(0,N.jsxs)(`span`,{className:`ars-metrics-label`,children:[e.label,e.hint&&(0,N.jsx)(`span`,{className:`ars-metrics-help`,title:e.hint,"aria-label":e.hint,children:`?`})]}),(0,N.jsxs)(`span`,{className:`ars-metrics-row`,children:[(0,N.jsxs)(`span`,{className:`ars-metrics-value tabular-nums`,children:[e.value,e.unit&&(0,N.jsx)(`span`,{className:`ars-metrics-unit`,children:e.unit})]}),e.delta!==void 0&&e.delta!==null&&(0,N.jsx)(We,{value:e.delta,invert:e.invert})]}),e.spark&&e.spark.length>1&&(0,N.jsx)(`span`,{className:`ars-metrics-spark`,children:(0,N.jsx)(Ue,{data:e.spark,color:e.accent||`var(--ars-brand)`,height:26})}),e.sub&&(0,N.jsx)(`span`,{className:`ars-metrics-sub`,children:e.sub}),e.accent&&(0,N.jsx)(`span`,{className:`ars-metrics-rule`,"aria-hidden":!0})]},e.id||e.label))})}function De({score:e,label:t,sub:n,segments:r=[],reach:i,note:a,tone:o,onClick:s,wide:c=!1}){let l=r.reduce((e,t)=>e+(t.value||0),0)||1;return(0,N.jsxs)(`button`,{type:`button`,className:`ars-scorerow${s?``:` is-static`}${c?` is-wide`:``}`,onClick:s,disabled:!s,children:[e==null?(0,N.jsx)(`span`,{className:`ars-scorerow-score`,style:{color:`var(--ars-ink-3)`},children:`—`}):(0,N.jsx)(`span`,{className:`ars-scorerow-score is-${o||(e=>e>=80?`good`:e>=50?`mid`:`bad`)(e)} tabular-nums`,children:e}),(0,N.jsxs)(`span`,{className:`ars-scorerow-text`,children:[(0,N.jsx)(`span`,{className:`ars-scorerow-label`,children:t}),n&&(0,N.jsx)(`span`,{className:`ars-scorerow-sub`,children:n})]}),(0,N.jsx)(`span`,{className:`ars-scorerow-bar`,role:`img`,"aria-label":r.map(e=>`${e.label}: ${e.value}`).join(`, `),children:r.filter(e=>(e.value||0)>0).map((e,t)=>(0,N.jsx)(`span`,{title:`${e.label}: ${e.value}`,style:{width:`${(e.value||0)/l*100}%`,background:e.color}},t))}),(0,N.jsxs)(`span`,{className:`ars-scorerow-reach`,title:a||void 0,children:[i,a&&(0,N.jsx)(`span`,{className:`ars-scorerow-note`,children:a})]}),s&&(0,N.jsx)(`svg`,{className:`ars-scorerow-caret`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,N.jsx)(`path`,{d:`m9 6 6 6-6 6`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`})})]})}function Oe({title:e,note:t,defaultOpen:n=!1,children:r}){let[i,a]=ot.useState(n);return(0,N.jsxs)(`section`,{className:`ars-panel${i?` is-open`:``}`,children:[(0,N.jsxs)(`button`,{type:`button`,className:`ars-panel-head`,onClick:()=>a(e=>!e),"aria-expanded":i,children:[(0,N.jsx)(`svg`,{className:`ars-panel-caret`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,N.jsx)(`path`,{d:`m9 6 6 6-6 6`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`})}),(0,N.jsx)(`span`,{className:`ars-panel-title`,children:e}),t&&(0,N.jsx)(`span`,{className:`ars-panel-note`,children:t})]}),i&&(0,N.jsx)(`div`,{className:`ars-panel-body`,children:r})]})}function ke({children:e,hint:t,action:n}){return(0,N.jsxs)(`div`,{className:`flex items-baseline justify-between gap-4 mt-1`,children:[(0,N.jsxs)(`div`,{className:`flex items-baseline gap-3 min-w-0`,children:[(0,N.jsx)(`span`,{className:`t-overline shrink-0`,children:e}),t&&(0,N.jsx)(`span`,{className:`t-caption min-w-0`,style:{letterSpacing:0},children:t})]}),n]})}function Ae(e,t=620){let n=typeof e==`number`?e:null,[r,i]=ot.useState(n===null?e:0);return ot.useEffect(()=>{if(n===null){i(e);return}if(window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches){i(n);return}let r,a=performance.now(),o=e=>{let s=Math.min(1,(e-a)/t);i(Math.round(n*(1-(1-s)**3))),s<1&&(r=requestAnimationFrame(o))};return r=requestAnimationFrame(o),()=>cancelAnimationFrame(r)},[n,e,t]),r}function A({variant:e=`primary`,busy:t=!1,children:n,...r}){return(0,N.jsxs)(`button`,{type:`button`,className:st[e]||st.primary,disabled:t||r.disabled,...r,children:[t&&(0,N.jsx)(je,{}),n]})}function je(){return(0,N.jsxs)(`svg`,{className:`animate-spin`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:[(0,N.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeOpacity:`0.25`,strokeWidth:`4`}),(0,N.jsx)(`path`,{d:`M22 12a10 10 0 0 0-10-10`,stroke:`currentColor`,strokeWidth:`4`,strokeLinecap:`round`})]})}function Me({checked:e,onChange:t,label:n,disabled:r=!1}){return(0,N.jsxs)(`label`,{className:`inline-flex items-center gap-2.5 cursor-pointer select-none`,children:[(0,N.jsx)(`span`,{role:`switch`,"aria-checked":e,"aria-disabled":r||void 0,tabIndex:r?-1:0,onClick:()=>!r&&t(!e),onKeyDown:n=>{!r&&(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),t(!e))},className:`ars-switch${e?` is-on`:``}${r?` is-disabled`:``}`}),n&&(0,N.jsx)(`span`,{className:`text-[13px]`,children:n})]})}function j({tone:e=`neutral`,children:t}){let n={neutral:{bg:`var(--ars-surface-3)`,fg:`var(--ars-ink-2)`},brand:{bg:`var(--ars-brand-tonal)`,fg:`var(--ars-brand-tonal-ink)`},good:{bg:`var(--ars-good-tonal)`,fg:`var(--ars-good)`},warning:{bg:`var(--ars-warning-tonal)`,fg:`var(--ars-warning)`},serious:{bg:`var(--ars-serious-tonal)`,fg:`var(--ars-serious)`}},r=n[e]||n.neutral;return(0,N.jsx)(`span`,{className:`inline-flex items-center gap-1 px-2 py-0.5 ars-r-sm text-[11.5px] font-semibold`,style:{background:r.bg,color:r.fg},children:t})}function Ne({status:e}){let t=ct[e]||ct.warn;return(0,N.jsxs)(j,{tone:t.tone,children:[(0,N.jsx)(`span`,{"aria-hidden":!0,children:t.icon}),` `,t.label]})}function Pe({value:e,size:t=152,label:n=`AI Score`,onLight:r=!1}){let i=(t-14)/2,a=2*Math.PI*i,o=Math.max(0,Math.min(100,e??0)),s=ot.useId();return(0,N.jsxs)(`div`,{className:`relative inline-flex items-center justify-center`,style:{width:t,height:t},children:[(0,N.jsxs)(`svg`,{width:t,height:t,role:`img`,"aria-label":e==null?`${n}: ${b(`not scored yet`,`ai-rank-suite`)}`:`${n}: ${o} / 100`,children:[(0,N.jsx)(`defs`,{children:(0,N.jsxs)(`linearGradient`,{id:s,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`,children:[(0,N.jsx)(`stop`,{offset:`0%`,stopColor:`var(--ars-brand)`}),(0,N.jsx)(`stop`,{offset:`100%`,stopColor:`var(--ars-brand-2)`})]})}),(0,N.jsx)(`circle`,{cx:t/2,cy:t/2,r:i,fill:`none`,stroke:r?`var(--ars-surface-3)`:`var(--ars-surface-2)`,strokeWidth:14}),(0,N.jsx)(`circle`,{cx:t/2,cy:t/2,r:i,fill:`none`,stroke:`url(#${s})`,strokeWidth:14,strokeLinecap:`round`,strokeDasharray:`${a*o/100} ${a}`,transform:`rotate(-90 ${t/2} ${t/2})`,style:{animation:`ars-sweep 900ms cubic-bezier(0.2, 0, 0, 1) both`,"--ars-dash":`${a*o/100}`}})]}),(0,N.jsxs)(`div`,{className:`absolute text-center`,style:{color:`var(--ars-ink)`},children:[(0,N.jsx)(`div`,{className:`t-num`,style:{fontSize:40,fontWeight:600},children:e??`–`}),(0,N.jsx)(`div`,{className:`t-caption mt-1.5 font-medium`,children:`/ 100`})]})]})}function Fe({value:e}){if(e==null)return(0,N.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`—`});let t=Number(e);return(0,N.jsxs)(`span`,{className:`ars-scorepill is-${t>=80?`good`:t>=50?`mid`:`bad`} tabular-nums`,children:[(0,N.jsx)(`span`,{className:`ars-scorepill-dot`,"aria-hidden":!0}),t]})}function Ie({tabs:e,active:t,onChange:n,right:r}){return(0,N.jsxs)(`div`,{className:`ars-tabbar`,children:[(0,N.jsx)(`div`,{className:`ars-noscroll flex items-end gap-1 flex-wrap min-w-0`,role:`tablist`,children:e.map(e=>(0,N.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t===e.id,onClick:()=>n(e.id),className:`ars-tab${t===e.id?` is-active`:``}`,children:[e.icon,e.label,e.count!==void 0&&(0,N.jsx)(`span`,{className:`ars-tab-count`,children:e.count})]},e.id))}),r&&(0,N.jsx)(`div`,{className:`shrink-0 flex items-center gap-2 pb-1.5`,children:r})]})}function Le({data:e,color:t=`var(--ars-series-1)`,label:n,height:r=140,formatValue:i=e=>e,invert:a=!1,axisMax:o=null,bleed:s=!1}){let[c,l]=ot.useState(null),u=ot.useId(),[d,f]=ot.useState(640),p=ot.useRef(null),m=ot.useRef(null),h=ot.useCallback(e=>{if(m.current&&=(m.current.disconnect(),null),p.current=e,!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(e=>{let t=Math.round(e[0]?.contentRect.width||0);t>0&&f(Math.max(320,t))});t.observe(e),m.current=t},[]);ot.useLayoutEffect(()=>{let e=p.current;if(!e)return;let t=Math.round(e.getBoundingClientRect().width);t>0&&f(e=>Math.abs(e-t)>1?Math.max(320,t):e)});let g={l:30,r:6,t:12,b:20};if(!e||e.length<2){let r=e&&e.length===1?e[0]:null;return(0,N.jsxs)(`div`,{className:`ars-firstread`,style:r?void 0:{justifyContent:`center`},children:[r&&(0,N.jsx)(`div`,{className:`ars-firstread-v`,style:{color:t},children:i(r.value)}),(0,N.jsxs)(`div`,{className:`grid gap-0.5 min-w-0`,children:[(0,N.jsx)(`span`,{className:`font-semibold text-[13px]`,children:r?r.date?S(b(`First reading · %s`,`ai-rank-suite`),r.date):b(`First reading`,`ai-rank-suite`):S(b(`No %s recorded yet`,`ai-rank-suite`),String(n))}),(0,N.jsx)(`span`,{className:`t-caption`,children:r?b(`A line needs two points. The next reading draws it.`,`ai-rank-suite`):S(b(`%s appears here once there are two readings.`,`ai-rank-suite`),n)})]})]})}let _=e.map(e=>e.value),v=Math.max(..._),y=Math.min(..._),x=Math.max(v-y,1e-6),C=a?x*.2:0,w=a?y-C:0,T=a?v+C:Math.max(1,o??v),E=Math.max(T-w,1e-6),ee=e=>a?w+e*E:T-e*E;g.l=Math.max(30,Math.round(Math.max(...lt.map(e=>String(i(Math.round(ee(e)*10)/10)).length))*5.4+8));let te=t=>g.l+t*(d-g.l-g.r)/(e.length-1),D=e=>{let t=(e-w)/E;return g.t+(a?t:1-t)*(r-g.t-g.b)},ne=e.map((e,t)=>[te(t),D(e.value)]),re=`M${ne[0][0].toFixed(1)},${ne[0][1].toFixed(1)}`;for(let e=0;e<ne.length-1;e++){let t=ne[Math.max(0,e-1)],n=ne[e],r=ne[e+1],i=ne[Math.min(ne.length-1,e+2)],a=[n[0]+(r[0]-t[0])/6,n[1]+(r[1]-t[1])/6],o=[r[0]-(i[0]-n[0])/6,r[1]-(i[1]-n[1])/6];re+=` C${a[0].toFixed(1)},${a[1].toFixed(1)} ${o[0].toFixed(1)},${o[1].toFixed(1)} ${r[0].toFixed(1)},${r[1].toFixed(1)}`}let O=`${re} L${ne[ne.length-1][0].toFixed(1)},${r-g.b} L${ne[0][0].toFixed(1)},${r-g.b} Z`,ie=lt,ae=ne[ne.length-1],oe=a?_[_.length-1]<_[0]:_[_.length-1]>_[0];return(0,N.jsxs)(`div`,{ref:h,className:s?`ars-chart-bleed`:void 0,children:[(0,N.jsxs)(`div`,{className:`flex items-center justify-between mb-1.5`,children:[(0,N.jsxs)(`span`,{className:`text-[12px] font-semibold flex items-center gap-1.5`,children:[(0,N.jsx)(`span`,{"aria-hidden":!0,className:`inline-block w-2.5 h-2.5 ars-r-sm`,style:{background:t}}),n]}),(0,N.jsx)(`span`,{className:`text-[11.5px] tabular-nums font-medium px-2 py-0.5 ars-r-sm`,style:{background:oe?`var(--ars-good-tonal)`:`var(--ars-surface-3)`,color:oe?`var(--ars-good)`:`var(--ars-ink-2)`},children:a?S(b(`best %s`,`ai-rank-suite`),i(y)):S(b(`peak %s`,`ai-rank-suite`),i(v))})]}),(0,N.jsxs)(`svg`,{viewBox:`0 0 ${d} ${r}`,className:`w-full block`,style:{height:r},onMouseLeave:()=>l(null),onMouseMove:t=>{let n=t.currentTarget.getBoundingClientRect(),r=(t.clientX-n.left)/n.width*d,i=Math.round((r-g.l)/(d-g.l-g.r)*(e.length-1));l({i:Math.max(0,Math.min(e.length-1,i))})},role:`img`,"aria-label":n,children:[(0,N.jsx)(`defs`,{children:(0,N.jsxs)(`linearGradient`,{id:`${u}-a`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,N.jsx)(`stop`,{offset:`0%`,stopColor:t,stopOpacity:`0.26`}),(0,N.jsx)(`stop`,{offset:`60%`,stopColor:t,stopOpacity:`0.07`}),(0,N.jsx)(`stop`,{offset:`100%`,stopColor:t,stopOpacity:`0`})]})}),ie.map(e=>(0,N.jsxs)(`g`,{children:[(0,N.jsx)(`line`,{x1:g.l,x2:d-g.r,y1:g.t+e*(r-g.t-g.b),y2:g.t+e*(r-g.t-g.b),stroke:`var(--ars-border)`,strokeDasharray:e===1?``:`3 5`}),(0,N.jsx)(`text`,{x:g.l-6,y:g.t+e*(r-g.t-g.b)+3,fontSize:`9.5`,fill:`var(--ars-ink-3)`,textAnchor:`end`,className:`tabular-nums`,children:i(Math.round(ee(e)*10)/10)})]},e)),(0,N.jsx)(`path`,{d:O,fill:`url(#${u}-a)`,className:`ars-chart-area`}),(0,N.jsx)(`path`,{d:re,fill:`none`,stroke:t,strokeWidth:`2.5`,strokeLinejoin:`round`,strokeLinecap:`round`,className:`ars-chart-line`,pathLength:`1`}),(0,N.jsx)(`circle`,{cx:ae[0],cy:ae[1],r:`7`,fill:t,opacity:`0.15`}),(0,N.jsx)(`circle`,{cx:ae[0],cy:ae[1],r:`3.5`,fill:t,stroke:`var(--ars-surface)`,strokeWidth:`1.5`}),c&&(0,N.jsxs)(`g`,{children:[(0,N.jsx)(`line`,{x1:te(c.i),x2:te(c.i),y1:g.t,y2:r-g.b,stroke:`var(--ars-ink-3)`,strokeDasharray:`2 3`}),(0,N.jsx)(`circle`,{cx:te(c.i),cy:D(e[c.i].value),r:`4.5`,fill:t,stroke:`var(--ars-surface)`,strokeWidth:`2`}),(()=>{let t=`${e[c.i].date} · ${i(e[c.i].value)}`,n=t.length*6.2+18,r=Math.max(g.l,Math.min(d-g.r-n,te(c.i)-n/2)),a=Math.max(2,D(e[c.i].value)-30);return(0,N.jsxs)(`g`,{children:[(0,N.jsx)(`rect`,{x:r,y:a,rx:`4`,ry:`4`,width:n,height:`21`,fill:`var(--ars-ink)`,opacity:`0.94`}),(0,N.jsx)(`text`,{x:r+n/2,y:a+14,fontSize:`10.5`,fill:`var(--ars-surface)`,textAnchor:`middle`,children:t})]})})()]}),(0,N.jsx)(`text`,{x:g.l,y:r-5,fontSize:`9.5`,fill:`var(--ars-ink-3)`,children:e[0].date}),(0,N.jsx)(`text`,{x:d-g.r,y:r-5,fontSize:`9.5`,fill:`var(--ars-ink-3)`,textAnchor:`end`,children:e[e.length-1].date})]})]})}function Re({value:e}){if(e==null||e===0)return(0,N.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`—`});let t=Math.round(e*10)/10,n=t<=3?{bg:`var(--ars-good-tonal)`,fg:`var(--ars-good)`}:t<=10?{bg:`var(--ars-brand-tonal)`,fg:`var(--ars-brand-tonal-ink)`}:{bg:`var(--ars-surface-3)`,fg:`var(--ars-ink-2)`};return(0,N.jsx)(`span`,{className:`inline-flex items-center justify-center ars-r-sm text-[12px] font-bold tabular-nums`,style:{minWidth:34,height:24,padding:`0 8px`,background:n.bg,color:n.fg},children:t})}function ze({label:e,done:t,total:n,percent:r,note:i}){let a=Number(n)>0,o=Math.max(0,Math.min(100,r==null?a?Math.round(Number(t)/Number(n)*100):100:Math.round(r)));return(0,N.jsxs)(`div`,{className:`ars-progress`,children:[(0,N.jsxs)(`div`,{className:`ars-progress-head`,children:[(0,N.jsx)(`span`,{children:e}),a&&(0,N.jsxs)(`span`,{className:`ars-progress-pct tabular-nums`,children:[o,`%`]})]}),(0,N.jsx)(`div`,{className:`ars-progress-track`,role:`progressbar`,"aria-valuenow":a?o:void 0,"aria-valuemin":0,"aria-valuemax":100,"aria-label":e,children:(0,N.jsx)(`div`,{className:`ars-progress-fill`,style:{width:`${o}%`}})}),i&&(0,N.jsx)(`p`,{className:`m-0 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:i})]})}function Be({value:e,color:t,running:n=!1}){let r=Math.max(0,Math.min(100,e??0));return(0,N.jsx)(`div`,{className:`overflow-hidden`,style:{height:6,borderRadius:`var(--ars-r-sm)`,background:`var(--ars-surface-3)`},role:`progressbar`,"aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,children:(0,N.jsx)(`div`,{className:`h-full${n?` ars-progress-fill`:``}`,style:{width:`${r}%`,borderRadius:3,background:t||`var(--ars-brand)`,transition:`width 620ms cubic-bezier(0.2, 0, 0, 1)`}})})}function M({tone:e=`warning`,children:t}){let n={warning:{klass:`is-warning`,edge:`var(--ars-warning)`},serious:{klass:`is-error`,edge:`var(--ars-serious)`},info:{klass:`is-info`,edge:`var(--ars-info-ink)`},good:{klass:`is-success`,edge:`var(--ars-good)`}},r=n[e]||n.warning;return(0,N.jsx)(`div`,{className:`ars-notice ${r.klass}`,role:r.klass===`is-error`?`alert`:void 0,style:{borderInlineStartColor:r.edge},children:(0,N.jsx)(`p`,{children:t})})}function Ve(e,t=`title`){let n=ut[t];return e===0?{tone:`empty`,color:`var(--ars-ink-3)`,text:b(`Empty — falls back to the page title`,`ai-rank-suite`)}:e>n.max?{tone:`bad`,color:`var(--ars-serious)`,text:S(x(`%d character too long — Google will cut it off`,`%d characters too long — Google will cut it off`,e-n.max,`ai-rank-suite`),e-n.max)}:e<n.ok?{tone:`bad`,color:`var(--ars-serious)`,text:b(`Too short to be persuasive`,`ai-rank-suite`)}:e<n.good?{tone:`warn`,color:`var(--ars-warning)`,text:b(`Usable — a little more detail would help`,`ai-rank-suite`)}:{tone:`good`,color:`var(--ars-good)`,text:b(`Perfect length`,`ai-rank-suite`)}}function He({value:e=``,kind:t=`title`,showText:n=!0}){let r=ut[t],i=String(e||``).length,a=Ve(i,t),o=r.max*1.25,s=e=>Math.min(100,e/o*100);return(0,N.jsxs)(`div`,{className:`grid gap-1`,children:[(0,N.jsxs)(`div`,{className:`relative ars-r-sm overflow-hidden`,style:{height:4,background:`var(--ars-surface-3)`},children:[(0,N.jsx)(`span`,{className:`absolute top-0 h-full`,style:{left:`${s(r.good)}%`,width:`${s(r.max)-s(r.good)}%`,background:`var(--ars-good)`,opacity:.16}}),(0,N.jsx)(`span`,{className:`absolute top-0 h-full ars-r-sm transition-all`,style:{left:0,width:`${s(i)}%`,background:a.color}}),i>0&&(0,N.jsx)(`span`,{className:`absolute ars-r-sm transition-all`,style:{left:`calc(${s(i)}% - 4px)`,top:-1,width:8,height:8,background:`var(--ars-knob)`,boxShadow:`0 0 0 2px ${a.color}`}})]}),n&&(0,N.jsxs)(`div`,{className:`flex items-center justify-between text-[11px]`,children:[(0,N.jsx)(`span`,{style:{color:a.color,fontWeight:600},children:a.text}),(0,N.jsxs)(`span`,{className:`tabular-nums`,style:{color:`var(--ars-ink-3)`},children:[i,` / `,r.max]})]})]})}function Ue({data:e,color:t=`currentColor`,height:n=28,fill:r=!0}){let i=ot.useId(),a=(e||[]).filter(e=>typeof e==`number`);if(a.length<3)return null;let o=Math.min(...a),s=Math.max(...a),c=Math.max(s-o,1e-6),l=e=>3+e*94/(a.length-1),u=e=>3+(1-(e-o)/c)*(n-6),d=a.map((e,t)=>[l(t),u(e)]),f=`M${d[0][0].toFixed(1)},${d[0][1].toFixed(1)}`;for(let e=0;e<d.length-1;e++){let t=d[Math.max(0,e-1)],n=d[e],r=d[e+1],i=d[Math.min(d.length-1,e+2)],a=[n[0]+(r[0]-t[0])/6,n[1]+(r[1]-t[1])/6],o=[r[0]-(i[0]-n[0])/6,r[1]-(i[1]-n[1])/6];f+=` C${a[0].toFixed(1)},${a[1].toFixed(1)} ${o[0].toFixed(1)},${o[1].toFixed(1)} ${r[0].toFixed(1)},${r[1].toFixed(1)}`}return(0,N.jsxs)(`svg`,{viewBox:`0 0 100 ${n}`,preserveAspectRatio:`none`,style:{width:`100%`,height:n,display:`block`,color:t},"aria-hidden":!0,children:[(0,N.jsx)(`defs`,{children:(0,N.jsxs)(`linearGradient`,{id:i,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,N.jsx)(`stop`,{offset:`0%`,stopColor:`currentColor`,stopOpacity:`0.22`}),(0,N.jsx)(`stop`,{offset:`100%`,stopColor:`currentColor`,stopOpacity:`0`})]})}),r&&(0,N.jsx)(`path`,{d:`${f} L97,${n} L3,${n} Z`,fill:`url(#${i})`}),(0,N.jsx)(`path`,{d:f,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,vectorEffect:`non-scaling-stroke`})]})}function We({value:e,suffix:t=``,invert:n=!1}){if(e==null||e===0)return(0,N.jsxs)(`span`,{className:`text-[11px] font-medium`,style:{color:`var(--ars-ink-3)`},children:[`±0`,t]});let r=e>0,i=n?!r:r;return(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 text-[11px] font-semibold px-1.5 py-0.5 ars-r-sm`,style:{background:i?`var(--ars-good-tonal)`:`var(--ars-serious-tonal)`,color:i?`var(--ars-good)`:`var(--ars-serious)`},children:[(0,N.jsx)(`span`,{"aria-hidden":!0,children:r?`▲`:`▼`}),Math.abs(e),t]})}function Ge({label:e,value:t,unit:n,sub:r,tone:i=`plain`,chart:a,delta:o,onClick:s,status:c,disabled:l=!1}){let u={plain:{bg:`var(--ars-surface-2)`,fg:`var(--ars-ink)`,mute:`var(--ars-ink-3)`,accent:`var(--ars-ink-3)`},blue:{bg:`var(--ars-c-blue)`,fg:`var(--ars-c-blue-ink)`,mute:`var(--ars-c-blue-ink)`,accent:`var(--ars-c-blue-ink)`},green:{bg:`var(--ars-c-green)`,fg:`var(--ars-c-green-ink)`,mute:`var(--ars-c-green-ink)`,accent:`var(--ars-c-green-ink)`},yellow:{bg:`var(--ars-c-yellow)`,fg:`var(--ars-c-yellow-ink)`,mute:`var(--ars-c-yellow-ink)`,accent:`var(--ars-c-yellow-ink)`},red:{bg:`var(--ars-c-red)`,fg:`var(--ars-c-red-ink)`,mute:`var(--ars-c-red-ink)`,accent:`var(--ars-c-red-ink)`},violet:{bg:`var(--ars-c-violet)`,fg:`var(--ars-c-violet-ink)`,mute:`var(--ars-c-violet-ink)`,accent:`var(--ars-c-violet-ink)`}},d=u[i]||u.plain,f=s?`button`:`div`,p=Ae(t),m=typeof t==`number`||/^[\d.,%/\s-]+$/.test(String(t??``).trim()||`x`);return(0,N.jsxs)(f,{type:s?`button`:void 0,onClick:l?void 0:s,className:`ars-tile text-left w-full${i===`plain`?` is-plain`:``}${s&&!l?` is-clickable`:``}`,style:{color:d.accent,opacity:l?.55:1},children:[(0,N.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,N.jsx)(`span`,{className:`t-overline`,style:{color:`var(--ars-ink-3)`,letterSpacing:`0.055em`,fontSize:10.5},children:e}),c]}),(0,N.jsxs)(`div`,{className:`flex items-baseline gap-2 mt-1`,children:[(0,N.jsx)(`span`,{className:`t-num`,style:{fontSize:m?26:17,fontWeight:m?600:550,letterSpacing:m?`-0.032em`:`-0.01em`,color:`var(--ars-ink)`},children:p}),n&&(0,N.jsx)(`span`,{className:`text-[12px] font-medium`,style:{color:`var(--ars-ink-3)`},children:n}),o]}),r&&(0,N.jsx)(`div`,{className:`t-caption mt-1`,style:{color:`var(--ars-ink-3)`},children:r}),a&&(0,N.jsx)(`div`,{className:`mt-auto pt-2.5`,children:a})]})}function Ke({children:e,right:t}){return(0,N.jsxs)(`div`,{className:`ars-filterbar flex flex-wrap items-center gap-3`,children:[(0,N.jsx)(`div`,{className:`flex flex-wrap items-center gap-3 min-w-0`,children:e}),t&&(0,N.jsx)(`div`,{className:`ml-auto flex items-center gap-2`,children:t})]})}function qe({options:e,value:t,onChange:n,label:r,className:i=``,collapseAt:a=24}){let[o,s]=ot.useState(!1),c=e;if(!o&&e.length>a){c=e.slice(0,a);let n=e.find(e=>e.id===t);n&&!c.some(e=>e.id===t)&&(c=[...c,n])}let l=e.length-c.length;return(0,N.jsxs)(`div`,{className:`ars-chipbar${i?` ${i}`:``}`,role:`group`,"aria-label":r,children:[r&&(0,N.jsx)(`span`,{className:`text-[11.5px] font-medium mr-0.5`,style:{color:`var(--ars-ink-3)`},children:r}),c.map(e=>(0,N.jsxs)(`button`,{type:`button`,className:`ars-chip${t===e.id?` is-active`:``}`,"aria-pressed":t===e.id,onClick:()=>n(e.id),children:[e.label,e.count!==void 0&&e.count!==null&&(0,N.jsx)(`span`,{className:`ars-chip-count`,children:e.count})]},e.id)),l>0&&(0,N.jsx)(`button`,{type:`button`,className:`ars-chip`,onClick:()=>s(!0),children:S(x(`+%d more`,`+%d more`,l,`ai-rank-suite`),l)}),o&&e.length>a&&(0,N.jsx)(`button`,{type:`button`,className:`ars-chip`,onClick:()=>s(!1),children:b(`Show fewer`,`ai-rank-suite`)})]})}function Je({options:e,value:t,onChange:n,label:r}){return(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[r&&(0,N.jsx)(`span`,{className:`text-[11.5px] font-medium`,style:{color:`var(--ars-ink-3)`},children:r}),(0,N.jsx)(`div`,{className:`ars-seg`,role:`group`,"aria-label":r,children:e.map(e=>(0,N.jsx)(`button`,{type:`button`,className:`ars-seg-item${t===e.id?` is-active`:``}`,"aria-pressed":t===e.id,onClick:()=>n(e.id),children:e.label},e.id))})]})}function Ye({segments:e,height:t=12,showLegend:n=!0}){let r=(e||[]).filter(e=>e.value>0),i=r.reduce((e,t)=>e+t.value,0);return i===0?(0,N.jsx)(`div`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Nothing measured yet.`,`ai-rank-suite`)}):(0,N.jsxs)(`div`,{className:`grid gap-2`,children:[(0,N.jsx)(`div`,{className:`flex overflow-hidden`,style:{height:t,borderRadius:`var(--ars-r-xs)`},children:r.map(e=>(0,N.jsx)(`span`,{title:`${e.label}: ${e.value}`,style:{width:`${e.value/i*100}%`,background:e.color,transition:`width 400ms cubic-bezier(0.2,0,0,1)`}},e.label))}),n&&(0,N.jsx)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-1`,children:r.map(e=>(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-[11.5px]`,style:{color:`var(--ars-ink-2)`},children:[(0,N.jsx)(`span`,{"aria-hidden":!0,style:{width:8,height:8,borderRadius:`var(--ars-r-xs)`,background:e.color,display:`inline-block`}}),e.label,(0,N.jsx)(`b`,{className:`tabular-nums`,style:{color:`var(--ars-ink)`},children:e.value})]},e.label))})]})}function Xe({items:e,max:t,color:n=`var(--ars-brand)`,onItem:r,format:i=e=>e}){let a=e||[],o=t??Math.max(...a.map(e=>e.value),1);return(0,N.jsx)(`div`,{className:`grid gap-1.5`,children:a.map((e,t)=>(0,N.jsxs)(`div`,{className:`ars-rankrow${r?` is-clickable`:``}`,onClick:r?()=>r(e):void 0,role:r?`button`:void 0,tabIndex:r?0:void 0,onKeyDown:r?t=>t.key===`Enter`&&r(e):void 0,children:[(0,N.jsx)(`span`,{className:`ars-rankrow-label`,title:e.label,children:e.label}),(0,N.jsx)(`span`,{className:`ars-rankrow-track`,children:(0,N.jsx)(`span`,{className:`ars-rankrow-fill`,style:{width:`${Math.max(2,e.value/o*100)}%`,background:e.color||n}})}),(0,N.jsx)(`span`,{className:`ars-rankrow-value tabular-nums`,children:i(e.value)})]},e.key??e.label??t))})}function Ze({data:e,series:t,height:n=110,stacked:r=!1}){let i=e||[],a=t||[],o=r?Math.max(1,...i.map(e=>a.reduce((t,n)=>t+(Number(e[n.key])||0),0))):Math.max(1,...i.map(e=>a.reduce((t,n)=>Math.max(t,Number(e[n.key])||0),0))),s=Math.max(1,Math.ceil(i.length/8));return(0,N.jsxs)(`div`,{className:`grid gap-2`,children:[(0,N.jsx)(`div`,{className:`flex items-end gap-[3px]`,style:{height:n},children:i.map((e,t)=>r?(0,N.jsx)(`div`,{className:`flex-1 flex items-end justify-center`,style:{height:n},title:`${e.label} · ${a.map(t=>`${t.label}: ${Number(e[t.key])||0}`).join(` · `)}`,children:(0,N.jsx)(`span`,{className:`flex flex-col-reverse`,style:{width:`100%`,maxWidth:12},children:a.map((t,r)=>{let i=Number(e[t.key])||0;return(0,N.jsx)(`span`,{style:{height:`${i/o*n}px`,background:t.color,borderRadius:a.slice(r+1).every(t=>!Number(e[t.key]))&&i>0?`var(--ars-r-xs) var(--ars-r-xs) 0 0`:0,transition:`height 380ms cubic-bezier(0.2,0,0,1)`}},t.key)})})},t):(0,N.jsx)(`div`,{className:`flex-1 flex items-end justify-center gap-[2px]`,style:{height:n},children:a.map(t=>{let r=Number(e[t.key])||0;return(0,N.jsx)(`span`,{title:`${e.label} · ${t.label}: ${r}`,style:{width:`${100/a.length}%`,maxWidth:10,height:`${Math.max(2,r/o*n)}px`,background:r===0?`var(--ars-surface-3)`:t.color,borderRadius:`var(--ars-r-xs) var(--ars-r-xs) 0 0`,transition:`height 380ms cubic-bezier(0.2,0,0,1)`}},t.key)})},t))}),(0,N.jsx)(`div`,{className:`flex justify-between text-[10.5px]`,style:{color:`var(--ars-ink-3)`},children:i.filter((e,t)=>t%s===0).map((e,t)=>(0,N.jsx)(`span`,{children:e.label},t))}),(0,N.jsx)(`div`,{className:`flex gap-4`,children:a.map(e=>(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-[11.5px]`,style:{color:`var(--ars-ink-2)`},children:[(0,N.jsx)(`span`,{"aria-hidden":!0,style:{width:8,height:8,borderRadius:`var(--ars-r-xs)`,background:e.color,display:`inline-block`}}),e.label]},e.key))})]})}function Qe({label:e,hint:t,htmlFor:n,children:r,className:i=``,span:a=!1}){return(0,N.jsxs)(`div`,{className:i,style:a?{gridColumn:`1 / -1`}:void 0,children:[e&&(0,N.jsx)(`label`,{className:`block font-medium mb-1`,htmlFor:n,children:e}),r,t&&(0,N.jsx)(`p`,{className:`m-0 mt-1.5 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:t})]})}function $e({value:e,onChange:t,label:n,hint:r,title:i=b(`Select image`,`ai-rank-suite`),height:a=96}){let o=()=>{let e=window.wp?.media;if(!e)return;let n=e({title:i,button:{text:b(`Use this image`,`ai-rank-suite`)},multiple:!1,library:{type:`image`}});n.on(`select`,()=>{let e=n.state().get(`selection`).first().toJSON();t(e.sizes?.full?.url||e.url||``)}),n.open()},s=!!window.wp?.media;return(0,N.jsx)(Qe,{label:n,hint:r,children:(0,N.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,N.jsx)(`div`,{className:`ars-r-sm shrink-0 flex items-center justify-center overflow-hidden`,style:{width:a,height:a,border:`1px solid var(--ars-border)`,background:`var(--ars-surface-2)`},children:e?(0,N.jsx)(`img`,{src:e,alt:``,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`}}):(0,N.jsx)(`span`,{className:`t-caption`,style:{fontSize:11},children:b(`None`,`ai-rank-suite`)})}),(0,N.jsxs)(`div`,{className:`grid gap-1.5 flex-1 min-w-0`,children:[(0,N.jsx)(`input`,{type:`url`,value:e||``,placeholder:`https://…`,onChange:e=>t(e.target.value)}),(0,N.jsxs)(`div`,{className:`flex gap-2`,children:[s&&(0,N.jsx)(A,{variant:`ghost`,onClick:o,type:`button`,children:b(`Choose from library`,`ai-rank-suite`)}),e&&(0,N.jsx)(A,{variant:`ghost`,onClick:()=>t(``),type:`button`,children:b(`Remove`,`ai-rank-suite`)})]})]})]})})}function et({value:e=[],onChange:t,placeholder:n=b(`Add and press Enter`,`ai-rank-suite`),suggestions:r=[]}){let[i,a]=ot.useState(``),o=n=>{let r=String(n).split(`,`).map(e=>e.trim()).filter(Boolean);if(!r.length)return;let i=[...e];r.forEach(e=>{i.includes(e)||i.push(e)}),t(i),a(``)},s=r.filter(t=>!e.includes(t)).slice(0,8);return(0,N.jsxs)(`div`,{className:`grid gap-2`,children:[e.length>0&&(0,N.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.map(n=>(0,N.jsxs)(`span`,{className:`ars-chip-tag`,title:n,children:[(0,N.jsx)(`span`,{className:`truncate`,style:{maxWidth:260},children:n}),(0,N.jsx)(`button`,{type:`button`,"aria-label":S(b(`Remove %s`,`ai-rank-suite`),n),onClick:()=>t(e.filter(e=>e!==n)),className:`border-0 bg-transparent cursor-pointer p-0 ml-1`,style:{color:`inherit`,lineHeight:1,opacity:.65},children:`×`})]},n))}),(0,N.jsx)(`input`,{type:`text`,value:i,placeholder:n,onChange:e=>a(e.target.value),onKeyDown:n=>{n.key===`Enter`||n.key===`,`?(n.preventDefault(),o(i)):n.key===`Backspace`&&i===``&&e.length&&t(e.slice(0,-1))},onBlur:()=>o(i)}),s.length>0&&(0,N.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:s.map(e=>(0,N.jsxs)(`button`,{type:`button`,onClick:()=>o(e),className:`ars-chip-tag is-suggestion`,children:[`+ `,e]},e))})]})}function tt({options:e,value:t=[],onChange:n,min:r=`180px`}){let i=e=>n(t.includes(e)?t.filter(t=>t!==e):[...t,e]);return(0,N.jsx)(`div`,{className:`ars-cardgrid`,style:{"--min":r,gap:6},children:e.map(e=>(0,N.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer text-[12.5px] px-2 py-1.5 ars-r-sm`,style:{border:`1px solid var(--ars-border)`,background:t.includes(e.key)?`var(--ars-brand-tonal)`:`var(--ars-surface)`,color:t.includes(e.key)?`var(--ars-brand-tonal-ink)`:`var(--ars-ink-2)`},children:[(0,N.jsx)(`input`,{type:`checkbox`,checked:t.includes(e.key),onChange:()=>i(e.key)}),(0,N.jsx)(`span`,{className:`truncate`,children:e.label})]},e.key))})}function nt({code:e,max:t=420,language:n=``}){let[r,i]=ot.useState(!1);return(0,N.jsxs)(`div`,{className:`relative`,children:[(0,N.jsx)(`div`,{className:`absolute`,style:{top:6,right:6,zIndex:1},children:(0,N.jsx)(A,{variant:`ghost`,onClick:async()=>{let t=await ve(e);i(t?`yes`:`no`),setTimeout(()=>i(!1),1600)},children:r===`yes`?`✓ ${b(`Copied`,`ai-rank-suite`)}`:b(r===`no`?`Select and copy`:`Copy`,`ai-rank-suite`)})}),(0,N.jsx)(`pre`,{className:`ars-mono ars-r-sm m-0 overflow-auto p-3 text-[11.5px]`,style:{maxHeight:t,background:`var(--ars-surface-2)`,border:`1px solid var(--ars-border)`,lineHeight:1.55,whiteSpace:`pre`},"data-language":n,children:e})]})}function rt({blocks:e=3,hero:t=!0,label:n=`Loading`}){return(0,N.jsxs)(`div`,{className:`ars-page`,"aria-busy":`true`,"aria-label":n,children:[t&&(0,N.jsx)(`div`,{className:`ars-pageskel-bar`,style:{height:132}}),(0,N.jsx)(`div`,{className:`ars-pageskel-grid`,children:Array.from({length:e},(e,t)=>(0,N.jsx)(`div`,{className:`ars-pageskel-block${t===0?` is-tall`:``}`},t))}),(0,N.jsxs)(`span`,{className:`sr-only`,children:[n,`…`]})]})}function it({value:e,color:t,bands:n}){if(!Array.isArray(n)||n.length===0)return null;let r=Math.max(0,Math.min(100,Number(e)||0)),i=n.find(e=>r<e.to)||n[n.length-1];return(0,N.jsxs)(`div`,{className:`ars-bandscale`,children:[(0,N.jsxs)(`div`,{className:`ars-gauge-head`,children:[(0,N.jsx)(`span`,{className:`ars-gauge-n`,style:{color:t},children:r}),(0,N.jsx)(`span`,{className:`ars-gauge-of`,children:`/ 100`}),(0,N.jsx)(`span`,{className:`ars-gauge-zone`,children:i.label})]}),(0,N.jsxs)(`div`,{className:`ars-gauge-track`,children:[n.map((e,t)=>(0,N.jsx)(`span`,{className:`ars-gauge-band`,style:{width:`${e.to-(t?n[t-1].to:0)}%`,background:e.tint}},e.label)),(0,N.jsx)(`span`,{className:`ars-gauge-mark`,style:{left:`${r}%`,background:t}})]}),(0,N.jsx)(`div`,{className:`ars-gauge-scale`,children:n.map((e,t)=>(0,N.jsx)(`span`,{style:{width:`${e.to-(t?n[t-1].to:0)}%`},children:e.label},e.label))})]})}function at({parts:e,total:t}){let n=e.reduce((e,t)=>e+(t.value||0),0)||1;return(0,N.jsxs)(`div`,{className:`ars-comp`,children:[(0,N.jsx)(`div`,{className:`ars-comp-bar`,role:`img`,"aria-label":e.map(e=>`${e.label}: ${e.value}`).join(`, `),children:e.filter(e=>(e.value||0)>0).map(e=>(0,N.jsx)(`span`,{title:`${e.label}: ${e.value}`,style:{width:`${e.value/n*100}%`,background:e.color}},e.label))}),(0,N.jsx)(`div`,{className:`ars-comp-keys`,children:e.map(e=>(0,N.jsxs)(`span`,{className:`ars-comp-key`,children:[(0,N.jsx)(`i`,{style:{background:e.color}}),(0,N.jsx)(`b`,{children:Number(e.value||0).toLocaleString()}),(0,N.jsx)(`span`,{children:e.label})]},e.label))}),t!=null&&(0,N.jsx)(`p`,{className:`ars-comp-total`,children:S(b(`%s in total right now`,`ai-rank-suite`),Number(t).toLocaleString())})]})}var ot,N,st,ct,lt,ut,dt=o((()=>{ot=u(f(),1),C(),ye(),N=_e(),st={primary:`ars-btn ars-btn-primary`,tonal:`ars-btn ars-btn-tonal`,ghost:`ars-btn ars-btn-ghost`,danger:`ars-btn ars-btn-danger`},ct={pass:{tone:`good`,icon:`✓`,label:b(`Pass`,`ai-rank-suite`)},warn:{tone:`warning`,icon:`!`,label:b(`Improve`,`ai-rank-suite`)},fail:{tone:`serious`,icon:`✕`,label:b(`Fix`,`ai-rank-suite`)}},lt=[0,.5,1],ut={title:{ok:30,good:50,best:60,max:60,label:b(`SEO title`,`ai-rank-suite`)},description:{ok:70,good:120,best:158,max:160,label:b(`Meta description`,`ai-rank-suite`)}}}));function ft({title:e=b(`What does this do?`,`ai-rank-suite`),children:t,open:n=!1}){return(0,pt.jsxs)(`details`,{className:`ars-disclosure`,open:n,children:[(0,pt.jsx)(`summary`,{children:e}),(0,pt.jsx)(`div`,{className:`ars-disclosure-body`,children:t})]})}var pt,mt=o((()=>{f(),C(),pt=_e()})),ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt=o((()=>{f(),ht=_e(),gt=({children:e,size:t=16})=>(0,ht.jsx)(`svg`,{width:t,height:t,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:e}),_t=e=>(0,ht.jsxs)(gt,{...e,children:[(0,ht.jsx)(`path`,{d:`M12 21a9 9 0 1 1 9-9`}),(0,ht.jsx)(`path`,{d:`M12 12l5-3`}),(0,ht.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1.5`,fill:`currentColor`,stroke:`none`})]}),vt=e=>(0,ht.jsxs)(gt,{...e,children:[(0,ht.jsx)(`path`,{d:`M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z`}),(0,ht.jsx)(`path`,{d:`M14 2v6h6`}),(0,ht.jsx)(`path`,{d:`M8 13h8M8 17h5`})]}),yt=e=>(0,ht.jsx)(gt,{...e,children:(0,ht.jsx)(`path`,{d:`M4 6h16M4 12h16M4 18h10`})}),bt=e=>(0,ht.jsxs)(gt,{...e,children:[(0,ht.jsx)(`rect`,{x:`4`,y:`8`,width:`16`,height:`12`,rx:`2`}),(0,ht.jsx)(`path`,{d:`M12 8V4M8 4h8`}),(0,ht.jsx)(`circle`,{cx:`9`,cy:`14`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,ht.jsx)(`circle`,{cx:`15`,cy:`14`,r:`1`,fill:`currentColor`,stroke:`none`})]}),xt=e=>(0,ht.jsxs)(gt,{...e,children:[(0,ht.jsx)(`path`,{d:`M3 3v18h18`}),(0,ht.jsx)(`path`,{d:`M7 15l4-5 3 3 5-7`})]}),St=e=>(0,ht.jsxs)(gt,{...e,children:[(0,ht.jsx)(`circle`,{cx:`11`,cy:`11`,r:`7`}),(0,ht.jsx)(`path`,{d:`m21 21-4.3-4.3`})]}),Ct=e=>(0,ht.jsxs)(gt,{...e,children:[(0,ht.jsx)(`path`,{d:`M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3`}),(0,ht.jsx)(`path`,{d:`M2 14h4M10 8h4M18 16h4`})]}),wt=e=>(0,ht.jsxs)(gt,{...e,children:[(0,ht.jsx)(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),(0,ht.jsx)(`path`,{d:`M15 3h6v6M10 14 21 3`})]}),Tt=e=>(0,ht.jsxs)(gt,{...e,children:[(0,ht.jsx)(`path`,{d:`M21 12a9 9 0 1 1-2.6-6.4L21 8`}),(0,ht.jsx)(`path`,{d:`M21 3v5h-5`})]}),Et=e=>(0,ht.jsxs)(gt,{...e,children:[(0,ht.jsx)(`circle`,{cx:`12`,cy:`12`,r:`8`}),(0,ht.jsx)(`circle`,{cx:`12`,cy:`12`,r:`2.6`,fill:`currentColor`,stroke:`none`}),(0,ht.jsx)(`path`,{d:`M12 2v3M12 19v3M2 12h3M19 12h3`})]}),Dt=e=>(0,ht.jsx)(gt,{...e,children:(0,ht.jsx)(`path`,{d:`m16 18 6-6-6-6M8 6l-6 6 6 6`})}),Ot=e=>(0,ht.jsxs)(gt,{...e,children:[(0,ht.jsx)(`path`,{d:`M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.7 1.7`}),(0,ht.jsx)(`path`,{d:`M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7`})]}),kt=e=>(0,ht.jsx)(gt,{...e,children:(0,ht.jsx)(`path`,{d:`M3 7h13l-3-3M21 17H8l3 3`})}),At=e=>(0,ht.jsxs)(gt,{...e,children:[(0,ht.jsx)(`path`,{d:`m12 2 9 5-9 5-9-5 9-5Z`}),(0,ht.jsx)(`path`,{d:`m3 12 9 5 9-5M3 17l9 5 9-5`})]}),jt=e=>(0,ht.jsxs)(gt,{...e,children:[(0,ht.jsx)(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),(0,ht.jsx)(`path`,{d:`M7 10l5 5 5-5M12 15V3`})]}),Mt=e=>(0,ht.jsxs)(gt,{...e,children:[(0,ht.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,ht.jsx)(`path`,{d:`M12 8h4.5a5 5 0 1 1-1.5-3.6`}),(0,ht.jsx)(`path`,{d:`M12 12h4.5`})]}),Nt=e=>(0,ht.jsxs)(gt,{...e,children:[(0,ht.jsx)(`path`,{d:`M9 4 3 6v14l6-2 6 2 6-2V4l-6 2-6-2Z`}),(0,ht.jsx)(`path`,{d:`M9 4v14M15 6v14`})]}),Pt=e=>(0,ht.jsxs)(gt,{...e,children:[(0,ht.jsx)(`path`,{d:`M12 3l7 3v6c0 4.5-3 7.9-7 9-4-1.1-7-4.5-7-9V6l7-3Z`}),(0,ht.jsx)(`path`,{d:`m9 12 2 2 4-4`})]}),Ft=e=>(0,ht.jsxs)(gt,{...e,children:[(0,ht.jsx)(`path`,{d:`M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z`}),(0,ht.jsx)(`circle`,{cx:`12`,cy:`10`,r:`3`})]}),It=e=>(0,ht.jsxs)(gt,{...e,children:[(0,ht.jsx)(`path`,{d:`m3 17 6-6 4 4 8-8`}),(0,ht.jsx)(`path`,{d:`M14 7h7v7`})]}),Lt=e=>(0,ht.jsxs)(gt,{...e,children:[(0,ht.jsx)(`rect`,{x:`3`,y:`5`,width:`18`,height:`14`,rx:`2`}),(0,ht.jsx)(`path`,{d:`m3 7 9 6 9-6`})]}),Rt=e=>(0,ht.jsx)(gt,{...e,children:(0,ht.jsx)(`path`,{d:`M18 6 6 18M6 6l12 12`})}),zt=({size:e=16,fill:t})=>(0,ht.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,"aria-hidden":!0,children:[(0,ht.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`,fill:`none`,stroke:t||`currentColor`,strokeWidth:`2.4`}),(0,ht.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3.2`,fill:t||`currentColor`})]}),Bt=e=>(0,ht.jsxs)(gt,{...e,children:[(0,ht.jsx)(`path`,{d:`M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z`}),(0,ht.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})}));function Ht({onOpen:e}){let[t,n]=(0,Ut.useState)(null),[r,i]=(0,Ut.useState)(null),[a,o]=(0,Ut.useState)(!1),s=(e=!1)=>{o(!0),D.get(`/content/words${e?`?fresh=1`:``}`).then(n).catch(e=>i(e.message)).finally(()=>o(!1))};if((0,Ut.useEffect)(()=>{s()},[]),r)return(0,Wt.jsx)(M,{tone:`serious`,children:r});if(!t)return(0,Wt.jsx)(k,{children:b(`Counting…`,`ai-rank-suite`)});let c=t.bands||{},l=t.catalog||[],u=(t.posts||0)-(c.unknown||0);return(0,Wt.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Wt.jsx)(Ee,{columns:4,metrics:[{id:`words`,label:b(`Words on the site`,`ai-rank-suite`),hint:b(`Counted from the rendered page, not the raw post content. Reading time assumes 220 words per minute.`,`ai-rank-suite`),value:(t.words||0).toLocaleString(),sub:S(b(`about %s minutes of reading`,`ai-rank-suite`),(t.reading||0).toLocaleString())},{id:`average`,label:b(`Average page`,`ai-rank-suite`),hint:b(`The distribution below matters more — an average of 640 can hide half the site at 80 words.`,`ai-rank-suite`),value:u>0?t.average||0:`—`,sub:u>0?S(b(`across %s counted pages`,`ai-rank-suite`),u.toLocaleString()):b(`nothing counted yet`,`ai-rank-suite`)},{id:`thin`,label:b(`Thin or empty`,`ai-rank-suite`),hint:b(`Too little for an assistant to quote or a search engine to rank.`,`ai-rank-suite`),value:(c.thin||0)+(c.empty||0),accent:(c.thin||0)+(c.empty||0)>0?`var(--ars-accent)`:void 0,sub:b(`under 300 words`,`ai-rank-suite`)},{id:`deep`,label:b(`In depth`,`ai-rank-suite`),value:(c.deep||0)+(c.long||0),sub:b(`800 words and over`,`ai-rank-suite`)}]}),(0,Wt.jsx)(k,{icon:(0,Wt.jsx)(yt,{size:16}),title:b(`How long your pages are`,`ai-rank-suite`),subtitle:b(`Counted from the rendered page, not the raw post content — so a page built entirely of blocks is counted properly`,`ai-rank-suite`),action:(0,Wt.jsxs)(A,{variant:`ghost`,busy:a,onClick:()=>s(!0),children:[(0,Wt.jsx)(Tt,{size:13}),b(`Recount`,`ai-rank-suite`)]}),children:(()=>{let e=l.reduce((e,t)=>e+(c[t.id]||0),0),t=c.unknown||0,n=e+t,r=t=>e>0?Math.round(100*t/e):0;return(0,Wt.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Wt.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,Wt.jsx)(`span`,{className:`text-[13px] font-semibold`,children:S(x(`%s page counted`,`%s pages counted`,e,`ai-rank-suite`),e.toLocaleString())}),(0,Wt.jsx)(`span`,{className:`t-caption`,children:n>0?S(b(`%1$s%% of %2$s published`,`ai-rank-suite`),Math.round(100*e/n),n.toLocaleString()):b(`nothing published`,`ai-rank-suite`)})]}),e===0?(0,Wt.jsx)(`div`,{className:`ars-empty-band`,children:b(`Nothing has been counted yet — run the site audit and this fills in.`,`ai-rank-suite`)}):(0,Wt.jsxs)(Wt.Fragment,{children:[(0,Wt.jsx)(Ye,{height:16,segments:l.map(e=>({label:e.label,value:c[e.id]||0,color:Gt[e.id]}))}),(0,Wt.jsx)(`div`,{className:`ars-bands`,children:l.map(e=>{let t=c[e.id]||0;return(0,Wt.jsxs)(`div`,{className:`ars-band${t===0?` is-zero`:``}`,children:[(0,Wt.jsx)(`span`,{className:`ars-band-swatch`,style:{background:Gt[e.id]},"aria-hidden":!0}),(0,Wt.jsx)(`span`,{className:`ars-band-label`,children:e.label}),(0,Wt.jsx)(`span`,{className:`ars-band-n tabular-nums`,children:t.toLocaleString()}),(0,Wt.jsxs)(`span`,{className:`ars-band-pct tabular-nums`,children:[r(t),`%`]}),(0,Wt.jsx)(`span`,{className:`ars-band-note-text`,children:e.note})]},e.id)})})]}),t>0&&(0,Wt.jsx)(M,{tone:`warning`,children:S(x(`%s published page has never been analysed, so it is not in the bar above at all — counting it as empty would be a guess. Run the site audit, or use the analyzer on the dashboard, and it joins the distribution.`,`%s published pages have never been analysed, so they are not in the bar above at all — counting them as empty would be a guess. Run the site audit, or use the analyzer on the dashboard, and they join the distribution.`,t,`ai-rank-suite`),t.toLocaleString())})]})})()}),(0,Wt.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:[(0,Wt.jsx)(k,{title:b(`By content type`,`ai-rank-suite`),flush:!0,children:(0,Wt.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Wt.jsxs)(`table`,{className:`ars-table`,children:[(0,Wt.jsx)(`thead`,{children:(0,Wt.jsxs)(`tr`,{children:[(0,Wt.jsx)(`th`,{children:b(`Type`,`ai-rank-suite`)}),(0,Wt.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Pages`,`ai-rank-suite`)}),(0,Wt.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Average`,`ai-rank-suite`)}),(0,Wt.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Longest`,`ai-rank-suite`)}),(0,Wt.jsx)(`th`,{style:{width:150},children:b(`Spread`,`ai-rank-suite`)})]})}),(0,Wt.jsx)(`tbody`,{children:(t.types||[]).map(e=>(0,Wt.jsxs)(`tr`,{children:[(0,Wt.jsx)(`td`,{className:`font-medium`,children:e.label}),(0,Wt.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.total.toLocaleString()}),(0,Wt.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.average??`—`}),(0,Wt.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.longest.toLocaleString()}),(0,Wt.jsx)(`td`,{children:(0,Wt.jsx)(Ye,{height:8,showLegend:!1,segments:l.map(t=>({label:t.label,value:e.bands[t.id]||0,color:Gt[t.id]}))})})]},e.type))})]})})}),(0,Wt.jsx)(k,{title:b(`The shortest published pages`,`ai-rank-suite`),subtitle:b(`Where the work is, in order`,`ai-rank-suite`),flush:!0,children:(0,Wt.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Wt.jsxs)(`table`,{className:`ars-table`,children:[(0,Wt.jsx)(`thead`,{children:(0,Wt.jsxs)(`tr`,{children:[(0,Wt.jsx)(`th`,{children:b(`Page`,`ai-rank-suite`)}),(0,Wt.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Words`,`ai-rank-suite`)})]})}),(0,Wt.jsx)(`tbody`,{children:(t.shortest||[]).map(t=>(0,Wt.jsxs)(`tr`,{onClick:()=>e?.(t.id),style:e?{cursor:`pointer`}:void 0,children:[(0,Wt.jsx)(`td`,{className:`truncate`,children:t.title||`#${t.id}`}),(0,Wt.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:(0,Wt.jsx)(`b`,{style:{color:t.words<300?`var(--ars-serious)`:`inherit`},children:t.words})})]},t.id))})]})})})]}),(0,Wt.jsxs)(ft,{title:b(`Why this number differs from the one in the editor`,`ai-rank-suite`),children:[(0,Wt.jsx)(`p`,{children:b(`WordPress counts the raw post content, so it counts shortcode attributes, block comments and the alt text inside an image block — and it counts nothing that a block renders at display time. On a site built with blocks or a page builder the two numbers can differ by hundreds of words.`,`ai-rank-suite`)}),(0,Wt.jsx)(`p`,{children:b(`This counts the rendered page, which is what a crawler and an assistant actually read. It is stored on each post when the page is analyzed, so listing a thousand rows does not mean rendering a thousand pages.`,`ai-rank-suite`)}),(0,Wt.jsx)(`p`,{children:b(`Reading time uses 220 words per minute, the middle of the range for adult silent reading of general prose. Treat it as an estimate, not a measurement.`,`ai-rank-suite`)})]})]})}var Ut,Wt,Gt,Kt=o((()=>{Ut=u(f(),1),C(),O(),dt(),mt(),Vt(),Wt=_e(),Gt={empty:`#c0392b`,thin:`#e2952b`,standard:`#4436c8`,deep:`#2b7a4b`,long:`#8b5cf0`,unknown:`#b7bcca`}}));function qt(){let[e,t]=(0,Jt.useState)(null),[n,r]=(0,Jt.useState)(null),[i,a]=(0,Jt.useState)(!1),o=(e=!1)=>{a(!0),D.get(`/store/audit${e?`?fresh=1`:``}`).then(t).catch(e=>r(e.message)).finally(()=>a(!1))};if((0,Jt.useEffect)(()=>{o()},[]),n)return(0,Yt.jsx)(M,{tone:`serious`,children:n});if(!e)return(0,Yt.jsx)(k,{children:b(`Reading the catalogue…`,`ai-rank-suite`)});if(!e.active)return(0,Yt.jsx)(M,{tone:`warning`,children:b(`WooCommerce is not active on this site.`,`ai-rank-suite`)});let s=e.counts||{},c=t=>e.products>0?Math.round(t/e.products*100):0,l=e=>{window.location.hash=e};return(0,Yt.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Yt.jsx)(Ee,{columns:4,metrics:[{id:`products`,label:b(`Products`,`ai-rank-suite`),value:e.products.toLocaleString(),sub:b(`published`,`ai-rank-suite`)},{id:`stranded`,label:b(`Dead ends`,`ai-rank-suite`),hint:b(`Out of stock and still indexable — a crawler is sent to a page nobody can buy from.`,`ai-rank-suite`),value:s.stranded??`—`,accent:s.stranded>0?`var(--ars-c-red-ink)`:void 0,sub:b(`out of stock, still indexable`,`ai-rank-suite`)},{id:`thin`,label:b(`Thin descriptions`,`ai-rank-suite`),hint:b(`Under 200 characters, there is nothing for a search engine to rank or an assistant to quote.`,`ai-rank-suite`),value:s.thin??`—`,accent:c(s.thin)>25?`var(--ars-c-red-ink)`:void 0,sub:S(b(`%d%% under 200 characters`,`ai-rank-suite`),c(s.thin))},{id:`gtin`,label:b(`No GTIN`,`ai-rank-suite`),hint:b(`Google cannot match the product to the same item elsewhere without a global identifier.`,`ai-rank-suite`),value:s.no_gtin??`—`,accent:c(s.no_gtin)>50?`var(--ars-accent)`:void 0,sub:S(b(`%d%% cannot be matched`,`ai-rank-suite`),c(s.no_gtin))}]}),(e.issues||[]).length>0?(0,Yt.jsx)(k,{title:b(`What is costing you traffic`,`ai-rank-suite`),subtitle:b(`Ordered by consequence, not by count`,`ai-rank-suite`),action:(0,Yt.jsxs)(A,{variant:`ghost`,busy:i,onClick:()=>o(!0),children:[(0,Yt.jsx)(Tt,{size:13}),b(`Re-check`,`ai-rank-suite`)]}),children:(0,Yt.jsx)(`div`,{className:`grid gap-2`,children:e.issues.map((e,t)=>(0,Yt.jsxs)(`div`,{className:`ars-head-issue is-${e.level}`,children:[(0,Yt.jsx)(`span`,{"aria-hidden":!0,className:`ars-head-issue-mark`,children:e.level===`error`?`✕`:`!`}),(0,Yt.jsxs)(`div`,{children:[(0,Yt.jsx)(`div`,{className:`font-semibold text-[12.5px]`,children:e.title}),(0,Yt.jsx)(`div`,{className:`text-[12px] mt-0.5`,style:{color:`var(--ars-ink-2)`},children:e.text}),Xt[e.fix]&&(0,Yt.jsxs)(`button`,{type:`button`,className:`ars-linkbtn mt-1.5`,onClick:()=>l(Xt[e.fix].hash),children:[Xt[e.fix].label,` →`]})]})]},t))})}):(0,Yt.jsx)(M,{tone:`good`,children:b(`Nothing in the catalogue is failing the checks above.`,`ai-rank-suite`)}),(0,Yt.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:[(0,Yt.jsx)(k,{title:b(`Product data`,`ai-rank-suite`),subtitle:b(`What each listing is missing`,`ai-rank-suite`),flush:!0,children:(0,Yt.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Yt.jsx)(`table`,{className:`ars-table`,children:(0,Yt.jsx)(`tbody`,{children:[[b(`No SKU`,`ai-rank-suite`),s.no_sku,b(`Not required by Google, but every feed and every integration wants one.`,`ai-rank-suite`)],[b(`No GTIN`,`ai-rank-suite`),s.no_gtin,b(`Google cannot match the product to the same item elsewhere without it.`,`ai-rank-suite`)],[b(`No price`,`ai-rank-suite`),s.no_price,b(`A product with no price cannot be a rich result at all.`,`ai-rank-suite`)],[b(`No image`,`ai-rank-suite`),s.no_image,b(`No Shopping listing, no image in the result, a grey box when shared.`,`ai-rank-suite`)],[b(`No short description`,`ai-rank-suite`),s.no_short_desc,b(`WooCommerce shows it beside the price; it is also the best source for a meta description.`,`ai-rank-suite`)],[b(`No meta description`,`ai-rank-suite`),s.no_meta_desc,b(`The autopilot can write these for the whole catalogue in one run.`,`ai-rank-suite`)],[b(`Out of stock`,`ai-rank-suite`),s.out_of_stock,b(`Fine in itself. The problem is only the indexable ones.`,`ai-rank-suite`)]].map(([t,n,r])=>(0,Yt.jsxs)(`tr`,{children:[(0,Yt.jsxs)(`td`,{children:[(0,Yt.jsx)(`div`,{className:`font-medium`,children:t}),(0,Yt.jsx)(`div`,{className:`t-caption`,children:r})]}),(0,Yt.jsxs)(`td`,{className:`is-num is-narrow tabular-nums`,children:[(0,Yt.jsx)(`b`,{style:{color:n>0?`var(--ars-ink)`:`var(--ars-ink-3)`},children:n}),n>0&&e.products>0&&(0,Yt.jsxs)(`div`,{className:`t-caption`,children:[c(n),`%`]})]})]},t))})})})}),(0,Yt.jsx)(k,{title:b(`Category pages with no text`,`ai-rank-suite`),subtitle:b(`Biggest first — a description on a category with 400 products is worth 400 times the one on a category with one`,`ai-rank-suite`),flush:!0,children:(e.categories?.rows||[]).length===0?(0,Yt.jsx)(`p`,{className:`m-0 p-4 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Every category with products in it has a description.`,`ai-rank-suite`)}):(0,Yt.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Yt.jsxs)(`table`,{className:`ars-table`,children:[(0,Yt.jsx)(`thead`,{children:(0,Yt.jsxs)(`tr`,{children:[(0,Yt.jsx)(`th`,{children:b(`Category`,`ai-rank-suite`)}),(0,Yt.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Products`,`ai-rank-suite`)}),(0,Yt.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Words`,`ai-rank-suite`)})]})}),(0,Yt.jsx)(`tbody`,{children:e.categories.rows.map(e=>(0,Yt.jsxs)(`tr`,{children:[(0,Yt.jsx)(`td`,{className:`font-medium`,children:(0,Yt.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1`,children:[e.name,` `,(0,Yt.jsx)(wt,{size:10})]})}),(0,Yt.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.products}),(0,Yt.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.words})]},e.id))})]})})})]}),(0,Yt.jsxs)(k,{title:b(`Faceted navigation`,`ai-rank-suite`),subtitle:b(`The filter URLs a crawler can reach, and whether anything stops it`,`ai-rank-suite`),children:[(0,Yt.jsx)(Ee,{columns:3,metrics:[{id:`attributes`,label:b(`Filter attributes`,`ai-rank-suite`),hint:b(`Colour, size, brand and so on — each one multiplies the crawlable URL space.`,`ai-rank-suite`),value:(e.facets?.attributes||[]).length},{id:`combos`,label:b(`Possible combinations`,`ai-rank-suite`),hint:b(`Each combination is a crawlable near-duplicate competing with the category page it came from.`,`ai-rank-suite`),value:(e.facets?.combos||0).toLocaleString(),accent:e.facets?.combos>100?`var(--ars-c-red-ink)`:void 0},{id:`open`,label:b(`Unblocked parameters`,`ai-rank-suite`),hint:b(`Filter parameters no robots.txt rule names — a crawler may follow every combination of them.`,`ai-rank-suite`),value:(e.facets?.open||[]).length,accent:(e.facets?.open||[]).length>0?`var(--ars-accent)`:void 0,sub:S(b(`%d named in robots.txt`,`ai-rank-suite`),(e.facets?.guarded||[]).length)}]}),(0,Yt.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-1.5`,children:[(e.facets?.guarded||[]).map(e=>(0,Yt.jsx)(`span`,{className:`ars-tag`,style:{background:`var(--ars-c-green)`,color:`var(--ars-c-green-ink)`},children:e},e)),(e.facets?.open||[]).map(e=>(0,Yt.jsx)(`span`,{className:`ars-tag`,children:e},e))]}),(0,Yt.jsxs)(ft,{title:b(`Why this is the most damaging problem a shop can have`,`ai-rank-suite`),children:[(0,Yt.jsx)(`p`,{children:b(`A shop with six filter attributes can generate more crawlable URLs than it has products — every one a near-duplicate of a category page, every one competing with the category page it came from. Google spends its crawl budget on them instead of your products, and the category page it should have ranked is diluted across a thousand variants of itself.`,`ai-rank-suite`)}),(0,Yt.jsx)(`p`,{children:b(`None of those URLs exist until a crawler follows a filter link, which is why the problem is invisible from the admin and why it is usually found months later in a Search Console coverage report. The fix is to disallow the parameters in robots.txt — the AI Crawlers screen writes robots.txt, and the Advanced screen has the raw editor.`,`ai-rank-suite`)}),(0,Yt.jsx)(`p`,{children:b(`The count above is the number of parameters in play and whether anything names them in robots.txt. It is deliberately not a count of junk URLs, because nobody can know that without crawling the site, and a made-up number here would be worse than none.`,`ai-rank-suite`)})]})]}),(e.thin_list||[]).length>0&&(0,Yt.jsx)(k,{title:b(`The thinnest products`,`ai-rank-suite`),subtitle:b(`Shortest first — the autopilot can write descriptions for all of them`,`ai-rank-suite`),action:(0,Yt.jsx)(A,{variant:`ghost`,onClick:()=>l(`/autopilot`),children:b(`Open the autopilot`,`ai-rank-suite`)}),flush:!0,children:(0,Yt.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Yt.jsxs)(`table`,{className:`ars-table`,children:[(0,Yt.jsx)(`thead`,{children:(0,Yt.jsxs)(`tr`,{children:[(0,Yt.jsx)(`th`,{children:b(`Product`,`ai-rank-suite`)}),(0,Yt.jsx)(`th`,{className:`is-mid`,style:{width:120},children:b(`SKU`,`ai-rank-suite`)}),(0,Yt.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Characters`,`ai-rank-suite`)})]})}),(0,Yt.jsx)(`tbody`,{children:e.thin_list.map(e=>(0,Yt.jsxs)(`tr`,{style:{cursor:`pointer`},onClick:()=>l(`/content/${e.id}`),children:[(0,Yt.jsx)(`td`,{className:`font-medium truncate`,children:e.title}),(0,Yt.jsx)(`td`,{className:`is-mid t-caption`,children:e.sku||`—`}),(0,Yt.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.body===0?(0,Yt.jsx)(j,{tone:`serious`,children:b(`empty`,`ai-rank-suite`)}):e.body})]},e.id))})]})})})]})}var Jt,Yt,Xt,Zt=o((()=>{Jt=u(f(),1),C(),O(),dt(),mt(),Vt(),Yt=_e(),Xt={crawl:{hash:`/crawlers`,label:b(`Open crawler controls`,`ai-rank-suite`)},content:{hash:`/content?type=product`,label:b(`Open the product list`,`ai-rank-suite`)},products:{hash:`/content?type=product`,label:b(`Open the product list`,`ai-rank-suite`)},categories:{hash:`/schema`,label:b(`Open schema settings`,`ai-rank-suite`)},autopilot:{hash:`/autopilot`,label:b(`Let the autopilot write them`,`ai-rank-suite`)}}})),Qt,$t=o((()=>{Qt=function(e,t,n){let r=Promise.resolve();function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})}}));function en(){let e=ne.license||{};return!e.enforced||!!e.licensed}function tn(){return ne.edition===`pro`}function nn(){let e=ne.license||{};return tn()&&e.enforced&&!e.licensed&&e.activateUrl?e.activateUrl:!tn()&&e.upgradeUrl?e.upgradeUrl:e.manageUrl||`#/settings/license`}var rn=o((()=>{f(),O(),_e()}));function an({routing:e,systems:t,now:n,running:r,compact:i=!1}){let a=e?.engines||[],o=e?.jobs||[],s=a.length>0,c=cn(),l=(0,hn.useMemo)(()=>{let e=new Map;o.forEach(t=>{let n=vn(t);e.has(n)||e.set(n,[]),e.get(n).push(t)});let t=_n.filter(t=>e.has(t.id)).map(t=>({...t,jobs:e.get(t.id)})),n=[...e.keys()].filter(e=>e&&!_n.some(t=>t.id===e)).map(t=>({id:t,label:e.get(t)[0]?.desk||t,hint:``,jobs:e.get(t)}));return[...t,...n]},[o]),u=(0,hn.useMemo)(()=>{if(!n)return null;let e=o.find(e=>e.id===dn(n.task));return e?vn(e):null},[n,o]),d=(0,hn.useMemo)(()=>{let e=new Map;return a.forEach((t,n)=>e.set(t.id,n)),e},[a]),f=t?.circuits||[],p=t?.clockwork||null,m=Number(e?.jobs_total)||o.length||1;return(0,gn.jsxs)(`div`,{className:`ars-floor${s?` is-live`:``}${c?` is-still`:``}${i?` is-compact`:``}`,children:[f.length>0&&(0,gn.jsxs)(`div`,{className:`ars-circuits-wrap`,children:[(0,gn.jsxs)(`div`,{className:`ars-floor-rail-label`,children:[(0,gn.jsx)(`span`,{className:`t-overline`,children:b(`Connected to`,`ai-rank-suite`)}),(0,gn.jsx)(`span`,{className:`t-caption`,children:S(b(`%1$s of %2$s services are plugged in. Each one below says what stops working while it is dark.`,`ai-rank-suite`),f.filter(e=>e.live).length,f.length)})]}),(0,gn.jsx)(`div`,{className:`ars-vein`,"aria-hidden":!0,children:(0,gn.jsx)(`span`,{className:`ars-vein-flow`})}),(0,gn.jsx)(`div`,{className:`ars-circuits`,children:f.map(e=>(0,gn.jsxs)(`button`,{type:`button`,className:`ars-circuit${e.live?` is-live`:``}${e.core?` is-core`:``}`,title:e.powers,onClick:()=>{e.href&&(window.location.hash=`/${e.href}`)},children:[(0,gn.jsx)(`span`,{className:`ars-circuit-stem`,"aria-hidden":!0}),(0,gn.jsx)(`span`,{className:`ars-circuit-led`,"aria-hidden":!0}),(0,gn.jsx)(`span`,{className:`ars-circuit-name`,children:e.label}),(0,gn.jsx)(`span`,{className:`ars-circuit-detail`,children:e.detail}),(0,gn.jsx)(`span`,{className:`ars-circuit-powers`,children:e.powers})]},e.id))})]}),!s&&(0,gn.jsxs)(gn.Fragment,{children:[(0,gn.jsxs)(`div`,{className:`ars-floor-off`,children:[(0,gn.jsx)(`span`,{className:`ars-floor-off-mark`,"aria-hidden":!0}),(0,gn.jsxs)(`div`,{className:`min-w-0`,children:[(0,gn.jsx)(`div`,{className:`font-semibold text-[13px]`,children:b(`The floor is dark`,`ai-rank-suite`)}),(0,gn.jsx)(`p`,{className:`m-0 mt-1 text-[12.5px]`,children:b(`No API key is stored, so nothing downstream can run. Connect one engine and every desk below wakes up at once — the assignments already exist, they are just unpowered.`,`ai-rank-suite`)})]}),(0,gn.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:()=>{window.location.hash=`/ai`},children:b(`Connect an engine`,`ai-rank-suite`)})]}),!i&&p&&(0,gn.jsx)(on,{clock:p,still:c}),l.length>0&&(0,gn.jsxs)(gn.Fragment,{children:[(0,gn.jsxs)(`div`,{className:`ars-floor-rail-label`,children:[(0,gn.jsx)(`span`,{className:`t-overline`,children:b(`Would be done with AI`,`ai-rank-suite`)}),(0,gn.jsx)(`span`,{className:`t-caption`,children:S(b(`%s kinds of work are wired up and waiting for a key. Nothing here is running.`,`ai-rank-suite`),m)})]}),(0,gn.jsx)(`div`,{className:`ars-floor-desks is-dark`,children:l.map(e=>(0,gn.jsxs)(`div`,{className:`ars-desk is-dark`,children:[(0,gn.jsxs)(`div`,{className:`ars-desk-head`,children:[(0,gn.jsx)(`span`,{className:`ars-desk-name`,children:e.label||e.id}),(0,gn.jsx)(`span`,{className:`ars-desk-hint`,children:e.hint})]}),(0,gn.jsx)(`ul`,{className:`ars-desk-jobs`,children:(e.jobs||[]).map(e=>(0,gn.jsxs)(`li`,{children:[(0,gn.jsx)(`span`,{className:`ars-desk-job`,children:e.label}),(0,gn.jsx)(`span`,{className:`ars-desk-eng is-cold`,children:b(`unpowered`,`ai-rank-suite`)})]},e.id))})]},e.id))})]})]}),s&&(0,gn.jsxs)(gn.Fragment,{children:[(0,gn.jsx)(`div`,{className:`ars-floor-engines`,children:a.map(e=>{let t=n&&(e.jobs||[]).some(e=>e.id===dn(n.task));return(0,gn.jsxs)(`div`,{className:`ars-eng${t?` is-busy`:``}${e.default?` is-default`:``}`,children:[(0,gn.jsx)(`span`,{className:`ars-eng-lead`,"aria-hidden":!0}),(0,gn.jsxs)(`div`,{className:`ars-eng-head`,children:[(0,gn.jsx)(`span`,{className:`ars-eng-dot`,"aria-hidden":!0}),(0,gn.jsx)(`span`,{className:`ars-eng-name`,children:e.label}),e.default&&(0,gn.jsx)(`span`,{className:`ars-eng-flag`,children:b(`default`,`ai-rank-suite`)})]}),(0,gn.jsx)(`div`,{className:`ars-eng-model`,children:e.model}),(0,gn.jsxs)(`div`,{className:`ars-eng-load`,title:S(b(`%1$s of the %2$s kinds of work on this site are routed to this engine. It counts assignments, not calls made and not money spent.`,`ai-rank-suite`),e.load,m),children:[(0,gn.jsx)(`div`,{className:`ars-eng-load-bar`,children:(0,gn.jsx)(`span`,{style:{width:`${Math.min(100,e.load/Math.max(1,m)*100)}%`}})}),(0,gn.jsx)(`span`,{className:`tabular-nums`,children:S(b(`%1$s of %2$s job types`,`ai-rank-suite`),e.load,m)})]})]},e.id)})}),(0,gn.jsxs)(`div`,{className:`ars-floor-rail-label`,children:[(0,gn.jsx)(`span`,{className:`t-overline`,children:b(`Done with AI`,`ai-rank-suite`)}),(0,gn.jsx)(`span`,{className:`t-caption`,children:S(b(`%s kinds of work, each one sent to the engine named beside it. A line lights up only while that work is actually running.`,`ai-rank-suite`),m)})]}),(0,gn.jsxs)(`div`,{className:`ars-floor-body`,children:[(0,gn.jsx)(`div`,{className:`ars-floor-desks`,children:l.map(e=>{let t=u===e.id;return(0,gn.jsxs)(`div`,{className:`ars-desk${t?` is-active`:``}`,children:[(0,gn.jsxs)(`div`,{className:`ars-desk-head`,children:[(0,gn.jsx)(`span`,{className:`ars-desk-name`,children:e.label||e.id}),(0,gn.jsx)(`span`,{className:`ars-desk-hint`,children:e.hint})]}),(0,gn.jsx)(`ul`,{className:`ars-desk-jobs`,children:(e.jobs||[]).map(e=>{let t=n&&dn(n.task)===e.id;return(0,gn.jsxs)(`li`,{className:t?`is-on`:``,children:[(0,gn.jsx)(`span`,{className:`ars-desk-job`,children:e.label}),(0,gn.jsxs)(`span`,{className:`ars-desk-eng${e.ready?``:` is-cold`}`,title:e.fell_back?b(`Assigned elsewhere, but that engine has no key — this is where the work is really going.`,`ai-rank-suite`):e.assigned?b(`Assigned explicitly`,`ai-rank-suite`):b(`Uses the default engine`,`ai-rank-suite`),style:d.has(e.provider)?{"--ars-wire":mn(d.get(e.provider))}:void 0,children:[e.fell_back?`↳ `:``,pn(a.find(t=>t.id===e.provider)?.label||e.provider)]})]},e.id)})})]},e.id)})}),!i&&p&&(0,gn.jsx)(on,{clock:p,still:c})]})]}),(0,gn.jsx)(`div`,{className:`ars-floor-now${n?` is-on`:``}`,"aria-live":`polite`,children:n?(0,gn.jsxs)(gn.Fragment,{children:[(0,gn.jsx)(`span`,{className:`ars-floor-now-mark`,"aria-hidden":!0}),(0,gn.jsxs)(`span`,{className:`ars-floor-now-text`,children:[(0,gn.jsx)(`b`,{children:fn(n.task)}),` `,S(b(`for “%1$s” — %2$s`,`ai-rank-suite`),n.title,n.engine)]}),(0,gn.jsx)(sn,{since:n.since})]}):(0,gn.jsx)(`span`,{className:`ars-floor-now-text is-idle`,children:b(r?`Between tasks…`:s?`Powered. Nothing running right now.`:`Idle. Nothing is running.`,`ai-rank-suite`)})})]})}function on({clock:e,still:t}){return(0,gn.jsxs)(`div`,{className:`ars-clock`,children:[(0,gn.jsxs)(`div`,{className:`ars-clock-head`,children:[(0,gn.jsx)(`span`,{className:`ars-clock-title`,children:b(`Clockwork`,`ai-rank-suite`)}),e.overdue>0?(0,gn.jsx)(`span`,{className:`ars-clock-flag is-bad`,children:S(b(`%d overdue`,`ai-rank-suite`),e.overdue)}):e.disabled?(0,gn.jsx)(`span`,{className:`ars-clock-flag is-warn`,children:b(`cron handed off`,`ai-rank-suite`)}):(0,gn.jsx)(`span`,{className:`ars-clock-flag`,children:b(`on time`,`ai-rank-suite`)})]}),(0,gn.jsx)(`ul`,{className:`ars-clock-gears`,children:(e.gears||[]).map(e=>(0,gn.jsxs)(`li`,{className:`ars-gear${e.late?` is-late`:``}${e.scheduled?``:` is-off`}`,children:[(0,gn.jsx)(`span`,{className:`ars-gear-wheel${e.scheduled&&!e.late&&!t?` is-turning`:``}`,"aria-hidden":!0}),(0,gn.jsxs)(`span`,{className:`min-w-0`,children:[(0,gn.jsx)(`span`,{className:`ars-gear-name`,title:e.about,children:e.label}),(0,gn.jsxs)(`span`,{className:`ars-gear-when`,children:[e.scheduled?e.late?S(b(`overdue by %s`,`ai-rank-suite`),ln(-e.in)):S(b(`in %s`,`ai-rank-suite`),ln(e.in)):b(`not scheduled`,`ai-rank-suite`),e.last>0&&` · ${S(b(`last ran %s`,`ai-rank-suite`),un(e.last))}`,e.last===0&&e.scheduled&&` · ${b(`never run yet`,`ai-rank-suite`)}`]})]})]},e.hook))}),(0,gn.jsx)(`p`,{className:`ars-clock-note`,children:e.note})]})}function sn({since:e}){let[t,n]=(0,hn.useState)(()=>Math.floor(Date.now()/1e3));(0,hn.useEffect)(()=>{let e=setInterval(()=>n(Math.floor(Date.now()/1e3)),1e3);return()=>clearInterval(e)},[]);let r=Math.max(0,t-(e||t));return(0,gn.jsxs)(`span`,{className:`ars-floor-now-time tabular-nums`,children:[r,`s`]})}function cn(){let[e,t]=(0,hn.useState)(!1),n=(0,hn.useRef)(null);return(0,hn.useEffect)(()=>{if(n.current=window.matchMedia?.(`(prefers-reduced-motion: reduce)`),!n.current)return;let e=()=>t(n.current.matches);return e(),n.current.addEventListener?.(`change`,e),()=>n.current?.removeEventListener?.(`change`,e)},[]),e}function ln(e){let t=Math.max(0,e);if(t<60)return b(`under a minute`,`ai-rank-suite`);if(t<3600)return S(b(`%d min`,`ai-rank-suite`),Math.round(t/60));if(t<86400)return S(b(`%dh`,`ai-rank-suite`),Math.round(t/3600));let n=Math.round(t/86400);return S(x(`%d day`,`%d days`,n,`ai-rank-suite`),n)}function un(e){return S(b(`%s ago`,`ai-rank-suite`),ln(Math.floor(Date.now()/1e3)-e))}function dn(e){return yn[e]||`autopilot`}function fn(e){return bn[e]||e}function pn(e){return e?e.length>22?`${e.slice(0,21)}…`:e:``}function mn(e){let t=[`var(--ars-brand)`,`var(--ars-accent)`,`var(--ars-c-green-ink)`,`var(--ars-c-blue-ink)`,`var(--ars-c-violet-ink)`];return t[e%t.length]}var hn,gn,_n,vn,yn,bn,xn=o((()=>{hn=u(f(),1),C(),gn=_e(),_n=[{id:`copy`,label:b(`Copy desk`,`ai-rank-suite`),hint:b(`Writes`,`ai-rank-suite`)},{id:`research`,label:b(`Research`,`ai-rank-suite`),hint:b(`Finds`,`ai-rank-suite`)},{id:`technical`,label:b(`Technical`,`ai-rank-suite`),hint:b(`Structures`,`ai-rank-suite`)},{id:`analysis`,label:b(`Analysis`,`ai-rank-suite`),hint:b(`Measures`,`ai-rank-suite`)},{id:`operations`,label:b(`Operations`,`ai-rank-suite`),hint:b(`Runs at scale`,`ai-rank-suite`)}],vn=e=>e?.desk_id||e?.desk||``,yn={description:`meta`,title:`meta`,faq:`faq`},bn={description:b(`Writing a meta description`,`ai-rank-suite`),title:b(`Writing an SEO title`,`ai-rank-suite`),faq:b(`Generating questions`,`ai-rank-suite`)}}));function Sn(){let[e,t]=(0,Cn.useState)(null),[n,r]=(0,Cn.useState)(null),[i,a]=(0,Cn.useState)(!1),[o,s]=(0,Cn.useState)(null),c=(0,Cn.useRef)(null),l=()=>{if(!re(`autopilot`)){t(!1);return}D.get(`/autopilot/status`).then(t).catch(()=>t(!1)),re(`ai`)&&D.get(`/ai/usage`).then(r).catch(()=>{})};if((0,Cn.useEffect)(()=>(l(),()=>clearTimeout(c.current)),[]),(0,Cn.useEffect)(()=>(clearTimeout(c.current),e&&e.running&&(c.current=setTimeout(l,4e3)),()=>clearTimeout(c.current)),[e]),e===!1||e===null||!e.has_key)return null;let u=e.state||{},d=!!e.has_key,f=!!e.running,p=!!e.stalled&&!f&&u.total>0&&!u.finished,m=Number(u.done)||0,h=Number(u.total)||0,g=h>0?Math.min(100,Math.round(m/h*100)):0,_=n?.spend?.today_calls??null,v=n?.spend?.today??null,y=e.tasks?.[e.now?.task]||null,x=Number(e.spent?.cost_micro)||0,C=Number(e.finished)||0,w=h>0&&!f&&C>0,T=n?.spend?.timezone||``,E=/^[+-]\d{2}:\d{2}$/.test(T)?``:T,ee=async()=>{a(!0),s(null);try{await D.post(`/autopilot/resume`,{}),s(b(`Picked up again — the next batch runs on the next page view.`,`ai-rank-suite`)),l()}catch(e){s(e.message)}finally{a(!1)}},te,ne=`neutral`;return d?f?(ne=`good`,te=y?S(b(`%1$s — %2$s of %3$s`,`ai-rank-suite`),y.label,m.toLocaleString(),h.toLocaleString()):S(b(`Working — %1$s of %2$s`,`ai-rank-suite`),m.toLocaleString(),h.toLocaleString())):p?(ne=`warning`,te=S(b(`A run is open at %1$s of %2$s and is not ticking.`,`ai-rank-suite`),m.toLocaleString(),h.toLocaleString())):_>0?(ne=`good`,te=S(b(`%1$s AI calls today, %2$s spent. Nothing running right now.`,`ai-rank-suite`),_.toLocaleString(),Tn(v))):w?(ne=`good`,te=S(b(`Last run finished: %1$s of %2$s pages. Nothing running right now.`,`ai-rank-suite`),m.toLocaleString(),h.toLocaleString())):te=b(`The engine is connected and idle.`,`ai-rank-suite`):te=b(`No engine connected yet — the AI cannot do anything for you.`,`ai-rank-suite`),(0,wn.jsx)(k,{title:b(`The AI at work`,`ai-rank-suite`),subtitle:b(`What the agent is doing on this site, and what it has cost — counted, not estimated`,`ai-rank-suite`),action:d?(0,wn.jsx)(j,{tone:f?`good`:`neutral`,children:b(f?`running`:`idle`,`ai-rank-suite`)}):(0,wn.jsx)(j,{tone:`warning`,children:b(`no key`,`ai-rank-suite`)}),children:(0,wn.jsxs)(`div`,{className:`grid gap-3`,children:[(0,wn.jsxs)(`div`,{className:`ars-aiwork-head is-${ne}`,children:[(0,wn.jsx)(`span`,{className:`ars-aiwork-dot`,"aria-hidden":!0}),(0,wn.jsx)(`span`,{className:`ars-aiwork-line`,children:te})]}),(f||p)&&h>0&&(0,wn.jsx)(`div`,{className:`ars-aiwork-bar`,role:`progressbar`,"aria-valuenow":g,"aria-valuemin":0,"aria-valuemax":100,children:(0,wn.jsx)(`i`,{style:{width:`${g}%`}})}),y?.why&&f&&(0,wn.jsx)(`p`,{className:`ars-aiwork-why`,children:y.why}),p&&(0,wn.jsx)(`p`,{className:`ars-aiwork-why`,children:b(`WordPress runs scheduled work on page views, not on the clock, so a quiet site runs it late. This picks it up now.`,`ai-rank-suite`)}),d&&(_!==null||h>0)&&(0,wn.jsxs)(`div`,{className:`ars-aiwork-figures`,children:[_!==null&&(0,wn.jsxs)(`div`,{children:[(0,wn.jsx)(`span`,{children:b(`Calls today`,`ai-rank-suite`)}),(0,wn.jsx)(`strong`,{children:_.toLocaleString()}),(0,wn.jsx)(`em`,{children:E?S(b(`Requests to a model since midnight, %s. One page can take several.`,`ai-rank-suite`),E):b(`Requests to a model since midnight, in your site timezone. One page can take several.`,`ai-rank-suite`)})]}),v!==null&&(0,wn.jsxs)(`div`,{children:[(0,wn.jsx)(`span`,{children:b(`Spent today`,`ai-rank-suite`)}),(0,wn.jsx)(`strong`,{children:Tn(v)}),(0,wn.jsx)(`em`,{children:b(`Metered from the tokens each call actually used, at your provider’s list price. Not an estimate.`,`ai-rank-suite`)})]}),h>0&&(0,wn.jsxs)(`div`,{children:[(0,wn.jsx)(`span`,{children:b(w?`Last run`:`This run`,`ai-rank-suite`)}),(0,wn.jsxs)(`strong`,{children:[m.toLocaleString(),` / `,h.toLocaleString()]}),(0,wn.jsx)(`em`,{children:b(w?`Pages the last run got through, out of the queue it planned up front. It is over; nothing is waiting.`:`Pages done, out of the queue planned when the run started. The queue cannot grow while it runs.`,`ai-rank-suite`)})]}),x>0?(0,wn.jsxs)(`div`,{children:[(0,wn.jsx)(`span`,{children:b(w?`That run cost`:`This run so far`,`ai-rank-suite`)}),(0,wn.jsx)(`strong`,{children:Tn(x)}),(0,wn.jsx)(`em`,{children:b(`Measured: the sum of every call this run made, not the estimate it started with.`,`ai-rank-suite`)})]}):u.estimate?.cost?(0,wn.jsxs)(`div`,{children:[(0,wn.jsx)(`span`,{children:b(`Estimated for the run`,`ai-rank-suite`)}),(0,wn.jsx)(`strong`,{children:u.estimate.cost}),(0,wn.jsx)(`em`,{children:b(`A forecast made before the first call, from an average page. The measured figure replaces it as soon as anything is spent.`,`ai-rank-suite`)})]}):null]}),o&&(0,wn.jsx)(`p`,{className:`ars-aiwork-why`,children:o}),(0,wn.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[!d&&(0,wn.jsx)(A,{onClick:()=>En(`/ai`),children:b(`Connect an engine`,`ai-rank-suite`)}),p&&(0,wn.jsx)(A,{busy:i,onClick:ee,children:b(`Pick it up now`,`ai-rank-suite`)}),(0,wn.jsx)(A,{variant:`ghost`,onClick:()=>En(`/autopilot`),children:b(`Open the autopilot`,`ai-rank-suite`)})]}),e.routing&&(0,wn.jsx)(an,{routing:e.routing,systems:e.systems,now:e.now,running:f,compact:!0})]})})}var Cn,wn,Tn,En,Dn=o((()=>{Cn=u(f(),1),C(),O(),dt(),xn(),wn=_e(),Tn=e=>{let t=(Number(e)||0)/1e6;return t===0?`$0`:t<.01?`$${t.toFixed(3)}`:`$${t.toFixed(2)}`},En=e=>{window.location.hash=e}}));function On({title:e,subtitle:t,series:n,color:r,label:i,formatValue:a,invert:o=!1,tiles:s=[],breakdown:c=null,bands:l=null,note:u=null,status:d=null,statusAction:f=null}){let p=n.length>1?n[0].value:null,m=n.length?n[n.length-1].value:null,h=p===null?null:m-p,g=n.length>=3&&new Set(n.map(e=>e.value)).size>1;return(0,jn.jsxs)(k,{title:e,subtitle:t,action:h===null?null:(0,jn.jsx)(We,{value:h,invert:o,suffix:` ${b(`since first reading`,`ai-rank-suite`)}`}),children:[g?(0,jn.jsx)(Le,{data:n,label:i,color:r,height:140,formatValue:a,bleed:!0}):c?(0,jn.jsx)(at,{parts:c,total:m}):Array.isArray(l)&&l.length?(0,jn.jsx)(it,{value:m,color:r,bands:l}):null,!g&&(0,jn.jsx)(`p`,{className:`ars-trend-note`,children:n.length<=1?b(`The line starts once there are three readings — then its shape means something.`,`ai-rank-suite`):S(b(`%s readings so far, and nothing has moved. The line replaces this the moment it does.`,`ai-rank-suite`),n.length.toLocaleString())}),u&&(0,jn.jsx)(`p`,{className:`ars-trend-note`,children:u}),d&&(0,jn.jsxs)(`div`,{className:`ars-trend-status flex flex-wrap items-center gap-3`,children:[(0,jn.jsx)(`p`,{className:`ars-trend-note m-0`,children:d}),f]}),s.length>0&&(0,jn.jsx)(`div`,{className:`grid gap-3 mt-3 ${s.length===3?`sm:grid-cols-3`:`sm:grid-cols-2`}`,children:s.map(e=>(0,jn.jsxs)(`div`,{className:`ars-r-md px-3 py-2.5`,style:{background:`var(--ars-surface-2)`},children:[(0,jn.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,jn.jsx)(`span`,{className:`text-[12px] font-semibold`,style:{color:e.color},children:e.label}),e.delta!==null&&e.delta!==void 0&&(0,jn.jsx)(We,{value:e.delta,invert:!!e.invert})]}),(0,jn.jsx)(`div`,{className:`t-num text-[18px] font-bold mt-0.5`,children:e.text??(e.value===null||e.value===void 0?`–`:Number(e.value).toLocaleString())})]},e.label))})]})}function kn({charts:e=[`score`,`findings`,`scored`],revision:t=0}){let[n,r]=(0,An.useState)(null),[i,a]=(0,An.useState)(!1);if((0,An.useEffect)(()=>{D.get(`/dashboard/trends`).then(r).catch(()=>r({score:[],findings:[],scored:[]}))},[t]),!n)return null;let o=n.score||[],s=n.findings||[],c=n.scored||[],l=n.coverage||{published:0,analyzed:0,unanalyzed:0},u=n.meta||{},d=u.score_last?u.score_next?S(b(`Last reading %1$s · next automatic reading %2$s`,`ai-rank-suite`),u.score_last,u.score_next):S(b(`Last reading %s · a new one is taken once a day and whenever you press Recalculate`,`ai-rank-suite`),u.score_last):null,f=u.audit_running?(0,jn.jsx)(A,{variant:`ghost`,onClick:()=>{window.location.hash=`/audit`},children:b(`Open Site Audit`,`ai-rank-suite`)}):(0,jn.jsx)(A,{variant:`ghost`,onClick:async()=>{a(!0);try{await D.post(`/audit/start`,{})}catch{}window.location.hash=`/audit`},disabled:i,children:b(i?`Starting…`:`Run an audit now`,`ai-rank-suite`)}),p=u.audit_running?b(`An audit is running; its findings appear here when it finishes.`,`ai-rank-suite`):u.findings_last?u.audit_next?S(b(`Last audit %1$s · next scheduled audit %2$s`,`ai-rank-suite`),u.findings_last,u.audit_next):S(b(`Last audit %s · no audit is scheduled. Run one now, or switch on scheduled audits under Site Audit.`,`ai-rank-suite`),u.findings_last):b(`No audit has run yet. Run one now, or switch on scheduled audits under Site Audit.`,`ai-rank-suite`);if(o.length===0&&s.length===0&&c.length===0)return null;let m=s.length?s[s.length-1]:null,h=s.length>1?s[0]:null,g=e=>({value:m?m[e]:null,delta:h?m[e]-h[e]:null});return(0,jn.jsxs)(`div`,{className:`grid gap-4`,children:[e.includes(`score`)&&(0,jn.jsx)(On,{title:b(`AI search score over time`,`ai-rank-suite`),subtitle:b(`One point per recalculation — the number that should be rising`,`ai-rank-suite`),note:b(`One point each time the score was recalculated, by hand or on schedule; the last 180 are kept. The figure in the header compares the newest reading with the oldest one still on this line.`,`ai-rank-suite`),series:o,status:d,color:`var(--ars-brand)`,label:b(`Score`,`ai-rank-suite`),formatValue:e=>`${e}`,bands:[{to:50,label:b(`needs work`,`ai-rank-suite`),tint:`var(--ars-serious-tonal)`},{to:80,label:b(`solid`,`ai-rank-suite`),tint:`var(--ars-warning-tonal)`},{to:100,label:b(`strong`,`ai-rank-suite`),tint:`var(--ars-good-tonal)`}],tiles:[{label:b(`Now`,`ai-rank-suite`),value:o.length?o[o.length-1].value:null,delta:o.length>1?o[o.length-1].value-o[0].value:null,color:`var(--ars-brand)`},{label:b(`Best so far`,`ai-rank-suite`),value:o.length?Math.max(...o.map(e=>e.value)):null,delta:null,color:`var(--ars-ink-2)`}]}),e.includes(`findings`)&&(0,jn.jsx)(On,{title:b(`Findings over time`,`ai-rank-suite`),subtitle:b(`One point per audit run — the number that should be falling`,`ai-rank-suite`),note:b(`One point per completed audit, last 30. A run still crawling is left out until it finishes, so the line cannot dip and then correct itself an hour later.`,`ai-rank-suite`),series:s,status:p,statusAction:f,color:`var(--ars-accent)`,label:b(`Open findings`,`ai-rank-suite`),formatValue:e=>`${e}`,invert:!0,breakdown:m?[{label:b(`Critical`,`ai-rank-suite`),value:m.critical||0,color:`var(--ars-c-red-ink)`},{label:b(`Warning`,`ai-rank-suite`),value:m.warning||0,color:`var(--ars-accent)`},{label:b(`Notice`,`ai-rank-suite`),value:m.notice||0,color:`var(--ars-brand)`}]:null,tiles:[{label:b(`Critical`,`ai-rank-suite`),...g(`critical`),color:`var(--ars-c-red-ink)`,invert:!0},{label:b(`Warning`,`ai-rank-suite`),...g(`warning`),color:`var(--ars-accent)`,invert:!0},{label:b(`Notice`,`ai-rank-suite`),...g(`notice`),color:`var(--ars-brand)`,invert:!0}]}),e.includes(`scored`)&&(0,jn.jsx)(On,{title:b(`Pages scored over time`,`ai-rank-suite`),subtitle:b(`Cumulative, from the day each page was analysed — coverage should keep pace with the site`,`ai-rank-suite`),note:b(`The running total of pages carrying a score, by the day each one was analysed in your site’s timezone, over the last 60 days. It starts from everything scored before that window, not from zero.`,`ai-rank-suite`),series:c,color:`var(--ars-good)`,label:b(`Pages scored`,`ai-rank-suite`),formatValue:e=>e.toLocaleString(),tiles:c.length>1?[{label:b(`Scored`,`ai-rank-suite`),value:c[c.length-1].value,delta:c[c.length-1].value-c[0].value,color:`var(--ars-good)`},{label:b(`Added on the last day`,`ai-rank-suite`),value:c[c.length-1].value-c[c.length-2].value,delta:null,color:`var(--ars-ink-2)`}]:l.published>0?[{label:b(`Not scored yet`,`ai-rank-suite`),value:l.unanalyzed,delta:null,color:l.unanalyzed>0?`var(--ars-accent)`:`var(--ars-good)`},{label:b(`Coverage`,`ai-rank-suite`),value:null,text:S(b(`%d%%`,`ai-rank-suite`),Math.round(l.analyzed/Math.max(1,l.published)*100)),delta:null,color:`var(--ars-ink-2)`}]:[]})]})}var An,jn,Mn=o((()=>{An=u(f(),1),C(),O(),dt(),jn=_e()})),Nn=c({default:()=>Pn});function Pn(){let[e,t]=(0,Ln.useState)(null),[n,r]=(0,Ln.useState)(null),[i,a]=(0,Ln.useState)(null),[o,s]=(0,Ln.useState)(null),[c,l]=(0,Ln.useState)(!1),[u,d]=(0,Ln.useState)(null),[f,p]=(0,Ln.useState)(0),[m,h]=(0,Ln.useState)(null);(0,Ln.useEffect)(()=>{D.get(`/boot`).then(e=>{e.score?t(e.score):d(b(`The score could not be loaded.`,`ai-rank-suite`)),r(e.kpis),a(e.content),s(e.setup)}).catch(()=>{D.get(`/score`).then(t).catch(e=>d(e.message)),D.get(`/dashboard/kpis`).then(r).catch(()=>{}),D.get(`/score/content`).then(a).catch(()=>{}),D.get(`/setup/status`).then(s).catch(()=>{})})},[]);let g=async()=>{l(!0),d(null);try{t(await D.post(`/score/recalculate`)),r(await D.get(`/dashboard/kpis`)),p(e=>e+1)}catch(e){d(e.message)}finally{l(!1)}},_=e?.checks||[],v=_.filter(e=>e.status!==`pass`),y=e?.dimensions?.overall,C=(()=>{let e=n||{},t=(e.links||{}).broken??0,r=(e.content||{}).analyzed??0,a=v.filter(e=>e.status===`fail`).length,s=o?!!o.ai:null,c=i?.missing_desc??0;if(s===!1)return{tone:`warning`,text:b(`No AI engine is connected, so the half of this plugin that writes and measures cannot run.`,`ai-rank-suite`),why:b(`Meta descriptions, FAQs, the autopilot and every answer simulation need a model. One key, stored encrypted on your own server, switches all of them on.`,`ai-rank-suite`),action:b(`Connect an engine`,`ai-rank-suite`),href:`/ai`};let l=e.audit||{};return(l.critical??0)>0?{tone:`bad`,text:S(x(`%d critical audit finding needs attention.`,`%d critical audit findings need attention.`,l.critical,`ai-rank-suite`),l.critical),why:b(`Critical means a page is blocked, duplicated or unreadable to a crawler. Nothing else on this screen matters until these are gone.`,`ai-rank-suite`),action:b(`Open the audit`,`ai-rank-suite`),href:`/audit`}:a>0?{tone:`bad`,text:S(x(`%d check is failing across the site.`,`%d checks are failing across the site.`,a,`ai-rank-suite`),a),why:b(`These are the ones that cost traffic today rather than eventually. Next best actions below lists them in the order worth fixing.`,`ai-rank-suite`),action:b(`Open the audit`,`ai-rank-suite`),href:`/audit`}:t>0?{tone:`warning`,text:S(x(`%d link is broken on this site.`,`%d links are broken on this site.`,t,`ai-rank-suite`),t),why:b(`A dead link is a trust signal pointing the wrong way, and crawlers spend budget rediscovering it every time.`,`ai-rank-suite`),action:b(`Open the checker`,`ai-rank-suite`),href:`/links`}:(l.warning??0)>0?{tone:`warning`,text:S(x(`The audit found %d warning across the site.`,`The audit found %d warnings across the site.`,l.warning,`ai-rank-suite`),l.warning),why:b(`Thin content, duplicate descriptions and unlinked pages are the usual weight. Work by rule, not by page: one fix clears hundreds.`,`ai-rank-suite`),action:b(`Open the audit`,`ai-rank-suite`),href:`/audit`}:c>0?{tone:`warning`,text:S(x(`%d published page has no meta description.`,`%d published pages have no meta description.`,c,`ai-rank-suite`),c),why:b(`Without one Google writes the snippet from whatever sentence it scrapes, and llms.txt has nothing to describe the page with. The autopilot can write all of them in one run.`,`ai-rank-suite`),action:b(`Let the autopilot write them`,`ai-rank-suite`),href:`/autopilot`}:r===0?{tone:`neutral`,text:b(`Nothing has been analysed yet, so there is nothing to score.`,`ai-rank-suite`),why:b(`The audit walks your published content and stores a result per page. Everything else on this screen reads from those results.`,`ai-rank-suite`),action:b(`Run the audit`,`ai-rank-suite`),href:`/audit`}:y!=null&&y>=80?{tone:`good`,text:S(b(`Your site scores %d out of 100 for AI search.`,`ai-rank-suite`),y),why:b(`No failing check, no broken link, no open warning and every page described. Keep an eye on the answer-simulation trend — that is the number that moves last.`,`ai-rank-suite`),action:b(`See what changed`,`ai-rank-suite`),href:`/insights`}:{tone:`neutral`,text:y==null?b(`Ready when you are.`,`ai-rank-suite`):S(b(`Your site scores %d out of 100 for AI search.`,`ai-rank-suite`),y),why:b(`Nothing is broken. The fastest way up from here is the weakest dimension below — the same fix repeated across pages beats a perfect single page.`,`ai-rank-suite`),action:b(`See where it is weak`,`ai-rank-suite`),href:`/audit`}})(),w=n||{};w.visibility,w.search;let T=w.links||{};w.indexing,w.content;let E=w.commerce||{};w.health;let ee=[...o&&!o.ai?[{label:b(`Connect an AI engine`,`ai-rank-suite`),detail:b(`Unlock writing, Autopilot and answer simulations`,`ai-rank-suite`),action:b(`Connect`,`ai-rank-suite`),href:`/ai`,tone:`warning`}]:[],...v.filter(e=>e.status===`fail`).length>0?[{label:b(`Fix failing site checks`,`ai-rank-suite`),detail:S(x(`%d check is failing now`,`%d checks are failing now`,v.filter(e=>e.status===`fail`).length,`ai-rank-suite`),v.filter(e=>e.status===`fail`).length),action:b(`Open audit`,`ai-rank-suite`),href:`/audit`,tone:`bad`}]:[],...T.broken>0?[{label:b(`Repair broken links`,`ai-rank-suite`),detail:S(x(`%d broken link found`,`%d broken links found`,T.broken,`ai-rank-suite`),T.broken),action:b(`Open checker`,`ai-rank-suite`),href:`/links/checker`,tone:`warning`}]:[],...i?.missing_desc>0?[{label:b(`Write missing descriptions`,`ai-rank-suite`),detail:S(x(`%d published page has none`,`%d published pages have none`,i.missing_desc,`ai-rank-suite`),i.missing_desc),action:b(`Open Autopilot`,`ai-rank-suite`),href:`/autopilot`,tone:`warning`}]:[],...i?.unanalyzed>0?[{label:b(`Analyse the remaining content`,`ai-rank-suite`),detail:S(b(`%d pages have no score yet`,`ai-rank-suite`),i.unanalyzed),action:b(`Open analysis`,`ai-rank-suite`),href:`/analyzer`,tone:`neutral`}]:[],...o&&!o.google?[{label:b(`Connect Search Console`,`ai-rank-suite`),detail:b(`Add real clicks, impressions and positions`,`ai-rank-suite`),action:b(`Connect`,`ai-rank-suite`),href:`/search-console`,tone:`neutral`}]:[],...o&&o.visibility_prompts===0?[{label:b(`Add answer-test prompts`,`ai-rank-suite`),detail:b(`Start a repeatable AI mention baseline`,`ai-rank-suite`),action:b(`Add prompts`,`ai-rank-suite`),href:`/ai-visibility`,tone:`neutral`}]:[]].slice(0,3);return(0,P.jsxs)(`div`,{className:`ars-page`,children:[!en()&&(tn()?(0,P.jsxs)(`div`,{className:`ars-upsell`,children:[(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`div`,{className:`ars-upsell-kicker`,children:b(`AI Rank Suite Pro`,`ai-rank-suite`)}),(0,P.jsx)(`div`,{className:`ars-upsell-title`,children:b(`Your Pro license is not connected yet.`,`ai-rank-suite`)}),(0,P.jsx)(`p`,{className:`ars-upsell-text`,children:b(`This is the full Pro build — every feature is installed. Connect the license from your purchase email and everything unlocks. No re-purchase, no extra cost.`,`ai-rank-suite`)})]}),(0,P.jsxs)(`div`,{className:`ars-upsell-cta`,children:[(0,P.jsx)(`a`,{className:`ars-btn ars-btn-primary`,href:nn(),children:b(`Activate license`,`ai-rank-suite`)}),(0,P.jsx)(`span`,{className:`ars-upsell-price`,children:b(`The key is in your purchase email.`,`ai-rank-suite`)})]})]}):(0,P.jsxs)(`div`,{className:`ars-upsell`,children:[(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`div`,{className:`ars-upsell-kicker`,children:b(`AI Rank Suite Pro`,`ai-rank-suite`)}),(0,P.jsx)(`div`,{className:`ars-upsell-title`,children:b(`Does ChatGPT recommend you — or your competitor?`,`ai-rank-suite`)}),(0,P.jsx)(`p`,{className:`ars-upsell-text`,children:b(`Pro asks the assistants the 25 questions your customers ask, tells you who was named instead of you, and writes what is missing — on your own AI key. No credits, no seats.`,`ai-rank-suite`)})]}),(0,P.jsxs)(`div`,{className:`ars-upsell-cta`,children:[(0,P.jsx)(`a`,{className:`ars-btn ars-btn-primary`,href:nn(),children:b(`Upgrade to Pro`,`ai-rank-suite`)}),(0,P.jsx)(`span`,{className:`ars-upsell-price`,children:b(`$49/year · 14-day money back`,`ai-rank-suite`)})]})]})),u&&(0,P.jsx)(M,{tone:`serious`,children:u}),(0,P.jsxs)(`div`,{className:`ars-hero`,children:[(0,P.jsxs)(`div`,{className:`ars-hero-ring`,children:[(0,P.jsx)(Pe,{value:y??null,size:132,label:b(`AI search`,`ai-rank-suite`),onLight:!0}),(0,P.jsx)(`p`,{className:`t-caption ars-hero-ring-note`,children:b(`The share of the plugin’s checks this site passes, weighted by area; a half-pass counts half. Under 40 is critical, 70 and over is good.`,`ai-rank-suite`)})]}),(0,P.jsxs)(`div`,{className:`ars-hero-body`,children:[(0,P.jsx)(`span`,{className:`ars-hero-badge is-${C.tone}`,children:C.tone===`good`?b(`Healthy`,`ai-rank-suite`):C.tone===`bad`?b(`Needs attention`,`ai-rank-suite`):C.tone===`warning`?b(`Room to improve`,`ai-rank-suite`):b(`Getting started`,`ai-rank-suite`)}),(0,P.jsx)(`h2`,{className:`ars-hero-title`,children:C.text}),(0,P.jsx)(`p`,{className:`ars-hero-why`,children:C.why}),(0,P.jsxs)(`div`,{className:`ars-hero-actions`,children:[(0,P.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:()=>Rn(C.href),children:C.action}),(0,P.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,onClick:g,disabled:c,children:b(c?`Recalculating…`:`Recalculate`,`ai-rank-suite`)})]}),c&&(0,P.jsx)(`div`,{className:`ars-progress-track is-indeterminate`,role:`progressbar`,"aria-label":b(`Recalculating…`,`ai-rank-suite`),children:(0,P.jsx)(`div`,{className:`ars-progress-fill`})})]}),(0,P.jsx)(`div`,{className:`ars-hero-stats`,children:[{label:b(`Pages scored`,`ai-rank-suite`),value:i?`${(i.analyzed??0).toLocaleString()} / ${(i.pages??0).toLocaleString()}`:`–`,href:`/content`,help:b(`Pages analysed at least once, out of the published pages on this site.`,`ai-rank-suite`)},{label:b(`Open findings`,`ai-rank-suite`),value:(w.audit?.total??0).toLocaleString(),href:`/audit`,tone:w.audit?.critical?`bad`:w.audit?.total?`warn`:`good`,help:b(`Problems the last completed audit found and nobody has fixed or dismissed yet.`,`ai-rank-suite`)},{label:b(`Broken links`,`ai-rank-suite`),value:(T.broken??0).toLocaleString(),href:`/links/checker`,tone:T.broken?`warn`:`good`,help:b(`Links checked from your own pages that answered with an error the last time they were fetched.`,`ai-rank-suite`)},{label:b(`AI engine`,`ai-rank-suite`),value:o===null?`–`:o.ai?b(`Connected`,`ai-rank-suite`):b(`Not connected`,`ai-rank-suite`),href:`/ai`,tone:o===null?void 0:o.ai?`good`:`warn`,help:b(`Whether a model key is stored. Without one, nothing here writes, rewrites or simulates an answer.`,`ai-rank-suite`)}].map(e=>(0,P.jsxs)(`button`,{type:`button`,className:`ars-hero-stat`,onClick:()=>Rn(e.href),title:e.help,children:[(0,P.jsx)(`span`,{className:`ars-hero-stat-v${e.tone?` is-`+e.tone:``}`,children:e.value}),(0,P.jsx)(`span`,{className:`ars-hero-stat-l`,children:e.label}),(0,P.jsx)(`span`,{className:`ars-hero-stat-h`,children:e.help})]},e.label))})]}),ee.length>0&&(0,P.jsx)(k,{title:b(`Your next 3 actions`,`ai-rank-suite`),subtitle:b(`Ordered by impact — finish one, then come back for the next`,`ai-rank-suite`),children:(0,P.jsx)(`div`,{className:`grid gap-2`,children:ee.map((e,t)=>(0,P.jsxs)(`div`,{className:`flex items-center gap-3 ars-r-md px-3 py-2.5`,style:{background:`var(--ars-surface-2)`,border:`1px solid var(--ars-border)`},children:[(0,P.jsx)(`span`,{className:`ars-priority-number is-${e.tone}`,"aria-hidden":!0,children:t+1}),(0,P.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,P.jsx)(`div`,{className:`font-semibold text-[13px]`,children:e.label}),(0,P.jsx)(`div`,{className:`t-caption mt-0.5`,children:e.detail})]}),(0,P.jsx)(A,{variant:t===0?`primary`:`ghost`,onClick:()=>Rn(e.href),children:e.action})]},e.label))})}),(0,P.jsx)(Sn,{}),E.active&&typeof E.readiness==`number`&&(0,P.jsx)(k,{title:b(`Shop`,`ai-rank-suite`),subtitle:S(x(`%s published product`,`%s published products`,E.products||0,`ai-rank-suite`),(E.products||0).toLocaleString()),action:(0,P.jsx)(A,{variant:`ghost`,onClick:()=>Rn(`/shop`),children:b(`Open the shop screen`,`ai-rank-suite`)}),children:(0,P.jsx)(`div`,{className:`ars-hero-stats`,children:[{label:b(`Shop readiness`,`ai-rank-suite`),value:`${E.readiness} / 100`,tone:E.readiness>=80?`good`:E.readiness>=50?`warn`:`bad`,help:b(`Product data, product text, sellable pages and product schema, weighed together.`,`ai-rank-suite`)},{label:b(`Without image`,`ai-rank-suite`),value:(E.counts?.no_image??0).toLocaleString(),tone:E.counts?.no_image?`warn`:`good`,help:b(`A product without an image is not shown as a product by Google.`,`ai-rank-suite`)},{label:b(`Thin description`,`ai-rank-suite`),value:(E.counts?.thin??0).toLocaleString(),tone:E.counts?.thin?`warn`:`good`,help:b(`Under 200 characters. An AI answer has nothing to quote.`,`ai-rank-suite`)},{label:b(`Not scored yet`,`ai-rank-suite`),value:(E.unscored??0).toLocaleString(),tone:E.unscored?`warn`:`good`,help:b(`Products the analyser has not read. Analyse them under Content.`,`ai-rank-suite`)}].map(e=>(0,P.jsxs)(`button`,{type:`button`,className:`ars-hero-stat`,onClick:()=>Rn(`/shop`),title:e.help,children:[(0,P.jsx)(`span`,{className:`ars-hero-stat-v is-${e.tone}`,children:e.value}),(0,P.jsx)(`span`,{className:`ars-hero-stat-l`,children:e.label}),(0,P.jsx)(`span`,{className:`ars-hero-stat-h`,children:e.help})]},e.label))})}),(0,P.jsx)(kn,{charts:[`score`,`findings`],revision:f}),i&&(i.areas||[]).length>0&&(0,P.jsxs)(k,{title:b(`Where this site is weak`,`ai-rank-suite`),subtitle:i.unanalyzed>0?S(b(`Averaged across all %1$s analyzed pages — %2$s not analyzed yet`,`ai-rank-suite`),i.analyzed.toLocaleString(),i.unanalyzed.toLocaleString()):S(b(`Averaged across all %s pages`,`ai-rank-suite`),i.analyzed.toLocaleString()),action:(0,P.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>Rn(`/analyzer`),children:b(`Open the full analysis →`,`ai-rank-suite`)}),flush:!0,children:[(0,P.jsx)(Fn,{areas:i.areas,onDrill:e=>h(e===m?null:e),active:m,analyzed:i.analyzed}),m&&(0,P.jsx)(In,{area:m,onOpen:e=>Rn(`/content/${e}`)})]}),i&&i.needs_attention.length>0&&(0,P.jsx)(k,{title:b(`Pages needing attention`,`ai-rank-suite`),subtitle:b(`Lowest combined GEO + SEO across the whole site — ranked in the database, not from a sample`,`ai-rank-suite`),action:(0,P.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>Rn(`/content?filter=weak_geo`),children:b(`See all weak pages →`,`ai-rank-suite`)}),flush:!0,children:(0,P.jsx)(`div`,{className:`ars-table-wrap`,children:(0,P.jsxs)(`table`,{className:`ars-table`,children:[(0,P.jsx)(`thead`,{children:(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`th`,{children:b(`Page`,`ai-rank-suite`)}),(0,P.jsx)(`th`,{className:`is-mid`,style:{width:90},children:b(`Type`,`ai-rank-suite`)}),(0,P.jsx)(`th`,{className:`is-num is-narrow`,children:b(`GEO`,`ai-rank-suite`)}),(0,P.jsx)(`th`,{className:`is-num is-narrow`,children:b(`SEO`,`ai-rank-suite`)})]})}),(0,P.jsx)(`tbody`,{children:i.needs_attention.slice(0,5).map(e=>(0,P.jsxs)(`tr`,{style:{cursor:`pointer`},onClick:()=>Rn(`/content/${e.id}`),children:[(0,P.jsx)(`td`,{className:`font-medium truncate`,children:e.title}),(0,P.jsx)(`td`,{className:`is-mid t-caption`,children:e.type}),(0,P.jsx)(`td`,{className:`is-num is-narrow`,children:(0,P.jsx)(Fe,{value:e.geo_score})}),(0,P.jsx)(`td`,{className:`is-num is-narrow`,children:(0,P.jsx)(Fe,{value:e.seo_score})})]},e.id))})]})})}),(0,P.jsx)(k,{title:b(`System status`,`ai-rank-suite`),subtitle:b(`Connections and coexistence at a glance`,`ai-rank-suite`),children:(0,P.jsxs)(`div`,{className:`grid gap-1.5`,children:[[{label:b(`AI engine`,`ai-rank-suite`),ok:!!o?.ai,text:o===null?`–`:o.ai?b(`Connected`,`ai-rank-suite`):b(`Not connected`,`ai-rank-suite`),action:o?.ai?b(`Open`,`ai-rank-suite`):b(`Connect`,`ai-rank-suite`),href:`/ai`},{label:b(`Search Console`,`ai-rank-suite`),ok:!!o?.google,text:o===null?`–`:o.google?b(`Connected`,`ai-rank-suite`):b(`Not connected`,`ai-rank-suite`),action:o?.google?b(`Open`,`ai-rank-suite`):b(`Connect`,`ai-rank-suite`),href:`/search-console`},...o?.other_seo_plugin?[{label:b(`Other SEO plugin`,`ai-rank-suite`),ok:!1,text:S(b(`%s is still active — import its settings, then deactivate it so only one plugin controls SEO output.`,`ai-rank-suite`),o.other_seo_plugin),action:b(`Open import`,`ai-rank-suite`),href:`/import`}]:[],{label:b(`Modules`,`ai-rank-suite`),ok:!0,text:b(`Enable or disable every module under Settings.`,`ai-rank-suite`),action:b(`Manage`,`ai-rank-suite`),href:`/settings`}].map(e=>(0,P.jsxs)(`div`,{className:`flex items-center gap-3 ars-r-md px-3 py-2`,style:{background:`var(--ars-surface-2)`},children:[(0,P.jsx)(`span`,{"aria-hidden":!0,style:{width:8,height:8,borderRadius:999,flex:`none`,background:e.ok?`var(--ars-good)`:`var(--ars-warning)`}}),(0,P.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,P.jsx)(`span`,{className:`font-medium text-[13px]`,children:e.label}),(0,P.jsx)(`span`,{className:`t-caption`,style:{marginInlineStart:8},children:e.text})]}),(0,P.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>Rn(e.href),children:e.action})]},e.label)),(0,P.jsxs)(`p`,{className:`m-0 mt-1 t-caption`,children:[(0,P.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>Rn(`/wizard`),children:b(`Setup wizard`,`ai-rank-suite`)}),` · `,(0,P.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>{window.location.hash=`/ai-wizard`},children:b(`AI setup`,`ai-rank-suite`)}),` · `,(0,P.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>Rn(`/ai`),children:b(`Let AI do — open the catalogue`,`ai-rank-suite`)})]})]})}),(0,P.jsx)(Oe,{title:b(`All checks`,`ai-rank-suite`),note:S(b(`%1$d of %2$d passing`,`ai-rank-suite`),_.filter(e=>e.status===`pass`).length,_.length),children:(0,P.jsx)(`div`,{className:`ars-table-wrap`,children:(0,P.jsxs)(`table`,{className:`ars-table`,children:[(0,P.jsx)(`thead`,{children:(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`th`,{children:b(`Check`,`ai-rank-suite`)}),(0,P.jsx)(`th`,{className:`is-mid`,children:b(`Dimension`,`ai-rank-suite`)}),(0,P.jsx)(`th`,{className:`is-action`,children:b(`Status`,`ai-rank-suite`)})]})}),(0,P.jsx)(`tbody`,{children:_.map(e=>(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`td`,{children:e.label}),(0,P.jsx)(`td`,{className:`capitalize is-mid`,style:{color:`var(--ars-ink-2)`},children:e.dimension}),(0,P.jsx)(`td`,{className:`is-action`,children:(0,P.jsx)(Ne,{status:e.status})})]},e.id))})]})})})]})}function Fn({areas:e,onDrill:t,active:n,analyzed:r=0}){return(0,P.jsxs)(`div`,{className:`px-4 py-2`,children:[(0,P.jsxs)(`div`,{className:`ars-legend`,children:[(0,P.jsx)(`span`,{className:`ars-legend-label`,children:b(`Each bar is every page in this area:`,`ai-rank-suite`)}),(0,P.jsxs)(`span`,{className:`ars-legend-key`,children:[(0,P.jsx)(`i`,{style:{background:`var(--ars-c-red-ink)`}}),b(`critical`,`ai-rank-suite`)]}),(0,P.jsxs)(`span`,{className:`ars-legend-key`,children:[(0,P.jsx)(`i`,{style:{background:`var(--ars-accent)`}}),b(`weak`,`ai-rank-suite`)]}),(0,P.jsxs)(`span`,{className:`ars-legend-key`,children:[(0,P.jsx)(`i`,{style:{background:`var(--ars-c-green-ink)`}}),b(`good`,`ai-rank-suite`)]})]}),e.map(e=>{let n=e.pages>0&&e.average!==null;return(0,P.jsx)(De,{score:n?e.average:void 0,label:e.label,sub:e.hint,segments:n?[{label:b(`Critical`,`ai-rank-suite`),value:e.critical||0,color:`var(--ars-c-red-ink)`},{label:b(`Weak`,`ai-rank-suite`),value:e.weak||0,color:`var(--ars-accent)`},{label:b(`Good`,`ai-rank-suite`),value:e.good||0,color:`var(--ars-c-green-ink)`}]:[{label:b(`Not analysed`,`ai-rank-suite`),value:1,color:`var(--ars-ink-3)`}],reach:n?S(b(`%1$s of %2$s pages need work here`,`ai-rank-suite`),(e.critical+e.weak).toLocaleString(),e.pages.toLocaleString()):b(`not analysed yet`,`ai-rank-suite`),note:n&&r>0&&e.pages<r?S(b(`%s pages are not counted here because this does not apply to them yet`,`ai-rank-suite`),(r-e.pages).toLocaleString()):void 0,onClick:n?()=>t(e.key):void 0},e.key)}),(0,P.jsx)(`p`,{className:`m-0 px-1 py-2 t-caption`,children:b(`Click a row to see the pages behind it.`,`ai-rank-suite`)})]})}function In({area:e,onOpen:t}){let[n,r]=(0,Ln.useState)(null);return(0,Ln.useEffect)(()=>{r(null),D.get(`/score/area/${e}`).then(e=>r(e.rows||[])).catch(()=>r([]))},[e]),n?n.length===0?(0,P.jsx)(`p`,{className:`m-0 px-4 pb-4 t-caption`,children:b(`No pages scored in this area yet.`,`ai-rank-suite`)}):(0,P.jsx)(`div`,{className:`ars-table-wrap`,style:{borderTop:`1px solid var(--ars-border)`},children:(0,P.jsxs)(`table`,{className:`ars-table`,children:[(0,P.jsx)(`thead`,{children:(0,P.jsxs)(`tr`,{children:[(0,P.jsx)(`th`,{children:b(`The 20 worst pages in this area`,`ai-rank-suite`)}),(0,P.jsx)(`th`,{className:`is-mid`,style:{width:90},children:b(`Type`,`ai-rank-suite`)}),(0,P.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Score`,`ai-rank-suite`)})]})}),(0,P.jsx)(`tbody`,{children:n.map(e=>(0,P.jsxs)(`tr`,{style:{cursor:`pointer`},onClick:()=>t(e.id),children:[(0,P.jsx)(`td`,{className:`font-medium truncate`,children:e.title||`#${e.id}`}),(0,P.jsx)(`td`,{className:`is-mid t-caption`,children:e.type}),(0,P.jsx)(`td`,{className:`is-num is-narrow`,children:(0,P.jsx)(Fe,{value:e.score})})]},e.id))})]})}):(0,P.jsx)(`p`,{className:`m-0 px-4 pb-4 t-caption`,children:b(`Loading the worst pages…`,`ai-rank-suite`)})}var Ln,P,Rn,zn=o((()=>{Ln=u(f(),1),C(),O(),rn(),Dn(),dt(),Mn(),P=_e(),Rn=e=>{window.location.hash=e}}));function Bn({metrics:e,columns:t=4}){return(0,Un.jsx)(Ee,{columns:t,metrics:e,onSelect:t=>{let n=e.find(e=>(e.id||e.label)===t);n&&n.href&&Wn(n.href)}})}function Vn(){let[e,t]=(0,Hn.useState)(null),[n,r]=(0,Hn.useState)(null),[i,a]=(0,Hn.useState)(null);if((0,Hn.useEffect)(()=>{D.get(`/dashboard/kpis`).then(t).catch(()=>{}),D.get(`/setup/status`).then(r).catch(()=>{}),D.get(`/score/content`).then(a).catch(()=>{})},[]),!e)return null;let o=e,s=o.visibility||{},c=o.search||{},l=o.links||{},u=o.indexing||{},d=o.content||{},f=o.commerce||{},p=o.health||{};return(0,Un.jsx)(Oe,{title:b(`All site metrics`,`ai-rank-suite`),note:b(`16 live signals · open when you need the detail`,`ai-rank-suite`),children:(0,Un.jsxs)(`div`,{className:`grid gap-5 p-4`,children:[(0,Un.jsxs)(`section`,{className:`grid gap-2`,children:[(0,Un.jsx)(ke,{hint:b(`Where the next decade of traffic comes from`,`ai-rank-suite`),children:b(`AI search`,`ai-rank-suite`)}),(0,Un.jsx)(Bn,{metrics:[{id:`geo`,label:b(`AI search readiness`,`ai-rank-suite`),hint:b(`Site-wide AI optimization, averaged across every analyzed page. The score the rest of this suite works to raise.`,`ai-rank-suite`),value:Gn(o.geo?.value),unit:`/ 100`,delta:o.geo?.delta,spark:o.geo?.series,href:`/content`},{id:`visibility`,label:b(`AI Answer Simulation`,`ai-rank-suite`),hint:b(`How often a simulated AI answer mentions this site when asked the prompts you monitor.`,`ai-rank-suite`),value:s.value==null?`—`:s.value,unit:s.value==null?``:`/ 100`,delta:s.delta,spark:s.series,sub:s.total?S(b(`mentioned in %1$d of %2$d prompts`,`ai-rank-suite`),s.mentioned,s.total):b(`add prompts to start monitoring`,`ai-rank-suite`),href:`/ai-visibility`},{id:`llms`,label:`llms.txt`,hint:b(`A curated map of this site for AI assistants, served at /llms.txt. One click to turn on, no config.`,`ai-rank-suite`),value:u.llms_txt?b(`Live`,`ai-rank-suite`):b(`Off`,`ai-rank-suite`),accent:u.llms_txt?`var(--ars-c-green-ink)`:`var(--ars-accent)`,href:`/llms-txt`},{id:`engine`,label:b(`AI engine`,`ai-rank-suite`),hint:b(`The connected model powers titles, descriptions, FAQs and the autopilot. One key, stored encrypted on your own server.`,`ai-rank-suite`),value:n?.ai?b(`Connected`,`ai-rank-suite`):b(`Not set`,`ai-rank-suite`),accent:n?.ai?void 0:`var(--ars-accent)`,href:`/ai`}]})]}),(0,Un.jsxs)(`section`,{className:`grid gap-2`,children:[(0,Un.jsx)(ke,{hint:c.connected?b(`Live from Search Console`,`ai-rank-suite`):b(`Connect Search Console for live data`,`ai-rank-suite`),children:b(`Search`,`ai-rank-suite`)}),(0,Un.jsx)(Bn,{metrics:[{id:`position`,label:b(`Avg. position`,`ai-rank-suite`),hint:b(`Averaged across every tracked keyword. Lower is better.`,`ai-rank-suite`),value:Gn(c.avg_position),sub:`${c.tracked||0} keywords tracked`,href:`/search-console/keywords`},{id:`top10`,label:b(`Top 10 positions`,`ai-rank-suite`),hint:b(`Keywords at an average Search Console position on page one — the only page most people ever see.`,`ai-rank-suite`),value:c.top10??0,sub:S(b(`%s in the top 3`,`ai-rank-suite`),c.top3??0),href:`/search-console/keywords`},{id:`clicks`,label:b(`Clicks`,`ai-rank-suite`),hint:b(`Times somebody chose your result and arrived on the site, in the reporting period.`,`ai-rank-suite`),value:(c.clicks??0).toLocaleString(),spark:c.series,sub:`${(c.impressions??0).toLocaleString()} impressions`,href:`/search-console`},{id:`indexnow`,label:b(`Instant indexing`,`ai-rank-suite`),hint:b(`URLs pushed to search engines via IndexNow the moment they change. No account needed.`,`ai-rank-suite`),value:u.indexnow_on?u.indexnow_week??0:b(`Off`,`ai-rank-suite`),unit:u.indexnow_on?b(`this week`,`ai-rank-suite`):``,accent:u.indexnow_on?void 0:`var(--ars-accent)`,href:`/google`}]})]}),(0,Un.jsxs)(`section`,{className:`grid gap-2`,children:[(0,Un.jsx)(ke,{hint:b(`Scores stored per page — nothing is recomputed here`,`ai-rank-suite`),children:b(`Content health`,`ai-rank-suite`)}),(0,Un.jsx)(Bn,{metrics:[{id:`analyzed`,label:b(`Pages analyzed`,`ai-rank-suite`),hint:b(`Published content with a stored score. Everything else on this screen reads from these results.`,`ai-rank-suite`),value:d.analyzed??0,href:`/content`},{id:`avg-geo`,label:b(`Avg. AI score`,`ai-rank-suite`),hint:b(`How ready the analyzed pages are for AI search, averaged. The distribution behind it is in "Where this site is weak" below.`,`ai-rank-suite`),value:d.avg_geo??0,unit:`/ 100`,href:`/content`},{id:`avg-seo`,label:b(`Avg. SEO score`,`ai-rank-suite`),hint:b(`Classic search readiness of the same pages.`,`ai-rank-suite`),value:d.avg_seo??0,unit:`/ 100`,href:`/content`},{id:`missing-desc`,label:b(`Missing descriptions`,`ai-rank-suite`),hint:b(`Published pages with no meta description. Google scrapes its own snippet and llms.txt has nothing to describe the page with. The autopilot can write all of them in one run.`,`ai-rank-suite`),value:i?.missing_desc??0,accent:i?.missing_desc>0?`var(--ars-accent)`:void 0,sub:S(b(`%s thin pages`,`ai-rank-suite`),i?.thin_content??0),href:`/content/bulk`}]})]}),(0,Un.jsxs)(`section`,{className:`grid gap-2`,children:[(0,Un.jsx)(ke,{hint:f.active?b(`Broken paths cost crawl budget — WooCommerce feeds included`,`ai-rank-suite`):b(`Broken paths cost you crawl budget and rankings`,`ai-rank-suite`),children:f.active?b(`Technical health & store`,`ai-rank-suite`):b(`Technical health`,`ai-rank-suite`)}),(0,Un.jsx)(Bn,{columns:f.active?3:4,metrics:[{id:`broken`,label:b(`Broken links`,`ai-rank-suite`),hint:b(`A dead link is a trust signal pointing the wrong way, and crawlers spend budget rediscovering it every time.`,`ai-rank-suite`),value:l.broken??0,accent:l.broken>0?`var(--ars-c-red-ink)`:void 0,sub:f.active?S(b(`%1$s checked · %2$s redirected`,`ai-rank-suite`),(l.checked??0).toLocaleString(),l.redirected??0):S(b(`%s links checked`,`ai-rank-suite`),(l.checked??0).toLocaleString()),href:`/links/checker`},{id:`notfound`,label:b(`404 errors`,`ai-rank-suite`),hint:b(`Requests that hit nothing. A redirect rule turns each one back into a page.`,`ai-rank-suite`),value:l.not_found??0,accent:l.not_found>0?`var(--ars-accent)`:void 0,sub:S(x(`%s redirect rule active`,`%s redirect rules active`,l.redirects??0,`ai-rank-suite`),(l.redirects??0).toLocaleString()),href:`/links/redirects`},...f.active?[]:[{id:`redirected`,label:b(`Redirected links`,`ai-rank-suite`),hint:b(`Links that only resolve after a redirect hop. Point them at the final URL and save the hop.`,`ai-rank-suite`),value:l.redirected??0,href:`/links/checker`}],{id:`system`,label:b(`System`,`ai-rank-suite`),hint:b(`Module health. A failing module is quarantined so it cannot take the site down; a second SEO plugin active means output may collide.`,`ai-rank-suite`),value:p.quarantined>0?S(b(`%d failed`,`ai-rank-suite`),p.quarantined):b(`Healthy`,`ai-rank-suite`),accent:p.quarantined>0||p.conflict?`var(--ars-c-red-ink)`:void 0,sub:p.conflict?`${p.conflict} also active`:`${p.modules??0} modules running`,href:`/developer`},...f.active?[{id:`products`,label:b(`Products`,`ai-rank-suite`),hint:b(`Published products carrying Product, Offer, Review and Shipping structured data.`,`ai-rank-suite`),value:f.products??0,sub:`schema-enriched`,href:`/schema`},{id:`feed-google`,label:b(`Google Merchant feed`,`ai-rank-suite`),hint:b(`The product feed Google Merchant Center reads. Built once, cached, served instantly.`,`ai-rank-suite`),value:Gn(f.feed_google),unit:f.feed_google==null?``:`items`,sub:f.feed_google==null?`not built yet`:`cached, served instantly`,href:`/feeds`},{id:`feed-meta`,label:b(`Meta catalog feed`,`ai-rank-suite`),hint:b(`The catalog feed Facebook & Instagram Shops read.`,`ai-rank-suite`),value:Gn(f.feed_meta),unit:f.feed_meta==null?``:`items`,sub:f.feed_meta==null?`not built yet`:`Facebook & Instagram Shops`,href:`/feeds`}]:[]]})]})]})})}var Hn,Un,Wn,Gn,Kn=o((()=>{Hn=u(f(),1),C(),O(),dt(),Un=_e(),Wn=e=>{window.location.hash=e},Gn=e=>e??`–`})),qn=c({default:()=>Jn});function Jn(){let[e,t]=(0,Zn.useState)(28),[n,r]=(0,Zn.useState)(``),[i,a]=(0,Zn.useState)(null),[o,s]=(0,Zn.useState)(!0),[c,l]=(0,Zn.useState)(null),[u,d]=(0,Zn.useState)(`clicks`),f=(t=e,r=n,i=!1)=>{s(!0),l(null),D.get(`/insights?days=${t}&post_type=${encodeURIComponent(r)}${i?`&refresh=1`:``}`).then(a).catch(e=>l(e.message)).finally(()=>s(!1))};if((0,Zn.useEffect)(()=>{f(e,n)},[e,n]),!i&&o)return(0,F.jsx)(k,{children:b(`Reading the period…`,`ai-rank-suite`)});if(c)return(0,F.jsx)(M,{tone:`serious`,children:c});if(!i)return(0,F.jsx)(rt,{blocks:4,label:b(`Loading insights`,`ai-rank-suite`)});let p=i.search,m=i.visibility,h=i.content,g=i.headline||{},_=[{id:`clicks`,label:b(`Clicks`,`ai-rank-suite`),value:p.clicks,prev:p.prev.clicks,key:`clicks`},{id:`impressions`,label:b(`Impressions`,`ai-rank-suite`),value:p.impressions,prev:p.prev.impressions,key:`impressions`},{id:`ctr`,label:b(`Click-through`,`ai-rank-suite`),value:p.ctr,suffix:`%`,key:null},{id:`position`,label:b(`Position`,`ai-rank-suite`),value:p.position,prev:p.prev.position,key:`position`,invert:!0}],v=_.find(e=>e.id===u)||_[0],y=[{id:`gsc`,label:b(`Search Console`,`ai-rank-suite`),live:!!p.has_data,on:b(`clicks, impressions, position`,`ai-rank-suite`),off:b(`Connect`,`ai-rank-suite`),href:`#/search-console`},{id:`analysis`,label:b(`Page analysis`,`ai-rank-suite`),live:(h.scored||0)>0,on:S(b(`%1$s of %2$s scored`,`ai-rank-suite`),$n(h.scored),$n(h.total)),off:b(`Score pages`,`ai-rank-suite`),href:`#/audit`},{id:`sim`,label:b(`Answer simulation`,`ai-rank-suite`),live:!!m.has_data||!!m.ever,on:m.has_data?b(`runs in this period`,`ai-rank-suite`):b(`no runs in this period`,`ai-rank-suite`),off:b(`Set up`,`ai-rank-suite`),href:`#/ai-visibility`},{id:`links`,label:b(`Link checker`,`ai-rank-suite`),live:!!i.links?.has_data,on:b(`links checked`,`ai-rank-suite`),off:b(`Run once`,`ai-rank-suite`),href:`#/links`},{id:`indexing`,label:b(`Instant indexing`,`ai-rank-suite`),live:(i.activity?.total||0)>0,on:S(b(`%s submitted`,`ai-rank-suite`),$n(i.activity?.total||0)),off:b(`Set up`,`ai-rank-suite`),href:`#/google`}],C=y.filter(e=>e.live).length;return(0,F.jsxs)(`div`,{className:`grid gap-4`,children:[(0,F.jsx)(xe,{tone:g.tone||`neutral`,text:g.text,sub:g.why,action:g.action,onAction:()=>er(`#/${g.href||`dashboard`}`)}),(0,F.jsxs)(Ke,{right:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[i.cached&&(0,F.jsx)(j,{tone:`neutral`,children:`cached`}),(0,F.jsx)(A,{variant:`ghost`,busy:o,onClick:()=>f(e,n,!0),children:b(`Refresh`,`ai-rank-suite`)})]}),children:[(0,F.jsx)(Je,{options:Qn,value:e,onChange:t,label:b(`Period`,`ai-rank-suite`)}),(0,F.jsxs)(`label`,{className:`flex items-center gap-2 text-[12px]`,style:{color:`var(--ars-ink-2)`},children:[b(`Content`,`ai-rank-suite`),(0,F.jsxs)(`select`,{className:`ars-select`,value:n,onChange:e=>r(e.target.value),children:[(0,F.jsx)(`option`,{value:``,children:b(`All types`,`ai-rank-suite`)}),(i.post_types||[]).map(e=>(0,F.jsx)(`option`,{value:e.name,children:e.label},e.name))]})]}),(0,F.jsxs)(`span`,{className:`t-caption`,children:[i.period.from,` → `,i.period.to,` · `,S(b(`vs. %s`,`ai-rank-suite`),i.period.prev)]})]}),(0,F.jsxs)(`div`,{className:`ars-sources`,role:`list`,"aria-label":b(`Data sources`,`ai-rank-suite`),children:[(0,F.jsx)(`span`,{className:`ars-sources-lead`,children:C===y.length?b(`Every source is live`,`ai-rank-suite`):S(b(`%1$d of %2$d sources live`,`ai-rank-suite`),C,y.length)}),y.map(e=>(0,F.jsxs)(`button`,{type:`button`,role:`listitem`,className:`ars-source${e.live?` is-live`:``}`,onClick:()=>er(e.href),title:e.live?`${e.label}: ${e.on}`:S(b(`%1$s is not feeding this screen yet — %2$s`,`ai-rank-suite`),e.label,e.off),children:[(0,F.jsx)(`span`,{className:`ars-source-dot`,"aria-hidden":!0}),(0,F.jsx)(`span`,{className:`ars-source-label`,children:e.label}),(0,F.jsx)(`span`,{className:`ars-source-state`,children:e.live?e.on:e.off+` →`})]},e.id))]}),p.has_data&&(0,F.jsxs)(k,{flush:!0,children:[p.has_data&&(0,F.jsx)(`div`,{className:`ars-metricstrip`,children:_.map(e=>(0,F.jsxs)(`button`,{type:`button`,className:`ars-metric${u===e.id?` is-active`:``}`,onClick:()=>d(e.id),children:[(0,F.jsx)(`span`,{className:`ars-metric-label`,children:e.label}),(0,F.jsxs)(`span`,{className:`ars-metric-value tabular-nums`,children:[e.value===null||e.value===void 0?`—`:$n(e.value),e.suffix&&(0,F.jsx)(`span`,{className:`ars-metric-suffix`,children:e.suffix})]}),e.prev!==void 0&&e.prev!==null&&(0,F.jsx)(We,{value:Math.round(((e.value??0)-e.prev)*10)/10,invert:e.invert})]},e.id))}),(0,F.jsx)(`div`,{className:`px-4 pb-4 pt-1`,children:p.has_data?(0,F.jsx)(Le,{label:v.label,color:v.id===`position`?`var(--ars-series-2)`:`var(--ars-series-1)`,data:p.series.map(e=>({label:e.label,value:e[v.key||`clicks`]})),height:200,invert:v.id===`position`}):null})]}),(0,F.jsx)(k,{title:b(`Where the leverage is`,`ai-rank-suite`),subtitle:b(`The same fix repeated across pages, ranked by weight × how many pages fail it`,`ai-rank-suite`),action:(0,F.jsx)(A,{variant:`ghost`,onClick:()=>er(`#/content`),children:b(`Open content`,`ai-rank-suite`)}),children:(i.issues.top||[]).length===0?(0,F.jsx)(we,{title:b(`Nothing is failing across enough pages to rank`,`ai-rank-suite`),action:b(`Run the site audit`,`ai-rank-suite`),onAction:()=>er(`#/audit`),compact:!0,children:b(`Either the analysed pages pass every check, or not enough of them have been analysed to find a pattern.`,`ai-rank-suite`)}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Te,{items:i.issues.top.map(e=>({id:e.id,label:e.label,hint:S(b(`%1$d failing, %2$d warning · weight %3$s`,`ai-rank-suite`),e.fail,e.warn,e.weight),value:e.fail*2+e.warn,display:e.fail+e.warn,unit:b(`pages`,`ai-rank-suite`),color:e.fail>e.warn?`var(--ars-c-red-ink)`:`var(--ars-accent)`})),onItem:()=>er(`#/content`)}),(0,F.jsx)(`p`,{className:`t-caption m-0 mt-3`,children:i.issues.truncated?S(b(`Measured over %s analysed pages (capped — the newest pages first). Reflects the current state of the site, not the selected period.`,`ai-rank-suite`),$n(i.issues.scanned)):S(b(`Measured over %s analysed pages. Reflects the current state of the site, not the selected period.`,`ai-rank-suite`),$n(i.issues.scanned))})]})}),p.has_data&&(0,F.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2 items-stretch`,children:[(0,F.jsx)(k,{title:b(`Biggest gains`,`ai-rank-suite`),subtitle:b(`Keywords that climbed inside this period`,`ai-rank-suite`),flush:!0,children:(0,F.jsx)(Yn,{rows:i.movers.up,empty:b(`No keyword improved inside this period.`,`ai-rank-suite`)})}),(0,F.jsx)(k,{title:b(`Biggest drops`,`ai-rank-suite`),subtitle:b(`Fix these before they cost you the ranking`,`ai-rank-suite`),flush:!0,children:(0,F.jsx)(Yn,{rows:i.movers.down,empty:b(`Nothing lost ground.`,`ai-rank-suite`)})})]}),(m.has_data||m.ever)&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(ke,{hint:b(`The measurement this product exists for`,`ai-rank-suite`),children:b(`AI search`,`ai-rank-suite`)}),(0,F.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2 items-stretch`,children:[(0,F.jsx)(k,{title:b(`Answer simulation trend`,`ai-rank-suite`),subtitle:b(`Share of monitored prompts where a simulated assistant answer mentions you`,`ai-rank-suite`),action:(0,F.jsx)(A,{variant:`ghost`,onClick:()=>er(`#/ai-visibility`),children:b(`Open`,`ai-rank-suite`)}),children:m.has_data?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Le,{label:b(`Mentioned`,`ai-rank-suite`),color:`var(--ars-series-3)`,data:m.series.map(e=>({label:e.label,value:e.value})),height:160,formatValue:e=>`${e}%`}),(0,F.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3 mt-3`,children:[(0,F.jsx)(Xn,{label:b(`Cited with a link`,`ai-rank-suite`),value:m.cited,sub:b(`assistant linked to you`,`ai-rank-suite`)}),(0,F.jsx)(Xn,{label:b(`Positive tone`,`ai-rank-suite`),value:m.positive,sub:b(`answers in your favour`,`ai-rank-suite`)}),(0,F.jsx)(Xn,{label:b(`Negative tone`,`ai-rank-suite`),value:m.negative,sub:b(`nothing negative`,`ai-rank-suite`),tone:m.negative>0?`bad`:null})]})]}):(0,F.jsx)(we,{title:m.ever?b(`No runs inside this period`,`ai-rank-suite`):b(`No answer simulations yet`,`ai-rank-suite`),action:m.ever?b(`Open AI Answer Simulation`,`ai-rank-suite`):b(`Set up monitoring`,`ai-rank-suite`),onAction:()=>er(`#/ai-visibility`),children:m.ever?b(`There are older runs. Widen the period, or run the check again to add a fresh point to the trend.`,`ai-rank-suite`):b(`Add the questions your customers actually ask an assistant. Each run records whether you were named, how early, and who was named instead.`,`ai-rank-suite`)})}),(0,F.jsx)(k,{title:b(`Share of voice`,`ai-rank-suite`),subtitle:b(`Who else is named in the same answers`,`ai-rank-suite`),flush:!0,children:(m.competitors||[]).length===0?(0,F.jsx)(we,{title:b(`No competitor has been named yet`,`ai-rank-suite`),compact:!0,children:b(`Once a run finds other brands in the same answers, they are counted here.`,`ai-rank-suite`)}):(0,F.jsx)(`div`,{className:`px-4 pb-4 pt-1`,children:(0,F.jsx)(Te,{items:m.competitors.map(e=>({id:e.name,label:e.name,value:e.count,display:`${e.count}×`,color:`var(--ars-c-teal-ink, var(--ars-c-green-ink))`}))})})})]})]}),(0,F.jsx)(ke,{hint:b(`Everything above describes the analysed part of your site`,`ai-rank-suite`),children:b(`Coverage`,`ai-rank-suite`)}),(0,F.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2 items-stretch`,children:[(0,F.jsxs)(k,{title:b(`How much has been analysed`,`ai-rank-suite`),subtitle:S(b(`%1$s of %2$s published items`,`ai-rank-suite`),$n(h.scored),$n(h.total)),action:h.coverage<100&&(0,F.jsx)(A,{variant:`ghost`,onClick:()=>er(`#/audit`),children:b(`Continue`,`ai-rank-suite`)}),flush:!0,children:[(0,F.jsx)(`div`,{className:`ars-table-wrap`,children:(0,F.jsxs)(`table`,{className:`ars-table`,children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:b(`Type`,`ai-rank-suite`)}),(0,F.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Published`,`ai-rank-suite`)}),(0,F.jsx)(`th`,{className:`is-num`,style:{width:150},children:b(`Analysed`,`ai-rank-suite`)}),(0,F.jsx)(`th`,{className:`is-num is-narrow`,children:b(`GEO`,`ai-rank-suite`)}),(0,F.jsx)(`th`,{className:`is-num is-narrow`,children:b(`SEO`,`ai-rank-suite`)})]})}),(0,F.jsx)(`tbody`,{children:(h.types||[]).map(e=>(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`font-medium`,children:e.label}),(0,F.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:$n(e.count)}),(0,F.jsx)(`td`,{className:`is-num`,children:(0,F.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,F.jsx)(`span`,{className:`ars-cov`,children:(0,F.jsx)(`span`,{className:`ars-cov-fill`,style:{width:`${e.coverage}%`,background:e.coverage===0?`var(--ars-c-red-ink)`:e.coverage<60?`var(--ars-accent)`:`var(--ars-c-green-ink)`}})}),(0,F.jsx)(`span`,{className:`tabular-nums t-caption`,style:{minWidth:`6ch`},children:$n(e.scored)})]})}),(0,F.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.avg_geo===null?(0,F.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`—`}):e.avg_geo}),(0,F.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.avg_seo===null?(0,F.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`—`}):e.avg_seo})]},e.type))})]})}),h.scored<h.total&&(0,F.jsx)(`p`,{className:`t-caption m-0 px-4 pb-4`,children:b(`A dash means nothing in that type has been scored yet, which is not the same as scoring zero. On a large site the audit works through the backlog in batches.`,`ai-rank-suite`)})]}),(0,F.jsx)(k,{title:b(`Score distribution`,`ai-rank-suite`),subtitle:S(x(`%s scored page by GEO band — a fat left tail is where the work is`,`%s scored pages by GEO band — a fat left tail is where the work is`,h.scored,`ai-rank-suite`),$n(h.scored)),children:h.scored===0?(0,F.jsx)(we,{title:b(`Nothing scored yet`,`ai-rank-suite`),action:b(`Run the site audit`,`ai-rank-suite`),onAction:()=>er(`#/audit`),children:b(`The distribution needs stored analyses to draw. It fills in as the audit works through your content.`,`ai-rank-suite`)}):(0,F.jsx)(Ze,{data:h.bands.map((e,t)=>({label:e,value:h.distribution[t]})),series:[{key:`value`,label:b(`Pages`,`ai-rank-suite`),color:`var(--ars-brand)`}],height:160})})]}),(i.links?.has_data||(i.activity?.total||0)>0)&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(ke,{children:b(`Underneath`,`ai-rank-suite`)}),(0,F.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2 items-stretch`,children:[(0,F.jsx)(k,{title:b(`Link health`,`ai-rank-suite`),subtitle:b(`Every checked link by HTTP status class`,`ai-rank-suite`),action:(0,F.jsx)(A,{variant:`ghost`,onClick:()=>er(`#/links`),children:b(`Open checker`,`ai-rank-suite`)}),children:i.links.has_data?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Ye,{segments:[{label:b(`OK`,`ai-rank-suite`),value:i.links.classes.ok,color:`var(--ars-c-green-ink)`},{label:b(`Redirect`,`ai-rank-suite`),value:i.links.classes.redirect,color:`var(--ars-accent)`},{label:b(`Not found`,`ai-rank-suite`),value:i.links.classes.client,color:`var(--ars-c-red-ink)`},{label:b(`Server error`,`ai-rank-suite`),value:i.links.classes.server,color:`#8b1d24`},{label:b(`Unreachable`,`ai-rank-suite`),value:i.links.classes.unreachable,color:`var(--ars-ink-3)`}]}),(0,F.jsxs)(`p`,{className:`t-caption m-0 mt-2`,children:[$n(i.links.internal),` internal · `,$n(i.links.external),` external`]}),(i.links.worst||[]).length>0&&(0,F.jsx)(`div`,{className:`ars-table-wrap mt-3`,children:(0,F.jsxs)(`table`,{className:`ars-table`,children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:b(`Most-linked broken URL`,`ai-rank-suite`)}),(0,F.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Status`,`ai-rank-suite`)}),(0,F.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Uses`,`ai-rank-suite`)})]})}),(0,F.jsx)(`tbody`,{children:i.links.worst.map(e=>(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`truncate ars-mono text-[11.5px]`,children:e.url}),(0,F.jsx)(`td`,{className:`is-num is-narrow`,children:(0,F.jsx)(j,{tone:e.status===0?`neutral`:`serious`,children:e.status===0?b(`no reply`,`ai-rank-suite`):e.status})}),(0,F.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.refs})]},e.url))})]})})]}):(0,F.jsx)(we,{title:b(`No links have been checked yet`,`ai-rank-suite`),action:b(`Open the link checker`,`ai-rank-suite`),onAction:()=>er(`#/links`),children:b(`The checker crawls the links inside your own content and records what each one answers.`,`ai-rank-suite`)})}),(0,F.jsx)(k,{title:b(`Indexing activity`,`ai-rank-suite`),subtitle:b(`URLs submitted per day — proof search engines were told about your changes`,`ai-rank-suite`),action:(0,F.jsxs)(j,{tone:i.activity.total>0?`good`:`neutral`,children:[$n(i.activity.total),` submitted`]}),children:i.activity.total>0?(0,F.jsx)(Ze,{data:i.activity.series,series:[{key:`indexnow`,label:b(`IndexNow`,`ai-rank-suite`),color:`var(--ars-brand)`},{key:`google`,label:b(`Google Indexing API`,`ai-rank-suite`),color:`var(--ars-c-green-ink)`}],height:150}):(0,F.jsx)(we,{title:b(`Nothing submitted in this period`,`ai-rank-suite`),action:b(`Set up instant indexing`,`ai-rank-suite`),onAction:()=>er(`#/google`),children:b(`IndexNow tells Bing, Yandex, Seznam and Naver the moment a page changes. The Google Indexing API covers job postings and live streams.`,`ai-rank-suite`)})})]})]}),(0,F.jsx)(Vn,{}),(0,F.jsx)(kn,{charts:[`scored`]})]})}function Yn({rows:e,empty:t}){return!e||e.length===0?(0,F.jsx)(we,{title:t,compact:!0,children:b(`Nothing to show for this period.`,`ai-rank-suite`)}):(0,F.jsx)(`div`,{className:`ars-table-wrap`,children:(0,F.jsxs)(`table`,{className:`ars-table`,children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:b(`Keyword`,`ai-rank-suite`)}),(0,F.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Was`,`ai-rank-suite`)}),(0,F.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Now`,`ai-rank-suite`)}),(0,F.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Change`,`ai-rank-suite`)})]})}),(0,F.jsx)(`tbody`,{children:e.map(e=>(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`font-medium truncate`,children:e.keyword}),(0,F.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,style:{color:`var(--ars-ink-3)`},children:e.was}),(0,F.jsx)(`td`,{className:`is-num is-narrow`,children:(0,F.jsx)(Re,{value:e.now})}),(0,F.jsx)(`td`,{className:`is-num is-narrow`,children:(0,F.jsx)(We,{value:e.delta,invert:!0})})]},e.keyword))})]})})}function Xn({label:e,value:t,sub:n,tone:r}){return(0,F.jsxs)(`div`,{className:`ars-mini`,children:[(0,F.jsx)(`span`,{className:`ars-mini-label`,children:e}),(0,F.jsx)(`span`,{className:`ars-mini-value tabular-nums`,style:r===`bad`?{color:`var(--ars-c-red-ink)`}:void 0,children:t??0}),(0,F.jsx)(`span`,{className:`ars-mini-sub`,children:n})]})}var Zn,F,Qn,$n,er,tr=o((()=>{Kn(),Mn(),Zn=u(f(),1),C(),O(),dt(),F=_e(),Qn=[{id:7,label:b(`7 days`,`ai-rank-suite`)},{id:28,label:b(`28 days`,`ai-rank-suite`)},{id:90,label:b(`90 days`,`ai-rank-suite`)}],$n=e=>(e??0).toLocaleString(),er=e=>{window.location.hash=e}}));function nr({value:e,label:t,sub:n,delta:r}){let i=Math.max(0,Math.min(100,Number(e)||0)),a=-90+i/100*180,o=Math.PI*70,s=pr(i);return(0,lr.jsxs)(`div`,{className:`ars-barometer`,children:[(0,lr.jsxs)(`svg`,{viewBox:`0 0 170 100`,role:`img`,"aria-label":S(b(`%1$s: %2$s of 100 — %3$s`,`ai-rank-suite`),t,i,fr(i)),children:[(0,lr.jsx)(`path`,{d:`M 15 90 A 70 70 0 0 1 155 90`,fill:`none`,stroke:`var(--ars-surface-3)`,strokeWidth:`14`,strokeLinecap:`round`}),(0,lr.jsx)(`path`,{d:`M 15 90 A 70 70 0 0 1 155 90`,fill:`none`,stroke:s,strokeWidth:`14`,strokeLinecap:`round`,strokeDasharray:`${i/100*o} ${o}`,style:{transition:`stroke-dasharray 700ms cubic-bezier(0.2,0,0,1), stroke 300ms ease`}}),(0,lr.jsx)(`g`,{style:{transform:`rotate(${a}deg)`,transformOrigin:`85px 90px`,transition:`transform 700ms cubic-bezier(0.2,0,0,1)`},children:(0,lr.jsx)(`line`,{x1:`85`,y1:`90`,x2:`85`,y2:`34`,stroke:`var(--ars-ink)`,strokeWidth:`2.5`,strokeLinecap:`round`})}),(0,lr.jsx)(`circle`,{cx:`85`,cy:`90`,r:`5`,fill:`var(--ars-ink)`})]}),(0,lr.jsxs)(`div`,{className:`ars-barometer-read`,children:[(0,lr.jsxs)(`span`,{className:`ars-barometer-value`,style:{color:s},children:[i,typeof r==`number`&&r!==0&&(0,lr.jsxs)(`span`,{className:`ars-barometer-delta`,style:{color:r>0?`var(--ars-good)`:`var(--ars-serious)`},children:[r>0?`▲`:`▼`,Math.abs(r)]})]}),(0,lr.jsx)(`span`,{className:`ars-barometer-label`,children:t}),(0,lr.jsx)(`span`,{className:`ars-barometer-verdict`,style:{color:s},children:fr(i)}),n&&(0,lr.jsx)(`span`,{className:`t-caption`,children:n})]})]})}function rr({dist:e,label:t}){let n=Math.max(1,...e),r=e.reduce((e,t)=>e+t,0);return(0,lr.jsxs)(`div`,{className:`grid gap-1`,children:[(0,lr.jsx)(`span`,{className:`t-overline`,children:t}),(0,lr.jsx)(`span`,{className:`t-caption`,children:b(`How many pages fall in each score range`,`ai-rank-suite`)}),(0,lr.jsx)(`div`,{className:`ars-spread`,children:e.map((e,t)=>(0,lr.jsxs)(`div`,{className:`ars-spread-col`,title:S(b(`%1$s pages scored %2$s`,`ai-rank-suite`),e,ur[t]),children:[(0,lr.jsx)(`span`,{className:`ars-spread-n tabular-nums`,children:e.toLocaleString()}),(0,lr.jsx)(`span`,{className:`ars-spread-bar${e===0?` is-empty`:``}`,style:e===0?void 0:{height:`${Math.max(6,e/n*100)}%`,background:dr[t]}}),(0,lr.jsx)(`span`,{className:`ars-spread-label`,children:ur[t]}),(0,lr.jsx)(`span`,{className:`ars-spread-share tabular-nums`,children:r>0?`${Math.round(e/r*100)}%`:`—`})]},ur[t]))})]})}function ir({rows:e,keyField:t,labelField:n,onPick:r,active:i}){return(0,lr.jsxs)(`div`,{className:`ars-analyzer-table`,children:[(0,lr.jsxs)(`div`,{className:`ars-analyzer-row is-head`,children:[(0,lr.jsx)(`span`,{}),(0,lr.jsx)(`span`,{children:b(`Entries`,`ai-rank-suite`)}),(0,lr.jsx)(`span`,{children:b(`Scored`,`ai-rank-suite`)}),(0,lr.jsx)(`span`,{children:b(`GEO`,`ai-rank-suite`)}),(0,lr.jsx)(`span`,{children:b(`SEO`,`ai-rank-suite`)}),(0,lr.jsx)(`span`,{children:b(`Under 40`,`ai-rank-suite`)})]}),e.map(e=>(0,lr.jsxs)(`button`,{type:`button`,className:`ars-analyzer-row${i===e[t]?` is-active`:``}`,onClick:()=>r(i===e[t]?``:e[t]),title:b(`Click to scope the analyzer to this`,`ai-rank-suite`),children:[(0,lr.jsxs)(`span`,{className:`font-medium truncate`,children:[e[n],e.rtl?(0,lr.jsx)(j,{tone:`neutral`,children:b(`RTL`,`ai-rank-suite`)}):null]}),(0,lr.jsx)(`span`,{className:`tabular-nums`,children:e.total.toLocaleString()}),(0,lr.jsxs)(`span`,{className:`tabular-nums`,style:{color:e.analyzed<e.total?`var(--ars-accent)`:`var(--ars-ink-2)`},children:[e.total>0?Math.round(100*e.analyzed/e.total):0,`%`]}),(0,lr.jsx)(`span`,{className:`tabular-nums font-semibold`,style:{color:pr(e.avg_geo)},children:e.analyzed?e.avg_geo:`–`}),(0,lr.jsx)(`span`,{className:`tabular-nums font-semibold`,style:{color:pr(e.avg_seo)},children:e.analyzed?e.avg_seo:`–`}),(0,lr.jsx)(`span`,{className:`tabular-nums`,style:{color:e.weak>0?`var(--ars-serious)`:`var(--ars-ink-3)`},children:e.weak.toLocaleString()})]},e[t]))]})}function ar(e,t){let n=String(e||``).replace(`_`,`-`);try{let t=new Intl.DisplayNames([document.documentElement.lang||`en`],{type:`language`}).of(n);if(t&&t.toLowerCase()!==n.toLowerCase())return`${t} (${e})`}catch{}return t||e}function or({postType:e,lang:t}){let[n,r]=(0,cr.useState)(`geo`),[i,a]=(0,cr.useState)(1),[o,s]=(0,cr.useState)(null);return(0,cr.useEffect)(()=>{a(1)},[e,t,n]),(0,cr.useEffect)(()=>{let r=new URLSearchParams({metric:n,page:String(i),per_page:`25`});e&&r.set(`post_type`,e),t&&r.set(`lang`,t),D.get(`/site-analyzer/weakest?${r}`).then(s).catch(()=>s({items:[],pagination:{pages:0,total:0}}))},[e,t,n,i]),o?(0,lr.jsxs)(`div`,{className:`grid gap-2`,children:[(0,lr.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,lr.jsx)(`span`,{className:`t-overline`,children:b(`Weakest pages`,`ai-rank-suite`)}),(0,lr.jsx)(Je,{value:n,onChange:r,options:[{id:`geo`,label:b(`by GEO`,`ai-rank-suite`)},{id:`seo`,label:b(`by SEO`,`ai-rank-suite`)}]})]}),o.items.length===0?(0,lr.jsx)(`span`,{className:`t-caption`,children:b(`No scored pages in this scope yet.`,`ai-rank-suite`)}):(0,lr.jsx)(`div`,{className:`ars-analyzer-table is-pages`,children:o.items.map(e=>(0,lr.jsxs)(`div`,{className:`ars-analyzer-row`,children:[(0,lr.jsx)(`a`,{href:`#/content/${e.id}`,className:`truncate font-medium`,children:e.title||`#${e.id}`}),(0,lr.jsx)(`span`,{className:`t-caption`,children:e.type}),(0,lr.jsx)(`span`,{className:`tabular-nums font-semibold`,style:{color:pr(e.geo)},children:e.geo}),(0,lr.jsx)(`span`,{className:`tabular-nums font-semibold`,style:{color:pr(e.seo)},children:e.seo}),(0,lr.jsxs)(`a`,{href:e.edit,target:`_blank`,rel:`noreferrer noopener`,className:`ars-linkbtn`,children:[b(`Edit`,`ai-rank-suite`),` ↗`]})]},e.id))}),o.pagination.pages>1&&(0,lr.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,lr.jsxs)(`span`,{className:`t-caption`,children:[b(`Page`,`ai-rank-suite`),` `,i,` `,b(`of`,`ai-rank-suite`),` `,o.pagination.pages,` · `,o.pagination.total.toLocaleString(),` `,b(`pages`,`ai-rank-suite`)]}),(0,lr.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,lr.jsx)(A,{variant:`ghost`,disabled:i<=1,onClick:()=>a(e=>e-1),children:`‹`}),(0,lr.jsx)(A,{variant:`ghost`,disabled:i>=o.pagination.pages,onClick:()=>a(e=>e+1),children:`›`})]})]})]}):null}function sr({onRefresh:e}){let[t,n]=(0,cr.useState)(null),[r,i]=(0,cr.useState)(null),[a,o]=(0,cr.useState)(`missing`),[s,c]=(0,cr.useState)(``),[l,u]=(0,cr.useState)(``),[d,f]=(0,cr.useState)(!1),[p,m]=(0,cr.useState)(null),[h,g]=(0,cr.useState)(`overview`),_=(0,cr.useRef)(!1),v=(0,cr.useRef)(!0),[y,x]=(0,cr.useState)(!1),C=(0,cr.useRef)(e);C.current=e;let w=(0,cr.useCallback)(async()=>{let e=new URLSearchParams;s&&e.set(`post_type`,s),l&&e.set(`lang`,l);try{n(await D.get(`/site-analyzer${e.toString()?`?${e}`:``}`))}catch(e){m(e.message)}},[s,l]);(0,cr.useEffect)(()=>{w()},[w]),(0,cr.useEffect)(()=>(re(`bulk`)&&D.get(`/bulk/status`).then(i).catch(()=>{}),()=>{v.current=!1}),[]);let T=(0,cr.useCallback)(async()=>{if(!_.current){_.current=!0;try{let e=await D.post(`/bulk/tick`);i(e);let t=0;for(;e.state===`running`&&v.current;)e=await D.post(`/bulk/tick`),i(e),++t%40==0&&await w();await w(),C.current&&C.current()}catch(e){m(e.message)}finally{_.current=!1,f(!1)}}},[w]),E=!Array.isArray(ne.modules)||ne.modules.includes(`bulk`),ee=async()=>{f(!0),m(null),x(!0);let e=new Set,t=1;try{for(;;){let n=await D.get(a===`all`?`/content?type=any&per_page=50&page=${t}`:`/content?type=any&filter=unscored&per_page=50&page=1`);if(!Array.isArray(n)||n.length===0)break;let r=n.filter(t=>!e.has(t.id));if(r.length===0&&a!==`all`)break;for(let t of r)e.add(t.id),await D.post(`/content/${t.id}/analyze`);a===`all`&&(t+=1),await w()}await w(),C.current&&C.current()}catch(e){m(e.message)}finally{f(!1)}},te=async()=>{if(!E){ee();return}f(!0),m(null);try{x(!0),i(await D.post(`/bulk/start`,{action:`analyze`,scope:a})),T()}catch(e){m(e.message),f(!1)}},O=async()=>{try{i(await D.post(`/bulk/cancel`,{}))}catch(e){m(e.message)}},ie=r?.state===`running`,ae=ie&&r?.action===`analyze`,oe=ae&&!_.current,se=t,ce=se?.samples||[],le=e=>e.day.slice(5).replace(`-`,`/`),ue=ce.map(e=>({date:le(e),label:le(e),value:e.geo})),de=ce.map(e=>({date:le(e),label:le(e),value:e.seo})),fe=e=>e.length>1?e[0].value:null,pe=e=>e.length?e[e.length-1].value:null,me=ue.length>1?pe(ue)-fe(ue):null,he=de.length>1?pe(de)-fe(de):null,ge=se&&se.total>0?Math.round(100*se.analyzed/se.total):0,_e=!!se&&(se.total||0)>0&&(se.unscored||0)===0;(0,cr.useEffect)(()=>{_e&&a!==`all`&&o(`all`)},[_e,a]);let ve=(se?.areas||[]).filter(e=>e.pages>0&&e.average!==null).sort((e,t)=>e.average-t.average).slice(0,4);return(0,lr.jsxs)(k,{title:b(`Full website analyzer`,`ai-rank-suite`),subtitle:b(`Score every published page for AI search and for Google, then see where the site stands as a whole — by type, by language, over time.`,`ai-rank-suite`),action:ae&&_.current?(0,lr.jsx)(A,{variant:`ghost`,onClick:O,children:b(`Stop`,`ai-rank-suite`)}):(0,lr.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[_e?null:(0,lr.jsx)(Je,{value:a,onChange:o,options:[{id:`missing`,label:b(`Unscored only`,`ai-rank-suite`)},{id:`all`,label:b(`Re-score everything`,`ai-rank-suite`)}]}),oe?(0,lr.jsxs)(A,{onClick:()=>{f(!0),T()},busy:d,children:[b(`Resume run`,`ai-rank-suite`),` (`,(r.remaining||0).toLocaleString(),` `,b(`left`,`ai-rank-suite`),`)`]}):(0,lr.jsx)(A,{onClick:te,busy:d,disabled:ie&&!ae,children:_e?b(`Re-score everything`,`ai-rank-suite`):se&&se.analyzed>0?b(`Analyze site`,`ai-rank-suite`):b(`Run first analysis`,`ai-rank-suite`)})]}),children:[p&&(0,lr.jsx)(M,{tone:`serious`,children:p}),ie&&!ae&&(0,lr.jsxs)(M,{tone:`warning`,children:[b(`Another bulk job is running`,`ai-rank-suite`),` (`,r.action,`). `,b(`The analyzer waits until it finishes.`,`ai-rank-suite`)]}),(ae||y&&r?.state===`done`&&r?.action===`analyze`)&&(0,lr.jsx)(`div`,{className:`mb-4`,children:(0,lr.jsx)(ze,{label:(0,lr.jsxs)(lr.Fragment,{children:[b(ae?`Scoring pages…`:`Finished`,`ai-rank-suite`),` `,(r.done||0).toLocaleString(),` `,b(`of`,`ai-rank-suite`),` `,(r.total||0).toLocaleString(),r.failed?` · ${r.failed} ${b(`failed`,`ai-rank-suite`)}`:``,ae&&se?.estimate?.per_post_ms&&r.remaining?` · ~${mr(Math.ceil(r.remaining*se.estimate.per_post_ms/1e3))} ${b(`left`,`ai-rank-suite`)}`:``]}),total:100,percent:r.progress??0})}),se&&(se.types.length>1||se.languages.length>1)&&(0,lr.jsxs)(`div`,{className:`ars-scopebar mb-4`,children:[se.types.length>1&&(0,lr.jsxs)(`label`,{className:`ars-scope`,children:[(0,lr.jsx)(`span`,{className:`ars-scope-label`,children:b(`Type`,`ai-rank-suite`)}),(0,lr.jsxs)(`select`,{value:s,onChange:e=>c(e.target.value),children:[(0,lr.jsx)(`option`,{value:``,children:S(b(`All types (%d)`,`ai-rank-suite`),se.types.length)}),se.types.map(e=>(0,lr.jsx)(`option`,{value:e.id,children:e.label},e.id))]})]}),se.languages.length>1&&(0,lr.jsxs)(`label`,{className:`ars-scope`,children:[(0,lr.jsx)(`span`,{className:`ars-scope-label`,children:b(`Language`,`ai-rank-suite`)}),(0,lr.jsxs)(`select`,{value:l,onChange:e=>u(e.target.value),children:[(0,lr.jsx)(`option`,{value:``,children:S(b(`All languages (%d)`,`ai-rank-suite`),se.languages.length)}),se.languages.map(e=>(0,lr.jsx)(`option`,{value:e.code,children:ar(e.code,e.label)},e.code))]})]})]}),se?se.analyzed===0?(0,lr.jsxs)(`div`,{className:`grid gap-2 py-4 text-center`,children:[(0,lr.jsxs)(`span`,{className:`font-semibold text-[13.5px]`,children:[se.total.toLocaleString(),` `,b(`published pages, none scored yet`,`ai-rank-suite`)]}),(0,lr.jsxs)(`span`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:[b(`The analysis runs on your own server, costs nothing, and can be stopped at any time. Every page gets a AI score for AI search and an SEO score for Google.`,`ai-rank-suite`),se.estimate.seconds>0?` ${b(`Estimated`,`ai-rank-suite`)}: ~${mr(se.estimate.seconds)}.`:``]})]}):(0,lr.jsxs)(`div`,{className:`grid gap-5`,children:[(0,lr.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-[auto_auto_minmax(0,1fr)] items-center`,children:[(0,lr.jsx)(nr,{value:se.avg_geo,label:b(`GEO`,`ai-rank-suite`),sub:b(`AI search readiness`,`ai-rank-suite`),delta:me}),(0,lr.jsx)(nr,{value:se.avg_seo,label:b(`SEO`,`ai-rank-suite`),sub:b(`Classic search`,`ai-rank-suite`),delta:he}),(0,lr.jsxs)(`div`,{className:`grid gap-3 min-w-0`,children:[(0,lr.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,lr.jsxs)(`span`,{className:`text-[13px]`,children:[S(b(`%1$s of %2$s %3$s scored (%4$s%%)`,`ai-rank-suite`),se.analyzed.toLocaleString(),se.total.toLocaleString(),s&&(se.types||[]).find(e=>e.id===s)?.label||b(`entries`,`ai-rank-suite`),ge),se.unscored>0&&se.estimate.seconds>0?` · `+S(b(`%1$s unscored, about %2$s`,`ai-rank-suite`),se.unscored.toLocaleString(),mr(se.estimate.seconds)):``]}),(0,lr.jsxs)(`span`,{className:`flex items-center gap-1.5 flex-wrap`,children:[se.weak.geo>0?(0,lr.jsxs)(j,{tone:`serious`,children:[se.weak.geo.toLocaleString(),` `,b(`GEO under 40`,`ai-rank-suite`)]}):(0,lr.jsx)(j,{tone:`good`,children:b(`No GEO page under 40`,`ai-rank-suite`)}),se.strong.geo>0&&(0,lr.jsxs)(j,{tone:`good`,children:[se.strong.geo.toLocaleString(),` `,b(`GEO 80+`,`ai-rank-suite`)]})]})]}),(0,lr.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,lr.jsx)(rr,{dist:se.dist.geo,label:b(`GEO spread`,`ai-rank-suite`)}),(0,lr.jsx)(rr,{dist:se.dist.seo,label:b(`SEO spread`,`ai-rank-suite`)})]})]})]}),(0,lr.jsx)(Je,{value:h,onChange:g,options:[{id:`overview`,label:b(`Where it is weak`,`ai-rank-suite`)},{id:`types`,label:b(`By type`,`ai-rank-suite`)},...se.by_lang.length>0?[{id:`langs`,label:b(`By language`,`ai-rank-suite`)}]:[],{id:`pages`,label:b(`Weakest pages`,`ai-rank-suite`)}]}),h===`overview`&&(0,lr.jsxs)(`div`,{className:`grid gap-3`,children:[(0,lr.jsx)(`span`,{className:`t-overline`,children:b(`Coldest areas across the site`,`ai-rank-suite`)}),ve.length===0?(0,lr.jsx)(`span`,{className:`t-caption`,children:b(`Area scores appear after the first analysis.`,`ai-rank-suite`)}):(0,lr.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:ve.map(e=>(0,lr.jsxs)(`div`,{className:`ars-analyzer-area`,children:[(0,lr.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,lr.jsx)(`span`,{className:`font-semibold text-[13px]`,children:e.label}),(0,lr.jsx)(`span`,{className:`tabular-nums font-bold`,style:{color:pr(e.average)},children:e.average})]}),(0,lr.jsx)(Be,{value:e.average,color:pr(e.average)}),(0,lr.jsxs)(`span`,{className:`t-caption`,children:[e.critical.toLocaleString(),` `,b(`critical`,`ai-rank-suite`),` · `,e.weak.toLocaleString(),` `,b(`weak`,`ai-rank-suite`),` · `,e.good.toLocaleString(),` `,b(`good`,`ai-rank-suite`),` · `,e.pages.toLocaleString(),` `,b(`pages`,`ai-rank-suite`)]}),e.hint&&(0,lr.jsx)(`span`,{className:`t-caption`,children:e.hint})]},e.key))}),(0,lr.jsx)(`span`,{className:`t-caption`,children:b(`The same fix repeated across pages beats a perfect single page: start with the coldest area, and the autopilot or "Let AI do" can apply it site-wide.`,`ai-rank-suite`)})]}),h===`types`&&(0,lr.jsx)(ir,{rows:se.by_type,keyField:`type`,labelField:`label`,onPick:c,active:s}),h===`langs`&&(se.by_lang.length>1&&se.by_lang.every(e=>e.total===se.by_lang[0].total&&e.avg_geo===se.by_lang[0].avg_geo&&e.avg_seo===se.by_lang[0].avg_seo)?(0,lr.jsx)(`p`,{className:`m-0 px-4 py-3 t-caption`,children:S(b(`Your translation plugin translates per request, so every entry exists in all %d languages and every language mirrors the source content — a per-language table would repeat the same line %d times. Scores are shown for the source content above.`,`ai-rank-suite`),se.by_lang.length,se.by_lang.length)}):(0,lr.jsx)(ir,{rows:se.by_lang,keyField:`code`,labelField:`label`,onPick:u,active:l})),h===`pages`&&(0,lr.jsx)(or,{postType:s,lang:l})]}):(0,lr.jsx)(`span`,{className:`t-caption`,children:b(`Loading…`,`ai-rank-suite`)})]})}var cr,lr,ur,dr,fr,pr,mr,hr=o((()=>{cr=u(f(),1),C(),O(),dt(),lr=_e(),ur=[`0–19`,`20–39`,`40–59`,`60–79`,`80–100`],dr=[`var(--ars-serious)`,`var(--ars-serious)`,`var(--ars-accent)`,`var(--ars-brand)`,`var(--ars-good)`],fr=e=>b(e>=80?`Strong`:e>=60?`Solid`:e>=40?`Needs work`:`Weak`,`ai-rank-suite`),pr=e=>e>=80?`var(--ars-good)`:e>=60?`var(--ars-brand)`:e>=40?`var(--ars-accent)`:`var(--ars-serious)`,mr=e=>e<60?`${e}s`:e<3600?`${Math.round(e/60)} min`:`${(e/3600).toFixed(1)} h`}));function gr({id:e,size:t=14}){let n=Er[e]||(String(e).startsWith(`google`)?br:null);return n?(0,_r.jsx)(n,{size:t}):null}var _r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr=o((()=>{f(),_r=_e(),vr={display:`inline-block`,flex:`none`,verticalAlign:`middle`},yr=({size:e})=>(0,_r.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,style:vr,"aria-hidden":!0,children:[0,60,120,180,240,300].map(e=>(0,_r.jsx)(`path`,{d:`M12 3.2 a8.8 8.8 0 0 1 7.62 4.4`,fill:`none`,stroke:`#16161e`,strokeWidth:`2.5`,strokeLinecap:`round`,transform:`rotate(${e} 12 12)`},e))}),br=({size:e})=>(0,_r.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,style:vr,"aria-hidden":!0,children:[(0,_r.jsx)(`path`,{fill:`#4285F4`,d:`M23.49 12.27c0-.79-.07-1.54-.19-2.27H12v4.51h6.47c-.29 1.48-1.14 2.73-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z`}),(0,_r.jsx)(`path`,{fill:`#34A853`,d:`M12 24c3.24 0 5.95-1.08 7.93-2.91l-3.86-3c-1.08.72-2.45 1.16-4.07 1.16-3.13 0-5.78-2.11-6.73-4.96H1.29v3.09C3.26 21.3 7.31 24 12 24z`}),(0,_r.jsx)(`path`,{fill:`#FBBC05`,d:`M5.27 14.29c-.25-.72-.38-1.49-.38-2.29s.14-1.57.38-2.29V6.62H1.29C.47 8.24 0 10.06 0 12s.47 3.76 1.29 5.38l3.98-3.09z`}),(0,_r.jsx)(`path`,{fill:`#EA4335`,d:`M12 4.75c1.77 0 3.35.61 4.6 1.8l3.42-3.42C17.95 1.19 15.24 0 12 0 7.31 0 3.26 2.7 1.29 6.62l3.98 3.09c.95-2.85 3.6-4.96 6.73-4.96z`})]}),xr=({size:e})=>(0,_r.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,style:vr,"aria-hidden":!0,children:[(0,_r.jsx)(`defs`,{children:(0,_r.jsxs)(`linearGradient`,{id:`airanksuite-gem`,x1:`0`,y1:`0`,x2:`1`,y2:`1`,children:[(0,_r.jsx)(`stop`,{offset:`0%`,stopColor:`#4E86FF`}),(0,_r.jsx)(`stop`,{offset:`100%`,stopColor:`#9476F5`})]})}),(0,_r.jsx)(`path`,{fill:`url(#airanksuite-gem)`,d:`M12 1.5c.5 5.5 4.9 9.9 10.5 10.5C16.9 12.6 12.5 17 12 22.5 11.5 17 7.1 12.6 1.5 12 7.1 11.4 11.5 7 12 1.5z`})]}),Sr=({size:e})=>(0,_r.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,style:vr,"aria-hidden":!0,children:[(0,_r.jsx)(`rect`,{x:`2`,y:`2`,width:`9.4`,height:`9.4`,fill:`#F25022`}),(0,_r.jsx)(`rect`,{x:`12.6`,y:`2`,width:`9.4`,height:`9.4`,fill:`#7FBA00`}),(0,_r.jsx)(`rect`,{x:`2`,y:`12.6`,width:`9.4`,height:`9.4`,fill:`#00A4EF`}),(0,_r.jsx)(`rect`,{x:`12.6`,y:`12.6`,width:`9.4`,height:`9.4`,fill:`#FFB900`})]}),Cr=({size:e})=>(0,_r.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,style:vr,"aria-hidden":!0,children:Array.from({length:12},(e,t)=>(0,_r.jsx)(`rect`,{x:`11`,y:`1.6`,width:`2`,height:`7`,rx:`1`,fill:`#D97757`,transform:`rotate(${t*30} 12 12)`},t))}),wr=({size:e})=>(0,_r.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,style:vr,"aria-hidden":!0,children:(0,_r.jsxs)(`g`,{fill:`none`,stroke:`#20808D`,strokeWidth:`1.9`,strokeLinejoin:`round`,children:[(0,_r.jsx)(`path`,{d:`M12 2.5v19`}),(0,_r.jsx)(`path`,{d:`M4.5 8.5h15v7h-15z`}),(0,_r.jsx)(`path`,{d:`M4.5 8.5 12 2.8l7.5 5.7M4.5 15.5 12 21.2l7.5-5.7`})]})}),Tr=({size:e})=>(0,_r.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,style:vr,"aria-hidden":!0,children:(0,_r.jsxs)(`g`,{fill:`none`,stroke:`#C0392B`,strokeWidth:`1.9`,children:[(0,_r.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,_r.jsx)(`path`,{d:`M3 12h18M12 3c3.2 2.4 3.2 15.6 0 18M12 3c-3.2 2.4-3.2 15.6 0 18`})]})}),Er={chatgpt:yr,overviews:br,gemini:xr,perplexity:wr,copilot:Sr,claude:Cr,china:Tr}}));function Or(){let[e,t]=(0,kr.useState)(null),[n,r]=(0,kr.useState)(null),[i,a]=(0,kr.useState)(null);if((0,kr.useEffect)(()=>{D.get(`/score/engines`).then(t).catch(e=>a(e.message))},[]),!e)return(0,Ar.jsx)(k,{title:b(`Answer engines`,`ai-rank-suite`),children:i?(0,Ar.jsx)(M,{tone:`serious`,children:i}):(0,Ar.jsx)(`div`,{className:`ars-pageskel-block`,style:{height:120},"aria-busy":`true`})});let o=e=>e>=85?`green`:e>=60?`yellow`:`red`;return(0,Ar.jsx)(k,{title:b(`Answer engines`,`ai-rank-suite`),subtitle:b(`Where you stand with each one — they retrieve differently, so they reward different things`,`ai-rank-suite`),action:(0,Ar.jsx)(j,{tone:e.overall>=85?`good`:e.overall>=60?`warning`:`serious`,children:S(b(`%d%% overall`,`ai-rank-suite`),e.overall)}),children:(0,Ar.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Ar.jsx)(`div`,{className:`ars-engrows`,children:e.engines.map(e=>{let t=o(e.score),i=n===e.id;return(0,Ar.jsxs)(`button`,{type:`button`,onClick:()=>r(i?null:e.id),className:`ars-engrow${i?` is-active`:``}`,"aria-expanded":i,title:e.open.length===0?S(b(`%s — nothing outstanding`,`ai-rank-suite`),e.label):S(x(`%1$s — %2$d thing to fix (%3$s)`,`%1$s — %2$d things to fix (%3$s)`,e.open.length,`ai-rank-suite`),e.label,e.open.length,e.vendor),children:[(0,Ar.jsxs)(`span`,{className:`ars-engrow-name`,children:[(0,Ar.jsx)(gr,{id:e.id}),e.label]}),(0,Ar.jsx)(`span`,{className:`ars-engrow-track`,children:(0,Ar.jsx)(`span`,{className:`ars-engrow-fill`,style:{width:`${e.score}%`,background:`var(--ars-c-${t}-ink)`}})}),(0,Ar.jsxs)(`span`,{className:`ars-engrow-value`,style:{color:`var(--ars-c-${t}-ink)`},children:[e.score,`%`]})]},e.id)})}),n&&(()=>{let t=e.engines.find(e=>e.id===n);return t?(0,Ar.jsxs)(`div`,{className:`grid gap-3 p-3`,style:{background:`var(--ars-surface-2)`,borderRadius:`var(--ars-r-sm)`},children:[(0,Ar.jsxs)(`div`,{children:[(0,Ar.jsx)(`div`,{className:`t-overline mb-1`,children:S(b(`How %s decides`,`ai-rank-suite`),t.label)}),(0,Ar.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:t.why})]}),(0,Ar.jsx)(`div`,{className:`grid gap-1.5`,children:t.checks.map(e=>(0,Ar.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,Ar.jsx)(`span`,{"aria-hidden":`true`,style:{marginTop:2,color:e.pass?`var(--ars-good)`:`var(--ars-warning)`,fontWeight:700,fontSize:12},children:e.pass?`✓`:`!`}),(0,Ar.jsxs)(`span`,{className:`min-w-0`,children:[(0,Ar.jsx)(`span`,{className:`block text-[12.5px] font-medium`,style:{color:e.pass?`var(--ars-ink-3)`:`var(--ars-ink)`},children:e.label}),!e.pass&&(0,Ar.jsx)(`span`,{className:`block text-[11.5px]`,style:{color:`var(--ars-ink-2)`},children:e.fix})]})]},e.id))})]}):null})(),(0,Ar.jsxs)(ft,{title:b(`Why six scores instead of one`,`ai-rank-suite`),children:[(0,Ar.jsx)(`p`,{children:b(`“Optimise for AI” is not one job. ChatGPT reads its own crawl and honours llms.txt. Google AI Overviews are built on the classic index, so ordinary technical SEO decides eligibility and nothing AI-specific does. Perplexity is search-grounded and rewards freshness. Copilot retrieves through Bing, so if Bing has not indexed the page nothing else matters.`,`ai-rank-suite`)}),(0,Ar.jsx)(`p`,{children:b(`A single blended number averages those away and hides the only thing worth knowing — which engine you are invisible to.`,`ai-rank-suite`)})]})]})})}var kr,Ar,jr=o((()=>{kr=u(f(),1),C(),O(),dt(),mt(),Dr(),Ar=_e()})),Mr=c({default:()=>Nr});function Nr(){let[e,t]=(0,Pr.useState)(null),[n,r]=(0,Pr.useState)(!1),[i,a]=(0,Pr.useState)(null);(0,Pr.useEffect)(()=>{D.get(`/score`).then(t).catch(e=>a(e.message))},[]);let o=async()=>{r(!0),a(null);try{t(await D.post(`/score/recalculate`))}catch(e){a(e.message)}finally{r(!1)}},s=e?.dimensions?.overall;return(0,Fr.jsxs)(`div`,{className:`ars-page`,children:[i&&(0,Fr.jsx)(M,{tone:`serious`,children:i}),(0,Fr.jsx)(sr,{}),(0,Fr.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[minmax(0,0.9fr)_minmax(0,1.1fr)] items-stretch`,children:[(0,Fr.jsxs)(k,{title:b(`AI Score`,`ai-rank-suite`),subtitle:b(`How ready this site is for AI search and assistants`,`ai-rank-suite`),action:(0,Fr.jsx)(A,{variant:`ghost`,onClick:o,busy:n,children:b(n?`Recalculating…`:`Recalculate`,`ai-rank-suite`)}),children:[(0,Fr.jsxs)(`div`,{className:`ars-scoreband`,children:[(0,Fr.jsx)(Se,{value:s??0,label:b(`AI Score`,`ai-rank-suite`)}),(0,Fr.jsx)(`div`,{children:Ir.map(t=>{let n=e?.dimensions?.[t.key]??0;return(0,Fr.jsxs)(`div`,{className:`ars-dimrow`,title:t.hint,children:[(0,Fr.jsx)(`span`,{className:`ars-dimrow-label`,children:t.label}),(0,Fr.jsx)(`span`,{className:`ars-dimrow-track`,children:(0,Fr.jsx)(`span`,{className:`ars-dimrow-fill`,style:{width:`${n}%`}})}),(0,Fr.jsx)(`span`,{className:`ars-dimrow-value`,children:n})]},t.key)})})]}),(0,Fr.jsx)(`p`,{className:`m-0 mt-3 t-caption`,children:e?.calculated_at?S(b(`Last run %s · each area is weighted, so the score is these four and nothing else`,`ai-rank-suite`),new Date(e.calculated_at*1e3).toLocaleString()):b(`Not calculated yet.`,`ai-rank-suite`)})]}),(0,Fr.jsx)(Or,{})]})]})}var Pr,Fr,Ir,Lr=o((()=>{Pr=u(f(),1),C(),O(),dt(),hr(),jr(),Fr=_e(),Ir=[{key:`discovery`,label:b(`Discovery`,`ai-rank-suite`),hint:b(`Can AI crawlers find and map your site?`,`ai-rank-suite`)},{key:`structure`,label:b(`Structure`,`ai-rank-suite`),hint:b(`Is content chunkable for LLMs?`,`ai-rank-suite`)},{key:`answers`,label:b(`Answers`,`ai-rank-suite`),hint:b(`Does content answer questions directly?`,`ai-rank-suite`)},{key:`schema`,label:b(`Schema`,`ai-rank-suite`),hint:b(`Is meaning machine-readable?`,`ai-rank-suite`)}]}));function Rr({field:e,value:t,onChange:n}){let r={value:t??``,placeholder:e.hint,onChange:e=>n(e.target.value)};return(0,Hr.jsxs)(`div`,{className:e.type===`lines`?``:`sm:max-w-[440px]`,children:[(0,Hr.jsxs)(`label`,{className:`block font-medium mb-1 flex items-center gap-1.5`,children:[e.label,e.required&&(0,Hr.jsx)(j,{tone:`serious`,children:b(`required`,`ai-rank-suite`)}),!e.required&&e.recommended&&(0,Hr.jsx)(j,{tone:`warning`,children:b(`recommended`,`ai-rank-suite`)})]}),e.type===`lines`?(0,Hr.jsx)(`textarea`,{rows:4,...r}):e.type===`select`?(0,Hr.jsxs)(`select`,{value:t??``,onChange:e=>n(e.target.value),children:[(0,Hr.jsx)(`option`,{value:``,children:`—`}),e.options.map(e=>(0,Hr.jsx)(`option`,{value:e,children:e},e))]}):(0,Hr.jsx)(`input`,{type:e.type===`date`||e.type===`datetime-local`?e.type:`text`,...r}),e.hint&&e.type!==`lines`&&(0,Hr.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:e.hint})]})}function zr({grouped:e,value:t,onChange:n}){let[r,i]=(0,Vr.useState)(``),a=r.trim().toLowerCase(),o=Object.entries(e||{}).map(([e,t])=>[e,t.filter(e=>!a||e.label.toLowerCase().includes(a))]).filter(([,e])=>e.length>0);return(0,Hr.jsxs)(`div`,{className:`grid gap-2 sm:max-w-[440px]`,children:[(0,Hr.jsx)(`input`,{type:`text`,placeholder:b(`Search 77 schema types…`,`ai-rank-suite`),value:r,onChange:e=>i(e.target.value)}),(0,Hr.jsx)(`select`,{value:t,onChange:e=>n(e.target.value),size:a?8:void 0,children:o.map(([e,t])=>(0,Hr.jsx)(`optgroup`,{label:e,children:t.map(e=>(0,Hr.jsx)(`option`,{value:e.value,children:e.label},e.value))},e))})]})}function Br({data:e,onChange:t,showVariables:n=!0}){let r=e?.items||[],i=e?.types||{},a=e?.validation||[],o=(e,n)=>t(r.map((t,r)=>r===e?{...t,...n}:t)),s=Object.keys(e?.grouped?.[Object.keys(e?.grouped||{})[0]]||{}).length?Object.values(e.grouped)[0][0].value:`Article`;return(0,Hr.jsxs)(`div`,{className:`grid gap-4`,children:[e?.templates?.length>0&&(0,Hr.jsx)(M,{children:e.templates.length===1?S(b(`The template “%1$s” also applies %2$s schema to this page.`,`ai-rank-suite`),e.templates[0].name,e.templates[0].type):S(b(`%d global templates also apply schema to this page.`,`ai-rank-suite`),e.templates.length)}),r.length===0&&(0,Hr.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`No custom schema on this page yet — Article/WebPage and breadcrumbs are always emitted automatically.`,`ai-rank-suite`)}),r.map((n,s)=>{let c=i[n.type],l=a[s];return(0,Hr.jsxs)(`div`,{className:`ars-r-md p-4`,style:{background:`var(--ars-surface-2)`},children:[(0,Hr.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-3`,children:[(0,Hr.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Hr.jsx)(`span`,{className:`font-semibold text-[13.5px]`,children:c?.label||n.type}),l&&!l.valid&&(0,Hr.jsx)(j,{tone:`serious`,children:S(b(`%d required missing`,`ai-rank-suite`),l.missing_required.length)}),l&&l.valid&&l.missing_recommended.length>0&&(0,Hr.jsx)(j,{tone:`warning`,children:S(b(`%d recommended missing`,`ai-rank-suite`),l.missing_recommended.length)}),l&&l.valid&&l.missing_recommended.length===0&&(0,Hr.jsxs)(j,{tone:`good`,children:[`✓ `,b(`complete`,`ai-rank-suite`)]})]}),(0,Hr.jsx)(`button`,{type:`button`,"aria-label":b(`Remove schema`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer`,style:{color:`var(--ars-ink-3)`},onClick:()=>t(r.filter((e,t)=>t!==s)),children:(0,Hr.jsx)(Rt,{size:15})})]}),(0,Hr.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Hr.jsx)(zr,{grouped:e.grouped,value:n.type,onChange:e=>o(s,{type:e,data:{}})}),l&&l.missing_required.length>0&&(0,Hr.jsx)(M,{tone:`serious`,children:S(b(`Google will ignore this schema until you fill in: %s.`,`ai-rank-suite`),l.missing_required.join(`, `))}),(c?.fields||[]).map(e=>(0,Hr.jsx)(Rr,{field:e,value:n.data?.[e.key],onChange:t=>o(s,{data:{...n.data,[e.key]:t}})},e.key))]})]},s)}),(0,Hr.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Hr.jsxs)(A,{variant:`ghost`,onClick:()=>t([...r,{type:s,data:{}}]),disabled:r.length>=20,children:[`+ `,b(`Add schema`,`ai-rank-suite`)]}),n&&(0,Hr.jsxs)(`details`,{className:`text-[12px]`,children:[(0,Hr.jsx)(`summary`,{className:`cursor-pointer`,style:{color:`var(--ars-ink-2)`},children:b(`Available variables`,`ai-rank-suite`)}),(0,Hr.jsx)(`div`,{className:`flex flex-wrap gap-1.5 mt-2`,children:Object.entries(e?.variables||{}).map(([e,t])=>(0,Hr.jsx)(`code`,{className:`ars-mono px-1.5 py-0.5 rounded`,style:{background:`var(--ars-surface-2)`},title:t,children:e},e))})]})]}),e?.preview?.length>0&&(0,Hr.jsxs)(`details`,{children:[(0,Hr.jsx)(`summary`,{className:`cursor-pointer text-[12.5px] font-medium`,children:S(x(`Preview JSON-LD (%d node)`,`Preview JSON-LD (%d nodes)`,e.preview.length,`ai-rank-suite`),e.preview.length)}),(0,Hr.jsx)(`pre`,{className:`ars-mono m-0 mt-2 p-3 ars-r-md overflow-auto`,style:{background:`var(--ars-surface-2)`,maxHeight:300},children:JSON.stringify(e.preview,null,2)})]})]})}var Vr,Hr,Ur=o((()=>{Vr=u(f(),1),C(),dt(),Vt(),Hr=_e()}));function Wr({postId:e=0,group:t=`shorttail`,onPick:n,taken:r=[],label:i}){let[a,o]=(0,Gr.useState)(!1),[s,c]=(0,Gr.useState)(null),[l,u]=(0,Gr.useState)(null),[d,f]=(0,Gr.useState)([]),p=r.map(e=>String(e).toLowerCase()),m=async()=>{o(!0),u(null);try{let n=await D.post(`/ai/keywords`,{group:t,...e?{post_id:e}:{}});c(n.keywords||[])}catch(e){u(e.message)}finally{o(!1)}},h=e=>{f(t=>[...t,e.toLowerCase()]),n(e)};return(0,Kr.jsxs)(`div`,{className:`grid gap-2`,children:[(0,Kr.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Kr.jsxs)(A,{variant:`ghost`,onClick:m,busy:a,children:[(0,Kr.jsx)(Et,{width:14,height:14}),i||b(`Suggest keywords with AI`,`ai-rank-suite`)]}),s&&s.length>0&&(0,Kr.jsx)(`span`,{className:`t-caption`,children:b(`Pick the ones worth tracking.`,`ai-rank-suite`)})]}),l&&(0,Kr.jsx)(M,{tone:`serious`,children:l}),s&&s.length===0&&(0,Kr.jsx)(M,{tone:`warning`,children:b(`The engine returned no usable suggestions. Try again, or add a keyword by hand.`,`ai-rank-suite`)}),s&&s.length>0&&(0,Kr.jsx)(`div`,{className:`ars-kwsuggest`,children:s.map(e=>{let t=d.includes(e.keyword.toLowerCase())||p.includes(e.keyword.toLowerCase());return(0,Kr.jsxs)(`button`,{type:`button`,className:`ars-kwchip${t?` is-done`:``}`,disabled:t,title:e.why,onClick:()=>h(e.keyword),children:[(0,Kr.jsx)(`span`,{className:`ars-kwchip-word`,children:e.keyword}),(0,Kr.jsx)(j,{tone:t?`good`:`neutral`,children:t?b(`added`,`ai-rank-suite`):e.intent})]},e.keyword)})})]})}var Gr,Kr,qr=o((()=>{Gr=u(f(),1),C(),O(),dt(),Vt(),Kr=_e()}));function Jr({score:e}){return(0,Zr.jsx)(`span`,{className:`inline-block ars-r-sm shrink-0`,style:{width:8,height:8,background:e>=70?`var(--ars-good)`:e>=40?`var(--ars-warning)`:`var(--ars-serious)`},"aria-hidden":!0})}function Yr({keywords:e,coverage:t,max:n=100,onChange:r,postId:i=0}){let[a,o]=(0,Xr.useState)(`shorttail`),[s,c]=(0,Xr.useState)(``),[l,u]=(0,Xr.useState)(!1),[d,f]=(0,Xr.useState)(null),[p,m]=(0,Xr.useState)(``),h=(e,t)=>{if(t){let t=p.trim(),n=g.some((n,r)=>r!==e&&n.toLowerCase()===t.toLowerCase());C(t&&!n?g.map((n,r)=>r===e?t:n):g.filter((t,n)=>n!==e))}f(null),m(``)},g=e?.[a]||[],_=Qr.find(e=>e.id===a),v=(t?.rows||[]).filter(e=>e.group===a),y=t?.summary?.[a],C=t=>r({...e,[a]:t.slice(0,n)}),w=e=>{let t=e.split(/[\n,]/).map(e=>e.trim()).filter(Boolean);if(!t.length)return;let n=new Set(g.map(e=>e.toLowerCase())),r=[...g];t.forEach(e=>{n.has(e.toLowerCase())||(n.add(e.toLowerCase()),r.push(e))}),C(r),c(``)},T=e=>v.find(t=>t.keyword===e)?.score??null,E=s.split(/[\n,]/).filter(e=>e.trim()).length;return(0,Zr.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Zr.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,Zr.jsx)(Ie,{tabs:Qr.map(t=>({id:t.id,label:`${t.label} (${(e?.[t.id]||[]).length})`})),active:a,onChange:o}),y&&y.total>0&&(0,Zr.jsx)(j,{tone:y.coverage>=70?`good`:y.coverage>=40?`warning`:`serious`,children:S(b(`%1$s/%2$s covered`,`ai-rank-suite`),y.covered,y.total)})]}),(0,Zr.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:_.hint}),l?(0,Zr.jsxs)(`div`,{className:`grid gap-2`,children:[(0,Zr.jsx)(`textarea`,{rows:6,placeholder:`${S(b(`One per line — paste up to %d`,`ai-rank-suite`),n)}\n${_.placeholder}`,value:s,onChange:e=>c(e.target.value)}),(0,Zr.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Zr.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:()=>w(s),children:S(x(`Add %d keyword`,`Add %d keywords`,E,`ai-rank-suite`),E)}),(0,Zr.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,onClick:()=>{u(!1),c(``)},children:b(`Cancel`,`ai-rank-suite`)})]})]}):(0,Zr.jsxs)(`form`,{className:`flex gap-2`,onSubmit:e=>{e.preventDefault(),w(s)},children:[(0,Zr.jsx)(`input`,{type:`text`,placeholder:_.placeholder,value:s,onChange:e=>c(e.target.value),disabled:g.length>=n}),(0,Zr.jsx)(`button`,{type:`submit`,className:`ars-btn ars-btn-ghost`,disabled:!s.trim()||g.length>=n,children:b(`Add`,`ai-rank-suite`)}),(0,Zr.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,onClick:()=>u(!0),children:b(`Bulk`,`ai-rank-suite`)})]}),g.length<n&&(0,Zr.jsx)(Wr,{postId:i,group:a,taken:g,label:b(a===`geo`?`Suggest prompts with AI`:a===`longtail`?`Suggest long-tail with AI`:`Suggest keywords with AI`,`ai-rank-suite`),onPick:e=>w(e)}),(0,Zr.jsxs)(`div`,{className:`flex items-center justify-between text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:[(0,Zr.jsxs)(`span`,{children:[g.length,` / `,n]}),g.length>0&&(0,Zr.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent cursor-pointer p-0 text-[11.5px]`,style:{color:`var(--ars-serious)`},onClick:()=>C([]),children:b(`Clear all`,`ai-rank-suite`)})]}),g.length===0?(0,Zr.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`No keywords in this group yet.`,`ai-rank-suite`)}):(0,Zr.jsx)(`div`,{className:`grid gap-1 max-h-[260px] overflow-y-auto pr-1`,style:{scrollbarWidth:`thin`},children:g.map((e,t)=>{let n=T(e),r=v.find(t=>t.keyword===e);return(0,Zr.jsxs)(`div`,{className:`flex items-center gap-2 ars-r-md px-2.5 py-1.5`,style:{background:`var(--ars-surface-2)`},children:[n!==null&&(0,Zr.jsx)(Jr,{score:n}),a===`shorttail`&&(0,Zr.jsx)(`button`,{type:`button`,title:b(t===0?`Primary — coverage is scored against this one`:`Make primary`,`ai-rank-suite`),disabled:t===0,onClick:()=>C([e,...g.filter((e,n)=>n!==t)]),className:`border-0 bg-transparent p-0 shrink-0`,style:{cursor:t===0?`default`:`pointer`,color:t===0?`var(--ars-brand)`:`var(--ars-ink-3)`,fontSize:12,lineHeight:1},children:t===0?`★`:`☆`}),d===t?(0,Zr.jsx)(`input`,{type:`text`,autoFocus:!0,value:p,onChange:e=>m(e.target.value),onBlur:()=>h(t,!0),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),h(t,!0)):e.key===`Escape`&&(e.preventDefault(),h(t,!1))},className:`flex-1`,style:{height:26,fontSize:12.5,padding:`2px 6px`}}):(0,Zr.jsx)(`span`,{className:`flex-1 text-[12.5px] truncate`,title:b(`Click to edit`,`ai-rank-suite`),style:{cursor:`text`},onClick:()=>{f(t),m(e)},children:e}),r&&(0,Zr.jsx)(`span`,{className:`text-[11px] tabular-nums shrink-0`,style:{color:`var(--ars-ink-3)`},title:a===`geo`?b(`Share of prompt terms found on this page`,`ai-rank-suite`):S(b(`%1$s× in text · %2$s%% density`,`ai-rank-suite`),r.occurrences,r.density),children:a===`geo`?Object.keys(r.signals).filter(e=>r.signals[e]).join(`, `)||b(`not answered`,`ai-rank-suite`):Object.keys(r.signals).filter(e=>r.signals[e]).join(`, `)||b(`not found`,`ai-rank-suite`)}),(0,Zr.jsx)(`button`,{type:`button`,"aria-label":S(b(`Remove %s`,`ai-rank-suite`),e),className:`border-0 bg-transparent cursor-pointer p-0 shrink-0`,style:{color:`var(--ars-ink-3)`},onClick:()=>C(g.filter((e,n)=>n!==t)),children:(0,Zr.jsx)(Rt,{size:13})})]},`${e}-${t}`)})})]})}var Xr,Zr,Qr,$r=o((()=>{Xr=u(f(),1),C(),dt(),qr(),Vt(),Zr=_e(),Qr=[{id:`shorttail`,label:b(`Short-tail`,`ai-rank-suite`),hint:b(`Broad terms, 1–2 words. The first one is your primary focus keyword.`,`ai-rank-suite`),placeholder:b(`geo optimization`,`ai-rank-suite`)},{id:`longtail`,label:b(`Long-tail`,`ai-rank-suite`),hint:b(`Specific phrases, 3+ words. These win the most AI citations.`,`ai-rank-suite`),placeholder:b(`how to optimize a website for ChatGPT`,`ai-rank-suite`)},{id:`geo`,label:b(`AI search prompts`,`ai-rank-suite`),hint:b(`Questions people actually type into ChatGPT, Claude or Perplexity.`,`ai-rank-suite`),placeholder:b(`What is GEO optimization and how do I start?`,`ai-rank-suite`)}]}));function ei(e,t){let n=String(e||``);return n.length>t?`${n.slice(0,t-1).trimEnd()}…`:n}function ti(e){try{let t=new URL(e),n=t.pathname.split(`/`).filter(Boolean);return[t.hostname.replace(/^www\./,``),...n].join(` › `)}catch{return e}}function ni({src:e,style:t,placeholder:n,placeholderStyle:r}){let[i,a]=(0,li.useState)(!1);return!e||i?(0,ui.jsx)(`div`,{className:`flex items-center justify-center text-center text-[11.5px] px-3`,style:r,children:e?b(`That image URL could not be loaded`,`ai-rank-suite`):n}):(0,ui.jsx)(`img`,{src:e,alt:``,style:t,onError:()=>a(!0)})}function ri({children:e,width:t=500}){return(0,ui.jsx)(`div`,{className:`ars-r-md p-4 ars-frame`,style:{background:`#fff`,border:`1px solid var(--ars-border)`,maxWidth:t},children:e})}function ii({serp:e,device:t=`desktop`,emptyTitle:n,emptyDesc:r}){let i=t===`mobile`?55:60,a=t===`mobile`?120:160;return(0,ui.jsx)(ri,{width:t===`mobile`?380:560,children:(0,ui.jsxs)(`div`,{style:{fontFamily:`arial, sans-serif`},children:[(0,ui.jsxs)(`div`,{className:`flex items-center gap-2 mb-1.5`,children:[(0,ui.jsx)(`span`,{className:`inline-flex items-center justify-center ars-r-sm text-[11px] font-bold`,style:{width:26,height:26,background:`#f1f3f4`,color:`#5f6368`},children:(e.site||`?`).slice(0,1).toUpperCase()}),(0,ui.jsxs)(`div`,{className:`leading-tight`,children:[(0,ui.jsx)(`div`,{style:{fontSize:12,color:`#202124`},children:e.site}),(0,ui.jsx)(`div`,{style:{fontSize:12,color:`#4d5156`},children:ei(ti(e.url),60)})]})]}),(0,ui.jsx)(`div`,{style:{fontSize:t===`mobile`?18:20,color:`#1a0dab`,lineHeight:1.3},children:ei(e.title,i)||n||b(`Untitled`,`ai-rank-suite`)}),(0,ui.jsx)(`div`,{style:{fontSize:14,color:`#4d5156`,lineHeight:1.58,marginTop:3},children:ei(e.desc,a)||r||b(`No meta description — Google will invent one from the page text.`,`ai-rank-suite`)})]})})}function ai({card:e,url:t}){let n=t;try{n=new URL(t).hostname.replace(/^www\./,``)}catch{}return(0,ui.jsx)(ri,{width:500,children:(0,ui.jsxs)(`div`,{style:{fontFamily:`Helvetica, Arial, sans-serif`},children:[(0,ui.jsx)(ni,{src:e.og_image,style:{width:`100%`,aspectRatio:`1.91 / 1`,objectFit:`cover`,display:`block`,borderRadius:3},placeholder:b(`No image — add a featured image or an OpenGraph image`,`ai-rank-suite`),placeholderStyle:{width:`100%`,aspectRatio:`1.91 / 1`,background:`#f0f2f5`,color:`#65676b`,borderRadius:3}}),(0,ui.jsxs)(`div`,{style:{background:`#f2f3f5`,padding:`10px 12px`,borderRadius:`0 0 3px 3px`},children:[(0,ui.jsx)(`div`,{style:{fontSize:12,color:`#65676b`,textTransform:`uppercase`},children:n}),(0,ui.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#050505`,lineHeight:1.3,marginTop:2},children:ei(e.og_title,88)}),(0,ui.jsx)(`div`,{style:{fontSize:14,color:`#65676b`,lineHeight:1.4,marginTop:2},children:ei(e.og_desc,110)})]})]})})}function oi({card:e,url:t}){let n=t;try{n=new URL(t).hostname.replace(/^www\./,``)}catch{}let r=e.tw_card===`summary_large_image`;return(0,ui.jsx)(ri,{width:440,children:(0,ui.jsxs)(`div`,{style:{fontFamily:`Helvetica, Arial, sans-serif`,border:`1px solid #cfd9de`,borderRadius:4,overflow:`hidden`,display:r?`block`:`flex`},children:[(0,ui.jsx)(ni,{src:e.tw_image,style:r?{width:`100%`,aspectRatio:`1.91 / 1`,objectFit:`cover`,display:`block`}:{width:128,height:128,objectFit:`cover`,flexShrink:0},placeholder:b(`No image`,`ai-rank-suite`),placeholderStyle:r?{width:`100%`,aspectRatio:`1.91 / 1`,background:`#f7f9f9`,color:`#536471`}:{width:128,height:128,background:`#f7f9f9`,color:`#536471`,flexShrink:0}}),(0,ui.jsxs)(`div`,{style:{padding:`10px 12px`},children:[(0,ui.jsx)(`div`,{style:{fontSize:13,color:`#536471`},children:n}),(0,ui.jsx)(`div`,{style:{fontSize:15,color:`#0f1419`,lineHeight:1.3,marginTop:2},children:ei(e.tw_title,70)}),(0,ui.jsx)(`div`,{style:{fontSize:13,color:`#536471`,lineHeight:1.4,marginTop:2},children:ei(e.tw_desc,r?100:60)})]})]})})}function si({serp:e,engine:t,brand:n}){let r={chatgpt:{name:`ChatGPT`,accent:`#10a37f`,lead:b(`Based on the sources I found:`,`ai-rank-suite`)},overview:{name:b(`Google AI Overview`,`ai-rank-suite`),accent:`#4285f4`,lead:b(`AI Overview`,`ai-rank-suite`)},perplexity:{name:`Perplexity`,accent:`#20808d`,lead:b(`Answer`,`ai-rank-suite`)},copilot:{name:`Copilot`,accent:`#0067b8`,lead:b(`Here is what I found:`,`ai-rank-suite`)}},i=r[t]||r.chatgpt,a=(e.summary||e.desc||``).trim(),o=n||e.site;return(0,ui.jsx)(ri,{width:560,children:(0,ui.jsxs)(`div`,{style:{fontFamily:`inherit`},children:[(0,ui.jsxs)(`div`,{style:{display:`inline-flex`,alignItems:`center`,gap:6,fontSize:11,fontWeight:700,letterSpacing:`0.04em`,textTransform:`uppercase`,color:i.accent,marginBottom:8},children:[(0,ui.jsx)(`span`,{style:{width:8,height:8,background:i.accent,borderRadius:2}}),i.lead]}),a?(0,ui.jsxs)(`p`,{style:{margin:`0 0 12px`,fontSize:14,lineHeight:1.6,color:`#1f1f1f`},children:[ei(a,260),` `,(0,ui.jsx)(`sup`,{style:{fontSize:10,fontWeight:700,color:i.accent,background:`color-mix(in srgb, ${i.accent} 12%, white)`,padding:`1px 4px`,borderRadius:2},children:`1`})]}):(0,ui.jsx)(`p`,{style:{margin:`0 0 12px`,fontSize:13.5,lineHeight:1.6,color:`#8a4b00`},children:b(`This page has no summary or meta description, so an assistant has to build a sentence from whatever text it happens to extract — and it will attribute that sentence to you.`,`ai-rank-suite`)}),(0,ui.jsx)(`div`,{style:{fontSize:11,fontWeight:600,color:`#5f6368`,marginBottom:6},children:b(`Sources`,`ai-rank-suite`)}),(0,ui.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:8,border:`1px solid #e1e6ef`,borderRadius:3,padding:`8px 10px`},children:[(0,ui.jsx)(`span`,{style:{width:18,height:18,flex:`none`,borderRadius:2,background:`#f0f4f9`,color:`#5f6368`,fontSize:10,fontWeight:700,display:`grid`,placeItems:`center`},children:(o||`?`).slice(0,1).toUpperCase()}),(0,ui.jsxs)(`span`,{style:{minWidth:0},children:[(0,ui.jsx)(`span`,{style:{display:`block`,fontSize:12.5,fontWeight:600,color:`#1f1f1f`},children:ei(e.title,70)||b(`Untitled`,`ai-rank-suite`)}),(0,ui.jsxs)(`span`,{style:{display:`block`,fontSize:11.5,color:`#5f6368`},children:[o,` · `,ei(ti(e.url),52)]})]})]})]})})}function ci({serp:e,card:t,brand:n}){let[r,i]=(0,li.useState)(`google`),[a,o]=(0,li.useState)(`desktop`),[s,c]=(0,li.useState)(`chatgpt`);return e?(0,ui.jsxs)(`div`,{className:`grid gap-3`,children:[(0,ui.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,ui.jsx)(Ie,{tabs:[{id:`google`,label:b(`Google`,`ai-rank-suite`)},{id:`ai`,label:b(`AI answer`,`ai-rank-suite`)},{id:`facebook`,label:b(`Social`,`ai-rank-suite`)},{id:`twitter`,label:`X`}],active:r,onChange:i}),r===`google`&&(0,ui.jsx)(Ie,{tabs:[{id:`desktop`,label:b(`Desktop`,`ai-rank-suite`)},{id:`mobile`,label:b(`Mobile`,`ai-rank-suite`)}],active:a,onChange:o}),r===`ai`&&(0,ui.jsx)(Ie,{tabs:[{id:`chatgpt`,label:b(`ChatGPT`,`ai-rank-suite`)},{id:`overview`,label:b(`AI Overview`,`ai-rank-suite`)},{id:`perplexity`,label:b(`Perplexity`,`ai-rank-suite`)},{id:`copilot`,label:b(`Copilot`,`ai-rank-suite`)}],active:s,onChange:c})]}),r===`google`&&(0,ui.jsx)(ii,{serp:e,device:a}),r===`ai`&&(0,ui.jsx)(si,{serp:e,engine:s,brand:n}),r===`facebook`&&t&&(0,ui.jsx)(ai,{card:t,url:e.url}),r===`twitter`&&t&&(0,ui.jsx)(oi,{card:t,url:e.url}),(0,ui.jsx)(`p`,{className:`m-0 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:b(r===`ai`?`Assistants redraw their interfaces constantly; what does not change is the shape — a paragraph they wrote, and a short source list. This is the surface your page actually gets.`:`Rendered from the same resolver that writes your <head> — save to refresh after an edit.`,`ai-rank-suite`)})]}):null}var li,ui,di=o((()=>{li=u(f(),1),C(),dt(),ui=_e()}));function fi({item:e,onChange:t}){let n=e.previews||{},r=e.social||{},i=e.preview_options||{},a=(e,r)=>t({previews:{...n,[e]:r}}),o=(e,n)=>t({social:{...r,[e]:n}}),s=e.social_card?.image_warn,c=e.social_card?.image_meta;return(0,pi.jsxs)(`div`,{className:`grid gap-4`,children:[s===`none`&&(0,pi.jsx)(`div`,{className:`ars-r-lg px-4 py-3 text-[12.5px]`,style:{background:`var(--ars-warning-tonal)`},children:b(`No share image — set a featured image, a social override below, or a site-wide default under Social & sharing. Links shared without an image get far fewer clicks.`,`ai-rank-suite`)}),(s===`small`||s===`too_small`)&&c&&(0,pi.jsxs)(`div`,{className:`ars-r-lg px-4 py-3 text-[12.5px]`,style:{background:s===`too_small`?`var(--ars-serious-tonal)`:`var(--ars-warning-tonal)`},children:[`The share image is `,c.width,`×`,c.height,`px —`,` `,s===`too_small`?`below the 600×315 minimum, some platforms will drop it entirely.`:`sharp previews need 1200×630 or larger.`]}),(0,pi.jsxs)(`div`,{children:[(0,pi.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Permalink`,`ai-rank-suite`)}),(0,pi.jsx)(`input`,{type:`text`,value:e.slug||``,onChange:e=>t({slug:e.target.value}),placeholder:e.slug}),(0,pi.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`The last part of the address. Change it and this plugin writes a redirect from the old one, so existing links keep working.`,`ai-rank-suite`)})]}),(0,pi.jsxs)(`div`,{children:[(0,pi.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Canonical URL`,`ai-rank-suite`)}),(0,pi.jsx)(`input`,{type:`text`,value:e.canonical||``,placeholder:e.canonical_auto,onChange:e=>t({canonical:e.target.value})}),(0,pi.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`Leave empty to point at this page itself. Set it only when this page duplicates another one — a wrong canonical removes the page from search entirely.`,`ai-rank-suite`)})]}),(0,pi.jsxs)(`div`,{children:[(0,pi.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Breadcrumb title`,`ai-rank-suite`)}),(0,pi.jsx)(`input`,{type:`text`,value:e.breadcrumb_title||``,placeholder:e.title,onChange:e=>t({breadcrumb_title:e.target.value})}),(0,pi.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`A shorter label for the breadcrumb trail and the BreadcrumbList schema.`,`ai-rank-suite`)})]}),(0,pi.jsx)(`div`,{className:`grid gap-3`,children:Object.entries(mi).map(([e,t])=>(0,pi.jsxs)(`div`,{className:`sm:max-w-[440px]`,children:[(0,pi.jsx)(`label`,{className:`block font-medium mb-1`,children:t.label}),(0,pi.jsxs)(`select`,{value:n[e]??``,onChange:t=>a(e,t.target.value),children:[(0,pi.jsx)(`option`,{value:``,children:b(`Use the site default`,`ai-rank-suite`)}),(i[e]||[]).filter(Boolean).map(e=>(0,pi.jsx)(`option`,{value:e,children:t.names[e]||e},e))]}),(0,pi.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:t.hint})]},e))}),(0,pi.jsxs)(`details`,{children:[(0,pi.jsx)(`summary`,{className:`cursor-pointer font-medium text-[13px]`,children:b(`Social overrides`,`ai-rank-suite`)}),(0,pi.jsxs)(`div`,{className:`grid gap-3 mt-3`,children:[(0,pi.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-2)`},children:b(`Empty fields fall back to the SEO title, the meta description and the featured image.`,`ai-rank-suite`)}),hi.map(e=>(0,pi.jsxs)(`div`,{className:e.type===`textarea`?``:`sm:max-w-[440px]`,children:[(0,pi.jsx)(`label`,{className:`block font-medium mb-1`,children:e.label}),e.type===`textarea`?(0,pi.jsx)(`textarea`,{rows:2,value:r[e.key]||``,onChange:t=>o(e.key,t.target.value)}):(0,pi.jsx)(`input`,{type:`text`,value:r[e.key]||``,onChange:t=>o(e.key,t.target.value)})]},e.key)),(0,pi.jsxs)(`div`,{className:`sm:max-w-[440px]`,children:[(0,pi.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`X card type`,`ai-rank-suite`)}),(0,pi.jsxs)(`select`,{value:r.tw_card||``,onChange:e=>o(`tw_card`,e.target.value),children:[(0,pi.jsx)(`option`,{value:``,children:b(`Automatic`,`ai-rank-suite`)}),(0,pi.jsx)(`option`,{value:`summary`,children:b(`Small image`,`ai-rank-suite`)}),(0,pi.jsx)(`option`,{value:`summary_large_image`,children:b(`Large image`,`ai-rank-suite`)})]})]})]})]})]})}var pi,mi,hi,gi=o((()=>{f(),C(),pi=_e(),mi={max_snippet:{label:b(`Max snippet length`,`ai-rank-suite`),hint:b(`How many characters Google may quote. −1 = no limit, 0 = no snippet at all.`,`ai-rank-suite`),names:{"-1":b(`No limit`,`ai-rank-suite`),0:b(`No snippet`,`ai-rank-suite`),50:b(`50 characters`,`ai-rank-suite`),100:b(`100 characters`,`ai-rank-suite`),160:b(`160 characters`,`ai-rank-suite`),200:b(`200 characters`,`ai-rank-suite`)}},max_image_preview:{label:b(`Max image preview`,`ai-rank-suite`),hint:b(`Size of the image Google may show next to this result.`,`ai-rank-suite`),names:{none:`No image`,standard:`Standard`,large:`Large`}},max_video_preview:{label:b(`Max video preview`,`ai-rank-suite`),hint:b(`Seconds of video Google may play in the result. −1 = no limit.`,`ai-rank-suite`),names:{"-1":`No limit`,0:`No preview`,15:`15 seconds`,30:`30 seconds`}}},hi=[{key:`og_title`,label:b(`Facebook title`,`ai-rank-suite`),type:`text`},{key:`og_desc`,label:b(`Facebook description`,`ai-rank-suite`),type:`textarea`},{key:`og_image`,label:b(`Facebook image URL`,`ai-rank-suite`),type:`text`},{key:`tw_title`,label:b(`X title`,`ai-rank-suite`),type:`text`},{key:`tw_desc`,label:b(`X description`,`ai-rank-suite`),type:`textarea`},{key:`tw_image`,label:b(`X image URL`,`ai-rank-suite`),type:`text`}]}));function _i({check:e,onFix:t,fixing:n}){let[r,i]=(0,yi.useState)(!1),a=xi[e.status]||xi.warn,o=e.status!==`pass`&&!!e.fix;return(0,bi.jsxs)(`li`,{className:`px-3 py-2`,style:{borderRadius:`var(--ars-r-sm)`,background:e.status===`pass`?`transparent`:`var(--ars-surface-2)`},children:[(0,bi.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,bi.jsx)(`span`,{"aria-hidden":!0,className:`shrink-0 inline-flex items-center justify-center`,style:{width:17,height:17,marginTop:1,borderRadius:`var(--ars-r-xs)`,background:a.bg,color:a.tone,fontSize:11,fontWeight:700,lineHeight:1},children:a.glyph}),(0,bi.jsx)(`span`,{className:`flex-1 min-w-0 text-[13px]`,style:{lineHeight:1.45},children:e.label}),(0,bi.jsxs)(`span`,{className:`flex items-center gap-1.5 shrink-0`,children:[e.ai&&e.status!==`pass`&&t&&(0,bi.jsx)(A,{variant:`ghost`,busy:n,onClick:()=>t(e),children:b(`Fix with AI`,`ai-rank-suite`)}),o&&(0,bi.jsx)(`button`,{type:`button`,"aria-expanded":r,"aria-label":b(r?`Hide explanation`:`Why this matters`,`ai-rank-suite`),onClick:()=>i(!r),className:`cursor-pointer inline-flex items-center justify-center`,style:{width:18,height:18,borderRadius:`var(--ars-r-xs)`,border:`1px solid var(--ars-border)`,background:`var(--ars-surface)`,color:`var(--ars-ink-3)`,fontSize:11,fontWeight:700,lineHeight:1},children:`?`})]})]}),r&&o&&(0,bi.jsx)(`p`,{className:`m-0 mt-1.5 ml-[27px] text-[12px]`,style:{color:`var(--ars-ink-2)`},children:e.fix})]})}function vi({checks:e=[],sections:t={},onFix:n,fixing:r=null}){let i=Object.keys(t).length?Object.entries(t):[[`basics`,b(`Checks`,`ai-rank-suite`)]],a=new Set(i.map(([e])=>e)),o=e.filter(e=>!a.has(e.section)),[s,c]=(0,yi.useState)({}),l=(e,t,i)=>{if(!i.length)return null;let a=i.filter(e=>e.status!==`pass`),o=a.length===0,l=s[e]===void 0?!o:!s[e];return(0,bi.jsxs)(`div`,{className:`ars-r-sm`,style:{border:`1px solid var(--ars-border)`},children:[(0,bi.jsxs)(`button`,{type:`button`,"aria-expanded":l,onClick:()=>c({...s,[e]:l}),className:`w-full flex items-center gap-2.5 px-3 py-2 cursor-pointer`,style:{background:`var(--ars-surface-2)`,border:0,borderRadius:`var(--ars-r-sm)`},children:[(0,bi.jsx)(`span`,{"aria-hidden":!0,style:{color:`var(--ars-ink-3)`,width:10,fontSize:11},children:l?`▾`:`▸`}),(0,bi.jsx)(`span`,{className:`font-semibold text-[13px]`,children:t}),o?(0,bi.jsxs)(j,{tone:`good`,children:[`✓ `,b(`All good`,`ai-rank-suite`)]}):(0,bi.jsx)(j,{tone:a.some(e=>e.status===`fail`)?`serious`:`warning`,children:S(x(`%d to fix`,`%d to fix`,a.length,`ai-rank-suite`),a.length)}),(0,bi.jsx)(`span`,{className:`ml-auto t-caption`,children:i.length})]}),l&&(0,bi.jsx)(`ul`,{className:`m-0 p-2 list-none grid gap-1`,children:i.map(e=>(0,bi.jsx)(_i,{check:e,onFix:n,fixing:r===e.id},e.id))})]},e)};return(0,bi.jsxs)(`div`,{className:`grid gap-2`,children:[i.map(([t,n])=>l(t,n,e.filter(e=>e.section===t))),l(`other`,b(`Other`,`ai-rank-suite`),o)]})}var yi,bi,xi,Si=o((()=>{yi=u(f(),1),C(),dt(),bi=_e(),xi={pass:{glyph:`✓`,tone:`var(--ars-good)`,bg:`var(--ars-good-tonal)`},warn:{glyph:`!`,tone:`var(--ars-warning)`,bg:`var(--ars-warning-tonal)`},fail:{glyph:`✕`,tone:`var(--ars-serious)`,bg:`var(--ars-serious-tonal)`}}}));function Ci({postId:e,initial:t=null,onLoad:n,onGoTo:r}){let[i,a]=(0,Ti.useState)(t),[o,s]=(0,Ti.useState)(null),[c,l]=(0,Ti.useState)(null),[u,d]=(0,Ti.useState)(!1),[f,p]=(0,Ti.useState)(`tags`),[m,h]=(0,Ti.useState)(!1),[g,_]=(0,Ti.useState)({}),v=()=>{s(null),D.get(`/content/${e}/head`).then(e=>{a(e),n?.(e)}).catch(e=>s(e.message))};(0,Ti.useEffect)(()=>{if(l(null),t){a(t);return}a(null),v()},[e,t]);let y=async()=>{d(!0);try{l(await D.get(`/content/${e}/head/live`))}catch(e){l({ok:!1,reason:e.message})}finally{d(!1)}},x=(0,Ti.useMemo)(()=>i?i.groups.map(e=>({...e,tags:i.tags.filter(t=>t.group===e.id)})).filter(e=>e.tags.length>0):[],[i]);if(o)return(0,Ei.jsx)(M,{tone:`serious`,children:o});if(!i)return(0,Ei.jsx)(`div`,{className:`t-caption p-2`,children:b(`Reading the head…`,`ai-rank-suite`)});let C=i.counts||{};return(0,Ei.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Ei.jsxs)(`div`,{className:`ars-head-strip`,children:[(0,Ei.jsxs)(`div`,{className:`ars-head-stat`,children:[(0,Ei.jsx)(`b`,{children:i.tags.filter(e=>e.status===`ok`).length}),(0,Ei.jsx)(`span`,{children:`tags in order`})]}),C.missing>0&&(0,Ei.jsxs)(`div`,{className:`ars-head-stat is-bad`,children:[(0,Ei.jsx)(`b`,{children:C.missing}),(0,Ei.jsx)(`span`,{children:`missing`})]}),C.long>0&&(0,Ei.jsxs)(`div`,{className:`ars-head-stat is-warn`,children:[(0,Ei.jsx)(`b`,{children:C.long}),(0,Ei.jsx)(`span`,{children:`over length`})]}),C.empty>0&&(0,Ei.jsxs)(`div`,{className:`ars-head-stat`,children:[(0,Ei.jsx)(`b`,{children:C.empty}),(0,Ei.jsx)(`span`,{children:`optional, unset`})]}),(0,Ei.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,Ei.jsx)(Je,{value:f,onChange:p,options:[{id:`tags`,label:b(`Tags`,`ai-rank-suite`)},{id:`source`,label:b(`Source`,`ai-rank-suite`)},{id:`live`,label:b(`Live check`,`ai-rank-suite`)}]}),(0,Ei.jsx)(`button`,{type:`button`,className:`ars-move`,title:b(`Reload`,`ai-rank-suite`),onClick:v,children:(0,Ei.jsx)(Tt,{size:12})})]})]}),i.coexist&&(0,Ei.jsxs)(M,{tone:`warning`,children:[i.coexist,` is active on this site, so some of these surfaces are written by it rather than by AI Rank Suite. Rows marked `,(0,Ei.jsx)(`b`,{children:`other plugin`}),` are the ones it owns — nothing here is duplicated, which is the point.`]}),f===`tags`&&(0,Ei.jsxs)(Ei.Fragment,{children:[i.issues.length>0&&(0,Ei.jsx)(`div`,{className:`grid gap-1.5`,children:i.issues.map((e,t)=>(0,Ei.jsxs)(`div`,{className:`ars-head-issue is-${e.level}`,children:[(0,Ei.jsx)(`span`,{"aria-hidden":!0,className:`ars-head-issue-mark`,children:e.level===`error`?`✕`:e.level===`warn`?`!`:`i`}),(0,Ei.jsxs)(`div`,{children:[(0,Ei.jsx)(`div`,{className:`font-semibold text-[12.5px]`,children:e.title}),(0,Ei.jsx)(`div`,{className:`text-[12px] mt-0.5`,style:{color:`var(--ars-ink-2)`},children:e.text})]})]},t))}),x.map(e=>(0,Ei.jsxs)(`div`,{className:`ars-head-group`,children:[(0,Ei.jsxs)(`div`,{className:`ars-head-group-head`,children:[(0,Ei.jsxs)(`div`,{children:[(0,Ei.jsx)(`div`,{className:`font-semibold text-[12.5px]`,children:e.label}),(0,Ei.jsx)(`div`,{className:`t-caption`,children:e.note})]}),(0,Ei.jsx)(`span`,{className:`t-caption tabular-nums`,children:e.tags.length})]}),(0,Ei.jsx)(`div`,{className:`ars-head-rows`,children:e.tags.map(t=>{let n=`${e.id}:${t.key}`,i=!!g[n],a=Di[t.status]||Di.ok;return(0,Ei.jsxs)(`div`,{className:`ars-head-row is-${t.status}`,children:[(0,Ei.jsxs)(`button`,{type:`button`,className:`ars-head-row-main`,onClick:()=>_({...g,[n]:!i}),"aria-expanded":i,children:[(0,Ei.jsx)(`span`,{className:`ars-head-key`,title:t.key,children:t.label}),(0,Ei.jsx)(`span`,{className:`ars-head-val`,children:t.value?t.block?S(b(`%s characters of JSON-LD`,`ai-rank-suite`),t.value.length.toLocaleString()):t.value:(0,Ei.jsx)(`i`,{style:{color:`var(--ars-ink-3)`},children:`—`})}),t.limit>0&&t.value&&(0,Ei.jsxs)(`span`,{className:`ars-head-len tabular-nums`,children:[t.length,`/`,t.limit]}),(0,Ei.jsx)(j,{tone:a.tone,children:a.label})]}),i&&(0,Ei.jsxs)(`div`,{className:`ars-head-row-body`,children:[t.why&&(0,Ei.jsx)(`p`,{className:`m-0 text-[12px]`,children:t.why}),t.note&&(0,Ei.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:t.note}),t.limit>0&&t.value&&(0,Ei.jsx)(He,{value:t.value,kind:t.limit>100?`desc`:`title`}),t.block&&t.value&&(0,Ei.jsx)(`pre`,{className:`ars-head-pre`,children:t.value.slice(0,4e3)}),(0,Ei.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Ei.jsx)(`code`,{className:`ars-head-code`,children:t.key}),(0,Ei.jsxs)(`span`,{className:`t-caption`,children:[`written by`,` `,t.owner===`airs`?`AI Rank Suite`:t.owner===`wp`?`WordPress`:t.owner]}),r&&wi(t.key)&&(0,Ei.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>r(wi(t.key)),children:b(`Edit this →`,`ai-rank-suite`)})]})]})]},t.key)})})]},e.id))]}),f===`source`&&(0,Ei.jsxs)(`div`,{className:`grid gap-2`,children:[(0,Ei.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Ei.jsx)(A,{variant:`ghost`,onClick:async()=>{await ve(i.source)&&(h(!0),setTimeout(()=>h(!1),1800))},children:m?`✓ `+b(`Copied`,`ai-rank-suite`):b(`Copy source`,`ai-rank-suite`)}),(0,Ei.jsxs)(`a`,{href:i.url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 text-[12px]`,children:[b(`Open the page`,`ai-rank-suite`),(0,Ei.jsx)(wt,{size:11})]}),(0,Ei.jsxs)(`span`,{className:`ml-auto t-caption`,children:[i.source.split(`
     9`).length,` lines`]})]}),(0,Ei.jsx)(`pre`,{className:`ars-head-pre is-tall`,children:i.source||`(nothing would be written)`}),(0,Ei.jsx)(`p`,{className:`m-0 t-caption`,children:b(`This is what AI Rank Suite writes. The finished head will also contain whatever your theme and other plugins add — use the live check to see the whole thing.`,`ai-rank-suite`)})]}),f===`live`&&(0,Ei.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Ei.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Ei.jsxs)(A,{onClick:y,busy:u,children:[(0,Ei.jsx)(Pt,{size:13}),b(`Fetch the real head`,`ai-rank-suite`)]}),(0,Ei.jsxs)(`span`,{className:`t-caption`,children:[`Requests `,i.url,` and reads what came back — the only way to catch a second plugin writing the same tag.`]})]}),c&&!c.ok&&(0,Ei.jsx)(M,{tone:`warning`,children:c.reason}),c&&c.ok&&(0,Ei.jsxs)(Ei.Fragment,{children:[(0,Ei.jsxs)(`div`,{className:`ars-head-strip`,children:[(0,Ei.jsxs)(`div`,{className:`ars-head-stat`,children:[(0,Ei.jsx)(`b`,{children:c.tags.length}),(0,Ei.jsx)(`span`,{children:`tags on the page`})]}),(0,Ei.jsxs)(`div`,{className:`ars-head-stat${c.duplicates.length?` is-bad`:``}`,children:[(0,Ei.jsx)(`b`,{children:c.duplicates.length}),(0,Ei.jsx)(`span`,{children:`duplicated`})]}),(0,Ei.jsxs)(`div`,{className:`ars-head-stat${c.drift.length?` is-warn`:``}`,children:[(0,Ei.jsx)(`b`,{children:c.drift.length}),(0,Ei.jsx)(`span`,{children:`differ from plan`})]}),(0,Ei.jsxs)(`div`,{className:`ars-head-stat`,children:[(0,Ei.jsx)(`b`,{children:c.jsonld}),(0,Ei.jsx)(`span`,{children:b(`JSON-LD blocks`,`ai-rank-suite`)})]})]}),c.duplicates.length>0&&(0,Ei.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,Ei.jsx)(`div`,{className:`t-overline`,children:b(`Written more than once`,`ai-rank-suite`)}),c.duplicates.map(e=>(0,Ei.jsxs)(`div`,{className:`ars-head-issue is-error`,children:[(0,Ei.jsx)(`span`,{"aria-hidden":!0,className:`ars-head-issue-mark`,children:`✕`}),(0,Ei.jsxs)(`div`,{children:[(0,Ei.jsxs)(`div`,{className:`font-semibold text-[12.5px]`,children:[e.key,` appears `,e.count,` times`]}),(0,Ei.jsx)(`div`,{className:`text-[12px] mt-0.5`,style:{color:`var(--ars-ink-2)`},children:b(`Two sources are writing this tag. Crawlers pick one, and which one is not something you control — usually the theme or a second SEO plugin. Switch the duplicate off at its source.`,`ai-rank-suite`)})]})]},e.key))]}),c.drift.length>0&&(0,Ei.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,Ei.jsx)(`div`,{className:`t-overline`,children:b(`Different from what we write`,`ai-rank-suite`)}),c.drift.map((e,t)=>(0,Ei.jsxs)(`div`,{className:`ars-head-drift`,children:[(0,Ei.jsx)(`div`,{className:`font-semibold text-[12px]`,children:e.label}),(0,Ei.jsxs)(`div`,{className:`ars-head-drift-row`,children:[(0,Ei.jsx)(`span`,{className:`t-caption`,children:`planned`}),(0,Ei.jsx)(`code`,{children:e.planned})]}),(0,Ei.jsxs)(`div`,{className:`ars-head-drift-row`,children:[(0,Ei.jsx)(`span`,{className:`t-caption`,children:`live`}),(0,Ei.jsx)(`code`,{children:e.live||(0,Ei.jsx)(`i`,{children:`absent`})})]})]},t)),(0,Ei.jsx)(`p`,{className:`m-0 t-caption`,children:b(`A difference here is almost always a page cache serving an older head. If it survives a cache purge, something else is overwriting the tag.`,`ai-rank-suite`)})]}),c.duplicates.length===0&&c.drift.length===0&&(0,Ei.jsx)(M,{tone:`good`,children:b(`The head on the page matches what this plugin writes, and nothing is duplicated.`,`ai-rank-suite`)})]})]})]})}function wi(e){return e===`title`||e===`name:description`?`optimize`:e.startsWith(`property:og`)||e.startsWith(`name:twitter`)?`preview`:e===`name:robots`||e.startsWith(`rel:canonical`)?`advanced`:e===`application/ld+json`?`schema`:null}var Ti,Ei,Di,Oi=o((()=>{Ti=u(f(),1),C(),O(),dt(),Vt(),ye(),Ei=_e(),Di={ok:{tone:`good`,label:`ok`},missing:{tone:`serious`,label:`missing`},empty:{tone:`neutral`,label:b(`not set`,`ai-rank-suite`)},long:{tone:`warning`,label:b(`too long`,`ai-rank-suite`)},off:{tone:`neutral`,label:b(`switched off`,`ai-rank-suite`)},delegated:{tone:`warning`,label:b(`other plugin`,`ai-rank-suite`)}}}));function ki({postId:e,onGoTo:t}){let[n,r]=(0,Ai.useState)(null),[i,a]=(0,Ai.useState)(null),[o,s]=(0,Ai.useState)(!1),[c,l]=(0,Ai.useState)(!1),u=()=>{s(!0),D.get(`/content/${e}/report`).then(r).catch(e=>a(e.message)).finally(()=>s(!1))};if((0,Ai.useEffect)(()=>{r(null),u()},[e]),i)return(0,ji.jsx)(M,{tone:`serious`,children:i});if(!n)return(0,ji.jsx)(`div`,{className:`t-caption p-2`,children:b(`Checking every requirement…`,`ai-rank-suite`)});let d=n.score>=85?`green`:n.score>=60?`amber`:`red`,f=c?n.items.filter(e=>!e.pass):n.items;return(0,ji.jsxs)(`div`,{className:`grid gap-4`,children:[(0,ji.jsxs)(`div`,{className:`ars-report-head is-${d}`,children:[(0,ji.jsxs)(`div`,{className:`ars-report-score`,children:[(0,ji.jsx)(`b`,{className:`tabular-nums`,children:n.score}),(0,ji.jsx)(`span`,{children:`%`})]}),(0,ji.jsxs)(`div`,{className:`min-w-0`,children:[(0,ji.jsx)(`div`,{className:`font-semibold text-[13.5px]`,children:n.failed===0?b(`Everything checked out`,`ai-rank-suite`):S(b(`%1$s of %2$s requirements not met`,`ai-rank-suite`),n.failed,n.passed+n.failed)}),(0,ji.jsx)(`p`,{className:`m-0 mt-0.5 text-[12px]`,style:{color:`var(--ars-ink-2)`},children:S(b(`%1$s words · about %2$s min read · %3$s headings · %4$s images · %5$s internal and %6$s external links`,`ai-rank-suite`),n.words.toLocaleString(),n.reading,n.headings,n.images,n.internal,n.external)}),(0,ji.jsx)(`div`,{className:`ars-report-bar mt-2`,children:(0,ji.jsx)(`span`,{style:{width:`${n.score}%`}})}),(0,ji.jsx)(`p`,{className:`m-0 mt-1 t-caption`,children:S(b(`Weighted by consequence — %1$s of %2$s points. A missing description counts for more than a missing card type, because it costs more.`,`ai-rank-suite`),n.earned,n.possible)})]}),(0,ji.jsxs)(`div`,{className:`flex flex-col items-end gap-2 shrink-0`,children:[(0,ji.jsxs)(A,{variant:`ghost`,busy:o,onClick:u,children:[(0,ji.jsx)(Tt,{size:13}),b(`Re-check`,`ai-rank-suite`)]}),(0,ji.jsxs)(`label`,{className:`flex items-center gap-1.5 text-[12px] cursor-pointer`,style:{color:`var(--ars-ink-2)`},children:[(0,ji.jsx)(`input`,{type:`checkbox`,checked:c,onChange:e=>l(e.target.checked)}),b(`Only what failed`,`ai-rank-suite`)]})]})]}),n.sections.map(e=>{let n=f.filter(t=>t.section===e.id);if(n.length===0)return null;let r=n.filter(e=>!e.pass).length;return(0,ji.jsxs)(`div`,{className:`ars-report-group`,children:[(0,ji.jsxs)(`div`,{className:`ars-report-group-head`,children:[(0,ji.jsxs)(`div`,{children:[(0,ji.jsx)(`div`,{className:`font-semibold text-[12.5px]`,children:e.label}),(0,ji.jsx)(`div`,{className:`t-caption`,children:e.note})]}),(0,ji.jsxs)(`span`,{className:`flex items-center gap-3`,children:[(0,ji.jsxs)(`span`,{className:`ars-report-legend`,children:[(0,ji.jsx)(`span`,{className:`ars-report-weight`,"aria-hidden":!0,children:`●●●`}),b(`= weight in the score`,`ai-rank-suite`)]}),(0,ji.jsxs)(`span`,{className:`ars-report-tally${r>0?` is-bad`:``}`,children:[n.length-r,`/`,n.length]})]})]}),(0,ji.jsx)(`div`,{children:n.map(e=>(0,ji.jsxs)(`div`,{className:`ars-report-row${e.pass?` is-pass`:``}`,children:[(0,ji.jsx)(`span`,{className:`ars-report-mark`,"aria-hidden":!0,children:e.pass?`✓`:`✕`}),(0,ji.jsxs)(`div`,{className:`min-w-0`,children:[(0,ji.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,ji.jsx)(`span`,{className:`font-medium text-[12.5px]`,children:e.label}),(0,ji.jsx)(`span`,{className:`ars-report-weight`,title:b(`How much this counts toward the score`,`ai-rank-suite`),children:`●`.repeat(Math.min(5,e.weight))})]}),(0,ji.jsx)(`p`,{className:`m-0 mt-0.5 text-[12px]`,style:{color:`var(--ars-ink-2)`},children:e.detail}),e.value&&(0,ji.jsx)(`code`,{className:`ars-report-value`,title:e.value,children:e.value})]}),!e.pass&&t&&Mi[e.id]&&(0,ji.jsx)(`button`,{type:`button`,className:`ars-linkbtn ars-report-fix`,onClick:()=>t(Mi[e.id]),children:b(`Fix →`,`ai-rank-suite`)})]},e.id))})]},e.id)}),c&&n.failed===0&&(0,ji.jsx)(M,{tone:`good`,children:b(`Nothing failed. Untick the filter to see everything that passed.`,`ai-rank-suite`)})]})}var Ai,ji,Mi,Ni=o((()=>{Ai=u(f(),1),C(),O(),dt(),Vt(),ji=_e(),Mi={title:`optimize`,description:`optimize`,keyword:`keywords`,keyword_title:`optimize`,keyword_opening:`checks`,canonical:`advanced`,indexable:`advanced`,snippet_limit:`advanced`,schema:`schema`,faq:`faq`,og_image:`preview`,og_title:`preview`,tw_card:`preview`,llms:`advanced`,h1:`checks`,structure:`checks`,opening:`checks`,length:`checks`,alt:`checks`}}));function Pi({from:e,to:t}){let n=String(e||``).split(/\s+/).filter(Boolean),r=String(t||``).split(/\s+/).filter(Boolean),i=n.length,a=r.length,o=Array.from({length:i+1},()=>Array(a+1).fill(0));for(let e=i-1;e>=0;e--)for(let t=a-1;t>=0;t--)o[e][t]=n[e]===r[t]?o[e+1][t+1]+1:Math.max(o[e+1][t],o[e][t+1]);let s=[],c=0,l=0;for(;c<i&&l<a;)n[c]===r[l]?(s.push([`=`,n[c]]),c++,l++):o[c+1][l]>=o[c][l+1]?(s.push([`-`,n[c]]),c++):(s.push([`+`,r[l]]),l++);for(;c<i;)s.push([`-`,n[c++]]);for(;l<a;)s.push([`+`,r[l++]]);return n.length===0?(0,Li.jsx)(`span`,{className:`ars-diff-add`,children:r.join(` `)}):(0,Li.jsx)(`span`,{children:s.map(([e,t],n)=>(0,Li.jsxs)(`span`,{className:e===`+`?`ars-diff-add`:e===`-`?`ars-diff-del`:``,children:[t,` `]},n))})}function Fi({postId:e,onApplied:t}){let[n,r]=(0,Ii.useState)(null),[i,a]=(0,Ii.useState)(``),[o,s]=(0,Ii.useState)(``),[c,l]=(0,Ii.useState)(``),[u,d]=(0,Ii.useState)(null),[f,p]=(0,Ii.useState)(!1),m=()=>D.get(`/ai/suggest/${e}`).then(e=>{r(e),e.pending&&(a(e.pending.proposal.title||``),s(e.pending.proposal.description||``))}).catch(e=>d(e.message));(0,Ii.useEffect)(()=>{m()},[e]);let h=async(e,t)=>{l(e),d(null);try{await t()}catch(e){d(e.message)}finally{l(``)}},g=(t=!1)=>h(`propose`,async()=>{let n=await D.post(`/ai/suggest/${e}`,{force:t});r({pending:n,stale:!1,history:n.history||[],current:n.current}),a(n.proposal.title||``),s(n.proposal.description||``)}),_=()=>h(`apply`,async()=>{let n=await D.post(`/ai/suggest/${e}/apply`,{title:i,description:o});r(e=>({...e||{},current:{title:n.title||``,description:n.description||``}})),r(e=>({pending:null,stale:!1,history:n.history||[],current:n.current||e?.current})),t&&t({seo_title:n.title,seo_desc:n.description})}),v=()=>h(`reject`,async()=>{let t=await D.post(`/ai/suggest/${e}/reject`,{});r(e=>({pending:null,stale:!1,history:t.history||[],current:t.current||e?.current}))}),y=()=>h(`undo`,async()=>{let n=await D.post(`/ai/suggest/${e}/undo`,{});r(e=>({...e,history:n.history||[]})),t&&t({seo_title:n.restored.title||``,seo_desc:n.restored.description||``})});if(!n)return null;let x=n.pending,S=(n.history||[]).some(e=>e.action===`applied`&&!e.undone),C=x&&(i!==x.proposal.title||o!==x.proposal.description),w=x?.original??{title:``,description:``,fallback_title:``},T=n?.current?{...w,title:n.current.title||``,description:n.current.description||``}:w,E=!!(n?.current&&x?.original&&(n.current.title!==(x.original.title||``)||n.current.description!==(x.original.description||``))),ee=x?.model??{},te=x?x.proposal.confidence:0,ne=te>=75?`good`:te>=50?`warning`:`serious`;return(0,Li.jsxs)(`div`,{className:`ars-review`,children:[(0,Li.jsxs)(`div`,{className:`ars-review-head`,children:[(0,Li.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Li.jsx)(Et,{size:14}),(0,Li.jsx)(`span`,{className:`font-semibold text-[13px]`,children:b(`AI proposal`,`ai-rank-suite`)}),x&&(0,Li.jsxs)(Li.Fragment,{children:[(0,Li.jsxs)(j,{tone:ne,children:[te,`% `,b(`confident`,`ai-rank-suite`)]}),x.cached&&(0,Li.jsx)(j,{tone:`neutral`,children:b(`unchanged page — no new call`,`ai-rank-suite`)}),n.stale&&(0,Li.jsx)(j,{tone:`warning`,children:b(`page changed since`,`ai-rank-suite`)}),E&&(0,Li.jsx)(j,{tone:`warning`,title:b(`The title or description was changed after this proposal was written; the proposal compares against what the page carries now.`,`ai-rank-suite`),children:b(`metadata changed since`,`ai-rank-suite`)})]})]}),(0,Li.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[S&&(0,Li.jsx)(A,{variant:`ghost`,busy:c===`undo`,onClick:y,children:b(`Undo last apply`,`ai-rank-suite`)}),(0,Li.jsx)(A,{variant:x?`ghost`:`primary`,busy:c===`propose`,onClick:()=>g(!!x),children:b(x?`Propose again`:`Propose title & description`,`ai-rank-suite`)})]})]}),u&&(0,Li.jsx)(M,{tone:`serious`,children:u}),x&&(0,Li.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Li.jsxs)(`div`,{className:`ars-review-field`,children:[(0,Li.jsx)(`div`,{className:`t-overline`,children:b(`SEO title`,`ai-rank-suite`)}),(0,Li.jsxs)(`div`,{className:`ars-review-orig`,children:[(0,Li.jsxs)(`span`,{className:`t-caption`,children:[b(`Now`,`ai-rank-suite`),`:`]}),` `,T.title||(0,Li.jsxs)(`em`,{style:{color:`var(--ars-ink-3)`},children:[b(`empty — falls back to`,`ai-rank-suite`),` “`,T.fallback_title,`”`]})]}),(0,Li.jsxs)(`div`,{className:`ars-review-diff`,children:[(0,Li.jsxs)(`span`,{className:`t-caption`,children:[b(`Change`,`ai-rank-suite`),`:`]}),` `,(0,Li.jsx)(Pi,{from:T.title||T.fallback_title,to:i})]}),(0,Li.jsx)(`input`,{type:`text`,value:i,onChange:e=>a(e.target.value)}),(0,Li.jsx)(He,{value:i,kind:`title`}),x.proposal.title_reason&&(0,Li.jsx)(`div`,{className:`t-caption`,children:x.proposal.title_reason})]}),(0,Li.jsxs)(`div`,{className:`ars-review-field`,children:[(0,Li.jsx)(`div`,{className:`t-overline`,children:b(`Meta description`,`ai-rank-suite`)}),(0,Li.jsxs)(`div`,{className:`ars-review-orig`,children:[(0,Li.jsxs)(`span`,{className:`t-caption`,children:[b(`Now`,`ai-rank-suite`),`:`]}),` `,T.description||(0,Li.jsx)(`em`,{style:{color:`var(--ars-ink-3)`},children:b(`empty`,`ai-rank-suite`)})]}),(0,Li.jsxs)(`div`,{className:`ars-review-diff`,children:[(0,Li.jsxs)(`span`,{className:`t-caption`,children:[b(`Change`,`ai-rank-suite`),`:`]}),` `,(0,Li.jsx)(Pi,{from:T.description,to:o})]}),(0,Li.jsx)(`textarea`,{rows:3,value:o,onChange:e=>s(e.target.value)}),(0,Li.jsx)(He,{value:o,kind:`description`}),x.proposal.description_reason&&(0,Li.jsx)(`div`,{className:`t-caption`,children:x.proposal.description_reason})]}),(x.proposal.risks||[]).length>0&&(0,Li.jsxs)(M,{tone:`warning`,children:[(0,Li.jsx)(`strong`,{children:b(`Check before applying:`,`ai-rank-suite`)}),` `,(x.proposal.risks||[]).join(` · `)]}),(0,Li.jsxs)(`div`,{className:`ars-review-meta`,children:[(ee.provider||ee.model)&&(0,Li.jsx)(`span`,{children:[ee.provider,ee.model].filter(Boolean).join(` · `)}),ee.prompt&&(0,Li.jsx)(`span`,{children:ee.prompt}),typeof ee.tokens==`number`&&(0,Li.jsxs)(`span`,{children:[ee.tokens.toLocaleString(),` `,b(`tokens`,`ai-rank-suite`),ee.cost?` · ${ee.cost}`:``,ee.latency_ms?` · ${ee.latency_ms} ms`:``]}),(0,Li.jsxs)(`span`,{children:[b(`language`,`ai-rank-suite`),` `,x.proposal.language,x.proposal.chars_sent?` · ${x.proposal.chars_sent.toLocaleString()} ${b(`chars sent`,`ai-rank-suite`)}`:``,x.proposal.redacted&&Object.keys(x.proposal.redacted).length>0?` · ${b(`redacted`,`ai-rank-suite`)}: ${Object.entries(x.proposal.redacted).map(([e,t])=>`${t} ${e}`).join(`, `)}`:``]})]}),(0,Li.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Li.jsx)(A,{busy:c===`apply`,onClick:_,children:b(C?`Apply my edited version`:`Apply proposal`,`ai-rank-suite`)}),(0,Li.jsx)(A,{variant:`ghost`,busy:c===`reject`,onClick:v,children:b(`Reject`,`ai-rank-suite`)})]})]}),(n.history||[]).length>0&&(0,Li.jsxs)(`div`,{className:`mt-1`,children:[(0,Li.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>p(e=>!e),children:f?b(`Hide history`,`ai-rank-suite`):`${b(`History`,`ai-rank-suite`)} (${n.history.length})`}),f&&(0,Li.jsx)(`div`,{className:`grid gap-1 mt-2`,children:[...n.history].reverse().map((e,t)=>(0,Li.jsxs)(`div`,{className:`text-[12px]`,style:{color:`var(--ars-ink-2)`},children:[new Date(e.time*1e3).toLocaleString(),` · `,(0,Li.jsx)(`strong`,{children:e.action}),e.edited?` (${b(`edited`,`ai-rank-suite`)})`:``,e.undone?` · ${b(`undone`,`ai-rank-suite`)}`:``,e.model?.model?` · ${e.model.model}`:``,e.model?.cost?` · ${e.model.cost}`:``,e.after?.title?` — “${e.after.title}”`:``]},t))})]})]})}var Ii,Li,Ri=o((()=>{Ii=u(f(),1),C(),O(),dt(),Vt(),Li=_e()}));function zi(){let[e,t]=(0,Ki.useState)(``),[n,r]=(0,Ki.useState)(null);return{busy:e,error:n,run:async(e,n)=>{t(e),r(null);try{return await n()}catch(e){return r(e.message),null}finally{t(``)}},setError:r}}function Bi({postId:e,onServerEdit:t}){let{busy:n,error:r,run:i}=zi(),[a,o]=(0,Ki.useState)(null),[s,c]=(0,Ki.useState)(``),[l,u]=(0,Ki.useState)({}),[d,f]=(0,Ki.useState)({}),[p,m]=(0,Ki.useState)(!1),h=()=>i(`propose`,async()=>{let t=await D.post(`/ai/rewrite/${e}`,{focus:s});o(t),u(Object.fromEntries((t.edits||[]).map((e,t)=>[t,e.rewritten]))),f({})}),g=n=>i(`apply${n}`,async()=>{let r=a.edits[n];await D.post(`/ai/rewrite/${e}/apply`,{original:r.original,rewritten:l[n]}),f(e=>({...e,[n]:!0})),m(!0),t&&t()});return(0,qi.jsxs)(`div`,{className:`grid gap-3`,children:[(0,qi.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`The AI picks the passages where a change most improves quotability or clarity and rewrites only those — no new facts, same language and register. Apply the ones you agree with; each apply is undoable.`,`ai-rank-suite`)}),(0,qi.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,qi.jsx)(`input`,{type:`text`,placeholder:b(`Optional focus, e.g. "answer the question in the first line"`,`ai-rank-suite`),value:s,onChange:e=>c(e.target.value),style:{flex:`1 1 260px`}}),(0,qi.jsxs)(A,{onClick:h,busy:n===`propose`,children:[(0,qi.jsx)(Et,{size:13}),` `,b(a?`Propose again`:`Propose rewrites`,`ai-rank-suite`)]}),p&&(0,qi.jsx)(A,{variant:`ghost`,onClick:()=>i(`undo`,async()=>{await D.post(`/ai/rewrite/${e}/undo`,{}),m(!1),f({}),t&&t()}),busy:n===`undo`,children:b(`Undo last apply`,`ai-rank-suite`)})]}),r&&(0,qi.jsx)(M,{tone:`serious`,children:r}),a&&a.edits.length===0&&(0,qi.jsx)(M,{tone:`good`,children:b(`The AI found nothing worth changing.`,`ai-rank-suite`)}),a&&a.edits.map((e,t)=>(0,qi.jsxs)(`div`,{className:`ars-review-field${d[t]?` is-applied`:``}`,children:[(0,qi.jsxs)(`div`,{className:`flex items-center justify-between gap-2 flex-wrap`,children:[(0,qi.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,qi.jsx)(j,{tone:`brand`,children:e.kind.replace(`_`,` `)}),typeof e.confidence==`number`&&(0,qi.jsxs)(j,{tone:e.confidence>=70?`good`:`warning`,children:[e.confidence,`%`]}),!e.locatable&&(0,qi.jsx)(j,{tone:`warning`,children:b(`passage not found verbatim — copy by hand`,`ai-rank-suite`)}),d[t]&&(0,qi.jsxs)(j,{tone:`good`,children:[`✓ `,b(`applied`,`ai-rank-suite`)]})]}),e.locatable&&!d[t]&&(0,qi.jsx)(A,{onClick:()=>g(t),busy:n===`apply${t}`,children:b(`Apply this`,`ai-rank-suite`)})]}),(0,qi.jsxs)(`div`,{className:`ars-review-orig`,children:[(0,qi.jsxs)(`span`,{className:`t-caption`,children:[b(`Now`,`ai-rank-suite`),`:`]}),` `,e.original]}),(0,qi.jsx)(`textarea`,{rows:Math.min(8,Math.max(2,Math.ceil((l[t]||``).length/90))),value:l[t]||``,onChange:e=>u({...l,[t]:e.target.value}),disabled:!!d[t]}),e.reason&&(0,qi.jsx)(`div`,{className:`t-caption`,children:e.reason})]},t)),a&&(0,qi.jsxs)(`div`,{className:`ars-review-meta`,children:[(0,qi.jsx)(Ji,{r:a.receipt}),a.chars_sent?(0,qi.jsxs)(`span`,{children:[a.chars_sent.toLocaleString(),` `,b(`chars sent`,`ai-rank-suite`)]}):null,a.redacted&&Object.keys(a.redacted).length>0?(0,qi.jsxs)(`span`,{children:[b(`redacted`,`ai-rank-suite`),`: `,Object.entries(a.redacted).map(([e,t])=>`${t} ${e}`).join(`, `)]}):null]})]})}function Vi({postId:e,onApply:t}){let{busy:n,error:r,run:i}=zi(),[a,o]=(0,Ki.useState)(null),[s,c]=(0,Ki.useState)({});return(0,qi.jsxs)(`div`,{className:`grid gap-3`,children:[(0,qi.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`The AI proposes the best-fitting schema type this plugin supports and fills only fields whose values appear on the page — never a price, rating or date it did not read. You review, then hand it to the schema editor.`,`ai-rank-suite`)}),(0,qi.jsx)(`div`,{children:(0,qi.jsxs)(A,{onClick:()=>i(`propose`,async()=>{let t=await D.post(`/ai/schema/${e}`,{});o(t),c(t.fields||{})}),busy:n===`propose`,children:[(0,qi.jsx)(Et,{size:13}),` `,b(a?`Propose again`:`Propose schema`,`ai-rank-suite`)]})}),r&&(0,qi.jsx)(M,{tone:`serious`,children:r}),a&&(0,qi.jsxs)(`div`,{className:`ars-review-field`,children:[(0,qi.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,qi.jsx)(`span`,{className:`font-semibold text-[13.5px]`,children:a.type}),(0,qi.jsxs)(j,{tone:a.confidence>=70?`good`:`warning`,children:[a.confidence,`% `,b(`confident`,`ai-rank-suite`)]})]}),a.why&&(0,qi.jsx)(`div`,{className:`t-caption`,children:a.why}),Object.keys(s).length===0?(0,qi.jsx)(M,{tone:`warning`,children:b(`The page did not contain enough facts to fill any field. Add the details to the page, or fill the schema by hand.`,`ai-rank-suite`)}):(0,qi.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:Object.entries(s).map(([e,t])=>(0,qi.jsxs)(`label`,{className:`grid gap-1 text-[12px]`,children:[(0,qi.jsx)(`span`,{className:`t-caption`,children:a.labels?.[e]||e}),(0,qi.jsx)(`input`,{type:`text`,value:t,onChange:t=>c({...s,[e]:t.target.value})})]},e))}),(0,qi.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,qi.jsx)(A,{onClick:()=>t&&t({type:a.type,data:s}),disabled:Object.keys(s).length===0,children:b(`Add to this page’s schema`,`ai-rank-suite`)}),(0,qi.jsx)(Ji,{r:a.receipt})]})]})]})}function Hi({postId:e,onServerEdit:t}){let{busy:n,error:r,run:i}=zi(),[a,o]=(0,Ki.useState)(null),[s,c]=(0,Ki.useState)(null),[l,u]=(0,Ki.useState)({}),[d,f]=(0,Ki.useState)(0);return(0,Ki.useEffect)(()=>{D.get(`/ai/alt/${e}`).then(e=>o(e.images||[])).catch(()=>o([]))},[e]),a===null?null:(0,qi.jsxs)(`div`,{className:`grid gap-3`,children:[(0,qi.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`One plain sentence per image that has none, from the page context and file name — written into the media library, so every page that uses the image gets it.`,`ai-rank-suite`)}),a.length===0&&!s?(0,qi.jsx)(M,{tone:`good`,children:d?`${d} ${b(`alt texts written.`,`ai-rank-suite`)}`:b(`Every media-library image on this page already has alt text.`,`ai-rank-suite`)}):(0,qi.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,qi.jsxs)(j,{tone:`warning`,children:[a.length,` `,b(`images without alt text`,`ai-rank-suite`)]}),(0,qi.jsxs)(A,{onClick:()=>i(`propose`,async()=>{let t=await D.post(`/ai/alt/${e}`,{});c(t),u(Object.fromEntries((t.alts||[]).map(e=>[e.id,e.alt])))}),busy:n===`propose`,children:[(0,qi.jsx)(Et,{size:13}),` `,b(`Write alt text`,`ai-rank-suite`)]})]}),r&&(0,qi.jsx)(M,{tone:`serious`,children:r}),s&&s.alts.length>0&&(0,qi.jsxs)(`div`,{className:`grid gap-2`,children:[s.alts.map(e=>(0,qi.jsxs)(`div`,{className:`ars-alt-row`,children:[(0,qi.jsx)(`img`,{src:e.url,alt:``}),(0,qi.jsxs)(`div`,{className:`grid gap-1 min-w-0`,children:[(0,qi.jsx)(`span`,{className:`t-caption truncate`,children:e.file}),(0,qi.jsx)(`input`,{type:`text`,value:l[e.id]||``,onChange:t=>u({...l,[e.id]:t.target.value}),maxLength:160}),(0,qi.jsxs)(`span`,{className:`t-caption`,children:[(l[e.id]||``).length,`/125 `,e.confidence<60?`· ${b(`low confidence — check`,`ai-rank-suite`)}`:``]})]})]},e.id)),(0,qi.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,qi.jsx)(A,{onClick:()=>i(`apply`,async()=>{let e=await D.post(`/ai/alt/apply`,{alts:Object.entries(l).map(([e,t])=>({id:Number(e),alt:t}))});t&&t(),f(e.applied||0),o([])}),busy:n===`apply`,children:b(`Save all to media library`,`ai-rank-suite`)}),(0,qi.jsx)(Ji,{r:s.receipt})]})]})]})}function Ui({postId:e,onServerEdit:t}){let{busy:n,error:r,run:i}=zi(),[a,o]=(0,Ki.useState)(null),[s,c]=(0,Ki.useState)({}),l=()=>i(`propose`,async()=>{o(await D.post(`/ai/links/${e}`,{})),c({})}),u=n=>i(`apply${n}`,async()=>{let r=a.links[n];await D.post(`/ai/links/${e}/apply`,{anchor:r.anchor,target_id:r.target_id}),t&&t(),c(e=>({...e,[n]:!0}))});return(0,qi.jsxs)(`div`,{className:`grid gap-3`,children:[(0,qi.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`The link module finds candidates locally; the AI reads this page and picks which of them a reader would actually want, with natural anchor text from a sentence already on the page. Same language only.`,`ai-rank-suite`)}),(0,qi.jsx)(`div`,{children:(0,qi.jsxs)(A,{onClick:l,busy:n===`propose`,children:[(0,qi.jsx)(Et,{size:13}),` `,b(a?`Propose again`:`Propose internal links`,`ai-rank-suite`)]})}),r&&(0,qi.jsx)(M,{tone:`serious`,children:r}),a&&a.links.length===0&&(0,qi.jsx)(M,{tone:`warning`,children:b(`None of the candidates fit this page well enough.`,`ai-rank-suite`)}),a&&a.links.map((e,t)=>(0,qi.jsxs)(`div`,{className:`ars-review-field`,children:[(0,qi.jsxs)(`div`,{className:`flex items-center justify-between gap-2 flex-wrap`,children:[(0,qi.jsxs)(`span`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,qi.jsxs)(`span`,{className:`font-semibold text-[13px]`,children:[`→ `,e.title]}),typeof e.confidence==`number`&&(0,qi.jsxs)(j,{tone:e.confidence>=70?`good`:`warning`,children:[e.confidence,`%`]}),!e.locatable&&(0,qi.jsx)(j,{tone:`warning`,children:b(`anchor not found verbatim`,`ai-rank-suite`)}),s[t]&&(0,qi.jsxs)(j,{tone:`good`,children:[`✓ `,b(`linked`,`ai-rank-suite`)]})]}),e.locatable&&!s[t]&&(0,qi.jsx)(A,{onClick:()=>u(t),busy:n===`apply${t}`,children:b(`Insert link`,`ai-rank-suite`)})]}),(0,qi.jsxs)(`div`,{className:`ars-review-orig`,children:[b(`Anchor`,`ai-rank-suite`),`: `,(0,qi.jsx)(`strong`,{children:e.anchor}),` — `,(0,qi.jsx)(`span`,{className:`t-caption`,children:e.passage})]}),e.reason&&(0,qi.jsx)(`div`,{className:`t-caption`,children:e.reason})]},t)),a&&(0,qi.jsx)(Ji,{r:a.receipt})]})}function Wi({postId:e,onUse:t}){let{busy:n,error:r,run:i}=zi(),[a,o]=(0,Ki.useState)(`de`),[s,c]=(0,Ki.useState)(null);return(0,qi.jsxs)(`div`,{className:`grid gap-3`,children:[(0,qi.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`Translate this page’s SEO title and description for its counterpart in another language, keeping brand words and length limits. Copy the result into the translated page.`,`ai-rank-suite`)}),(0,qi.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,qi.jsx)(`select`,{value:a,onChange:e=>o(e.target.value),children:[`en`,`de`,`ar`,`fr`,`es`,`it`,`nl`,`tr`,`ru`,`zh`,`ja`,`pt`].map(e=>(0,qi.jsx)(`option`,{value:e,children:e},e))}),(0,qi.jsxs)(A,{onClick:()=>i(`propose`,async()=>c(await D.post(`/ai/translate/${e}`,{to:a}))),busy:n===`propose`,children:[(0,qi.jsx)(Et,{size:13}),` `,b(`Translate metadata`,`ai-rank-suite`)]})]}),r&&(0,qi.jsx)(M,{tone:`serious`,children:r}),s&&(0,qi.jsxs)(`div`,{className:`ars-review-field`,dir:[`ar`,`he`,`fa`,`ur`].includes(s.to)?`rtl`:`ltr`,children:[(0,qi.jsxs)(`div`,{className:`t-overline`,children:[s.from,` → `,s.to]}),(0,qi.jsx)(`div`,{className:`font-semibold text-[13.5px]`,children:s.title}),(0,qi.jsx)(`div`,{className:`text-[12.5px]`,children:s.description}),(0,qi.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,dir:`ltr`,children:[(0,qi.jsx)(A,{variant:`ghost`,onClick:()=>navigator.clipboard&&navigator.clipboard.writeText(`${s.title}\n${s.description}`),children:b(`Copy`,`ai-rank-suite`)}),t&&(0,qi.jsx)(A,{variant:`ghost`,onClick:()=>t(s),children:b(`Use on this page`,`ai-rank-suite`)}),(0,qi.jsx)(Ji,{r:s.receipt})]})]})]})}function Gi({postId:e,onSchema:t,onTranslate:n,onServerEdit:r}){let[i,a]=(0,Ki.useState)(`rewrite`);return(0,qi.jsxs)(`div`,{className:`ars-review`,children:[(0,qi.jsxs)(`div`,{className:`ars-review-head`,children:[(0,qi.jsxs)(`span`,{className:`flex items-center gap-2 font-semibold text-[13px]`,children:[(0,qi.jsx)(Et,{size:14}),` `,b(`AI tools for this page`,`ai-rank-suite`)]}),(0,qi.jsx)(Je,{value:i,onChange:a,options:[{id:`rewrite`,label:b(`Rewrite`,`ai-rank-suite`)},{id:`schema`,label:b(`Schema`,`ai-rank-suite`)},{id:`alt`,label:b(`Alt text`,`ai-rank-suite`)},{id:`links`,label:b(`Links`,`ai-rank-suite`)},{id:`translate`,label:b(`Translate`,`ai-rank-suite`)}]})]}),i===`rewrite`&&(0,qi.jsx)(Bi,{postId:e,onServerEdit:r}),i===`schema`&&(0,qi.jsx)(Vi,{postId:e,onApply:t}),i===`alt`&&(0,qi.jsx)(Hi,{postId:e,onServerEdit:r}),i===`links`&&(0,qi.jsx)(Ui,{postId:e,onServerEdit:r}),i===`translate`&&(0,qi.jsx)(Wi,{postId:e,onUse:n})]})}var Ki,qi,Ji,Yi=o((()=>{Ki=u(f(),1),C(),O(),dt(),Vt(),qi=_e(),Ji=({r:e})=>e&&e.model?(0,qi.jsxs)(`span`,{className:`t-caption`,children:[e.provider,` · `,e.model,` · `,(e.prompt_tokens||0)+(e.completion_tokens||0),` `,b(`tokens`,`ai-rank-suite`),` · `,e.cost,` · `,e.latency_ms,` ms`]}):null})),Xi=c({default:()=>ta});function Zi({id:e,onClose:t,onChanged:n,onNavigate:r,position:i}){let[a,o]=(0,ia.useState)(null),[s,c]=(0,ia.useState)(!1),[l,u]=(0,ia.useState)(null),[d,f]=(0,ia.useState)(null),[p,m]=(0,ia.useState)(!1),[h,g]=(0,ia.useState)(null),[_,v]=(0,ia.useState)([]),[y,C]=(0,ia.useState)(!1),[w,T]=(0,ia.useState)(null),[E,ee]=(0,ia.useState)(!1),[te,ne]=(0,ia.useState)(`optimize`),[re,O]=(0,ia.useState)(!1),[ie,ae]=(0,ia.useState)(null),[oe,se]=(0,ia.useState)(null),ce=(0,ia.useRef)(null);(0,ia.useEffect)(()=>{o(null),v([]),T(null),ae(null),ne(`optimize`),D.get(`/content/${e}`).then(e=>{o(e),se(ca(e))}).catch(e=>g(e.message)),D.get(`/schema/post/${e}`).then(T).catch(()=>{}),D.get(`/content/${e}/head`).then(ae).catch(()=>{}),D.get(`/ai/faq/${e}`).then(e=>v(e.items||[])).catch(()=>{})},[e]);let le=oe!==null&&a!==null&&ca(a)!==oe,ue=()=>!le||window.confirm(b(`You have unsaved changes on this page. Leave without saving?`,`ai-rank-suite`)),de=()=>{ue()&&t()},fe=e=>{if(!r||!i)return;let t=i.index+e;t<0||t>=i.total||ue()&&r(t)};(0,ia.useEffect)(()=>{let e=e=>{if(e.key===`Escape`){de();return}e.altKey&&(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),fe(e.key===`ArrowDown`?1:-1))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[le,i?.index,i?.total]),(0,ia.useEffect)(()=>{ce.current&&(ce.current.scrollTop=0)},[te]);let pe=async()=>{u(`schema`),g(null);try{let t=await D.put(`/schema/post/${e}`,{items:w.items});T(t),ee(!0),setTimeout(()=>ee(!1),2200)}catch(e){g(e.message)}finally{u(null)}},me=async()=>{u(`title`),g(null);try{let t=((await D.post(`/ai/titles/${e}`)).titles||[])[0];t&&o(e=>({...e,seo_title:t}))}catch(e){g(e.message)}finally{u(null)}},he=async()=>{u(`desc`),g(null);try{let t=await D.post(`/ai/describe/${e}`);o(e=>({...e,seo_desc:t.meta_description}))}catch(e){g(e.message)}finally{u(null)}},ge=async t=>{let n=[`title_number`,`title_sentiment`,`title_power`,`kw_title_start`];u(t.id),g(null);try{if(n.includes(t.id)){let t=((await D.post(`/ai/titles/${e}`)).titles||[])[0];t&&(o(e=>({...e,seo_title:t})),ne(`optimize`));return}let r=await D.post(`/ai/improve/${e}`);f({check:t.id,suggestions:r.suggestions||r.improvements||[]})}catch(e){g(e.message)}finally{u(null)}},_e=async()=>{u(`faq`),g(null);try{let t=await D.post(`/ai/faq/${e}`);v(t.items||[])}catch(e){g(e.message)}finally{u(null)}},ve=async()=>{u(`faq-save`);try{await D.put(`/ai/faq/${e}`,{items:_}),C(!0),setTimeout(()=>C(!1),2200)}catch(e){g(e.message)}finally{u(null)}},ye=async t=>{o(e=>({...e,...t}));try{let t=await D.get(`/content/${e}`);o(t),se(ca(t)),n(t),D.get(`/content/${e}/head`).then(ae).catch(()=>{}),D.get(`/schema/post/${e}`).then(T).catch(()=>{})}catch{}},k=async e=>{c(!0),g(null);try{let t=await e();o(t),se(ca(t)),n(t)}catch(e){g(e.message)}finally{c(!1)}},be=()=>k(async()=>{let t=await D.put(`/content/${e}/meta`,{seo_title:a.seo_title,seo_desc:a.seo_desc,exclude:a.exclude,robots:a.robots||[],keywords:a.keywords||{},canonical:a.canonical||``,slug:a.slug||``,breadcrumb_title:a.breadcrumb_title||``,previews:a.previews||{},social:a.social||{}});return m(!0),setTimeout(()=>m(!1),2200),t});b(`GEO — AI readiness`,`ai-rank-suite`),b(`Focus keyword`,`ai-rank-suite`),b(`SEO — classic search`,`ai-rank-suite`);let xe=a?a.checks.filter(e=>e.status!==`pass`).length:0,Se=ie?ie.issues.filter(e=>e.level!==`info`).length:0,Ce=te===`schema`||te===`keywords`,we=[{id:`optimize`,label:b(`Optimize`,`ai-rank-suite`)},{id:`report`,label:b(`Full report`,`ai-rank-suite`)},{id:`preview`,label:b(`Preview`,`ai-rank-suite`)},{id:`head`,label:b(`Head`,`ai-rank-suite`),count:Se,tone:`quiet`},{id:`keywords`,label:b(`Keywords`,`ai-rank-suite`)},{id:`schema`,label:b(`Schema`,`ai-rank-suite`)},{id:`faq`,label:b(`FAQ`,`ai-rank-suite`),count:_.length||0,tone:`quiet`},{id:`advanced`,label:b(`Advanced`,`ai-rank-suite`)},{id:`checks`,label:b(`Checks`,`ai-rank-suite`),count:xe}];return(0,aa.createPortal)((0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`button`,{type:`button`,className:`ars-scrim`,"aria-label":b(`Close panel`,`ai-rank-suite`),onClick:de}),(0,I.jsx)(`aside`,{className:`ars-drawer${re?` is-max`:Ce?` is-wide`:``}`,role:`dialog`,"aria-modal":`true`,"aria-label":b(`Page analysis`,`ai-rank-suite`),children:a?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`header`,{className:`ars-sheet-head`,children:(0,I.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,I.jsxs)(`div`,{className:`min-w-0`,children:[(0,I.jsx)(`h2`,{className:`m-0 text-[15px] font-bold leading-snug truncate`,title:a.title,children:a.title}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mt-1 text-[11.5px] flex-wrap`,style:{color:`var(--ars-ink-3)`},children:[(0,I.jsx)(`span`,{className:`uppercase font-semibold`,children:a.type}),(0,I.jsx)(`span`,{children:`·`}),(0,I.jsx)(`span`,{children:S(x(`%s word`,`%s words`,Number(a.words)||0,`ai-rank-suite`),a.words)}),(0,I.jsx)(`span`,{children:`·`}),(0,I.jsxs)(`a`,{href:a.url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1`,children:[b(`View`,`ai-rank-suite`),(0,I.jsx)(wt,{size:11})]}),(0,I.jsx)(`a`,{href:a.edit_url,target:`_blank`,rel:`noreferrer`,children:b(`Edit`,`ai-rank-suite`)})]})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[i&&i.total>1&&(0,I.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,I.jsx)(`button`,{type:`button`,onClick:()=>fe(-1),disabled:i.index<=0,"aria-label":b(`Previous page`,`ai-rank-suite`),title:b(`Previous page (Alt+↑)`,`ai-rank-suite`),className:`ars-move`,children:`↑`}),(0,I.jsxs)(`span`,{className:`text-[11px] tabular-nums`,style:{color:`var(--ars-ink-3)`},children:[i.index+1,`/`,i.total]}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>fe(1),disabled:i.index>=i.total-1,"aria-label":b(`Next page`,`ai-rank-suite`),title:b(`Next page (Alt+↓)`,`ai-rank-suite`),className:`ars-move`,children:`↓`})]}),le&&(0,I.jsx)(`span`,{className:`ars-tag`,style:{background:`var(--ars-c-yellow)`,color:`var(--ars-c-yellow-ink)`},title:b(`You have changes that are not saved yet`,`ai-rank-suite`),children:b(`Unsaved`,`ai-rank-suite`)}),(0,I.jsx)($i,{label:b(`GEO`,`ai-rank-suite`),value:a.geo_score}),(0,I.jsx)($i,{label:b(`SEO`,`ai-rank-suite`),value:a.seo_score}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>O(!re),"aria-label":b(re?`Restore panel width`:`Expand panel`,`ai-rank-suite`),title:b(re?`Restore width`:`Expand to full width`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer p-1`,style:{color:`var(--ars-ink-3)`,fontSize:13,lineHeight:1},children:re?`⤡`:`⤢`}),(0,I.jsx)(`button`,{type:`button`,onClick:de,"aria-label":b(`Close`,`ai-rank-suite`),title:b(`Close (Esc)`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer p-1`,style:{color:`var(--ars-ink-3)`},children:(0,I.jsx)(Rt,{size:17})})]})]})}),(0,I.jsx)(`div`,{className:`ars-sheet-tabs`,role:`tablist`,children:we.map(e=>(0,I.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":te===e.id,className:`ars-sheet-tab`,onClick:()=>ne(e.id),children:[e.label,e.count>0&&(0,I.jsx)(`span`,{className:`ars-pip`,style:e.tone===`quiet`?{background:`var(--ars-surface-3, #eceff3)`,color:`var(--ars-ink-2)`}:void 0,children:e.count})]},e.id))}),(0,I.jsxs)(`div`,{className:`ars-sheet-body`,ref:ce,children:[(0,I.jsxs)(`div`,{className:`ars-sheet-main`,children:[te===`optimize`&&(0,I.jsxs)(`div`,{className:`grid gap-4`,children:[(0,I.jsx)(Fi,{postId:e,onApplied:ye}),(0,I.jsx)(Gi,{postId:e,onSchema:e=>{T(t=>({...t||{},items:[...t&&t.items||[],e]})),ne(`schema`)},onTranslate:e=>o(t=>({...t,seo_title:e.title,seo_desc:e.description})),onServerEdit:()=>ye({})}),(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between gap-2 mb-1`,children:[(0,I.jsx)(`label`,{className:`block font-medium`,children:b(`SEO title`,`ai-rank-suite`)}),oa&&(0,I.jsxs)(A,{variant:`ghost`,busy:l===`title`,onClick:me,children:[(0,I.jsx)(Et,{size:13}),b(`Write with AI`,`ai-rank-suite`)]})]}),(0,I.jsx)(`input`,{type:`text`,value:a.seo_title,placeholder:a.title,onChange:e=>o({...a,seo_title:e.target.value})}),(0,I.jsx)(`div`,{className:`mt-1.5`,children:(0,I.jsx)(He,{value:a.seo_title||a.title,kind:`title`})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between gap-2 mb-1`,children:[(0,I.jsx)(`label`,{className:`block font-medium`,children:b(`Meta description`,`ai-rank-suite`)}),oa&&(0,I.jsxs)(A,{variant:`ghost`,busy:l===`desc`,onClick:he,children:[(0,I.jsx)(Et,{size:13}),b(`Write with AI`,`ai-rank-suite`)]})]}),(0,I.jsx)(`textarea`,{rows:3,value:a.seo_desc,placeholder:a.excerpt||b(`Describe this page in one or two sentences…`,`ai-rank-suite`),onChange:e=>o({...a,seo_desc:e.target.value})}),(0,I.jsx)(`div`,{className:`mt-1.5`,children:(0,I.jsx)(He,{value:a.seo_desc||a.excerpt,kind:`description`})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block font-medium mb-1.5`,children:b(`Search engine visibility`,`ai-rank-suite`)}),(0,I.jsx)(`div`,{className:`flex flex-wrap gap-3 text-[12.5px]`,children:[`noindex`,`nofollow`,`noarchive`,`nosnippet`,`noimageindex`].map(e=>(0,I.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,I.jsx)(`input`,{type:`checkbox`,checked:(a.robots||[]).includes(e),onChange:t=>o({...a,robots:t.target.checked?[...a.robots||[],e]:(a.robots||[]).filter(t=>t!==e)})}),e]},e))})]}),(0,I.jsx)(Me,{checked:!a.exclude,onChange:e=>o({...a,exclude:!e}),label:b(`Include in llms.txt`,`ai-rank-suite`)}),xe>0&&(0,I.jsx)(`button`,{type:`button`,onClick:()=>ne(`checks`),className:`text-left px-3 py-2 cursor-pointer`,style:{border:`1px solid var(--ars-border)`,borderRadius:`var(--ars-r-sm)`,background:`var(--ars-c-yellow)`,color:`var(--ars-c-yellow-ink)`,fontSize:12.5,fontWeight:600},children:S(x(`%d check needs attention → open Checks`,`%d checks need attention → open Checks`,xe,`ai-rank-suite`),xe)})]}),te===`preview`&&(0,I.jsxs)(`div`,{className:`grid gap-3`,children:[(0,I.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`How this page appears in search results and when it is shared.`,`ai-rank-suite`)}),(0,I.jsx)(ci,{serp:a.serp,card:a.social_card})]}),te===`keywords`&&(0,I.jsxs)(`div`,{className:`grid gap-3`,children:[(0,I.jsxs)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:[`Up to `,a.max_keywords||100,` per group — short-tail, long-tail and the prompts people ask AI.`]}),(0,I.jsx)(Yr,{keywords:a.keywords,coverage:a.coverage,max:a.max_keywords||100,postId:a.id,onChange:e=>o({...a,keywords:e})})]}),te===`schema`&&(w?(0,I.jsxs)(`div`,{className:`grid gap-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between gap-2 flex-wrap`,children:[(0,I.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Add as many types as the page needs — validated against Google’s requirements.`,`ai-rank-suite`)}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[E&&(0,I.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,I.jsx)(A,{variant:`ghost`,busy:l===`schema`,onClick:pe,children:b(`Save schema`,`ai-rank-suite`)})]})]}),(0,I.jsx)(Br,{data:w,onChange:e=>T({...w,items:e})})]}):(0,I.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Loading structured data…`,`ai-rank-suite`)})),te===`faq`&&(0,I.jsxs)(`div`,{className:`grid gap-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between gap-2 flex-wrap`,children:[(0,I.jsxs)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:[b(`Grounded Q&A — feeds FAQPage schema and the`,`ai-rank-suite`),` `,(0,I.jsx)(`code`,{className:`ars-mono`,children:`[airanksuite_faq]`}),` `,b(`shortcode.`,`ai-rank-suite`)]}),(0,I.jsxs)(A,{variant:`ghost`,busy:l===`faq`,onClick:_e,children:[(0,I.jsx)(Et,{size:13}),b(`Generate`,`ai-rank-suite`)]})]}),_.length===0?(0,I.jsxs)(`div`,{className:`grid gap-2 place-items-start`,children:[(0,I.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`No FAQ items yet. Generate them from this page’s content (requires an AI key), or write one yourself.`,`ai-rank-suite`)}),(0,I.jsx)(A,{variant:`ghost`,onClick:()=>v([{question:``,answer:``}]),children:b(`Add a question`,`ai-rank-suite`)})]}):(0,I.jsxs)(`div`,{className:`grid gap-3`,children:[_.map((e,t)=>(0,I.jsxs)(`div`,{className:`grid gap-1.5 p-3`,style:{background:`var(--ars-surface-2)`,borderRadius:`var(--ars-r-sm)`},children:[(0,I.jsx)(`input`,{type:`text`,value:e.question,onChange:e=>v(_.map((n,r)=>t===r?{...n,question:e.target.value}:n))}),(0,I.jsx)(`textarea`,{rows:2,value:e.answer,onChange:e=>v(_.map((n,r)=>t===r?{...n,answer:e.target.value}:n))}),(0,I.jsx)(`div`,{children:(0,I.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent cursor-pointer text-[12px] p-0`,style:{color:`var(--ars-serious)`},onClick:()=>v(_.filter((e,n)=>n!==t)),children:b(`Remove`,`ai-rank-suite`)})})]},t)),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,I.jsx)(A,{onClick:ve,busy:l===`faq-save`,children:b(`Save FAQ`,`ai-rank-suite`)}),(0,I.jsx)(A,{variant:`ghost`,onClick:()=>v([..._,{question:``,answer:``}]),children:b(`Add a question`,`ai-rank-suite`)}),y&&(0,I.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]})]})]})]}),te===`report`&&(0,I.jsx)(ki,{postId:e,onGoTo:ne}),te===`head`&&(0,I.jsx)(Ci,{postId:e,initial:ie,onLoad:ae,onGoTo:ne}),te===`advanced`&&(0,I.jsxs)(`div`,{className:`grid gap-3`,children:[(0,I.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Canonical, breadcrumb label, Google preview limits and social overrides.`,`ai-rank-suite`)}),(0,I.jsx)(fi,{item:a,onChange:e=>o({...a,...e})})]}),te===`optimize`&&(0,I.jsx)(`p`,{className:`m-0 mt-1 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Permalink, canonical URL, breadcrumb title and social overrides are under Advanced.`,`ai-rank-suite`)}),te===`checks`&&d&&(0,I.jsxs)(`div`,{className:`ars-r-sm p-3 mb-2`,style:{background:`var(--ars-brand-tonal)`,color:`var(--ars-brand-tonal-ink)`},children:[(0,I.jsx)(`div`,{className:`font-semibold text-[12.5px] mb-1`,children:b(`Suggestions`,`ai-rank-suite`)}),(()=>{let e=(d.suggestions||[]).map(e=>typeof e==`string`?{title:e,detail:``}:{title:e.title||e.text||e.suggestion||``,detail:e.detail||e.description||``}).filter(e=>e.title||e.detail);return e.length===0?(0,I.jsx)(`p`,{className:`m-0 text-[12.5px]`,children:b(`The model had nothing to add for this one.`,`ai-rank-suite`)}):(0,I.jsx)(`ol`,{className:`m-0 pl-4 grid gap-2 text-[12.5px]`,children:e.map((e,t)=>(0,I.jsxs)(`li`,{children:[e.title&&(0,I.jsx)(`strong`,{children:e.title}),e.title&&e.detail?(0,I.jsx)(`br`,{}):null,e.detail]},t))})})()]}),te===`checks`&&(0,I.jsx)(vi,{checks:a.checks,sections:a.sections,fixing:l,onFix:ge})]}),(0,I.jsxs)(`aside`,{className:`ars-sheet-rail`,children:[(0,I.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,I.jsx)(`div`,{className:`t-overline`,children:b(`This page`,`ai-rank-suite`)}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(Fe,{value:a.geo_score}),a.stale&&(0,I.jsx)(`span`,{className:`t-caption`,title:b(`This page changed after it was last scored — run the analyzer to refresh it.`,`ai-rank-suite`),children:`·\xA0stale`}),(0,I.jsx)(`span`,{className:`t-caption`,children:b(`GEO`,`ai-rank-suite`)}),(0,I.jsx)(Fe,{value:a.seo_score}),(0,I.jsx)(`span`,{className:`t-caption`,children:b(`SEO`,`ai-rank-suite`)})]}),(0,I.jsx)(`div`,{className:`t-caption`,children:S(x(`%1$s words · %2$s open check`,`%1$s words · %2$s open checks`,xe,`ai-rank-suite`),Number(a.words||0).toLocaleString(),Number(xe).toLocaleString())}),a.readability?.sentences>0&&(0,I.jsxs)(`div`,{className:`grid gap-1 mt-1`,children:[(0,I.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,I.jsx)(`span`,{className:`t-caption`,children:b(`Readability`,`ai-rank-suite`)}),(0,I.jsx)(`span`,{className:`t-caption`,children:S(b(`%1$d / 100 · %2$s`,`ai-rank-suite`),a.readability.flesch,a.readability.label)})]}),(0,I.jsx)(Be,{value:Math.max(2,Math.min(100,a.readability.flesch)),color:a.readability.flesch>=60?`var(--ars-good)`:a.readability.flesch>=30?`var(--ars-warning)`:`var(--ars-serious)`}),(0,I.jsx)(`span`,{className:`t-caption`,children:S(b(`%1$s words a sentence · %2$d%% passive`,`ai-rank-suite`),a.readability.words_per_sentence,a.readability.passive_share)})]})]}),(0,I.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,I.jsx)(`div`,{className:`t-overline`,children:b(`Live preview`,`ai-rank-suite`)}),(0,I.jsx)(ci,{serp:{...a.serp,title:Qi(a.seo_title,a.serp?.title),desc:Qi(a.seo_desc,a.serp?.desc)},card:a.social_card,brand:a.serp?.site})]}),xe>0&&(0,I.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,I.jsx)(`div`,{className:`t-overline`,children:b(`Next to fix`,`ai-rank-suite`)}),(0,I.jsx)(`ul`,{className:`m-0 p-0 list-none grid gap-1`,children:a.checks.filter(e=>e.status!==`pass`).slice(0,4).map(e=>(0,I.jsxs)(`li`,{className:`text-[12px] flex gap-2 items-start px-2 py-1.5 ars-r-xs`,style:{background:`var(--ars-surface-2)`,color:`var(--ars-ink-2)`},children:[(0,I.jsx)(`span`,{"aria-hidden":!0,style:{color:e.status===`fail`?`var(--ars-serious)`:`var(--ars-warning)`,fontWeight:700},children:e.status===`fail`?`✕`:`!`}),(0,I.jsx)(`span`,{children:e.label})]},e.id))}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>ne(`checks`),className:`border-0 bg-transparent cursor-pointer p-0 text-[12px] font-semibold text-left`,style:{color:`var(--ars-brand)`},children:S(b(`All %s checks →`,`ai-rank-suite`),xe)})]})]})]}),(0,I.jsxs)(`footer`,{className:`ars-sheet-foot`,children:[(0,I.jsx)(A,{onClick:be,busy:s,disabled:!le&&!s,children:b(le?`Save & re-analyze`:`Saved`,`ai-rank-suite`)}),(0,I.jsxs)(A,{variant:`ghost`,busy:s,onClick:()=>k(()=>D.post(`/content/${e}/analyze`)),children:[(0,I.jsx)(Tt,{size:13}),b(`Re-analyze`,`ai-rank-suite`)]}),p&&(0,I.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),h&&(0,I.jsx)(`span`,{className:`text-[12px]`,style:{color:`var(--ars-serious)`},children:h}),(0,I.jsx)(`span`,{className:`ml-auto text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:i&&i.total>1?b(`Alt+↑ / Alt+↓ to move · Esc to close`,`ai-rank-suite`):b(`Esc to close`,`ai-rank-suite`)})]})]}):(0,I.jsx)(`div`,{className:`p-6`,style:{gridRow:`1 / -1`},children:h||`Loading…`})})]}),document.getElementById(`airanksuite-root`)||document.body)}function Qi(e,t){let n=(e||``).trim();return n?/%[a-z_]+%/i.test(n)&&t||n:t}function $i({label:e,value:t}){if(t==null)return(0,I.jsxs)(`span`,{className:`ars-scorechip`,style:{background:`var(--ars-surface-3)`,color:`var(--ars-ink-3)`},title:`${e} — not analysed yet`,children:[e,` `,(0,I.jsx)(`b`,{children:`—`})]});let n=t>=80?`green`:t>=50?`yellow`:`red`;return(0,I.jsxs)(`span`,{className:`ars-scorechip`,style:{background:`var(--ars-c-${n})`,color:`var(--ars-c-${n}-ink)`},title:`${e} score`,children:[e,` `,(0,I.jsx)(`b`,{children:t})]})}function ea({id:e,label:t,sort:n,onSort:r,align:i=`left`,width:a=`narrow`}){let o=n.by===e;return(0,I.jsx)(`th`,{className:i===`right`?`is-num is-${a}`:``,children:(0,I.jsxs)(`button`,{type:`button`,onClick:()=>r(e),className:`border-0 bg-transparent cursor-pointer p-0 font-medium inline-flex items-center gap-1`,style:{color:o?`var(--ars-brand)`:`inherit`,font:`inherit`},children:[t,(0,I.jsx)(`span`,{"aria-hidden":!0,style:{opacity:o?1:.25},children:o&&n.dir===`asc`?`▲`:`▼`})]})})}function ta(){let e=()=>{let e=/#\/content\/(\d+)/.exec(window.location.hash||``);return e?Number(e[1]):null},t=(()=>{let e=new URLSearchParams(window.location.hash.split(`?`)[1]||``);return{filter:e.get(`filter`)||``,type:e.get(`type`)||`any`,status:e.get(`status`)||``,search:e.get(`q`)||``,perPage:[20,50,100].includes(Number(e.get(`per_page`)))?Number(e.get(`per_page`)):20}})(),[n,r]=(0,ia.useState)(null),[i,a]=(0,ia.useState)(t.perPage),[o,s]=(0,ia.useState)(()=>new Set),[c,l]=(0,ia.useState)(``),[u,d]=(0,ia.useState)({total:0,pages:1}),[f,p]=(0,ia.useState)(1),[m,h]=(0,ia.useState)(t.search),[g,_]=(0,ia.useState)(t.filter),[v,y]=(0,ia.useState)(t.type),[x,C]=(0,ia.useState)(``),[w,T]=(0,ia.useState)([]),[E,ee]=(0,ia.useState)(null),[te,O]=(0,ia.useState)({tax:``,term:``}),[ie,ae]=(0,ia.useState)(t.status),[oe,se]=(0,ia.useState)({by:`modified`,dir:`desc`}),[ce,le]=(0,ia.useState)(e);(0,ia.useEffect)(()=>{let t=()=>{let t=e();t&&le(t)};return window.addEventListener(`hashchange`,t),()=>window.removeEventListener(`hashchange`,t)},[]);let[ue,de]=(0,ia.useState)(!1),[fe,pe]=(0,ia.useState)(null),[me,he]=(0,ia.useState)(null),[ge,_e]=(0,ia.useState)(0),ve=async e=>{if(o.size!==0){l(e),pe(null);try{await D.post(`/bulk/start`,{action:e,scope:`ids`,ids:[...o]}),window.location.hash=`/content/bulk`}catch(e){pe(e.message)}finally{l(``)}}},ye=async()=>{l(`describe-all`),pe(null);try{await D.post(`/bulk/start`,{action:`describe`,scope:`missing`}),window.location.hash=`/content/bulk`}catch(e){pe(e.message)}finally{l(``)}},be=async()=>{if(sa){l(`site`),pe(null);try{await D.post(`/bulk/start`,{action:`analyze`,scope:`missing`}),window.location.hash=`/content/bulk`}catch(e){pe(e.message)}finally{l(``)}return}l(`site`),pe(null);let e=new Set,t=0;try{for(;;){let n=await D.get(`/content?type=any&filter=unscored&per_page=50&page=1`);if(!Array.isArray(n)||n.length===0)break;let r=n.filter(t=>!e.has(t.id));if(r.length===0)break;for(let n of r)e.add(n.id),await D.post(`/content/${n.id}/analyze`),t+=1,_e(t)}let n=await D.get(`/content/library`);ee(n.types||[]),we(f,m,g,v,oe,x,te,ie,i)}catch(e){pe(e.message)}finally{l(``),_e(0)}},xe=e=>s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),Se=e=>s(t=>{let n=new Set(t),r=e.every(e=>n.has(e.id));return e.forEach(e=>r?n.delete(e.id):n.add(e.id)),n}),Ce=async(e,t)=>{he(e);try{for(let e of t)try{let t=await D.post(`/content/${e.id}/analyze`);r(n=>n.map(n=>n.id===e.id?{...n,...t}:n))}catch(e){pe(e.message)}D.get(`/content/library`).then(e=>ee(e.types||[])).catch(()=>{})}finally{he(null)}},we=(0,ia.useCallback)(async(e,t,n,i,a,o=``,s={tax:``,term:``},c=``,l=20)=>{de(!0);try{let u=new URLSearchParams({page:String(e),per_page:String(l),search:t,filter:n,type:i,orderby:a.by,order:a.dir,lang:o,tax:s.tax||``,term:s.term||``,status:c||``}),f=await fetch(`${window.airanksuiteData.restUrl}/content?${u}`,{headers:{"X-WP-Nonce":window.airanksuiteData.nonce},credentials:`same-origin`});if(!f.ok)throw Error(`Request failed (${f.status})`);d({total:Number(f.headers.get(`X-WP-Total`)),pages:Number(f.headers.get(`X-WP-TotalPages`))}),r(await f.json()),pe(null)}catch(e){pe(e.message)}finally{de(!1)}},[]);(0,ia.useEffect)(()=>{we(f,m,g,v,oe,x,te,ie,i),s(new Set);let e=new URLSearchParams;g&&e.set(`filter`,g),v!==`any`&&e.set(`type`,v),ie&&e.set(`status`,ie),m&&e.set(`q`,m),i!==20&&e.set(`per_page`,String(i));let t=window.location.hash.split(`?`)[0]||`#/content`;if(/^#\/content(\/|$|\?)/.test(t)&&!/#\/content\/\d+/.test(t)){let n=e.toString()?`${t}?${e}`:t;window.location.hash!==n&&window.history.replaceState(null,``,n)}},[f,g,v,oe,x,te,ie,i,we]),(0,ia.useEffect)(()=>{re(`insights`)&&D.get(`/insights?days=7`).then(e=>T(e.post_types||[])).catch(()=>{}),D.get(`/content/library`).then(e=>ee(e.types||[])).catch(()=>{})},[]);let Te=e=>{y(e),O({tax:``,term:``}),p(1)},Ee=(()=>{let e=(E||[]).find(e=>e.name===v);if(e)return e;if(v!==`any`||!E||E.length===0)return null;let t=E.filter(e=>e.total>0);if(t.length===0)return null;let n=e=>t.reduce((t,n)=>t+(n[e]||0),0),r=e=>{let n=t.filter(t=>t[e]!==null&&t[e]!==void 0),r=n.reduce((e,t)=>e+t.total,0);return r?Math.round(n.reduce((t,n)=>t+n[e]*n.total,0)/r):null};return{name:`any`,label:b(`Everything`,`ai-rank-suite`),total:n(`total`),published:n(`published`),drafts:n(`drafts`),no_desc:n(`no_desc`),no_keyword:n(`no_keyword`),weak_geo:n(`weak_geo`),noindex:n(`noindex`),unanalyzed:n(`unanalyzed`),avg_geo:r(`avg_geo`),avg_seo:r(`avg_seo`)}})(),De=e=>{p(1),se(t=>t.by===e?{by:e,dir:t.dir===`asc`?`desc`:`asc`}:{by:e,dir:e===`title`?`asc`:`desc`})},Oe=ne.i18n||{multilingual:!1,perPost:!1,languages:[]},ke=g!==``||v!==`any`||m!==``||x!==``||te.term!==``||ie!==``,Ae=()=>{_(``),y(`any`),C(``),h(``),O({tax:``,term:``}),ae(``),se({by:`modified`,dir:`desc`}),p(1)};return(0,I.jsxs)(`div`,{className:`ars-page`,children:[E&&E.filter(e=>e.total>0).length>1&&(0,I.jsx)(na,{library:E,value:v,onChange:Te}),Ee&&(0,I.jsx)(ra,{type:Ee,filter:g,onFilter:e=>{_(g===e?``:e),p(1)},onScoreAll:be,onDescribeAll:ye,busy:c,scoreDone:ge}),o.size>0&&(0,I.jsxs)(`div`,{className:`ars-selbar`,children:[(0,I.jsxs)(`span`,{className:`font-semibold text-[13px]`,children:[o.size,` selected`]}),(0,I.jsxs)(`span`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,I.jsx)(A,{variant:`tonal`,busy:c===`analyze`||me===`selection`,onClick:()=>sa?ve(`analyze`):Ce(`selection`,n.filter(e=>o.has(e.id))),children:b(`Score`,`ai-rank-suite`)}),oa&&sa&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(A,{variant:`tonal`,busy:c===`describe`,onClick:()=>ve(`describe`),title:b(`AI writes a meta description for each selected page`,`ai-rank-suite`),children:b(`Write descriptions (AI)`,`ai-rank-suite`)}),(0,I.jsx)(A,{variant:`tonal`,busy:c===`faq`,onClick:()=>ve(`faq`),title:b(`AI generates FAQs for each selected page`,`ai-rank-suite`),children:b(`Generate FAQs (AI)`,`ai-rank-suite`)})]}),(0,I.jsx)(A,{variant:`ghost`,onClick:()=>s(new Set),children:b(`Clear`,`ai-rank-suite`)})]}),(0,I.jsx)(`span`,{className:`t-caption`,children:b(`Runs on the Bulk tab, where you can watch it and undo it.`,`ai-rank-suite`)})]}),(0,I.jsxs)(Ke,{children:[(0,I.jsx)(`div`,{className:`w-full flex flex-wrap items-center gap-3`,children:(0,I.jsx)(qe,{options:la,value:g,onChange:e=>{_(e),p(1)},label:b(`Show`,`ai-rank-suite`)})}),(0,I.jsxs)(`div`,{className:`w-full flex flex-wrap items-center gap-3`,children:[Oe.multilingual&&!Oe.perPost&&(0,I.jsx)(`a`,{href:`#/content/urls`,className:`ars-btn ars-btn-ghost`,title:b(`This site translates by URL, not by post. The filter here selects posts that have a page in that language; the per-language scores live under URLs & languages.`,`ai-rank-suite`),children:S(b(`%d languages → URLs`,`ai-rank-suite`),Oe.languages.length)}),Oe.multilingual&&(Oe.perPost||Oe.urlLangs)&&(0,I.jsxs)(`select`,{value:x,onChange:e=>{C(e.target.value),p(1)},style:{minWidth:`10rem`},"aria-label":b(`Language`,`ai-rank-suite`),children:[(0,I.jsx)(`option`,{value:``,children:b(`All languages`,`ai-rank-suite`)}),Oe.languages.map(e=>(0,I.jsx)(`option`,{value:e.code,children:e.label},e.code))]}),w.length>1&&!E&&(0,I.jsxs)(`select`,{value:v,onChange:e=>Te(e.target.value),style:{minWidth:`10.5rem`},"aria-label":b(`Content type`,`ai-rank-suite`),children:[(0,I.jsx)(`option`,{value:`any`,children:b(`All types`,`ai-rank-suite`)}),w.map(e=>(0,I.jsx)(`option`,{value:e.name,children:e.label},e.name))]}),(Ee?.taxonomies||[]).map(e=>(0,I.jsxs)(`select`,{value:te.tax===e.name?te.term:``,onChange:t=>{O(t.target.value?{tax:e.name,term:t.target.value}:{tax:``,term:``}),p(1)},style:{minWidth:`10.5rem`,maxWidth:260},"aria-label":e.label,children:[(0,I.jsxs)(`option`,{value:``,children:[`All `,e.label]}),e.terms.map(e=>(0,I.jsxs)(`option`,{value:e.slug,children:[e.name,` (`,e.count,`)`]},e.slug))]},e.name)),Ee&&Ee.drafts>0&&(0,I.jsxs)(`select`,{value:ie,onChange:e=>{ae(e.target.value),p(1)},style:{minWidth:`11rem`},"aria-label":b(`Status`,`ai-rank-suite`),children:[(0,I.jsx)(`option`,{value:``,children:b(`Any status`,`ai-rank-suite`)}),(0,I.jsx)(`option`,{value:`publish`,children:b(`Published`,`ai-rank-suite`)}),(0,I.jsx)(`option`,{value:`draft`,children:b(`Drafts`,`ai-rank-suite`)}),(0,I.jsx)(`option`,{value:`pending`,children:b(`Pending`,`ai-rank-suite`)}),(0,I.jsx)(`option`,{value:`future`,children:b(`Scheduled`,`ai-rank-suite`)}),(0,I.jsx)(`option`,{value:`private`,children:b(`Private`,`ai-rank-suite`)})]}),(0,I.jsx)(`form`,{className:`ml-auto`,onSubmit:e=>{e.preventDefault(),p(1),we(1,m,g,v,oe,x,te,ie)},children:(0,I.jsx)(`input`,{type:`text`,placeholder:b(`Search pages…`,`ai-rank-suite`),value:m,onChange:e=>h(e.target.value),style:{width:220},"aria-label":b(`Search pages`,`ai-rank-suite`)})}),ke&&(0,I.jsx)(A,{variant:`ghost`,onClick:Ae,children:b(`Clear`,`ai-rank-suite`)})]})]}),fe&&(0,I.jsx)(k,{title:b(`Content analysis`,`ai-rank-suite`),children:(0,I.jsx)(`p`,{className:`m-0`,style:{color:`var(--ars-serious)`},children:fe})}),!n&&!fe&&(0,I.jsx)(k,{title:b(`Content analysis`,`ai-rank-suite`),children:(0,I.jsx)(`p`,{className:`m-0`,style:{color:`var(--ars-ink-2)`},children:b(`Analyzing content…`,`ai-rank-suite`)})}),n&&n.length===0&&(0,I.jsx)(k,{title:b(`Content analysis`,`ai-rank-suite`),children:(0,I.jsxs)(`div`,{className:`ars-r-lg px-4 py-5 grid gap-2 place-items-start`,style:{background:`var(--ars-surface-2)`},children:[(0,I.jsx)(`div`,{className:`font-medium text-[13px]`,children:b(`Nothing matches this filter`,`ai-rank-suite`)}),(0,I.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(g===``?`No published content found.`:`That is good news — no page has this problem.`,`ai-rank-suite`)}),ke&&(0,I.jsx)(A,{variant:`tonal`,onClick:Ae,children:b(`Show all pages`,`ai-rank-suite`)})]})}),n&&n.length>0&&(()=>{let e=e=>{let t=(E||[]).find(t=>t.name===e);return t?t.label:e},t=new Map;n.forEach(e=>{t.has(e.type)||t.set(e.type,[]),t.get(e.type).push(e)});let r=(E||[]).map(e=>e.name);return t.forEach((e,t)=>{r.includes(t)||r.push(t)}),r.map(n=>{let r=t.get(n)||[],i=(E||[]).find(e=>e.name===n);if(r.length===0)return(0,I.jsxs)(`div`,{className:`ars-typeempty`,children:[(0,I.jsx)(`b`,{children:e(n)}),(0,I.jsx)(`span`,{children:i&&i.total>0?S(b(`none of its %s items on this page of results`,`ai-rank-suite`),i.total.toLocaleString()):b(`nothing published in this type yet`,`ai-rank-suite`)})]},n);let a=r.filter(e=>e.geo_score===null||e.geo_score===void 0);return(0,I.jsx)(k,{title:e(n),subtitle:b(`Scored for AI readiness (GEO) and classic search (SEO) — click a row to fix it. The three letters before each title show whether it has an SEO title, a meta description and a focus keyword: green means set, grey means missing.`,`ai-rank-suite`),action:(0,I.jsxs)(`span`,{className:`flex items-center gap-2`,children:[a.length>0&&!ue&&(0,I.jsx)(A,{variant:`tonal`,busy:me===n,onClick:()=>Ce(n,a),title:b(`Runs the local analyzer on the unscored rows in view — free, no AI call`,`ai-rank-suite`),children:S(b(`Score %s unscored`,`ai-rank-suite`),a.length)}),!ue&&i&&i.total>r.length&&v===`any`&&(0,I.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>Te(n),children:S(b(`Show all %s`,`ai-rank-suite`),i.total.toLocaleString())}),(0,I.jsx)(`span`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:ue?b(`Loading…`,`ai-rank-suite`):S(b(`%1$s of %2$s`,`ai-rank-suite`),r.length.toLocaleString(),(i?i.total:r.length).toLocaleString())})]}),flush:!0,children:(0,I.jsx)(`div`,{className:`ars-table-wrap`,children:(0,I.jsxs)(`table`,{className:`ars-table`,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`th`,{style:{width:34},children:(0,I.jsx)(`input`,{type:`checkbox`,"aria-label":b(`Select all in view`,`ai-rank-suite`),checked:r.length>0&&r.every(e=>o.has(e.id)),onChange:()=>Se(r)})}),(0,I.jsx)(ea,{id:`title`,label:e(n),sort:oe,onSort:De}),Oe.multilingual&&Oe.perPost&&(0,I.jsx)(`th`,{className:`is-narrow`,children:b(`Lang`,`ai-rank-suite`)}),(0,I.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Words`,`ai-rank-suite`)}),(0,I.jsx)(ea,{id:`geo`,label:b(`GEO`,`ai-rank-suite`),sort:oe,onSort:De,align:`right`}),(0,I.jsx)(ea,{id:`seo`,label:b(`SEO`,`ai-rank-suite`),sort:oe,onSort:De,align:`right`}),(0,I.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Issues`,`ai-rank-suite`)}),(0,I.jsx)(ea,{id:`modified`,label:b(`Updated`,`ai-rank-suite`),sort:oe,onSort:De,align:`right`,width:`mid`})]})}),(0,I.jsx)(`tbody`,{children:r.map(e=>(0,I.jsxs)(`tr`,{onClick:()=>le(e.id),style:{cursor:`pointer`},className:o.has(e.id)?`is-selected`:``,children:[(0,I.jsx)(`td`,{onClick:e=>e.stopPropagation(),style:{width:34},children:(0,I.jsx)(`input`,{type:`checkbox`,"aria-label":`Select ${e.title}`,checked:o.has(e.id),onChange:()=>xe(e.id)})}),(0,I.jsx)(`td`,{className:`font-medium`,style:{maxWidth:420},children:(0,I.jsxs)(`span`,{className:`inline-flex items-center gap-2 max-w-full`,children:[(0,I.jsxs)(`span`,{className:`ars-signals`,"aria-label":S(b(`SEO title %1$s, meta description %2$s, focus keyword %3$s`,`ai-rank-suite`),e.has_title?b(`set`,`ai-rank-suite`):b(`missing`,`ai-rank-suite`),e.has_desc?b(`set`,`ai-rank-suite`):b(`missing`,`ai-rank-suite`),e.has_keyword?b(`set`,`ai-rank-suite`):b(`missing`,`ai-rank-suite`)),children:[(0,I.jsx)(`i`,{className:e.has_title?`is-on`:``,title:e.has_title?b(`SEO title: set`,`ai-rank-suite`):b(`SEO title: missing`,`ai-rank-suite`),children:b(`T`,`ai-rank-suite`)}),(0,I.jsx)(`i`,{className:e.has_desc?`is-on`:``,title:e.has_desc?b(`Meta description: set`,`ai-rank-suite`):b(`Meta description: missing`,`ai-rank-suite`),children:b(`D`,`ai-rank-suite`)}),(0,I.jsx)(`i`,{className:e.has_keyword?`is-on`:``,title:e.has_keyword?b(`Focus keyword: set`,`ai-rank-suite`):b(`Focus keyword: missing`,`ai-rank-suite`),children:b(`K`,`ai-rank-suite`)})]}),(0,I.jsxs)(`span`,{className:`truncate`,children:[e.title,e.seo_title&&e.seo_title!==e.title&&(0,I.jsxs)(`em`,{className:`is-muted`,title:b(`The SEO title, which is what search engines show`,`ai-rank-suite`),style:{fontStyle:`normal`,marginLeft:8,opacity:.75},children:[`→ `,e.seo_title]})]}),e.status&&e.status!==`publish`&&(0,I.jsx)(`span`,{className:`ars-tag shrink-0`,style:{color:`var(--ars-c-yellow-ink)`,background:`var(--ars-c-yellow)`},children:e.status})]})}),Oe.multilingual&&Oe.perPost&&(0,I.jsx)(`td`,{className:`is-muted uppercase`,children:e.lang||`—`}),(0,I.jsx)(`td`,{className:`is-num`,children:e.words?e.words.toLocaleString():(0,I.jsx)(`span`,{className:`is-muted`,children:`—`})}),(0,I.jsx)(`td`,{className:`is-num`,children:(0,I.jsx)(Fe,{value:e.geo_score})}),(0,I.jsx)(`td`,{className:`is-num`,children:(0,I.jsx)(Fe,{value:e.seo_score})}),(0,I.jsx)(`td`,{className:`is-num`,children:e.geo_score===null||e.geo_score===void 0?(0,I.jsx)(`span`,{className:`ars-tag ars-tag-quiet`,title:b(`Not analysed yet — open the row or press “Score unscored”`,`ai-rank-suite`),children:b(`unscored`,`ai-rank-suite`)}):e.issues}),(0,I.jsx)(`td`,{className:`is-num is-muted`,children:(0,I.jsxs)(`span`,{className:`ars-rowmeta`,children:[(0,I.jsxs)(`span`,{className:`ars-rowacts`,onClick:e=>e.stopPropagation(),children:[e.edit_url&&(0,I.jsx)(`a`,{href:e.edit_url,target:`_blank`,rel:`noreferrer`,title:b(`Edit in WordPress`,`ai-rank-suite`),children:b(`Edit`,`ai-rank-suite`)}),e.url&&(0,I.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,title:b(`View the page`,`ai-rank-suite`),children:b(`View`,`ai-rank-suite`)})]}),(0,I.jsx)(`span`,{className:`ars-rowmeta-time`,children:e.modified_human||`—`})]})})]},e.id))})]})})},n)})})(),n&&n.length>0&&u.pages>1&&(0,I.jsxs)(`div`,{className:`flex items-center justify-between flex-wrap gap-2`,children:[(0,I.jsxs)(`span`,{className:`flex items-center gap-3 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[(0,I.jsx)(`span`,{children:S(b(`Page %1$s of %2$s · %3$s entries`,`ai-rank-suite`),f.toLocaleString(),Math.max(1,u.pages||1).toLocaleString(),(u.total||0).toLocaleString())}),(0,I.jsxs)(`label`,{className:`flex items-center gap-1.5`,children:[b(`Rows`,`ai-rank-suite`),(0,I.jsx)(`select`,{className:`ars-select`,value:i,onChange:e=>{a(Number(e.target.value)),p(1)},children:[20,50,100].map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))})]})]}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(A,{variant:`ghost`,disabled:f<=1,onClick:()=>p(f-1),children:b(`← Previous`,`ai-rank-suite`)}),(0,I.jsx)(A,{variant:`ghost`,disabled:f>=u.pages,onClick:()=>p(f+1),children:b(`Next →`,`ai-rank-suite`)})]})]}),ce&&(0,I.jsx)(Zi,{id:ce,onClose:()=>le(null),position:(()=>{let e=(n||[]).findIndex(e=>e.id===ce);return e<0?null:{index:e,total:(n||[]).length}})(),onNavigate:e=>{let t=(n||[])[e];t&&le(t.id)},onChanged:e=>r(t=>t.map(t=>t.id===e.id?{...t,...e}:t))})]})}function na({library:e,value:t,onChange:n}){let r=e.filter(e=>e.total>0),i=r.reduce((e,t)=>e+t.total,0);return(0,I.jsxs)(`div`,{className:`ars-typebar`,role:`tablist`,"aria-label":b(`Content type`,`ai-rank-suite`),children:[(0,I.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t===`any`,className:`ars-typetab${t===`any`?` is-active`:``}`,onClick:()=>n(`any`),children:[(0,I.jsx)(`span`,{className:`ars-typetab-label`,children:b(`Everything`,`ai-rank-suite`)}),(0,I.jsx)(`span`,{className:`ars-typetab-count tabular-nums`,children:i.toLocaleString()})]}),r.map(e=>(0,I.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t===e.name,className:`ars-typetab${t===e.name?` is-active`:``}`,onClick:()=>n(e.name),title:S(b(`%1$s: %2$s items`,`ai-rank-suite`),e.label,e.total.toLocaleString()),children:[(0,I.jsx)(`span`,{className:`ars-typetab-label`,children:e.label}),(0,I.jsx)(`span`,{className:`ars-typetab-count tabular-nums`,children:e.total.toLocaleString()}),e.no_desc>0&&(0,I.jsx)(`span`,{className:`ars-typetab-dot`,"aria-hidden":!0})]},e.name))]})}function ra({type:e,filter:t,onFilter:n,onScoreAll:r,onDescribeAll:i,busy:a,scoreDone:o}){if(e.total===0)return null;let s=t=>Math.round(t/Math.max(1,e.total)*100),c=Math.max(0,e.total-(e.unanalyzed||0));s(e.total-e.no_desc);let l=e.avg_geo,u=l===null?`neutral`:l>=80?`good`:l>=50?`warning`:`bad`,d=b(l===null?`Not scored yet`:l>=80?`Healthy`:l>=50?`Room to improve`:`Needs attention`,`ai-rank-suite`),f=e.name===`any`?b(`items`,`ai-rank-suite`):e.label,p=Math.max(0,e.total-(e.published??e.total)),m=p>0?S(b(` (%1$s published, %2$s drafts)`,`ai-rank-suite`),(e.published??0).toLocaleString(),p.toLocaleString()):``,h=l===null?S(b(`%1$s %2$s%3$s, none scored yet.`,`ai-rank-suite`),e.total.toLocaleString(),f,m):S(b(`%1$s of %2$s %3$s%4$s scored — average GEO %5$d%6$s.`,`ai-rank-suite`),c.toLocaleString(),e.total.toLocaleString(),f,m,l,e.avg_seo===null?``:S(b(`, SEO %d`,`ai-rank-suite`),e.avg_seo)),g=e.no_desc>0?S(b(`%1$s of these pages have a meta description, %2$s do not — the cheapest gap to close, and the one an assistant quotes first. %3$s`,`ai-rank-suite`),Math.max(0,(e.total||0)-(e.no_desc||0)).toLocaleString(),e.no_desc.toLocaleString(),e.weak_geo?S(b(`%s score weak on AI readiness.`,`ai-rank-suite`),e.weak_geo.toLocaleString()):``):e.weak_geo>0?S(b(`Every page has a description. %s still score weak on AI readiness — the list below, worst first, is the work.`,`ai-rank-suite`),e.weak_geo.toLocaleString()):b(`Descriptions filled, nothing weak: keep scoring after each publishing sprint so the numbers stay true.`,`ai-rank-suite`);return(0,I.jsxs)(`div`,{className:`ars-hero`,children:[(0,I.jsx)(`div`,{className:`ars-hero-ring`,children:(0,I.jsx)(Pe,{value:l,size:132,label:b(`Avg GEO`,`ai-rank-suite`),onLight:!0})}),(0,I.jsxs)(`div`,{className:`ars-hero-body`,children:[(0,I.jsx)(`span`,{className:`ars-hero-badge is-${u}`,children:d}),(0,I.jsx)(`h2`,{className:`ars-hero-title`,children:h}),(0,I.jsx)(`p`,{className:`ars-hero-why`,children:g}),(0,I.jsxs)(`div`,{className:`ars-hero-actions`,children:[(e.unanalyzed||0)>0&&(0,I.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:r,disabled:a===`site`,title:b(`The local analyzer. Free, and it runs on this site — nothing is sent anywhere.`,`ai-rank-suite`),children:a===`site`?S(b(`Scoring… %s done`,`ai-rank-suite`),(o||0).toLocaleString()):S(b(`Score %s unscored`,`ai-rank-suite`),e.unanalyzed.toLocaleString())}),e.no_desc>0&&oa&&sa&&(0,I.jsx)(`button`,{type:`button`,className:`ars-btn ${(e.unanalyzed||0)>0?`ars-btn-ghost`:`ars-btn-primary`}`,onClick:i,disabled:a===`describe-all`,title:b(`AI writes a description for every page without one — reviewable and undoable on the Bulk tab`,`ai-rank-suite`),children:a===`describe-all`?b(`Queuing…`,`ai-rank-suite`):S(b(`Write %s descriptions (AI)`,`ai-rank-suite`),e.no_desc.toLocaleString())}),(0,I.jsxs)(`span`,{className:`t-caption`,children:[S(b(`%s published`,`ai-rank-suite`),e.published.toLocaleString()),e.drafts>0?` · `+S(x(`%s draft`,`%s drafts`,e.drafts,`ai-rank-suite`),e.drafts.toLocaleString()):``]})]})]}),(0,I.jsx)(`div`,{className:`ars-hero-stats`,children:[{key:`no_desc`,label:b(`No description`,`ai-rank-suite`),value:e.no_desc,tone:e.no_desc?`bad`:`good`},{key:`no_keyword`,label:b(`No keyword`,`ai-rank-suite`),value:e.no_keyword,tone:e.no_keyword?`warn`:`good`},{key:`weak_geo`,label:b(`Weak GEO`,`ai-rank-suite`),value:e.weak_geo,tone:e.weak_geo?`warn`:`good`},{key:`noindex`,label:b(`Noindex`,`ai-rank-suite`),value:e.noindex}].map(e=>(0,I.jsxs)(`button`,{type:`button`,className:`ars-hero-stat${t===e.key?` is-active`:``}`,onClick:()=>n(e.key),title:t===e.key?b(`Show all`,`ai-rank-suite`):S(b(`Show only: %s`,`ai-rank-suite`),e.label),children:[(0,I.jsx)(`span`,{className:`ars-hero-stat-v${e.tone?` is-`+e.tone:``}`,children:e.value.toLocaleString()}),(0,I.jsx)(`span`,{className:`ars-hero-stat-l`,children:e.label})]},e.key))})]})}var ia,aa,I,oa,sa,ca,la,ua=o((()=>{ia=u(f(),1),C(),aa=g(),O(),I=_e(),dt(),Vt(),Ur(),$r(),di(),gi(),Si(),Oi(),Ni(),Ri(),Yi(),oa=!Array.isArray(ne.modules)||ne.modules.includes(`ai`),sa=!Array.isArray(ne.modules)||ne.modules.includes(`bulk`),ca=e=>JSON.stringify({seo_title:e?.seo_title||``,seo_desc:e?.seo_desc||``,exclude:!!e?.exclude,robots:e?.robots||[],keywords:e?.keywords||{},canonical:e?.canonical||``,breadcrumb_title:e?.breadcrumb_title||``,previews:e?.previews||{},social:e?.social||{}}),la=[{id:``,label:b(`All pages`,`ai-rank-suite`)},{id:`weak_geo`,label:b(`Weak GEO`,`ai-rank-suite`)},{id:`weak_seo`,label:b(`Weak SEO`,`ai-rank-suite`)},{id:`no_desc`,label:b(`No description`,`ai-rank-suite`)},{id:`no_keyword`,label:b(`No keyword`,`ai-rank-suite`)},{id:`thin`,label:b(`Thin content`,`ai-rank-suite`)},{id:`noindex`,label:b(`Noindex`,`ai-rank-suite`)},{id:`excluded`,label:b(`Not in llms`,`ai-rank-suite`)}]})),da=c({default:()=>ma});function fa(){let[e,t]=(0,ga.useState)(`short`),[n,r]=(0,ga.useState)(null),[i,a]=(0,ga.useState)(!1),[o,s]=(0,ga.useState)(null),[c,l]=(0,ga.useState)(!1),u=async e=>{a(!0),s(null);try{r(await D.get(`/llms-txt/raw?variant=${e}`))}catch(e){s(e.message)}finally{a(!1)}};return(0,ga.useEffect)(()=>{u(e)},[e]),(0,L.jsxs)(`div`,{className:`ars-page`,children:[(0,L.jsxs)(k,{title:b(`Raw output`,`ai-rank-suite`),subtitle:b(`The exact bytes served at the endpoint, not a rendering of them`,`ai-rank-suite`),action:(0,L.jsx)(Ie,{tabs:[{id:`short`,label:`llms.txt`},{id:`full`,label:`llms-full.txt`}],active:e,onChange:t}),children:[o&&(0,L.jsx)(M,{tone:`serious`,children:o}),n&&(0,L.jsxs)(`div`,{className:`grid gap-3`,children:[(0,L.jsx)(Ee,{columns:4,metrics:[{id:`tokens`,label:b(`Tokens`,`ai-rank-suite`),hint:b(`What a retriever spends reading this variant. Past roughly 100,000 most truncate the file — and the truncation point is not your choice.`,`ai-rank-suite`),value:(n.tokens??0).toLocaleString(),accent:n.heavy?`var(--ars-accent)`:void 0},{id:`size`,label:b(`Size`,`ai-rank-suite`),hint:b(`The exact bytes on the wire.`,`ai-rank-suite`),value:(n.bytes/1024).toFixed(1),unit:b(`KB`,`ai-rank-suite`)},{id:`lines`,label:b(`Lines`,`ai-rank-suite`),hint:b(`Lines of markdown in the served file.`,`ai-rank-suite`),value:n.lines},{id:`links`,label:b(`Links`,`ai-rank-suite`),hint:b(`Curated URLs in the file — each with a sentence of meaning attached.`,`ai-rank-suite`),value:n.links}]}),n.heavy&&(0,L.jsx)(M,{tone:`warning`,children:b(`Past roughly 100,000 tokens most retrievers truncate the file — and the truncation point is not your choice. Reduce the number of pages in the full variant so the cut is one you made.`,`ai-rank-suite`)}),n.lighthouse&&(0,L.jsx)(pa,{checks:n.lighthouse}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,L.jsxs)(`a`,{href:n.url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 text-[12.5px]`,children:[n.url,` `,(0,L.jsx)(wt,{size:12})]}),(0,L.jsxs)(`span`,{className:`ml-auto flex items-center gap-2`,children:[c&&(0,L.jsx)(j,{tone:`good`,children:`✓ Copied`}),(0,L.jsx)(A,{variant:`ghost`,onClick:async()=>{n?.body&&await ve(n.body)&&(l(!0),setTimeout(()=>l(!1),1800))},disabled:i,children:b(`Copy`,`ai-rank-suite`)})]})]}),(0,L.jsx)(`pre`,{className:`ars-mono m-0 p-3 text-[11.5px]`,style:{background:`var(--ars-surface-2)`,border:`1px solid var(--ars-line-soft)`,color:`var(--ars-ink)`,borderRadius:`var(--ars-r-md)`,maxHeight:420,overflow:`auto`,whiteSpace:`pre-wrap`},children:n.body})]})]}),n&&(0,L.jsx)(k,{title:b(`Hooks`,`ai-rank-suite`),subtitle:b(`Everything you can change without touching the plugin`,`ai-rank-suite`),children:(0,L.jsx)(`div`,{className:`ars-table-wrap`,children:(0,L.jsxs)(`table`,{className:`ars-table`,children:[(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{children:b(`Hook`,`ai-rank-suite`)}),(0,L.jsx)(`th`,{children:b(`Signature`,`ai-rank-suite`)}),(0,L.jsx)(`th`,{children:b(`What it changes`,`ai-rank-suite`)})]})}),(0,L.jsx)(`tbody`,{children:n.hooks.map(e=>(0,L.jsxs)(`tr`,{children:[(0,L.jsxs)(`td`,{children:[(0,L.jsx)(`code`,{className:`ars-mono text-[11.5px]`,children:e.name}),(0,L.jsx)(`div`,{className:`text-[11px] mt-0.5`,style:{color:`var(--ars-ink-3)`},children:e.type})]}),(0,L.jsx)(`td`,{children:(0,L.jsx)(`code`,{className:`ars-mono text-[11.5px]`,children:e.args})}),(0,L.jsx)(`td`,{className:`text-[12.5px]`,children:e.desc})]},e.name))})]})})})]})}function pa({checks:e}){let t=[{id:`h1`,ok:!!e.h1,label:b(`Starts with an H1 heading`,`ai-rank-suite`)},{id:`link`,ok:!!e.link,label:b(`Contains a markdown link`,`ai-rank-suite`)},{id:`length`,ok:!!e.length,label:b(`Long enough to be a document`,`ai-rank-suite`)}],n=t.every(e=>e.ok);return(0,L.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,L.jsx)(`span`,{className:`t-overline`,children:b(`PageSpeed — Agentic Browsing`,`ai-rank-suite`)}),(0,L.jsx)(j,{tone:n?`good`:`serious`,children:b(n?`Passes`:`Fails`,`ai-rank-suite`)})]}),(0,L.jsx)(`div`,{className:`flex gap-4 flex-wrap text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:t.map(e=>(0,L.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,L.jsx)(`span`,{"aria-hidden":!0,style:{color:e.ok?`var(--ars-good)`:`var(--ars-serious)`},children:e.ok?`✓`:`✗`}),e.label]},e.id))})]})}function ma({tab:e=`short`,onTab:t}){let[n,r]=(0,ga.useState)(null),[i,a]=(0,ga.useState)(!1),[o,s]=(0,ga.useState)(!1),[c,l]=(0,ga.useState)(null);(0,ga.useEffect)(()=>{D.get(`/llms-txt`).then(r).catch(e=>l(e.message))},[]);let u=n?.settings,d=e=>r(t=>({...t,settings:{...t.settings,...e}})),f=async()=>{a(!0),l(null),s(!1);try{r(await D.put(`/llms-txt`,u)),s(!0),setTimeout(()=>s(!1),2500)}catch(e){l(e.message)}finally{a(!1)}},p=async()=>{a(!0),l(null);try{r(await D.put(`/llms-txt`,{...u,enabled:!0}))}catch(e){l(e.message)}finally{a(!1)}},[m,h]=(0,ga.useState)(null),[g,_]=(0,ga.useState)(!1),v=async()=>{_(!0);try{for(;;){let e=await D.post(`/llms-txt/write/tick`,{});if(h(e),e.state!==`running`)break}r(await D.get(`/llms-txt`))}catch(e){l(e.message)}finally{_(!1)}},y=async(e=!1)=>{l(null),_(!0);try{h(await D.post(`/llms-txt/write`,{overwrite:e})),await v()}catch(e){l(e.message),_(!1)}},C=async()=>{try{h(await D.post(`/llms-txt/write/cancel`,{}))}catch(e){l(e.message)}};(0,ga.useEffect)(()=>{D.get(`/llms-txt/write`).then(e=>{h(e),e&&e.state===`running`&&v()}).catch(()=>{})},[]);let w=async()=>{a(!0);try{r(await D.post(`/llms-txt/regenerate`))}catch(e){l(e.message)}finally{a(!1)}};if(!n)return(0,L.jsx)(Ce,{error:c});let T=n.stats||{},E=(T.tokens??0)>8e3,ee=(u.key_pages||[]).length,te=u.enabled?E?{tone:`warning`,text:S(b(`llms.txt is live, but at %s tokens the tail is at risk.`,`ai-rank-suite`),(T.tokens??0).toLocaleString()),why:b(`Past roughly 8,000 tokens many assistants stop reading — and the cut is theirs, not yours. Lower the max items or unpin pages under Generation below, so the cut is one you made.`,`ai-rank-suite`),action:b(`Open the file`,`ai-rank-suite`),onAction:()=>window.open(n.url,`_blank`,`noopener`)}:{tone:`good`,text:S(b(`llms.txt is live — %1$d curated links, %2$s tokens.`,`ai-rank-suite`),T.links??0,(T.tokens??0).toLocaleString()),why:b(`An assistant fetches a handful of URLs per answer; this file is where you choose the handful. The preview below is the exact bytes served.`,`ai-rank-suite`),action:b(`Open the file`,`ai-rank-suite`),onAction:()=>window.open(n.url,`_blank`,`noopener`)}:{tone:`warning`,text:b(`llms.txt is off — an assistant asking about this site gets nothing.`,`ai-rank-suite`),why:b(`The file is generated from your published content and served at /llms.txt the moment it is on. The panels below decide what goes into it.`,`ai-rank-suite`),action:b(`Turn it on`,`ai-rank-suite`),onAction:p},ne=(e=null)=>(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(A,{onClick:f,busy:i,children:b(`Save`,`ai-rank-suite`)}),e,o&&(0,L.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]})]});return(0,L.jsxs)(`div`,{className:`ars-page`,children:[c&&(0,L.jsx)(M,{tone:`serious`,children:c}),(0,L.jsx)(xe,{tone:te.tone,text:te.text,sub:te.why,action:te.action,onAction:te.onAction,busy:i}),(0,L.jsx)(k,{title:b(`Write everything`,`ai-rank-suite`),subtitle:b(`One click: a summary for every page in both files, the lead paragraph for the site, and both files rebuilt.`,`ai-rank-suite`),action:m&&m.state===`running`?(0,L.jsx)(A,{variant:`ghost`,onClick:C,children:b(`Stop`,`ai-rank-suite`)}):(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(A,{onClick:()=>y(!1),busy:g,children:b(`Write everything`,`ai-rank-suite`)}),(0,L.jsx)(A,{variant:`ghost`,onClick:()=>y(!0),disabled:g,children:b(`Rewrite all summaries`,`ai-rank-suite`)})]}),children:m&&m.state===`running`?(0,L.jsx)(ze,{label:m.current?S(b(`Writing: %s`,`ai-rank-suite`),m.current):b(`Collecting the pages…`,`ai-rank-suite`),done:m.done,total:m.total,note:S(b(`%1$d of %2$d pages · %3$d written, %4$d kept as they were`,`ai-rank-suite`),m.done,m.total,m.written,m.kept)}):m&&m.state===`done`?(0,L.jsxs)(`div`,{className:`grid gap-2`,children:[(0,L.jsxs)(`p`,{className:`m-0 text-[13px]`,children:[S(b(`Done: %1$d summaries written, %2$d kept as they were, %3$d could not be written. Both files are rebuilt.`,`ai-rank-suite`),m.written,m.kept,m.failed),` `,m.ai?b(`Summaries came from the AI engine.`,`ai-rank-suite`):b(`No AI engine is connected, so each summary is the page’s own first sentences.`,`ai-rank-suite`)]}),m.lead?(0,L.jsxs)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:[b(`Site lead written:`,`ai-rank-suite`),` `,m.lead]}):null,m.errors&&m.errors.length?(0,L.jsxs)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:[b(`Skipped (no text):`,`ai-rank-suite`),` `,m.errors.join(`, `)]}):null]}):(0,L.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-3)`},children:b(`The files are only as good as the summaries under each link. Most sites have none, so the long file is raw page text and the short one lists titles with a cut-off paragraph. This writes them all: with the AI engine when a key is stored, from each page’s first sentences otherwise. Pages that already have a summary are kept unless you choose to rewrite.`,`ai-rank-suite`)})}),(0,L.jsx)(Ee,{columns:4,metrics:[{id:`tokens`,label:b(`Tokens`,`ai-rank-suite`),hint:b(`What an assistant actually spends reading the file. Past roughly 8,000 the tail gets dropped — and the tail is the part nobody checks.`,`ai-rank-suite`),value:(T.tokens??0).toLocaleString(),accent:E?`var(--ars-accent)`:void 0,sub:b(E?`long — the tail may be truncated`:`inside a context window`,`ai-rank-suite`)},{id:`size`,label:b(`Size`,`ai-rank-suite`),hint:b(`The exact bytes served at /llms.txt.`,`ai-rank-suite`),value:((T.bytes??0)/1024).toFixed(1),unit:b(`KB`,`ai-rank-suite`),sub:S(x(`%d line`,`%d lines`,T.lines??0,`ai-rank-suite`),T.lines??0)},{id:`links`,label:b(`Links listed`,`ai-rank-suite`),hint:b(`Curated URLs with a sentence of meaning each — the part an XML sitemap cannot do.`,`ai-rank-suite`),value:T.links??0},{id:`pinned`,label:b(`Pinned pages`,`ai-rank-suite`),hint:b(`Placed at the very top of the file, in your order. An assistant that stops after ten links has still read the ten you chose.`,`ai-rank-suite`),value:ee,unit:`/ 20`,sub:b(ee?`read before everything else`:`nothing pinned yet`,`ai-rank-suite`)}]}),(0,L.jsx)(k,{title:b(`Preview`,`ai-rank-suite`),subtitle:b(`Exactly what AI crawlers will receive`,`ai-rank-suite`),action:(0,L.jsx)(Ie,{tabs:[{id:`short`,label:`llms.txt`},{id:`full`,label:`llms-full.txt`},{id:`dev`,label:b(`Developer`,`ai-rank-suite`)}],active:e,onChange:t}),children:e===`dev`?(0,L.jsx)(fa,{}):e===`short`?(0,L.jsx)(`pre`,{className:`ars-mono m-0 p-4 ars-r-md overflow-auto`,style:{background:`var(--ars-surface-2)`,maxHeight:560,whiteSpace:`pre-wrap`},children:n.preview}):(0,L.jsxs)(`div`,{className:`text-[12.5px] grid gap-2`,style:{color:`var(--ars-ink-2)`},children:[(0,L.jsxs)(`p`,{className:`m-0`,children:[b(`The long version contains the`,`ai-rank-suite`),` `,(0,L.jsx)(`strong`,{children:S(x(`full text of up to %d page`,`full text of up to %d pages`,Number(u.full_max_items)||0,`ai-rank-suite`),u.full_max_items)}),` `,b(`as clean markdown — too large for an inline preview.`,`ai-rank-suite`)]}),(0,L.jsx)(`p`,{className:`m-0`,children:(0,L.jsxs)(`a`,{href:n.full_url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1`,children:[S(b(`Open %s`,`ai-rank-suite`),n.full_url),` `,(0,L.jsx)(wt,{size:11})]})})]})}),(0,L.jsx)(ha,{}),(0,L.jsx)(Oe,{title:b(`Generation`,`ai-rank-suite`),note:[u.enabled?b(`on`,`ai-rank-suite`):b(`off`,`ai-rank-suite`),S(b(`max %s per section`,`ai-rank-suite`),u.max_items),u.full_enabled?b(`full variant on`,`ai-rank-suite`):null].filter(Boolean).join(` · `),defaultOpen:!u.enabled,children:(0,L.jsxs)(`div`,{className:`grid gap-4`,style:{maxWidth:560},children:[(0,L.jsx)(Me,{checked:!!u.enabled,onChange:e=>d({enabled:e}),label:b(`Serve /llms.txt on this site`,`ai-rank-suite`)}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Intro paragraph (optional)`,`ai-rank-suite`)}),(0,L.jsx)(`textarea`,{rows:3,value:u.intro,onChange:e=>d({intro:e.target.value}),placeholder:b(`One or two sentences telling AI systems what this site is about and who it is for.`,`ai-rank-suite`)})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Included content`,`ai-rank-suite`)}),(0,L.jsxs)(`div`,{className:`flex gap-4`,children:[[`page`,`post`].map(e=>(0,L.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:u.post_types.includes(e),onChange:t=>d({post_types:t.target.checked?[...u.post_types,e]:u.post_types.filter(t=>t!==e)})}),e===`page`?`Pages`:`Posts`]},e)),(0,L.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:!!u.include_tax,onChange:e=>d({include_tax:e.target.checked})}),b(`Topics`,`ai-rank-suite`)]})]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Max items per section`,`ai-rank-suite`)}),(0,L.jsx)(`input`,{type:`number`,min:`5`,max:`200`,value:u.max_items,onChange:e=>d({max_items:Number(e.target.value)}),style:{width:110}})]}),(0,L.jsxs)(`div`,{className:`ars-r-md p-3 grid gap-3`,style:{background:`var(--ars-surface-2)`},children:[(0,L.jsx)(Me,{checked:!!u.full_enabled,onChange:e=>d({full_enabled:e}),label:b(`Also serve /llms-full.txt (long version, full page content)`,`ai-rank-suite`)}),u.full_enabled&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Max pages in full version`,`ai-rank-suite`)}),(0,L.jsx)(`input`,{type:`number`,min:`5`,max:`200`,value:u.full_max_items,onChange:e=>d({full_max_items:Number(e.target.value)}),style:{width:110}})]})]}),ne((0,L.jsx)(A,{variant:`ghost`,onClick:w,busy:i,children:b(`Regenerate preview`,`ai-rank-suite`)})),(0,L.jsxs)(`div`,{className:`m-0 text-[12px] grid gap-1`,style:{color:`var(--ars-ink-3)`},children:[(0,L.jsxs)(`span`,{children:[(0,L.jsxs)(`a`,{href:n.url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1`,children:[`/llms.txt `,(0,L.jsx)(wt,{size:11})]}),` `,`— curated index (short)`]}),u.full_enabled&&(0,L.jsxs)(`span`,{children:[(0,L.jsxs)(`a`,{href:n.full_url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1`,children:[`/llms-full.txt `,(0,L.jsx)(wt,{size:11})]}),` `,`— full page content (long)`]}),(0,L.jsx)(`span`,{children:b(`Requires pretty permalinks. AI summaries as descriptions arrive with the AI modules.`,`ai-rank-suite`)})]})]})}),(0,L.jsx)(Oe,{title:b(`Identity & citation`,`ai-rank-suite`),note:u.brand||window.airanksuiteData?.siteName||``,children:(0,L.jsxs)(`div`,{className:`grid gap-3`,children:[(0,L.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Read verbatim by the model. Everything here is a sentence you get to write instead of one it invents.`,`ai-rank-suite`)}),(0,L.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Brand name`,`ai-rank-suite`)}),(0,L.jsx)(`input`,{type:`text`,placeholder:window.airanksuiteData?.siteName,value:u.brand||``,onChange:e=>d({brand:e.target.value})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Preferred citation`,`ai-rank-suite`)}),(0,L.jsx)(`input`,{type:`text`,placeholder:b(`Brand Name (example.com)`,`ai-rank-suite`),value:u.citation||``,onChange:e=>d({citation:e.target.value})})]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`One-sentence summary`,`ai-rank-suite`)}),(0,L.jsx)(`textarea`,{rows:2,placeholder:b(`Independent guides to X for Y.`,`ai-rank-suite`),value:u.summary||``,onChange:e=>d({summary:e.target.value})}),(0,L.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`This becomes the blockquote under your name — the line an assistant repeats when asked what your site is. Write it as the answer to that question, not as a slogan.`,`ai-rank-suite`)})]}),(0,L.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Contact URL`,`ai-rank-suite`)}),(0,L.jsx)(`input`,{type:`text`,placeholder:`https://example.com/contact`,value:u.contact||``,onChange:e=>d({contact:e.target.value})})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Content usage`,`ai-rank-suite`)}),(0,L.jsx)(`input`,{type:`text`,placeholder:b(`Quote freely with a link back.`,`ai-rank-suite`),value:u.license||``,onChange:e=>d({license:e.target.value})})]})]}),(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[(0,L.jsx)(Me,{checked:!!u.declare_lang,onChange:e=>d({declare_lang:e}),label:b(`Declare the site language`,`ai-rank-suite`)}),(0,L.jsx)(Me,{checked:!!u.link_sitemap,onChange:e=>d({link_sitemap:e}),label:b(`Link the XML sitemap`,`ai-rank-suite`)}),(0,L.jsx)(Me,{checked:!!u.link_feed,onChange:e=>d({link_feed:e}),label:b(`Link the RSS feed`,`ai-rank-suite`)})]}),ne()]})}),(0,L.jsx)(Oe,{title:b(`Pinned pages`,`ai-rank-suite`),note:ee?S(b(`%d / 20 pinned`,`ai-rank-suite`),ee):b(`nothing pinned yet`,`ai-rank-suite`),children:(0,L.jsxs)(`div`,{className:`grid gap-3`,children:[(0,L.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Placed at the very top, in this order. An assistant that stops reading after ten links has still read the ten you chose.`,`ai-rank-suite`)}),ee>0&&(0,L.jsx)(`div`,{className:`grid gap-1.5`,children:(u.key_pages||[]).map((e,t)=>{let r=(n.candidates||[]).find(t=>t.id===e),i=e=>{let n=[...u.key_pages];e<0||e>=n.length||([n[t],n[e]]=[n[e],n[t]],d({key_pages:n}))};return(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-3 ars-r-md px-3 py-2`,style:{background:`var(--ars-surface-2)`},children:[(0,L.jsxs)(`span`,{className:`flex items-center gap-2.5 min-w-0`,children:[(0,L.jsx)(`span`,{className:`t-num text-[12px]`,style:{color:`var(--ars-ink-3)`,width:16},children:t+1}),(0,L.jsx)(`span`,{className:`text-[13px] truncate`,children:r?r.title:`#${e}`})]}),(0,L.jsxs)(`span`,{className:`flex items-center gap-1 shrink-0`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:()=>i(t-1),disabled:t===0,className:`ars-move`,"aria-label":b(`Move up`,`ai-rank-suite`),children:`↑`}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>i(t+1),disabled:t===u.key_pages.length-1,className:`ars-move`,"aria-label":b(`Move down`,`ai-rank-suite`),children:`↓`}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>d({key_pages:u.key_pages.filter(t=>t!==e)}),className:`ars-move`,"aria-label":b(`Remove`,`ai-rank-suite`),children:(0,L.jsx)(Rt,{size:12})})]})]},e)})}),(0,L.jsxs)(`select`,{value:``,onChange:e=>{let t=Number(e.target.value);if(!t)return;let n=u.key_pages||[];n.includes(t)||n.length>=20||d({key_pages:[...n,t]})},"aria-label":b(`Pin a page`,`ai-rank-suite`),children:[(0,L.jsx)(`option`,{value:``,children:b(`Pin a page…`,`ai-rank-suite`)}),(n.candidates||[]).filter(e=>!(u.key_pages||[]).includes(e.id)).map(e=>(0,L.jsx)(`option`,{value:e.id,children:e.title},e.id))]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Section heading`,`ai-rank-suite`)}),(0,L.jsx)(`input`,{type:`text`,placeholder:b(`Start here`,`ai-rank-suite`),value:u.key_label||``,onChange:e=>d({key_label:e.target.value}),style:{maxWidth:260}})]}),ne()]})}),(0,L.jsx)(Oe,{title:b(`Anything the generator cannot know`,`ai-rank-suite`),note:u.extra?b(`custom markdown appended`,`ai-rank-suite`):b(`nothing appended`,`ai-rank-suite`),children:(0,L.jsxs)(`div`,{className:`grid gap-3`,children:[(0,L.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Appended as markdown at the end — products, service areas, pricing, or a note distinguishing you from a similarly named company.`,`ai-rank-suite`)}),(0,L.jsx)(`textarea`,{rows:5,className:`ars-mono`,placeholder:`## Coverage
    1010Dubai, Abu Dhabi and the wider UAE.
    1111
    1212## Not to be confused with
    13 Example Corp of Ohio, no relation.`,value:u.extra||``,onChange:e=>d({extra:e.target.value})}),re()]})}),(0,L.jsx)(k,{title:b(`Why this file decides whether you are cited`,`ai-rank-suite`),subtitle:b(`Four mechanisms, all of them configurable above`,`ai-rank-suite`),children:(0,L.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:da.map(([e,t])=>(0,L.jsxs)(`div`,{className:`ars-r-md p-4`,style:{background:`var(--ars-surface-2)`},children:[(0,L.jsxs)(`div`,{className:`font-semibold text-[13px] flex items-start gap-1.5`,children:[(0,L.jsx)(Nt,{size:13}),e]}),(0,L.jsx)(`div`,{className:`text-[12px] mt-1`,style:{color:`var(--ars-ink-2)`},children:t})]},e))})})]})}function la(){let[e,t]=(0,ua.useState)(null),[n,r]=(0,ua.useState)(!1);return(0,L.jsxs)(k,{title:b(`What the site actually serves`,`ai-rank-suite`),subtitle:b(`Fetches the real URL and compares it with what this screen would publish`,`ai-rank-suite`),action:(0,L.jsx)(A,{variant:`ghost`,busy:n,onClick:async()=>{r(!0);try{t(await E.post(`/llms-txt/verify`))}catch(e){t({ok:!1,reason:e.message})}finally{r(!1)}},children:b(`Fetch it`,`ai-rank-suite`)}),children:[!e&&(0,L.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`The preview above is what this plugin would write. Whether that is what a crawler receives depends on rewrite rules, caches and whatever else answers that URL first.`,`ai-rank-suite`)}),e&&!e.ok&&(0,L.jsx)(M,{tone:`serious`,children:e.reason}),e&&e.ok&&(0,L.jsxs)(`div`,{className:`grid gap-2`,children:[!e.plain&&(0,L.jsxs)(M,{tone:`serious`,children:[b(`The URL answered with`,`ai-rank-suite`),` `,(0,L.jsx)(`code`,{children:e.type||b(`no content type`,`ai-rank-suite`)}),` `,b(`instead of text/plain. That is usually a theme 404 template returning HTTP 200 — it looks fine in a browser and is unparseable to a crawler.`,`ai-rank-suite`)]}),e.plain&&e.matches&&(0,L.jsx)(M,{tone:`good`,children:S(b(`The served file matches this configuration exactly (%s bytes).`,`ai-rank-suite`),e.bytes.toLocaleString())}),e.plain&&!e.matches&&(0,L.jsx)(M,{tone:`warning`,children:S(b(`The served file differs from what this screen would publish — %1$s bytes served against %2$s expected. Almost always a cache holding a copy from before your last change. If it survives a purge, something else is answering that URL.`,`ai-rank-suite`),e.bytes.toLocaleString(),e.expected.toLocaleString())}),(0,L.jsx)(`pre`,{className:`ars-head-pre is-tall`,children:e.body})]})]})}var ua,L,da,fa=o((()=>{C(),ua=u(f(),1),D(),at(),Ft(),pe(),L=O(),da=[[b(`An assistant reads this before it reads your site`,`ai-rank-suite`),b(`ChatGPT, Claude, Perplexity and Gemini fetch a handful of URLs per answer, not a whole site. llms.txt is the one file that tells them which handful — and it is the only place you get to choose.`,`ai-rank-suite`)],[b(`Being quoted correctly is a setting, not luck`,`ai-rank-suite`),b(`The preferred citation, contact and usage lines below are read verbatim. A model that has been told how to credit you tends to; one that has not will paraphrase your brand into something else.`,`ai-rank-suite`)],[b(`Your best page beats your newest page`,`ai-rank-suite`),b(`Chronology is a blog convention, not a relevance signal. Pinned pages sit at the top of the file, and an assistant that stops reading after ten links has still read the ten you chose.`,`ai-rank-suite`)],[b(`It works where a sitemap cannot`,`ai-rank-suite`),b(`An XML sitemap lists URLs. This lists URLs with a sentence of meaning attached, in the markdown these models were trained on — which is why it survives summarisation.`,`ai-rank-suite`)]]}));function pa({tone:e=`neutral`,text:t,why:n,action:r,onAction:i,busy:a=!1,children:o}){return t?(0,ma.jsx)(me,{tone:e,text:t,why:n,action:r,onAction:i,busy:a,children:o}):null}var ma,ha=o((()=>{f(),at(),ma=O()})),ga=c({default:()=>_a});function _a(){let[e,t]=(0,va.useState)(null),[n,r]=(0,va.useState)(null),[i,a]=(0,va.useState)(!1),[o,s]=(0,va.useState)(null),[c,l]=(0,va.useState)(`all`),[u,d]=(0,va.useState)(``),f=(0,va.useRef)(null),p=()=>E.get(`/crawlers`).then(t).catch(e=>r(e.message));if((0,va.useEffect)(()=>{p()},[]),!e)return(0,ya.jsx)(_e,{error:n});let{settings:m,bots:h,traffic:g}=e,_=new Set(m.blocked),v=g?.bots||{},y=async e=>{a(!0);try{t(await E.put(`/crawlers`,{...m,...e})),r(null)}catch(e){r(e.message)}finally{a(!1)}},C=e=>{let t=new Set(_);t.has(e)?t.delete(e):t.add(e),y({blocked:[...t]})},w=(e,t)=>{let n=new Set(_);Object.entries(h).forEach(([r,i])=>{e(i,r)&&(t?n.add(r):n.delete(r))}),y({blocked:[...n]})},ee=async()=>{a(!0),s(null);try{s(await E.post(`/crawlers/verify`))}catch(e){r(e.message)}finally{a(!1)}},T=Object.entries(h),te=e=>T.filter(([t,n])=>(n.region||`us`)!==e||u&&n.vendor!==u?!1:c===`seen`?(v[t]?.hits||0)>0:c===`blocked`?_.has(t):c!==`ignoring`||v[t]?.ignoring),ne=[`OpenAI`,`Anthropic`,`Google`,`Perplexity`,`Meta`,`Microsoft`,`Apple`,`Amazon`],re=(()=>{let e=new Map;return T.forEach(([t,n])=>{let r=e.get(n.vendor)||{name:n.vendor,total:0,allowed:0,seen:0,hits:0};r.total+=1,_.has(t)||(r.allowed+=1),(v[t]?.hits||0)>0&&(r.seen+=1,r.hits+=v[t].hits),e.set(n.vendor,r)}),[...e.values()].map(e=>({...e,tone:e.allowed===0?`blocked`:e.seen>0?`seen`:`quiet`})).sort((e,t)=>{let n=ne.indexOf(e.name),r=ne.indexOf(t.name);return n!==-1||r!==-1?(n===-1?99:n)-(r===-1?99:r):t.total-e.total||e.name.localeCompare(t.name)}).slice(0,8)})(),ie=Object.keys(e.bots||{}).length,D=_.size,ae=m.enabled?D===0?{tone:`good`,text:S(b(`All %d known AI crawlers may read this site.`,`ai-rank-suite`),ie),why:b(`That is the right default for most sites: being read is how a page gets cited. Block one only when you have a reason.`,`ai-rank-suite`)}:{tone:`neutral`,text:S(x(`%1$d of %2$d AI crawlers is blocked.`,`%1$d of %2$d AI crawlers are blocked.`,D,`ai-rank-suite`),D,ie),why:b(`A blocked crawler cannot cite you. The log below shows whether it actually stopped — several ignore robots.txt.`,`ai-rank-suite`)}:{tone:`warning`,text:b(`Crawler rules are switched off, so robots.txt says nothing about AI crawlers.`,`ai-rank-suite`),why:b(`Without a rule every AI crawler reads the whole site by default. That is a decision worth making on purpose rather than by omission.`,`ai-rank-suite`)};return(0,ya.jsxs)(`div`,{className:`ars-page`,children:[n&&(0,ya.jsx)(M,{tone:`serious`,children:n}),(0,ya.jsx)(pa,{...ae}),(0,ya.jsx)(`div`,{className:`ars-opstrip`,role:`list`,children:re.map(e=>(0,ya.jsxs)(`button`,{type:`button`,role:`listitem`,className:`ars-optile is-${e.tone}${u===e.name?` is-active`:``}`,onClick:()=>{d(u===e.name?``:e.name),requestAnimationFrame(()=>f.current?.scrollIntoView({behavior:`smooth`,block:`start`}))},title:m.log?S(b(`%1$s: %2$d of %3$d crawlers allowed, %4$d seen here`,`ai-rank-suite`),e.name,e.allowed,e.total,e.seen):S(b(`%1$s: %2$d of %3$d crawlers allowed`,`ai-rank-suite`),e.name,e.allowed,e.total),children:[(0,ya.jsx)(`span`,{className:`ars-optile-name`,children:e.name}),(0,ya.jsx)(`span`,{className:`ars-optile-state`,children:e.allowed===e.total?b(`All allowed`,`ai-rank-suite`):e.allowed===0?b(`Blocked`,`ai-rank-suite`):S(b(`%1$d/%2$d allowed`,`ai-rank-suite`),e.allowed,e.total)}),(0,ya.jsx)(`span`,{className:`ars-optile-seen`,children:m.log?e.seen>0?S(x(`%s request`,`%s requests`,e.hits,`ai-rank-suite`),e.hits.toLocaleString()):b(`not seen yet`,`ai-rank-suite`):b(`not recording`,`ai-rank-suite`)})]},e.name))}),e.physical_robots_txt&&(0,ya.jsxs)(M,{tone:`warning`,children:[b(`A physical`,`ai-rank-suite`),` `,(0,ya.jsx)(`code`,{children:`robots.txt`}),` `,b(`file exists in the site root. WordPress cannot modify it, so nothing on this screen reaches the file crawlers actually read — delete it and let WordPress serve robots.txt, or copy these rules into it by hand.`,`ai-rank-suite`)]}),g?.defiant>0&&(0,ya.jsxs)(M,{tone:`serious`,children:[S(x(`%d crawler you have disallowed is still fetching pages. robots.txt is a request, not a fence — turn on`,`%d crawlers you have disallowed are still fetching pages. robots.txt is a request, not a fence — turn on`,g.defiant,`ai-rank-suite`),g.defiant),` `,(0,ya.jsx)(`b`,{children:b(`Refuse blocked crawlers`,`ai-rank-suite`)}),` `,b(`below to answer them with a 403 instead.`,`ai-rank-suite`)]}),(0,ya.jsx)(be,{columns:4,onSelect:m.log?void 0:e=>e===`seen`&&y({log:!0}),metrics:[{id:`seen`,label:b(`Crawlers seen`,`ai-rank-suite`),hint:b(`Distinct AI crawlers that have fetched at least one page since recording began.`,`ai-rank-suite`),value:m.log||(g?.seen||0)>0?g?.seen||0:`—`,accent:m.log?void 0:`var(--ars-accent)`,sub:m.log?S(b(`of %d known`,`ai-rank-suite`),T.length):b(`recording is off — click to turn it on`,`ai-rank-suite`)},{id:`requests`,label:b(`Requests recorded`,`ai-rank-suite`),hint:b(`Every crawler request that reached WordPress. A full-page cache serves most requests without PHP running, so this is a floor.`,`ai-rank-suite`),value:m.log||(g?.total||0)>0?(g?.total||0).toLocaleString():`—`,sub:b(`since recording began`,`ai-rank-suite`)},{id:`blocked`,label:b(`Disallowed`,`ai-rank-suite`),hint:b(`Crawlers your rules tell to stay away. robots.txt is a request, not a fence — the last cell shows who ignores it.`,`ai-rank-suite`),value:_.size,sub:b(`in robots.txt`,`ai-rank-suite`)},{id:`defiant`,label:b(`Ignoring the rules`,`ai-rank-suite`),hint:b(`Disallowed crawlers that kept fetching pages afterwards. For these, only the 403 has teeth.`,`ai-rank-suite`),value:g?.defiant||0,accent:g?.defiant>0?`var(--ars-c-red-ink)`:void 0,sub:g?.defiant>0?b(`still arriving after being blocked`,`ai-rank-suite`):b(`every blocked crawler stopped`,`ai-rank-suite`)}]}),(0,ya.jsxs)(k,{icon:(0,ya.jsx)(Ot,{size:16}),title:b(`Enforcement`,`ai-rank-suite`),subtitle:b(`What happens to a crawler you have disallowed`,`ai-rank-suite`),action:(0,ya.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,ya.jsxs)(A,{variant:`ghost`,busy:i,onClick:ee,children:[(0,ya.jsx)(yt,{size:13}),b(`Check the live robots.txt`,`ai-rank-suite`)]}),(0,ya.jsxs)(`a`,{href:e.robots_url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 text-[12px]`,children:[b(`View`,`ai-rank-suite`),(0,ya.jsx)(vt,{size:10})]})]}),children:[(0,ya.jsxs)(`div`,{className:`grid gap-2`,children:[(0,ya.jsx)(Ee,{checked:!!m.enabled,disabled:i,onChange:e=>y({enabled:e}),label:b(`Write the rules into robots.txt`,`ai-rank-suite`)}),(0,ya.jsx)(Ee,{checked:!!m.log,disabled:i,onChange:e=>y({log:e}),label:b(`Record which crawlers arrive`,`ai-rank-suite`)}),(0,ya.jsx)(`p`,{className:`m-0 ml-[48px] text-[12px]`,style:{color:`var(--ars-ink-2)`},children:b(`One small database write per crawler request. That is a fraction of a percent of a normal site's traffic, and it is the only way to know whether any of this is working — but it is your decision, so it is off until you make it.`,`ai-rank-suite`)}),(0,ya.jsx)(Ee,{checked:!!m.enforce,disabled:i,onChange:e=>y({enforce:e}),label:b(`Refuse blocked crawlers with a 403`,`ai-rank-suite`)}),(0,ya.jsx)(`p`,{className:`m-0 ml-[48px] text-[12px]`,style:{color:`var(--ars-ink-2)`},children:b(`robots.txt is a request. This is not — a disallowed crawler gets a 403 and no content. Use it for the ones the table below shows are ignoring you. A 403 rather than a 404 on purpose: a crawler told the page does not exist may drop the URL permanently.`,`ai-rank-suite`)})]}),o&&!o.ok&&(0,ya.jsx)(M,{tone:`serious`,children:o.reason}),o&&o.ok&&(0,ya.jsxs)(`div`,{className:`mt-3`,children:[o.missing.length===0?(0,ya.jsx)(M,{tone:`good`,children:S(b(`All %d disallow rules are present in the robots.txt the site actually serves.`,`ai-rank-suite`),o.present)}):(0,ya.jsx)(M,{tone:`serious`,children:S(x(`%1$d rule you set is not in the served file: %2$s. A CDN cache or a security plugin rewriting robots.txt is the usual cause.`,`%1$d rules you set are not in the served file: %2$s. A CDN cache or a security plugin rewriting robots.txt is the usual cause.`,o.missing.length,`ai-rank-suite`),o.missing.length,o.missing.map(e=>e.agent).join(`, `))}),(0,ya.jsx)(`pre`,{className:`ars-head-pre is-tall mt-2`,children:o.body})]})]}),(()=>{let e=Object.entries(h).filter(([,e])=>e.purpose===`on-demand`).map(([e])=>e),t=e.filter(e=>_.has(e)),n=t.length===0;return(0,ya.jsx)(k,{title:b(`Agentic browsing`,`ai-rank-suite`),subtitle:b(`When someone asks ChatGPT, Claude or Perplexity to open your site for them, these fetchers do the visit`,`ai-rank-suite`),action:(0,ya.jsx)(Ee,{checked:n,onChange:e=>w(e=>e.purpose===`on-demand`,!e),label:b(n?`Allowed`:`Blocked`,`ai-rank-suite`)}),children:(0,ya.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:n?S(b(`All %d on-demand fetchers may visit. This is how an assistant reads your prices or opening hours when a customer asks — blocking them makes you invisible in exactly those moments.`,`ai-rank-suite`),e.length):S(x(`%1$d of %2$d on-demand fetchers is blocked. An assistant asked about your site will answer from memory or from your competitors instead.`,`%1$d of %2$d on-demand fetchers are blocked. An assistant asked about your site will answer from memory or from your competitors instead.`,t.length,`ai-rank-suite`),t.length,e.length)})})})(),(0,ya.jsxs)(k,{icon:(0,ya.jsx)(mt,{size:16}),title:b(`Who may use your content`,`ai-rank-suite`),subtitle:b(`Grouped by where the operator is, because that is the decision people actually make`,`ai-rank-suite`),action:(0,ya.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,ya.jsx)(A,{variant:`ghost`,onClick:()=>w(e=>e.purpose===`training`,!0),children:b(`Block all training`,`ai-rank-suite`)}),(0,ya.jsx)(A,{variant:`ghost`,onClick:()=>w(e=>e.purpose!==`training`,!1),children:b(`Allow all search`,`ai-rank-suite`)}),_.size>0&&(0,ya.jsx)(A,{variant:`ghost`,onClick:()=>y({blocked:[]}),children:b(`Allow everything`,`ai-rank-suite`)})]}),flush:!0,children:[(0,ya.jsx)(`div`,{ref:f,className:`p-3`,style:{borderBottom:`1px solid var(--ars-border)`,scrollMarginTop:12},children:(0,ya.jsx)(Ve,{label:b(`Show`,`ai-rank-suite`),value:c,onChange:l,options:[{id:`all`,label:u||`All`,count:u?T.filter(([,e])=>e.vendor===u).length:T.length},{id:`seen`,label:b(`Seen here`,`ai-rank-suite`),count:g?.seen||0},{id:`blocked`,label:b(`Disallowed`,`ai-rank-suite`),count:_.size},{id:`ignoring`,label:b(`Ignoring you`,`ai-rank-suite`),count:g?.defiant||0}]})}),ba.map(e=>{let t=te(e.id);return t.length===0?null:(0,ya.jsxs)(`div`,{children:[(0,ya.jsxs)(`div`,{className:`ars-crawl-region`,children:[(0,ya.jsx)(`b`,{children:e.label}),(0,ya.jsx)(`span`,{children:e.hint})]}),t.map(([e,t])=>{let n=v[e]||{},r=xa[t.purpose]||xa.training,a=_.has(e);return(0,ya.jsxs)(`div`,{className:`ars-crawl-row${n.ignoring?` is-defiant`:``}`,children:[(0,ya.jsxs)(`div`,{className:`min-w-0`,children:[(0,ya.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,ya.jsx)(`b`,{className:`text-[13px]`,children:t.vendor}),(0,ya.jsx)(`code`,{className:`ars-head-code`,children:t.ua}),(0,ya.jsx)(`span`,{title:r.why,children:(0,ya.jsx)(j,{tone:r.tone,children:r.label})}),t.note===`unreliable`&&(0,ya.jsx)(`span`,{className:`ars-tag`,title:b(`This vendor is widely reported to fetch without a named identifier, so the rule is a best effort.`,`ai-rank-suite`),children:b(`identifier unreliable`,`ai-rank-suite`)}),n.ignoring&&(0,ya.jsx)(j,{tone:`serious`,children:b(`ignoring robots.txt`,`ai-rank-suite`)})]}),(0,ya.jsx)(`div`,{className:`ars-crawl-meta`,children:n.hits>0?(0,ya.jsxs)(ya.Fragment,{children:[(0,ya.jsx)(`b`,{className:`tabular-nums`,children:n.hits.toLocaleString()}),` `,x(`request`,`requests`,n.hits,`ai-rank-suite`),n.recent>0&&(0,ya.jsxs)(ya.Fragment,{children:[` · `,S(b(`%s in the last 7 days`,`ai-rank-suite`),n.recent.toLocaleString())]}),n.last>0&&(0,ya.jsxs)(ya.Fragment,{children:[` · `,S(b(`last %s`,`ai-rank-suite`),new Date(n.last*1e3).toLocaleDateString())]}),n.blocked>0&&(0,ya.jsxs)(ya.Fragment,{children:[` · `,S(b(`%s refused`,`ai-rank-suite`),n.blocked.toLocaleString())]})]}):m.log?b(`never seen here`,`ai-rank-suite`):r.why})]}),n.series&&n.hits>0&&(0,ya.jsx)(`div`,{className:`ars-crawl-spark`,children:(0,ya.jsx)(Le,{data:n.series,height:26,color:`var(--ars-brand)`})}),(0,ya.jsxs)(`div`,{className:`ars-crawl-switch`,children:[(0,ya.jsx)(`span`,{className:`t-caption`,children:b(a?`Blocked`:`Allowed`,`ai-rank-suite`)}),(0,ya.jsx)(Ee,{checked:a,disabled:i,onChange:()=>C(e)})]})]},e)})]},e.id)})]}),(0,ya.jsxs)(ot,{title:b(`What blocking actually costs you`,`ai-rank-suite`),children:[(0,ya.jsxs)(`p`,{children:[b(`The three purposes are not interchangeable, and the switch means something different for each. A`,`ai-rank-suite`),` `,(0,ya.jsx)(`b`,{children:b(`training`,`ai-rank-suite`)}),` `,b(`crawler reads your pages to train a model; blocking it costs you nothing you would ever have received. A`,`ai-rank-suite`),` `,(0,ya.jsx)(`b`,{children:b(`search index`,`ai-rank-suite`)}),` `,b(`crawler builds the index the assistant answers from — block that and you cannot be cited at all, which is the opposite of what this plugin is for. An`,`ai-rank-suite`),` `,(0,ya.jsx)(`b`,{children:b(`on-demand`,`ai-rank-suite`)}),` `,b(`fetch happens because a user asked about your page a second ago; blocking it is blocking a visitor.`,`ai-rank-suite`)]}),(0,ya.jsx)(`p`,{children:b(`Blocking every AI crawler is a legitimate position, and it is the position that guarantees you are never in an AI answer. Most sites want the middle: no training, yes search, yes on demand — which is exactly what the two bulk buttons above do.`,`ai-rank-suite`)}),(0,ya.jsx)(`p`,{children:b(`robots.txt is honoured voluntarily. The table shows which crawlers keep arriving after being told not to; for those, the 403 is the only thing that has teeth. Note that a full-page cache serves most requests without PHP running, so both the recording and the 403 only see what reaches WordPress.`,`ai-rank-suite`)})]})]})}var va,ya,ba,xa,Sa=o((()=>{C(),va=u(f(),1),D(),at(),ct(),ha(),Ft(),ya=O(),ba=[{id:`us`,label:b(`United States`,`ai-rank-suite`),hint:b(`ChatGPT, Claude, Gemini, Perplexity — the assistants most of your visitors use today`,`ai-rank-suite`)},{id:`eu`,label:b(`Europe`,`ai-rank-suite`),hint:b(`Mistral and Yandex`,`ai-rank-suite`)},{id:`cn`,label:b(`China`,`ai-rank-suite`),hint:b(`Doubao, Qwen, ERNIE, Kimi, Huawei and DeepSeek — the fastest-growing source of AI answers outside the US, and the most aggressive crawlers on this list`,`ai-rank-suite`)}],xa={training:{label:b(`Training`,`ai-rank-suite`),tone:`neutral`,why:b(`Reads your pages to train a model. Blocking costs you nothing today and nothing tomorrow — no citation comes from this.`,`ai-rank-suite`)},search:{label:b(`Search index`,`ai-rank-suite`),tone:`brand`,why:b(`Builds the index the assistant answers from. Block this and you cannot be cited at all.`,`ai-rank-suite`)},"on-demand":{label:b(`On demand`,`ai-rank-suite`),tone:`brand`,why:b(`Fetches your page because a user asked about it right now. Blocking this is blocking a visitor.`,`ai-rank-suite`)}}}));function Ca(){let[e,t]=(0,wa.useState)(null),[n,r]=(0,wa.useState)(``),[i,a]=(0,wa.useState)(null),[o,s]=(0,wa.useState)(null),[c,l]=(0,wa.useState)(null),[u,d]=(0,wa.useState)(null),[f,p]=(0,wa.useState)(!1),[m,h]=(0,wa.useState)(null),[g,_]=(0,wa.useState)(null),[v,y]=(0,wa.useState)(null);if((0,wa.useEffect)(()=>{E.get(`/bing`).then(t).catch(e=>_(e.message)),E.get(`/gsc/status`).then(y).catch(()=>y(null))},[]),(0,wa.useEffect)(()=>{e?.has_key&&(E.get(`/bing/stats`).then(a).catch(e=>_(e.message)),E.get(`/bing/keywords`).then(s).catch(()=>{}),E.get(`/bing/quota`).then(l).catch(()=>{}))},[e?.has_key]),!e)return(0,Ta.jsx)(_e,{error:g});let C=(()=>{let e=String(v?.property||``);if(!e)return``;if(e.startsWith(`sc-domain:`))return e.slice(10);try{return new URL(e).host}catch{return e}})(),w=(()=>{try{return new URL(e.site).host}catch{return e.site}})(),ee=C&&w&&(C===w||C===w.replace(/^www\./,``)||w===C.replace(/^www\./,``)),T=async e=>{p(!0),_(null),h(null);try{await e()}catch(e){_(e.message)}finally{p(!1)}};return(0,Ta.jsxs)(`div`,{className:`ars-page`,children:[v&&(0,Ta.jsxs)(k,{title:b(`Take it over from Google`,`ai-rank-suite`),subtitle:v.connected?b(`The same account owns both: Bing can import the site, its verification and its sitemaps from Search Console in one step.`,`ai-rank-suite`):b(`Connect Google first; Bing can then import the site from Search Console in one step.`,`ai-rank-suite`),action:v.connected?(0,Ta.jsx)(`a`,{className:`ars-btn ars-btn-primary`,href:`https://www.bing.com/webmasters/import`,target:`_blank`,rel:`noreferrer noopener`,children:b(`Import from Search Console at Bing ↗`,`ai-rank-suite`)}):(0,Ta.jsx)(A,{onClick:()=>{window.location.hash=`/search-console`},children:b(`Connect Google`,`ai-rank-suite`)}),children:[!v.connected&&(0,Ta.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-3)`},children:b(`Once Google is connected, this card shows the Search Console property next to the site Bing expects and opens the import at Bing in one click.`,`ai-rank-suite`)}),v.connected&&(0,Ta.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-2 text-[13px]`,children:[(0,Ta.jsxs)(`div`,{children:[(0,Ta.jsx)(`div`,{className:`t-caption`,children:b(`Google property`,`ai-rank-suite`)}),(0,Ta.jsx)(`code`,{children:v.property})]}),(0,Ta.jsxs)(`div`,{children:[(0,Ta.jsx)(`div`,{className:`t-caption`,children:b(`Site Bing expects`,`ai-rank-suite`)}),(0,Ta.jsx)(`code`,{children:e.site}),` `,ee?(0,Ta.jsx)(j,{tone:`good`,children:b(`same site`,`ai-rank-suite`)}):(0,Ta.jsx)(j,{tone:`warning`,children:b(`different host`,`ai-rank-suite`)})]}),(0,Ta.jsx)(`p`,{className:`m-0 sm:col-span-2`,style:{color:`var(--ars-ink-3)`,fontSize:12.5},children:b(`Sign in at Bing with the same Google account, choose this property, and Bing copies the verification. Then create an API key under Settings → API access and paste it below; from that moment clicks, index coverage and URL submission run here.`,`ai-rank-suite`)})]})]}),(0,Ta.jsx)(k,{title:b(`Bing Webmaster Tools`,`ai-rank-suite`),subtitle:b(`The index Copilot retrieves from — and the one search plugin authors skip`,`ai-rank-suite`),action:e.has_key?(0,Ta.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Key stored`,`ai-rank-suite`),` `,e.key_hint]}):(0,Ta.jsx)(j,{tone:`neutral`,children:b(`Not connected`,`ai-rank-suite`)}),children:(0,Ta.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Ta.jsxs)(ot,{title:b(`Why bother with Bing at all`,`ai-rank-suite`),open:!e.has_key,children:[(0,Ta.jsx)(`p`,{children:b(`Treating Bing as the small second search engine was defensible until Copilot shipped. Microsoft’s assistant retrieves through the Bing index, and so do several products that licence it. A page Bing has not crawled cannot be cited by anything built on Bing, whatever Google thinks of it.`,`ai-rank-suite`)}),(0,Ta.jsx)(`p`,{children:b(`The API also gives you something Google does not: direct URL submission with a published daily quota. No waiting for a crawl — you push the URL and it enters the index.`,`ai-rank-suite`)})]}),(0,Ta.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Ta.jsxs)(`div`,{children:[(0,Ta.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`API key`,`ai-rank-suite`)}),(0,Ta.jsx)(`input`,{type:`password`,placeholder:e.has_key?S(b(`Stored (%s) — type to replace`,`ai-rank-suite`),e.key_hint):b(`From Bing Webmaster → Settings → API access`,`ai-rank-suite`),value:n,onChange:e=>r(e.target.value),autoComplete:`off`}),(0,Ta.jsxs)(`p`,{className:`m-0 mt-1.5 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[b(`Encrypted on this site, never returned by the API.`,`ai-rank-suite`),` `,(0,Ta.jsx)(`a`,{href:`https://www.bing.com/webmasters/settings`,target:`_blank`,rel:`noreferrer noopener`,children:b(`Get a key ↗`,`ai-rank-suite`)})]})]}),(0,Ta.jsxs)(`div`,{children:[(0,Ta.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Registered site`,`ai-rank-suite`)}),(0,Ta.jsx)(`input`,{type:`text`,value:e.site,readOnly:!0}),(0,Ta.jsx)(`p`,{className:`m-0 mt-1.5 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Bing matches on the exact spelling you registered, including http/https and www.`,`ai-rank-suite`)})]})]}),(0,Ta.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Ta.jsx)(A,{onClick:()=>T(async()=>{t(await E.put(`/bing`,{api_key:n.trim()})),r(``),d(null)}),busy:f,children:b(`Save key`,`ai-rank-suite`)}),(0,Ta.jsx)(A,{variant:`ghost`,onClick:()=>T(async()=>{let e=await E.post(`/bing/verify`,{});d(e),l(await E.get(`/bing/quota`).catch(()=>null))}),busy:f,disabled:!e.has_key,children:b(`Test connection`,`ai-rank-suite`)}),u?.ok&&u.registered&&(0,Ta.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Connected and site registered`,`ai-rank-suite`)]}),u?.ok&&!u.registered&&(0,Ta.jsx)(j,{tone:`warning`,children:b(`Key works, but this site is not in the account`,`ai-rank-suite`)})]}),u?.ok&&!u.registered&&(0,Ta.jsxs)(M,{tone:`warning`,children:[b(`The key is valid but`,`ai-rank-suite`),` `,(0,Ta.jsx)(`code`,{children:u.site}),` `,b(`is not one of the sites it can see`,`ai-rank-suite`),u.sites.length>0?S(b(`: it has %s`,`ai-rank-suite`),u.sites.join(`, `)):``,`. `,b(`Add and verify this exact URL in Bing Webmaster Tools — a trailing slash or a missing www counts as a different site.`,`ai-rank-suite`)]}),m&&(0,Ta.jsx)(M,{tone:`good`,children:m}),g&&(0,Ta.jsx)(M,{tone:`serious`,children:g})]})}),e.has_key&&i&&(0,Ta.jsx)(k,{title:b(`Performance on Bing`,`ai-rank-suite`),subtitle:b(`Clicks, impressions and index coverage`,`ai-rank-suite`),action:(0,Ta.jsx)(A,{variant:`ghost`,busy:f,onClick:()=>T(async()=>a(await E.get(`/bing/stats?refresh=1`))),children:b(`Refresh`,`ai-rank-suite`)}),children:(0,Ta.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Ta.jsx)(be,{columns:4,metrics:[{id:`clicks`,label:b(`Clicks`,`ai-rank-suite`),hint:b(`Times somebody chose your result on Bing and arrived on the site.`,`ai-rank-suite`),value:i.clicks??`—`},{id:`impressions`,label:b(`Impressions`,`ai-rank-suite`),hint:b(`Times a page of yours appeared in Bing results.`,`ai-rank-suite`),value:i.impressions??`—`},{id:`ctr`,label:b(`CTR`,`ai-rank-suite`),hint:b(`Clicks as a share of impressions.`,`ai-rank-suite`),value:i.ctr??`—`,unit:i.ctr==null?``:`%`},{id:`indexed`,label:b(`Pages indexed`,`ai-rank-suite`),hint:b(`URLs Bing currently holds in its index — a page not here cannot be cited by anything built on Bing.`,`ai-rank-suite`),value:i.indexed??`—`}]}),i.rows.length>1?(0,Ta.jsx)(je,{data:i.rows.map(e=>({label:e.date,value:e.clicks})),height:140}):(0,Ta.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Bing has not returned enough days yet to draw a trend.`,`ai-rank-suite`)})]})}),e.has_key&&(0,Ta.jsx)(k,{title:b(`Push URLs into the index`,`ai-rank-suite`),subtitle:c?S(b(`%1$s submissions left today · %2$s this month`,`ai-rank-suite`),c.daily,c.monthly):b(`Direct submission — no waiting for a crawl`,`ai-rank-suite`),action:(0,Ta.jsx)(A,{onClick:()=>T(async()=>{let e=await E.post(`/bing/submit-recent`,{limit:25});h(S(x(`%d URL submitted to Bing.`,`%d URLs submitted to Bing.`,e.submitted,`ai-rank-suite`),e.submitted)),l(await E.get(`/bing/quota`).catch(()=>null))}),busy:f,children:b(`Submit 25 newest pages`,`ai-rank-suite`)}),children:(0,Ta.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`Worth doing after a migration, a bulk edit, or whenever you publish something you want answered on today. Submissions spend a published daily allowance, so this pushes your most recently modified pages rather than the whole site.`,`ai-rank-suite`)})}),e.has_key&&o&&o.rows.length>0&&(0,Ta.jsx)(k,{title:b(`Queries Bing already shows you for`,`ai-rank-suite`),subtitle:b(`Ranked by impressions`,`ai-rank-suite`),children:(0,Ta.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Ta.jsxs)(`table`,{className:`ars-table`,children:[(0,Ta.jsx)(`thead`,{children:(0,Ta.jsxs)(`tr`,{children:[(0,Ta.jsx)(`th`,{children:b(`Query`,`ai-rank-suite`)}),(0,Ta.jsx)(`th`,{style:{textAlign:`right`},children:b(`Clicks`,`ai-rank-suite`)}),(0,Ta.jsx)(`th`,{style:{textAlign:`right`},children:b(`Impressions`,`ai-rank-suite`)}),(0,Ta.jsx)(`th`,{style:{textAlign:`right`},children:b(`Position`,`ai-rank-suite`)})]})}),(0,Ta.jsx)(`tbody`,{children:o.rows.slice(0,50).map(e=>(0,Ta.jsxs)(`tr`,{children:[(0,Ta.jsx)(`td`,{children:e.query}),(0,Ta.jsx)(`td`,{style:{textAlign:`right`},children:e.clicks}),(0,Ta.jsx)(`td`,{style:{textAlign:`right`},children:e.impressions}),(0,Ta.jsx)(`td`,{style:{textAlign:`right`},children:e.position?e.position.toFixed(1):`—`})]},e.query))})]})})})]})}var wa,Ta,Ea=o((()=>{wa=u(f(),1),C(),D(),at(),ct(),Ta=O()}));function Da({value:e}){return e==null?(0,R.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`—`}):(0,R.jsx)(Re,{value:e})}function Oa({tracked:e,onTrack:t}){let[n,r]=(0,Aa.useState)(null),[i,a]=(0,Aa.useState)({client_id:``,client_secret:``,developer_token:``,customer_id:``,login_customer_id:``,language_id:`1000`,geo_target_ids:`2784`}),[o,s]=(0,Aa.useState)(``),[c,l]=(0,Aa.useState)(``),[u,d]=(0,Aa.useState)([]),[f,p]=(0,Aa.useState)(!1),[m,h]=(0,Aa.useState)(null),[g,_]=(0,Aa.useState)(null),[v,y]=(0,Aa.useState)(null);if((0,Aa.useEffect)(()=>{E.get(`/rank/serp`).then(_).catch(()=>_(!1)),E.get(`/rank/planner/status`).then(e=>{r(e),a(t=>({...t,...e,client_secret:``,developer_token:``,geo_target_ids:(e.geo_target_ids||[]).join(`, `)}))}).catch(()=>r(!1))},[]),n===null||n===!1)return null;let x=e=>t=>a(n=>({...n,[e]:t.target.value})),C=async e=>{p(!0),h(null);try{await e()}catch(e){h(e.message)}finally{p(!1)}},w=e=>C(async()=>{let t=await E.post(`/rank/serp`,{limit:25,force:e});y(t),_(await E.get(`/rank/serp`))});return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(k,{title:b(`Live positions`,`ai-rank-suite`),subtitle:b(`Where this site stands today for the keywords you track, asked of a search engine rather than averaged out of Search Console.`,`ai-rank-suite`),children:g&&g.provider?(0,R.jsxs)(`div`,{className:`grid gap-2`,children:[(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,R.jsx)(A,{busy:f,onClick:()=>w(!1),children:b(`Check positions now`,`ai-rank-suite`)}),(0,R.jsx)(A,{variant:`ghost`,busy:f,onClick:()=>w(!0),children:b(`Check again today`,`ai-rank-suite`)}),(0,R.jsx)(`span`,{className:`t-caption`,children:S(b(`Asking %s — each check spends one lookup from your quota.`,`ai-rank-suite`),g.provider)})]}),v&&(0,R.jsxs)(`div`,{className:`t-caption`,children:[S(b(`%1$s checked, %2$s found in the results, %3$s already done today, %4$s failed.`,`ai-rank-suite`),Number(v.checked||0).toLocaleString(),Number(v.found||0).toLocaleString(),Number(v.skipped||0).toLocaleString(),Number(v.failed||0).toLocaleString()),(v.errors||[]).length>0&&(0,R.jsx)(`ul`,{className:`m-0 mt-1 pl-4`,children:v.errors.slice(0,5).map((e,t)=>(0,R.jsxs)(`li`,{children:[(0,R.jsx)(`code`,{children:e.keyword}),` — `,e.message]},t))})]})]}):(0,R.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`No SERP provider is set up yet. Add one under SEO data providers and this becomes a daily position check for every keyword you track — including the ones you do not rank for yet, which Search Console cannot show you at all.`,`ai-rank-suite`)})}),(0,R.jsxs)(k,{title:b(`Google Keyword Planner`,`ai-rank-suite`),subtitle:b(`Live search-volume ideas from your own Google Ads account; suggestions are never saved until you choose Track`,`ai-rank-suite`),children:[m&&(0,R.jsx)(M,{tone:`serious`,children:m}),n.configured?n.connected?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-2`,children:[(0,R.jsx)(Ke,{label:b(`Seed keywords`,`ai-rank-suite`),hint:b(`Up to 20, one per line or comma-separated`,`ai-rank-suite`),children:(0,R.jsx)(`textarea`,{rows:3,value:o,onChange:e=>s(e.target.value)})}),(0,R.jsx)(Ke,{label:b(`Page URL`,`ai-rank-suite`),hint:b(`Optional; must be on this site`,`ai-rank-suite`),children:(0,R.jsx)(`input`,{type:`url`,value:c,onChange:e=>l(e.target.value),placeholder:window.location.origin+`/page/`})})]}),(0,R.jsxs)(`div`,{className:`flex gap-2 mt-3 flex-wrap`,children:[(0,R.jsx)(A,{busy:f,disabled:!o.trim()&&!c.trim(),onClick:()=>C(async()=>{let e=await E.post(`/rank/planner/ideas`,{keywords:o.split(/[\n,]+/).map(e=>e.trim()).filter(Boolean).slice(0,20),page_url:c,page_size:100});d(e.ideas||[])}),children:b(`Find keyword ideas`,`ai-rank-suite`)}),(0,R.jsx)(A,{variant:`ghost`,onClick:()=>C(async()=>r(await E.post(`/rank/planner/disconnect`))),children:b(`Disconnect`,`ai-rank-suite`)})]}),u.length>0&&(0,R.jsx)(`div`,{className:`ars-table-wrap mt-4`,style:{maxHeight:480},children:(0,R.jsx)(`div`,{className:`ars-table-wrap`,children:(0,R.jsxs)(`table`,{className:`ars-table`,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{children:b(`Keyword`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{className:`is-num`,children:b(`Monthly searches`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{children:b(`Competition`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{className:`is-num`,children:b(`Top bid range`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{})]})}),(0,R.jsx)(`tbody`,{children:u.map(n=>(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`td`,{className:`font-medium`,children:n.keyword}),(0,R.jsx)(`td`,{className:`is-num`,children:n.avg_monthly.toLocaleString()}),(0,R.jsx)(`td`,{children:n.competition.replaceAll(`_`,` `)}),(0,R.jsxs)(`td`,{className:`is-num`,children:[(n.low_bid_micros/1e6).toFixed(2),`–`,(n.high_bid_micros/1e6).toFixed(2)]}),(0,R.jsx)(`td`,{children:(0,R.jsx)(A,{variant:`ghost`,disabled:e.includes(n.keyword),onClick:()=>t(n.keyword),children:e.includes(n.keyword)?`Tracked`:`Track`})})]},n.keyword))})]})})})]}):(0,R.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[(0,R.jsx)(j,{tone:`warning`,children:b(`Not connected`,`ai-rank-suite`)}),(0,R.jsx)(A,{busy:f,onClick:()=>C(async()=>{let e=await E.get(`/rank/planner/connect-url`);window.location.assign(e.url)}),children:b(`Connect Google Ads`,`ai-rank-suite`)}),(0,R.jsx)(A,{variant:`ghost`,onClick:()=>r({...n,configured:!1}),children:b(`Edit settings`,`ai-rank-suite`)})]}):(0,R.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-2`,children:[(0,R.jsx)(Ke,{label:b(`OAuth client ID`,`ai-rank-suite`),children:(0,R.jsx)(`input`,{value:i.client_id,onChange:x(`client_id`)})}),(0,R.jsx)(Ke,{label:b(`OAuth client secret`,`ai-rank-suite`),hint:n.has_client_secret?`Saved — leave blank to keep it`:``,children:(0,R.jsx)(`input`,{type:`password`,value:i.client_secret,onChange:x(`client_secret`)})}),(0,R.jsx)(Ke,{label:b(`Developer token`,`ai-rank-suite`),hint:n.has_developer_token?`Saved — leave blank to keep it`:`From Google Ads API Center`,children:(0,R.jsx)(`input`,{type:`password`,value:i.developer_token,onChange:x(`developer_token`)})}),(0,R.jsx)(Ke,{label:b(`Customer ID`,`ai-rank-suite`),hint:b(`Digits only; hyphens are accepted`,`ai-rank-suite`),children:(0,R.jsx)(`input`,{value:i.customer_id,onChange:x(`customer_id`)})}),(0,R.jsx)(Ke,{label:b(`Manager customer ID`,`ai-rank-suite`),hint:b(`Optional MCC login customer`,`ai-rank-suite`),children:(0,R.jsx)(`input`,{value:i.login_customer_id,onChange:x(`login_customer_id`)})}),(0,R.jsx)(Ke,{label:b(`Language constant ID`,`ai-rank-suite`),children:(0,R.jsx)(`input`,{value:i.language_id,onChange:x(`language_id`)})}),(0,R.jsx)(Ke,{label:b(`Geo target IDs`,`ai-rank-suite`),hint:b(`Comma-separated; 2784 is UAE`,`ai-rank-suite`),children:(0,R.jsx)(`input`,{value:i.geo_target_ids,onChange:x(`geo_target_ids`)})}),(0,R.jsx)(`div`,{className:`flex items-end`,children:(0,R.jsx)(A,{busy:f,onClick:()=>C(async()=>r(await E.put(`/rank/planner/settings`,i))),children:b(`Save Google Ads settings`,`ai-rank-suite`)})}),(0,R.jsxs)(`p`,{className:`m-0 md:col-span-2 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[b(`OAuth redirect URI:`,`ai-rank-suite`),(0,R.jsx)(`code`,{children:n.redirect_uri})]})]})]})]})}function ka(){let[e,t]=(0,Aa.useState)(null),[n,r]=(0,Aa.useState)(``),[i,a]=(0,Aa.useState)(!1),[o,s]=(0,Aa.useState)(null),[c,l]=(0,Aa.useState)(null),[u,d]=(0,Aa.useState)(null),[f,p]=(0,Aa.useState)(null),m=new URLSearchParams(window.location.hash.split(`?`)[1]||``);(0,Aa.useEffect)(()=>{E.get(`/rank/keywords`).then(t).catch(e=>s(e.message)),E.get(`/rank/trend?days=90`).then(e=>p(e.days||[])).catch(()=>p([]))},[]),(0,Aa.useEffect)(()=>{c&&(d(null),E.get(`/rank/history/${c.id}?days=90`).then(e=>d(e.history)).catch(()=>d([])))},[c]);let h=async e=>{a(!0),s(null);try{t(await e())}catch(e){s(e.message)}finally{a(!1)}};if(!e)return(0,R.jsx)(_e,{error:o});let g=e.keywords.length,_=e.keywords.filter(e=>e.position!==null),v=_.filter(e=>e.position<=10).length,y=_.length?(_.reduce((e,t)=>e+t.position,0)/_.length).toFixed(1):`—`;return(0,R.jsxs)(`div`,{className:`ars-page`,children:[m.get(`ads_connected`)&&(0,R.jsx)(M,{tone:`good`,children:b(`Google Ads is connected. Keyword Planner is ready.`,`ai-rank-suite`)}),m.get(`ads_error`)&&(0,R.jsx)(M,{tone:`serious`,children:m.get(`ads_error`)}),o&&(0,R.jsx)(M,{tone:`serious`,children:o}),!e.connected&&(0,R.jsx)(M,{children:b(`This tracks your average position from your own Google Search Console data — not independent SERP rankings. Connect a property under “Search Console” to start collecting positions.`,`ai-rank-suite`)}),(0,R.jsx)(Oa,{tracked:(e.keywords||[]).map(e=>e.keyword),onTrack:e=>h(()=>E.post(`/rank/keywords`,{keyword:e}))}),(0,R.jsx)(be,{columns:4,metrics:[{id:`tracked`,label:b(`Tracked keywords`,`ai-rank-suite`),hint:b(`Everything a snapshot is stored for daily — added by hand or imported from your top queries.`,`ai-rank-suite`),value:g},{id:`ranked`,label:b(`With position data`,`ai-rank-suite`),hint:b(`Keywords Google has reported a position for. The rest are waiting on their first snapshot.`,`ai-rank-suite`),value:_.length},{id:`top10`,label:b(`In top 10`,`ai-rank-suite`),hint:b(`Ranking on page one — the only page most people ever see.`,`ai-rank-suite`),value:v},{id:`avg`,label:b(`Avg. position`,`ai-rank-suite`),hint:b(`Averaged across every keyword with a position. Lower is better.`,`ai-rank-suite`),value:y}]}),f&&f.length>1&&(0,R.jsxs)(k,{title:b(`Average position over time`,`ai-rank-suite`),subtitle:b(`Across every tracked keyword that had a position that day — lower is better`,`ai-rank-suite`),action:(0,R.jsx)(Re,{value:Number((f[0].value-f[f.length-1].value).toFixed(1)),suffix:` ${b(`since the first snapshot`,`ai-rank-suite`)}`}),children:[(0,R.jsx)(je,{data:f,label:b(`Average position`,`ai-rank-suite`),color:`var(--ars-series-1)`,height:150,invert:!0,formatValue:e=>`#${e}`}),(0,R.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-3 mt-3`,children:[[`top3`,b(`In the top 3`,`ai-rank-suite`)],[`top10`,b(`On page one`,`ai-rank-suite`)],[`clicks`,b(`Clicks that day`,`ai-rank-suite`)]].map(([e,t])=>{let n=f[f.length-1]?.[e]??0,r=f[0]?.[e]??0;return(0,R.jsxs)(`div`,{className:`ars-r-md px-3 py-2.5`,style:{background:`var(--ars-surface-2)`},children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,R.jsx)(`span`,{className:`text-[12px] font-semibold`,style:{color:`var(--ars-ink-2)`},children:t}),(0,R.jsx)(Re,{value:n-r})]}),(0,R.jsx)(`div`,{className:`t-num text-[18px] font-bold mt-0.5`,children:n.toLocaleString()})]},e)})})]}),(e.distribution||[]).filter(e=>e.top3+e.mid+e.low>0).length>=2&&(0,R.jsx)(k,{title:b(`Position distribution`,`ai-rank-suite`),subtitle:b(`Every tracked keyword with a position, per daily snapshot — Top 3, page one, and pages two to five`,`ai-rank-suite`),children:(0,R.jsx)(Ge,{stacked:!0,height:130,data:e.distribution.map(e=>({label:e.d.slice(5),top3:e.top3,mid:e.mid,low:e.low})),series:[{key:`top3`,label:b(`Top 3`,`ai-rank-suite`),color:`var(--ars-c-green-ink)`},{key:`mid`,label:`4–10`,color:`var(--ars-brand)`},{key:`low`,label:`11–50`,color:`var(--ars-accent)`}]})}),(0,R.jsxs)(k,{title:b(`Keywords`,`ai-rank-suite`),subtitle:b(`A snapshot is stored daily; the top 25 queries are picked up automatically`,`ai-rank-suite`),action:(0,R.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,R.jsxs)(A,{variant:`ghost`,busy:i,onClick:()=>h(()=>E.post(`/rank/sync`)),disabled:!e.connected,children:[(0,R.jsx)(yt,{size:13}),b(`Sync now`,`ai-rank-suite`)]})}),children:[(0,R.jsxs)(`form`,{className:`flex gap-2 mb-4`,onSubmit:e=>{e.preventDefault(),n.trim()&&h(async()=>{let e=await E.post(`/rank/keywords`,{keyword:n});return r(``),e})},children:[(0,R.jsx)(`input`,{type:`text`,placeholder:b(`Add a keyword to track…`,`ai-rank-suite`),value:n,onChange:e=>r(e.target.value)}),(0,R.jsx)(A,{type:`submit`,busy:i,disabled:!n.trim(),children:b(`Track`,`ai-rank-suite`)})]}),(0,R.jsx)(`div`,{className:`mb-4`,children:(0,R.jsx)(Rr,{taken:(e.keywords||[]).map(e=>e.keyword),onPick:e=>h(()=>E.post(`/rank/keywords`,{keyword:e}))})}),g===0?(0,R.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`No keywords yet. Add one above, or hit “Sync now” to import your top queries from Search Console.`,`ai-rank-suite`)}):(0,R.jsx)(`div`,{className:`ars-table-wrap`,children:(0,R.jsx)(`div`,{className:`ars-table-wrap`,children:(0,R.jsxs)(`table`,{className:`ars-table`,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{children:b(`Keyword`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{className:`is-num`,children:b(`Position`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{className:`is-num`,children:b(`7-day change`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{className:`is-mid`,style:{width:110},children:b(`30 days`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{className:`is-num`,children:b(`Clicks`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{className:`is-num`,children:b(`Impressions`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{})]})}),(0,R.jsx)(`tbody`,{children:e.keywords.map(e=>(0,R.jsxs)(`tr`,{onClick:()=>l(e),style:{cursor:`pointer`},children:[(0,R.jsxs)(`td`,{className:`font-medium`,children:[e.keyword,e.source===`auto`&&(0,R.jsx)(`span`,{className:`ml-2`,children:(0,R.jsx)(j,{tone:`neutral`,children:`auto`})})]}),(0,R.jsx)(`td`,{className:`is-num`,children:(0,R.jsx)(Me,{value:e.position})}),(0,R.jsx)(`td`,{className:`is-num`,children:(0,R.jsx)(Da,{value:e.change})}),(0,R.jsx)(`td`,{className:`is-mid`,children:(e.history||[]).length>=3?(0,R.jsx)(`span`,{style:{display:`inline-block`,width:96,color:`var(--ars-brand)`},children:(0,R.jsx)(Le,{data:e.history.map(e=>-e.position),height:22})}):(0,R.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`—`})}),(0,R.jsx)(`td`,{className:`is-num`,children:e.clicks}),(0,R.jsx)(`td`,{className:`is-num`,children:e.impressions}),(0,R.jsx)(`td`,{className:`is-num`,children:(0,R.jsx)(`button`,{type:`button`,"aria-label":b(`Stop tracking`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer`,style:{color:`var(--ars-ink-3)`},onClick:t=>{t.stopPropagation(),h(()=>E.del(`/rank/keywords/${e.id}`))},children:(0,R.jsx)(Mt,{size:14})})})]},e.id))})]})})}),e.synced_at>0&&(0,R.jsxs)(`p`,{className:`m-0 mt-3 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[`Last sync: `,new Date(e.synced_at*1e3).toLocaleString()]})]}),c&&(0,R.jsx)(k,{title:S(b(`Position history — %s`,`ai-rank-suite`),c.keyword),subtitle:b(`The axis is flipped: a rising line means you are climbing towards position 1`,`ai-rank-suite`),action:(0,R.jsx)(A,{variant:`ghost`,onClick:()=>l(null),children:b(`Close`,`ai-rank-suite`)}),children:u===null?(0,R.jsx)(`p`,{className:`m-0`,children:b(`Loading…`,`ai-rank-suite`)}):u.length<2?(0,R.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Not enough snapshots yet — history builds up one day at a time.`,`ai-rank-suite`)}):(0,R.jsx)(je,{label:b(`Google position`,`ai-rank-suite`),color:`var(--ars-series-1)`,invert:!0,data:u.map(e=>({date:e.date,value:e.position})),formatValue:e=>`#${Number(e).toFixed(1)}`})}),(0,R.jsx)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[{title:b(`Gaining positions`,`ai-rank-suite`),rows:e.movers.winners,up:!0},{title:b(`Losing positions`,`ai-rank-suite`),rows:e.movers.losers,up:!1}].map(e=>(0,R.jsx)(k,{title:e.title,children:e.rows.length===0?(0,R.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Nothing to report yet.`,`ai-rank-suite`)}):(0,R.jsx)(`div`,{className:`ars-table-wrap`,children:(0,R.jsx)(`table`,{className:`ars-table`,children:(0,R.jsx)(`tbody`,{children:e.rows.map(e=>(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`td`,{className:`font-medium`,children:e.keyword}),(0,R.jsxs)(`td`,{className:`is-num`,style:{color:`var(--ars-ink-3)`},children:[`#`,e.position?.toFixed(1)]}),(0,R.jsx)(`td`,{className:`is-num`,children:(0,R.jsx)(Da,{value:e.change})})]},e.id))})})})},e.title))})]})}var Aa,R,ja=o((()=>{Aa=u(f(),1),C(),D(),Vr(),at(),Ft(),R=O()})),Ma=c({default:()=>Ia});function Na({status:e,onStatus:t}){let[n,r]=(0,Va.useState)(``),[i,a]=(0,Va.useState)(``),[o,s]=(0,Va.useState)(!1),[c,l]=(0,Va.useState)(null),u=async()=>{s(!0),l(null);try{t(await E.put(`/gsc/credentials`,{client_id:n,client_secret:i}))}catch(e){l(e.message)}finally{s(!1)}},d=async()=>{s(!0),l(null);try{let{url:e}=await E.get(`/gsc/connect-url`);window.location.href=e}catch(e){l(e.message),s(!1)}},[f,p]=(0,Va.useState)(!e.signin_available);return(0,z.jsxs)(k,{title:b(`Connect Google`,`ai-rank-suite`),subtitle:e.signin_available?b(`One sign-in connects Search Console and Analytics — read-only, revocable any time in your Google account`,`ai-rank-suite`):b(`Your data, your Google Cloud project — no third-party proxy`,`ai-rank-suite`),children:[e.signin_available&&(0,z.jsxs)(`div`,{className:`ars-signin`,children:[(0,z.jsxs)(`button`,{type:`button`,className:`ars-google-btn`,onClick:async()=>{s(!0),l(null);try{let{url:e}=await E.get(`/gsc/signin-url`);window.location.href=e}catch(e){l(e.message),s(!1)}},disabled:o,children:[(0,z.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 48 48`,"aria-hidden":!0,children:[(0,z.jsx)(`path`,{fill:`#EA4335`,d:`M24 9.5c3.5 0 6.6 1.2 9.1 3.6l6.8-6.8C35.8 2.5 30.3 0 24 0 14.6 0 6.5 5.4 2.6 13.3l7.9 6.1C12.4 13.6 17.7 9.5 24 9.5z`}),(0,z.jsx)(`path`,{fill:`#4285F4`,d:`M46.5 24.5c0-1.6-.1-3.1-.4-4.5H24v9h12.7c-.6 3-2.3 5.5-4.8 7.2l7.5 5.8c4.4-4 7.1-10 7.1-17.5z`}),(0,z.jsx)(`path`,{fill:`#FBBC05`,d:`M10.5 28.6A14.5 14.5 0 0 1 9.7 24c0-1.6.3-3.1.8-4.6l-7.9-6.1A24 24 0 0 0 0 24c0 3.9.9 7.5 2.6 10.7l7.9-6.1z`}),(0,z.jsx)(`path`,{fill:`#34A853`,d:`M24 48c6.5 0 11.9-2.1 15.9-5.8l-7.5-5.8c-2.1 1.4-4.9 2.3-8.4 2.3-6.3 0-11.6-4.1-13.5-9.9l-7.9 6.1C6.5 42.6 14.6 48 24 48z`})]}),b(o?`Opening Google…`:`Sign in with Google`,`ai-rank-suite`)]}),(0,z.jsxs)(`p`,{className:`m-0 t-caption`,children:[b(`Google asks you to allow read access to Search Console and Analytics; nothing is written to your account. Tokens are stored encrypted on this site. Prefer your own Cloud project?`,`ai-rank-suite`),` `,(0,z.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>p(e=>!e),children:b(f?`Hide the manual setup`:`Use your own credentials instead`,`ai-rank-suite`)})]}),c&&(0,z.jsx)(`p`,{className:`m-0`,style:{color:`var(--ars-serious)`},children:c})]}),f&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`ol`,{className:`m-0 pl-5 grid gap-3 text-[13px]`,children:[(0,z.jsxs)(`li`,{children:[b(`Open`,`ai-rank-suite`),` `,(0,z.jsx)(`a`,{href:`https://console.cloud.google.com/apis/credentials`,target:`_blank`,rel:`noreferrer`,children:b(`Google Cloud Console → Credentials`,`ai-rank-suite`)}),` `,b(`and create an`,`ai-rank-suite`),` `,(0,z.jsx)(`strong`,{children:b(`OAuth client ID`,`ai-rank-suite`)}),` `,b(`(type: Web application).`,`ai-rank-suite`)]}),(0,z.jsxs)(`li`,{children:[b(`Enable the`,`ai-rank-suite`),` `,(0,z.jsx)(`strong`,{children:b(`Search Console API`,`ai-rank-suite`)}),` `,b(`for the project (APIs & Services → Library).`,`ai-rank-suite`)]}),(0,z.jsxs)(`li`,{children:[b(`Add this exact redirect URI:`,`ai-rank-suite`),(0,z.jsx)(`code`,{className:`ars-mono block mt-1 px-3 py-2 ars-r-md select-all`,style:{background:`var(--ars-surface-2)`},children:e.redirect_uri})]}),(0,z.jsx)(`li`,{children:b(`Paste the client credentials here:`,`ai-rank-suite`)})]}),(0,z.jsxs)(`div`,{className:`grid gap-3 mt-3 max-w-[520px]`,children:[(0,z.jsx)(`input`,{type:`text`,placeholder:b(`Client ID (…apps.googleusercontent.com)`,`ai-rank-suite`),value:n,onChange:e=>r(e.target.value)}),(0,z.jsx)(`input`,{type:`password`,placeholder:b(`Client secret`,`ai-rank-suite`),value:i,onChange:e=>a(e.target.value)}),(0,z.jsxs)(`div`,{className:`flex gap-2 items-center flex-wrap`,children:[(0,z.jsx)(A,{variant:`ghost`,onClick:u,busy:o,disabled:!n||!i,children:b(`Save credentials`,`ai-rank-suite`)}),(0,z.jsx)(A,{onClick:d,busy:o,disabled:!e.has_credentials,children:b(`Connect with Google →`,`ai-rank-suite`)}),e.has_credentials&&(0,z.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Credentials stored`,`ai-rank-suite`)]})]}),!e.has_credentials&&(0,z.jsx)(`p`,{className:`m-0 t-caption`,children:b(!n||!i?`Paste both the client ID and the secret above to save them — connecting needs stored credentials.`:`Save the credentials first; the Google consent screen is opened with them.`,`ai-rank-suite`)}),c&&(0,z.jsx)(`p`,{className:`m-0`,style:{color:`var(--ars-serious)`},children:c})]})]})]})}function Pa({status:e,onStatus:t}){let[n,r]=(0,Va.useState)(null),[i,a]=(0,Va.useState)(null);return(0,Va.useEffect)(()=>{E.get(`/gsc/sites`).then(e=>r(e.sites)).catch(e=>a(e.message))},[]),(0,z.jsxs)(k,{title:b(`Choose your property`,`ai-rank-suite`),subtitle:b(`Verified Search Console properties of the connected Google account`,`ai-rank-suite`),children:[i&&(0,z.jsx)(M,{tone:`serious`,children:i}),!n&&!i&&(0,z.jsx)(`p`,{style:{color:`var(--ars-ink-2)`},children:b(`Loading properties…`,`ai-rank-suite`)}),n&&(0,z.jsxs)(`div`,{className:`grid gap-2 max-w-[520px]`,children:[n.length===0&&(0,z.jsx)(`p`,{className:`m-0`,children:b(`No verified properties found for this account.`,`ai-rank-suite`)}),n.map(e=>(0,z.jsx)(A,{variant:`ghost`,onClick:()=>E.put(`/gsc/property`,{site:e}).then(t),children:e},e))]})]})}function Fa({status:e,onStatus:t}){let[n,r]=(0,Va.useState)(`clicks`),[i,a]=(0,Va.useState)(28),[o,s]=(0,Va.useState)(null),[c,l]=(0,Va.useState)(null);(0,Va.useEffect)(()=>{s(null),E.get(`/gsc/performance?days=${i}`).then(s).catch(e=>l(e.message))},[i]);let u=e=>e>=1e4?`${(e/1e3).toFixed(1)}k`:String(e);return(0,z.jsxs)(`div`,{className:`ars-page`,children:[(0,z.jsx)(`div`,{className:`flex items-center justify-end gap-3 flex-wrap`,children:(0,z.jsx)(Ae,{tabs:[{id:7,label:b(`7 days`,`ai-rank-suite`)},{id:28,label:b(`28 days`,`ai-rank-suite`)},{id:90,label:b(`90 days`,`ai-rank-suite`)}],active:i,onChange:a})}),c&&(0,z.jsx)(M,{tone:`serious`,children:c}),!o&&!c&&(0,z.jsx)(k,{children:(0,z.jsx)(`p`,{className:`m-0`,style:{color:`var(--ars-ink-2)`},children:b(`Fetching Search Console data…`,`ai-rank-suite`)})}),o&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(be,{columns:3,active:n,onSelect:r,metrics:[{id:`clicks`,label:b(`Clicks`,`ai-rank-suite`),hint:b(`Times somebody chose your result and arrived on the site.`,`ai-rank-suite`),value:u(o.totals.clicks),delta:La(o.totals.clicks,o.previous?.clicks),accent:`var(--ars-series-1)`},{id:`impressions`,label:b(`Impressions`,`ai-rank-suite`),hint:b(`Times a page of yours appeared in a result list at all.`,`ai-rank-suite`),value:u(o.totals.impressions),delta:La(o.totals.impressions,o.previous?.impressions),accent:`var(--ars-series-2)`},{id:`ctr`,label:b(`CTR`,`ai-rank-suite`),hint:b(`Clicks as a share of impressions. A high position with a low CTR is usually a weak title or description.`,`ai-rank-suite`),value:`${o.totals.ctr}`,unit:`%`,delta:La(o.totals.ctr,o.previous?.ctr),accent:`var(--ars-c-green-ink)`},{id:`position`,label:b(`Average position`,`ai-rank-suite`),hint:b(`Lower is better. Averaged across every query you appear for, so a flood of new page-nine queries can push it down while nothing got worse.`,`ai-rank-suite`),value:o.totals.position,delta:La(o.totals.position,o.previous?.position),invert:!0,accent:`var(--ars-accent)`},{id:`queries`,label:b(`Queries`,`ai-rank-suite`),hint:b(`Distinct searches you appeared for in this period. Growth here is reach, whether or not it has turned into clicks yet.`,`ai-rank-suite`),value:u(o.queries?.length||0),sub:b(`in the top set`,`ai-rank-suite`)},{id:`topten`,label:b(`On page one`,`ai-rank-suite`),hint:b(`Queries where your average position is 10 or better — the only ones most people ever see.`,`ai-rank-suite`),value:u((o.queries||[]).filter(e=>Number(e.position)<=10).length),sub:b(`position 10 or better`,`ai-rank-suite`)}]}),(0,z.jsx)(k,{flush:!0,children:(0,z.jsx)(`div`,{className:`px-1.5 pt-3 pb-2`,children:(0,z.jsx)(je,{label:Ha[n]?.label||b(`Clicks`,`ai-rank-suite`),color:Ha[n]?.color||`var(--ars-series-1)`,data:o.series.map(e=>({date:e.date,value:e[Ha[n]?.key||`clicks`]})),height:220,invert:n===`position`,formatValue:n===`ctr`?e=>`${e}%`:void 0,bleed:!0})})}),(0,z.jsx)(Ra,{data:o,fmt:u})]})]})}function Ia({tab:e=`performance`,onTab:t}){let[n,r]=(0,Va.useState)(null),[i,a]=(0,Va.useState)(null),o=new URLSearchParams(window.location.hash.split(`?`)[1]||``);if((0,Va.useEffect)(()=>{E.get(`/gsc/status`).then(r).catch(e=>a(e.message))},[]),!n)return(0,z.jsx)(_e,{error:i});let s=!n.connected&&n.signin_available&&!n.has_credentials?{tone:`neutral`,text:b(`Search Console and Analytics are not connected yet.`,`ai-rank-suite`),why:b(`One sign-in with Google connects both — read-only, revocable in your Google account at any time. Rank snapshots cannot be backfilled; the trend starts the day you connect.`,`ai-rank-suite`)}:!n.has_credentials&&!n.connected?{tone:`neutral`,text:b(`Search Console is not set up — no Google credentials yet.`,`ai-rank-suite`),why:b(`Clicks, impressions and positions come from your own Search Console property. It takes a client id and secret from Google Cloud once; after that the connection renews itself.`,`ai-rank-suite`)}:n.connected?{tone:`good`,text:S(b(`Connected to %s.`,`ai-rank-suite`),n.property||b(`your Search Console property`,`ai-rank-suite`)),why:b(`Reports below are read live from Google. Positions are recorded daily so the rank trend can exist later.`,`ai-rank-suite`)}:{tone:`warning`,text:b(`Credentials are saved but Google has not been authorised yet.`,`ai-rank-suite`),why:b(`One click on Connect opens Google, you pick the account, and the data starts flowing. Rank snapshots cannot be backfilled — the trend starts the day you connect.`,`ai-rank-suite`)};return(0,z.jsxs)(`div`,{className:`ars-page`,children:[o.get(`error`)&&(0,z.jsx)(M,{tone:`serious`,children:decodeURIComponent(o.get(`error`))}),(0,z.jsx)(pa,{...s}),(()=>{let{tabs:n,active:r}=op([{id:`performance`,label:b(`Google`,`ai-rank-suite`)},{id:`keywords`,label:b(`Keywords`,`ai-rank-suite`),needs:`rank_tracker`},{id:`bing`,label:b(`Bing`,`ai-rank-suite`)}],e);return r!==e&&setTimeout(()=>t(r),0),(0,z.jsx)(Ae,{tabs:n,active:r,onChange:t})})(),e===`bing`?(0,z.jsx)(Ca,{}):e===`keywords`?(0,z.jsx)(ka,{}):(0,z.jsxs)(z.Fragment,{children:[!n.connected&&(0,z.jsx)(Na,{status:n,onStatus:r}),n.connected&&!n.property&&(0,z.jsx)(Pa,{status:n,onStatus:r}),n.connected&&n.property&&(0,z.jsx)(Fa,{status:n,onStatus:r}),n.connected&&n.property&&(0,z.jsx)(Se,{title:b(`Search Console connection`,`ai-rank-suite`),note:n.property,children:(0,z.jsxs)(`div`,{className:`grid gap-3`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,z.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Connected`,`ai-rank-suite`)]}),(0,z.jsx)(`span`,{className:`text-[12.5px] ars-mono`,style:{color:`var(--ars-ink-2)`},children:n.property})]}),(0,z.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Disconnecting stops the daily snapshots. The history already recorded stays — it cannot be rebuilt from Google, so nothing here deletes it.`,`ai-rank-suite`)}),(0,z.jsx)(`div`,{children:(0,z.jsx)(A,{variant:`danger`,onClick:()=>E.post(`/gsc/disconnect`).then(r),children:b(`Disconnect`,`ai-rank-suite`)})})]})})]})]})}function La(e,t){return!t||t===0?null:Math.round((e-t)/t*1e3)/10}function Ra({data:e,fmt:t}){let[n,r]=(0,Va.useState)(`questions`),i=e.questions||{totals:{},rows:[]};return(0,z.jsxs)(`div`,{className:`grid gap-3`,children:[(0,z.jsx)(Ve,{label:b(`Look at`,`ai-rank-suite`),value:n,onChange:r,options:[{id:`questions`,label:b(`Questions`,`ai-rank-suite`),count:i.rows?.length||0},{id:`striking`,label:b(`Nearly page one`,`ai-rank-suite`),count:e.striking?.length||0},{id:`ignored`,label:b(`Shown, not clicked`,`ai-rank-suite`),count:e.ignored?.length||0},{id:`movement`,label:b(`Gained & lost`,`ai-rank-suite`)},{id:`all`,label:b(`Everything`,`ai-rank-suite`)}]}),n===`questions`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(k,{title:b(`Question queries`,`ai-rank-suite`),subtitle:b(`The queries AI answers consume first — high impressions, and a click-through that falls as the answer moves above the result`,`ai-rank-suite`),children:[(0,z.jsx)(be,{columns:3,metrics:[{id:`share`,label:b(`Share of impressions`,`ai-rank-suite`),hint:b(`How much of everything you are shown for is question-shaped.`,`ai-rank-suite`),value:Number.isFinite(Number(i.share))?i.share:`—`,unit:Number.isFinite(Number(i.share))?`%`:``},{id:`question-ctr`,label:b(`Click-through on questions`,`ai-rank-suite`),hint:b(`Clicks as a share of impressions, on the question queries alone.`,`ai-rank-suite`),value:i.totals?.question?.ctr??`—`,unit:i.totals?.question?.ctr==null?``:`%`,sub:S(b(`against %s%% on everything else`,`ai-rank-suite`),i.totals?.other?.ctr??0)},{id:`question-position`,label:b(`Average position`,`ai-rank-suite`),hint:b(`Averaged across the question queries. Lower is better.`,`ai-rank-suite`),value:i.totals?.question?.position??`—`,sub:S(b(`%s distinct questions`,`ai-rank-suite`),(i.totals?.question?.n??0).toLocaleString())}]}),i.totals?.question?.ctr>0&&i.totals?.other?.ctr>0&&(0,z.jsx)(`div`,{className:`mt-3`,children:(0,z.jsx)(Ue,{segments:[{label:b(`Question queries`,`ai-rank-suite`),value:i.totals.question.impressions,color:`var(--ars-brand)`},{label:b(`Everything else`,`ai-rank-suite`),value:i.totals.other.impressions,color:`var(--ars-surface-3)`}]})})]}),(0,z.jsx)(za,{title:b(`Every question you rank for`,`ai-rank-suite`),rows:i.rows,keyLabel:b(`Question`,`ai-rank-suite`),fmt:t}),(0,z.jsxs)(ot,{title:b(`Why this segment is worth watching on its own`,`ai-rank-suite`),children:[(0,z.jsx)(`p`,{children:b(`A question query is the shape an AI answer eats. When an overview or an assistant answers it above your result, the impression still counts and the click does not — so the signature of AI cannibalisation is this segment's click-through falling while its impressions hold or rise. Comparing it against your non-question queries is the closest thing to measuring that from inside Search Console, which does not report it directly.`,`ai-rank-suite`)}),(0,z.jsx)(`p`,{children:b(`If it is happening, the response is not to fight for the click. It is to be the source the answer quotes: an answer-first opening, question-shaped sub-headings, and FAQ markup. All three are on the page editor's Full report tab.`,`ai-rank-suite`)})]})]}),n===`striking`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(k,{title:b(`Nearly page one`,`ai-rank-suite`),subtitle:b(`Positions 4–15, ordered by what three places of improvement would actually be worth`,`ai-rank-suite`),flush:!0,children:(0,z.jsx)(`div`,{className:`ars-table-wrap`,children:(0,z.jsxs)(`table`,{className:`ars-table`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{children:b(`Query`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Position`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Impr.`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Clicks`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Upside`,`ai-rank-suite`)})]})}),(0,z.jsx)(`tbody`,{children:(e.striking||[]).map(e=>(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`td`,{className:`font-medium`,children:e.key}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.position}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:t(e.impressions)}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.clicks}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:(0,z.jsxs)(`b`,{style:{color:`var(--ars-brand)`},children:[`+`,e.upside]})})]},e.key))})]})})}),(0,z.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Upside is roughly the clicks three positions of improvement would add, from published click-through curves — not a measurement of your site. It is here to rank these against each other, not as a forecast.`,`ai-rank-suite`)})]}),n===`ignored`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(k,{title:b(`Shown and not clicked`,`ai-rank-suite`),subtitle:b(`Ranking well with a click-through far below what that position normally earns — the ranking is fine and the snippet is wrong`,`ai-rank-suite`),flush:!0,children:(0,z.jsx)(`div`,{className:`ars-table-wrap`,children:(0,z.jsxs)(`table`,{className:`ars-table`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{children:b(`Page`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Position`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Impr.`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`CTR`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Usual`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Clicks lost`,`ai-rank-suite`)})]})}),(0,z.jsx)(`tbody`,{children:(e.ignored||[]).map(e=>(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`td`,{className:`font-medium`,title:e.key,children:(0,z.jsx)(`span`,{className:`ars-url`,children:e.key.replace(/^https?:\/\/[^/]+/,``)||e.key})}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.position}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:t(e.impressions)}),(0,z.jsxs)(`td`,{className:`is-num is-narrow tabular-nums`,style:{color:`var(--ars-serious)`},children:[e.actual_ctr,`%`]}),(0,z.jsxs)(`td`,{className:`is-num is-narrow tabular-nums`,style:{color:`var(--ars-ink-3)`},children:[e.expected_ctr,`%`]}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:(0,z.jsx)(`b`,{children:e.lost})})]},e.key))})]})})}),(0,z.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Every one of these is a title and description problem, which is the cheapest thing on this list to fix. Note that an AI overview sitting above your result depresses click-through at every position, so a page answering a question may appear here without anything being wrong with its snippet.`,`ai-rank-suite`)})]}),n===`movement`&&(0,z.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:[(0,z.jsx)(Ba,{title:b(`Gained`,`ai-rank-suite`),rows:e.movement?.gained||[],fmt:t,tone:`good`}),(0,z.jsx)(Ba,{title:b(`Lost`,`ai-rank-suite`),rows:e.movement?.lost||[],fmt:t,tone:`bad`})]}),n===`all`&&(0,z.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:[(0,z.jsx)(za,{title:b(`Top queries`,`ai-rank-suite`),rows:e.queries,keyLabel:b(`Query`,`ai-rank-suite`),fmt:t}),(0,z.jsx)(za,{title:b(`Top pages`,`ai-rank-suite`),rows:e.pages,keyLabel:b(`Page`,`ai-rank-suite`),fmt:t,strip:!0})]})]})}function za({title:e,rows:t,keyLabel:n,fmt:r,strip:i=!1}){return(0,z.jsx)(k,{title:e,flush:!0,children:(0,z.jsx)(`div`,{className:`ars-table-wrap`,style:{maxHeight:460},children:(0,z.jsxs)(`table`,{className:`ars-table`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{children:n}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Clicks`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Impr.`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`CTR`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Pos.`,`ai-rank-suite`)})]})}),(0,z.jsx)(`tbody`,{children:(t||[]).map(e=>(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`td`,{className:`font-medium`,style:{maxWidth:300},title:e.key,children:(0,z.jsx)(`span`,{className:`ars-url`,children:i&&e.key.replace(/^https?:\/\/[^/]+/,``)||e.key})}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.clicks}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:r(e.impressions)}),(0,z.jsxs)(`td`,{className:`is-num is-narrow tabular-nums`,children:[e.ctr,`%`]}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.position})]},e.key))})]})})})}function Ba({title:e,rows:t,fmt:n,tone:r}){return(0,z.jsx)(k,{title:e,subtitle:b(`Against the same number of days immediately before`,`ai-rank-suite`),flush:!0,children:(0,z.jsx)(`div`,{className:`ars-table-wrap`,children:(0,z.jsxs)(`table`,{className:`ars-table`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{children:b(`Page`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Before`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Now`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Change`,`ai-rank-suite`)})]})}),(0,z.jsxs)(`tbody`,{children:[t.map(e=>(0,z.jsxs)(`tr`,{children:[(0,z.jsxs)(`td`,{className:`font-medium`,title:e.key,children:[(0,z.jsx)(`span`,{className:`ars-url`,children:e.key.replace(/^https?:\/\/[^/]+/,``)||e.key}),e.gone&&(0,z.jsx)(j,{tone:`serious`,children:b(`gone`,`ai-rank-suite`)}),e.new&&(0,z.jsx)(j,{tone:`brand`,children:b(`new`,`ai-rank-suite`)})]}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.before}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.clicks}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:(0,z.jsxs)(`b`,{style:{color:e.change>0?`#1a7f45`:`var(--ars-serious)`},children:[e.change>0?`+`:``,e.change]})})]},e.key)),t.length===0&&(0,z.jsx)(`tr`,{children:(0,z.jsx)(`td`,{colSpan:4,style:{color:`var(--ars-ink-3)`},children:b(`Nothing moved enough to report.`,`ai-rank-suite`)})})]})]})})})}var Va,z,Ha,Ua=o((()=>{C(),Va=u(f(),1),D(),Sp(),ha(),Ea(),at(),ct(),ja(),z=O(),Ha={clicks:{key:`clicks`,label:b(`Clicks`,`ai-rank-suite`),color:`var(--ars-series-1)`},impressions:{key:`impressions`,label:b(`Impressions`,`ai-rank-suite`),color:`var(--ars-series-2)`},ctr:{key:`ctr`,label:b(`CTR`,`ai-rank-suite`),color:`var(--ars-c-green-ink)`},position:{key:`position`,label:b(`Average position`,`ai-rank-suite`),color:`var(--ars-accent)`},queries:{key:`clicks`,label:b(`Clicks`,`ai-rank-suite`),color:`var(--ars-series-1)`},topten:{key:`clicks`,label:b(`Clicks`,`ai-rank-suite`),color:`var(--ars-series-1)`}}}));function Wa(e,{flashMs:t=2200}={}){let[n,r]=(0,Ga.useState)(null),[i,a]=(0,Ga.useState)(!1),[o,s]=(0,Ga.useState)(!1),[c,l]=(0,Ga.useState)(null),u=(0,Ga.useCallback)(()=>{E.get(e).then(r).catch(e=>l(e.message))},[e]);(0,Ga.useEffect)(u,[u]);let d=(0,Ga.useCallback)(e=>r(t=>t&&{...t,settings:{...t.settings,...e}}),[]),f=(0,Ga.useCallback)(async i=>{let o=i&&typeof i==`object`&&!i.nativeEvent&&!i.target?i:void 0;a(!0),l(null);try{let i=await E.put(e,o??n.settings);return r(i),s(!0),setTimeout(()=>s(!1),t),i}catch(e){throw l(e.message),e}finally{a(!1)}},[e,n,t]),p=(0,Ga.useCallback)(async e=>{a(!0),l(null);try{return await e()}catch(e){return l(e.message),null}finally{a(!1)}},[]);return{data:n,setData:r,s:n?.settings,update:d,save:f,run:p,busy:i,saved:o,error:c,setError:l,reload:u}}var Ga,Ka=o((()=>{Ga=u(f(),1),D()}));function qa(){let{data:e,setData:t,s:n,update:r,save:i,busy:a,saved:o,error:s}=Wa(`/settings/social`);if(!e)return(0,Ja.jsx)(_e,{error:s});let c=e.image_meta,l=n.default_image&&c&&(c.width<1200||c.height<630)?S(b(`This image is %1$d×%2$dpx — sharp link previews need 1200×630 or larger.`,`ai-rank-suite`),c.width,c.height):null;return(0,Ja.jsxs)(`div`,{className:`ars-page`,children:[s&&(0,Ja.jsx)(M,{tone:`serious`,children:s}),(0,Ja.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-2 items-start`,children:[(0,Ja.jsx)(k,{title:b(`Sharing defaults`,`ai-rank-suite`),subtitle:b(`Site-wide behavior — every page can still override it individually`,`ai-rank-suite`),action:(0,Ja.jsxs)(`div`,{className:`flex items-center gap-2`,children:[o&&(0,Ja.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,Ja.jsx)(A,{onClick:i,busy:a,children:b(`Save`,`ai-rank-suite`)})]}),children:(0,Ja.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Ja.jsxs)(`div`,{children:[(0,Ja.jsx)(qe,{label:b(`Default share image`,`ai-rank-suite`),title:b(`Select the default share image`,`ai-rank-suite`),value:n.default_image,onChange:e=>r({default_image:e}),hint:b(`Used whenever a page has no featured image and no per-page override — nothing ships without an image anymore. 1200×630 or larger for sharp link previews.`,`ai-rank-suite`)}),c&&!l&&n.default_image&&(0,Ja.jsx)(`div`,{className:`mt-1.5`,children:(0,Ja.jsxs)(j,{tone:`good`,children:[`✓ `,c.width,`×`,c.height,`px — perfect`]})}),l&&(0,Ja.jsx)(`div`,{className:`mt-1.5`,children:(0,Ja.jsx)(M,{tone:`warning`,children:l})})]}),(0,Ja.jsx)(Ee,{checked:!!n.og_locale,onChange:e=>r({og_locale:e}),label:S(b(`Output og:locale (%s)`,`ai-rank-suite`),e.locale)}),(0,Ja.jsx)(Ee,{checked:!!n.article_meta,onChange:e=>r({article_meta:e}),label:b(`Output article meta on posts (published/modified time, author, section, tags)`,`ai-rank-suite`)}),(0,Ja.jsxs)(`div`,{className:`grid gap-3 pt-2`,style:{borderTop:`1px solid var(--ars-border)`},children:[(0,Ja.jsx)(`div`,{className:`font-semibold text-[13px]`,children:b(`Publisher accounts`,`ai-rank-suite`)}),(0,Ja.jsxs)(`div`,{children:[(0,Ja.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`X / Twitter handle`,`ai-rank-suite`)}),(0,Ja.jsx)(`input`,{type:`text`,placeholder:`@yourbrand`,value:n.tw_site,onChange:e=>r({tw_site:e.target.value})})]}),(0,Ja.jsxs)(`div`,{children:[(0,Ja.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Facebook page URL`,`ai-rank-suite`)}),(0,Ja.jsx)(`input`,{type:`text`,placeholder:`https://www.facebook.com/yourbrand`,value:n.fb_page,onChange:e=>r({fb_page:e.target.value})})]}),(0,Ja.jsxs)(`div`,{children:[(0,Ja.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Facebook App ID (optional)`,`ai-rank-suite`)}),(0,Ja.jsx)(`input`,{type:`text`,placeholder:`1234567890`,value:n.fb_app_id,onChange:e=>r({fb_app_id:e.target.value})})]})]})]})}),(0,Ja.jsxs)(`div`,{className:`grid gap-5`,children:[(0,Ja.jsx)(k,{title:b(`Social profiles`,`ai-rank-suite`),subtitle:b(`These feed your Organization's sameAs — how Google and AI assistants connect your site to your accounts`,`ai-rank-suite`),children:(0,Ja.jsxs)(`div`,{className:`grid gap-3`,children:[Object.entries(e.networks).map(([e,t])=>(0,Ja.jsxs)(`div`,{children:[(0,Ja.jsx)(`label`,{className:`block font-medium mb-1`,children:t}),(0,Ja.jsx)(`input`,{type:`text`,placeholder:`https://…`,value:(n.profiles||{})[e]||``,onChange:t=>r({profiles:{...n.profiles,[e]:t.target.value}})})]},e)),(0,Ja.jsx)(`div`,{children:(0,Ja.jsx)(A,{onClick:i,busy:a,children:b(`Save`,`ai-rank-suite`)})})]})}),(0,Ja.jsx)(k,{title:b(`Validate`,`ai-rank-suite`),subtitle:b(`Check how the big platforms actually see your site — opens with your URL prefilled`,`ai-rank-suite`),children:(0,Ja.jsxs)(`div`,{className:`grid gap-2`,children:[e.validators.map(e=>(0,Ja.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`flex items-center justify-between ars-r-lg px-4 py-3 font-medium text-[13px]`,style:{background:`var(--ars-surface-2)`,textDecoration:`none`,color:`var(--ars-ink)`},children:[e.label,(0,Ja.jsx)(`span`,{"aria-hidden":!0,style:{color:`var(--ars-brand)`},children:`↗`})]},e.label)),(0,Ja.jsx)(`p`,{className:`m-0 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`WhatsApp, Slack, Discord and Telegram all read the same Open Graph tags — if Facebook's debugger is happy, they all are.`,`ai-rank-suite`)})]})})]})]})]})}var Ja,Ya=o((()=>{f(),C(),Ka(),D(),at(),Ja=O()})),Xa=c({default:()=>$a});function Za(e,t){return e?e.replaceAll(`%sitename%`,re.siteName||window.airanksuiteData?.siteName||``).replaceAll(`%tagline%`,window.airanksuiteData?.tagline||``).replaceAll(`%sep%`,t).replace(/%([a-z0-9_]+)%/gi,e=>no[e]??``).replace(/\s{2,}/g,` `).trim():``}function Qa({variables:e,className:t=``}){return(0,eo.jsx)(`div`,{className:`flex flex-wrap gap-1.5 text-[12px] ${t}`,style:{color:`var(--ars-ink-3)`},children:Object.entries(e).map(([e,t])=>(0,eo.jsx)(`code`,{title:t,className:`ars-mono px-1.5 py-0.5 rounded`,style:{background:`var(--ars-surface-2)`},children:e},e))})}function $a({tab:e=`general`,onTab:t}){let{data:n,setData:r,s:i,update:a,save:o,busy:s,saved:c,error:l}=Wa(`/settings/seo`);if(!n)return(0,eo.jsx)(_e,{error:l});let u=n.variables||{},d=n.post_types||[],f=i.templates||{},p=(e,t,n)=>a({templates:{...f,[e]:{...f[e]||{},[t]:n}}}),m=()=>(0,eo.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,eo.jsx)(A,{onClick:o,busy:s,children:b(`Save`,`ai-rank-suite`)}),c&&(0,eo.jsx)(j,{tone:`good`,children:`✓ Saved`})]}),h=`${re.homeUrl.replace(/\/$/,``)}/what-is-geo-optimization/`,g=n.conflict&&!i.force_output?{tone:`neutral`,text:S(b(`%s is writing titles and metas, so this plugin steps back.`,`ai-rank-suite`),n.conflict),why:b(`Two plugins writing the same tags produce duplicate <title>s. Force output below only after switching the other one off.`,`ai-rank-suite`)}:i.enabled?{tone:`good`,text:S(b(`Titles follow “%s”.`,`ai-rank-suite`),i.title_template||`%title% %sep% %sitename%`),why:b(`The templates below are the default for every page; a page with its own SEO title in the editor overrides them.`,`ai-rank-suite`)}:{tone:`warning`,text:b(`Title and meta output is switched off.`,`ai-rank-suite`),why:b(`Pages fall back to whatever the theme prints — usually the bare post title and no description at all.`,`ai-rank-suite`)};return(0,eo.jsxs)(`div`,{className:`ars-page`,children:[(0,eo.jsx)(pa,{...g}),n.conflict&&(0,eo.jsxs)(M,{tone:i.force_output?`serious`:`warning`,children:[(0,eo.jsx)(`strong`,{children:n.conflict}),` `,b(`is active and already outputs SEO meta tags.`,`ai-rank-suite`),` `,i.force_output?b(`Forced output is ON — you will get duplicate tags unless you disable the other plugin.`,`ai-rank-suite`):b(`AI Rank Suite automatically defers its SEO output to avoid duplicates; per-page analysis keeps working. Enable “Force output” only after disabling the other plugin.`,`ai-rank-suite`)]}),l&&(0,eo.jsx)(M,{tone:`serious`,children:l}),(0,eo.jsx)(Ae,{tabs:[{id:`general`,label:b(`General`,`ai-rank-suite`)},{id:`templates`,label:b(`Templates`,`ai-rank-suite`)},{id:`social`,label:b(`Social`,`ai-rank-suite`)},{id:`rss`,label:b(`RSS`,`ai-rank-suite`)}],active:e,onChange:t}),e===`general`&&(0,eo.jsx)(k,{title:b(`On-page SEO output`,`ai-rank-suite`),subtitle:b(`Title tag, meta description, canonical, Open Graph and Twitter cards — the tags every engine and assistant reads. Set them once as a pattern; override per page only where it earns its keep.`,`ai-rank-suite`),action:c&&(0,eo.jsx)(j,{tone:`good`,children:`✓ Saved`}),children:(0,eo.jsxs)(`div`,{className:`grid gap-4`,children:[(0,eo.jsx)(Ee,{checked:!!i.enabled,onChange:e=>a({enabled:e}),label:b(`Enable SEO output`,`ai-rank-suite`)}),(0,eo.jsxs)(`div`,{className:`max-w-[620px]`,children:[(0,eo.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Site-wide title template`,`ai-rank-suite`)}),(0,eo.jsx)(`input`,{type:`text`,value:i.title_template,onChange:e=>a({title_template:e.target.value})}),(0,eo.jsx)(Qa,{variables:u,className:`mt-1.5`}),(0,eo.jsx)(`div`,{className:`mt-1.5`,children:(0,eo.jsx)(Ie,{value:Za(i.title_template,i.separator),kind:`title`})}),(0,eo.jsx)(`div`,{className:`mt-2`,children:(0,eo.jsx)(Qr,{serp:{site:re.siteName||window.airanksuiteData?.siteName||``,url:h,title:Za(i.title_template,i.separator),desc:``},emptyTitle:b(`(empty — WordPress will pick the title)`,`ai-rank-suite`),emptyDesc:b(`(empty — the excerpt is used)`,`ai-rank-suite`)})})]}),(0,eo.jsxs)(`div`,{children:[(0,eo.jsx)(`label`,{className:`block font-medium mb-1.5`,children:b(`Separator`,`ai-rank-suite`)}),(0,eo.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[to.map(e=>(0,eo.jsx)(`button`,{type:`button`,onClick:()=>a({separator:e}),className:`cursor-pointer grid place-items-center`,style:{width:38,height:38,borderRadius:`var(--ars-r-md)`,fontSize:16,border:`1px solid ${i.separator===e?`var(--ars-brand)`:`var(--ars-border)`}`,background:i.separator===e?`var(--ars-brand-tonal)`:`var(--ars-surface)`,color:i.separator===e?`var(--ars-brand-tonal-ink)`:`var(--ars-ink-2)`},"aria-pressed":i.separator===e,"aria-label":`Separator ${e}`,children:e},e)),(0,eo.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 ml-1`,children:[(0,eo.jsx)(`span`,{className:`t-caption`,children:b(`or type one`,`ai-rank-suite`)}),(0,eo.jsx)(`input`,{type:`text`,value:i.separator,onChange:e=>a({separator:e.target.value}),style:{width:72,height:38,textAlign:`center`,padding:`0 8px`},"aria-label":b(`Custom separator`,`ai-rank-suite`)})]})]})]}),(0,eo.jsx)(Ee,{checked:!!i.social_tags,onChange:e=>a({social_tags:e}),label:b(`Output Open Graph & Twitter card tags`,`ai-rank-suite`)}),n.conflict&&(0,eo.jsx)(Ee,{checked:!!i.force_output,onChange:e=>a({force_output:e}),label:S(b(`Force output although %s is active (advanced)`,`ai-rank-suite`),n.conflict)}),(0,eo.jsx)(m,{})]})}),e===`templates`&&(0,eo.jsxs)(`div`,{className:`grid gap-4`,children:[(0,eo.jsx)(k,{title:b(`Per content type`,`ai-rank-suite`),subtitle:b(`A blog post and a product page rarely want the same title pattern. Leave a field empty and the site-wide template applies.`,`ai-rank-suite`),action:(0,eo.jsx)(m,{}),children:(0,eo.jsx)(`div`,{className:`grid gap-5`,children:d.map(e=>{let t=f[e.name]||{},n=t.title||i.title_template;return(0,eo.jsxs)(`div`,{className:`grid gap-3 ars-r-lg p-4`,style:{background:`var(--ars-surface-2)`},children:[(0,eo.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,eo.jsx)(`span`,{className:`font-semibold text-[13px]`,children:e.label}),(0,eo.jsx)(j,{tone:t.title||t.desc?`brand`:`neutral`,children:t.title||t.desc?`custom`:`site-wide`})]}),(0,eo.jsxs)(`div`,{children:[(0,eo.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Title template`,`ai-rank-suite`)}),(0,eo.jsx)(`input`,{type:`text`,placeholder:i.title_template,value:t.title||``,onChange:t=>p(e.name,`title`,t.target.value)})]}),(0,eo.jsxs)(`div`,{children:[(0,eo.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Meta description template`,`ai-rank-suite`)}),(0,eo.jsx)(`textarea`,{rows:2,placeholder:b(`Leave empty to use the page excerpt`,`ai-rank-suite`),value:t.desc||``,onChange:t=>p(e.name,`desc`,t.target.value)})]}),(0,eo.jsx)(Qr,{serp:{site:re.siteName||window.airanksuiteData?.siteName||``,url:h,title:Za(n,i.separator),desc:Za(t.desc,i.separator)},emptyTitle:b(`(empty — WordPress will pick the title)`,`ai-rank-suite`),emptyDesc:b(`(empty — the excerpt is used)`,`ai-rank-suite`)}),(0,eo.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,eo.jsx)(Ie,{value:Za(n,i.separator),kind:`title`}),t.desc&&(0,eo.jsx)(Ie,{value:Za(t.desc,i.separator),kind:`description`})]})]},e.name)})})}),(0,eo.jsxs)(k,{title:b(`Variables`,`ai-rank-suite`),subtitle:b(`Replaced per page wherever a template accepts text`,`ai-rank-suite`),children:[(0,eo.jsx)(`div`,{className:`grid gap-1.5 sm:grid-cols-2`,children:Object.entries(u).map(([e,t])=>(0,eo.jsxs)(`div`,{className:`flex items-center justify-between gap-3 ars-r-lg px-3 py-2`,style:{background:`var(--ars-surface-2)`},children:[(0,eo.jsx)(`code`,{className:`ars-mono text-[12px]`,children:e}),(0,eo.jsx)(`span`,{className:`text-[12px]`,style:{color:`var(--ars-ink-2)`},children:t})]},e))}),(0,eo.jsx)(`p`,{className:`m-0 mt-3 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`A description you wrote for a specific page always wins over a template — a pattern fills the gaps, it never overwrites deliberate work.`,`ai-rank-suite`)})]})]}),e===`social`&&(0,eo.jsx)(qa,{}),e===`rss`&&(0,eo.jsx)(k,{title:b(`RSS feed protection`,`ai-rank-suite`),subtitle:b(`Scrapers steal content through your feed. A credit line in every item turns stolen copies into backlinks.`,`ai-rank-suite`),action:(0,eo.jsx)(m,{}),children:(0,eo.jsxs)(`div`,{className:`grid gap-4`,children:[(0,eo.jsxs)(`div`,{children:[(0,eo.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Before each feed item`,`ai-rank-suite`)}),(0,eo.jsx)(`input`,{type:`text`,value:i.rss_before||``,onChange:e=>a({rss_before:e.target.value})})]}),(0,eo.jsxs)(`div`,{children:[(0,eo.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`After each feed item`,`ai-rank-suite`)}),(0,eo.jsx)(`input`,{type:`text`,placeholder:b(`This post first appeared on %sitename%: %post_link%`,`ai-rank-suite`),value:i.rss_after||``,onChange:e=>a({rss_after:e.target.value})})]}),(0,eo.jsx)(`div`,{className:`flex flex-wrap gap-1.5 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[`%post_link%`,`%post_url%`,`%sitename%`,`%site_link%`,`%author%`].map(e=>(0,eo.jsx)(`code`,{className:`ars-mono px-1.5 py-0.5 rounded`,style:{background:`var(--ars-surface-2)`},children:e},e))}),(0,eo.jsxs)(`div`,{className:`ars-r-lg px-4 py-3 text-[13px]`,style:{background:`var(--ars-surface-2)`},children:[(0,eo.jsx)(`div`,{className:`text-[11.5px] font-semibold mb-1`,style:{color:`var(--ars-ink-3)`},children:b(`Preview of one feed item`,`ai-rank-suite`)}),i.rss_before&&(0,eo.jsx)(`div`,{style:{color:`var(--ars-ink-2)`},children:Za(i.rss_before,i.separator)}),(0,eo.jsx)(`div`,{style:{color:`var(--ars-ink-3)`},children:b(`… the post content …`,`ai-rank-suite`)}),i.rss_after&&(0,eo.jsx)(`div`,{style:{color:`var(--ars-ink-2)`},children:Za(i.rss_after,i.separator)}),!i.rss_before&&!i.rss_after&&(0,eo.jsx)(`div`,{style:{color:`var(--ars-ink-3)`},children:b(`No credit line — a scraped copy carries nothing back.`,`ai-rank-suite`)})]})]})})]})}var eo,to,no,ro=o((()=>{C(),f(),Ka(),ha(),ai(),D(),at(),Ya(),eo=O(),to=[`–`,`—`,`-`,`·`,`•`,`|`,`/`,`>`,`~`,`»`],no={"%title%":b(`What is GEO optimization?`,`ai-rank-suite`),"%excerpt%":b(`A short introduction to generative engine optimization.`,`ai-rank-suite`),"%category%":b(`Guides`,`ai-rank-suite`),"%author%":`Alex Weber`,"%date%":new Date().toLocaleDateString()}}));function io({label:e,hint:t,value:n,onChange:r,placeholder:i}){let[a,o]=(0,oo.useState)((n||[]).join(`, `));(0,oo.useEffect)(()=>{o((n||[]).join(`, `))},[JSON.stringify(n||[])]);let s=e=>{o(e),r(e.split(`,`).map(e=>e.trim()).filter(Boolean))},c=a.split(`,`).map(e=>e.trim()).filter(Boolean);return(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:e}),(0,B.jsx)(`input`,{type:`text`,value:a,placeholder:i,onChange:e=>s(e.target.value)}),t&&(0,B.jsx)(`p`,{className:`m-0 mt-1 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:t}),c.length>0&&(0,B.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-1.5`,children:c.map((e,t)=>(0,B.jsx)(`span`,{className:`text-[11px] px-1.5 py-0.5`,style:{background:`var(--ars-surface-3)`,color:`var(--ars-ink-2)`,borderRadius:`var(--ars-r-xs)`},children:e},`${e}-${t}`))})]})}function ao(){let[e,t]=(0,oo.useState)(null),[n,r]=(0,oo.useState)(null),[i,a]=(0,oo.useState)(!1),[o,s]=(0,oo.useState)(!1),[c,l]=(0,oo.useState)(null),[u,d]=(0,oo.useState)(!1);(0,oo.useEffect)(()=>{E.get(`/settings/schema`).then(e=>{t(e),r(e.settings.identity||{})}).catch(e=>l(e.message))},[]);let f=e=>r(t=>({...t,...e})),p=async()=>{a(!0),l(null);try{let i=await E.put(`/settings/schema`,{identity:n,org_type:e.settings.org_type,org_name:e.settings.org_name});t(i),r(i.settings.identity||{}),s(!0),setTimeout(()=>s(!1),2400)}catch(e){l(e.message)}finally{a(!1)}},m=(0,oo.useMemo)(()=>Object.entries(e?.types||{}),[e]);if(!e||!n)return(0,B.jsx)(_e,{error:c});let h=e.entity||{score:0,missing:[]},g=Object.entries(e.identifiers||{}),_=Object.entries(e.policies||{}),v=e.contactTypes||{},y=n.contacts||[],x=(e,t)=>f({contacts:y.map((n,r)=>e===r?{...n,...t}:n)});return(0,B.jsxs)(`div`,{className:`grid gap-4`,children:[(0,B.jsxs)(k,{title:b(`Entity identity`,`ai-rank-suite`),subtitle:b(`Who is answering — the node a knowledge graph resolves you to`,`ai-rank-suite`),action:(0,B.jsx)(A,{onClick:p,busy:i,children:b(`Save identity`,`ai-rank-suite`)}),children:[(0,B.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-[auto_1fr] items-start`,children:[(0,B.jsx)(`div`,{className:`grid place-items-center`,children:(0,B.jsx)(Oe,{value:h.score,label:b(`Entity strength`,`ai-rank-suite`),size:128})}),(0,B.jsxs)(`div`,{className:`grid gap-3`,children:[(0,B.jsxs)(ot,{title:b(`Why this matters more than any other schema setting`,`ai-rank-suite`),open:h.score<50,children:[(0,B.jsx)(`p`,{children:b(`A search engine ranks pages. An assistant answers a question, and to answer it, it has to decide whose answer to repeat. That decision runs on entities — a resolved, cross-referenced thing in a knowledge graph — not on keywords.`,`ai-rank-suite`)}),(0,B.jsxs)(`p`,{children:[(0,B.jsx)(`code`,{children:b(`Organization + name + logo`,`ai-rank-suite`)}),` `,b(`does not resolve to anything; it is a label. Registration identifiers, links to profiles the graph already holds, and an explicit list of the subjects you claim expertise in are what turn a label into an entity that can be cited by name.`,`ai-rank-suite`)]})]}),h.missing.length>0&&(0,B.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,B.jsx)(`div`,{className:`t-overline`,children:b(`Worth adding, strongest first`,`ai-rank-suite`)}),h.missing.slice(0,4).map(e=>(0,B.jsxs)(`div`,{className:`px-3 py-2`,style:{background:`var(--ars-surface-2)`,borderRadius:`var(--ars-r-sm)`},children:[(0,B.jsx)(`div`,{className:`font-semibold text-[12.5px]`,children:e.label}),(0,B.jsx)(`div`,{className:`text-[11.5px] mt-0.5`,style:{color:`var(--ars-ink-2)`},children:e.why})]},e.key))]}),h.missing.length===0&&(0,B.jsx)(M,{tone:`good`,children:b(`Every high-value entity field is filled in.`,`ai-rank-suite`)})]})]}),c&&(0,B.jsx)(M,{tone:`serious`,children:c}),o&&(0,B.jsx)(j,{tone:`good`,children:`✓ Saved`})]}),(0,B.jsx)(k,{title:b(`What kind of organization`,`ai-rank-suite`),subtitle:b(`The subtype decides which properties Google will read`,`ai-rank-suite`),children:(0,B.jsxs)(`div`,{className:`grid gap-3`,children:[(0,B.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Type`,`ai-rank-suite`)}),(0,B.jsx)(`select`,{value:e.settings.org_type,onChange:n=>t({...e,settings:{...e.settings,org_type:n.target.value}}),children:m.map(([e,t])=>(0,B.jsx)(`optgroup`,{label:e,children:Object.entries(t).map(([e,t])=>(0,B.jsx)(`option`,{value:e,children:t},e))},e))})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Public name`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:e.settings.org_name,placeholder:b(`Falls back to the site title`,`ai-rank-suite`),onChange:n=>t({...e,settings:{...e.settings,org_name:n.target.value}})})]})]}),(0,B.jsx)(qe,{label:b(`Organization logo`,`ai-rank-suite`),title:b(`Select the organization logo`,`ai-rank-suite`),value:n.logo||``,onChange:e=>f({logo:e}),hint:b(`What Google shows beside your name in a Knowledge Panel. Square, at least 112×112px. Without one, the site icon (favicon) is used — rarely how a brand wants to appear.`,`ai-rank-suite`)}),(0,B.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Legal name`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:n.legal_name||``,placeholder:b(`The name on the register`,`ai-rank-suite`),onChange:e=>f({legal_name:e.target.value})})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Also known as`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:n.alt_name||``,placeholder:b(`Trading name, abbreviation`,`ai-rank-suite`),onChange:e=>f({alt_name:e.target.value})})]})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Description`,`ai-rank-suite`)}),(0,B.jsx)(`textarea`,{rows:2,value:n.description||``,placeholder:b(`The sentence an assistant repeats when asked who you are.`,`ai-rank-suite`),onChange:e=>f({description:e.target.value})})]}),(0,B.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Founded`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:n.founded||``,placeholder:`2016-04-01`,onChange:e=>f({founded:e.target.value})})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Founder`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:n.founder||``,onChange:e=>f({founder:e.target.value})})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Employees`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:n.employees||``,placeholder:`45`,onChange:e=>f({employees:e.target.value})})]})]}),(0,B.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Public email`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:n.email||``,onChange:e=>f({email:e.target.value})})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Public phone`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:n.phone||``,onChange:e=>f({phone:e.target.value})})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Price range`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:n.price_range||``,placeholder:`$$`,onChange:e=>f({price_range:e.target.value})})]})]})]})}),(0,B.jsx)(k,{title:b(`How the graph finds you`,`ai-rank-suite`),subtitle:b(`sameAs and knowsAbout do more for citation than every other field combined`,`ai-rank-suite`),children:(0,B.jsxs)(`div`,{className:`grid gap-4`,children:[(0,B.jsx)(io,{label:b(`Profiles (sameAs)`,`ai-rank-suite`),hint:b(`One URL per profile: LinkedIn, Wikidata, Crunchbase, Companies House, Google Business, industry directories.`,`ai-rank-suite`),placeholder:`https://linkedin.com/company/…, https://www.wikidata.org/wiki/…`,value:n.same_as,onChange:e=>f({same_as:e})}),(0,B.jsx)(io,{label:b(`Subjects you know (knowsAbout)`,`ai-rank-suite`),hint:b(`The topics you claim expertise in. Be specific: “orthopaedic physiotherapy” beats “health”.`,`ai-rank-suite`),placeholder:b(`dermatology, orthopaedics, sports injury rehabilitation`,`ai-rank-suite`),value:n.knows_about,onChange:e=>f({knows_about:e})}),(0,B.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,B.jsx)(io,{label:b(`Areas served`,`ai-rank-suite`),hint:b(`Country codes or region names — assistants filter by geography before quality.`,`ai-rank-suite`),placeholder:b(`AE, SA, QA`,`ai-rank-suite`),value:n.area_served,onChange:e=>f({area_served:e})}),(0,B.jsx)(io,{label:b(`Languages`,`ai-rank-suite`),placeholder:b(`en, ar, de`,`ai-rank-suite`),value:n.languages,onChange:e=>f({languages:e})})]}),(0,B.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,B.jsx)(io,{label:b(`Currencies accepted`,`ai-rank-suite`),placeholder:b(`AED, EUR, USD`,`ai-rank-suite`),value:n.currencies,onChange:e=>f({currencies:e})}),(0,B.jsx)(io,{label:b(`Payment methods`,`ai-rank-suite`),placeholder:b(`Cash, Visa, Mastercard, Apple Pay`,`ai-rank-suite`),value:n.payments,onChange:e=>f({payments:e})})]}),(0,B.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,B.jsx)(io,{label:b(`Awards`,`ai-rank-suite`),placeholder:b(`Best Clinic 2024`,`ai-rank-suite`),value:n.awards,onChange:e=>f({awards:e})}),(0,B.jsx)(io,{label:b(`Certifications & accreditations`,`ai-rank-suite`),placeholder:b(`ISO 9001, JCI Accredited`,`ai-rank-suite`),value:n.certifications,onChange:e=>f({certifications:e})})]}),(0,B.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,B.jsx)(io,{label:b(`Member of`,`ai-rank-suite`),placeholder:b(`Dubai Chamber of Commerce`,`ai-rank-suite`),value:n.member_of,onChange:e=>f({member_of:e})}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Parent organization`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:n.parent_org||``,onChange:e=>f({parent_org:e.target.value})})]})]})]})}),(0,B.jsx)(k,{title:b(`Registration identifiers`,`ai-rank-suite`),subtitle:b(`What turns a claimed business into a verifiable one — fill in whichever your market uses`,`ai-rank-suite`),children:(0,B.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:g.map(([e,t])=>(0,B.jsxs)(`div`,{children:[(0,B.jsxs)(`label`,{className:`block font-medium mb-1 flex items-center gap-1.5`,children:[t.label,(0,B.jsx)(`span`,{className:`ars-tag`,style:{background:`var(--ars-surface-3)`,color:`var(--ars-ink-3)`},children:t.region})]}),(0,B.jsx)(`input`,{type:`text`,value:(n.identifiers||{})[e]||``,placeholder:t.hint,onChange:t=>f({identifiers:{...n.identifiers||{},[e]:t.target.value}})})]},e))})}),(0,B.jsx)(k,{title:b(`Contact points`,`ai-rank-suite`),subtitle:b(`Per role, per language, per market — this is what makes you resolvable in each country`,`ai-rank-suite`),children:(0,B.jsxs)(`div`,{className:`grid gap-3`,children:[y.length===0&&(0,B.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`No contact points yet. One per role beats a single switchboard number.`,`ai-rank-suite`)}),y.map((e,t)=>(0,B.jsxs)(`div`,{className:`grid gap-2 p-3`,style:{background:`var(--ars-surface-2)`,borderRadius:`var(--ars-r-sm)`},children:[(0,B.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-3`,children:[(0,B.jsx)(`select`,{value:e.type||`customer support`,onChange:e=>x(t,{type:e.target.value}),children:Object.entries(v).map(([e,t])=>(0,B.jsx)(`option`,{value:e,children:t},e))}),(0,B.jsx)(`input`,{type:`text`,placeholder:b(`Phone`,`ai-rank-suite`),value:e.phone||``,onChange:e=>x(t,{phone:e.target.value})}),(0,B.jsx)(`input`,{type:`text`,placeholder:b(`Email`,`ai-rank-suite`),value:e.email||``,onChange:e=>x(t,{email:e.target.value})})]}),(0,B.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:[(0,B.jsx)(`input`,{type:`text`,placeholder:b(`Languages — en, ar`,`ai-rank-suite`),value:(e.languages||[]).join(`, `),onChange:e=>x(t,{languages:e.target.value.split(`,`).map(e=>e.trim()).filter(Boolean)})}),(0,B.jsx)(`input`,{type:`text`,placeholder:b(`Areas — AE, SA`,`ai-rank-suite`),value:(e.areas||[]).join(`, `),onChange:e=>x(t,{areas:e.target.value.split(`,`).map(e=>e.trim()).filter(Boolean)})})]}),(0,B.jsx)(`div`,{children:(0,B.jsx)(`button`,{type:`button`,className:`ars-chip`,style:{color:`var(--ars-serious)`},onClick:()=>f({contacts:y.filter((e,n)=>n!==t)}),children:b(`Remove`,`ai-rank-suite`)})})]},t)),(0,B.jsx)(`div`,{children:(0,B.jsx)(A,{variant:`ghost`,onClick:()=>f({contacts:[...y,{type:`customer support`,phone:``,email:``}]}),children:b(`Add a contact point`,`ai-rank-suite`)})})]})}),(0,B.jsx)(k,{title:b(`Trust & editorial policies`,`ai-rank-suite`),subtitle:b(`What Google reads for E-E-A-T, and what news surfaces require`,`ai-rank-suite`),children:(0,B.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:_.map(([e,t])=>(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:t.label}),(0,B.jsx)(`input`,{type:`text`,placeholder:`https://…`,value:(n.policies||{})[e]||``,onChange:t=>f({policies:{...n.policies||{},[e]:t.target.value}})}),(0,B.jsx)(`p`,{className:`m-0 mt-1 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:t.hint})]},e))})}),(0,B.jsx)(k,{title:b(`What ships`,`ai-rank-suite`),subtitle:b(`The exact properties merged into your Organization node`,`ai-rank-suite`),action:(0,B.jsxs)(A,{variant:`ghost`,onClick:()=>d(!u),children:[u?`Hide`:`Show`,` JSON-LD`]}),children:u?(0,B.jsx)(`pre`,{className:`ars-mono m-0 p-3 overflow-auto text-[11.5px]`,style:{background:`var(--ars-surface-2)`,borderRadius:`var(--ars-r-sm)`,maxHeight:420},children:JSON.stringify(e.preview||{},null,2)}):(0,B.jsxs)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:[Object.keys(e.preview||{}).length,` properties are currently attached to your identity node. Save to refresh.`]})}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(A,{onClick:p,busy:i,children:b(`Save identity`,`ai-rank-suite`)}),o&&(0,B.jsx)(j,{tone:`good`,children:`✓ Saved`})]})]})}var oo,B,so=o((()=>{oo=u(f(),1),C(),D(),at(),ct(),B=O()})),co=c({default:()=>_o});function lo(){let[e,t]=(0,vo.useState)(null),[n,r]=(0,vo.useState)(0),[i,a]=(0,vo.useState)(!1);if((0,vo.useEffect)(()=>{E.get(`/schema/live`).then(t).catch(()=>t({samples:[],validators:[]}))},[]),!e)return(0,V.jsx)(k,{title:b(`Live structured data`,`ai-rank-suite`),children:b(`Loading…`,`ai-rank-suite`)});if(!e.samples?.length)return null;let o=e.samples[Math.min(n,e.samples.length-1)];return(0,V.jsx)(k,{title:b(`Live structured data`,`ai-rank-suite`),subtitle:b(`Exactly the JSON-LD your visitors and Google receive — built by the same code that writes your pages`,`ai-rank-suite`),action:e.samples.length>1&&(0,V.jsx)(Ae,{tabs:e.samples.map((e,t)=>({id:String(t),label:e.label})),active:String(n),onChange:e=>r(Number(e))}),children:(0,V.jsxs)(`div`,{className:`grid gap-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap`,children:[o.types.map(e=>(0,V.jsx)(j,{tone:`brand`,children:e},e)),o.issues.length===0?(0,V.jsx)(j,{tone:`good`,children:`✓ No validation issues`}):(0,V.jsx)(j,{tone:`warning`,children:S(x(`%d to fix`,`%d to fix`,o.issues.length,`ai-rank-suite`),o.issues.length)})]}),o.issues.length>0&&(0,V.jsx)(M,{tone:`warning`,children:(0,V.jsx)(`ul`,{className:`m-0 pl-4 grid gap-0.5`,children:o.issues.map(e=>(0,V.jsx)(`li`,{children:e},e))})}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,V.jsx)(A,{variant:`ghost`,onClick:async()=>{await fe(o.json)&&(a(!0),setTimeout(()=>a(!1),2e3))},children:i?`✓ Copied`:b(`Copy JSON-LD`,`ai-rank-suite`)}),e.validators.map(e=>(0,V.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`text-[12.5px] font-medium`,style:{color:`var(--ars-brand)`,textDecoration:`none`},children:[e.label,` ↗`]},e.label))]}),(0,V.jsx)(`pre`,{className:`ars-mono m-0 p-4 ars-r-lg overflow-auto text-[11.5px] leading-relaxed`,style:{background:`var(--ars-code-bg)`,color:`var(--ars-code-ink)`,maxHeight:380},children:o.json}),(0,V.jsx)(`p`,{className:`m-0 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:o.url})]})})}function uo(){let[e,t]=(0,vo.useState)(null);return(0,vo.useEffect)(()=>{E.get(`/schema/types`).then(t).catch(()=>{})},[]),e?.featured?.length?(0,V.jsxs)(k,{title:b(`Rich results you can produce`,`ai-rank-suite`),subtitle:S(b(`%d schema.org types are available — these are the ones most sites need`,`ai-rank-suite`),Object.keys(e.types).length),children:[(0,V.jsx)(`div`,{className:`ars-cardgrid`,style:{"--min":`250px`},children:e.featured.map(t=>{let n=e.usage?.[t.type]||0;return(0,V.jsxs)(`div`,{className:`p-3`,style:{border:`1px solid var(--ars-border)`,borderRadius:`var(--ars-r-sm)`,background:`var(--ars-surface)`},children:[(0,V.jsxs)(`div`,{className:`ars-richhead`,children:[(0,V.jsxs)(`div`,{className:`ars-richhead-name`,children:[(0,V.jsx)(`span`,{className:`font-semibold text-[13px]`,children:t.label}),t.auto?(0,V.jsx)(`span`,{className:`ars-tag`,style:{background:`var(--ars-c-green)`,color:`var(--ars-c-green-ink)`},title:b(`Emitted automatically, no setup needed`,`ai-rank-suite`),children:b(`Automatic`,`ai-rank-suite`)}):n>0?(0,V.jsx)(`span`,{className:`ars-tag`,style:{background:`var(--ars-c-blue)`,color:`var(--ars-c-blue-ink)`},children:S(x(`on %d page`,`on %d pages`,n,`ai-rank-suite`),n)}):(0,V.jsx)(`span`,{className:`ars-tag`,style:{background:`var(--ars-surface-3)`,color:`var(--ars-ink-3)`},children:b(`Not used yet`,`ai-rank-suite`)})]}),(0,V.jsx)(`span`,{className:`ars-richhead-count`,style:{color:`var(--ars-ink-3)`},title:b(`How many fields this type can carry`,`ai-rank-suite`),children:S(x(`%d field`,`%d fields`,t.fields,`ai-rank-suite`),t.fields)})]}),(0,V.jsx)(`p`,{className:`m-0 mt-1 text-[11.5px] leading-snug`,style:{color:`var(--ars-ink-2)`},children:t.why})]},t.type)})}),(0,V.jsxs)(`p`,{className:`m-0 mt-3 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[b(`Add any of them to a single page in`,`ai-rank-suite`),(0,V.jsx)(`strong`,{children:b(`Content → open a page → Schema`,`ai-rank-suite`)}),`, or to a whole post type under `,(0,V.jsx)(`strong`,{children:b(`Templates`,`ai-rank-suite`)}),`. Every other type lives in the `,(0,V.jsx)(`strong`,{children:b(`Library`,`ai-rank-suite`)}),` tab.`]})]}):null}function fo({data:e,setData:t}){let[n,r]=(0,vo.useState)(!1),[i,a]=(0,vo.useState)(!1),[o,s]=(0,vo.useState)(null),c=e.settings,l=n=>t({...e,settings:{...c,...n}});return(0,V.jsxs)(`div`,{className:`grid gap-4`,children:[e.conflict&&!c.force_output&&(0,V.jsxs)(M,{children:[(0,V.jsx)(`strong`,{children:e.conflict}),` already outputs structured data — AI Rank Suite defers automatically to avoid a duplicate graph.`]}),(0,V.jsx)(k,{title:b(`Structured data (JSON-LD)`,`ai-rank-suite`),subtitle:b(`One connected @graph: Organization, WebSite, WebPage/Article, Breadcrumbs, FAQPage — plus anything your templates add`,`ai-rank-suite`),action:i&&(0,V.jsx)(j,{tone:`good`,children:`✓ Saved`}),children:(0,V.jsxs)(`div`,{className:`grid gap-4`,children:[(0,V.jsx)(Ee,{checked:!!c.enabled,onChange:e=>l({enabled:e}),label:b(`Output JSON-LD`,`ai-rank-suite`)}),(0,V.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Publisher name`,`ai-rank-suite`)}),(0,V.jsx)(`input`,{type:`text`,placeholder:re.siteName,value:c.org_name,onChange:e=>l({org_name:e.target.value})})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Publisher type`,`ai-rank-suite`)}),(0,V.jsxs)(`select`,{value:c.org_type,onChange:e=>l({org_type:e.target.value}),children:[(0,V.jsx)(`option`,{value:`Organization`,children:b(`Organization`,`ai-rank-suite`)}),(0,V.jsx)(`option`,{value:`Person`,children:b(`Person`,`ai-rank-suite`)}),(0,V.jsx)(`option`,{value:`LocalBusiness`,children:b(`LocalBusiness`,`ai-rank-suite`)})]})]})]}),e.conflict&&(0,V.jsx)(Ee,{checked:!!c.force_output,onChange:e=>l({force_output:e}),label:`Force output although ${e.conflict} is active (advanced)`}),(0,V.jsx)(`div`,{children:(0,V.jsx)(A,{onClick:async()=>{r(!0),s(null);try{t(await E.put(`/settings/schema`,(({identity:e,...t})=>t)(c))),a(!0),setTimeout(()=>a(!1),2200)}catch(e){s(e.message)}finally{r(!1)}},busy:n,children:b(`Save`,`ai-rank-suite`)})}),o&&(0,V.jsx)(M,{tone:`serious`,children:o})]})}),(0,V.jsx)(k,{title:b(`FAQ schema`,`ai-rank-suite`),subtitle:b(`Generated FAQs are emitted as FAQPage automatically`,`ai-rank-suite`),children:(0,V.jsxs)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:[b(`Generate FAQs per page in`,`ai-rank-suite`),(0,V.jsx)(`strong`,{children:b(`Content`,`ai-rank-suite`)}),` → open a page → `,(0,V.jsx)(`em`,{children:b(`FAQ`,`ai-rank-suite`)}),`. Saved items appear in the JSON-LD graph and can be rendered anywhere with the`,` `,(0,V.jsx)(`code`,{className:`ars-mono px-1.5 py-0.5 rounded`,style:{background:`var(--ars-surface-2)`},children:`[airanksuite_faq]`}),` `,`shortcode.`]})}),(0,V.jsx)(lo,{})]})}function po({template:e,meta:t,onChange:n,onRemove:r}){let i=t.types[e.type]?.fields||[],a=i.filter(e=>e.required),o=i.filter(e=>e.recommended&&!e.required),s=i.filter(e=>!e.required&&!e.recommended),[c,l]=(0,vo.useState)(!1),u=(t,r)=>n({...e,data:{...e.data,[t]:r}}),d=(t,r)=>n({...e,conditions:{...e.conditions,[t]:r}}),f=a.filter(t=>!String(e.data[t.key]??``).trim()),p=e.conditions.post_types.length>0||e.conditions.terms.length>0||e.conditions.post_ids.length>0,m=({f:t})=>(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:[t.label,t.required&&(0,V.jsx)(`span`,{style:{color:`var(--ars-serious)`},children:` *`})]}),t.type===`select`?(0,V.jsxs)(`select`,{value:e.data[t.key]??``,onChange:e=>u(t.key,e.target.value),children:[(0,V.jsx)(`option`,{value:``,children:`— not set —`}),(t.options||[]).map(e=>(0,V.jsx)(`option`,{value:e,children:e},e))]}):t.type===`textarea`?(0,V.jsx)(`textarea`,{rows:2,value:e.data[t.key]??``,onChange:e=>u(t.key,e.target.value)}):(0,V.jsx)(`input`,{type:`text`,placeholder:t.hint,value:e.data[t.key]??``,onChange:e=>u(t.key,e.target.value)})]},t.key);return(0,V.jsxs)(`div`,{className:`ars-r-lg p-4 grid gap-4`,style:{background:`var(--ars-surface-2)`},children:[(0,V.jsxs)(`div`,{className:`flex items-start justify-between gap-3 flex-wrap`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap min-w-0`,children:[(0,V.jsx)(`input`,{type:`text`,value:e.name,onChange:t=>n({...e,name:t.target.value}),style:{maxWidth:240},"aria-label":b(`Template name`,`ai-rank-suite`)}),(0,V.jsx)(j,{tone:`brand`,children:t.types[e.type]?.label||e.type}),f.length>0&&(0,V.jsx)(j,{tone:`warning`,children:S(x(`%s required field empty`,`%s required fields empty`,f.length,`ai-rank-suite`),f.length)}),!p&&(0,V.jsx)(j,{tone:`serious`,children:`no scope — never applies`})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(Ee,{checked:!!e.enabled,onChange:t=>n({...e,enabled:t}),label:b(`Active`,`ai-rank-suite`)}),(0,V.jsx)(`button`,{type:`button`,onClick:r,"aria-label":b(`Remove template`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer p-1`,style:{color:`var(--ars-ink-3)`},children:(0,V.jsx)(Mt,{size:14})})]})]}),(0,V.jsxs)(`div`,{className:`grid gap-3`,children:[(0,V.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wider`,style:{color:`var(--ars-ink-3)`},children:b(`Where it applies`,`ai-rank-suite`)}),(0,V.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Content types`,`ai-rank-suite`)}),(0,V.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:t.post_types.map(t=>{let n=e.conditions.post_types.includes(t);return(0,V.jsx)(`button`,{type:`button`,onClick:()=>d(`post_types`,n?e.conditions.post_types.filter(e=>e!==t):[...e.conditions.post_types,t]),className:`px-3 py-1 ars-r-sm text-[12px] cursor-pointer`,style:{border:`1px solid ${n?`var(--ars-brand)`:`var(--ars-border)`}`,background:n?`var(--ars-brand-tonal)`:`var(--ars-surface)`,color:n?`var(--ars-brand-tonal-ink)`:`var(--ars-ink-2)`},children:t},t)})})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Only in these terms (optional)`,`ai-rank-suite`)}),(0,V.jsx)(`select`,{multiple:!0,size:4,value:e.conditions.terms.map(String),onChange:e=>d(`terms`,[...e.target.selectedOptions].map(e=>Number(e.value))),children:t.taxonomies.map(e=>(0,V.jsx)(`optgroup`,{label:e.name,children:e.terms.map(e=>(0,V.jsx)(`option`,{value:e.id,children:e.name},e.id))},e.name))})]})]}),!p&&(0,V.jsx)(`p`,{className:`m-0 text-[11.5px]`,style:{color:`var(--ars-serious)`},children:b(`Pick at least one content type or term. A template with no scope is never applied — that is deliberate, so a half-finished rule can never blanket the whole site.`,`ai-rank-suite`)})]}),(0,V.jsxs)(`div`,{className:`grid gap-3`,children:[(0,V.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wider`,style:{color:`var(--ars-ink-3)`},children:b(`Values`,`ai-rank-suite`)}),a.length>0&&(0,V.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:a.map(e=>(0,V.jsx)(m,{f:e},e.key))}),o.length>0&&(0,V.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:o.map(e=>(0,V.jsx)(m,{f:e},e.key))}),s.length>0&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{type:`button`,onClick:()=>l(!c),className:`border-0 bg-transparent cursor-pointer p-0 text-[12.5px] font-semibold text-left`,style:{color:`var(--ars-brand)`},children:c?`Hide`:`Show ${s.length} optional field${s.length===1?``:`s`}`}),c&&(0,V.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:s.map(e=>(0,V.jsx)(m,{f:e},e.key))})]}),(0,V.jsxs)(`p`,{className:`m-0 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:[`Variables are replaced per page:`,` `,Object.keys(t.variables).slice(0,6).map(e=>(0,V.jsx)(`code`,{className:`ars-mono px-1 py-0.5 rounded mr-1`,style:{background:`var(--ars-surface)`},children:e},e))]})]})]})}function mo({onSaved:e}){let[t,n]=(0,vo.useState)(null),[r,i]=(0,vo.useState)([]),[a,o]=(0,vo.useState)(!1),[s,c]=(0,vo.useState)(``),[l,u]=(0,vo.useState)(!1),[d,f]=(0,vo.useState)(!1),[p,m]=(0,vo.useState)(null),[h,g]=(0,vo.useState)(!1),_=e=>{let t={};Object.entries(e.types).forEach(([e,n])=>{t[e]=n}),n({types:t,grouped:e.grouped,variables:e.variables,post_types:e.post_types,taxonomies:e.taxonomies}),i(e.templates)};(0,vo.useEffect)(()=>{E.get(`/schema/templates`).then(_).catch(e=>m(e.message))},[]);let v=(0,vo.useMemo)(()=>{if(!t)return[];let e=s.trim().toLowerCase();return Object.entries(t.grouped).map(([t,n])=>[t,n.filter(t=>!e||t.label.toLowerCase().includes(e))]).filter(([,e])=>e.length>0)},[t,s]);if(!t)return(0,V.jsx)(_e,{error:p});let y=e=>{i([...r,{id:yo(),name:t.types[e]?.label||e,type:e,enabled:!0,data:{},conditions:{post_types:[],terms:[],post_ids:[],exclude:[]}}]),o(!1),c(``),g(!0)};return(0,V.jsxs)(`div`,{className:`grid gap-4`,children:[p&&(0,V.jsx)(M,{tone:`serious`,children:p}),(0,V.jsx)(k,{title:b(`Schema templates`,`ai-rank-suite`),subtitle:b(`Rules instead of chores: “every product in Shoes is a Product with this brand and size system”, written once and applied to every matching page forever`,`ai-rank-suite`),action:(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[d&&(0,V.jsx)(j,{tone:`good`,children:`✓ Saved`}),(a||r.length>0)&&(0,V.jsx)(A,{variant:`ghost`,onClick:()=>o(!a),children:a?`Cancel`:b(`Add template`,`ai-rank-suite`)}),h&&(0,V.jsx)(A,{onClick:async()=>{u(!0),m(null);try{_(await E.put(`/schema/templates`,{templates:r})),g(!1),f(!0),e?.(),setTimeout(()=>f(!1),2200)}catch(e){m(e.message)}finally{u(!1)}},busy:l,children:b(`Save templates`,`ai-rank-suite`)})]}),children:(0,V.jsxs)(`div`,{className:`grid gap-4`,children:[a&&(0,V.jsxs)(`div`,{className:`ars-r-lg p-4 grid gap-3`,style:{background:`var(--ars-grad-soft)`},children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[(0,V.jsxs)(`span`,{className:`font-semibold text-[13px] flex items-center gap-1.5`,children:[(0,V.jsx)(Nt,{size:13}),b(`Pick a type`,`ai-rank-suite`)]}),(0,V.jsx)(`input`,{type:`text`,placeholder:b(`Search 77 types…`,`ai-rank-suite`),value:s,onChange:e=>c(e.target.value),style:{maxWidth:260},autoFocus:!0})]}),(0,V.jsxs)(`div`,{className:`grid gap-3`,style:{maxHeight:340,overflowY:`auto`},children:[v.map(([e,t])=>(0,V.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,V.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wider`,style:{color:`var(--ars-ink-3)`},children:e}),(0,V.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:t.map(e=>(0,V.jsx)(`button`,{type:`button`,onClick:()=>y(e.value),className:`px-3 py-1.5 ars-r-sm text-[12.5px] cursor-pointer`,style:{background:`var(--ars-surface)`,border:`1px solid var(--ars-border)`},children:e.label},e.value))})]},e)),v.length===0&&(0,V.jsxs)(`div`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:[`No type matches “`,s,`”.`]})]})]}),r.length===0&&!a&&(0,V.jsxs)(`div`,{className:`ars-r-lg px-4 py-5 grid gap-2 place-items-start`,style:{background:`var(--ars-surface-2)`},children:[(0,V.jsx)(`div`,{className:`font-medium text-[13px]`,children:b(`No templates yet`,`ai-rank-suite`)}),(0,V.jsx)(`div`,{className:`text-[12px] max-w-[74ch]`,style:{color:`var(--ars-ink-3)`},children:b(`Your pages already get Organization, WebSite, WebPage/Article, Breadcrumbs and FAQPage automatically. A template adds a richer type — Recipe, Event, Course, SoftwareApplication, JobPosting — to a whole group of pages at once.`,`ai-rank-suite`)}),(0,V.jsx)(A,{onClick:()=>o(!0),children:b(`Add template`,`ai-rank-suite`)})]}),r.map((e,n)=>(0,V.jsx)(po,{template:e,meta:t,onChange:e=>{i(r.map((t,r)=>r===n?e:t)),g(!0)},onRemove:()=>{i(r.filter((e,t)=>t!==n)),g(!0)}},e.id)),h&&(0,V.jsx)(M,{tone:`info`,children:b(`Nothing is live until you press “Save templates”.`,`ai-rank-suite`)})]})})]})}function ho(){let[e,t]=(0,vo.useState)(null),[n,r]=(0,vo.useState)(``),[i,a]=(0,vo.useState)(null),[o,s]=(0,vo.useState)(null);if((0,vo.useEffect)(()=>{E.get(`/schema/types`).then(t).catch(e=>s(e.message))},[]),!e)return(0,V.jsx)(_e,{error:o});let c=n.trim().toLowerCase(),l=Object.entries(e.grouped).map(([e,t])=>[e,t.filter(e=>!c||e.label.toLowerCase().includes(c)||e.value.toLowerCase().includes(c))]).filter(([,e])=>e.length>0),u=Object.keys(e.types).length;return(0,V.jsxs)(`div`,{className:`grid gap-4`,children:[(0,V.jsx)(k,{title:b(`Type library`,`ai-rank-suite`),subtitle:S(b(`All %d schema.org types this plugin can emit, with the fields Google actually reads for each`,`ai-rank-suite`),u),action:(0,V.jsx)(`input`,{type:`text`,placeholder:b(`Search types…`,`ai-rank-suite`),value:n,onChange:e=>r(e.target.value),style:{maxWidth:240},"aria-label":b(`Search schema types`,`ai-rank-suite`)}),children:(0,V.jsxs)(`div`,{className:`grid gap-5`,children:[l.map(([t,n])=>(0,V.jsxs)(`div`,{className:`grid gap-2`,children:[(0,V.jsxs)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wider`,style:{color:`var(--ars-ink-3)`},children:[t,` · `,n.length]}),(0,V.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:n.map(t=>{let n=i===t.value,r=e.types[t.value]?.fields||[];return(0,V.jsxs)(`button`,{type:`button`,onClick:()=>a(n?null:t.value),className:`px-3 py-1.5 ars-r-sm text-[12.5px] cursor-pointer`,style:{border:`1px solid ${n?`var(--ars-brand)`:`var(--ars-border)`}`,background:n?`var(--ars-brand-tonal)`:`var(--ars-surface-2)`,color:n?`var(--ars-brand-tonal-ink)`:`var(--ars-ink-2)`},children:[t.label,(0,V.jsx)(`span`,{className:`ml-1.5 text-[11px]`,style:{opacity:.65},children:r.length})]},t.value)})})]},t)),l.length===0&&(0,V.jsxs)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-3)`},children:[`No type matches “`,n,`”.`]})]})}),i&&e.types[i]&&(0,V.jsx)(k,{title:e.types[i].label,subtitle:`schema.org/${i} — ${(e.types[i].fields||[]).length} fields`,action:(0,V.jsx)(`a`,{href:`https://schema.org/${i}`,target:`_blank`,rel:`noreferrer`,className:`text-[12.5px] font-medium`,style:{color:`var(--ars-brand)`,textDecoration:`none`},children:`schema.org ↗`}),children:(0,V.jsx)(`div`,{className:`ars-table-wrap`,children:(0,V.jsxs)(`table`,{className:`ars-table`,children:[(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`th`,{children:b(`Field`,`ai-rank-suite`)}),(0,V.jsx)(`th`,{children:b(`Property`,`ai-rank-suite`)}),(0,V.jsx)(`th`,{children:b(`Example`,`ai-rank-suite`)}),(0,V.jsx)(`th`,{className:`is-num`,children:b(`Weight`,`ai-rank-suite`)})]})}),(0,V.jsx)(`tbody`,{children:(e.types[i].fields||[]).map(e=>(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`td`,{className:`font-medium`,children:e.label}),(0,V.jsx)(`td`,{className:`ars-mono text-[11.5px]`,style:{color:`var(--ars-ink-2)`},children:e.prop}),(0,V.jsx)(`td`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:e.hint||`—`}),(0,V.jsx)(`td`,{className:`is-num`,children:e.required?(0,V.jsx)(j,{tone:`serious`,children:`required`}):e.recommended?(0,V.jsx)(j,{tone:`warning`,children:`recommended`}):(0,V.jsx)(j,{tone:`neutral`,children:`optional`})})]},e.key))})]})})}),(0,V.jsx)(k,{title:b(`Variables`,`ai-rank-suite`),subtitle:b(`Placeholders replaced per page wherever a template value accepts text`,`ai-rank-suite`),children:(0,V.jsx)(`div`,{className:`ars-cardgrid`,style:{"--min":`300px`,gap:6},children:Object.entries(e.variables).map(([e,t])=>(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-3 ars-r-lg px-3 py-2`,style:{background:`var(--ars-surface-2)`},children:[(0,V.jsx)(`code`,{className:`ars-mono text-[12px]`,children:e}),(0,V.jsx)(`span`,{className:`text-[12px]`,style:{color:`var(--ars-ink-2)`},children:t})]},e))})})]})}function go(){let[e,t]=(0,vo.useState)(null),[n,r]=(0,vo.useState)(!1),[i,a]=(0,vo.useState)(!1),[o,s]=(0,vo.useState)(null);if((0,vo.useEffect)(()=>{E.get(`/settings/woocommerce`).then(t).catch(()=>t({active:!1}))},[]),!e)return(0,V.jsx)(k,{children:b(`Loading…`,`ai-rank-suite`)});if(e.active===!1)return(0,V.jsx)(k,{title:b(`Product structured data`,`ai-rank-suite`),subtitle:b(`Appears as soon as WooCommerce is active`,`ai-rank-suite`),children:(0,V.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`WooCommerce is not active on this site, so there are no products to describe. Everything else on this page works regardless.`,`ai-rank-suite`)})});let c=e.settings,l=n=>t({...e,settings:{...c,...n}}),u=async()=>{r(!0),s(null);try{t(await E.put(`/settings/woocommerce`,c)),a(!0),setTimeout(()=>a(!1),2200)}catch(e){s(e.message)}finally{r(!1)}},d=({label:e,k:t,max:n=30})=>(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:e}),(0,V.jsx)(`input`,{type:`number`,min:`0`,max:n,value:c[t]??0,onChange:e=>l({[t]:Math.max(0,Number(e.target.value)||0)})})]});return(0,V.jsx)(k,{title:b(`Product structured data`,`ai-rank-suite`),subtitle:b(`Every field Google Merchant Center asks for — identifiers, shipping, returns and reviews`,`ai-rank-suite`),action:(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[i&&(0,V.jsx)(j,{tone:`good`,children:`✓ Saved`}),(0,V.jsx)(A,{onClick:u,busy:n,children:b(`Save`,`ai-rank-suite`)})]}),children:(0,V.jsxs)(`div`,{className:`grid gap-4`,children:[o&&(0,V.jsx)(M,{tone:`serious`,children:o}),(0,V.jsx)(Ee,{checked:!!c.identifiers,onChange:e=>l({identifiers:e}),label:b(`Publish global identifiers (GTIN, EAN, UPC, ISBN, MPN)`,`ai-rank-suite`)}),(0,V.jsx)(`p`,{className:`m-0 -mt-2 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Read automatically from WooCommerce core and the common GTIN plugins — no re-entry needed. Without one of these Google rejects the product entirely.`,`ai-rank-suite`)}),(0,V.jsxs)(`div`,{className:`sm:max-w-[260px]`,children:[(0,V.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Default condition`,`ai-rank-suite`)}),(0,V.jsxs)(`select`,{value:c.condition,onChange:e=>l({condition:e.target.value}),children:[(0,V.jsx)(`option`,{value:`new`,children:b(`New`,`ai-rank-suite`)}),(0,V.jsx)(`option`,{value:`refurbished`,children:b(`Refurbished`,`ai-rank-suite`)}),(0,V.jsx)(`option`,{value:`used`,children:b(`Used`,`ai-rank-suite`)}),(0,V.jsx)(`option`,{value:`damaged`,children:b(`Damaged`,`ai-rank-suite`)})]})]}),(0,V.jsxs)(`div`,{className:`grid gap-3 ars-r-lg p-4`,style:{background:`var(--ars-surface-2)`},children:[(0,V.jsx)(Ee,{checked:!!c.shipping_details,onChange:e=>l({shipping_details:e}),label:b(`Publish shipping details (handling + transit time)`,`ai-rank-suite`)}),!!c.shipping_details&&(0,V.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-4`,children:[(0,V.jsx)(d,{label:b(`Handling min (days)`,`ai-rank-suite`),k:`handling_days_min`}),(0,V.jsx)(d,{label:b(`Handling max`,`ai-rank-suite`),k:`handling_days_max`}),(0,V.jsx)(d,{label:b(`Transit min`,`ai-rank-suite`),k:`transit_days_min`}),(0,V.jsx)(d,{label:b(`Transit max`,`ai-rank-suite`),k:`transit_days_max`})]})]}),(0,V.jsxs)(`div`,{className:`grid gap-3 ars-r-lg p-4`,style:{background:`var(--ars-surface-2)`},children:[(0,V.jsx)(Ee,{checked:!!c.return_policy,onChange:e=>l({return_policy:e}),label:b(`Publish a merchant return policy`,`ai-rank-suite`)}),!!c.return_policy&&(0,V.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2 items-end`,children:[(0,V.jsx)(d,{label:b(`Return window (days)`,`ai-rank-suite`),k:`return_days`,max:365}),(0,V.jsx)(Ee,{checked:!!c.return_free,onChange:e=>l({return_free:e}),label:b(`Returns are free`,`ai-rank-suite`)})]})]}),(0,V.jsx)(Ee,{checked:!!c.reviews,onChange:e=>l({reviews:e}),label:b(`Include up to five customer reviews in the markup`,`ai-rank-suite`)})]})})}function _o({tab:e=`overview`,onTab:t}){let[n,r]=(0,vo.useState)(null),[i,a]=(0,vo.useState)(null),[o,s]=(0,vo.useState)(null),c=()=>Promise.allSettled([E.get(`/schema/templates`),E.get(`/schema/live`)]).then(([e,t])=>{let n=e.status===`fulfilled`&&e.value?e.value:{},r=t.status===`fulfilled`&&t.value?t.value:{},i=Array.isArray(n.templates)?n.templates:[],o=Array.isArray(r.samples)?r.samples:[];a({types:n.types&&typeof n.types==`object`?Object.keys(n.types).length:null,templates:i.length,active:i.filter(e=>e&&e.enabled).length,emitted:Array.isArray(o[0]?.types)?o[0].types.length:0,issues:o.reduce((e,t)=>e+(Array.isArray(t?.issues)?t.issues.length:0),0)})});if((0,vo.useEffect)(()=>{E.get(`/settings/schema`).then(r).catch(e=>s(e.message)),c()},[]),!n)return(0,V.jsx)(_e,{error:o});let l=n.settings||{},u=!!(l.org_name&&String(l.org_name).trim()),d=n.conflict&&!l.force_output?{tone:`neutral`,text:S(b(`%s is already writing structured data, so this plugin steps back.`,`ai-rank-suite`),n.conflict),why:b(`Two schema graphs on one page contradict each other. If you would rather this plugin owned it, force output below and switch it off in the other one.`,`ai-rank-suite`)}:l.enabled?u?{tone:`good`,text:S(b(`Structured data is live for %s.`,`ai-rank-suite`),l.org_name),why:b(`The preview below is exactly what a crawler reads. Check it whenever the identity or the templates change.`,`ai-rank-suite`)}:{tone:`warning`,text:b(`Schema is on but the organisation has no name.`,`ai-rank-suite`),why:b(`Every block references the site's identity. An unnamed one is a graph with a hole at the root — fill in the identity first.`,`ai-rank-suite`),action:b(`Open identity`,`ai-rank-suite`),onAction:()=>t&&t(`identity`)}:{tone:`warning`,text:b(`Structured data is switched off — pages say nothing machine-readable about themselves.`,`ai-rank-suite`),why:b(`Schema is how a page tells Google and an assistant what it is: an article, a product, a business. Without it they guess.`,`ai-rank-suite`)};return(0,V.jsxs)(`div`,{className:`ars-page`,children:[(0,V.jsx)(pa,{...d}),i&&(0,V.jsx)(be,{columns:4,metrics:[{id:`output`,label:b(`Output`,`ai-rank-suite`),hint:b(`Structured data is how a machine knows a page is a recipe rather than an essay about one — the single biggest lever for rich results and for being quoted correctly by an assistant.`,`ai-rank-suite`),value:n.settings.enabled?`Live`:`Off`,accent:n.settings.enabled?void 0:`var(--ars-accent)`,sub:n.conflict?S(b(`%d also active`,`ai-rank-suite`),n.conflict):b(`on every page of the site`,`ai-rank-suite`)},{id:`emitted`,label:b(`Types on your home page`,`ai-rank-suite`),hint:b(`Counted from the connected @graph the home page actually emits — see it verbatim under Live structured data.`,`ai-rank-suite`),value:i.emitted},{id:`templates`,label:b(`Templates`,`ai-rank-suite`),hint:b(`Rules that add a richer type — Recipe, Event, Product — to a whole group of pages at once.`,`ai-rank-suite`),value:`${i.active} / ${i.templates}`,sub:i.templates===0?`none created yet`:`active rules`},{id:`issues`,label:b(`Validation issues`,`ai-rank-suite`),hint:b(`Counted across the live JSON-LD samples on this site.`,`ai-rank-suite`),value:i.issues,accent:i.issues>0?`var(--ars-accent)`:void 0,sub:i.types?S(b(`%d types available`,`ai-rank-suite`),i.types):void 0}]}),(0,V.jsx)(Ae,{tabs:[{id:`overview`,label:b(`Overview`,`ai-rank-suite`)},{id:`identity`,label:b(`Identity`,`ai-rank-suite`)},{id:`templates`,label:b(`Templates`,`ai-rank-suite`)},{id:`library`,label:b(`Library`,`ai-rank-suite`)},{id:`products`,label:b(`Products`,`ai-rank-suite`)}],active:e,onChange:t}),e===`overview`&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(uo,{}),(0,V.jsx)(fo,{data:n,setData:r})]}),e===`identity`&&(0,V.jsx)(ao,{}),e===`templates`&&(0,V.jsx)(mo,{onSaved:c}),e===`library`&&(0,V.jsx)(ho,{}),e===`products`&&(0,V.jsx)(go,{})]})}var vo,V,yo,bo=o((()=>{C(),vo=u(f(),1),D(),at(),so(),Ft(),pe(),ha(),V=O(),yo=()=>`tpl_${Math.random().toString(36).slice(2,10)}`}));function xo({compact:e=!1}){let[t,n]=(0,So.useState)(null),[r,i]=(0,So.useState)(null),[a,o]=(0,So.useState)(null),[s,c]=(0,So.useState)(``),[l,u]=(0,So.useState)(!1),d=(0,So.useRef)(!1),f=(0,So.useRef)(!0),p=(0,So.useCallback)(()=>E.get(`/ai/capabilities`).then(n).catch(e=>i(e.message)),[]);(0,So.useEffect)(()=>(p(),E.get(`/bulk/status`).then(o).catch(()=>{}),()=>{f.current=!1}),[p]);let m=(0,So.useCallback)(async()=>{if(!d.current){d.current=!0;try{let e=await E.post(`/bulk/tick`);for(o(e);e.state===`running`&&f.current;)e=await E.post(`/bulk/tick`),o(e);await p()}catch(e){i(e.message)}finally{d.current=!1,c(``)}}},[p]),h=async e=>{let t=e.action||{};if(i(null),t.kind===`go`){To(t.href);return}if(t.kind===`autopilot`){To(`/autopilot?tasks=`+encodeURIComponent((t.tasks||[]).join(`,`)));return}if(t.kind===`bulk`){c(e.id),u(!0);try{o(await E.post(`/bulk/start`,{action:t.action,scope:t.scope||`missing`})),m()}catch(e){i(e.message),c(``)}}},g=async()=>{try{o(await E.post(`/bulk/cancel`,{}))}catch(e){i(e.message)}};if(!t)return(0,Co.jsx)(k,{title:b(`Let AI do`,`ai-rank-suite`),icon:(0,Co.jsx)(bt,{size:18}),children:r?(0,Co.jsx)(M,{tone:`serious`,children:r}):(0,Co.jsx)(`span`,{className:`t-caption`,children:b(`Loading…`,`ai-rank-suite`)})});let _=a?.state===`running`,v=a?a.progress??0:0,y=t.rows||[],x=y.reduce((e,t)=>e+(typeof t.open==`number`&&!t.free&&t.id!==`autopilot`?t.open:0),0);return(0,Co.jsxs)(k,{className:`ars-letai-card${t.connected?` is-live`:``}`,title:(0,Co.jsxs)(`span`,{className:`ars-letai-title`,children:[b(`Let AI do`,`ai-rank-suite`),t.connected&&x>0&&(0,Co.jsx)(`span`,{className:`ars-letai-count`,children:x.toLocaleString()})]}),subtitle:t.connected?`${b(`Connected to`,`ai-rank-suite`)} ${t.provider}. ${x>0?`${x.toLocaleString()} ${b(`items are waiting — each one is a single press.`,`ai-rank-suite`)}`:b(`Nothing is waiting. Everything below is one press away when it is.`,`ai-rank-suite`)}`:b(`Everything the AI in this plugin can take off your hands — once an engine is connected.`,`ai-rank-suite`),icon:(0,Co.jsx)(`span`,{className:`ars-letai-icon`,children:(0,Co.jsx)(bt,{size:19})}),action:t.connected?(0,Co.jsx)(j,{tone:x>0?`warning`:`good`,children:b(x>0?`ready to run`:`nothing waiting`,`ai-rank-suite`)}):(0,Co.jsx)(A,{onClick:()=>To(`/ai`),children:b(`Connect an engine`,`ai-rank-suite`)}),children:[r&&(0,Co.jsx)(M,{tone:`serious`,children:r}),(_||l&&a?.state===`done`)&&(0,Co.jsxs)(`div`,{className:`grid gap-1.5 mb-4`,children:[(0,Co.jsxs)(`div`,{className:`flex justify-between text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:[(0,Co.jsxs)(`span`,{children:[b(_?`Working…`:`Finished`,`ai-rank-suite`),` `,(a.done||0).toLocaleString(),` `,b(`of`,`ai-rank-suite`),` `,(a.total||0).toLocaleString(),a.failed?` · ${a.failed} ${b(`failed`,`ai-rank-suite`)}`:``]}),(0,Co.jsxs)(`span`,{className:`flex items-center gap-3`,children:[(0,Co.jsxs)(`span`,{className:`tabular-nums`,children:[v,`%`]}),_&&(0,Co.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:g,children:b(`Stop`,`ai-rank-suite`)})]})]}),(0,Co.jsx)(Pe,{value:v})]}),(0,Co.jsx)(`div`,{className:`ars-letai${e?` is-compact`:``}`,children:wo.map(n=>{let r=y.filter(t=>t.group===n.id&&(!e||typeof t.open==`number`&&t.open>0));return r.length===0?null:(0,Co.jsxs)(`section`,{className:`ars-letai-group`,children:[(0,Co.jsxs)(`header`,{className:`ars-letai-head`,children:[(0,Co.jsx)(`span`,{className:`t-overline`,children:n.label}),!e&&(0,Co.jsx)(`span`,{className:`t-caption`,children:n.sub})]}),r.map(n=>{let r=s===n.id||_&&n.action?.kind===`bulk`&&a?.action===n.action.action,i=!t.connected&&!n.free,o=typeof n.open==`number`&&n.open>0;return(0,Co.jsxs)(`div`,{className:`ars-letai-row${i?` is-disabled`:``}`,children:[(0,Co.jsxs)(`div`,{className:`min-w-0 grid gap-0.5`,children:[(0,Co.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Co.jsx)(`span`,{className:`font-semibold text-[13px]`,children:n.label}),n.free&&(0,Co.jsx)(j,{tone:`good`,children:b(`free`,`ai-rank-suite`)}),n.per_page&&(0,Co.jsx)(j,{tone:`neutral`,children:b(`also per page`,`ai-rank-suite`)})]}),!e&&(0,Co.jsx)(`span`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:n.detail}),!e&&(0,Co.jsx)(`code`,{className:`ars-letai-route`,children:n.route})]}),(0,Co.jsxs)(`div`,{className:`ars-letai-cell`,children:[o?(0,Co.jsxs)(`span`,{className:`ars-letai-open`,children:[(0,Co.jsx)(`strong`,{className:`tabular-nums`,children:n.open.toLocaleString()}),(0,Co.jsx)(`span`,{children:n.unit})]}):typeof n.open==`number`?(0,Co.jsxs)(`span`,{className:`ars-letai-open is-clear`,children:[`✓ `,b(`nothing open`,`ai-rank-suite`)]}):null,(0,Co.jsx)(A,{variant:o&&!i?`primary`:`ghost`,busy:r,disabled:i||_&&!r,onClick:()=>h(n),children:n.action?.kind===`go`?b(`Open`,`ai-rank-suite`):n.action?.kind===`autopilot`?b(`Plan run`,`ai-rank-suite`):b(o?`Do it`:`Run again`,`ai-rank-suite`)})]})]},n.id)})]},n.id)})})]})}var So,Co,wo,To,Eo=o((()=>{So=u(f(),1),C(),D(),at(),Ft(),Co=O(),wo=[{id:`write`,label:b(`Write`,`ai-rank-suite`),sub:b(`Copy the AI produces and saves into pages`,`ai-rank-suite`)},{id:`find`,label:b(`Find`,`ai-rank-suite`),sub:b(`What to target — proposed, never applied without you`,`ai-rank-suite`)},{id:`check`,label:b(`Check`,`ai-rank-suite`),sub:b(`Measurement the rest of the plugin reads`,`ai-rank-suite`)},{id:`run`,label:b(`Run`,`ai-rank-suite`),sub:b(`The unattended mode`,`ai-rank-suite`)}],To=e=>{window.location.hash=e}}));function Do(){let[e,t]=(0,Oo.useState)(null),[n,r]=(0,Oo.useState)(null),[i,a]=(0,Oo.useState)(`custom`),[o,s]=(0,Oo.useState)(!1),[c,l]=(0,Oo.useState)(!1),[u,d]=(0,Oo.useState)(null);if((0,Oo.useEffect)(()=>{E.get(`/ai/knowledge`).then(t).catch(e=>d(e.message))},[]),!e)return(0,ko.jsx)(k,{title:b(`Knowledge base`,`ai-rank-suite`),icon:(0,ko.jsx)(pt,{size:18}),children:u?(0,ko.jsx)(M,{tone:`serious`,children:u}):(0,ko.jsx)(`span`,{className:`t-caption`,children:b(`Loading…`,`ai-rank-suite`)})});let f=e.custom||``,p=n===null?f:n,m=n!==null&&n!==f,h=async()=>{s(!0),d(null);try{let e=await E.put(`/ai/knowledge`,{custom:p});t(e),r(null),l(!0),setTimeout(()=>l(!1),1800)}catch(e){d(e.message)}finally{s(!1)}},g=()=>r(null),_=e.briefing||``,v=_.indexOf(`## About this business, in the owner's words`),y=v>0?_.slice(0,v).trim():_;return(0,ko.jsxs)(k,{title:b(`Knowledge base`,`ai-rank-suite`),subtitle:b(`What every AI call is told before its task — on every engine you connect. The template is fixed and always sent; your own notes are added after it.`,`ai-rank-suite`),icon:(0,ko.jsx)(pt,{size:18}),action:(0,ko.jsxs)(`div`,{className:`flex items-center gap-2`,children:[c&&(0,ko.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,ko.jsx)(He,{value:i,onChange:a,options:[{id:`custom`,label:b(`Your notes`,`ai-rank-suite`)},{id:`template`,label:b(`Template`,`ai-rank-suite`)},{id:`preview`,label:b(`Preview`,`ai-rank-suite`)}]})]}),children:[u&&(0,ko.jsx)(M,{tone:`serious`,children:u}),i===`custom`&&(0,ko.jsxs)(`div`,{className:`grid gap-3`,children:[(0,ko.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`Tell the writer what a new colleague would need to know: what you sell, to whom, where, in which languages, what you never claim, and how you sound. Plain text; the fixed template already covers SEO and GEO rules.`,`ai-rank-suite`)}),(0,ko.jsx)(`textarea`,{rows:12,value:p,placeholder:e.template,onChange:e=>r(e.target.value),style:{fontFamily:`inherit`,fontSize:13,lineHeight:1.5}}),(0,ko.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,ko.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[f===``&&(0,ko.jsx)(A,{variant:`ghost`,onClick:()=>r(e.template),children:b(`Start from the template`,`ai-rank-suite`)}),(0,ko.jsxs)(`span`,{className:`t-caption`,children:[p.length.toLocaleString(),` `,b(`characters`,`ai-rank-suite`)]})]}),(0,ko.jsxs)(`div`,{className:`flex items-center gap-2`,children:[m&&(0,ko.jsx)(A,{variant:`ghost`,onClick:g,disabled:o,children:b(`Cancel`,`ai-rank-suite`)}),(0,ko.jsx)(A,{onClick:h,busy:o,disabled:!m,children:b(`Save notes`,`ai-rank-suite`)})]})]})]}),i===`template`&&(0,ko.jsxs)(`div`,{className:`grid gap-2`,children:[(0,ko.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`Fixed for every engine and every task. The site facts in it are read live from WordPress and from the Schema → Identity settings, so filling those in makes every AI output better.`,`ai-rank-suite`)}),(0,ko.jsx)(`pre`,{className:`ars-briefing`,children:y})]}),i===`preview`&&(0,ko.jsxs)(`div`,{className:`grid gap-2`,children:[(0,ko.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`The complete briefing, verbatim, as the next AI call will receive it. Each task then adds its own instructions after this.`,`ai-rank-suite`)}),(0,ko.jsx)(`pre`,{className:`ars-briefing`,children:_}),m&&(0,ko.jsx)(M,{tone:`warning`,children:b(`You have unsaved notes — this preview shows what is saved, not what is typed.`,`ai-rank-suite`)})]})]})}var Oo,ko,Ao=o((()=>{Oo=u(f(),1),C(),D(),at(),Ft(),ko=O()}));function jo(){let[e,t]=(0,Mo.useState)(null),[n,r]=(0,Mo.useState)(null),[i,a]=(0,Mo.useState)(!1),[o,s]=(0,Mo.useState)(!1),[c,l]=(0,Mo.useState)(null);if((0,Mo.useEffect)(()=>{E.get(`/ai/usage`).then(t).catch(e=>l(e.message))},[]),!e)return(0,No.jsx)(k,{title:b(`AI usage & budget`,`ai-rank-suite`),icon:(0,No.jsx)(ht,{size:18}),children:c?(0,No.jsx)(M,{tone:`serious`,children:c}):(0,No.jsx)(`span`,{className:`t-caption`,children:b(`Loading…`,`ai-rank-suite`)})});let u=e.budget,d=n||u,f=n!==null&&JSON.stringify(n)!==JSON.stringify(u),p=(e,t)=>r({...d,[e]:t}),m=async()=>{a(!0),l(null);try{t(await E.put(`/ai/usage`,{budget:d})),r(null),s(!0),setTimeout(()=>s(!1),1800)}catch(e){l(e.message)}finally{a(!1)}},h=e.pct.today,g=e.pct.month,_=d.warn_pct||80,v=e=>e>=100?`serious`:e>=_?`warning`:`good`;return(0,No.jsxs)(k,{title:b(`AI usage & budget`,`ai-rank-suite`),subtitle:b(`Measured from every call the plugin makes, priced at the vendor list rate per model. An estimate of your invoice, checked before each call so a runaway job stops itself.`,`ai-rank-suite`),icon:(0,No.jsx)(ht,{size:18}),action:o?(0,No.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}):null,children:[c&&(0,No.jsx)(M,{tone:`serious`,children:c}),(0,No.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,No.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,No.jsxs)(`div`,{className:`flex justify-between text-[12.5px]`,children:[(0,No.jsx)(`span`,{className:`font-semibold`,children:b(`Today`,`ai-rank-suite`)}),(0,No.jsxs)(`span`,{className:`tabular-nums`,style:{color:`var(--ars-ink-2)`},children:[Po(e.spend.today),` `,d.daily_usd>0?`/ $${Number(d.daily_usd).toFixed(2)}`:``,` · `,e.spend.today_calls,` `,b(`calls`,`ai-rank-suite`)]})]}),(0,No.jsx)(Pe,{value:Math.min(100,h),color:`var(--ars-${v(h)})`})]}),(0,No.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,No.jsxs)(`div`,{className:`flex justify-between text-[12.5px]`,children:[(0,No.jsx)(`span`,{className:`font-semibold`,children:b(`This month`,`ai-rank-suite`)}),(0,No.jsxs)(`span`,{className:`tabular-nums`,style:{color:`var(--ars-ink-2)`},children:[Po(e.spend.month),` `,d.monthly_usd>0?`/ $${Number(d.monthly_usd).toFixed(2)}`:``,` · `,e.spend.month_calls,` `,b(`calls`,`ai-rank-suite`)]})]}),(0,No.jsx)(Pe,{value:Math.min(100,g),color:`var(--ars-${v(g)})`})]})]}),(h>=100||g>=100)&&d.hard_stop&&(0,No.jsx)(`div`,{className:`mt-3`,children:(0,No.jsx)(M,{tone:`serious`,children:b(`A budget is reached and the hard stop is on: AI calls are refused until the window rolls over or the limit is raised.`,`ai-rank-suite`)})}),e.by_day.length>1&&(0,No.jsxs)(`div`,{className:`mt-4`,children:[(0,No.jsx)(`div`,{className:`t-overline mb-1`,children:b(`Spend, last 30 days`,`ai-rank-suite`)}),(0,No.jsx)(Ge,{height:90,data:e.by_day.map(e=>({label:e.day.slice(5),cost:Math.round(e.cost/1e4)/100})),series:[{key:`cost`,label:b(`USD`,`ai-rank-suite`),color:`var(--ars-brand)`}]})]}),e.by_job.length>0&&(0,No.jsxs)(`div`,{className:`mt-4 grid gap-1`,children:[(0,No.jsx)(`div`,{className:`t-overline`,children:b(`By job, this month`,`ai-rank-suite`)}),e.by_job.map(e=>(0,No.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-[12.5px] py-1`,style:{borderBottom:`1px solid var(--ars-border)`},children:[(0,No.jsx)(`span`,{className:`font-medium`,children:e.job}),(0,No.jsxs)(`span`,{className:`tabular-nums`,style:{color:`var(--ars-ink-2)`},children:[Po(e.cost),` · `,e.calls,` `,b(`calls`,`ai-rank-suite`),` · `,(e.tokens/1e3).toFixed(1),`k `,b(`tokens`,`ai-rank-suite`),` · `,e.latency,` ms`,e.failed?` · ${e.failed} ${b(`failed`,`ai-rank-suite`)}`:``]})]},e.job))]}),(0,No.jsxs)(`div`,{className:`mt-5 grid gap-3 md:grid-cols-3`,children:[(0,No.jsx)(Ke,{label:b(`Daily limit (USD)`,`ai-rank-suite`),hint:b(`0 = no limit`,`ai-rank-suite`),htmlFor:`airanksuite-b-day`,children:(0,No.jsx)(`input`,{id:`airanksuite-b-day`,type:`number`,min:`0`,step:`0.5`,value:d.daily_usd,onChange:e=>p(`daily_usd`,Number(e.target.value))})}),(0,No.jsx)(Ke,{label:b(`Monthly limit (USD)`,`ai-rank-suite`),hint:b(`0 = no limit`,`ai-rank-suite`),htmlFor:`airanksuite-b-mon`,children:(0,No.jsx)(`input`,{id:`airanksuite-b-mon`,type:`number`,min:`0`,step:`1`,value:d.monthly_usd,onChange:e=>p(`monthly_usd`,Number(e.target.value))})}),(0,No.jsx)(Ke,{label:b(`Per bulk job (USD)`,`ai-rank-suite`),hint:b(`A single run stops here`,`ai-rank-suite`),htmlFor:`airanksuite-b-job`,children:(0,No.jsx)(`input`,{id:`airanksuite-b-job`,type:`number`,min:`0`,step:`1`,value:d.per_job_usd,onChange:e=>p(`per_job_usd`,Number(e.target.value))})})]}),(0,No.jsxs)(`div`,{className:`mt-3 flex items-center justify-between gap-3 flex-wrap`,children:[(0,No.jsxs)(`div`,{className:`flex items-center gap-4 flex-wrap`,children:[(0,No.jsx)(Ee,{checked:!!d.hard_stop,onChange:e=>p(`hard_stop`,e),label:b(`Hard stop at the limit`,`ai-rank-suite`)}),(0,No.jsxs)(`label`,{className:`flex items-center gap-2 text-[12.5px]`,children:[b(`Warn at`,`ai-rank-suite`),(0,No.jsx)(`input`,{type:`number`,min:`0`,max:`100`,style:{width:64},value:d.warn_pct,onChange:e=>p(`warn_pct`,Number(e.target.value))}),`%`]})]}),(0,No.jsxs)(`div`,{className:`flex items-center gap-2`,children:[f&&(0,No.jsx)(A,{variant:`ghost`,onClick:()=>r(null),disabled:i,children:b(`Cancel`,`ai-rank-suite`)}),(0,No.jsx)(A,{onClick:m,busy:i,disabled:!f,children:b(`Save budget`,`ai-rank-suite`)})]})]})]})}var Mo,No,Po,Fo=o((()=>{Mo=u(f(),1),C(),D(),at(),Ft(),No=O(),Po=e=>{let t=(e||0)/1e6;return t>0&&t<.01?`$${t.toFixed(4)}`:`$${t.toFixed(2)}`}})),Io=c({default:()=>Lo});function Lo(){let{data:e,setData:t,s:n,update:r,save:i,run:a,busy:o,saved:s,error:c}=Wa(`/settings/ai`),[l,u]=(0,Ro.useState)(``),[d,f]=(0,Ro.useState)(null),[p,m]=(0,Ro.useState)(`all`),[h,g]=(0,Ro.useState)(``),[_,v]=(0,Ro.useState)(()=>{try{return window.sessionStorage.getItem(`airanksuite-ai-wizard-return`)===`1`}catch{return!1}}),y=e?.providers||[],x=e?.key_hints||{},C=e?.regions||{},w=(0,Ro.useMemo)(()=>y.find(e=>e.id===n?.provider)||y[0]||{},[y,n?.provider]),ee=(0,Ro.useMemo)(()=>{let e=h.trim().toLowerCase(),t=t=>(p===`all`||t.region===p)&&(!e||t.label.toLowerCase().includes(e)||t.company.toLowerCase().includes(e)||(t.models||[]).some(t=>t.toLowerCase().includes(e)));return Bo.map(e=>({id:e,label:C[e]||e,items:y.filter(n=>n.region===e&&t(n))})).filter(e=>e.items.length>0)},[y,C,p,h]);if(!e)return(0,zo.jsx)(_e,{error:c});let T=async()=>{f(null);try{let e={...n};l.trim()&&(e.api_key=l.trim()),await i(e),u(``)}catch{}},te=()=>(f(null),a(async()=>{try{await E.post(`/ai/verify`),f(`ok`)}catch(e){throw f(`fail`),e}})),ne=e=>{let t={provider:e.id};(e.models||[]).includes(n.model)||(t.model=``),t.base_url=e.needsUrl?n.base_url||e.base:``,r(t)},re=y.length;return(0,zo.jsxs)(`div`,{className:`ars-page`,children:[_&&(0,zo.jsxs)(M,{tone:e?.has_key?`good`:`info`,children:[e?.has_key?b(`A key is stored. You can pick up the AI setup where you left it.`,`ai-rank-suite`):b(`Add a key below, then return to the AI setup.`,`ai-rank-suite`),` `,(0,zo.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>{try{window.sessionStorage.removeItem(`airanksuite-ai-wizard-return`)}catch{}v(!1),window.location.hash=`/ai-wizard`},children:b(`Back to AI setup`,`ai-rank-suite`)})]}),(0,zo.jsx)(xo,{}),(0,zo.jsx)(jo,{}),(0,zo.jsx)(Do,{}),(0,zo.jsx)(k,{title:b(`AI engine`,`ai-rank-suite`),subtitle:S(b(`Bring your own key — %d providers across the US, Europe, China, gateways and your own servers`,`ai-rank-suite`),re),action:e.has_key?(0,zo.jsxs)(j,{tone:`good`,children:[`✓ Key stored `,e.key_hint]}):(0,zo.jsx)(j,{tone:`neutral`,children:b(`No key`,`ai-rank-suite`)}),children:(0,zo.jsxs)(`div`,{className:`grid gap-4`,children:[(0,zo.jsxs)(`div`,{children:[(0,zo.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap mb-2`,children:[(0,zo.jsx)(`label`,{className:`block font-medium`,children:b(`Provider`,`ai-rank-suite`)}),(0,zo.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,zo.jsx)(Ve,{value:p,onChange:m,options:[{id:`all`,label:b(`All`,`ai-rank-suite`)},...Bo.filter(e=>y.some(t=>t.region===e)).map(e=>({id:e,label:Vo[e]||e}))]}),(0,zo.jsx)(`input`,{type:`search`,placeholder:b(`Search provider or model…`,`ai-rank-suite`),value:h,onChange:e=>g(e.target.value),className:`w-[190px]`,style:{height:30,fontSize:12.5}})]})]}),(0,zo.jsxs)(`div`,{className:`grid gap-3`,children:[ee.map(e=>(0,zo.jsxs)(`div`,{children:[(0,zo.jsx)(`div`,{className:`t-overline mb-1.5`,children:e.label}),(0,zo.jsx)(`div`,{className:`ars-cardgrid`,style:{"--min":`300px`},children:e.items.map(e=>{let t=n.provider===e.id;return(0,zo.jsxs)(`button`,{type:`button`,onClick:()=>ne(e),className:`ars-pick${t?` is-active`:``}`,children:[(0,zo.jsxs)(`span`,{className:`ars-pick-title`,children:[e.label,(0,zo.jsx)(`span`,{className:`ars-tag`,style:{color:`var(--ars-c-${Ho[e.region]||`blue`}-ink)`,background:`var(--ars-c-${Ho[e.region]||`blue`})`},children:Vo[e.region]||e.region}),x[e.id]&&(0,zo.jsx)(`span`,{className:`ars-tag`,style:{color:`var(--ars-c-green-ink)`,background:`var(--ars-c-green)`},title:`Key stored ${x[e.id]}`,children:b(`Key`,`ai-rank-suite`)}),t&&(0,zo.jsx)(`span`,{style:{marginLeft:`auto`,color:`var(--ars-brand)`},children:`✓`})]}),(0,zo.jsx)(`span`,{className:`ars-pick-note`,children:e.note||e.company})]},e.id)})})]},e.id)),ee.length===0&&(0,zo.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`No provider matches that search.`,`ai-rank-suite`)})]})]}),(0,zo.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,zo.jsxs)(`div`,{children:[(0,zo.jsxs)(`label`,{className:`block font-medium mb-1`,children:[`API key for `,w.label]}),(0,zo.jsx)(`input`,{type:`password`,placeholder:x[w.id]?S(b(`Stored (%s) — type to replace`,`ai-rank-suite`),x[w.id]):w.keyHint,value:l,onChange:e=>u(e.target.value),autoComplete:`off`}),(0,zo.jsxs)(`p`,{className:`m-0 mt-1.5 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[`One key per engine — each is kept in its own slot, so switching provider never asks you to type it again. Encrypted on this site (libsodium), never returned by the API.`,w.keyUrl?(0,zo.jsxs)(zo.Fragment,{children:[` `,(0,zo.jsxs)(`a`,{href:w.keyUrl,target:`_blank`,rel:`noreferrer noopener`,children:[`Get a `,w.label,` key ↗`]})]}):null]})]}),(0,zo.jsxs)(`div`,{children:[(0,zo.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Model`,`ai-rank-suite`)}),(w.models||[]).length>0?(0,zo.jsxs)(`select`,{value:n.model||``,onChange:e=>r({model:e.target.value}),children:[(0,zo.jsxs)(`option`,{value:``,children:[`Default — `,w.default]}),w.models.map(e=>(0,zo.jsx)(`option`,{value:e,children:e},e)),n.model&&!w.models.includes(n.model)&&(0,zo.jsx)(`option`,{value:n.model,children:n.model})]}):(0,zo.jsx)(`input`,{type:`text`,placeholder:w.default||`model name`,value:n.model||``,onChange:e=>r({model:e.target.value})}),(0,zo.jsx)(`p`,{className:`m-0 mt-1.5 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Any model id the provider accepts also works — type it in.`,`ai-rank-suite`)})]})]}),w.needsUrl&&(0,zo.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,zo.jsxs)(`div`,{children:[(0,zo.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Base URL`,`ai-rank-suite`)}),(0,zo.jsx)(`input`,{type:`text`,placeholder:w.base||`https://your-endpoint/v1`,value:n.base_url||``,onChange:e=>r({base_url:e.target.value})})]}),n.provider===`azure`&&(0,zo.jsxs)(`div`,{children:[(0,zo.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`API version`,`ai-rank-suite`)}),(0,zo.jsx)(`input`,{type:`text`,placeholder:`2024-10-21`,value:n.api_version||``,onChange:e=>r({api_version:e.target.value})})]})]}),(0,zo.jsx)(Ee,{checked:!!n.auto_meta,onChange:e=>r({auto_meta:e}),label:b(`Auto-generate a meta description when a post is first published (only if none exists)`,`ai-rank-suite`)}),(0,zo.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,zo.jsx)(A,{onClick:T,busy:o,children:b(`Save`,`ai-rank-suite`)}),(0,zo.jsx)(A,{variant:`ghost`,onClick:te,busy:o,disabled:!e.has_key,children:b(`Test connection`,`ai-rank-suite`)}),s&&(0,zo.jsx)(j,{tone:`good`,children:`✓ Saved`}),d===`ok`&&(0,zo.jsx)(j,{tone:`good`,children:`✓ Connection works`})]}),c&&(0,zo.jsx)(M,{tone:`serious`,children:c})]})}),(0,zo.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,zo.jsx)(k,{title:b(`What AI powers`,`ai-rank-suite`),subtitle:b(`Available once a key is stored`,`ai-rank-suite`),children:(0,zo.jsxs)(`ul`,{className:`m-0 pl-5 grid gap-1.5 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:[(0,zo.jsxs)(`li`,{children:[(0,zo.jsx)(`strong`,{style:{color:`var(--ars-ink)`},children:b(`Meta descriptions & summaries`,`ai-rank-suite`)}),` `,b(`— per page, in the Content drawer and directly in the block editor sidebar.`,`ai-rank-suite`)]}),(0,zo.jsxs)(`li`,{children:[(0,zo.jsx)(`strong`,{style:{color:`var(--ars-ink)`},children:b(`FAQ generation`,`ai-rank-suite`)}),` `,b(`— grounded question/answer pairs that also feed FAQPage schema and the`,`ai-rank-suite`),` `,(0,zo.jsx)(`code`,{className:`ars-mono`,children:`[airanksuite_faq]`}),` shortcode.`]}),(0,zo.jsxs)(`li`,{children:[(0,zo.jsx)(`strong`,{style:{color:`var(--ars-ink)`},children:b(`Bulk runs`,`ai-rank-suite`)}),` `,b(`— thousands of pages in resumable slices, so a 50,000-product catalogue finishes without a timeout.`,`ai-rank-suite`)]}),(0,zo.jsx)(`li`,{children:b(`Costs stay on your provider account; every call is one small request per page.`,`ai-rank-suite`)})]})}),(0,zo.jsx)(k,{title:b(`Choosing a provider`,`ai-rank-suite`),subtitle:b(`What actually changes`,`ai-rank-suite`),children:(0,zo.jsxs)(`ul`,{className:`m-0 pl-5 grid gap-1.5 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:[(0,zo.jsxs)(`li`,{children:[(0,zo.jsx)(`strong`,{style:{color:`var(--ars-ink)`},children:b(`Data residency`,`ai-rank-suite`)}),` `,b(`— EU providers keep the request inside Europe; self-hosted keeps it inside your own network.`,`ai-rank-suite`)]}),(0,zo.jsxs)(`li`,{children:[(0,zo.jsx)(`strong`,{style:{color:`var(--ars-ink)`},children:b(`Market reach`,`ai-rank-suite`)}),` `,b(`— the Chinese engines answer the queries Google never sees. If you sell into APAC, test against them.`,`ai-rank-suite`)]}),(0,zo.jsxs)(`li`,{children:[(0,zo.jsx)(`strong`,{style:{color:`var(--ars-ink)`},children:b(`Cost per 1,000 pages`,`ai-rank-suite`)}),` `,b(`— a fast small model is usually the right call for descriptions; save the large ones for FAQs.`,`ai-rank-suite`)]}),(0,zo.jsx)(`li`,{children:b(`Switching provider changes nothing you have already generated — your content stays.`,`ai-rank-suite`)})]})})]})]})}var Ro,zo,Bo,Vo,Ho,Uo=o((()=>{Ro=u(f(),1),C(),Ka(),D(),at(),Eo(),Ao(),Fo(),zo=O(),Bo=[`us`,`eu`,`cn`,`any`,`local`],Vo={us:`US`,eu:`EU`,cn:`CN`,any:`Gateway`,local:`Local`},Ho={us:`blue`,eu:`green`,cn:`red`,any:`violet`,local:`yellow`}}));function Wo({badge:e=b(`Not run yet`,`ai-rank-suite`),title:t,why:n,action:r,onAction:i,busy:a=!1,disabled:o=!1,ringLabel:s=`Score`,stats:c=[],steps:l=[],previews:u=[],progress:d=null}){let f=l.find(e=>!e.done);return(0,Go.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Go.jsxs)(`div`,{className:`ars-hero`,children:[(0,Go.jsx)(`div`,{className:`ars-hero-ring`,children:(0,Go.jsx)(Oe,{value:null,size:132,label:s,onLight:!0})}),(0,Go.jsxs)(`div`,{className:`ars-hero-body`,children:[(0,Go.jsx)(`span`,{className:`ars-hero-badge`,children:e}),(0,Go.jsx)(`h2`,{className:`ars-hero-title`,children:t}),(0,Go.jsx)(`p`,{className:`ars-hero-why`,children:n}),(0,Go.jsxs)(`div`,{className:`ars-hero-actions`,children:[r&&(0,Go.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:i,disabled:a||o,children:a?b(`Working…`,`ai-rank-suite`):r}),f&&f.action&&(0,Go.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,onClick:f.onAction,children:f.action})]}),d&&d.running&&(0,Go.jsx)(`div`,{className:`ars-hero-progress`,children:(0,Go.jsx)(Ne,{label:d.label,done:d.done,total:d.total,percent:d.percent,note:d.note})})]}),(0,Go.jsx)(`div`,{className:`ars-hero-stats`,children:c.slice(0,4).map(e=>(0,Go.jsxs)(`div`,{className:`ars-hero-stat`,style:{cursor:`default`},title:e.hint||``,children:[(0,Go.jsx)(`span`,{className:`ars-hero-stat-v`,style:{color:`var(--ars-ink-3)`},children:`—`}),(0,Go.jsx)(`span`,{className:`ars-hero-stat-l`,children:e.label})]},e.label))})]}),l.length>0&&(0,Go.jsx)(`ol`,{className:`ars-steps`,children:l.map((e,t)=>(0,Go.jsxs)(`li`,{className:`ars-step${e.done?` is-done`:``}${f===e?` is-next`:``}`,children:[(0,Go.jsx)(`span`,{className:`ars-step-n`,children:e.done?`✓`:t+1}),(0,Go.jsxs)(`span`,{className:`grid gap-0.5 min-w-0`,children:[(0,Go.jsx)(`span`,{className:`ars-step-label`,children:e.label}),e.detail&&(0,Go.jsx)(`span`,{className:`ars-step-detail`,children:e.detail})]}),!e.done&&e.action&&(0,Go.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,onClick:e.onAction,children:e.action})]},e.label))}),u.length>0&&(0,Go.jsx)(`div`,{className:`ars-previews`,children:u.map(e=>(0,Go.jsxs)(`div`,{className:`ars-preview`,children:[(0,Go.jsx)(`span`,{className:`ars-preview-title`,children:e.title}),(0,Go.jsx)(`span`,{className:`ars-preview-text`,children:e.text})]},e.title))})]})}var Go,Ko=o((()=>{f(),C(),at(),Go=O()})),qo=c({default:()=>Qo});function Jo({items:e,onChange:t,placeholder:n,max:r=25,addLabel:i=b(`Add`,`ai-rank-suite`),stats:a=null}){let[o,s]=(0,$o.useState)(``),c=()=>{let n=o.trim();!n||e.includes(n)||e.length>=r||(t([...e,n]),s(``))};return(0,H.jsxs)(`div`,{className:`grid gap-2`,children:[(0,H.jsxs)(`form`,{className:`flex gap-2`,onSubmit:e=>{e.preventDefault(),c()},children:[(0,H.jsx)(`input`,{type:`text`,placeholder:n,value:o,onChange:e=>s(e.target.value),disabled:e.length>=r}),(0,H.jsx)(A,{variant:`ghost`,onClick:c,disabled:!o.trim()||e.length>=r,children:i})]}),e.length>0&&a&&(0,H.jsx)(`div`,{className:`ars-table-wrap`,children:(0,H.jsxs)(`table`,{className:`ars-table`,children:[(0,H.jsx)(`thead`,{children:(0,H.jsxs)(`tr`,{children:[(0,H.jsx)(`th`,{children:b(`Question`,`ai-rank-suite`)}),(0,H.jsx)(`th`,{className:`is-num`,style:{width:90},children:b(`Hit rate`,`ai-rank-suite`)}),(0,H.jsx)(`th`,{className:`is-num`,style:{width:70},children:b(`Best`,`ai-rank-suite`)}),(0,H.jsx)(`th`,{className:`is-num`,style:{width:120},children:b(`Last run`,`ai-rank-suite`)}),(0,H.jsx)(`th`,{style:{width:70}})]})}),(0,H.jsx)(`tbody`,{children:e.map(n=>{let r=a(n)||{};return(0,H.jsxs)(`tr`,{children:[(0,H.jsx)(`td`,{className:`font-medium`,children:n}),(0,H.jsx)(`td`,{className:`is-num`,children:(0,H.jsx)(`span`,{className:`font-semibold tabular-nums`,style:{color:r.hit_rate==null?`var(--ars-ink-3)`:r.hit_rate>=70?`var(--ars-good)`:r.hit_rate>=30?`var(--ars-warning)`:`var(--ars-serious)`},children:r.hit_rate==null?b(`new`,`ai-rank-suite`):`${r.hit_rate}%`})}),(0,H.jsx)(`td`,{className:`is-num is-muted`,children:r.best?`#${r.best}`:`–`}),(0,H.jsx)(`td`,{className:`is-num`,children:r.last===void 0?(0,H.jsx)(`span`,{className:`is-muted`,children:`–`}):r.last?(0,H.jsxs)(j,{tone:`good`,children:[b(`named`,`ai-rank-suite`),r.lastPos?` #${r.lastPos}`:``]}):(0,H.jsx)(j,{tone:`serious`,children:b(`not named`,`ai-rank-suite`)})}),(0,H.jsx)(`td`,{className:`is-num`,children:(0,H.jsx)(`button`,{type:`button`,className:`ars-chip`,onClick:()=>t(e.filter(e=>e!==n)),"aria-label":S(b(`Remove %s`,`ai-rank-suite`),n),children:b(`Remove`,`ai-rank-suite`)})})]},n)})})]})}),e.length>0&&!a&&(0,H.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.map((n,r)=>(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 pl-3 pr-2 py-1 ars-r-sm text-[12.5px]`,style:{background:`var(--ars-surface-2)`,border:`1px solid var(--ars-border)`},children:[n,(0,H.jsx)(`button`,{type:`button`,"aria-label":S(b(`Remove %s`,`ai-rank-suite`),n),className:`border-0 bg-transparent cursor-pointer p-0 inline-flex`,style:{color:`var(--ars-ink-3)`},onClick:()=>t(e.filter((e,t)=>t!==r)),children:(0,H.jsx)(Mt,{size:12})})]},`${n}-${r}`))})]})}function Yo({cell:e,label:t}){if(!e)return(0,H.jsx)(`span`,{title:S(b(`%s: not monitored yet`,`ai-rank-suite`),t),className:`ars-cell`,style:{background:`var(--ars-surface-3)`,opacity:.5}});if(!e.mentioned)return(0,H.jsx)(`span`,{title:S(b(`%s: not mentioned`,`ai-rank-suite`),t),className:`ars-cell`,style:{background:`#f6aea9`}});let n=e.position>0&&e.position<=3?`#188038`:e.position<=6?`#81c995`:`#f9ab00`;return(0,H.jsx)(`span`,{title:`${e.position>0?S(b(`%1$s: mentioned at #%2$d`,`ai-rank-suite`),t,e.position):S(b(`%s: mentioned`,`ai-rank-suite`),t)}${e.cited?` · ${b(`cited`,`ai-rank-suite`)}`:``}`,className:`ars-cell`,style:{background:n},children:e.cited&&(0,H.jsx)(`span`,{className:`ars-cell-dot`,"aria-hidden":!0})})}function Xo({row:e,track:t,runs:n,onClose:r}){if(!e)return null;let i=es[e.sentiment]||es.neutral,a=e.mentioned?e.position>3?b(`You are in the answer but late. Assistants lead with the source that is most specific — add concrete numbers, a comparison table, or a clear "best for X" statement to the page that covers this.`,`ai-rank-suite`):e.linked?b(`You own this one: your URL appears in the simulated answer. Keep the page fresh — assistants drop stale sources first.`,`ai-rank-suite`):e.cited?b(`The model says it would cite you, but no link to your site appeared in its answer — an estimate, not an observation. A canonical, well-structured page usually turns that into a real link.`,`ai-rank-suite`):b(`You are named early but not linked. A citation usually follows from a canonical, well-structured page: check that this topic has one page rather than three overlapping ones.`,`ai-rank-suite`):b(`Publish a page that answers this question directly in its opening paragraph, name your brand in that answer, and mark it up as FAQPage or Article. Assistants quote the source that states the answer plainly.`,`ai-rank-suite`);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`button`,{type:`button`,className:`ars-scrim`,"aria-label":b(`Close panel`,`ai-rank-suite`),onClick:r}),(0,H.jsx)(`aside`,{className:`ars-drawer`,role:`dialog`,"aria-modal":`true`,"aria-label":b(`Prompt result`,`ai-rank-suite`),children:(0,H.jsxs)(`div`,{className:`p-5 grid gap-4`,children:[(0,H.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,H.jsx)(`h2`,{className:`m-0 text-[16px] font-bold leading-snug`,children:e.prompt}),(0,H.jsx)(`button`,{type:`button`,onClick:r,"aria-label":b(`Close`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer p-1`,style:{color:`var(--ars-ink-3)`},children:(0,H.jsx)(Mt,{size:16})})]}),(0,H.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[e.mentioned?(0,H.jsxs)(j,{tone:`good`,children:[`✓ `,e.position>0?S(b(`Mentioned at #%d`,`ai-rank-suite`),e.position):b(`Mentioned`,`ai-rank-suite`)]}):(0,H.jsxs)(j,{tone:`serious`,children:[`✕ `,b(`Not mentioned`,`ai-rank-suite`)]}),e.linked&&(0,H.jsx)(j,{tone:`brand`,children:b(`Your URL in the answer`,`ai-rank-suite`)}),!e.linked&&e.cited&&(0,H.jsx)(j,{tone:`neutral`,title:b(`The model's own estimate — no link was observed`,`ai-rank-suite`),children:b(`would cite (estimate)`,`ai-rank-suite`)}),e.model&&(0,H.jsxs)(`span`,{className:`t-caption`,title:b(`This is a simulation of one model's answer, not a live query of a real assistant`,`ai-rank-suite`),children:[b(`simulated`,`ai-rank-suite`),` · `,e.provider,` `,e.model]}),(0,H.jsx)(j,{tone:i.tone,children:S(b(`%s tone`,`ai-rank-suite`),i.label)})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`text-[12px] font-semibold mb-1`,style:{color:`var(--ars-ink-3)`},children:b(`What the assistant answered`,`ai-rank-suite`)}),(0,H.jsx)(`div`,{className:`ars-r-lg px-4 py-3 text-[13px] leading-relaxed`,style:{background:`var(--ars-surface-2)`},children:e.snippet||b(`No answer text was stored for this run.`,`ai-rank-suite`)})]}),e.competitors?.length>0&&(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`text-[12px] font-semibold mb-1.5`,style:{color:`var(--ars-ink-3)`},children:b(`Named in the same answer`,`ai-rank-suite`)}),(0,H.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.competitors.map(e=>(0,H.jsx)(`span`,{className:`px-3 py-1 ars-r-sm text-[12.5px]`,style:{background:`var(--ars-surface-2)`,border:`1px solid var(--ars-border)`},children:e},e))})]}),t&&t.series.length>0&&(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`text-[12px] font-semibold mb-1.5`,style:{color:`var(--ars-ink-3)`},children:b(`Every run for this question`,`ai-rank-suite`)}),(0,H.jsx)(`div`,{className:`grid gap-1.5`,children:t.series.map((e,t)=>(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-3 ars-r-lg px-3 py-2 text-[12.5px]`,style:{background:`var(--ars-surface-2)`},children:[(0,H.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:n[t]?.label??S(b(`Run %d`,`ai-rank-suite`),t+1)}),(0,H.jsx)(`span`,{className:`flex items-center gap-2`,children:e?e.mentioned?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(j,{tone:`good`,children:[`#`,e.position||`?`]}),e.linked&&(0,H.jsx)(j,{tone:`brand`,children:b(`linked`,`ai-rank-suite`)}),!e.linked&&e.cited&&(0,H.jsx)(j,{tone:`neutral`,children:b(`would cite`,`ai-rank-suite`)})]}):(0,H.jsx)(j,{tone:`serious`,children:b(`not mentioned`,`ai-rank-suite`)}):(0,H.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:b(`not monitored yet`,`ai-rank-suite`)})})]},t))})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`text-[12px] font-semibold mb-1`,style:{color:`var(--ars-ink-3)`},children:b(`What to do next`,`ai-rank-suite`)}),(0,H.jsx)(`div`,{className:`ars-r-lg px-4 py-3 text-[12.5px] leading-relaxed`,style:{background:`var(--ars-grad-soft)`},children:a})]}),(0,H.jsx)(`div`,{className:`text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:e.checked_at?S(b(`Checked %s`,`ai-rank-suite`),new Date(e.checked_at.replace(` `,`T`)+`Z`).toLocaleString()):null})]})})]})}function Zo(e){return e.map((e,t)=>{let n=Number(e.position)||0,r=0;e.mentioned&&(r+=60,r+=n===1?25:n===2?18:n===3?12:6,e.linked?r+=15:e.cited&&(r+=5));let i=(e.competitors||[]).length;return{id:`${t}-${e.prompt}`,label:e.prompt,score:Math.min(100,r),sub:e.mentioned?[n>0?n===1?b(`named first`,`ai-rank-suite`):n===2?b(`named second`,`ai-rank-suite`):S(b(`named %dth`,`ai-rank-suite`),n):b(`named`,`ai-rank-suite`),e.cited?b(`with a link`,`ai-rank-suite`):b(`no link`,`ai-rank-suite`),e.sentiment&&e.sentiment!==`neutral`?es[e.sentiment]?.label||e.sentiment:null].filter(Boolean).join(` · `):i>0?S(b(`not named — %s was`,`ai-rank-suite`),(e.competitors||[]).slice(0,2).join(`, `)):b(`not named in the answer`,`ai-rank-suite`),segments:[{label:b(`You`,`ai-rank-suite`),value:+!!e.mentioned,color:`var(--ars-c-green-ink)`},{label:b(`Rivals named instead`,`ai-rank-suite`),value:i,color:`var(--ars-accent)`},{label:b(`Nobody`,`ai-rank-suite`),value:e.mentioned||i?0:1,color:`var(--ars-ink-3)`}],reach:e.mentioned?b(`in the answer`,`ai-rank-suite`):S(x(`%d rival`,`%d rivals`,i,`ai-rank-suite`),i)}}).sort((e,t)=>e.score-t.score)}function Qo({tab:e=`track`,onTab:t}){let[n,r]=(0,$o.useState)(null),[i,a]=(0,$o.useState)(null),[o,s]=(0,$o.useState)(null),[c,l]=(0,$o.useState)(null),[u,d]=(0,$o.useState)(!1),[f,p]=(0,$o.useState)(!1),[m,h]=(0,$o.useState)(null),[g,_]=(0,$o.useState)(!1),[v,y]=(0,$o.useState)(null),[C,w]=(0,$o.useState)(!1),[ee,T]=(0,$o.useState)(null),[te,ne]=(0,$o.useState)(null),re=()=>{E.get(`/ai-visibility/results`).then(a).catch(()=>{}),E.get(`/ai-visibility/matrix`).then(s).catch(()=>{}),E.get(`/ai-visibility/trend`).then(l).catch(()=>{})};if((0,$o.useEffect)(()=>{E.get(`/settings/ai-visibility`).then(r).catch(e=>T(e.message)),re()},[]),!n)return(0,H.jsx)(_e,{error:ee});let ie=n.settings,D=e=>r({...n,settings:{...ie,...e}}),ae=async()=>{d(!0),T(null);try{r(await E.put(`/settings/ai-visibility`,ie)),w(!0),setTimeout(()=>w(!1),2200)}catch(e){T(e.message)}finally{d(!1)}},oe=async()=>{p(!0),T(null);try{await E.put(`/settings/ai-visibility`,ie);let e=await E.post(`/ai-visibility/run`);for(h(e);e.state===`running`;)(e.busy||e.error)&&await new Promise(e=>setTimeout(e,2e3)),e=await E.post(`/ai-visibility/run/tick`),h(e);h(null),a(await E.get(`/ai-visibility/results`)),E.get(`/ai-visibility/matrix`).then(s).catch(()=>{}),E.get(`/ai-visibility/trend`).then(l).catch(()=>{})}catch(e){T(e.message),h(null)}finally{p(!1)}},se=async()=>{_(!0),T(null);try{await E.put(`/settings/ai-visibility`,ie);let e=await E.post(`/ai-visibility/suggest`,{count:10});y(e.prompts)}catch(e){T(e.message)}finally{_(!1)}},ce=e=>{ie.prompts.includes(e)||ie.prompts.length>=n.max_prompts||(D({prompts:[...ie.prompts,e]}),y(v.filter(t=>t!==e)))},le=i?.rows||[],ue=le.filter(e=>e.mentioned).length,de=le.filter(e=>e.cited).length,O=le.filter(e=>e.mentioned&&e.position>0&&e.position<=3).length,fe=i?.history||[],pe=!!(c&&c.series&&c.series.length>0&&c.runs&&c.runs.length>1),me=!!(i&&Array.isArray(i.competitors)&&i.competitors.length>0),he=o?.runs||[],ge=le.reduce((e,t)=>e+(Number(t.cost_micro)||0),0),ve=le.find(e=>e.model)?.model||``,ye=(()=>{let e=new Map;return le.forEach(t=>(t.urls||[]).forEach(t=>e.set(t,(e.get(t)||0)+1))),[...e.entries()].map(([e,t])=>{let n=e;try{let t=new URL(e);n=t.pathname===`/`?t.host:t.pathname}catch{}return{url:e,count:t,path:n}}).sort((e,t)=>t.count-e.count).slice(0,8)})(),be=(()=>{let e=i?.score??0,t=le.length,n=t-ue,r=i?.competitors?.[0],a=t?Math.round(ue/t*100):0,o=r&&r.share>a?r.name:null,s=o?S(b(`Your model names you in %1$d of %2$d simulated answers — %3$s in more.`,`ai-rank-suite`),ue,t,o):S(b(`Your model names you in %1$d of %2$d simulated answers.`,`ai-rank-suite`),ue,t);return e>=75?{tone:`good`,badge:b(`Recommended`,`ai-rank-suite`),text:s,why:de>0?S(b(`%d of them would link to you — keep those pages strong; a link is the only part of an AI answer that sends a visitor.`,`ai-rank-suite`),de):b(`Named, but never linked: the next gain is a page per question that answers it directly enough to be cited.`,`ai-rank-suite`)}:e>=45?{tone:`warning`,badge:b(`Sometimes named`,`ai-rank-suite`),text:s,why:n>0?`${S(x(`%d question your customers ask still gets answered without you — the work list below, worst first.`,`%d questions your customers ask still get answered without you — the work list below, worst first.`,n,`ai-rank-suite`),n)}${O<ue?` ${S(b(`And of the answers that name you, only %d put you in the top three.`,`ai-rank-suite`),O)}`:``}`:S(b(`Named everywhere, but late: only %1$d of %2$d answers put you in the top three, and %3$d link to you. Position and citations are the remaining score.`,`ai-rank-suite`),O,t,de)}:{tone:`bad`,badge:b(`Mostly invisible`,`ai-rank-suite`),text:ue===0?S(b(`Assistants do not name you for any of the %d monitored questions yet.`,`ai-rank-suite`),t):s,why:b(`A generated answer has no page two: a brand that is not named does not exist for that question. Each row of the work list is a page to write or sharpen.`,`ai-rank-suite`)}})();return(0,H.jsxs)(`div`,{className:`ars-page`,children:[ee&&(0,H.jsx)(M,{tone:`serious`,children:ee}),!n.has_ai_key&&le.length>0&&(0,H.jsxs)(M,{tone:`info`,children:[b(`Connect an AI key first (AI Engine page) — answer simulations query your configured model.`,`ai-rank-suite`),` `,(0,H.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent cursor-pointer p-0 font-semibold`,style:{color:`var(--ars-brand)`},onClick:()=>{window.location.hash=`/ai`},children:b(`Open AI Engine →`,`ai-rank-suite`)})]}),le.length===0&&(0,H.jsx)(Wo,{badge:b(`No simulation yet`,`ai-rank-suite`),ringLabel:b(`Answer score`,`ai-rank-suite`),title:b(`No answer has been simulated yet — you do not know whether assistants recommend you.`,`ai-rank-suite`),why:b(`Each run asks your configured AI model the questions your customers ask an assistant, exactly as they would, and records whether you are named, how early, whether you are linked, and who is named instead. From the second run it is a trend; from the first it is a work list.`,`ai-rank-suite`),action:f?m?.total?S(b(`Checking… %1$s / %2$s`,`ai-rank-suite`),m.done,m.total):b(`Checking…`,`ai-rank-suite`):b(`Run the first check`,`ai-rank-suite`),onAction:oe,busy:f,disabled:!n.has_ai_key||!ie.prompts.length,stats:[{label:b(`Named (simulated)`,`ai-rank-suite`)},{label:b(`In the top 3 (simulated)`,`ai-rank-suite`)},{label:b(`Would cite (simulated)`,`ai-rank-suite`)},{label:b(`Rival brands named (simulated)`,`ai-rank-suite`)}],steps:[{label:b(`Connect an AI model`,`ai-rank-suite`),detail:n.has_ai_key?b(`Connected — the simulation uses your configured model and key.`,`ai-rank-suite`):b(`The simulation queries your own model. OpenAI, Anthropic, Mistral and others under AI Engine.`,`ai-rank-suite`),done:!!n.has_ai_key,action:b(`Open AI Engine`,`ai-rank-suite`),onAction:()=>{window.location.hash=`/ai`}},{label:b(`Add the questions your customers ask`,`ai-rank-suite`),detail:ie.prompts.length?S(x(`%1$d prompt monitored — up to %2$d.`,`%1$d prompts monitored — up to %2$d.`,ie.prompts.length,`ai-rank-suite`),ie.prompts.length,n.max_prompts):b(`Five to twenty-five real questions — “best … in …”, “where to …”. The AI can suggest them from your content.`,`ai-rank-suite`),done:ie.prompts.length>0,action:b(`Add prompts`,`ai-rank-suite`),onAction:()=>t&&t(`prompts`)},{label:b(`Name your brand and rivals`,`ai-rank-suite`),detail:ie.brand?`${ie.brand}${ie.competitors?.length?` · ${S(x(`%d rival`,`%d rivals`,ie.competitors.length,`ai-rank-suite`),ie.competitors.length)}`:``}`:b(`What the AI must say for a mention to count, and who else you expect it to name.`,`ai-rank-suite`),done:!!ie.brand,action:b(`Open Brand`,`ai-rank-suite`),onAction:()=>t&&t(`brand`)},{label:b(`Run the first check`,`ai-rank-suite`),detail:b(`One model call per prompt. Weekly automation is on the Brand tab.`,`ai-rank-suite`),done:!1}],previews:[{title:b(`Share of voice`,`ai-rank-suite`),text:b(`You and each rival across every run — who is gaining ground in the answers and who is losing it.`,`ai-rank-suite`)},{title:b(`Work list`,`ai-rank-suite`),text:b(`The questions you are not the answer to, worst first, with who was named instead and the answer itself.`,`ai-rank-suite`)},{title:b(`Pages the assistant cites`,`ai-rank-suite`),text:b(`Your URLs that appear in answers — the only part of an AI answer that sends a visitor.`,`ai-rank-suite`)}]}),le.length>0&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`ars-hero`,children:[(0,H.jsx)(`div`,{className:`ars-hero-ring`,children:(0,H.jsx)(Oe,{value:i.score,size:132,label:b(`Answer score`,`ai-rank-suite`),onLight:!0})}),(0,H.jsxs)(`div`,{className:`ars-hero-body`,children:[(0,H.jsx)(`span`,{className:`ars-hero-badge is-${be.tone}`,children:be.badge}),(0,H.jsx)(`h2`,{className:`ars-hero-title`,children:be.text}),(0,H.jsx)(`p`,{className:`ars-hero-why`,children:be.why}),(0,H.jsxs)(`div`,{className:`ars-hero-actions`,children:[(0,H.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:oe,disabled:f||!n.has_ai_key||!ie.prompts.length,children:f?m?.total?S(b(`Checking… %1$s / %2$s`,`ai-rank-suite`),m.done,m.total):b(`Checking…`,`ai-rank-suite`):b(`Run check now`,`ai-rank-suite`)}),(0,H.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,onClick:()=>t&&t(`prompts`),children:b(`Edit prompts`,`ai-rank-suite`)}),(0,H.jsxs)(`span`,{className:`t-caption`,children:[i.last_run?`${S(b(`Last run %s`,`ai-rank-suite`),new Date(i.last_run.time*1e3).toLocaleString())} · `:``,S(x(`%d prompt`,`%d prompts`,le.length,`ai-rank-suite`),le.length),ve?` · ${ve}`:``,ge>0?` · ${S(b(`$%s per run`,`ai-rank-suite`),(ge/1e6).toFixed(ge>=1e5?2:3))}`:``]})]}),f&&m?.total>0&&(0,H.jsx)(`div`,{className:`mt-2`,children:(0,H.jsx)(Ne,{label:S(b(`Asking the engines — %1$s of %2$s`,`ai-rank-suite`),Number(m.done).toLocaleString(),Number(m.total).toLocaleString()),done:m.done,total:m.total})})]}),(0,H.jsx)(`div`,{className:`ars-hero-stats`,children:[{label:b(`Named (simulated)`,`ai-rank-suite`),value:`${ue} / ${le.length}`,tone:ue>=le.length/2?`good`:`warn`},{label:b(`In the top 3`,`ai-rank-suite`),value:O,tone:O>0?`good`:void 0},{label:b(`Would cite (simulated)`,`ai-rank-suite`),value:de,tone:de>0?`good`:`warn`},{label:b(`Rival brands named (simulated)`,`ai-rank-suite`),value:i.competitors?i.competitors.length:0,tone:i.competitors?.length?`warn`:void 0}].map(e=>(0,H.jsxs)(`div`,{className:`ars-hero-stat`,style:{cursor:`default`},children:[(0,H.jsx)(`span`,{className:`ars-hero-stat-v${e.tone?` is-`+e.tone:``}`,children:e.value}),(0,H.jsx)(`span`,{className:`ars-hero-stat-l`,children:e.label})]},e.label))})]}),(0,H.jsxs)(`div`,{className:`grid gap-4 items-stretch${pe&&me?` lg:grid-cols-2`:``}`,children:[(0,H.jsx)(k,{title:b(`Answer score over time`,`ai-rank-suite`),subtitle:b(`One point per simulation run — the number that should be rising`,`ai-rank-suite`),action:fe.length>1?(0,H.jsx)(Re,{value:fe[fe.length-1].value-fe[0].value,suffix:` ${b(`since first run`,`ai-rank-suite`)}`}):null,children:(0,H.jsx)(je,{data:fe,label:b(`Answer score`,`ai-rank-suite`),formatValue:e=>`${e}/100`,height:150})}),pe?(0,H.jsx)(k,{title:b(`Share of voice`,`ai-rank-suite`),subtitle:b(`How often each name is present in the answers — across every run, not just the last one`,`ai-rank-suite`),children:(0,H.jsx)(`div`,{className:`grid gap-2.5`,children:[...c.series].sort((e,t)=>t.latest-e.latest).map(e=>{let t=e.latest-e.first;return(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsxs)(`span`,{className:`truncate text-[13px]`,style:{width:150,fontWeight:e.isBrand?600:400,color:e.isBrand?`var(--ars-ink)`:`var(--ars-ink-2)`},children:[e.name,e.isBrand?` · ${b(`you`,`ai-rank-suite`)}`:``]}),(0,H.jsx)(`span`,{className:`flex-1 min-w-0`,children:(0,H.jsx)(Le,{data:e.points,color:e.color,height:26})}),(0,H.jsxs)(`span`,{className:`t-num text-[14px]`,style:{width:46,textAlign:`right`},children:[e.latest,`%`]}),(0,H.jsx)(`span`,{style:{width:54,textAlign:`right`},children:(0,H.jsx)(Re,{value:t,suffix:`pp`})})]},e.name)})})}):i?.competitors?.length>0&&(0,H.jsx)(k,{title:b(`Share of voice`,`ai-rank-suite`),subtitle:b(`Who the assistant names instead of, or alongside, you — from the last run`,`ai-rank-suite`),children:(0,H.jsx)(We,{items:i.competitors.map(e=>({key:e.name,label:e.name,value:e.share})),max:100,color:`var(--ars-series-3)`,format:e=>`${e}%`})})]}),(0,H.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2 items-stretch`,children:[(0,H.jsx)(k,{title:b(`Work list`,`ai-rank-suite`),subtitle:b(`The questions you are not the answer to — worst first`,`ai-rank-suite`),flush:!0,children:(0,H.jsx)(`div`,{className:`ars-worklist`,children:Zo(le).slice(0,6).map(e=>{let t=le.find(t=>t.prompt===e.label);return(0,H.jsxs)(`button`,{type:`button`,className:`ars-work`,onClick:()=>t&&ne(t),children:[(0,H.jsx)(`span`,{className:`ars-work-score t-num is-${e.score>=80?`good`:e.score>=50?`mid`:`bad`}`,children:e.score}),(0,H.jsxs)(`span`,{className:`ars-work-body`,children:[(0,H.jsx)(`span`,{className:`ars-work-label`,children:e.label}),(0,H.jsx)(`span`,{className:`ars-work-sub`,children:e.sub})]}),(0,H.jsx)(`span`,{className:`ars-work-go`,"aria-hidden":!0,children:`›`})]},e.id)})})}),(0,H.jsx)(k,{title:b(`Pages the assistant cites`,`ai-rank-suite`),subtitle:ye.length?b(`Your URLs found in the last run’s answers, most cited first`,`ai-rank-suite`):b(`No URL of yours appeared in an answer yet`,`ai-rank-suite`),flush:!0,children:ye.length===0?(0,H.jsx)(`div`,{className:`px-4 py-4 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`A citation needs a page that answers the question directly — a heading that is the question, a first paragraph that is the answer. The work list on the left is where to start.`,`ai-rank-suite`)}):(0,H.jsx)(`div`,{className:`ars-citelist`,children:ye.map(e=>(0,H.jsxs)(`a`,{className:`ars-cite`,href:e.url,target:`_blank`,rel:`noreferrer`,children:[(0,H.jsx)(`span`,{className:`ars-cite-url ars-mono`,title:e.url,children:e.path}),(0,H.jsxs)(`span`,{className:`ars-cite-n tabular-nums`,children:[e.count,` `,x(`answer`,`answers`,e.count,`ai-rank-suite`)]})]},e.url))})})]})]}),(0,H.jsx)(Ae,{tabs:[{id:`track`,label:b(`Tracker`,`ai-rank-suite`)},{id:`prompts`,label:S(b(`Prompts (%d)`,`ai-rank-suite`),ie.prompts.length)},{id:`brand`,label:b(`Brand`,`ai-rank-suite`)}],active:e,onChange:t,right:le.length===0&&(0,H.jsx)(A,{onClick:oe,busy:f,disabled:!n.has_ai_key||!ie.prompts.length,children:f?m?.total?S(b(`Checking… %1$s / %2$s`,`ai-rank-suite`),m.done,m.total):b(`Checking…`,`ai-rank-suite`):b(`Run first check`,`ai-rank-suite`)})}),e===`track`&&(0,H.jsx)(`div`,{className:`grid gap-4`,children:(0,H.jsx)(k,{title:b(`Prompt tracker`,`ai-rank-suite`),subtitle:b(`One row per question, one cell per run. Weakest questions first — those are your work list.`,`ai-rank-suite`),action:he.length>0&&(0,H.jsxs)(`span`,{className:`text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:[S(x(`%d run`,`%d runs`,he.length,`ai-rank-suite`),he.length),` · `,he[0].label,` → `,he[he.length-1].label]}),children:!o||o.prompts.length===0?(0,H.jsxs)(`div`,{className:`ars-r-lg px-4 py-5 grid gap-2 place-items-start`,style:{background:`var(--ars-surface-2)`},children:[(0,H.jsx)(`div`,{className:`font-medium text-[13px]`,children:b(`No runs yet`,`ai-rank-suite`)}),(0,H.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Add the questions your customers ask, then run a check. From the second run onward this becomes a tracker.`,`ai-rank-suite`)}),(0,H.jsx)(A,{variant:`tonal`,onClick:()=>t(`prompts`),children:b(`Add prompts`,`ai-rank-suite`)})]}):(0,H.jsxs)(`div`,{className:`grid gap-3`,children:[(0,H.jsx)(`div`,{className:`ars-table-wrap`,children:(0,H.jsxs)(`table`,{className:`ars-table`,children:[(0,H.jsx)(`thead`,{children:(0,H.jsxs)(`tr`,{children:[(0,H.jsx)(`th`,{children:b(`Question`,`ai-rank-suite`)}),(0,H.jsx)(`th`,{style:{width:190},children:b(`Runs`,`ai-rank-suite`)}),(0,H.jsx)(`th`,{className:`is-num`,style:{width:100},children:b(`Hit rate`,`ai-rank-suite`)}),(0,H.jsx)(`th`,{className:`is-num`,style:{width:80},children:b(`Best`,`ai-rank-suite`)})]})}),(0,H.jsx)(`tbody`,{children:o.prompts.map(e=>{let t=le.find(t=>t.prompt===e.prompt);return(0,H.jsxs)(`tr`,{style:{cursor:t?`pointer`:`default`},onClick:()=>t&&ne(t),children:[(0,H.jsx)(`td`,{className:`font-medium`,style:{maxWidth:420},children:e.prompt}),(0,H.jsx)(`td`,{children:(0,H.jsx)(`span`,{className:`flex items-end gap-[3px]`,children:e.series.map((e,t)=>(0,H.jsx)(Yo,{cell:e,label:he[t]?.label??S(b(`run %d`,`ai-rank-suite`),t+1)},t))})}),(0,H.jsx)(`td`,{className:`is-num`,children:(0,H.jsx)(`span`,{className:`font-semibold tabular-nums`,style:{color:e.hit_rate==null?`var(--ars-ink-3)`:e.hit_rate>=70?`var(--ars-good)`:e.hit_rate>=30?`var(--ars-warning)`:`var(--ars-serious)`},children:e.hit_rate==null?`–`:`${e.hit_rate}%`})}),(0,H.jsx)(`td`,{className:`is-num`,style:{color:`var(--ars-ink-2)`},children:e.best?`#${e.best}`:`–`})]},e.prompt)})})]})}),(0,H.jsxs)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-1 text-[11.5px]`,style:{color:`var(--ars-ink-2)`},children:[[[`#188038`,b(`top 3`,`ai-rank-suite`)],[`#81c995`,b(`top 6`,`ai-rank-suite`)],[`#f9ab00`,b(`mentioned, further down`,`ai-rank-suite`)],[`#f6aea9`,b(`not mentioned`,`ai-rank-suite`)],[`var(--ars-surface-3)`,b(`not monitored yet`,`ai-rank-suite`)]].map(([e,t])=>(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,H.jsx)(`span`,{"aria-hidden":!0,style:{width:10,height:10,borderRadius:3,background:e,display:`inline-block`}}),t]},t)),(0,H.jsxs)(`span`,{children:[`· `,b(`a dot means the assistant linked to you`,`ai-rank-suite`)]})]})]})})}),e===`prompts`&&(0,H.jsx)(k,{title:b(`Monitored prompts`,`ai-rank-suite`),subtitle:S(b(`Questions your customers ask AI assistants — up to %d`,`ai-rank-suite`),n.max_prompts),action:(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[C&&(0,H.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,H.jsx)(A,{variant:`ghost`,onClick:se,busy:g,disabled:!n.has_ai_key,children:b(`Suggest for me`,`ai-rank-suite`)}),(0,H.jsx)(A,{onClick:ae,busy:u,children:b(`Save`,`ai-rank-suite`)})]}),children:(0,H.jsxs)(`div`,{className:`grid gap-4`,children:[(0,H.jsx)(Jo,{items:ie.prompts,onChange:e=>D({prompts:e}),placeholder:b(`e.g. What is the best SEO plugin for WordPress?`,`ai-rank-suite`),max:n.max_prompts,addLabel:b(`Add prompt`,`ai-rank-suite`),stats:o&&o.prompts&&o.prompts.length>0?e=>{let t=o.prompts.find(t=>t.prompt===e),n=le.find(t=>t.prompt===e);return!t&&!n?{}:{hit_rate:t?t.hit_rate:null,best:t?t.best:null,last:n?!!n.mentioned:void 0,lastPos:n&&Number(n.position)||0}}:null}),v&&(0,H.jsxs)(`div`,{className:`ars-r-lg px-4 py-4 grid gap-3`,style:{background:`var(--ars-grad-soft)`,border:`1px solid var(--ars-border)`},children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,H.jsxs)(`div`,{className:`font-semibold text-[13px] flex items-center gap-1.5`,children:[(0,H.jsx)(Nt,{size:13}),b(`Suggested from your own site`,`ai-rank-suite`)]}),(0,H.jsx)(`button`,{type:`button`,"aria-label":b(`Dismiss suggestions`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer p-1`,style:{color:`var(--ars-ink-3)`},onClick:()=>y(null),children:(0,H.jsx)(Mt,{size:14})})]}),v.length===0?(0,H.jsx)(`div`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`All suggestions added. Press “Suggest for me” again for a fresh set.`,`ai-rank-suite`)}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`grid gap-1.5`,children:v.map(e=>(0,H.jsxs)(`button`,{type:`button`,onClick:()=>ce(e),className:`flex items-center justify-between gap-3 text-left ars-r-lg px-3.5 py-2.5 cursor-pointer`,style:{background:`var(--ars-surface)`,border:`1px solid var(--ars-border)`},children:[(0,H.jsx)(`span`,{className:`text-[12.5px]`,children:e}),(0,H.jsxs)(`span`,{className:`text-[12px] font-semibold shrink-0`,style:{color:`var(--ars-brand)`},children:[`+ `,b(`Add`,`ai-rank-suite`)]})]},e))}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(A,{variant:`tonal`,onClick:()=>{let e=n.max_prompts-ie.prompts.length;D({prompts:[...ie.prompts,...v.slice(0,e)]}),y([])},children:b(`Add all`,`ai-rank-suite`)}),(0,H.jsx)(`span`,{className:`text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Nothing is saved until you press Save.`,`ai-rank-suite`)})]})]})]}),(0,H.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Each check asks your configured AI model to answer these questions the way an assistant would — with no hint that you are asking — then records whether it recommends you, how early, and who else it names. Every prompt is one model call, so keep the list to the questions that actually convert.`,`ai-rank-suite`)})]})}),e===`brand`&&(0,H.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-2 items-start`,children:[(0,H.jsx)(k,{title:b(`Brand`,`ai-rank-suite`),subtitle:b(`What the AI must say for a mention to count`,`ai-rank-suite`),action:C&&(0,H.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),children:(0,H.jsxs)(`div`,{className:`grid gap-4`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Brand name`,`ai-rank-suite`)}),(0,H.jsx)(`input`,{type:`text`,placeholder:n.brand_auto,value:ie.brand,onChange:e=>D({brand:e.target.value})}),(0,H.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`Leave empty to use the site title.`,`ai-rank-suite`)})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block font-medium mb-1.5`,children:b(`Also known as`,`ai-rank-suite`)}),(0,H.jsx)(Jo,{items:ie.aliases,onChange:e=>D({aliases:e}),placeholder:b(`e.g. short name, domain`,`ai-rank-suite`),max:10})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block font-medium mb-1.5`,children:b(`Competitors to watch`,`ai-rank-suite`)}),(0,H.jsx)(Jo,{items:ie.competitors,onChange:e=>D({competitors:e}),placeholder:b(`e.g. competitor brand`,`ai-rank-suite`),max:10}),(0,H.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`Rivals are detected automatically too — this list just makes sure the ones you care about are never missed.`,`ai-rank-suite`)})]}),(0,H.jsx)(`div`,{children:(0,H.jsx)(A,{onClick:ae,busy:u,children:b(`Save`,`ai-rank-suite`)})})]})}),(0,H.jsx)(k,{title:b(`Schedule`,`ai-rank-suite`),subtitle:b(`Run answer simulations automatically so it becomes a trend`,`ai-rank-suite`),children:(0,H.jsxs)(`div`,{className:`grid gap-4`,children:[(0,H.jsx)(Ee,{checked:!!ie.auto,onChange:e=>D({auto:e}),label:b(`Run simulations automatically`,`ai-rank-suite`)}),(0,H.jsxs)(`div`,{className:`sm:max-w-[260px]`,children:[(0,H.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Frequency`,`ai-rank-suite`)}),(0,H.jsxs)(`select`,{value:ie.frequency,onChange:e=>D({frequency:e.target.value}),children:[(0,H.jsx)(`option`,{value:`weekly`,children:b(`Weekly`,`ai-rank-suite`)}),(0,H.jsx)(`option`,{value:`daily`,children:b(`Daily`,`ai-rank-suite`)})]}),(0,H.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:S(x(`Every prompt is one model call — with %1$d prompt, weekly costs about %2$d calls a month.`,`Every prompt is one model call — with %1$d prompts, weekly costs about %2$d calls a month.`,ie.prompts.length,`ai-rank-suite`),ie.prompts.length,ie.prompts.length*4)})]}),(0,H.jsx)(`div`,{children:(0,H.jsx)(A,{variant:`ghost`,onClick:ae,busy:u,children:b(`Save`,`ai-rank-suite`)})})]})})]}),(0,H.jsx)(Xo,{row:te,track:te?(o?.prompts||[]).find(e=>e.prompt===te.prompt):null,runs:he,onClose:()=>ne(null)})]})}var $o,H,es,ts=o((()=>{$o=u(f(),1),C(),D(),at(),Ft(),Ko(),H=O(),es={positive:{tone:`good`,label:b(`positive`,`ai-rank-suite`)},neutral:{tone:`neutral`,label:b(`neutral`,`ai-rank-suite`)},negative:{tone:`serious`,label:b(`negative`,`ai-rank-suite`)}}})),ns=c({default:()=>as});function rs({label:e,children:t,hint:n}){return(0,ss.jsxs)(`div`,{className:`ars-licrow`,children:[(0,ss.jsxs)(`span`,{className:`ars-licrow-l`,children:[e,n&&(0,ss.jsx)(`span`,{className:`ars-licrow-hint`,children:n})]}),(0,ss.jsx)(`span`,{className:`ars-licrow-v`,children:t})]})}function is({backend:e,onReload:t}){let n=!!e.licensed,r=!!e.connected,i=e.graceDays,a=e.expires?String(e.expires).slice(0,10):null,o=e.siteLimit===null||e.siteLimit===void 0?`Unlimited`:e.siteLimit,s=n?{tone:`good`,badge:b(`Licensed`,`ai-rank-suite`),title:S(b(`%s is active on this site.`,`ai-rank-suite`),e.plan||`AI Rank Suite Agency`),why:a?S(b(`Automatic updates are on and the licence renews on %s. Every Pro action — AI writing, the autopilot, answer simulation — is available.`,`ai-rank-suite`),a):`Automatic updates are on and every Pro action is available.`}:i==null?{tone:`bad`,badge:b(r?`No active licence`:`Not activated`,`ai-rank-suite`),title:b(r?`This site is connected but has no active licence.`:`This site has no licence activated yet.`,`ai-rank-suite`),why:b(`Your settings, reports, schema, redirects and everything already published keep working and stay untouched. Only new Pro actions and automatic updates are paused until a licence is active.`,`ai-rank-suite`)}:{tone:`warning`,badge:S(x(`Grace period · %d day left`,`Grace period · %d days left`,i,`ai-rank-suite`),i),title:b(`The licence server could not be reached, so the last known good licence still applies.`,`ai-rank-suite`),why:b(`This bridges a temporary outage on our side, not an expired licence. If it persists past the grace period, Pro actions pause — your settings, reports and published output stay exactly as they are.`,`ai-rank-suite`)};return(0,ss.jsxs)(`div`,{className:`grid gap-4`,children:[e.error&&(0,ss.jsx)(M,{tone:`warning`,children:e.error}),(0,ss.jsxs)(`div`,{className:`ars-hero`,children:[(0,ss.jsx)(`div`,{className:`ars-hero-ring`,children:(0,ss.jsx)(Oe,{value:n?100:0,size:116,label:b(`Licence`,`ai-rank-suite`),onLight:!0})}),(0,ss.jsxs)(`div`,{className:`ars-hero-body`,children:[(0,ss.jsx)(`span`,{className:`ars-hero-badge is-${s.tone}`,children:s.badge}),(0,ss.jsx)(`h2`,{className:`ars-hero-title`,children:s.title}),(0,ss.jsx)(`p`,{className:`ars-hero-why`,children:s.why}),(0,ss.jsxs)(`div`,{className:`ars-hero-actions`,children:[!n&&e.activateUrl&&(0,ss.jsx)(`a`,{className:`ars-btn ars-btn-primary`,href:e.activateUrl,children:b(`Activate a licence`,`ai-rank-suite`)}),e.manageUrl&&(0,ss.jsx)(`a`,{className:`ars-btn ${n?`ars-btn-primary`:`ars-btn-ghost`}`,href:e.manageUrl,children:b(n?`Manage licence and sites`:`Licence account`,`ai-rank-suite`)}),e.syncUrl&&(0,ss.jsx)(`a`,{className:`ars-linkbtn`,href:e.syncUrl,children:b(`Check for a new version`,`ai-rank-suite`)}),!n&&e.pricingUrl&&(0,ss.jsx)(`a`,{className:`ars-linkbtn`,href:e.pricingUrl,children:b(`See plans`,`ai-rank-suite`)}),(0,ss.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:t,children:b(`Re-check now`,`ai-rank-suite`)})]})]}),(0,ss.jsxs)(`div`,{className:`ars-hero-stats`,children:[(0,ss.jsxs)(`div`,{className:`ars-hero-stat`,style:{cursor:`default`},children:[(0,ss.jsx)(`span`,{className:`ars-hero-stat-v${n?` is-good`:``}`,children:n?`On`:`Off`}),(0,ss.jsx)(`span`,{className:`ars-hero-stat-l`,children:b(`Automatic updates`,`ai-rank-suite`)})]}),(0,ss.jsxs)(`div`,{className:`ars-hero-stat`,style:{cursor:`default`},children:[(0,ss.jsx)(`span`,{className:`ars-hero-stat-v`,children:o}),(0,ss.jsx)(`span`,{className:`ars-hero-stat-l`,children:b(`Sites in this plan`,`ai-rank-suite`)})]})]})]}),(0,ss.jsx)(k,{title:b(`Status`,`ai-rank-suite`),subtitle:b(`What the licence server reports for this site`,`ai-rank-suite`),flush:!0,children:(0,ss.jsxs)(`div`,{className:`ars-lictable`,children:[(0,ss.jsx)(rs,{label:b(`Plan`,`ai-rank-suite`),children:e.plan?(0,ss.jsxs)(ss.Fragment,{children:[e.plan,e.isTrial?` · trial`:``]}):(0,ss.jsx)(`span`,{className:`is-muted`,children:`—`})}),(0,ss.jsxs)(rs,{label:b(`Licence`,`ai-rank-suite`),children:[n?(0,ss.jsx)(j,{tone:`good`,children:b(`active`,`ai-rank-suite`)}):i==null?(0,ss.jsx)(j,{tone:`neutral`,children:b(`inactive`,`ai-rank-suite`)}):(0,ss.jsx)(j,{tone:`warning`,children:`grace period`}),e.isCancelled?(0,ss.jsx)(`span`,{className:`ml-2 t-caption`,children:`cancelled — runs to the end of the term`}):null]}),(0,ss.jsxs)(rs,{label:b(`This site`,`ai-rank-suite`),hint:b(`A seat is used per site, and freed when you deactivate it`,`ai-rank-suite`),children:[e.siteActive?(0,ss.jsx)(j,{tone:`good`,children:b(`activated`,`ai-rank-suite`)}):(0,ss.jsx)(j,{tone:`neutral`,children:b(`not activated`,`ai-rank-suite`)}),e.sites!==null&&e.sites!==void 0?(0,ss.jsxs)(`span`,{className:`ml-2 t-caption`,children:[e.sites,` `,e.sites===1?`site`:`sites`,` using this licence`,e.siteLimit?` `+S(b(`of %s`,`ai-rank-suite`),e.siteLimit):` · `+b(`unlimited`,`ai-rank-suite`)]}):null]}),(0,ss.jsx)(rs,{label:b(`Renews`,`ai-rank-suite`),children:a||(0,ss.jsx)(`span`,{className:`is-muted`,children:`—`})}),(0,ss.jsx)(rs,{label:b(`Automatic updates`,`ai-rank-suite`),children:e.updates?(0,ss.jsx)(j,{tone:`good`,children:b(`enabled`,`ai-rank-suite`)}):(0,ss.jsx)(j,{tone:`neutral`,children:b(`paused`,`ai-rank-suite`)})}),(0,ss.jsxs)(rs,{label:b(`Licence server`,`ai-rank-suite`),children:[r?(0,ss.jsx)(j,{tone:`good`,children:b(`connected`,`ai-rank-suite`)}):(0,ss.jsx)(j,{tone:`neutral`,children:b(`not connected`,`ai-rank-suite`)}),e.userEmail?(0,ss.jsx)(`span`,{className:`ml-2 t-caption`,children:e.userEmail}):null]}),(e.productId||e.slug)&&(0,ss.jsx)(rs,{label:b(`Product`,`ai-rank-suite`),children:(0,ss.jsxs)(`span`,{className:`ars-mono text-[12px]`,children:[[e.productId?`#${e.productId}`:``,e.slug||``].filter(Boolean).join(` · `),e.sdkVersion?` · SDK ${e.sdkVersion}`:``]})})]})}),(0,ss.jsx)(k,{title:b(`What an inactive licence does and does not do`,`ai-rank-suite`),children:(0,ss.jsxs)(`div`,{className:`grid gap-3`,children:[(0,ss.jsxs)(`div`,{className:`grid gap-2 md:grid-cols-2`,children:[(0,ss.jsxs)(`div`,{className:`ars-r-md px-3 py-2.5`,style:{background:`var(--ars-surface-2)`},children:[(0,ss.jsx)(`div`,{className:`font-semibold text-[13px]`,style:{color:`var(--ars-good)`},children:b(`Keeps working`,`ai-rank-suite`)}),(0,ss.jsx)(`div`,{className:`t-caption mt-1`,children:b(`Every published title, description, schema block, redirect, llms.txt and sitemap. All settings, scores, audits and reports. Nothing is deleted, hidden or switched off on the front end — a licence problem must never cost you rankings.`,`ai-rank-suite`)})]}),(0,ss.jsxs)(`div`,{className:`ars-r-md px-3 py-2.5`,style:{background:`var(--ars-surface-2)`},children:[(0,ss.jsx)(`div`,{className:`font-semibold text-[13px]`,style:{color:`var(--ars-accent)`},children:b(`Pauses`,`ai-rank-suite`)}),(0,ss.jsx)(`div`,{className:`t-caption mt-1`,children:b(`New Pro actions — AI writing, the autopilot, answer simulation, keyword ideas — and automatic updates. They resume the moment a licence is active again.`,`ai-rank-suite`)})]})]}),(0,ss.jsx)(ot,{title:b(`Where licences are managed`,`ai-rank-suite`),children:(0,ss.jsxs)(`p`,{children:[`Your licence key, seats, invoices and renewals live in your account with our licensing provider (Freemius). This screen reads that state and links to it; it never stores a key of its own and never asks you to paste one anywhere else. Use `,(0,ss.jsx)(`strong`,{children:b(`Manage licence and sites`,`ai-rank-suite`)}),` to move a licence between sites, download invoices or cancel.`]})})]})})]})}function as(){let[e,t]=(0,os.useState)(null),[n,r]=(0,os.useState)(null),i=ie(`licensing`),a=()=>E.get(`/license`).then(t).catch(e=>r(e.message));if((0,os.useEffect)(()=>{i&&a()},[i]),!i)return(0,ss.jsx)(`div`,{className:`ars-page`,children:(0,ss.jsx)(k,{title:b(`Free edition`,`ai-rank-suite`),children:(0,ss.jsxs)(`div`,{className:`ars-pro is-compact`,children:[(0,ss.jsx)(`span`,{className:`ars-pro-badge`,children:b(`Pro`,`ai-rank-suite`)}),(0,ss.jsx)(`div`,{className:`min-w-0`,children:(0,ss.jsx)(`p`,{className:`ars-pro-text`,children:b(`This is the free edition from WordPress.org. It has no licence to manage: every feature in it is fully yours. The AI engine, the autopilot, answer simulation, rank tracking and the other Pro modules come with AI Rank Suite Pro, sold and updated through our own site.`,`ai-rank-suite`)})}),(0,ss.jsx)(`a`,{className:`ars-btn ars-btn-ghost ars-pro-cta`,href:`${re.adminUrl||``}admin.php?page=ai-rank-suite-upgrade`,children:b(`See Pro`,`ai-rank-suite`)})]})})});if(!e)return(0,ss.jsx)(_e,{error:n});let o=e.backend||e;return o.enforced?(0,ss.jsxs)(`div`,{className:`ars-page`,children:[n&&(0,ss.jsx)(M,{tone:`serious`,children:n}),(0,ss.jsx)(is,{backend:o,onReload:a})]}):(0,ss.jsxs)(`div`,{className:`ars-page`,children:[n&&(0,ss.jsx)(M,{tone:`serious`,children:n}),(0,ss.jsxs)(M,{tone:`info`,children:[(0,ss.jsx)(`b`,{children:b(`Development build.`,`ai-rank-suite`)}),` `,b(`No licensing provider is configured, so nothing on this copy is gated. Licensing and automatic updates are switched off; every other feature works normally.`,`ai-rank-suite`),` `,b(`A released build carries real credentials, and this screen then shows the licence state of the site.`,`ai-rank-suite`)]}),(0,ss.jsx)(k,{title:b(`Licensing`,`ai-rank-suite`),subtitle:b(`Handled entirely by our licensing provider — nothing is stored here`,`ai-rank-suite`),children:(0,ss.jsx)(`p`,{className:`m-0 t-body`,children:b(`Your licence key, seats, invoices, renewals and trials live in your account with Freemius. This plugin reads that state; it never keeps a key of its own, and there is nothing on this screen to fill in.`,`ai-rank-suite`)})})]})}var os,ss,cs=o((()=>{C(),os=u(f(),1),D(),at(),ct(),ss=O()})),ls=c({DataPrivacy:()=>ds,Environment:()=>ps,Modules:()=>us,default:()=>us});function us(){let[e,t]=(0,gs.useState)(null),[n,r]=(0,gs.useState)(null),[i,a]=(0,gs.useState)(``),[o,s]=(0,gs.useState)(!1),[c,l]=(0,gs.useState)(!1),[u,d]=(0,gs.useState)(null),[f,p]=(0,gs.useState)(!1),[m,h]=(0,gs.useState)({}),[g,_]=(0,gs.useState)(!1),v=e=>{t(e),h(Object.fromEntries((e?.modules||[]).map(e=>[e.id,!!e.enabled]))),_(!1)};(0,gs.useEffect)(()=>{E.get(`/settings/general`).then(v).catch(e=>d(e.message)),E.get(`/dev/status`).then(r).catch(()=>{})},[]);let y=(0,gs.useMemo)(()=>(e?.modules||[]).filter(e=>e.optional),[e]),x=(0,gs.useMemo)(()=>{let e=i.trim().toLowerCase();return e?y.filter(t=>t.label.toLowerCase().includes(e)||t.desc.toLowerCase().includes(e)):y},[y,i]);if(!e)return(0,U.jsx)(_e,{error:u});let C=()=>{s(!0),setTimeout(()=>s(!1),2200)},w=n=>{t({...e,modules:e.modules.map(n)}),p(!0)},ee=(e,t)=>w(n=>n.id===e?{...n,enabled:t}:n),T=e=>w(t=>t.optional?{...t,enabled:e}:t),te=(e?.modules||[]).filter(e=>e.acknowledge&&e.enabled&&!m[e.id]),ne=te.length>0&&!g,re=async()=>{if(!ne){l(!0),d(null);try{let t={disabled:e.modules.filter(e=>!e.enabled).map(e=>e.id)};te.forEach(e=>{t[`acknowledge_${e.id}`]=!0}),v(await E.put(`/settings/modules`,t)),p(!1),C()}catch(e){d(e.message)}finally{l(!1)}}},ie=y.filter(e=>e.enabled).length,D=Object.keys(n?.modules?.quarantine||{});return(0,U.jsxs)(`div`,{className:`ars-page`,children:[u&&(0,U.jsx)(M,{tone:`serious`,children:u}),(0,U.jsx)(be,{columns:4,metrics:[{id:`running`,label:b(`Modules running`,`ai-rank-suite`),hint:b(`Modules loaded on every request right now.`,`ai-rank-suite`),value:n?.modules?.active?.length??`—`},{id:`optional`,label:b(`Optional modules on`,`ai-rank-suite`),hint:b(`A disabled module loads no code, registers no hooks and adds zero overhead.`,`ai-rank-suite`),value:`${ie} / ${y.length}`},{id:`quarantined`,label:b(`Quarantined`,`ai-rank-suite`),hint:b(`A module that stops with an error is isolated so the rest of the plugin keeps working.`,`ai-rank-suite`),value:D.length,accent:D.length>0?`var(--ars-c-red-ink)`:void 0,sub:D.length>0?D.join(`, `):b(`no module has failed`,`ai-rank-suite`)},{id:`version`,label:b(`Plugin version`,`ai-rank-suite`),hint:b(`Settings survive every update — a snapshot is taken automatically before each one.`,`ai-rank-suite`),value:n?.environment?.plugin?`v${n.environment.plugin}`:`—`,sub:n?.environment?.db_schema?S(b(`database schema %s`,`ai-rank-suite`),n.environment.db_schema):void 0}]}),D.length>0&&(0,U.jsxs)(M,{tone:`serious`,children:[D.join(`, `),` stopped with an error and was isolated so the rest of the plugin keeps working. Open`,` `,(0,U.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent cursor-pointer p-0 font-semibold`,style:{color:`var(--ars-brand)`},onClick:()=>{window.location.hash=`/developer`},children:b(`Developer → Status`,`ai-rank-suite`)}),` `,`to see the error and clear the quarantine.`]}),(0,U.jsx)(k,{icon:(0,U.jsx)(dt,{size:16}),title:b(`Setup wizard`,`ai-rank-suite`),subtitle:b(`Re-run the guided setup any time — it never overwrites a field you have already filled in`,`ai-rank-suite`),action:(0,U.jsx)(A,{variant:`ghost`,onClick:()=>{window.location.hash=`/wizard`},children:b(`Open the wizard`,`ai-rank-suite`)}),children:(0,U.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Six questions — what the site is, which industry and market it serves, which AI engines matter to you — and it configures the schema type, business defaults, prompts and llms.txt accordingly. Useful after a rebrand, after adding a second market, or simply to see what it would suggest.`,`ai-rank-suite`)})}),(0,U.jsx)(ms,{data:e,onSaved:t}),(0,U.jsx)(k,{icon:(0,U.jsx)(_t,{size:16}),title:b(`Modules`,`ai-rank-suite`),subtitle:b(`Switch off what you don’t use — a disabled module loads no code, registers no hooks and adds zero overhead`,`ai-rank-suite`),action:(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[o&&(0,U.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),f&&(0,U.jsx)(A,{onClick:re,busy:c,disabled:ne,children:b(`Apply changes`,`ai-rank-suite`)})]}),children:(0,U.jsxs)(`div`,{className:`grid gap-5`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,U.jsx)(`input`,{type:`text`,placeholder:b(`Search modules…`,`ai-rank-suite`),value:i,onChange:e=>a(e.target.value),style:{maxWidth:280},"aria-label":b(`Search modules`,`ai-rank-suite`)}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(A,{variant:`ghost`,onClick:()=>T(!0),children:b(`Enable all`,`ai-rank-suite`)}),(0,U.jsx)(A,{variant:`ghost`,onClick:()=>T(!1),children:b(`Disable all`,`ai-rank-suite`)})]})]}),f&&(0,U.jsx)(M,{tone:`info`,children:b(`Nothing is switched until you press “Apply changes”.`,`ai-rank-suite`)}),te.length>0&&(0,U.jsx)(M,{tone:`warning`,children:(0,U.jsxs)(`div`,{className:`grid gap-2`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`strong`,{children:te.map(e=>e.label).join(`, `)}),` `,b(`runs PHP that is typed into this admin. Anyone with the “edit plugins” capability can then execute code on this server. A snippet with a mistake is switched off automatically after one failed request; a snippet written to do harm is not.`,`ai-rank-suite`)]}),(0,U.jsxs)(`label`,{className:`flex items-start gap-2 cursor-pointer`,style:{fontWeight:500},children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:g,onChange:e=>_(e.target.checked),style:{marginTop:2}}),(0,U.jsx)(`span`,{children:b(`I understand that this module runs code on the site, and I want to switch it on.`,`ai-rank-suite`)})]})]})}),_s.map(e=>{let t=x.filter(t=>t.group===e.id);if(!t.length)return null;let n=t.filter(e=>e.enabled).length;return(0,U.jsxs)(`div`,{className:`grid gap-2`,children:[(0,U.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,U.jsxs)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wider`,style:{color:`var(--ars-ink-3)`},children:[e.label,(0,U.jsxs)(`span`,{className:`ml-2 normal-case tracking-normal font-normal`,children:[n,` of `,t.length,` on`]})]}),(0,U.jsx)(`div`,{className:`text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:e.hint})]}),(0,U.jsx)(`div`,{className:`ars-cardgrid`,style:{"--min":`320px`},children:t.map(e=>(0,U.jsxs)(`div`,{className:`flex items-start justify-between gap-3 ars-r-md px-4 py-3 relative overflow-hidden`,style:{background:`var(--ars-surface)`,border:`1px solid var(--ars-border)`,borderStyle:e.enabled?`solid`:`dashed`,opacity:e.enabled?1:.62,boxShadow:e.enabled?`var(--ars-e1)`:`none`,transition:`opacity 160ms ease, box-shadow 160ms ease`},children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsxs)(`div`,{className:`font-medium text-[13px] flex items-center gap-2`,children:[e.label,e.acknowledge&&(0,U.jsx)(j,{tone:`warning`,children:b(`runs code`,`ai-rank-suite`)}),D.includes(e.id)&&(0,U.jsx)(j,{tone:`serious`,children:`failed`})]}),(0,U.jsx)(`div`,{className:`text-[11.5px] mt-0.5`,style:{color:`var(--ars-ink-3)`},children:e.desc})]}),(0,U.jsx)(Ee,{checked:e.enabled,onChange:t=>ee(e.id,t)})]},e.id))})]},e.id)}),x.length===0&&(0,U.jsxs)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-3)`},children:[`No module matches “`,i,`”.`]}),(0,U.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Settings of a disabled module are kept untouched — switch it back on and everything is exactly as you left it. Essential modules (core, settings, licensing) are not listed here: turning them off would take this screen down with them.`,`ai-rank-suite`)})]})})]})}function ds(){let[e,t]=(0,gs.useState)(null),[n,r]=(0,gs.useState)(null),[i,a]=(0,gs.useState)(!1),[o,s]=(0,gs.useState)(!1),[c,l]=(0,gs.useState)(!1),[u,d]=(0,gs.useState)(!1),[f,p]=(0,gs.useState)(null),[m,h]=(0,gs.useState)(null),g=()=>{E.get(`/settings/general`).then(t).catch(e=>h(e.message)),E.get(`/settings/backup`).then(r).catch(()=>{})};if((0,gs.useEffect)(g,[]),!e)return(0,U.jsx)(_e,{error:m});let _=()=>{s(!0),setTimeout(()=>s(!1),2200)},v=async e=>{h(null);try{t(await E.put(`/settings/general`,{keep_data_on_uninstall:e})),_()}catch(e){h(e.message)}},y=async()=>{a(!0),h(null);try{await E.post(`/settings/backup`,{}),l(!0),setTimeout(()=>l(!1),3e3)}catch(e){h(e.message)}finally{a(!1)}},C=async()=>{h(null);try{let e=await E.get(`/settings/export`),t=new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`ai-rank-suite-config-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(n)}catch(e){h(e.message)}},w=async e=>{if(e){d(!0),h(null),p(null);try{let t=await e.text(),n=JSON.parse(t),r=await E.post(`/settings/import`,{payload:n});p(r),g()}catch(e){h(e instanceof SyntaxError?b(`That file is not valid JSON — pick a config exported from this plugin.`,`ai-rank-suite`):e.message)}finally{d(!1)}}};return(0,U.jsxs)(`div`,{className:`ars-page`,children:[m&&(0,U.jsx)(M,{tone:`serious`,children:m}),o&&(0,U.jsx)(M,{tone:`good`,children:b(`Saved.`,`ai-rank-suite`)}),(0,U.jsx)(k,{icon:(0,U.jsx)(Ot,{size:16}),title:b(`Updates & data safety`,`ai-rank-suite`),subtitle:b(`Your configuration survives every update — that is a promise, not a hope`,`ai-rank-suite`),children:(0,U.jsxs)(`div`,{className:`grid gap-3`,children:[(0,U.jsxs)(`div`,{className:`flex items-start justify-between gap-3 ars-r-lg px-4 py-3`,style:{background:`var(--ars-surface-2)`},children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`font-medium text-[13px]`,children:b(`Automatic snapshot`,`ai-rank-suite`)}),(0,U.jsx)(`div`,{className:`text-[12px] mt-0.5`,style:{color:`var(--ars-ink-2)`},children:n?.exists?S(b(`Taken before the update to v%1$s, on %2$s. Every setting of every module is included.`,`ai-rank-suite`),n.from,new Date(n.time*1e3).toLocaleString()):b(`A snapshot of all settings is taken automatically before every update. None exists yet — the first one appears with your next update.`,`ai-rank-suite`)})]}),n?.exists&&(0,U.jsx)(A,{variant:`ghost`,onClick:y,busy:i,children:c?(0,U.jsxs)(U.Fragment,{children:[`✓ `,b(`Restored`,`ai-rank-suite`)]}):b(`Restore`,`ai-rank-suite`)})]}),c&&(0,U.jsx)(M,{tone:`good`,children:b(`Settings restored from the backup snapshot.`,`ai-rank-suite`)})]})}),(0,U.jsx)(k,{icon:(0,U.jsx)(Tt,{size:16}),title:b(`Portable configuration`,`ai-rank-suite`),subtitle:b(`Move a finished setup to another site, or keep a copy outside the database`,`ai-rank-suite`),children:(0,U.jsxs)(`div`,{className:`grid gap-3`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,U.jsx)(A,{variant:`ghost`,onClick:C,children:b(`Export configuration`,`ai-rank-suite`)}),(0,U.jsxs)(`label`,{className:`ars-btn ars-btn-tonal`,style:{cursor:`pointer`},children:[b(u?`Importing…`:`Import configuration`,`ai-rank-suite`),(0,U.jsx)(`input`,{type:`file`,accept:`application/json,.json`,style:{display:`none`,width:0},onChange:e=>w(e.target.files?.[0])})]})]}),f&&(0,U.jsx)(M,{tone:f.applied>0?`good`:`warning`,children:f.skipped>0?S(b(`Applied %1$d settings groups, skipped %2$d that this version does not recognise. Reload the page to see them everywhere.`,`ai-rank-suite`),f.applied,f.skipped):S(x(`Applied %d settings group. Reload the page to see them everywhere.`,`Applied %d settings groups. Reload the page to see them everywhere.`,f.applied,`ai-rank-suite`),f.applied)}),(0,U.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`The export contains settings only — never API keys, license keys or content. That is deliberate: a config file often ends up in a repository or a shared drive, and a secret in it would outlive the site it came from.`,`ai-rank-suite`)})]})}),(0,U.jsx)(hs,{data:e,onSaved:t}),(0,U.jsx)(k,{title:b(`Uninstall behavior`,`ai-rank-suite`),subtitle:b(`What happens if you ever remove the plugin`,`ai-rank-suite`),children:(0,U.jsxs)(`div`,{className:`grid gap-3`,children:[(0,U.jsx)(Ee,{checked:!!e.keep_data_on_uninstall,onChange:v,label:b(`Keep all data when the plugin is uninstalled`,`ai-rank-suite`)}),(0,U.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`Recommended. Turn this off only if you want every setting, score, redirect and keyword removed from the database on uninstall — that cannot be undone.`,`ai-rank-suite`)}),!e.keep_data_on_uninstall&&(0,U.jsx)(M,{tone:`warning`,children:b(`Deletion on uninstall is enabled: removing the plugin will permanently erase all its data.`,`ai-rank-suite`)})]})})]})}function fs({active:e,label:t,children:n,note:r}){return(0,U.jsxs)(`div`,{className:`flex items-start gap-3 px-3 py-2.5 ars-r-sm`,style:{border:`1px solid var(--ars-border)`,background:e?`var(--ars-surface-2)`:`transparent`,opacity:e?1:.66},children:[(0,U.jsx)(`span`,{"aria-hidden":!0,className:`shrink-0 mt-0.5`,style:{color:e?`var(--ars-c-green-ink)`:`var(--ars-ink-3)`,width:14},children:e?`✓`:`○`}),(0,U.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,U.jsxs)(`div`,{className:`font-medium text-[13px] flex items-center gap-2 flex-wrap`,children:[t,n]}),r&&(0,U.jsx)(`div`,{className:`text-[12px] mt-0.5`,style:{color:`var(--ars-ink-2)`},children:r})]})]})}function ps(){let[e,t]=(0,gs.useState)(null),[n,r]=(0,gs.useState)(null),[i,a]=(0,gs.useState)(!1);if((0,gs.useEffect)(()=>{E.get(`/settings/environment`).then(t).catch(e=>r(e.message))},[]),!e)return(0,U.jsx)(_e,{error:n});let o=(e.health||[]).filter(e=>e.status!==`good`);(e.builders||[]).filter(e=>e.active);let s=e.integrations||[],c=s.filter(e=>e.active),l=i?s:c,u=e.multilingual||{},d=e.services||[];return(0,U.jsxs)(`div`,{className:`ars-page`,children:[n&&(0,U.jsx)(M,{tone:`serious`,children:n}),(0,U.jsx)(be,{columns:4,metrics:[{id:`health`,label:b(`Site health`,`ai-rank-suite`),hint:b(`What this server lets the plugin do — the table below says what to change if something is holding it back.`,`ai-rank-suite`),value:o.length?S(b(`%d to look at`,`ai-rank-suite`),o.length):b(`All clear`,`ai-rank-suite`),accent:o.length?`var(--ars-accent)`:void 0,sub:S(x(`%d check`,`%d checks`,(e.health||[]).length,`ai-rank-suite`),(e.health||[]).length)},{id:`seo-plugins`,label:b(`Other SEO plugins`,`ai-rank-suite`),hint:b(`Two SEO plugins normally mean a broken head. Here every surface has exactly one owner — the Compatibility tab shows each decision.`,`ai-rank-suite`),value:e.seo_plugins?.length||0,sub:e.seo_plugins?.length?e.seo_plugins.map(e=>e.label).join(`, `):b(`running solo`,`ai-rank-suite`)},{id:`languages`,label:b(`Languages`,`ai-rank-suite`),hint:b(`Translation plugins are read directly — no mapping to set up.`,`ai-rank-suite`),value:u.multilingual?u.languages.length:1,sub:u.multilingual?u.label:b(`single language`,`ai-rank-suite`)},{id:`integrations`,label:b(`Integrations active`,`ai-rank-suite`),hint:b(`Plugins read automatically to make the structured data richer — nothing to configure.`,`ai-rank-suite`),value:`${c.length} / ${s.length}`}]}),(0,U.jsx)(k,{icon:(0,U.jsx)(dt,{size:16}),title:b(`Site health`,`ai-rank-suite`),subtitle:b(`What this server lets the plugin do — and what to change if something is holding it back`,`ai-rank-suite`),children:(0,U.jsx)(`div`,{className:`ars-table-wrap`,children:(0,U.jsxs)(`table`,{className:`ars-table`,children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{style:{width:30}}),(0,U.jsx)(`th`,{style:{width:210},children:b(`Check`,`ai-rank-suite`)}),(0,U.jsx)(`th`,{className:`is-mid`,children:b(`Value`,`ai-rank-suite`)}),(0,U.jsx)(`th`,{children:b(`What it means`,`ai-rank-suite`)})]})}),(0,U.jsx)(`tbody`,{children:(e.health||[]).map(e=>(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`td`,{style:{width:30,color:`var(--ars-c-${vs[e.status]}-ink)`,fontWeight:700},children:ys[e.status]}),(0,U.jsx)(`td`,{style:{fontWeight:e.status===`good`?400:600},children:e.label}),(0,U.jsx)(`td`,{className:`is-mid ars-mono`,style:{fontSize:12},children:e.value}),(0,U.jsx)(`td`,{style:{color:`var(--ars-ink-2)`},children:e.note})]},e.id))})]})})}),(0,U.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,U.jsxs)(k,{icon:(0,U.jsx)(Ot,{size:16}),title:b(`Other SEO plugins`,`ai-rank-suite`),subtitle:b(`Detected on this site, with the tags each one normally writes`,`ai-rank-suite`),children:[(e.importable||[]).length>0&&(0,U.jsxs)(M,{tone:`info`,children:[e.importable.map(e=>S(x(`%1$s: %2$s page`,`%1$s: %2$s pages`,e.posts,`ai-rank-suite`),e.label,e.posts.toLocaleString())+(e.redirects?` `+S(b(`and %s redirects`,`ai-rank-suite`),e.redirects.toLocaleString()):``)).join(` · `),` `,`can be brought across without retyping anything.`,` `,(0,U.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent cursor-pointer p-0 font-semibold`,style:{color:`var(--ars-brand)`},onClick:()=>{window.location.hash=`/import`},children:b(`Open the importer →`,`ai-rank-suite`)})]}),(e.seo_plugins||[]).length===0?(0,U.jsx)(`p`,{className:`m-0 mt-2 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`None found — AI Rank Suite owns the whole head, which is the simplest setup there is. If you install one later, the Compatibility tab decides tag by tag who writes what, so the two never double up.`,`ai-rank-suite`)}):(0,U.jsxs)(`div`,{className:`grid gap-2`,children:[e.seo_plugins.map(e=>(0,U.jsx)(fs,{active:!0,label:e.label,note:S(b(`Normally writes: %s. The Compatibility tab decides who wins each one.`,`ai-rank-suite`),e.surfaces.join(`, `)),children:e.version&&(0,U.jsxs)(`span`,{className:`ars-chip-tag`,children:[`v`,e.version]})},e.key)),(0,U.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`Running two SEO plugins is normally a broken head — two titles, two canonicals, a doubled schema graph. Here it is a supported configuration: every surface has exactly one owner, and you can see the decision on the Compatibility tab.`,`ai-rank-suite`)})]})]}),(0,U.jsx)(k,{icon:(0,U.jsx)(vt,{size:16}),title:b(`Languages`,`ai-rank-suite`),subtitle:b(`Translation plugins are read directly — no mapping to set up`,`ai-rank-suite`),children:(0,U.jsxs)(`div`,{className:`grid gap-2`,children:[(0,U.jsx)(fs,{active:!!u.multilingual,label:u.multilingual?u.label:b(`Single language`,`ai-rank-suite`),note:u.multilingual?u.perPost?b(`Each translation is its own post, so titles, descriptions, schema and llms.txt are written per language and hreflang is emitted automatically.`,`ai-rank-suite`):b(`Translation happens per request, so one source record is served in every language and hreflang follows the plugin’s own URLs.`,`ai-rank-suite`):b(`Install WPML, Polylang, TranslatePress or Weglot and this page picks it up on the next load — there is nothing to connect.`,`ai-rank-suite`)}),u.multilingual&&(0,U.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:(u.languages||[]).map(e=>(0,U.jsxs)(`span`,{className:`ars-chip-tag`,children:[(e.label||e.name||e.code||e).toString(),e.code&&e.code===u.current?` · ${b(`current`,`ai-rank-suite`)}`:``]},e.code||e))})]})})]}),(0,U.jsxs)(k,{icon:(0,U.jsx)(wt,{size:16}),title:b(`Page builders`,`ai-rank-suite`),subtitle:b(`What the analyser reads when the content is not in the post body`,`ai-rank-suite`),children:[(0,U.jsx)(`div`,{className:`ars-cardgrid`,style:{"--min":`300px`},children:(e.builders||[]).map(e=>(0,U.jsx)(fs,{active:e.active,label:e.label,note:e.active?e.note:b(`Not installed.`,`ai-rank-suite`)},e.key))}),(0,U.jsx)(ot,{title:b(`Why this matters on a builder site`,`ai-rank-suite`),children:(0,U.jsx)(`p`,{children:b(`A page built with Elementor or Divi stores almost nothing in the post body — the text a visitor reads lives in meta fields the builder renders later. An SEO plugin that reads the post body sees an empty page, scores it badly, and writes a meta description from nothing. Every check here runs against the rendered output instead, which is why the word count on a builder page matches what you actually see.`,`ai-rank-suite`)})})]}),(0,U.jsx)(k,{icon:(0,U.jsx)(vt,{size:16}),title:b(`Connected services`,`ai-rank-suite`),subtitle:b(`Where real data comes from — all optional, most of them free`,`ai-rank-suite`),children:(0,U.jsx)(`div`,{className:`grid gap-2`,children:d.map(e=>(0,U.jsxs)(fs,{active:e.connected,label:e.label,note:e.provides,children:[e.free&&(0,U.jsx)(`span`,{className:`ars-chip-tag`,children:`free`}),!e.connected&&(0,U.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent cursor-pointer p-0 text-[12px] font-semibold`,style:{color:`var(--ars-brand)`},onClick:()=>{window.location.hash=`/`+e.route},children:b(`Connect →`,`ai-rank-suite`)})]},e.key))})}),(0,U.jsx)(k,{icon:(0,U.jsx)(wt,{size:16}),title:b(`Content integrations`,`ai-rank-suite`),subtitle:b(`Plugins we read from automatically to make the structured data richer`,`ai-rank-suite`),action:(0,U.jsx)(A,{variant:`ghost`,onClick:()=>a(!i),children:i?b(`Show active only`,`ai-rank-suite`):S(b(`Show all %d`,`ai-rank-suite`),s.length)}),children:l.length===0?(0,U.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`None of the supported plugins is installed. Nothing is missing — this list only ever adds detail to schema that is already being emitted.`,`ai-rank-suite`)}):(0,U.jsx)(`div`,{className:`ars-cardgrid`,style:{"--min":`320px`},children:l.map(e=>(0,U.jsx)(fs,{active:e.active,label:e.label,note:e.provides},e.key))})})]})}function ms({data:e,onSaved:t}){let[n,r]=(0,gs.useState)(e.brand_name||``),[i,a]=(0,gs.useState)(!1),[o,s]=(0,gs.useState)(null),[c,l]=(0,gs.useState)(!1),u=n!==(e.brand_name||``),d=async e=>{a(!0),s(null);try{t(await E.put(`/settings/general`,e)),l(!0),setTimeout(()=>l(!1),2200)}catch(e){s(e.message)}finally{a(!1)}},[f,p]=(0,gs.useState)(ae);return(0,U.jsx)(k,{icon:(0,U.jsx)(wt,{size:16}),title:b(`Appearance & white label`,`ai-rank-suite`),subtitle:b(`Put your agency's name on the plugin your clients see`,`ai-rank-suite`),action:c&&(0,U.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),children:(0,U.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,U.jsxs)(`div`,{className:`grid gap-3`,children:[(0,U.jsx)(Ke,{label:b(`Name shown in the WordPress menu and the header`,`ai-rank-suite`),hint:b(`Empty = AI Rank Suite. Takes effect on the next page load.`,`ai-rank-suite`),children:(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(`input`,{type:`text`,value:n,maxLength:40,onChange:e=>r(e.target.value),placeholder:b(`AI Rank Suite`,`ai-rank-suite`),style:{flex:1}}),(0,U.jsx)(A,{onClick:()=>d({brand_name:n}),busy:i,disabled:!u,children:b(`Save`,`ai-rank-suite`)})]})}),(0,U.jsx)(Ee,{checked:!!e.hide_footer,onChange:e=>d({hide_footer:e}),label:b(`Hide the vendor line at the foot of the sidebar`,`ai-rank-suite`)}),(0,U.jsx)(Ee,{checked:f===`dark`,onChange:e=>p(oe(e?`dark`:`light`)),label:b(`Dark theme for this plugin's screens`,`ai-rank-suite`)}),(0,U.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Stored in this browser only — it changes nothing for anyone else, and nothing outside these screens.`,`ai-rank-suite`)}),o&&(0,U.jsx)(M,{tone:`serious`,children:o})]}),(0,U.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`For an agency running the plugin on client sites: the client sees your name, your reports, your work. The toolbar menu can be hidden under Advanced → Ghost Mode, and client access is set per role under Advanced → Roles. The Plugins screen keeps the real plugin name — that is a WordPress rule, and the right one.`,`ai-rank-suite`)})]})})}function hs({data:e,onSaved:t}){let[n,r]=(0,gs.useState)({retention_ai_usage_days:e.retention_ai_usage_days??365,retention_404_days:e.retention_404_days??90,retention_crawler_days:e.retention_crawler_days??90}),[i,a]=(0,gs.useState)(!1),[o,s]=(0,gs.useState)(null),[c,l]=(0,gs.useState)(!1),u=Object.keys(n).some(t=>Number(n[t])!==Number(e[t]??0)),d=async()=>{a(!0),s(null);try{t(await E.put(`/settings/general`,n)),l(!0),setTimeout(()=>l(!1),2200)}catch(e){s(e.message)}finally{a(!1)}},f=[[`retention_ai_usage_days`,b(`AI usage ledger`,`ai-rank-suite`),b(`One row per model call — cost, tokens, job. Budgets and the usage screen read the last 30 days; older rows are history.`,`ai-rank-suite`)],[`retention_404_days`,b(`404 monitor`,`ai-rank-suite`),b(`Missing paths and how often they were hit. A path nobody has hit in this many days is dropped.`,`ai-rank-suite`)],[`retention_crawler_days`,b(`AI crawler visits`,`ai-rank-suite`),b(`Per-bot daily counters from the crawler recorder.`,`ai-rank-suite`)]];return(0,U.jsx)(k,{title:b(`Log retention`,`ai-rank-suite`),subtitle:b(`How long the plugin keeps its own logs — pruned daily; 0 keeps everything`,`ai-rank-suite`),action:(0,U.jsxs)(`span`,{className:`flex items-center gap-2`,children:[c&&(0,U.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,U.jsx)(A,{onClick:d,busy:i,disabled:!u,children:b(`Save`,`ai-rank-suite`)})]}),children:(0,U.jsxs)(`div`,{className:`grid gap-3`,children:[f.map(([e,t,i])=>(0,U.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-[220px_140px_minmax(0,1fr)] items-center`,children:[(0,U.jsx)(`span`,{className:`font-medium text-[13px]`,children:t}),(0,U.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`input`,{type:`number`,min:0,max:3650,value:n[e],onChange:t=>r({...n,[e]:Math.max(0,Math.min(3650,Number(t.target.value)||0))}),style:{width:90}}),(0,U.jsx)(`span`,{className:`t-caption`,children:`days`})]}),(0,U.jsx)(`span`,{className:`t-caption`,children:i})]},e)),o&&(0,U.jsx)(M,{tone:`serious`,children:o}),(0,U.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Consent-log retention lives with the consent settings (Analytics → Consent), because it is a legal setting rather than a housekeeping one.`,`ai-rank-suite`)})]})})}var gs,U,_s,vs,ys,bs=o((()=>{gs=u(f(),1),C(),D(),ue(),at(),ct(),Ft(),U=O(),_s=[{id:`ai`,label:b(`AI search`,`ai-rank-suite`),hint:b(`Everything that makes assistants find, read and recommend you`,`ai-rank-suite`)},{id:`search`,label:b(`Google search`,`ai-rank-suite`),hint:b(`Classic SEO output, indexing and performance data`,`ai-rank-suite`)},{id:`content`,label:b(`Content`,`ai-rank-suite`),hint:b(`Per-page analysis, bulk work, links and redirects`,`ai-rank-suite`)},{id:`system`,label:b(`System`,`ai-rank-suite`),hint:b(`Housekeeping, integrations and developer tooling`,`ai-rank-suite`)}],vs={good:`green`,warn:`yellow`,bad:`red`},ys={good:`✓`,warn:`!`,bad:`×`}})),xs=c({default:()=>Ss});function Ss(){let[e,t]=(0,Cs.useState)(null),[n,r]=(0,Cs.useState)(1),[i,a]=(0,Cs.useState)(!1),[o,s]=(0,Cs.useState)(null),[c,l]=(0,Cs.useState)(null);(0,Cs.useEffect)(()=>{E.get(`/links?page=${n}&per_page=50`).then(t).catch(e=>l(e.message))},[n]);let u=async()=>{a(!0),l(null);try{t(await E.post(`/links/build`))}catch(e){l(e.message)}finally{a(!1)}},d=async(e,n)=>{s(e),l(null);try{t(await E.post(`/links/${e}/${n}`))}catch(e){l(e.message)}finally{s(null)}};if(!e)return(0,ws.jsx)(_e,{error:c});let f=e.items||[];return(0,ws.jsxs)(`div`,{className:`ars-page`,children:[e.built_at?(0,ws.jsx)(pa,{tone:f.length>0?`warning`:`good`,text:f.length>0?S(x(`%d internal-link suggestion is waiting.`,`%d internal-link suggestions are waiting.`,f.length,`ai-rank-suite`),f.length):b(`Every suggestion has been applied or dismissed.`,`ai-rank-suite`),why:f.length>0?b(`Each one is a page that talks about the same thing as another and does not point at it yet. Apply writes the link and can be undone.`,`ai-rank-suite`):b(`Rebuild after a publishing sprint to find new pairs.`,`ai-rank-suite`)}):(0,ws.jsx)(Wo,{badge:b(`Not analysed yet`,`ai-rank-suite`),ringLabel:b(`Internal links`,`ai-rank-suite`),title:b(`No internal-link suggestions exist yet.`,`ai-rank-suite`),why:b(`The analyser reads every published page, measures how similar their topics are, and proposes links between pages that talk about the same thing but do not yet point at each other — computed on your own server, no AI cost, nothing leaves the site.`,`ai-rank-suite`),action:b(i?`Analysing…`:`Analyse the site`,`ai-rank-suite`),onAction:u,busy:i,stats:[{label:b(`Suggestions`,`ai-rank-suite`)},{label:b(`Pages analysed`,`ai-rank-suite`)},{label:b(`Applied`,`ai-rank-suite`)},{label:b(`Dismissed`,`ai-rank-suite`)}],previews:[{title:b(`One click to apply`,`ai-rank-suite`),text:b(`Each suggestion names the source, the target and the anchor; Apply writes the link into the page and can be undone.`,`ai-rank-suite`)},{title:b(`Targets that need links`,`ai-rank-suite`),text:b(`The pages fewest others point at — the ones a suggestion helps most.`,`ai-rank-suite`)},{title:b(`Re-run after publishing`,`ai-rank-suite`),text:b(`New pages get suggestions the next time the analyser runs.`,`ai-rank-suite`)}]}),(0,ws.jsxs)(k,{title:b(`Internal link suggestions`,`ai-rank-suite`),subtitle:b(`Topic-similarity matches computed on your own server — no AI cost, no data leaves the site`,`ai-rank-suite`),action:(0,ws.jsxs)(A,{onClick:u,busy:i,children:[(0,ws.jsx)(yt,{size:13}),` `,e.built_at?b(`Rebuild`,`ai-rank-suite`):b(`Analyze site`,`ai-rank-suite`)]}),children:[c&&(0,ws.jsx)(M,{tone:`serious`,children:c}),e.stats&&(0,ws.jsx)(`p`,{className:`m-0 mb-3 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:S(b(`Analyzed %1$s pages · %2$s new suggestions.`,`ai-rank-suite`),e.stats.analyzed,e.stats.created)}),(e.targets||[]).length>0&&(0,ws.jsxs)(`div`,{className:`mb-4`,children:[(0,ws.jsx)(`div`,{className:`t-overline mb-1.5`,children:b(`Pages these links would strengthen`,`ai-rank-suite`)}),(0,ws.jsx)(`div`,{className:`grid gap-1.5`,children:e.targets.map(e=>(0,ws.jsxs)(`div`,{className:`flex items-center justify-between gap-3 ars-r-sm px-3 py-2`,style:{background:`var(--ars-surface-2)`},children:[(0,ws.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`font-medium text-[12.5px] truncate`,children:e.title}),(0,ws.jsxs)(`span`,{className:`t-caption shrink-0 tabular-nums`,children:[S(x(`%d suggestion`,`%d suggestions`,e.count,`ai-rank-suite`),e.count),` · `,S(b(`avg %s`,`ai-rank-suite`),e.avg_score)]})]},e.id))})]}),e.items.length===0?(0,ws.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:e.built_at?b(`No open suggestions — your pages are already well connected.`,`ai-rank-suite`):b(`Run the analysis to find where your pages should link to each other.`,`ai-rank-suite`)}):(0,ws.jsx)(`div`,{className:`grid gap-2`,children:e.items.map(e=>(0,ws.jsx)(`div`,{className:`ars-r-md p-3`,style:{background:`var(--ars-surface-2)`},children:(0,ws.jsxs)(`div`,{className:`flex items-start justify-between gap-3 flex-wrap`,children:[(0,ws.jsxs)(`div`,{className:`min-w-0`,children:[(0,ws.jsxs)(`div`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[b(`From`,`ai-rank-suite`),` `,(0,ws.jsx)(`strong`,{style:{color:`var(--ars-ink)`},children:e.source}),` → `,b(`to`,`ai-rank-suite`),` `,(0,ws.jsxs)(`a`,{href:e.target_url,target:`_blank`,rel:`noreferrer`,children:[e.target,` `,(0,ws.jsx)(vt,{size:10})]})]}),(0,ws.jsxs)(`div`,{className:`mt-1.5 text-[13px]`,children:[b(`Link the words`,`ai-rank-suite`),` `,(0,ws.jsx)(`span`,{className:`font-semibold px-1.5 py-0.5 rounded`,style:{background:`color-mix(in srgb, var(--ars-brand) 14%, white)`,color:`var(--ars-brand-ink)`},children:e.anchor})]}),e.context&&(0,ws.jsxs)(`div`,{className:`mt-1 text-[12px] italic`,style:{color:`var(--ars-ink-3)`},children:[`…`,e.context,`…`]})]}),(0,ws.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,ws.jsx)(j,{tone:`neutral`,children:S(b(`%d%% match`,`ai-rank-suite`),Math.round(e.score*100))}),(0,ws.jsx)(A,{busy:o===e.id,onClick:()=>d(e.id,`apply`),children:b(`Insert link`,`ai-rank-suite`)}),(0,ws.jsx)(A,{variant:`ghost`,busy:o===e.id,onClick:()=>d(e.id,`dismiss`),children:b(`Dismiss`,`ai-rank-suite`)})]})]})},e.id))}),e.pagination&&e.pagination.total_pages>1&&(0,ws.jsxs)(`div`,{className:`flex items-center justify-between gap-3 mt-3 pt-3`,style:{borderTop:`1px solid var(--ars-line-soft)`},children:[(0,ws.jsx)(`span`,{className:`t-caption tabular-nums`,children:S(b(`%1$s suggestions · page %2$s of %3$s`,`ai-rank-suite`),e.pagination.total_items.toLocaleString(),e.pagination.page,e.pagination.total_pages)}),(0,ws.jsxs)(`div`,{className:`flex gap-2`,children:[(0,ws.jsx)(A,{variant:`ghost`,disabled:n<=1,onClick:()=>r(n-1),children:b(`Previous`,`ai-rank-suite`)}),(0,ws.jsx)(A,{variant:`ghost`,disabled:n>=e.pagination.total_pages,onClick:()=>r(n+1),children:b(`Next`,`ai-rank-suite`)})]})]})]}),(e.orphans||[]).length>0&&(0,ws.jsx)(k,{title:b(`Pages nothing links to`,`ai-rank-suite`),subtitle:b(`Orphans are crawled last and cited least — one internal link is usually the whole fix`,`ai-rank-suite`),action:e.orphans_total>e.orphans.length?(0,ws.jsx)(j,{tone:`warning`,children:S(b(`%d in total`,`ai-rank-suite`),e.orphans_total)}):null,children:(0,ws.jsx)(`div`,{className:`grid gap-1.5`,children:e.orphans.map(e=>(0,ws.jsxs)(`div`,{className:`flex items-center justify-between gap-3 ars-r-sm px-3 py-2`,style:{background:`var(--ars-surface-2)`},children:[(0,ws.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`font-medium text-[12.5px] truncate`,children:e.title}),(0,ws.jsx)(A,{variant:`ghost`,onClick:()=>{window.location.hash=`/content/${e.id}`},children:b(`Open`,`ai-rank-suite`)})]},e.id))})})]})}var Cs,ws,Ts=o((()=>{Cs=u(f(),1),C(),D(),Ko(),ha(),at(),Ft(),ws=O()})),Es=c({default:()=>Os});function Ds({rows:e,empty:t,columns:n=[`in`,`out`,`depth`,`words`]}){if(!e||e.length===0)return(0,js.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:t});let r={in:b(`Links in`,`ai-rank-suite`),out:b(`Links out`,`ai-rank-suite`),depth:b(`Clicks from home`,`ai-rank-suite`),words:b(`Words`,`ai-rank-suite`),authority:`Authority`,score:`GEO`};return(0,js.jsx)(`div`,{className:`ars-table-wrap`,children:(0,js.jsxs)(`table`,{className:`ars-table`,children:[(0,js.jsx)(`thead`,{children:(0,js.jsxs)(`tr`,{children:[(0,js.jsx)(`th`,{children:b(`Page`,`ai-rank-suite`)}),n.map(e=>(0,js.jsx)(`th`,{className:`is-num`,children:r[e]},e)),(0,js.jsx)(`th`,{className:`is-action`})]})}),(0,js.jsx)(`tbody`,{children:e.map(e=>(0,js.jsxs)(`tr`,{children:[(0,js.jsxs)(`td`,{children:[(0,js.jsx)(`div`,{className:`font-medium truncate`,style:{maxWidth:440},children:e.title||b(`(no title)`,`ai-rank-suite`)}),(0,js.jsx)(`div`,{className:`t-caption`,children:e.type})]}),n.map(t=>(0,js.jsx)(`td`,{className:`is-num`,children:t===`depth`?e.depth<0?`—`:e.depth:t===`authority`?(0,js.jsx)(ks,{value:e.authority??0}):e[t]??`—`},t)),(0,js.jsx)(`td`,{className:`is-action`,children:(0,js.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer noopener`,title:b(`Open page`,`ai-rank-suite`),children:(0,js.jsx)(vt,{size:12})})})]},e.id))})]})})}function Os(){let[e,t]=(0,As.useState)(null),[n,r]=(0,As.useState)(!1),[i,a]=(0,As.useState)(null),[o,s]=(0,As.useState)(`orphans`),c=(0,As.useRef)(!1),l=(0,As.useCallback)(async()=>{if(!c.current){c.current=!0;try{for(;;){let e=await E.post(`/links/graph/tick`,{});if(t(e),!e.progress?.running)break;await new Promise(e=>setTimeout(e,800))}}catch(e){a(e.message)}finally{c.current=!1,r(!1)}}},[]);(0,As.useEffect)(()=>{E.get(`/links/graph`).then(t).catch(e=>a(e.message))},[]),(0,As.useEffect)(()=>{e?.progress?.running&&!c.current&&(r(!0),l())},[e?.progress?.running,l]);let u=async()=>{r(!0),a(null);try{t(await E.post(`/links/graph/build`)),l()}catch(e){a(e.message),r(!1)}};if(!e)return(0,js.jsx)(_e,{error:i});if(!e.ready)return(0,js.jsxs)(`div`,{className:`ars-page`,children:[i&&(0,js.jsx)(M,{tone:`serious`,children:i}),e.progress?.status===`failed`&&(0,js.jsxs)(M,{tone:`serious`,children:[(0,js.jsx)(`strong`,{children:b(`The last build did not finish.`,`ai-rank-suite`)}),` `,e.progress.error?e.progress.error:b(`No reason was recorded.`,`ai-rank-suite`),` `,b(`Pressing Build tries again from the start; nothing from the failed run is kept.`,`ai-rank-suite`)]}),!i&&e.progress?.running&&(0,js.jsx)(k,{icon:(0,js.jsx)(Ct,{size:16}),title:b(`Link structure`,`ai-rank-suite`),subtitle:b(`One pass over every published page — nothing leaves your server`,`ai-rank-suite`),children:(0,js.jsx)(Ne,{label:Ns(e.progress),total:100,percent:e.progress.percent,note:b(`The run continues in slices — leave this tab open, or come back and it will have carried on.`,`ai-rank-suite`)})}),(0,js.jsx)(Wo,{badge:b(`Graph not built`,`ai-rank-suite`),ringLabel:b(`Structure`,`ai-rank-suite`),title:b(`The link graph of this site has not been built yet.`,`ai-rank-suite`),why:b(`One pass over every published page follows every internal link and works out which pages nothing points at, how many clicks each one sits from the home page, which anchor texts you re-use and where you link out to. Nothing leaves your server.`,`ai-rank-suite`),action:n?`Scanning…`:b(`Build the graph`,`ai-rank-suite`),onAction:u,busy:n,progress:e.progress?.running?{running:!0,done:e.progress.done,total:e.progress.total,percent:e.progress.percent,label:Ns(e.progress),note:b(`The run continues in slices — leave this tab open, or come back and it will have carried on.`,`ai-rank-suite`)}:null,stats:[{label:b(`Pages in graph`,`ai-rank-suite`)},{label:b(`Orphans`,`ai-rank-suite`)},{label:b(`Deep pages`,`ai-rank-suite`)},{label:b(`Outbound hosts`,`ai-rank-suite`)}],previews:[{title:b(`Orphans`,`ai-rank-suite`),text:b(`Pages no other page links to — invisible to a crawler that follows links.`,`ai-rank-suite`)},{title:b(`Click depth`,`ai-rank-suite`),text:b(`How far each page sits from the home page; beyond three clicks is where crawl budget dies.`,`ai-rank-suite`)},{title:b(`Anchor texts`,`ai-rank-suite`),text:b(`What you call your own pages when you link them — the words an engine learns them by.`,`ai-rank-suite`)}]}),(0,js.jsx)(k,{icon:(0,js.jsx)(Ct,{size:16}),title:b(`Link structure`,`ai-rank-suite`),subtitle:b(`One pass over every published page — nothing leaves your server`,`ai-rank-suite`),children:(0,js.jsxs)(`div`,{className:`grid gap-3`,children:[(0,js.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`The graph has not been built yet. Scanning reads every published page, follows every link, and works out which pages nothing points at, how many clicks each one sits from the home page, which anchor text you re-use, and where you link out to.`,`ai-rank-suite`)}),(0,js.jsx)(`div`,{children:(0,js.jsxs)(A,{onClick:u,busy:n,children:[(0,js.jsx)(yt,{size:13}),b(`Scan the site`,`ai-rank-suite`)]})})]})})]});let d=e=>Array.isArray(e)?e.length:0,f=[{id:`orphans`,label:S(b(`Orphans (%s)`,`ai-rank-suite`),d(e.orphans))},{id:`deep`,label:S(b(`Buried (%s)`,`ai-rank-suite`),d(e.deep))},{id:`underlinked`,label:S(b(`Under-linked (%s)`,`ai-rank-suite`),d(e.thin))},{id:`dead_ends`,label:S(b(`Dead ends (%s)`,`ai-rank-suite`),d(e.dead_ends))},{id:`hubs`,label:b(`Hubs`,`ai-rank-suite`)},{id:`authority`,label:b(`Authority`,`ai-rank-suite`)},{id:`wasted`,label:S(b(`Wasted (%s)`,`ai-rank-suite`),d(e.wasted))},{id:`starved`,label:S(b(`Starved (%s)`,`ai-rank-suite`),d(e.starved))}];return(0,js.jsxs)(`div`,{className:`ars-page`,children:[i&&(0,js.jsx)(M,{tone:`serious`,children:i}),(0,js.jsx)(be,{columns:4,metrics:[{id:`pages`,label:b(`Pages in the graph`,`ai-rank-suite`),hint:b(`Every published page the scan reached, and every internal link found between them.`,`ai-rank-suite`),value:e.pages.toLocaleString(),sub:S(b(`%s internal links`,`ai-rank-suite`),e.edges.toLocaleString())},{id:`orphans`,label:b(`Orphan pages`,`ai-rank-suite`),hint:b(`Nothing on the site links to these. A crawler can still reach them from the sitemap, but nothing tells it they matter.`,`ai-rank-suite`),value:d(e.orphans),accent:d(e.orphans)>0?`var(--ars-accent)`:void 0,sub:b(`nothing links to them`,`ai-rank-suite`)},{id:`depth`,label:b(`Average click depth`,`ai-rank-suite`),hint:b(`How many clicks a page sits from the home page, averaged. Three or fewer is the usual target — only links can change it.`,`ai-rank-suite`),value:e.avg_depth,accent:e.avg_depth>3?`var(--ars-accent)`:void 0,sub:e.unreached?S(b(`%s unreachable by links`,`ai-rank-suite`),e.unreached):b(`from the home page`,`ai-rank-suite`)},{id:`underlinked`,label:b(`Under-linked pages`,`ai-rank-suite`),hint:b(`Eight hundred words or more with at most one page pointing at them — the cheapest wins on the site.`,`ai-rank-suite`),value:d(e.thin),sub:b(`long, but barely linked`,`ai-rank-suite`)}]}),(0,js.jsx)(k,{icon:(0,js.jsx)(Ct,{size:16}),title:b(`Link structure`,`ai-rank-suite`),subtitle:b(`Where the links actually go, and which pages the structure is failing`,`ai-rank-suite`),action:(0,js.jsxs)(A,{variant:`ghost`,onClick:u,busy:n,children:[(0,js.jsx)(yt,{size:13}),b(`Rescan`,`ai-rank-suite`)]}),children:(0,js.jsxs)(`div`,{className:`grid gap-3`,children:[(0,js.jsx)(Ve,{options:f,value:o,onChange:s}),(0,js.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:Ms()[o]}),(0,js.jsx)(Ds,{rows:e[o],empty:`Nothing in this category — that is the result you want.`,columns:o===`hubs`?[`in`,`out`,`depth`]:[`authority`,`wasted`,`starved`].includes(o)?[`authority`,`in`,`depth`,`score`]:[`in`,`out`,`depth`,`words`]}),e.broken.length>0&&(0,js.jsxs)(M,{tone:`warning`,children:[S(x(`%d internal link points at a URL that does not`,`%d internal links point at a URL that does not`,e.broken.length,`ai-rank-suite`),e.broken.length),`resolve. The Checker tab verifies each one over HTTP and offers a redirect.`]}),(0,js.jsx)(ot,{title:b(`What click depth is, and why it is not a vanity metric`,`ai-rank-suite`),children:(0,js.jsx)(`p`,{children:b(`Click depth is the shortest number of links from the home page to a page. A crawler spends a budget per site: the deeper a page sits, the less often it is recrawled and the weaker the signal that it matters. Three clicks or fewer is the usual target. Unlike a word count or a title tag, nothing written on the page itself can change it — only a link from somewhere shallower can.`,`ai-rank-suite`)})})]})}),(0,js.jsxs)(k,{icon:(0,js.jsx)(St,{size:16}),title:b(`Anchor text`,`ai-rank-suite`),subtitle:b(`The words you link with are how you tell an engine what the target page is about — when they say anything at all`,`ai-rank-suite`),children:[e.anchors.length===0?(0,js.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`No internal anchors found yet.`,`ai-rank-suite`)}):(0,js.jsx)(`div`,{className:`ars-table-wrap`,children:(0,js.jsxs)(`table`,{className:`ars-table`,children:[(0,js.jsx)(`thead`,{children:(0,js.jsxs)(`tr`,{children:[(0,js.jsx)(`th`,{children:b(`Anchor`,`ai-rank-suite`)}),(0,js.jsx)(`th`,{className:`is-num`,children:b(`Uses`,`ai-rank-suite`)}),(0,js.jsx)(`th`,{className:`is-num`,children:b(`Distinct targets`,`ai-rank-suite`)}),(0,js.jsx)(`th`,{className:`is-mid`,children:b(`Verdict`,`ai-rank-suite`)})]})}),(0,js.jsx)(`tbody`,{children:e.anchors.map((e,t)=>(0,js.jsxs)(`tr`,{children:[(0,js.jsx)(`td`,{children:(0,js.jsx)(`span`,{className:`truncate inline-block`,style:{maxWidth:440},children:e.anchor})}),(0,js.jsx)(`td`,{className:`is-num`,children:e.count}),(0,js.jsx)(`td`,{className:`is-num`,children:e.targets}),(0,js.jsx)(`td`,{className:`is-mid`,children:e.generic?(0,js.jsx)(`span`,{className:`ars-tag`,style:{color:`var(--ars-c-yellow-ink)`,background:`var(--ars-c-yellow)`},children:b(`Generic`,`ai-rank-suite`)}):e.targets>1?(0,js.jsx)(`span`,{className:`ars-tag`,style:{color:`var(--ars-c-blue-ink)`,background:`var(--ars-c-blue)`},children:b(`Ambiguous`,`ai-rank-suite`)}):(0,js.jsx)(`span`,{className:`t-caption`,children:b(`Descriptive`,`ai-rank-suite`)})})]},t))})]})}),(0,js.jsx)(ot,{title:b(`Generic and ambiguous, and what each one costs`,`ai-rank-suite`),children:(0,js.jsx)(`p`,{children:`“Read more” describes nothing, so the link carries no topic at all — the one place on the page where you get to name what the target is about is spent on two wasted words. An anchor marked ambiguous points at several different pages: the same phrase claiming to be about several things teaches an engine it is about none of them. Neither is a penalty; both are simply signals thrown away.`})})]}),(0,js.jsx)(k,{icon:(0,js.jsx)(vt,{size:16}),title:b(`Outbound domains`,`ai-rank-suite`),subtitle:b(`Who you link out to, and how much of it you have marked nofollow`,`ai-rank-suite`),children:e.external.length===0?(0,js.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`No external links found. Citing a source is one of the strongest quality signals there is — for Google, and for an assistant deciding whether a page is worth quoting.`,`ai-rank-suite`)}):(0,js.jsx)(`div`,{className:`ars-table-wrap`,children:(0,js.jsxs)(`table`,{className:`ars-table`,children:[(0,js.jsx)(`thead`,{children:(0,js.jsxs)(`tr`,{children:[(0,js.jsx)(`th`,{children:b(`Domain`,`ai-rank-suite`)}),(0,js.jsx)(`th`,{className:`is-num`,children:b(`Links`,`ai-rank-suite`)}),(0,js.jsx)(`th`,{className:`is-num`,children:b(`Nofollow`,`ai-rank-suite`)})]})}),(0,js.jsx)(`tbody`,{children:e.external.map(e=>(0,js.jsxs)(`tr`,{children:[(0,js.jsx)(`td`,{className:`ars-mono`,children:e.domain}),(0,js.jsx)(`td`,{className:`is-num`,children:e.count}),(0,js.jsx)(`td`,{className:`is-num`,children:e.nofollow})]},e.domain))})]})})})]})}function ks({value:e}){return(0,js.jsxs)(`span`,{className:`ars-auth`,title:`${e} of 100, relative to the strongest page on this site`,children:[(0,js.jsx)(`span`,{className:`ars-auth-bar`,children:(0,js.jsx)(`i`,{style:{width:`${Math.max(2,e)}%`}})}),(0,js.jsx)(`b`,{className:`tabular-nums`,children:e})]})}var As,js,Ms,Ns,Ps=o((()=>{As=u(f(),1),C(),D(),Ko(),at(),ct(),Ft(),js=O(),Ms=()=>({orphans:b(`Nothing on the site points at these. A crawler arriving from the sitemap can still reach them, but nothing tells it — or an AI assistant — that they matter.`,`ai-rank-suite`),deep:b(`Four or more clicks from the home page. Depth is the one signal writing cannot fix: it is decided entirely by what links where.`,`ai-rank-suite`),underlinked:b(`Eight hundred words or more, with at most one page pointing at them. The work here is already done — these are the cheapest wins on the site.`,`ai-rank-suite`),dead_ends:b(`These link out to nothing. A reader who finishes has nowhere to go, and the link equity that arrived stops here instead of flowing on.`,`ai-rank-suite`),hubs:b(`The most linked-to pages on the site. If this is not roughly your list of most important pages, your internal linking is arguing against your own priorities.`,`ai-rank-suite`),authority:b(`Where the site’s own authority actually ends up. This is not a count of links: authority flows, so a page linked once from a strong page can outrank one linked twenty times from weak ones. If your privacy policy is near the top, that is a footer link on every page doing exactly what a footer link does.`,`ai-rank-suite`),wasted:b(`These hold real internal authority and score badly. Every one is authority you already have, pointed at a page that cannot use it — usually a legal page, a tag archive or an old post the navigation never stopped linking to.`,`ai-rank-suite`),starved:b(`The opposite: pages that are good and that nothing points at. Adding two or three links from your strongest pages is the cheapest ranking change available on any site.`,`ai-rank-suite`)}),Ns=e=>{switch(e?.phase){case`collect`:return e.total>0?S(b(`Reading pages — %1$s of %2$s`,`ai-rank-suite`),Number(e.done).toLocaleString(),Number(e.total).toLocaleString()):b(`Reading every published page…`,`ai-rank-suite`);case`resolve`:return b(`Resolving every link to the page it points at…`,`ai-rank-suite`);case`aggregate`:return b(`Counting what links to what…`,`ai-rank-suite`);case`authority`:return b(`Working out where your internal authority ends up…`,`ai-rank-suite`);case`publish`:return b(`Publishing the graph…`,`ai-rank-suite`);default:return b(`Building the graph…`,`ai-rank-suite`)}}}));function Fs(e,{perPage:t=50,orderby:n=``,order:r=`desc`,filters:i={}}={}){let[a,o]=(0,zs.useState)({page:1,perPage:t,search:``,orderby:n,order:r,filters:i}),[s,c]=(0,zs.useState)(null),[l,u]=(0,zs.useState)(0),[d,f]=(0,zs.useState)(0),[p,m]=(0,zs.useState)(null),h=(0,zs.useRef)(0),g=(0,zs.useRef)(null),[_,v]=(0,zs.useState)(``),y=(0,zs.useCallback)(()=>{let t=++h.current;m(null);let n=new URLSearchParams;n.set(`page`,String(a.page)),n.set(`per_page`,String(a.perPage)),a.search&&n.set(`search`,a.search),a.orderby&&(n.set(`orderby`,a.orderby),n.set(`order`,a.order)),Object.entries(a.filters).forEach(([e,t])=>{t!==``&&t!=null&&n.set(e,String(t))}),E.get(`${e}?${n.toString()}`).then(e=>{t===h.current&&(c(e.items||[]),u(e.pagination?.total_items??(e.items||[]).length),f(e.pagination?.total_pages??1))}).catch(e=>{t===h.current&&(m(e.message||b(`Request failed`,`ai-rank-suite`)),c([]))})},[e,a]);return(0,zs.useEffect)(()=>{y()},[y]),{rows:s,total:l,pages:d,error:p,state:a,liveSearch:_,setSearch:e=>{v(e),window.clearTimeout(g.current),g.current=window.setTimeout(()=>{o(t=>({...t,search:e,page:1}))},350)},setPage:e=>o(t=>({...t,page:e})),setPerPage:e=>o(t=>({...t,perPage:e,page:1})),sortBy:e=>o(t=>({...t,orderby:e,order:t.orderby===e&&t.order===`desc`?`asc`:`desc`,page:1})),setFilter:(e,t)=>o(n=>({...n,filters:{...n.filters,[e]:t},page:1})),resetFilters:()=>o(e=>({...e,search:``,filters:{},page:1}))||v(``),refresh:y}}function Is({dir:e}){return(0,Bs.jsx)(`svg`,{className:`ars-grid-caret`,viewBox:`0 0 24 24`,width:`12`,height:`12`,fill:`none`,"aria-hidden":!0,children:(0,Bs.jsx)(`path`,{d:e===`asc`?`m6 14 6-6 6 6`:`m6 10 6 6 6-6`,stroke:`currentColor`,strokeWidth:`2.4`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Ls({columns:e,count:t=8}){return Array.from({length:t},(t,n)=>(0,Bs.jsx)(`tr`,{className:`ars-grid-skeleton`,"aria-hidden":!0,children:e.map(e=>(0,Bs.jsx)(`td`,{children:(0,Bs.jsx)(`span`,{style:{width:`${45+(n*17+e.id.length*13)%40}%`}})},e.id))},n))}function Rs({columns:e,query:t,rowKey:n=e=>e.id,rowActions:r,empty:i,searchPlaceholder:a=`Search…`,toolbar:o}){let{rows:s,total:c,pages:l,error:u,state:d,liveSearch:f,setSearch:p,setPage:m,setPerPage:h,sortBy:g,resetFilters:_,refresh:v}=t,y=(0,zs.useMemo)(()=>Object.entries(d.filters).filter(([,e])=>e!==``&&e!=null),[d.filters]),x=s===null,C=c===0?0:(d.page-1)*d.perPage+1,w=Math.min(c,d.page*d.perPage);return(0,Bs.jsxs)(`div`,{className:`ars-grid`,children:[(0,Bs.jsxs)(`div`,{className:`ars-grid-toolbar`,children:[(0,Bs.jsxs)(`div`,{className:`ars-grid-search`,children:[(0,Bs.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`14`,height:`14`,fill:`none`,"aria-hidden":!0,children:[(0,Bs.jsx)(`circle`,{cx:`11`,cy:`11`,r:`7`,stroke:`currentColor`,strokeWidth:`2`}),(0,Bs.jsx)(`path`,{d:`m20 20-3.5-3.5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]}),(0,Bs.jsx)(`input`,{type:`search`,value:f,placeholder:a,onChange:e=>p(e.target.value),"aria-label":a})]}),o,(y.length>0||d.search)&&(0,Bs.jsx)(`button`,{type:`button`,className:`ars-grid-reset`,onClick:_,children:b(`Reset filters`,`ai-rank-suite`)}),(0,Bs.jsx)(`span`,{className:`ars-grid-total`,"aria-live":`polite`,children:x?`…`:S(b(`%s total`,`ai-rank-suite`),c.toLocaleString())})]}),(0,Bs.jsx)(`div`,{className:`ars-grid-scroll`,children:(0,Bs.jsxs)(`table`,{className:`ars-table ars-grid-table`,children:[(0,Bs.jsx)(`thead`,{children:(0,Bs.jsxs)(`tr`,{children:[e.map(e=>(0,Bs.jsx)(`th`,{className:e.num?`num`:``,"aria-sort":d.orderby===e.id?d.order===`asc`?`ascending`:`descending`:void 0,children:e.sortable?(0,Bs.jsxs)(`button`,{type:`button`,className:`ars-grid-sort`,onClick:()=>g(e.id),children:[e.label,d.orderby===e.id?(0,Bs.jsx)(Is,{dir:d.order}):null]}):e.label},e.id)),r&&(0,Bs.jsx)(`th`,{"aria-label":b(`Actions`,`ai-rank-suite`)})]})}),(0,Bs.jsx)(`tbody`,{children:x?(0,Bs.jsx)(Ls,{columns:e}):u?(0,Bs.jsx)(`tr`,{children:(0,Bs.jsx)(`td`,{colSpan:e.length+ +!!r,children:(0,Bs.jsxs)(`div`,{className:`ars-grid-state`,children:[(0,Bs.jsx)(`strong`,{children:u}),(0,Bs.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:v,children:b(`Try again`,`ai-rank-suite`)})]})})}):s.length===0?(0,Bs.jsx)(`tr`,{children:(0,Bs.jsx)(`td`,{colSpan:e.length+ +!!r,children:(0,Bs.jsxs)(`div`,{className:`ars-grid-state`,children:[(0,Bs.jsx)(`strong`,{children:i?.title||b(`Nothing here`,`ai-rank-suite`)}),i?.children&&(0,Bs.jsx)(`span`,{children:i.children}),(y.length>0||d.search)&&(0,Bs.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:_,children:b(`Clear filters`,`ai-rank-suite`)})]})})}):s.map(t=>(0,Bs.jsxs)(`tr`,{children:[e.map(n=>(0,Bs.jsx)(`td`,{className:`${n.num?`num`:``}${n.id===e[0].id?` name`:``}`,children:n.render?n.render(t):t[n.id]},n.id)),r&&(0,Bs.jsx)(`td`,{className:`ars-grid-actions`,children:r(t)})]},n(t)))})]})}),!x&&!u&&c>0&&(0,Bs.jsxs)(`div`,{className:`ars-grid-footer`,children:[(0,Bs.jsxs)(`label`,{className:`ars-grid-perpage`,children:[b(`Rows`,`ai-rank-suite`),(0,Bs.jsx)(`select`,{value:d.perPage,onChange:e=>h(Number(e.target.value)),children:[25,50,100].map(e=>(0,Bs.jsx)(`option`,{value:e,children:e},e))})]}),(0,Bs.jsxs)(`span`,{className:`ars-grid-range`,children:[C.toLocaleString(),`–`,w.toLocaleString(),` of `,c.toLocaleString()]}),(0,Bs.jsxs)(`div`,{className:`ars-grid-pager`,children:[(0,Bs.jsx)(`button`,{type:`button`,disabled:d.page<=1,onClick:()=>m(d.page-1),"aria-label":b(`Previous page`,`ai-rank-suite`),children:`‹`}),(0,Bs.jsxs)(`span`,{children:[d.page,` / `,Math.max(1,l)]}),(0,Bs.jsx)(`button`,{type:`button`,disabled:d.page>=l,onClick:()=>m(d.page+1),"aria-label":b(`Next page`,`ai-rank-suite`),children:`›`})]})]})]})}var zs,Bs,Vs=o((()=>{zs=u(f(),1),C(),D(),Bs=O()})),Hs=c({default:()=>Us});function Us(){let[e,t]=(0,Ws.useState)(`redirects`),[n,r]=(0,Ws.useState)(null),[i,a]=(0,Ws.useState)(null),[o,s]=(0,Ws.useState)(()=>{let e=window.location.hash.split(`?`)[1]||``,t=new URLSearchParams(e).get(`from`)||``;return{source:t,target:t?`/`:``,type:301,regex:!1}}),[c,l]=(0,Ws.useState)(!1),[u,d]=(0,Ws.useState)(null),[f,p]=(0,Ws.useState)(``),[m,h]=(0,Ws.useState)(``),[g,_]=(0,Ws.useState)(null),v=(0,Ws.useRef)(null),y=Fs(`/redirects`,{orderby:`created_at`,order:`desc`});(0,Ws.useEffect)(()=>{E.get(`/404s`).then(r).catch(()=>{}),E.get(`/settings/redirects`).then(a).catch(()=>{})},[]);let x=async()=>{l(!0),d(null);try{await E.post(`/redirects`,o),s({source:``,target:``,type:301,regex:!1}),y.refresh()}catch(e){d(e.message)}finally{l(!1)}},C=async e=>{try{await E.del(`/redirects/${e}`),y.refresh()}catch(e){d(e.message)}},w=e=>{s({source:e,target:`/`,type:301}),t(`redirects`),window.scrollTo({top:0,behavior:`smooth`})},ee=async e=>{let t={...i,...e};a(t);try{await E.put(`/settings/redirects`,t)}catch(e){d(e.message)}},T=async(e,t,n,r)=>{let i={created:0,updated:0,skipped:0,errors:[],total:0},a=0;for(let o=0;o<200;o+=1){let o=await E.post(`/redirects/import`,{content:e,format:t,...n,offset:a});if(i.created+=Number(o.created||0),i.updated+=Number(o.updated||0),i.skipped+=Number(o.skipped||0),i.errors=i.errors.concat(o.errors||[]),i.total=Number(o.total||0),a=Number(o.offset||0),r?.(a,i.total),!Number(o.remaining))break}return i},te=async e=>{p(`import`),d(null);try{let t=await e.text(),n=/\.json$/i.test(e.name)?`json`:`csv`,r=await T(t,n,{dry_run:!0},(e,t)=>h(t>0?`Checking ${e.toLocaleString()} of ${t.toLocaleString()} rows…`:``));h(``);let i=S(b(`%1$s to add, %2$s to update, %3$s refused. Import them?`,`ai-rank-suite`),Number(r.created).toLocaleString(),Number(r.updated).toLocaleString(),Number((r.errors||[]).length).toLocaleString());if(!window.confirm(i)){_({...r,preview:!0});return}let a=await T(t,n,{overwrite:r.updated>0},(e,t)=>h(t>0?`Imported ${e.toLocaleString()} of ${t.toLocaleString()} rows…`:``));h(``),_(a),y.reload?.()}catch(e){d(e.message)}finally{p(``),h(``),v.current&&(v.current.value=``)}};return(0,Gs.jsxs)(`div`,{className:`ars-page`,children:[(0,Gs.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,Gs.jsx)(Ae,{tabs:[{id:`redirects`,label:b(`Redirects`,`ai-rank-suite`)+(y.rows?` (${y.total})`:``)},{id:`404`,label:`404 monitor${n?` (${n.length})`:``}`}],active:e,onChange:t}),i&&(0,Gs.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,Gs.jsx)(A,{variant:`ghost`,onClick:async()=>{p(`export`);try{let{csv:e}=await E.get(`/redirects/export`),t=document.createElement(`a`);t.href=URL.createObjectURL(new Blob([``+e],{type:`text/csv;charset=utf-8`})),t.download=`ai-rank-suite-redirects-${new Date().toISOString().slice(0,10)}.csv`,t.click(),URL.revokeObjectURL(t.href)}catch(e){d(e.message)}finally{p(``)}},busy:f===`export`,children:b(`Export CSV`,`ai-rank-suite`)}),(0,Gs.jsx)(A,{variant:`ghost`,onClick:()=>v.current?.click(),busy:f===`import`,children:b(`Import CSV`,`ai-rank-suite`)}),m&&(0,Gs.jsx)(`span`,{className:`t-caption`,children:m}),(0,Gs.jsx)(`input`,{ref:v,type:`file`,accept:`.csv,.json,text/csv,application/json`,style:{display:`none`},onChange:e=>e.target.files?.[0]&&te(e.target.files[0])}),(0,Gs.jsx)(Ee,{checked:!!i.monitor_404,onChange:e=>ee({monitor_404:e}),label:b(`Log 404s`,`ai-rank-suite`)}),(0,Gs.jsx)(Ee,{checked:!!i.auto_redirect,onChange:e=>ee({auto_redirect:e}),label:b(`Auto-redirect on slug change`,`ai-rank-suite`)})]})]}),u&&(0,Gs.jsx)(M,{tone:`serious`,children:u}),g&&(0,Gs.jsxs)(M,{tone:(g.errors||[]).length>0?`warning`:`good`,children:[(0,Gs.jsx)(`div`,{children:g.preview?S(b(`Nothing was written. The file holds %1$s new rules and %2$s changes.`,`ai-rank-suite`),Number(g.created).toLocaleString(),Number(g.updated).toLocaleString()):S(b(`%1$s rules added, %2$s updated, %3$s left as they were.`,`ai-rank-suite`),Number(g.created).toLocaleString(),Number(g.updated).toLocaleString(),Number(g.skipped).toLocaleString())}),(g.errors||[]).length>0&&(0,Gs.jsx)(`ul`,{className:`m-0 mt-1 pl-4 text-[12px]`,children:g.errors.slice(0,8).map((e,t)=>(0,Gs.jsx)(`li`,{children:S(b(`Row %1$s (%2$s): %3$s`,`ai-rank-suite`),e.row,e.source||`—`,e.reason)},t))})]}),e===`redirects`&&(0,Gs.jsxs)(Gs.Fragment,{children:[(0,Gs.jsx)(k,{title:b(`Add redirect`,`ai-rank-suite`),subtitle:b(`Source is a path on this site; target may be a path or a full URL`,`ai-rank-suite`),children:(0,Gs.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-[1fr_1fr_120px_auto] items-end`,children:[(0,Gs.jsxs)(`div`,{children:[(0,Gs.jsx)(`label`,{className:`block font-medium mb-1`,children:o.regex?`Source pattern (regex)`:`Source path`}),(0,Gs.jsx)(`input`,{type:`text`,className:o.regex?`ars-mono`:``,placeholder:o.regex?`^/blog/(.*)$`:`/old-page`,value:o.source,onChange:e=>s({...o,source:e.target.value})})]}),(0,Gs.jsxs)(`div`,{children:[(0,Gs.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Target`,`ai-rank-suite`)}),(0,Gs.jsx)(`input`,{type:`text`,placeholder:`/new-page`,value:o.target,onChange:e=>s({...o,target:e.target.value})})]}),(0,Gs.jsxs)(`div`,{children:[(0,Gs.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Type`,`ai-rank-suite`)}),(0,Gs.jsxs)(`select`,{value:o.type,onChange:e=>s({...o,type:Number(e.target.value)}),children:[(0,Gs.jsx)(`option`,{value:301,children:`301 permanent`}),(0,Gs.jsx)(`option`,{value:302,children:`302 temporary`}),(0,Gs.jsx)(`option`,{value:307,children:`307 temporary`}),(0,Gs.jsx)(`option`,{value:410,children:`410 gone`})]})]}),(0,Gs.jsx)(A,{onClick:x,busy:c,disabled:!o.source||!o.target,children:b(`Add`,`ai-rank-suite`)}),(0,Gs.jsx)(`div`,{className:`sm:col-span-4`,children:(0,Gs.jsx)(Ee,{checked:!!o.regex,onChange:e=>s({...o,regex:e}),label:b(`Regular expression (use $1, $2 … in the target for captured groups)`,`ai-rank-suite`)})})]})}),(0,Gs.jsx)(Rs,{query:y,searchPlaceholder:`Search source or target…`,toolbar:(0,Gs.jsx)(Ve,{label:b(`Kind`,`ai-rank-suite`),value:y.state.filters.status||``,onChange:e=>y.setFilter(`status`,e),options:[{id:``,label:b(`All`,`ai-rank-suite`)},{id:`active`,label:b(`Plain`,`ai-rank-suite`)},{id:`regex`,label:b(`Regex`,`ai-rank-suite`)}]}),columns:[{id:`source`,label:b(`Source`,`ai-rank-suite`),sortable:!0,render:e=>(0,Gs.jsxs)(`span`,{className:`ars-mono`,children:[e.source,e.regex&&(0,Gs.jsx)(`span`,{className:`ml-2`,children:(0,Gs.jsx)(j,{tone:`brand`,children:`regex`})})]})},{id:`target`,label:b(`Target`,`ai-rank-suite`),render:e=>(0,Gs.jsx)(`span`,{className:`ars-mono ars-url`,style:{maxWidth:300,display:`inline-block`},title:e.target,children:e.target})},{id:`type`,label:b(`Type`,`ai-rank-suite`),render:e=>(0,Gs.jsx)(j,{tone:e.type===301?`brand`:`neutral`,children:e.type})},{id:`hits`,label:b(`Hits`,`ai-rank-suite`),num:!0,sortable:!0}],rowActions:e=>(0,Gs.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent cursor-pointer text-[12px]`,style:{color:`var(--ars-serious)`},onClick:()=>C(e.id),children:b(`Delete`,`ai-rank-suite`)}),empty:{title:b(`No redirects yet`,`ai-rank-suite`),children:`Changing a published page's URL creates one automatically.`}})]}),e===`404`&&(0,Gs.jsx)(k,{title:b(`404 monitor`,`ai-rank-suite`),subtitle:b(`Requests that hit nothing — each one is a lost visitor or crawler`,`ai-rank-suite`),children:!n||n.length===0?(0,Gs.jsxs)(`div`,{className:`grid gap-2`,children:[(0,Gs.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`No 404s logged yet.`,`ai-rank-suite`)}),(0,Gs.jsx)(`p`,{className:`m-0 t-caption`,children:b(`From now on, every request to a path that does not exist on this site is recorded here with how often it was hit and when it was last seen: a visitor following a stale link, a crawler still asking for a page you deleted, a typo in somebody else's link to you. Each one is a lost visit until it has a redirect, and the Redirects tab is where it gets one. Old entries are pruned after the number of days set under Settings, Data.`,`ai-rank-suite`)})]}):(0,Gs.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Gs.jsxs)(`table`,{className:`ars-table`,children:[(0,Gs.jsx)(`thead`,{children:(0,Gs.jsxs)(`tr`,{children:[(0,Gs.jsx)(`th`,{children:b(`Path`,`ai-rank-suite`)}),(0,Gs.jsx)(`th`,{className:`is-num`,children:b(`Hits`,`ai-rank-suite`)}),(0,Gs.jsx)(`th`,{children:b(`Last seen`,`ai-rank-suite`)}),(0,Gs.jsx)(`th`,{})]})}),(0,Gs.jsx)(`tbody`,{children:n.map(e=>(0,Gs.jsxs)(`tr`,{children:[(0,Gs.jsx)(`td`,{className:`ars-mono`,style:{maxWidth:340},title:e.path,children:(0,Gs.jsx)(`span`,{className:`ars-url`,children:e.path})}),(0,Gs.jsx)(`td`,{className:`is-num`,children:e.hits}),(0,Gs.jsx)(`td`,{style:{color:`var(--ars-ink-3)`},children:e.last_hit}),(0,Gs.jsx)(`td`,{className:`is-num`,children:(0,Gs.jsx)(A,{variant:`ghost`,onClick:()=>w(e.path),children:b(`Redirect`,`ai-rank-suite`)})})]},e.id))})]})})})]})}var Ws,Gs,Ks=o((()=>{Ws=u(f(),1),C(),D(),at(),Vs(),Gs=O()})),qs=c({default:()=>Js});function Js(){let[e,t]=(0,Ys.useState)(null),[n,r]=(0,Ys.useState)(`missing`),[i,a]=(0,Ys.useState)(null),[o,s]=(0,Ys.useState)(null),c=(0,Ys.useRef)(!1),l=async()=>{if(!c.current){c.current=!0;try{let e=await E.post(`/bulk/tick`);for(t(e);e.state===`running`;)(e.busy||e.error)&&await new Promise(e=>setTimeout(e,2e3)),e=await E.post(`/bulk/tick`),t(e)}catch(e){a(e.message)}finally{c.current=!1}}};(0,Ys.useEffect)(()=>{E.get(`/bulk/status`).then(e=>{t(e),e.state===`running`&&l()}).catch(()=>{})},[]);let u=async e=>{s(e),a(null);try{t(await E.post(`/bulk/start`,{action:e,scope:n})),l()}catch(e){a(e.message)}finally{s(null)}},d=async()=>{try{t(await E.post(`/bulk/cancel`))}catch(e){a(e.message)}},f=e?.state===`running`;return(0,Xs.jsxs)(`div`,{className:`ars-page`,children:[i&&(0,Xs.jsx)(M,{tone:`serious`,children:i}),e&&e.state!==`idle`&&(0,Xs.jsx)(k,{title:f?b(`Working…`,`ai-rank-suite`):e.state===`done`?b(`Finished`,`ai-rank-suite`):b(`Cancelled`,`ai-rank-suite`),subtitle:S(b(`%1$s of %2$s pages processed`,`ai-rank-suite`),e.done,e.total)+(e.failed?` · `+S(b(`%d failed`,`ai-rank-suite`),e.failed):``),action:f?(0,Xs.jsx)(A,{variant:`ghost`,onClick:d,children:b(`Cancel`,`ai-rank-suite`)}):(0,Xs.jsx)(j,{tone:e.failed?`warning`:`good`,children:e.failed?S(b(`%d failed`,`ai-rank-suite`),e.failed):`✓ `+b(`Complete`,`ai-rank-suite`)}),children:(0,Xs.jsxs)(`div`,{className:`grid gap-2`,children:[(0,Xs.jsx)(Ne,{label:S(b(`%s remaining`,`ai-rank-suite`),Number(e.remaining||0).toLocaleString()),total:100,percent:e.progress}),e.errors?.length>0&&(0,Xs.jsx)(`ul`,{className:`m-0 mt-1 pl-5 text-[12px]`,style:{color:`var(--ars-serious)`},children:e.errors.map((e,t)=>(0,Xs.jsx)(`li`,{children:e},t))})]})}),(0,Xs.jsxs)(k,{title:b(`Bulk optimization`,`ai-rank-suite`),subtitle:b(`Apply an action across your whole site — resumable and cancellable at any time`,`ai-rank-suite`),action:(0,Xs.jsx)(`div`,{className:`inline-flex gap-1 p-1 ars-r-md`,style:{background:`var(--ars-surface-3)`},children:[{id:`missing`,label:b(`Only missing`,`ai-rank-suite`)},{id:`all`,label:b(`All pages`,`ai-rank-suite`)}].map(e=>(0,Xs.jsx)(`button`,{type:`button`,onClick:()=>r(e.id),className:`px-3 py-1.5 ars-r-sm text-[12.5px] font-semibold border-0 cursor-pointer`,style:n===e.id?{background:`var(--ars-surface)`,color:`var(--ars-ink)`}:{background:`transparent`,color:`var(--ars-ink-2)`},children:e.label},e.id))}),children:[(0,Xs.jsx)(`div`,{className:`grid gap-2.5`,children:Zs.map(e=>(0,Xs.jsxs)(`div`,{className:`flex items-center justify-between gap-4 ars-r-md p-3.5`,style:{background:`var(--ars-surface-2)`},children:[(0,Xs.jsxs)(`div`,{children:[(0,Xs.jsxs)(`div`,{className:`font-semibold flex items-center gap-1.5`,children:[e.ai&&(0,Xs.jsx)(bt,{size:13}),e.label]}),(0,Xs.jsx)(`div`,{className:`text-[12.5px] mt-0.5`,style:{color:`var(--ars-ink-2)`},children:e.desc})]}),(0,Xs.jsxs)(A,{variant:e.ai?`primary`:`ghost`,busy:o===e.id,disabled:f,onClick:()=>u(e.id),children:[!e.ai&&(0,Xs.jsx)(yt,{size:13}),` Run`]})]},e.id))}),(0,Xs.jsx)(`p`,{className:`m-0 mt-3 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`AI actions send one small request per page to your provider. Keep this tab open while a job runs — progress is saved, so you can close it and resume later.`,`ai-rank-suite`)})]})]})}var Ys,Xs,Zs,Qs=o((()=>{Ys=u(f(),1),C(),D(),at(),Ft(),Xs=O(),Zs=[{id:`analyze`,label:b(`Analyze all pages`,`ai-rank-suite`),desc:b(`Recalculate GEO + SEO scores for every published page. Fast, free, no AI needed.`,`ai-rank-suite`),ai:!1},{id:`describe`,label:b(`Write meta descriptions`,`ai-rank-suite`),desc:b(`Generate a meta description and an AI summary per page. Uses your AI key.`,`ai-rank-suite`),ai:!0},{id:`faq`,label:b(`Generate FAQs`,`ai-rank-suite`),desc:b(`Create grounded Q&A per page — feeds FAQPage schema. Uses your AI key.`,`ai-rank-suite`),ai:!0}]})),$s,ec=o((()=>{$s=`<svg width="350" height="350" viewBox="0 0 350 350" fill="none" xmlns="http://www.w3.org/2000/svg">
     13Example Corp of Ohio, no relation.`,value:u.extra||``,onChange:e=>d({extra:e.target.value})}),ne()]})}),(0,L.jsx)(k,{title:b(`Why this file decides whether you are cited`,`ai-rank-suite`),subtitle:b(`Four mechanisms, all of them configurable above`,`ai-rank-suite`),children:(0,L.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:_a.map(([e,t])=>(0,L.jsxs)(`div`,{className:`ars-r-md p-4`,style:{background:`var(--ars-surface-2)`},children:[(0,L.jsxs)(`div`,{className:`font-semibold text-[13px] flex items-start gap-1.5`,children:[(0,L.jsx)(zt,{size:13}),e]}),(0,L.jsx)(`div`,{className:`text-[12px] mt-1`,style:{color:`var(--ars-ink-2)`},children:t})]},e))})})]})}function ha(){let[e,t]=(0,ga.useState)(null),[n,r]=(0,ga.useState)(!1);return(0,L.jsxs)(k,{title:b(`What the site actually serves`,`ai-rank-suite`),subtitle:b(`Fetches the real URL and compares it with what this screen would publish`,`ai-rank-suite`),action:(0,L.jsx)(A,{variant:`ghost`,busy:n,onClick:async()=>{r(!0);try{t(await D.post(`/llms-txt/verify`))}catch(e){t({ok:!1,reason:e.message})}finally{r(!1)}},children:b(`Fetch it`,`ai-rank-suite`)}),children:[!e&&(0,L.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`The preview above is what this plugin would write. Whether that is what a crawler receives depends on rewrite rules, caches and whatever else answers that URL first.`,`ai-rank-suite`)}),e&&!e.ok&&(0,L.jsx)(M,{tone:`serious`,children:e.reason}),e&&e.ok&&(0,L.jsxs)(`div`,{className:`grid gap-2`,children:[!e.plain&&(0,L.jsxs)(M,{tone:`serious`,children:[b(`The URL answered with`,`ai-rank-suite`),` `,(0,L.jsx)(`code`,{children:e.type||b(`no content type`,`ai-rank-suite`)}),` `,b(`instead of text/plain. That is usually a theme 404 template returning HTTP 200 — it looks fine in a browser and is unparseable to a crawler.`,`ai-rank-suite`)]}),e.plain&&e.matches&&(0,L.jsx)(M,{tone:`good`,children:S(b(`The served file matches this configuration exactly (%s bytes).`,`ai-rank-suite`),e.bytes.toLocaleString())}),e.plain&&!e.matches&&(0,L.jsx)(M,{tone:`warning`,children:S(b(`The served file differs from what this screen would publish — %1$s bytes served against %2$s expected. Almost always a cache holding a copy from before your last change. If it survives a purge, something else is answering that URL.`,`ai-rank-suite`),e.bytes.toLocaleString(),e.expected.toLocaleString())}),(0,L.jsx)(`pre`,{className:`ars-head-pre is-tall`,children:e.body})]})]})}var ga,L,_a,va=o((()=>{C(),ga=u(f(),1),O(),dt(),Vt(),ye(),L=_e(),_a=[[b(`An assistant reads this before it reads your site`,`ai-rank-suite`),b(`ChatGPT, Claude, Perplexity and Gemini fetch a handful of URLs per answer, not a whole site. llms.txt is the one file that tells them which handful — and it is the only place you get to choose.`,`ai-rank-suite`)],[b(`Being quoted correctly is a setting, not luck`,`ai-rank-suite`),b(`The preferred citation, contact and usage lines below are read verbatim. A model that has been told how to credit you tends to; one that has not will paraphrase your brand into something else.`,`ai-rank-suite`)],[b(`Your best page beats your newest page`,`ai-rank-suite`),b(`Chronology is a blog convention, not a relevance signal. Pinned pages sit at the top of the file, and an assistant that stops reading after ten links has still read the ten you chose.`,`ai-rank-suite`)],[b(`It works where a sitemap cannot`,`ai-rank-suite`),b(`An XML sitemap lists URLs. This lists URLs with a sentence of meaning attached, in the markdown these models were trained on — which is why it survives summarisation.`,`ai-rank-suite`)]]}));function ya({tone:e=`neutral`,text:t,why:n,action:r,onAction:i,busy:a=!1,children:o}){return t?(0,ba.jsx)(be,{tone:e,text:t,why:n,action:r,onAction:i,busy:a,children:o}):null}var ba,xa=o((()=>{f(),dt(),ba=_e()})),Sa=c({default:()=>Ca});function Ca(){let[e,t]=(0,wa.useState)(null),[n,r]=(0,wa.useState)(null),[i,a]=(0,wa.useState)(!1),[o,s]=(0,wa.useState)(null),[c,l]=(0,wa.useState)(`all`),[u,d]=(0,wa.useState)(``),f=(0,wa.useRef)(null),p=()=>D.get(`/crawlers`).then(t).catch(e=>r(e.message));if((0,wa.useEffect)(()=>{p()},[]),!e)return(0,Ta.jsx)(Ce,{error:n});let{settings:m,bots:h,traffic:g}=e,_=new Set(m.blocked),v=g?.bots||{},y=async e=>{a(!0);try{t(await D.put(`/crawlers`,{...m,...e})),r(null)}catch(e){r(e.message)}finally{a(!1)}},C=e=>{let t=new Set(_);t.has(e)?t.delete(e):t.add(e),y({blocked:[...t]})},w=(e,t)=>{let n=new Set(_);Object.entries(h).forEach(([r,i])=>{e(i,r)&&(t?n.add(r):n.delete(r))}),y({blocked:[...n]})},T=async()=>{a(!0),s(null);try{s(await D.post(`/crawlers/verify`))}catch(e){r(e.message)}finally{a(!1)}},E=Object.entries(h),ee=e=>E.filter(([t,n])=>(n.region||`us`)!==e||u&&n.vendor!==u?!1:c===`seen`?(v[t]?.hits||0)>0:c===`blocked`?_.has(t):c!==`ignoring`||v[t]?.ignoring),te=[`OpenAI`,`Anthropic`,`Google`,`Perplexity`,`Meta`,`Microsoft`,`Apple`,`Amazon`],ne=(()=>{let e=new Map;return E.forEach(([t,n])=>{let r=e.get(n.vendor)||{name:n.vendor,total:0,allowed:0,seen:0,hits:0};r.total+=1,_.has(t)||(r.allowed+=1),(v[t]?.hits||0)>0&&(r.seen+=1,r.hits+=v[t].hits),e.set(n.vendor,r)}),[...e.values()].map(e=>({...e,tone:e.allowed===0?`blocked`:e.seen>0?`seen`:`quiet`})).sort((e,t)=>{let n=te.indexOf(e.name),r=te.indexOf(t.name);return n!==-1||r!==-1?(n===-1?99:n)-(r===-1?99:r):t.total-e.total||e.name.localeCompare(t.name)}).slice(0,8)})(),re=Object.keys(e.bots||{}).length,O=_.size,ie=m.enabled?O===0?{tone:`good`,text:S(b(`All %d known AI crawlers may read this site.`,`ai-rank-suite`),re),why:b(`That is the right default for most sites: being read is how a page gets cited. Block one only when you have a reason.`,`ai-rank-suite`)}:{tone:`neutral`,text:S(x(`%1$d of %2$d AI crawlers is blocked.`,`%1$d of %2$d AI crawlers are blocked.`,O,`ai-rank-suite`),O,re),why:b(`A blocked crawler cannot cite you. The log below shows whether it actually stopped — several ignore robots.txt.`,`ai-rank-suite`)}:{tone:`warning`,text:b(`Crawler rules are switched off, so robots.txt says nothing about AI crawlers.`,`ai-rank-suite`),why:b(`Without a rule every AI crawler reads the whole site by default. That is a decision worth making on purpose rather than by omission.`,`ai-rank-suite`)};return(0,Ta.jsxs)(`div`,{className:`ars-page`,children:[n&&(0,Ta.jsx)(M,{tone:`serious`,children:n}),(0,Ta.jsx)(ya,{...ie}),(0,Ta.jsx)(`div`,{className:`ars-opstrip`,role:`list`,children:ne.map(e=>(0,Ta.jsxs)(`button`,{type:`button`,role:`listitem`,className:`ars-optile is-${e.tone}${u===e.name?` is-active`:``}`,onClick:()=>{d(u===e.name?``:e.name),requestAnimationFrame(()=>f.current?.scrollIntoView({behavior:`smooth`,block:`start`}))},title:m.log?S(b(`%1$s: %2$d of %3$d crawlers allowed, %4$d seen here`,`ai-rank-suite`),e.name,e.allowed,e.total,e.seen):S(b(`%1$s: %2$d of %3$d crawlers allowed`,`ai-rank-suite`),e.name,e.allowed,e.total),children:[(0,Ta.jsx)(`span`,{className:`ars-optile-name`,children:e.name}),(0,Ta.jsx)(`span`,{className:`ars-optile-state`,children:e.allowed===e.total?b(`All allowed`,`ai-rank-suite`):e.allowed===0?b(`Blocked`,`ai-rank-suite`):S(b(`%1$d/%2$d allowed`,`ai-rank-suite`),e.allowed,e.total)}),(0,Ta.jsx)(`span`,{className:`ars-optile-seen`,children:m.log?e.seen>0?S(x(`%s request`,`%s requests`,e.hits,`ai-rank-suite`),e.hits.toLocaleString()):b(`not seen yet`,`ai-rank-suite`):b(`not recording`,`ai-rank-suite`)})]},e.name))}),e.physical_robots_txt&&(0,Ta.jsxs)(M,{tone:`warning`,children:[b(`A physical`,`ai-rank-suite`),` `,(0,Ta.jsx)(`code`,{children:`robots.txt`}),` `,b(`file exists in the site root. WordPress cannot modify it, so nothing on this screen reaches the file crawlers actually read — delete it and let WordPress serve robots.txt, or copy these rules into it by hand.`,`ai-rank-suite`)]}),g?.defiant>0&&(0,Ta.jsxs)(M,{tone:`serious`,children:[S(x(`%d crawler you have disallowed is still fetching pages. robots.txt is a request, not a fence — turn on`,`%d crawlers you have disallowed are still fetching pages. robots.txt is a request, not a fence — turn on`,g.defiant,`ai-rank-suite`),g.defiant),` `,(0,Ta.jsx)(`b`,{children:b(`Refuse blocked crawlers`,`ai-rank-suite`)}),` `,b(`below to answer them with a 403 instead.`,`ai-rank-suite`)]}),(0,Ta.jsx)(Ee,{columns:4,onSelect:m.log?void 0:e=>e===`seen`&&y({log:!0}),metrics:[{id:`seen`,label:b(`Crawlers seen`,`ai-rank-suite`),hint:b(`Distinct AI crawlers that have fetched at least one page since recording began.`,`ai-rank-suite`),value:m.log||(g?.seen||0)>0?g?.seen||0:`—`,accent:m.log?void 0:`var(--ars-accent)`,sub:m.log?S(b(`of %d known`,`ai-rank-suite`),E.length):b(`recording is off — click to turn it on`,`ai-rank-suite`)},{id:`requests`,label:b(`Requests recorded`,`ai-rank-suite`),hint:b(`Every crawler request that reached WordPress. A full-page cache serves most requests without PHP running, so this is a floor.`,`ai-rank-suite`),value:m.log||(g?.total||0)>0?(g?.total||0).toLocaleString():`—`,sub:b(`since recording began`,`ai-rank-suite`)},{id:`blocked`,label:b(`Disallowed`,`ai-rank-suite`),hint:b(`Crawlers your rules tell to stay away. robots.txt is a request, not a fence — the last cell shows who ignores it.`,`ai-rank-suite`),value:_.size,sub:b(`in robots.txt`,`ai-rank-suite`)},{id:`defiant`,label:b(`Ignoring the rules`,`ai-rank-suite`),hint:b(`Disallowed crawlers that kept fetching pages afterwards. For these, only the 403 has teeth.`,`ai-rank-suite`),value:g?.defiant||0,accent:g?.defiant>0?`var(--ars-c-red-ink)`:void 0,sub:g?.defiant>0?b(`still arriving after being blocked`,`ai-rank-suite`):b(`every blocked crawler stopped`,`ai-rank-suite`)}]}),(0,Ta.jsxs)(k,{icon:(0,Ta.jsx)(Pt,{size:16}),title:b(`Enforcement`,`ai-rank-suite`),subtitle:b(`What happens to a crawler you have disallowed`,`ai-rank-suite`),action:(0,Ta.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Ta.jsxs)(A,{variant:`ghost`,busy:i,onClick:T,children:[(0,Ta.jsx)(Tt,{size:13}),b(`Check the live robots.txt`,`ai-rank-suite`)]}),(0,Ta.jsxs)(`a`,{href:e.robots_url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 text-[12px]`,children:[b(`View`,`ai-rank-suite`),(0,Ta.jsx)(wt,{size:10})]})]}),children:[(0,Ta.jsxs)(`div`,{className:`grid gap-2`,children:[(0,Ta.jsx)(Me,{checked:!!m.enabled,disabled:i,onChange:e=>y({enabled:e}),label:b(`Write the rules into robots.txt`,`ai-rank-suite`)}),(0,Ta.jsx)(Me,{checked:!!m.log,disabled:i,onChange:e=>y({log:e}),label:b(`Record which crawlers arrive`,`ai-rank-suite`)}),(0,Ta.jsx)(`p`,{className:`m-0 ml-[48px] text-[12px]`,style:{color:`var(--ars-ink-2)`},children:b(`One small database write per crawler request. That is a fraction of a percent of a normal site's traffic, and it is the only way to know whether any of this is working — but it is your decision, so it is off until you make it.`,`ai-rank-suite`)}),(0,Ta.jsx)(Me,{checked:!!m.enforce,disabled:i,onChange:e=>y({enforce:e}),label:b(`Refuse blocked crawlers with a 403`,`ai-rank-suite`)}),(0,Ta.jsx)(`p`,{className:`m-0 ml-[48px] text-[12px]`,style:{color:`var(--ars-ink-2)`},children:b(`robots.txt is a request. This is not — a disallowed crawler gets a 403 and no content. Use it for the ones the table below shows are ignoring you. A 403 rather than a 404 on purpose: a crawler told the page does not exist may drop the URL permanently.`,`ai-rank-suite`)})]}),o&&!o.ok&&(0,Ta.jsx)(M,{tone:`serious`,children:o.reason}),o&&o.ok&&(0,Ta.jsxs)(`div`,{className:`mt-3`,children:[o.missing.length===0?(0,Ta.jsx)(M,{tone:`good`,children:S(b(`All %d disallow rules are present in the robots.txt the site actually serves.`,`ai-rank-suite`),o.present)}):(0,Ta.jsx)(M,{tone:`serious`,children:S(x(`%1$d rule you set is not in the served file: %2$s. A CDN cache or a security plugin rewriting robots.txt is the usual cause.`,`%1$d rules you set are not in the served file: %2$s. A CDN cache or a security plugin rewriting robots.txt is the usual cause.`,o.missing.length,`ai-rank-suite`),o.missing.length,o.missing.map(e=>e.agent).join(`, `))}),(0,Ta.jsx)(`pre`,{className:`ars-head-pre is-tall mt-2`,children:o.body})]})]}),(()=>{let e=Object.entries(h).filter(([,e])=>e.purpose===`on-demand`).map(([e])=>e),t=e.filter(e=>_.has(e)),n=t.length===0;return(0,Ta.jsx)(k,{title:b(`Agentic browsing`,`ai-rank-suite`),subtitle:b(`When someone asks ChatGPT, Claude or Perplexity to open your site for them, these fetchers do the visit`,`ai-rank-suite`),action:(0,Ta.jsx)(Me,{checked:n,onChange:e=>w(e=>e.purpose===`on-demand`,!e),label:b(n?`Allowed`:`Blocked`,`ai-rank-suite`)}),children:(0,Ta.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:n?S(b(`All %d on-demand fetchers may visit. This is how an assistant reads your prices or opening hours when a customer asks — blocking them makes you invisible in exactly those moments.`,`ai-rank-suite`),e.length):S(x(`%1$d of %2$d on-demand fetchers is blocked. An assistant asked about your site will answer from memory or from your competitors instead.`,`%1$d of %2$d on-demand fetchers are blocked. An assistant asked about your site will answer from memory or from your competitors instead.`,t.length,`ai-rank-suite`),t.length,e.length)})})})(),(0,Ta.jsxs)(k,{icon:(0,Ta.jsx)(bt,{size:16}),title:b(`Who may use your content`,`ai-rank-suite`),subtitle:b(`Grouped by where the operator is, because that is the decision people actually make`,`ai-rank-suite`),action:(0,Ta.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Ta.jsx)(A,{variant:`ghost`,onClick:()=>w(e=>e.purpose===`training`,!0),children:b(`Block all training`,`ai-rank-suite`)}),(0,Ta.jsx)(A,{variant:`ghost`,onClick:()=>w(e=>e.purpose!==`training`,!1),children:b(`Allow all search`,`ai-rank-suite`)}),_.size>0&&(0,Ta.jsx)(A,{variant:`ghost`,onClick:()=>y({blocked:[]}),children:b(`Allow everything`,`ai-rank-suite`)})]}),flush:!0,children:[(0,Ta.jsx)(`div`,{ref:f,className:`p-3`,style:{borderBottom:`1px solid var(--ars-border)`,scrollMarginTop:12},children:(0,Ta.jsx)(qe,{label:b(`Show`,`ai-rank-suite`),value:c,onChange:l,options:[{id:`all`,label:u||`All`,count:u?E.filter(([,e])=>e.vendor===u).length:E.length},{id:`seen`,label:b(`Seen here`,`ai-rank-suite`),count:g?.seen||0},{id:`blocked`,label:b(`Disallowed`,`ai-rank-suite`),count:_.size},{id:`ignoring`,label:b(`Ignoring you`,`ai-rank-suite`),count:g?.defiant||0}]})}),Ea.map(e=>{let t=ee(e.id);return t.length===0?null:(0,Ta.jsxs)(`div`,{children:[(0,Ta.jsxs)(`div`,{className:`ars-crawl-region`,children:[(0,Ta.jsx)(`b`,{children:e.label}),(0,Ta.jsx)(`span`,{children:e.hint})]}),t.map(([e,t])=>{let n=v[e]||{},r=Da[t.purpose]||Da.training,a=_.has(e);return(0,Ta.jsxs)(`div`,{className:`ars-crawl-row${n.ignoring?` is-defiant`:``}`,children:[(0,Ta.jsxs)(`div`,{className:`min-w-0`,children:[(0,Ta.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Ta.jsx)(`b`,{className:`text-[13px]`,children:t.vendor}),(0,Ta.jsx)(`code`,{className:`ars-head-code`,children:t.ua}),(0,Ta.jsx)(`span`,{title:r.why,children:(0,Ta.jsx)(j,{tone:r.tone,children:r.label})}),t.note===`unreliable`&&(0,Ta.jsx)(`span`,{className:`ars-tag`,title:b(`This vendor is widely reported to fetch without a named identifier, so the rule is a best effort.`,`ai-rank-suite`),children:b(`identifier unreliable`,`ai-rank-suite`)}),n.ignoring&&(0,Ta.jsx)(j,{tone:`serious`,children:b(`ignoring robots.txt`,`ai-rank-suite`)})]}),(0,Ta.jsx)(`div`,{className:`ars-crawl-meta`,children:n.hits>0?(0,Ta.jsxs)(Ta.Fragment,{children:[(0,Ta.jsx)(`b`,{className:`tabular-nums`,children:n.hits.toLocaleString()}),` `,x(`request`,`requests`,n.hits,`ai-rank-suite`),n.recent>0&&(0,Ta.jsxs)(Ta.Fragment,{children:[` · `,S(b(`%s in the last 7 days`,`ai-rank-suite`),n.recent.toLocaleString())]}),n.last>0&&(0,Ta.jsxs)(Ta.Fragment,{children:[` · `,S(b(`last %s`,`ai-rank-suite`),new Date(n.last*1e3).toLocaleDateString())]}),n.blocked>0&&(0,Ta.jsxs)(Ta.Fragment,{children:[` · `,S(b(`%s refused`,`ai-rank-suite`),n.blocked.toLocaleString())]})]}):m.log?b(`never seen here`,`ai-rank-suite`):r.why})]}),n.series&&n.hits>0&&(0,Ta.jsx)(`div`,{className:`ars-crawl-spark`,children:(0,Ta.jsx)(Ue,{data:n.series,height:26,color:`var(--ars-brand)`})}),(0,Ta.jsxs)(`div`,{className:`ars-crawl-switch`,children:[(0,Ta.jsx)(`span`,{className:`t-caption`,children:b(a?`Blocked`:`Allowed`,`ai-rank-suite`)}),(0,Ta.jsx)(Me,{checked:a,disabled:i,onChange:()=>C(e)})]})]},e)})]},e.id)})]}),(0,Ta.jsxs)(ft,{title:b(`What blocking actually costs you`,`ai-rank-suite`),children:[(0,Ta.jsxs)(`p`,{children:[b(`The three purposes are not interchangeable, and the switch means something different for each. A`,`ai-rank-suite`),` `,(0,Ta.jsx)(`b`,{children:b(`training`,`ai-rank-suite`)}),` `,b(`crawler reads your pages to train a model; blocking it costs you nothing you would ever have received. A`,`ai-rank-suite`),` `,(0,Ta.jsx)(`b`,{children:b(`search index`,`ai-rank-suite`)}),` `,b(`crawler builds the index the assistant answers from — block that and you cannot be cited at all, which is the opposite of what this plugin is for. An`,`ai-rank-suite`),` `,(0,Ta.jsx)(`b`,{children:b(`on-demand`,`ai-rank-suite`)}),` `,b(`fetch happens because a user asked about your page a second ago; blocking it is blocking a visitor.`,`ai-rank-suite`)]}),(0,Ta.jsx)(`p`,{children:b(`Blocking every AI crawler is a legitimate position, and it is the position that guarantees you are never in an AI answer. Most sites want the middle: no training, yes search, yes on demand — which is exactly what the two bulk buttons above do.`,`ai-rank-suite`)}),(0,Ta.jsx)(`p`,{children:b(`robots.txt is honoured voluntarily. The table shows which crawlers keep arriving after being told not to; for those, the 403 is the only thing that has teeth. Note that a full-page cache serves most requests without PHP running, so both the recording and the 403 only see what reaches WordPress.`,`ai-rank-suite`)})]})]})}var wa,Ta,Ea,Da,Oa=o((()=>{C(),wa=u(f(),1),O(),dt(),mt(),xa(),Vt(),Ta=_e(),Ea=[{id:`us`,label:b(`United States`,`ai-rank-suite`),hint:b(`ChatGPT, Claude, Gemini, Perplexity — the assistants most of your visitors use today`,`ai-rank-suite`)},{id:`eu`,label:b(`Europe`,`ai-rank-suite`),hint:b(`Mistral and Yandex`,`ai-rank-suite`)},{id:`cn`,label:b(`China`,`ai-rank-suite`),hint:b(`Doubao, Qwen, ERNIE, Kimi, Huawei and DeepSeek — the fastest-growing source of AI answers outside the US, and the most aggressive crawlers on this list`,`ai-rank-suite`)}],Da={training:{label:b(`Training`,`ai-rank-suite`),tone:`neutral`,why:b(`Reads your pages to train a model. Blocking costs you nothing today and nothing tomorrow — no citation comes from this.`,`ai-rank-suite`)},search:{label:b(`Search index`,`ai-rank-suite`),tone:`brand`,why:b(`Builds the index the assistant answers from. Block this and you cannot be cited at all.`,`ai-rank-suite`)},"on-demand":{label:b(`On demand`,`ai-rank-suite`),tone:`brand`,why:b(`Fetches your page because a user asked about it right now. Blocking this is blocking a visitor.`,`ai-rank-suite`)}}}));function ka(){let[e,t]=(0,Aa.useState)(null),[n,r]=(0,Aa.useState)(``),[i,a]=(0,Aa.useState)(null),[o,s]=(0,Aa.useState)(null),[c,l]=(0,Aa.useState)(null),[u,d]=(0,Aa.useState)(null),[f,p]=(0,Aa.useState)(!1),[m,h]=(0,Aa.useState)(null),[g,_]=(0,Aa.useState)(null),[v,y]=(0,Aa.useState)(null);if((0,Aa.useEffect)(()=>{D.get(`/bing`).then(t).catch(e=>_(e.message)),D.get(`/gsc/status`).then(y).catch(()=>y(null))},[]),(0,Aa.useEffect)(()=>{e?.has_key&&(D.get(`/bing/stats`).then(a).catch(e=>_(e.message)),D.get(`/bing/keywords`).then(s).catch(()=>{}),D.get(`/bing/quota`).then(l).catch(()=>{}))},[e?.has_key]),!e)return(0,ja.jsx)(Ce,{error:g});let C=(()=>{let e=String(v?.property||``);if(!e)return``;if(e.startsWith(`sc-domain:`))return e.slice(10);try{return new URL(e).host}catch{return e}})(),w=(()=>{try{return new URL(e.site).host}catch{return e.site}})(),T=C&&w&&(C===w||C===w.replace(/^www\./,``)||w===C.replace(/^www\./,``)),E=async e=>{p(!0),_(null),h(null);try{await e()}catch(e){_(e.message)}finally{p(!1)}};return(0,ja.jsxs)(`div`,{className:`ars-page`,children:[v&&(0,ja.jsxs)(k,{title:b(`Take it over from Google`,`ai-rank-suite`),subtitle:v.connected?b(`The same account owns both: Bing can import the site, its verification and its sitemaps from Search Console in one step.`,`ai-rank-suite`):b(`Connect Google first; Bing can then import the site from Search Console in one step.`,`ai-rank-suite`),action:v.connected?(0,ja.jsx)(`a`,{className:`ars-btn ars-btn-primary`,href:`https://www.bing.com/webmasters/import`,target:`_blank`,rel:`noreferrer noopener`,children:b(`Import from Search Console at Bing ↗`,`ai-rank-suite`)}):(0,ja.jsx)(A,{onClick:()=>{window.location.hash=`/search-console`},children:b(`Connect Google`,`ai-rank-suite`)}),children:[!v.connected&&(0,ja.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-3)`},children:b(`Once Google is connected, this card shows the Search Console property next to the site Bing expects and opens the import at Bing in one click.`,`ai-rank-suite`)}),v.connected&&(0,ja.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-2 text-[13px]`,children:[(0,ja.jsxs)(`div`,{children:[(0,ja.jsx)(`div`,{className:`t-caption`,children:b(`Google property`,`ai-rank-suite`)}),(0,ja.jsx)(`code`,{children:v.property})]}),(0,ja.jsxs)(`div`,{children:[(0,ja.jsx)(`div`,{className:`t-caption`,children:b(`Site Bing expects`,`ai-rank-suite`)}),(0,ja.jsx)(`code`,{children:e.site}),` `,T?(0,ja.jsx)(j,{tone:`good`,children:b(`same site`,`ai-rank-suite`)}):(0,ja.jsx)(j,{tone:`warning`,children:b(`different host`,`ai-rank-suite`)})]}),(0,ja.jsx)(`p`,{className:`m-0 sm:col-span-2`,style:{color:`var(--ars-ink-3)`,fontSize:12.5},children:b(`Sign in at Bing with the same Google account, choose this property, and Bing copies the verification. Then create an API key under Settings → API access and paste it below; from that moment clicks, index coverage and URL submission run here.`,`ai-rank-suite`)})]})]}),(0,ja.jsx)(k,{title:b(`Bing Webmaster Tools`,`ai-rank-suite`),subtitle:b(`The index Copilot retrieves from — and the one search plugin authors skip`,`ai-rank-suite`),action:e.has_key?(0,ja.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Key stored`,`ai-rank-suite`),` `,e.key_hint]}):(0,ja.jsx)(j,{tone:`neutral`,children:b(`Not connected`,`ai-rank-suite`)}),children:(0,ja.jsxs)(`div`,{className:`grid gap-4`,children:[(0,ja.jsxs)(ft,{title:b(`Why bother with Bing at all`,`ai-rank-suite`),open:!e.has_key,children:[(0,ja.jsx)(`p`,{children:b(`Treating Bing as the small second search engine was defensible until Copilot shipped. Microsoft’s assistant retrieves through the Bing index, and so do several products that licence it. A page Bing has not crawled cannot be cited by anything built on Bing, whatever Google thinks of it.`,`ai-rank-suite`)}),(0,ja.jsx)(`p`,{children:b(`The API also gives you something Google does not: direct URL submission with a published daily quota. No waiting for a crawl — you push the URL and it enters the index.`,`ai-rank-suite`)})]}),(0,ja.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,ja.jsxs)(`div`,{children:[(0,ja.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`API key`,`ai-rank-suite`)}),(0,ja.jsx)(`input`,{type:`password`,placeholder:e.has_key?S(b(`Stored (%s) — type to replace`,`ai-rank-suite`),e.key_hint):b(`From Bing Webmaster → Settings → API access`,`ai-rank-suite`),value:n,onChange:e=>r(e.target.value),autoComplete:`off`}),(0,ja.jsxs)(`p`,{className:`m-0 mt-1.5 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[b(`Encrypted on this site, never returned by the API.`,`ai-rank-suite`),` `,(0,ja.jsx)(`a`,{href:`https://www.bing.com/webmasters/settings`,target:`_blank`,rel:`noreferrer noopener`,children:b(`Get a key ↗`,`ai-rank-suite`)})]})]}),(0,ja.jsxs)(`div`,{children:[(0,ja.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Registered site`,`ai-rank-suite`)}),(0,ja.jsx)(`input`,{type:`text`,value:e.site,readOnly:!0}),(0,ja.jsx)(`p`,{className:`m-0 mt-1.5 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Bing matches on the exact spelling you registered, including http/https and www.`,`ai-rank-suite`)})]})]}),(0,ja.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,ja.jsx)(A,{onClick:()=>E(async()=>{t(await D.put(`/bing`,{api_key:n.trim()})),r(``),d(null)}),busy:f,children:b(`Save key`,`ai-rank-suite`)}),(0,ja.jsx)(A,{variant:`ghost`,onClick:()=>E(async()=>{let e=await D.post(`/bing/verify`,{});d(e),l(await D.get(`/bing/quota`).catch(()=>null))}),busy:f,disabled:!e.has_key,children:b(`Test connection`,`ai-rank-suite`)}),u?.ok&&u.registered&&(0,ja.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Connected and site registered`,`ai-rank-suite`)]}),u?.ok&&!u.registered&&(0,ja.jsx)(j,{tone:`warning`,children:b(`Key works, but this site is not in the account`,`ai-rank-suite`)})]}),u?.ok&&!u.registered&&(0,ja.jsxs)(M,{tone:`warning`,children:[b(`The key is valid but`,`ai-rank-suite`),` `,(0,ja.jsx)(`code`,{children:u.site}),` `,b(`is not one of the sites it can see`,`ai-rank-suite`),u.sites.length>0?S(b(`: it has %s`,`ai-rank-suite`),u.sites.join(`, `)):``,`. `,b(`Add and verify this exact URL in Bing Webmaster Tools — a trailing slash or a missing www counts as a different site.`,`ai-rank-suite`)]}),m&&(0,ja.jsx)(M,{tone:`good`,children:m}),g&&(0,ja.jsx)(M,{tone:`serious`,children:g})]})}),e.has_key&&i&&(0,ja.jsx)(k,{title:b(`Performance on Bing`,`ai-rank-suite`),subtitle:b(`Clicks, impressions and index coverage`,`ai-rank-suite`),action:(0,ja.jsx)(A,{variant:`ghost`,busy:f,onClick:()=>E(async()=>a(await D.get(`/bing/stats?refresh=1`))),children:b(`Refresh`,`ai-rank-suite`)}),children:(0,ja.jsxs)(`div`,{className:`grid gap-4`,children:[(0,ja.jsx)(Ee,{columns:4,metrics:[{id:`clicks`,label:b(`Clicks`,`ai-rank-suite`),hint:b(`Times somebody chose your result on Bing and arrived on the site.`,`ai-rank-suite`),value:i.clicks??`—`},{id:`impressions`,label:b(`Impressions`,`ai-rank-suite`),hint:b(`Times a page of yours appeared in Bing results.`,`ai-rank-suite`),value:i.impressions??`—`},{id:`ctr`,label:b(`CTR`,`ai-rank-suite`),hint:b(`Clicks as a share of impressions.`,`ai-rank-suite`),value:i.ctr??`—`,unit:i.ctr==null?``:`%`},{id:`indexed`,label:b(`Pages indexed`,`ai-rank-suite`),hint:b(`URLs Bing currently holds in its index — a page not here cannot be cited by anything built on Bing.`,`ai-rank-suite`),value:i.indexed??`—`}]}),i.rows.length>1?(0,ja.jsx)(Le,{data:i.rows.map(e=>({label:e.date,value:e.clicks})),height:140}):(0,ja.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Bing has not returned enough days yet to draw a trend.`,`ai-rank-suite`)})]})}),e.has_key&&(0,ja.jsx)(k,{title:b(`Push URLs into the index`,`ai-rank-suite`),subtitle:c?S(b(`%1$s submissions left today · %2$s this month`,`ai-rank-suite`),c.daily,c.monthly):b(`Direct submission — no waiting for a crawl`,`ai-rank-suite`),action:(0,ja.jsx)(A,{onClick:()=>E(async()=>{let e=await D.post(`/bing/submit-recent`,{limit:25});h(S(x(`%d URL submitted to Bing.`,`%d URLs submitted to Bing.`,e.submitted,`ai-rank-suite`),e.submitted)),l(await D.get(`/bing/quota`).catch(()=>null))}),busy:f,children:b(`Submit 25 newest pages`,`ai-rank-suite`)}),children:(0,ja.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`Worth doing after a migration, a bulk edit, or whenever you publish something you want answered on today. Submissions spend a published daily allowance, so this pushes your most recently modified pages rather than the whole site.`,`ai-rank-suite`)})}),e.has_key&&o&&o.rows.length>0&&(0,ja.jsx)(k,{title:b(`Queries Bing already shows you for`,`ai-rank-suite`),subtitle:b(`Ranked by impressions`,`ai-rank-suite`),children:(0,ja.jsx)(`div`,{className:`ars-table-wrap`,children:(0,ja.jsxs)(`table`,{className:`ars-table`,children:[(0,ja.jsx)(`thead`,{children:(0,ja.jsxs)(`tr`,{children:[(0,ja.jsx)(`th`,{children:b(`Query`,`ai-rank-suite`)}),(0,ja.jsx)(`th`,{style:{textAlign:`right`},children:b(`Clicks`,`ai-rank-suite`)}),(0,ja.jsx)(`th`,{style:{textAlign:`right`},children:b(`Impressions`,`ai-rank-suite`)}),(0,ja.jsx)(`th`,{style:{textAlign:`right`},children:b(`Position`,`ai-rank-suite`)})]})}),(0,ja.jsx)(`tbody`,{children:o.rows.slice(0,50).map(e=>(0,ja.jsxs)(`tr`,{children:[(0,ja.jsx)(`td`,{children:e.query}),(0,ja.jsx)(`td`,{style:{textAlign:`right`},children:e.clicks}),(0,ja.jsx)(`td`,{style:{textAlign:`right`},children:e.impressions}),(0,ja.jsx)(`td`,{style:{textAlign:`right`},children:e.position?e.position.toFixed(1):`—`})]},e.query))})]})})})]})}var Aa,ja,Ma=o((()=>{Aa=u(f(),1),C(),O(),dt(),mt(),ja=_e()}));function Na({value:e}){return e==null?(0,R.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`—`}):(0,R.jsx)(We,{value:e})}function Pa({tracked:e,onTrack:t}){let[n,r]=(0,Ia.useState)(null),[i,a]=(0,Ia.useState)({client_id:``,client_secret:``,developer_token:``,customer_id:``,login_customer_id:``,language_id:`1000`,geo_target_ids:`2784`}),[o,s]=(0,Ia.useState)(``),[c,l]=(0,Ia.useState)(``),[u,d]=(0,Ia.useState)([]),[f,p]=(0,Ia.useState)(!1),[m,h]=(0,Ia.useState)(null),[g,_]=(0,Ia.useState)(null),[v,y]=(0,Ia.useState)(null);if((0,Ia.useEffect)(()=>{D.get(`/rank/serp`).then(_).catch(()=>_(!1)),D.get(`/rank/planner/status`).then(e=>{r(e),a(t=>({...t,...e,client_secret:``,developer_token:``,geo_target_ids:(e.geo_target_ids||[]).join(`, `)}))}).catch(()=>r(!1))},[]),n===null||n===!1)return null;let x=e=>t=>a(n=>({...n,[e]:t.target.value})),C=async e=>{p(!0),h(null);try{await e()}catch(e){h(e.message)}finally{p(!1)}},w=e=>C(async()=>{let t=await D.post(`/rank/serp`,{limit:25,force:e});y(t),_(await D.get(`/rank/serp`))});return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(k,{title:b(`Live positions`,`ai-rank-suite`),subtitle:b(`Where this site stands today for the keywords you track, asked of a search engine rather than averaged out of Search Console.`,`ai-rank-suite`),children:g&&g.provider?(0,R.jsxs)(`div`,{className:`grid gap-2`,children:[(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,R.jsx)(A,{busy:f,onClick:()=>w(!1),children:b(`Check positions now`,`ai-rank-suite`)}),(0,R.jsx)(A,{variant:`ghost`,busy:f,onClick:()=>w(!0),children:b(`Check again today`,`ai-rank-suite`)}),(0,R.jsx)(`span`,{className:`t-caption`,children:S(b(`Asking %s — each check spends one lookup from your quota.`,`ai-rank-suite`),g.provider)})]}),v&&(0,R.jsxs)(`div`,{className:`t-caption`,children:[S(b(`%1$s checked, %2$s found in the results, %3$s already done today, %4$s failed.`,`ai-rank-suite`),Number(v.checked||0).toLocaleString(),Number(v.found||0).toLocaleString(),Number(v.skipped||0).toLocaleString(),Number(v.failed||0).toLocaleString()),(v.errors||[]).length>0&&(0,R.jsx)(`ul`,{className:`m-0 mt-1 pl-4`,children:v.errors.slice(0,5).map((e,t)=>(0,R.jsxs)(`li`,{children:[(0,R.jsx)(`code`,{children:e.keyword}),` — `,e.message]},t))})]})]}):(0,R.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`No SERP provider is set up yet. Add one under SEO data providers and this becomes a daily position check for every keyword you track — including the ones you do not rank for yet, which Search Console cannot show you at all.`,`ai-rank-suite`)})}),(0,R.jsxs)(k,{title:b(`Google Keyword Planner`,`ai-rank-suite`),subtitle:b(`Live search-volume ideas from your own Google Ads account; suggestions are never saved until you choose Track`,`ai-rank-suite`),children:[m&&(0,R.jsx)(M,{tone:`serious`,children:m}),n.configured?n.connected?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-2`,children:[(0,R.jsx)(Qe,{label:b(`Seed keywords`,`ai-rank-suite`),hint:b(`Up to 20, one per line or comma-separated`,`ai-rank-suite`),children:(0,R.jsx)(`textarea`,{rows:3,value:o,onChange:e=>s(e.target.value)})}),(0,R.jsx)(Qe,{label:b(`Page URL`,`ai-rank-suite`),hint:b(`Optional; must be on this site`,`ai-rank-suite`),children:(0,R.jsx)(`input`,{type:`url`,value:c,onChange:e=>l(e.target.value),placeholder:window.location.origin+`/page/`})})]}),(0,R.jsxs)(`div`,{className:`flex gap-2 mt-3 flex-wrap`,children:[(0,R.jsx)(A,{busy:f,disabled:!o.trim()&&!c.trim(),onClick:()=>C(async()=>{let e=await D.post(`/rank/planner/ideas`,{keywords:o.split(/[\n,]+/).map(e=>e.trim()).filter(Boolean).slice(0,20),page_url:c,page_size:100});d(e.ideas||[])}),children:b(`Find keyword ideas`,`ai-rank-suite`)}),(0,R.jsx)(A,{variant:`ghost`,onClick:()=>C(async()=>r(await D.post(`/rank/planner/disconnect`))),children:b(`Disconnect`,`ai-rank-suite`)})]}),u.length>0&&(0,R.jsx)(`div`,{className:`ars-table-wrap mt-4`,style:{maxHeight:480},children:(0,R.jsx)(`div`,{className:`ars-table-wrap`,children:(0,R.jsxs)(`table`,{className:`ars-table`,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{children:b(`Keyword`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{className:`is-num`,children:b(`Monthly searches`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{children:b(`Competition`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{className:`is-num`,children:b(`Top bid range`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{})]})}),(0,R.jsx)(`tbody`,{children:u.map(n=>(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`td`,{className:`font-medium`,children:n.keyword}),(0,R.jsx)(`td`,{className:`is-num`,children:n.avg_monthly.toLocaleString()}),(0,R.jsx)(`td`,{children:n.competition.replaceAll(`_`,` `)}),(0,R.jsxs)(`td`,{className:`is-num`,children:[(n.low_bid_micros/1e6).toFixed(2),`–`,(n.high_bid_micros/1e6).toFixed(2)]}),(0,R.jsx)(`td`,{children:(0,R.jsx)(A,{variant:`ghost`,disabled:e.includes(n.keyword),onClick:()=>t(n.keyword),children:e.includes(n.keyword)?`Tracked`:`Track`})})]},n.keyword))})]})})})]}):(0,R.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[(0,R.jsx)(j,{tone:`warning`,children:b(`Not connected`,`ai-rank-suite`)}),(0,R.jsx)(A,{busy:f,onClick:()=>C(async()=>{let e=await D.get(`/rank/planner/connect-url`);window.location.assign(e.url)}),children:b(`Connect Google Ads`,`ai-rank-suite`)}),(0,R.jsx)(A,{variant:`ghost`,onClick:()=>r({...n,configured:!1}),children:b(`Edit settings`,`ai-rank-suite`)})]}):(0,R.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-2`,children:[(0,R.jsx)(Qe,{label:b(`OAuth client ID`,`ai-rank-suite`),children:(0,R.jsx)(`input`,{value:i.client_id,onChange:x(`client_id`)})}),(0,R.jsx)(Qe,{label:b(`OAuth client secret`,`ai-rank-suite`),hint:n.has_client_secret?`Saved — leave blank to keep it`:``,children:(0,R.jsx)(`input`,{type:`password`,value:i.client_secret,onChange:x(`client_secret`)})}),(0,R.jsx)(Qe,{label:b(`Developer token`,`ai-rank-suite`),hint:n.has_developer_token?`Saved — leave blank to keep it`:`From Google Ads API Center`,children:(0,R.jsx)(`input`,{type:`password`,value:i.developer_token,onChange:x(`developer_token`)})}),(0,R.jsx)(Qe,{label:b(`Customer ID`,`ai-rank-suite`),hint:b(`Digits only; hyphens are accepted`,`ai-rank-suite`),children:(0,R.jsx)(`input`,{value:i.customer_id,onChange:x(`customer_id`)})}),(0,R.jsx)(Qe,{label:b(`Manager customer ID`,`ai-rank-suite`),hint:b(`Optional MCC login customer`,`ai-rank-suite`),children:(0,R.jsx)(`input`,{value:i.login_customer_id,onChange:x(`login_customer_id`)})}),(0,R.jsx)(Qe,{label:b(`Language constant ID`,`ai-rank-suite`),children:(0,R.jsx)(`input`,{value:i.language_id,onChange:x(`language_id`)})}),(0,R.jsx)(Qe,{label:b(`Geo target IDs`,`ai-rank-suite`),hint:b(`Comma-separated; 2784 is UAE`,`ai-rank-suite`),children:(0,R.jsx)(`input`,{value:i.geo_target_ids,onChange:x(`geo_target_ids`)})}),(0,R.jsx)(`div`,{className:`flex items-end`,children:(0,R.jsx)(A,{busy:f,onClick:()=>C(async()=>r(await D.put(`/rank/planner/settings`,i))),children:b(`Save Google Ads settings`,`ai-rank-suite`)})}),(0,R.jsxs)(`p`,{className:`m-0 md:col-span-2 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[b(`OAuth redirect URI:`,`ai-rank-suite`),(0,R.jsx)(`code`,{children:n.redirect_uri})]})]})]})]})}function Fa(){let[e,t]=(0,Ia.useState)(null),[n,r]=(0,Ia.useState)(``),[i,a]=(0,Ia.useState)(!1),[o,s]=(0,Ia.useState)(null),[c,l]=(0,Ia.useState)(null),[u,d]=(0,Ia.useState)(null),[f,p]=(0,Ia.useState)(null),m=new URLSearchParams(window.location.hash.split(`?`)[1]||``);(0,Ia.useEffect)(()=>{D.get(`/rank/keywords`).then(t).catch(e=>s(e.message)),D.get(`/rank/trend?days=90`).then(e=>p(e.days||[])).catch(()=>p([]))},[]),(0,Ia.useEffect)(()=>{c&&(d(null),D.get(`/rank/history/${c.id}?days=90`).then(e=>d(e.history)).catch(()=>d([])))},[c]);let h=async e=>{a(!0),s(null);try{t(await e())}catch(e){s(e.message)}finally{a(!1)}};if(!e)return(0,R.jsx)(Ce,{error:o});let g=e.keywords.length,_=e.keywords.filter(e=>e.position!==null),v=_.filter(e=>e.position<=10).length,y=_.length?(_.reduce((e,t)=>e+t.position,0)/_.length).toFixed(1):`—`;return(0,R.jsxs)(`div`,{className:`ars-page`,children:[m.get(`ads_connected`)&&(0,R.jsx)(M,{tone:`good`,children:b(`Google Ads is connected. Keyword Planner is ready.`,`ai-rank-suite`)}),m.get(`ads_error`)&&(0,R.jsx)(M,{tone:`serious`,children:m.get(`ads_error`)}),o&&(0,R.jsx)(M,{tone:`serious`,children:o}),!e.connected&&(0,R.jsx)(M,{children:b(`This tracks your average position from your own Google Search Console data — not independent SERP rankings. Connect a property under “Search Console” to start collecting positions.`,`ai-rank-suite`)}),(0,R.jsx)(Pa,{tracked:(e.keywords||[]).map(e=>e.keyword),onTrack:e=>h(()=>D.post(`/rank/keywords`,{keyword:e}))}),(0,R.jsx)(Ee,{columns:4,metrics:[{id:`tracked`,label:b(`Tracked keywords`,`ai-rank-suite`),hint:b(`Everything a snapshot is stored for daily — added by hand or imported from your top queries.`,`ai-rank-suite`),value:g},{id:`ranked`,label:b(`With position data`,`ai-rank-suite`),hint:b(`Keywords Google has reported a position for. The rest are waiting on their first snapshot.`,`ai-rank-suite`),value:_.length},{id:`top10`,label:b(`In top 10`,`ai-rank-suite`),hint:b(`Ranking on page one — the only page most people ever see.`,`ai-rank-suite`),value:v},{id:`avg`,label:b(`Avg. position`,`ai-rank-suite`),hint:b(`Averaged across every keyword with a position. Lower is better.`,`ai-rank-suite`),value:y}]}),f&&f.length>1&&(0,R.jsxs)(k,{title:b(`Average position over time`,`ai-rank-suite`),subtitle:b(`Across every tracked keyword that had a position that day — lower is better`,`ai-rank-suite`),action:(0,R.jsx)(We,{value:Number((f[0].value-f[f.length-1].value).toFixed(1)),suffix:` ${b(`since the first snapshot`,`ai-rank-suite`)}`}),children:[(0,R.jsx)(Le,{data:f,label:b(`Average position`,`ai-rank-suite`),color:`var(--ars-series-1)`,height:150,invert:!0,formatValue:e=>`#${e}`}),(0,R.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-3 mt-3`,children:[[`top3`,b(`In the top 3`,`ai-rank-suite`)],[`top10`,b(`On page one`,`ai-rank-suite`)],[`clicks`,b(`Clicks that day`,`ai-rank-suite`)]].map(([e,t])=>{let n=f[f.length-1]?.[e]??0,r=f[0]?.[e]??0;return(0,R.jsxs)(`div`,{className:`ars-r-md px-3 py-2.5`,style:{background:`var(--ars-surface-2)`},children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,R.jsx)(`span`,{className:`text-[12px] font-semibold`,style:{color:`var(--ars-ink-2)`},children:t}),(0,R.jsx)(We,{value:n-r})]}),(0,R.jsx)(`div`,{className:`t-num text-[18px] font-bold mt-0.5`,children:n.toLocaleString()})]},e)})})]}),(e.distribution||[]).filter(e=>e.top3+e.mid+e.low>0).length>=2&&(0,R.jsx)(k,{title:b(`Position distribution`,`ai-rank-suite`),subtitle:b(`Every tracked keyword with a position, per daily snapshot — Top 3, page one, and pages two to five`,`ai-rank-suite`),children:(0,R.jsx)(Ze,{stacked:!0,height:130,data:e.distribution.map(e=>({label:e.d.slice(5),top3:e.top3,mid:e.mid,low:e.low})),series:[{key:`top3`,label:b(`Top 3`,`ai-rank-suite`),color:`var(--ars-c-green-ink)`},{key:`mid`,label:`4–10`,color:`var(--ars-brand)`},{key:`low`,label:`11–50`,color:`var(--ars-accent)`}]})}),(0,R.jsxs)(k,{title:b(`Keywords`,`ai-rank-suite`),subtitle:b(`A snapshot is stored daily; the top 25 queries are picked up automatically`,`ai-rank-suite`),action:(0,R.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,R.jsxs)(A,{variant:`ghost`,busy:i,onClick:()=>h(()=>D.post(`/rank/sync`)),disabled:!e.connected,children:[(0,R.jsx)(Tt,{size:13}),b(`Sync now`,`ai-rank-suite`)]})}),children:[(0,R.jsxs)(`form`,{className:`flex gap-2 mb-4`,onSubmit:e=>{e.preventDefault(),n.trim()&&h(async()=>{let e=await D.post(`/rank/keywords`,{keyword:n});return r(``),e})},children:[(0,R.jsx)(`input`,{type:`text`,placeholder:b(`Add a keyword to track…`,`ai-rank-suite`),value:n,onChange:e=>r(e.target.value)}),(0,R.jsx)(A,{type:`submit`,busy:i,disabled:!n.trim(),children:b(`Track`,`ai-rank-suite`)})]}),(0,R.jsx)(`div`,{className:`mb-4`,children:(0,R.jsx)(Wr,{taken:(e.keywords||[]).map(e=>e.keyword),onPick:e=>h(()=>D.post(`/rank/keywords`,{keyword:e}))})}),g===0?(0,R.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`No keywords yet. Add one above, or hit “Sync now” to import your top queries from Search Console.`,`ai-rank-suite`)}):(0,R.jsx)(`div`,{className:`ars-table-wrap`,children:(0,R.jsx)(`div`,{className:`ars-table-wrap`,children:(0,R.jsxs)(`table`,{className:`ars-table`,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{children:b(`Keyword`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{className:`is-num`,children:b(`Position`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{className:`is-num`,children:b(`7-day change`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{className:`is-mid`,style:{width:110},children:b(`30 days`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{className:`is-num`,children:b(`Clicks`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{className:`is-num`,children:b(`Impressions`,`ai-rank-suite`)}),(0,R.jsx)(`th`,{})]})}),(0,R.jsx)(`tbody`,{children:e.keywords.map(e=>(0,R.jsxs)(`tr`,{onClick:()=>l(e),style:{cursor:`pointer`},children:[(0,R.jsxs)(`td`,{className:`font-medium`,children:[e.keyword,e.source===`auto`&&(0,R.jsx)(`span`,{className:`ml-2`,children:(0,R.jsx)(j,{tone:`neutral`,children:`auto`})})]}),(0,R.jsx)(`td`,{className:`is-num`,children:(0,R.jsx)(Re,{value:e.position})}),(0,R.jsx)(`td`,{className:`is-num`,children:(0,R.jsx)(Na,{value:e.change})}),(0,R.jsx)(`td`,{className:`is-mid`,children:(e.history||[]).length>=3?(0,R.jsx)(`span`,{style:{display:`inline-block`,width:96,color:`var(--ars-brand)`},children:(0,R.jsx)(Ue,{data:e.history.map(e=>-e.position),height:22})}):(0,R.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`—`})}),(0,R.jsx)(`td`,{className:`is-num`,children:e.clicks}),(0,R.jsx)(`td`,{className:`is-num`,children:e.impressions}),(0,R.jsx)(`td`,{className:`is-num`,children:(0,R.jsx)(`button`,{type:`button`,"aria-label":b(`Stop tracking`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer`,style:{color:`var(--ars-ink-3)`},onClick:t=>{t.stopPropagation(),h(()=>D.del(`/rank/keywords/${e.id}`))},children:(0,R.jsx)(Rt,{size:14})})})]},e.id))})]})})}),e.synced_at>0&&(0,R.jsxs)(`p`,{className:`m-0 mt-3 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[`Last sync: `,new Date(e.synced_at*1e3).toLocaleString()]})]}),c&&(0,R.jsx)(k,{title:S(b(`Position history — %s`,`ai-rank-suite`),c.keyword),subtitle:b(`The axis is flipped: a rising line means you are climbing towards position 1`,`ai-rank-suite`),action:(0,R.jsx)(A,{variant:`ghost`,onClick:()=>l(null),children:b(`Close`,`ai-rank-suite`)}),children:u===null?(0,R.jsx)(`p`,{className:`m-0`,children:b(`Loading…`,`ai-rank-suite`)}):u.length<2?(0,R.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Not enough snapshots yet — history builds up one day at a time.`,`ai-rank-suite`)}):(0,R.jsx)(Le,{label:b(`Google position`,`ai-rank-suite`),color:`var(--ars-series-1)`,invert:!0,data:u.map(e=>({date:e.date,value:e.position})),formatValue:e=>`#${Number(e).toFixed(1)}`})}),(0,R.jsx)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[{title:b(`Gaining positions`,`ai-rank-suite`),rows:e.movers.winners,up:!0},{title:b(`Losing positions`,`ai-rank-suite`),rows:e.movers.losers,up:!1}].map(e=>(0,R.jsx)(k,{title:e.title,children:e.rows.length===0?(0,R.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Nothing to report yet.`,`ai-rank-suite`)}):(0,R.jsx)(`div`,{className:`ars-table-wrap`,children:(0,R.jsx)(`table`,{className:`ars-table`,children:(0,R.jsx)(`tbody`,{children:e.rows.map(e=>(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`td`,{className:`font-medium`,children:e.keyword}),(0,R.jsxs)(`td`,{className:`is-num`,style:{color:`var(--ars-ink-3)`},children:[`#`,e.position?.toFixed(1)]}),(0,R.jsx)(`td`,{className:`is-num`,children:(0,R.jsx)(Na,{value:e.change})})]},e.id))})})})},e.title))})]})}var Ia,R,La=o((()=>{Ia=u(f(),1),C(),O(),qr(),dt(),Vt(),R=_e()})),Ra=c({default:()=>Ha});function za({status:e,onStatus:t}){let[n,r]=(0,qa.useState)(``),[i,a]=(0,qa.useState)(``),[o,s]=(0,qa.useState)(!1),[c,l]=(0,qa.useState)(null),u=async()=>{s(!0),l(null);try{t(await D.put(`/gsc/credentials`,{client_id:n,client_secret:i}))}catch(e){l(e.message)}finally{s(!1)}},d=async()=>{s(!0),l(null);try{let{url:e}=await D.get(`/gsc/connect-url`);window.location.href=e}catch(e){l(e.message),s(!1)}},[f,p]=(0,qa.useState)(!e.signin_available);return(0,z.jsxs)(k,{title:b(`Connect Google`,`ai-rank-suite`),subtitle:e.signin_available?b(`One sign-in connects Search Console and Analytics — read-only, revocable any time in your Google account`,`ai-rank-suite`):b(`Your data, your Google Cloud project — no third-party proxy`,`ai-rank-suite`),children:[e.signin_available&&(0,z.jsxs)(`div`,{className:`ars-signin`,children:[(0,z.jsxs)(`button`,{type:`button`,className:`ars-google-btn`,onClick:async()=>{s(!0),l(null);try{let{url:e}=await D.get(`/gsc/signin-url`);window.location.href=e}catch(e){l(e.message),s(!1)}},disabled:o,children:[(0,z.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 48 48`,"aria-hidden":!0,children:[(0,z.jsx)(`path`,{fill:`#EA4335`,d:`M24 9.5c3.5 0 6.6 1.2 9.1 3.6l6.8-6.8C35.8 2.5 30.3 0 24 0 14.6 0 6.5 5.4 2.6 13.3l7.9 6.1C12.4 13.6 17.7 9.5 24 9.5z`}),(0,z.jsx)(`path`,{fill:`#4285F4`,d:`M46.5 24.5c0-1.6-.1-3.1-.4-4.5H24v9h12.7c-.6 3-2.3 5.5-4.8 7.2l7.5 5.8c4.4-4 7.1-10 7.1-17.5z`}),(0,z.jsx)(`path`,{fill:`#FBBC05`,d:`M10.5 28.6A14.5 14.5 0 0 1 9.7 24c0-1.6.3-3.1.8-4.6l-7.9-6.1A24 24 0 0 0 0 24c0 3.9.9 7.5 2.6 10.7l7.9-6.1z`}),(0,z.jsx)(`path`,{fill:`#34A853`,d:`M24 48c6.5 0 11.9-2.1 15.9-5.8l-7.5-5.8c-2.1 1.4-4.9 2.3-8.4 2.3-6.3 0-11.6-4.1-13.5-9.9l-7.9 6.1C6.5 42.6 14.6 48 24 48z`})]}),b(o?`Opening Google…`:`Sign in with Google`,`ai-rank-suite`)]}),(0,z.jsxs)(`p`,{className:`m-0 t-caption`,children:[b(`Google asks you to allow read access to Search Console and Analytics; nothing is written to your account. Tokens are stored encrypted on this site. Prefer your own Cloud project?`,`ai-rank-suite`),` `,(0,z.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>p(e=>!e),children:b(f?`Hide the manual setup`:`Use your own credentials instead`,`ai-rank-suite`)})]}),c&&(0,z.jsx)(`p`,{className:`m-0`,style:{color:`var(--ars-serious)`},children:c})]}),f&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`ol`,{className:`m-0 pl-5 grid gap-3 text-[13px]`,children:[(0,z.jsxs)(`li`,{children:[b(`Open`,`ai-rank-suite`),` `,(0,z.jsx)(`a`,{href:`https://console.cloud.google.com/apis/credentials`,target:`_blank`,rel:`noreferrer`,children:b(`Google Cloud Console → Credentials`,`ai-rank-suite`)}),` `,b(`and create an`,`ai-rank-suite`),` `,(0,z.jsx)(`strong`,{children:b(`OAuth client ID`,`ai-rank-suite`)}),` `,b(`(type: Web application).`,`ai-rank-suite`)]}),(0,z.jsxs)(`li`,{children:[b(`Enable the`,`ai-rank-suite`),` `,(0,z.jsx)(`strong`,{children:b(`Search Console API`,`ai-rank-suite`)}),` `,b(`for the project (APIs & Services → Library).`,`ai-rank-suite`)]}),(0,z.jsxs)(`li`,{children:[b(`Add this exact redirect URI:`,`ai-rank-suite`),(0,z.jsx)(`code`,{className:`ars-mono block mt-1 px-3 py-2 ars-r-md select-all`,style:{background:`var(--ars-surface-2)`},children:e.redirect_uri})]}),(0,z.jsx)(`li`,{children:b(`Paste the client credentials here:`,`ai-rank-suite`)})]}),(0,z.jsxs)(`div`,{className:`grid gap-3 mt-3 max-w-[520px]`,children:[(0,z.jsx)(`input`,{type:`text`,placeholder:b(`Client ID (…apps.googleusercontent.com)`,`ai-rank-suite`),value:n,onChange:e=>r(e.target.value)}),(0,z.jsx)(`input`,{type:`password`,placeholder:b(`Client secret`,`ai-rank-suite`),value:i,onChange:e=>a(e.target.value)}),(0,z.jsxs)(`div`,{className:`flex gap-2 items-center flex-wrap`,children:[(0,z.jsx)(A,{variant:`ghost`,onClick:u,busy:o,disabled:!n||!i,children:b(`Save credentials`,`ai-rank-suite`)}),(0,z.jsx)(A,{onClick:d,busy:o,disabled:!e.has_credentials,children:b(`Connect with Google →`,`ai-rank-suite`)}),e.has_credentials&&(0,z.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Credentials stored`,`ai-rank-suite`)]})]}),!e.has_credentials&&(0,z.jsx)(`p`,{className:`m-0 t-caption`,children:b(!n||!i?`Paste both the client ID and the secret above to save them — connecting needs stored credentials.`:`Save the credentials first; the Google consent screen is opened with them.`,`ai-rank-suite`)}),c&&(0,z.jsx)(`p`,{className:`m-0`,style:{color:`var(--ars-serious)`},children:c})]})]})]})}function Ba({status:e,onStatus:t}){let[n,r]=(0,qa.useState)(null),[i,a]=(0,qa.useState)(null);return(0,qa.useEffect)(()=>{D.get(`/gsc/sites`).then(e=>r(e.sites)).catch(e=>a(e.message))},[]),(0,z.jsxs)(k,{title:b(`Choose your property`,`ai-rank-suite`),subtitle:b(`Verified Search Console properties of the connected Google account`,`ai-rank-suite`),children:[i&&(0,z.jsx)(M,{tone:`serious`,children:i}),!n&&!i&&(0,z.jsx)(`p`,{style:{color:`var(--ars-ink-2)`},children:b(`Loading properties…`,`ai-rank-suite`)}),n&&(0,z.jsxs)(`div`,{className:`grid gap-2 max-w-[520px]`,children:[n.length===0&&(0,z.jsx)(`p`,{className:`m-0`,children:b(`No verified properties found for this account.`,`ai-rank-suite`)}),n.map(e=>(0,z.jsx)(A,{variant:`ghost`,onClick:()=>D.put(`/gsc/property`,{site:e}).then(t),children:e},e))]})]})}function Va({status:e,onStatus:t}){let[n,r]=(0,qa.useState)(`clicks`),[i,a]=(0,qa.useState)(28),[o,s]=(0,qa.useState)(null),[c,l]=(0,qa.useState)(null);(0,qa.useEffect)(()=>{s(null),D.get(`/gsc/performance?days=${i}`).then(s).catch(e=>l(e.message))},[i]);let u=e=>e>=1e4?`${(e/1e3).toFixed(1)}k`:String(e);return(0,z.jsxs)(`div`,{className:`ars-page`,children:[(0,z.jsx)(`div`,{className:`flex items-center justify-end gap-3 flex-wrap`,children:(0,z.jsx)(Ie,{tabs:[{id:7,label:b(`7 days`,`ai-rank-suite`)},{id:28,label:b(`28 days`,`ai-rank-suite`)},{id:90,label:b(`90 days`,`ai-rank-suite`)}],active:i,onChange:a})}),c&&(0,z.jsx)(M,{tone:`serious`,children:c}),!o&&!c&&(0,z.jsx)(k,{children:(0,z.jsx)(`p`,{className:`m-0`,style:{color:`var(--ars-ink-2)`},children:b(`Fetching Search Console data…`,`ai-rank-suite`)})}),o&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ee,{columns:3,active:n,onSelect:r,metrics:[{id:`clicks`,label:b(`Clicks`,`ai-rank-suite`),hint:b(`Times somebody chose your result and arrived on the site.`,`ai-rank-suite`),value:u(o.totals.clicks),delta:Ua(o.totals.clicks,o.previous?.clicks),accent:`var(--ars-series-1)`},{id:`impressions`,label:b(`Impressions`,`ai-rank-suite`),hint:b(`Times a page of yours appeared in a result list at all.`,`ai-rank-suite`),value:u(o.totals.impressions),delta:Ua(o.totals.impressions,o.previous?.impressions),accent:`var(--ars-series-2)`},{id:`ctr`,label:b(`CTR`,`ai-rank-suite`),hint:b(`Clicks as a share of impressions. A high position with a low CTR is usually a weak title or description.`,`ai-rank-suite`),value:`${o.totals.ctr}`,unit:`%`,delta:Ua(o.totals.ctr,o.previous?.ctr),accent:`var(--ars-c-green-ink)`},{id:`position`,label:b(`Average position`,`ai-rank-suite`),hint:b(`Lower is better. Averaged across every query you appear for, so a flood of new page-nine queries can push it down while nothing got worse.`,`ai-rank-suite`),value:o.totals.position,delta:Ua(o.totals.position,o.previous?.position),invert:!0,accent:`var(--ars-accent)`},{id:`queries`,label:b(`Queries`,`ai-rank-suite`),hint:b(`Distinct searches you appeared for in this period. Growth here is reach, whether or not it has turned into clicks yet.`,`ai-rank-suite`),value:u(o.queries?.length||0),sub:b(`in the top set`,`ai-rank-suite`)},{id:`topten`,label:b(`On page one`,`ai-rank-suite`),hint:b(`Queries where your average position is 10 or better — the only ones most people ever see.`,`ai-rank-suite`),value:u((o.queries||[]).filter(e=>Number(e.position)<=10).length),sub:b(`position 10 or better`,`ai-rank-suite`)}]}),(0,z.jsx)(k,{flush:!0,children:(0,z.jsx)(`div`,{className:`px-1.5 pt-3 pb-2`,children:(0,z.jsx)(Le,{label:Ja[n]?.label||b(`Clicks`,`ai-rank-suite`),color:Ja[n]?.color||`var(--ars-series-1)`,data:o.series.map(e=>({date:e.date,value:e[Ja[n]?.key||`clicks`]})),height:220,invert:n===`position`,formatValue:n===`ctr`?e=>`${e}%`:void 0,bleed:!0})})}),(0,z.jsx)(Wa,{data:o,fmt:u})]})]})}function Ha({tab:e=`performance`,onTab:t}){let[n,r]=(0,qa.useState)(null),[i,a]=(0,qa.useState)(null),o=new URLSearchParams(window.location.hash.split(`?`)[1]||``);if((0,qa.useEffect)(()=>{D.get(`/gsc/status`).then(r).catch(e=>a(e.message))},[]),!n)return(0,z.jsx)(Ce,{error:i});let s=!n.connected&&n.signin_available&&!n.has_credentials?{tone:`neutral`,text:b(`Search Console and Analytics are not connected yet.`,`ai-rank-suite`),why:b(`One sign-in with Google connects both — read-only, revocable in your Google account at any time. Rank snapshots cannot be backfilled; the trend starts the day you connect.`,`ai-rank-suite`)}:!n.has_credentials&&!n.connected?{tone:`neutral`,text:b(`Search Console is not set up — no Google credentials yet.`,`ai-rank-suite`),why:b(`Clicks, impressions and positions come from your own Search Console property. It takes a client id and secret from Google Cloud once; after that the connection renews itself.`,`ai-rank-suite`)}:n.connected?{tone:`good`,text:S(b(`Connected to %s.`,`ai-rank-suite`),n.property||b(`your Search Console property`,`ai-rank-suite`)),why:b(`Reports below are read live from Google. Positions are recorded daily so the rank trend can exist later.`,`ai-rank-suite`)}:{tone:`warning`,text:b(`Credentials are saved but Google has not been authorised yet.`,`ai-rank-suite`),why:b(`One click on Connect opens Google, you pick the account, and the data starts flowing. Rank snapshots cannot be backfilled — the trend starts the day you connect.`,`ai-rank-suite`)};return(0,z.jsxs)(`div`,{className:`ars-page`,children:[o.get(`error`)&&(0,z.jsx)(M,{tone:`serious`,children:decodeURIComponent(o.get(`error`))}),(0,z.jsx)(ya,{...s}),(()=>{let{tabs:n,active:r}=mp([{id:`performance`,label:b(`Google`,`ai-rank-suite`)},{id:`keywords`,label:b(`Keywords`,`ai-rank-suite`),needs:`rank_tracker`},{id:`bing`,label:b(`Bing`,`ai-rank-suite`)}],e);return r!==e&&setTimeout(()=>t(r),0),(0,z.jsx)(Ie,{tabs:n,active:r,onChange:t})})(),e===`bing`?(0,z.jsx)(ka,{}):e===`keywords`?(0,z.jsx)(Fa,{}):(0,z.jsxs)(z.Fragment,{children:[!n.connected&&(0,z.jsx)(za,{status:n,onStatus:r}),n.connected&&!n.property&&(0,z.jsx)(Ba,{status:n,onStatus:r}),n.connected&&n.property&&(0,z.jsx)(Va,{status:n,onStatus:r}),n.connected&&n.property&&(0,z.jsx)(Oe,{title:b(`Search Console connection`,`ai-rank-suite`),note:n.property,children:(0,z.jsxs)(`div`,{className:`grid gap-3`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,z.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Connected`,`ai-rank-suite`)]}),(0,z.jsx)(`span`,{className:`text-[12.5px] ars-mono`,style:{color:`var(--ars-ink-2)`},children:n.property})]}),(0,z.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Disconnecting stops the daily snapshots. The history already recorded stays — it cannot be rebuilt from Google, so nothing here deletes it.`,`ai-rank-suite`)}),(0,z.jsx)(`div`,{children:(0,z.jsx)(A,{variant:`danger`,onClick:()=>D.post(`/gsc/disconnect`).then(r),children:b(`Disconnect`,`ai-rank-suite`)})})]})})]})]})}function Ua(e,t){return!t||t===0?null:Math.round((e-t)/t*1e3)/10}function Wa({data:e,fmt:t}){let[n,r]=(0,qa.useState)(`questions`),i=e.questions||{totals:{},rows:[]};return(0,z.jsxs)(`div`,{className:`grid gap-3`,children:[(0,z.jsx)(qe,{label:b(`Look at`,`ai-rank-suite`),value:n,onChange:r,options:[{id:`questions`,label:b(`Questions`,`ai-rank-suite`),count:i.rows?.length||0},{id:`striking`,label:b(`Nearly page one`,`ai-rank-suite`),count:e.striking?.length||0},{id:`ignored`,label:b(`Shown, not clicked`,`ai-rank-suite`),count:e.ignored?.length||0},{id:`movement`,label:b(`Gained & lost`,`ai-rank-suite`)},{id:`all`,label:b(`Everything`,`ai-rank-suite`)}]}),n===`questions`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(k,{title:b(`Question queries`,`ai-rank-suite`),subtitle:b(`The queries AI answers consume first — high impressions, and a click-through that falls as the answer moves above the result`,`ai-rank-suite`),children:[(0,z.jsx)(Ee,{columns:3,metrics:[{id:`share`,label:b(`Share of impressions`,`ai-rank-suite`),hint:b(`How much of everything you are shown for is question-shaped.`,`ai-rank-suite`),value:Number.isFinite(Number(i.share))?i.share:`—`,unit:Number.isFinite(Number(i.share))?`%`:``},{id:`question-ctr`,label:b(`Click-through on questions`,`ai-rank-suite`),hint:b(`Clicks as a share of impressions, on the question queries alone.`,`ai-rank-suite`),value:i.totals?.question?.ctr??`—`,unit:i.totals?.question?.ctr==null?``:`%`,sub:S(b(`against %s%% on everything else`,`ai-rank-suite`),i.totals?.other?.ctr??0)},{id:`question-position`,label:b(`Average position`,`ai-rank-suite`),hint:b(`Averaged across the question queries. Lower is better.`,`ai-rank-suite`),value:i.totals?.question?.position??`—`,sub:S(b(`%s distinct questions`,`ai-rank-suite`),(i.totals?.question?.n??0).toLocaleString())}]}),i.totals?.question?.ctr>0&&i.totals?.other?.ctr>0&&(0,z.jsx)(`div`,{className:`mt-3`,children:(0,z.jsx)(Ye,{segments:[{label:b(`Question queries`,`ai-rank-suite`),value:i.totals.question.impressions,color:`var(--ars-brand)`},{label:b(`Everything else`,`ai-rank-suite`),value:i.totals.other.impressions,color:`var(--ars-surface-3)`}]})})]}),(0,z.jsx)(Ga,{title:b(`Every question you rank for`,`ai-rank-suite`),rows:i.rows,keyLabel:b(`Question`,`ai-rank-suite`),fmt:t}),(0,z.jsxs)(ft,{title:b(`Why this segment is worth watching on its own`,`ai-rank-suite`),children:[(0,z.jsx)(`p`,{children:b(`A question query is the shape an AI answer eats. When an overview or an assistant answers it above your result, the impression still counts and the click does not — so the signature of AI cannibalisation is this segment's click-through falling while its impressions hold or rise. Comparing it against your non-question queries is the closest thing to measuring that from inside Search Console, which does not report it directly.`,`ai-rank-suite`)}),(0,z.jsx)(`p`,{children:b(`If it is happening, the response is not to fight for the click. It is to be the source the answer quotes: an answer-first opening, question-shaped sub-headings, and FAQ markup. All three are on the page editor's Full report tab.`,`ai-rank-suite`)})]})]}),n===`striking`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(k,{title:b(`Nearly page one`,`ai-rank-suite`),subtitle:b(`Positions 4–15, ordered by what three places of improvement would actually be worth`,`ai-rank-suite`),flush:!0,children:(0,z.jsx)(`div`,{className:`ars-table-wrap`,children:(0,z.jsxs)(`table`,{className:`ars-table`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{children:b(`Query`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Position`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Impr.`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Clicks`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Upside`,`ai-rank-suite`)})]})}),(0,z.jsx)(`tbody`,{children:(e.striking||[]).map(e=>(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`td`,{className:`font-medium`,children:e.key}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.position}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:t(e.impressions)}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.clicks}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:(0,z.jsxs)(`b`,{style:{color:`var(--ars-brand)`},children:[`+`,e.upside]})})]},e.key))})]})})}),(0,z.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Upside is roughly the clicks three positions of improvement would add, from published click-through curves — not a measurement of your site. It is here to rank these against each other, not as a forecast.`,`ai-rank-suite`)})]}),n===`ignored`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(k,{title:b(`Shown and not clicked`,`ai-rank-suite`),subtitle:b(`Ranking well with a click-through far below what that position normally earns — the ranking is fine and the snippet is wrong`,`ai-rank-suite`),flush:!0,children:(0,z.jsx)(`div`,{className:`ars-table-wrap`,children:(0,z.jsxs)(`table`,{className:`ars-table`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{children:b(`Page`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Position`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Impr.`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`CTR`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Usual`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Clicks lost`,`ai-rank-suite`)})]})}),(0,z.jsx)(`tbody`,{children:(e.ignored||[]).map(e=>(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`td`,{className:`font-medium`,title:e.key,children:(0,z.jsx)(`span`,{className:`ars-url`,children:e.key.replace(/^https?:\/\/[^/]+/,``)||e.key})}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.position}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:t(e.impressions)}),(0,z.jsxs)(`td`,{className:`is-num is-narrow tabular-nums`,style:{color:`var(--ars-serious)`},children:[e.actual_ctr,`%`]}),(0,z.jsxs)(`td`,{className:`is-num is-narrow tabular-nums`,style:{color:`var(--ars-ink-3)`},children:[e.expected_ctr,`%`]}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:(0,z.jsx)(`b`,{children:e.lost})})]},e.key))})]})})}),(0,z.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Every one of these is a title and description problem, which is the cheapest thing on this list to fix. Note that an AI overview sitting above your result depresses click-through at every position, so a page answering a question may appear here without anything being wrong with its snippet.`,`ai-rank-suite`)})]}),n===`movement`&&(0,z.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:[(0,z.jsx)(Ka,{title:b(`Gained`,`ai-rank-suite`),rows:e.movement?.gained||[],fmt:t,tone:`good`}),(0,z.jsx)(Ka,{title:b(`Lost`,`ai-rank-suite`),rows:e.movement?.lost||[],fmt:t,tone:`bad`})]}),n===`all`&&(0,z.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:[(0,z.jsx)(Ga,{title:b(`Top queries`,`ai-rank-suite`),rows:e.queries,keyLabel:b(`Query`,`ai-rank-suite`),fmt:t}),(0,z.jsx)(Ga,{title:b(`Top pages`,`ai-rank-suite`),rows:e.pages,keyLabel:b(`Page`,`ai-rank-suite`),fmt:t,strip:!0})]})]})}function Ga({title:e,rows:t,keyLabel:n,fmt:r,strip:i=!1}){return(0,z.jsx)(k,{title:e,flush:!0,children:(0,z.jsx)(`div`,{className:`ars-table-wrap`,style:{maxHeight:460},children:(0,z.jsxs)(`table`,{className:`ars-table`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{children:n}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Clicks`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Impr.`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`CTR`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Pos.`,`ai-rank-suite`)})]})}),(0,z.jsx)(`tbody`,{children:(t||[]).map(e=>(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`td`,{className:`font-medium`,style:{maxWidth:300},title:e.key,children:(0,z.jsx)(`span`,{className:`ars-url`,children:i&&e.key.replace(/^https?:\/\/[^/]+/,``)||e.key})}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.clicks}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:r(e.impressions)}),(0,z.jsxs)(`td`,{className:`is-num is-narrow tabular-nums`,children:[e.ctr,`%`]}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.position})]},e.key))})]})})})}function Ka({title:e,rows:t,fmt:n,tone:r}){return(0,z.jsx)(k,{title:e,subtitle:b(`Against the same number of days immediately before`,`ai-rank-suite`),flush:!0,children:(0,z.jsx)(`div`,{className:`ars-table-wrap`,children:(0,z.jsxs)(`table`,{className:`ars-table`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{children:[(0,z.jsx)(`th`,{children:b(`Page`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Before`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Now`,`ai-rank-suite`)}),(0,z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Change`,`ai-rank-suite`)})]})}),(0,z.jsxs)(`tbody`,{children:[t.map(e=>(0,z.jsxs)(`tr`,{children:[(0,z.jsxs)(`td`,{className:`font-medium`,title:e.key,children:[(0,z.jsx)(`span`,{className:`ars-url`,children:e.key.replace(/^https?:\/\/[^/]+/,``)||e.key}),e.gone&&(0,z.jsx)(j,{tone:`serious`,children:b(`gone`,`ai-rank-suite`)}),e.new&&(0,z.jsx)(j,{tone:`brand`,children:b(`new`,`ai-rank-suite`)})]}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.before}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.clicks}),(0,z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:(0,z.jsxs)(`b`,{style:{color:e.change>0?`#1a7f45`:`var(--ars-serious)`},children:[e.change>0?`+`:``,e.change]})})]},e.key)),t.length===0&&(0,z.jsx)(`tr`,{children:(0,z.jsx)(`td`,{colSpan:4,style:{color:`var(--ars-ink-3)`},children:b(`Nothing moved enough to report.`,`ai-rank-suite`)})})]})]})})})}var qa,z,Ja,Ya=o((()=>{C(),qa=u(f(),1),O(),Ap(),xa(),Ma(),dt(),mt(),La(),z=_e(),Ja={clicks:{key:`clicks`,label:b(`Clicks`,`ai-rank-suite`),color:`var(--ars-series-1)`},impressions:{key:`impressions`,label:b(`Impressions`,`ai-rank-suite`),color:`var(--ars-series-2)`},ctr:{key:`ctr`,label:b(`CTR`,`ai-rank-suite`),color:`var(--ars-c-green-ink)`},position:{key:`position`,label:b(`Average position`,`ai-rank-suite`),color:`var(--ars-accent)`},queries:{key:`clicks`,label:b(`Clicks`,`ai-rank-suite`),color:`var(--ars-series-1)`},topten:{key:`clicks`,label:b(`Clicks`,`ai-rank-suite`),color:`var(--ars-series-1)`}}}));function Xa(e,{flashMs:t=2200}={}){let[n,r]=(0,Za.useState)(null),[i,a]=(0,Za.useState)(!1),[o,s]=(0,Za.useState)(!1),[c,l]=(0,Za.useState)(null),u=(0,Za.useCallback)(()=>{D.get(e).then(r).catch(e=>l(e.message))},[e]);(0,Za.useEffect)(u,[u]);let d=(0,Za.useCallback)(e=>r(t=>t&&{...t,settings:{...t.settings,...e}}),[]),f=(0,Za.useCallback)(async i=>{let o=i&&typeof i==`object`&&!i.nativeEvent&&!i.target?i:void 0;a(!0),l(null);try{let i=await D.put(e,o??n.settings);return r(i),s(!0),setTimeout(()=>s(!1),t),i}catch(e){throw l(e.message),e}finally{a(!1)}},[e,n,t]),p=(0,Za.useCallback)(async e=>{a(!0),l(null);try{return await e()}catch(e){return l(e.message),null}finally{a(!1)}},[]);return{data:n,setData:r,s:n?.settings,update:d,save:f,run:p,busy:i,saved:o,error:c,setError:l,reload:u}}var Za,Qa=o((()=>{Za=u(f(),1),O()}));function $a(){let{data:e,setData:t,s:n,update:r,save:i,busy:a,saved:o,error:s}=Xa(`/settings/social`);if(!e)return(0,eo.jsx)(Ce,{error:s});let c=e.image_meta,l=n.default_image&&c&&(c.width<1200||c.height<630)?S(b(`This image is %1$d×%2$dpx — sharp link previews need 1200×630 or larger.`,`ai-rank-suite`),c.width,c.height):null;return(0,eo.jsxs)(`div`,{className:`ars-page`,children:[s&&(0,eo.jsx)(M,{tone:`serious`,children:s}),(0,eo.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-2 items-start`,children:[(0,eo.jsx)(k,{title:b(`Sharing defaults`,`ai-rank-suite`),subtitle:b(`Site-wide behavior — every page can still override it individually`,`ai-rank-suite`),action:(0,eo.jsxs)(`div`,{className:`flex items-center gap-2`,children:[o&&(0,eo.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,eo.jsx)(A,{onClick:i,busy:a,children:b(`Save`,`ai-rank-suite`)})]}),children:(0,eo.jsxs)(`div`,{className:`grid gap-4`,children:[(0,eo.jsxs)(`div`,{children:[(0,eo.jsx)($e,{label:b(`Default share image`,`ai-rank-suite`),title:b(`Select the default share image`,`ai-rank-suite`),value:n.default_image,onChange:e=>r({default_image:e}),hint:b(`Used whenever a page has no featured image and no per-page override — nothing ships without an image anymore. 1200×630 or larger for sharp link previews.`,`ai-rank-suite`)}),c&&!l&&n.default_image&&(0,eo.jsx)(`div`,{className:`mt-1.5`,children:(0,eo.jsxs)(j,{tone:`good`,children:[`✓ `,c.width,`×`,c.height,`px — perfect`]})}),l&&(0,eo.jsx)(`div`,{className:`mt-1.5`,children:(0,eo.jsx)(M,{tone:`warning`,children:l})})]}),(0,eo.jsx)(Me,{checked:!!n.og_locale,onChange:e=>r({og_locale:e}),label:S(b(`Output og:locale (%s)`,`ai-rank-suite`),e.locale)}),(0,eo.jsx)(Me,{checked:!!n.article_meta,onChange:e=>r({article_meta:e}),label:b(`Output article meta on posts (published/modified time, author, section, tags)`,`ai-rank-suite`)}),(0,eo.jsxs)(`div`,{className:`grid gap-3 pt-2`,style:{borderTop:`1px solid var(--ars-border)`},children:[(0,eo.jsx)(`div`,{className:`font-semibold text-[13px]`,children:b(`Publisher accounts`,`ai-rank-suite`)}),(0,eo.jsxs)(`div`,{children:[(0,eo.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`X / Twitter handle`,`ai-rank-suite`)}),(0,eo.jsx)(`input`,{type:`text`,placeholder:`@yourbrand`,value:n.tw_site,onChange:e=>r({tw_site:e.target.value})})]}),(0,eo.jsxs)(`div`,{children:[(0,eo.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Facebook page URL`,`ai-rank-suite`)}),(0,eo.jsx)(`input`,{type:`text`,placeholder:`https://www.facebook.com/yourbrand`,value:n.fb_page,onChange:e=>r({fb_page:e.target.value})})]}),(0,eo.jsxs)(`div`,{children:[(0,eo.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Facebook App ID (optional)`,`ai-rank-suite`)}),(0,eo.jsx)(`input`,{type:`text`,placeholder:`1234567890`,value:n.fb_app_id,onChange:e=>r({fb_app_id:e.target.value})})]})]})]})}),(0,eo.jsxs)(`div`,{className:`grid gap-5`,children:[(0,eo.jsx)(k,{title:b(`Social profiles`,`ai-rank-suite`),subtitle:b(`These feed your Organization's sameAs — how Google and AI assistants connect your site to your accounts`,`ai-rank-suite`),children:(0,eo.jsxs)(`div`,{className:`grid gap-3`,children:[Object.entries(e.networks).map(([e,t])=>(0,eo.jsxs)(`div`,{children:[(0,eo.jsx)(`label`,{className:`block font-medium mb-1`,children:t}),(0,eo.jsx)(`input`,{type:`text`,placeholder:`https://…`,value:(n.profiles||{})[e]||``,onChange:t=>r({profiles:{...n.profiles,[e]:t.target.value}})})]},e)),(0,eo.jsx)(`div`,{children:(0,eo.jsx)(A,{onClick:i,busy:a,children:b(`Save`,`ai-rank-suite`)})})]})}),(0,eo.jsx)(k,{title:b(`Validate`,`ai-rank-suite`),subtitle:b(`Check how the big platforms actually see your site — opens with your URL prefilled`,`ai-rank-suite`),children:(0,eo.jsxs)(`div`,{className:`grid gap-2`,children:[e.validators.map(e=>(0,eo.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`flex items-center justify-between ars-r-lg px-4 py-3 font-medium text-[13px]`,style:{background:`var(--ars-surface-2)`,textDecoration:`none`,color:`var(--ars-ink)`},children:[e.label,(0,eo.jsx)(`span`,{"aria-hidden":!0,style:{color:`var(--ars-brand)`},children:`↗`})]},e.label)),(0,eo.jsx)(`p`,{className:`m-0 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`WhatsApp, Slack, Discord and Telegram all read the same Open Graph tags — if Facebook's debugger is happy, they all are.`,`ai-rank-suite`)})]})})]})]})]})}var eo,to=o((()=>{f(),C(),Qa(),O(),dt(),eo=_e()})),no=c({default:()=>ao});function ro(e,t){return e?e.replaceAll(`%sitename%`,ne.siteName||window.airanksuiteData?.siteName||``).replaceAll(`%tagline%`,window.airanksuiteData?.tagline||``).replaceAll(`%sep%`,t).replace(/%([a-z0-9_]+)%/gi,e=>co[e]??``).replace(/\s{2,}/g,` `).trim():``}function io({variables:e,className:t=``}){return(0,oo.jsx)(`div`,{className:`flex flex-wrap gap-1.5 text-[12px] ${t}`,style:{color:`var(--ars-ink-3)`},children:Object.entries(e).map(([e,t])=>(0,oo.jsx)(`code`,{title:t,className:`ars-mono px-1.5 py-0.5 rounded`,style:{background:`var(--ars-surface-2)`},children:e},e))})}function ao({tab:e=`general`,onTab:t}){let{data:n,setData:r,s:i,update:a,save:o,busy:s,saved:c,error:l}=Xa(`/settings/seo`);if(!n)return(0,oo.jsx)(Ce,{error:l});let u=n.variables||{},d=n.post_types||[],f=i.templates||{},p=(e,t,n)=>a({templates:{...f,[e]:{...f[e]||{},[t]:n}}}),m=()=>(0,oo.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,oo.jsx)(A,{onClick:o,busy:s,children:b(`Save`,`ai-rank-suite`)}),c&&(0,oo.jsx)(j,{tone:`good`,children:`✓ Saved`})]}),h=`${ne.homeUrl.replace(/\/$/,``)}/what-is-geo-optimization/`,g=n.conflict&&!i.force_output?{tone:`neutral`,text:S(b(`%s is writing titles and metas, so this plugin steps back.`,`ai-rank-suite`),n.conflict),why:b(`Two plugins writing the same tags produce duplicate <title>s. Force output below only after switching the other one off.`,`ai-rank-suite`)}:i.enabled?{tone:`good`,text:S(b(`Titles follow “%s”.`,`ai-rank-suite`),i.title_template||`%title% %sep% %sitename%`),why:b(`The templates below are the default for every page; a page with its own SEO title in the editor overrides them.`,`ai-rank-suite`)}:{tone:`warning`,text:b(`Title and meta output is switched off.`,`ai-rank-suite`),why:b(`Pages fall back to whatever the theme prints — usually the bare post title and no description at all.`,`ai-rank-suite`)};return(0,oo.jsxs)(`div`,{className:`ars-page`,children:[(0,oo.jsx)(ya,{...g}),n.conflict&&(0,oo.jsxs)(M,{tone:i.force_output?`serious`:`warning`,children:[(0,oo.jsx)(`strong`,{children:n.conflict}),` `,b(`is active and already outputs SEO meta tags.`,`ai-rank-suite`),` `,i.force_output?b(`Forced output is ON — you will get duplicate tags unless you disable the other plugin.`,`ai-rank-suite`):b(`AI Rank Suite automatically defers its SEO output to avoid duplicates; per-page analysis keeps working. Enable “Force output” only after disabling the other plugin.`,`ai-rank-suite`)]}),l&&(0,oo.jsx)(M,{tone:`serious`,children:l}),(0,oo.jsx)(Ie,{tabs:[{id:`general`,label:b(`General`,`ai-rank-suite`)},{id:`templates`,label:b(`Templates`,`ai-rank-suite`)},{id:`social`,label:b(`Social`,`ai-rank-suite`)},{id:`rss`,label:b(`RSS`,`ai-rank-suite`)}],active:e,onChange:t}),e===`general`&&(0,oo.jsx)(k,{title:b(`On-page SEO output`,`ai-rank-suite`),subtitle:b(`Title tag, meta description, canonical, Open Graph and Twitter cards — the tags every engine and assistant reads. Set them once as a pattern; override per page only where it earns its keep.`,`ai-rank-suite`),action:c&&(0,oo.jsx)(j,{tone:`good`,children:`✓ Saved`}),children:(0,oo.jsxs)(`div`,{className:`grid gap-4`,children:[(0,oo.jsx)(Me,{checked:!!i.enabled,onChange:e=>a({enabled:e}),label:b(`Enable SEO output`,`ai-rank-suite`)}),(0,oo.jsxs)(`div`,{className:`max-w-[620px]`,children:[(0,oo.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Site-wide title template`,`ai-rank-suite`)}),(0,oo.jsx)(`input`,{type:`text`,value:i.title_template,onChange:e=>a({title_template:e.target.value})}),(0,oo.jsx)(io,{variables:u,className:`mt-1.5`}),(0,oo.jsx)(`div`,{className:`mt-1.5`,children:(0,oo.jsx)(He,{value:ro(i.title_template,i.separator),kind:`title`})}),(0,oo.jsx)(`div`,{className:`mt-2`,children:(0,oo.jsx)(ii,{serp:{site:ne.siteName||window.airanksuiteData?.siteName||``,url:h,title:ro(i.title_template,i.separator),desc:``},emptyTitle:b(`(empty — WordPress will pick the title)`,`ai-rank-suite`),emptyDesc:b(`(empty — the excerpt is used)`,`ai-rank-suite`)})})]}),(0,oo.jsxs)(`div`,{children:[(0,oo.jsx)(`label`,{className:`block font-medium mb-1.5`,children:b(`Separator`,`ai-rank-suite`)}),(0,oo.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[so.map(e=>(0,oo.jsx)(`button`,{type:`button`,onClick:()=>a({separator:e}),className:`cursor-pointer grid place-items-center`,style:{width:38,height:38,borderRadius:`var(--ars-r-md)`,fontSize:16,border:`1px solid ${i.separator===e?`var(--ars-brand)`:`var(--ars-border)`}`,background:i.separator===e?`var(--ars-brand-tonal)`:`var(--ars-surface)`,color:i.separator===e?`var(--ars-brand-tonal-ink)`:`var(--ars-ink-2)`},"aria-pressed":i.separator===e,"aria-label":`Separator ${e}`,children:e},e)),(0,oo.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 ml-1`,children:[(0,oo.jsx)(`span`,{className:`t-caption`,children:b(`or type one`,`ai-rank-suite`)}),(0,oo.jsx)(`input`,{type:`text`,value:i.separator,onChange:e=>a({separator:e.target.value}),style:{width:72,height:38,textAlign:`center`,padding:`0 8px`},"aria-label":b(`Custom separator`,`ai-rank-suite`)})]})]})]}),(0,oo.jsx)(Me,{checked:!!i.social_tags,onChange:e=>a({social_tags:e}),label:b(`Output Open Graph & Twitter card tags`,`ai-rank-suite`)}),n.conflict&&(0,oo.jsx)(Me,{checked:!!i.force_output,onChange:e=>a({force_output:e}),label:S(b(`Force output although %s is active (advanced)`,`ai-rank-suite`),n.conflict)}),(0,oo.jsx)(m,{})]})}),e===`templates`&&(0,oo.jsxs)(`div`,{className:`grid gap-4`,children:[(0,oo.jsx)(k,{title:b(`Per content type`,`ai-rank-suite`),subtitle:b(`A blog post and a product page rarely want the same title pattern. Leave a field empty and the site-wide template applies.`,`ai-rank-suite`),action:(0,oo.jsx)(m,{}),children:(0,oo.jsx)(`div`,{className:`grid gap-5`,children:d.map(e=>{let t=f[e.name]||{},n=t.title||i.title_template;return(0,oo.jsxs)(`div`,{className:`grid gap-3 ars-r-lg p-4`,style:{background:`var(--ars-surface-2)`},children:[(0,oo.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,oo.jsx)(`span`,{className:`font-semibold text-[13px]`,children:e.label}),(0,oo.jsx)(j,{tone:t.title||t.desc?`brand`:`neutral`,children:t.title||t.desc?`custom`:`site-wide`})]}),(0,oo.jsxs)(`div`,{children:[(0,oo.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Title template`,`ai-rank-suite`)}),(0,oo.jsx)(`input`,{type:`text`,placeholder:i.title_template,value:t.title||``,onChange:t=>p(e.name,`title`,t.target.value)})]}),(0,oo.jsxs)(`div`,{children:[(0,oo.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Meta description template`,`ai-rank-suite`)}),(0,oo.jsx)(`textarea`,{rows:2,placeholder:b(`Leave empty to use the page excerpt`,`ai-rank-suite`),value:t.desc||``,onChange:t=>p(e.name,`desc`,t.target.value)})]}),(0,oo.jsx)(ii,{serp:{site:ne.siteName||window.airanksuiteData?.siteName||``,url:h,title:ro(n,i.separator),desc:ro(t.desc,i.separator)},emptyTitle:b(`(empty — WordPress will pick the title)`,`ai-rank-suite`),emptyDesc:b(`(empty — the excerpt is used)`,`ai-rank-suite`)}),(0,oo.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,oo.jsx)(He,{value:ro(n,i.separator),kind:`title`}),t.desc&&(0,oo.jsx)(He,{value:ro(t.desc,i.separator),kind:`description`})]})]},e.name)})})}),(0,oo.jsxs)(k,{title:b(`Variables`,`ai-rank-suite`),subtitle:b(`Replaced per page wherever a template accepts text`,`ai-rank-suite`),children:[(0,oo.jsx)(`div`,{className:`grid gap-1.5 sm:grid-cols-2`,children:Object.entries(u).map(([e,t])=>(0,oo.jsxs)(`div`,{className:`flex items-center justify-between gap-3 ars-r-lg px-3 py-2`,style:{background:`var(--ars-surface-2)`},children:[(0,oo.jsx)(`code`,{className:`ars-mono text-[12px]`,children:e}),(0,oo.jsx)(`span`,{className:`text-[12px]`,style:{color:`var(--ars-ink-2)`},children:t})]},e))}),(0,oo.jsx)(`p`,{className:`m-0 mt-3 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`A description you wrote for a specific page always wins over a template — a pattern fills the gaps, it never overwrites deliberate work.`,`ai-rank-suite`)})]})]}),e===`social`&&(0,oo.jsx)($a,{}),e===`rss`&&(0,oo.jsx)(k,{title:b(`RSS feed protection`,`ai-rank-suite`),subtitle:b(`Scrapers steal content through your feed. A credit line in every item turns stolen copies into backlinks.`,`ai-rank-suite`),action:(0,oo.jsx)(m,{}),children:(0,oo.jsxs)(`div`,{className:`grid gap-4`,children:[(0,oo.jsxs)(`div`,{children:[(0,oo.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Before each feed item`,`ai-rank-suite`)}),(0,oo.jsx)(`input`,{type:`text`,value:i.rss_before||``,onChange:e=>a({rss_before:e.target.value})})]}),(0,oo.jsxs)(`div`,{children:[(0,oo.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`After each feed item`,`ai-rank-suite`)}),(0,oo.jsx)(`input`,{type:`text`,placeholder:b(`This post first appeared on %sitename%: %post_link%`,`ai-rank-suite`),value:i.rss_after||``,onChange:e=>a({rss_after:e.target.value})})]}),(0,oo.jsx)(`div`,{className:`flex flex-wrap gap-1.5 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[`%post_link%`,`%post_url%`,`%sitename%`,`%site_link%`,`%author%`].map(e=>(0,oo.jsx)(`code`,{className:`ars-mono px-1.5 py-0.5 rounded`,style:{background:`var(--ars-surface-2)`},children:e},e))}),(0,oo.jsxs)(`div`,{className:`ars-r-lg px-4 py-3 text-[13px]`,style:{background:`var(--ars-surface-2)`},children:[(0,oo.jsx)(`div`,{className:`text-[11.5px] font-semibold mb-1`,style:{color:`var(--ars-ink-3)`},children:b(`Preview of one feed item`,`ai-rank-suite`)}),i.rss_before&&(0,oo.jsx)(`div`,{style:{color:`var(--ars-ink-2)`},children:ro(i.rss_before,i.separator)}),(0,oo.jsx)(`div`,{style:{color:`var(--ars-ink-3)`},children:b(`… the post content …`,`ai-rank-suite`)}),i.rss_after&&(0,oo.jsx)(`div`,{style:{color:`var(--ars-ink-2)`},children:ro(i.rss_after,i.separator)}),!i.rss_before&&!i.rss_after&&(0,oo.jsx)(`div`,{style:{color:`var(--ars-ink-3)`},children:b(`No credit line — a scraped copy carries nothing back.`,`ai-rank-suite`)})]})]})})]})}var oo,so,co,lo=o((()=>{C(),f(),Qa(),xa(),di(),O(),dt(),to(),oo=_e(),so=[`–`,`—`,`-`,`·`,`•`,`|`,`/`,`>`,`~`,`»`],co={"%title%":b(`What is GEO optimization?`,`ai-rank-suite`),"%excerpt%":b(`A short introduction to generative engine optimization.`,`ai-rank-suite`),"%category%":b(`Guides`,`ai-rank-suite`),"%author%":`Alex Weber`,"%date%":new Date().toLocaleDateString()}}));function uo({label:e,hint:t,value:n,onChange:r,placeholder:i}){let[a,o]=(0,po.useState)((n||[]).join(`, `));(0,po.useEffect)(()=>{o((n||[]).join(`, `))},[JSON.stringify(n||[])]);let s=e=>{o(e),r(e.split(`,`).map(e=>e.trim()).filter(Boolean))},c=a.split(`,`).map(e=>e.trim()).filter(Boolean);return(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:e}),(0,B.jsx)(`input`,{type:`text`,value:a,placeholder:i,onChange:e=>s(e.target.value)}),t&&(0,B.jsx)(`p`,{className:`m-0 mt-1 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:t}),c.length>0&&(0,B.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-1.5`,children:c.map((e,t)=>(0,B.jsx)(`span`,{className:`text-[11px] px-1.5 py-0.5`,style:{background:`var(--ars-surface-3)`,color:`var(--ars-ink-2)`,borderRadius:`var(--ars-r-xs)`},children:e},`${e}-${t}`))})]})}function fo(){let[e,t]=(0,po.useState)(null),[n,r]=(0,po.useState)(null),[i,a]=(0,po.useState)(!1),[o,s]=(0,po.useState)(!1),[c,l]=(0,po.useState)(null),[u,d]=(0,po.useState)(!1);(0,po.useEffect)(()=>{D.get(`/settings/schema`).then(e=>{t(e),r(e.settings.identity||{})}).catch(e=>l(e.message))},[]);let f=e=>r(t=>({...t,...e})),p=async()=>{a(!0),l(null);try{let i=await D.put(`/settings/schema`,{identity:n,org_type:e.settings.org_type,org_name:e.settings.org_name});t(i),r(i.settings.identity||{}),s(!0),setTimeout(()=>s(!1),2400)}catch(e){l(e.message)}finally{a(!1)}},m=(0,po.useMemo)(()=>Object.entries(e?.types||{}),[e]);if(!e||!n)return(0,B.jsx)(Ce,{error:c});let h=e.entity||{score:0,missing:[]},g=Object.entries(e.identifiers||{}),_=Object.entries(e.policies||{}),v=e.contactTypes||{},y=n.contacts||[],x=(e,t)=>f({contacts:y.map((n,r)=>e===r?{...n,...t}:n)});return(0,B.jsxs)(`div`,{className:`grid gap-4`,children:[(0,B.jsxs)(k,{title:b(`Entity identity`,`ai-rank-suite`),subtitle:b(`Who is answering — the node a knowledge graph resolves you to`,`ai-rank-suite`),action:(0,B.jsx)(A,{onClick:p,busy:i,children:b(`Save identity`,`ai-rank-suite`)}),children:[(0,B.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-[auto_1fr] items-start`,children:[(0,B.jsx)(`div`,{className:`grid place-items-center`,children:(0,B.jsx)(Pe,{value:h.score,label:b(`Entity strength`,`ai-rank-suite`),size:128})}),(0,B.jsxs)(`div`,{className:`grid gap-3`,children:[(0,B.jsxs)(ft,{title:b(`Why this matters more than any other schema setting`,`ai-rank-suite`),open:h.score<50,children:[(0,B.jsx)(`p`,{children:b(`A search engine ranks pages. An assistant answers a question, and to answer it, it has to decide whose answer to repeat. That decision runs on entities — a resolved, cross-referenced thing in a knowledge graph — not on keywords.`,`ai-rank-suite`)}),(0,B.jsxs)(`p`,{children:[(0,B.jsx)(`code`,{children:b(`Organization + name + logo`,`ai-rank-suite`)}),` `,b(`does not resolve to anything; it is a label. Registration identifiers, links to profiles the graph already holds, and an explicit list of the subjects you claim expertise in are what turn a label into an entity that can be cited by name.`,`ai-rank-suite`)]})]}),h.missing.length>0&&(0,B.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,B.jsx)(`div`,{className:`t-overline`,children:b(`Worth adding, strongest first`,`ai-rank-suite`)}),h.missing.slice(0,4).map(e=>(0,B.jsxs)(`div`,{className:`px-3 py-2`,style:{background:`var(--ars-surface-2)`,borderRadius:`var(--ars-r-sm)`},children:[(0,B.jsx)(`div`,{className:`font-semibold text-[12.5px]`,children:e.label}),(0,B.jsx)(`div`,{className:`text-[11.5px] mt-0.5`,style:{color:`var(--ars-ink-2)`},children:e.why})]},e.key))]}),h.missing.length===0&&(0,B.jsx)(M,{tone:`good`,children:b(`Every high-value entity field is filled in.`,`ai-rank-suite`)})]})]}),c&&(0,B.jsx)(M,{tone:`serious`,children:c}),o&&(0,B.jsx)(j,{tone:`good`,children:`✓ Saved`})]}),(0,B.jsx)(k,{title:b(`What kind of organization`,`ai-rank-suite`),subtitle:b(`The subtype decides which properties Google will read`,`ai-rank-suite`),children:(0,B.jsxs)(`div`,{className:`grid gap-3`,children:[(0,B.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Type`,`ai-rank-suite`)}),(0,B.jsx)(`select`,{value:e.settings.org_type,onChange:n=>t({...e,settings:{...e.settings,org_type:n.target.value}}),children:m.map(([e,t])=>(0,B.jsx)(`optgroup`,{label:e,children:Object.entries(t).map(([e,t])=>(0,B.jsx)(`option`,{value:e,children:t},e))},e))})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Public name`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:e.settings.org_name,placeholder:b(`Falls back to the site title`,`ai-rank-suite`),onChange:n=>t({...e,settings:{...e.settings,org_name:n.target.value}})})]})]}),(0,B.jsx)($e,{label:b(`Organization logo`,`ai-rank-suite`),title:b(`Select the organization logo`,`ai-rank-suite`),value:n.logo||``,onChange:e=>f({logo:e}),hint:b(`What Google shows beside your name in a Knowledge Panel. Square, at least 112×112px. Without one, the site icon (favicon) is used — rarely how a brand wants to appear.`,`ai-rank-suite`)}),(0,B.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Legal name`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:n.legal_name||``,placeholder:b(`The name on the register`,`ai-rank-suite`),onChange:e=>f({legal_name:e.target.value})})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Also known as`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:n.alt_name||``,placeholder:b(`Trading name, abbreviation`,`ai-rank-suite`),onChange:e=>f({alt_name:e.target.value})})]})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Description`,`ai-rank-suite`)}),(0,B.jsx)(`textarea`,{rows:2,value:n.description||``,placeholder:b(`The sentence an assistant repeats when asked who you are.`,`ai-rank-suite`),onChange:e=>f({description:e.target.value})})]}),(0,B.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Founded`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:n.founded||``,placeholder:`2016-04-01`,onChange:e=>f({founded:e.target.value})})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Founder`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:n.founder||``,onChange:e=>f({founder:e.target.value})})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Employees`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:n.employees||``,placeholder:`45`,onChange:e=>f({employees:e.target.value})})]})]}),(0,B.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Public email`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:n.email||``,onChange:e=>f({email:e.target.value})})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Public phone`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:n.phone||``,onChange:e=>f({phone:e.target.value})})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Price range`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:n.price_range||``,placeholder:`$$`,onChange:e=>f({price_range:e.target.value})})]})]})]})}),(0,B.jsx)(k,{title:b(`How the graph finds you`,`ai-rank-suite`),subtitle:b(`sameAs and knowsAbout do more for citation than every other field combined`,`ai-rank-suite`),children:(0,B.jsxs)(`div`,{className:`grid gap-4`,children:[(0,B.jsx)(uo,{label:b(`Profiles (sameAs)`,`ai-rank-suite`),hint:b(`One URL per profile: LinkedIn, Wikidata, Crunchbase, Companies House, Google Business, industry directories.`,`ai-rank-suite`),placeholder:`https://linkedin.com/company/…, https://www.wikidata.org/wiki/…`,value:n.same_as,onChange:e=>f({same_as:e})}),(0,B.jsx)(uo,{label:b(`Subjects you know (knowsAbout)`,`ai-rank-suite`),hint:b(`The topics you claim expertise in. Be specific: “orthopaedic physiotherapy” beats “health”.`,`ai-rank-suite`),placeholder:b(`dermatology, orthopaedics, sports injury rehabilitation`,`ai-rank-suite`),value:n.knows_about,onChange:e=>f({knows_about:e})}),(0,B.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,B.jsx)(uo,{label:b(`Areas served`,`ai-rank-suite`),hint:b(`Country codes or region names — assistants filter by geography before quality.`,`ai-rank-suite`),placeholder:b(`AE, SA, QA`,`ai-rank-suite`),value:n.area_served,onChange:e=>f({area_served:e})}),(0,B.jsx)(uo,{label:b(`Languages`,`ai-rank-suite`),placeholder:b(`en, ar, de`,`ai-rank-suite`),value:n.languages,onChange:e=>f({languages:e})})]}),(0,B.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,B.jsx)(uo,{label:b(`Currencies accepted`,`ai-rank-suite`),placeholder:b(`AED, EUR, USD`,`ai-rank-suite`),value:n.currencies,onChange:e=>f({currencies:e})}),(0,B.jsx)(uo,{label:b(`Payment methods`,`ai-rank-suite`),placeholder:b(`Cash, Visa, Mastercard, Apple Pay`,`ai-rank-suite`),value:n.payments,onChange:e=>f({payments:e})})]}),(0,B.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,B.jsx)(uo,{label:b(`Awards`,`ai-rank-suite`),placeholder:b(`Best Clinic 2024`,`ai-rank-suite`),value:n.awards,onChange:e=>f({awards:e})}),(0,B.jsx)(uo,{label:b(`Certifications & accreditations`,`ai-rank-suite`),placeholder:b(`ISO 9001, JCI Accredited`,`ai-rank-suite`),value:n.certifications,onChange:e=>f({certifications:e})})]}),(0,B.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,B.jsx)(uo,{label:b(`Member of`,`ai-rank-suite`),placeholder:b(`Dubai Chamber of Commerce`,`ai-rank-suite`),value:n.member_of,onChange:e=>f({member_of:e})}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Parent organization`,`ai-rank-suite`)}),(0,B.jsx)(`input`,{type:`text`,value:n.parent_org||``,onChange:e=>f({parent_org:e.target.value})})]})]})]})}),(0,B.jsx)(k,{title:b(`Registration identifiers`,`ai-rank-suite`),subtitle:b(`What turns a claimed business into a verifiable one — fill in whichever your market uses`,`ai-rank-suite`),children:(0,B.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:g.map(([e,t])=>(0,B.jsxs)(`div`,{children:[(0,B.jsxs)(`label`,{className:`block font-medium mb-1 flex items-center gap-1.5`,children:[t.label,(0,B.jsx)(`span`,{className:`ars-tag`,style:{background:`var(--ars-surface-3)`,color:`var(--ars-ink-3)`},children:t.region})]}),(0,B.jsx)(`input`,{type:`text`,value:(n.identifiers||{})[e]||``,placeholder:t.hint,onChange:t=>f({identifiers:{...n.identifiers||{},[e]:t.target.value}})})]},e))})}),(0,B.jsx)(k,{title:b(`Contact points`,`ai-rank-suite`),subtitle:b(`Per role, per language, per market — this is what makes you resolvable in each country`,`ai-rank-suite`),children:(0,B.jsxs)(`div`,{className:`grid gap-3`,children:[y.length===0&&(0,B.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`No contact points yet. One per role beats a single switchboard number.`,`ai-rank-suite`)}),y.map((e,t)=>(0,B.jsxs)(`div`,{className:`grid gap-2 p-3`,style:{background:`var(--ars-surface-2)`,borderRadius:`var(--ars-r-sm)`},children:[(0,B.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-3`,children:[(0,B.jsx)(`select`,{value:e.type||`customer support`,onChange:e=>x(t,{type:e.target.value}),children:Object.entries(v).map(([e,t])=>(0,B.jsx)(`option`,{value:e,children:t},e))}),(0,B.jsx)(`input`,{type:`text`,placeholder:b(`Phone`,`ai-rank-suite`),value:e.phone||``,onChange:e=>x(t,{phone:e.target.value})}),(0,B.jsx)(`input`,{type:`text`,placeholder:b(`Email`,`ai-rank-suite`),value:e.email||``,onChange:e=>x(t,{email:e.target.value})})]}),(0,B.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:[(0,B.jsx)(`input`,{type:`text`,placeholder:b(`Languages — en, ar`,`ai-rank-suite`),value:(e.languages||[]).join(`, `),onChange:e=>x(t,{languages:e.target.value.split(`,`).map(e=>e.trim()).filter(Boolean)})}),(0,B.jsx)(`input`,{type:`text`,placeholder:b(`Areas — AE, SA`,`ai-rank-suite`),value:(e.areas||[]).join(`, `),onChange:e=>x(t,{areas:e.target.value.split(`,`).map(e=>e.trim()).filter(Boolean)})})]}),(0,B.jsx)(`div`,{children:(0,B.jsx)(`button`,{type:`button`,className:`ars-chip`,style:{color:`var(--ars-serious)`},onClick:()=>f({contacts:y.filter((e,n)=>n!==t)}),children:b(`Remove`,`ai-rank-suite`)})})]},t)),(0,B.jsx)(`div`,{children:(0,B.jsx)(A,{variant:`ghost`,onClick:()=>f({contacts:[...y,{type:`customer support`,phone:``,email:``}]}),children:b(`Add a contact point`,`ai-rank-suite`)})})]})}),(0,B.jsx)(k,{title:b(`Trust & editorial policies`,`ai-rank-suite`),subtitle:b(`What Google reads for E-E-A-T, and what news surfaces require`,`ai-rank-suite`),children:(0,B.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:_.map(([e,t])=>(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`block font-medium mb-1`,children:t.label}),(0,B.jsx)(`input`,{type:`text`,placeholder:`https://…`,value:(n.policies||{})[e]||``,onChange:t=>f({policies:{...n.policies||{},[e]:t.target.value}})}),(0,B.jsx)(`p`,{className:`m-0 mt-1 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:t.hint})]},e))})}),(0,B.jsx)(k,{title:b(`What ships`,`ai-rank-suite`),subtitle:b(`The exact properties merged into your Organization node`,`ai-rank-suite`),action:(0,B.jsxs)(A,{variant:`ghost`,onClick:()=>d(!u),children:[u?`Hide`:`Show`,` JSON-LD`]}),children:u?(0,B.jsx)(`pre`,{className:`ars-mono m-0 p-3 overflow-auto text-[11.5px]`,style:{background:`var(--ars-surface-2)`,borderRadius:`var(--ars-r-sm)`,maxHeight:420},children:JSON.stringify(e.preview||{},null,2)}):(0,B.jsxs)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:[Object.keys(e.preview||{}).length,` properties are currently attached to your identity node. Save to refresh.`]})}),(0,B.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,B.jsx)(A,{onClick:p,busy:i,children:b(`Save identity`,`ai-rank-suite`)}),o&&(0,B.jsx)(j,{tone:`good`,children:`✓ Saved`})]})]})}var po,B,mo=o((()=>{po=u(f(),1),C(),O(),dt(),mt(),B=_e()})),ho=c({default:()=>Co});function go(){let[e,t]=(0,wo.useState)(null),[n,r]=(0,wo.useState)(0),[i,a]=(0,wo.useState)(!1);if((0,wo.useEffect)(()=>{D.get(`/schema/live`).then(t).catch(()=>t({samples:[],validators:[]}))},[]),!e)return(0,V.jsx)(k,{title:b(`Live structured data`,`ai-rank-suite`),children:b(`Loading…`,`ai-rank-suite`)});if(!e.samples?.length)return null;let o=e.samples[Math.min(n,e.samples.length-1)];return(0,V.jsx)(k,{title:b(`Live structured data`,`ai-rank-suite`),subtitle:b(`Exactly the JSON-LD your visitors and Google receive — built by the same code that writes your pages`,`ai-rank-suite`),action:e.samples.length>1&&(0,V.jsx)(Ie,{tabs:e.samples.map((e,t)=>({id:String(t),label:e.label})),active:String(n),onChange:e=>r(Number(e))}),children:(0,V.jsxs)(`div`,{className:`grid gap-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap`,children:[o.types.map(e=>(0,V.jsx)(j,{tone:`brand`,children:e},e)),o.issues.length===0?(0,V.jsx)(j,{tone:`good`,children:`✓ No validation issues`}):(0,V.jsx)(j,{tone:`warning`,children:S(x(`%d to fix`,`%d to fix`,o.issues.length,`ai-rank-suite`),o.issues.length)})]}),o.issues.length>0&&(0,V.jsx)(M,{tone:`warning`,children:(0,V.jsx)(`ul`,{className:`m-0 pl-4 grid gap-0.5`,children:o.issues.map(e=>(0,V.jsx)(`li`,{children:e},e))})}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,V.jsx)(A,{variant:`ghost`,onClick:async()=>{await ve(o.json)&&(a(!0),setTimeout(()=>a(!1),2e3))},children:i?`✓ Copied`:b(`Copy JSON-LD`,`ai-rank-suite`)}),e.validators.map(e=>(0,V.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`text-[12.5px] font-medium`,style:{color:`var(--ars-brand)`,textDecoration:`none`},children:[e.label,` ↗`]},e.label))]}),(0,V.jsx)(`pre`,{className:`ars-mono m-0 p-4 ars-r-lg overflow-auto text-[11.5px] leading-relaxed`,style:{background:`var(--ars-code-bg)`,color:`var(--ars-code-ink)`,maxHeight:380},children:o.json}),(0,V.jsx)(`p`,{className:`m-0 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:o.url})]})})}function _o(){let[e,t]=(0,wo.useState)(null);return(0,wo.useEffect)(()=>{D.get(`/schema/types`).then(t).catch(()=>{})},[]),e?.featured?.length?(0,V.jsxs)(k,{title:b(`Rich results you can produce`,`ai-rank-suite`),subtitle:S(b(`%d schema.org types are available — these are the ones most sites need`,`ai-rank-suite`),Object.keys(e.types).length),children:[(0,V.jsx)(`div`,{className:`ars-cardgrid`,style:{"--min":`250px`},children:e.featured.map(t=>{let n=e.usage?.[t.type]||0;return(0,V.jsxs)(`div`,{className:`p-3`,style:{border:`1px solid var(--ars-border)`,borderRadius:`var(--ars-r-sm)`,background:`var(--ars-surface)`},children:[(0,V.jsxs)(`div`,{className:`ars-richhead`,children:[(0,V.jsxs)(`div`,{className:`ars-richhead-name`,children:[(0,V.jsx)(`span`,{className:`font-semibold text-[13px]`,children:t.label}),t.auto?(0,V.jsx)(`span`,{className:`ars-tag`,style:{background:`var(--ars-c-green)`,color:`var(--ars-c-green-ink)`},title:b(`Emitted automatically, no setup needed`,`ai-rank-suite`),children:b(`Automatic`,`ai-rank-suite`)}):n>0?(0,V.jsx)(`span`,{className:`ars-tag`,style:{background:`var(--ars-c-blue)`,color:`var(--ars-c-blue-ink)`},children:S(x(`on %d page`,`on %d pages`,n,`ai-rank-suite`),n)}):(0,V.jsx)(`span`,{className:`ars-tag`,style:{background:`var(--ars-surface-3)`,color:`var(--ars-ink-3)`},children:b(`Not used yet`,`ai-rank-suite`)})]}),(0,V.jsx)(`span`,{className:`ars-richhead-count`,style:{color:`var(--ars-ink-3)`},title:b(`How many fields this type can carry`,`ai-rank-suite`),children:S(x(`%d field`,`%d fields`,t.fields,`ai-rank-suite`),t.fields)})]}),(0,V.jsx)(`p`,{className:`m-0 mt-1 text-[11.5px] leading-snug`,style:{color:`var(--ars-ink-2)`},children:t.why})]},t.type)})}),(0,V.jsxs)(`p`,{className:`m-0 mt-3 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[b(`Add any of them to a single page in`,`ai-rank-suite`),(0,V.jsx)(`strong`,{children:b(`Content → open a page → Schema`,`ai-rank-suite`)}),`, or to a whole post type under `,(0,V.jsx)(`strong`,{children:b(`Templates`,`ai-rank-suite`)}),`. Every other type lives in the `,(0,V.jsx)(`strong`,{children:b(`Library`,`ai-rank-suite`)}),` tab.`]})]}):null}function vo({data:e,setData:t}){let[n,r]=(0,wo.useState)(!1),[i,a]=(0,wo.useState)(!1),[o,s]=(0,wo.useState)(null),c=e.settings,l=n=>t({...e,settings:{...c,...n}});return(0,V.jsxs)(`div`,{className:`grid gap-4`,children:[e.conflict&&!c.force_output&&(0,V.jsxs)(M,{children:[(0,V.jsx)(`strong`,{children:e.conflict}),` already outputs structured data — AI Rank Suite defers automatically to avoid a duplicate graph.`]}),(0,V.jsx)(k,{title:b(`Structured data (JSON-LD)`,`ai-rank-suite`),subtitle:b(`One connected @graph: Organization, WebSite, WebPage/Article, Breadcrumbs, FAQPage — plus anything your templates add`,`ai-rank-suite`),action:i&&(0,V.jsx)(j,{tone:`good`,children:`✓ Saved`}),children:(0,V.jsxs)(`div`,{className:`grid gap-4`,children:[(0,V.jsx)(Me,{checked:!!c.enabled,onChange:e=>l({enabled:e}),label:b(`Output JSON-LD`,`ai-rank-suite`)}),(0,V.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Publisher name`,`ai-rank-suite`)}),(0,V.jsx)(`input`,{type:`text`,placeholder:ne.siteName,value:c.org_name,onChange:e=>l({org_name:e.target.value})})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Publisher type`,`ai-rank-suite`)}),(0,V.jsxs)(`select`,{value:c.org_type,onChange:e=>l({org_type:e.target.value}),children:[(0,V.jsx)(`option`,{value:`Organization`,children:b(`Organization`,`ai-rank-suite`)}),(0,V.jsx)(`option`,{value:`Person`,children:b(`Person`,`ai-rank-suite`)}),(0,V.jsx)(`option`,{value:`LocalBusiness`,children:b(`LocalBusiness`,`ai-rank-suite`)})]})]})]}),e.conflict&&(0,V.jsx)(Me,{checked:!!c.force_output,onChange:e=>l({force_output:e}),label:`Force output although ${e.conflict} is active (advanced)`}),(0,V.jsx)(`div`,{children:(0,V.jsx)(A,{onClick:async()=>{r(!0),s(null);try{t(await D.put(`/settings/schema`,(({identity:e,...t})=>t)(c))),a(!0),setTimeout(()=>a(!1),2200)}catch(e){s(e.message)}finally{r(!1)}},busy:n,children:b(`Save`,`ai-rank-suite`)})}),o&&(0,V.jsx)(M,{tone:`serious`,children:o})]})}),(0,V.jsx)(k,{title:b(`FAQ schema`,`ai-rank-suite`),subtitle:b(`Generated FAQs are emitted as FAQPage automatically`,`ai-rank-suite`),children:(0,V.jsxs)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:[b(`Generate FAQs per page in`,`ai-rank-suite`),(0,V.jsx)(`strong`,{children:b(`Content`,`ai-rank-suite`)}),` → open a page → `,(0,V.jsx)(`em`,{children:b(`FAQ`,`ai-rank-suite`)}),`. Saved items appear in the JSON-LD graph and can be rendered anywhere with the`,` `,(0,V.jsx)(`code`,{className:`ars-mono px-1.5 py-0.5 rounded`,style:{background:`var(--ars-surface-2)`},children:`[airanksuite_faq]`}),` `,`shortcode.`]})}),(0,V.jsx)(go,{})]})}function yo({template:e,meta:t,onChange:n,onRemove:r}){let i=t.types[e.type]?.fields||[],a=i.filter(e=>e.required),o=i.filter(e=>e.recommended&&!e.required),s=i.filter(e=>!e.required&&!e.recommended),[c,l]=(0,wo.useState)(!1),u=(t,r)=>n({...e,data:{...e.data,[t]:r}}),d=(t,r)=>n({...e,conditions:{...e.conditions,[t]:r}}),f=a.filter(t=>!String(e.data[t.key]??``).trim()),p=e.conditions.post_types.length>0||e.conditions.terms.length>0||e.conditions.post_ids.length>0,m=({f:t})=>(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:[t.label,t.required&&(0,V.jsx)(`span`,{style:{color:`var(--ars-serious)`},children:` *`})]}),t.type===`select`?(0,V.jsxs)(`select`,{value:e.data[t.key]??``,onChange:e=>u(t.key,e.target.value),children:[(0,V.jsx)(`option`,{value:``,children:`— not set —`}),(t.options||[]).map(e=>(0,V.jsx)(`option`,{value:e,children:e},e))]}):t.type===`textarea`?(0,V.jsx)(`textarea`,{rows:2,value:e.data[t.key]??``,onChange:e=>u(t.key,e.target.value)}):(0,V.jsx)(`input`,{type:`text`,placeholder:t.hint,value:e.data[t.key]??``,onChange:e=>u(t.key,e.target.value)})]},t.key);return(0,V.jsxs)(`div`,{className:`ars-r-lg p-4 grid gap-4`,style:{background:`var(--ars-surface-2)`},children:[(0,V.jsxs)(`div`,{className:`flex items-start justify-between gap-3 flex-wrap`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap min-w-0`,children:[(0,V.jsx)(`input`,{type:`text`,value:e.name,onChange:t=>n({...e,name:t.target.value}),style:{maxWidth:240},"aria-label":b(`Template name`,`ai-rank-suite`)}),(0,V.jsx)(j,{tone:`brand`,children:t.types[e.type]?.label||e.type}),f.length>0&&(0,V.jsx)(j,{tone:`warning`,children:S(x(`%s required field empty`,`%s required fields empty`,f.length,`ai-rank-suite`),f.length)}),!p&&(0,V.jsx)(j,{tone:`serious`,children:`no scope — never applies`})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(Me,{checked:!!e.enabled,onChange:t=>n({...e,enabled:t}),label:b(`Active`,`ai-rank-suite`)}),(0,V.jsx)(`button`,{type:`button`,onClick:r,"aria-label":b(`Remove template`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer p-1`,style:{color:`var(--ars-ink-3)`},children:(0,V.jsx)(Rt,{size:14})})]})]}),(0,V.jsxs)(`div`,{className:`grid gap-3`,children:[(0,V.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wider`,style:{color:`var(--ars-ink-3)`},children:b(`Where it applies`,`ai-rank-suite`)}),(0,V.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Content types`,`ai-rank-suite`)}),(0,V.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:t.post_types.map(t=>{let n=e.conditions.post_types.includes(t);return(0,V.jsx)(`button`,{type:`button`,onClick:()=>d(`post_types`,n?e.conditions.post_types.filter(e=>e!==t):[...e.conditions.post_types,t]),className:`px-3 py-1 ars-r-sm text-[12px] cursor-pointer`,style:{border:`1px solid ${n?`var(--ars-brand)`:`var(--ars-border)`}`,background:n?`var(--ars-brand-tonal)`:`var(--ars-surface)`,color:n?`var(--ars-brand-tonal-ink)`:`var(--ars-ink-2)`},children:t},t)})})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Only in these terms (optional)`,`ai-rank-suite`)}),(0,V.jsx)(`select`,{multiple:!0,size:4,value:e.conditions.terms.map(String),onChange:e=>d(`terms`,[...e.target.selectedOptions].map(e=>Number(e.value))),children:t.taxonomies.map(e=>(0,V.jsx)(`optgroup`,{label:e.name,children:e.terms.map(e=>(0,V.jsx)(`option`,{value:e.id,children:e.name},e.id))},e.name))})]})]}),!p&&(0,V.jsx)(`p`,{className:`m-0 text-[11.5px]`,style:{color:`var(--ars-serious)`},children:b(`Pick at least one content type or term. A template with no scope is never applied — that is deliberate, so a half-finished rule can never blanket the whole site.`,`ai-rank-suite`)})]}),(0,V.jsxs)(`div`,{className:`grid gap-3`,children:[(0,V.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wider`,style:{color:`var(--ars-ink-3)`},children:b(`Values`,`ai-rank-suite`)}),a.length>0&&(0,V.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:a.map(e=>(0,V.jsx)(m,{f:e},e.key))}),o.length>0&&(0,V.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:o.map(e=>(0,V.jsx)(m,{f:e},e.key))}),s.length>0&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{type:`button`,onClick:()=>l(!c),className:`border-0 bg-transparent cursor-pointer p-0 text-[12.5px] font-semibold text-left`,style:{color:`var(--ars-brand)`},children:c?`Hide`:`Show ${s.length} optional field${s.length===1?``:`s`}`}),c&&(0,V.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:s.map(e=>(0,V.jsx)(m,{f:e},e.key))})]}),(0,V.jsxs)(`p`,{className:`m-0 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:[`Variables are replaced per page:`,` `,Object.keys(t.variables).slice(0,6).map(e=>(0,V.jsx)(`code`,{className:`ars-mono px-1 py-0.5 rounded mr-1`,style:{background:`var(--ars-surface)`},children:e},e))]})]})]})}function bo({onSaved:e}){let[t,n]=(0,wo.useState)(null),[r,i]=(0,wo.useState)([]),[a,o]=(0,wo.useState)(!1),[s,c]=(0,wo.useState)(``),[l,u]=(0,wo.useState)(!1),[d,f]=(0,wo.useState)(!1),[p,m]=(0,wo.useState)(null),[h,g]=(0,wo.useState)(!1),_=e=>{let t={};Object.entries(e.types).forEach(([e,n])=>{t[e]=n}),n({types:t,grouped:e.grouped,variables:e.variables,post_types:e.post_types,taxonomies:e.taxonomies}),i(e.templates)};(0,wo.useEffect)(()=>{D.get(`/schema/templates`).then(_).catch(e=>m(e.message))},[]);let v=(0,wo.useMemo)(()=>{if(!t)return[];let e=s.trim().toLowerCase();return Object.entries(t.grouped).map(([t,n])=>[t,n.filter(t=>!e||t.label.toLowerCase().includes(e))]).filter(([,e])=>e.length>0)},[t,s]);if(!t)return(0,V.jsx)(Ce,{error:p});let y=e=>{i([...r,{id:To(),name:t.types[e]?.label||e,type:e,enabled:!0,data:{},conditions:{post_types:[],terms:[],post_ids:[],exclude:[]}}]),o(!1),c(``),g(!0)};return(0,V.jsxs)(`div`,{className:`grid gap-4`,children:[p&&(0,V.jsx)(M,{tone:`serious`,children:p}),(0,V.jsx)(k,{title:b(`Schema templates`,`ai-rank-suite`),subtitle:b(`Rules instead of chores: “every product in Shoes is a Product with this brand and size system”, written once and applied to every matching page forever`,`ai-rank-suite`),action:(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[d&&(0,V.jsx)(j,{tone:`good`,children:`✓ Saved`}),(a||r.length>0)&&(0,V.jsx)(A,{variant:`ghost`,onClick:()=>o(!a),children:a?`Cancel`:b(`Add template`,`ai-rank-suite`)}),h&&(0,V.jsx)(A,{onClick:async()=>{u(!0),m(null);try{_(await D.put(`/schema/templates`,{templates:r})),g(!1),f(!0),e?.(),setTimeout(()=>f(!1),2200)}catch(e){m(e.message)}finally{u(!1)}},busy:l,children:b(`Save templates`,`ai-rank-suite`)})]}),children:(0,V.jsxs)(`div`,{className:`grid gap-4`,children:[a&&(0,V.jsxs)(`div`,{className:`ars-r-lg p-4 grid gap-3`,style:{background:`var(--ars-grad-soft)`},children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[(0,V.jsxs)(`span`,{className:`font-semibold text-[13px] flex items-center gap-1.5`,children:[(0,V.jsx)(zt,{size:13}),b(`Pick a type`,`ai-rank-suite`)]}),(0,V.jsx)(`input`,{type:`text`,placeholder:b(`Search 77 types…`,`ai-rank-suite`),value:s,onChange:e=>c(e.target.value),style:{maxWidth:260},autoFocus:!0})]}),(0,V.jsxs)(`div`,{className:`grid gap-3`,style:{maxHeight:340,overflowY:`auto`},children:[v.map(([e,t])=>(0,V.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,V.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wider`,style:{color:`var(--ars-ink-3)`},children:e}),(0,V.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:t.map(e=>(0,V.jsx)(`button`,{type:`button`,onClick:()=>y(e.value),className:`px-3 py-1.5 ars-r-sm text-[12.5px] cursor-pointer`,style:{background:`var(--ars-surface)`,border:`1px solid var(--ars-border)`},children:e.label},e.value))})]},e)),v.length===0&&(0,V.jsxs)(`div`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:[`No type matches “`,s,`”.`]})]})]}),r.length===0&&!a&&(0,V.jsxs)(`div`,{className:`ars-r-lg px-4 py-5 grid gap-2 place-items-start`,style:{background:`var(--ars-surface-2)`},children:[(0,V.jsx)(`div`,{className:`font-medium text-[13px]`,children:b(`No templates yet`,`ai-rank-suite`)}),(0,V.jsx)(`div`,{className:`text-[12px] max-w-[74ch]`,style:{color:`var(--ars-ink-3)`},children:b(`Your pages already get Organization, WebSite, WebPage/Article, Breadcrumbs and FAQPage automatically. A template adds a richer type — Recipe, Event, Course, SoftwareApplication, JobPosting — to a whole group of pages at once.`,`ai-rank-suite`)}),(0,V.jsx)(A,{onClick:()=>o(!0),children:b(`Add template`,`ai-rank-suite`)})]}),r.map((e,n)=>(0,V.jsx)(yo,{template:e,meta:t,onChange:e=>{i(r.map((t,r)=>r===n?e:t)),g(!0)},onRemove:()=>{i(r.filter((e,t)=>t!==n)),g(!0)}},e.id)),h&&(0,V.jsx)(M,{tone:`info`,children:b(`Nothing is live until you press “Save templates”.`,`ai-rank-suite`)})]})})]})}function xo(){let[e,t]=(0,wo.useState)(null),[n,r]=(0,wo.useState)(``),[i,a]=(0,wo.useState)(null),[o,s]=(0,wo.useState)(null);if((0,wo.useEffect)(()=>{D.get(`/schema/types`).then(t).catch(e=>s(e.message))},[]),!e)return(0,V.jsx)(Ce,{error:o});let c=n.trim().toLowerCase(),l=Object.entries(e.grouped).map(([e,t])=>[e,t.filter(e=>!c||e.label.toLowerCase().includes(c)||e.value.toLowerCase().includes(c))]).filter(([,e])=>e.length>0),u=Object.keys(e.types).length;return(0,V.jsxs)(`div`,{className:`grid gap-4`,children:[(0,V.jsx)(k,{title:b(`Type library`,`ai-rank-suite`),subtitle:S(b(`All %d schema.org types this plugin can emit, with the fields Google actually reads for each`,`ai-rank-suite`),u),action:(0,V.jsx)(`input`,{type:`text`,placeholder:b(`Search types…`,`ai-rank-suite`),value:n,onChange:e=>r(e.target.value),style:{maxWidth:240},"aria-label":b(`Search schema types`,`ai-rank-suite`)}),children:(0,V.jsxs)(`div`,{className:`grid gap-5`,children:[l.map(([t,n])=>(0,V.jsxs)(`div`,{className:`grid gap-2`,children:[(0,V.jsxs)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wider`,style:{color:`var(--ars-ink-3)`},children:[t,` · `,n.length]}),(0,V.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:n.map(t=>{let n=i===t.value,r=e.types[t.value]?.fields||[];return(0,V.jsxs)(`button`,{type:`button`,onClick:()=>a(n?null:t.value),className:`px-3 py-1.5 ars-r-sm text-[12.5px] cursor-pointer`,style:{border:`1px solid ${n?`var(--ars-brand)`:`var(--ars-border)`}`,background:n?`var(--ars-brand-tonal)`:`var(--ars-surface-2)`,color:n?`var(--ars-brand-tonal-ink)`:`var(--ars-ink-2)`},children:[t.label,(0,V.jsx)(`span`,{className:`ml-1.5 text-[11px]`,style:{opacity:.65},children:r.length})]},t.value)})})]},t)),l.length===0&&(0,V.jsxs)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-3)`},children:[`No type matches “`,n,`”.`]})]})}),i&&e.types[i]&&(0,V.jsx)(k,{title:e.types[i].label,subtitle:`schema.org/${i} — ${(e.types[i].fields||[]).length} fields`,action:(0,V.jsx)(`a`,{href:`https://schema.org/${i}`,target:`_blank`,rel:`noreferrer`,className:`text-[12.5px] font-medium`,style:{color:`var(--ars-brand)`,textDecoration:`none`},children:`schema.org ↗`}),children:(0,V.jsx)(`div`,{className:`ars-table-wrap`,children:(0,V.jsxs)(`table`,{className:`ars-table`,children:[(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`th`,{children:b(`Field`,`ai-rank-suite`)}),(0,V.jsx)(`th`,{children:b(`Property`,`ai-rank-suite`)}),(0,V.jsx)(`th`,{children:b(`Example`,`ai-rank-suite`)}),(0,V.jsx)(`th`,{className:`is-num`,children:b(`Weight`,`ai-rank-suite`)})]})}),(0,V.jsx)(`tbody`,{children:(e.types[i].fields||[]).map(e=>(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`td`,{className:`font-medium`,children:e.label}),(0,V.jsx)(`td`,{className:`ars-mono text-[11.5px]`,style:{color:`var(--ars-ink-2)`},children:e.prop}),(0,V.jsx)(`td`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:e.hint||`—`}),(0,V.jsx)(`td`,{className:`is-num`,children:e.required?(0,V.jsx)(j,{tone:`serious`,children:`required`}):e.recommended?(0,V.jsx)(j,{tone:`warning`,children:`recommended`}):(0,V.jsx)(j,{tone:`neutral`,children:`optional`})})]},e.key))})]})})}),(0,V.jsx)(k,{title:b(`Variables`,`ai-rank-suite`),subtitle:b(`Placeholders replaced per page wherever a template value accepts text`,`ai-rank-suite`),children:(0,V.jsx)(`div`,{className:`ars-cardgrid`,style:{"--min":`300px`,gap:6},children:Object.entries(e.variables).map(([e,t])=>(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-3 ars-r-lg px-3 py-2`,style:{background:`var(--ars-surface-2)`},children:[(0,V.jsx)(`code`,{className:`ars-mono text-[12px]`,children:e}),(0,V.jsx)(`span`,{className:`text-[12px]`,style:{color:`var(--ars-ink-2)`},children:t})]},e))})})]})}function So(){let[e,t]=(0,wo.useState)(null),[n,r]=(0,wo.useState)(!1),[i,a]=(0,wo.useState)(!1),[o,s]=(0,wo.useState)(null);if((0,wo.useEffect)(()=>{D.get(`/settings/woocommerce`).then(t).catch(()=>t({active:!1}))},[]),!e)return(0,V.jsx)(k,{children:b(`Loading…`,`ai-rank-suite`)});if(e.active===!1)return(0,V.jsx)(k,{title:b(`Product structured data`,`ai-rank-suite`),subtitle:b(`Appears as soon as WooCommerce is active`,`ai-rank-suite`),children:(0,V.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`WooCommerce is not active on this site, so there are no products to describe. Everything else on this page works regardless.`,`ai-rank-suite`)})});let c=e.settings,l=n=>t({...e,settings:{...c,...n}}),u=async()=>{r(!0),s(null);try{t(await D.put(`/settings/woocommerce`,c)),a(!0),setTimeout(()=>a(!1),2200)}catch(e){s(e.message)}finally{r(!1)}},d=({label:e,k:t,max:n=30})=>(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:e}),(0,V.jsx)(`input`,{type:`number`,min:`0`,max:n,value:c[t]??0,onChange:e=>l({[t]:Math.max(0,Number(e.target.value)||0)})})]});return(0,V.jsx)(k,{title:b(`Product structured data`,`ai-rank-suite`),subtitle:b(`Every field Google Merchant Center asks for — identifiers, shipping, returns and reviews`,`ai-rank-suite`),action:(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[i&&(0,V.jsx)(j,{tone:`good`,children:`✓ Saved`}),(0,V.jsx)(A,{onClick:u,busy:n,children:b(`Save`,`ai-rank-suite`)})]}),children:(0,V.jsxs)(`div`,{className:`grid gap-4`,children:[o&&(0,V.jsx)(M,{tone:`serious`,children:o}),(0,V.jsx)(Me,{checked:!!c.identifiers,onChange:e=>l({identifiers:e}),label:b(`Publish global identifiers (GTIN, EAN, UPC, ISBN, MPN)`,`ai-rank-suite`)}),(0,V.jsx)(`p`,{className:`m-0 -mt-2 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Read automatically from WooCommerce core and the common GTIN plugins — no re-entry needed. Without one of these Google rejects the product entirely.`,`ai-rank-suite`)}),(0,V.jsxs)(`div`,{className:`sm:max-w-[260px]`,children:[(0,V.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Default condition`,`ai-rank-suite`)}),(0,V.jsxs)(`select`,{value:c.condition,onChange:e=>l({condition:e.target.value}),children:[(0,V.jsx)(`option`,{value:`new`,children:b(`New`,`ai-rank-suite`)}),(0,V.jsx)(`option`,{value:`refurbished`,children:b(`Refurbished`,`ai-rank-suite`)}),(0,V.jsx)(`option`,{value:`used`,children:b(`Used`,`ai-rank-suite`)}),(0,V.jsx)(`option`,{value:`damaged`,children:b(`Damaged`,`ai-rank-suite`)})]})]}),(0,V.jsxs)(`div`,{className:`grid gap-3 ars-r-lg p-4`,style:{background:`var(--ars-surface-2)`},children:[(0,V.jsx)(Me,{checked:!!c.shipping_details,onChange:e=>l({shipping_details:e}),label:b(`Publish shipping details (handling + transit time)`,`ai-rank-suite`)}),!!c.shipping_details&&(0,V.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-4`,children:[(0,V.jsx)(d,{label:b(`Handling min (days)`,`ai-rank-suite`),k:`handling_days_min`}),(0,V.jsx)(d,{label:b(`Handling max`,`ai-rank-suite`),k:`handling_days_max`}),(0,V.jsx)(d,{label:b(`Transit min`,`ai-rank-suite`),k:`transit_days_min`}),(0,V.jsx)(d,{label:b(`Transit max`,`ai-rank-suite`),k:`transit_days_max`})]})]}),(0,V.jsxs)(`div`,{className:`grid gap-3 ars-r-lg p-4`,style:{background:`var(--ars-surface-2)`},children:[(0,V.jsx)(Me,{checked:!!c.return_policy,onChange:e=>l({return_policy:e}),label:b(`Publish a merchant return policy`,`ai-rank-suite`)}),!!c.return_policy&&(0,V.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2 items-end`,children:[(0,V.jsx)(d,{label:b(`Return window (days)`,`ai-rank-suite`),k:`return_days`,max:365}),(0,V.jsx)(Me,{checked:!!c.return_free,onChange:e=>l({return_free:e}),label:b(`Returns are free`,`ai-rank-suite`)})]})]}),(0,V.jsx)(Me,{checked:!!c.reviews,onChange:e=>l({reviews:e}),label:b(`Include up to five customer reviews in the markup`,`ai-rank-suite`)})]})})}function Co({tab:e=`overview`,onTab:t}){let[n,r]=(0,wo.useState)(null),[i,a]=(0,wo.useState)(null),[o,s]=(0,wo.useState)(null),c=()=>Promise.allSettled([D.get(`/schema/templates`),D.get(`/schema/live`)]).then(([e,t])=>{let n=e.status===`fulfilled`&&e.value?e.value:{},r=t.status===`fulfilled`&&t.value?t.value:{},i=Array.isArray(n.templates)?n.templates:[],o=Array.isArray(r.samples)?r.samples:[];a({types:n.types&&typeof n.types==`object`?Object.keys(n.types).length:null,templates:i.length,active:i.filter(e=>e&&e.enabled).length,emitted:Array.isArray(o[0]?.types)?o[0].types.length:0,issues:o.reduce((e,t)=>e+(Array.isArray(t?.issues)?t.issues.length:0),0)})});if((0,wo.useEffect)(()=>{D.get(`/settings/schema`).then(r).catch(e=>s(e.message)),c()},[]),!n)return(0,V.jsx)(Ce,{error:o});let l=n.settings||{},u=!!(l.org_name&&String(l.org_name).trim()),d=n.conflict&&!l.force_output?{tone:`neutral`,text:S(b(`%s is already writing structured data, so this plugin steps back.`,`ai-rank-suite`),n.conflict),why:b(`Two schema graphs on one page contradict each other. If you would rather this plugin owned it, force output below and switch it off in the other one.`,`ai-rank-suite`)}:l.enabled?u?{tone:`good`,text:S(b(`Structured data is live for %s.`,`ai-rank-suite`),l.org_name),why:b(`The preview below is exactly what a crawler reads. Check it whenever the identity or the templates change.`,`ai-rank-suite`)}:{tone:`warning`,text:b(`Schema is on but the organisation has no name.`,`ai-rank-suite`),why:b(`Every block references the site's identity. An unnamed one is a graph with a hole at the root — fill in the identity first.`,`ai-rank-suite`),action:b(`Open identity`,`ai-rank-suite`),onAction:()=>t&&t(`identity`)}:{tone:`warning`,text:b(`Structured data is switched off — pages say nothing machine-readable about themselves.`,`ai-rank-suite`),why:b(`Schema is how a page tells Google and an assistant what it is: an article, a product, a business. Without it they guess.`,`ai-rank-suite`)};return(0,V.jsxs)(`div`,{className:`ars-page`,children:[(0,V.jsx)(ya,{...d}),i&&(0,V.jsx)(Ee,{columns:4,metrics:[{id:`output`,label:b(`Output`,`ai-rank-suite`),hint:b(`Structured data is how a machine knows a page is a recipe rather than an essay about one — the single biggest lever for rich results and for being quoted correctly by an assistant.`,`ai-rank-suite`),value:n.settings.enabled?`Live`:`Off`,accent:n.settings.enabled?void 0:`var(--ars-accent)`,sub:n.conflict?S(b(`%d also active`,`ai-rank-suite`),n.conflict):b(`on every page of the site`,`ai-rank-suite`)},{id:`emitted`,label:b(`Types on your home page`,`ai-rank-suite`),hint:b(`Counted from the connected @graph the home page actually emits — see it verbatim under Live structured data.`,`ai-rank-suite`),value:i.emitted},{id:`templates`,label:b(`Templates`,`ai-rank-suite`),hint:b(`Rules that add a richer type — Recipe, Event, Product — to a whole group of pages at once.`,`ai-rank-suite`),value:`${i.active} / ${i.templates}`,sub:i.templates===0?`none created yet`:`active rules`},{id:`issues`,label:b(`Validation issues`,`ai-rank-suite`),hint:b(`Counted across the live JSON-LD samples on this site.`,`ai-rank-suite`),value:i.issues,accent:i.issues>0?`var(--ars-accent)`:void 0,sub:i.types?S(b(`%d types available`,`ai-rank-suite`),i.types):void 0}]}),(0,V.jsx)(Ie,{tabs:[{id:`overview`,label:b(`Overview`,`ai-rank-suite`)},{id:`identity`,label:b(`Identity`,`ai-rank-suite`)},{id:`templates`,label:b(`Templates`,`ai-rank-suite`)},{id:`library`,label:b(`Library`,`ai-rank-suite`)},{id:`products`,label:b(`Products`,`ai-rank-suite`)}],active:e,onChange:t}),e===`overview`&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(_o,{}),(0,V.jsx)(vo,{data:n,setData:r})]}),e===`identity`&&(0,V.jsx)(fo,{}),e===`templates`&&(0,V.jsx)(bo,{onSaved:c}),e===`library`&&(0,V.jsx)(xo,{}),e===`products`&&(0,V.jsx)(So,{})]})}var wo,V,To,Eo=o((()=>{C(),wo=u(f(),1),O(),dt(),mo(),Vt(),ye(),xa(),V=_e(),To=()=>`tpl_${Math.random().toString(36).slice(2,10)}`}));function Do({compact:e=!1}){let[t,n]=(0,Oo.useState)(null),[r,i]=(0,Oo.useState)(null),[a,o]=(0,Oo.useState)(null),[s,c]=(0,Oo.useState)(``),[l,u]=(0,Oo.useState)(!1),d=(0,Oo.useRef)(!1),f=(0,Oo.useRef)(!0),p=(0,Oo.useCallback)(()=>D.get(`/ai/capabilities`).then(n).catch(e=>i(e.message)),[]);(0,Oo.useEffect)(()=>(p(),D.get(`/bulk/status`).then(o).catch(()=>{}),()=>{f.current=!1}),[p]);let m=(0,Oo.useCallback)(async()=>{if(!d.current){d.current=!0;try{let e=await D.post(`/bulk/tick`);for(o(e);e.state===`running`&&f.current;)e=await D.post(`/bulk/tick`),o(e);await p()}catch(e){i(e.message)}finally{d.current=!1,c(``)}}},[p]),h=async e=>{let t=e.action||{};if(i(null),t.kind===`go`){jo(t.href);return}if(t.kind===`autopilot`){jo(`/autopilot?tasks=`+encodeURIComponent((t.tasks||[]).join(`,`)));return}if(t.kind===`bulk`){c(e.id),u(!0);try{o(await D.post(`/bulk/start`,{action:t.action,scope:t.scope||`missing`})),m()}catch(e){i(e.message),c(``)}}},g=async()=>{try{o(await D.post(`/bulk/cancel`,{}))}catch(e){i(e.message)}};if(!t)return(0,ko.jsx)(k,{title:b(`Let AI do`,`ai-rank-suite`),icon:(0,ko.jsx)(Et,{size:18}),children:r?(0,ko.jsx)(M,{tone:`serious`,children:r}):(0,ko.jsx)(`span`,{className:`t-caption`,children:b(`Loading…`,`ai-rank-suite`)})});let _=a?.state===`running`,v=a?a.progress??0:0,y=t.rows||[],x=y.reduce((e,t)=>e+(typeof t.open==`number`&&!t.free&&t.id!==`autopilot`?t.open:0),0);return(0,ko.jsxs)(k,{className:`ars-letai-card${t.connected?` is-live`:``}`,title:(0,ko.jsxs)(`span`,{className:`ars-letai-title`,children:[b(`Let AI do`,`ai-rank-suite`),t.connected&&x>0&&(0,ko.jsx)(`span`,{className:`ars-letai-count`,children:x.toLocaleString()})]}),subtitle:t.connected?`${b(`Connected to`,`ai-rank-suite`)} ${t.provider}. ${x>0?`${x.toLocaleString()} ${b(`items are waiting — each one is a single press.`,`ai-rank-suite`)}`:b(`Nothing is waiting. Everything below is one press away when it is.`,`ai-rank-suite`)}`:b(`Everything the AI in this plugin can take off your hands — once an engine is connected.`,`ai-rank-suite`),icon:(0,ko.jsx)(`span`,{className:`ars-letai-icon`,children:(0,ko.jsx)(Et,{size:19})}),action:t.connected?(0,ko.jsx)(j,{tone:x>0?`warning`:`good`,children:b(x>0?`ready to run`:`nothing waiting`,`ai-rank-suite`)}):(0,ko.jsx)(A,{onClick:()=>jo(`/ai`),children:b(`Connect an engine`,`ai-rank-suite`)}),children:[r&&(0,ko.jsx)(M,{tone:`serious`,children:r}),(_||l&&a?.state===`done`)&&(0,ko.jsxs)(`div`,{className:`grid gap-1.5 mb-4`,children:[(0,ko.jsxs)(`div`,{className:`flex justify-between text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:[(0,ko.jsxs)(`span`,{children:[b(_?`Working…`:`Finished`,`ai-rank-suite`),` `,(a.done||0).toLocaleString(),` `,b(`of`,`ai-rank-suite`),` `,(a.total||0).toLocaleString(),a.failed?` · ${a.failed} ${b(`failed`,`ai-rank-suite`)}`:``]}),(0,ko.jsxs)(`span`,{className:`flex items-center gap-3`,children:[(0,ko.jsxs)(`span`,{className:`tabular-nums`,children:[v,`%`]}),_&&(0,ko.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:g,children:b(`Stop`,`ai-rank-suite`)})]})]}),(0,ko.jsx)(Be,{value:v})]}),(0,ko.jsx)(`div`,{className:`ars-letai${e?` is-compact`:``}`,children:Ao.map(n=>{let r=y.filter(t=>t.group===n.id&&(!e||typeof t.open==`number`&&t.open>0));return r.length===0?null:(0,ko.jsxs)(`section`,{className:`ars-letai-group`,children:[(0,ko.jsxs)(`header`,{className:`ars-letai-head`,children:[(0,ko.jsx)(`span`,{className:`t-overline`,children:n.label}),!e&&(0,ko.jsx)(`span`,{className:`t-caption`,children:n.sub})]}),r.map(n=>{let r=s===n.id||_&&n.action?.kind===`bulk`&&a?.action===n.action.action,i=!t.connected&&!n.free,o=typeof n.open==`number`&&n.open>0;return(0,ko.jsxs)(`div`,{className:`ars-letai-row${i?` is-disabled`:``}`,children:[(0,ko.jsxs)(`div`,{className:`min-w-0 grid gap-0.5`,children:[(0,ko.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,ko.jsx)(`span`,{className:`font-semibold text-[13px]`,children:n.label}),n.free&&(0,ko.jsx)(j,{tone:`good`,children:b(`free`,`ai-rank-suite`)}),n.per_page&&(0,ko.jsx)(j,{tone:`neutral`,children:b(`also per page`,`ai-rank-suite`)})]}),!e&&(0,ko.jsx)(`span`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:n.detail}),!e&&(0,ko.jsx)(`code`,{className:`ars-letai-route`,children:n.route})]}),(0,ko.jsxs)(`div`,{className:`ars-letai-cell`,children:[o?(0,ko.jsxs)(`span`,{className:`ars-letai-open`,children:[(0,ko.jsx)(`strong`,{className:`tabular-nums`,children:n.open.toLocaleString()}),(0,ko.jsx)(`span`,{children:n.unit})]}):typeof n.open==`number`?(0,ko.jsxs)(`span`,{className:`ars-letai-open is-clear`,children:[`✓ `,b(`nothing open`,`ai-rank-suite`)]}):null,(0,ko.jsx)(A,{variant:o&&!i?`primary`:`ghost`,busy:r,disabled:i||_&&!r,onClick:()=>h(n),children:n.action?.kind===`go`?b(`Open`,`ai-rank-suite`):n.action?.kind===`autopilot`?b(`Plan run`,`ai-rank-suite`):b(o?`Do it`:`Run again`,`ai-rank-suite`)})]})]},n.id)})]},n.id)})})]})}var Oo,ko,Ao,jo,Mo=o((()=>{Oo=u(f(),1),C(),O(),dt(),Vt(),ko=_e(),Ao=[{id:`write`,label:b(`Write`,`ai-rank-suite`),sub:b(`Copy the AI produces and saves into pages`,`ai-rank-suite`)},{id:`find`,label:b(`Find`,`ai-rank-suite`),sub:b(`What to target — proposed, never applied without you`,`ai-rank-suite`)},{id:`check`,label:b(`Check`,`ai-rank-suite`),sub:b(`Measurement the rest of the plugin reads`,`ai-rank-suite`)},{id:`run`,label:b(`Run`,`ai-rank-suite`),sub:b(`The unattended mode`,`ai-rank-suite`)}],jo=e=>{window.location.hash=e}}));function No(){let[e,t]=(0,Po.useState)(null),[n,r]=(0,Po.useState)(null),[i,a]=(0,Po.useState)(`custom`),[o,s]=(0,Po.useState)(!1),[c,l]=(0,Po.useState)(!1),[u,d]=(0,Po.useState)(null);if((0,Po.useEffect)(()=>{D.get(`/ai/knowledge`).then(t).catch(e=>d(e.message))},[]),!e)return(0,Fo.jsx)(k,{title:b(`Knowledge base`,`ai-rank-suite`),icon:(0,Fo.jsx)(yt,{size:18}),children:u?(0,Fo.jsx)(M,{tone:`serious`,children:u}):(0,Fo.jsx)(`span`,{className:`t-caption`,children:b(`Loading…`,`ai-rank-suite`)})});let f=e.custom||``,p=n===null?f:n,m=n!==null&&n!==f,h=async()=>{s(!0),d(null);try{let e=await D.put(`/ai/knowledge`,{custom:p});t(e),r(null),l(!0),setTimeout(()=>l(!1),1800)}catch(e){d(e.message)}finally{s(!1)}},g=()=>r(null),_=e.briefing||``,v=_.indexOf(`## About this business, in the owner's words`),y=v>0?_.slice(0,v).trim():_;return(0,Fo.jsxs)(k,{title:b(`Knowledge base`,`ai-rank-suite`),subtitle:b(`What every AI call is told before its task — on every engine you connect. The template is fixed and always sent; your own notes are added after it.`,`ai-rank-suite`),icon:(0,Fo.jsx)(yt,{size:18}),action:(0,Fo.jsxs)(`div`,{className:`flex items-center gap-2`,children:[c&&(0,Fo.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,Fo.jsx)(Je,{value:i,onChange:a,options:[{id:`custom`,label:b(`Your notes`,`ai-rank-suite`)},{id:`template`,label:b(`Template`,`ai-rank-suite`)},{id:`preview`,label:b(`Preview`,`ai-rank-suite`)}]})]}),children:[u&&(0,Fo.jsx)(M,{tone:`serious`,children:u}),i===`custom`&&(0,Fo.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Fo.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`Tell the writer what a new colleague would need to know: what you sell, to whom, where, in which languages, what you never claim, and how you sound. Plain text; the fixed template already covers SEO and GEO rules.`,`ai-rank-suite`)}),(0,Fo.jsx)(`textarea`,{rows:12,value:p,placeholder:e.template,onChange:e=>r(e.target.value),style:{fontFamily:`inherit`,fontSize:13,lineHeight:1.5}}),(0,Fo.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,Fo.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[f===``&&(0,Fo.jsx)(A,{variant:`ghost`,onClick:()=>r(e.template),children:b(`Start from the template`,`ai-rank-suite`)}),(0,Fo.jsxs)(`span`,{className:`t-caption`,children:[p.length.toLocaleString(),` `,b(`characters`,`ai-rank-suite`)]})]}),(0,Fo.jsxs)(`div`,{className:`flex items-center gap-2`,children:[m&&(0,Fo.jsx)(A,{variant:`ghost`,onClick:g,disabled:o,children:b(`Cancel`,`ai-rank-suite`)}),(0,Fo.jsx)(A,{onClick:h,busy:o,disabled:!m,children:b(`Save notes`,`ai-rank-suite`)})]})]})]}),i===`template`&&(0,Fo.jsxs)(`div`,{className:`grid gap-2`,children:[(0,Fo.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`Fixed for every engine and every task. The site facts in it are read live from WordPress and from the Schema → Identity settings, so filling those in makes every AI output better.`,`ai-rank-suite`)}),(0,Fo.jsx)(`pre`,{className:`ars-briefing`,children:y})]}),i===`preview`&&(0,Fo.jsxs)(`div`,{className:`grid gap-2`,children:[(0,Fo.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`The complete briefing, verbatim, as the next AI call will receive it. Each task then adds its own instructions after this.`,`ai-rank-suite`)}),(0,Fo.jsx)(`pre`,{className:`ars-briefing`,children:_}),m&&(0,Fo.jsx)(M,{tone:`warning`,children:b(`You have unsaved notes — this preview shows what is saved, not what is typed.`,`ai-rank-suite`)})]})]})}var Po,Fo,Io=o((()=>{Po=u(f(),1),C(),O(),dt(),Vt(),Fo=_e()}));function Lo(){let[e,t]=(0,Ro.useState)(null),[n,r]=(0,Ro.useState)(null),[i,a]=(0,Ro.useState)(!1),[o,s]=(0,Ro.useState)(!1),[c,l]=(0,Ro.useState)(null);if((0,Ro.useEffect)(()=>{D.get(`/ai/usage`).then(t).catch(e=>l(e.message))},[]),!e)return(0,zo.jsx)(k,{title:b(`AI usage & budget`,`ai-rank-suite`),icon:(0,zo.jsx)(xt,{size:18}),children:c?(0,zo.jsx)(M,{tone:`serious`,children:c}):(0,zo.jsx)(`span`,{className:`t-caption`,children:b(`Loading…`,`ai-rank-suite`)})});let u=e.budget,d=n||u,f=n!==null&&JSON.stringify(n)!==JSON.stringify(u),p=(e,t)=>r({...d,[e]:t}),m=async()=>{a(!0),l(null);try{t(await D.put(`/ai/usage`,{budget:d})),r(null),s(!0),setTimeout(()=>s(!1),1800)}catch(e){l(e.message)}finally{a(!1)}},h=e.pct.today,g=e.pct.month,_=d.warn_pct||80,v=e=>e>=100?`serious`:e>=_?`warning`:`good`;return(0,zo.jsxs)(k,{title:b(`AI usage & budget`,`ai-rank-suite`),subtitle:b(`Measured from every call the plugin makes, priced at the vendor list rate per model. An estimate of your invoice, checked before each call so a runaway job stops itself.`,`ai-rank-suite`),icon:(0,zo.jsx)(xt,{size:18}),action:o?(0,zo.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}):null,children:[c&&(0,zo.jsx)(M,{tone:`serious`,children:c}),(0,zo.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,zo.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,zo.jsxs)(`div`,{className:`flex justify-between text-[12.5px]`,children:[(0,zo.jsx)(`span`,{className:`font-semibold`,children:b(`Today`,`ai-rank-suite`)}),(0,zo.jsxs)(`span`,{className:`tabular-nums`,style:{color:`var(--ars-ink-2)`},children:[Bo(e.spend.today),` `,d.daily_usd>0?`/ $${Number(d.daily_usd).toFixed(2)}`:``,` · `,e.spend.today_calls,` `,b(`calls`,`ai-rank-suite`)]})]}),(0,zo.jsx)(Be,{value:Math.min(100,h),color:`var(--ars-${v(h)})`})]}),(0,zo.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,zo.jsxs)(`div`,{className:`flex justify-between text-[12.5px]`,children:[(0,zo.jsx)(`span`,{className:`font-semibold`,children:b(`This month`,`ai-rank-suite`)}),(0,zo.jsxs)(`span`,{className:`tabular-nums`,style:{color:`var(--ars-ink-2)`},children:[Bo(e.spend.month),` `,d.monthly_usd>0?`/ $${Number(d.monthly_usd).toFixed(2)}`:``,` · `,e.spend.month_calls,` `,b(`calls`,`ai-rank-suite`)]})]}),(0,zo.jsx)(Be,{value:Math.min(100,g),color:`var(--ars-${v(g)})`})]})]}),(h>=100||g>=100)&&d.hard_stop&&(0,zo.jsx)(`div`,{className:`mt-3`,children:(0,zo.jsx)(M,{tone:`serious`,children:b(`A budget is reached and the hard stop is on: AI calls are refused until the window rolls over or the limit is raised.`,`ai-rank-suite`)})}),e.by_day.length>1&&(0,zo.jsxs)(`div`,{className:`mt-4`,children:[(0,zo.jsx)(`div`,{className:`t-overline mb-1`,children:b(`Spend, last 30 days`,`ai-rank-suite`)}),(0,zo.jsx)(Ze,{height:90,data:e.by_day.map(e=>({label:e.day.slice(5),cost:Math.round(e.cost/1e4)/100})),series:[{key:`cost`,label:b(`USD`,`ai-rank-suite`),color:`var(--ars-brand)`}]})]}),e.by_job.length>0&&(0,zo.jsxs)(`div`,{className:`mt-4 grid gap-1`,children:[(0,zo.jsx)(`div`,{className:`t-overline`,children:b(`By job, this month`,`ai-rank-suite`)}),e.by_job.map(e=>(0,zo.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-[12.5px] py-1`,style:{borderBottom:`1px solid var(--ars-border)`},children:[(0,zo.jsx)(`span`,{className:`font-medium`,children:e.job}),(0,zo.jsxs)(`span`,{className:`tabular-nums`,style:{color:`var(--ars-ink-2)`},children:[Bo(e.cost),` · `,e.calls,` `,b(`calls`,`ai-rank-suite`),` · `,(e.tokens/1e3).toFixed(1),`k `,b(`tokens`,`ai-rank-suite`),` · `,e.latency,` ms`,e.failed?` · ${e.failed} ${b(`failed`,`ai-rank-suite`)}`:``]})]},e.job))]}),(0,zo.jsxs)(`div`,{className:`mt-5 grid gap-3 md:grid-cols-3`,children:[(0,zo.jsx)(Qe,{label:b(`Daily limit (USD)`,`ai-rank-suite`),hint:b(`0 = no limit`,`ai-rank-suite`),htmlFor:`airanksuite-b-day`,children:(0,zo.jsx)(`input`,{id:`airanksuite-b-day`,type:`number`,min:`0`,step:`0.5`,value:d.daily_usd,onChange:e=>p(`daily_usd`,Number(e.target.value))})}),(0,zo.jsx)(Qe,{label:b(`Monthly limit (USD)`,`ai-rank-suite`),hint:b(`0 = no limit`,`ai-rank-suite`),htmlFor:`airanksuite-b-mon`,children:(0,zo.jsx)(`input`,{id:`airanksuite-b-mon`,type:`number`,min:`0`,step:`1`,value:d.monthly_usd,onChange:e=>p(`monthly_usd`,Number(e.target.value))})}),(0,zo.jsx)(Qe,{label:b(`Per bulk job (USD)`,`ai-rank-suite`),hint:b(`A single run stops here`,`ai-rank-suite`),htmlFor:`airanksuite-b-job`,children:(0,zo.jsx)(`input`,{id:`airanksuite-b-job`,type:`number`,min:`0`,step:`1`,value:d.per_job_usd,onChange:e=>p(`per_job_usd`,Number(e.target.value))})})]}),(0,zo.jsxs)(`div`,{className:`mt-3 flex items-center justify-between gap-3 flex-wrap`,children:[(0,zo.jsxs)(`div`,{className:`flex items-center gap-4 flex-wrap`,children:[(0,zo.jsx)(Me,{checked:!!d.hard_stop,onChange:e=>p(`hard_stop`,e),label:b(`Hard stop at the limit`,`ai-rank-suite`)}),(0,zo.jsxs)(`label`,{className:`flex items-center gap-2 text-[12.5px]`,children:[b(`Warn at`,`ai-rank-suite`),(0,zo.jsx)(`input`,{type:`number`,min:`0`,max:`100`,style:{width:64},value:d.warn_pct,onChange:e=>p(`warn_pct`,Number(e.target.value))}),`%`]})]}),(0,zo.jsxs)(`div`,{className:`flex items-center gap-2`,children:[f&&(0,zo.jsx)(A,{variant:`ghost`,onClick:()=>r(null),disabled:i,children:b(`Cancel`,`ai-rank-suite`)}),(0,zo.jsx)(A,{onClick:m,busy:i,disabled:!f,children:b(`Save budget`,`ai-rank-suite`)})]})]})]})}var Ro,zo,Bo,Vo=o((()=>{Ro=u(f(),1),C(),O(),dt(),Vt(),zo=_e(),Bo=e=>{let t=(e||0)/1e6;return t>0&&t<.01?`$${t.toFixed(4)}`:`$${t.toFixed(2)}`}})),Ho=c({default:()=>Uo});function Uo(){let{data:e,setData:t,s:n,update:r,save:i,run:a,busy:o,saved:s,error:c}=Xa(`/settings/ai`),[l,u]=(0,Wo.useState)(``),[d,f]=(0,Wo.useState)(null),[p,m]=(0,Wo.useState)(`all`),[h,g]=(0,Wo.useState)(``),[_,v]=(0,Wo.useState)(()=>{try{return window.sessionStorage.getItem(`airanksuite-ai-wizard-return`)===`1`}catch{return!1}}),y=e?.providers||[],x=e?.key_hints||{},C=e?.regions||{},w=(0,Wo.useMemo)(()=>y.find(e=>e.id===n?.provider)||y[0]||{},[y,n?.provider]),T=(0,Wo.useMemo)(()=>{let e=h.trim().toLowerCase(),t=t=>(p===`all`||t.region===p)&&(!e||t.label.toLowerCase().includes(e)||t.company.toLowerCase().includes(e)||(t.models||[]).some(t=>t.toLowerCase().includes(e)));return Ko.map(e=>({id:e,label:C[e]||e,items:y.filter(n=>n.region===e&&t(n))})).filter(e=>e.items.length>0)},[y,C,p,h]);if(!e)return(0,Go.jsx)(Ce,{error:c});let E=async()=>{f(null);try{let e={...n};l.trim()&&(e.api_key=l.trim()),await i(e),u(``)}catch{}},ee=()=>(f(null),a(async()=>{try{await D.post(`/ai/verify`),f(`ok`)}catch(e){throw f(`fail`),e}})),te=e=>{let t={provider:e.id};(e.models||[]).includes(n.model)||(t.model=``),t.base_url=e.needsUrl?n.base_url||e.base:``,r(t)},ne=y.length;return(0,Go.jsxs)(`div`,{className:`ars-page`,children:[_&&(0,Go.jsxs)(M,{tone:e?.has_key?`good`:`info`,children:[e?.has_key?b(`A key is stored. You can pick up the AI setup where you left it.`,`ai-rank-suite`):b(`Add a key below, then return to the AI setup.`,`ai-rank-suite`),` `,(0,Go.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>{try{window.sessionStorage.removeItem(`airanksuite-ai-wizard-return`)}catch{}v(!1),window.location.hash=`/ai-wizard`},children:b(`Back to AI setup`,`ai-rank-suite`)})]}),(0,Go.jsx)(Do,{}),(0,Go.jsx)(Lo,{}),(0,Go.jsx)(No,{}),(0,Go.jsx)(k,{title:b(`AI engine`,`ai-rank-suite`),subtitle:S(b(`Bring your own key — %d providers across the US, Europe, China, gateways and your own servers`,`ai-rank-suite`),ne),action:e.has_key?(0,Go.jsxs)(j,{tone:`good`,children:[`✓ Key stored `,e.key_hint]}):(0,Go.jsx)(j,{tone:`neutral`,children:b(`No key`,`ai-rank-suite`)}),children:(0,Go.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Go.jsxs)(`div`,{children:[(0,Go.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap mb-2`,children:[(0,Go.jsx)(`label`,{className:`block font-medium`,children:b(`Provider`,`ai-rank-suite`)}),(0,Go.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Go.jsx)(qe,{value:p,onChange:m,options:[{id:`all`,label:b(`All`,`ai-rank-suite`)},...Ko.filter(e=>y.some(t=>t.region===e)).map(e=>({id:e,label:qo[e]||e}))]}),(0,Go.jsx)(`input`,{type:`search`,placeholder:b(`Search provider or model…`,`ai-rank-suite`),value:h,onChange:e=>g(e.target.value),className:`w-[190px]`,style:{height:30,fontSize:12.5}})]})]}),(0,Go.jsxs)(`div`,{className:`grid gap-3`,children:[T.map(e=>(0,Go.jsxs)(`div`,{children:[(0,Go.jsx)(`div`,{className:`t-overline mb-1.5`,children:e.label}),(0,Go.jsx)(`div`,{className:`ars-cardgrid`,style:{"--min":`300px`},children:e.items.map(e=>{let t=n.provider===e.id;return(0,Go.jsxs)(`button`,{type:`button`,onClick:()=>te(e),className:`ars-pick${t?` is-active`:``}`,children:[(0,Go.jsxs)(`span`,{className:`ars-pick-title`,children:[e.label,(0,Go.jsx)(`span`,{className:`ars-tag`,style:{color:`var(--ars-c-${Jo[e.region]||`blue`}-ink)`,background:`var(--ars-c-${Jo[e.region]||`blue`})`},children:qo[e.region]||e.region}),x[e.id]&&(0,Go.jsx)(`span`,{className:`ars-tag`,style:{color:`var(--ars-c-green-ink)`,background:`var(--ars-c-green)`},title:`Key stored ${x[e.id]}`,children:b(`Key`,`ai-rank-suite`)}),t&&(0,Go.jsx)(`span`,{style:{marginLeft:`auto`,color:`var(--ars-brand)`},children:`✓`})]}),(0,Go.jsx)(`span`,{className:`ars-pick-note`,children:e.note||e.company})]},e.id)})})]},e.id)),T.length===0&&(0,Go.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`No provider matches that search.`,`ai-rank-suite`)})]})]}),(0,Go.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,Go.jsxs)(`div`,{children:[(0,Go.jsxs)(`label`,{className:`block font-medium mb-1`,children:[`API key for `,w.label]}),(0,Go.jsx)(`input`,{type:`password`,placeholder:x[w.id]?S(b(`Stored (%s) — type to replace`,`ai-rank-suite`),x[w.id]):w.keyHint,value:l,onChange:e=>u(e.target.value),autoComplete:`off`}),(0,Go.jsxs)(`p`,{className:`m-0 mt-1.5 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[`One key per engine — each is kept in its own slot, so switching provider never asks you to type it again. Encrypted on this site (libsodium), never returned by the API.`,w.keyUrl?(0,Go.jsxs)(Go.Fragment,{children:[` `,(0,Go.jsxs)(`a`,{href:w.keyUrl,target:`_blank`,rel:`noreferrer noopener`,children:[`Get a `,w.label,` key ↗`]})]}):null]})]}),(0,Go.jsxs)(`div`,{children:[(0,Go.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Model`,`ai-rank-suite`)}),(w.models||[]).length>0?(0,Go.jsxs)(`select`,{value:n.model||``,onChange:e=>r({model:e.target.value}),children:[(0,Go.jsxs)(`option`,{value:``,children:[`Default — `,w.default]}),w.models.map(e=>(0,Go.jsx)(`option`,{value:e,children:e},e)),n.model&&!w.models.includes(n.model)&&(0,Go.jsx)(`option`,{value:n.model,children:n.model})]}):(0,Go.jsx)(`input`,{type:`text`,placeholder:w.default||`model name`,value:n.model||``,onChange:e=>r({model:e.target.value})}),(0,Go.jsx)(`p`,{className:`m-0 mt-1.5 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Any model id the provider accepts also works — type it in.`,`ai-rank-suite`)})]})]}),w.needsUrl&&(0,Go.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,Go.jsxs)(`div`,{children:[(0,Go.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Base URL`,`ai-rank-suite`)}),(0,Go.jsx)(`input`,{type:`text`,placeholder:w.base||`https://your-endpoint/v1`,value:n.base_url||``,onChange:e=>r({base_url:e.target.value})})]}),n.provider===`azure`&&(0,Go.jsxs)(`div`,{children:[(0,Go.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`API version`,`ai-rank-suite`)}),(0,Go.jsx)(`input`,{type:`text`,placeholder:`2024-10-21`,value:n.api_version||``,onChange:e=>r({api_version:e.target.value})})]})]}),(0,Go.jsx)(Me,{checked:!!n.auto_meta,onChange:e=>r({auto_meta:e}),label:b(`Auto-generate a meta description when a post is first published (only if none exists)`,`ai-rank-suite`)}),(0,Go.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Go.jsx)(A,{onClick:E,busy:o,children:b(`Save`,`ai-rank-suite`)}),(0,Go.jsx)(A,{variant:`ghost`,onClick:ee,busy:o,disabled:!e.has_key,children:b(`Test connection`,`ai-rank-suite`)}),s&&(0,Go.jsx)(j,{tone:`good`,children:`✓ Saved`}),d===`ok`&&(0,Go.jsx)(j,{tone:`good`,children:`✓ Connection works`})]}),c&&(0,Go.jsx)(M,{tone:`serious`,children:c})]})}),(0,Go.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,Go.jsx)(k,{title:b(`What AI powers`,`ai-rank-suite`),subtitle:b(`Available once a key is stored`,`ai-rank-suite`),children:(0,Go.jsxs)(`ul`,{className:`m-0 pl-5 grid gap-1.5 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:[(0,Go.jsxs)(`li`,{children:[(0,Go.jsx)(`strong`,{style:{color:`var(--ars-ink)`},children:b(`Meta descriptions & summaries`,`ai-rank-suite`)}),` `,b(`— per page, in the Content drawer and directly in the block editor sidebar.`,`ai-rank-suite`)]}),(0,Go.jsxs)(`li`,{children:[(0,Go.jsx)(`strong`,{style:{color:`var(--ars-ink)`},children:b(`FAQ generation`,`ai-rank-suite`)}),` `,b(`— grounded question/answer pairs that also feed FAQPage schema and the`,`ai-rank-suite`),` `,(0,Go.jsx)(`code`,{className:`ars-mono`,children:`[airanksuite_faq]`}),` shortcode.`]}),(0,Go.jsxs)(`li`,{children:[(0,Go.jsx)(`strong`,{style:{color:`var(--ars-ink)`},children:b(`Bulk runs`,`ai-rank-suite`)}),` `,b(`— thousands of pages in resumable slices, so a 50,000-product catalogue finishes without a timeout.`,`ai-rank-suite`)]}),(0,Go.jsx)(`li`,{children:b(`Costs stay on your provider account; every call is one small request per page.`,`ai-rank-suite`)})]})}),(0,Go.jsx)(k,{title:b(`Choosing a provider`,`ai-rank-suite`),subtitle:b(`What actually changes`,`ai-rank-suite`),children:(0,Go.jsxs)(`ul`,{className:`m-0 pl-5 grid gap-1.5 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:[(0,Go.jsxs)(`li`,{children:[(0,Go.jsx)(`strong`,{style:{color:`var(--ars-ink)`},children:b(`Data residency`,`ai-rank-suite`)}),` `,b(`— EU providers keep the request inside Europe; self-hosted keeps it inside your own network.`,`ai-rank-suite`)]}),(0,Go.jsxs)(`li`,{children:[(0,Go.jsx)(`strong`,{style:{color:`var(--ars-ink)`},children:b(`Market reach`,`ai-rank-suite`)}),` `,b(`— the Chinese engines answer the queries Google never sees. If you sell into APAC, test against them.`,`ai-rank-suite`)]}),(0,Go.jsxs)(`li`,{children:[(0,Go.jsx)(`strong`,{style:{color:`var(--ars-ink)`},children:b(`Cost per 1,000 pages`,`ai-rank-suite`)}),` `,b(`— a fast small model is usually the right call for descriptions; save the large ones for FAQs.`,`ai-rank-suite`)]}),(0,Go.jsx)(`li`,{children:b(`Switching provider changes nothing you have already generated — your content stays.`,`ai-rank-suite`)})]})})]})]})}var Wo,Go,Ko,qo,Jo,Yo=o((()=>{Wo=u(f(),1),C(),Qa(),O(),dt(),Mo(),Io(),Vo(),Go=_e(),Ko=[`us`,`eu`,`cn`,`any`,`local`],qo={us:`US`,eu:`EU`,cn:`CN`,any:`Gateway`,local:`Local`},Jo={us:`blue`,eu:`green`,cn:`red`,any:`violet`,local:`yellow`}}));function Xo({badge:e=b(`Not run yet`,`ai-rank-suite`),title:t,why:n,action:r,onAction:i,busy:a=!1,disabled:o=!1,ringLabel:s=`Score`,stats:c=[],steps:l=[],previews:u=[],progress:d=null}){let f=l.find(e=>!e.done);return(0,Zo.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Zo.jsxs)(`div`,{className:`ars-hero`,children:[(0,Zo.jsx)(`div`,{className:`ars-hero-ring`,children:(0,Zo.jsx)(Pe,{value:null,size:132,label:s,onLight:!0})}),(0,Zo.jsxs)(`div`,{className:`ars-hero-body`,children:[(0,Zo.jsx)(`span`,{className:`ars-hero-badge`,children:e}),(0,Zo.jsx)(`h2`,{className:`ars-hero-title`,children:t}),(0,Zo.jsx)(`p`,{className:`ars-hero-why`,children:n}),(0,Zo.jsxs)(`div`,{className:`ars-hero-actions`,children:[r&&(0,Zo.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:i,disabled:a||o,children:a?b(`Working…`,`ai-rank-suite`):r}),f&&f.action&&(0,Zo.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,onClick:f.onAction,children:f.action})]}),d&&d.running&&(0,Zo.jsx)(`div`,{className:`ars-hero-progress`,children:(0,Zo.jsx)(ze,{label:d.label,done:d.done,total:d.total,percent:d.percent,note:d.note})})]}),(0,Zo.jsx)(`div`,{className:`ars-hero-stats`,children:c.slice(0,4).map(e=>(0,Zo.jsxs)(`div`,{className:`ars-hero-stat`,style:{cursor:`default`},title:e.hint||``,children:[(0,Zo.jsx)(`span`,{className:`ars-hero-stat-v`,style:{color:`var(--ars-ink-3)`},children:`—`}),(0,Zo.jsx)(`span`,{className:`ars-hero-stat-l`,children:e.label})]},e.label))})]}),l.length>0&&(0,Zo.jsx)(`ol`,{className:`ars-steps`,children:l.map((e,t)=>(0,Zo.jsxs)(`li`,{className:`ars-step${e.done?` is-done`:``}${f===e?` is-next`:``}`,children:[(0,Zo.jsx)(`span`,{className:`ars-step-n`,children:e.done?`✓`:t+1}),(0,Zo.jsxs)(`span`,{className:`grid gap-0.5 min-w-0`,children:[(0,Zo.jsx)(`span`,{className:`ars-step-label`,children:e.label}),e.detail&&(0,Zo.jsx)(`span`,{className:`ars-step-detail`,children:e.detail})]}),!e.done&&e.action&&(0,Zo.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,onClick:e.onAction,children:e.action})]},e.label))}),u.length>0&&(0,Zo.jsx)(`div`,{className:`ars-previews`,children:u.map(e=>(0,Zo.jsxs)(`div`,{className:`ars-preview`,children:[(0,Zo.jsx)(`span`,{className:`ars-preview-title`,children:e.title}),(0,Zo.jsx)(`span`,{className:`ars-preview-text`,children:e.text})]},e.title))})]})}var Zo,Qo=o((()=>{f(),C(),dt(),Zo=_e()})),$o=c({default:()=>is});function es({items:e,onChange:t,placeholder:n,max:r=25,addLabel:i=b(`Add`,`ai-rank-suite`),stats:a=null}){let[o,s]=(0,as.useState)(``),c=()=>{let n=o.trim();!n||e.includes(n)||e.length>=r||(t([...e,n]),s(``))};return(0,H.jsxs)(`div`,{className:`grid gap-2`,children:[(0,H.jsxs)(`form`,{className:`flex gap-2`,onSubmit:e=>{e.preventDefault(),c()},children:[(0,H.jsx)(`input`,{type:`text`,placeholder:n,value:o,onChange:e=>s(e.target.value),disabled:e.length>=r}),(0,H.jsx)(A,{variant:`ghost`,onClick:c,disabled:!o.trim()||e.length>=r,children:i})]}),e.length>0&&a&&(0,H.jsx)(`div`,{className:`ars-table-wrap`,children:(0,H.jsxs)(`table`,{className:`ars-table`,children:[(0,H.jsx)(`thead`,{children:(0,H.jsxs)(`tr`,{children:[(0,H.jsx)(`th`,{children:b(`Question`,`ai-rank-suite`)}),(0,H.jsx)(`th`,{className:`is-num`,style:{width:90},children:b(`Hit rate`,`ai-rank-suite`)}),(0,H.jsx)(`th`,{className:`is-num`,style:{width:70},children:b(`Best`,`ai-rank-suite`)}),(0,H.jsx)(`th`,{className:`is-num`,style:{width:120},children:b(`Last run`,`ai-rank-suite`)}),(0,H.jsx)(`th`,{style:{width:70}})]})}),(0,H.jsx)(`tbody`,{children:e.map(n=>{let r=a(n)||{};return(0,H.jsxs)(`tr`,{children:[(0,H.jsx)(`td`,{className:`font-medium`,children:n}),(0,H.jsx)(`td`,{className:`is-num`,children:(0,H.jsx)(`span`,{className:`font-semibold tabular-nums`,style:{color:r.hit_rate==null?`var(--ars-ink-3)`:r.hit_rate>=70?`var(--ars-good)`:r.hit_rate>=30?`var(--ars-warning)`:`var(--ars-serious)`},children:r.hit_rate==null?b(`new`,`ai-rank-suite`):`${r.hit_rate}%`})}),(0,H.jsx)(`td`,{className:`is-num is-muted`,children:r.best?`#${r.best}`:`–`}),(0,H.jsx)(`td`,{className:`is-num`,children:r.last===void 0?(0,H.jsx)(`span`,{className:`is-muted`,children:`–`}):r.last?(0,H.jsxs)(j,{tone:`good`,children:[b(`named`,`ai-rank-suite`),r.lastPos?` #${r.lastPos}`:``]}):(0,H.jsx)(j,{tone:`serious`,children:b(`not named`,`ai-rank-suite`)})}),(0,H.jsx)(`td`,{className:`is-num`,children:(0,H.jsx)(`button`,{type:`button`,className:`ars-chip`,onClick:()=>t(e.filter(e=>e!==n)),"aria-label":S(b(`Remove %s`,`ai-rank-suite`),n),children:b(`Remove`,`ai-rank-suite`)})})]},n)})})]})}),e.length>0&&!a&&(0,H.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.map((n,r)=>(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 pl-3 pr-2 py-1 ars-r-sm text-[12.5px]`,style:{background:`var(--ars-surface-2)`,border:`1px solid var(--ars-border)`},children:[n,(0,H.jsx)(`button`,{type:`button`,"aria-label":S(b(`Remove %s`,`ai-rank-suite`),n),className:`border-0 bg-transparent cursor-pointer p-0 inline-flex`,style:{color:`var(--ars-ink-3)`},onClick:()=>t(e.filter((e,t)=>t!==r)),children:(0,H.jsx)(Rt,{size:12})})]},`${n}-${r}`))})]})}function ts({cell:e,label:t}){if(!e)return(0,H.jsx)(`span`,{title:S(b(`%s: not monitored yet`,`ai-rank-suite`),t),className:`ars-cell`,style:{background:`var(--ars-surface-3)`,opacity:.5}});if(!e.mentioned)return(0,H.jsx)(`span`,{title:S(b(`%s: not mentioned`,`ai-rank-suite`),t),className:`ars-cell`,style:{background:`#f6aea9`}});let n=e.position>0&&e.position<=3?`#188038`:e.position<=6?`#81c995`:`#f9ab00`;return(0,H.jsx)(`span`,{title:`${e.position>0?S(b(`%1$s: mentioned at #%2$d`,`ai-rank-suite`),t,e.position):S(b(`%s: mentioned`,`ai-rank-suite`),t)}${e.cited?` · ${b(`cited`,`ai-rank-suite`)}`:``}`,className:`ars-cell`,style:{background:n},children:e.cited&&(0,H.jsx)(`span`,{className:`ars-cell-dot`,"aria-hidden":!0})})}function ns({row:e,track:t,runs:n,onClose:r}){if(!e)return null;let i=os[e.sentiment]||os.neutral,a=e.mentioned?e.position>3?b(`You are in the answer but late. Assistants lead with the source that is most specific — add concrete numbers, a comparison table, or a clear "best for X" statement to the page that covers this.`,`ai-rank-suite`):e.linked?b(`You own this one: your URL appears in the simulated answer. Keep the page fresh — assistants drop stale sources first.`,`ai-rank-suite`):e.cited?b(`The model says it would cite you, but no link to your site appeared in its answer — an estimate, not an observation. A canonical, well-structured page usually turns that into a real link.`,`ai-rank-suite`):b(`You are named early but not linked. A citation usually follows from a canonical, well-structured page: check that this topic has one page rather than three overlapping ones.`,`ai-rank-suite`):b(`Publish a page that answers this question directly in its opening paragraph, name your brand in that answer, and mark it up as FAQPage or Article. Assistants quote the source that states the answer plainly.`,`ai-rank-suite`);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`button`,{type:`button`,className:`ars-scrim`,"aria-label":b(`Close panel`,`ai-rank-suite`),onClick:r}),(0,H.jsx)(`aside`,{className:`ars-drawer`,role:`dialog`,"aria-modal":`true`,"aria-label":b(`Prompt result`,`ai-rank-suite`),children:(0,H.jsxs)(`div`,{className:`p-5 grid gap-4`,children:[(0,H.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,H.jsx)(`h2`,{className:`m-0 text-[16px] font-bold leading-snug`,children:e.prompt}),(0,H.jsx)(`button`,{type:`button`,onClick:r,"aria-label":b(`Close`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer p-1`,style:{color:`var(--ars-ink-3)`},children:(0,H.jsx)(Rt,{size:16})})]}),(0,H.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[e.mentioned?(0,H.jsxs)(j,{tone:`good`,children:[`✓ `,e.position>0?S(b(`Mentioned at #%d`,`ai-rank-suite`),e.position):b(`Mentioned`,`ai-rank-suite`)]}):(0,H.jsxs)(j,{tone:`serious`,children:[`✕ `,b(`Not mentioned`,`ai-rank-suite`)]}),e.linked&&(0,H.jsx)(j,{tone:`brand`,children:b(`Your URL in the answer`,`ai-rank-suite`)}),!e.linked&&e.cited&&(0,H.jsx)(j,{tone:`neutral`,title:b(`The model's own estimate — no link was observed`,`ai-rank-suite`),children:b(`would cite (estimate)`,`ai-rank-suite`)}),e.model&&(0,H.jsxs)(`span`,{className:`t-caption`,title:b(`This is a simulation of one model's answer, not a live query of a real assistant`,`ai-rank-suite`),children:[b(`simulated`,`ai-rank-suite`),` · `,e.provider,` `,e.model]}),(0,H.jsx)(j,{tone:i.tone,children:S(b(`%s tone`,`ai-rank-suite`),i.label)})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`text-[12px] font-semibold mb-1`,style:{color:`var(--ars-ink-3)`},children:b(`What the assistant answered`,`ai-rank-suite`)}),(0,H.jsx)(`div`,{className:`ars-r-lg px-4 py-3 text-[13px] leading-relaxed`,style:{background:`var(--ars-surface-2)`},children:e.snippet||b(`No answer text was stored for this run.`,`ai-rank-suite`)})]}),e.competitors?.length>0&&(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`text-[12px] font-semibold mb-1.5`,style:{color:`var(--ars-ink-3)`},children:b(`Named in the same answer`,`ai-rank-suite`)}),(0,H.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.competitors.map(e=>(0,H.jsx)(`span`,{className:`px-3 py-1 ars-r-sm text-[12.5px]`,style:{background:`var(--ars-surface-2)`,border:`1px solid var(--ars-border)`},children:e},e))})]}),t&&t.series.length>0&&(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`text-[12px] font-semibold mb-1.5`,style:{color:`var(--ars-ink-3)`},children:b(`Every run for this question`,`ai-rank-suite`)}),(0,H.jsx)(`div`,{className:`grid gap-1.5`,children:t.series.map((e,t)=>(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-3 ars-r-lg px-3 py-2 text-[12.5px]`,style:{background:`var(--ars-surface-2)`},children:[(0,H.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:n[t]?.label??S(b(`Run %d`,`ai-rank-suite`),t+1)}),(0,H.jsx)(`span`,{className:`flex items-center gap-2`,children:e?e.mentioned?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(j,{tone:`good`,children:[`#`,e.position||`?`]}),e.linked&&(0,H.jsx)(j,{tone:`brand`,children:b(`linked`,`ai-rank-suite`)}),!e.linked&&e.cited&&(0,H.jsx)(j,{tone:`neutral`,children:b(`would cite`,`ai-rank-suite`)})]}):(0,H.jsx)(j,{tone:`serious`,children:b(`not mentioned`,`ai-rank-suite`)}):(0,H.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:b(`not monitored yet`,`ai-rank-suite`)})})]},t))})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`text-[12px] font-semibold mb-1`,style:{color:`var(--ars-ink-3)`},children:b(`What to do next`,`ai-rank-suite`)}),(0,H.jsx)(`div`,{className:`ars-r-lg px-4 py-3 text-[12.5px] leading-relaxed`,style:{background:`var(--ars-grad-soft)`},children:a})]}),(0,H.jsx)(`div`,{className:`text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:e.checked_at?S(b(`Checked %s`,`ai-rank-suite`),new Date(e.checked_at.replace(` `,`T`)+`Z`).toLocaleString()):null})]})})]})}function rs(e){return e.map((e,t)=>{let n=Number(e.position)||0,r=0;e.mentioned&&(r+=60,r+=n===1?25:n===2?18:n===3?12:6,e.linked?r+=15:e.cited&&(r+=5));let i=(e.competitors||[]).length;return{id:`${t}-${e.prompt}`,label:e.prompt,score:Math.min(100,r),sub:e.mentioned?[n>0?n===1?b(`named first`,`ai-rank-suite`):n===2?b(`named second`,`ai-rank-suite`):S(b(`named %dth`,`ai-rank-suite`),n):b(`named`,`ai-rank-suite`),e.cited?b(`with a link`,`ai-rank-suite`):b(`no link`,`ai-rank-suite`),e.sentiment&&e.sentiment!==`neutral`?os[e.sentiment]?.label||e.sentiment:null].filter(Boolean).join(` · `):i>0?S(b(`not named — %s was`,`ai-rank-suite`),(e.competitors||[]).slice(0,2).join(`, `)):b(`not named in the answer`,`ai-rank-suite`),segments:[{label:b(`You`,`ai-rank-suite`),value:+!!e.mentioned,color:`var(--ars-c-green-ink)`},{label:b(`Rivals named instead`,`ai-rank-suite`),value:i,color:`var(--ars-accent)`},{label:b(`Nobody`,`ai-rank-suite`),value:e.mentioned||i?0:1,color:`var(--ars-ink-3)`}],reach:e.mentioned?b(`in the answer`,`ai-rank-suite`):S(x(`%d rival`,`%d rivals`,i,`ai-rank-suite`),i)}}).sort((e,t)=>e.score-t.score)}function is({tab:e=`track`,onTab:t}){let[n,r]=(0,as.useState)(null),[i,a]=(0,as.useState)(null),[o,s]=(0,as.useState)(null),[c,l]=(0,as.useState)(null),[u,d]=(0,as.useState)(!1),[f,p]=(0,as.useState)(!1),[m,h]=(0,as.useState)(null),[g,_]=(0,as.useState)(!1),[v,y]=(0,as.useState)(null),[C,w]=(0,as.useState)(!1),[T,E]=(0,as.useState)(null),[ee,te]=(0,as.useState)(null),ne=()=>{D.get(`/ai-visibility/results`).then(a).catch(()=>{}),D.get(`/ai-visibility/matrix`).then(s).catch(()=>{}),D.get(`/ai-visibility/trend`).then(l).catch(()=>{})};if((0,as.useEffect)(()=>{D.get(`/settings/ai-visibility`).then(r).catch(e=>E(e.message)),ne()},[]),!n)return(0,H.jsx)(Ce,{error:T});let re=n.settings,O=e=>r({...n,settings:{...re,...e}}),ie=async()=>{d(!0),E(null);try{r(await D.put(`/settings/ai-visibility`,re)),w(!0),setTimeout(()=>w(!1),2200)}catch(e){E(e.message)}finally{d(!1)}},ae=async()=>{p(!0),E(null);try{await D.put(`/settings/ai-visibility`,re);let e=await D.post(`/ai-visibility/run`);for(h(e);e.state===`running`;)(e.busy||e.error)&&await new Promise(e=>setTimeout(e,2e3)),e=await D.post(`/ai-visibility/run/tick`),h(e);h(null),a(await D.get(`/ai-visibility/results`)),D.get(`/ai-visibility/matrix`).then(s).catch(()=>{}),D.get(`/ai-visibility/trend`).then(l).catch(()=>{})}catch(e){E(e.message),h(null)}finally{p(!1)}},oe=async()=>{_(!0),E(null);try{await D.put(`/settings/ai-visibility`,re);let e=await D.post(`/ai-visibility/suggest`,{count:10});y(e.prompts)}catch(e){E(e.message)}finally{_(!1)}},se=e=>{re.prompts.includes(e)||re.prompts.length>=n.max_prompts||(O({prompts:[...re.prompts,e]}),y(v.filter(t=>t!==e)))},ce=i?.rows||[],le=ce.filter(e=>e.mentioned).length,ue=ce.filter(e=>e.cited).length,de=ce.filter(e=>e.mentioned&&e.position>0&&e.position<=3).length,fe=i?.history||[],pe=!!(c&&c.series&&c.series.length>0&&c.runs&&c.runs.length>1),me=!!(i&&Array.isArray(i.competitors)&&i.competitors.length>0),he=o?.runs||[],ge=ce.reduce((e,t)=>e+(Number(t.cost_micro)||0),0),_e=ce.find(e=>e.model)?.model||``,ve=(()=>{let e=new Map;return ce.forEach(t=>(t.urls||[]).forEach(t=>e.set(t,(e.get(t)||0)+1))),[...e.entries()].map(([e,t])=>{let n=e;try{let t=new URL(e);n=t.pathname===`/`?t.host:t.pathname}catch{}return{url:e,count:t,path:n}}).sort((e,t)=>t.count-e.count).slice(0,8)})(),ye=(()=>{let e=i?.score??0,t=ce.length,n=t-le,r=i?.competitors?.[0],a=t?Math.round(le/t*100):0,o=r&&r.share>a?r.name:null,s=o?S(b(`Your model names you in %1$d of %2$d simulated answers — %3$s in more.`,`ai-rank-suite`),le,t,o):S(b(`Your model names you in %1$d of %2$d simulated answers.`,`ai-rank-suite`),le,t);return e>=75?{tone:`good`,badge:b(`Recommended`,`ai-rank-suite`),text:s,why:ue>0?S(b(`%d of them would link to you — keep those pages strong; a link is the only part of an AI answer that sends a visitor.`,`ai-rank-suite`),ue):b(`Named, but never linked: the next gain is a page per question that answers it directly enough to be cited.`,`ai-rank-suite`)}:e>=45?{tone:`warning`,badge:b(`Sometimes named`,`ai-rank-suite`),text:s,why:n>0?`${S(x(`%d question your customers ask still gets answered without you — the work list below, worst first.`,`%d questions your customers ask still get answered without you — the work list below, worst first.`,n,`ai-rank-suite`),n)}${de<le?` ${S(b(`And of the answers that name you, only %d put you in the top three.`,`ai-rank-suite`),de)}`:``}`:S(b(`Named everywhere, but late: only %1$d of %2$d answers put you in the top three, and %3$d link to you. Position and citations are the remaining score.`,`ai-rank-suite`),de,t,ue)}:{tone:`bad`,badge:b(`Mostly invisible`,`ai-rank-suite`),text:le===0?S(b(`Assistants do not name you for any of the %d monitored questions yet.`,`ai-rank-suite`),t):s,why:b(`A generated answer has no page two: a brand that is not named does not exist for that question. Each row of the work list is a page to write or sharpen.`,`ai-rank-suite`)}})();return(0,H.jsxs)(`div`,{className:`ars-page`,children:[T&&(0,H.jsx)(M,{tone:`serious`,children:T}),!n.has_ai_key&&ce.length>0&&(0,H.jsxs)(M,{tone:`info`,children:[b(`Connect an AI key first (AI Engine page) — answer simulations query your configured model.`,`ai-rank-suite`),` `,(0,H.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent cursor-pointer p-0 font-semibold`,style:{color:`var(--ars-brand)`},onClick:()=>{window.location.hash=`/ai`},children:b(`Open AI Engine →`,`ai-rank-suite`)})]}),ce.length===0&&(0,H.jsx)(Xo,{badge:b(`No simulation yet`,`ai-rank-suite`),ringLabel:b(`Answer score`,`ai-rank-suite`),title:b(`No answer has been simulated yet — you do not know whether assistants recommend you.`,`ai-rank-suite`),why:b(`Each run asks your configured AI model the questions your customers ask an assistant, exactly as they would, and records whether you are named, how early, whether you are linked, and who is named instead. From the second run it is a trend; from the first it is a work list.`,`ai-rank-suite`),action:f?m?.total?S(b(`Checking… %1$s / %2$s`,`ai-rank-suite`),m.done,m.total):b(`Checking…`,`ai-rank-suite`):b(`Run the first check`,`ai-rank-suite`),onAction:ae,busy:f,disabled:!n.has_ai_key||!re.prompts.length,stats:[{label:b(`Named (simulated)`,`ai-rank-suite`)},{label:b(`In the top 3 (simulated)`,`ai-rank-suite`)},{label:b(`Would cite (simulated)`,`ai-rank-suite`)},{label:b(`Rival brands named (simulated)`,`ai-rank-suite`)}],steps:[{label:b(`Connect an AI model`,`ai-rank-suite`),detail:n.has_ai_key?b(`Connected — the simulation uses your configured model and key.`,`ai-rank-suite`):b(`The simulation queries your own model. OpenAI, Anthropic, Mistral and others under AI Engine.`,`ai-rank-suite`),done:!!n.has_ai_key,action:b(`Open AI Engine`,`ai-rank-suite`),onAction:()=>{window.location.hash=`/ai`}},{label:b(`Add the questions your customers ask`,`ai-rank-suite`),detail:re.prompts.length?S(x(`%1$d prompt monitored — up to %2$d.`,`%1$d prompts monitored — up to %2$d.`,re.prompts.length,`ai-rank-suite`),re.prompts.length,n.max_prompts):b(`Five to twenty-five real questions — “best … in …”, “where to …”. The AI can suggest them from your content.`,`ai-rank-suite`),done:re.prompts.length>0,action:b(`Add prompts`,`ai-rank-suite`),onAction:()=>t&&t(`prompts`)},{label:b(`Name your brand and rivals`,`ai-rank-suite`),detail:re.brand?`${re.brand}${re.competitors?.length?` · ${S(x(`%d rival`,`%d rivals`,re.competitors.length,`ai-rank-suite`),re.competitors.length)}`:``}`:b(`What the AI must say for a mention to count, and who else you expect it to name.`,`ai-rank-suite`),done:!!re.brand,action:b(`Open Brand`,`ai-rank-suite`),onAction:()=>t&&t(`brand`)},{label:b(`Run the first check`,`ai-rank-suite`),detail:b(`One model call per prompt. Weekly automation is on the Brand tab.`,`ai-rank-suite`),done:!1}],previews:[{title:b(`Share of voice`,`ai-rank-suite`),text:b(`You and each rival across every run — who is gaining ground in the answers and who is losing it.`,`ai-rank-suite`)},{title:b(`Work list`,`ai-rank-suite`),text:b(`The questions you are not the answer to, worst first, with who was named instead and the answer itself.`,`ai-rank-suite`)},{title:b(`Pages the assistant cites`,`ai-rank-suite`),text:b(`Your URLs that appear in answers — the only part of an AI answer that sends a visitor.`,`ai-rank-suite`)}]}),ce.length>0&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`ars-hero`,children:[(0,H.jsx)(`div`,{className:`ars-hero-ring`,children:(0,H.jsx)(Pe,{value:i.score,size:132,label:b(`Answer score`,`ai-rank-suite`),onLight:!0})}),(0,H.jsxs)(`div`,{className:`ars-hero-body`,children:[(0,H.jsx)(`span`,{className:`ars-hero-badge is-${ye.tone}`,children:ye.badge}),(0,H.jsx)(`h2`,{className:`ars-hero-title`,children:ye.text}),(0,H.jsx)(`p`,{className:`ars-hero-why`,children:ye.why}),(0,H.jsxs)(`div`,{className:`ars-hero-actions`,children:[(0,H.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:ae,disabled:f||!n.has_ai_key||!re.prompts.length,children:f?m?.total?S(b(`Checking… %1$s / %2$s`,`ai-rank-suite`),m.done,m.total):b(`Checking…`,`ai-rank-suite`):b(`Run check now`,`ai-rank-suite`)}),(0,H.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,onClick:()=>t&&t(`prompts`),children:b(`Edit prompts`,`ai-rank-suite`)}),(0,H.jsxs)(`span`,{className:`t-caption`,children:[i.last_run?`${S(b(`Last run %s`,`ai-rank-suite`),new Date(i.last_run.time*1e3).toLocaleString())} · `:``,S(x(`%d prompt`,`%d prompts`,ce.length,`ai-rank-suite`),ce.length),_e?` · ${_e}`:``,ge>0?` · ${S(b(`$%s per run`,`ai-rank-suite`),(ge/1e6).toFixed(ge>=1e5?2:3))}`:``]})]}),f&&m?.total>0&&(0,H.jsx)(`div`,{className:`mt-2`,children:(0,H.jsx)(ze,{label:S(b(`Asking the engines — %1$s of %2$s`,`ai-rank-suite`),Number(m.done).toLocaleString(),Number(m.total).toLocaleString()),done:m.done,total:m.total})})]}),(0,H.jsx)(`div`,{className:`ars-hero-stats`,children:[{label:b(`Named (simulated)`,`ai-rank-suite`),value:`${le} / ${ce.length}`,tone:le>=ce.length/2?`good`:`warn`},{label:b(`In the top 3`,`ai-rank-suite`),value:de,tone:de>0?`good`:void 0},{label:b(`Would cite (simulated)`,`ai-rank-suite`),value:ue,tone:ue>0?`good`:`warn`},{label:b(`Rival brands named (simulated)`,`ai-rank-suite`),value:i.competitors?i.competitors.length:0,tone:i.competitors?.length?`warn`:void 0}].map(e=>(0,H.jsxs)(`div`,{className:`ars-hero-stat`,style:{cursor:`default`},children:[(0,H.jsx)(`span`,{className:`ars-hero-stat-v${e.tone?` is-`+e.tone:``}`,children:e.value}),(0,H.jsx)(`span`,{className:`ars-hero-stat-l`,children:e.label})]},e.label))})]}),(0,H.jsxs)(`div`,{className:`grid gap-4 items-stretch${pe&&me?` lg:grid-cols-2`:``}`,children:[(0,H.jsx)(k,{title:b(`Answer score over time`,`ai-rank-suite`),subtitle:b(`One point per simulation run — the number that should be rising`,`ai-rank-suite`),action:fe.length>1?(0,H.jsx)(We,{value:fe[fe.length-1].value-fe[0].value,suffix:` ${b(`since first run`,`ai-rank-suite`)}`}):null,children:(0,H.jsx)(Le,{data:fe,label:b(`Answer score`,`ai-rank-suite`),formatValue:e=>`${e}/100`,height:150})}),pe?(0,H.jsx)(k,{title:b(`Share of voice`,`ai-rank-suite`),subtitle:b(`How often each name is present in the answers — across every run, not just the last one`,`ai-rank-suite`),children:(0,H.jsx)(`div`,{className:`grid gap-2.5`,children:[...c.series].sort((e,t)=>t.latest-e.latest).map(e=>{let t=e.latest-e.first;return(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsxs)(`span`,{className:`truncate text-[13px]`,style:{width:150,fontWeight:e.isBrand?600:400,color:e.isBrand?`var(--ars-ink)`:`var(--ars-ink-2)`},children:[e.name,e.isBrand?` · ${b(`you`,`ai-rank-suite`)}`:``]}),(0,H.jsx)(`span`,{className:`flex-1 min-w-0`,children:(0,H.jsx)(Ue,{data:e.points,color:e.color,height:26})}),(0,H.jsxs)(`span`,{className:`t-num text-[14px]`,style:{width:46,textAlign:`right`},children:[e.latest,`%`]}),(0,H.jsx)(`span`,{style:{width:54,textAlign:`right`},children:(0,H.jsx)(We,{value:t,suffix:`pp`})})]},e.name)})})}):i?.competitors?.length>0&&(0,H.jsx)(k,{title:b(`Share of voice`,`ai-rank-suite`),subtitle:b(`Who the assistant names instead of, or alongside, you — from the last run`,`ai-rank-suite`),children:(0,H.jsx)(Xe,{items:i.competitors.map(e=>({key:e.name,label:e.name,value:e.share})),max:100,color:`var(--ars-series-3)`,format:e=>`${e}%`})})]}),(0,H.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2 items-stretch`,children:[(0,H.jsx)(k,{title:b(`Work list`,`ai-rank-suite`),subtitle:b(`The questions you are not the answer to — worst first`,`ai-rank-suite`),flush:!0,children:(0,H.jsx)(`div`,{className:`ars-worklist`,children:rs(ce).slice(0,6).map(e=>{let t=ce.find(t=>t.prompt===e.label);return(0,H.jsxs)(`button`,{type:`button`,className:`ars-work`,onClick:()=>t&&te(t),children:[(0,H.jsx)(`span`,{className:`ars-work-score t-num is-${e.score>=80?`good`:e.score>=50?`mid`:`bad`}`,children:e.score}),(0,H.jsxs)(`span`,{className:`ars-work-body`,children:[(0,H.jsx)(`span`,{className:`ars-work-label`,children:e.label}),(0,H.jsx)(`span`,{className:`ars-work-sub`,children:e.sub})]}),(0,H.jsx)(`span`,{className:`ars-work-go`,"aria-hidden":!0,children:`›`})]},e.id)})})}),(0,H.jsx)(k,{title:b(`Pages the assistant cites`,`ai-rank-suite`),subtitle:ve.length?b(`Your URLs found in the last run’s answers, most cited first`,`ai-rank-suite`):b(`No URL of yours appeared in an answer yet`,`ai-rank-suite`),flush:!0,children:ve.length===0?(0,H.jsx)(`div`,{className:`px-4 py-4 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`A citation needs a page that answers the question directly — a heading that is the question, a first paragraph that is the answer. The work list on the left is where to start.`,`ai-rank-suite`)}):(0,H.jsx)(`div`,{className:`ars-citelist`,children:ve.map(e=>(0,H.jsxs)(`a`,{className:`ars-cite`,href:e.url,target:`_blank`,rel:`noreferrer`,children:[(0,H.jsx)(`span`,{className:`ars-cite-url ars-mono`,title:e.url,children:e.path}),(0,H.jsxs)(`span`,{className:`ars-cite-n tabular-nums`,children:[e.count,` `,x(`answer`,`answers`,e.count,`ai-rank-suite`)]})]},e.url))})})]})]}),(0,H.jsx)(Ie,{tabs:[{id:`track`,label:b(`Tracker`,`ai-rank-suite`)},{id:`prompts`,label:S(b(`Prompts (%d)`,`ai-rank-suite`),re.prompts.length)},{id:`brand`,label:b(`Brand`,`ai-rank-suite`)}],active:e,onChange:t,right:ce.length===0&&(0,H.jsx)(A,{onClick:ae,busy:f,disabled:!n.has_ai_key||!re.prompts.length,children:f?m?.total?S(b(`Checking… %1$s / %2$s`,`ai-rank-suite`),m.done,m.total):b(`Checking…`,`ai-rank-suite`):b(`Run first check`,`ai-rank-suite`)})}),e===`track`&&(0,H.jsx)(`div`,{className:`grid gap-4`,children:(0,H.jsx)(k,{title:b(`Prompt tracker`,`ai-rank-suite`),subtitle:b(`One row per question, one cell per run. Weakest questions first — those are your work list.`,`ai-rank-suite`),action:he.length>0&&(0,H.jsxs)(`span`,{className:`text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:[S(x(`%d run`,`%d runs`,he.length,`ai-rank-suite`),he.length),` · `,he[0].label,` → `,he[he.length-1].label]}),children:!o||o.prompts.length===0?(0,H.jsxs)(`div`,{className:`ars-r-lg px-4 py-5 grid gap-2 place-items-start`,style:{background:`var(--ars-surface-2)`},children:[(0,H.jsx)(`div`,{className:`font-medium text-[13px]`,children:b(`No runs yet`,`ai-rank-suite`)}),(0,H.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Add the questions your customers ask, then run a check. From the second run onward this becomes a tracker.`,`ai-rank-suite`)}),(0,H.jsx)(A,{variant:`tonal`,onClick:()=>t(`prompts`),children:b(`Add prompts`,`ai-rank-suite`)})]}):(0,H.jsxs)(`div`,{className:`grid gap-3`,children:[(0,H.jsx)(`div`,{className:`ars-table-wrap`,children:(0,H.jsxs)(`table`,{className:`ars-table`,children:[(0,H.jsx)(`thead`,{children:(0,H.jsxs)(`tr`,{children:[(0,H.jsx)(`th`,{children:b(`Question`,`ai-rank-suite`)}),(0,H.jsx)(`th`,{style:{width:190},children:b(`Runs`,`ai-rank-suite`)}),(0,H.jsx)(`th`,{className:`is-num`,style:{width:100},children:b(`Hit rate`,`ai-rank-suite`)}),(0,H.jsx)(`th`,{className:`is-num`,style:{width:80},children:b(`Best`,`ai-rank-suite`)})]})}),(0,H.jsx)(`tbody`,{children:o.prompts.map(e=>{let t=ce.find(t=>t.prompt===e.prompt);return(0,H.jsxs)(`tr`,{style:{cursor:t?`pointer`:`default`},onClick:()=>t&&te(t),children:[(0,H.jsx)(`td`,{className:`font-medium`,style:{maxWidth:420},children:e.prompt}),(0,H.jsx)(`td`,{children:(0,H.jsx)(`span`,{className:`flex items-end gap-[3px]`,children:e.series.map((e,t)=>(0,H.jsx)(ts,{cell:e,label:he[t]?.label??S(b(`run %d`,`ai-rank-suite`),t+1)},t))})}),(0,H.jsx)(`td`,{className:`is-num`,children:(0,H.jsx)(`span`,{className:`font-semibold tabular-nums`,style:{color:e.hit_rate==null?`var(--ars-ink-3)`:e.hit_rate>=70?`var(--ars-good)`:e.hit_rate>=30?`var(--ars-warning)`:`var(--ars-serious)`},children:e.hit_rate==null?`–`:`${e.hit_rate}%`})}),(0,H.jsx)(`td`,{className:`is-num`,style:{color:`var(--ars-ink-2)`},children:e.best?`#${e.best}`:`–`})]},e.prompt)})})]})}),(0,H.jsxs)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-1 text-[11.5px]`,style:{color:`var(--ars-ink-2)`},children:[[[`#188038`,b(`top 3`,`ai-rank-suite`)],[`#81c995`,b(`top 6`,`ai-rank-suite`)],[`#f9ab00`,b(`mentioned, further down`,`ai-rank-suite`)],[`#f6aea9`,b(`not mentioned`,`ai-rank-suite`)],[`var(--ars-surface-3)`,b(`not monitored yet`,`ai-rank-suite`)]].map(([e,t])=>(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,H.jsx)(`span`,{"aria-hidden":!0,style:{width:10,height:10,borderRadius:3,background:e,display:`inline-block`}}),t]},t)),(0,H.jsxs)(`span`,{children:[`· `,b(`a dot means the assistant linked to you`,`ai-rank-suite`)]})]})]})})}),e===`prompts`&&(0,H.jsx)(k,{title:b(`Monitored prompts`,`ai-rank-suite`),subtitle:S(b(`Questions your customers ask AI assistants — up to %d`,`ai-rank-suite`),n.max_prompts),action:(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[C&&(0,H.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,H.jsx)(A,{variant:`ghost`,onClick:oe,busy:g,disabled:!n.has_ai_key,children:b(`Suggest for me`,`ai-rank-suite`)}),(0,H.jsx)(A,{onClick:ie,busy:u,children:b(`Save`,`ai-rank-suite`)})]}),children:(0,H.jsxs)(`div`,{className:`grid gap-4`,children:[(0,H.jsx)(es,{items:re.prompts,onChange:e=>O({prompts:e}),placeholder:b(`e.g. What is the best SEO plugin for WordPress?`,`ai-rank-suite`),max:n.max_prompts,addLabel:b(`Add prompt`,`ai-rank-suite`),stats:o&&o.prompts&&o.prompts.length>0?e=>{let t=o.prompts.find(t=>t.prompt===e),n=ce.find(t=>t.prompt===e);return!t&&!n?{}:{hit_rate:t?t.hit_rate:null,best:t?t.best:null,last:n?!!n.mentioned:void 0,lastPos:n&&Number(n.position)||0}}:null}),v&&(0,H.jsxs)(`div`,{className:`ars-r-lg px-4 py-4 grid gap-3`,style:{background:`var(--ars-grad-soft)`,border:`1px solid var(--ars-border)`},children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,H.jsxs)(`div`,{className:`font-semibold text-[13px] flex items-center gap-1.5`,children:[(0,H.jsx)(zt,{size:13}),b(`Suggested from your own site`,`ai-rank-suite`)]}),(0,H.jsx)(`button`,{type:`button`,"aria-label":b(`Dismiss suggestions`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer p-1`,style:{color:`var(--ars-ink-3)`},onClick:()=>y(null),children:(0,H.jsx)(Rt,{size:14})})]}),v.length===0?(0,H.jsx)(`div`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`All suggestions added. Press “Suggest for me” again for a fresh set.`,`ai-rank-suite`)}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`grid gap-1.5`,children:v.map(e=>(0,H.jsxs)(`button`,{type:`button`,onClick:()=>se(e),className:`flex items-center justify-between gap-3 text-left ars-r-lg px-3.5 py-2.5 cursor-pointer`,style:{background:`var(--ars-surface)`,border:`1px solid var(--ars-border)`},children:[(0,H.jsx)(`span`,{className:`text-[12.5px]`,children:e}),(0,H.jsxs)(`span`,{className:`text-[12px] font-semibold shrink-0`,style:{color:`var(--ars-brand)`},children:[`+ `,b(`Add`,`ai-rank-suite`)]})]},e))}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(A,{variant:`tonal`,onClick:()=>{let e=n.max_prompts-re.prompts.length;O({prompts:[...re.prompts,...v.slice(0,e)]}),y([])},children:b(`Add all`,`ai-rank-suite`)}),(0,H.jsx)(`span`,{className:`text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Nothing is saved until you press Save.`,`ai-rank-suite`)})]})]})]}),(0,H.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Each check asks your configured AI model to answer these questions the way an assistant would — with no hint that you are asking — then records whether it recommends you, how early, and who else it names. Every prompt is one model call, so keep the list to the questions that actually convert.`,`ai-rank-suite`)})]})}),e===`brand`&&(0,H.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-2 items-start`,children:[(0,H.jsx)(k,{title:b(`Brand`,`ai-rank-suite`),subtitle:b(`What the AI must say for a mention to count`,`ai-rank-suite`),action:C&&(0,H.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),children:(0,H.jsxs)(`div`,{className:`grid gap-4`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Brand name`,`ai-rank-suite`)}),(0,H.jsx)(`input`,{type:`text`,placeholder:n.brand_auto,value:re.brand,onChange:e=>O({brand:e.target.value})}),(0,H.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`Leave empty to use the site title.`,`ai-rank-suite`)})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block font-medium mb-1.5`,children:b(`Also known as`,`ai-rank-suite`)}),(0,H.jsx)(es,{items:re.aliases,onChange:e=>O({aliases:e}),placeholder:b(`e.g. short name, domain`,`ai-rank-suite`),max:10})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`block font-medium mb-1.5`,children:b(`Competitors to watch`,`ai-rank-suite`)}),(0,H.jsx)(es,{items:re.competitors,onChange:e=>O({competitors:e}),placeholder:b(`e.g. competitor brand`,`ai-rank-suite`),max:10}),(0,H.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`Rivals are detected automatically too — this list just makes sure the ones you care about are never missed.`,`ai-rank-suite`)})]}),(0,H.jsx)(`div`,{children:(0,H.jsx)(A,{onClick:ie,busy:u,children:b(`Save`,`ai-rank-suite`)})})]})}),(0,H.jsx)(k,{title:b(`Schedule`,`ai-rank-suite`),subtitle:b(`Run answer simulations automatically so it becomes a trend`,`ai-rank-suite`),children:(0,H.jsxs)(`div`,{className:`grid gap-4`,children:[(0,H.jsx)(Me,{checked:!!re.auto,onChange:e=>O({auto:e}),label:b(`Run simulations automatically`,`ai-rank-suite`)}),(0,H.jsxs)(`div`,{className:`sm:max-w-[260px]`,children:[(0,H.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Frequency`,`ai-rank-suite`)}),(0,H.jsxs)(`select`,{value:re.frequency,onChange:e=>O({frequency:e.target.value}),children:[(0,H.jsx)(`option`,{value:`weekly`,children:b(`Weekly`,`ai-rank-suite`)}),(0,H.jsx)(`option`,{value:`daily`,children:b(`Daily`,`ai-rank-suite`)})]}),(0,H.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:S(x(`Every prompt is one model call — with %1$d prompt, weekly costs about %2$d calls a month.`,`Every prompt is one model call — with %1$d prompts, weekly costs about %2$d calls a month.`,re.prompts.length,`ai-rank-suite`),re.prompts.length,re.prompts.length*4)})]}),(0,H.jsx)(`div`,{children:(0,H.jsx)(A,{variant:`ghost`,onClick:ie,busy:u,children:b(`Save`,`ai-rank-suite`)})})]})})]}),(0,H.jsx)(ns,{row:ee,track:ee?(o?.prompts||[]).find(e=>e.prompt===ee.prompt):null,runs:he,onClose:()=>te(null)})]})}var as,H,os,ss=o((()=>{as=u(f(),1),C(),O(),dt(),Vt(),Qo(),H=_e(),os={positive:{tone:`good`,label:b(`positive`,`ai-rank-suite`)},neutral:{tone:`neutral`,label:b(`neutral`,`ai-rank-suite`)},negative:{tone:`serious`,label:b(`negative`,`ai-rank-suite`)}}})),cs=c({default:()=>ds});function ls({label:e,children:t,hint:n}){return(0,ps.jsxs)(`div`,{className:`ars-licrow`,children:[(0,ps.jsxs)(`span`,{className:`ars-licrow-l`,children:[e,n&&(0,ps.jsx)(`span`,{className:`ars-licrow-hint`,children:n})]}),(0,ps.jsx)(`span`,{className:`ars-licrow-v`,children:t})]})}function us({backend:e,onReload:t}){let n=!!e.licensed,r=!!e.connected,i=e.graceDays,a=e.expires?String(e.expires).slice(0,10):null,o=e.siteLimit===null||e.siteLimit===void 0?`Unlimited`:e.siteLimit,s=n?{tone:`good`,badge:b(`Licensed`,`ai-rank-suite`),title:S(b(`%s is active on this site.`,`ai-rank-suite`),e.plan||`AI Rank Suite Agency`),why:a?S(b(`Automatic updates are on and the licence renews on %s. Every Pro action — AI writing, the autopilot, answer simulation — is available.`,`ai-rank-suite`),a):`Automatic updates are on and every Pro action is available.`}:i==null?{tone:`bad`,badge:b(r?`No active licence`:`Not activated`,`ai-rank-suite`),title:b(r?`This site is connected but has no active licence.`:`This site has no licence activated yet.`,`ai-rank-suite`),why:b(`Your settings, reports, schema, redirects and everything already published keep working and stay untouched. Only new Pro actions and automatic updates are paused until a licence is active.`,`ai-rank-suite`)}:{tone:`warning`,badge:S(x(`Grace period · %d day left`,`Grace period · %d days left`,i,`ai-rank-suite`),i),title:b(`The licence server could not be reached, so the last known good licence still applies.`,`ai-rank-suite`),why:b(`This bridges a temporary outage on our side, not an expired licence. If it persists past the grace period, Pro actions pause — your settings, reports and published output stay exactly as they are.`,`ai-rank-suite`)};return(0,ps.jsxs)(`div`,{className:`grid gap-4`,children:[e.error&&(0,ps.jsx)(M,{tone:`warning`,children:e.error}),(0,ps.jsxs)(`div`,{className:`ars-hero`,children:[(0,ps.jsx)(`div`,{className:`ars-hero-ring`,children:(0,ps.jsx)(Pe,{value:n?100:0,size:116,label:b(`Licence`,`ai-rank-suite`),onLight:!0})}),(0,ps.jsxs)(`div`,{className:`ars-hero-body`,children:[(0,ps.jsx)(`span`,{className:`ars-hero-badge is-${s.tone}`,children:s.badge}),(0,ps.jsx)(`h2`,{className:`ars-hero-title`,children:s.title}),(0,ps.jsx)(`p`,{className:`ars-hero-why`,children:s.why}),(0,ps.jsxs)(`div`,{className:`ars-hero-actions`,children:[!n&&e.activateUrl&&(0,ps.jsx)(`a`,{className:`ars-btn ars-btn-primary`,href:e.activateUrl,children:b(`Activate a licence`,`ai-rank-suite`)}),e.manageUrl&&(0,ps.jsx)(`a`,{className:`ars-btn ${n?`ars-btn-primary`:`ars-btn-ghost`}`,href:e.manageUrl,children:b(n?`Manage licence and sites`:`Licence account`,`ai-rank-suite`)}),e.syncUrl&&(0,ps.jsx)(`a`,{className:`ars-linkbtn`,href:e.syncUrl,children:b(`Check for a new version`,`ai-rank-suite`)}),!n&&e.pricingUrl&&(0,ps.jsx)(`a`,{className:`ars-linkbtn`,href:e.pricingUrl,children:b(`See plans`,`ai-rank-suite`)}),(0,ps.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:t,children:b(`Re-check now`,`ai-rank-suite`)})]})]}),(0,ps.jsxs)(`div`,{className:`ars-hero-stats`,children:[(0,ps.jsxs)(`div`,{className:`ars-hero-stat`,style:{cursor:`default`},children:[(0,ps.jsx)(`span`,{className:`ars-hero-stat-v${n?` is-good`:``}`,children:n?`On`:`Off`}),(0,ps.jsx)(`span`,{className:`ars-hero-stat-l`,children:b(`Automatic updates`,`ai-rank-suite`)})]}),(0,ps.jsxs)(`div`,{className:`ars-hero-stat`,style:{cursor:`default`},children:[(0,ps.jsx)(`span`,{className:`ars-hero-stat-v`,children:o}),(0,ps.jsx)(`span`,{className:`ars-hero-stat-l`,children:b(`Sites in this plan`,`ai-rank-suite`)})]})]})]}),(0,ps.jsx)(k,{title:b(`Status`,`ai-rank-suite`),subtitle:b(`What the licence server reports for this site`,`ai-rank-suite`),flush:!0,children:(0,ps.jsxs)(`div`,{className:`ars-lictable`,children:[(0,ps.jsx)(ls,{label:b(`Plan`,`ai-rank-suite`),children:e.plan?(0,ps.jsxs)(ps.Fragment,{children:[e.plan,e.isTrial?` · trial`:``]}):(0,ps.jsx)(`span`,{className:`is-muted`,children:`—`})}),(0,ps.jsxs)(ls,{label:b(`Licence`,`ai-rank-suite`),children:[n?(0,ps.jsx)(j,{tone:`good`,children:b(`active`,`ai-rank-suite`)}):i==null?(0,ps.jsx)(j,{tone:`neutral`,children:b(`inactive`,`ai-rank-suite`)}):(0,ps.jsx)(j,{tone:`warning`,children:`grace period`}),e.isCancelled?(0,ps.jsx)(`span`,{className:`ml-2 t-caption`,children:`cancelled — runs to the end of the term`}):null]}),(0,ps.jsxs)(ls,{label:b(`This site`,`ai-rank-suite`),hint:b(`A seat is used per site, and freed when you deactivate it`,`ai-rank-suite`),children:[e.siteActive?(0,ps.jsx)(j,{tone:`good`,children:b(`activated`,`ai-rank-suite`)}):(0,ps.jsx)(j,{tone:`neutral`,children:b(`not activated`,`ai-rank-suite`)}),e.sites!==null&&e.sites!==void 0?(0,ps.jsxs)(`span`,{className:`ml-2 t-caption`,children:[e.sites,` `,e.sites===1?`site`:`sites`,` using this licence`,e.siteLimit?` `+S(b(`of %s`,`ai-rank-suite`),e.siteLimit):` · `+b(`unlimited`,`ai-rank-suite`)]}):null]}),(0,ps.jsx)(ls,{label:b(`Renews`,`ai-rank-suite`),children:a||(0,ps.jsx)(`span`,{className:`is-muted`,children:`—`})}),(0,ps.jsx)(ls,{label:b(`Automatic updates`,`ai-rank-suite`),children:e.updates?(0,ps.jsx)(j,{tone:`good`,children:b(`enabled`,`ai-rank-suite`)}):(0,ps.jsx)(j,{tone:`neutral`,children:b(`paused`,`ai-rank-suite`)})}),(0,ps.jsxs)(ls,{label:b(`Licence server`,`ai-rank-suite`),children:[r?(0,ps.jsx)(j,{tone:`good`,children:b(`connected`,`ai-rank-suite`)}):(0,ps.jsx)(j,{tone:`neutral`,children:b(`not connected`,`ai-rank-suite`)}),e.userEmail?(0,ps.jsx)(`span`,{className:`ml-2 t-caption`,children:e.userEmail}):null]}),(e.productId||e.slug)&&(0,ps.jsx)(ls,{label:b(`Product`,`ai-rank-suite`),children:(0,ps.jsxs)(`span`,{className:`ars-mono text-[12px]`,children:[[e.productId?`#${e.productId}`:``,e.slug||``].filter(Boolean).join(` · `),e.sdkVersion?` · SDK ${e.sdkVersion}`:``]})})]})}),(0,ps.jsx)(k,{title:b(`What an inactive licence does and does not do`,`ai-rank-suite`),children:(0,ps.jsxs)(`div`,{className:`grid gap-3`,children:[(0,ps.jsxs)(`div`,{className:`grid gap-2 md:grid-cols-2`,children:[(0,ps.jsxs)(`div`,{className:`ars-r-md px-3 py-2.5`,style:{background:`var(--ars-surface-2)`},children:[(0,ps.jsx)(`div`,{className:`font-semibold text-[13px]`,style:{color:`var(--ars-good)`},children:b(`Keeps working`,`ai-rank-suite`)}),(0,ps.jsx)(`div`,{className:`t-caption mt-1`,children:b(`Every published title, description, schema block, redirect, llms.txt and sitemap. All settings, scores, audits and reports. Nothing is deleted, hidden or switched off on the front end — a licence problem must never cost you rankings.`,`ai-rank-suite`)})]}),(0,ps.jsxs)(`div`,{className:`ars-r-md px-3 py-2.5`,style:{background:`var(--ars-surface-2)`},children:[(0,ps.jsx)(`div`,{className:`font-semibold text-[13px]`,style:{color:`var(--ars-accent)`},children:b(`Pauses`,`ai-rank-suite`)}),(0,ps.jsx)(`div`,{className:`t-caption mt-1`,children:b(`New Pro actions — AI writing, the autopilot, answer simulation, keyword ideas — and automatic updates. They resume the moment a licence is active again.`,`ai-rank-suite`)})]})]}),(0,ps.jsx)(ft,{title:b(`Where licences are managed`,`ai-rank-suite`),children:(0,ps.jsxs)(`p`,{children:[`Your licence key, seats, invoices and renewals live in your account with our licensing provider (Freemius). This screen reads that state and links to it; it never stores a key of its own and never asks you to paste one anywhere else. Use `,(0,ps.jsx)(`strong`,{children:b(`Manage licence and sites`,`ai-rank-suite`)}),` to move a licence between sites, download invoices or cancel.`]})})]})})]})}function ds(){let[e,t]=(0,fs.useState)(null),[n,r]=(0,fs.useState)(null),i=re(`licensing`),a=()=>D.get(`/license`).then(t).catch(e=>r(e.message));if((0,fs.useEffect)(()=>{i&&a()},[i]),!i)return(0,ps.jsx)(`div`,{className:`ars-page`,children:(0,ps.jsx)(k,{title:b(`Free edition`,`ai-rank-suite`),children:(0,ps.jsxs)(`div`,{className:`ars-pro is-compact`,children:[(0,ps.jsx)(`span`,{className:`ars-pro-badge`,children:b(`Pro`,`ai-rank-suite`)}),(0,ps.jsx)(`div`,{className:`min-w-0`,children:(0,ps.jsx)(`p`,{className:`ars-pro-text`,children:b(`This is the free edition from WordPress.org. It has no licence to manage: every feature in it is fully yours. The AI engine, the autopilot, answer simulation, rank tracking and the other Pro modules come with AI Rank Suite Pro, sold and updated through our own site.`,`ai-rank-suite`)})}),(0,ps.jsx)(`a`,{className:`ars-btn ars-btn-ghost ars-pro-cta`,href:`${ne.adminUrl||``}admin.php?page=ai-rank-suite-upgrade`,children:b(`See Pro`,`ai-rank-suite`)})]})})});if(!e)return(0,ps.jsx)(Ce,{error:n});let o=e.backend||e;return o.enforced?(0,ps.jsxs)(`div`,{className:`ars-page`,children:[n&&(0,ps.jsx)(M,{tone:`serious`,children:n}),(0,ps.jsx)(us,{backend:o,onReload:a})]}):(0,ps.jsxs)(`div`,{className:`ars-page`,children:[n&&(0,ps.jsx)(M,{tone:`serious`,children:n}),(0,ps.jsxs)(M,{tone:`info`,children:[(0,ps.jsx)(`b`,{children:b(`Development build.`,`ai-rank-suite`)}),` `,b(`No licensing provider is configured, so nothing on this copy is gated. Licensing and automatic updates are switched off; every other feature works normally.`,`ai-rank-suite`),` `,b(`A released build carries real credentials, and this screen then shows the licence state of the site.`,`ai-rank-suite`)]}),(0,ps.jsx)(k,{title:b(`Licensing`,`ai-rank-suite`),subtitle:b(`Handled entirely by our licensing provider — nothing is stored here`,`ai-rank-suite`),children:(0,ps.jsx)(`p`,{className:`m-0 t-body`,children:b(`Your licence key, seats, invoices, renewals and trials live in your account with Freemius. This plugin reads that state; it never keeps a key of its own, and there is nothing on this screen to fill in.`,`ai-rank-suite`)})})]})}var fs,ps,ms=o((()=>{C(),fs=u(f(),1),O(),dt(),mt(),ps=_e()})),hs=c({DataPrivacy:()=>_s,Environment:()=>ys,Modules:()=>gs,default:()=>gs});function gs(){let[e,t]=(0,Ss.useState)(null),[n,r]=(0,Ss.useState)(null),[i,a]=(0,Ss.useState)(``),[o,s]=(0,Ss.useState)(!1),[c,l]=(0,Ss.useState)(!1),[u,d]=(0,Ss.useState)(null),[f,p]=(0,Ss.useState)(!1),[m,h]=(0,Ss.useState)({}),[g,_]=(0,Ss.useState)(!1),v=e=>{t(e),h(Object.fromEntries((e?.modules||[]).map(e=>[e.id,!!e.enabled]))),_(!1)};(0,Ss.useEffect)(()=>{D.get(`/settings/general`).then(v).catch(e=>d(e.message)),D.get(`/dev/status`).then(r).catch(()=>{})},[]);let y=(0,Ss.useMemo)(()=>(e?.modules||[]).filter(e=>e.optional),[e]),x=(0,Ss.useMemo)(()=>{let e=i.trim().toLowerCase();return e?y.filter(t=>t.label.toLowerCase().includes(e)||t.desc.toLowerCase().includes(e)):y},[y,i]);if(!e)return(0,U.jsx)(Ce,{error:u});let C=()=>{s(!0),setTimeout(()=>s(!1),2200)},w=n=>{t({...e,modules:e.modules.map(n)}),p(!0)},T=(e,t)=>w(n=>n.id===e?{...n,enabled:t}:n),E=e=>w(t=>t.optional?{...t,enabled:e}:t),ee=(e?.modules||[]).filter(e=>e.acknowledge&&e.enabled&&!m[e.id]),te=ee.length>0&&!g,ne=async()=>{if(!te){l(!0),d(null);try{let t={disabled:e.modules.filter(e=>!e.enabled).map(e=>e.id)};ee.forEach(e=>{t[`acknowledge_${e.id}`]=!0}),v(await D.put(`/settings/modules`,t)),p(!1),C()}catch(e){d(e.message)}finally{l(!1)}}},re=y.filter(e=>e.enabled).length,O=Object.keys(n?.modules?.quarantine||{});return(0,U.jsxs)(`div`,{className:`ars-page`,children:[u&&(0,U.jsx)(M,{tone:`serious`,children:u}),(0,U.jsx)(Ee,{columns:4,metrics:[{id:`running`,label:b(`Modules running`,`ai-rank-suite`),hint:b(`Modules loaded on every request right now.`,`ai-rank-suite`),value:n?.modules?.active?.length??`—`},{id:`optional`,label:b(`Optional modules on`,`ai-rank-suite`),hint:b(`A disabled module loads no code, registers no hooks and adds zero overhead.`,`ai-rank-suite`),value:`${re} / ${y.length}`},{id:`quarantined`,label:b(`Quarantined`,`ai-rank-suite`),hint:b(`A module that stops with an error is isolated so the rest of the plugin keeps working.`,`ai-rank-suite`),value:O.length,accent:O.length>0?`var(--ars-c-red-ink)`:void 0,sub:O.length>0?O.join(`, `):b(`no module has failed`,`ai-rank-suite`)},{id:`version`,label:b(`Plugin version`,`ai-rank-suite`),hint:b(`Settings survive every update — a snapshot is taken automatically before each one.`,`ai-rank-suite`),value:n?.environment?.plugin?`v${n.environment.plugin}`:`—`,sub:n?.environment?.db_schema?S(b(`database schema %s`,`ai-rank-suite`),n.environment.db_schema):void 0}]}),O.length>0&&(0,U.jsxs)(M,{tone:`serious`,children:[O.join(`, `),` stopped with an error and was isolated so the rest of the plugin keeps working. Open`,` `,(0,U.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent cursor-pointer p-0 font-semibold`,style:{color:`var(--ars-brand)`},onClick:()=>{window.location.hash=`/developer`},children:b(`Developer → Status`,`ai-rank-suite`)}),` `,`to see the error and clear the quarantine.`]}),(0,U.jsx)(k,{icon:(0,U.jsx)(_t,{size:16}),title:b(`Setup wizard`,`ai-rank-suite`),subtitle:b(`Re-run the guided setup any time — it never overwrites a field you have already filled in`,`ai-rank-suite`),action:(0,U.jsx)(A,{variant:`ghost`,onClick:()=>{window.location.hash=`/wizard`},children:b(`Open the wizard`,`ai-rank-suite`)}),children:(0,U.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Six questions — what the site is, which industry and market it serves, which AI engines matter to you — and it configures the schema type, business defaults, prompts and llms.txt accordingly. Useful after a rebrand, after adding a second market, or simply to see what it would suggest.`,`ai-rank-suite`)})}),(0,U.jsx)(bs,{data:e,onSaved:t}),(0,U.jsx)(k,{icon:(0,U.jsx)(Ct,{size:16}),title:b(`Modules`,`ai-rank-suite`),subtitle:b(`Switch off what you don’t use — a disabled module loads no code, registers no hooks and adds zero overhead`,`ai-rank-suite`),action:(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[o&&(0,U.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),f&&(0,U.jsx)(A,{onClick:ne,busy:c,disabled:te,children:b(`Apply changes`,`ai-rank-suite`)})]}),children:(0,U.jsxs)(`div`,{className:`grid gap-5`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,U.jsx)(`input`,{type:`text`,placeholder:b(`Search modules…`,`ai-rank-suite`),value:i,onChange:e=>a(e.target.value),style:{maxWidth:280},"aria-label":b(`Search modules`,`ai-rank-suite`)}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(A,{variant:`ghost`,onClick:()=>E(!0),children:b(`Enable all`,`ai-rank-suite`)}),(0,U.jsx)(A,{variant:`ghost`,onClick:()=>E(!1),children:b(`Disable all`,`ai-rank-suite`)})]})]}),f&&(0,U.jsx)(M,{tone:`info`,children:b(`Nothing is switched until you press “Apply changes”.`,`ai-rank-suite`)}),ee.length>0&&(0,U.jsx)(M,{tone:`warning`,children:(0,U.jsxs)(`div`,{className:`grid gap-2`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`strong`,{children:ee.map(e=>e.label).join(`, `)}),` `,b(`runs PHP that is typed into this admin. Anyone with the “edit plugins” capability can then execute code on this server. A snippet with a mistake is switched off automatically after one failed request; a snippet written to do harm is not.`,`ai-rank-suite`)]}),(0,U.jsxs)(`label`,{className:`flex items-start gap-2 cursor-pointer`,style:{fontWeight:500},children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:g,onChange:e=>_(e.target.checked),style:{marginTop:2}}),(0,U.jsx)(`span`,{children:b(`I understand that this module runs code on the site, and I want to switch it on.`,`ai-rank-suite`)})]})]})}),Cs.map(e=>{let t=x.filter(t=>t.group===e.id);if(!t.length)return null;let n=t.filter(e=>e.enabled).length;return(0,U.jsxs)(`div`,{className:`grid gap-2`,children:[(0,U.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,U.jsxs)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wider`,style:{color:`var(--ars-ink-3)`},children:[e.label,(0,U.jsxs)(`span`,{className:`ml-2 normal-case tracking-normal font-normal`,children:[n,` of `,t.length,` on`]})]}),(0,U.jsx)(`div`,{className:`text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:e.hint})]}),(0,U.jsx)(`div`,{className:`ars-cardgrid`,style:{"--min":`320px`},children:t.map(e=>(0,U.jsxs)(`div`,{className:`flex items-start justify-between gap-3 ars-r-md px-4 py-3 relative overflow-hidden`,style:{background:`var(--ars-surface)`,border:`1px solid var(--ars-border)`,borderStyle:e.enabled?`solid`:`dashed`,opacity:e.enabled?1:.62,boxShadow:e.enabled?`var(--ars-e1)`:`none`,transition:`opacity 160ms ease, box-shadow 160ms ease`},children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsxs)(`div`,{className:`font-medium text-[13px] flex items-center gap-2`,children:[e.label,e.acknowledge&&(0,U.jsx)(j,{tone:`warning`,children:b(`runs code`,`ai-rank-suite`)}),O.includes(e.id)&&(0,U.jsx)(j,{tone:`serious`,children:`failed`})]}),(0,U.jsx)(`div`,{className:`text-[11.5px] mt-0.5`,style:{color:`var(--ars-ink-3)`},children:e.desc})]}),(0,U.jsx)(Me,{checked:e.enabled,onChange:t=>T(e.id,t)})]},e.id))})]},e.id)}),x.length===0&&(0,U.jsxs)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-3)`},children:[`No module matches “`,i,`”.`]}),(0,U.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Settings of a disabled module are kept untouched — switch it back on and everything is exactly as you left it. Essential modules (core, settings, licensing) are not listed here: turning them off would take this screen down with them.`,`ai-rank-suite`)})]})})]})}function _s(){let[e,t]=(0,Ss.useState)(null),[n,r]=(0,Ss.useState)(null),[i,a]=(0,Ss.useState)(!1),[o,s]=(0,Ss.useState)(!1),[c,l]=(0,Ss.useState)(!1),[u,d]=(0,Ss.useState)(!1),[f,p]=(0,Ss.useState)(null),[m,h]=(0,Ss.useState)(null),g=()=>{D.get(`/settings/general`).then(t).catch(e=>h(e.message)),D.get(`/settings/backup`).then(r).catch(()=>{})};if((0,Ss.useEffect)(g,[]),!e)return(0,U.jsx)(Ce,{error:m});let _=()=>{s(!0),setTimeout(()=>s(!1),2200)},v=async e=>{h(null);try{t(await D.put(`/settings/general`,{keep_data_on_uninstall:e})),_()}catch(e){h(e.message)}},y=async()=>{a(!0),h(null);try{await D.post(`/settings/backup`,{}),l(!0),setTimeout(()=>l(!1),3e3)}catch(e){h(e.message)}finally{a(!1)}},C=async()=>{h(null);try{let e=await D.get(`/settings/export`),t=new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`ai-rank-suite-config-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(n)}catch(e){h(e.message)}},w=async e=>{if(e){d(!0),h(null),p(null);try{let t=await e.text(),n=JSON.parse(t),r=await D.post(`/settings/import`,{payload:n});p(r),g()}catch(e){h(e instanceof SyntaxError?b(`That file is not valid JSON — pick a config exported from this plugin.`,`ai-rank-suite`):e.message)}finally{d(!1)}}};return(0,U.jsxs)(`div`,{className:`ars-page`,children:[m&&(0,U.jsx)(M,{tone:`serious`,children:m}),o&&(0,U.jsx)(M,{tone:`good`,children:b(`Saved.`,`ai-rank-suite`)}),(0,U.jsx)(k,{icon:(0,U.jsx)(Pt,{size:16}),title:b(`Updates & data safety`,`ai-rank-suite`),subtitle:b(`Your configuration survives every update — that is a promise, not a hope`,`ai-rank-suite`),children:(0,U.jsxs)(`div`,{className:`grid gap-3`,children:[(0,U.jsxs)(`div`,{className:`flex items-start justify-between gap-3 ars-r-lg px-4 py-3`,style:{background:`var(--ars-surface-2)`},children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`font-medium text-[13px]`,children:b(`Automatic snapshot`,`ai-rank-suite`)}),(0,U.jsx)(`div`,{className:`text-[12px] mt-0.5`,style:{color:`var(--ars-ink-2)`},children:n?.exists?S(b(`Taken before the update to v%1$s, on %2$s. Every setting of every module is included.`,`ai-rank-suite`),n.from,new Date(n.time*1e3).toLocaleString()):b(`A snapshot of all settings is taken automatically before every update. None exists yet — the first one appears with your next update.`,`ai-rank-suite`)})]}),n?.exists&&(0,U.jsx)(A,{variant:`ghost`,onClick:y,busy:i,children:c?(0,U.jsxs)(U.Fragment,{children:[`✓ `,b(`Restored`,`ai-rank-suite`)]}):b(`Restore`,`ai-rank-suite`)})]}),c&&(0,U.jsx)(M,{tone:`good`,children:b(`Settings restored from the backup snapshot.`,`ai-rank-suite`)})]})}),(0,U.jsx)(k,{icon:(0,U.jsx)(jt,{size:16}),title:b(`Portable configuration`,`ai-rank-suite`),subtitle:b(`Move a finished setup to another site, or keep a copy outside the database`,`ai-rank-suite`),children:(0,U.jsxs)(`div`,{className:`grid gap-3`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,U.jsx)(A,{variant:`ghost`,onClick:C,children:b(`Export configuration`,`ai-rank-suite`)}),(0,U.jsxs)(`label`,{className:`ars-btn ars-btn-tonal`,style:{cursor:`pointer`},children:[b(u?`Importing…`:`Import configuration`,`ai-rank-suite`),(0,U.jsx)(`input`,{type:`file`,accept:`application/json,.json`,style:{display:`none`,width:0},onChange:e=>w(e.target.files?.[0])})]})]}),f&&(0,U.jsx)(M,{tone:f.applied>0?`good`:`warning`,children:f.skipped>0?S(b(`Applied %1$d settings groups, skipped %2$d that this version does not recognise. Reload the page to see them everywhere.`,`ai-rank-suite`),f.applied,f.skipped):S(x(`Applied %d settings group. Reload the page to see them everywhere.`,`Applied %d settings groups. Reload the page to see them everywhere.`,f.applied,`ai-rank-suite`),f.applied)}),(0,U.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`The export contains settings only — never API keys, license keys or content. That is deliberate: a config file often ends up in a repository or a shared drive, and a secret in it would outlive the site it came from.`,`ai-rank-suite`)})]})}),(0,U.jsx)(xs,{data:e,onSaved:t}),(0,U.jsx)(k,{title:b(`Uninstall behavior`,`ai-rank-suite`),subtitle:b(`What happens if you ever remove the plugin`,`ai-rank-suite`),children:(0,U.jsxs)(`div`,{className:`grid gap-3`,children:[(0,U.jsx)(Me,{checked:!!e.keep_data_on_uninstall,onChange:v,label:b(`Keep all data when the plugin is uninstalled`,`ai-rank-suite`)}),(0,U.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`Recommended. Turn this off only if you want every setting, score, redirect and keyword removed from the database on uninstall — that cannot be undone.`,`ai-rank-suite`)}),!e.keep_data_on_uninstall&&(0,U.jsx)(M,{tone:`warning`,children:b(`Deletion on uninstall is enabled: removing the plugin will permanently erase all its data.`,`ai-rank-suite`)})]})})]})}function vs({active:e,label:t,children:n,note:r}){return(0,U.jsxs)(`div`,{className:`flex items-start gap-3 px-3 py-2.5 ars-r-sm`,style:{border:`1px solid var(--ars-border)`,background:e?`var(--ars-surface-2)`:`transparent`,opacity:e?1:.66},children:[(0,U.jsx)(`span`,{"aria-hidden":!0,className:`shrink-0 mt-0.5`,style:{color:e?`var(--ars-c-green-ink)`:`var(--ars-ink-3)`,width:14},children:e?`✓`:`○`}),(0,U.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,U.jsxs)(`div`,{className:`font-medium text-[13px] flex items-center gap-2 flex-wrap`,children:[t,n]}),r&&(0,U.jsx)(`div`,{className:`text-[12px] mt-0.5`,style:{color:`var(--ars-ink-2)`},children:r})]})]})}function ys(){let[e,t]=(0,Ss.useState)(null),[n,r]=(0,Ss.useState)(null),[i,a]=(0,Ss.useState)(!1);if((0,Ss.useEffect)(()=>{D.get(`/settings/environment`).then(t).catch(e=>r(e.message))},[]),!e)return(0,U.jsx)(Ce,{error:n});let o=(e.health||[]).filter(e=>e.status!==`good`);(e.builders||[]).filter(e=>e.active);let s=e.integrations||[],c=s.filter(e=>e.active),l=i?s:c,u=e.multilingual||{},d=e.services||[];return(0,U.jsxs)(`div`,{className:`ars-page`,children:[n&&(0,U.jsx)(M,{tone:`serious`,children:n}),(0,U.jsx)(Ee,{columns:4,metrics:[{id:`health`,label:b(`Site health`,`ai-rank-suite`),hint:b(`What this server lets the plugin do — the table below says what to change if something is holding it back.`,`ai-rank-suite`),value:o.length?S(b(`%d to look at`,`ai-rank-suite`),o.length):b(`All clear`,`ai-rank-suite`),accent:o.length?`var(--ars-accent)`:void 0,sub:S(x(`%d check`,`%d checks`,(e.health||[]).length,`ai-rank-suite`),(e.health||[]).length)},{id:`seo-plugins`,label:b(`Other SEO plugins`,`ai-rank-suite`),hint:b(`Two SEO plugins normally mean a broken head. Here every surface has exactly one owner — the Compatibility tab shows each decision.`,`ai-rank-suite`),value:e.seo_plugins?.length||0,sub:e.seo_plugins?.length?e.seo_plugins.map(e=>e.label).join(`, `):b(`running solo`,`ai-rank-suite`)},{id:`languages`,label:b(`Languages`,`ai-rank-suite`),hint:b(`Translation plugins are read directly — no mapping to set up.`,`ai-rank-suite`),value:u.multilingual?u.languages.length:1,sub:u.multilingual?u.label:b(`single language`,`ai-rank-suite`)},{id:`integrations`,label:b(`Integrations active`,`ai-rank-suite`),hint:b(`Plugins read automatically to make the structured data richer — nothing to configure.`,`ai-rank-suite`),value:`${c.length} / ${s.length}`}]}),(0,U.jsx)(k,{icon:(0,U.jsx)(_t,{size:16}),title:b(`Site health`,`ai-rank-suite`),subtitle:b(`What this server lets the plugin do — and what to change if something is holding it back`,`ai-rank-suite`),children:(0,U.jsx)(`div`,{className:`ars-table-wrap`,children:(0,U.jsxs)(`table`,{className:`ars-table`,children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{style:{width:30}}),(0,U.jsx)(`th`,{style:{width:210},children:b(`Check`,`ai-rank-suite`)}),(0,U.jsx)(`th`,{className:`is-mid`,children:b(`Value`,`ai-rank-suite`)}),(0,U.jsx)(`th`,{children:b(`What it means`,`ai-rank-suite`)})]})}),(0,U.jsx)(`tbody`,{children:(e.health||[]).map(e=>(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`td`,{style:{width:30,color:`var(--ars-c-${ws[e.status]}-ink)`,fontWeight:700},children:Ts[e.status]}),(0,U.jsx)(`td`,{style:{fontWeight:e.status===`good`?400:600},children:e.label}),(0,U.jsx)(`td`,{className:`is-mid ars-mono`,style:{fontSize:12},children:e.value}),(0,U.jsx)(`td`,{style:{color:`var(--ars-ink-2)`},children:e.note})]},e.id))})]})})}),(0,U.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,U.jsxs)(k,{icon:(0,U.jsx)(Pt,{size:16}),title:b(`Other SEO plugins`,`ai-rank-suite`),subtitle:b(`Detected on this site, with the tags each one normally writes`,`ai-rank-suite`),children:[(e.importable||[]).length>0&&(0,U.jsxs)(M,{tone:`info`,children:[e.importable.map(e=>S(x(`%1$s: %2$s page`,`%1$s: %2$s pages`,e.posts,`ai-rank-suite`),e.label,e.posts.toLocaleString())+(e.redirects?` `+S(b(`and %s redirects`,`ai-rank-suite`),e.redirects.toLocaleString()):``)).join(` · `),` `,`can be brought across without retyping anything.`,` `,(0,U.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent cursor-pointer p-0 font-semibold`,style:{color:`var(--ars-brand)`},onClick:()=>{window.location.hash=`/import`},children:b(`Open the importer →`,`ai-rank-suite`)})]}),(e.seo_plugins||[]).length===0?(0,U.jsx)(`p`,{className:`m-0 mt-2 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`None found — AI Rank Suite owns the whole head, which is the simplest setup there is. If you install one later, the Compatibility tab decides tag by tag who writes what, so the two never double up.`,`ai-rank-suite`)}):(0,U.jsxs)(`div`,{className:`grid gap-2`,children:[e.seo_plugins.map(e=>(0,U.jsx)(vs,{active:!0,label:e.label,note:S(b(`Normally writes: %s. The Compatibility tab decides who wins each one.`,`ai-rank-suite`),e.surfaces.join(`, `)),children:e.version&&(0,U.jsxs)(`span`,{className:`ars-chip-tag`,children:[`v`,e.version]})},e.key)),(0,U.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`Running two SEO plugins is normally a broken head — two titles, two canonicals, a doubled schema graph. Here it is a supported configuration: every surface has exactly one owner, and you can see the decision on the Compatibility tab.`,`ai-rank-suite`)})]})]}),(0,U.jsx)(k,{icon:(0,U.jsx)(wt,{size:16}),title:b(`Languages`,`ai-rank-suite`),subtitle:b(`Translation plugins are read directly — no mapping to set up`,`ai-rank-suite`),children:(0,U.jsxs)(`div`,{className:`grid gap-2`,children:[(0,U.jsx)(vs,{active:!!u.multilingual,label:u.multilingual?u.label:b(`Single language`,`ai-rank-suite`),note:u.multilingual?u.perPost?b(`Each translation is its own post, so titles, descriptions, schema and llms.txt are written per language and hreflang is emitted automatically.`,`ai-rank-suite`):b(`Translation happens per request, so one source record is served in every language and hreflang follows the plugin’s own URLs.`,`ai-rank-suite`):b(`Install WPML, Polylang, TranslatePress or Weglot and this page picks it up on the next load — there is nothing to connect.`,`ai-rank-suite`)}),u.multilingual&&(0,U.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:(u.languages||[]).map(e=>(0,U.jsxs)(`span`,{className:`ars-chip-tag`,children:[(e.label||e.name||e.code||e).toString(),e.code&&e.code===u.current?` · ${b(`current`,`ai-rank-suite`)}`:``]},e.code||e))})]})})]}),(0,U.jsxs)(k,{icon:(0,U.jsx)(At,{size:16}),title:b(`Page builders`,`ai-rank-suite`),subtitle:b(`What the analyser reads when the content is not in the post body`,`ai-rank-suite`),children:[(0,U.jsx)(`div`,{className:`ars-cardgrid`,style:{"--min":`300px`},children:(e.builders||[]).map(e=>(0,U.jsx)(vs,{active:e.active,label:e.label,note:e.active?e.note:b(`Not installed.`,`ai-rank-suite`)},e.key))}),(0,U.jsx)(ft,{title:b(`Why this matters on a builder site`,`ai-rank-suite`),children:(0,U.jsx)(`p`,{children:b(`A page built with Elementor or Divi stores almost nothing in the post body — the text a visitor reads lives in meta fields the builder renders later. An SEO plugin that reads the post body sees an empty page, scores it badly, and writes a meta description from nothing. Every check here runs against the rendered output instead, which is why the word count on a builder page matches what you actually see.`,`ai-rank-suite`)})})]}),(0,U.jsx)(k,{icon:(0,U.jsx)(wt,{size:16}),title:b(`Connected services`,`ai-rank-suite`),subtitle:b(`Where real data comes from — all optional, most of them free`,`ai-rank-suite`),children:(0,U.jsx)(`div`,{className:`grid gap-2`,children:d.map(e=>(0,U.jsxs)(vs,{active:e.connected,label:e.label,note:e.provides,children:[e.free&&(0,U.jsx)(`span`,{className:`ars-chip-tag`,children:`free`}),!e.connected&&(0,U.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent cursor-pointer p-0 text-[12px] font-semibold`,style:{color:`var(--ars-brand)`},onClick:()=>{window.location.hash=`/`+e.route},children:b(`Connect →`,`ai-rank-suite`)})]},e.key))})}),(0,U.jsx)(k,{icon:(0,U.jsx)(At,{size:16}),title:b(`Content integrations`,`ai-rank-suite`),subtitle:b(`Plugins we read from automatically to make the structured data richer`,`ai-rank-suite`),action:(0,U.jsx)(A,{variant:`ghost`,onClick:()=>a(!i),children:i?b(`Show active only`,`ai-rank-suite`):S(b(`Show all %d`,`ai-rank-suite`),s.length)}),children:l.length===0?(0,U.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`None of the supported plugins is installed. Nothing is missing — this list only ever adds detail to schema that is already being emitted.`,`ai-rank-suite`)}):(0,U.jsx)(`div`,{className:`ars-cardgrid`,style:{"--min":`320px`},children:l.map(e=>(0,U.jsx)(vs,{active:e.active,label:e.label,note:e.provides},e.key))})})]})}function bs({data:e,onSaved:t}){let[n,r]=(0,Ss.useState)(e.brand_name||``),[i,a]=(0,Ss.useState)(!1),[o,s]=(0,Ss.useState)(null),[c,l]=(0,Ss.useState)(!1),u=n!==(e.brand_name||``),d=async e=>{a(!0),s(null);try{t(await D.put(`/settings/general`,e)),l(!0),setTimeout(()=>l(!1),2200)}catch(e){s(e.message)}finally{a(!1)}},[f,p]=(0,Ss.useState)(ie);return(0,U.jsx)(k,{icon:(0,U.jsx)(At,{size:16}),title:b(`Appearance & white label`,`ai-rank-suite`),subtitle:b(`Put your agency's name on the plugin your clients see`,`ai-rank-suite`),action:c&&(0,U.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),children:(0,U.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,U.jsxs)(`div`,{className:`grid gap-3`,children:[(0,U.jsx)(Qe,{label:b(`Name shown in the WordPress menu and the header`,`ai-rank-suite`),hint:b(`Empty = AI Rank Suite. Takes effect on the next page load.`,`ai-rank-suite`),children:(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(`input`,{type:`text`,value:n,maxLength:40,onChange:e=>r(e.target.value),placeholder:b(`AI Rank Suite`,`ai-rank-suite`),style:{flex:1}}),(0,U.jsx)(A,{onClick:()=>d({brand_name:n}),busy:i,disabled:!u,children:b(`Save`,`ai-rank-suite`)})]})}),(0,U.jsx)(Me,{checked:!!e.hide_footer,onChange:e=>d({hide_footer:e}),label:b(`Hide the vendor line at the foot of the sidebar`,`ai-rank-suite`)}),(0,U.jsx)(Me,{checked:f===`dark`,onChange:e=>p(ae(e?`dark`:`light`)),label:b(`Dark theme for this plugin's screens`,`ai-rank-suite`)}),(0,U.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Stored in this browser only — it changes nothing for anyone else, and nothing outside these screens.`,`ai-rank-suite`)}),o&&(0,U.jsx)(M,{tone:`serious`,children:o})]}),(0,U.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`For an agency running the plugin on client sites: the client sees your name, your reports, your work. The toolbar menu can be hidden under Advanced → Ghost Mode, and client access is set per role under Advanced → Roles. The Plugins screen keeps the real plugin name — that is a WordPress rule, and the right one.`,`ai-rank-suite`)})]})})}function xs({data:e,onSaved:t}){let[n,r]=(0,Ss.useState)({retention_ai_usage_days:e.retention_ai_usage_days??365,retention_404_days:e.retention_404_days??90,retention_crawler_days:e.retention_crawler_days??90}),[i,a]=(0,Ss.useState)(!1),[o,s]=(0,Ss.useState)(null),[c,l]=(0,Ss.useState)(!1),u=Object.keys(n).some(t=>Number(n[t])!==Number(e[t]??0)),d=async()=>{a(!0),s(null);try{t(await D.put(`/settings/general`,n)),l(!0),setTimeout(()=>l(!1),2200)}catch(e){s(e.message)}finally{a(!1)}},f=[[`retention_ai_usage_days`,b(`AI usage ledger`,`ai-rank-suite`),b(`One row per model call — cost, tokens, job. Budgets and the usage screen read the last 30 days; older rows are history.`,`ai-rank-suite`)],[`retention_404_days`,b(`404 monitor`,`ai-rank-suite`),b(`Missing paths and how often they were hit. A path nobody has hit in this many days is dropped.`,`ai-rank-suite`)],[`retention_crawler_days`,b(`AI crawler visits`,`ai-rank-suite`),b(`Per-bot daily counters from the crawler recorder.`,`ai-rank-suite`)]];return(0,U.jsx)(k,{title:b(`Log retention`,`ai-rank-suite`),subtitle:b(`How long the plugin keeps its own logs — pruned daily; 0 keeps everything`,`ai-rank-suite`),action:(0,U.jsxs)(`span`,{className:`flex items-center gap-2`,children:[c&&(0,U.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,U.jsx)(A,{onClick:d,busy:i,disabled:!u,children:b(`Save`,`ai-rank-suite`)})]}),children:(0,U.jsxs)(`div`,{className:`grid gap-3`,children:[f.map(([e,t,i])=>(0,U.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-[220px_140px_minmax(0,1fr)] items-center`,children:[(0,U.jsx)(`span`,{className:`font-medium text-[13px]`,children:t}),(0,U.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`input`,{type:`number`,min:0,max:3650,value:n[e],onChange:t=>r({...n,[e]:Math.max(0,Math.min(3650,Number(t.target.value)||0))}),style:{width:90}}),(0,U.jsx)(`span`,{className:`t-caption`,children:`days`})]}),(0,U.jsx)(`span`,{className:`t-caption`,children:i})]},e)),o&&(0,U.jsx)(M,{tone:`serious`,children:o}),(0,U.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Consent-log retention lives with the consent settings (Analytics → Consent), because it is a legal setting rather than a housekeeping one.`,`ai-rank-suite`)})]})})}var Ss,U,Cs,ws,Ts,Es=o((()=>{Ss=u(f(),1),C(),O(),he(),dt(),mt(),Vt(),U=_e(),Cs=[{id:`ai`,label:b(`AI search`,`ai-rank-suite`),hint:b(`Everything that makes assistants find, read and recommend you`,`ai-rank-suite`)},{id:`search`,label:b(`Google search`,`ai-rank-suite`),hint:b(`Classic SEO output, indexing and performance data`,`ai-rank-suite`)},{id:`content`,label:b(`Content`,`ai-rank-suite`),hint:b(`Per-page analysis, bulk work, links and redirects`,`ai-rank-suite`)},{id:`system`,label:b(`System`,`ai-rank-suite`),hint:b(`Housekeeping, integrations and developer tooling`,`ai-rank-suite`)}],ws={good:`green`,warn:`yellow`,bad:`red`},Ts={good:`✓`,warn:`!`,bad:`×`}})),Ds=c({default:()=>Os});function Os(){let[e,t]=(0,ks.useState)(null),[n,r]=(0,ks.useState)(1),[i,a]=(0,ks.useState)(!1),[o,s]=(0,ks.useState)(null),[c,l]=(0,ks.useState)(null);(0,ks.useEffect)(()=>{D.get(`/links?page=${n}&per_page=50`).then(t).catch(e=>l(e.message))},[n]);let u=async()=>{a(!0),l(null);try{t(await D.post(`/links/build`))}catch(e){l(e.message)}finally{a(!1)}},d=async(e,n)=>{s(e),l(null);try{t(await D.post(`/links/${e}/${n}`))}catch(e){l(e.message)}finally{s(null)}};if(!e)return(0,As.jsx)(Ce,{error:c});let f=e.items||[];return(0,As.jsxs)(`div`,{className:`ars-page`,children:[e.built_at?(0,As.jsx)(ya,{tone:f.length>0?`warning`:`good`,text:f.length>0?S(x(`%d internal-link suggestion is waiting.`,`%d internal-link suggestions are waiting.`,f.length,`ai-rank-suite`),f.length):b(`Every suggestion has been applied or dismissed.`,`ai-rank-suite`),why:f.length>0?b(`Each one is a page that talks about the same thing as another and does not point at it yet. Apply writes the link and can be undone.`,`ai-rank-suite`):b(`Rebuild after a publishing sprint to find new pairs.`,`ai-rank-suite`)}):(0,As.jsx)(Xo,{badge:b(`Not analysed yet`,`ai-rank-suite`),ringLabel:b(`Internal links`,`ai-rank-suite`),title:b(`No internal-link suggestions exist yet.`,`ai-rank-suite`),why:b(`The analyser reads every published page, measures how similar their topics are, and proposes links between pages that talk about the same thing but do not yet point at each other — computed on your own server, no AI cost, nothing leaves the site.`,`ai-rank-suite`),action:b(i?`Analysing…`:`Analyse the site`,`ai-rank-suite`),onAction:u,busy:i,stats:[{label:b(`Suggestions`,`ai-rank-suite`)},{label:b(`Pages analysed`,`ai-rank-suite`)},{label:b(`Applied`,`ai-rank-suite`)},{label:b(`Dismissed`,`ai-rank-suite`)}],previews:[{title:b(`One click to apply`,`ai-rank-suite`),text:b(`Each suggestion names the source, the target and the anchor; Apply writes the link into the page and can be undone.`,`ai-rank-suite`)},{title:b(`Targets that need links`,`ai-rank-suite`),text:b(`The pages fewest others point at — the ones a suggestion helps most.`,`ai-rank-suite`)},{title:b(`Re-run after publishing`,`ai-rank-suite`),text:b(`New pages get suggestions the next time the analyser runs.`,`ai-rank-suite`)}]}),(0,As.jsxs)(k,{title:b(`Internal link suggestions`,`ai-rank-suite`),subtitle:b(`Topic-similarity matches computed on your own server — no AI cost, no data leaves the site`,`ai-rank-suite`),action:(0,As.jsxs)(A,{onClick:u,busy:i,children:[(0,As.jsx)(Tt,{size:13}),` `,e.built_at?b(`Rebuild`,`ai-rank-suite`):b(`Analyze site`,`ai-rank-suite`)]}),children:[c&&(0,As.jsx)(M,{tone:`serious`,children:c}),e.stats&&(0,As.jsx)(`p`,{className:`m-0 mb-3 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:S(b(`Analyzed %1$s pages · %2$s new suggestions.`,`ai-rank-suite`),e.stats.analyzed,e.stats.created)}),(e.targets||[]).length>0&&(0,As.jsxs)(`div`,{className:`mb-4`,children:[(0,As.jsx)(`div`,{className:`t-overline mb-1.5`,children:b(`Pages these links would strengthen`,`ai-rank-suite`)}),(0,As.jsx)(`div`,{className:`grid gap-1.5`,children:e.targets.map(e=>(0,As.jsxs)(`div`,{className:`flex items-center justify-between gap-3 ars-r-sm px-3 py-2`,style:{background:`var(--ars-surface-2)`},children:[(0,As.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`font-medium text-[12.5px] truncate`,children:e.title}),(0,As.jsxs)(`span`,{className:`t-caption shrink-0 tabular-nums`,children:[S(x(`%d suggestion`,`%d suggestions`,e.count,`ai-rank-suite`),e.count),` · `,S(b(`avg %s`,`ai-rank-suite`),e.avg_score)]})]},e.id))})]}),e.items.length===0?(0,As.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:e.built_at?b(`No open suggestions — your pages are already well connected.`,`ai-rank-suite`):b(`Run the analysis to find where your pages should link to each other.`,`ai-rank-suite`)}):(0,As.jsx)(`div`,{className:`grid gap-2`,children:e.items.map(e=>(0,As.jsx)(`div`,{className:`ars-r-md p-3`,style:{background:`var(--ars-surface-2)`},children:(0,As.jsxs)(`div`,{className:`flex items-start justify-between gap-3 flex-wrap`,children:[(0,As.jsxs)(`div`,{className:`min-w-0`,children:[(0,As.jsxs)(`div`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[b(`From`,`ai-rank-suite`),` `,(0,As.jsx)(`strong`,{style:{color:`var(--ars-ink)`},children:e.source}),` → `,b(`to`,`ai-rank-suite`),` `,(0,As.jsxs)(`a`,{href:e.target_url,target:`_blank`,rel:`noreferrer`,children:[e.target,` `,(0,As.jsx)(wt,{size:10})]})]}),(0,As.jsxs)(`div`,{className:`mt-1.5 text-[13px]`,children:[b(`Link the words`,`ai-rank-suite`),` `,(0,As.jsx)(`span`,{className:`font-semibold px-1.5 py-0.5 rounded`,style:{background:`color-mix(in srgb, var(--ars-brand) 14%, white)`,color:`var(--ars-brand-ink)`},children:e.anchor})]}),e.context&&(0,As.jsxs)(`div`,{className:`mt-1 text-[12px] italic`,style:{color:`var(--ars-ink-3)`},children:[`…`,e.context,`…`]})]}),(0,As.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,As.jsx)(j,{tone:`neutral`,children:S(b(`%d%% match`,`ai-rank-suite`),Math.round(e.score*100))}),(0,As.jsx)(A,{busy:o===e.id,onClick:()=>d(e.id,`apply`),children:b(`Insert link`,`ai-rank-suite`)}),(0,As.jsx)(A,{variant:`ghost`,busy:o===e.id,onClick:()=>d(e.id,`dismiss`),children:b(`Dismiss`,`ai-rank-suite`)})]})]})},e.id))}),e.pagination&&e.pagination.total_pages>1&&(0,As.jsxs)(`div`,{className:`flex items-center justify-between gap-3 mt-3 pt-3`,style:{borderTop:`1px solid var(--ars-line-soft)`},children:[(0,As.jsx)(`span`,{className:`t-caption tabular-nums`,children:S(b(`%1$s suggestions · page %2$s of %3$s`,`ai-rank-suite`),e.pagination.total_items.toLocaleString(),e.pagination.page,e.pagination.total_pages)}),(0,As.jsxs)(`div`,{className:`flex gap-2`,children:[(0,As.jsx)(A,{variant:`ghost`,disabled:n<=1,onClick:()=>r(n-1),children:b(`Previous`,`ai-rank-suite`)}),(0,As.jsx)(A,{variant:`ghost`,disabled:n>=e.pagination.total_pages,onClick:()=>r(n+1),children:b(`Next`,`ai-rank-suite`)})]})]})]}),(e.orphans||[]).length>0&&(0,As.jsx)(k,{title:b(`Pages nothing links to`,`ai-rank-suite`),subtitle:b(`Orphans are crawled last and cited least — one internal link is usually the whole fix`,`ai-rank-suite`),action:e.orphans_total>e.orphans.length?(0,As.jsx)(j,{tone:`warning`,children:S(b(`%d in total`,`ai-rank-suite`),e.orphans_total)}):null,children:(0,As.jsx)(`div`,{className:`grid gap-1.5`,children:e.orphans.map(e=>(0,As.jsxs)(`div`,{className:`flex items-center justify-between gap-3 ars-r-sm px-3 py-2`,style:{background:`var(--ars-surface-2)`},children:[(0,As.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`font-medium text-[12.5px] truncate`,children:e.title}),(0,As.jsx)(A,{variant:`ghost`,onClick:()=>{window.location.hash=`/content/${e.id}`},children:b(`Open`,`ai-rank-suite`)})]},e.id))})})]})}var ks,As,js=o((()=>{ks=u(f(),1),C(),O(),Qo(),xa(),dt(),Vt(),As=_e()})),Ms=c({default:()=>Ps});function Ns({rows:e,empty:t,columns:n=[`in`,`out`,`depth`,`words`]}){if(!e||e.length===0)return(0,Ls.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:t});let r={in:b(`Links in`,`ai-rank-suite`),out:b(`Links out`,`ai-rank-suite`),depth:b(`Clicks from home`,`ai-rank-suite`),words:b(`Words`,`ai-rank-suite`),authority:`Authority`,score:`GEO`};return(0,Ls.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Ls.jsxs)(`table`,{className:`ars-table`,children:[(0,Ls.jsx)(`thead`,{children:(0,Ls.jsxs)(`tr`,{children:[(0,Ls.jsx)(`th`,{children:b(`Page`,`ai-rank-suite`)}),n.map(e=>(0,Ls.jsx)(`th`,{className:`is-num`,children:r[e]},e)),(0,Ls.jsx)(`th`,{className:`is-action`})]})}),(0,Ls.jsx)(`tbody`,{children:e.map(e=>(0,Ls.jsxs)(`tr`,{children:[(0,Ls.jsxs)(`td`,{children:[(0,Ls.jsx)(`div`,{className:`font-medium truncate`,style:{maxWidth:440},children:e.title||b(`(no title)`,`ai-rank-suite`)}),(0,Ls.jsx)(`div`,{className:`t-caption`,children:e.type})]}),n.map(t=>(0,Ls.jsx)(`td`,{className:`is-num`,children:t===`depth`?e.depth<0?`—`:e.depth:t===`authority`?(0,Ls.jsx)(Fs,{value:e.authority??0}):e[t]??`—`},t)),(0,Ls.jsx)(`td`,{className:`is-action`,children:(0,Ls.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer noopener`,title:b(`Open page`,`ai-rank-suite`),children:(0,Ls.jsx)(wt,{size:12})})})]},e.id))})]})})}function Ps(){let[e,t]=(0,Is.useState)(null),[n,r]=(0,Is.useState)(!1),[i,a]=(0,Is.useState)(null),[o,s]=(0,Is.useState)(`orphans`),c=(0,Is.useRef)(!1),l=(0,Is.useCallback)(async()=>{if(!c.current){c.current=!0;try{for(;;){let e=await D.post(`/links/graph/tick`,{});if(t(e),!e.progress?.running)break;await new Promise(e=>setTimeout(e,800))}}catch(e){a(e.message)}finally{c.current=!1,r(!1)}}},[]);(0,Is.useEffect)(()=>{D.get(`/links/graph`).then(t).catch(e=>a(e.message))},[]),(0,Is.useEffect)(()=>{e?.progress?.running&&!c.current&&(r(!0),l())},[e?.progress?.running,l]);let u=async()=>{r(!0),a(null);try{t(await D.post(`/links/graph/build`)),l()}catch(e){a(e.message),r(!1)}};if(!e)return(0,Ls.jsx)(Ce,{error:i});if(!e.ready)return(0,Ls.jsxs)(`div`,{className:`ars-page`,children:[i&&(0,Ls.jsx)(M,{tone:`serious`,children:i}),e.progress?.status===`failed`&&(0,Ls.jsxs)(M,{tone:`serious`,children:[(0,Ls.jsx)(`strong`,{children:b(`The last build did not finish.`,`ai-rank-suite`)}),` `,e.progress.error?e.progress.error:b(`No reason was recorded.`,`ai-rank-suite`),` `,b(`Pressing Build tries again from the start; nothing from the failed run is kept.`,`ai-rank-suite`)]}),!i&&e.progress?.running&&(0,Ls.jsx)(k,{icon:(0,Ls.jsx)(kt,{size:16}),title:b(`Link structure`,`ai-rank-suite`),subtitle:b(`One pass over every published page — nothing leaves your server`,`ai-rank-suite`),children:(0,Ls.jsx)(ze,{label:zs(e.progress),total:100,percent:e.progress.percent,note:b(`The run continues in slices — leave this tab open, or come back and it will have carried on.`,`ai-rank-suite`)})}),(0,Ls.jsx)(Xo,{badge:b(`Graph not built`,`ai-rank-suite`),ringLabel:b(`Structure`,`ai-rank-suite`),title:b(`The link graph of this site has not been built yet.`,`ai-rank-suite`),why:b(`One pass over every published page follows every internal link and works out which pages nothing points at, how many clicks each one sits from the home page, which anchor texts you re-use and where you link out to. Nothing leaves your server.`,`ai-rank-suite`),action:n?`Scanning…`:b(`Build the graph`,`ai-rank-suite`),onAction:u,busy:n,progress:e.progress?.running?{running:!0,done:e.progress.done,total:e.progress.total,percent:e.progress.percent,label:zs(e.progress),note:b(`The run continues in slices — leave this tab open, or come back and it will have carried on.`,`ai-rank-suite`)}:null,stats:[{label:b(`Pages in graph`,`ai-rank-suite`)},{label:b(`Orphans`,`ai-rank-suite`)},{label:b(`Deep pages`,`ai-rank-suite`)},{label:b(`Outbound hosts`,`ai-rank-suite`)}],previews:[{title:b(`Orphans`,`ai-rank-suite`),text:b(`Pages no other page links to — invisible to a crawler that follows links.`,`ai-rank-suite`)},{title:b(`Click depth`,`ai-rank-suite`),text:b(`How far each page sits from the home page; beyond three clicks is where crawl budget dies.`,`ai-rank-suite`)},{title:b(`Anchor texts`,`ai-rank-suite`),text:b(`What you call your own pages when you link them — the words an engine learns them by.`,`ai-rank-suite`)}]}),(0,Ls.jsx)(k,{icon:(0,Ls.jsx)(kt,{size:16}),title:b(`Link structure`,`ai-rank-suite`),subtitle:b(`One pass over every published page — nothing leaves your server`,`ai-rank-suite`),children:(0,Ls.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Ls.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`The graph has not been built yet. Scanning reads every published page, follows every link, and works out which pages nothing points at, how many clicks each one sits from the home page, which anchor text you re-use, and where you link out to.`,`ai-rank-suite`)}),(0,Ls.jsx)(`div`,{children:(0,Ls.jsxs)(A,{onClick:u,busy:n,children:[(0,Ls.jsx)(Tt,{size:13}),b(`Scan the site`,`ai-rank-suite`)]})})]})})]});let d=e=>Array.isArray(e)?e.length:0,f=[{id:`orphans`,label:S(b(`Orphans (%s)`,`ai-rank-suite`),d(e.orphans))},{id:`deep`,label:S(b(`Buried (%s)`,`ai-rank-suite`),d(e.deep))},{id:`underlinked`,label:S(b(`Under-linked (%s)`,`ai-rank-suite`),d(e.thin))},{id:`dead_ends`,label:S(b(`Dead ends (%s)`,`ai-rank-suite`),d(e.dead_ends))},{id:`hubs`,label:b(`Hubs`,`ai-rank-suite`)},{id:`authority`,label:b(`Authority`,`ai-rank-suite`)},{id:`wasted`,label:S(b(`Wasted (%s)`,`ai-rank-suite`),d(e.wasted))},{id:`starved`,label:S(b(`Starved (%s)`,`ai-rank-suite`),d(e.starved))}];return(0,Ls.jsxs)(`div`,{className:`ars-page`,children:[i&&(0,Ls.jsx)(M,{tone:`serious`,children:i}),(0,Ls.jsx)(Ee,{columns:4,metrics:[{id:`pages`,label:b(`Pages in the graph`,`ai-rank-suite`),hint:b(`Every published page the scan reached, and every internal link found between them.`,`ai-rank-suite`),value:e.pages.toLocaleString(),sub:S(b(`%s internal links`,`ai-rank-suite`),e.edges.toLocaleString())},{id:`orphans`,label:b(`Orphan pages`,`ai-rank-suite`),hint:b(`Nothing on the site links to these. A crawler can still reach them from the sitemap, but nothing tells it they matter.`,`ai-rank-suite`),value:d(e.orphans),accent:d(e.orphans)>0?`var(--ars-accent)`:void 0,sub:b(`nothing links to them`,`ai-rank-suite`)},{id:`depth`,label:b(`Average click depth`,`ai-rank-suite`),hint:b(`How many clicks a page sits from the home page, averaged. Three or fewer is the usual target — only links can change it.`,`ai-rank-suite`),value:e.avg_depth,accent:e.avg_depth>3?`var(--ars-accent)`:void 0,sub:e.unreached?S(b(`%s unreachable by links`,`ai-rank-suite`),e.unreached):b(`from the home page`,`ai-rank-suite`)},{id:`underlinked`,label:b(`Under-linked pages`,`ai-rank-suite`),hint:b(`Eight hundred words or more with at most one page pointing at them — the cheapest wins on the site.`,`ai-rank-suite`),value:d(e.thin),sub:b(`long, but barely linked`,`ai-rank-suite`)}]}),(0,Ls.jsx)(k,{icon:(0,Ls.jsx)(kt,{size:16}),title:b(`Link structure`,`ai-rank-suite`),subtitle:b(`Where the links actually go, and which pages the structure is failing`,`ai-rank-suite`),action:(0,Ls.jsxs)(A,{variant:`ghost`,onClick:u,busy:n,children:[(0,Ls.jsx)(Tt,{size:13}),b(`Rescan`,`ai-rank-suite`)]}),children:(0,Ls.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Ls.jsx)(qe,{options:f,value:o,onChange:s}),(0,Ls.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:Rs()[o]}),(0,Ls.jsx)(Ns,{rows:e[o],empty:`Nothing in this category — that is the result you want.`,columns:o===`hubs`?[`in`,`out`,`depth`]:[`authority`,`wasted`,`starved`].includes(o)?[`authority`,`in`,`depth`,`score`]:[`in`,`out`,`depth`,`words`]}),e.broken.length>0&&(0,Ls.jsxs)(M,{tone:`warning`,children:[S(x(`%d internal link points at a URL that does not`,`%d internal links point at a URL that does not`,e.broken.length,`ai-rank-suite`),e.broken.length),`resolve. The Checker tab verifies each one over HTTP and offers a redirect.`]}),(0,Ls.jsx)(ft,{title:b(`What click depth is, and why it is not a vanity metric`,`ai-rank-suite`),children:(0,Ls.jsx)(`p`,{children:b(`Click depth is the shortest number of links from the home page to a page. A crawler spends a budget per site: the deeper a page sits, the less often it is recrawled and the weaker the signal that it matters. Three clicks or fewer is the usual target. Unlike a word count or a title tag, nothing written on the page itself can change it — only a link from somewhere shallower can.`,`ai-rank-suite`)})})]})}),(0,Ls.jsxs)(k,{icon:(0,Ls.jsx)(Ot,{size:16}),title:b(`Anchor text`,`ai-rank-suite`),subtitle:b(`The words you link with are how you tell an engine what the target page is about — when they say anything at all`,`ai-rank-suite`),children:[e.anchors.length===0?(0,Ls.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`No internal anchors found yet.`,`ai-rank-suite`)}):(0,Ls.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Ls.jsxs)(`table`,{className:`ars-table`,children:[(0,Ls.jsx)(`thead`,{children:(0,Ls.jsxs)(`tr`,{children:[(0,Ls.jsx)(`th`,{children:b(`Anchor`,`ai-rank-suite`)}),(0,Ls.jsx)(`th`,{className:`is-num`,children:b(`Uses`,`ai-rank-suite`)}),(0,Ls.jsx)(`th`,{className:`is-num`,children:b(`Distinct targets`,`ai-rank-suite`)}),(0,Ls.jsx)(`th`,{className:`is-mid`,children:b(`Verdict`,`ai-rank-suite`)})]})}),(0,Ls.jsx)(`tbody`,{children:e.anchors.map((e,t)=>(0,Ls.jsxs)(`tr`,{children:[(0,Ls.jsx)(`td`,{children:(0,Ls.jsx)(`span`,{className:`truncate inline-block`,style:{maxWidth:440},children:e.anchor})}),(0,Ls.jsx)(`td`,{className:`is-num`,children:e.count}),(0,Ls.jsx)(`td`,{className:`is-num`,children:e.targets}),(0,Ls.jsx)(`td`,{className:`is-mid`,children:e.generic?(0,Ls.jsx)(`span`,{className:`ars-tag`,style:{color:`var(--ars-c-yellow-ink)`,background:`var(--ars-c-yellow)`},children:b(`Generic`,`ai-rank-suite`)}):e.targets>1?(0,Ls.jsx)(`span`,{className:`ars-tag`,style:{color:`var(--ars-c-blue-ink)`,background:`var(--ars-c-blue)`},children:b(`Ambiguous`,`ai-rank-suite`)}):(0,Ls.jsx)(`span`,{className:`t-caption`,children:b(`Descriptive`,`ai-rank-suite`)})})]},t))})]})}),(0,Ls.jsx)(ft,{title:b(`Generic and ambiguous, and what each one costs`,`ai-rank-suite`),children:(0,Ls.jsx)(`p`,{children:`“Read more” describes nothing, so the link carries no topic at all — the one place on the page where you get to name what the target is about is spent on two wasted words. An anchor marked ambiguous points at several different pages: the same phrase claiming to be about several things teaches an engine it is about none of them. Neither is a penalty; both are simply signals thrown away.`})})]}),(0,Ls.jsx)(k,{icon:(0,Ls.jsx)(wt,{size:16}),title:b(`Outbound domains`,`ai-rank-suite`),subtitle:b(`Who you link out to, and how much of it you have marked nofollow`,`ai-rank-suite`),children:e.external.length===0?(0,Ls.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`No external links found. Citing a source is one of the strongest quality signals there is — for Google, and for an assistant deciding whether a page is worth quoting.`,`ai-rank-suite`)}):(0,Ls.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Ls.jsxs)(`table`,{className:`ars-table`,children:[(0,Ls.jsx)(`thead`,{children:(0,Ls.jsxs)(`tr`,{children:[(0,Ls.jsx)(`th`,{children:b(`Domain`,`ai-rank-suite`)}),(0,Ls.jsx)(`th`,{className:`is-num`,children:b(`Links`,`ai-rank-suite`)}),(0,Ls.jsx)(`th`,{className:`is-num`,children:b(`Nofollow`,`ai-rank-suite`)})]})}),(0,Ls.jsx)(`tbody`,{children:e.external.map(e=>(0,Ls.jsxs)(`tr`,{children:[(0,Ls.jsx)(`td`,{className:`ars-mono`,children:e.domain}),(0,Ls.jsx)(`td`,{className:`is-num`,children:e.count}),(0,Ls.jsx)(`td`,{className:`is-num`,children:e.nofollow})]},e.domain))})]})})})]})}function Fs({value:e}){return(0,Ls.jsxs)(`span`,{className:`ars-auth`,title:`${e} of 100, relative to the strongest page on this site`,children:[(0,Ls.jsx)(`span`,{className:`ars-auth-bar`,children:(0,Ls.jsx)(`i`,{style:{width:`${Math.max(2,e)}%`}})}),(0,Ls.jsx)(`b`,{className:`tabular-nums`,children:e})]})}var Is,Ls,Rs,zs,Bs=o((()=>{Is=u(f(),1),C(),O(),Qo(),dt(),mt(),Vt(),Ls=_e(),Rs=()=>({orphans:b(`Nothing on the site points at these. A crawler arriving from the sitemap can still reach them, but nothing tells it — or an AI assistant — that they matter.`,`ai-rank-suite`),deep:b(`Four or more clicks from the home page. Depth is the one signal writing cannot fix: it is decided entirely by what links where.`,`ai-rank-suite`),underlinked:b(`Eight hundred words or more, with at most one page pointing at them. The work here is already done — these are the cheapest wins on the site.`,`ai-rank-suite`),dead_ends:b(`These link out to nothing. A reader who finishes has nowhere to go, and the link equity that arrived stops here instead of flowing on.`,`ai-rank-suite`),hubs:b(`The most linked-to pages on the site. If this is not roughly your list of most important pages, your internal linking is arguing against your own priorities.`,`ai-rank-suite`),authority:b(`Where the site’s own authority actually ends up. This is not a count of links: authority flows, so a page linked once from a strong page can outrank one linked twenty times from weak ones. If your privacy policy is near the top, that is a footer link on every page doing exactly what a footer link does.`,`ai-rank-suite`),wasted:b(`These hold real internal authority and score badly. Every one is authority you already have, pointed at a page that cannot use it — usually a legal page, a tag archive or an old post the navigation never stopped linking to.`,`ai-rank-suite`),starved:b(`The opposite: pages that are good and that nothing points at. Adding two or three links from your strongest pages is the cheapest ranking change available on any site.`,`ai-rank-suite`)}),zs=e=>{switch(e?.phase){case`collect`:return e.total>0?S(b(`Reading pages — %1$s of %2$s`,`ai-rank-suite`),Number(e.done).toLocaleString(),Number(e.total).toLocaleString()):b(`Reading every published page…`,`ai-rank-suite`);case`resolve`:return b(`Resolving every link to the page it points at…`,`ai-rank-suite`);case`aggregate`:return b(`Counting what links to what…`,`ai-rank-suite`);case`authority`:return b(`Working out where your internal authority ends up…`,`ai-rank-suite`);case`publish`:return b(`Publishing the graph…`,`ai-rank-suite`);default:return b(`Building the graph…`,`ai-rank-suite`)}}}));function Vs(e,{perPage:t=50,orderby:n=``,order:r=`desc`,filters:i={}}={}){let[a,o]=(0,Gs.useState)({page:1,perPage:t,search:``,orderby:n,order:r,filters:i}),[s,c]=(0,Gs.useState)(null),[l,u]=(0,Gs.useState)(0),[d,f]=(0,Gs.useState)(0),[p,m]=(0,Gs.useState)(null),h=(0,Gs.useRef)(0),g=(0,Gs.useRef)(null),[_,v]=(0,Gs.useState)(``),y=(0,Gs.useCallback)(()=>{let t=++h.current;m(null);let n=new URLSearchParams;n.set(`page`,String(a.page)),n.set(`per_page`,String(a.perPage)),a.search&&n.set(`search`,a.search),a.orderby&&(n.set(`orderby`,a.orderby),n.set(`order`,a.order)),Object.entries(a.filters).forEach(([e,t])=>{t!==``&&t!=null&&n.set(e,String(t))}),D.get(`${e}?${n.toString()}`).then(e=>{t===h.current&&(c(e.items||[]),u(e.pagination?.total_items??(e.items||[]).length),f(e.pagination?.total_pages??1))}).catch(e=>{t===h.current&&(m(e.message||b(`Request failed`,`ai-rank-suite`)),c([]))})},[e,a]);return(0,Gs.useEffect)(()=>{y()},[y]),{rows:s,total:l,pages:d,error:p,state:a,liveSearch:_,setSearch:e=>{v(e),window.clearTimeout(g.current),g.current=window.setTimeout(()=>{o(t=>({...t,search:e,page:1}))},350)},setPage:e=>o(t=>({...t,page:e})),setPerPage:e=>o(t=>({...t,perPage:e,page:1})),sortBy:e=>o(t=>({...t,orderby:e,order:t.orderby===e&&t.order===`desc`?`asc`:`desc`,page:1})),setFilter:(e,t)=>o(n=>({...n,filters:{...n.filters,[e]:t},page:1})),resetFilters:()=>o(e=>({...e,search:``,filters:{},page:1}))||v(``),refresh:y}}function Hs({dir:e}){return(0,Ks.jsx)(`svg`,{className:`ars-grid-caret`,viewBox:`0 0 24 24`,width:`12`,height:`12`,fill:`none`,"aria-hidden":!0,children:(0,Ks.jsx)(`path`,{d:e===`asc`?`m6 14 6-6 6 6`:`m6 10 6 6 6-6`,stroke:`currentColor`,strokeWidth:`2.4`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Us({columns:e,count:t=8}){return Array.from({length:t},(t,n)=>(0,Ks.jsx)(`tr`,{className:`ars-grid-skeleton`,"aria-hidden":!0,children:e.map(e=>(0,Ks.jsx)(`td`,{children:(0,Ks.jsx)(`span`,{style:{width:`${45+(n*17+e.id.length*13)%40}%`}})},e.id))},n))}function Ws({columns:e,query:t,rowKey:n=e=>e.id,rowActions:r,empty:i,searchPlaceholder:a=`Search…`,toolbar:o}){let{rows:s,total:c,pages:l,error:u,state:d,liveSearch:f,setSearch:p,setPage:m,setPerPage:h,sortBy:g,resetFilters:_,refresh:v}=t,y=(0,Gs.useMemo)(()=>Object.entries(d.filters).filter(([,e])=>e!==``&&e!=null),[d.filters]),x=s===null,C=c===0?0:(d.page-1)*d.perPage+1,w=Math.min(c,d.page*d.perPage);return(0,Ks.jsxs)(`div`,{className:`ars-grid`,children:[(0,Ks.jsxs)(`div`,{className:`ars-grid-toolbar`,children:[(0,Ks.jsxs)(`div`,{className:`ars-grid-search`,children:[(0,Ks.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`14`,height:`14`,fill:`none`,"aria-hidden":!0,children:[(0,Ks.jsx)(`circle`,{cx:`11`,cy:`11`,r:`7`,stroke:`currentColor`,strokeWidth:`2`}),(0,Ks.jsx)(`path`,{d:`m20 20-3.5-3.5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]}),(0,Ks.jsx)(`input`,{type:`search`,value:f,placeholder:a,onChange:e=>p(e.target.value),"aria-label":a})]}),o,(y.length>0||d.search)&&(0,Ks.jsx)(`button`,{type:`button`,className:`ars-grid-reset`,onClick:_,children:b(`Reset filters`,`ai-rank-suite`)}),(0,Ks.jsx)(`span`,{className:`ars-grid-total`,"aria-live":`polite`,children:x?`…`:S(b(`%s total`,`ai-rank-suite`),c.toLocaleString())})]}),(0,Ks.jsx)(`div`,{className:`ars-grid-scroll`,children:(0,Ks.jsxs)(`table`,{className:`ars-table ars-grid-table`,children:[(0,Ks.jsx)(`thead`,{children:(0,Ks.jsxs)(`tr`,{children:[e.map(e=>(0,Ks.jsx)(`th`,{className:e.num?`num`:``,"aria-sort":d.orderby===e.id?d.order===`asc`?`ascending`:`descending`:void 0,children:e.sortable?(0,Ks.jsxs)(`button`,{type:`button`,className:`ars-grid-sort`,onClick:()=>g(e.id),children:[e.label,d.orderby===e.id?(0,Ks.jsx)(Hs,{dir:d.order}):null]}):e.label},e.id)),r&&(0,Ks.jsx)(`th`,{"aria-label":b(`Actions`,`ai-rank-suite`)})]})}),(0,Ks.jsx)(`tbody`,{children:x?(0,Ks.jsx)(Us,{columns:e}):u?(0,Ks.jsx)(`tr`,{children:(0,Ks.jsx)(`td`,{colSpan:e.length+ +!!r,children:(0,Ks.jsxs)(`div`,{className:`ars-grid-state`,children:[(0,Ks.jsx)(`strong`,{children:u}),(0,Ks.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:v,children:b(`Try again`,`ai-rank-suite`)})]})})}):s.length===0?(0,Ks.jsx)(`tr`,{children:(0,Ks.jsx)(`td`,{colSpan:e.length+ +!!r,children:(0,Ks.jsxs)(`div`,{className:`ars-grid-state`,children:[(0,Ks.jsx)(`strong`,{children:i?.title||b(`Nothing here`,`ai-rank-suite`)}),i?.children&&(0,Ks.jsx)(`span`,{children:i.children}),(y.length>0||d.search)&&(0,Ks.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:_,children:b(`Clear filters`,`ai-rank-suite`)})]})})}):s.map(t=>(0,Ks.jsxs)(`tr`,{children:[e.map(n=>(0,Ks.jsx)(`td`,{className:`${n.num?`num`:``}${n.id===e[0].id?` name`:``}`,children:n.render?n.render(t):t[n.id]},n.id)),r&&(0,Ks.jsx)(`td`,{className:`ars-grid-actions`,children:r(t)})]},n(t)))})]})}),!x&&!u&&c>0&&(0,Ks.jsxs)(`div`,{className:`ars-grid-footer`,children:[(0,Ks.jsxs)(`label`,{className:`ars-grid-perpage`,children:[b(`Rows`,`ai-rank-suite`),(0,Ks.jsx)(`select`,{value:d.perPage,onChange:e=>h(Number(e.target.value)),children:[25,50,100].map(e=>(0,Ks.jsx)(`option`,{value:e,children:e},e))})]}),(0,Ks.jsxs)(`span`,{className:`ars-grid-range`,children:[C.toLocaleString(),`–`,w.toLocaleString(),` of `,c.toLocaleString()]}),(0,Ks.jsxs)(`div`,{className:`ars-grid-pager`,children:[(0,Ks.jsx)(`button`,{type:`button`,disabled:d.page<=1,onClick:()=>m(d.page-1),"aria-label":b(`Previous page`,`ai-rank-suite`),children:`‹`}),(0,Ks.jsxs)(`span`,{children:[d.page,` / `,Math.max(1,l)]}),(0,Ks.jsx)(`button`,{type:`button`,disabled:d.page>=l,onClick:()=>m(d.page+1),"aria-label":b(`Next page`,`ai-rank-suite`),children:`›`})]})]})]})}var Gs,Ks,qs=o((()=>{Gs=u(f(),1),C(),O(),Ks=_e()})),Js=c({default:()=>Ys});function Ys(){let[e,t]=(0,Xs.useState)(`redirects`),[n,r]=(0,Xs.useState)(null),[i,a]=(0,Xs.useState)(null),[o,s]=(0,Xs.useState)(()=>{let e=window.location.hash.split(`?`)[1]||``,t=new URLSearchParams(e).get(`from`)||``;return{source:t,target:t?`/`:``,type:301,regex:!1}}),[c,l]=(0,Xs.useState)(!1),[u,d]=(0,Xs.useState)(null),[f,p]=(0,Xs.useState)(``),[m,h]=(0,Xs.useState)(``),[g,_]=(0,Xs.useState)(null),v=(0,Xs.useRef)(null),y=Vs(`/redirects`,{orderby:`created_at`,order:`desc`});(0,Xs.useEffect)(()=>{D.get(`/404s`).then(r).catch(()=>{}),D.get(`/settings/redirects`).then(a).catch(()=>{})},[]);let x=async()=>{l(!0),d(null);try{await D.post(`/redirects`,o),s({source:``,target:``,type:301,regex:!1}),y.refresh()}catch(e){d(e.message)}finally{l(!1)}},C=async e=>{try{await D.del(`/redirects/${e}`),y.refresh()}catch(e){d(e.message)}},w=e=>{s({source:e,target:`/`,type:301}),t(`redirects`),window.scrollTo({top:0,behavior:`smooth`})},T=async e=>{let t={...i,...e};a(t);try{await D.put(`/settings/redirects`,t)}catch(e){d(e.message)}},E=async(e,t,n,r)=>{let i={created:0,updated:0,skipped:0,errors:[],total:0},a=0;for(let o=0;o<200;o+=1){let o=await D.post(`/redirects/import`,{content:e,format:t,...n,offset:a});if(i.created+=Number(o.created||0),i.updated+=Number(o.updated||0),i.skipped+=Number(o.skipped||0),i.errors=i.errors.concat(o.errors||[]),i.total=Number(o.total||0),a=Number(o.offset||0),r?.(a,i.total),!Number(o.remaining))break}return i},ee=async e=>{p(`import`),d(null);try{let t=await e.text(),n=/\.json$/i.test(e.name)?`json`:`csv`,r=await E(t,n,{dry_run:!0},(e,t)=>h(t>0?`Checking ${e.toLocaleString()} of ${t.toLocaleString()} rows…`:``));h(``);let i=S(b(`%1$s to add, %2$s to update, %3$s refused. Import them?`,`ai-rank-suite`),Number(r.created).toLocaleString(),Number(r.updated).toLocaleString(),Number((r.errors||[]).length).toLocaleString());if(!window.confirm(i)){_({...r,preview:!0});return}let a=await E(t,n,{overwrite:r.updated>0},(e,t)=>h(t>0?`Imported ${e.toLocaleString()} of ${t.toLocaleString()} rows…`:``));h(``),_(a),y.reload?.()}catch(e){d(e.message)}finally{p(``),h(``),v.current&&(v.current.value=``)}};return(0,Zs.jsxs)(`div`,{className:`ars-page`,children:[(0,Zs.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,Zs.jsx)(Ie,{tabs:[{id:`redirects`,label:b(`Redirects`,`ai-rank-suite`)+(y.rows?` (${y.total})`:``)},{id:`404`,label:`404 monitor${n?` (${n.length})`:``}`}],active:e,onChange:t}),i&&(0,Zs.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,Zs.jsx)(A,{variant:`ghost`,onClick:async()=>{p(`export`);try{let{csv:e}=await D.get(`/redirects/export`),t=document.createElement(`a`);t.href=URL.createObjectURL(new Blob([``+e],{type:`text/csv;charset=utf-8`})),t.download=`ai-rank-suite-redirects-${new Date().toISOString().slice(0,10)}.csv`,t.click(),URL.revokeObjectURL(t.href)}catch(e){d(e.message)}finally{p(``)}},busy:f===`export`,children:b(`Export CSV`,`ai-rank-suite`)}),(0,Zs.jsx)(A,{variant:`ghost`,onClick:()=>v.current?.click(),busy:f===`import`,children:b(`Import CSV`,`ai-rank-suite`)}),m&&(0,Zs.jsx)(`span`,{className:`t-caption`,children:m}),(0,Zs.jsx)(`input`,{ref:v,type:`file`,accept:`.csv,.json,text/csv,application/json`,style:{display:`none`},onChange:e=>e.target.files?.[0]&&ee(e.target.files[0])}),(0,Zs.jsx)(Me,{checked:!!i.monitor_404,onChange:e=>T({monitor_404:e}),label:b(`Log 404s`,`ai-rank-suite`)}),(0,Zs.jsx)(Me,{checked:!!i.auto_redirect,onChange:e=>T({auto_redirect:e}),label:b(`Auto-redirect on slug change`,`ai-rank-suite`)})]})]}),u&&(0,Zs.jsx)(M,{tone:`serious`,children:u}),g&&(0,Zs.jsxs)(M,{tone:(g.errors||[]).length>0?`warning`:`good`,children:[(0,Zs.jsx)(`div`,{children:g.preview?S(b(`Nothing was written. The file holds %1$s new rules and %2$s changes.`,`ai-rank-suite`),Number(g.created).toLocaleString(),Number(g.updated).toLocaleString()):S(b(`%1$s rules added, %2$s updated, %3$s left as they were.`,`ai-rank-suite`),Number(g.created).toLocaleString(),Number(g.updated).toLocaleString(),Number(g.skipped).toLocaleString())}),(g.errors||[]).length>0&&(0,Zs.jsx)(`ul`,{className:`m-0 mt-1 pl-4 text-[12px]`,children:g.errors.slice(0,8).map((e,t)=>(0,Zs.jsx)(`li`,{children:S(b(`Row %1$s (%2$s): %3$s`,`ai-rank-suite`),e.row,e.source||`—`,e.reason)},t))})]}),e===`redirects`&&(0,Zs.jsxs)(Zs.Fragment,{children:[(0,Zs.jsx)(k,{title:b(`Add redirect`,`ai-rank-suite`),subtitle:b(`Source is a path on this site; target may be a path or a full URL`,`ai-rank-suite`),children:(0,Zs.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-[1fr_1fr_120px_auto] items-end`,children:[(0,Zs.jsxs)(`div`,{children:[(0,Zs.jsx)(`label`,{className:`block font-medium mb-1`,children:o.regex?`Source pattern (regex)`:`Source path`}),(0,Zs.jsx)(`input`,{type:`text`,className:o.regex?`ars-mono`:``,placeholder:o.regex?`^/blog/(.*)$`:`/old-page`,value:o.source,onChange:e=>s({...o,source:e.target.value})})]}),(0,Zs.jsxs)(`div`,{children:[(0,Zs.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Target`,`ai-rank-suite`)}),(0,Zs.jsx)(`input`,{type:`text`,placeholder:`/new-page`,value:o.target,onChange:e=>s({...o,target:e.target.value})})]}),(0,Zs.jsxs)(`div`,{children:[(0,Zs.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Type`,`ai-rank-suite`)}),(0,Zs.jsxs)(`select`,{value:o.type,onChange:e=>s({...o,type:Number(e.target.value)}),children:[(0,Zs.jsx)(`option`,{value:301,children:`301 permanent`}),(0,Zs.jsx)(`option`,{value:302,children:`302 temporary`}),(0,Zs.jsx)(`option`,{value:307,children:`307 temporary`}),(0,Zs.jsx)(`option`,{value:410,children:`410 gone`})]})]}),(0,Zs.jsx)(A,{onClick:x,busy:c,disabled:!o.source||!o.target,children:b(`Add`,`ai-rank-suite`)}),(0,Zs.jsx)(`div`,{className:`sm:col-span-4`,children:(0,Zs.jsx)(Me,{checked:!!o.regex,onChange:e=>s({...o,regex:e}),label:b(`Regular expression (use $1, $2 … in the target for captured groups)`,`ai-rank-suite`)})})]})}),(0,Zs.jsx)(Ws,{query:y,searchPlaceholder:`Search source or target…`,toolbar:(0,Zs.jsx)(qe,{label:b(`Kind`,`ai-rank-suite`),value:y.state.filters.status||``,onChange:e=>y.setFilter(`status`,e),options:[{id:``,label:b(`All`,`ai-rank-suite`)},{id:`active`,label:b(`Plain`,`ai-rank-suite`)},{id:`regex`,label:b(`Regex`,`ai-rank-suite`)}]}),columns:[{id:`source`,label:b(`Source`,`ai-rank-suite`),sortable:!0,render:e=>(0,Zs.jsxs)(`span`,{className:`ars-mono`,children:[e.source,e.regex&&(0,Zs.jsx)(`span`,{className:`ml-2`,children:(0,Zs.jsx)(j,{tone:`brand`,children:`regex`})})]})},{id:`target`,label:b(`Target`,`ai-rank-suite`),render:e=>(0,Zs.jsx)(`span`,{className:`ars-mono ars-url`,style:{maxWidth:300,display:`inline-block`},title:e.target,children:e.target})},{id:`type`,label:b(`Type`,`ai-rank-suite`),render:e=>(0,Zs.jsx)(j,{tone:e.type===301?`brand`:`neutral`,children:e.type})},{id:`hits`,label:b(`Hits`,`ai-rank-suite`),num:!0,sortable:!0}],rowActions:e=>(0,Zs.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent cursor-pointer text-[12px]`,style:{color:`var(--ars-serious)`},onClick:()=>C(e.id),children:b(`Delete`,`ai-rank-suite`)}),empty:{title:b(`No redirects yet`,`ai-rank-suite`),children:`Changing a published page's URL creates one automatically.`}})]}),e===`404`&&(0,Zs.jsx)(k,{title:b(`404 monitor`,`ai-rank-suite`),subtitle:b(`Requests that hit nothing — each one is a lost visitor or crawler`,`ai-rank-suite`),children:!n||n.length===0?(0,Zs.jsxs)(`div`,{className:`grid gap-2`,children:[(0,Zs.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`No 404s logged yet.`,`ai-rank-suite`)}),(0,Zs.jsx)(`p`,{className:`m-0 t-caption`,children:b(`From now on, every request to a path that does not exist on this site is recorded here with how often it was hit and when it was last seen: a visitor following a stale link, a crawler still asking for a page you deleted, a typo in somebody else's link to you. Each one is a lost visit until it has a redirect, and the Redirects tab is where it gets one. Old entries are pruned after the number of days set under Settings, Data.`,`ai-rank-suite`)})]}):(0,Zs.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Zs.jsxs)(`table`,{className:`ars-table`,children:[(0,Zs.jsx)(`thead`,{children:(0,Zs.jsxs)(`tr`,{children:[(0,Zs.jsx)(`th`,{children:b(`Path`,`ai-rank-suite`)}),(0,Zs.jsx)(`th`,{className:`is-num`,children:b(`Hits`,`ai-rank-suite`)}),(0,Zs.jsx)(`th`,{children:b(`Last seen`,`ai-rank-suite`)}),(0,Zs.jsx)(`th`,{})]})}),(0,Zs.jsx)(`tbody`,{children:n.map(e=>(0,Zs.jsxs)(`tr`,{children:[(0,Zs.jsx)(`td`,{className:`ars-mono`,style:{maxWidth:340},title:e.path,children:(0,Zs.jsx)(`span`,{className:`ars-url`,children:e.path})}),(0,Zs.jsx)(`td`,{className:`is-num`,children:e.hits}),(0,Zs.jsx)(`td`,{style:{color:`var(--ars-ink-3)`},children:e.last_hit}),(0,Zs.jsx)(`td`,{className:`is-num`,children:(0,Zs.jsx)(A,{variant:`ghost`,onClick:()=>w(e.path),children:b(`Redirect`,`ai-rank-suite`)})})]},e.id))})]})})})]})}var Xs,Zs,Qs=o((()=>{Xs=u(f(),1),C(),O(),dt(),qs(),Zs=_e()})),$s=c({default:()=>ec});function ec(){let[e,t]=(0,tc.useState)(null),[n,r]=(0,tc.useState)(`missing`),[i,a]=(0,tc.useState)(null),[o,s]=(0,tc.useState)(null),c=(0,tc.useRef)(!1),l=async()=>{if(!c.current){c.current=!0;try{let e=await D.post(`/bulk/tick`);for(t(e);e.state===`running`;)(e.busy||e.error)&&await new Promise(e=>setTimeout(e,2e3)),e=await D.post(`/bulk/tick`),t(e)}catch(e){a(e.message)}finally{c.current=!1}}};(0,tc.useEffect)(()=>{D.get(`/bulk/status`).then(e=>{t(e),e.state===`running`&&l()}).catch(()=>{})},[]);let u=async e=>{s(e),a(null);try{t(await D.post(`/bulk/start`,{action:e,scope:n})),l()}catch(e){a(e.message)}finally{s(null)}},d=async()=>{try{t(await D.post(`/bulk/cancel`))}catch(e){a(e.message)}},f=e?.state===`running`;return(0,nc.jsxs)(`div`,{className:`ars-page`,children:[i&&(0,nc.jsx)(M,{tone:`serious`,children:i}),e&&e.state!==`idle`&&(0,nc.jsx)(k,{title:f?b(`Working…`,`ai-rank-suite`):e.state===`done`?b(`Finished`,`ai-rank-suite`):b(`Cancelled`,`ai-rank-suite`),subtitle:S(b(`%1$s of %2$s pages processed`,`ai-rank-suite`),e.done,e.total)+(e.failed?` · `+S(b(`%d failed`,`ai-rank-suite`),e.failed):``),action:f?(0,nc.jsx)(A,{variant:`ghost`,onClick:d,children:b(`Cancel`,`ai-rank-suite`)}):(0,nc.jsx)(j,{tone:e.failed?`warning`:`good`,children:e.failed?S(b(`%d failed`,`ai-rank-suite`),e.failed):`✓ `+b(`Complete`,`ai-rank-suite`)}),children:(0,nc.jsxs)(`div`,{className:`grid gap-2`,children:[(0,nc.jsx)(ze,{label:S(b(`%s remaining`,`ai-rank-suite`),Number(e.remaining||0).toLocaleString()),total:100,percent:e.progress}),e.errors?.length>0&&(0,nc.jsx)(`ul`,{className:`m-0 mt-1 pl-5 text-[12px]`,style:{color:`var(--ars-serious)`},children:e.errors.map((e,t)=>(0,nc.jsx)(`li`,{children:e},t))})]})}),(0,nc.jsxs)(k,{title:b(`Bulk optimization`,`ai-rank-suite`),subtitle:b(`Apply an action across your whole site — resumable and cancellable at any time`,`ai-rank-suite`),action:(0,nc.jsx)(`div`,{className:`inline-flex gap-1 p-1 ars-r-md`,style:{background:`var(--ars-surface-3)`},children:[{id:`missing`,label:b(`Only missing`,`ai-rank-suite`)},{id:`all`,label:b(`All pages`,`ai-rank-suite`)}].map(e=>(0,nc.jsx)(`button`,{type:`button`,onClick:()=>r(e.id),className:`px-3 py-1.5 ars-r-sm text-[12.5px] font-semibold border-0 cursor-pointer`,style:n===e.id?{background:`var(--ars-surface)`,color:`var(--ars-ink)`}:{background:`transparent`,color:`var(--ars-ink-2)`},children:e.label},e.id))}),children:[(0,nc.jsx)(`div`,{className:`grid gap-2.5`,children:rc.map(e=>(0,nc.jsxs)(`div`,{className:`flex items-center justify-between gap-4 ars-r-md p-3.5`,style:{background:`var(--ars-surface-2)`},children:[(0,nc.jsxs)(`div`,{children:[(0,nc.jsxs)(`div`,{className:`font-semibold flex items-center gap-1.5`,children:[e.ai&&(0,nc.jsx)(Et,{size:13}),e.label]}),(0,nc.jsx)(`div`,{className:`text-[12.5px] mt-0.5`,style:{color:`var(--ars-ink-2)`},children:e.desc})]}),(0,nc.jsxs)(A,{variant:e.ai?`primary`:`ghost`,busy:o===e.id,disabled:f,onClick:()=>u(e.id),children:[!e.ai&&(0,nc.jsx)(Tt,{size:13}),` Run`]})]},e.id))}),(0,nc.jsx)(`p`,{className:`m-0 mt-3 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`AI actions send one small request per page to your provider. Keep this tab open while a job runs — progress is saved, so you can close it and resume later.`,`ai-rank-suite`)})]})]})}var tc,nc,rc,ic=o((()=>{tc=u(f(),1),C(),O(),dt(),Vt(),nc=_e(),rc=[{id:`analyze`,label:b(`Analyze all pages`,`ai-rank-suite`),desc:b(`Recalculate GEO + SEO scores for every published page. Fast, free, no AI needed.`,`ai-rank-suite`),ai:!1},{id:`describe`,label:b(`Write meta descriptions`,`ai-rank-suite`),desc:b(`Generate a meta description and an AI summary per page. Uses your AI key.`,`ai-rank-suite`),ai:!0},{id:`faq`,label:b(`Generate FAQs`,`ai-rank-suite`),desc:b(`Create grounded Q&A per page — feeds FAQPage schema. Uses your AI key.`,`ai-rank-suite`),ai:!0}]})),ac,oc=o((()=>{ac=`<svg width="350" height="350" viewBox="0 0 350 350" fill="none" xmlns="http://www.w3.org/2000/svg">
    1414<g clip-path="url(#clip0_3148_2108)">
    1515<path d="M297 0.499023H53C23.7289 0.499023 0 24.1603 0 53.348V296.653C0 325.841 23.7289 349.502 53 349.502H297C326.271 349.502 350 325.841 350 296.653V53.348C350 24.1603 326.271 0.499023 297 0.499023Z" fill="url(#paint0_linear_3148_2108)"/>
    … …  
    4444</defs>
    4545</svg>
    46 `})),tc,nc=o((()=>{tc=`<svg width="73" height="72" viewBox="0 0 73 72" fill="none" xmlns="http://www.w3.org/2000/svg">
     46`})),sc,cc=o((()=>{sc=`<svg width="73" height="72" viewBox="0 0 73 72" fill="none" xmlns="http://www.w3.org/2000/svg">
    4747<path fill-rule="evenodd" clip-rule="evenodd" d="M36.6097 72C56.492 72 72.6097 55.8823 72.6097 36C72.6097 16.1177 56.492 0 36.6097 0C16.7275 0 0.609741 16.1177 0.609741 36C0.609741 55.8823 16.7275 72 36.6097 72ZM30.8774 13.1759C30.3897 12.4327 29.4864 12.0852 28.6581 12.3778C27.7146 12.7111 26.7918 13.1031 25.8952 13.5514C25.1081 13.945 24.7132 14.8439 24.8865 15.7207L25.5038 18.8445C25.6627 19.6485 25.3346 20.4645 24.7117 20.9829C23.7272 21.8022 22.8184 22.7285 22.0041 23.7537C21.498 24.3909 20.6994 24.7287 19.9109 24.5694L16.8487 23.9508C15.9884 23.777 15.1085 24.1836 14.7259 24.9888C14.5098 25.4437 14.3057 25.9081 14.1144 26.3817C13.9231 26.8554 13.7472 27.3316 13.5864 27.8098C13.302 28.6563 13.6456 29.5775 14.376 30.0726L16.9761 31.8354C17.6456 32.2893 17.9791 33.1031 17.8982 33.9192C17.768 35.2321 17.7733 36.5428 17.9062 37.832C17.9902 38.6477 17.6595 39.4627 16.9916 39.919L14.3965 41.6918C13.6682 42.1893 13.3276 43.1111 13.6144 43.9563C13.941 44.9191 14.3252 45.8607 14.7645 46.7756C15.1502 47.5788 16.0312 47.9817 16.8904 47.8049L19.9518 47.175C20.7397 47.0129 21.5394 47.3477 22.0474 47.9833C22.8503 48.9878 23.7581 49.9152 24.7628 50.7461C25.3872 51.2625 25.7183 52.0774 25.5621 52.882L24.9559 56.0068C24.7856 56.8845 25.1841 57.7824 25.9731 58.1728C26.4189 58.3934 26.874 58.6016 27.3382 58.7968C27.8024 58.992 28.2691 59.1715 28.7378 59.3355C30.1088 59.8154 32.0277 58.0978 33.4464 56.8279C34.146 56.2017 34.5775 55.3155 34.5821 54.3666C34.5821 54.3616 34.5821 54.3565 34.5821 54.3514L34.5821 49.1261C34.5821 49.0708 34.5842 49.0159 34.5884 48.9616C30.3981 47.9393 27.2828 44.0927 27.2828 39.5037V33.9551C27.2828 33.5334 27.6178 33.1915 28.0312 33.1915H30.6265V27.7323C30.6265 26.9786 31.2253 26.3675 31.964 26.3675C32.7027 26.3675 33.3015 26.9786 33.3015 27.7323V33.1915H40.3234V27.7323C40.3234 26.9786 40.9222 26.3675 41.6609 26.3675C42.3996 26.3675 42.9984 26.9786 42.9984 27.7323V33.1915H45.5938C46.0071 33.1915 46.3421 33.5334 46.3421 33.9551V39.5037C46.3421 44.2378 43.0268 48.1818 38.6359 49.05C38.6368 49.0752 38.6373 49.1006 38.6373 49.1261L38.6373 54.3289C38.6373 55.2962 39.0817 56.1985 39.8023 56.8269C41.2463 58.0862 43.1983 59.7886 44.5613 59.3071C45.5048 58.9737 46.4276 58.5817 47.3242 58.1334C48.1113 57.7399 48.5062 56.8409 48.3329 55.9642L47.7156 52.8403C47.5567 52.0363 47.8848 51.2202 48.5077 50.7019C49.4922 49.8826 50.401 48.9563 51.2153 47.9311C51.7214 47.2939 52.5199 46.9562 53.3084 47.1154L56.3707 47.7341C57.231 47.9079 58.1109 47.5012 58.4935 46.6961C58.7097 46.2412 58.9137 45.7768 59.105 45.3031C59.2963 44.8295 59.4722 44.3533 59.6329 43.8751C59.9174 43.0286 59.5738 42.1074 58.8434 41.6123L56.2432 39.8495C55.5737 39.3956 55.2403 38.5817 55.3212 37.7657C55.4513 36.4527 55.446 35.142 55.3132 33.8529C55.2292 33.0372 55.5598 32.2222 56.2278 31.7659L58.8229 29.9931C59.5512 29.4955 59.8918 28.5737 59.605 27.7286C59.2784 26.7658 58.8942 25.8241 58.4548 24.9093C58.0692 24.1061 57.1882 23.7032 56.329 23.88L53.2677 24.5099C52.4797 24.672 51.68 24.3372 51.172 23.7016C50.3691 22.6971 49.4614 21.7697 48.4566 20.9388C47.8321 20.4223 47.5011 19.6075 47.6573 18.8029L48.2635 15.6781C48.4338 14.8003 48.0353 13.9024 47.2463 13.512C46.8005 13.2915 46.3454 13.0833 45.8812 12.8881C45.417 12.6928 44.9503 12.5133 44.4817 12.3493C43.6522 12.059 42.7494 12.4097 42.2641 13.155L40.5366 15.8081C40.0918 16.4913 39.2942 16.8316 38.4945 16.749C37.2078 16.6163 35.9233 16.6216 34.6599 16.7572C33.8605 16.8429 33.0619 16.5055 32.6147 15.8239L30.8774 13.1759Z" fill="#005AE0"/>
    4848</svg>
    49 `})),rc,ic=o((()=>{rc=`<?xml version="1.0" encoding="utf-8"?>
     49`})),lc,uc=o((()=>{lc=`<?xml version="1.0" encoding="utf-8"?>
    5050<!-- Generator: Adobe Illustrator 27.4.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
    5151<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 275 275" xml:space="preserve">
    … …  
    6868        </g>
    6969</svg>
    70 `})),ac,oc=o((()=>{ac=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" style="enable-background:new 0 0 256 256" xml:space="preserve"><defs><filter id="a" filterUnits="userSpaceOnUse" x="-81.6" y="-38.3" width="354.4" height="393.9"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"/></filter></defs><mask maskUnits="userSpaceOnUse" x="-81.6" y="-38.3" width="354.4" height="393.9" id="b"><g style="filter:url(#a)"><path style="fill:#fff" d="M0 0h256v256H0z"/></g></mask><g style="mask:url(#b)"><radialGradient id="c" cx="179.244" cy="174.731" r="264.452" gradientTransform="matrix(.8241 -.00059 -.00036 -.7607 45.977 208.76)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".057" style="stop-color:#fff7d3"/><stop offset=".13" style="stop-color:#fdefc3"/><stop offset=".212" style="stop-color:#fbe1a9"/><stop offset=".3" style="stop-color:#f8cd84"/><stop offset=".394" style="stop-color:#f4b455"/><stop offset=".49" style="stop-color:#f0961c"/><stop offset=".504" style="stop-color:#ef9113"/><stop offset=".673" style="stop-color:#d67424"/><stop offset="1" style="stop-color:#af5417"/></radialGradient><path style="fill:url(#c)" d="M-81.6-38.3h354.4v352H-81.6z"/><path d="M155 325.6s-.6 9.8 5.1 8.6 19.1 4.5 19.1 4.5l3.4 16.8h33.7l-7.6-31.9c-.1 0-46.4-8.9-53.7 2zM227.4 324.1s-3.4 11.2 2.2 14.6l5.6 3.4-1.1 13.5h21.7v-14c0-6.5 1.7-7 0-18.7-.8-5.7-28.4 1.2-28.4 1.2z"/><radialGradient id="d" cx="99.905" cy="220.308" r="72.384" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".358" style="stop-color:#bb6a2c"/><stop offset=".451" style="stop-color:#94551f"/><stop offset=".546" style="stop-color:#744414"/><stop offset=".645" style="stop-color:#5b370b"/><stop offset=".747" style="stop-color:#492d05"/><stop offset=".856" style="stop-color:#3e2801"/><stop offset=".982" style="stop-color:#3b2600"/></radialGradient><path style="fill:url(#d)" d="M187.5 78c10.6-6.8-44.2-17.3-44.2-17.3s-25.7 25.7-44.6 18.1-79.4-18.1-91.1 26.1c0 0 15.5-23.7 37.8-19.3 12.8 2.5 14.1 15.7 16 28.3h105.9c6-14.6 11.2-30.1 20.2-35.9z"/><radialGradient id="e" cx="99.905" cy="220.306" r="72.383" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#e)" d="M71.5 136.6c16.3 10 37.8-1.2 50.3 6s5.3 13.2 5.3 13.2 29.5-18.1 37-34.5c1.1-2.4 2.2-4.9 3.2-7.5H61.4c1.4 9.5 3.2 18.5 10.1 22.8z"/><radialGradient id="f" cx="171.768" cy="84.959" r="64.866" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".358" style="stop-color:#bb6a2c"/><stop offset=".451" style="stop-color:#94551f"/><stop offset=".546" style="stop-color:#744414"/><stop offset=".645" style="stop-color:#5b370b"/><stop offset=".747" style="stop-color:#492d05"/><stop offset=".856" style="stop-color:#3e2801"/><stop offset=".982" style="stop-color:#3b2600"/></radialGradient><path style="fill:url(#f)" d="M71.5 136.6c16.3 10 37.8-1.2 50.3 6s.2 19.3.2 19.3 35.2-12.8 43.6-37.2c.9-2.5 1.9-9.8 3-12.3l-107.1.3c1.3 9.3 3.1 19.6 10 23.9z"/><path d="M250.3 329.1c-8.9 0-20-1.2-22-1.5-.3-1.1-1-4.8.8-8.5.3-.7.8-1.4 1.5-2l.1-.1v-.1c.8-2.9 1.9-10.6 1.9-10.9v-.2l-.1-.1s-2.1-3.8-2.6-5c-.4-1 .8-7 1.3-8.9.4-1.5-4.4-15.1-6.1-18.4-1.3-2.4-4.1-5.5-6.3-8-1.1-1.2-2-2.3-2.6-3.1-1-1.3-1.8-8.5-2-18.8v-.1l-.1-.1c-.3-.7-.6-1.1-.7-1.3-.1-.1-.4-.7-.7-3.9v-.1l-.1-.1c-5.5-7.5-13.1-18.1-16.9-23.7l-.7-.9-.2 1.1c-.5 2.6-1.3 7.7-1.9 12-.8 5.6 2.1 9.7 5.5 14.4.3.5.7 1 1 1.5 3.8 5.5 5.8 9.5 5.5 15.4-.2 4-3 11.6-5.2 17.7-1.1 3.1-2.1 5.8-2.5 7.3-1.2 4.7 3.4 10.3 6.1 13.6l.1.1c2.5 3.1 2.4 6.7 1.9 7.8-.4 1 .1 2.5.9 4.7.4 1 .8 2.2 1.1 3.4 1 3.8 1.4 10 1 11.1-.7.8-10 2-14.7 2h-2.1c-3.6 0-9.6.6-14.4 1l-.8.1c-.6.1-1.4.1-2.4.1-5.9 0-16.1-1.2-18.3-1.4 1.2-9.3 7.5-9.8 11.3-10 1-.1 1.7-.1 2.2-.3 2.2-1 12.3-12.5 14.4-16.5.9-1.7 1.2-5.9.8-12.5-.3-5.7-1-11.4-1.3-13.1-.5-3.4-5.1-17.4-5.3-18v-.1c0-.1-4.8-7.8-6.6-11.3-1.7-3.5-1.1-15.9-1.1-16v-.1l-3.2-7c0-.1-4-10.5-5.6-15.3s-2.8-15.1-2.8-19.7c0-1 .1-2.3.3-4.1.1-.6.1-1.2.2-1.8v-.9h-.5c-1-3.3-1-11.8-.8-13 .1-.9-.4-8.8-.7-13.4v-.2l-.1-.1c-.8-.7-1-.9-1-1-.3-.3 0-1.7.3-2.5v-.2c0-.1-.3-7.7-.1-9.8.1-1.4.6-2.6.8-3.1l.2-.4-.4-.2c-1.1-.7-.7-4.9-.1-7 .2-.6.7-1.2 1.7-1.9l.2-.1v-.1c.1-.1.3-.2.4-.2l-.3-.6c.4-3.6.8-7.7.6-8.3-.2-.6-3.7-9.1-5.8-14.1l-.3-.7-.9 1.2c-1.6 2-5.3 6.7-11.6 6.7-3.7 0-7.8-1.6-12.2-4.8h-.2c-.9-.3-1.7-.9-2.3-1.6-.3-.4-.5-.8-.5-1.1-.1-.5.5-4 1-6.6.3-2 .7-3.9.8-4.8.2-1.7.4-3.4 2.9-7l.1-.1v-.2c-.2-1.4-.7-8.6 6.1-13.2.1-.1.4-.2.4-.2l.7-.8.1-.2-.1-.2c-.3-.9-.2-2 .2-3.4.3-1 .7-2 1.4-3 .5-.8.8-1.3.8-1.3s2.3-2.9 5.7-5c.8-.6 1.7-1 2.7-1.4.8-.3 1.5-.5 2.2-.7.9-.2 1.8-.3 2.8-.3 4.4 0 8.4 1.7 9.1 2l.2.1.2-.1c4.2-2.3 10.9-4.7 12.8-5.4l.2-.1.1-.1c1.5-2.6 2.6-5.4 3.1-7.2l.1-.2-.9-1.2-.3-6.5-.2-.1c-.7-.6-1.7-1.5-2.4-2.4-1.1-1.4-.4-4.6.2-5.5.1-.1.2-.1.2-.1.2 0 .5.2.8.5l1 .9-.2-1.3c-.4-2.6-.7-4.2-.9-4.8-.3-1-.2-3.6-.2-4.5.2-2.8 4.3-6.3 4.3-6.3s2.3-1.7 6.5-2.2c.6-.1 1.3-.1 1.9-.1.5 0 1.1 0 1.6.1 6.7.6 9.2 5.9 9.4 9.3 0 1 .1 4.8.1 7.8v1.1l.8-.7c.4-.4.7-.5.9-.5 0 0 .1 0 .2.2.6 1 1.2 3.5.2 4.9-.7.9-1.3 1.8-1.7 2.5l-.1.1v.2c.2 1.1.4 2.4.6 3.4.2.9.3 1.8.4 2.2V39.9l.2.2c1.5 1.6 4.2 4.5 5.5 6.1l.2.2h.3c1.4-.2 4.9-.7 7.8-.8h.2c3.1-1.6 6.2-2.4 9.3-2.4 3.8 0 7.6 1.2 11.2 3.6.5.3.9.6 1.3.9 2.1 1.3 3.7 2.6 4.7 4 1.5 1.7 2.3 3.3 2.8 5.7.2.5.4.9.5 1.3 2.2 6.4 3.1 18.2-16.4 25.6h-.1l-.1.1c-2.3 2.9-7.9 9.8-11.6 12.9-.7.6-1.3 1.1-2 1.7-2.1 1.8-4.2 3.6-6.4 5.1h-.1v.1c-3.1 4.1-4.8 6.6-4.9 7.4v.2c0 .1 1 5.4.4 9.9v.3l.3.2c1.6.9 1.6 4.3 1 7.2l-.1.2.2.2c1.7 1.7 3.4 11.8 4 15.6v.2l.2.1c.7.5.7 2.4.6 3.3l-.2.1c.4 1.1 1.1 3 1.8 5.1 1.8 5.1 3.1 8.8 3.7 9.5 0 0 .1.1.1.2l.3.4.1-.1s0 .1.1.1c.4.6.9 1.5 1.6 2.7 1.8 2.7 5.8 9.6 6.2 14.2.3 3.7.1 4.5-.1 5.1 0 .1-.1.2-.1.4v1.1c.1 1 .5 3.8.9 7.2.9 6.7 2.1 15.8 2.7 19.9.7 4.6 2.2 8.7 3.2 11.5.5 1.4.9 2.4 1 3.1.2 1.2 1.3 4.2 2.1 6.4v.1c.3.4.6.9.9 1.3 2.7 3.1 9.4 12 9.7 14.3.2 1.7-.4 5.7-.9 9.3-.3 2.3-.7 4.5-.7 5.8-.2 3.4.8 13 1.5 15.3.7 2.4 3.3 7.7 3.9 8.4.1.1.2.3.4.6 3.4 4.8 5.3 7.8 5.5 9 .2 1.4-.1 3.3-.3 4.2-.1.6-.2 1-.2 1v.2c.1.4 2.1 8.7 2.5 10.1.2.7.2 1.1.2 1.3v.2l.1.1c-.1 5.8-.6 16.9-.4 18.4-1.8.1-1.2-6.4-5.4-6.4z"/><path d="M194.2 64.8s-18.6 10.6-9.4 31.9c0 0-6.7-1-10.1-4.2-3.5-3.2-7.2-6.7-7.2-6.7s-8.9-9.4-11.4-9.6-9.6 1-9.6 1 2-3.5 4-4.9c2-1.5 6.4-4.5 6.4-4.5l16.6-1.7 10.4-.2 10.3-1.1z"/><path d="M149.2 75.1s5.3-4 7.9-4.3c2.6-.3 14.5-1 14.5-1l-2.6-1 18.5 1.6s-6.3 8.9-5.9 11.5c.3 2.6 1.7 14.5 1.7 14.5s-9.9-3.6-12.9-7.3c-3-3.6-7.9-8.9-7.9-8.9l-6.3-4.3c-.1.2-10.9 2.2-7-.8z"/><path d="M139 76.8s-1.6-8.6 4-9.6c0 0 5.3-4.9 10.2-4.9 0 0 3-3.3 9.6-1.3l13.2 4s18.4-9 24-10.6 8.2-2.3 9.2-.3c0 0 .4 3.7-.4 3.9-9.2 2-10.5 6.7-10.5 6.7L179.8 66l-7.9-.3-15.2 2.1-4.9 3.5-4.3 2.3-1.2 3.6-7.3-.4z"/><path d="m156.2 62.9-.7-2s-6.3-2.3-1.3-2.6c4.9-.3 17.5 0 17.5 0s5.3-3.6 5.6-4.6 2.6-4 2.6-4l4.2-.8s-.2 1.6 3.2 1.2c3.4-.4 6-.2 6.7-.6.7-.5 1.9-1.9 1.9-1.9l6.4-1.9 2.6 3.3 6.6-.3-2.6 1.3s-12.9 1.3-16.2 3.6-13.2 7.9-16.8 11.2c0 0-8.9-6.6-16.2-4.9.1.1-2.5.7-3.5 3zM185.2 74.2s14.3 2.8 14.8 3 0 .7-.2.7c-11.7 0 14.1 7.1 5.8 2.3-2.3-1.3 3 4.3 3 4.3s4.6-3.1 4.5-4c-.2-.8 0-2.3.7-3s4.8-3.8 5.3-4.1c.5-.3 2.1-1.8 2.1-1.8s-7.7-2.3-7.3-3.1c.5-.8 5.8-5.8 7.6-5.9 1.8-.2 4.6-2 5.1-2.8s1-4.6 3.3-6.4c2.3-1.8 8.2-4.6 8.2-4.6s3.6 2.6 4.5 4 1.4 3.7 1.4 3.7 2.1 4 2 4.5c-.2.5-.3 7.4-2.1 10.7-1.8 3.3-7.6 8.9-10.2 9.9-2.6 1-6.8 2.6-6.8 2.6s-8.8 8.6-15.6 7.9c0 0-.8 1.6-2.6 2.1s-5.3 1.5-5.8 1.5-5.9 1.5-6.6 1.5c-.7 0-11.2.5-12.2-1-1.1-1.6-7.3-13.6 1.1-22z"/><path d="M152.2 76.1s1-1.6 3.3-2.3c2.3-.7 10.9-.8 15.2-.5s3-1.2 3-1.2l11.2 2.3s-3 6.9-3 8.6c0 1.6 0 11 2.1 13s.7.6.7.6-6.3-.9-10.1-4.2c-3.8-3.3-10.6-10.1-10.6-10.1s-4.8-4.6-5.4-5.1c-.6-.4-4.9-1.6-6.4-1.1z"/><path d="M149.6 76.6s5.4.3 7.9 2.3 8.1 7.1 8.1 7.1l1.3-2.5s-8.1-6.4-9.6-6.9-7.7 0-7.7 0zM142 76.8s.7-9.2 8.2-10.6c0 0 5.3-4.9 9.6-3.6 4.3 1.3 13.6 3.4 13.6 3.4l12.1-3.7s21.1-9.2 23.7-6.9l.7 2.3s-10.2 2.3-11.5 6.9l-6.6.3-11.9 1-17.5.7-5.6 1.2-7.9 5.4-2.5 4-4.4-.4z"/><path d="M172.5 60.9s4.9-3 6.6-4.9c1.6-2 4-6.3 4-6.3s.4.1 3.2.1c2.8-.1 7.3 0 7.3 0l2-1.7 3.2-1.5-.5 4.8s-19.5 8.1-21.6 12.1l-4.2-2.6z"/><radialGradient id="g" cx="231.729" cy="140.522" r="45.057" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#g)" d="M176.6 93.9c-.9-.3-1.8-.9-2.7-1.6-.6-.8-.8-1.5-.8-1.5-.1.1-.2.2-.3.4-2.2-2.1-4-4.6-4-4.6l-9.7 8.4-4.9 5.4-.2-.6-1.5 1.7s5.8 14 6.1 14.7c.2.6-.5 7-.7 8.7.4-.2.8-.5 1.2-.7v.5l7.5-2.6s15-3 15.7-3.1c.1 0 .3 0 .5-.1v-23c-1.9-.4-4.3-1.2-6.2-2z"/><radialGradient id="h" cx="125.167" cy="120.629" r="52.051" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#h)" d="M176.6 93.9c-.9-.3-1.8-.9-2.7-1.6-.6-.8-.8-1.5-.8-1.5-.1.1-.2.2-.3.4-2.2-2.1-4-4.6-4-4.6l-9.7 8.4-4.9 5.4-.2-.6-1.5 1.7s5.8 14 6.1 14.7c.2.6-.5 7-.7 8.7.4-.2.8-.5 1.2-.7v.5l7.5-2.6s15-3 15.7-3.1c.1 0 .3 0 .5-.1v-23c-1.9-.4-4.3-1.2-6.2-2z"/><radialGradient id="i" cx="166.92" cy="216.236" r="20.486" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#i)" d="M180 10.4s-4.3 3.6-4.5 6.7c0 0-.2 3.4.2 4.7.2.8.6 3.1.9 4.8-.4-.4-1.3-.9-1.8-.2-.7 1-1.4 4.5-.2 6 .7.9 1.8 1.9 2.5 2.5l.3 6.5s.3.4.9 1.1c-.5 1.6-1.5 4.5-3.1 7.1-2.4.9-13.3 4.8-15.8 7.5 0 0-1.6 1.2.2.4-4.7 3-6.4 4.9-6.4 4.9-11.1 19.6 27.2 8.9 27.2 8.9l6.4-3v-60c-4.4.3-6.8 2.1-6.8 2.1z"/><radialGradient id="j" cx="213.202" cy="223.812" r="23.766" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#j)" d="m210.9 56.3 2.4-5.6.4-4.5 3.2-1.6c-3.2-.2-7.8.4-9.7.7-1.4-1.7-4-4.5-5.6-6.2v-.2c-.1-1-.6-3.5-.9-5.6.4-.7 1-1.6 1.6-2.4 1.2-1.6.5-4.4-.2-5.5-.5-.8-1.4-.1-1.8.3 0-3.2-.1-6.8-.1-7.8-.1-4-3.1-9.2-9.8-9.8-1.3-.1-2.6-.1-3.7 0v60l16.5-7.8 7.7-4zm-12.5-41.8.6 1.2-.6-1.2z"/><path d="M209.8 52.6s-2.1 3.6-1.2 5.9l2-.7c-.1 0-1-2-.8-5.2z"/><radialGradient id="k" cx="195.83" cy="223.37" r="25.026" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".012" style="stop-color:#fef6d3"/><stop offset=".028" style="stop-color:#fce9c3"/><stop offset=".045" style="stop-color:#f9d5a9"/><stop offset=".064" style="stop-color:#f5b984"/><stop offset=".084" style="stop-color:#f09555"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#k)" d="M173.3 65.7s6.4-6.6 15.6-10.9c9.1-4.3 17.6-7.2 21.3-3.5 0 0-4.6 4.5-34.3 14.1l-2.6.3z"/><path d="M149.4 73s-1.5-6.9 8-12.9c0 0-8.3 1.5-10 14.2l2-1.3z"/><radialGradient id="l" cx="176.839" cy="239.539" r="55.86" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".006" style="stop-color:#fef6d3"/><stop offset=".015" style="stop-color:#fce9c3"/><stop offset=".024" style="stop-color:#f7d5a9"/><stop offset=".034" style="stop-color:#f1b884"/><stop offset=".044" style="stop-color:#ea9455"/><stop offset=".046" style="stop-color:#e88b4a"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#l)" d="M160.3 60.1s-24.1 13.8 13.6 6.7l2.7-3.3s-10.1-6.8-16.3-3.4z"/><path style="fill:#ff1f98" d="M153.5 101.2s12.4-11.1 15.7-14.1l-.9-1.1-9.6 8.4-5.2 6.8z"/><path d="M166.2 136.8c.1-.3.6 9.2.6 9.6.1.4 2.7 16 6.9 19.3 0 0-2.5.1-5.1-7.7-2.5-7.7-4-17.4-2.4-21.2zM179.2 162l3.8-3.7s8-9.4 16.9-11.7c0 0-11.6 2.5-17.5 11.1l-3.2 4.3zM209.9 147.4c.5.3 4.8 14.1 5.9 15.4 1.1 1.4 8.9 12.6 8.5 18.7-.4 6.1-.5 23.7-.4 25.3 0 0-.9-5.8-1.2-9.8-.4-3.9.6-14.4-.1-17.6-.7-3.3-8-16.1-8.4-16.8-.7-1.2-6.4-15.9-6.4-15.9l2.1.7zM205.3 157.9s.1 8.1 1.8 12.6c.4 1 .9 1.9 1.5 2.4 0 0-7.3-9-3.3-15zM210.9 177.8c-.3-.5 14.8 20.6 10.2 42.3 0 0 .7-24.1-10.2-42.3zM191.8 182.5s6.6 16.8 7.1 21.3 2.6 14.3 5.3 16.1c2.6 1.8 7.1 5.4 7.1 5.4s-8.6-3.1-10.1-7.6-3.1-13.4-3.6-15c-.5-1.6-5.8-20.2-5.8-20.2zM214.5 201.1s4.3 19.3 3.8 21.5c0 0 1.2-13-3.8-21.5zM156.3 150.7s1 13.5.8 14.7-.2 11.4 1.2 14l1.2-5.5s-1.4-4.5-1.2-6.5-.2-14.3-.2-14.3l-1.8-2.4zM167.5 316.2s6.2.8 9.9 4.6c0 0-5.4-6.8-7.7-6.2-2.2.5-2.2 1.6-2.2 1.6zM237.7 312.9s-6.9 1.4-9.2 6c-2.2 4.6-.8 9.2-.8 9.2s20.1 4.7 27.5 2.2c0 0 1.2-9.9.2-15.2l-4.2-1.9s3 2.7 3.5 4.3c.5 1.6 2.7 8.1 2.7 8.1s2.2 2.4-27.7 0c.1.1-1.6-8.9 8-12.7z"/><path d="M239.6 312s7.2-1.2 10.3 1.5c0 0-1.9-4.9-10.3-1.5zM204.8 160l2.2-2-2.2 5.2zM205.5 165.7l2.8-6.2-3.7 5.2zM205.5 168.1l3-5.2-1.7 6.7zM193.7 212.1l-2.5 4.9 2.2-2.4zM180.2 178.2l2.5 1 1 2.3zM181.9 186l3.3 3.2 1.6 5.4zM183.9 192.9l4.6 4.6 1.3 5z"/><path d="m185.8 199.4 5.5 6.8 2.5 5.2.1 2zM188.7 207.2l5.1 8.5-.9 2.4z"/><path style="fill:#ff1f98" d="m142.5 74.2 2.4 2.1h1zM144.9 73.7l2.2 2.1.3-1.4zM141.3 75.6l1 1 1.2-.3z"/><radialGradient id="m" cx="249.025" cy="159.317" r="40.382" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#m)" d="M245.6 57.9c-.2-.5-.3-.9-.5-1.4-.5-1.1-.9-1.9-1.2-2.4-1-4.2-5-6.8-8.9-8.8-.9-.8-2.1-1.4-3.7-1.6-4.6-1.6-7.9-1.2-12.1-.5-2.5.4-4.4 1.5-5.8 2.6-.8.6-1.5 1.2-2 2-.2.2-.2.3-.2.3h.1c-2.1 3.4-1.5 8.1-1.3 9.2-4-.1-6.8.5-14.5 6.9l-1.4.2-14.5 1.3c-7.6 0-13.2-.4-18.7 1.3-7.7 2.5-13.6 8.6-13.6 8.6l2.5.8s4.1-.5 7.5.3c2.7 2.1 8.4 6.9 9.9 9.4 1.9 3.1 7.3 7.5 7.3 7.5 18.7 9.3 32.3 1.7 32.3 1.7 1.1-.1 2.7-1.1 4.1-2.3 7.7-1 12.5-4.6 15.4-8.1.1-.1.2-.1.3-.2 22.3-7.2 21.3-20.1 19-26.8zm-11.9 22.6c-.2.1-.5.3-.7.4.2-.2.5-.3.7-.4zm-59.1 11.3c2.1 1.2 4.1 2.3 6 3.1-1.8-.6-3.2-1.2-3.8-1.5-.7-.4-1.4-.9-2.2-1.6z"/><radialGradient id="n" cx="163.849" cy="133.007" r="26.44" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#n)" d="M169.1 80c-.7-1.1-8-3.3-12.1-3.8l-.7-.5s-1-.1-2.7-.1c-2.7-.9-4.7-2.5-4.7-2.5s-.7-2.4.5-4 6-7.2 8.8-9.6c1.9-1.6 2.7-3 3-3.8l1.3-.8s-10.8-4.7-17.7.4c-6.7 4.9-8.8 8.9-8.1 13 3.9-.9 7.5-1.5 7.5-.4 0 2.3-.5 12.8-2 14.9-1.5 2-6.8 9.5-7.2 10.4-.3.7-6.4 6.8-9.6 9.8.5.7 1.4 1.4 2.5 1.8 14.8 10.9 22.3.7 24.6-2.2.3-.4.7-.9 1.1-1.4 2-1.4 16.5-11.7 19.1-14 2.8-2.4-2.8-6-3.6-7.2z"/><radialGradient id="o" cx="178.958" cy="213.081" r="34.06" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".012" style="stop-color:#fef6d3"/><stop offset=".028" style="stop-color:#fce9c3"/><stop offset=".045" style="stop-color:#f9d5a9"/><stop offset=".064" style="stop-color:#f5b984"/><stop offset=".084" style="stop-color:#f09555"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#o)" d="M191.4 64.1c-2.7.3-6.2 1.4-9 1.8-5.7 0-24.1-.6-27.2 1.9-3.7 3-8.8 6.3-9.2 7.9l1.9.1s-.6-.7 2.2-2.7 5.7-4.7 6.4-4.9c.7-.2-1.7 2.5 7.2 2.6-2.8.5-6.4 3.6-.9 1.1 0 0 17.8 1.3 22.7.7 4.9-.6 6.7-7.2 9.8-6.5 3.1.6 10.5 3.3 13.5 5.6.1-.1-7.8-8.7-17.4-7.6z"/><radialGradient id="p" cx="143.227" cy="209.651" r="17.405" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#p)" d="M162.5 55s-6.4-3-12.4-1.9c-6.2 1.2-10.9 7.2-10.9 7.2s-3.6 4.7-2.5 8.1c0 0 5.3-4.2 7.3-5 2-.8 12.1-4.5 18.5-8.4z"/><radialGradient id="q" cx="225.201" cy="229.519" r="31.058" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#q)" d="M209.8 61.6s-4.4-11.4 4-16.3 16.1-3.5 22.2.5c6.2 4 8.1 6.6 9 10.8 0-.1-13 11.6-35.2 5z"/><radialGradient id="r" cx="234.226" cy="142.098" r="46.476" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#r)" d="m226.7 84.3.1-.2-.7.5c-1 .5-2.2 1.2-2.6 1.9l-2.2 1.6-7.2 2-4.4 2.8s-6 1.6-19.7 4c-.3.1-.6.1-.9.1-1.8 0-3.1.1-3.1.1s-1.4-.4-3.3-1v23c.8-.1 2.2-.2 3.8-.3l2.2 1.8 14.5.4s0-.2.1-.5l1.1.6c.6-4.6-.4-10-.4-10 .1-1 3.4-5.4 4.8-7.2 2.9-2.1 5.6-4.5 8.4-6.9 4.7-3.9 12.5-14.1 12.5-14.1s-2.6 1.1-3 1.4z"/><radialGradient id="s" cx="221.303" cy="128.104" r="31.87" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".003" style="stop-color:#fdebc6"/><stop offset=".008" style="stop-color:#f9d3a7"/><stop offset=".013" style="stop-color:#f6bf8b"/><stop offset=".02" style="stop-color:#f3ae75"/><stop offset=".027" style="stop-color:#f1a164"/><stop offset=".037" style="stop-color:#f09859"/><stop offset=".05" style="stop-color:#ef9252"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#s)" d="M175.7 119.8c-4.6 1-9.9 2.5-16 4.5v-.2c-.6.3-1.3.6-1.8 1v.1c-.7.5-1.6 1.3-1.8 2.1-.4 1.5-1.4 6.5.3 7.5-.3.6-.7 1.8-.9 3.3-.2 2.2.1 9.9.1 9.9s-.8 2.2-.2 3c.5.6 5.2 4.6 6.6 5.8.2.2.5.6.9 1.1 1 1.4 3.2 4.5 4.6 5.6.2.2.5.4.8.7 2 1.7 5.3 4.8 9.3 4.6 0 0 .2-.5.8-1.5v-47.5h-2.7z"/><radialGradient id="t" cx="133.71" cy="116.859" r="36.342" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".003" style="stop-color:#fdebc6"/><stop offset=".008" style="stop-color:#f9d3a7"/><stop offset=".013" style="stop-color:#f6bf8b"/><stop offset=".02" style="stop-color:#f3ae75"/><stop offset=".027" style="stop-color:#f1a164"/><stop offset=".037" style="stop-color:#f09859"/><stop offset=".05" style="stop-color:#ef9252"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#t)" d="M175.7 119.8c-4.6 1-9.9 2.5-16 4.5v-.2c-.6.3-1.3.6-1.8 1v.1c-.7.5-1.6 1.3-1.8 2.1-.4 1.5-1.4 6.5.3 7.5-.3.6-.7 1.8-.9 3.3-.2 2.2.1 9.9.1 9.9s-.8 2.2-.2 3c.5.6 5.2 4.6 6.6 5.8.2.2.5.6.9 1.1 1 1.4 3.2 4.5 4.6 5.6.2.2.5.4.8.7 2 1.7 5.3 4.8 9.3 4.6 0 0 .2-.5.8-1.5v-47.5h-2.7z"/><radialGradient id="u" cx="157.169" cy="141.911" r="26.439" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#u)" d="M135 93.3c.4-.9 5.7-8.4 7.2-10.4s2-12.5 2-14.9c0-1.1-3.6-.5-7.5.4-.2.2-.4.5-.6.7-.1.1-.2.1-.3.2-7 4.8-6.5 12-6.3 13.7-2.6 3.7-2.8 5.4-3 7.2-.2 2.2-1.9 10.5-1.7 11.5 0 .4.3.8.6 1.3 3.2-2.9 9.3-9 9.6-9.7z"/><radialGradient id="v" cx="117.217" cy="192.738" r="28.392" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#v)" d="M135 93.3c.4-.9 5.7-8.4 7.2-10.4s2-12.5 2-14.9c0-1.1-3.6-.5-7.5.4-.2.2-.4.5-.6.7-.1.1-.2.1-.3.2-7 4.8-6.5 12-6.3 13.7-2.6 3.7-2.8 5.4-3 7.2-.2 2.2-1.9 10.5-1.7 11.5 0 .4.3.8.6 1.3 3.2-2.9 9.3-9 9.6-9.7z"/><radialGradient id="w" cx="230.068" cy="45.778" r="60.321" gradientTransform="matrix(1 0 0 -1.0957 0 269.282)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".012" style="stop-color:#fef6d3"/><stop offset=".028" style="stop-color:#fce9c3"/><stop offset=".045" style="stop-color:#f9d5a9"/><stop offset=".064" style="stop-color:#f5b984"/><stop offset=".084" style="stop-color:#f09555"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#w)" d="M207.6 312.2c-1-3.6-2.5-6.5-2-7.8s.7-5.1-2-8.3c-2.6-3.3-7.3-8.9-6.1-13.4s7.4-19 7.8-25.1c.3-6.1-1.8-10.3-5.6-15.7s-7.3-9.6-6.4-15.5c.8-6 2.1-13.4 2.1-13.4l-1.5-2.4-1.9-4.8c.1-.3.1-.5.1-.5l-10.2-33.7s-.7-1.9-.9-1.9l-1.6-3.5s-17.3-25.6-22.2-13.3l1.4 26.2c-.1.6-.2 1.2-.2 1.8.7-.9 1-1.3 2.1-.9 1.6.6 9.1 12.5 9.7 15.6.6 3.1 2.2 9.7 2.8 16.2.6 6.6 1.6 13.4 1.9 15.6.3 2.2.3 7.5 1.6 11.2 1.2 3.7 2.2 10.3 3.7 14.7 1.6 4.4 5.3 11.2 5.3 16.9 0 4.7.2 14.5-1.6 15.5.3 5.2.3 10.4-.8 12.3-2.1 4-12.2 15.4-14.2 16.3s-12.5-1.4-13.9 11.2c0 0 15.7 2 21.3 1.4 5.6-.5 12.9-1.3 16.3-1.1 3.5.2 15.5-1.1 15.9-2.3.6-1.2.1-7.7-.9-11.3z"/><radialGradient id="x" cx="140.697" cy="34.555" r="49.013" gradientTransform="matrix(1 0 0 -1.0957 0 269.282)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".012" style="stop-color:#fef6d3"/><stop offset=".028" style="stop-color:#fce9c3"/><stop offset=".045" style="stop-color:#f9d5a9"/><stop offset=".064" style="stop-color:#f5b984"/><stop offset=".084" style="stop-color:#f09555"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#x)" d="M192.9 269.7c0-5.6-3.7-14.7-5.3-19-1.6-4.4-3.7-9.1-5-12.8-1.2-3.7-1.9-7.8-2.2-10s-.9-10.3-1.6-16.9c-.6-6.6-3.1-12.8-3.7-15.9-.6-3.1-12.5-15.6-14.1-16.2-1.1-.4-2 1.3-2.7 2.2-.2 1.6-.3 3.1-.3 4.2 0 4.7 1.2 15 2.8 19.9s5.6 15.4 5.6 15.4l3.1 6.9s-.7 12.6 1.2 16.3c1.8 3.6 6.6 11.4 6.6 11.4s4.8 14.5 5.3 17.9c.3 1.8 1 7.4 1.3 13 1.7-1.2 9-11.6 9-16.4z"/><radialGradient id="y" cx="176.86" cy="19.317" r="74.561" fx="156.387" fy="20.476" gradientTransform="matrix(1 0 0 -1.0957 0 269.282)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".012" style="stop-color:#fef6d3"/><stop offset=".028" style="stop-color:#fce9c3"/><stop offset=".045" style="stop-color:#f9d5a9"/><stop offset=".064" style="stop-color:#f5b984"/><stop offset=".084" style="stop-color:#f09555"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".364" style="stop-color:#af622b"/><stop offset=".439" style="stop-color:#814820"/><stop offset=".515" style="stop-color:#593216"/><stop offset=".594" style="stop-color:#39200e"/><stop offset=".674" style="stop-color:#201208"/><stop offset=".758" style="stop-color:#0e0803"/><stop offset=".847" style="stop-color:#030201"/><stop offset=".949" style="stop-color:#000"/></radialGradient><path style="fill:url(#y)" d="M256.2 314.8c-.4-1.3-2.5-10-2.5-10s.1-.4.2-1c-3.1-1.6-6.6-3.6-8.1-5.3-3-3.5-8.2-13.1-9.4-17.1s-4-18-4.7-23.4-12.6-20.6-12.6-22.9c0-2.3-4.2-44.7-4.2-49.4 0-2.6 3.8-7 7.1-10.4-2.3-4-8-13.4-8-13.4l-6-17.2s-22.5 5.3-27.3 14.1c0 0-2.2 5.7-2.6 9.1l-2.3.5s1.4 2.6 2.8 5.6c.4.6.7 1.4 1.2 2.4 1.2 3.4 2.8 7.6 4.3 11.5 3.4 9.4 7.6 21.5 8.6 23.2 1.4 2.3 12 17.3 19.3 27.3.2 2.1.5 3.7.8 4.2.1.2.4.6.7 1.2.1 4.8.5 17 2.1 19.1 2 2.5 7.1 7.6 8.9 11 1.8 3.4 6.4 16.8 6.1 18.1-.3 1.3-1.8 8-1.3 9.2.5 1.3 2.6 5.1 2.6 5.1s-1.6 11.4-2.3 11.9l1.3-.9-2.3 3.9s-.5 3.1-.3 4.9c.1 1.3 14.6 1.8 22.7 2l3.7.4v-.3c.9 0 1.5.1 1.7.1 1 .2 2.3-4.2 2.3-4.2l-3.2-7.1c.8 0 1.3-.2.7-2.2z"/><radialGradient id="z" cx="247.033" cy="84.718" r="44.425" gradientTransform="matrix(1 0 0 -1.0957 0 269.282)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".012" style="stop-color:#fef6d3"/><stop offset=".028" style="stop-color:#fce9c3"/><stop offset=".045" style="stop-color:#f9d5a9"/><stop offset=".064" style="stop-color:#f5b984"/><stop offset=".084" style="stop-color:#f09555"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#z)" d="M216.1 235.9c0 2.3 6.8 20.1 7.5 25.5s11.7 15.9 12.9 19.9 6.3 13.6 9.4 17.1c1.5 1.8 5 3.8 8.1 5.3.2-1.1.5-3 .3-4.4-.3-2.2-5.4-9-5.9-9.8-.5-.7-3.1-6-3.8-8.3s-1.6-11.9-1.5-15.2c.2-3.3 2-12.3 1.6-15.2-.3-2.5-7.1-11.6-9.8-14.6-.3-.5-.6-.9-.9-1.4-.8-2.2-1.9-5.1-2.1-6.4-.4-2-3.2-7.8-4.2-14.5-.9-6.4-3.3-25.3-3.6-27.3 0-1.6.7-.7.2-6.3s-7.8-16.8-8.2-17.6c-6.6 4.2-6.3 17.3-7.5 19.7-4.9 9.5 7.5 51.2 7.5 53.5z"/><radialGradient id="A" cx="224.113" cy="127.167" r="31.869" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".003" style="stop-color:#fdebc6"/><stop offset=".008" style="stop-color:#f9d3a7"/><stop offset=".013" style="stop-color:#f6bf8b"/><stop offset=".02" style="stop-color:#f3ae75"/><stop offset=".027" style="stop-color:#f1a164"/><stop offset=".037" style="stop-color:#f09859"/><stop offset=".05" style="stop-color:#ef9252"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#A)" d="M209.8 144.7s-1.9-13.7-4.1-15.9c.3-1.5 1.1-6.4-1.2-7.7-.4-.3-7-6-28.7-1.4h2.6v47.5c1.5-2.4 5.2-7.5 12.4-12.1 5.4-3.4 9.7-5.9 12.9-7.2l3.2-.9c1.2-.2 2.3 0 3 .5l.6 1.2c.1 0 .5-3.1-.7-4z"/></g></svg>`})),sc,cc=o((()=>{sc=`<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg">
     70`})),dc,fc=o((()=>{dc=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" style="enable-background:new 0 0 256 256" xml:space="preserve"><defs><filter id="a" filterUnits="userSpaceOnUse" x="-81.6" y="-38.3" width="354.4" height="393.9"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"/></filter></defs><mask maskUnits="userSpaceOnUse" x="-81.6" y="-38.3" width="354.4" height="393.9" id="b"><g style="filter:url(#a)"><path style="fill:#fff" d="M0 0h256v256H0z"/></g></mask><g style="mask:url(#b)"><radialGradient id="c" cx="179.244" cy="174.731" r="264.452" gradientTransform="matrix(.8241 -.00059 -.00036 -.7607 45.977 208.76)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".057" style="stop-color:#fff7d3"/><stop offset=".13" style="stop-color:#fdefc3"/><stop offset=".212" style="stop-color:#fbe1a9"/><stop offset=".3" style="stop-color:#f8cd84"/><stop offset=".394" style="stop-color:#f4b455"/><stop offset=".49" style="stop-color:#f0961c"/><stop offset=".504" style="stop-color:#ef9113"/><stop offset=".673" style="stop-color:#d67424"/><stop offset="1" style="stop-color:#af5417"/></radialGradient><path style="fill:url(#c)" d="M-81.6-38.3h354.4v352H-81.6z"/><path d="M155 325.6s-.6 9.8 5.1 8.6 19.1 4.5 19.1 4.5l3.4 16.8h33.7l-7.6-31.9c-.1 0-46.4-8.9-53.7 2zM227.4 324.1s-3.4 11.2 2.2 14.6l5.6 3.4-1.1 13.5h21.7v-14c0-6.5 1.7-7 0-18.7-.8-5.7-28.4 1.2-28.4 1.2z"/><radialGradient id="d" cx="99.905" cy="220.308" r="72.384" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".358" style="stop-color:#bb6a2c"/><stop offset=".451" style="stop-color:#94551f"/><stop offset=".546" style="stop-color:#744414"/><stop offset=".645" style="stop-color:#5b370b"/><stop offset=".747" style="stop-color:#492d05"/><stop offset=".856" style="stop-color:#3e2801"/><stop offset=".982" style="stop-color:#3b2600"/></radialGradient><path style="fill:url(#d)" d="M187.5 78c10.6-6.8-44.2-17.3-44.2-17.3s-25.7 25.7-44.6 18.1-79.4-18.1-91.1 26.1c0 0 15.5-23.7 37.8-19.3 12.8 2.5 14.1 15.7 16 28.3h105.9c6-14.6 11.2-30.1 20.2-35.9z"/><radialGradient id="e" cx="99.905" cy="220.306" r="72.383" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#e)" d="M71.5 136.6c16.3 10 37.8-1.2 50.3 6s5.3 13.2 5.3 13.2 29.5-18.1 37-34.5c1.1-2.4 2.2-4.9 3.2-7.5H61.4c1.4 9.5 3.2 18.5 10.1 22.8z"/><radialGradient id="f" cx="171.768" cy="84.959" r="64.866" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".358" style="stop-color:#bb6a2c"/><stop offset=".451" style="stop-color:#94551f"/><stop offset=".546" style="stop-color:#744414"/><stop offset=".645" style="stop-color:#5b370b"/><stop offset=".747" style="stop-color:#492d05"/><stop offset=".856" style="stop-color:#3e2801"/><stop offset=".982" style="stop-color:#3b2600"/></radialGradient><path style="fill:url(#f)" d="M71.5 136.6c16.3 10 37.8-1.2 50.3 6s.2 19.3.2 19.3 35.2-12.8 43.6-37.2c.9-2.5 1.9-9.8 3-12.3l-107.1.3c1.3 9.3 3.1 19.6 10 23.9z"/><path d="M250.3 329.1c-8.9 0-20-1.2-22-1.5-.3-1.1-1-4.8.8-8.5.3-.7.8-1.4 1.5-2l.1-.1v-.1c.8-2.9 1.9-10.6 1.9-10.9v-.2l-.1-.1s-2.1-3.8-2.6-5c-.4-1 .8-7 1.3-8.9.4-1.5-4.4-15.1-6.1-18.4-1.3-2.4-4.1-5.5-6.3-8-1.1-1.2-2-2.3-2.6-3.1-1-1.3-1.8-8.5-2-18.8v-.1l-.1-.1c-.3-.7-.6-1.1-.7-1.3-.1-.1-.4-.7-.7-3.9v-.1l-.1-.1c-5.5-7.5-13.1-18.1-16.9-23.7l-.7-.9-.2 1.1c-.5 2.6-1.3 7.7-1.9 12-.8 5.6 2.1 9.7 5.5 14.4.3.5.7 1 1 1.5 3.8 5.5 5.8 9.5 5.5 15.4-.2 4-3 11.6-5.2 17.7-1.1 3.1-2.1 5.8-2.5 7.3-1.2 4.7 3.4 10.3 6.1 13.6l.1.1c2.5 3.1 2.4 6.7 1.9 7.8-.4 1 .1 2.5.9 4.7.4 1 .8 2.2 1.1 3.4 1 3.8 1.4 10 1 11.1-.7.8-10 2-14.7 2h-2.1c-3.6 0-9.6.6-14.4 1l-.8.1c-.6.1-1.4.1-2.4.1-5.9 0-16.1-1.2-18.3-1.4 1.2-9.3 7.5-9.8 11.3-10 1-.1 1.7-.1 2.2-.3 2.2-1 12.3-12.5 14.4-16.5.9-1.7 1.2-5.9.8-12.5-.3-5.7-1-11.4-1.3-13.1-.5-3.4-5.1-17.4-5.3-18v-.1c0-.1-4.8-7.8-6.6-11.3-1.7-3.5-1.1-15.9-1.1-16v-.1l-3.2-7c0-.1-4-10.5-5.6-15.3s-2.8-15.1-2.8-19.7c0-1 .1-2.3.3-4.1.1-.6.1-1.2.2-1.8v-.9h-.5c-1-3.3-1-11.8-.8-13 .1-.9-.4-8.8-.7-13.4v-.2l-.1-.1c-.8-.7-1-.9-1-1-.3-.3 0-1.7.3-2.5v-.2c0-.1-.3-7.7-.1-9.8.1-1.4.6-2.6.8-3.1l.2-.4-.4-.2c-1.1-.7-.7-4.9-.1-7 .2-.6.7-1.2 1.7-1.9l.2-.1v-.1c.1-.1.3-.2.4-.2l-.3-.6c.4-3.6.8-7.7.6-8.3-.2-.6-3.7-9.1-5.8-14.1l-.3-.7-.9 1.2c-1.6 2-5.3 6.7-11.6 6.7-3.7 0-7.8-1.6-12.2-4.8h-.2c-.9-.3-1.7-.9-2.3-1.6-.3-.4-.5-.8-.5-1.1-.1-.5.5-4 1-6.6.3-2 .7-3.9.8-4.8.2-1.7.4-3.4 2.9-7l.1-.1v-.2c-.2-1.4-.7-8.6 6.1-13.2.1-.1.4-.2.4-.2l.7-.8.1-.2-.1-.2c-.3-.9-.2-2 .2-3.4.3-1 .7-2 1.4-3 .5-.8.8-1.3.8-1.3s2.3-2.9 5.7-5c.8-.6 1.7-1 2.7-1.4.8-.3 1.5-.5 2.2-.7.9-.2 1.8-.3 2.8-.3 4.4 0 8.4 1.7 9.1 2l.2.1.2-.1c4.2-2.3 10.9-4.7 12.8-5.4l.2-.1.1-.1c1.5-2.6 2.6-5.4 3.1-7.2l.1-.2-.9-1.2-.3-6.5-.2-.1c-.7-.6-1.7-1.5-2.4-2.4-1.1-1.4-.4-4.6.2-5.5.1-.1.2-.1.2-.1.2 0 .5.2.8.5l1 .9-.2-1.3c-.4-2.6-.7-4.2-.9-4.8-.3-1-.2-3.6-.2-4.5.2-2.8 4.3-6.3 4.3-6.3s2.3-1.7 6.5-2.2c.6-.1 1.3-.1 1.9-.1.5 0 1.1 0 1.6.1 6.7.6 9.2 5.9 9.4 9.3 0 1 .1 4.8.1 7.8v1.1l.8-.7c.4-.4.7-.5.9-.5 0 0 .1 0 .2.2.6 1 1.2 3.5.2 4.9-.7.9-1.3 1.8-1.7 2.5l-.1.1v.2c.2 1.1.4 2.4.6 3.4.2.9.3 1.8.4 2.2V39.9l.2.2c1.5 1.6 4.2 4.5 5.5 6.1l.2.2h.3c1.4-.2 4.9-.7 7.8-.8h.2c3.1-1.6 6.2-2.4 9.3-2.4 3.8 0 7.6 1.2 11.2 3.6.5.3.9.6 1.3.9 2.1 1.3 3.7 2.6 4.7 4 1.5 1.7 2.3 3.3 2.8 5.7.2.5.4.9.5 1.3 2.2 6.4 3.1 18.2-16.4 25.6h-.1l-.1.1c-2.3 2.9-7.9 9.8-11.6 12.9-.7.6-1.3 1.1-2 1.7-2.1 1.8-4.2 3.6-6.4 5.1h-.1v.1c-3.1 4.1-4.8 6.6-4.9 7.4v.2c0 .1 1 5.4.4 9.9v.3l.3.2c1.6.9 1.6 4.3 1 7.2l-.1.2.2.2c1.7 1.7 3.4 11.8 4 15.6v.2l.2.1c.7.5.7 2.4.6 3.3l-.2.1c.4 1.1 1.1 3 1.8 5.1 1.8 5.1 3.1 8.8 3.7 9.5 0 0 .1.1.1.2l.3.4.1-.1s0 .1.1.1c.4.6.9 1.5 1.6 2.7 1.8 2.7 5.8 9.6 6.2 14.2.3 3.7.1 4.5-.1 5.1 0 .1-.1.2-.1.4v1.1c.1 1 .5 3.8.9 7.2.9 6.7 2.1 15.8 2.7 19.9.7 4.6 2.2 8.7 3.2 11.5.5 1.4.9 2.4 1 3.1.2 1.2 1.3 4.2 2.1 6.4v.1c.3.4.6.9.9 1.3 2.7 3.1 9.4 12 9.7 14.3.2 1.7-.4 5.7-.9 9.3-.3 2.3-.7 4.5-.7 5.8-.2 3.4.8 13 1.5 15.3.7 2.4 3.3 7.7 3.9 8.4.1.1.2.3.4.6 3.4 4.8 5.3 7.8 5.5 9 .2 1.4-.1 3.3-.3 4.2-.1.6-.2 1-.2 1v.2c.1.4 2.1 8.7 2.5 10.1.2.7.2 1.1.2 1.3v.2l.1.1c-.1 5.8-.6 16.9-.4 18.4-1.8.1-1.2-6.4-5.4-6.4z"/><path d="M194.2 64.8s-18.6 10.6-9.4 31.9c0 0-6.7-1-10.1-4.2-3.5-3.2-7.2-6.7-7.2-6.7s-8.9-9.4-11.4-9.6-9.6 1-9.6 1 2-3.5 4-4.9c2-1.5 6.4-4.5 6.4-4.5l16.6-1.7 10.4-.2 10.3-1.1z"/><path d="M149.2 75.1s5.3-4 7.9-4.3c2.6-.3 14.5-1 14.5-1l-2.6-1 18.5 1.6s-6.3 8.9-5.9 11.5c.3 2.6 1.7 14.5 1.7 14.5s-9.9-3.6-12.9-7.3c-3-3.6-7.9-8.9-7.9-8.9l-6.3-4.3c-.1.2-10.9 2.2-7-.8z"/><path d="M139 76.8s-1.6-8.6 4-9.6c0 0 5.3-4.9 10.2-4.9 0 0 3-3.3 9.6-1.3l13.2 4s18.4-9 24-10.6 8.2-2.3 9.2-.3c0 0 .4 3.7-.4 3.9-9.2 2-10.5 6.7-10.5 6.7L179.8 66l-7.9-.3-15.2 2.1-4.9 3.5-4.3 2.3-1.2 3.6-7.3-.4z"/><path d="m156.2 62.9-.7-2s-6.3-2.3-1.3-2.6c4.9-.3 17.5 0 17.5 0s5.3-3.6 5.6-4.6 2.6-4 2.6-4l4.2-.8s-.2 1.6 3.2 1.2c3.4-.4 6-.2 6.7-.6.7-.5 1.9-1.9 1.9-1.9l6.4-1.9 2.6 3.3 6.6-.3-2.6 1.3s-12.9 1.3-16.2 3.6-13.2 7.9-16.8 11.2c0 0-8.9-6.6-16.2-4.9.1.1-2.5.7-3.5 3zM185.2 74.2s14.3 2.8 14.8 3 0 .7-.2.7c-11.7 0 14.1 7.1 5.8 2.3-2.3-1.3 3 4.3 3 4.3s4.6-3.1 4.5-4c-.2-.8 0-2.3.7-3s4.8-3.8 5.3-4.1c.5-.3 2.1-1.8 2.1-1.8s-7.7-2.3-7.3-3.1c.5-.8 5.8-5.8 7.6-5.9 1.8-.2 4.6-2 5.1-2.8s1-4.6 3.3-6.4c2.3-1.8 8.2-4.6 8.2-4.6s3.6 2.6 4.5 4 1.4 3.7 1.4 3.7 2.1 4 2 4.5c-.2.5-.3 7.4-2.1 10.7-1.8 3.3-7.6 8.9-10.2 9.9-2.6 1-6.8 2.6-6.8 2.6s-8.8 8.6-15.6 7.9c0 0-.8 1.6-2.6 2.1s-5.3 1.5-5.8 1.5-5.9 1.5-6.6 1.5c-.7 0-11.2.5-12.2-1-1.1-1.6-7.3-13.6 1.1-22z"/><path d="M152.2 76.1s1-1.6 3.3-2.3c2.3-.7 10.9-.8 15.2-.5s3-1.2 3-1.2l11.2 2.3s-3 6.9-3 8.6c0 1.6 0 11 2.1 13s.7.6.7.6-6.3-.9-10.1-4.2c-3.8-3.3-10.6-10.1-10.6-10.1s-4.8-4.6-5.4-5.1c-.6-.4-4.9-1.6-6.4-1.1z"/><path d="M149.6 76.6s5.4.3 7.9 2.3 8.1 7.1 8.1 7.1l1.3-2.5s-8.1-6.4-9.6-6.9-7.7 0-7.7 0zM142 76.8s.7-9.2 8.2-10.6c0 0 5.3-4.9 9.6-3.6 4.3 1.3 13.6 3.4 13.6 3.4l12.1-3.7s21.1-9.2 23.7-6.9l.7 2.3s-10.2 2.3-11.5 6.9l-6.6.3-11.9 1-17.5.7-5.6 1.2-7.9 5.4-2.5 4-4.4-.4z"/><path d="M172.5 60.9s4.9-3 6.6-4.9c1.6-2 4-6.3 4-6.3s.4.1 3.2.1c2.8-.1 7.3 0 7.3 0l2-1.7 3.2-1.5-.5 4.8s-19.5 8.1-21.6 12.1l-4.2-2.6z"/><radialGradient id="g" cx="231.729" cy="140.522" r="45.057" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#g)" d="M176.6 93.9c-.9-.3-1.8-.9-2.7-1.6-.6-.8-.8-1.5-.8-1.5-.1.1-.2.2-.3.4-2.2-2.1-4-4.6-4-4.6l-9.7 8.4-4.9 5.4-.2-.6-1.5 1.7s5.8 14 6.1 14.7c.2.6-.5 7-.7 8.7.4-.2.8-.5 1.2-.7v.5l7.5-2.6s15-3 15.7-3.1c.1 0 .3 0 .5-.1v-23c-1.9-.4-4.3-1.2-6.2-2z"/><radialGradient id="h" cx="125.167" cy="120.629" r="52.051" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#h)" d="M176.6 93.9c-.9-.3-1.8-.9-2.7-1.6-.6-.8-.8-1.5-.8-1.5-.1.1-.2.2-.3.4-2.2-2.1-4-4.6-4-4.6l-9.7 8.4-4.9 5.4-.2-.6-1.5 1.7s5.8 14 6.1 14.7c.2.6-.5 7-.7 8.7.4-.2.8-.5 1.2-.7v.5l7.5-2.6s15-3 15.7-3.1c.1 0 .3 0 .5-.1v-23c-1.9-.4-4.3-1.2-6.2-2z"/><radialGradient id="i" cx="166.92" cy="216.236" r="20.486" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#i)" d="M180 10.4s-4.3 3.6-4.5 6.7c0 0-.2 3.4.2 4.7.2.8.6 3.1.9 4.8-.4-.4-1.3-.9-1.8-.2-.7 1-1.4 4.5-.2 6 .7.9 1.8 1.9 2.5 2.5l.3 6.5s.3.4.9 1.1c-.5 1.6-1.5 4.5-3.1 7.1-2.4.9-13.3 4.8-15.8 7.5 0 0-1.6 1.2.2.4-4.7 3-6.4 4.9-6.4 4.9-11.1 19.6 27.2 8.9 27.2 8.9l6.4-3v-60c-4.4.3-6.8 2.1-6.8 2.1z"/><radialGradient id="j" cx="213.202" cy="223.812" r="23.766" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#j)" d="m210.9 56.3 2.4-5.6.4-4.5 3.2-1.6c-3.2-.2-7.8.4-9.7.7-1.4-1.7-4-4.5-5.6-6.2v-.2c-.1-1-.6-3.5-.9-5.6.4-.7 1-1.6 1.6-2.4 1.2-1.6.5-4.4-.2-5.5-.5-.8-1.4-.1-1.8.3 0-3.2-.1-6.8-.1-7.8-.1-4-3.1-9.2-9.8-9.8-1.3-.1-2.6-.1-3.7 0v60l16.5-7.8 7.7-4zm-12.5-41.8.6 1.2-.6-1.2z"/><path d="M209.8 52.6s-2.1 3.6-1.2 5.9l2-.7c-.1 0-1-2-.8-5.2z"/><radialGradient id="k" cx="195.83" cy="223.37" r="25.026" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".012" style="stop-color:#fef6d3"/><stop offset=".028" style="stop-color:#fce9c3"/><stop offset=".045" style="stop-color:#f9d5a9"/><stop offset=".064" style="stop-color:#f5b984"/><stop offset=".084" style="stop-color:#f09555"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#k)" d="M173.3 65.7s6.4-6.6 15.6-10.9c9.1-4.3 17.6-7.2 21.3-3.5 0 0-4.6 4.5-34.3 14.1l-2.6.3z"/><path d="M149.4 73s-1.5-6.9 8-12.9c0 0-8.3 1.5-10 14.2l2-1.3z"/><radialGradient id="l" cx="176.839" cy="239.539" r="55.86" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".006" style="stop-color:#fef6d3"/><stop offset=".015" style="stop-color:#fce9c3"/><stop offset=".024" style="stop-color:#f7d5a9"/><stop offset=".034" style="stop-color:#f1b884"/><stop offset=".044" style="stop-color:#ea9455"/><stop offset=".046" style="stop-color:#e88b4a"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#l)" d="M160.3 60.1s-24.1 13.8 13.6 6.7l2.7-3.3s-10.1-6.8-16.3-3.4z"/><path style="fill:#ff1f98" d="M153.5 101.2s12.4-11.1 15.7-14.1l-.9-1.1-9.6 8.4-5.2 6.8z"/><path d="M166.2 136.8c.1-.3.6 9.2.6 9.6.1.4 2.7 16 6.9 19.3 0 0-2.5.1-5.1-7.7-2.5-7.7-4-17.4-2.4-21.2zM179.2 162l3.8-3.7s8-9.4 16.9-11.7c0 0-11.6 2.5-17.5 11.1l-3.2 4.3zM209.9 147.4c.5.3 4.8 14.1 5.9 15.4 1.1 1.4 8.9 12.6 8.5 18.7-.4 6.1-.5 23.7-.4 25.3 0 0-.9-5.8-1.2-9.8-.4-3.9.6-14.4-.1-17.6-.7-3.3-8-16.1-8.4-16.8-.7-1.2-6.4-15.9-6.4-15.9l2.1.7zM205.3 157.9s.1 8.1 1.8 12.6c.4 1 .9 1.9 1.5 2.4 0 0-7.3-9-3.3-15zM210.9 177.8c-.3-.5 14.8 20.6 10.2 42.3 0 0 .7-24.1-10.2-42.3zM191.8 182.5s6.6 16.8 7.1 21.3 2.6 14.3 5.3 16.1c2.6 1.8 7.1 5.4 7.1 5.4s-8.6-3.1-10.1-7.6-3.1-13.4-3.6-15c-.5-1.6-5.8-20.2-5.8-20.2zM214.5 201.1s4.3 19.3 3.8 21.5c0 0 1.2-13-3.8-21.5zM156.3 150.7s1 13.5.8 14.7-.2 11.4 1.2 14l1.2-5.5s-1.4-4.5-1.2-6.5-.2-14.3-.2-14.3l-1.8-2.4zM167.5 316.2s6.2.8 9.9 4.6c0 0-5.4-6.8-7.7-6.2-2.2.5-2.2 1.6-2.2 1.6zM237.7 312.9s-6.9 1.4-9.2 6c-2.2 4.6-.8 9.2-.8 9.2s20.1 4.7 27.5 2.2c0 0 1.2-9.9.2-15.2l-4.2-1.9s3 2.7 3.5 4.3c.5 1.6 2.7 8.1 2.7 8.1s2.2 2.4-27.7 0c.1.1-1.6-8.9 8-12.7z"/><path d="M239.6 312s7.2-1.2 10.3 1.5c0 0-1.9-4.9-10.3-1.5zM204.8 160l2.2-2-2.2 5.2zM205.5 165.7l2.8-6.2-3.7 5.2zM205.5 168.1l3-5.2-1.7 6.7zM193.7 212.1l-2.5 4.9 2.2-2.4zM180.2 178.2l2.5 1 1 2.3zM181.9 186l3.3 3.2 1.6 5.4zM183.9 192.9l4.6 4.6 1.3 5z"/><path d="m185.8 199.4 5.5 6.8 2.5 5.2.1 2zM188.7 207.2l5.1 8.5-.9 2.4z"/><path style="fill:#ff1f98" d="m142.5 74.2 2.4 2.1h1zM144.9 73.7l2.2 2.1.3-1.4zM141.3 75.6l1 1 1.2-.3z"/><radialGradient id="m" cx="249.025" cy="159.317" r="40.382" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#m)" d="M245.6 57.9c-.2-.5-.3-.9-.5-1.4-.5-1.1-.9-1.9-1.2-2.4-1-4.2-5-6.8-8.9-8.8-.9-.8-2.1-1.4-3.7-1.6-4.6-1.6-7.9-1.2-12.1-.5-2.5.4-4.4 1.5-5.8 2.6-.8.6-1.5 1.2-2 2-.2.2-.2.3-.2.3h.1c-2.1 3.4-1.5 8.1-1.3 9.2-4-.1-6.8.5-14.5 6.9l-1.4.2-14.5 1.3c-7.6 0-13.2-.4-18.7 1.3-7.7 2.5-13.6 8.6-13.6 8.6l2.5.8s4.1-.5 7.5.3c2.7 2.1 8.4 6.9 9.9 9.4 1.9 3.1 7.3 7.5 7.3 7.5 18.7 9.3 32.3 1.7 32.3 1.7 1.1-.1 2.7-1.1 4.1-2.3 7.7-1 12.5-4.6 15.4-8.1.1-.1.2-.1.3-.2 22.3-7.2 21.3-20.1 19-26.8zm-11.9 22.6c-.2.1-.5.3-.7.4.2-.2.5-.3.7-.4zm-59.1 11.3c2.1 1.2 4.1 2.3 6 3.1-1.8-.6-3.2-1.2-3.8-1.5-.7-.4-1.4-.9-2.2-1.6z"/><radialGradient id="n" cx="163.849" cy="133.007" r="26.44" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#n)" d="M169.1 80c-.7-1.1-8-3.3-12.1-3.8l-.7-.5s-1-.1-2.7-.1c-2.7-.9-4.7-2.5-4.7-2.5s-.7-2.4.5-4 6-7.2 8.8-9.6c1.9-1.6 2.7-3 3-3.8l1.3-.8s-10.8-4.7-17.7.4c-6.7 4.9-8.8 8.9-8.1 13 3.9-.9 7.5-1.5 7.5-.4 0 2.3-.5 12.8-2 14.9-1.5 2-6.8 9.5-7.2 10.4-.3.7-6.4 6.8-9.6 9.8.5.7 1.4 1.4 2.5 1.8 14.8 10.9 22.3.7 24.6-2.2.3-.4.7-.9 1.1-1.4 2-1.4 16.5-11.7 19.1-14 2.8-2.4-2.8-6-3.6-7.2z"/><radialGradient id="o" cx="178.958" cy="213.081" r="34.06" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".012" style="stop-color:#fef6d3"/><stop offset=".028" style="stop-color:#fce9c3"/><stop offset=".045" style="stop-color:#f9d5a9"/><stop offset=".064" style="stop-color:#f5b984"/><stop offset=".084" style="stop-color:#f09555"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#o)" d="M191.4 64.1c-2.7.3-6.2 1.4-9 1.8-5.7 0-24.1-.6-27.2 1.9-3.7 3-8.8 6.3-9.2 7.9l1.9.1s-.6-.7 2.2-2.7 5.7-4.7 6.4-4.9c.7-.2-1.7 2.5 7.2 2.6-2.8.5-6.4 3.6-.9 1.1 0 0 17.8 1.3 22.7.7 4.9-.6 6.7-7.2 9.8-6.5 3.1.6 10.5 3.3 13.5 5.6.1-.1-7.8-8.7-17.4-7.6z"/><radialGradient id="p" cx="143.227" cy="209.651" r="17.405" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#p)" d="M162.5 55s-6.4-3-12.4-1.9c-6.2 1.2-10.9 7.2-10.9 7.2s-3.6 4.7-2.5 8.1c0 0 5.3-4.2 7.3-5 2-.8 12.1-4.5 18.5-8.4z"/><radialGradient id="q" cx="225.201" cy="229.519" r="31.058" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#q)" d="M209.8 61.6s-4.4-11.4 4-16.3 16.1-3.5 22.2.5c6.2 4 8.1 6.6 9 10.8 0-.1-13 11.6-35.2 5z"/><radialGradient id="r" cx="234.226" cy="142.098" r="46.476" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#r)" d="m226.7 84.3.1-.2-.7.5c-1 .5-2.2 1.2-2.6 1.9l-2.2 1.6-7.2 2-4.4 2.8s-6 1.6-19.7 4c-.3.1-.6.1-.9.1-1.8 0-3.1.1-3.1.1s-1.4-.4-3.3-1v23c.8-.1 2.2-.2 3.8-.3l2.2 1.8 14.5.4s0-.2.1-.5l1.1.6c.6-4.6-.4-10-.4-10 .1-1 3.4-5.4 4.8-7.2 2.9-2.1 5.6-4.5 8.4-6.9 4.7-3.9 12.5-14.1 12.5-14.1s-2.6 1.1-3 1.4z"/><radialGradient id="s" cx="221.303" cy="128.104" r="31.87" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".003" style="stop-color:#fdebc6"/><stop offset=".008" style="stop-color:#f9d3a7"/><stop offset=".013" style="stop-color:#f6bf8b"/><stop offset=".02" style="stop-color:#f3ae75"/><stop offset=".027" style="stop-color:#f1a164"/><stop offset=".037" style="stop-color:#f09859"/><stop offset=".05" style="stop-color:#ef9252"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#s)" d="M175.7 119.8c-4.6 1-9.9 2.5-16 4.5v-.2c-.6.3-1.3.6-1.8 1v.1c-.7.5-1.6 1.3-1.8 2.1-.4 1.5-1.4 6.5.3 7.5-.3.6-.7 1.8-.9 3.3-.2 2.2.1 9.9.1 9.9s-.8 2.2-.2 3c.5.6 5.2 4.6 6.6 5.8.2.2.5.6.9 1.1 1 1.4 3.2 4.5 4.6 5.6.2.2.5.4.8.7 2 1.7 5.3 4.8 9.3 4.6 0 0 .2-.5.8-1.5v-47.5h-2.7z"/><radialGradient id="t" cx="133.71" cy="116.859" r="36.342" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".003" style="stop-color:#fdebc6"/><stop offset=".008" style="stop-color:#f9d3a7"/><stop offset=".013" style="stop-color:#f6bf8b"/><stop offset=".02" style="stop-color:#f3ae75"/><stop offset=".027" style="stop-color:#f1a164"/><stop offset=".037" style="stop-color:#f09859"/><stop offset=".05" style="stop-color:#ef9252"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#t)" d="M175.7 119.8c-4.6 1-9.9 2.5-16 4.5v-.2c-.6.3-1.3.6-1.8 1v.1c-.7.5-1.6 1.3-1.8 2.1-.4 1.5-1.4 6.5.3 7.5-.3.6-.7 1.8-.9 3.3-.2 2.2.1 9.9.1 9.9s-.8 2.2-.2 3c.5.6 5.2 4.6 6.6 5.8.2.2.5.6.9 1.1 1 1.4 3.2 4.5 4.6 5.6.2.2.5.4.8.7 2 1.7 5.3 4.8 9.3 4.6 0 0 .2-.5.8-1.5v-47.5h-2.7z"/><radialGradient id="u" cx="157.169" cy="141.911" r="26.439" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#u)" d="M135 93.3c.4-.9 5.7-8.4 7.2-10.4s2-12.5 2-14.9c0-1.1-3.6-.5-7.5.4-.2.2-.4.5-.6.7-.1.1-.2.1-.3.2-7 4.8-6.5 12-6.3 13.7-2.6 3.7-2.8 5.4-3 7.2-.2 2.2-1.9 10.5-1.7 11.5 0 .4.3.8.6 1.3 3.2-2.9 9.3-9 9.6-9.7z"/><radialGradient id="v" cx="117.217" cy="192.738" r="28.392" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".002" style="stop-color:#fdf0cc"/><stop offset=".008" style="stop-color:#fad7ab"/><stop offset=".014" style="stop-color:#f6c18e"/><stop offset=".022" style="stop-color:#f4af77"/><stop offset=".03" style="stop-color:#f2a266"/><stop offset=".04" style="stop-color:#f09859"/><stop offset=".054" style="stop-color:#ef9352"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#v)" d="M135 93.3c.4-.9 5.7-8.4 7.2-10.4s2-12.5 2-14.9c0-1.1-3.6-.5-7.5.4-.2.2-.4.5-.6.7-.1.1-.2.1-.3.2-7 4.8-6.5 12-6.3 13.7-2.6 3.7-2.8 5.4-3 7.2-.2 2.2-1.9 10.5-1.7 11.5 0 .4.3.8.6 1.3 3.2-2.9 9.3-9 9.6-9.7z"/><radialGradient id="w" cx="230.068" cy="45.778" r="60.321" gradientTransform="matrix(1 0 0 -1.0957 0 269.282)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".012" style="stop-color:#fef6d3"/><stop offset=".028" style="stop-color:#fce9c3"/><stop offset=".045" style="stop-color:#f9d5a9"/><stop offset=".064" style="stop-color:#f5b984"/><stop offset=".084" style="stop-color:#f09555"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#w)" d="M207.6 312.2c-1-3.6-2.5-6.5-2-7.8s.7-5.1-2-8.3c-2.6-3.3-7.3-8.9-6.1-13.4s7.4-19 7.8-25.1c.3-6.1-1.8-10.3-5.6-15.7s-7.3-9.6-6.4-15.5c.8-6 2.1-13.4 2.1-13.4l-1.5-2.4-1.9-4.8c.1-.3.1-.5.1-.5l-10.2-33.7s-.7-1.9-.9-1.9l-1.6-3.5s-17.3-25.6-22.2-13.3l1.4 26.2c-.1.6-.2 1.2-.2 1.8.7-.9 1-1.3 2.1-.9 1.6.6 9.1 12.5 9.7 15.6.6 3.1 2.2 9.7 2.8 16.2.6 6.6 1.6 13.4 1.9 15.6.3 2.2.3 7.5 1.6 11.2 1.2 3.7 2.2 10.3 3.7 14.7 1.6 4.4 5.3 11.2 5.3 16.9 0 4.7.2 14.5-1.6 15.5.3 5.2.3 10.4-.8 12.3-2.1 4-12.2 15.4-14.2 16.3s-12.5-1.4-13.9 11.2c0 0 15.7 2 21.3 1.4 5.6-.5 12.9-1.3 16.3-1.1 3.5.2 15.5-1.1 15.9-2.3.6-1.2.1-7.7-.9-11.3z"/><radialGradient id="x" cx="140.697" cy="34.555" r="49.013" gradientTransform="matrix(1 0 0 -1.0957 0 269.282)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".012" style="stop-color:#fef6d3"/><stop offset=".028" style="stop-color:#fce9c3"/><stop offset=".045" style="stop-color:#f9d5a9"/><stop offset=".064" style="stop-color:#f5b984"/><stop offset=".084" style="stop-color:#f09555"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#x)" d="M192.9 269.7c0-5.6-3.7-14.7-5.3-19-1.6-4.4-3.7-9.1-5-12.8-1.2-3.7-1.9-7.8-2.2-10s-.9-10.3-1.6-16.9c-.6-6.6-3.1-12.8-3.7-15.9-.6-3.1-12.5-15.6-14.1-16.2-1.1-.4-2 1.3-2.7 2.2-.2 1.6-.3 3.1-.3 4.2 0 4.7 1.2 15 2.8 19.9s5.6 15.4 5.6 15.4l3.1 6.9s-.7 12.6 1.2 16.3c1.8 3.6 6.6 11.4 6.6 11.4s4.8 14.5 5.3 17.9c.3 1.8 1 7.4 1.3 13 1.7-1.2 9-11.6 9-16.4z"/><radialGradient id="y" cx="176.86" cy="19.317" r="74.561" fx="156.387" fy="20.476" gradientTransform="matrix(1 0 0 -1.0957 0 269.282)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".012" style="stop-color:#fef6d3"/><stop offset=".028" style="stop-color:#fce9c3"/><stop offset=".045" style="stop-color:#f9d5a9"/><stop offset=".064" style="stop-color:#f5b984"/><stop offset=".084" style="stop-color:#f09555"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".364" style="stop-color:#af622b"/><stop offset=".439" style="stop-color:#814820"/><stop offset=".515" style="stop-color:#593216"/><stop offset=".594" style="stop-color:#39200e"/><stop offset=".674" style="stop-color:#201208"/><stop offset=".758" style="stop-color:#0e0803"/><stop offset=".847" style="stop-color:#030201"/><stop offset=".949" style="stop-color:#000"/></radialGradient><path style="fill:url(#y)" d="M256.2 314.8c-.4-1.3-2.5-10-2.5-10s.1-.4.2-1c-3.1-1.6-6.6-3.6-8.1-5.3-3-3.5-8.2-13.1-9.4-17.1s-4-18-4.7-23.4-12.6-20.6-12.6-22.9c0-2.3-4.2-44.7-4.2-49.4 0-2.6 3.8-7 7.1-10.4-2.3-4-8-13.4-8-13.4l-6-17.2s-22.5 5.3-27.3 14.1c0 0-2.2 5.7-2.6 9.1l-2.3.5s1.4 2.6 2.8 5.6c.4.6.7 1.4 1.2 2.4 1.2 3.4 2.8 7.6 4.3 11.5 3.4 9.4 7.6 21.5 8.6 23.2 1.4 2.3 12 17.3 19.3 27.3.2 2.1.5 3.7.8 4.2.1.2.4.6.7 1.2.1 4.8.5 17 2.1 19.1 2 2.5 7.1 7.6 8.9 11 1.8 3.4 6.4 16.8 6.1 18.1-.3 1.3-1.8 8-1.3 9.2.5 1.3 2.6 5.1 2.6 5.1s-1.6 11.4-2.3 11.9l1.3-.9-2.3 3.9s-.5 3.1-.3 4.9c.1 1.3 14.6 1.8 22.7 2l3.7.4v-.3c.9 0 1.5.1 1.7.1 1 .2 2.3-4.2 2.3-4.2l-3.2-7.1c.8 0 1.3-.2.7-2.2z"/><radialGradient id="z" cx="247.033" cy="84.718" r="44.425" gradientTransform="matrix(1 0 0 -1.0957 0 269.282)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".012" style="stop-color:#fef6d3"/><stop offset=".028" style="stop-color:#fce9c3"/><stop offset=".045" style="stop-color:#f9d5a9"/><stop offset=".064" style="stop-color:#f5b984"/><stop offset=".084" style="stop-color:#f09555"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#z)" d="M216.1 235.9c0 2.3 6.8 20.1 7.5 25.5s11.7 15.9 12.9 19.9 6.3 13.6 9.4 17.1c1.5 1.8 5 3.8 8.1 5.3.2-1.1.5-3 .3-4.4-.3-2.2-5.4-9-5.9-9.8-.5-.7-3.1-6-3.8-8.3s-1.6-11.9-1.5-15.2c.2-3.3 2-12.3 1.6-15.2-.3-2.5-7.1-11.6-9.8-14.6-.3-.5-.6-.9-.9-1.4-.8-2.2-1.9-5.1-2.1-6.4-.4-2-3.2-7.8-4.2-14.5-.9-6.4-3.3-25.3-3.6-27.3 0-1.6.7-.7.2-6.3s-7.8-16.8-8.2-17.6c-6.6 4.2-6.3 17.3-7.5 19.7-4.9 9.5 7.5 51.2 7.5 53.5z"/><radialGradient id="A" cx="224.113" cy="127.167" r="31.869" gradientTransform="matrix(1 0 0 -1 0 256)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#fffad9"/><stop offset=".003" style="stop-color:#fdebc6"/><stop offset=".008" style="stop-color:#f9d3a7"/><stop offset=".013" style="stop-color:#f6bf8b"/><stop offset=".02" style="stop-color:#f3ae75"/><stop offset=".027" style="stop-color:#f1a164"/><stop offset=".037" style="stop-color:#f09859"/><stop offset=".05" style="stop-color:#ef9252"/><stop offset=".086" style="stop-color:#ef9150"/><stop offset=".325" style="stop-color:#cb7232"/><stop offset=".368" style="stop-color:#af622b"/><stop offset=".448" style="stop-color:#814820"/><stop offset=".531" style="stop-color:#593216"/><stop offset=".615" style="stop-color:#39200e"/><stop offset=".702" style="stop-color:#201208"/><stop offset=".793" style="stop-color:#0e0803"/><stop offset=".889" style="stop-color:#030201"/><stop offset="1" style="stop-color:#000"/></radialGradient><path style="fill:url(#A)" d="M209.8 144.7s-1.9-13.7-4.1-15.9c.3-1.5 1.1-6.4-1.2-7.7-.4-.3-7-6-28.7-1.4h2.6v47.5c1.5-2.4 5.2-7.5 12.4-12.1 5.4-3.4 9.7-5.9 12.9-7.2l3.2-.9c1.2-.2 2.3 0 3 .5l.6 1.2c.1 0 .5-3.1-.7-4z"/></g></svg>`})),pc,mc=o((()=>{pc=`<svg width="128" height="128" viewBox="0 0 128 128" fill="none" xmlns="http://www.w3.org/2000/svg">
    7171<rect width="128" height="128" rx="10" fill="url(#paint0_linear)"/>
    7272<path d="M37.512 62.252C35.856 62.252 34.392 61.964 33.12 61.388C31.872 60.812 30.888 60.008 30.168 58.976C29.448 57.944 29.064 56.792 29.016 55.52H31.68C31.8 56.768 32.34 57.86 33.3 58.796C34.26 59.732 35.664 60.2 37.512 60.2C39.216 60.2 40.56 59.756 41.544 58.868C42.552 57.956 43.056 56.828 43.056 55.484C43.056 54.404 42.78 53.54 42.228 52.892C41.676 52.22 40.992 51.728 40.176 51.416C39.36 51.08 38.232 50.72 36.792 50.336C35.112 49.88 33.78 49.436 32.796 49.004C31.812 48.572 30.972 47.9 30.276 46.988C29.58 46.076 29.232 44.84 29.232 43.28C29.232 41.984 29.568 40.832 30.24 39.824C30.912 38.792 31.86 37.988 33.084 37.412C34.308 36.836 35.712 36.548 37.296 36.548C39.624 36.548 41.496 37.124 42.912 38.276C44.352 39.404 45.18 40.868 45.396 42.668H42.66C42.492 41.612 41.928 40.676 40.968 39.86C40.008 39.044 38.712 38.636 37.08 38.636C35.568 38.636 34.308 39.044 33.3 39.86C32.292 40.676 31.788 41.792 31.788 43.208C31.788 44.264 32.064 45.116 32.616 45.764C33.168 46.412 33.852 46.904 34.668 47.24C35.508 47.576 36.636 47.936 38.052 48.32C39.684 48.776 41.004 49.232 42.012 49.688C43.02 50.12 43.872 50.792 44.568 51.704C45.264 52.616 45.612 53.84 45.612 55.376C45.612 56.552 45.3 57.668 44.676 58.724C44.052 59.78 43.128 60.632 41.904 61.28C40.68 61.928 39.216 62.252 37.512 62.252ZM53.0016 35.36V62H50.4816V35.36H53.0016ZM59.9681 38.636C59.4641 38.636 59.0321 38.456 58.6721 38.096C58.3121 37.736 58.1321 37.292 58.1321 36.764C58.1321 36.236 58.3121 35.804 58.6721 35.468C59.0321 35.108 59.4641 34.928 59.9681 34.928C60.4721 34.928 60.9041 35.108 61.2641 35.468C61.6241 35.804 61.8041 36.236 61.8041 36.764C61.8041 37.292 61.6241 37.736 61.2641 38.096C60.9041 38.456 60.4721 38.636 59.9681 38.636ZM61.2281 42.344V62H58.7081V42.344H61.2281ZM90.3347 41.984C92.6387 41.984 94.5107 42.716 95.9507 44.18C97.4147 45.62 98.1467 47.72 98.1467 50.48V62H95.6627V50.768C95.6627 48.632 95.1467 47 94.1147 45.872C93.0827 44.744 91.6787 44.18 89.9027 44.18C88.0547 44.18 86.5787 44.792 85.4747 46.016C84.3707 47.24 83.8187 49.016 83.8187 51.344V62H81.3347V50.768C81.3347 48.632 80.8187 47 79.7867 45.872C78.7547 44.744 77.3387 44.18 75.5387 44.18C73.6907 44.18 72.2147 44.792 71.1107 46.016C70.0067 47.24 69.4547 49.016 69.4547 51.344V62H66.9347V42.344H69.4547V45.728C70.0787 44.504 70.9667 43.58 72.1187 42.956C73.2707 42.308 74.5547 41.984 75.9707 41.984C77.6747 41.984 79.1627 42.392 80.4347 43.208C81.7307 44.024 82.6667 45.224 83.2427 46.808C83.7707 45.248 84.6707 44.06 85.9427 43.244C87.2387 42.404 88.7027 41.984 90.3347 41.984Z" fill="white"/>
    … …  
    7979</defs>
    8080</svg>
    81 `})),lc,uc=o((()=>{lc=`<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><rect width="44" height="44" rx="10" fill="#a4286a"/><path d="M13 11h5.2l3.9 8.6L26 11h5.1l-7.3 14.2V33h-4.6V25.4L13 11Z" fill="#fff"/><circle cx="33" cy="12" r="3" fill="#77b227"/></svg>`})),dc,fc=o((()=>{dc=`<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><rect width="44" height="44" rx="10" fill="#5b43d6"/><path d="M28.6 17.4c-.5-2.4-2.6-3.6-5.6-3.6-3.4 0-5.6 1.7-5.6 4.3 0 2.2 1.4 3.4 4.6 4.2l2.6.6c2.1.5 2.9 1.2 2.9 2.4 0 1.5-1.5 2.5-3.9 2.5-2.5 0-4.1-1.1-4.5-3.1h-4.4c.4 4.2 3.6 6.6 8.8 6.6 5.3 0 8.5-2.5 8.5-6.4 0-3-1.7-4.7-5.6-5.6l-2.5-.6c-2-.5-2.9-1.1-2.9-2.2 0-1.3 1.3-2.1 3.3-2.1 2 0 3.3.9 3.6 2.6h4.3Z" fill="#fff"/></svg>`})),pc=c({VendorIcon:()=>mc,default:()=>_c});function mc({id:e,label:t}){let n={rankmath:$s,aioseo:tc,seoframework:rc,seoultimate:ac,slimseo:sc,yoast:lc,seopress:dc}[e];if(n)return(0,yc.jsx)(`span`,{"aria-hidden":!0,className:`ars-vendor-icon`,dangerouslySetInnerHTML:{__html:n}});let r={yoast:`#a4286a`,seopress:`#5b43d6`,smartcrawl:`#d63638`,wpmetaseo:`#c150ba`,squirrly:`#0e7c5a`,jetpack:`#069e08`,genesis:`#ff5000`,woocommerce:`#7f54b3`,redirection:`#2271b1`}[e]||`var(--ars-brand)`;return(0,yc.jsx)(`span`,{"aria-hidden":!0,className:`ars-vendor-icon is-initial`,style:{background:r},children:(t||`?`).charAt(0)})}function hc(e){let t=[];return e.posts&&t.push(S(x(`%s page`,`%s pages`,e.posts,`ai-rank-suite`),bc(e.posts))),e.terms&&t.push(S(x(`%s term`,`%s terms`,e.terms,`ai-rank-suite`),bc(e.terms))),e.redirects&&t.push(S(x(`%s redirect`,`%s redirects`,e.redirects,`ai-rank-suite`),bc(e.redirects))),e.settings&&t.push(b(`site-wide settings`,`ai-rank-suite`)),t.join(` · `)}function gc(e={}){let t=(e,t)=>{switch(e){case`title`:return S(x(`%s title`,`%s titles`,t,`ai-rank-suite`),bc(t));case`desc`:return S(x(`%s description`,`%s descriptions`,t,`ai-rank-suite`),bc(t));case`keywords`:return S(x(`%s keyword set`,`%s keyword sets`,t,`ai-rank-suite`),bc(t));case`canonical`:return S(x(`%s canonical`,`%s canonicals`,t,`ai-rank-suite`),bc(t));case`robots`:return S(x(`%s robots directive`,`%s robots directives`,t,`ai-rank-suite`),bc(t));case`social`:return S(x(`%s social card`,`%s social cards`,t,`ai-rank-suite`),bc(t));case`breadcrumb`:return S(x(`%s breadcrumb title`,`%s breadcrumb titles`,t,`ai-rank-suite`),bc(t));case`schema`:return S(x(`%s schema type`,`%s schema types`,t,`ai-rank-suite`),bc(t));case`sitemap`:return S(x(`%s sitemap exclusion`,`%s sitemap exclusions`,t,`ai-rank-suite`),bc(t));case`term_title`:return S(x(`%s term title`,`%s term titles`,t,`ai-rank-suite`),bc(t));case`term_desc`:return S(x(`%s term description`,`%s term descriptions`,t,`ai-rank-suite`),bc(t));case`term_canonical`:return S(x(`%s term canonical`,`%s term canonicals`,t,`ai-rank-suite`),bc(t));case`term_robots`:return S(x(`%s term robots directive`,`%s term robots directives`,t,`ai-rank-suite`),bc(t));case`term_social`:return S(x(`%s term social card`,`%s term social cards`,t,`ai-rank-suite`),bc(t));case`redirects`:return S(x(`%s redirect`,`%s redirects`,t,`ai-rank-suite`),bc(t));case`settings`:return S(x(`%s setting`,`%s settings`,t,`ai-rank-suite`),bc(t));default:return`${bc(t)} ${e}`}};return Object.entries(e).filter(([,e])=>e>0).map(([e,n])=>t(e,n)).join(` · `)}function _c(){let[e,t]=(0,vc.useState)(null),[n,r]=(0,vc.useState)(!1),[i,a]=(0,vc.useState)({settings:!0,posts:!0,terms:!0,redirects:!0}),[o,s]=(0,vc.useState)(null),[c,l]=(0,vc.useState)(null),[u,d]=(0,vc.useState)(null),[f,p]=(0,vc.useState)(null),[m,h]=(0,vc.useState)(!1),[g,_]=(0,vc.useState)(null),v=(0,vc.useRef)(!1),y=(0,vc.useRef)(null),C=(0,vc.useRef)(null),w=(0,vc.useCallback)(()=>E.get(`/import/detect`).then(e=>{t(e),s(e.job&&e.job.state===`running`?e.job:null)}).catch(e=>d(e.message)),[]);(0,vc.useEffect)(()=>{w(),E.get(`/settings/backup`).then(p).catch(()=>{})},[w]);let ee=async(e,t)=>{if(!v.current){v.current=!0,d(null),l({label:t,counts:{},done:!1});try{let n=await E.post(`/import/start`,e);s(n);let r=(n,r)=>({label:t,source:e.source||n.source||``,dryRun:!!e.dry_run,total:n.total||0,counts:n.counts||{},fields:n.fields||{},importId:n.import_id,errors:n.errors||[],done:r});for(;n.state===`running`;)n=await E.post(`/import/tick`,{}),s(n.state===`running`?n:null),l(r(n,n.state!==`running`)),(n.busy||n.error)&&await new Promise(e=>setTimeout(e,1500));l(r(n,!0))}catch(e){d(e.message)}finally{v.current=!1,s(null),w()}}},T=Object.entries(i).filter(([,e])=>e).map(([e])=>e),te=(e,t)=>ee({source:e,mode:n?`overwrite`:`fill`,dry_run:t,parts:T},b(t?`Preview`:`Import`,`ai-rank-suite`)),ne=e=>ee({undo:e},b(`Undo`,`ai-rank-suite`)),re=async()=>{try{await E.post(`/import/cancel`,{})}catch(e){d(e.message)}},ie=async e=>{d(null);try{let t=await e.text(),n=/\.json$/i.test(e.name)?`json`:`csv`,r=await E.post(`/import/preview-file`,{content:t,format:n});if(r.error){d(r.error);return}let i={};(r.columns||[]).forEach(e=>{let t=e.toLowerCase();/^(seo[_ ]?)?title$/.test(t)?i[e]=`title`:/desc/.test(t)?i[e]=`desc`:/keyword|keyphrase/.test(t)?i[e]=`keywords`:/canonical/.test(t)?i[e]=`canonical`:/robots|noindex/.test(t)?i[e]=`robots`:/og[_ ]?image/.test(t)?i[e]=`og_image`:/og[_ ]?title/.test(t)&&(i[e]=`og_title`)});let a=(r.columns||[]).includes(`id`)?`id`:(r.columns||[]).includes(`url`)?`url`:`slug`;_({name:e.name,content:t,format:n,...r,map:i,match:a})}catch(e){d(e.message)}finally{C.current&&(C.current.value=``)}},D=e=>ee({source:`file`,mode:n?`overwrite`:`fill`,dry_run:e,file:{content:g.content,format:g.format,match:g.match,map:g.map}},b(e?`Preview`:`File import`,`ai-rank-suite`)),ae=(e,t)=>{let n=document.createElement(`a`);n.href=URL.createObjectURL(e),n.download=t,n.click(),URL.revokeObjectURL(n.href)},oe=()=>new Date().toISOString().slice(0,10),se=async()=>{h(!0);try{let e=await E.get(`/settings/export`);ae(new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),`ai-rank-suite-settings-${oe()}.json`)}catch(e){d(e.message)}finally{h(!1)}},ce=async()=>{h(!0);try{let e=[`id`,`title`,`url`,`seo_title`,`seo_desc`,`keyword`],t=[],n=0,r=null;for(let e=0;e<400;e++){let e=await E.get(`/content/csv?after=${n}&per_page=500`);if(t.push(...e.rows||[]),r=e.total??r,l({exported:t.length,of:r}),e.next===null||e.next===void 0)break;n=e.next}let i=e=>{let t=String(e??``).replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/g,``);return/^[=+\-@\t]/.test(t)&&(t=`'`+t),`"${t.replace(/"/g,`""`)}"`},a=[e.join(`,`),...t.map(t=>e.map(e=>i(t[e])).join(`,`))];ae(new Blob([``+a.join(`\r
    82 `)],{type:`text/csv;charset=utf-8`}),`ai-rank-suite-seo-data-${oe()}.csv`),l({exported:t.length,of:r,done:!0})}catch(e){d(e.message)}finally{h(!1)}},le=async e=>{h(!0),d(null);try{let t=JSON.parse(await e.text()),n=await E.post(`/settings/import`,{payload:t});l({settings:n.applied})}catch(e){d(e.message)}finally{h(!1),y.current&&(y.current.value=``)}},ue=async()=>{h(!0);try{await E.post(`/settings/backup`),l({restored:!0})}catch(e){d(e.message)}finally{h(!1)}};if(!e)return(0,yc.jsx)(_e,{error:u});let de=e.runs||[],O=e.conflicts||{};return(0,yc.jsxs)(`div`,{className:`ars-page`,children:[u&&(0,yc.jsx)(M,{tone:`serious`,children:u}),O.emitting&&(0,yc.jsx)(M,{tone:`warning`,children:S(b(`%s is still active and writing the meta tags on your pages. Import your data first, check a few pages, then deactivate it — this plugin never switches another one off for you.`,`ai-rank-suite`),O.emitting)}),(0,yc.jsxs)(k,{title:b(`Import from another SEO plugin`,`ai-rank-suite`),subtitle:b(`Titles, descriptions, keywords, canonicals, robots, social cards, term archives, templates and redirects. Nothing in the other plugin is read-only — it is never changed, and every import can be undone in one click.`,`ai-rank-suite`),action:(0,yc.jsx)(Ee,{checked:n,onChange:r,label:b(`Overwrite values we already have`,`ai-rank-suite`)}),children:[(0,yc.jsx)(`div`,{className:`flex flex-wrap items-center gap-3 mb-3`,children:[[`settings`,b(`Site-wide settings and templates`,`ai-rank-suite`)],[`posts`,b(`Pages and posts`,`ai-rank-suite`)],[`terms`,b(`Category and tag archives`,`ai-rank-suite`)],[`redirects`,b(`Redirects`,`ai-rank-suite`)]].map(([e,t])=>(0,yc.jsx)(Ee,{checked:!!i[e],onChange:t=>a(n=>({...n,[e]:t})),label:t},e))}),(o||c)&&(()=>{let e=(o?o.counts:c?.counts)||{},t=(o?o.fields:c?.fields)||{},n=Number(o?.total||c?.total||0),i=Number(e.seen||0),a=Number(e.errors||0),s=Number(e.kept||0),l=!!o,u=n>0?Math.min(l?99:100,Math.round(i/n*100)):l?0:100,d=Math.max(0,n-i),f=gc(t);return(0,yc.jsx)(k,{className:`mb-3`,title:l?b(`Working…`,`ai-rank-suite`):c?.dryRun?b(`Preview finished — nothing was written`,`ai-rank-suite`):b(`Import complete`,`ai-rank-suite`),subtitle:S(b(`%1$s of %2$s records processed`,`ai-rank-suite`),Number(i).toLocaleString(),Number(n||i).toLocaleString())+(a?` · ${S(x(`%s failed`,`%s failed`,a,`ai-rank-suite`),Number(a).toLocaleString())}`:``),action:l?(0,yc.jsx)(A,{variant:`ghost`,onClick:re,children:b(`Cancel`,`ai-rank-suite`)}):(0,yc.jsx)(j,{tone:a?`warning`:`good`,children:a?S(x(`%s failed`,`%s failed`,a,`ai-rank-suite`),Number(a).toLocaleString()):b(`Complete`,`ai-rank-suite`)}),children:(0,yc.jsxs)(`div`,{className:`grid gap-2`,children:[(0,yc.jsx)(Pe,{value:u}),(0,yc.jsxs)(`div`,{className:`flex justify-between text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[(0,yc.jsxs)(`span`,{children:[u,`%`]}),(0,yc.jsx)(`span`,{children:l?S(b(`%s remaining`,`ai-rank-suite`),Number(d).toLocaleString()):f||b(`Nothing needed changing.`,`ai-rank-suite`)})]}),!l&&f&&(0,yc.jsx)(`div`,{className:`text-[13px]`,style:{color:`var(--ars-ink)`},children:f}),!l&&s>0&&(0,yc.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,yc.jsx)(`span`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:S(x(`%s value was left alone because this plugin already holds one for that field.`,`%s values were left alone because this plugin already holds one for those fields.`,s,`ai-rank-suite`),Number(s).toLocaleString())}),(0,yc.jsx)(A,{onClick:()=>{r(!0),ee({source:c?.source||``,mode:`overwrite`,dry_run:!1,parts:T},b(`Import`,`ai-rank-suite`))},children:b(`Import again and overwrite them`,`ai-rank-suite`)})]}),!l&&e.unmatched?(0,yc.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:S(x(`%s row could not be matched to a page.`,`%s rows could not be matched to a page.`,e.unmatched,`ai-rank-suite`),Number(e.unmatched).toLocaleString())}):null,(c?.errors||[]).length>0&&(0,yc.jsx)(`ul`,{className:`m-0 mt-1 pl-5 text-[12px]`,style:{color:`var(--ars-serious)`},children:c.errors.slice(0,8).map((e,t)=>(0,yc.jsxs)(`li`,{children:[(0,yc.jsx)(`code`,{children:e.what}),` — `,e.message]},t))}),!l&&c?.importId&&!c?.dryRun&&(0,yc.jsxs)(`div`,{className:`flex items-center gap-2 mt-1`,children:[(0,yc.jsx)(A,{variant:`ghost`,onClick:()=>ne(c.importId),children:b(`Undo this import`,`ai-rank-suite`)}),(0,yc.jsx)(`span`,{className:`t-caption`,children:b(`Run the content analysis afterwards so the scores use the imported data.`,`ai-rank-suite`)})]})]})})})(),(e.sources||[]).some(e=>!!hc(e))?null:(0,yc.jsx)(`p`,{className:`m-0 mb-3 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`No other SEO plugin, and no data left behind by one, was found on this site. When one is installed its card appears here with what it holds.`,`ai-rank-suite`)}),(0,yc.jsx)(`div`,{className:`grid gap-3`,style:{gridTemplateColumns:`repeat(auto-fill, minmax(260px, 1fr))`},children:(e.sources||[]).filter(e=>!!hc(e)).map(e=>{let t=hc(e),n=!t;return(0,yc.jsxs)(`div`,{className:`ars-vendor-card`,children:[(0,yc.jsx)(mc,{id:e.id,label:e.label}),(0,yc.jsxs)(`div`,{className:`font-semibold text-[13.5px] flex items-center justify-center gap-2`,children:[e.label,e.active&&(0,yc.jsx)(j,{tone:`brand`,children:b(`Active`,`ai-rank-suite`)})]}),(0,yc.jsx)(`div`,{className:`text-[12px] text-center`,style:{color:`var(--ars-ink-2)`},children:n?e.active?b(`Active, but nothing is stored here to import — this plugin only saves values somebody typed by hand.`,`ai-rank-suite`):b(`Supported. Nothing from it on this site — no plugin, no leftover data.`,`ai-rank-suite`):t}),(0,yc.jsxs)(`div`,{className:`flex items-center justify-center gap-2`,children:[(0,yc.jsx)(A,{variant:n?`ghost`:`primary`,disabled:n||!!o,onClick:()=>te(e.id,!1),children:b(n?`Nothing to import`:`Import`,`ai-rank-suite`)}),!n&&(0,yc.jsx)(A,{variant:`ghost`,disabled:!!o,onClick:()=>te(e.id,!0),title:b(`Run without writing anything`,`ai-rank-suite`),children:b(`Preview`,`ai-rank-suite`)})]})]},e.id)})}),(e.sources||[]).some(e=>!hc(e))&&(0,yc.jsxs)(`div`,{className:`mt-3`,children:[(0,yc.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide mb-2`,style:{color:`var(--ars-ink-3)`},children:b(`Also supported, nothing from them on this site`,`ai-rank-suite`)}),(0,yc.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(e.sources||[]).filter(e=>!hc(e)).map(e=>(0,yc.jsxs)(`span`,{className:`inline-flex items-center gap-2 pr-3 pl-1 py-1 ars-r-md`,style:{border:`1px solid var(--ars-border)`,background:`var(--ars-surface)`},title:e.active?b(`Active, but nothing is stored here to import.`,`ai-rank-suite`):b(`Supported. Nothing from it on this site.`,`ai-rank-suite`),children:[(0,yc.jsx)(`span`,{className:`ars-vendor-icon is-small`,children:(0,yc.jsx)(mc,{id:e.id,label:e.label})}),(0,yc.jsx)(`span`,{className:`text-[12.5px]`,children:e.label}),e.active&&(0,yc.jsx)(j,{tone:`brand`,children:b(`Active`,`ai-rank-suite`)})]},e.id))})]}),(0,yc.jsx)(`p`,{className:`m-0 mt-3 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Template variables such as %%title%% are translated into this plugin’s own. A variable nothing here can resolve is dropped rather than printed into your pages. Run the content analysis afterwards so the scores reflect the imported data.`,`ai-rank-suite`)})]}),(0,yc.jsxs)(k,{title:b(`Import a spreadsheet`,`ai-rank-suite`),subtitle:b(`A CSV or JSON file with one row per page — titles and descriptions written elsewhere, or an export from this plugin edited and brought back.`,`ai-rank-suite`),children:[(0,yc.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,yc.jsx)(A,{variant:`ghost`,onClick:()=>C.current?.click(),disabled:!!o,children:g?g.name:b(`Choose a CSV or JSON file`,`ai-rank-suite`)}),(0,yc.jsx)(`input`,{ref:C,type:`file`,accept:`.csv,.json,text/csv,application/json`,style:{display:`none`},onChange:e=>e.target.files?.[0]&&ie(e.target.files[0])}),g&&(0,yc.jsx)(j,{tone:`neutral`,children:S(x(`%s row`,`%s rows`,g.rows,`ai-rank-suite`),bc(g.rows))})]}),g&&(0,yc.jsxs)(`div`,{className:`mt-3 grid gap-3`,children:[(0,yc.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-[12.5px]`,children:[(0,yc.jsx)(`span`,{children:b(`Match rows to pages by`,`ai-rank-suite`)}),(0,yc.jsx)(`select`,{style:{width:`auto`},value:g.match,onChange:e=>_({...g,match:e.target.value}),children:(g.columns||[]).map(e=>(0,yc.jsx)(`option`,{value:e,children:e},e))})]}),(0,yc.jsx)(Ce,{hint:b(`Every column you map is written; the rest are ignored.`,`ai-rank-suite`),children:b(`Columns`,`ai-rank-suite`)}),(0,yc.jsx)(`div`,{className:`grid gap-2`,style:{gridTemplateColumns:`repeat(auto-fill, minmax(260px, 1fr))`},children:(g.columns||[]).map(t=>(0,yc.jsxs)(`label`,{className:`flex items-center justify-between gap-2 text-[12.5px]`,children:[(0,yc.jsx)(`code`,{children:t}),(0,yc.jsxs)(`select`,{className:`ars-input`,style:{width:`auto`},value:g.map[t]||``,onChange:e=>_({...g,map:{...g.map,[t]:e.target.value}}),children:[(0,yc.jsx)(`option`,{value:``,children:b(`— ignore —`,`ai-rank-suite`)}),Object.entries(e.fields||{}).map(([e,t])=>(0,yc.jsx)(`option`,{value:e,children:t},e))]})]},t))}),(0,yc.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,yc.jsx)(A,{disabled:!!o,onClick:()=>D(!1),children:b(`Import the file`,`ai-rank-suite`)}),(0,yc.jsx)(A,{variant:`ghost`,disabled:!!o,onClick:()=>D(!0),children:b(`Preview`,`ai-rank-suite`)})]})]})]}),de.length>0&&(0,yc.jsx)(k,{title:b(`Import history`,`ai-rank-suite`),subtitle:b(`Every run, what it changed, and a way back.`,`ai-rank-suite`),children:(0,yc.jsx)(`div`,{className:`grid gap-2`,children:de.map(t=>(0,yc.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 py-2`,style:{borderBottom:`1px solid var(--ars-line)`},children:[(0,yc.jsxs)(`div`,{className:`text-[12.5px]`,children:[(0,yc.jsxs)(`div`,{className:`font-semibold`,children:[t.source===`file`?b(`Spreadsheet`,`ai-rank-suite`):(e.sources||[]).find(e=>e.id===t.source)?.label||t.source,t.dry_run?` · ${b(`preview only`,`ai-rank-suite`)}`:``,t.mode===`overwrite`?` · ${b(`overwrite`,`ai-rank-suite`)}`:``]}),(0,yc.jsxs)(`div`,{style:{color:`var(--ars-ink-2)`},children:[xc(t.started),` · `,gc(t.fields)||b(`nothing changed`,`ai-rank-suite`),t.counts?.errors?` · ${S(x(`%s error`,`%s errors`,t.counts.errors,`ai-rank-suite`),bc(t.counts.errors))}`:``]}),Array.isArray(t.errors)&&t.errors.length>0&&(0,yc.jsx)(Se,{title:b(`What failed`,`ai-rank-suite`),children:(0,yc.jsx)(`ul`,{className:`m-0 pl-4 text-[12px]`,children:t.errors.map((e,t)=>(0,yc.jsxs)(`li`,{children:[(0,yc.jsx)(`code`,{children:e.what}),` — `,e.message]},t))})})]}),(0,yc.jsx)(`div`,{className:`flex items-center gap-2`,children:t.undone?(0,yc.jsx)(j,{tone:`neutral`,children:b(`Undone`,`ai-rank-suite`)}):t.undoable?(0,yc.jsx)(A,{variant:`ghost`,disabled:!!o,onClick:()=>ne(t.import_id),children:b(`Undo this import`,`ai-rank-suite`)}):(0,yc.jsx)(j,{tone:`neutral`,children:b(`Preview`,`ai-rank-suite`)})})]},t.import_id))})}),(0,yc.jsxs)(k,{title:b(`Export & backup`,`ai-rank-suite`),subtitle:b(`Take your configuration and your SEO data with you — to another site, a spreadsheet, or a rollback`,`ai-rank-suite`),children:[(0,yc.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,yc.jsx)(A,{onClick:ce,busy:m,children:c?.exported!==void 0&&!c.done?S(b(`Exporting… %s`,`ai-rank-suite`),bc(c.exported)):b(`Export SEO data (CSV)`,`ai-rank-suite`)}),c?.done&&c?.exported!==void 0&&(0,yc.jsx)(j,{tone:`good`,children:S(b(`%s rows exported`,`ai-rank-suite`),bc(c.exported))}),(0,yc.jsx)(A,{variant:`ghost`,onClick:se,busy:m,children:b(`Export settings (JSON)`,`ai-rank-suite`)}),(0,yc.jsx)(A,{variant:`ghost`,onClick:()=>y.current?.click(),busy:m,children:b(`Import settings file`,`ai-rank-suite`)}),(0,yc.jsx)(`input`,{ref:y,type:`file`,accept:`application/json,.json`,style:{display:`none`},onChange:e=>e.target.files?.[0]&&le(e.target.files[0])}),f?.exists&&(0,yc.jsx)(A,{variant:`ghost`,onClick:ue,busy:m,children:b(`Restore pre-update backup`,`ai-rank-suite`)}),c?.settings!==void 0&&(0,yc.jsx)(j,{tone:`good`,children:S(b(`%s settings applied`,`ai-rank-suite`),bc(c.settings))}),c?.restored&&(0,yc.jsx)(j,{tone:`good`,children:b(`Restored`,`ai-rank-suite`)})]}),(0,yc.jsxs)(`p`,{className:`m-0 mt-3 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[b(`API keys and license data are never included in an export.`,`ai-rank-suite`),f?.exists&&` ${S(b(`A backup from version %s was taken automatically before the last update.`,`ai-rank-suite`),f.from)}`]})]})]})}var vc,yc,bc,xc,Sc=o((()=>{vc=u(f(),1),C(),D(),at(),ec(),nc(),ic(),oc(),cc(),uc(),fc(),yc=O(),bc=e=>Number(e||0).toLocaleString(),xc=e=>e?new Date(e*1e3).toLocaleString():``})),Cc=c({default:()=>Ac});function wc({tone:e=`info`,children:t}){return(0,W.jsx)(`div`,{className:`ars-wiz-callout${e===`warning`?` is-warning`:``}${e===`success`?` is-success`:``}`,children:t})}function Tc({children:e}){return(0,W.jsx)(`div`,{style:{fontSize:11.5,fontWeight:700,letterSpacing:`0.07em`,textTransform:`uppercase`,color:`var(--ars-ink)`,margin:`22px 0 8px`},children:e})}function Ec({children:e}){return(0,W.jsx)(`p`,{style:{margin:`7px 0 0`,fontSize:12.5,lineHeight:1.55,color:`var(--ars-ink-3)`,maxWidth:`80ch`},children:e})}function Dc({checked:e,onChange:t,slug:n,label:r,sub:i,disabled:a=!1,example:o}){return(0,W.jsxs)(`div`,{className:`ars-wiz-check`,children:[(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:e,disabled:a,onChange:e=>t?.(e.target.checked)}),(0,W.jsxs)(`span`,{children:[r[0],` `,(0,W.jsxs)(Rc,{children:[`[`,n,`]`]}),` `,r[1]]})]}),(i||o)&&(0,W.jsxs)(`div`,{className:`ars-wiz-check-sub`,children:[i&&(0,W.jsx)(`div`,{children:i}),o&&(0,W.jsxs)(`div`,{children:[b(`Example:`,`ai-rank-suite`),` `,o]})]})]})}function Oc({title:e,lede:t,children:n,footer:r}){return(0,W.jsxs)(`div`,{className:`ars-wiz-card`,children:[(0,W.jsx)(`h1`,{children:e}),t&&(0,W.jsx)(`p`,{className:`ars-wiz-lede`,children:t}),(0,W.jsx)(`div`,{className:`ars-wiz-body`,children:n}),r&&(0,W.jsx)(`div`,{className:`ars-wiz-footer`,children:r})]})}function kc({parts:e,onChange:t,resolve:n}){let r=zc(),[i,a]=(0,jc.useState)(``),o=()=>{let n=i.trim();n&&t([...e,{text:n}]),a(``)};return(0,W.jsxs)(`div`,{children:[(0,W.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:7,border:`1px solid var(--ars-border)`,borderRadius:8,padding:`9px 12px`,background:`var(--ars-surface)`,minHeight:44,boxSizing:`border-box`},children:[e.map((n,i)=>(0,W.jsxs)(`span`,{style:n.token?{display:`inline-flex`,alignItems:`center`,gap:6,background:`var(--ars-brand-tonal)`,color:`var(--ars-brand-tonal-ink, var(--ars-brand))`,borderRadius:6,padding:`3.5px 9px`,fontSize:12.5,fontWeight:600}:{fontSize:13,color:`var(--ars-ink)`},children:[n.token?r[n.token]||n.token:n.text,(0,W.jsx)(`button`,{type:`button`,onClick:()=>t(e.filter((e,t)=>t!==i)),"aria-label":b(`Remove`,`ai-rank-suite`),style:{border:0,background:`none`,cursor:`pointer`,color:`inherit`,opacity:.65,padding:0,marginLeft:n.token?0:4,lineHeight:1,fontSize:13},children:`×`})]},i)),(0,W.jsx)(`input`,{type:`text`,value:i,onChange:e=>a(e.target.value),onBlur:o,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),o())},placeholder:e.length?``:b(`Type text or add a variable below…`,`ai-rank-suite`),style:{flex:`1 1 120px`,minWidth:100,border:0,outline:`none`,background:`none`,font:`inherit`,fontSize:13,boxShadow:`none`,padding:4}}),e.length>0&&(0,W.jsx)(`button`,{type:`button`,onClick:()=>t([]),"aria-label":b(`Clear`,`ai-rank-suite`),style:{border:0,background:`none`,cursor:`pointer`,color:`var(--ars-ink-3)`,fontSize:15,padding:2},children:`×`})]}),(0,W.jsxs)(`div`,{style:{margin:`8px 0 10px`,fontSize:12.5,color:`var(--ars-ink-2)`},children:[(0,W.jsx)(`strong`,{children:b(`Preview:`,`ai-rank-suite`)}),` `,(0,W.jsx)(`em`,{children:n(Vc(e))||b(`(empty — the default template applies)`,`ai-rank-suite`)})]}),(0,W.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8},children:Object.entries(r).map(([n,r])=>{let i=e.some(e=>e.token===n);return(0,W.jsxs)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,style:{fontSize:12.5,paddingTop:5,paddingBottom:5},onClick:()=>!i&&t([...e,{token:n}]),disabled:i,children:[i?`✓`:`+`,` `,r]},n)})})]})}function Ac({onDone:e}){let t=(0,jc.useMemo)(()=>[{id:`welcome`,label:b(`Welcome`,`ai-rank-suite`),subs:[{id:`start`,label:b(`Get started`,`ai-rank-suite`)},{id:`import-config`,label:b(`Import configuration`,`ai-rank-suite`)},{id:`import-meta`,label:b(`Import metadata`,`ai-rank-suite`)}]},{id:`site`,label:b(`Your site`,`ai-rank-suite`),subs:[{id:`general`,label:b(`General`,`ai-rank-suite`)},{id:`social`,label:b(`Social accounts`,`ai-rank-suite`)}]},{id:`indexing`,label:b(`Indexing`,`ai-rank-suite`),subs:[{id:`idx-types`,label:b(`Post Types`,`ai-rank-suite`)},{id:`idx-archives`,label:b(`Archives`,`ai-rank-suite`)},{id:`idx-taxonomies`,label:b(`Taxonomies`,`ai-rank-suite`)}]},{id:`google`,label:b(`Google`,`ai-rank-suite`),subs:[{id:`google-connect`,label:b(`Search Console & Analytics`,`ai-rank-suite`)}]},{id:`advanced`,label:b(`Advanced options`,`ai-rank-suite`),subs:[{id:`adv`,label:b(`Advanced`,`ai-rank-suite`)},{id:`metabox`,label:b(`SEO Metabox`,`ai-rank-suite`)}]},{id:`ready`,label:b(`Ready!`,`ai-rank-suite`),subs:[]}],[]),n=(0,jc.useMemo)(()=>{let e=[];return t.forEach((t,n)=>{if(!t.subs.length){e.push({gi:n,si:-1,group:t,sub:null});return}t.subs.forEach((r,i)=>e.push({gi:n,si:i,group:t,sub:r}))}),e},[t]),[r,i]=(0,jc.useState)(0),[a,o]=(0,jc.useState)(!1),[s,c]=(0,jc.useState)(null),l=n[r],[u,d]=(0,jc.useState)({}),f=(e,t)=>d(n=>({...n,[e]:t})),p=e=>{c(null),i(Math.max(0,Math.min(n.length-1,e)))},m=()=>p(r+1),h=()=>p(r-1),g=async e=>{o(!0),c(null);try{await e()}catch(e){c(e.message)}finally{o(!1)}},[_,v]=(0,jc.useState)(null),[y,C]=(0,jc.useState)(null),[w,ee]=(0,jc.useState)(!1),[T,te]=(0,jc.useState)(null),[ne,ie]=(0,jc.useState)(null),[D,ae]=(0,jc.useState)(null),[oe,se]=(0,jc.useState)(null),[ce,le]=(0,jc.useState)(null),[ue,de]=(0,jc.useState)(null),[O,fe]=(0,jc.useState)([]),[pe,k]=(0,jc.useState)(``),[me,he]=(0,jc.useState)(`Organization`),[ge,_e]=(0,jc.useState)({}),[ve,ye]=(0,jc.useState)(``),[be,xe]=(0,jc.useState)([]),[Se,Ce]=(0,jc.useState)([]),[we,Ee]=(0,jc.useState)(!0),[j,De]=(0,jc.useState)(!1),[Oe,ke]=(0,jc.useState)(!0),[Ae,je]=(0,jc.useState)(!0),[Me,Ne]=(0,jc.useState)(null),[Pe,Fe]=(0,jc.useState)(!0),[Ie,Le]=(0,jc.useState)(null),[Re,ze]=(0,jc.useState)(!0),[Be,Ve]=(0,jc.useState)(`normal`),[He,Ue]=(0,jc.useState)(null),[We,Ge]=(0,jc.useState)(null),[Ke,qe]=(0,jc.useState)(null),[Je,Ye]=(0,jc.useState)(!1),[Xe,Ze]=(0,jc.useState)(null);(0,jc.useEffect)(()=>{E.get(`/import/sources`).then(e=>{let t=e.sources||[];te(t);let n=t.find(e=>e.active||e.posts>0||e.terms>0);n&&ie(n.id)}).catch(()=>te([])),E.get(`/settings/seo`).then(e=>{se(e),fe(Bc(e.settings.home_title)),xe((e.settings.noindex_types||[]).slice()),Ce((e.settings.noindex_taxonomies||[]).slice()),Ee(!!e.settings.date_noindex),De(!!e.settings.author_noindex),ke(!!e.settings.attachment_redirect),je(!!e.settings.noindex_empty_terms)}).catch(()=>se({settings:{},post_types:[],taxonomies:[]})),E.get(`/settings/schema`).then(e=>{le(e),he(e.settings.org_type||`Organization`),k(e.settings.identity?.alt_name||``)}).catch(()=>le(null)),E.get(`/settings/social`).then(e=>{de(e),_e({...e.settings.profiles||{}})}).catch(()=>de(null)),E.get(`/settings/image-seo`).then(e=>{Ne(e),Fe(!!e.settings.auto_alt)}).catch(()=>Ne(null)),E.get(`/settings/editor`).then(e=>{Le(e),ze(!!e.settings.metabox_enabled),Ve(e.settings.metabox_position||`normal`),Ue((e.settings.metabox_types||[]).length?e.settings.metabox_types.slice():null)}).catch(()=>Le(null)),E.get(`/setup/status`).then(Ze).catch(()=>Ze({})),E.get(`/gsc/status`).then(Ge).catch(()=>Ge(null))},[]);let Qe=async()=>{Ye(!0);try{let e=await E.get(`/gsc/signin-url`);window.location.href=e.url}catch{window.location.hash=`/search-console`}},$e=async()=>{Ye(!0);try{let e=await E.post(`/gsc/auto-configure`,{});qe(e)}catch{qe({property:``,ga4_property:``,ga4_measurement:``})}Ye(!1)},et=e=>String(e||``).replace(/%sitename%/g,re.siteName||``).replace(/%sep%/g,oe?.settings?.separator||`–`).replace(/%tagline%/g,re.tagline||``).replace(/%currentyear%/g,String(new Date().getFullYear())).replace(/\s{2,}/g,` `).trim(),N=(t=!1)=>g(async()=>{await E.post(`/core/onboarding`,{done:!0}),e(),t&&(window.location.hash=`/ai-wizard`)}),tt=e=>{c(null),C(null);let t=new FileReader;t.onload=()=>{try{let n=JSON.parse(String(t.result));if(n?.format!==`ai-rank-suite/1`){v(null),c(b(`This file is not an AI Rank Suite settings export.`,`ai-rank-suite`));return}v({name:e.name,payload:n})}catch{v(null),c(b(`This file is not valid JSON.`,`ai-rank-suite`))}},t.readAsText(e)},nt=()=>g(async()=>{let e=await E.post(`/settings/import`,{payload:_.payload});C(e),f(`config`,S(x(`%d settings group applied from your export file`,`%d settings groups applied from your export file`,e.applied,`ai-rank-suite`),e.applied))}),rt=()=>g(async()=>{let e=await E.post(`/import/start`,{source:ne,mode:`fill`,parts:[`posts`,`terms`,`redirects`]});for(let t=0;t<600&&e&&e.state===`running`;t++)e=await E.post(`/import/tick`,{});let t=e&&e.counts||{},n=(t.posts??0)+(t.terms??0),r=t.redirects??0,i=(T||[]).find(e=>e.id===ne)?.label||ne;ae({label:i,total:n,redirects:r}),n>0&&f(`meta`,S(x(`%1$d page migrated from %2$s`,`%1$d pages migrated from %2$s`,n,`ai-rank-suite`),n,i))}),it=()=>g(async()=>{let e=Vc(O);await E.put(`/settings/seo`,{home_title:e||`%sitename% %sep% %tagline%`}),ce&&await E.put(`/settings/schema`,{org_type:me,identity:{...ce.settings.identity||{},alt_name:pe.trim()}}),f(`general`,b(`Home title and site identity are configured`,`ai-rank-suite`)),m()}),at=()=>g(async()=>{let e={};Object.entries(ge).forEach(([t,n])=>{let r=String(n||``).trim();r&&(e[t]=r)});let t=[];ve.split(`
    83 `).map(e=>e.trim()).filter(Boolean).forEach(n=>{/tiktok\.com/i.test(n)&&!e.tiktok?e.tiktok=n:/wikipedia\.org/i.test(n)&&!e.wikipedia?e.wikipedia=n:t.push(n)});let n={profiles:e},r=String(e.x||``).match(/(?:x|twitter)\.com\/@?([A-Za-z0-9_]{2,})/);if(r&&(n.tw_site=`@`+r[1]),e.facebook&&(n.fb_page=e.facebook),await E.put(`/settings/social`,n),t.length&&ce){let e=(ce.settings.identity?.same_as||[]).map(String);await E.put(`/settings/schema`,{identity:{...ce.settings.identity||{},same_as:[...new Set([...e,...t])]}})}let i=Object.keys(e).length+t.length;i>0&&f(`social`,S(x(`%d social profile linked for the Knowledge Graph`,`%d social profiles linked for the Knowledge Graph`,i,`ai-rank-suite`),i)),m()}),ot=()=>g(async()=>{await E.put(`/settings/seo`,{noindex_types:be}),m()}),st=()=>g(async()=>{await E.put(`/settings/seo`,{date_noindex:we,author_noindex:j}),m()}),ct=()=>g(async()=>{await E.put(`/settings/seo`,{noindex_taxonomies:Se});let e=[];be.length&&e.push(S(x(`%d post type`,`%d post types`,be.length,`ai-rank-suite`),be.length)),Se.length&&e.push(S(x(`%d taxonomy`,`%d taxonomies`,Se.length,`ai-rank-suite`),Se.length)),f(`indexing`,e.length?S(b(`Indexing rules set — %s excluded from search results`,`ai-rank-suite`),e.join(`, `)):b(`Indexing rules reviewed for post types, archives and taxonomies`,`ai-rank-suite`)),m()}),lt=()=>g(async()=>{await E.put(`/settings/seo`,{attachment_redirect:Oe,noindex_empty_terms:Ae}),Me&&await E.put(`/settings/image-seo`,{auto_alt:Pe}),f(`advanced`,b(`Advanced options set — attachments, image alt texts, empty terms`,`ai-rank-suite`)),m()}),ut=()=>g(async()=>{Ie&&(await E.put(`/settings/editor`,{metabox_enabled:Re,metabox_position:Be,metabox_types:He===null?[]:He}),f(`metabox`,b(Re?`The SEO metabox is active in the editor`:`The SEO metabox is switched off`,`ai-rank-suite`))),m()}),dt=(0,W.jsxs)(`nav`,{className:`ars-wiz-rail`,"aria-label":b(`Setup steps`,`ai-rank-suite`),children:[(0,W.jsx)(`h2`,{className:`ars-wiz-rail-title`,children:l.group.label}),(0,W.jsx)(`div`,{className:`ars-wiz-steps`,children:t.map((e,t)=>{let i=n.findIndex(e=>e.gi===t),a=l.gi===t,o=l.gi>t;return(0,W.jsxs)(jc.Fragment,{children:[(0,W.jsxs)(`button`,{type:`button`,className:`ars-wiz-step${a?` is-active`:``}${o?` is-done`:``}`,onClick:()=>t<=l.gi?p(i):null,disabled:t>l.gi,children:[(0,W.jsx)(`span`,{className:`ars-wiz-num`,children:o?(0,W.jsx)(Mc,{}):t+1}),(0,W.jsx)(`span`,{children:e.label})]}),a&&e.subs.length>0&&(0,W.jsx)(`div`,{className:`ars-wiz-subs`,children:e.subs.map((e,i)=>{let a=n.findIndex(e=>e.gi===t&&e.si===i);return(0,W.jsx)(`button`,{type:`button`,className:`ars-wiz-sub${l.si===i?` is-active`:``}`,onClick:()=>a<=r?p(a):null,children:e.label},e.id)})})]},e.id)})})]}),ft=(0,W.jsxs)(`button`,{type:`button`,className:`ars-wiz-back`,onClick:h,children:[(0,W.jsx)(Nc,{}),b(`Back`,`ai-rank-suite`)]}),pt=e=>(0,W.jsx)(A,{onClick:e,busy:a,children:b(`Save and continue`,`ai-rank-suite`)}),mt=null,ht=l.sub?l.sub.id:l.group.id,gt=String(re.homeUrl||``).replace(/\/$/,``);if(ht===`start`&&(mt=(0,W.jsxs)(Oc,{title:b(`Welcome to AI Rank Suite`,`ai-rank-suite`),lede:b(`This wizard takes about 3 minutes. By the end, your site is set up for AI search — ChatGPT, Claude, Gemini, Perplexity — and classic Google SEO alike.`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`button`,{type:`button`,className:`ars-wiz-skip-link`,style:{marginRight:`auto`,paddingLeft:0},onClick:()=>N(!1),children:b(`Skip for now`,`ai-rank-suite`)}),(0,W.jsxs)(A,{onClick:m,children:[b(`Start setup`,`ai-rank-suite`),`\xA0`,(0,W.jsx)(Pc,{})]})]}),children:[(0,W.jsxs)(`div`,{className:`ars-wiz-hero`,children:[(0,W.jsxs)(`div`,{className:`ars-wiz-hero-card`,children:[(0,W.jsx)(`div`,{className:`ars-wiz-quote-mark`,"aria-hidden":!0,children:(0,W.jsx)(`svg`,{width:`30`,height:`24`,viewBox:`0 0 30 24`,fill:`currentColor`,children:(0,W.jsx)(`path`,{d:`M0 24V13.7C0 5.9 4.6 1.2 12.2 0l1.4 4.4c-4.3 1-6.4 3.2-6.6 6.9H13V24H0Zm17 0V13.7C17 5.9 21.6 1.2 29.2 0l1.4 4.4c-4.3 1-6.4 3.2-6.6 6.9H30V24H17Z`,transform:`scale(0.95)`})})}),(0,W.jsx)(`p`,{className:`ars-wiz-quote`,children:b(`AI assistants answer questions directly instead of showing links. The sites they quote are the sites they can read, understand and verify — that is exactly what this setup makes yours.`,`ai-rank-suite`)}),(0,W.jsx)(`div`,{className:`ars-wiz-quote-by`,children:b(`Why this wizard exists`,`ai-rank-suite`)}),(0,W.jsx)(`div`,{className:`ars-wiz-quote-role`,children:b(`Generative engine optimization, done once and done right`,`ai-rank-suite`)})]}),(0,W.jsx)(`div`,{className:`ars-wiz-hero-card ars-wiz-counts`,children:[[`77`,b(`structured data types, emitted automatically`,`ai-rank-suite`),(0,W.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,children:(0,W.jsx)(`path`,{d:`m8 8-4 4 4 4m8-8 4 4-4 4M14 5l-4 14`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})},`i`)],[`31`,b(`AI crawlers under your control`,`ai-rank-suite`),(0,W.jsxs)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,children:[(0,W.jsx)(`rect`,{x:`5`,y:`8`,width:`14`,height:`11`,rx:`2`,stroke:`currentColor`,strokeWidth:`2`}),(0,W.jsx)(`path`,{d:`M12 8V4m-7 9H3m18 0h-2M9 13.5h.01M15 13.5h.01`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]},`i`)],[`6`,b(`AI engines tracked for mentions of you`,`ai-rank-suite`),(0,W.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,children:(0,W.jsx)(`path`,{d:`M4 19c2-6 5-9 8-9m0 0c3 0 6 3 8 9M12 10V4m0 0-2.5 2.5M12 4l2.5 2.5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})},`i`)]].map(([e,t,n])=>(0,W.jsxs)(`div`,{className:`ars-wiz-count`,children:[(0,W.jsx)(`span`,{className:`ars-wiz-count-icon`,children:n}),(0,W.jsxs)(`span`,{children:[(0,W.jsx)(`div`,{className:`ars-wiz-count-num`,children:e}),(0,W.jsx)(`div`,{className:`ars-wiz-count-label`,children:t})]})]},t))})]}),(0,W.jsx)(`div`,{className:`ars-wiz-strip`,children:(0,W.jsxs)(`div`,{className:`ars-wiz-strip-text`,children:[(0,W.jsxs)(`div`,{className:`ars-wiz-strip-title`,children:[(0,W.jsx)(`svg`,{width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M12 2l2.4 7.2H22l-6 4.6 2.3 7.2-6.3-4.5-6.3 4.5L8 13.8 2 9.2h7.6L12 2z`,fill:`currentColor`})}),b(`Connect an AI engine after setup`,`ai-rank-suite`)]}),(0,W.jsx)(`div`,{className:`ars-wiz-strip-sub`,children:b(`Bring an OpenAI, Anthropic or Google key and the suite writes meta descriptions, answers FAQs and simulates AI answers about your site. The last step offers it.`,`ai-rank-suite`)})]})})]})),ht===`import-config`&&(mt=(0,W.jsxs)(Oc,{title:b(`Import an existing configuration`,`ai-rank-suite`),lede:b(`Already configured AI Rank Suite on another site? Upload the JSON file you exported from it to apply the exact same settings here, then skip the rest of the setup.`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,(0,W.jsx)(A,{variant:`ghost`,onClick:m,children:b(`Skip this step`,`ai-rank-suite`)}),(0,W.jsxs)(A,{onClick:nt,busy:a,disabled:!_||!!y,children:[b(`Import configuration`,`ai-rank-suite`),`\xA0`,(0,W.jsx)(Pc,{})]})]}),children:[(0,W.jsxs)(`div`,{className:`ars-wiz-drop${w?` is-over`:``}`,onDragOver:e=>{e.preventDefault(),ee(!0)},onDragLeave:()=>ee(!1),onDrop:e=>{e.preventDefault(),ee(!1);let t=e.dataTransfer.files?.[0];t&&tt(t)},children:[(0,W.jsx)(`span`,{className:`ars-wiz-drop-icon`,children:(0,W.jsx)(Fc,{})}),(0,W.jsx)(`div`,{className:`ars-wiz-drop-title`,children:b(`Drag and drop your configuration file here`,`ai-rank-suite`)}),(0,W.jsx)(`div`,{className:`ars-wiz-drop-sub`,children:b(`JSON file only — the one Settings → Export writes.`,`ai-rank-suite`)}),(0,W.jsx)(`div`,{className:`ars-wiz-drop-sub`,children:b(`or select it from your computer:`,`ai-rank-suite`)}),(0,W.jsx)(`input`,{type:`file`,accept:`.json,application/json`,onChange:e=>{let t=e.target.files?.[0];t&&tt(t)}}),_&&!y&&(0,W.jsx)(`div`,{className:`ars-wiz-drop-file`,children:S(b(`Ready to import: %s`,`ai-rank-suite`),_.name)})]}),y?(0,W.jsx)(M,{tone:`good`,children:S(x(`%d settings group applied. Continue to review the rest, or skip ahead — your configuration is live.`,`%d settings groups applied. Continue to review the rest, or skip ahead — your configuration is live.`,y.applied,`ai-rank-suite`),y.applied)}):(0,W.jsx)(wc,{tone:`warning`,children:(0,W.jsx)(`p`,{children:b(`Importing replaces your current settings (titles, llms.txt, sitemap, schema, advanced options…). Post and term metadata are not affected. API keys and licenses never travel in export files.`,`ai-rank-suite`)})})]})),ht===`import-meta`){let e=e=>e.active||e.posts>0||e.terms>0||e.redirects>0||e.settings;mt=(0,W.jsxs)(Oc,{title:b(`Migrate your SEO metadata to AI Rank Suite`,`ai-rank-suite`),lede:b(`Select your previous SEO plugin to bring its titles, descriptions, canonicals, robots rules and redirects along. Nothing on the other plugin is changed or deleted.`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,(0,W.jsx)(A,{variant:`ghost`,onClick:m,children:b(`Skip import for now`,`ai-rank-suite`)}),(0,W.jsxs)(A,{onClick:rt,busy:a,disabled:!ne||!!D,children:[b(`Migrate now`,`ai-rank-suite`),`\xA0`,(0,W.jsx)(Pc,{})]})]}),children:[T===null&&(0,W.jsx)(`div`,{style:{display:`grid`,placeItems:`center`,minHeight:200},children:(0,W.jsx)(Te,{})}),T!==null&&(0,W.jsx)(`div`,{className:`ars-wiz-sources`,children:T.map(t=>(0,W.jsxs)(`button`,{type:`button`,className:`ars-wiz-source${ne===t.id?` is-selected`:``}`,onClick:()=>e(t)&&ie(t.id),disabled:!e(t),"aria-pressed":ne===t.id,children:[(0,W.jsx)(mc,{id:t.id,label:t.label}),(0,W.jsxs)(`span`,{children:[(0,W.jsx)(`span`,{className:`ars-wiz-source-name`,children:t.label}),(0,W.jsx)(`span`,{className:`ars-wiz-source-sub`,style:{display:`block`},children:e(t)?[t.posts>0?S(x(`%d page`,`%d pages`,t.posts,`ai-rank-suite`),t.posts):null,t.redirects>0?S(x(`%d redirect`,`%d redirects`,t.redirects,`ai-rank-suite`),t.redirects):null,t.active?b(`active`,`ai-rank-suite`):null].filter(Boolean).join(` · `)||b(`settings found`,`ai-rank-suite`):b(`not detected`,`ai-rank-suite`)})]})]},t.id))}),T!==null&&!T.some(e)&&(0,W.jsx)(wc,{children:(0,W.jsx)(`p`,{children:b(`No other SEO plugin left data on this site — nothing to migrate. Skip ahead.`,`ai-rank-suite`)})}),D&&(0,W.jsx)(M,{tone:D.total>0?`good`:`info`,children:D.total>0?D.redirects>0?S(x(`Migrated %1$d page and %2$d redirects from %3$s.`,`Migrated %1$d pages and %2$d redirects from %3$s.`,D.total,`ai-rank-suite`),D.total,D.redirects,D.label):S(x(`Migrated %1$d page from %2$s.`,`Migrated %1$d pages from %2$s.`,D.total,`ai-rank-suite`),D.total,D.label):b(`Nothing left to migrate — every page that had data already carries it here.`,`ai-rank-suite`)}),D&&D.total>0&&(0,W.jsx)(wc,{children:(0,W.jsx)(`p`,{children:b(`Once everything looks right, deactivate the old plugin so only one of them writes your SEO tags.`,`ai-rank-suite`)})})]})}if(ht===`general`){let e=ce?.types&&typeof ce.types==`object`?ce.types:null;mt=(0,W.jsxs)(Oc,{title:b(`Tell us more about your site`,`ai-rank-suite`),lede:b(`These fields set your home page title and your Google Knowledge Graph — how search engines and AI assistants name your site.`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,pt(it)]}),children:[(0,W.jsx)(Tc,{children:b(`Site title`,`ai-rank-suite`)}),(0,W.jsx)(kc,{parts:O,onChange:fe,resolve:et}),(0,W.jsx)(Ec,{children:b(`This template builds your home page title tag. Variables resolve live — the preview above is exactly what Google shows.`,`ai-rank-suite`)}),(0,W.jsx)(Tc,{children:b(`Alternative site title`,`ai-rank-suite`)}),(0,W.jsx)(`input`,{type:`text`,value:pe,onChange:e=>k(e.target.value),placeholder:b(`e.g. a common acronym or short name`,`ai-rank-suite`),style:{width:`100%`,boxSizing:`border-box`}}),(0,W.jsx)(Ec,{children:b(`The alternate name of the website — for example a commonly recognized acronym or shorter name. It becomes the alternateName in your structured data.`,`ai-rank-suite`)}),(0,W.jsx)(Tc,{children:b(`Person or organization`,`ai-rank-suite`)}),(0,W.jsx)(`select`,{value:me,onChange:e=>he(e.target.value),style:{width:`100%`,boxSizing:`border-box`},children:e?Object.entries(e).map(([e,t])=>(0,W.jsx)(`optgroup`,{label:e,children:Object.entries(t).map(([e,t])=>(0,W.jsx)(`option`,{value:e,children:t},e))},e)):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`option`,{value:`Organization`,children:b(`Organization`,`ai-rank-suite`)}),(0,W.jsx)(`option`,{value:`Person`,children:b(`Person`,`ai-rank-suite`)})]})}),(0,W.jsx)(Ec,{children:b(`Choose "Person / sole trader" for a personal site, or the closest organization type for a company — it decides whether your Knowledge Graph entity is a Person or an Organization.`,`ai-rank-suite`)})]})}if(ht===`social`&&(mt=(0,W.jsxs)(Oc,{title:b(`Link your site to your social networks`,`ai-rank-suite`),lede:b(`These profiles feed the sameAs of your structured data — how search engines and AI assistants confirm which accounts are really yours.`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,pt(at)]}),children:[[[`facebook`,`Facebook`,`https://facebook.com/your-page`],[`x`,`X`,`https://x.com/your-handle`],[`pinterest`,`Pinterest`,`https://pinterest.com/your-profile`],[`instagram`,`Instagram`,`https://instagram.com/your-profile`],[`youtube`,`YouTube`,`https://youtube.com/@your-channel`],[`linkedin`,`LinkedIn`,`https://linkedin.com/company/your-page`]].map(([e,t,n])=>(0,W.jsxs)(`div`,{children:[(0,W.jsx)(Tc,{children:t}),(0,W.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,W.jsx)(`span`,{style:{color:`var(--ars-brand)`,display:`grid`,placeItems:`center`,width:24},"aria-hidden":!0,children:Lc[e]}),(0,W.jsx)(`input`,{type:`url`,value:ge[e]||``,onChange:t=>_e({...ge,[e]:t.target.value}),placeholder:n,style:{flex:1}})]})]},e)),(0,W.jsx)(Tc,{children:b(`Additional accounts`,`ai-rank-suite`)}),(0,W.jsx)(`textarea`,{rows:3,value:ve,onChange:e=>ye(e.target.value),placeholder:b(`Enter 1 URL per line (e.g. https://example.com/my-profile)`,`ai-rank-suite`),style:{width:`100%`,boxSizing:`border-box`}}),(0,W.jsx)(Ec,{children:b(`TikTok, Wikipedia, a directory entry, a GitHub org — anything that verifiably belongs to you strengthens the entity.`,`ai-rank-suite`)})]})),ht===`idx-types`&&(mt=(0,W.jsxs)(Oc,{title:b(`Which content types should be excluded from search engine results?`,`ai-rank-suite`),lede:b(`Check the boxes below to disable indexing for selected content types. They will not appear in search engine results (noindex).`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,pt(ot)]}),children:[(0,W.jsxs)(wc,{children:[(0,W.jsx)(`p`,{children:b(`Custom post types are a content type in WordPress. Post and Page are the default post types.`,`ai-rank-suite`)}),(0,W.jsx)(`p`,{children:b(`You can create your own type of content like "product" or "business": these are custom post types.`,`ai-rank-suite`)})]}),(0,W.jsx)(`div`,{className:`ars-wiz-checks`,children:(oe?.post_types||[]).map(e=>(0,W.jsx)(Dc,{slug:e.name,label:[b(`Exclude`,`ai-rank-suite`),b(`from search engine`,`ai-rank-suite`)],checked:be.includes(e.name),onChange:t=>xe(t?[...be,e.name]:be.filter(t=>t!==e.name))},e.name))})]})),ht===`idx-archives`&&(mt=(0,W.jsxs)(Oc,{title:b(`Which archives should be excluded from search engine results?`,`ai-rank-suite`),lede:b(`Check the boxes below to disable indexing for selected content types. They will not appear in search engine results (noindex).`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,pt(st)]}),children:[(0,W.jsx)(wc,{children:(0,W.jsx)(`p`,{children:b(`Archive pages are automatically generated by WordPress. They group specific content such as your latest articles, a product category or your content by author or date.`,`ai-rank-suite`)})}),(0,W.jsxs)(`div`,{className:`ars-wiz-checks`,children:[(0,W.jsx)(Dc,{slug:`date`,label:[b(`Exclude`,`ai-rank-suite`),b(`archives from search engine`,`ai-rank-suite`)],checked:we,onChange:Ee,example:`${gt}/2025/01/01/`}),(0,W.jsx)(Dc,{slug:`search`,label:[b(`Exclude`,`ai-rank-suite`),b(`results from search engine`,`ai-rank-suite`)],checked:!0,disabled:!0,sub:b(`Always on — internal search results are one query away from infinite duplicate pages.`,`ai-rank-suite`),example:`${gt}/?s=keyword`}),(0,W.jsx)(Dc,{slug:`author`,label:[b(`Exclude`,`ai-rank-suite`),b(`archives from search engine`,`ai-rank-suite`)],checked:j,onChange:De,sub:b(`You only have one author on your site? Check this option to avoid duplicate content.`,`ai-rank-suite`),example:`${gt}/author/jane-doe/`})]})]})),ht===`idx-taxonomies`&&(mt=(0,W.jsxs)(Oc,{title:b(`Which taxonomies should be excluded from search engine results?`,`ai-rank-suite`),lede:b(`Check the boxes below to disable indexing for selected content types. They will not appear in search engine results (noindex).`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,pt(ct)]}),children:[(0,W.jsxs)(wc,{children:[(0,W.jsx)(`p`,{children:b(`Taxonomies are the method of classifying content and data in WordPress. When you use a taxonomy you’re grouping similar things together. Categories and Tags are the default taxonomies.`,`ai-rank-suite`)}),(0,W.jsx)(`p`,{children:b(`You can add your own taxonomies like "product categories": these are called custom taxonomies.`,`ai-rank-suite`)})]}),(0,W.jsx)(`div`,{className:`ars-wiz-checks`,children:(oe?.taxonomies||[]).map(e=>(0,W.jsx)(Dc,{slug:e.name,label:[b(`Exclude`,`ai-rank-suite`),b(`from search engine`,`ai-rank-suite`)],checked:Se.includes(e.name),onChange:t=>Ce(t?[...Se,e.name]:Se.filter(t=>t!==e.name)),sub:e.name===`post_tag`?b(`We recommend excluding tags from search results, as they often create duplicate content.`,`ai-rank-suite`):null},e.name))})]})),ht===`google-connect`){let e=!!We?.connected;mt=(0,W.jsxs)(Oc,{title:b(`Connect Google — one click, no setup`,`ai-rank-suite`),lede:b(`Google already measures your site: Search Console knows the queries you appear for, Analytics knows your visitors. One sign-in brings both into this dashboard.`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,e?(0,W.jsx)(A,{onClick:m,children:b(`Continue`,`ai-rank-suite`)}):(0,W.jsx)(A,{variant:`ghost`,onClick:m,children:b(`Skip — connect later`,`ai-rank-suite`)})]}),children:[!e&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(wc,{children:[(0,W.jsx)(`p`,{children:b(`In plain terms: you click the button, a Google window opens, you choose the Google account you use for this website and press "Allow". That is the whole setup — we find the matching Search Console property and Analytics account for you.`,`ai-rank-suite`)}),(0,W.jsx)(`p`,{style:{marginTop:8},children:b(`We can only ever read your statistics — never change anything in your Google account. You can disconnect with one click at any time.`,`ai-rank-suite`)})]}),(0,W.jsx)(`div`,{style:{marginTop:16},children:(0,W.jsx)(A,{onClick:Qe,busy:Je,children:b(`Sign in with Google`,`ai-rank-suite`)})}),(0,W.jsx)(`p`,{className:`t-caption`,style:{marginTop:10},children:b(`No Google account for this site yet? Skip this step — everything else works without it.`,`ai-rank-suite`)})]}),e&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(wc,{tone:`success`,children:(0,W.jsx)(`p`,{children:b(`Google is connected.`,`ai-rank-suite`)})}),!Ke&&(0,W.jsx)(`div`,{style:{marginTop:14},children:(0,W.jsx)(A,{onClick:$e,busy:Je,children:b(`Find my accounts automatically`,`ai-rank-suite`)})}),Ke&&(0,W.jsxs)(`div`,{style:{marginTop:14},children:[(0,W.jsx)(`p`,{className:`m-0`,children:Ke.property?S(b(`Search Console: %s`,`ai-rank-suite`),Ke.property):b(`Search Console: no property for this domain was found in that account — pick one on the Search Console screen.`,`ai-rank-suite`)}),(0,W.jsx)(`p`,{className:`m-0`,style:{marginTop:6},children:Ke.ga4_property?S(b(`Analytics: property %1$s (measurement id %2$s)`,`ai-rank-suite`),Ke.ga4_property,Ke.ga4_measurement||`—`):b(`Analytics: no GA4 property points at this site — you can pick one on the Analytics screen, or keep working without it.`,`ai-rank-suite`)})]})]})]})}if(ht===`adv`&&(mt=(0,W.jsx)(Oc,{title:b(`Advanced SEO options`,`ai-rank-suite`),lede:b(`Optimize your site’s SEO with these advanced settings.`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,pt(lt)]}),children:(0,W.jsxs)(`div`,{className:`ars-wiz-checks`,children:[(0,W.jsxs)(`div`,{className:`ars-wiz-check`,children:[(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:Oe,onChange:e=>ke(e.target.checked)}),(0,W.jsx)(`span`,{children:b(`Redirect attachment pages to their parent or file URL`,`ai-rank-suite`)})]}),(0,W.jsx)(`div`,{className:`ars-wiz-check-sub`,children:b(`An attachment page is a near-empty page wrapping one image — thin content in the index. This sends visitors and crawlers to the real content instead.`,`ai-rank-suite`)})]}),(0,W.jsxs)(`div`,{className:`ars-wiz-check`,children:[(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:Pe,onChange:e=>Fe(e.target.checked),disabled:!Me}),(0,W.jsx)(`span`,{children:b(`Automatically set alt text on images that have none`,`ai-rank-suite`)})]}),(0,W.jsx)(`div`,{className:`ars-wiz-check-sub`,children:b(`Images without alt text are invisible to image search and to screen readers. This fills the gap from the file name and title when a page renders.`,`ai-rank-suite`)})]}),(0,W.jsxs)(`div`,{className:`ars-wiz-check`,children:[(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:Ae,onChange:e=>je(e.target.checked)}),(0,W.jsx)(`span`,{children:b(`Keep empty categories and tags out of the index`,`ai-rank-suite`)})]}),(0,W.jsx)(`div`,{className:`ars-wiz-check-sub`,children:b(`A term with no posts is an empty page. Indexing it is asking search engines to rate a blank.`,`ai-rank-suite`)})]})]})})),ht===`metabox`){let e=Ie?.post_types||[],t=He===null?e.map(e=>e.name):He;mt=(0,W.jsxs)(Oc,{title:b(`The SEO metabox in your editor`,`ai-rank-suite`),lede:b(`The metabox is the SEO panel inside the post editor: title, description, score and checks, right where you write. Decide where it lives.`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,pt(ut)]}),children:[(0,W.jsx)(`div`,{className:`ars-wiz-checks`,children:(0,W.jsxs)(`div`,{className:`ars-wiz-check`,children:[(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:Re,onChange:e=>ze(e.target.checked),disabled:!Ie}),(0,W.jsx)(`span`,{children:b(`Show the SEO metabox in the editor`,`ai-rank-suite`)})]}),(0,W.jsx)(`div`,{className:`ars-wiz-check-sub`,children:b(`The block editor also gets the AI Rank sidebar either way — the metabox is the full panel below the content.`,`ai-rank-suite`)})]})}),Re&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Tc,{children:b(`Position`,`ai-rank-suite`)}),(0,W.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(220px, 1fr))`,gap:12,maxWidth:560},children:[[`normal`,b(`Below the editor`,`ai-rank-suite`),b(`Full width — room for the score, checks and previews.`,`ai-rank-suite`)],[`side`,b(`Side column`,`ai-rank-suite`),b(`Compact, always in view next to the content.`,`ai-rank-suite`)]].map(([e,t,n])=>(0,W.jsxs)(`button`,{type:`button`,className:`ars-wiz-source${Be===e?` is-selected`:``}`,style:{minHeight:0,alignItems:`flex-start`,flexDirection:`column`,gap:3},onClick:()=>Ve(e),"aria-pressed":Be===e,children:[(0,W.jsx)(`span`,{className:`ars-wiz-source-name`,children:t}),(0,W.jsx)(`span`,{className:`ars-wiz-source-sub`,children:n})]},e))}),(0,W.jsx)(Tc,{children:b(`Post types`,`ai-rank-suite`)}),(0,W.jsx)(`div`,{className:`ars-wiz-checks`,children:e.map(n=>(0,W.jsx)(`div`,{className:`ars-wiz-check`,style:{padding:`5px 4px`},children:(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:t.includes(n.name),onChange:r=>{let i=r.target.checked?[...new Set([...t,n.name])]:t.filter(e=>e!==n.name);Ue(i.length===e.length?null:i)}}),(0,W.jsxs)(`span`,{children:[n.label,` `,(0,W.jsxs)(Rc,{children:[`[`,n.name,`]`]})]})]})},n.name))}),(0,W.jsx)(Ec,{children:b(`All types checked means new post types are covered automatically.`,`ai-rank-suite`)})]})]})}if(ht===`ready`){let e=[[!0,b(`llms.txt tells AI crawlers what your site is about`,`ai-rank-suite`)],[!0,b(`XML sitemaps are published for Google and Bing`,`ai-rank-suite`)],[!0,b(`Structured data is emitted for every page — 77 types available`,`ai-rank-suite`)],[!!Xe?.indexnow,b(`IndexNow pushes new content to search engines within minutes`,`ai-rank-suite`)],[!!Xe?.ai,b(`An AI engine is connected for writing and answer simulation`,`ai-rank-suite`)],...Object.values(u).map(e=>[!0,e])];mt=(0,W.jsxs)(Oc,{title:b(`Congratulations! Your site is set up for AI search.`,`ai-rank-suite`),lede:b(`AI Rank Suite has applied its key optimizations. Here is what is now working for you — and the one step that unlocks the rest.`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,(0,W.jsx)(A,{variant:`ghost`,onClick:()=>N(!1),busy:a,children:b(`Go to dashboard`,`ai-rank-suite`)})]}),children:[(0,W.jsx)(`div`,{className:`ars-wiz-rosette`,"aria-hidden":!0,children:(0,W.jsxs)(`span`,{children:[b(`Setup complete`,`ai-rank-suite`),(0,W.jsx)(`br`,{}),b(`AI ready`,`ai-rank-suite`)]})}),(0,W.jsx)(`div`,{className:`ars-wiz-donelist`,children:e.map(([e,t],n)=>(0,W.jsxs)(`div`,{className:`ars-wiz-done${e?``:` is-off`}`,children:[(0,W.jsx)(`span`,{className:`ars-wiz-done-check`,children:e?(0,W.jsx)(Ic,{}):`·`}),(0,W.jsx)(`span`,{children:t})]},n))}),Xe?.other_seo_plugin&&(0,W.jsx)(wc,{tone:`warning`,children:(0,W.jsx)(`p`,{children:S(b(`%s is still active and also writes SEO tags. Deactivate it once the migration looks right — two plugins writing the same tags is the one setup Google punishes.`,`ai-rank-suite`),Xe.other_seo_plugin)})}),(0,W.jsxs)(`div`,{className:`ars-wiz-strip`,children:[(0,W.jsxs)(`div`,{className:`ars-wiz-strip-text`,children:[(0,W.jsxs)(`div`,{className:`ars-wiz-strip-title`,children:[(0,W.jsx)(`svg`,{width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M12 2l2.4 7.2H22l-6 4.6 2.3 7.2-6.3-4.5-6.3 4.5L8 13.8 2 9.2h7.6L12 2z`,fill:`currentColor`})}),b(`Next step: connect an AI engine`,`ai-rank-suite`)]}),(0,W.jsx)(`div`,{className:`ars-wiz-strip-sub`,children:b(`One API key unlocks writing, the autopilot and answer simulations — the AI setup reads a description of your business and proposes the rest.`,`ai-rank-suite`)})]}),(0,W.jsxs)(A,{onClick:()=>N(!0),busy:a,children:[b(`Start AI setup`,`ai-rank-suite`),`\xA0`,(0,W.jsx)(Pc,{})]})]})]})}return(0,W.jsxs)(`div`,{className:`ars-wiz`,style:{fontFamily:`'Google Sans Text', Roboto, sans-serif`},children:[dt,(0,W.jsxs)(`div`,{children:[mt,s&&(0,W.jsx)(`div`,{style:{maxWidth:1160,marginTop:14},children:(0,W.jsx)(M,{tone:`serious`,children:s})})]})]})}var jc,W,Mc,Nc,Pc,Fc,Ic,Lc,Rc,zc,Bc,Vc,Hc=o((()=>{jc=u(f(),1),C(),D(),at(),Sc(),W=O(),Mc=()=>(0,W.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M20 6 9 17l-5-5`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`})}),Nc=()=>(0,W.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M15 18l-6-6 6-6`,stroke:`currentColor`,strokeWidth:`2.4`,strokeLinecap:`round`,strokeLinejoin:`round`})}),Pc=()=>(0,W.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M5 12h14m-6-6 6 6-6 6`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`})}),Fc=()=>(0,W.jsxs)(`svg`,{width:`30`,height:`30`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:[(0,W.jsx)(`path`,{d:`M12 16V4m0 0 5 5m-5-5-5 5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M4 20h16`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]}),Ic=()=>(0,W.jsx)(`svg`,{width:`17`,height:`17`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M20 6 9 17l-5-5`,stroke:`currentColor`,strokeWidth:`2.6`,strokeLinecap:`round`,strokeLinejoin:`round`})}),Lc={facebook:(0,W.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M13.5 21v-7.2h2.4l.4-2.9h-2.8V9.1c0-.8.3-1.4 1.5-1.4h1.4V5.1c-.3 0-1.1-.1-2-.1-2.1 0-3.5 1.2-3.5 3.6v2.3H8.5v2.9h2.4V21h2.6Z`})}),x:(0,W.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M17.8 4h2.9l-6.4 7.3L21.8 21h-5.9l-4.6-6-5.3 6H3.2l6.9-7.8L2.8 4h6l4.2 5.5L17.8 4Zm-1 15.2h1.6L7.9 5.7H6.2l10.6 13.5Z`})}),pinterest:(0,W.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M12 3a9 9 0 0 0-3.3 17.4c-.1-.7-.2-1.9 0-2.7l1.2-5s-.3-.6-.3-1.5c0-1.4.8-2.4 1.8-2.4.9 0 1.3.6 1.3 1.4 0 .9-.5 2.2-.8 3.4-.2 1 .5 1.8 1.5 1.8 1.8 0 3.1-1.9 3.1-4.6 0-2.4-1.7-4-4.2-4a4.4 4.4 0 0 0-4.6 4.4c0 .9.3 1.8.8 2.3l.1.4-.3 1.2c0 .2-.2.2-.4.1-1.2-.6-2-2.4-2-3.9 0-3.2 2.3-6.1 6.7-6.1 3.5 0 6.2 2.5 6.2 5.8 0 3.5-2.2 6.3-5.2 6.3-1 0-2-.5-2.3-1.1l-.6 2.4c-.2.9-.8 1.9-1.2 2.6A9 9 0 1 0 12 3Z`})}),instagram:(0,W.jsxs)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.9`,"aria-hidden":!0,children:[(0,W.jsx)(`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`4.5`}),(0,W.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3.6`}),(0,W.jsx)(`circle`,{cx:`17`,cy:`7`,r:`1.15`,fill:`currentColor`,stroke:`none`})]}),youtube:(0,W.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M21.3 8s-.2-1.4-.8-2c-.7-.8-1.6-.8-2-.9C15.9 5 12 5 12 5s-3.9 0-6.5.2c-.4 0-1.3 0-2 .8-.6.6-.8 2-.8 2S2.5 9.6 2.5 11.3v1.5c0 1.6.2 3.3.2 3.3s.2 1.4.8 2c.7.8 1.7.7 2.1.8 1.6.2 6.4.2 6.4.2s3.9 0 6.5-.2c.4 0 1.3-.1 2-.9.6-.6.8-2 .8-2s.2-1.6.2-3.3v-1.5c0-1.6-.2-3.2-.2-3.2ZM10 14.6V9.4l5.2 2.6L10 14.6Z`})}),linkedin:(0,W.jsx)(`svg`,{width:`19`,height:`19`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M6.3 8.6H3.5V21h2.8V8.6ZM4.9 3.5a1.7 1.7 0 1 0 0 3.4 1.7 1.7 0 0 0 0-3.4ZM20.5 14.1c0-3.2-1.7-4.7-4-4.7-1.8 0-2.6 1-3.1 1.7V8.6H10.6V21h2.8v-6.7c0-1.2.9-2.2 2.1-2.2s2.2.9 2.2 2.3V21h2.8v-6.9Z`})})},Rc=({children:e})=>(0,W.jsx)(`span`,{className:`ars-wiz-code`,children:e}),zc=()=>({"%sitename%":b(`Site title`,`ai-rank-suite`),"%sep%":b(`Separator`,`ai-rank-suite`),"%tagline%":b(`Tagline`,`ai-rank-suite`),"%currentyear%":b(`Current year`,`ai-rank-suite`)}),Bc=e=>String(e||``).split(/(%[a-z_]+%)/).map(e=>e.trim()).filter(Boolean).map(e=>/^%[a-z_]+%$/.test(e)?{token:e}:{text:e}),Vc=e=>e.map(e=>e.token?e.token:e.text).join(` `)})),Uc=c({default:()=>Kc});function Wc({title:e,lede:t,children:n}){return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`h2`,{className:`m-0 text-[17px] font-medium`,children:e}),t&&(0,G.jsx)(`p`,{className:`m-0 text-[13.5px]`,style:{color:`var(--ars-ink-2)`},children:t}),n]})}function Gc({action:e,label:t,openCount:n,onDone:r}){let[i,a]=(0,qc.useState)(null),[o,s]=(0,qc.useState)(!1),[c,l]=(0,qc.useState)(null),u=async()=>{s(!0),l(null);try{let t=await E.post(`/bulk/start`,{action:e,scope:`missing`});for(a(t),t=await E.post(`/bulk/tick`),a(t);t.state===`running`;)t=await E.post(`/bulk/tick`),a(t);r(t)}catch(e){/nothing to process/i.test(e.message)?(a({state:`done`,done:0,total:0,progress:100}),r({state:`done`,done:0})):l(e.message)}finally{s(!1)}},d=i?.state===`done`;return(0,G.jsxs)(`div`,{className:`grid gap-3`,children:[c&&(0,G.jsx)(M,{tone:`serious`,children:c}),i&&(0,G.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,G.jsxs)(`div`,{className:`flex justify-between text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:[(0,G.jsxs)(`span`,{children:[b(d?`Finished`:`Working…`,`ai-rank-suite`),` `,(i.done||0).toLocaleString(),i.total?` ${b(`of`,`ai-rank-suite`)} ${i.total.toLocaleString()}`:``,i.failed?` · ${i.failed} ${b(`failed`,`ai-rank-suite`)}`:``]}),(0,G.jsxs)(`span`,{className:`tabular-nums`,children:[i.progress??0,`%`]})]}),(0,G.jsx)(Pe,{value:i.progress??0})]}),!d&&(0,G.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[(0,G.jsx)(A,{onClick:u,busy:o,children:t}),typeof n==`number`&&(0,G.jsxs)(`span`,{className:`t-caption`,children:[n.toLocaleString(),` `,b(`pages waiting`,`ai-rank-suite`)]})]}),d&&(0,G.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Done`,`ai-rank-suite`)]})]})}function Kc({onDone:e}){let[t,n]=(0,qc.useState)(0),[r,i]=(0,qc.useState)(!1),[a,o]=(0,qc.useState)(null),[s,c]=(0,qc.useState)(!1),[l,u]=(0,qc.useState)(null),[d,f]=(0,qc.useState)(null),[p,m]=(0,qc.useState)(null),[h,g]=(0,qc.useState)(``),[_,v]=(0,qc.useState)(!1),[y,x]=(0,qc.useState)(null),[S,C]=(0,qc.useState)(null),[w,ee]=(0,qc.useState)([]),[T,te]=(0,qc.useState)(null),[ne,re]=(0,qc.useState)([]),[ie,D]=(0,qc.useState)(null),[ae,oe]=(0,qc.useState)(null),[se,ce]=(0,qc.useState)(!1),[le,ue]=(0,qc.useState)({});(0,qc.useEffect)(()=>{Promise.allSettled([E.get(`/settings/ai`),E.get(`/ai/capabilities`),E.get(`/ai/knowledge`),E.get(`/rank/keywords`),E.get(`/settings/ai-visibility`),E.get(`/ai/routing`)]).then(([e,t,n,r,a,o])=>{e.status===`fulfilled`&&u(e.value),t.status===`fulfilled`&&f(t.value),n.status===`fulfilled`&&(m(n.value),g(n.value.custom||``)),r.status===`fulfilled`&&ee((r.value.keywords||[]).map(e=>e.keyword)),a.status===`fulfilled`&&(te(a.value),re(a.value.settings?.prompts||a.value.prompts||[])),o.status===`fulfilled`&&oe(o.value),i(!0)})},[]);let de=Jc[t].id,O=()=>{o(null),n(e=>Math.min(Jc.length-1,e+1))},fe=()=>n(e=>Math.max(0,e-1)),pe=async e=>{c(!0),o(null);try{await e()}catch(e){o(e.message)}finally{c(!1)}},k=e=>{let t=(d?.rows||[]).find(t=>t.id===e);return t&&typeof t.open==`number`?t.open:null},me=()=>E.get(`/ai/capabilities`).then(f).catch(()=>{});if(!r)return(0,G.jsx)(`div`,{className:`min-h-[60vh] grid place-items-center`,children:(0,G.jsx)(Te,{})});let he=!!l?.has_key;return(0,G.jsx)(`div`,{className:`min-h-[80vh] grid place-items-center py-6 pr-5`,children:(0,G.jsxs)(`div`,{className:`ars-app w-full max-w-[720px] overflow-hidden`,children:[(0,G.jsxs)(`div`,{className:`px-8 pt-8 pb-6`,style:{background:`var(--ars-canvas)`},children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,G.jsx)(`span`,{className:`ars-brand-mark shrink-0`,style:{width:44,height:44,borderRadius:12},"aria-hidden":!0,children:(0,G.jsx)(bt,{width:24,height:24,style:{color:`#fff`}})}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`text-[22px] font-medium leading-tight`,children:(0,G.jsx)(`span`,{className:`ars-grad-text`,children:b(`AI setup`,`ai-rank-suite`)})}),(0,G.jsx)(`div`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Put the AI to work on this site — it types, you choose. Every step can be skipped.`,`ai-rank-suite`)})]})]}),(0,G.jsx)(`div`,{className:`flex gap-1.5 mt-6`,role:`progressbar`,"aria-valuenow":t+1,"aria-valuemin":1,"aria-valuemax":Jc.length,children:Jc.map((e,n)=>(0,G.jsx)(`div`,{className:`h-1 flex-1 ars-r-sm`,style:{background:n<=t?`var(--ars-brand)`:`var(--ars-track)`,transition:`background 300ms cubic-bezier(0.2,0,0,1)`},title:e.label},e.id))}),(0,G.jsxs)(`div`,{className:`t-caption mt-1.5`,children:[b(`Step`,`ai-rank-suite`),` `,t+1,` `,b(`of`,`ai-rank-suite`),` `,Jc.length,` · `,Jc[t].label]})]}),(0,G.jsxs)(`div`,{className:`px-8 py-6 grid gap-4`,style:{background:`var(--ars-surface)`},children:[de===`engine`&&(0,G.jsx)(Wc,{title:b(he?`Your engine is connected`:`Connect an engine first`,`ai-rank-suite`),lede:he?`${l.key_hint?`${b(`Key`,`ai-rank-suite`)} ${l.key_hint} · `:``}${b(`One test call proves it works before anything else in this wizard spends a token.`,`ai-rank-suite`)}`:b(`Everything after this step needs a model. Add a key on the AI Engine screen, then come back here.`,`ai-rank-suite`),children:he?(0,G.jsxs)(`div`,{className:`grid gap-3`,children:[y&&(0,G.jsx)(M,{tone:y.ok?`good`:`serious`,children:y.message}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,G.jsx)(A,{variant:`ghost`,busy:s,onClick:()=>pe(async()=>{try{let e=await E.post(`/ai/verify`,{});x({ok:!0,message:e.message||b(`The engine answered.`,`ai-rank-suite`)})}catch(e){x({ok:!1,message:e.message})}}),children:b(`Test the connection`,`ai-rank-suite`)}),(0,G.jsx)(A,{onClick:O,children:b(`Continue`,`ai-rank-suite`)})]})]}):(0,G.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,G.jsx)(A,{onClick:()=>{try{window.sessionStorage.setItem(`airanksuite-ai-wizard-return`,`1`)}catch{}window.location.hash=`/ai`},children:b(`Open AI Engine`,`ai-rank-suite`)}),(0,G.jsx)(A,{variant:`ghost`,onClick:O,children:b(`Skip for now`,`ai-rank-suite`)})]})}),de===`brief`&&(0,G.jsxs)(Wc,{title:b(`Brief the AI about your business`,`ai-rank-suite`),lede:b(`The fixed template already tells every engine what this plugin is, what GEO means, the house rules and the facts WordPress knows about the site. This is the part only you can write — it is sent with every call, on every engine.`,`ai-rank-suite`),children:[(0,G.jsx)(`textarea`,{rows:10,value:h,placeholder:p?.template||``,onChange:e=>{g(e.target.value),v(!1)},style:{fontFamily:`inherit`,fontSize:13,lineHeight:1.5}}),(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[!h&&p?.template&&(0,G.jsx)(A,{variant:`ghost`,onClick:()=>g(p.template),children:b(`Start from the template`,`ai-rank-suite`)}),_&&(0,G.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(A,{variant:`ghost`,onClick:O,children:b(`Skip`,`ai-rank-suite`)}),(0,G.jsx)(A,{busy:s,disabled:h===(p?.custom||``)&&_,onClick:()=>pe(async()=>{let e=await E.put(`/ai/knowledge`,{custom:h});m(e),v(!0),ue(e=>({...e,brief:!0})),O()}),children:b(`Save and continue`,`ai-rank-suite`)})]})]})]}),de===`score`&&(0,G.jsxs)(Wc,{title:b(`Score every page`,`ai-rank-suite`),lede:b(`Free and local — no AI call. Everything the AI does next reads from these scores, so they go first.`,`ai-rank-suite`),children:[(0,G.jsx)(Gc,{action:`analyze`,label:b(`Score the site`,`ai-rank-suite`),openCount:k(`analyze`),onDone:async()=>{ue(e=>({...e,score:!0}));try{let e=await E.post(`/score/recalculate`);C(e.dimensions?.overall??null)}catch{}me()}}),S!=null&&(0,G.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,G.jsx)(Oe,{value:S,size:84,onLight:!0}),(0,G.jsx)(`span`,{className:`text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Site AI score right now. Watch it move as the next steps land.`,`ai-rank-suite`)})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(A,{variant:`ghost`,onClick:fe,children:b(`Back`,`ai-rank-suite`)}),(0,G.jsx)(A,{onClick:O,children:le.score?b(`Continue`,`ai-rank-suite`):b(`Skip`,`ai-rank-suite`)})]})]}),de===`describe`&&(0,G.jsxs)(Wc,{title:b(`Write the missing meta descriptions`,`ai-rank-suite`),lede:b(`The highest-leverage thing the AI does. Every published page without a description gets one — 120–155 characters, grounded in the page, plus a summary an assistant can quote. Runs in slices; a large site finishes.`,`ai-rank-suite`),children:[!he&&(0,G.jsx)(M,{tone:`warning`,children:b(`Needs an engine — connect one on step 1.`,`ai-rank-suite`)}),he&&(0,G.jsx)(Gc,{action:`describe`,label:b(`Write them now`,`ai-rank-suite`),openCount:k(`describe`),onDone:()=>{ue(e=>({...e,describe:!0})),me()}}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(A,{variant:`ghost`,onClick:fe,children:b(`Back`,`ai-rank-suite`)}),(0,G.jsx)(A,{onClick:O,children:le.describe?b(`Continue`,`ai-rank-suite`):b(`Skip`,`ai-rank-suite`)})]})]}),de===`faq`&&(0,G.jsxs)(Wc,{title:b(`Generate FAQs`,`ai-rank-suite`),lede:b(`Three to six question-and-answer pairs per page, only from what the page already says, saved as FAQPage schema. The format assistants quote most readily.`,`ai-rank-suite`),children:[!he&&(0,G.jsx)(M,{tone:`warning`,children:b(`Needs an engine — connect one on step 1.`,`ai-rank-suite`)}),he&&(0,G.jsx)(Gc,{action:`faq`,label:b(`Generate FAQs now`,`ai-rank-suite`),openCount:k(`faq`),onDone:()=>{ue(e=>({...e,faq:!0})),me()}}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(A,{variant:`ghost`,onClick:fe,children:b(`Back`,`ai-rank-suite`)}),(0,G.jsx)(A,{onClick:O,children:le.faq?b(`Continue`,`ai-rank-suite`):b(`Skip`,`ai-rank-suite`)})]})]}),de===`keywords`&&(0,G.jsxs)(Wc,{title:b(`Choose keywords to track`,`ai-rank-suite`),lede:b(`The AI reads your published titles and proposes queries this site can realistically win. Pick the ones worth tracking; each becomes a row in the rank tracker.`,`ai-rank-suite`),children:[!he&&(0,G.jsx)(M,{tone:`warning`,children:b(`Needs an engine — connect one on step 1.`,`ai-rank-suite`)}),he&&(0,G.jsx)(Rr,{taken:w,onPick:e=>pe(async()=>{await E.post(`/rank/keywords`,{keyword:e}),ee(t=>[...t,e]),ue(e=>({...e,keywords:!0}))})}),w.length>0&&(0,G.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,G.jsxs)(j,{tone:`good`,children:[w.length,` `,b(`tracked`,`ai-rank-suite`)]}),(0,G.jsx)(`span`,{className:`t-caption`,children:w.slice(-6).join(` · `)})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(A,{variant:`ghost`,onClick:fe,children:b(`Back`,`ai-rank-suite`)}),(0,G.jsx)(A,{onClick:O,children:le.keywords?b(`Continue`,`ai-rank-suite`):b(`Skip`,`ai-rank-suite`)})]})]}),de===`prompts`&&(0,G.jsxs)(Wc,{title:b(`Seed the AI answer test`,`ai-rank-suite`),lede:b(`The questions a person would ask ChatGPT or Perplexity that your site should be the answer to. The AI proposes them from your brand and content; the tracker then asks them on a schedule and records whether you are named.`,`ai-rank-suite`),children:[!he&&(0,G.jsx)(M,{tone:`warning`,children:b(`Needs an engine — connect one on step 1.`,`ai-rank-suite`)}),he&&(0,G.jsxs)(`div`,{className:`grid gap-3`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,G.jsxs)(A,{variant:`ghost`,busy:s,onClick:()=>pe(async()=>{let e=await E.post(`/ai-visibility/suggest`,{count:10});D(e.prompts||[])}),children:[(0,G.jsx)(bt,{width:14,height:14}),b(`Suggest prompts with AI`,`ai-rank-suite`)]}),ne.length>0&&(0,G.jsxs)(j,{tone:`good`,children:[ne.length,` `,b(`saved`,`ai-rank-suite`)]})]}),ie&&ie.length===0&&(0,G.jsx)(M,{tone:`warning`,children:b(`No usable prompts came back. Try again.`,`ai-rank-suite`)}),ie&&ie.length>0&&(0,G.jsx)(`div`,{className:`ars-kwsuggest`,children:ie.map(e=>{let t=ne.includes(e);return(0,G.jsxs)(`button`,{type:`button`,className:`ars-kwchip${t?` is-done`:``}`,disabled:t,onClick:()=>pe(async()=>{let t=[...ne,e];await E.put(`/settings/ai-visibility`,{...T?.settings||{},prompts:t}),re(t),ue(e=>({...e,prompts:!0}))}),children:[(0,G.jsx)(`span`,{className:`ars-kwchip-word`,children:e}),(0,G.jsx)(j,{tone:t?`good`:`neutral`,children:b(t?`added`:`add`,`ai-rank-suite`)})]},e)})})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(A,{variant:`ghost`,onClick:fe,children:b(`Back`,`ai-rank-suite`)}),(0,G.jsx)(A,{onClick:O,children:le.prompts?b(`Continue`,`ai-rank-suite`):b(`Skip`,`ai-rank-suite`)})]})]}),de===`routing`&&(0,G.jsxs)(Wc,{title:b(`One engine per job`,`ai-rank-suite`),lede:b(`Every job runs on your default engine unless you say otherwise. Most sites leave this alone; agencies point the cheap, high-volume jobs at a cheaper model. Change it any time under AI Autopilot.`,`ai-rank-suite`),children:[ae&&(ae.engines||[]).length>1?(0,G.jsxs)(`div`,{className:`grid gap-2`,children:[(ae.jobs||[]).map(e=>(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,G.jsx)(`span`,{className:`text-[13px] font-medium`,children:e.label}),(0,G.jsxs)(`select`,{value:e.assigned?e.provider:``,onChange:t=>{let n=Object.fromEntries((ae.jobs||[]).map(n=>[n.id,n.id===e.id?t.target.value:n.assigned?n.provider:``]));oe({...ae,jobs:ae.jobs.map(n=>n.id===e.id?{...n,assigned:!!t.target.value,provider:t.target.value}:n),_draft:n}),ce(!1)},children:[(0,G.jsx)(`option`,{value:``,children:b(`Default engine`,`ai-rank-suite`)}),(ae.engines||[]).map(e=>(0,G.jsx)(`option`,{value:e.id,children:e.label},e.id))]})]},e.id)),(0,G.jsx)(`div`,{className:`flex items-center gap-2 flex-wrap mt-1`,children:se&&(0,G.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]})})]}):(0,G.jsx)(M,{tone:`neutral`,children:b(`Only one engine has a key, so every job already runs on it. Add a second key on the AI Engine screen to route jobs between them.`,`ai-rank-suite`)}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,G.jsx)(A,{variant:`ghost`,onClick:fe,children:b(`Back`,`ai-rank-suite`)}),ae?._draft?(0,G.jsx)(A,{busy:s,onClick:()=>pe(async()=>{let e=await E.put(`/ai/routing`,{assignments:ae._draft,exclusive:!!ae.exclusive});oe(e),ce(!0),ue(e=>({...e,routing:!0})),O()}),children:b(`Save and continue`,`ai-rank-suite`)}):(0,G.jsx)(A,{onClick:O,children:b(`Continue`,`ai-rank-suite`)})]})]}),de===`done`&&(0,G.jsxs)(Wc,{title:b(`The AI is set up`,`ai-rank-suite`),lede:b(`Here is what it did in this session, and where each thing lives from now on.`,`ai-rank-suite`),children:[(0,G.jsxs)(`ul`,{className:`m-0 pl-5 grid gap-1.5 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:[(0,G.jsxs)(`li`,{children:[le.brief?`✓ `:`– `,b(`Briefing saved — every engine reads it before every task.`,`ai-rank-suite`),` `,(0,G.jsx)(`em`,{children:b(`AI Engine → Knowledge base`,`ai-rank-suite`)})]}),(0,G.jsxs)(`li`,{children:[le.score?`✓ `:`– `,b(`Pages scored.`,`ai-rank-suite`),` `,(0,G.jsx)(`em`,{children:b(`Dashboard → Full website analyzer`,`ai-rank-suite`)})]}),(0,G.jsxs)(`li`,{children:[le.describe?`✓ `:`– `,b(`Meta descriptions written.`,`ai-rank-suite`),` `,(0,G.jsx)(`em`,{children:b(`Content`,`ai-rank-suite`)})]}),(0,G.jsxs)(`li`,{children:[le.faq?`✓ `:`– `,b(`FAQs generated.`,`ai-rank-suite`),` `,(0,G.jsx)(`em`,{children:b(`Content · Schema`,`ai-rank-suite`)})]}),(0,G.jsxs)(`li`,{children:[le.keywords?`✓ `:`– `,b(`Keywords tracked.`,`ai-rank-suite`),` `,(0,G.jsx)(`em`,{children:b(`Search Console → Keywords`,`ai-rank-suite`)})]}),(0,G.jsxs)(`li`,{children:[le.prompts?`✓ `:`– `,b(`Answer-test prompts saved.`,`ai-rank-suite`),` `,(0,G.jsx)(`em`,{children:b(`AI Answer Simulation`,`ai-rank-suite`)})]}),(0,G.jsxs)(`li`,{children:[le.routing?`✓ `:`– `,b(`Routing set.`,`ai-rank-suite`),` `,(0,G.jsx)(`em`,{children:b(`AI Autopilot`,`ai-rank-suite`)})]})]}),(0,G.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Anything skipped is one button on the "Let AI do" panel — on the dashboard and on the AI Engine screen.`,`ai-rank-suite`)}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,G.jsx)(A,{onClick:e,children:b(`Go to dashboard`,`ai-rank-suite`)}),(0,G.jsx)(A,{variant:`ghost`,onClick:()=>{window.location.hash=`/autopilot`,e()},children:b(`Open the autopilot`,`ai-rank-suite`)})]})]}),a&&(0,G.jsx)(M,{tone:`serious`,children:a})]})]})})}var qc,G,Jc,Yc=o((()=>{qc=u(f(),1),C(),D(),at(),Ft(),Vr(),G=O(),Jc=[{id:`engine`,label:b(`Engine`,`ai-rank-suite`)},{id:`brief`,label:b(`Brief the AI`,`ai-rank-suite`)},{id:`score`,label:b(`Score`,`ai-rank-suite`)},{id:`describe`,label:b(`Descriptions`,`ai-rank-suite`)},{id:`faq`,label:b(`FAQs`,`ai-rank-suite`)},{id:`keywords`,label:b(`Keywords`,`ai-rank-suite`)},{id:`prompts`,label:b(`AI prompts`,`ai-rank-suite`)},{id:`routing`,label:b(`Routing`,`ai-rank-suite`)},{id:`done`,label:b(`Done`,`ai-rank-suite`)}]}));function Xc(){let[e,t]=(0,Zc.useState)(null),[n,r]=(0,Zc.useState)(null),[i,a]=(0,Zc.useState)(!1),[o,s]=(0,Zc.useState)(`present`),[c,l]=(0,Zc.useState)(null),u=(e=!1)=>{a(!0),E.get(`/google/rich-results${e?`?fresh=1`:``}`).then(t).catch(e=>r(e.message)).finally(()=>a(!1))};if((0,Zc.useEffect)(()=>{u()},[]),n)return(0,Qc.jsx)(M,{tone:`serious`,children:n});if(!e)return(0,Qc.jsx)(k,{children:b(`Reading the structured data on your pages…`,`ai-rank-suite`)});let d=e.features||[],f=d.filter(e=>e.pages>0),p=f.filter(e=>e.invalid>0),m=d.filter(e=>e.pages===0&&!e.retired),h=o===`present`?f:o===`broken`?p:o===`gaps`?m:d;return(0,Qc.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Qc.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,Qc.jsxs)(`div`,{className:`ars-rr-stat`,children:[(0,Qc.jsx)(`b`,{children:f.length}),(0,Qc.jsx)(`span`,{children:b(`rich result types on this site`,`ai-rank-suite`)})]}),(0,Qc.jsxs)(`div`,{className:`ars-rr-stat${p.length?` is-bad`:``}`,children:[(0,Qc.jsx)(`b`,{children:p.length}),(0,Qc.jsx)(`span`,{children:b(`with pages that would not qualify`,`ai-rank-suite`)})]}),(0,Qc.jsxs)(`div`,{className:`ars-rr-stat`,children:[(0,Qc.jsx)(`b`,{children:e.scanned}),(0,Qc.jsx)(`span`,{children:b(`pages inspected`,`ai-rank-suite`)})]})]}),(0,Qc.jsxs)(k,{icon:(0,Qc.jsx)(Et,{size:16}),title:b(`Rich result eligibility`,`ai-rank-suite`),subtitle:b(`Checked against the properties Google documents as required for each feature — not a guess, the graph is read from your pages`,`ai-rank-suite`),action:(0,Qc.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,Qc.jsxs)(A,{variant:`ghost`,busy:i,onClick:()=>u(!0),children:[(0,Qc.jsx)(yt,{size:13}),b(`Rescan`,`ai-rank-suite`)]})}),flush:!0,children:[(0,Qc.jsx)(`div`,{className:`p-3`,style:{borderBottom:`1px solid var(--ars-border)`},children:(0,Qc.jsx)(Ve,{label:b(`Show`,`ai-rank-suite`),value:o,onChange:s,options:[{id:`present`,label:b(`On this site`,`ai-rank-suite`),count:f.length},{id:`broken`,label:b(`Not qualifying`,`ai-rank-suite`),count:p.length},{id:`gaps`,label:b(`Not used yet`,`ai-rank-suite`),count:m.length},{id:`all`,label:b(`Everything`,`ai-rank-suite`),count:d.length}]})}),h.length===0?(0,Qc.jsx)(`p`,{className:`m-0 p-4 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(o===`broken`?`Every page that emits a rich result type meets its required properties.`:`Nothing in this group.`,`ai-rank-suite`)}):(0,Qc.jsx)(`div`,{children:h.map(e=>{let t=c===e.type,n=e.pages===0?`none`:e.invalid===0?`good`:`bad`;return(0,Qc.jsxs)(`div`,{className:`ars-rr-row is-${n}`,children:[(0,Qc.jsxs)(`button`,{type:`button`,className:`ars-rr-main`,onClick:()=>l(t?null:e.type),"aria-expanded":t,children:[(0,Qc.jsx)(`span`,{className:`ars-rr-caret`,"aria-hidden":!0,children:t?`▾`:`▸`}),(0,Qc.jsxs)(`span`,{className:`min-w-0`,children:[(0,Qc.jsxs)(`span`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Qc.jsx)(`b`,{className:`text-[13px]`,children:e.label}),(0,Qc.jsx)(`span`,{className:`ars-tag`,children:e.group}),e.indexing&&(0,Qc.jsx)(`span`,{className:`ars-tag`,style:{background:`var(--ars-brand-tonal)`,color:`var(--ars-brand-tonal-ink)`},title:b(`One of only two types the Google Indexing API accepts`,`ai-rank-suite`),children:b(`Indexing API`,`ai-rank-suite`)}),e.retired&&(0,Qc.jsx)(`span`,{className:`ars-tag`,children:b(`retired by Google`,`ai-rank-suite`)})]}),(0,Qc.jsx)(`span`,{className:`ars-rr-about`,children:e.about})]}),(0,Qc.jsx)(`span`,{className:`ars-rr-count`,children:e.pages===0?(0,Qc.jsx)(`i`,{style:{color:`var(--ars-ink-3)`},children:b(`not used`,`ai-rank-suite`)}):(0,Qc.jsxs)(Qc.Fragment,{children:[(0,Qc.jsx)(`b`,{className:`tabular-nums`,children:e.valid}),` `,b(`of`,`ai-rank-suite`),` `,(0,Qc.jsx)(`span`,{className:`tabular-nums`,children:e.pages}),` `,b(`qualify`,`ai-rank-suite`)]})}),e.pages>0&&(e.invalid===0?(0,Qc.jsx)(j,{tone:`good`,children:b(`valid`,`ai-rank-suite`)}):(0,Qc.jsx)(j,{tone:`serious`,children:S(b(`%d failing`,`ai-rank-suite`),e.invalid)}))]}),t&&(0,Qc.jsxs)(`div`,{className:`ars-rr-body`,children:[e.gaps.length>0&&(0,Qc.jsxs)(`div`,{children:[(0,Qc.jsx)(`div`,{className:`t-overline`,children:b(`Missing required properties`,`ai-rank-suite`)}),(0,Qc.jsx)(`p`,{className:`m-0 mb-2 t-caption`,children:b(`A page without these is not eligible for this rich result at all.`,`ai-rank-suite`)}),(0,Qc.jsx)(`div`,{className:`ars-rr-props`,children:e.gaps.map(t=>(0,Qc.jsxs)(`div`,{className:`ars-rr-prop is-required`,children:[(0,Qc.jsx)(`code`,{children:t.property}),(0,Qc.jsxs)(`span`,{children:[`missing on `,t.pages,` page`,t.pages===1?``:`s`]}),e.notes?.[t.property]&&(0,Qc.jsx)(`em`,{children:e.notes[t.property]})]},t.property))})]}),e.weak.length>0&&(0,Qc.jsxs)(`div`,{children:[(0,Qc.jsx)(`div`,{className:`t-overline`,children:b(`Recommended but absent`,`ai-rank-suite`)}),(0,Qc.jsx)(`p`,{className:`m-0 mb-2 t-caption`,children:b(`The page still qualifies. The result just renders with less in it.`,`ai-rank-suite`)}),(0,Qc.jsx)(`div`,{className:`ars-rr-props`,children:e.weak.map(t=>(0,Qc.jsxs)(`div`,{className:`ars-rr-prop`,children:[(0,Qc.jsx)(`code`,{children:t.property}),(0,Qc.jsxs)(`span`,{children:[`on `,t.pages,` page`,t.pages===1?``:`s`]}),e.notes?.[t.property]&&(0,Qc.jsx)(`em`,{children:e.notes[t.property]})]},t.property))})]}),e.samples.length>0&&(0,Qc.jsxs)(`div`,{children:[(0,Qc.jsx)(`div`,{className:`t-overline`,children:b(`Pages that would not qualify`,`ai-rank-suite`)}),(0,Qc.jsx)(`ul`,{className:`m-0 mt-1.5 p-0 list-none grid gap-1`,children:e.samples.map(e=>(0,Qc.jsxs)(`li`,{className:`ars-rr-sample`,children:[(0,Qc.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>{window.location.hash=`/content/${e.id}`},children:e.title||`#${e.id}`}),(0,Qc.jsx)(`span`,{className:`t-caption`,children:S(b(`missing %s`,`ai-rank-suite`),e.missing.join(`, `))})]},e.id))})]}),e.pages===0&&(0,Qc.jsxs)(`div`,{className:`grid gap-2`,children:[(0,Qc.jsxs)(`p`,{className:`m-0 text-[12.5px]`,children:[S(b(`No page on this site emits %s. Required to qualify:`,`ai-rank-suite`),e.type),` `,e.required.map(e=>(0,Qc.jsx)(`code`,{className:`ars-head-code mr-1`,children:e},e))]}),(0,Qc.jsx)(`button`,{type:`button`,className:`ars-linkbtn text-left`,onClick:()=>{window.location.hash=`/schema`},children:S(b(`Add %s markup in Schema →`,`ai-rank-suite`),e.label)})]}),e.pages>0&&e.invalid===0&&e.weak.length===0&&(0,Qc.jsx)(`p`,{className:`m-0 text-[12.5px]`,children:S(b(`Every page emitting %s has all required and all recommended properties.`,`ai-rank-suite`),e.type)}),(0,Qc.jsxs)(`a`,{href:`https://search.google.com/test/rich-results`,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 text-[12px]`,children:[b(`Verify one page in Google's own tester`,`ai-rank-suite`),(0,Qc.jsx)(vt,{size:10})]})]})]},e.type)})})]}),(0,Qc.jsxs)(ot,{title:b(`The Indexing API is not what most plugins claim it is`,`ai-rank-suite`),children:[(0,Qc.jsxs)(`p`,{children:[b(`Google documents the Indexing API as supporting exactly two types:`,`ai-rank-suite`),(0,Qc.jsx)(`code`,{children:b(`JobPosting`,`ai-rank-suite`)}),` `,b(`and`,`ai-rank-suite`),` `,(0,Qc.jsx)(`code`,{children:b(`BroadcastEvent`,`ai-rank-suite`)}),`. `,b(`Submitting a blog post or a product page to it does not get that page indexed faster — it uses quota and returns success, which is why the misunderstanding is so durable. Plugins that advertise it as “instant indexing for everything” are selling that misunderstanding.`,`ai-rank-suite`)]}),(0,Qc.jsx)(`p`,{children:b(`For everything else the honest tools are the sitemap, IndexNow — which Bing, Yandex, Seznam and Naver genuinely act on — and publishing something worth crawling. All three are in this plugin, on the tabs beside this one.`,`ai-rank-suite`)}),(0,Qc.jsx)(`p`,{children:S(b(`This scan reads the last %d modified pages rather than every page on the site. That is enough to find a broken template, which is what a site-wide structured data problem always is; it is not a complete audit, and it says so rather than implying it counted everything.`,`ai-rank-suite`),e.limit)})]})]})}var Zc,Qc,$c=o((()=>{Zc=u(f(),1),C(),D(),at(),ct(),Ft(),Qc=O()})),el=c({default:()=>nl});function tl(){let[e,t]=(0,rl.useState)(null),[n,r]=(0,rl.useState)(!1),[i,a]=(0,rl.useState)(!1),[o,s]=(0,rl.useState)(null),[c,l]=(0,rl.useState)(``);if((0,rl.useEffect)(()=>{E.get(`/settings/indexnow`).then(t).catch(e=>s(e.message))},[]),!e)return(0,K.jsx)(_e,{error:o});let u=e.settings,d=n=>t({...e,settings:{...u,...n}}),f=async e=>{r(!0),s(null);try{return t(await e()),!0}catch(e){return s(e.message),!1}finally{r(!1)}},p=async()=>{await f(()=>E.put(`/settings/indexnow`,u))&&(a(!0),setTimeout(()=>a(!1),2200))},m=c.split(/[\n\s]+/).map(e=>e.trim()).filter(Boolean);return(0,K.jsxs)(K.Fragment,{children:[o&&(0,K.jsx)(M,{tone:`serious`,children:o}),(0,K.jsx)(he,{tone:u.enabled?`good`:`neutral`,text:u.enabled?b(`IndexNow is active — Bing, Yandex, Seznam and Naver hear about a change the moment you make it.`,`ai-rank-suite`):b(`IndexNow is switched off, so nothing is being submitted.`,`ai-rank-suite`),sub:u.enabled?u.auto?S(b(`Covering %s, automatically on publish, update and unpublish.`,`ai-rank-suite`),(u.post_types||[]).join(`, `)||b(`no post types`,`ai-rank-suite`)):S(b(`Covering %s — automatic submission is off, so this only happens when you press the button.`,`ai-rank-suite`),(u.post_types||[]).join(`, `)||b(`no post types`,`ai-rank-suite`)):b(`This needs no Google account and no API key. One switch in the settings below turns it on.`,`ai-rank-suite`)}),(0,K.jsx)(k,{title:b(`Submit URLs now`,`ai-rank-suite`),children:(0,K.jsxs)(`div`,{className:`grid gap-3`,children:[(0,K.jsx)(`textarea`,{rows:4,placeholder:`${window.airanksuiteData.homeUrl}my-page/\n${window.airanksuiteData.homeUrl}another-page/`,value:c,onChange:e=>l(e.target.value)}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,K.jsx)(A,{onClick:async()=>{await f(()=>E.post(`/indexnow/submit`,{urls:m}))&&l(``)},busy:n,disabled:!m.length,children:m.length?S(x(`Submit %d URL`,`Submit %d URLs`,m.length,`ai-rank-suite`),m.length):b(`Submit URLs`,`ai-rank-suite`)}),(0,K.jsx)(A,{variant:`ghost`,onClick:()=>f(()=>E.post(`/indexnow/submit`,{scope:`all`})),busy:n,children:b(`Submit everything`,`ai-rank-suite`)})]}),(0,K.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`“Submit everything” sends your 500 most recent published URLs. Use it once after installing, then let the automatic submissions do the work.`,`ai-rank-suite`)})]})}),e.recent?.length>0&&(0,K.jsx)(k,{title:b(`Recent submissions`,`ai-rank-suite`),subtitle:(()=>{let t=e.recent.filter(e=>!e.ok).length;return t>0?S(b(`%1$d recent, %2$d rejected — a 429 means you submitted the same URL too often`,`ai-rank-suite`),e.recent.length,t):S(b(`%d recent, all accepted`,`ai-rank-suite`),e.recent.length)})(),action:(0,K.jsx)(j,{tone:e.recent.some(e=>!e.ok)?`warning`:`good`,children:e.recent.length}),children:(0,K.jsx)(`div`,{className:`ars-table-wrap`,children:(0,K.jsxs)(`table`,{className:`ars-table`,children:[(0,K.jsx)(`thead`,{children:(0,K.jsxs)(`tr`,{children:[(0,K.jsx)(`th`,{children:b(`URLs`,`ai-rank-suite`)}),(0,K.jsx)(`th`,{children:b(`First URL`,`ai-rank-suite`)}),(0,K.jsx)(`th`,{children:b(`Result`,`ai-rank-suite`)}),(0,K.jsx)(`th`,{children:b(`When`,`ai-rank-suite`)})]})}),(0,K.jsx)(`tbody`,{children:e.recent.slice(0,12).map((e,t)=>(0,K.jsxs)(`tr`,{children:[(0,K.jsx)(`td`,{className:`tabular-nums`,children:e.count}),(0,K.jsx)(`td`,{className:`ars-mono`,style:{maxWidth:300},title:String(e.first),children:(0,K.jsx)(`span`,{className:`ars-url`,children:String(e.first).replace(/^https?:\/\/[^/]+/,``)})}),(0,K.jsx)(`td`,{children:e.ok?(0,K.jsxs)(j,{tone:`good`,children:[`✓ `,e.code]}):(0,K.jsxs)(j,{tone:`serious`,title:e.error,children:[`✕ `,e.code||b(`error`,`ai-rank-suite`)]})}),(0,K.jsx)(`td`,{style:{color:`var(--ars-ink-3)`},children:new Date(e.time*1e3).toLocaleString()})]},t))})]})})}),(0,K.jsx)(Se,{title:b(`IndexNow settings`,`ai-rank-suite`),note:u.enabled?b(`Active`,`ai-rank-suite`):b(`Off`,`ai-rank-suite`),defaultOpen:!u.enabled,children:(0,K.jsxs)(`div`,{className:`grid gap-4`,children:[(0,K.jsx)(k,{title:b(`IndexNow`,`ai-rank-suite`),subtitle:b(`Instant indexing for Bing, Yandex, Seznam and Naver — no Google account or API key needed`,`ai-rank-suite`),action:u.enabled?(0,K.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Active`,`ai-rank-suite`)]}):(0,K.jsx)(j,{tone:`neutral`,children:b(`Off`,`ai-rank-suite`)}),children:(0,K.jsxs)(`div`,{className:`grid gap-4`,children:[!e.permalinks&&(0,K.jsx)(M,{tone:`serious`,children:b(`IndexNow needs pretty permalinks so the key file can be served. Switch Settings → Permalinks away from “Plain” first.`,`ai-rank-suite`)}),(0,K.jsx)(Ee,{checked:!!u.enabled,onChange:e=>d({enabled:e}),label:b(`Enable IndexNow submissions`,`ai-rank-suite`)}),(0,K.jsx)(Ee,{checked:!!u.auto,onChange:e=>d({auto:e}),label:b(`Submit automatically when a page is published, updated or unpublished`,`ai-rank-suite`)}),(0,K.jsx)(`div`,{className:`flex gap-3 flex-wrap text-[13px]`,children:e.post_types.map(e=>(0,K.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:u.post_types.includes(e),onChange:t=>d({post_types:t.target.checked?[...u.post_types,e]:u.post_types.filter(t=>t!==e)})}),e]},e))}),(0,K.jsxs)(`div`,{className:`sm:max-w-[440px]`,children:[(0,K.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Endpoint`,`ai-rank-suite`)}),(0,K.jsx)(`select`,{value:u.endpoint,onChange:e=>d({endpoint:e.target.value}),children:Object.entries(e.endpoints).map(([e,t])=>(0,K.jsx)(`option`,{value:e,children:t},e))}),(0,K.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`All participating engines share one network — the first option reaches every one of them.`,`ai-rank-suite`)})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(A,{onClick:p,busy:n,children:b(`Save`,`ai-rank-suite`)}),i&&(0,K.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]})]})]})}),(0,K.jsx)(k,{title:b(`Your key file`,`ai-rank-suite`),subtitle:b(`Search engines fetch this to prove the submissions come from you`,`ai-rank-suite`),children:(0,K.jsxs)(`div`,{className:`grid gap-3`,children:[(0,K.jsx)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:(0,K.jsx)(`a`,{className:`ars-mono text-[12.5px]`,href:e.key_url,target:`_blank`,rel:`noreferrer`,children:e.key_url})}),(0,K.jsx)(`div`,{children:(0,K.jsx)(A,{variant:`ghost`,onClick:()=>f(()=>E.post(`/indexnow/key`,{})),busy:n,children:b(`Generate a new key`,`ai-rank-suite`)})}),(0,K.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Open the link — it must show the key as plain text. Regenerating invalidates the old key immediately.`,`ai-rank-suite`)})]})})]})})]})}function nl({tab:e=`indexing`,onTab:t}){let[n,r]=(0,rl.useState)(null),[i,a]=(0,rl.useState)(!1),[o,s]=(0,rl.useState)(!1),[c,l]=(0,rl.useState)(null),[u,d]=(0,rl.useState)(``),[f,p]=(0,rl.useState)(``),m=(0,rl.useRef)(null);if((0,rl.useEffect)(()=>{E.get(`/settings/google`).then(r).catch(e=>l(e.message))},[]),!n)return(0,K.jsx)(_e,{error:c});let h=n.settings,g=e=>r({...n,settings:{...h,...e}}),_=async()=>{a(!0),l(null);try{r(await E.put(`/settings/google`,h)),s(!0),setTimeout(()=>s(!1),2200)}catch(e){l(e.message)}finally{a(!1)}},v=async e=>{a(!0),l(null);try{r(await E.post(`/google/indexing/account`,{json:e})),p(``)}catch(e){l(e.message)}finally{a(!1),m.current&&(m.current.value=``)}},y=async e=>v(await e.text()),x=async()=>{a(!0);try{r(await E.del(`/google/indexing/account`))}catch(e){l(e.message)}finally{a(!1)}},C=async()=>{a(!0),l(null);try{r(await E.post(`/google/indexing/submit`,{url:u})),d(``)}catch(e){l(e.message)}finally{a(!1)}},w=n.indexing,ee=Math.round(w.used_today/w.quota*100);return(0,K.jsxs)(`div`,{className:`ars-page`,children:[(0,K.jsx)(Ae,{tabs:[{id:`indexing`,label:b(`Google`,`ai-rank-suite`)},{id:`rich`,label:b(`Rich results`,`ai-rank-suite`)},{id:`bing`,label:b(`Bing`,`ai-rank-suite`)},{id:`indexnow`,label:b(`IndexNow`,`ai-rank-suite`)},{id:`verify`,label:b(`Verification`,`ai-rank-suite`)}],active:e,onChange:t}),c&&(0,K.jsx)(M,{tone:`serious`,children:c}),e===`indexing`&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(pa,{tone:w.configured?`good`:`neutral`,text:w.configured?b(`Google is told directly when a page is published, updated or removed.`,`ai-rank-suite`):b(`Google is not told about changes directly — it finds them on its own schedule.`,`ai-rank-suite`),why:w.configured?b(`The Indexing API is Google's fast lane for job postings and live streams; for everything else the sitemap and IndexNow below carry the change.`,`ai-rank-suite`):b(`A service account key from Google Cloud connects the Indexing API in three steps below. IndexNow (next tab) needs no account at all and covers Bing, Yandex, Seznam and Naver.`,`ai-rank-suite`)}),(0,K.jsx)(k,{title:b(`Google Indexing API`,`ai-rank-suite`),subtitle:b(`Tell Google directly when a page is published, updated or removed`,`ai-rank-suite`),action:w.configured?(0,K.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Connected`,`ai-rank-suite`)]}):(0,K.jsx)(j,{tone:`neutral`,children:b(`Not connected`,`ai-rank-suite`)}),children:w.configured?(0,K.jsxs)(`div`,{className:`grid gap-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,K.jsx)(`div`,{className:`text-[12.5px] ars-mono`,style:{color:`var(--ars-ink-2)`},children:w.email}),(0,K.jsx)(A,{variant:`danger`,onClick:x,busy:i,children:b(`Remove key`,`ai-rank-suite`)})]}),(0,K.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,K.jsxs)(`div`,{className:`flex justify-between text-[12.5px]`,children:[(0,K.jsx)(`span`,{className:`font-medium`,children:b(`Daily quota`,`ai-rank-suite`)}),(0,K.jsx)(`span`,{className:`tabular-nums`,style:{color:`var(--ars-ink-2)`},children:S(b(`%1$s / %2$s URLs`,`ai-rank-suite`),w.used_today,w.quota)})]}),(0,K.jsx)(Pe,{value:ee})]}),(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(Ee,{checked:!!h.indexing_auto,onChange:e=>g({indexing_auto:e}),label:b(`Submit automatically when a page is published, updated or removed`,`ai-rank-suite`)}),(0,K.jsx)(`div`,{className:`flex gap-3 flex-wrap text-[13px]`,children:n.post_types.map(e=>(0,K.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:h.indexing_types.includes(e.slug),onChange:t=>g({indexing_types:t.target.checked?[...h.indexing_types,e.slug]:h.indexing_types.filter(t=>t!==e.slug)})}),e.label]},e.slug))}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(A,{onClick:_,busy:i,children:b(`Save`,`ai-rank-suite`)}),o&&(0,K.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]})]})]}),(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(`label`,{className:`font-medium`,children:b(`Submit a single URL now`,`ai-rank-suite`)}),(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.jsx)(`input`,{type:`text`,placeholder:`${window.airanksuiteData.homeUrl}my-page/`,value:u,onChange:e=>d(e.target.value)}),(0,K.jsx)(A,{onClick:C,busy:i,disabled:!u,children:b(`Submit`,`ai-rank-suite`)})]})]}),(0,K.jsx)(M,{children:b(`Google officially supports the Indexing API for job postings and livestream pages. Other page types are commonly submitted too, but Google does not guarantee they will be crawled faster.`,`ai-rank-suite`)})]}):(0,K.jsxs)(`div`,{className:`grid gap-3`,children:[(0,K.jsxs)(`ol`,{className:`m-0 pl-5 grid gap-2 text-[13px]`,children:[(0,K.jsxs)(`li`,{children:[b(`In`,`ai-rank-suite`),` `,(0,K.jsx)(`a`,{href:`https://console.cloud.google.com/iam-admin/serviceaccounts`,target:`_blank`,rel:`noreferrer`,children:b(`Google Cloud → Service Accounts`,`ai-rank-suite`)}),b(`, create a service account and download its`,`ai-rank-suite`),` `,(0,K.jsx)(`strong`,{children:b(`JSON key`,`ai-rank-suite`)}),`.`]}),(0,K.jsxs)(`li`,{children:[b(`Enable the`,`ai-rank-suite`),` `,(0,K.jsx)(`strong`,{children:b(`Indexing API`,`ai-rank-suite`)}),` `,b(`for that project (APIs & Services → Library).`,`ai-rank-suite`)]}),(0,K.jsxs)(`li`,{children:[b(`In`,`ai-rank-suite`),` `,(0,K.jsx)(`a`,{href:`https://search.google.com/search-console/users`,target:`_blank`,rel:`noreferrer`,children:b(`Search Console → Settings → Users and permissions`,`ai-rank-suite`)}),b(`, add the service account's email address as an`,`ai-rank-suite`),` `,(0,K.jsx)(`strong`,{children:b(`Owner`,`ai-rank-suite`)}),` `,b(`of this property.`,`ai-rank-suite`)]}),(0,K.jsx)(`li`,{children:b(`Upload the JSON key here:`,`ai-rank-suite`)})]}),(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(`textarea`,{className:`ars-input ars-mono`,rows:6,spellCheck:!1,value:f,onChange:e=>p(e.target.value),placeholder:`{
     81`})),hc,gc=o((()=>{hc=`<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><rect width="44" height="44" rx="10" fill="#a4286a"/><path d="M13 11h5.2l3.9 8.6L26 11h5.1l-7.3 14.2V33h-4.6V25.4L13 11Z" fill="#fff"/><circle cx="33" cy="12" r="3" fill="#77b227"/></svg>`})),_c,vc=o((()=>{_c=`<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><rect width="44" height="44" rx="10" fill="#5b43d6"/><path d="M28.6 17.4c-.5-2.4-2.6-3.6-5.6-3.6-3.4 0-5.6 1.7-5.6 4.3 0 2.2 1.4 3.4 4.6 4.2l2.6.6c2.1.5 2.9 1.2 2.9 2.4 0 1.5-1.5 2.5-3.9 2.5-2.5 0-4.1-1.1-4.5-3.1h-4.4c.4 4.2 3.6 6.6 8.8 6.6 5.3 0 8.5-2.5 8.5-6.4 0-3-1.7-4.7-5.6-5.6l-2.5-.6c-2-.5-2.9-1.1-2.9-2.2 0-1.3 1.3-2.1 3.3-2.1 2 0 3.3.9 3.6 2.6h4.3Z" fill="#fff"/></svg>`})),yc=c({VendorIcon:()=>bc,default:()=>Cc});function bc({id:e,label:t}){let n={rankmath:ac,aioseo:sc,seoframework:lc,seoultimate:dc,slimseo:pc,yoast:hc,seopress:_c}[e];if(n)return(0,Tc.jsx)(`span`,{"aria-hidden":!0,className:`ars-vendor-icon`,dangerouslySetInnerHTML:{__html:n}});let r={yoast:`#a4286a`,seopress:`#5b43d6`,smartcrawl:`#d63638`,wpmetaseo:`#c150ba`,squirrly:`#0e7c5a`,jetpack:`#069e08`,genesis:`#ff5000`,woocommerce:`#7f54b3`,redirection:`#2271b1`}[e]||`var(--ars-brand)`;return(0,Tc.jsx)(`span`,{"aria-hidden":!0,className:`ars-vendor-icon is-initial`,style:{background:r},children:(t||`?`).charAt(0)})}function xc(e){let t=[];return e.posts&&t.push(S(x(`%s page`,`%s pages`,e.posts,`ai-rank-suite`),Ec(e.posts))),e.terms&&t.push(S(x(`%s term`,`%s terms`,e.terms,`ai-rank-suite`),Ec(e.terms))),e.redirects&&t.push(S(x(`%s redirect`,`%s redirects`,e.redirects,`ai-rank-suite`),Ec(e.redirects))),e.settings&&t.push(b(`site-wide settings`,`ai-rank-suite`)),t.join(` · `)}function Sc(e={}){let t=(e,t)=>{switch(e){case`title`:return S(x(`%s title`,`%s titles`,t,`ai-rank-suite`),Ec(t));case`desc`:return S(x(`%s description`,`%s descriptions`,t,`ai-rank-suite`),Ec(t));case`keywords`:return S(x(`%s keyword set`,`%s keyword sets`,t,`ai-rank-suite`),Ec(t));case`canonical`:return S(x(`%s canonical`,`%s canonicals`,t,`ai-rank-suite`),Ec(t));case`robots`:return S(x(`%s robots directive`,`%s robots directives`,t,`ai-rank-suite`),Ec(t));case`social`:return S(x(`%s social card`,`%s social cards`,t,`ai-rank-suite`),Ec(t));case`breadcrumb`:return S(x(`%s breadcrumb title`,`%s breadcrumb titles`,t,`ai-rank-suite`),Ec(t));case`schema`:return S(x(`%s schema type`,`%s schema types`,t,`ai-rank-suite`),Ec(t));case`sitemap`:return S(x(`%s sitemap exclusion`,`%s sitemap exclusions`,t,`ai-rank-suite`),Ec(t));case`term_title`:return S(x(`%s term title`,`%s term titles`,t,`ai-rank-suite`),Ec(t));case`term_desc`:return S(x(`%s term description`,`%s term descriptions`,t,`ai-rank-suite`),Ec(t));case`term_canonical`:return S(x(`%s term canonical`,`%s term canonicals`,t,`ai-rank-suite`),Ec(t));case`term_robots`:return S(x(`%s term robots directive`,`%s term robots directives`,t,`ai-rank-suite`),Ec(t));case`term_social`:return S(x(`%s term social card`,`%s term social cards`,t,`ai-rank-suite`),Ec(t));case`redirects`:return S(x(`%s redirect`,`%s redirects`,t,`ai-rank-suite`),Ec(t));case`settings`:return S(x(`%s setting`,`%s settings`,t,`ai-rank-suite`),Ec(t));default:return`${Ec(t)} ${e}`}};return Object.entries(e).filter(([,e])=>e>0).map(([e,n])=>t(e,n)).join(` · `)}function Cc(){let[e,t]=(0,wc.useState)(null),[n,r]=(0,wc.useState)(!1),[i,a]=(0,wc.useState)({settings:!0,posts:!0,terms:!0,redirects:!0}),[o,s]=(0,wc.useState)(null),[c,l]=(0,wc.useState)(null),[u,d]=(0,wc.useState)(null),[f,p]=(0,wc.useState)(null),[m,h]=(0,wc.useState)(!1),[g,_]=(0,wc.useState)(null),v=(0,wc.useRef)(!1),y=(0,wc.useRef)(null),C=(0,wc.useRef)(null),w=(0,wc.useCallback)(()=>D.get(`/import/detect`).then(e=>{t(e),s(e.job&&e.job.state===`running`?e.job:null)}).catch(e=>d(e.message)),[]);(0,wc.useEffect)(()=>{w(),D.get(`/settings/backup`).then(p).catch(()=>{})},[w]);let T=async(e,t)=>{if(!v.current){v.current=!0,d(null),l({label:t,counts:{},done:!1});try{let n=await D.post(`/import/start`,e);s(n);let r=(n,r)=>({label:t,source:e.source||n.source||``,dryRun:!!e.dry_run,total:n.total||0,counts:n.counts||{},fields:n.fields||{},importId:n.import_id,errors:n.errors||[],done:r});for(;n.state===`running`;)n=await D.post(`/import/tick`,{}),s(n.state===`running`?n:null),l(r(n,n.state!==`running`)),(n.busy||n.error)&&await new Promise(e=>setTimeout(e,1500));l(r(n,!0))}catch(e){d(e.message)}finally{v.current=!1,s(null),w()}}},E=Object.entries(i).filter(([,e])=>e).map(([e])=>e),ee=(e,t)=>T({source:e,mode:n?`overwrite`:`fill`,dry_run:t,parts:E},b(t?`Preview`:`Import`,`ai-rank-suite`)),te=e=>T({undo:e},b(`Undo`,`ai-rank-suite`)),ne=async()=>{try{await D.post(`/import/cancel`,{})}catch(e){d(e.message)}},re=async e=>{d(null);try{let t=await e.text(),n=/\.json$/i.test(e.name)?`json`:`csv`,r=await D.post(`/import/preview-file`,{content:t,format:n});if(r.error){d(r.error);return}let i={};(r.columns||[]).forEach(e=>{let t=e.toLowerCase();/^(seo[_ ]?)?title$/.test(t)?i[e]=`title`:/desc/.test(t)?i[e]=`desc`:/keyword|keyphrase/.test(t)?i[e]=`keywords`:/canonical/.test(t)?i[e]=`canonical`:/robots|noindex/.test(t)?i[e]=`robots`:/og[_ ]?image/.test(t)?i[e]=`og_image`:/og[_ ]?title/.test(t)&&(i[e]=`og_title`)});let a=(r.columns||[]).includes(`id`)?`id`:(r.columns||[]).includes(`url`)?`url`:`slug`;_({name:e.name,content:t,format:n,...r,map:i,match:a})}catch(e){d(e.message)}finally{C.current&&(C.current.value=``)}},O=e=>T({source:`file`,mode:n?`overwrite`:`fill`,dry_run:e,file:{content:g.content,format:g.format,match:g.match,map:g.map}},b(e?`Preview`:`File import`,`ai-rank-suite`)),ie=(e,t)=>{let n=document.createElement(`a`);n.href=URL.createObjectURL(e),n.download=t,n.click(),URL.revokeObjectURL(n.href)},ae=()=>new Date().toISOString().slice(0,10),oe=async()=>{h(!0);try{let e=await D.get(`/settings/export`);ie(new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),`ai-rank-suite-settings-${ae()}.json`)}catch(e){d(e.message)}finally{h(!1)}},se=async()=>{h(!0);try{let e=[`id`,`title`,`url`,`seo_title`,`seo_desc`,`keyword`],t=[],n=0,r=null;for(let e=0;e<400;e++){let e=await D.get(`/content/csv?after=${n}&per_page=500`);if(t.push(...e.rows||[]),r=e.total??r,l({exported:t.length,of:r}),e.next===null||e.next===void 0)break;n=e.next}let i=e=>{let t=String(e??``).replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/g,``);return/^[=+\-@\t]/.test(t)&&(t=`'`+t),`"${t.replace(/"/g,`""`)}"`},a=[e.join(`,`),...t.map(t=>e.map(e=>i(t[e])).join(`,`))];ie(new Blob([``+a.join(`\r
     82`)],{type:`text/csv;charset=utf-8`}),`ai-rank-suite-seo-data-${ae()}.csv`),l({exported:t.length,of:r,done:!0})}catch(e){d(e.message)}finally{h(!1)}},ce=async e=>{h(!0),d(null);try{let t=JSON.parse(await e.text()),n=await D.post(`/settings/import`,{payload:t});l({settings:n.applied})}catch(e){d(e.message)}finally{h(!1),y.current&&(y.current.value=``)}},le=async()=>{h(!0);try{await D.post(`/settings/backup`),l({restored:!0})}catch(e){d(e.message)}finally{h(!1)}};if(!e)return(0,Tc.jsx)(Ce,{error:u});let ue=e.runs||[],de=e.conflicts||{};return(0,Tc.jsxs)(`div`,{className:`ars-page`,children:[u&&(0,Tc.jsx)(M,{tone:`serious`,children:u}),de.emitting&&(0,Tc.jsx)(M,{tone:`warning`,children:S(b(`%s is still active and writing the meta tags on your pages. Import your data first, check a few pages, then deactivate it — this plugin never switches another one off for you.`,`ai-rank-suite`),de.emitting)}),(0,Tc.jsxs)(k,{title:b(`Import from another SEO plugin`,`ai-rank-suite`),subtitle:b(`Titles, descriptions, keywords, canonicals, robots, social cards, term archives, templates and redirects. Nothing in the other plugin is read-only — it is never changed, and every import can be undone in one click.`,`ai-rank-suite`),action:(0,Tc.jsx)(Me,{checked:n,onChange:r,label:b(`Overwrite values we already have`,`ai-rank-suite`)}),children:[(0,Tc.jsx)(`div`,{className:`flex flex-wrap items-center gap-3 mb-3`,children:[[`settings`,b(`Site-wide settings and templates`,`ai-rank-suite`)],[`posts`,b(`Pages and posts`,`ai-rank-suite`)],[`terms`,b(`Category and tag archives`,`ai-rank-suite`)],[`redirects`,b(`Redirects`,`ai-rank-suite`)]].map(([e,t])=>(0,Tc.jsx)(Me,{checked:!!i[e],onChange:t=>a(n=>({...n,[e]:t})),label:t},e))}),(o||c)&&(()=>{let e=(o?o.counts:c?.counts)||{},t=(o?o.fields:c?.fields)||{},n=Number(o?.total||c?.total||0),i=Number(e.seen||0),a=Number(e.errors||0),s=Number(e.kept||0),l=!!o,u=n>0?Math.min(l?99:100,Math.round(i/n*100)):l?0:100,d=Math.max(0,n-i),f=Sc(t);return(0,Tc.jsx)(k,{className:`mb-3`,title:l?b(`Working…`,`ai-rank-suite`):c?.dryRun?b(`Preview finished — nothing was written`,`ai-rank-suite`):b(`Import complete`,`ai-rank-suite`),subtitle:S(b(`%1$s of %2$s records processed`,`ai-rank-suite`),Number(i).toLocaleString(),Number(n||i).toLocaleString())+(a?` · ${S(x(`%s failed`,`%s failed`,a,`ai-rank-suite`),Number(a).toLocaleString())}`:``),action:l?(0,Tc.jsx)(A,{variant:`ghost`,onClick:ne,children:b(`Cancel`,`ai-rank-suite`)}):(0,Tc.jsx)(j,{tone:a?`warning`:`good`,children:a?S(x(`%s failed`,`%s failed`,a,`ai-rank-suite`),Number(a).toLocaleString()):b(`Complete`,`ai-rank-suite`)}),children:(0,Tc.jsxs)(`div`,{className:`grid gap-2`,children:[(0,Tc.jsx)(Be,{value:u}),(0,Tc.jsxs)(`div`,{className:`flex justify-between text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[(0,Tc.jsxs)(`span`,{children:[u,`%`]}),(0,Tc.jsx)(`span`,{children:l?S(b(`%s remaining`,`ai-rank-suite`),Number(d).toLocaleString()):f||b(`Nothing needed changing.`,`ai-rank-suite`)})]}),!l&&f&&(0,Tc.jsx)(`div`,{className:`text-[13px]`,style:{color:`var(--ars-ink)`},children:f}),!l&&s>0&&(0,Tc.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Tc.jsx)(`span`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:S(x(`%s value was left alone because this plugin already holds one for that field.`,`%s values were left alone because this plugin already holds one for those fields.`,s,`ai-rank-suite`),Number(s).toLocaleString())}),(0,Tc.jsx)(A,{onClick:()=>{r(!0),T({source:c?.source||``,mode:`overwrite`,dry_run:!1,parts:E},b(`Import`,`ai-rank-suite`))},children:b(`Import again and overwrite them`,`ai-rank-suite`)})]}),!l&&e.unmatched?(0,Tc.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:S(x(`%s row could not be matched to a page.`,`%s rows could not be matched to a page.`,e.unmatched,`ai-rank-suite`),Number(e.unmatched).toLocaleString())}):null,(c?.errors||[]).length>0&&(0,Tc.jsx)(`ul`,{className:`m-0 mt-1 pl-5 text-[12px]`,style:{color:`var(--ars-serious)`},children:c.errors.slice(0,8).map((e,t)=>(0,Tc.jsxs)(`li`,{children:[(0,Tc.jsx)(`code`,{children:e.what}),` — `,e.message]},t))}),!l&&c?.importId&&!c?.dryRun&&(0,Tc.jsxs)(`div`,{className:`flex items-center gap-2 mt-1`,children:[(0,Tc.jsx)(A,{variant:`ghost`,onClick:()=>te(c.importId),children:b(`Undo this import`,`ai-rank-suite`)}),(0,Tc.jsx)(`span`,{className:`t-caption`,children:b(`Run the content analysis afterwards so the scores use the imported data.`,`ai-rank-suite`)})]})]})})})(),(e.sources||[]).some(e=>!!xc(e))?null:(0,Tc.jsx)(`p`,{className:`m-0 mb-3 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`No other SEO plugin, and no data left behind by one, was found on this site. When one is installed its card appears here with what it holds.`,`ai-rank-suite`)}),(0,Tc.jsx)(`div`,{className:`grid gap-3`,style:{gridTemplateColumns:`repeat(auto-fill, minmax(260px, 1fr))`},children:(e.sources||[]).filter(e=>!!xc(e)).map(e=>{let t=xc(e),n=!t;return(0,Tc.jsxs)(`div`,{className:`ars-vendor-card`,children:[(0,Tc.jsx)(bc,{id:e.id,label:e.label}),(0,Tc.jsxs)(`div`,{className:`font-semibold text-[13.5px] flex items-center justify-center gap-2`,children:[e.label,e.active&&(0,Tc.jsx)(j,{tone:`brand`,children:b(`Active`,`ai-rank-suite`)})]}),(0,Tc.jsx)(`div`,{className:`text-[12px] text-center`,style:{color:`var(--ars-ink-2)`},children:n?e.active?b(`Active, but nothing is stored here to import — this plugin only saves values somebody typed by hand.`,`ai-rank-suite`):b(`Supported. Nothing from it on this site — no plugin, no leftover data.`,`ai-rank-suite`):t}),(0,Tc.jsxs)(`div`,{className:`flex items-center justify-center gap-2`,children:[(0,Tc.jsx)(A,{variant:n?`ghost`:`primary`,disabled:n||!!o,onClick:()=>ee(e.id,!1),children:b(n?`Nothing to import`:`Import`,`ai-rank-suite`)}),!n&&(0,Tc.jsx)(A,{variant:`ghost`,disabled:!!o,onClick:()=>ee(e.id,!0),title:b(`Run without writing anything`,`ai-rank-suite`),children:b(`Preview`,`ai-rank-suite`)})]})]},e.id)})}),(e.sources||[]).some(e=>!xc(e))&&(0,Tc.jsxs)(`div`,{className:`mt-3`,children:[(0,Tc.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide mb-2`,style:{color:`var(--ars-ink-3)`},children:b(`Also supported, nothing from them on this site`,`ai-rank-suite`)}),(0,Tc.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(e.sources||[]).filter(e=>!xc(e)).map(e=>(0,Tc.jsxs)(`span`,{className:`inline-flex items-center gap-2 pr-3 pl-1 py-1 ars-r-md`,style:{border:`1px solid var(--ars-border)`,background:`var(--ars-surface)`},title:e.active?b(`Active, but nothing is stored here to import.`,`ai-rank-suite`):b(`Supported. Nothing from it on this site.`,`ai-rank-suite`),children:[(0,Tc.jsx)(`span`,{className:`ars-vendor-icon is-small`,children:(0,Tc.jsx)(bc,{id:e.id,label:e.label})}),(0,Tc.jsx)(`span`,{className:`text-[12.5px]`,children:e.label}),e.active&&(0,Tc.jsx)(j,{tone:`brand`,children:b(`Active`,`ai-rank-suite`)})]},e.id))})]}),(0,Tc.jsx)(`p`,{className:`m-0 mt-3 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Template variables such as %%title%% are translated into this plugin’s own. A variable nothing here can resolve is dropped rather than printed into your pages. Run the content analysis afterwards so the scores reflect the imported data.`,`ai-rank-suite`)})]}),(0,Tc.jsxs)(k,{title:b(`Import a spreadsheet`,`ai-rank-suite`),subtitle:b(`A CSV or JSON file with one row per page — titles and descriptions written elsewhere, or an export from this plugin edited and brought back.`,`ai-rank-suite`),children:[(0,Tc.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Tc.jsx)(A,{variant:`ghost`,onClick:()=>C.current?.click(),disabled:!!o,children:g?g.name:b(`Choose a CSV or JSON file`,`ai-rank-suite`)}),(0,Tc.jsx)(`input`,{ref:C,type:`file`,accept:`.csv,.json,text/csv,application/json`,style:{display:`none`},onChange:e=>e.target.files?.[0]&&re(e.target.files[0])}),g&&(0,Tc.jsx)(j,{tone:`neutral`,children:S(x(`%s row`,`%s rows`,g.rows,`ai-rank-suite`),Ec(g.rows))})]}),g&&(0,Tc.jsxs)(`div`,{className:`mt-3 grid gap-3`,children:[(0,Tc.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-[12.5px]`,children:[(0,Tc.jsx)(`span`,{children:b(`Match rows to pages by`,`ai-rank-suite`)}),(0,Tc.jsx)(`select`,{style:{width:`auto`},value:g.match,onChange:e=>_({...g,match:e.target.value}),children:(g.columns||[]).map(e=>(0,Tc.jsx)(`option`,{value:e,children:e},e))})]}),(0,Tc.jsx)(ke,{hint:b(`Every column you map is written; the rest are ignored.`,`ai-rank-suite`),children:b(`Columns`,`ai-rank-suite`)}),(0,Tc.jsx)(`div`,{className:`grid gap-2`,style:{gridTemplateColumns:`repeat(auto-fill, minmax(260px, 1fr))`},children:(g.columns||[]).map(t=>(0,Tc.jsxs)(`label`,{className:`flex items-center justify-between gap-2 text-[12.5px]`,children:[(0,Tc.jsx)(`code`,{children:t}),(0,Tc.jsxs)(`select`,{className:`ars-input`,style:{width:`auto`},value:g.map[t]||``,onChange:e=>_({...g,map:{...g.map,[t]:e.target.value}}),children:[(0,Tc.jsx)(`option`,{value:``,children:b(`— ignore —`,`ai-rank-suite`)}),Object.entries(e.fields||{}).map(([e,t])=>(0,Tc.jsx)(`option`,{value:e,children:t},e))]})]},t))}),(0,Tc.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Tc.jsx)(A,{disabled:!!o,onClick:()=>O(!1),children:b(`Import the file`,`ai-rank-suite`)}),(0,Tc.jsx)(A,{variant:`ghost`,disabled:!!o,onClick:()=>O(!0),children:b(`Preview`,`ai-rank-suite`)})]})]})]}),ue.length>0&&(0,Tc.jsx)(k,{title:b(`Import history`,`ai-rank-suite`),subtitle:b(`Every run, what it changed, and a way back.`,`ai-rank-suite`),children:(0,Tc.jsx)(`div`,{className:`grid gap-2`,children:ue.map(t=>(0,Tc.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 py-2`,style:{borderBottom:`1px solid var(--ars-line)`},children:[(0,Tc.jsxs)(`div`,{className:`text-[12.5px]`,children:[(0,Tc.jsxs)(`div`,{className:`font-semibold`,children:[t.source===`file`?b(`Spreadsheet`,`ai-rank-suite`):(e.sources||[]).find(e=>e.id===t.source)?.label||t.source,t.dry_run?` · ${b(`preview only`,`ai-rank-suite`)}`:``,t.mode===`overwrite`?` · ${b(`overwrite`,`ai-rank-suite`)}`:``]}),(0,Tc.jsxs)(`div`,{style:{color:`var(--ars-ink-2)`},children:[Dc(t.started),` · `,Sc(t.fields)||b(`nothing changed`,`ai-rank-suite`),t.counts?.errors?` · ${S(x(`%s error`,`%s errors`,t.counts.errors,`ai-rank-suite`),Ec(t.counts.errors))}`:``]}),Array.isArray(t.errors)&&t.errors.length>0&&(0,Tc.jsx)(Oe,{title:b(`What failed`,`ai-rank-suite`),children:(0,Tc.jsx)(`ul`,{className:`m-0 pl-4 text-[12px]`,children:t.errors.map((e,t)=>(0,Tc.jsxs)(`li`,{children:[(0,Tc.jsx)(`code`,{children:e.what}),` — `,e.message]},t))})})]}),(0,Tc.jsx)(`div`,{className:`flex items-center gap-2`,children:t.undone?(0,Tc.jsx)(j,{tone:`neutral`,children:b(`Undone`,`ai-rank-suite`)}):t.undoable?(0,Tc.jsx)(A,{variant:`ghost`,disabled:!!o,onClick:()=>te(t.import_id),children:b(`Undo this import`,`ai-rank-suite`)}):(0,Tc.jsx)(j,{tone:`neutral`,children:b(`Preview`,`ai-rank-suite`)})})]},t.import_id))})}),(0,Tc.jsxs)(k,{title:b(`Export & backup`,`ai-rank-suite`),subtitle:b(`Take your configuration and your SEO data with you — to another site, a spreadsheet, or a rollback`,`ai-rank-suite`),children:[(0,Tc.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,Tc.jsx)(A,{onClick:se,busy:m,children:c?.exported!==void 0&&!c.done?S(b(`Exporting… %s`,`ai-rank-suite`),Ec(c.exported)):b(`Export SEO data (CSV)`,`ai-rank-suite`)}),c?.done&&c?.exported!==void 0&&(0,Tc.jsx)(j,{tone:`good`,children:S(b(`%s rows exported`,`ai-rank-suite`),Ec(c.exported))}),(0,Tc.jsx)(A,{variant:`ghost`,onClick:oe,busy:m,children:b(`Export settings (JSON)`,`ai-rank-suite`)}),(0,Tc.jsx)(A,{variant:`ghost`,onClick:()=>y.current?.click(),busy:m,children:b(`Import settings file`,`ai-rank-suite`)}),(0,Tc.jsx)(`input`,{ref:y,type:`file`,accept:`application/json,.json`,style:{display:`none`},onChange:e=>e.target.files?.[0]&&ce(e.target.files[0])}),f?.exists&&(0,Tc.jsx)(A,{variant:`ghost`,onClick:le,busy:m,children:b(`Restore pre-update backup`,`ai-rank-suite`)}),c?.settings!==void 0&&(0,Tc.jsx)(j,{tone:`good`,children:S(b(`%s settings applied`,`ai-rank-suite`),Ec(c.settings))}),c?.restored&&(0,Tc.jsx)(j,{tone:`good`,children:b(`Restored`,`ai-rank-suite`)})]}),(0,Tc.jsxs)(`p`,{className:`m-0 mt-3 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[b(`API keys and license data are never included in an export.`,`ai-rank-suite`),f?.exists&&` ${S(b(`A backup from version %s was taken automatically before the last update.`,`ai-rank-suite`),f.from)}`]})]})]})}var wc,Tc,Ec,Dc,Oc=o((()=>{wc=u(f(),1),C(),O(),dt(),oc(),cc(),uc(),fc(),mc(),gc(),vc(),Tc=_e(),Ec=e=>Number(e||0).toLocaleString(),Dc=e=>e?new Date(e*1e3).toLocaleString():``})),kc=c({default:()=>Ic});function Ac({tone:e=`info`,children:t}){return(0,W.jsx)(`div`,{className:`ars-wiz-callout${e===`warning`?` is-warning`:``}${e===`success`?` is-success`:``}`,children:t})}function jc({children:e}){return(0,W.jsx)(`div`,{style:{fontSize:11.5,fontWeight:700,letterSpacing:`0.07em`,textTransform:`uppercase`,color:`var(--ars-ink)`,margin:`22px 0 8px`},children:e})}function Mc({children:e}){return(0,W.jsx)(`p`,{style:{margin:`7px 0 0`,fontSize:12.5,lineHeight:1.55,color:`var(--ars-ink-3)`,maxWidth:`80ch`},children:e})}function Nc({checked:e,onChange:t,slug:n,label:r,sub:i,disabled:a=!1,example:o}){return(0,W.jsxs)(`div`,{className:`ars-wiz-check`,children:[(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:e,disabled:a,onChange:e=>t?.(e.target.checked)}),(0,W.jsxs)(`span`,{children:[r[0],` `,(0,W.jsxs)(Wc,{children:[`[`,n,`]`]}),` `,r[1]]})]}),(i||o)&&(0,W.jsxs)(`div`,{className:`ars-wiz-check-sub`,children:[i&&(0,W.jsx)(`div`,{children:i}),o&&(0,W.jsxs)(`div`,{children:[b(`Example:`,`ai-rank-suite`),` `,o]})]})]})}function Pc({title:e,lede:t,children:n,footer:r}){return(0,W.jsxs)(`div`,{className:`ars-wiz-card`,children:[(0,W.jsx)(`h1`,{children:e}),t&&(0,W.jsx)(`p`,{className:`ars-wiz-lede`,children:t}),(0,W.jsx)(`div`,{className:`ars-wiz-body`,children:n}),r&&(0,W.jsx)(`div`,{className:`ars-wiz-footer`,children:r})]})}function Fc({parts:e,onChange:t,resolve:n}){let r=Gc(),[i,a]=(0,Lc.useState)(``),o=()=>{let n=i.trim();n&&t([...e,{text:n}]),a(``)};return(0,W.jsxs)(`div`,{children:[(0,W.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:7,border:`1px solid var(--ars-border)`,borderRadius:8,padding:`9px 12px`,background:`var(--ars-surface)`,minHeight:44,boxSizing:`border-box`},children:[e.map((n,i)=>(0,W.jsxs)(`span`,{style:n.token?{display:`inline-flex`,alignItems:`center`,gap:6,background:`var(--ars-brand-tonal)`,color:`var(--ars-brand-tonal-ink, var(--ars-brand))`,borderRadius:6,padding:`3.5px 9px`,fontSize:12.5,fontWeight:600}:{fontSize:13,color:`var(--ars-ink)`},children:[n.token?r[n.token]||n.token:n.text,(0,W.jsx)(`button`,{type:`button`,onClick:()=>t(e.filter((e,t)=>t!==i)),"aria-label":b(`Remove`,`ai-rank-suite`),style:{border:0,background:`none`,cursor:`pointer`,color:`inherit`,opacity:.65,padding:0,marginLeft:n.token?0:4,lineHeight:1,fontSize:13},children:`×`})]},i)),(0,W.jsx)(`input`,{type:`text`,value:i,onChange:e=>a(e.target.value),onBlur:o,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),o())},placeholder:e.length?``:b(`Type text or add a variable below…`,`ai-rank-suite`),style:{flex:`1 1 120px`,minWidth:100,border:0,outline:`none`,background:`none`,font:`inherit`,fontSize:13,boxShadow:`none`,padding:4}}),e.length>0&&(0,W.jsx)(`button`,{type:`button`,onClick:()=>t([]),"aria-label":b(`Clear`,`ai-rank-suite`),style:{border:0,background:`none`,cursor:`pointer`,color:`var(--ars-ink-3)`,fontSize:15,padding:2},children:`×`})]}),(0,W.jsxs)(`div`,{style:{margin:`8px 0 10px`,fontSize:12.5,color:`var(--ars-ink-2)`},children:[(0,W.jsx)(`strong`,{children:b(`Preview:`,`ai-rank-suite`)}),` `,(0,W.jsx)(`em`,{children:n(qc(e))||b(`(empty — the default template applies)`,`ai-rank-suite`)})]}),(0,W.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:8},children:Object.entries(r).map(([n,r])=>{let i=e.some(e=>e.token===n);return(0,W.jsxs)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,style:{fontSize:12.5,paddingTop:5,paddingBottom:5},onClick:()=>!i&&t([...e,{token:n}]),disabled:i,children:[i?`✓`:`+`,` `,r]},n)})})]})}function Ic({onDone:e}){let t=(0,Lc.useMemo)(()=>[{id:`welcome`,label:b(`Welcome`,`ai-rank-suite`),subs:[{id:`start`,label:b(`Get started`,`ai-rank-suite`)},{id:`import-config`,label:b(`Import configuration`,`ai-rank-suite`)},{id:`import-meta`,label:b(`Import metadata`,`ai-rank-suite`)}]},{id:`site`,label:b(`Your site`,`ai-rank-suite`),subs:[{id:`general`,label:b(`General`,`ai-rank-suite`)},{id:`social`,label:b(`Social accounts`,`ai-rank-suite`)}]},{id:`indexing`,label:b(`Indexing`,`ai-rank-suite`),subs:[{id:`idx-types`,label:b(`Post Types`,`ai-rank-suite`)},{id:`idx-archives`,label:b(`Archives`,`ai-rank-suite`)},{id:`idx-taxonomies`,label:b(`Taxonomies`,`ai-rank-suite`)}]},{id:`google`,label:b(`Google`,`ai-rank-suite`),subs:[{id:`google-connect`,label:b(`Search Console & Analytics`,`ai-rank-suite`)}]},{id:`advanced`,label:b(`Advanced options`,`ai-rank-suite`),subs:[{id:`adv`,label:b(`Advanced`,`ai-rank-suite`)},{id:`metabox`,label:b(`SEO Metabox`,`ai-rank-suite`)}]},{id:`ready`,label:b(`Ready!`,`ai-rank-suite`),subs:[]}],[]),n=(0,Lc.useMemo)(()=>{let e=[];return t.forEach((t,n)=>{if(!t.subs.length){e.push({gi:n,si:-1,group:t,sub:null});return}t.subs.forEach((r,i)=>e.push({gi:n,si:i,group:t,sub:r}))}),e},[t]),[r,i]=(0,Lc.useState)(0),[a,o]=(0,Lc.useState)(!1),[s,c]=(0,Lc.useState)(null),l=n[r],[u,d]=(0,Lc.useState)({}),f=(e,t)=>d(n=>({...n,[e]:t})),p=e=>{c(null),i(Math.max(0,Math.min(n.length-1,e)))},m=()=>p(r+1),h=()=>p(r-1),g=async e=>{o(!0),c(null);try{await e()}catch(e){c(e.message)}finally{o(!1)}},[_,v]=(0,Lc.useState)(null),[y,C]=(0,Lc.useState)(null),[w,T]=(0,Lc.useState)(!1),[E,ee]=(0,Lc.useState)(null),[te,re]=(0,Lc.useState)(null),[O,ie]=(0,Lc.useState)(null),[ae,oe]=(0,Lc.useState)(null),[se,ce]=(0,Lc.useState)(null),[le,ue]=(0,Lc.useState)(null),[de,fe]=(0,Lc.useState)([]),[pe,me]=(0,Lc.useState)(``),[he,ge]=(0,Lc.useState)(`Organization`),[_e,ve]=(0,Lc.useState)({}),[ye,k]=(0,Lc.useState)(``),[be,xe]=(0,Lc.useState)([]),[Se,Ce]=(0,Lc.useState)([]),[we,Te]=(0,Lc.useState)(!0),[Ee,De]=(0,Lc.useState)(!1),[Oe,ke]=(0,Lc.useState)(!0),[Ae,Me]=(0,Lc.useState)(!0),[j,Ne]=(0,Lc.useState)(null),[Pe,Fe]=(0,Lc.useState)(!0),[Ie,Le]=(0,Lc.useState)(null),[Re,ze]=(0,Lc.useState)(!0),[Be,Ve]=(0,Lc.useState)(`normal`),[He,Ue]=(0,Lc.useState)(null),[We,Ge]=(0,Lc.useState)(null),[Ke,qe]=(0,Lc.useState)(null),[Je,Ye]=(0,Lc.useState)(!1),[Xe,Ze]=(0,Lc.useState)(null);(0,Lc.useEffect)(()=>{D.get(`/import/sources`).then(e=>{let t=e.sources||[];ee(t);let n=t.find(e=>e.active||e.posts>0||e.terms>0);n&&re(n.id)}).catch(()=>ee([])),D.get(`/settings/seo`).then(e=>{oe(e),fe(Kc(e.settings.home_title)),xe((e.settings.noindex_types||[]).slice()),Ce((e.settings.noindex_taxonomies||[]).slice()),Te(!!e.settings.date_noindex),De(!!e.settings.author_noindex),ke(!!e.settings.attachment_redirect),Me(!!e.settings.noindex_empty_terms)}).catch(()=>oe({settings:{},post_types:[],taxonomies:[]})),D.get(`/settings/schema`).then(e=>{ce(e),ge(e.settings.org_type||`Organization`),me(e.settings.identity?.alt_name||``)}).catch(()=>ce(null)),D.get(`/settings/social`).then(e=>{ue(e),ve({...e.settings.profiles||{}})}).catch(()=>ue(null)),D.get(`/settings/image-seo`).then(e=>{Ne(e),Fe(!!e.settings.auto_alt)}).catch(()=>Ne(null)),D.get(`/settings/editor`).then(e=>{Le(e),ze(!!e.settings.metabox_enabled),Ve(e.settings.metabox_position||`normal`),Ue((e.settings.metabox_types||[]).length?e.settings.metabox_types.slice():null)}).catch(()=>Le(null)),D.get(`/setup/status`).then(Ze).catch(()=>Ze({})),D.get(`/gsc/status`).then(Ge).catch(()=>Ge(null))},[]);let Qe=async()=>{Ye(!0);try{let e=await D.get(`/gsc/signin-url`);window.location.href=e.url}catch{window.location.hash=`/search-console`}},$e=async()=>{Ye(!0);try{let e=await D.post(`/gsc/auto-configure`,{});qe(e)}catch{qe({property:``,ga4_property:``,ga4_measurement:``})}Ye(!1)},et=e=>String(e||``).replace(/%sitename%/g,ne.siteName||``).replace(/%sep%/g,ae?.settings?.separator||`–`).replace(/%tagline%/g,ne.tagline||``).replace(/%currentyear%/g,String(new Date().getFullYear())).replace(/\s{2,}/g,` `).trim(),tt=(t=!1)=>g(async()=>{await D.post(`/core/onboarding`,{done:!0}),e(),t&&(window.location.hash=`/ai-wizard`)}),nt=e=>{c(null),C(null);let t=new FileReader;t.onload=()=>{try{let n=JSON.parse(String(t.result));if(n?.format!==`ai-rank-suite/1`){v(null),c(b(`This file is not an AI Rank Suite settings export.`,`ai-rank-suite`));return}v({name:e.name,payload:n})}catch{v(null),c(b(`This file is not valid JSON.`,`ai-rank-suite`))}},t.readAsText(e)},rt=()=>g(async()=>{let e=await D.post(`/settings/import`,{payload:_.payload});C(e),f(`config`,S(x(`%d settings group applied from your export file`,`%d settings groups applied from your export file`,e.applied,`ai-rank-suite`),e.applied))}),it=()=>g(async()=>{let e=await D.post(`/import/start`,{source:te,mode:`fill`,parts:[`posts`,`terms`,`redirects`]});for(let t=0;t<600&&e&&e.state===`running`;t++)e=await D.post(`/import/tick`,{});let t=e&&e.counts||{},n=(t.posts??0)+(t.terms??0),r=t.redirects??0,i=(E||[]).find(e=>e.id===te)?.label||te;ie({label:i,total:n,redirects:r}),n>0&&f(`meta`,S(x(`%1$d page migrated from %2$s`,`%1$d pages migrated from %2$s`,n,`ai-rank-suite`),n,i))}),at=()=>g(async()=>{let e=qc(de);await D.put(`/settings/seo`,{home_title:e||`%sitename% %sep% %tagline%`}),se&&await D.put(`/settings/schema`,{org_type:he,identity:{...se.settings.identity||{},alt_name:pe.trim()}}),f(`general`,b(`Home title and site identity are configured`,`ai-rank-suite`)),m()}),ot=()=>g(async()=>{let e={};Object.entries(_e).forEach(([t,n])=>{let r=String(n||``).trim();r&&(e[t]=r)});let t=[];ye.split(`
     83`).map(e=>e.trim()).filter(Boolean).forEach(n=>{/tiktok\.com/i.test(n)&&!e.tiktok?e.tiktok=n:/wikipedia\.org/i.test(n)&&!e.wikipedia?e.wikipedia=n:t.push(n)});let n={profiles:e},r=String(e.x||``).match(/(?:x|twitter)\.com\/@?([A-Za-z0-9_]{2,})/);if(r&&(n.tw_site=`@`+r[1]),e.facebook&&(n.fb_page=e.facebook),await D.put(`/settings/social`,n),t.length&&se){let e=(se.settings.identity?.same_as||[]).map(String);await D.put(`/settings/schema`,{identity:{...se.settings.identity||{},same_as:[...new Set([...e,...t])]}})}let i=Object.keys(e).length+t.length;i>0&&f(`social`,S(x(`%d social profile linked for the Knowledge Graph`,`%d social profiles linked for the Knowledge Graph`,i,`ai-rank-suite`),i)),m()}),N=()=>g(async()=>{await D.put(`/settings/seo`,{noindex_types:be}),m()}),st=()=>g(async()=>{await D.put(`/settings/seo`,{date_noindex:we,author_noindex:Ee}),m()}),ct=()=>g(async()=>{await D.put(`/settings/seo`,{noindex_taxonomies:Se});let e=[];be.length&&e.push(S(x(`%d post type`,`%d post types`,be.length,`ai-rank-suite`),be.length)),Se.length&&e.push(S(x(`%d taxonomy`,`%d taxonomies`,Se.length,`ai-rank-suite`),Se.length)),f(`indexing`,e.length?S(b(`Indexing rules set — %s excluded from search results`,`ai-rank-suite`),e.join(`, `)):b(`Indexing rules reviewed for post types, archives and taxonomies`,`ai-rank-suite`)),m()}),lt=()=>g(async()=>{await D.put(`/settings/seo`,{attachment_redirect:Oe,noindex_empty_terms:Ae}),j&&await D.put(`/settings/image-seo`,{auto_alt:Pe}),f(`advanced`,b(`Advanced options set — attachments, image alt texts, empty terms`,`ai-rank-suite`)),m()}),ut=()=>g(async()=>{Ie&&(await D.put(`/settings/editor`,{metabox_enabled:Re,metabox_position:Be,metabox_types:He===null?[]:He}),f(`metabox`,b(Re?`The SEO metabox is active in the editor`:`The SEO metabox is switched off`,`ai-rank-suite`))),m()}),dt=(0,W.jsxs)(`nav`,{className:`ars-wiz-rail`,"aria-label":b(`Setup steps`,`ai-rank-suite`),children:[(0,W.jsx)(`h2`,{className:`ars-wiz-rail-title`,children:l.group.label}),(0,W.jsx)(`div`,{className:`ars-wiz-steps`,children:t.map((e,t)=>{let i=n.findIndex(e=>e.gi===t),a=l.gi===t,o=l.gi>t;return(0,W.jsxs)(Lc.Fragment,{children:[(0,W.jsxs)(`button`,{type:`button`,className:`ars-wiz-step${a?` is-active`:``}${o?` is-done`:``}`,onClick:()=>t<=l.gi?p(i):null,disabled:t>l.gi,children:[(0,W.jsx)(`span`,{className:`ars-wiz-num`,children:o?(0,W.jsx)(Rc,{}):t+1}),(0,W.jsx)(`span`,{children:e.label})]}),a&&e.subs.length>0&&(0,W.jsx)(`div`,{className:`ars-wiz-subs`,children:e.subs.map((e,i)=>{let a=n.findIndex(e=>e.gi===t&&e.si===i);return(0,W.jsx)(`button`,{type:`button`,className:`ars-wiz-sub${l.si===i?` is-active`:``}`,onClick:()=>a<=r?p(a):null,children:e.label},e.id)})})]},e.id)})})]}),ft=(0,W.jsxs)(`button`,{type:`button`,className:`ars-wiz-back`,onClick:h,children:[(0,W.jsx)(zc,{}),b(`Back`,`ai-rank-suite`)]}),pt=e=>(0,W.jsx)(A,{onClick:e,busy:a,children:b(`Save and continue`,`ai-rank-suite`)}),mt=null,ht=l.sub?l.sub.id:l.group.id,gt=String(ne.homeUrl||``).replace(/\/$/,``);if(ht===`start`&&(mt=(0,W.jsxs)(Pc,{title:b(`Welcome to AI Rank Suite`,`ai-rank-suite`),lede:b(`This wizard takes about 3 minutes. By the end, your site is set up for AI search — ChatGPT, Claude, Gemini, Perplexity — and classic Google SEO alike.`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`button`,{type:`button`,className:`ars-wiz-skip-link`,style:{marginRight:`auto`,paddingLeft:0},onClick:()=>tt(!1),children:b(`Skip for now`,`ai-rank-suite`)}),(0,W.jsxs)(A,{onClick:m,children:[b(`Start setup`,`ai-rank-suite`),`\xA0`,(0,W.jsx)(Bc,{})]})]}),children:[(0,W.jsxs)(`div`,{className:`ars-wiz-hero`,children:[(0,W.jsxs)(`div`,{className:`ars-wiz-hero-card`,children:[(0,W.jsx)(`div`,{className:`ars-wiz-quote-mark`,"aria-hidden":!0,children:(0,W.jsx)(`svg`,{width:`30`,height:`24`,viewBox:`0 0 30 24`,fill:`currentColor`,children:(0,W.jsx)(`path`,{d:`M0 24V13.7C0 5.9 4.6 1.2 12.2 0l1.4 4.4c-4.3 1-6.4 3.2-6.6 6.9H13V24H0Zm17 0V13.7C17 5.9 21.6 1.2 29.2 0l1.4 4.4c-4.3 1-6.4 3.2-6.6 6.9H30V24H17Z`,transform:`scale(0.95)`})})}),(0,W.jsx)(`p`,{className:`ars-wiz-quote`,children:b(`AI assistants answer questions directly instead of showing links. The sites they quote are the sites they can read, understand and verify — that is exactly what this setup makes yours.`,`ai-rank-suite`)}),(0,W.jsx)(`div`,{className:`ars-wiz-quote-by`,children:b(`Why this wizard exists`,`ai-rank-suite`)}),(0,W.jsx)(`div`,{className:`ars-wiz-quote-role`,children:b(`Generative engine optimization, done once and done right`,`ai-rank-suite`)})]}),(0,W.jsx)(`div`,{className:`ars-wiz-hero-card ars-wiz-counts`,children:[[`77`,b(`structured data types, emitted automatically`,`ai-rank-suite`),(0,W.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,children:(0,W.jsx)(`path`,{d:`m8 8-4 4 4 4m8-8 4 4-4 4M14 5l-4 14`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})},`i`)],[`31`,b(`AI crawlers under your control`,`ai-rank-suite`),(0,W.jsxs)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,children:[(0,W.jsx)(`rect`,{x:`5`,y:`8`,width:`14`,height:`11`,rx:`2`,stroke:`currentColor`,strokeWidth:`2`}),(0,W.jsx)(`path`,{d:`M12 8V4m-7 9H3m18 0h-2M9 13.5h.01M15 13.5h.01`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]},`i`)],[`6`,b(`AI engines tracked for mentions of you`,`ai-rank-suite`),(0,W.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,children:(0,W.jsx)(`path`,{d:`M4 19c2-6 5-9 8-9m0 0c3 0 6 3 8 9M12 10V4m0 0-2.5 2.5M12 4l2.5 2.5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})},`i`)]].map(([e,t,n])=>(0,W.jsxs)(`div`,{className:`ars-wiz-count`,children:[(0,W.jsx)(`span`,{className:`ars-wiz-count-icon`,children:n}),(0,W.jsxs)(`span`,{children:[(0,W.jsx)(`div`,{className:`ars-wiz-count-num`,children:e}),(0,W.jsx)(`div`,{className:`ars-wiz-count-label`,children:t})]})]},t))})]}),(0,W.jsx)(`div`,{className:`ars-wiz-strip`,children:(0,W.jsxs)(`div`,{className:`ars-wiz-strip-text`,children:[(0,W.jsxs)(`div`,{className:`ars-wiz-strip-title`,children:[(0,W.jsx)(`svg`,{width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M12 2l2.4 7.2H22l-6 4.6 2.3 7.2-6.3-4.5-6.3 4.5L8 13.8 2 9.2h7.6L12 2z`,fill:`currentColor`})}),b(`Connect an AI engine after setup`,`ai-rank-suite`)]}),(0,W.jsx)(`div`,{className:`ars-wiz-strip-sub`,children:b(`Bring an OpenAI, Anthropic or Google key and the suite writes meta descriptions, answers FAQs and simulates AI answers about your site. The last step offers it.`,`ai-rank-suite`)})]})})]})),ht===`import-config`&&(mt=(0,W.jsxs)(Pc,{title:b(`Import an existing configuration`,`ai-rank-suite`),lede:b(`Already configured AI Rank Suite on another site? Upload the JSON file you exported from it to apply the exact same settings here, then skip the rest of the setup.`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,(0,W.jsx)(A,{variant:`ghost`,onClick:m,children:b(`Skip this step`,`ai-rank-suite`)}),(0,W.jsxs)(A,{onClick:rt,busy:a,disabled:!_||!!y,children:[b(`Import configuration`,`ai-rank-suite`),`\xA0`,(0,W.jsx)(Bc,{})]})]}),children:[(0,W.jsxs)(`div`,{className:`ars-wiz-drop${w?` is-over`:``}`,onDragOver:e=>{e.preventDefault(),T(!0)},onDragLeave:()=>T(!1),onDrop:e=>{e.preventDefault(),T(!1);let t=e.dataTransfer.files?.[0];t&&nt(t)},children:[(0,W.jsx)(`span`,{className:`ars-wiz-drop-icon`,children:(0,W.jsx)(Vc,{})}),(0,W.jsx)(`div`,{className:`ars-wiz-drop-title`,children:b(`Drag and drop your configuration file here`,`ai-rank-suite`)}),(0,W.jsx)(`div`,{className:`ars-wiz-drop-sub`,children:b(`JSON file only — the one Settings → Export writes.`,`ai-rank-suite`)}),(0,W.jsx)(`div`,{className:`ars-wiz-drop-sub`,children:b(`or select it from your computer:`,`ai-rank-suite`)}),(0,W.jsx)(`input`,{type:`file`,accept:`.json,application/json`,onChange:e=>{let t=e.target.files?.[0];t&&nt(t)}}),_&&!y&&(0,W.jsx)(`div`,{className:`ars-wiz-drop-file`,children:S(b(`Ready to import: %s`,`ai-rank-suite`),_.name)})]}),y?(0,W.jsx)(M,{tone:`good`,children:S(x(`%d settings group applied. Continue to review the rest, or skip ahead — your configuration is live.`,`%d settings groups applied. Continue to review the rest, or skip ahead — your configuration is live.`,y.applied,`ai-rank-suite`),y.applied)}):(0,W.jsx)(Ac,{tone:`warning`,children:(0,W.jsx)(`p`,{children:b(`Importing replaces your current settings (titles, llms.txt, sitemap, schema, advanced options…). Post and term metadata are not affected. API keys and licenses never travel in export files.`,`ai-rank-suite`)})})]})),ht===`import-meta`){let e=e=>e.active||e.posts>0||e.terms>0||e.redirects>0||e.settings;mt=(0,W.jsxs)(Pc,{title:b(`Migrate your SEO metadata to AI Rank Suite`,`ai-rank-suite`),lede:b(`Select your previous SEO plugin to bring its titles, descriptions, canonicals, robots rules and redirects along. Nothing on the other plugin is changed or deleted.`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,(0,W.jsx)(A,{variant:`ghost`,onClick:m,children:b(`Skip import for now`,`ai-rank-suite`)}),(0,W.jsxs)(A,{onClick:it,busy:a,disabled:!te||!!O,children:[b(`Migrate now`,`ai-rank-suite`),`\xA0`,(0,W.jsx)(Bc,{})]})]}),children:[E===null&&(0,W.jsx)(`div`,{style:{display:`grid`,placeItems:`center`,minHeight:200},children:(0,W.jsx)(je,{})}),E!==null&&(0,W.jsx)(`div`,{className:`ars-wiz-sources`,children:E.map(t=>(0,W.jsxs)(`button`,{type:`button`,className:`ars-wiz-source${te===t.id?` is-selected`:``}`,onClick:()=>e(t)&&re(t.id),disabled:!e(t),"aria-pressed":te===t.id,children:[(0,W.jsx)(bc,{id:t.id,label:t.label}),(0,W.jsxs)(`span`,{children:[(0,W.jsx)(`span`,{className:`ars-wiz-source-name`,children:t.label}),(0,W.jsx)(`span`,{className:`ars-wiz-source-sub`,style:{display:`block`},children:e(t)?[t.posts>0?S(x(`%d page`,`%d pages`,t.posts,`ai-rank-suite`),t.posts):null,t.redirects>0?S(x(`%d redirect`,`%d redirects`,t.redirects,`ai-rank-suite`),t.redirects):null,t.active?b(`active`,`ai-rank-suite`):null].filter(Boolean).join(` · `)||b(`settings found`,`ai-rank-suite`):b(`not detected`,`ai-rank-suite`)})]})]},t.id))}),E!==null&&!E.some(e)&&(0,W.jsx)(Ac,{children:(0,W.jsx)(`p`,{children:b(`No other SEO plugin left data on this site — nothing to migrate. Skip ahead.`,`ai-rank-suite`)})}),O&&(0,W.jsx)(M,{tone:O.total>0?`good`:`info`,children:O.total>0?O.redirects>0?S(x(`Migrated %1$d page and %2$d redirects from %3$s.`,`Migrated %1$d pages and %2$d redirects from %3$s.`,O.total,`ai-rank-suite`),O.total,O.redirects,O.label):S(x(`Migrated %1$d page from %2$s.`,`Migrated %1$d pages from %2$s.`,O.total,`ai-rank-suite`),O.total,O.label):b(`Nothing left to migrate — every page that had data already carries it here.`,`ai-rank-suite`)}),O&&O.total>0&&(0,W.jsx)(Ac,{children:(0,W.jsx)(`p`,{children:b(`Once everything looks right, deactivate the old plugin so only one of them writes your SEO tags.`,`ai-rank-suite`)})})]})}if(ht===`general`){let e=se?.types&&typeof se.types==`object`?se.types:null;mt=(0,W.jsxs)(Pc,{title:b(`Tell us more about your site`,`ai-rank-suite`),lede:b(`These fields set your home page title and your Google Knowledge Graph — how search engines and AI assistants name your site.`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,pt(at)]}),children:[(0,W.jsx)(jc,{children:b(`Site title`,`ai-rank-suite`)}),(0,W.jsx)(Fc,{parts:de,onChange:fe,resolve:et}),(0,W.jsx)(Mc,{children:b(`This template builds your home page title tag. Variables resolve live — the preview above is exactly what Google shows.`,`ai-rank-suite`)}),(0,W.jsx)(jc,{children:b(`Alternative site title`,`ai-rank-suite`)}),(0,W.jsx)(`input`,{type:`text`,value:pe,onChange:e=>me(e.target.value),placeholder:b(`e.g. a common acronym or short name`,`ai-rank-suite`),style:{width:`100%`,boxSizing:`border-box`}}),(0,W.jsx)(Mc,{children:b(`The alternate name of the website — for example a commonly recognized acronym or shorter name. It becomes the alternateName in your structured data.`,`ai-rank-suite`)}),(0,W.jsx)(jc,{children:b(`Person or organization`,`ai-rank-suite`)}),(0,W.jsx)(`select`,{value:he,onChange:e=>ge(e.target.value),style:{width:`100%`,boxSizing:`border-box`},children:e?Object.entries(e).map(([e,t])=>(0,W.jsx)(`optgroup`,{label:e,children:Object.entries(t).map(([e,t])=>(0,W.jsx)(`option`,{value:e,children:t},e))},e)):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`option`,{value:`Organization`,children:b(`Organization`,`ai-rank-suite`)}),(0,W.jsx)(`option`,{value:`Person`,children:b(`Person`,`ai-rank-suite`)})]})}),(0,W.jsx)(Mc,{children:b(`Choose "Person / sole trader" for a personal site, or the closest organization type for a company — it decides whether your Knowledge Graph entity is a Person or an Organization.`,`ai-rank-suite`)})]})}if(ht===`social`&&(mt=(0,W.jsxs)(Pc,{title:b(`Link your site to your social networks`,`ai-rank-suite`),lede:b(`These profiles feed the sameAs of your structured data — how search engines and AI assistants confirm which accounts are really yours.`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,pt(ot)]}),children:[[[`facebook`,`Facebook`,`https://facebook.com/your-page`],[`x`,`X`,`https://x.com/your-handle`],[`pinterest`,`Pinterest`,`https://pinterest.com/your-profile`],[`instagram`,`Instagram`,`https://instagram.com/your-profile`],[`youtube`,`YouTube`,`https://youtube.com/@your-channel`],[`linkedin`,`LinkedIn`,`https://linkedin.com/company/your-page`]].map(([e,t,n])=>(0,W.jsxs)(`div`,{children:[(0,W.jsx)(jc,{children:t}),(0,W.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,W.jsx)(`span`,{style:{color:`var(--ars-brand)`,display:`grid`,placeItems:`center`,width:24},"aria-hidden":!0,children:Uc[e]}),(0,W.jsx)(`input`,{type:`url`,value:_e[e]||``,onChange:t=>ve({..._e,[e]:t.target.value}),placeholder:n,style:{flex:1}})]})]},e)),(0,W.jsx)(jc,{children:b(`Additional accounts`,`ai-rank-suite`)}),(0,W.jsx)(`textarea`,{rows:3,value:ye,onChange:e=>k(e.target.value),placeholder:b(`Enter 1 URL per line (e.g. https://example.com/my-profile)`,`ai-rank-suite`),style:{width:`100%`,boxSizing:`border-box`}}),(0,W.jsx)(Mc,{children:b(`TikTok, Wikipedia, a directory entry, a GitHub org — anything that verifiably belongs to you strengthens the entity.`,`ai-rank-suite`)})]})),ht===`idx-types`&&(mt=(0,W.jsxs)(Pc,{title:b(`Which content types should be excluded from search engine results?`,`ai-rank-suite`),lede:b(`Check the boxes below to disable indexing for selected content types. They will not appear in search engine results (noindex).`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,pt(N)]}),children:[(0,W.jsxs)(Ac,{children:[(0,W.jsx)(`p`,{children:b(`Custom post types are a content type in WordPress. Post and Page are the default post types.`,`ai-rank-suite`)}),(0,W.jsx)(`p`,{children:b(`You can create your own type of content like "product" or "business": these are custom post types.`,`ai-rank-suite`)})]}),(0,W.jsx)(`div`,{className:`ars-wiz-checks`,children:(ae?.post_types||[]).map(e=>(0,W.jsx)(Nc,{slug:e.name,label:[b(`Exclude`,`ai-rank-suite`),b(`from search engine`,`ai-rank-suite`)],checked:be.includes(e.name),onChange:t=>xe(t?[...be,e.name]:be.filter(t=>t!==e.name))},e.name))})]})),ht===`idx-archives`&&(mt=(0,W.jsxs)(Pc,{title:b(`Which archives should be excluded from search engine results?`,`ai-rank-suite`),lede:b(`Check the boxes below to disable indexing for selected content types. They will not appear in search engine results (noindex).`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,pt(st)]}),children:[(0,W.jsx)(Ac,{children:(0,W.jsx)(`p`,{children:b(`Archive pages are automatically generated by WordPress. They group specific content such as your latest articles, a product category or your content by author or date.`,`ai-rank-suite`)})}),(0,W.jsxs)(`div`,{className:`ars-wiz-checks`,children:[(0,W.jsx)(Nc,{slug:`date`,label:[b(`Exclude`,`ai-rank-suite`),b(`archives from search engine`,`ai-rank-suite`)],checked:we,onChange:Te,example:`${gt}/2025/01/01/`}),(0,W.jsx)(Nc,{slug:`search`,label:[b(`Exclude`,`ai-rank-suite`),b(`results from search engine`,`ai-rank-suite`)],checked:!0,disabled:!0,sub:b(`Always on — internal search results are one query away from infinite duplicate pages.`,`ai-rank-suite`),example:`${gt}/?s=keyword`}),(0,W.jsx)(Nc,{slug:`author`,label:[b(`Exclude`,`ai-rank-suite`),b(`archives from search engine`,`ai-rank-suite`)],checked:Ee,onChange:De,sub:b(`You only have one author on your site? Check this option to avoid duplicate content.`,`ai-rank-suite`),example:`${gt}/author/jane-doe/`})]})]})),ht===`idx-taxonomies`&&(mt=(0,W.jsxs)(Pc,{title:b(`Which taxonomies should be excluded from search engine results?`,`ai-rank-suite`),lede:b(`Check the boxes below to disable indexing for selected content types. They will not appear in search engine results (noindex).`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,pt(ct)]}),children:[(0,W.jsxs)(Ac,{children:[(0,W.jsx)(`p`,{children:b(`Taxonomies are the method of classifying content and data in WordPress. When you use a taxonomy you’re grouping similar things together. Categories and Tags are the default taxonomies.`,`ai-rank-suite`)}),(0,W.jsx)(`p`,{children:b(`You can add your own taxonomies like "product categories": these are called custom taxonomies.`,`ai-rank-suite`)})]}),(0,W.jsx)(`div`,{className:`ars-wiz-checks`,children:(ae?.taxonomies||[]).map(e=>(0,W.jsx)(Nc,{slug:e.name,label:[b(`Exclude`,`ai-rank-suite`),b(`from search engine`,`ai-rank-suite`)],checked:Se.includes(e.name),onChange:t=>Ce(t?[...Se,e.name]:Se.filter(t=>t!==e.name)),sub:e.name===`post_tag`?b(`We recommend excluding tags from search results, as they often create duplicate content.`,`ai-rank-suite`):null},e.name))})]})),ht===`google-connect`){let e=!!We?.connected;mt=(0,W.jsxs)(Pc,{title:b(`Connect Google — one click, no setup`,`ai-rank-suite`),lede:b(`Google already measures your site: Search Console knows the queries you appear for, Analytics knows your visitors. One sign-in brings both into this dashboard.`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,e?(0,W.jsx)(A,{onClick:m,children:b(`Continue`,`ai-rank-suite`)}):(0,W.jsx)(A,{variant:`ghost`,onClick:m,children:b(`Skip — connect later`,`ai-rank-suite`)})]}),children:[!e&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(Ac,{children:[(0,W.jsx)(`p`,{children:b(`In plain terms: you click the button, a Google window opens, you choose the Google account you use for this website and press "Allow". That is the whole setup — we find the matching Search Console property and Analytics account for you.`,`ai-rank-suite`)}),(0,W.jsx)(`p`,{style:{marginTop:8},children:b(`We can only ever read your statistics — never change anything in your Google account. You can disconnect with one click at any time.`,`ai-rank-suite`)})]}),(0,W.jsx)(`div`,{style:{marginTop:16},children:(0,W.jsx)(A,{onClick:Qe,busy:Je,children:b(`Sign in with Google`,`ai-rank-suite`)})}),(0,W.jsx)(`p`,{className:`t-caption`,style:{marginTop:10},children:b(`No Google account for this site yet? Skip this step — everything else works without it.`,`ai-rank-suite`)})]}),e&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Ac,{tone:`success`,children:(0,W.jsx)(`p`,{children:b(`Google is connected.`,`ai-rank-suite`)})}),!Ke&&(0,W.jsx)(`div`,{style:{marginTop:14},children:(0,W.jsx)(A,{onClick:$e,busy:Je,children:b(`Find my accounts automatically`,`ai-rank-suite`)})}),Ke&&(0,W.jsxs)(`div`,{style:{marginTop:14},children:[(0,W.jsx)(`p`,{className:`m-0`,children:Ke.property?S(b(`Search Console: %s`,`ai-rank-suite`),Ke.property):b(`Search Console: no property for this domain was found in that account — pick one on the Search Console screen.`,`ai-rank-suite`)}),(0,W.jsx)(`p`,{className:`m-0`,style:{marginTop:6},children:Ke.ga4_property?S(b(`Analytics: property %1$s (measurement id %2$s)`,`ai-rank-suite`),Ke.ga4_property,Ke.ga4_measurement||`—`):b(`Analytics: no GA4 property points at this site — you can pick one on the Analytics screen, or keep working without it.`,`ai-rank-suite`)})]})]})]})}if(ht===`adv`&&(mt=(0,W.jsx)(Pc,{title:b(`Advanced SEO options`,`ai-rank-suite`),lede:b(`Optimize your site’s SEO with these advanced settings.`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,pt(lt)]}),children:(0,W.jsxs)(`div`,{className:`ars-wiz-checks`,children:[(0,W.jsxs)(`div`,{className:`ars-wiz-check`,children:[(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:Oe,onChange:e=>ke(e.target.checked)}),(0,W.jsx)(`span`,{children:b(`Redirect attachment pages to their parent or file URL`,`ai-rank-suite`)})]}),(0,W.jsx)(`div`,{className:`ars-wiz-check-sub`,children:b(`An attachment page is a near-empty page wrapping one image — thin content in the index. This sends visitors and crawlers to the real content instead.`,`ai-rank-suite`)})]}),(0,W.jsxs)(`div`,{className:`ars-wiz-check`,children:[(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:Pe,onChange:e=>Fe(e.target.checked),disabled:!j}),(0,W.jsx)(`span`,{children:b(`Automatically set alt text on images that have none`,`ai-rank-suite`)})]}),(0,W.jsx)(`div`,{className:`ars-wiz-check-sub`,children:b(`Images without alt text are invisible to image search and to screen readers. This fills the gap from the file name and title when a page renders.`,`ai-rank-suite`)})]}),(0,W.jsxs)(`div`,{className:`ars-wiz-check`,children:[(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:Ae,onChange:e=>Me(e.target.checked)}),(0,W.jsx)(`span`,{children:b(`Keep empty categories and tags out of the index`,`ai-rank-suite`)})]}),(0,W.jsx)(`div`,{className:`ars-wiz-check-sub`,children:b(`A term with no posts is an empty page. Indexing it is asking search engines to rate a blank.`,`ai-rank-suite`)})]})]})})),ht===`metabox`){let e=Ie?.post_types||[],t=He===null?e.map(e=>e.name):He;mt=(0,W.jsxs)(Pc,{title:b(`The SEO metabox in your editor`,`ai-rank-suite`),lede:b(`The metabox is the SEO panel inside the post editor: title, description, score and checks, right where you write. Decide where it lives.`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,pt(ut)]}),children:[(0,W.jsx)(`div`,{className:`ars-wiz-checks`,children:(0,W.jsxs)(`div`,{className:`ars-wiz-check`,children:[(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:Re,onChange:e=>ze(e.target.checked),disabled:!Ie}),(0,W.jsx)(`span`,{children:b(`Show the SEO metabox in the editor`,`ai-rank-suite`)})]}),(0,W.jsx)(`div`,{className:`ars-wiz-check-sub`,children:b(`The block editor also gets the AI Rank sidebar either way — the metabox is the full panel below the content.`,`ai-rank-suite`)})]})}),Re&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(jc,{children:b(`Position`,`ai-rank-suite`)}),(0,W.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(220px, 1fr))`,gap:12,maxWidth:560},children:[[`normal`,b(`Below the editor`,`ai-rank-suite`),b(`Full width — room for the score, checks and previews.`,`ai-rank-suite`)],[`side`,b(`Side column`,`ai-rank-suite`),b(`Compact, always in view next to the content.`,`ai-rank-suite`)]].map(([e,t,n])=>(0,W.jsxs)(`button`,{type:`button`,className:`ars-wiz-source${Be===e?` is-selected`:``}`,style:{minHeight:0,alignItems:`flex-start`,flexDirection:`column`,gap:3},onClick:()=>Ve(e),"aria-pressed":Be===e,children:[(0,W.jsx)(`span`,{className:`ars-wiz-source-name`,children:t}),(0,W.jsx)(`span`,{className:`ars-wiz-source-sub`,children:n})]},e))}),(0,W.jsx)(jc,{children:b(`Post types`,`ai-rank-suite`)}),(0,W.jsx)(`div`,{className:`ars-wiz-checks`,children:e.map(n=>(0,W.jsx)(`div`,{className:`ars-wiz-check`,style:{padding:`5px 4px`},children:(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:t.includes(n.name),onChange:r=>{let i=r.target.checked?[...new Set([...t,n.name])]:t.filter(e=>e!==n.name);Ue(i.length===e.length?null:i)}}),(0,W.jsxs)(`span`,{children:[n.label,` `,(0,W.jsxs)(Wc,{children:[`[`,n.name,`]`]})]})]})},n.name))}),(0,W.jsx)(Mc,{children:b(`All types checked means new post types are covered automatically.`,`ai-rank-suite`)})]})]})}if(ht===`ready`){let e=[[!0,b(`llms.txt tells AI crawlers what your site is about`,`ai-rank-suite`)],[!0,b(`XML sitemaps are published for Google and Bing`,`ai-rank-suite`)],[!0,b(`Structured data is emitted for every page — 77 types available`,`ai-rank-suite`)],[!!Xe?.indexnow,b(`IndexNow pushes new content to search engines within minutes`,`ai-rank-suite`)],[!!Xe?.ai,b(`An AI engine is connected for writing and answer simulation`,`ai-rank-suite`)],...Object.values(u).map(e=>[!0,e])];mt=(0,W.jsxs)(Pc,{title:b(`Congratulations! Your site is set up for AI search.`,`ai-rank-suite`),lede:b(`AI Rank Suite has applied its key optimizations. Here is what is now working for you — and the one step that unlocks the rest.`,`ai-rank-suite`),footer:(0,W.jsxs)(W.Fragment,{children:[ft,(0,W.jsx)(A,{variant:`ghost`,onClick:()=>tt(!1),busy:a,children:b(`Go to dashboard`,`ai-rank-suite`)})]}),children:[(0,W.jsx)(`div`,{className:`ars-wiz-rosette`,"aria-hidden":!0,children:(0,W.jsxs)(`span`,{children:[b(`Setup complete`,`ai-rank-suite`),(0,W.jsx)(`br`,{}),b(`AI ready`,`ai-rank-suite`)]})}),(0,W.jsx)(`div`,{className:`ars-wiz-donelist`,children:e.map(([e,t],n)=>(0,W.jsxs)(`div`,{className:`ars-wiz-done${e?``:` is-off`}`,children:[(0,W.jsx)(`span`,{className:`ars-wiz-done-check`,children:e?(0,W.jsx)(Hc,{}):`·`}),(0,W.jsx)(`span`,{children:t})]},n))}),Xe?.other_seo_plugin&&(0,W.jsx)(Ac,{tone:`warning`,children:(0,W.jsx)(`p`,{children:S(b(`%s is still active and also writes SEO tags. Deactivate it once the migration looks right — two plugins writing the same tags is the one setup Google punishes.`,`ai-rank-suite`),Xe.other_seo_plugin)})}),(0,W.jsxs)(`div`,{className:`ars-wiz-strip`,children:[(0,W.jsxs)(`div`,{className:`ars-wiz-strip-text`,children:[(0,W.jsxs)(`div`,{className:`ars-wiz-strip-title`,children:[(0,W.jsx)(`svg`,{width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M12 2l2.4 7.2H22l-6 4.6 2.3 7.2-6.3-4.5-6.3 4.5L8 13.8 2 9.2h7.6L12 2z`,fill:`currentColor`})}),b(`Next step: connect an AI engine`,`ai-rank-suite`)]}),(0,W.jsx)(`div`,{className:`ars-wiz-strip-sub`,children:b(`One API key unlocks writing, the autopilot and answer simulations — the AI setup reads a description of your business and proposes the rest.`,`ai-rank-suite`)})]}),(0,W.jsxs)(A,{onClick:()=>tt(!0),busy:a,children:[b(`Start AI setup`,`ai-rank-suite`),`\xA0`,(0,W.jsx)(Bc,{})]})]})]})}return(0,W.jsxs)(`div`,{className:`ars-wiz`,style:{fontFamily:`'Google Sans Text', Roboto, sans-serif`},children:[dt,(0,W.jsxs)(`div`,{children:[mt,s&&(0,W.jsx)(`div`,{style:{maxWidth:1160,marginTop:14},children:(0,W.jsx)(M,{tone:`serious`,children:s})})]})]})}var Lc,W,Rc,zc,Bc,Vc,Hc,Uc,Wc,Gc,Kc,qc,Jc=o((()=>{Lc=u(f(),1),C(),O(),dt(),Oc(),W=_e(),Rc=()=>(0,W.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M20 6 9 17l-5-5`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`})}),zc=()=>(0,W.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M15 18l-6-6 6-6`,stroke:`currentColor`,strokeWidth:`2.4`,strokeLinecap:`round`,strokeLinejoin:`round`})}),Bc=()=>(0,W.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M5 12h14m-6-6 6 6-6 6`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`})}),Vc=()=>(0,W.jsxs)(`svg`,{width:`30`,height:`30`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:[(0,W.jsx)(`path`,{d:`M12 16V4m0 0 5 5m-5-5-5 5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M4 20h16`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]}),Hc=()=>(0,W.jsx)(`svg`,{width:`17`,height:`17`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M20 6 9 17l-5-5`,stroke:`currentColor`,strokeWidth:`2.6`,strokeLinecap:`round`,strokeLinejoin:`round`})}),Uc={facebook:(0,W.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M13.5 21v-7.2h2.4l.4-2.9h-2.8V9.1c0-.8.3-1.4 1.5-1.4h1.4V5.1c-.3 0-1.1-.1-2-.1-2.1 0-3.5 1.2-3.5 3.6v2.3H8.5v2.9h2.4V21h2.6Z`})}),x:(0,W.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M17.8 4h2.9l-6.4 7.3L21.8 21h-5.9l-4.6-6-5.3 6H3.2l6.9-7.8L2.8 4h6l4.2 5.5L17.8 4Zm-1 15.2h1.6L7.9 5.7H6.2l10.6 13.5Z`})}),pinterest:(0,W.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M12 3a9 9 0 0 0-3.3 17.4c-.1-.7-.2-1.9 0-2.7l1.2-5s-.3-.6-.3-1.5c0-1.4.8-2.4 1.8-2.4.9 0 1.3.6 1.3 1.4 0 .9-.5 2.2-.8 3.4-.2 1 .5 1.8 1.5 1.8 1.8 0 3.1-1.9 3.1-4.6 0-2.4-1.7-4-4.2-4a4.4 4.4 0 0 0-4.6 4.4c0 .9.3 1.8.8 2.3l.1.4-.3 1.2c0 .2-.2.2-.4.1-1.2-.6-2-2.4-2-3.9 0-3.2 2.3-6.1 6.7-6.1 3.5 0 6.2 2.5 6.2 5.8 0 3.5-2.2 6.3-5.2 6.3-1 0-2-.5-2.3-1.1l-.6 2.4c-.2.9-.8 1.9-1.2 2.6A9 9 0 1 0 12 3Z`})}),instagram:(0,W.jsxs)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.9`,"aria-hidden":!0,children:[(0,W.jsx)(`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`4.5`}),(0,W.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3.6`}),(0,W.jsx)(`circle`,{cx:`17`,cy:`7`,r:`1.15`,fill:`currentColor`,stroke:`none`})]}),youtube:(0,W.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M21.3 8s-.2-1.4-.8-2c-.7-.8-1.6-.8-2-.9C15.9 5 12 5 12 5s-3.9 0-6.5.2c-.4 0-1.3 0-2 .8-.6.6-.8 2-.8 2S2.5 9.6 2.5 11.3v1.5c0 1.6.2 3.3.2 3.3s.2 1.4.8 2c.7.8 1.7.7 2.1.8 1.6.2 6.4.2 6.4.2s3.9 0 6.5-.2c.4 0 1.3-.1 2-.9.6-.6.8-2 .8-2s.2-1.6.2-3.3v-1.5c0-1.6-.2-3.2-.2-3.2ZM10 14.6V9.4l5.2 2.6L10 14.6Z`})}),linkedin:(0,W.jsx)(`svg`,{width:`19`,height:`19`,viewBox:`0 0 24 24`,fill:`currentColor`,"aria-hidden":!0,children:(0,W.jsx)(`path`,{d:`M6.3 8.6H3.5V21h2.8V8.6ZM4.9 3.5a1.7 1.7 0 1 0 0 3.4 1.7 1.7 0 0 0 0-3.4ZM20.5 14.1c0-3.2-1.7-4.7-4-4.7-1.8 0-2.6 1-3.1 1.7V8.6H10.6V21h2.8v-6.7c0-1.2.9-2.2 2.1-2.2s2.2.9 2.2 2.3V21h2.8v-6.9Z`})})},Wc=({children:e})=>(0,W.jsx)(`span`,{className:`ars-wiz-code`,children:e}),Gc=()=>({"%sitename%":b(`Site title`,`ai-rank-suite`),"%sep%":b(`Separator`,`ai-rank-suite`),"%tagline%":b(`Tagline`,`ai-rank-suite`),"%currentyear%":b(`Current year`,`ai-rank-suite`)}),Kc=e=>String(e||``).split(/(%[a-z_]+%)/).map(e=>e.trim()).filter(Boolean).map(e=>/^%[a-z_]+%$/.test(e)?{token:e}:{text:e}),qc=e=>e.map(e=>e.token?e.token:e.text).join(` `)})),Yc=c({default:()=>Qc});function Xc({title:e,lede:t,children:n}){return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`h2`,{className:`m-0 text-[17px] font-medium`,children:e}),t&&(0,G.jsx)(`p`,{className:`m-0 text-[13.5px]`,style:{color:`var(--ars-ink-2)`},children:t}),n]})}function Zc({action:e,label:t,openCount:n,onDone:r}){let[i,a]=(0,$c.useState)(null),[o,s]=(0,$c.useState)(!1),[c,l]=(0,$c.useState)(null),u=async()=>{s(!0),l(null);try{let t=await D.post(`/bulk/start`,{action:e,scope:`missing`});for(a(t),t=await D.post(`/bulk/tick`),a(t);t.state===`running`;)t=await D.post(`/bulk/tick`),a(t);r(t)}catch(e){/nothing to process/i.test(e.message)?(a({state:`done`,done:0,total:0,progress:100}),r({state:`done`,done:0})):l(e.message)}finally{s(!1)}},d=i?.state===`done`;return(0,G.jsxs)(`div`,{className:`grid gap-3`,children:[c&&(0,G.jsx)(M,{tone:`serious`,children:c}),i&&(0,G.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,G.jsxs)(`div`,{className:`flex justify-between text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:[(0,G.jsxs)(`span`,{children:[b(d?`Finished`:`Working…`,`ai-rank-suite`),` `,(i.done||0).toLocaleString(),i.total?` ${b(`of`,`ai-rank-suite`)} ${i.total.toLocaleString()}`:``,i.failed?` · ${i.failed} ${b(`failed`,`ai-rank-suite`)}`:``]}),(0,G.jsxs)(`span`,{className:`tabular-nums`,children:[i.progress??0,`%`]})]}),(0,G.jsx)(Be,{value:i.progress??0})]}),!d&&(0,G.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[(0,G.jsx)(A,{onClick:u,busy:o,children:t}),typeof n==`number`&&(0,G.jsxs)(`span`,{className:`t-caption`,children:[n.toLocaleString(),` `,b(`pages waiting`,`ai-rank-suite`)]})]}),d&&(0,G.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Done`,`ai-rank-suite`)]})]})}function Qc({onDone:e}){let[t,n]=(0,$c.useState)(0),[r,i]=(0,$c.useState)(!1),[a,o]=(0,$c.useState)(null),[s,c]=(0,$c.useState)(!1),[l,u]=(0,$c.useState)(null),[d,f]=(0,$c.useState)(null),[p,m]=(0,$c.useState)(null),[h,g]=(0,$c.useState)(``),[_,v]=(0,$c.useState)(!1),[y,x]=(0,$c.useState)(null),[S,C]=(0,$c.useState)(null),[w,T]=(0,$c.useState)([]),[E,ee]=(0,$c.useState)(null),[te,ne]=(0,$c.useState)([]),[re,O]=(0,$c.useState)(null),[ie,ae]=(0,$c.useState)(null),[oe,se]=(0,$c.useState)(!1),[ce,le]=(0,$c.useState)({});(0,$c.useEffect)(()=>{Promise.allSettled([D.get(`/settings/ai`),D.get(`/ai/capabilities`),D.get(`/ai/knowledge`),D.get(`/rank/keywords`),D.get(`/settings/ai-visibility`),D.get(`/ai/routing`)]).then(([e,t,n,r,a,o])=>{e.status===`fulfilled`&&u(e.value),t.status===`fulfilled`&&f(t.value),n.status===`fulfilled`&&(m(n.value),g(n.value.custom||``)),r.status===`fulfilled`&&T((r.value.keywords||[]).map(e=>e.keyword)),a.status===`fulfilled`&&(ee(a.value),ne(a.value.settings?.prompts||a.value.prompts||[])),o.status===`fulfilled`&&ae(o.value),i(!0)})},[]);let ue=el[t].id,de=()=>{o(null),n(e=>Math.min(el.length-1,e+1))},fe=()=>n(e=>Math.max(0,e-1)),pe=async e=>{c(!0),o(null);try{await e()}catch(e){o(e.message)}finally{c(!1)}},me=e=>{let t=(d?.rows||[]).find(t=>t.id===e);return t&&typeof t.open==`number`?t.open:null},he=()=>D.get(`/ai/capabilities`).then(f).catch(()=>{});if(!r)return(0,G.jsx)(`div`,{className:`min-h-[60vh] grid place-items-center`,children:(0,G.jsx)(je,{})});let ge=!!l?.has_key;return(0,G.jsx)(`div`,{className:`min-h-[80vh] grid place-items-center py-6 pr-5`,children:(0,G.jsxs)(`div`,{className:`ars-app w-full max-w-[720px] overflow-hidden`,children:[(0,G.jsxs)(`div`,{className:`px-8 pt-8 pb-6`,style:{background:`var(--ars-canvas)`},children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,G.jsx)(`span`,{className:`ars-brand-mark shrink-0`,style:{width:44,height:44,borderRadius:12},"aria-hidden":!0,children:(0,G.jsx)(Et,{width:24,height:24,style:{color:`#fff`}})}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`text-[22px] font-medium leading-tight`,children:(0,G.jsx)(`span`,{className:`ars-grad-text`,children:b(`AI setup`,`ai-rank-suite`)})}),(0,G.jsx)(`div`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Put the AI to work on this site — it types, you choose. Every step can be skipped.`,`ai-rank-suite`)})]})]}),(0,G.jsx)(`div`,{className:`flex gap-1.5 mt-6`,role:`progressbar`,"aria-valuenow":t+1,"aria-valuemin":1,"aria-valuemax":el.length,children:el.map((e,n)=>(0,G.jsx)(`div`,{className:`h-1 flex-1 ars-r-sm`,style:{background:n<=t?`var(--ars-brand)`:`var(--ars-track)`,transition:`background 300ms cubic-bezier(0.2,0,0,1)`},title:e.label},e.id))}),(0,G.jsxs)(`div`,{className:`t-caption mt-1.5`,children:[b(`Step`,`ai-rank-suite`),` `,t+1,` `,b(`of`,`ai-rank-suite`),` `,el.length,` · `,el[t].label]})]}),(0,G.jsxs)(`div`,{className:`px-8 py-6 grid gap-4`,style:{background:`var(--ars-surface)`},children:[ue===`engine`&&(0,G.jsx)(Xc,{title:b(ge?`Your engine is connected`:`Connect an engine first`,`ai-rank-suite`),lede:ge?`${l.key_hint?`${b(`Key`,`ai-rank-suite`)} ${l.key_hint} · `:``}${b(`One test call proves it works before anything else in this wizard spends a token.`,`ai-rank-suite`)}`:b(`Everything after this step needs a model. Add a key on the AI Engine screen, then come back here.`,`ai-rank-suite`),children:ge?(0,G.jsxs)(`div`,{className:`grid gap-3`,children:[y&&(0,G.jsx)(M,{tone:y.ok?`good`:`serious`,children:y.message}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,G.jsx)(A,{variant:`ghost`,busy:s,onClick:()=>pe(async()=>{try{let e=await D.post(`/ai/verify`,{});x({ok:!0,message:e.message||b(`The engine answered.`,`ai-rank-suite`)})}catch(e){x({ok:!1,message:e.message})}}),children:b(`Test the connection`,`ai-rank-suite`)}),(0,G.jsx)(A,{onClick:de,children:b(`Continue`,`ai-rank-suite`)})]})]}):(0,G.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,G.jsx)(A,{onClick:()=>{try{window.sessionStorage.setItem(`airanksuite-ai-wizard-return`,`1`)}catch{}window.location.hash=`/ai`},children:b(`Open AI Engine`,`ai-rank-suite`)}),(0,G.jsx)(A,{variant:`ghost`,onClick:de,children:b(`Skip for now`,`ai-rank-suite`)})]})}),ue===`brief`&&(0,G.jsxs)(Xc,{title:b(`Brief the AI about your business`,`ai-rank-suite`),lede:b(`The fixed template already tells every engine what this plugin is, what GEO means, the house rules and the facts WordPress knows about the site. This is the part only you can write — it is sent with every call, on every engine.`,`ai-rank-suite`),children:[(0,G.jsx)(`textarea`,{rows:10,value:h,placeholder:p?.template||``,onChange:e=>{g(e.target.value),v(!1)},style:{fontFamily:`inherit`,fontSize:13,lineHeight:1.5}}),(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[!h&&p?.template&&(0,G.jsx)(A,{variant:`ghost`,onClick:()=>g(p.template),children:b(`Start from the template`,`ai-rank-suite`)}),_&&(0,G.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(A,{variant:`ghost`,onClick:de,children:b(`Skip`,`ai-rank-suite`)}),(0,G.jsx)(A,{busy:s,disabled:h===(p?.custom||``)&&_,onClick:()=>pe(async()=>{let e=await D.put(`/ai/knowledge`,{custom:h});m(e),v(!0),le(e=>({...e,brief:!0})),de()}),children:b(`Save and continue`,`ai-rank-suite`)})]})]})]}),ue===`score`&&(0,G.jsxs)(Xc,{title:b(`Score every page`,`ai-rank-suite`),lede:b(`Free and local — no AI call. Everything the AI does next reads from these scores, so they go first.`,`ai-rank-suite`),children:[(0,G.jsx)(Zc,{action:`analyze`,label:b(`Score the site`,`ai-rank-suite`),openCount:me(`analyze`),onDone:async()=>{le(e=>({...e,score:!0}));try{let e=await D.post(`/score/recalculate`);C(e.dimensions?.overall??null)}catch{}he()}}),S!=null&&(0,G.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,G.jsx)(Pe,{value:S,size:84,onLight:!0}),(0,G.jsx)(`span`,{className:`text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Site AI score right now. Watch it move as the next steps land.`,`ai-rank-suite`)})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(A,{variant:`ghost`,onClick:fe,children:b(`Back`,`ai-rank-suite`)}),(0,G.jsx)(A,{onClick:de,children:ce.score?b(`Continue`,`ai-rank-suite`):b(`Skip`,`ai-rank-suite`)})]})]}),ue===`describe`&&(0,G.jsxs)(Xc,{title:b(`Write the missing meta descriptions`,`ai-rank-suite`),lede:b(`The highest-leverage thing the AI does. Every published page without a description gets one — 120–155 characters, grounded in the page, plus a summary an assistant can quote. Runs in slices; a large site finishes.`,`ai-rank-suite`),children:[!ge&&(0,G.jsx)(M,{tone:`warning`,children:b(`Needs an engine — connect one on step 1.`,`ai-rank-suite`)}),ge&&(0,G.jsx)(Zc,{action:`describe`,label:b(`Write them now`,`ai-rank-suite`),openCount:me(`describe`),onDone:()=>{le(e=>({...e,describe:!0})),he()}}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(A,{variant:`ghost`,onClick:fe,children:b(`Back`,`ai-rank-suite`)}),(0,G.jsx)(A,{onClick:de,children:ce.describe?b(`Continue`,`ai-rank-suite`):b(`Skip`,`ai-rank-suite`)})]})]}),ue===`faq`&&(0,G.jsxs)(Xc,{title:b(`Generate FAQs`,`ai-rank-suite`),lede:b(`Three to six question-and-answer pairs per page, only from what the page already says, saved as FAQPage schema. The format assistants quote most readily.`,`ai-rank-suite`),children:[!ge&&(0,G.jsx)(M,{tone:`warning`,children:b(`Needs an engine — connect one on step 1.`,`ai-rank-suite`)}),ge&&(0,G.jsx)(Zc,{action:`faq`,label:b(`Generate FAQs now`,`ai-rank-suite`),openCount:me(`faq`),onDone:()=>{le(e=>({...e,faq:!0})),he()}}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(A,{variant:`ghost`,onClick:fe,children:b(`Back`,`ai-rank-suite`)}),(0,G.jsx)(A,{onClick:de,children:ce.faq?b(`Continue`,`ai-rank-suite`):b(`Skip`,`ai-rank-suite`)})]})]}),ue===`keywords`&&(0,G.jsxs)(Xc,{title:b(`Choose keywords to track`,`ai-rank-suite`),lede:b(`The AI reads your published titles and proposes queries this site can realistically win. Pick the ones worth tracking; each becomes a row in the rank tracker.`,`ai-rank-suite`),children:[!ge&&(0,G.jsx)(M,{tone:`warning`,children:b(`Needs an engine — connect one on step 1.`,`ai-rank-suite`)}),ge&&(0,G.jsx)(Wr,{taken:w,onPick:e=>pe(async()=>{await D.post(`/rank/keywords`,{keyword:e}),T(t=>[...t,e]),le(e=>({...e,keywords:!0}))})}),w.length>0&&(0,G.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,G.jsxs)(j,{tone:`good`,children:[w.length,` `,b(`tracked`,`ai-rank-suite`)]}),(0,G.jsx)(`span`,{className:`t-caption`,children:w.slice(-6).join(` · `)})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(A,{variant:`ghost`,onClick:fe,children:b(`Back`,`ai-rank-suite`)}),(0,G.jsx)(A,{onClick:de,children:ce.keywords?b(`Continue`,`ai-rank-suite`):b(`Skip`,`ai-rank-suite`)})]})]}),ue===`prompts`&&(0,G.jsxs)(Xc,{title:b(`Seed the AI answer test`,`ai-rank-suite`),lede:b(`The questions a person would ask ChatGPT or Perplexity that your site should be the answer to. The AI proposes them from your brand and content; the tracker then asks them on a schedule and records whether you are named.`,`ai-rank-suite`),children:[!ge&&(0,G.jsx)(M,{tone:`warning`,children:b(`Needs an engine — connect one on step 1.`,`ai-rank-suite`)}),ge&&(0,G.jsxs)(`div`,{className:`grid gap-3`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,G.jsxs)(A,{variant:`ghost`,busy:s,onClick:()=>pe(async()=>{let e=await D.post(`/ai-visibility/suggest`,{count:10});O(e.prompts||[])}),children:[(0,G.jsx)(Et,{width:14,height:14}),b(`Suggest prompts with AI`,`ai-rank-suite`)]}),te.length>0&&(0,G.jsxs)(j,{tone:`good`,children:[te.length,` `,b(`saved`,`ai-rank-suite`)]})]}),re&&re.length===0&&(0,G.jsx)(M,{tone:`warning`,children:b(`No usable prompts came back. Try again.`,`ai-rank-suite`)}),re&&re.length>0&&(0,G.jsx)(`div`,{className:`ars-kwsuggest`,children:re.map(e=>{let t=te.includes(e);return(0,G.jsxs)(`button`,{type:`button`,className:`ars-kwchip${t?` is-done`:``}`,disabled:t,onClick:()=>pe(async()=>{let t=[...te,e];await D.put(`/settings/ai-visibility`,{...E?.settings||{},prompts:t}),ne(t),le(e=>({...e,prompts:!0}))}),children:[(0,G.jsx)(`span`,{className:`ars-kwchip-word`,children:e}),(0,G.jsx)(j,{tone:t?`good`:`neutral`,children:b(t?`added`:`add`,`ai-rank-suite`)})]},e)})})]}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(A,{variant:`ghost`,onClick:fe,children:b(`Back`,`ai-rank-suite`)}),(0,G.jsx)(A,{onClick:de,children:ce.prompts?b(`Continue`,`ai-rank-suite`):b(`Skip`,`ai-rank-suite`)})]})]}),ue===`routing`&&(0,G.jsxs)(Xc,{title:b(`One engine per job`,`ai-rank-suite`),lede:b(`Every job runs on your default engine unless you say otherwise. Most sites leave this alone; agencies point the cheap, high-volume jobs at a cheaper model. Change it any time under AI Autopilot.`,`ai-rank-suite`),children:[ie&&(ie.engines||[]).length>1?(0,G.jsxs)(`div`,{className:`grid gap-2`,children:[(ie.jobs||[]).map(e=>(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,G.jsx)(`span`,{className:`text-[13px] font-medium`,children:e.label}),(0,G.jsxs)(`select`,{value:e.assigned?e.provider:``,onChange:t=>{let n=Object.fromEntries((ie.jobs||[]).map(n=>[n.id,n.id===e.id?t.target.value:n.assigned?n.provider:``]));ae({...ie,jobs:ie.jobs.map(n=>n.id===e.id?{...n,assigned:!!t.target.value,provider:t.target.value}:n),_draft:n}),se(!1)},children:[(0,G.jsx)(`option`,{value:``,children:b(`Default engine`,`ai-rank-suite`)}),(ie.engines||[]).map(e=>(0,G.jsx)(`option`,{value:e.id,children:e.label},e.id))]})]},e.id)),(0,G.jsx)(`div`,{className:`flex items-center gap-2 flex-wrap mt-1`,children:oe&&(0,G.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]})})]}):(0,G.jsx)(M,{tone:`neutral`,children:b(`Only one engine has a key, so every job already runs on it. Add a second key on the AI Engine screen to route jobs between them.`,`ai-rank-suite`)}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,G.jsx)(A,{variant:`ghost`,onClick:fe,children:b(`Back`,`ai-rank-suite`)}),ie?._draft?(0,G.jsx)(A,{busy:s,onClick:()=>pe(async()=>{let e=await D.put(`/ai/routing`,{assignments:ie._draft,exclusive:!!ie.exclusive});ae(e),se(!0),le(e=>({...e,routing:!0})),de()}),children:b(`Save and continue`,`ai-rank-suite`)}):(0,G.jsx)(A,{onClick:de,children:b(`Continue`,`ai-rank-suite`)})]})]}),ue===`done`&&(0,G.jsxs)(Xc,{title:b(`The AI is set up`,`ai-rank-suite`),lede:b(`Here is what it did in this session, and where each thing lives from now on.`,`ai-rank-suite`),children:[(0,G.jsxs)(`ul`,{className:`m-0 pl-5 grid gap-1.5 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:[(0,G.jsxs)(`li`,{children:[ce.brief?`✓ `:`– `,b(`Briefing saved — every engine reads it before every task.`,`ai-rank-suite`),` `,(0,G.jsx)(`em`,{children:b(`AI Engine → Knowledge base`,`ai-rank-suite`)})]}),(0,G.jsxs)(`li`,{children:[ce.score?`✓ `:`– `,b(`Pages scored.`,`ai-rank-suite`),` `,(0,G.jsx)(`em`,{children:b(`Dashboard → Full website analyzer`,`ai-rank-suite`)})]}),(0,G.jsxs)(`li`,{children:[ce.describe?`✓ `:`– `,b(`Meta descriptions written.`,`ai-rank-suite`),` `,(0,G.jsx)(`em`,{children:b(`Content`,`ai-rank-suite`)})]}),(0,G.jsxs)(`li`,{children:[ce.faq?`✓ `:`– `,b(`FAQs generated.`,`ai-rank-suite`),` `,(0,G.jsx)(`em`,{children:b(`Content · Schema`,`ai-rank-suite`)})]}),(0,G.jsxs)(`li`,{children:[ce.keywords?`✓ `:`– `,b(`Keywords tracked.`,`ai-rank-suite`),` `,(0,G.jsx)(`em`,{children:b(`Search Console → Keywords`,`ai-rank-suite`)})]}),(0,G.jsxs)(`li`,{children:[ce.prompts?`✓ `:`– `,b(`Answer-test prompts saved.`,`ai-rank-suite`),` `,(0,G.jsx)(`em`,{children:b(`AI Answer Simulation`,`ai-rank-suite`)})]}),(0,G.jsxs)(`li`,{children:[ce.routing?`✓ `:`– `,b(`Routing set.`,`ai-rank-suite`),` `,(0,G.jsx)(`em`,{children:b(`AI Autopilot`,`ai-rank-suite`)})]})]}),(0,G.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Anything skipped is one button on the "Let AI do" panel — on the dashboard and on the AI Engine screen.`,`ai-rank-suite`)}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,G.jsx)(A,{onClick:e,children:b(`Go to dashboard`,`ai-rank-suite`)}),(0,G.jsx)(A,{variant:`ghost`,onClick:()=>{window.location.hash=`/autopilot`,e()},children:b(`Open the autopilot`,`ai-rank-suite`)})]})]}),a&&(0,G.jsx)(M,{tone:`serious`,children:a})]})]})})}var $c,G,el,tl=o((()=>{$c=u(f(),1),C(),O(),dt(),Vt(),qr(),G=_e(),el=[{id:`engine`,label:b(`Engine`,`ai-rank-suite`)},{id:`brief`,label:b(`Brief the AI`,`ai-rank-suite`)},{id:`score`,label:b(`Score`,`ai-rank-suite`)},{id:`describe`,label:b(`Descriptions`,`ai-rank-suite`)},{id:`faq`,label:b(`FAQs`,`ai-rank-suite`)},{id:`keywords`,label:b(`Keywords`,`ai-rank-suite`)},{id:`prompts`,label:b(`AI prompts`,`ai-rank-suite`)},{id:`routing`,label:b(`Routing`,`ai-rank-suite`)},{id:`done`,label:b(`Done`,`ai-rank-suite`)}]}));function nl(){let[e,t]=(0,rl.useState)(null),[n,r]=(0,rl.useState)(null),[i,a]=(0,rl.useState)(!1),[o,s]=(0,rl.useState)(`present`),[c,l]=(0,rl.useState)(null),u=(e=!1)=>{a(!0),D.get(`/google/rich-results${e?`?fresh=1`:``}`).then(t).catch(e=>r(e.message)).finally(()=>a(!1))};if((0,rl.useEffect)(()=>{u()},[]),n)return(0,il.jsx)(M,{tone:`serious`,children:n});if(!e)return(0,il.jsx)(k,{children:b(`Reading the structured data on your pages…`,`ai-rank-suite`)});let d=e.features||[],f=d.filter(e=>e.pages>0),p=f.filter(e=>e.invalid>0),m=d.filter(e=>e.pages===0&&!e.retired),h=o===`present`?f:o===`broken`?p:o===`gaps`?m:d;return(0,il.jsxs)(`div`,{className:`grid gap-3`,children:[(0,il.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,il.jsxs)(`div`,{className:`ars-rr-stat`,children:[(0,il.jsx)(`b`,{children:f.length}),(0,il.jsx)(`span`,{children:b(`rich result types on this site`,`ai-rank-suite`)})]}),(0,il.jsxs)(`div`,{className:`ars-rr-stat${p.length?` is-bad`:``}`,children:[(0,il.jsx)(`b`,{children:p.length}),(0,il.jsx)(`span`,{children:b(`with pages that would not qualify`,`ai-rank-suite`)})]}),(0,il.jsxs)(`div`,{className:`ars-rr-stat`,children:[(0,il.jsx)(`b`,{children:e.scanned}),(0,il.jsx)(`span`,{children:b(`pages inspected`,`ai-rank-suite`)})]})]}),(0,il.jsxs)(k,{icon:(0,il.jsx)(Mt,{size:16}),title:b(`Rich result eligibility`,`ai-rank-suite`),subtitle:b(`Checked against the properties Google documents as required for each feature — not a guess, the graph is read from your pages`,`ai-rank-suite`),action:(0,il.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,il.jsxs)(A,{variant:`ghost`,busy:i,onClick:()=>u(!0),children:[(0,il.jsx)(Tt,{size:13}),b(`Rescan`,`ai-rank-suite`)]})}),flush:!0,children:[(0,il.jsx)(`div`,{className:`p-3`,style:{borderBottom:`1px solid var(--ars-border)`},children:(0,il.jsx)(qe,{label:b(`Show`,`ai-rank-suite`),value:o,onChange:s,options:[{id:`present`,label:b(`On this site`,`ai-rank-suite`),count:f.length},{id:`broken`,label:b(`Not qualifying`,`ai-rank-suite`),count:p.length},{id:`gaps`,label:b(`Not used yet`,`ai-rank-suite`),count:m.length},{id:`all`,label:b(`Everything`,`ai-rank-suite`),count:d.length}]})}),h.length===0?(0,il.jsx)(`p`,{className:`m-0 p-4 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(o===`broken`?`Every page that emits a rich result type meets its required properties.`:`Nothing in this group.`,`ai-rank-suite`)}):(0,il.jsx)(`div`,{children:h.map(e=>{let t=c===e.type,n=e.pages===0?`none`:e.invalid===0?`good`:`bad`;return(0,il.jsxs)(`div`,{className:`ars-rr-row is-${n}`,children:[(0,il.jsxs)(`button`,{type:`button`,className:`ars-rr-main`,onClick:()=>l(t?null:e.type),"aria-expanded":t,children:[(0,il.jsx)(`span`,{className:`ars-rr-caret`,"aria-hidden":!0,children:t?`▾`:`▸`}),(0,il.jsxs)(`span`,{className:`min-w-0`,children:[(0,il.jsxs)(`span`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,il.jsx)(`b`,{className:`text-[13px]`,children:e.label}),(0,il.jsx)(`span`,{className:`ars-tag`,children:e.group}),e.indexing&&(0,il.jsx)(`span`,{className:`ars-tag`,style:{background:`var(--ars-brand-tonal)`,color:`var(--ars-brand-tonal-ink)`},title:b(`One of only two types the Google Indexing API accepts`,`ai-rank-suite`),children:b(`Indexing API`,`ai-rank-suite`)}),e.retired&&(0,il.jsx)(`span`,{className:`ars-tag`,children:b(`retired by Google`,`ai-rank-suite`)})]}),(0,il.jsx)(`span`,{className:`ars-rr-about`,children:e.about})]}),(0,il.jsx)(`span`,{className:`ars-rr-count`,children:e.pages===0?(0,il.jsx)(`i`,{style:{color:`var(--ars-ink-3)`},children:b(`not used`,`ai-rank-suite`)}):(0,il.jsxs)(il.Fragment,{children:[(0,il.jsx)(`b`,{className:`tabular-nums`,children:e.valid}),` `,b(`of`,`ai-rank-suite`),` `,(0,il.jsx)(`span`,{className:`tabular-nums`,children:e.pages}),` `,b(`qualify`,`ai-rank-suite`)]})}),e.pages>0&&(e.invalid===0?(0,il.jsx)(j,{tone:`good`,children:b(`valid`,`ai-rank-suite`)}):(0,il.jsx)(j,{tone:`serious`,children:S(b(`%d failing`,`ai-rank-suite`),e.invalid)}))]}),t&&(0,il.jsxs)(`div`,{className:`ars-rr-body`,children:[e.gaps.length>0&&(0,il.jsxs)(`div`,{children:[(0,il.jsx)(`div`,{className:`t-overline`,children:b(`Missing required properties`,`ai-rank-suite`)}),(0,il.jsx)(`p`,{className:`m-0 mb-2 t-caption`,children:b(`A page without these is not eligible for this rich result at all.`,`ai-rank-suite`)}),(0,il.jsx)(`div`,{className:`ars-rr-props`,children:e.gaps.map(t=>(0,il.jsxs)(`div`,{className:`ars-rr-prop is-required`,children:[(0,il.jsx)(`code`,{children:t.property}),(0,il.jsxs)(`span`,{children:[`missing on `,t.pages,` page`,t.pages===1?``:`s`]}),e.notes?.[t.property]&&(0,il.jsx)(`em`,{children:e.notes[t.property]})]},t.property))})]}),e.weak.length>0&&(0,il.jsxs)(`div`,{children:[(0,il.jsx)(`div`,{className:`t-overline`,children:b(`Recommended but absent`,`ai-rank-suite`)}),(0,il.jsx)(`p`,{className:`m-0 mb-2 t-caption`,children:b(`The page still qualifies. The result just renders with less in it.`,`ai-rank-suite`)}),(0,il.jsx)(`div`,{className:`ars-rr-props`,children:e.weak.map(t=>(0,il.jsxs)(`div`,{className:`ars-rr-prop`,children:[(0,il.jsx)(`code`,{children:t.property}),(0,il.jsxs)(`span`,{children:[`on `,t.pages,` page`,t.pages===1?``:`s`]}),e.notes?.[t.property]&&(0,il.jsx)(`em`,{children:e.notes[t.property]})]},t.property))})]}),e.samples.length>0&&(0,il.jsxs)(`div`,{children:[(0,il.jsx)(`div`,{className:`t-overline`,children:b(`Pages that would not qualify`,`ai-rank-suite`)}),(0,il.jsx)(`ul`,{className:`m-0 mt-1.5 p-0 list-none grid gap-1`,children:e.samples.map(e=>(0,il.jsxs)(`li`,{className:`ars-rr-sample`,children:[(0,il.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>{window.location.hash=`/content/${e.id}`},children:e.title||`#${e.id}`}),(0,il.jsx)(`span`,{className:`t-caption`,children:S(b(`missing %s`,`ai-rank-suite`),e.missing.join(`, `))})]},e.id))})]}),e.pages===0&&(0,il.jsxs)(`div`,{className:`grid gap-2`,children:[(0,il.jsxs)(`p`,{className:`m-0 text-[12.5px]`,children:[S(b(`No page on this site emits %s. Required to qualify:`,`ai-rank-suite`),e.type),` `,e.required.map(e=>(0,il.jsx)(`code`,{className:`ars-head-code mr-1`,children:e},e))]}),(0,il.jsx)(`button`,{type:`button`,className:`ars-linkbtn text-left`,onClick:()=>{window.location.hash=`/schema`},children:S(b(`Add %s markup in Schema →`,`ai-rank-suite`),e.label)})]}),e.pages>0&&e.invalid===0&&e.weak.length===0&&(0,il.jsx)(`p`,{className:`m-0 text-[12.5px]`,children:S(b(`Every page emitting %s has all required and all recommended properties.`,`ai-rank-suite`),e.type)}),(0,il.jsxs)(`a`,{href:`https://search.google.com/test/rich-results`,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 text-[12px]`,children:[b(`Verify one page in Google's own tester`,`ai-rank-suite`),(0,il.jsx)(wt,{size:10})]})]})]},e.type)})})]}),(0,il.jsxs)(ft,{title:b(`The Indexing API is not what most plugins claim it is`,`ai-rank-suite`),children:[(0,il.jsxs)(`p`,{children:[b(`Google documents the Indexing API as supporting exactly two types:`,`ai-rank-suite`),(0,il.jsx)(`code`,{children:b(`JobPosting`,`ai-rank-suite`)}),` `,b(`and`,`ai-rank-suite`),` `,(0,il.jsx)(`code`,{children:b(`BroadcastEvent`,`ai-rank-suite`)}),`. `,b(`Submitting a blog post or a product page to it does not get that page indexed faster — it uses quota and returns success, which is why the misunderstanding is so durable. Plugins that advertise it as “instant indexing for everything” are selling that misunderstanding.`,`ai-rank-suite`)]}),(0,il.jsx)(`p`,{children:b(`For everything else the honest tools are the sitemap, IndexNow — which Bing, Yandex, Seznam and Naver genuinely act on — and publishing something worth crawling. All three are in this plugin, on the tabs beside this one.`,`ai-rank-suite`)}),(0,il.jsx)(`p`,{children:S(b(`This scan reads the last %d modified pages rather than every page on the site. That is enough to find a broken template, which is what a site-wide structured data problem always is; it is not a complete audit, and it says so rather than implying it counted everything.`,`ai-rank-suite`),e.limit)})]})]})}var rl,il,al=o((()=>{rl=u(f(),1),C(),O(),dt(),mt(),Vt(),il=_e()})),ol=c({default:()=>cl});function sl(){let[e,t]=(0,ll.useState)(null),[n,r]=(0,ll.useState)(!1),[i,a]=(0,ll.useState)(!1),[o,s]=(0,ll.useState)(null),[c,l]=(0,ll.useState)(``);if((0,ll.useEffect)(()=>{D.get(`/settings/indexnow`).then(t).catch(e=>s(e.message))},[]),!e)return(0,K.jsx)(Ce,{error:o});let u=e.settings,d=n=>t({...e,settings:{...u,...n}}),f=async e=>{r(!0),s(null);try{return t(await e()),!0}catch(e){return s(e.message),!1}finally{r(!1)}},p=async()=>{await f(()=>D.put(`/settings/indexnow`,u))&&(a(!0),setTimeout(()=>a(!1),2200))},m=c.split(/[\n\s]+/).map(e=>e.trim()).filter(Boolean);return(0,K.jsxs)(K.Fragment,{children:[o&&(0,K.jsx)(M,{tone:`serious`,children:o}),(0,K.jsx)(xe,{tone:u.enabled?`good`:`neutral`,text:u.enabled?b(`IndexNow is active — Bing, Yandex, Seznam and Naver hear about a change the moment you make it.`,`ai-rank-suite`):b(`IndexNow is switched off, so nothing is being submitted.`,`ai-rank-suite`),sub:u.enabled?u.auto?S(b(`Covering %s, automatically on publish, update and unpublish.`,`ai-rank-suite`),(u.post_types||[]).join(`, `)||b(`no post types`,`ai-rank-suite`)):S(b(`Covering %s — automatic submission is off, so this only happens when you press the button.`,`ai-rank-suite`),(u.post_types||[]).join(`, `)||b(`no post types`,`ai-rank-suite`)):b(`This needs no Google account and no API key. One switch in the settings below turns it on.`,`ai-rank-suite`)}),(0,K.jsx)(k,{title:b(`Submit URLs now`,`ai-rank-suite`),children:(0,K.jsxs)(`div`,{className:`grid gap-3`,children:[(0,K.jsx)(`textarea`,{rows:4,placeholder:`${window.airanksuiteData.homeUrl}my-page/\n${window.airanksuiteData.homeUrl}another-page/`,value:c,onChange:e=>l(e.target.value)}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,K.jsx)(A,{onClick:async()=>{await f(()=>D.post(`/indexnow/submit`,{urls:m}))&&l(``)},busy:n,disabled:!m.length,children:m.length?S(x(`Submit %d URL`,`Submit %d URLs`,m.length,`ai-rank-suite`),m.length):b(`Submit URLs`,`ai-rank-suite`)}),(0,K.jsx)(A,{variant:`ghost`,onClick:()=>f(()=>D.post(`/indexnow/submit`,{scope:`all`})),busy:n,children:b(`Submit everything`,`ai-rank-suite`)})]}),(0,K.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`“Submit everything” sends your 500 most recent published URLs. Use it once after installing, then let the automatic submissions do the work.`,`ai-rank-suite`)})]})}),e.recent?.length>0&&(0,K.jsx)(k,{title:b(`Recent submissions`,`ai-rank-suite`),subtitle:(()=>{let t=e.recent.filter(e=>!e.ok).length;return t>0?S(b(`%1$d recent, %2$d rejected — a 429 means you submitted the same URL too often`,`ai-rank-suite`),e.recent.length,t):S(b(`%d recent, all accepted`,`ai-rank-suite`),e.recent.length)})(),action:(0,K.jsx)(j,{tone:e.recent.some(e=>!e.ok)?`warning`:`good`,children:e.recent.length}),children:(0,K.jsx)(`div`,{className:`ars-table-wrap`,children:(0,K.jsxs)(`table`,{className:`ars-table`,children:[(0,K.jsx)(`thead`,{children:(0,K.jsxs)(`tr`,{children:[(0,K.jsx)(`th`,{children:b(`URLs`,`ai-rank-suite`)}),(0,K.jsx)(`th`,{children:b(`First URL`,`ai-rank-suite`)}),(0,K.jsx)(`th`,{children:b(`Result`,`ai-rank-suite`)}),(0,K.jsx)(`th`,{children:b(`When`,`ai-rank-suite`)})]})}),(0,K.jsx)(`tbody`,{children:e.recent.slice(0,12).map((e,t)=>(0,K.jsxs)(`tr`,{children:[(0,K.jsx)(`td`,{className:`tabular-nums`,children:e.count}),(0,K.jsx)(`td`,{className:`ars-mono`,style:{maxWidth:300},title:String(e.first),children:(0,K.jsx)(`span`,{className:`ars-url`,children:String(e.first).replace(/^https?:\/\/[^/]+/,``)})}),(0,K.jsx)(`td`,{children:e.ok?(0,K.jsxs)(j,{tone:`good`,children:[`✓ `,e.code]}):(0,K.jsxs)(j,{tone:`serious`,title:e.error,children:[`✕ `,e.code||b(`error`,`ai-rank-suite`)]})}),(0,K.jsx)(`td`,{style:{color:`var(--ars-ink-3)`},children:new Date(e.time*1e3).toLocaleString()})]},t))})]})})}),(0,K.jsx)(Oe,{title:b(`IndexNow settings`,`ai-rank-suite`),note:u.enabled?b(`Active`,`ai-rank-suite`):b(`Off`,`ai-rank-suite`),defaultOpen:!u.enabled,children:(0,K.jsxs)(`div`,{className:`grid gap-4`,children:[(0,K.jsx)(k,{title:b(`IndexNow`,`ai-rank-suite`),subtitle:b(`Instant indexing for Bing, Yandex, Seznam and Naver — no Google account or API key needed`,`ai-rank-suite`),action:u.enabled?(0,K.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Active`,`ai-rank-suite`)]}):(0,K.jsx)(j,{tone:`neutral`,children:b(`Off`,`ai-rank-suite`)}),children:(0,K.jsxs)(`div`,{className:`grid gap-4`,children:[!e.permalinks&&(0,K.jsx)(M,{tone:`serious`,children:b(`IndexNow needs pretty permalinks so the key file can be served. Switch Settings → Permalinks away from “Plain” first.`,`ai-rank-suite`)}),(0,K.jsx)(Me,{checked:!!u.enabled,onChange:e=>d({enabled:e}),label:b(`Enable IndexNow submissions`,`ai-rank-suite`)}),(0,K.jsx)(Me,{checked:!!u.auto,onChange:e=>d({auto:e}),label:b(`Submit automatically when a page is published, updated or unpublished`,`ai-rank-suite`)}),(0,K.jsx)(`div`,{className:`flex gap-3 flex-wrap text-[13px]`,children:e.post_types.map(e=>(0,K.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:u.post_types.includes(e),onChange:t=>d({post_types:t.target.checked?[...u.post_types,e]:u.post_types.filter(t=>t!==e)})}),e]},e))}),(0,K.jsxs)(`div`,{className:`sm:max-w-[440px]`,children:[(0,K.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Endpoint`,`ai-rank-suite`)}),(0,K.jsx)(`select`,{value:u.endpoint,onChange:e=>d({endpoint:e.target.value}),children:Object.entries(e.endpoints).map(([e,t])=>(0,K.jsx)(`option`,{value:e,children:t},e))}),(0,K.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`All participating engines share one network — the first option reaches every one of them.`,`ai-rank-suite`)})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(A,{onClick:p,busy:n,children:b(`Save`,`ai-rank-suite`)}),i&&(0,K.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]})]})]})}),(0,K.jsx)(k,{title:b(`Your key file`,`ai-rank-suite`),subtitle:b(`Search engines fetch this to prove the submissions come from you`,`ai-rank-suite`),children:(0,K.jsxs)(`div`,{className:`grid gap-3`,children:[(0,K.jsx)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:(0,K.jsx)(`a`,{className:`ars-mono text-[12.5px]`,href:e.key_url,target:`_blank`,rel:`noreferrer`,children:e.key_url})}),(0,K.jsx)(`div`,{children:(0,K.jsx)(A,{variant:`ghost`,onClick:()=>f(()=>D.post(`/indexnow/key`,{})),busy:n,children:b(`Generate a new key`,`ai-rank-suite`)})}),(0,K.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Open the link — it must show the key as plain text. Regenerating invalidates the old key immediately.`,`ai-rank-suite`)})]})})]})})]})}function cl({tab:e=`indexing`,onTab:t}){let[n,r]=(0,ll.useState)(null),[i,a]=(0,ll.useState)(!1),[o,s]=(0,ll.useState)(!1),[c,l]=(0,ll.useState)(null),[u,d]=(0,ll.useState)(``),[f,p]=(0,ll.useState)(``),m=(0,ll.useRef)(null);if((0,ll.useEffect)(()=>{D.get(`/settings/google`).then(r).catch(e=>l(e.message))},[]),!n)return(0,K.jsx)(Ce,{error:c});let h=n.settings,g=e=>r({...n,settings:{...h,...e}}),_=async()=>{a(!0),l(null);try{r(await D.put(`/settings/google`,h)),s(!0),setTimeout(()=>s(!1),2200)}catch(e){l(e.message)}finally{a(!1)}},v=async e=>{a(!0),l(null);try{r(await D.post(`/google/indexing/account`,{json:e})),p(``)}catch(e){l(e.message)}finally{a(!1),m.current&&(m.current.value=``)}},y=async e=>v(await e.text()),x=async()=>{a(!0);try{r(await D.del(`/google/indexing/account`))}catch(e){l(e.message)}finally{a(!1)}},C=async()=>{a(!0),l(null);try{r(await D.post(`/google/indexing/submit`,{url:u})),d(``)}catch(e){l(e.message)}finally{a(!1)}},w=n.indexing,T=Math.round(w.used_today/w.quota*100);return(0,K.jsxs)(`div`,{className:`ars-page`,children:[(0,K.jsx)(Ie,{tabs:[{id:`indexing`,label:b(`Google`,`ai-rank-suite`)},{id:`rich`,label:b(`Rich results`,`ai-rank-suite`)},{id:`bing`,label:b(`Bing`,`ai-rank-suite`)},{id:`indexnow`,label:b(`IndexNow`,`ai-rank-suite`)},{id:`verify`,label:b(`Verification`,`ai-rank-suite`)}],active:e,onChange:t}),c&&(0,K.jsx)(M,{tone:`serious`,children:c}),e===`indexing`&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(ya,{tone:w.configured?`good`:`neutral`,text:w.configured?b(`Google is told directly when a page is published, updated or removed.`,`ai-rank-suite`):b(`Google is not told about changes directly — it finds them on its own schedule.`,`ai-rank-suite`),why:w.configured?b(`The Indexing API is Google's fast lane for job postings and live streams; for everything else the sitemap and IndexNow below carry the change.`,`ai-rank-suite`):b(`A service account key from Google Cloud connects the Indexing API in three steps below. IndexNow (next tab) needs no account at all and covers Bing, Yandex, Seznam and Naver.`,`ai-rank-suite`)}),(0,K.jsx)(k,{title:b(`Google Indexing API`,`ai-rank-suite`),subtitle:b(`Tell Google directly when a page is published, updated or removed`,`ai-rank-suite`),action:w.configured?(0,K.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Connected`,`ai-rank-suite`)]}):(0,K.jsx)(j,{tone:`neutral`,children:b(`Not connected`,`ai-rank-suite`)}),children:w.configured?(0,K.jsxs)(`div`,{className:`grid gap-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,K.jsx)(`div`,{className:`text-[12.5px] ars-mono`,style:{color:`var(--ars-ink-2)`},children:w.email}),(0,K.jsx)(A,{variant:`danger`,onClick:x,busy:i,children:b(`Remove key`,`ai-rank-suite`)})]}),(0,K.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,K.jsxs)(`div`,{className:`flex justify-between text-[12.5px]`,children:[(0,K.jsx)(`span`,{className:`font-medium`,children:b(`Daily quota`,`ai-rank-suite`)}),(0,K.jsx)(`span`,{className:`tabular-nums`,style:{color:`var(--ars-ink-2)`},children:S(b(`%1$s / %2$s URLs`,`ai-rank-suite`),w.used_today,w.quota)})]}),(0,K.jsx)(Be,{value:T})]}),(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(Me,{checked:!!h.indexing_auto,onChange:e=>g({indexing_auto:e}),label:b(`Submit automatically when a page is published, updated or removed`,`ai-rank-suite`)}),(0,K.jsx)(`div`,{className:`flex gap-3 flex-wrap text-[13px]`,children:n.post_types.map(e=>(0,K.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:h.indexing_types.includes(e.slug),onChange:t=>g({indexing_types:t.target.checked?[...h.indexing_types,e.slug]:h.indexing_types.filter(t=>t!==e.slug)})}),e.label]},e.slug))}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(A,{onClick:_,busy:i,children:b(`Save`,`ai-rank-suite`)}),o&&(0,K.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]})]})]}),(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(`label`,{className:`font-medium`,children:b(`Submit a single URL now`,`ai-rank-suite`)}),(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.jsx)(`input`,{type:`text`,placeholder:`${window.airanksuiteData.homeUrl}my-page/`,value:u,onChange:e=>d(e.target.value)}),(0,K.jsx)(A,{onClick:C,busy:i,disabled:!u,children:b(`Submit`,`ai-rank-suite`)})]})]}),(0,K.jsx)(M,{children:b(`Google officially supports the Indexing API for job postings and livestream pages. Other page types are commonly submitted too, but Google does not guarantee they will be crawled faster.`,`ai-rank-suite`)})]}):(0,K.jsxs)(`div`,{className:`grid gap-3`,children:[(0,K.jsxs)(`ol`,{className:`m-0 pl-5 grid gap-2 text-[13px]`,children:[(0,K.jsxs)(`li`,{children:[b(`In`,`ai-rank-suite`),` `,(0,K.jsx)(`a`,{href:`https://console.cloud.google.com/iam-admin/serviceaccounts`,target:`_blank`,rel:`noreferrer`,children:b(`Google Cloud → Service Accounts`,`ai-rank-suite`)}),b(`, create a service account and download its`,`ai-rank-suite`),` `,(0,K.jsx)(`strong`,{children:b(`JSON key`,`ai-rank-suite`)}),`.`]}),(0,K.jsxs)(`li`,{children:[b(`Enable the`,`ai-rank-suite`),` `,(0,K.jsx)(`strong`,{children:b(`Indexing API`,`ai-rank-suite`)}),` `,b(`for that project (APIs & Services → Library).`,`ai-rank-suite`)]}),(0,K.jsxs)(`li`,{children:[b(`In`,`ai-rank-suite`),` `,(0,K.jsx)(`a`,{href:`https://search.google.com/search-console/users`,target:`_blank`,rel:`noreferrer`,children:b(`Search Console → Settings → Users and permissions`,`ai-rank-suite`)}),b(`, add the service account's email address as an`,`ai-rank-suite`),` `,(0,K.jsx)(`strong`,{children:b(`Owner`,`ai-rank-suite`)}),` `,b(`of this property.`,`ai-rank-suite`)]}),(0,K.jsx)(`li`,{children:b(`Upload the JSON key here:`,`ai-rank-suite`)})]}),(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(`textarea`,{className:`ars-input ars-mono`,rows:6,spellCheck:!1,value:f,onChange:e=>p(e.target.value),placeholder:`{
    8484  "type": "service_account",
    8585  "project_id": "…",
    8686  "client_email": "…",
    8787  "private_key": "-----BEGIN PRIVATE KEY-----…"
    88 }`,"aria-label":b(`Service account JSON`,`ai-rank-suite`)}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,K.jsx)(A,{busy:i,disabled:f.trim()===``,onClick:()=>v(f),children:b(`Connect with this key`,`ai-rank-suite`)}),(0,K.jsx)(`span`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`or`,`ai-rank-suite`)}),(0,K.jsx)(A,{variant:`ghost`,onClick:()=>m.current?.click(),busy:i,children:b(`Choose the JSON file`,`ai-rank-suite`)})]}),(0,K.jsx)(`input`,{ref:m,type:`file`,accept:`application/json,.json`,style:{display:`none`},onChange:e=>e.target.files?.[0]&&y(e.target.files[0])})]})]})}),w.recent?.length>0&&(0,K.jsx)(k,{title:b(`Recent submissions`,`ai-rank-suite`),children:(0,K.jsx)(`div`,{className:`ars-table-wrap`,children:(0,K.jsxs)(`table`,{className:`ars-table`,children:[(0,K.jsx)(`thead`,{children:(0,K.jsxs)(`tr`,{children:[(0,K.jsx)(`th`,{children:b(`URL`,`ai-rank-suite`)}),(0,K.jsx)(`th`,{children:b(`Type`,`ai-rank-suite`)}),(0,K.jsx)(`th`,{children:b(`Result`,`ai-rank-suite`)}),(0,K.jsx)(`th`,{children:b(`When`,`ai-rank-suite`)})]})}),(0,K.jsx)(`tbody`,{children:w.recent.slice(0,15).map((e,t)=>(0,K.jsxs)(`tr`,{children:[(0,K.jsx)(`td`,{className:`ars-mono`,style:{maxWidth:320},title:e.url,children:(0,K.jsx)(`span`,{className:`ars-url`,children:e.url.replace(/^https?:\/\/[^/]+/,``)})}),(0,K.jsx)(`td`,{style:{color:`var(--ars-ink-3)`},children:e.type===`URL_DELETED`?b(`Removed`,`ai-rank-suite`):b(`Updated`,`ai-rank-suite`)}),(0,K.jsx)(`td`,{children:e.ok?(0,K.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Sent`,`ai-rank-suite`)]}):(0,K.jsxs)(j,{tone:`serious`,title:e.error,children:[`✕ `,b(`Failed`,`ai-rank-suite`)]})}),(0,K.jsx)(`td`,{style:{color:`var(--ars-ink-3)`},children:new Date(e.time*1e3).toLocaleString()})]},t))})]})})})]}),e===`rich`&&(0,K.jsx)(Xc,{}),e===`bing`&&(0,K.jsx)(Ca,{}),e===`indexnow`&&(0,K.jsx)(tl,{}),e===`verify`&&(0,K.jsx)(k,{title:b(`Site verification`,`ai-rank-suite`),subtitle:b(`Verification tags are output on your home page only — that is all these services read`,`ai-rank-suite`),action:o&&(0,K.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),children:(0,K.jsxs)(`div`,{className:`grid gap-3`,children:[il.map(e=>(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`label`,{className:`block font-medium mb-1`,children:e.label}),(0,K.jsx)(`input`,{type:`text`,placeholder:e.hint,value:h[e.key]||``,onChange:t=>g({[e.key]:t.target.value})})]},e.key)),(0,K.jsx)(`div`,{children:(0,K.jsx)(A,{onClick:_,busy:i,children:b(`Save`,`ai-rank-suite`)})}),(0,K.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Paste only the content value, not the whole meta tag — the plugin builds the tag for you.`,`ai-rank-suite`)})]})})]})}var rl,K,il,al=o((()=>{rl=u(f(),1),C(),D(),ha(),Ea(),at(),$c(),K=O(),il=[{key:`verify_google`,label:b(`Google Search Console`,`ai-rank-suite`),hint:b(`The content value of the google-site-verification tag`,`ai-rank-suite`)},{key:`verify_bing`,label:b(`Bing Webmaster Tools`,`ai-rank-suite`),hint:`msvalidate.01`},{key:`verify_pinterest`,label:b(`Pinterest`,`ai-rank-suite`),hint:`p:domain_verify`},{key:`verify_yandex`,label:b(`Yandex`,`ai-rank-suite`),hint:`yandex-verification`},{key:`verify_baidu`,label:b(`Baidu`,`ai-rank-suite`),hint:b(`baidu-site-verification — China’s biggest engine, and its AI answer layer`,`ai-rank-suite`)},{key:`verify_naver`,label:b(`Naver`,`ai-rank-suite`),hint:b(`naver-site-verification — the default engine in South Korea`,`ai-rank-suite`)},{key:`verify_facebook`,label:b(`Meta / Facebook`,`ai-rank-suite`),hint:b(`facebook-domain-verification — needed for catalogue and ad domains`,`ai-rank-suite`)}]})),ol=c({default:()=>ll});function sl({item:e,checked:t,onToggle:n,inSitemap:r=null}){return(0,q.jsxs)(`button`,{type:`button`,onClick:n,className:`flex items-center justify-between gap-3 ars-r-lg px-4 py-2.5 text-left cursor-pointer w-full`,style:{background:t?`var(--ars-brand-tonal)`:`var(--ars-surface-2)`,border:`1px solid transparent`,opacity:e.count===0&&!t?.6:1},"aria-pressed":t,children:[(0,q.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0`,children:[(0,q.jsx)(`span`,{"aria-hidden":!0,style:{color:t?`var(--ars-brand-tonal-ink)`:`var(--ars-ink-3)`},children:t?`✓`:`○`}),(0,q.jsx)(`span`,{className:`font-medium text-[13px]`,style:{color:t?`var(--ars-brand-tonal-ink)`:`var(--ars-ink)`},children:e.label})]}),(0,q.jsx)(`span`,{className:`text-[12px] tabular-nums shrink-0 text-right`,style:{color:`var(--ars-ink-3)`},children:e.count===0?b(`empty`,`ai-rank-suite`):t&&r!==null?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{style:{color:`var(--ars-ink-2)`,fontWeight:600},children:S(x(`%s URL in the sitemap`,`%s URLs in the sitemap`,r,`ai-rank-suite`),r.toLocaleString())}),r!==e.count&&(0,q.jsx)(`span`,{className:`block text-[11px]`,children:S(b(`of %s published`,`ai-rank-suite`),e.count.toLocaleString())})]}):S(b(`%s published`,`ai-rank-suite`),e.count.toLocaleString())})]})}function cl({files:e}){let[t,n]=(0,ul.useState)({kind:`index`,type:``,page:1}),[r,i]=(0,ul.useState)(null),[a,o]=(0,ul.useState)(!1),[s,c]=(0,ul.useState)(null),[l,u]=(0,ul.useState)(!0),d=async e=>{o(!0),c(null),n(e);try{let t=new URLSearchParams({kind:e.kind,type:e.type||``,page:String(e.page||1)});i(await E.get(`/sitemap/preview?${t}`))}catch(e){c(e.message),i(null)}finally{o(!1)}};(0,ul.useEffect)(()=>{d({kind:`index`,type:``,page:1})},[]);let f=()=>{r?.xml&&fe(r.xml)},p=[{key:`index`,label:b(`Index`,`ai-rank-suite`),t:{kind:`index`,type:``,page:1}},...e.map(e=>({key:`${e.kind}:${e.slug}:${e.url}`,label:e.label,t:{kind:e.kind===`taxonomy`?`tax`:e.kind===`news`||e.kind===`video`?e.kind:`posts`,type:e.slug,page:Number((String(e.url).match(/-(\d+)\.xml$/)||[,1])[1])||1}}))],m=`${t.kind}|${t.type}|${t.page}`;return(0,q.jsxs)(`div`,{className:`grid gap-3`,children:[(0,q.jsx)(Ve,{label:b(`File`,`ai-rank-suite`),value:m,onChange:e=>{let t=p.find(t=>`${t.t.kind}|${t.t.type}|${t.t.page}`===e);t&&d(t.t)},options:p.map(e=>({id:`${e.t.kind}|${e.t.type}|${e.t.page}`,label:e.label}))}),s&&(0,q.jsx)(M,{tone:`warning`,children:s}),r&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,q.jsx)(j,{tone:r.valid?`good`:`serious`,children:r.valid?(0,q.jsxs)(q.Fragment,{children:[`✓ `,b(`Valid XML`,`ai-rank-suite`)]}):b(`Malformed XML`,`ai-rank-suite`)}),(0,q.jsx)(j,{tone:`neutral`,children:r.kind===`index`?S(x(`%d file`,`%d files`,r.files,`ai-rank-suite`),r.files):S(x(`%d URL`,`%d URLs`,r.urls,`ai-rank-suite`),r.urls)}),(0,q.jsxs)(j,{tone:r.over?`serious`:`neutral`,children:[(r.bytes/1024).toFixed(1),` KB`]}),r.over&&(0,q.jsx)(M,{tone:`serious`,children:b(`Over Google’s 50,000-URL / 50 MB limit — lower URLs per file.`,`ai-rank-suite`)}),(0,q.jsxs)(`span`,{className:`ml-auto flex items-center gap-2`,children:[(0,q.jsx)(A,{variant:`ghost`,onClick:()=>u(!l),children:b(l?`No wrap`:`Wrap`,`ai-rank-suite`)}),(0,q.jsx)(A,{variant:`ghost`,onClick:f,children:b(`Copy XML`,`ai-rank-suite`)})]})]}),(0,q.jsx)(`pre`,{className:`ars-mono m-0 p-3 text-[11.5px]`,style:{background:`var(--ars-code-bg)`,color:`var(--ars-code-ink)`,borderRadius:`var(--ars-r-sm)`,maxHeight:460,overflow:`auto`,whiteSpace:l?`pre-wrap`:`pre`,wordBreak:l?`break-all`:`normal`},children:r.xml})]}),a&&!r&&(0,q.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Loading…`,`ai-rank-suite`)})]})}function ll({tab:e=`index`,onTab:t}){let{data:n,setData:r,s:i,update:a,save:o,run:s,busy:c,saved:l,error:u}=Wa(`/settings/sitemap`);if(!n)return(0,q.jsx)(_e,{error:u});let d=n.breakdown?.files||[],f=d.reduce((e,t)=>(t.slug&&(e[t.slug]=(e[t.slug]||0)+(Number(t.urls)||0)),e),{}),p=()=>s(async()=>r(await E.post(`/sitemap/flush`,{}))),m=(e,t)=>a({[e]:i[e].includes(t)?i[e].filter(e=>e!==t):[...i[e],t]}),h=()=>(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(A,{onClick:o,busy:c,children:b(`Save`,`ai-rank-suite`)}),l&&(0,q.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]})]}),g=d.filter(e=>e.url),_=Number(n.total_urls||0),v=n.permalinks?i.enabled?_===0?{tone:`warning`,text:b(`The sitemap is live but lists no URLs.`,`ai-rank-suite`),why:b(`Every content type and taxonomy is unticked below, or nothing is published in the ticked ones.`,`ai-rank-suite`)}:{tone:`good`,text:S(b(`%1$s URLs are listed at %2$s.`,`ai-rank-suite`),_.toLocaleString(),String(n.url||``).replace(/^https?:\/\//,``)),why:b(`Submit that address once in Search Console and Bing Webmaster Tools; after that they read it on their own.`,`ai-rank-suite`),action:b(`Open the sitemap`,`ai-rank-suite`),onAction:()=>window.open(n.url,`_blank`,`noopener`)}:{tone:`warning`,text:b(`The sitemap is switched off, so nothing is listed for crawlers.`,`ai-rank-suite`),why:b(`Search engines and AI crawlers discover pages faster from a sitemap than by following links. Turning it on costs nothing.`,`ai-rank-suite`)}:{tone:`bad`,text:b(`The sitemap URL cannot work: pretty permalinks are off.`,`ai-rank-suite`),why:b(`WordPress serves the sitemap under /sitemap.xml only when permalinks are enabled. Until then crawlers get a 404 and every option below is moot.`,`ai-rank-suite`),action:b(`Open permalink settings`,`ai-rank-suite`),onAction:()=>{window.location.href=(window.airanksuiteData?.adminUrl||`/wp-admin/`)+`options-permalink.php`}},y=[{id:`status`,label:b(`Sitemap`,`ai-rank-suite`),hint:b(`A sitemap is a promise to a crawler: these URLs exist, they matter, and this is when they last changed.`,`ai-rank-suite`),value:i.enabled?b(`Live`,`ai-rank-suite`):b(`Off`,`ai-rank-suite`),accent:i.enabled?void 0:`var(--ars-accent)`,sub:i.enabled?b(`announced in robots.txt`,`ai-rank-suite`):b(`core sitemap is serving instead`,`ai-rank-suite`)},{id:`urls`,label:b(`URLs listed`,`ai-rank-suite`),hint:b(`Anything noindexed, password-protected or excluded is left out — this count is what the files actually contain.`,`ai-rank-suite`),value:n.total_urls??`—`},{id:`files`,label:b(`Files in the index`,`ai-rank-suite`),hint:b(`Large sites are split into several files so each one stays fast to fetch and re-crawl.`,`ai-rank-suite`),value:g.length,sub:S(b(`%s URLs per file`,`ai-rank-suite`),i.per_page)},(n.breakdown?.excluded??0)>0&&{id:`excluded`,label:b(`Excluded by ID`,`ai-rank-suite`),hint:b(`Excluded by hand on the Content tab. Anything set to noindex is already left out.`,`ai-rank-suite`),value:n.breakdown.excluded}].filter(Boolean);return(0,q.jsxs)(`div`,{className:`ars-page`,children:[u&&(0,q.jsx)(M,{tone:`serious`,children:u}),(0,q.jsx)(pa,{...v}),!n.permalinks&&(0,q.jsx)(M,{tone:`serious`,children:b(`Pretty permalinks are disabled — the sitemap URL will not work. Enable them under Settings → Permalinks.`,`ai-rank-suite`)}),!i.enabled&&(0,q.jsx)(M,{tone:`warning`,children:b(`The sitemap is switched off. WordPress will fall back to its own core sitemap, which ignores every setting on this page.`,`ai-rank-suite`)}),(0,q.jsx)(be,{columns:y.length,metrics:y}),(0,q.jsx)(Ae,{tabs:[{id:`index`,label:b(`Index`,`ai-rank-suite`)},{id:`xml`,label:b(`XML`,`ai-rank-suite`)},{id:`content`,label:b(`Content`,`ai-rank-suite`)},{id:`special`,label:b(`Extras`,`ai-rank-suite`)}],active:e,onChange:t,right:(0,q.jsxs)(A,{variant:`ghost`,busy:c,onClick:p,children:[(0,q.jsx)(yt,{size:13}),b(`Rebuild now`,`ai-rank-suite`)]})}),e===`index`&&(0,q.jsxs)(k,{title:b(`The index, as it ships`,`ai-rank-suite`),subtitle:b(`The same list a crawler receives at your sitemap URL`,`ai-rank-suite`),action:(0,q.jsxs)(`a`,{href:n.url,target:`_blank`,rel:`noreferrer`,className:`text-[12.5px] font-medium inline-flex items-center gap-1`,style:{color:`var(--ars-brand)`,textDecoration:`none`},children:[n.url.replace(re.homeUrl.replace(/\/$/,``),``),` `,(0,q.jsx)(vt,{size:11})]}),children:[g.length===0?(0,q.jsxs)(`div`,{className:`ars-r-lg px-4 py-5 grid gap-2 place-items-start`,style:{background:`var(--ars-surface-2)`},children:[(0,q.jsx)(`div`,{className:`font-medium text-[13px]`,children:b(`The sitemap is empty`,`ai-rank-suite`)}),(0,q.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Nothing is selected, or everything selected has no published content yet.`,`ai-rank-suite`)}),(0,q.jsx)(A,{variant:`tonal`,onClick:()=>t(`content`),children:b(`Choose what to include`,`ai-rank-suite`)})]}):(0,q.jsx)(`div`,{className:`ars-table-wrap`,children:(0,q.jsxs)(`table`,{className:`ars-table`,children:[(0,q.jsx)(`thead`,{children:(0,q.jsxs)(`tr`,{children:[(0,q.jsx)(`th`,{children:b(`File`,`ai-rank-suite`)}),(0,q.jsx)(`th`,{children:b(`Contains`,`ai-rank-suite`)}),(0,q.jsx)(`th`,{className:`is-num`,children:b(`URLs`,`ai-rank-suite`)}),(0,q.jsx)(`th`,{className:`is-num`,children:b(`Last change`,`ai-rank-suite`)})]})}),(0,q.jsx)(`tbody`,{children:g.map(e=>(0,q.jsxs)(`tr`,{children:[(0,q.jsx)(`td`,{children:(0,q.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`ars-mono text-[11.5px] inline-flex items-center gap-1`,children:[e.url.replace(re.homeUrl.replace(/\/$/,``),``),` `,(0,q.jsx)(vt,{size:10})]})}),(0,q.jsx)(`td`,{className:`font-medium`,children:e.label}),(0,q.jsx)(`td`,{className:`is-num`,children:e.urls===null?`—`:e.urls}),(0,q.jsx)(`td`,{className:`is-num text-[12px]`,style:{color:`var(--ars-ink-3)`},children:e.lastmod?new Date(e.lastmod).toLocaleDateString():`—`})]},e.url))})]})}),d.some(e=>!e.url)&&(0,q.jsx)(`div`,{className:`mt-3`,children:(0,q.jsxs)(M,{tone:`info`,children:[b(`Selected but empty, so not listed:`,`ai-rank-suite`),` `,d.filter(e=>!e.url).map(e=>e.label).join(`, `),`. `,b(`They appear automatically as soon as they have published content.`,`ai-rank-suite`)]})})]}),e===`xml`&&(0,q.jsx)(k,{title:b(`The XML a crawler receives`,`ai-rank-suite`),subtitle:b(`Opening the sitemap in a browser shows the styled table, not the file — this shows the bytes`,`ai-rank-suite`),action:(0,q.jsxs)(`a`,{href:`${re.homeUrl.replace(/\/$/,``)}/sitemap_index.xml`,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 text-[12.5px]`,children:[`sitemap_index.xml `,(0,q.jsx)(vt,{size:12})]}),children:(0,q.jsx)(cl,{files:d})}),e===`content`&&(0,q.jsxs)(`div`,{className:`grid gap-4`,children:[(0,q.jsx)(k,{title:b(`Content types`,`ai-rank-suite`),subtitle:b(`Pick what a crawler should be told about`,`ai-rank-suite`),action:(0,q.jsx)(h,{}),children:(0,q.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:n.post_types.map(e=>(0,q.jsx)(sl,{item:e,checked:i.post_types.includes(e.name),inSitemap:f[e.name]??null,onToggle:()=>m(`post_types`,e.name)},e.name))})}),(0,q.jsx)(k,{title:b(`Taxonomies`,`ai-rank-suite`),subtitle:b(`Category and tag archives. Worth including when they are real landing pages, not just lists.`,`ai-rank-suite`),children:(0,q.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:n.taxonomies.map(e=>(0,q.jsx)(sl,{item:e,checked:i.taxonomies.includes(e.name),inSitemap:f[e.name]??null,onToggle:()=>m(`taxonomies`,e.name)},e.name))})}),(0,q.jsx)(k,{title:b(`Options`,`ai-rank-suite`),action:(0,q.jsx)(h,{}),children:(0,q.jsxs)(`div`,{className:`grid gap-4`,children:[(0,q.jsx)(Ee,{checked:!!i.enabled,onChange:e=>a({enabled:e}),label:b(`Publish the sitemap`,`ai-rank-suite`)}),(0,q.jsx)(Ee,{checked:!!i.include_images,onChange:e=>a({include_images:e}),label:b(`Include images (helps image search and AI crawlers)`,`ai-rank-suite`)}),(0,q.jsx)(Ee,{checked:!!i.include_featured,onChange:e=>a({include_featured:e}),label:b(`Include the featured image, even when it is not in the content`,`ai-rank-suite`)}),(0,q.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`URLs per file`,`ai-rank-suite`)}),(0,q.jsx)(`input`,{type:`number`,min:`50`,max:`1000`,value:i.per_page,onChange:e=>a({per_page:Number(e.target.value)}),style:{width:130}}),(0,q.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`Google accepts up to 50,000, but smaller files are fetched and re-crawled faster.`,`ai-rank-suite`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Exclude post IDs`,`ai-rank-suite`)}),(0,q.jsx)(`input`,{type:`text`,placeholder:`12, 45, 108`,value:i.exclude_ids,onChange:e=>a({exclude_ids:e.target.value})}),(0,q.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`Pages set to noindex, or excluded in their own analysis panel, are already left out.`,`ai-rank-suite`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Exclude term IDs`,`ai-rank-suite`)}),(0,q.jsx)(`input`,{type:`text`,value:i.exclude_terms||``,onChange:e=>a({exclude_terms:e.target.value}),placeholder:`7, 19`,style:{width:`100%`}}),(0,q.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`Category or tag IDs to keep out of the taxonomy sitemaps, comma-separated. The ID is in the URL when you edit the term.`,`ai-rank-suite`)})]})]})]})})]}),e===`special`&&(0,q.jsxs)(`div`,{className:`grid gap-4`,children:[(0,q.jsx)(k,{title:b(`Google News`,`ai-rank-suite`),subtitle:b(`A separate feed of articles from the last 48 hours — only useful if you are accepted into Google News`,`ai-rank-suite`),action:(0,q.jsx)(h,{}),children:(0,q.jsxs)(`div`,{className:`grid gap-4`,children:[(0,q.jsx)(Ee,{checked:!!i.news_enabled,onChange:e=>a({news_enabled:e}),label:b(`Publish a Google News sitemap`,`ai-rank-suite`)}),i.news_enabled&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Publication name`,`ai-rank-suite`)}),(0,q.jsx)(`input`,{type:`text`,placeholder:re.siteName,value:i.news_name,onChange:e=>a({news_name:e.target.value})}),(0,q.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`Must match the name registered in Google Publisher Center exactly.`,`ai-rank-suite`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`label`,{className:`block font-medium mb-1.5`,children:b(`Which content types count as news`,`ai-rank-suite`)}),(0,q.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:n.post_types.map(e=>(0,q.jsx)(sl,{item:e,checked:i.news_types.includes(e.name),onToggle:()=>m(`news_types`,e.name)},e.name))})]}),(0,q.jsxs)(`a`,{href:n.news_url,target:`_blank`,rel:`noreferrer`,className:`text-[12.5px] inline-flex items-center gap-1`,children:[n.news_url,` `,(0,q.jsx)(vt,{size:11})]})]})]})}),(0,q.jsx)(k,{title:b(`Video`,`ai-rank-suite`),subtitle:b(`YouTube and Vimeo embeds are detected in your content automatically — nothing to tag by hand`,`ai-rank-suite`),action:(0,q.jsx)(h,{}),children:(0,q.jsxs)(`div`,{className:`grid gap-3`,children:[(0,q.jsx)(Ee,{checked:!!i.video_enabled,onChange:e=>a({video_enabled:e}),label:b(`Publish a video sitemap`,`ai-rank-suite`)}),i.video_enabled&&(0,q.jsxs)(`a`,{href:n.video_url,target:`_blank`,rel:`noreferrer`,className:`text-[12.5px] inline-flex items-center gap-1`,children:[n.video_url,` `,(0,q.jsx)(vt,{size:11})]})]})})]})]})}var ul,q,dl=o((()=>{C(),ul=u(f(),1),Ka(),ha(),D(),at(),Ft(),pe(),q=O()}));function fl(){let[e,t]=(0,pl.useState)(null),[n,r]=(0,pl.useState)(``),[i,a]=(0,pl.useState)([]),[o,s]=(0,pl.useState)(!1),[c,l]=(0,pl.useState)(!1),[u,d]=(0,pl.useState)(null),f=()=>E.get(`/htaccess`).then(e=>{t(e),r(e.ours||``)}).catch(e=>d(e.message));if((0,pl.useEffect)(()=>{f()},[]),!e)return(0,ml.jsx)(_e,{error:u});if(!e.supported)return(0,ml.jsx)(k,{title:`.htaccess`,subtitle:b(`Not applicable on this server`,`ai-rank-suite`),children:(0,ml.jsxs)(M,{tone:`info`,children:[b(`This site runs on`,`ai-rank-suite`),` `,(0,ml.jsx)(`code`,{children:e.server||b(`a server`,`ai-rank-suite`)}),b(`, which does not read`,`ai-rank-suite`),` `,(0,ml.jsx)(`code`,{children:`.htaccess`}),` `,b(`at all. Nginx and Caddy need the equivalent rules in the server configuration, which only your host can change — editing a file here would do nothing and look like it worked.`,`ai-rank-suite`)]})});let p=async e=>{r(e);try{let t=await E.post(`/htaccess/check`,{block:e});a(t.problems||[])}catch{}},m=async()=>{s(!0),d(null);try{let e=await E.put(`/htaccess`,{block:n});t(e),l(!0),a([]),setTimeout(()=>l(!1),2400)}catch(e){d(e.message)}finally{s(!1)}},h=async e=>{s(!0),d(null);try{let n=await E.post(`/htaccess/restore`,{id:e});t(n),r(n.ours||``)}catch(e){d(e.message)}finally{s(!1)}},g=e=>p(`${n?`${n}\n\n`:``}${e.body}`);return(0,ml.jsxs)(`div`,{className:`ars-page`,children:[(0,ml.jsx)(k,{title:`.htaccess`,subtitle:b(`Server rules — caching, compression, security headers and redirects`,`ai-rank-suite`),action:e.writable?(0,ml.jsx)(j,{tone:`good`,children:b(`Writable`,`ai-rank-suite`)}):(0,ml.jsx)(j,{tone:`serious`,children:b(`Read-only`,`ai-rank-suite`)}),children:(0,ml.jsxs)(`div`,{className:`grid gap-3`,children:[(0,ml.jsxs)(ot,{title:b(`Read this before you edit`,`ai-rank-suite`),open:!n,children:[(0,ml.jsx)(`p`,{children:b(`A stray character here does not produce a warning — it produces a 500 on every URL of the site, including wp-admin, which would leave you unable to use this plugin to undo it.`,`ai-rank-suite`)}),(0,ml.jsxs)(`p`,{children:[b(`So only`,`ai-rank-suite`),` `,(0,ml.jsx)(`em`,{children:b(`our`,`ai-rank-suite`)}),` `,b(`block is editable. WordPress’s own rewrite rules and anything your host put there are read-only and preserved byte for byte. Every save takes a backup first, the last ten are kept, and you can restore any of them from this screen — recovery never needs FTP.`,`ai-rank-suite`)]})]}),!e.writable&&(0,ml.jsxs)(M,{tone:`warning`,children:[(0,ml.jsx)(`code`,{children:e.path}),` `,b(`is not writable, so nothing here can be saved. Either make it writable, or copy the block below and paste it into the file yourself.`,`ai-rank-suite`)]}),(0,ml.jsxs)(`div`,{children:[(0,ml.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Your rules`,`ai-rank-suite`)}),(0,ml.jsx)(`textarea`,{rows:14,className:`ars-mono`,style:{fontSize:12,lineHeight:1.6,whiteSpace:`pre`,overflowWrap:`normal`,overflowX:`auto`},value:n,placeholder:b(`# Add Apache directives here. The BEGIN/END markers are added for you.`,`ai-rank-suite`),onChange:e=>p(e.target.value)}),(0,ml.jsx)(`p`,{className:`m-0 mt-1.5 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:S(b(`%1$s · %2$s KB total on disk`,`ai-rank-suite`),e.path,(e.bytes/1024).toFixed(1))})]}),i.length>0&&(0,ml.jsxs)(M,{tone:`serious`,children:[(0,ml.jsx)(`strong`,{children:b(`Not saveable yet:`,`ai-rank-suite`)}),(0,ml.jsx)(`ul`,{className:`m-0 mt-1 pl-5`,children:i.map((e,t)=>(0,ml.jsx)(`li`,{children:e},t))})]}),(0,ml.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,ml.jsx)(A,{onClick:m,busy:o,disabled:!e.writable||i.length>0,children:b(`Save to .htaccess`,`ai-rank-suite`)}),(0,ml.jsx)(A,{variant:`ghost`,onClick:f,disabled:o,children:b(`Discard changes`,`ai-rank-suite`)}),c&&(0,ml.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved · backup taken`,`ai-rank-suite`)]})]}),u&&(0,ml.jsx)(M,{tone:`serious`,children:u})]})}),(0,ml.jsx)(k,{title:b(`Ready-made blocks`,`ai-rank-suite`),subtitle:b(`So nobody has to write Apache from memory`,`ai-rank-suite`),children:(0,ml.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:(e.recipes||[]).map(e=>(0,ml.jsxs)(`button`,{type:`button`,onClick:()=>g(e),className:`ars-pick`,children:[(0,ml.jsxs)(`span`,{className:`ars-pick-title`,children:[e.label,(0,ml.jsxs)(`span`,{style:{marginLeft:`auto`,color:`var(--ars-brand)`,fontSize:12},children:[`+ `,b(`Add`,`ai-rank-suite`)]})]}),(0,ml.jsx)(`span`,{className:`ars-pick-note`,children:e.desc})]},e.id))})}),(0,ml.jsx)(k,{title:b(`Backups`,`ai-rank-suite`),subtitle:e.backups.length>0?b(`The last ten states of the whole file, newest first`,`ai-rank-suite`):b(`A backup is taken automatically before every save`,`ai-rank-suite`),children:e.backups.length===0?(0,ml.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Nothing saved yet, so there is nothing to roll back to.`,`ai-rank-suite`)}):(0,ml.jsx)(`div`,{className:`ars-table-wrap`,children:(0,ml.jsxs)(`table`,{className:`ars-table`,children:[(0,ml.jsx)(`thead`,{children:(0,ml.jsxs)(`tr`,{children:[(0,ml.jsx)(`th`,{children:b(`Taken`,`ai-rank-suite`)}),(0,ml.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Size`,`ai-rank-suite`)}),(0,ml.jsx)(`th`,{className:`is-num is-mid`})]})}),(0,ml.jsx)(`tbody`,{children:e.backups.map(e=>(0,ml.jsxs)(`tr`,{children:[(0,ml.jsx)(`td`,{children:new Date(e.time*1e3).toLocaleString()}),(0,ml.jsxs)(`td`,{className:`is-num`,children:[(e.bytes/1024).toFixed(1),` KB`]}),(0,ml.jsx)(`td`,{className:`is-num`,children:(0,ml.jsx)(A,{variant:`ghost`,onClick:()=>h(e.id),disabled:o,children:b(`Restore`,`ai-rank-suite`)})})]},e.id))})]})})})]})}var pl,ml,hl=o((()=>{pl=u(f(),1),C(),D(),at(),ct(),ml=O()})),gl=c({default:()=>Cl});function _l(e){let[t,n]=(0,wl.useState)(null),[r,i]=(0,wl.useState)(!1),[a,o]=(0,wl.useState)(!1),[s,c]=(0,wl.useState)(null);return(0,wl.useEffect)(()=>{E.get(e).then(n).catch(e=>c(e.message))},[e]),{data:t,update:e=>n(t=>({...t,settings:{...t.settings,...e}})),save:async()=>{i(!0),c(null);try{n(await E.put(e,t.settings)),o(!0),setTimeout(()=>o(!1),2200)}catch(e){c(e.message)}finally{i(!1)}},busy:r,saved:a,error:s}}function vl(){let{data:e,update:t,save:n,busy:r,saved:i,error:a}=_l(`/settings/robots`);if(!e)return(0,J.jsx)(_e,{error:a});let o=e.settings,s=[{key:`noindex_author`,label:b(`Author archives`,`ai-rank-suite`),hint:b(`Usually duplicate content on single-author sites`,`ai-rank-suite`)},{key:`noindex_date`,label:b(`Date archives`,`ai-rank-suite`),hint:b(`Rarely useful as search results`,`ai-rank-suite`)},{key:`noindex_search`,label:b(`Internal search results`,`ai-rank-suite`),hint:b(`Google explicitly discourages indexing these`,`ai-rank-suite`)},{key:`noindex_attachment`,label:b(`Attachment pages`,`ai-rank-suite`),hint:b(`Thin pages that only hold one media file`,`ai-rank-suite`)},{key:`noindex_paginated`,label:b(`Paginated archive pages`,`ai-rank-suite`),hint:b(`Page 2, 3, … of an archive`,`ai-rank-suite`)}],c=s.filter(e=>!!o[e.key]).length,l={tone:c===0?`warning`:`good`,text:c===0?b(`Every archive type is left indexable — search engines can spend their crawl on author, date and search pages.`,`ai-rank-suite`):o.robots_txt_enabled?S(b(`%1$d of %2$d archive types are set to noindex and custom robots.txt rules are on.`,`ai-rank-suite`),c,s.length):S(b(`%1$d of %2$d archive types are set to noindex.`,`ai-rank-suite`),c,s.length),why:b(c===0?`Author, date, search and attachment archives are the pages nobody wants to rank; noindexing them keeps the crawl on the pages that matter.`:`Blocked archives keep the crawl on real content. Anything here changes robots meta on the next request — no cache purge needed beyond the plugin's own.`,`ai-rank-suite`)};return(0,J.jsxs)(`div`,{className:`grid gap-4`,children:[a&&(0,J.jsx)(M,{tone:`serious`,children:a}),(0,J.jsx)(pa,{...l}),(0,J.jsx)(k,{title:b(`Indexing rules for archives`,`ai-rank-suite`),subtitle:b(`Keep thin, duplicated pages out of search results and AI training sets`,`ai-rank-suite`),action:i&&(0,J.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),children:(0,J.jsxs)(`div`,{className:`grid gap-3`,children:[s.map(e=>(0,J.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`div`,{className:`font-medium`,children:S(b(`Set %s to noindex`,`ai-rank-suite`),e.label)}),(0,J.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:e.hint})]}),(0,J.jsx)(Ee,{checked:!!o[e.key],onChange:n=>t({[e.key]:n})})]},e.key)),(0,J.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2 mt-1`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Max snippet length`,`ai-rank-suite`)}),(0,J.jsx)(`input`,{type:`number`,value:o.max_snippet,onChange:e=>t({max_snippet:Number(e.target.value)})}),(0,J.jsx)(`div`,{className:`text-[12px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`-1 = no limit (recommended)`,`ai-rank-suite`)})]}),(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Max image preview`,`ai-rank-suite`)}),(0,J.jsxs)(`select`,{value:o.max_image_preview,onChange:e=>t({max_image_preview:e.target.value}),children:[(0,J.jsx)(`option`,{value:`large`,children:`large`}),(0,J.jsx)(`option`,{value:`standard`,children:`standard`}),(0,J.jsx)(`option`,{value:`none`,children:`none`})]})]})]}),(0,J.jsx)(`div`,{children:(0,J.jsx)(A,{onClick:n,busy:r,children:b(`Save`,`ai-rank-suite`)})})]})}),(0,J.jsxs)(k,{title:`robots.txt`,subtitle:b(`Custom rules are appended after the AI crawler block`,`ai-rank-suite`),action:(0,J.jsx)(Ee,{checked:!!o.robots_txt_enabled,onChange:e=>t({robots_txt_enabled:e}),label:b(`Enable custom rules`,`ai-rank-suite`)}),children:[e.physical_robots_txt&&(0,J.jsx)(`div`,{className:`mb-3`,children:(0,J.jsxs)(M,{tone:`serious`,children:[b(`A physical`,`ai-rank-suite`),` `,(0,J.jsx)(`code`,{children:`robots.txt`}),` `,b(`file exists on your server and overrides everything here. Delete it so WordPress can serve robots.txt dynamically.`,`ai-rank-suite`)]})}),(0,J.jsx)(`textarea`,{rows:8,className:`ars-mono`,placeholder:`User-agent: *
    89 Disallow: /private/`,value:o.robots_txt_custom,onChange:e=>t({robots_txt_custom:e.target.value}),disabled:!o.robots_txt_enabled}),(0,J.jsxs)(`div`,{className:`flex items-center gap-3 mt-2`,children:[(0,J.jsx)(A,{onClick:n,busy:r,children:b(`Save`,`ai-rank-suite`)}),(0,J.jsxs)(`a`,{href:e.robots_url,target:`_blank`,rel:`noreferrer`,className:`text-[12.5px] inline-flex items-center gap-1`,children:[b(`View robots.txt`,`ai-rank-suite`),(0,J.jsx)(vt,{size:11})]})]})]})]})}function yl(){let{data:e,update:t,save:n,busy:r,saved:i,error:a}=_l(`/settings/breadcrumbs`);if(!e)return(0,J.jsx)(_e,{error:a});let o=e.settings;return(0,J.jsxs)(`div`,{className:`grid gap-4`,children:[a&&(0,J.jsx)(M,{tone:`serious`,children:a}),(0,J.jsx)(k,{title:b(`Breadcrumbs`,`ai-rank-suite`),subtitle:b(`Shown via the [airanksuite_breadcrumbs] shortcode — and always emitted as BreadcrumbList schema`,`ai-rank-suite`),action:(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[i&&(0,J.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,J.jsx)(Ee,{checked:!!o.enabled,onChange:e=>t({enabled:e}),label:b(`Enabled`,`ai-rank-suite`)})]}),children:(0,J.jsxs)(`div`,{className:`grid gap-4`,children:[(0,J.jsxs)(`div`,{className:`ars-r-md px-4 py-3`,style:{background:`var(--ars-surface-2)`},children:[(0,J.jsx)(`div`,{className:`text-[11px] font-semibold mb-1.5`,style:{color:`var(--ars-ink-3)`},children:b(`PREVIEW`,`ai-rank-suite`)}),(0,J.jsxs)(`div`,{className:`text-[13px]`,children:[o.prefix&&(0,J.jsxs)(`span`,{style:{color:`var(--ars-ink-3)`},children:[o.prefix,` `]}),e.preview.map((t,n)=>(0,J.jsxs)(`span`,{children:[n>0&&(0,J.jsxs)(`span`,{style:{color:`var(--ars-ink-3)`},children:[` `,o.separator,` `]}),(0,J.jsx)(`span`,{style:{color:n===e.preview.length-1?`var(--ars-ink)`:`var(--ars-brand)`},children:t})]},n))]})]}),(0,J.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Home label`,`ai-rank-suite`)}),(0,J.jsx)(`input`,{type:`text`,placeholder:b(`Home`,`ai-rank-suite`),value:o.home_label,onChange:e=>t({home_label:e.target.value})})]}),(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Separator`,`ai-rank-suite`)}),(0,J.jsx)(`input`,{type:`text`,value:o.separator,onChange:e=>t({separator:e.target.value})})]}),(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Prefix (optional)`,`ai-rank-suite`)}),(0,J.jsx)(`input`,{type:`text`,placeholder:b(`You are here:`,`ai-rank-suite`),value:o.prefix,onChange:e=>t({prefix:e.target.value})})]})]}),(0,J.jsx)(Ee,{checked:!!o.show_current,onChange:e=>t({show_current:e}),label:b(`Show the current page as the last crumb`,`ai-rank-suite`)}),(0,J.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,J.jsx)(A,{onClick:n,busy:r,children:b(`Save`,`ai-rank-suite`)})}),(0,J.jsxs)(`div`,{className:`text-[12px] grid gap-1`,style:{color:`var(--ars-ink-3)`},children:[(0,J.jsxs)(`span`,{children:[b(`Shortcode:`,`ai-rank-suite`),(0,J.jsx)(`code`,{className:`ars-mono`,children:`[airanksuite_breadcrumbs]`})]}),(0,J.jsxs)(`span`,{children:[b(`In a theme template:`,`ai-rank-suite`),` `,(0,J.jsx)(`code`,{className:`ars-mono`,children:`<?php echo do_shortcode( '[airanksuite_breadcrumbs]' ); ?>`})]})]})]})})]})}function bl(){let[e,t]=(0,wl.useState)(null),[n,r]=(0,wl.useState)(null),[i,a]=(0,wl.useState)(null),o=(e=!1)=>E.get(`/image-seo/audit${e?`?fresh=1`:``}`).then(t).catch(e=>r(e.message));(0,wl.useEffect)(()=>{o()},[]);let s=async()=>{r(null);let t=e?.no_alt||0,n=0,i=0,s=0;a({filled:i,skipped:s,total:t,done:!1});try{for(;;){let e=await E.post(`/image-seo/fill`,{offset:n});if(i+=e.filled,s+=e.skipped,n=e.offset,a({filled:i,skipped:s,total:t,done:e.done}),e.done)break}await o(!0)}catch(e){r(e.message),a(null)}};if(n)return(0,J.jsx)(M,{tone:`serious`,children:n});if(!e)return(0,J.jsx)(k,{children:b(`Counting the media library…`,`ai-rank-suite`)});let c=e=>e>=1048576?`${(e/1024/1024).toFixed(1)} MB`:`${Math.round(e/1024)} KB`;return(0,J.jsx)(k,{title:b(`Media library`,`ai-rank-suite`),subtitle:e.sampled?b(`Dimensions and weight read for the newest 5,000 images.`,`ai-rank-suite`):b(`Every image attachment on this site, counted.`,`ai-rank-suite`),action:(0,J.jsx)(A,{variant:`ghost`,onClick:()=>o(!0),children:b(`Recount`,`ai-rank-suite`)}),children:(0,J.jsxs)(`div`,{className:`grid gap-3`,children:[(0,J.jsx)(be,{columns:4,metrics:[{id:`total`,label:b(`Images`,`ai-rank-suite`),value:Number(e.total).toLocaleString()},{id:`no_alt`,label:b(`Without alt text`,`ai-rank-suite`),value:Number(e.no_alt).toLocaleString(),accent:e.no_alt?`var(--ars-warning)`:`var(--ars-good)`,hint:b(`Read by screen readers, image search and multimodal assistants. An empty alt is an image that says nothing.`,`ai-rank-suite`)},{id:`oversized`,label:b(`Wider than 2500 px`,`ai-rank-suite`),value:Number(e.oversized).toLocaleString(),accent:e.oversized?`var(--ars-warning)`:`var(--ars-good)`,hint:b(`Bigger than any screen shows. Resize before upload; the page loads faster and image search prefers it.`,`ai-rank-suite`)},{id:`heavy`,label:b(`Heavier than 500 KB`,`ai-rank-suite`),value:Number(e.heavy).toLocaleString(),accent:e.heavy?`var(--ars-warning)`:`var(--ars-good)`}]}),i?(0,J.jsx)(Ne,{label:i.done?b(`Done`,`ai-rank-suite`):b(`Writing alt texts…`,`ai-rank-suite`),done:Math.min(i.total,i.filled+i.skipped),total:i.total,note:S(b(`%1$s written, %2$s skipped because the template and the image gave nothing to say`,`ai-rank-suite`),Number(i.filled).toLocaleString(),Number(i.skipped).toLocaleString())}):(0,J.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[(0,J.jsx)(A,{onClick:s,disabled:!e.no_alt,children:S(b(`Write alt text for %s images from the template`,`ai-rank-suite`),Number(e.no_alt).toLocaleString())}),(0,J.jsx)(`span`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:S(b(`Template: %s. Existing alt texts are never touched.`,`ai-rank-suite`),e.template||`%filename%`)})]}),e.largest&&e.largest.length>0&&(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide mb-1.5`,style:{color:`var(--ars-ink-3)`},children:b(`Largest images`,`ai-rank-suite`)}),(0,J.jsx)(`ul`,{className:`m-0 p-0 grid gap-1`,style:{listStyle:`none`},children:e.largest.map(e=>(0,J.jsxs)(`li`,{className:`flex items-center justify-between gap-3 text-[12.5px]`,children:[(0,J.jsx)(`a`,{href:e.edit,target:`_blank`,rel:`noreferrer`,className:`truncate`,children:e.title||`#${e.id}`}),(0,J.jsxs)(`span`,{className:`tabular-nums`,style:{color:`var(--ars-ink-3)`},children:[e.width,` × `,e.height,` px`,e.bytes?` · ${c(e.bytes)}`:``]})]},e.id))})]})]})})}function xl(){let{data:e,update:t,save:n,busy:r,saved:i,error:a}=_l(`/settings/image-seo`);if(!e)return(0,J.jsx)(_e,{error:a});let o=e.settings;return(0,J.jsxs)(`div`,{className:`grid gap-4`,children:[a&&(0,J.jsx)(M,{tone:`serious`,children:a}),(0,J.jsx)(bl,{}),(0,J.jsx)(k,{title:b(`Image SEO`,`ai-rank-suite`),subtitle:b(`Fill missing alt text automatically — good for search, required for accessibility`,`ai-rank-suite`),action:i&&(0,J.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),children:(0,J.jsxs)(`div`,{className:`grid gap-3`,children:[(0,J.jsx)(Ee,{checked:!!o.auto_alt,onChange:e=>t({auto_alt:e}),label:b(`Add alt text when an image has none`,`ai-rank-suite`)}),(0,J.jsx)(Ee,{checked:!!o.auto_title,onChange:e=>t({auto_title:e}),label:b(`Add title attribute when missing`,`ai-rank-suite`)}),(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Alt text template`,`ai-rank-suite`)}),(0,J.jsx)(`input`,{type:`text`,value:o.alt_template,onChange:e=>t({alt_template:e.target.value})}),(0,J.jsx)(`div`,{className:`text-[12px] mt-1.5 flex flex-wrap gap-1.5`,style:{color:`var(--ars-ink-3)`},children:[`%filename%`,`%title%`,`%caption%`,`%postname%`,`%sitename%`].map(e=>(0,J.jsx)(`code`,{className:`ars-mono px-1.5 py-0.5 rounded`,style:{background:`var(--ars-surface-2)`},children:e},e))})]}),(0,J.jsx)(`div`,{children:(0,J.jsx)(A,{onClick:n,busy:r,children:b(`Save`,`ai-rank-suite`)})}),(0,J.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Existing alt texts are never overwritten — this only fills gaps.`,`ai-rank-suite`)})]})}),(0,J.jsx)(k,{title:b(`Outbound links`,`ai-rank-suite`),subtitle:b(`How links to other websites are treated`,`ai-rank-suite`),children:(0,J.jsxs)(`div`,{className:`grid gap-3`,children:[(0,J.jsx)(Ee,{checked:!!o.link_nofollow,onChange:e=>t({link_nofollow:e}),label:b(`Add rel="nofollow" to external links`,`ai-rank-suite`)}),(0,J.jsx)(Ee,{checked:!!o.link_new_tab,onChange:e=>t({link_new_tab:e}),label:b(`Open external links in a new tab`,`ai-rank-suite`)}),(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Never touch these domains (one per line)`,`ai-rank-suite`)}),(0,J.jsx)(`textarea`,{rows:3,className:`ars-mono`,placeholder:`partner.com
    90 affiliate-network.com`,value:o.link_exclude,onChange:e=>t({link_exclude:e.target.value})})]}),(0,J.jsx)(`div`,{children:(0,J.jsx)(A,{onClick:n,busy:r,children:b(`Save`,`ai-rank-suite`)})})]})})]})}function Sl(){let{data:e,update:t,save:n,busy:r,saved:i,error:a}=_l(`/settings/hardening`);if(!e)return(0,J.jsx)(_e,{error:a});let o=e.settings,s=[{key:`hide_generator`,label:b(`Hide the WordPress version`,`ai-rank-suite`),hint:b(`Removes the generator meta tag — attackers match versions to known exploits`,`ai-rank-suite`)},{key:`strip_ver`,label:b(`Strip ?ver= from assets`,`ai-rank-suite`),hint:b(`Plugin and theme versions leak through asset URLs`,`ai-rank-suite`)},{key:`remove_headers`,label:b(`Remove RSD, wlwmanifest & shortlink tags`,`ai-rank-suite`),hint:b(`Legacy discovery endpoints nothing modern needs`,`ai-rank-suite`)},{key:`disable_xmlrpc`,label:b(`Disable XML-RPC`,`ai-rank-suite`),hint:b(`A common brute-force and pingback-DDoS door. Jetpack and the mobile app need it — leave off in that case`,`ai-rank-suite`)},{key:`hide_login_error`,label:b(`Generic login errors`,`ai-rank-suite`),hint:b(`“Wrong password” confirms a username exists — replace with a neutral message`,`ai-rank-suite`)},{key:`block_enum`,label:b(`Block user enumeration`,`ai-rank-suite`),hint:b(`?author=1 redirects and the public REST users list reveal usernames for brute-forcing`,`ai-rank-suite`)},{key:`security_headers`,label:b(`Send security headers`,`ai-rank-suite`),hint:b(`X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy`,`ai-rank-suite`)},{key:`hide_admin_bar`,label:b(`Hide the AI Rank Suite admin-bar menu`,`ai-rank-suite`),hint:b(`Removes this plugin’s own entry from the WordPress toolbar. Everything stays reachable from the plugin screens`,`ai-rank-suite`)}];return(0,J.jsxs)(`div`,{className:`grid gap-4`,children:[a&&(0,J.jsx)(M,{tone:`serious`,children:a}),(0,J.jsx)(k,{title:b(`Ghost Mode`,`ai-rank-suite`),subtitle:b(`Hide WordPress fingerprints and close the doors attackers probe first — each toggle removes one signal without breaking the site`,`ai-rank-suite`),action:(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[i&&(0,J.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,J.jsx)(A,{onClick:n,busy:r,children:b(`Save`,`ai-rank-suite`)})]}),children:(0,J.jsxs)(`div`,{className:`grid gap-4`,children:[(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-3 ars-r-lg px-4 py-3`,style:{background:o.enabled?`var(--ars-good-tonal)`:`var(--ars-surface-2)`},children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`div`,{className:`font-semibold text-[13.5px]`,children:b(`Enable Ghost Mode`,`ai-rank-suite`)}),(0,J.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--ars-ink-2)`},children:b(`Master switch — the toggles below only apply while this is on.`,`ai-rank-suite`)})]}),(0,J.jsx)(Ee,{checked:!!o.enabled,onChange:e=>t({enabled:e})})]}),(0,J.jsx)(`div`,{className:`grid gap-3`,style:{opacity:o.enabled?1:.5},children:s.map(e=>(0,J.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`div`,{className:`font-medium`,children:e.label}),(0,J.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:e.hint})]}),(0,J.jsx)(Ee,{checked:!!o[e.key],onChange:n=>t({[e.key]:n}),disabled:!o.enabled})]},e.key))}),(0,J.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Changes take effect on the next page load. Nothing here touches your content or SEO output.`,`ai-rank-suite`)})]})})]})}function Cl({tab:e=`robots`,onTab:t}){let n={robots:vl,htaccess:fl,breadcrumbs:yl,images:xl,ghost:Sl}[e];return(0,J.jsxs)(`div`,{className:`ars-page`,children:[(0,J.jsx)(Ae,{tabs:[{id:`robots`,label:b(`Robots`,`ai-rank-suite`)},{id:`htaccess`,label:`.htaccess`},{id:`breadcrumbs`,label:b(`Breadcrumbs`,`ai-rank-suite`)},{id:`images`,label:b(`Images`,`ai-rank-suite`)},{id:`ghost`,label:b(`Ghost Mode`,`ai-rank-suite`)}],active:e,onChange:t}),(0,J.jsx)(n,{})]})}var wl,J,Tl=o((()=>{wl=u(f(),1),C(),D(),ha(),hl(),at(),Ft(),J=O()}));function El({record:e,onImported:t}){let[n,r]=(0,Dl.useState)(null),[i,a]=(0,Dl.useState)(null),[o,s]=(0,Dl.useState)(``),[c,l]=(0,Dl.useState)(``),[u,d]=(0,Dl.useState)(null),[f,p]=(0,Dl.useState)(``),[m,h]=(0,Dl.useState)(null),g=()=>E.get(`/local-seo/listings`).then(r).catch(e=>a(e.message));(0,Dl.useEffect)(()=>{g()},[]);let _=async(e,t)=>{p(e),a(null);try{await t()}catch(e){a(e.message)}finally{p(``)}},v=()=>_(`key`,async()=>{r(await E.post(`/local-seo/listings`,{key:o})),s(``)}),y=()=>_(`search`,async()=>d((await E.post(`/local-seo/listings/search`,{query:c})).places||[])),C=e=>_(`fetch`,async()=>{r(await E.post(`/local-seo/listings/fetch`,{place_id:e})),d(null)}),w=e=>_(e?`overwrite`:`import`,async()=>{let n=await E.post(`/local-seo/listings/import`,{overwrite:e});r(n),h(n.imported||[]),t&&t()}),ee=()=>_(`forget`,async()=>r(await E.del(`/local-seo/listings/google`)));if(!n)return null;let T=n.google,te=(n.compare||[]).filter(e=>e.match===!1),ne=(n.history||[]).map(e=>({label:e.day.slice(5),value:e.reviews,rating:e.rating})),re=n.history?.[0],ie=n.history?.[n.history.length-1];return(0,Ol.jsxs)(`div`,{className:`grid gap-4`,children:[i&&(0,Ol.jsx)(M,{tone:`serious`,children:i}),T?te.length===0?(0,Ol.jsxs)(M,{tone:`good`,children:[(0,Ol.jsx)(`b`,{children:b(`Google Business Profile matches your record`,`ai-rank-suite`)}),` — `,b(`name, address, phone and website agree with what Google shows.`,`ai-rank-suite`),` `,T.reviews?S(b(`%1$s ★ from %2$s reviews.`,`ai-rank-suite`),T.rating,T.reviews.toLocaleString()):``]}):(0,Ol.jsxs)(M,{tone:`warning`,children:[(0,Ol.jsx)(`b`,{children:S(x(`%d field differs between your record and Google`,`%d fields differ between your record and Google`,te.length,`ai-rank-suite`),te.length)}),` `,`— `,te.map(e=>e.label).join(`, `),`. `,b(`To a matching engine a different street spelling is a different business. Fix one side: import Google’s values below, or edit the Profile tab and then correct the Google listing to match.`,`ai-rank-suite`)]}):(0,Ol.jsxs)(M,{tone:`info`,children:[(0,Ol.jsx)(`b`,{children:b(`No directory is connected yet.`,`ai-rank-suite`)}),` `,b(`Google Business Profile is where a “near me” answer starts; connect it to check that your record and Google’s agree character for character.`,`ai-rank-suite`)]}),(0,Ol.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2 items-stretch`,children:[(0,Ol.jsx)(k,{title:b(`Google Business Profile`,`ai-rank-suite`),subtitle:b(`Read through the Places API — the public listing, live from Google`,`ai-rank-suite`),action:T?(0,Ol.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Ol.jsx)(A,{variant:`ghost`,busy:f===`fetch`,onClick:()=>C(T.place_id),children:b(`Refresh`,`ai-rank-suite`)}),(0,Ol.jsx)(A,{variant:`ghost`,busy:f===`forget`,onClick:ee,children:b(`Disconnect`,`ai-rank-suite`)})]}):null,children:n.has_key?T?(0,Ol.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Ol.jsxs)(`div`,{className:`ars-listing-head`,children:[(0,Ol.jsxs)(`div`,{className:`grid gap-0.5 min-w-0`,children:[(0,Ol.jsx)(`span`,{className:`font-semibold text-[15px] truncate`,children:T.name}),(0,Ol.jsx)(`span`,{className:`t-caption truncate`,children:T.address}),(0,Ol.jsxs)(`span`,{className:`t-caption`,children:[T.type,T.status&&T.status!==`OPERATIONAL`?` · ${T.status.toLowerCase().replace(/_/g,` `)}`:``]})]}),(0,Ol.jsxs)(`div`,{className:`ars-listing-rating`,children:[(0,Ol.jsx)(`span`,{className:`ars-listing-stars t-num`,children:T.rating??`–`}),(0,Ol.jsxs)(`span`,{className:`t-caption`,children:[`★ · `,S(x(`%s review`,`%s reviews`,T.reviews||0,`ai-rank-suite`),(T.reviews||0).toLocaleString())]})]})]}),T.hours&&T.hours.length>0&&(0,Ol.jsxs)(`details`,{children:[(0,Ol.jsx)(`summary`,{className:`t-caption cursor-pointer`,children:b(`Hours as Google shows them`,`ai-rank-suite`)}),(0,Ol.jsx)(`ul`,{className:`m-0 mt-1 pl-4 text-[12px]`,style:{color:`var(--ars-ink-2)`},children:T.hours.map(e=>(0,Ol.jsx)(`li`,{children:e},e))})]}),(0,Ol.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[T.maps_url&&(0,Ol.jsx)(`a`,{className:`ars-linkbtn`,href:T.maps_url,target:`_blank`,rel:`noreferrer`,children:b(`Open on Google Maps ↗`,`ai-rank-suite`)}),(0,Ol.jsx)(`a`,{className:`ars-linkbtn`,href:`https://business.google.com/`,target:`_blank`,rel:`noreferrer`,children:b(`Edit in Business Profile ↗`,`ai-rank-suite`)}),(0,Ol.jsx)(`span`,{className:`t-caption`,children:S(b(`Fetched %s · refreshed weekly`,`ai-rank-suite`),new Date(T.fetched*1e3).toLocaleString())})]})]}):(0,Ol.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Ol.jsx)(`span`,{className:`t-caption`,children:S(b(`Key saved (%s).`,`ai-rank-suite`),n.key_hint)}),(0,Ol.jsxs)(`form`,{className:`flex gap-2`,onSubmit:e=>{e.preventDefault(),y()},children:[(0,Ol.jsx)(`input`,{type:`text`,value:c,onChange:e=>l(e.target.value),placeholder:`${e.name||b(`Business name`,`ai-rank-suite`)}, ${e.city||b(`city`,`ai-rank-suite`)}`,style:{flex:1}}),(0,Ol.jsx)(A,{onClick:y,busy:f===`search`,disabled:!c.trim(),children:b(`Find my listing`,`ai-rank-suite`)})]}),u&&u.length===0&&(0,Ol.jsx)(`span`,{className:`t-caption`,children:b(`Nothing found — try the name as it appears on Google Maps.`,`ai-rank-suite`)}),u&&u.length>0&&(0,Ol.jsx)(`div`,{className:`grid gap-1.5`,children:u.map(e=>(0,Ol.jsxs)(`button`,{type:`button`,className:`ars-place`,onClick:()=>C(e.id),children:[(0,Ol.jsxs)(`span`,{className:`grid gap-0.5 min-w-0`,children:[(0,Ol.jsx)(`span`,{className:`font-semibold text-[13px] truncate`,children:e.name}),(0,Ol.jsx)(`span`,{className:`t-caption truncate`,children:e.address})]}),(0,Ol.jsx)(`span`,{className:`t-caption shrink-0`,children:e.rating?`${e.rating} ★ · ${e.reviews}`:e.type||``})]},e.id))}),(0,Ol.jsx)(`button`,{type:`button`,className:`ars-linkbtn justify-self-start`,onClick:()=>_(`key`,async()=>r(await E.post(`/local-seo/listings`,{key:``}))),children:b(`Remove key`,`ai-rank-suite`)})]}):(0,Ol.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Ol.jsx)(Ke,{label:b(`Google Places API key`,`ai-rank-suite`),hint:b(`Google Cloud → APIs & Services → Credentials → API key, with “Places API (New)” enabled. Stored encrypted; the first ~10,000 lookups a month are free.`,`ai-rank-suite`),children:(0,Ol.jsx)(`input`,{type:`password`,autoComplete:`off`,value:o,onChange:e=>s(e.target.value),placeholder:b(`AIza…`,`ai-rank-suite`)})}),(0,Ol.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Ol.jsx)(A,{onClick:v,busy:f===`key`,disabled:!o.trim(),children:b(`Save key`,`ai-rank-suite`)}),(0,Ol.jsx)(`a`,{className:`ars-linkbtn`,href:`https://console.cloud.google.com/apis/library/places-backend.googleapis.com`,target:`_blank`,rel:`noreferrer`,children:b(`Enable Places API (New) ↗`,`ai-rank-suite`)})]}),(0,Ol.jsx)(ot,{title:b(`Why a Places key and not “Sign in with Google”`,`ai-rank-suite`),children:(0,Ol.jsx)(`p`,{children:b(`Google’s Business Profile management API needs a project reviewed and approved by Google — weeks, and quota zero until then. The Places API answers with a plain key the same afternoon and returns the part of the profile that matters for consistency: name, address, phone, website, hours, rating and review count. Editing the profile stays on Google’s side; this checks and imports.`,`ai-rank-suite`)})})]})}),(0,Ol.jsx)(k,{title:b(`NAP consistency`,`ai-rank-suite`),subtitle:b(`Your record beside Google’s listing — the fields a matching engine compares`,`ai-rank-suite`),flush:!0,action:T&&(0,Ol.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Ol.jsx)(A,{variant:`tonal`,busy:f===`import`,onClick:()=>w(!1),children:b(`Fill empty fields`,`ai-rank-suite`)}),(0,Ol.jsx)(A,{variant:`ghost`,busy:f===`overwrite`,onClick:()=>w(!0),children:b(`Overwrite with Google`,`ai-rank-suite`)})]}),children:T?(0,Ol.jsxs)(`div`,{className:`ars-table-wrap`,children:[(0,Ol.jsxs)(`table`,{className:`ars-table`,children:[(0,Ol.jsx)(`thead`,{children:(0,Ol.jsxs)(`tr`,{children:[(0,Ol.jsx)(`th`,{children:b(`Field`,`ai-rank-suite`)}),(0,Ol.jsx)(`th`,{children:b(`Your record`,`ai-rank-suite`)}),(0,Ol.jsx)(`th`,{children:b(`Google`,`ai-rank-suite`)}),(0,Ol.jsx)(`th`,{style:{width:80}})]})}),(0,Ol.jsx)(`tbody`,{children:n.compare.map(e=>(0,Ol.jsxs)(`tr`,{children:[(0,Ol.jsx)(`td`,{className:`font-medium`,children:e.label}),(0,Ol.jsx)(`td`,{className:e.ours?``:`is-muted`,style:{maxWidth:220},children:(0,Ol.jsx)(`span`,{className:`truncate block`,children:e.ours||`—`})}),(0,Ol.jsx)(`td`,{className:e.theirs?``:`is-muted`,style:{maxWidth:220},children:(0,Ol.jsx)(`span`,{className:`truncate block`,children:e.theirs||`—`})}),(0,Ol.jsx)(`td`,{className:`is-num`,children:e.match===!0?(0,Ol.jsx)(j,{tone:`good`,children:b(`match`,`ai-rank-suite`)}):e.match===!1?(0,Ol.jsx)(j,{tone:`warning`,children:b(`differs`,`ai-rank-suite`)}):(0,Ol.jsx)(j,{tone:`neutral`,children:b(`n/a`,`ai-rank-suite`)})})]},e.key))})]}),m&&(0,Ol.jsx)(`p`,{className:`m-0 px-4 py-2 t-caption`,children:m.length?S(b(`Imported: %s. Save the profile to publish.`,`ai-rank-suite`),m.join(`, `)):b(`Nothing to import — every field was already filled.`,`ai-rank-suite`)})]}):(0,Ol.jsx)(`div`,{className:`px-4 py-4 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`Connect the Google listing and this becomes a field-by-field comparison with one-click import.`,`ai-rank-suite`)})})]}),ne.length>0&&(0,Ol.jsxs)(k,{title:b(`Reviews over time`,`ai-rank-suite`),subtitle:b(`One point per weekly read — a listing that gains reviews is one an assistant trusts more`,`ai-rank-suite`),action:ne.length>1&&ie&&re?(0,Ol.jsx)(Re,{value:ie.reviews-re.reviews,suffix:` ${b(`reviews since first read`,`ai-rank-suite`)}`}):null,children:[(0,Ol.jsx)(je,{data:ne,label:b(`Reviews`,`ai-rank-suite`),color:`var(--ars-good)`,height:140,formatValue:e=>`${e}`}),ie&&ie.rating!==null&&(0,Ol.jsxs)(`p`,{className:`m-0 mt-2 t-caption`,children:[S(b(`Rating now %s ★`,`ai-rank-suite`),ie.rating),re&&re.rating!==null&&re!==ie?` ${S(b(`(was %1$s ★ on %2$s)`,`ai-rank-suite`),re.rating,re.day)}`:``,`.`]})]}),(0,Ol.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2 items-stretch`,children:[(0,Ol.jsx)(k,{title:b(`Bing Places for Business`,`ai-rank-suite`),subtitle:b(`What Copilot and Bing Maps show — no public API, so it is attached by URL`,`ai-rank-suite`),children:(0,Ol.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Ol.jsx)(Ke,{label:b(`Your Bing Places listing URL`,`ai-rank-suite`),hint:b(`Published as sameAs alongside the Google listing.`,`ai-rank-suite`),children:(0,Ol.jsx)(`input`,{type:`url`,style:{width:`100%`},value:e.bing_url||``,onChange:e=>t&&t({bing_url:e.target.value}),placeholder:`https://www.bing.com/maps?…`})}),(0,Ol.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Ol.jsx)(`a`,{className:`ars-linkbtn`,href:`https://www.bingplaces.com/`,target:`_blank`,rel:`noreferrer`,children:b(`Open Bing Places ↗`,`ai-rank-suite`)}),e.bing_url?(0,Ol.jsx)(j,{tone:`good`,children:b(`attached`,`ai-rank-suite`)}):(0,Ol.jsx)(j,{tone:`neutral`,children:b(`not attached`,`ai-rank-suite`)})]}),(0,Ol.jsx)(ot,{title:b(`Keep Bing identical to Google in one click`,`ai-rank-suite`),children:(0,Ol.jsx)(`p`,{children:b(`Bing Places has an “Import from Google My Business” option in its dashboard that syncs name, address, phone, hours and photos from your Google profile — and can keep syncing. Use it, and the consistency check above covers Bing too.`,`ai-rank-suite`)})})]})}),(0,Ol.jsx)(k,{title:b(`Apple Business Connect`,`ai-rank-suite`),subtitle:b(`What Siri and Apple Maps show — attached by URL`,`ai-rank-suite`),children:(0,Ol.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Ol.jsx)(Ke,{label:b(`Your Apple Maps place URL`,`ai-rank-suite`),hint:b(`From Apple Business Connect → your location → Share. Published as sameAs.`,`ai-rank-suite`),children:(0,Ol.jsx)(`input`,{type:`url`,style:{width:`100%`},value:e.apple_url||``,onChange:e=>t&&t({apple_url:e.target.value}),placeholder:`https://maps.apple.com/place?…`})}),(0,Ol.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Ol.jsx)(`a`,{className:`ars-linkbtn`,href:`https://businessconnect.apple.com/`,target:`_blank`,rel:`noreferrer`,children:b(`Open Business Connect ↗`,`ai-rank-suite`)}),e.apple_url?(0,Ol.jsx)(j,{tone:`good`,children:b(`attached`,`ai-rank-suite`)}):(0,Ol.jsx)(j,{tone:`neutral`,children:b(`not attached`,`ai-rank-suite`)})]})]})})]})]})}var Dl,Ol,kl=o((()=>{Dl=u(f(),1),C(),D(),at(),ct(),Ol=O()})),Al=c({default:()=>jl});function jl(){let{data:e,s:t,update:n,save:r,run:i,busy:a,saved:o,error:s,setError:c,reload:l}=Wa(`/settings/local-seo`),[u,d]=(0,Ml.useState)(()=>{let e=/#\/local-seo\/([a-z-]+)/.exec(window.location.hash||``);return e&&Fl.some(t=>t.id===e[1])?e[1]:`profile`}),[f,p]=(0,Ml.useState)(null),[m,h]=(0,Ml.useState)(null),[g,_]=(0,Ml.useState)(0);if((0,Ml.useEffect)(()=>{u!==`output`||!e||E.get(`/local-seo/preview`).then(p).catch(()=>p(null))},[u,e]),!e)return(0,Y.jsx)(_e,{error:s});let v=(e,r)=>n({hours:{...t.hours,[e]:{...t.hours[e],...r}}}),y=(e,r)=>n({locations:t.locations.map((t,n)=>n===e?{...t,...r}:t)}),C=(e,r,i)=>n({[e]:(t[e]||[]).map((e,t)=>t===r?{...e,...i}:e)}),w=(e,r)=>n({[e]:[...t[e]||[],r]}),ee=(e,r)=>n({[e]:(t[e]||[]).filter((e,t)=>t!==r)}),T=()=>i(async()=>{h(null);let e=await E.post(`/local-seo/geocode`);n({latitude:e.latitude,longitude:e.longitude}),h(e.matched||`${e.latitude}, ${e.longitude}`)}),te=new Date().toISOString().slice(0,10),ne=e.completeness||{score:0,checks:[],required:0},re=ne.checks.filter(e=>!e.ok),ie=e.open_now||{};return(0,Y.jsxs)(`div`,{className:`ars-page`,children:[s&&(0,Y.jsx)(M,{tone:`serious`,children:s}),(0,Y.jsx)(k,{icon:(0,Y.jsx)(kt,{size:16}),title:b(`Local business`,`ai-rank-suite`),subtitle:b(`One record, published as LocalBusiness schema and reused by every “near me” answer Google, ChatGPT and Perplexity give about you`,`ai-rank-suite`),action:(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[o&&(0,Y.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,Y.jsx)(Ee,{checked:!!t.enabled,onChange:e=>n({enabled:e}),label:b(`Publish`,`ai-rank-suite`)})]}),children:(0,Y.jsxs)(`div`,{className:`ars-local-head`,children:[(0,Y.jsx)(`div`,{className:`shrink-0`,children:(0,Y.jsx)(ge,{value:ne.score,label:b(`Profile completeness`,`ai-rank-suite`)})}),(0,Y.jsxs)(`div`,{className:`grid gap-3 min-w-0`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[t.enabled?(0,Y.jsxs)(j,{tone:ie.open?`good`:`neutral`,children:[ie.label,ie.until?` · ${ie.until}`:``]}):(0,Y.jsx)(j,{tone:`warning`,children:b(`Not published — nothing is emitted yet`,`ai-rank-suite`)}),(0,Y.jsxs)(`span`,{className:`t-caption`,children:[`Site timezone: `,e.timezone||`UTC`]})]}),re.length===0?(0,Y.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Nothing left to fill in. The Output tab shows exactly what search engines and assistants will read.`,`ai-rank-suite`)}):(()=>{let e={hours:`hours`,areas:`reach`,services:`reach`,payment:`reach`,locations:`locations`},t=t=>e[t.id]||`profile`,n=e=>{d(t(e)),window.requestAnimationFrame(()=>{let t=document.querySelector(`[data-airanksuite-field="${e.id}"]`);t&&(t.scrollIntoView({behavior:`smooth`,block:`center`}),window.setTimeout(()=>t.focus({preventScroll:!0}),350))})},r=re.filter(e=>e.tier===`required`),i=re.filter(e=>e.tier===`recommended`),a=r[0]||i[0]||re[0],o=(ne.checks||[]).filter(e=>e.tier===`required`&&e.ok).length,s=(ne.checks||[]).filter(e=>e.tier===`required`).length;return(0,Y.jsxs)(`div`,{className:`grid gap-2.5`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,Y.jsx)(`span`,{className:`text-[13.5px] font-semibold`,children:r.length>0?S(x(`%1$d of %2$d required field filled in`,`%1$d of %2$d required fields filled in`,s,`ai-rank-suite`),o,s):b(`Every required field is filled in`,`ai-rank-suite`)}),(0,Y.jsxs)(`span`,{className:`t-caption`,children:[r.length>0&&S(b(`%d required`,`ai-rank-suite`),r.length),r.length>0&&i.length>0&&` · `,i.length>0&&S(b(`%d recommended`,`ai-rank-suite`),i.length)]})]}),(0,Y.jsx)(`div`,{className:`ars-local-bar`,role:`img`,"aria-label":S(x(`%1$d of %2$d required field`,`%1$d of %2$d required fields`,s,`ai-rank-suite`),o,s),children:(ne.checks||[]).filter(e=>e.tier===`required`).map(e=>(0,Y.jsx)(`span`,{className:`ars-local-seg${e.ok?` is-ok`:``}`,title:e.ok?e.label:S(b(`%s — still empty`,`ai-rank-suite`),e.label)},e.id))}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Y.jsx)(A,{onClick:()=>n(a),children:S(b(`Fill in %s`,`ai-rank-suite`),a.label)}),(0,Y.jsxs)(`span`,{className:`t-caption`,children:[S(b(`Next: %s`,`ai-rank-suite`),a.label),a.hint?` — ${a.hint}`:``]})]})]})})()]})]})}),(0,Y.jsx)(Ae,{tabs:Fl,active:u,onChange:d}),u===`profile`&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(k,{icon:(0,Y.jsx)(ft,{size:16}),title:b(`Identity`,`ai-rank-suite`),subtitle:b(`Who the business is, in the words an assistant will repeat`,`ai-rank-suite`),children:(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Y.jsx)(Ke,{label:b(`Business name`,`ai-rank-suite`),hint:b(`The name on the shopfront, not the legal entity.`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,"data-airanksuite-field":`name`,value:t.name||``,onChange:e=>n({name:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`Business type`,`ai-rank-suite`),hint:b(`A precise subtype earns a richer result than the generic LocalBusiness.`,`ai-rank-suite`),children:(0,Y.jsx)(`select`,{value:t.business_type,onChange:e=>n({business_type:e.target.value}),children:Object.entries(e.type_groups||{}).map(([e,t])=>(0,Y.jsx)(`optgroup`,{label:e,children:t.map(e=>(0,Y.jsx)(`option`,{value:e,children:e},e))},e))})}),(0,Y.jsx)(Ke,{label:b(`Legal name (optional)`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.legal_name||``,onChange:e=>n({legal_name:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`Slogan (optional)`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.slogan||``,onChange:e=>n({slogan:e.target.value})})}),(0,Y.jsx)(Ke,{span:!0,label:b(`Description`,`ai-rank-suite`),hint:b(`Two or three sentences. This is the passage a chat assistant quotes when someone asks what you do.`,`ai-rank-suite`),children:(0,Y.jsx)(`textarea`,{rows:3,value:t.description||``,onChange:e=>n({description:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`Founded`,`ai-rank-suite`),hint:b(`Year or full date, e.g. 2011 or 2011-04-01.`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.founding_date||``,onChange:e=>n({founding_date:e.target.value})})})]})}),(0,Y.jsx)(k,{icon:(0,Y.jsx)(Dt,{size:16}),title:b(`Contact`,`ai-rank-suite`),subtitle:b(`Used for click-to-call and for the contact block in an AI answer`,`ai-rank-suite`),children:(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Y.jsx)(Ke,{label:b(`Phone`,`ai-rank-suite`),hint:b(`International format (+49 …) so a call works from anywhere.`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,"data-airanksuite-field":`phone`,value:t.phone||``,onChange:e=>n({phone:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`Second phone (optional)`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.phone_secondary||``,onChange:e=>n({phone_secondary:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`WhatsApp (optional)`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.whatsapp||``,onChange:e=>n({whatsapp:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`Fax (optional)`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.fax||``,onChange:e=>n({fax:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`Email`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`email`,"data-airanksuite-field":`email`,value:t.email||``,onChange:e=>n({email:e.target.value})})})]})}),(0,Y.jsxs)(k,{icon:(0,Y.jsx)(kt,{size:16}),title:b(`Address`,`ai-rank-suite`),subtitle:b(`The NAP — name, address, phone — that must match your Google Business Profile character for character`,`ai-rank-suite`),children:[(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Y.jsx)(Ke,{label:b(`Street and number`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,"data-airanksuite-field":`street`,value:t.street||``,onChange:e=>n({street:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`Suite / floor (optional)`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,"data-airanksuite-field":`street2`,value:t.street2||``,onChange:e=>n({street2:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`Postal code`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.postal_code||``,onChange:e=>n({postal_code:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`City`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,"data-airanksuite-field":`city`,value:t.city||``,onChange:e=>n({city:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`Region / state`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,"data-airanksuite-field":`region`,value:t.region||``,onChange:e=>n({region:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`Country code`,`ai-rank-suite`),hint:b(`Two letters — DE, AE, US.`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,maxLength:2,value:t.country||``,onChange:e=>n({country:e.target.value.toUpperCase()})})}),(0,Y.jsx)(Ke,{label:b(`Latitude`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.latitude||``,onChange:e=>n({latitude:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`Longitude`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.longitude||``,onChange:e=>n({longitude:e.target.value})})}),(0,Y.jsx)(Ke,{span:!0,children:(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Y.jsx)(A,{variant:`ghost`,onClick:T,busy:a,children:b(`Find coordinates from the address`,`ai-rank-suite`)}),m&&(0,Y.jsxs)(`span`,{className:`t-caption`,children:[`Matched: `,m]})]})})]}),(0,Y.jsx)(ot,{title:b(`Why coordinates matter for “near me”`,`ai-rank-suite`),children:(0,Y.jsx)(`p`,{children:b(`A street name is ambiguous — dozens of German towns have a Bahnhofstraße 1. Coordinates remove the guess, which is what decides whether you appear in a map pack for the right town. The lookup uses OpenStreetMap and needs no account; you can also paste the pair from Google Maps by right-clicking your pin.`,`ai-rank-suite`)})})]}),(0,Y.jsx)(k,{icon:(0,Y.jsx)(wt,{size:16}),title:b(`Images`,`ai-rank-suite`),subtitle:b(`Google puts a picture next to a local result — without one, your listing is plain text`,`ai-rank-suite`),children:(0,Y.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,Y.jsx)(qe,{label:b(`Logo`,`ai-rank-suite`),title:b(`Select a logo`,`ai-rank-suite`),value:t.logo_url,onChange:e=>n({logo_url:e}),hint:b(`Square, at least 112×112, on a plain background.`,`ai-rank-suite`)}),(0,Y.jsx)(qe,{label:b(`Photo of the business`,`ai-rank-suite`),title:b(`Select a photo`,`ai-rank-suite`),value:t.image_url,onChange:e=>n({image_url:e}),hint:b(`The storefront, the practice, the workshop. At least 1200px wide.`,`ai-rank-suite`)})]})}),(0,Y.jsx)(k,{icon:(0,Y.jsx)(ht,{size:16}),title:b(`Commercial details`,`ai-rank-suite`),subtitle:b(`Answers to the questions people ask before they walk in`,`ai-rank-suite`),children:(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Y.jsx)(Ke,{label:b(`Price range`,`ai-rank-suite`),hint:b(`Either a symbol scale (€€) or a span (30–90 €).`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.price_range||``,onChange:e=>n({price_range:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`Currency`,`ai-rank-suite`),hint:b(`ISO code, e.g. EUR, AED, USD.`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.currencies||``,onChange:e=>n({currencies:e.target.value})})}),(0,Y.jsx)(Ke,{span:!0,label:b(`Payment accepted`,`ai-rank-suite`),children:(0,Y.jsx)(Ye,{options:Object.entries(e.payment_methods||{}).map(([e,t])=>({key:e,label:t})),value:t.payments||[],onChange:e=>n({payments:e})})}),(0,Y.jsx)(Ke,{label:b(`VAT ID`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.vat_id||``,onChange:e=>n({vat_id:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`Tax ID`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.tax_id||``,onChange:e=>n({tax_id:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`Company registration number`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.registration_id||``,onChange:e=>n({registration_id:e.target.value})})})]})})]}),u===`hours`&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(k,{icon:(0,Y.jsx)(_t,{size:16}),title:b(`Opening hours`,`ai-rank-suite`),subtitle:b(`Published as openingHoursSpecification and read out verbatim when someone asks whether you are open`,`ai-rank-suite`),action:(0,Y.jsx)(Ee,{checked:!!t.show_open_now,onChange:e=>n({show_open_now:e}),label:b(`Live open/closed badge`,`ai-rank-suite`)}),children:[(0,Y.jsx)(`div`,{className:`grid gap-2`,children:e.days.map(e=>{let n=t.hours[e]||{},r=!!(n.break_start||n.break_end);return(0,Y.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,style:{minHeight:40},children:[(0,Y.jsx)(`span`,{className:`font-medium`,style:{minWidth:100},children:Nl[e]}),(0,Y.jsx)(Ee,{checked:!n.closed,onChange:t=>v(e,{closed:!t}),label:n.closed?`Closed`:`Open`}),n.closed?(0,Y.jsx)(`span`,{className:`t-caption`,children:b(`No hours published for this day`,`ai-rank-suite`)}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`input`,{type:`time`,value:n.open||``,onChange:t=>v(e,{open:t.target.value}),style:{width:116}}),(0,Y.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`–`}),(0,Y.jsx)(`input`,{type:`time`,value:n.close||``,onChange:t=>v(e,{close:t.target.value}),style:{width:116}}),r?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`span`,{className:`t-caption`,style:{marginLeft:8},children:b(`closed`,`ai-rank-suite`)}),(0,Y.jsx)(`input`,{type:`time`,value:n.break_start||``,onChange:t=>v(e,{break_start:t.target.value}),style:{width:116}}),(0,Y.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`–`}),(0,Y.jsx)(`input`,{type:`time`,value:n.break_end||``,onChange:t=>v(e,{break_end:t.target.value}),style:{width:116}}),(0,Y.jsx)(`button`,{type:`button`,"aria-label":b(`Remove break`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer`,style:{color:`var(--ars-ink-3)`},onClick:()=>v(e,{break_start:``,break_end:``}),children:(0,Y.jsx)(Mt,{size:14})})]}):(0,Y.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent cursor-pointer text-[12px] underline`,style:{color:`var(--ars-ink-3)`},onClick:()=>v(e,{break_start:`12:00`,break_end:`13:00`}),children:`+ midday break`})]})]},e)})}),(0,Y.jsx)(ot,{title:b(`Why a midday break is worth entering`,`ai-rank-suite`),children:(0,Y.jsx)(`p`,{children:b(`A practice that closes between 12 and 13 but publishes 09:00–17:00 tells an assistant it is open at 12:30. Two windows per day is the shape Google expects, and it is what stops someone standing in front of a locked door.`,`ai-rank-suite`)})})]}),(0,Y.jsx)(k,{title:b(`Holidays and one-off changes`,`ai-rank-suite`),subtitle:b(`Dated exceptions override the weekly grid — publish them before the holiday, not after`,`ai-rank-suite`),action:(0,Y.jsx)(A,{variant:`ghost`,onClick:()=>w(`special_hours`,{date:new Date().toISOString().slice(0,10),until:``,label:``,closed:!0,open:``,close:``}),children:`+ Add date`}),children:(t.special_hours||[]).length===0?(0,Y.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`No exceptions yet. Christmas, a public holiday, a week of stocktaking — each one entered here is a question your phone does not have to answer.`,`ai-rank-suite`)}):(0,Y.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Y.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Y.jsxs)(`table`,{className:`ars-table`,children:[(0,Y.jsx)(`thead`,{children:(0,Y.jsxs)(`tr`,{children:[(0,Y.jsx)(`th`,{className:`is-mid`,children:b(`From`,`ai-rank-suite`)}),(0,Y.jsx)(`th`,{className:`is-mid`,children:b(`To (optional)`,`ai-rank-suite`)}),(0,Y.jsx)(`th`,{children:b(`Label`,`ai-rank-suite`)}),(0,Y.jsx)(`th`,{className:`is-narrow`,children:b(`Closed`,`ai-rank-suite`)}),(0,Y.jsx)(`th`,{className:`is-mid`,children:b(`Hours`,`ai-rank-suite`)}),(0,Y.jsx)(`th`,{className:`is-action`})]})}),(0,Y.jsx)(`tbody`,{children:(t.special_hours||[]).map((e,t)=>{let n=(e.until||e.date||``)<te;return(0,Y.jsxs)(`tr`,{style:n?{opacity:.6}:void 0,children:[(0,Y.jsx)(`td`,{children:(0,Y.jsx)(`input`,{type:`date`,value:e.date||``,onChange:e=>C(`special_hours`,t,{date:e.target.value})})}),(0,Y.jsx)(`td`,{children:(0,Y.jsx)(`input`,{type:`date`,value:e.until||``,onChange:e=>C(`special_hours`,t,{until:e.target.value})})}),(0,Y.jsx)(`td`,{children:(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Y.jsx)(`input`,{type:`text`,placeholder:b(`Christmas Day`,`ai-rank-suite`),value:e.label||``,onChange:e=>C(`special_hours`,t,{label:e.target.value})}),n&&(0,Y.jsx)(`span`,{className:`ars-tag shrink-0`,children:b(`Past`,`ai-rank-suite`)})]})}),(0,Y.jsx)(`td`,{className:`is-narrow`,children:(0,Y.jsx)(`input`,{type:`checkbox`,checked:!!e.closed,onChange:e=>C(`special_hours`,t,{closed:e.target.checked})})}),(0,Y.jsx)(`td`,{children:e.closed?(0,Y.jsx)(`span`,{className:`t-caption`,children:b(`Closed all day`,`ai-rank-suite`)}):(0,Y.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,Y.jsx)(`input`,{type:`time`,value:e.open||``,onChange:e=>C(`special_hours`,t,{open:e.target.value}),style:{width:104}}),(0,Y.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`–`}),(0,Y.jsx)(`input`,{type:`time`,value:e.close||``,onChange:e=>C(`special_hours`,t,{close:e.target.value}),style:{width:104}})]})}),(0,Y.jsx)(`td`,{className:`is-action`,children:(0,Y.jsx)(`button`,{type:`button`,"aria-label":b(`Remove date`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer`,style:{color:`var(--ars-ink-3)`},onClick:()=>ee(`special_hours`,t),children:(0,Y.jsx)(Mt,{size:15})})})]},t)})})]})})})})]}),u===`locations`&&(0,Y.jsx)(k,{icon:(0,Y.jsx)(Dt,{size:16}),title:b(`Branches`,`ai-rank-suite`),subtitle:b(`Each branch becomes its own LocalBusiness node, linked back to head office as its parent`,`ai-rank-suite`),action:(0,Y.jsxs)(A,{variant:`ghost`,onClick:()=>{w(`locations`,{...Rl}),_((t.locations||[]).length)},children:[`+ `,b(`Add branch`,`ai-rank-suite`)]}),children:(t.locations||[]).length===0?(0,Y.jsxs)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:[b(`One location so far. Add branches if you have several — every field left empty inherits from the main profile, so a second surgery in the next town usually needs nothing but a street and a phone number. List them on any page with`,`ai-rank-suite`),` `,(0,Y.jsx)(`code`,{className:`ars-mono`,children:`[airanksuite_locations]`}),`.`]}):(0,Y.jsx)(`div`,{className:`grid gap-2`,children:(t.locations||[]).map((n,r)=>{let i=g===r;return(0,Y.jsxs)(`div`,{className:`ars-r-md`,style:{border:`1px solid var(--ars-border)`},children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 cursor-pointer`,style:{background:`var(--ars-surface-2)`},onClick:()=>_(i?-1:r),children:[(0,Y.jsx)(`span`,{"aria-hidden":!0,style:{color:`var(--ars-ink-3)`,width:12},children:i?`▾`:`▸`}),(0,Y.jsx)(`span`,{className:`font-medium`,children:n.name||S(b(`Branch %d`,`ai-rank-suite`),r+1)}),(0,Y.jsx)(`span`,{className:`t-caption truncate`,children:[n.street,n.city].filter(Boolean).join(`, `)||b(`inherits the main address`,`ai-rank-suite`)}),n.own_hours&&(0,Y.jsx)(`span`,{className:`ars-tag`,children:b(`own hours`,`ai-rank-suite`)}),(0,Y.jsx)(`button`,{type:`button`,"aria-label":b(`Remove branch`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer ml-auto`,style:{color:`var(--ars-ink-3)`},onClick:e=>{e.stopPropagation(),ee(`locations`,r),_(-1)},children:(0,Y.jsx)(Mt,{size:15})})]}),i&&(0,Y.jsxs)(`div`,{className:`p-3 grid gap-3`,children:[(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Y.jsx)(Ke,{label:b(`Name`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:n.name||``,onChange:e=>y(r,{name:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`Business type`,`ai-rank-suite`),hint:b(`Leave on “Same as main profile” unless this branch is different.`,`ai-rank-suite`),children:(0,Y.jsxs)(`select`,{value:n.business_type||``,onChange:e=>y(r,{business_type:e.target.value}),children:[(0,Y.jsx)(`option`,{value:``,children:b(`Same as main profile`,`ai-rank-suite`)}),Object.entries(e.type_groups||{}).map(([e,t])=>(0,Y.jsx)(`optgroup`,{label:e,children:t.map(e=>(0,Y.jsx)(`option`,{value:e,children:e},e))},e))]})}),[[`street`,b(`Street and number`,`ai-rank-suite`)],[`street2`,b(`Suite / floor`,`ai-rank-suite`)],[`postal_code`,b(`Postal code`,`ai-rank-suite`)],[`city`,b(`City`,`ai-rank-suite`)],[`region`,b(`Region / state`,`ai-rank-suite`)],[`country`,b(`Country code`,`ai-rank-suite`)],[`phone`,b(`Phone`,`ai-rank-suite`)],[`email`,b(`Email`,`ai-rank-suite`)],[`latitude`,b(`Latitude`,`ai-rank-suite`)],[`longitude`,b(`Longitude`,`ai-rank-suite`)],[`price_range`,b(`Price range`,`ai-rank-suite`)],[`map_url`,b(`Map link`,`ai-rank-suite`)],[`booking_url`,b(`Booking link`,`ai-rank-suite`)]].map(([e,t])=>(0,Y.jsx)(Ke,{label:t,children:(0,Y.jsx)(`input`,{type:`text`,value:n[e]||``,onChange:t=>y(r,{[e]:t.target.value})})},e))]}),(0,Y.jsx)(qe,{label:b(`Photo of this branch`,`ai-rank-suite`),value:n.image_url,onChange:e=>y(r,{image_url:e}),height:72}),(0,Y.jsx)(Ee,{checked:!!n.own_hours,onChange:e=>y(r,{own_hours:e,hours:e&&!Object.keys(n.hours||{}).length?t.hours:n.hours}),label:b(`This branch has its own opening hours`,`ai-rank-suite`)}),n.own_hours&&(0,Y.jsx)(`div`,{className:`grid gap-2`,children:e.days.map(e=>{let t=(n.hours||{})[e]||{};return(0,Y.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,style:{minHeight:36},children:[(0,Y.jsx)(`span`,{className:`font-medium`,style:{minWidth:100},children:Nl[e]}),(0,Y.jsx)(Ee,{checked:!t.closed,onChange:i=>y(r,{hours:{...n.hours,[e]:{...t,closed:!i}}}),label:t.closed?`Closed`:`Open`}),!t.closed&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`input`,{type:`time`,value:t.open||``,onChange:i=>y(r,{hours:{...n.hours,[e]:{...t,open:i.target.value}}}),style:{width:116}}),(0,Y.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`–`}),(0,Y.jsx)(`input`,{type:`time`,value:t.close||``,onChange:i=>y(r,{hours:{...n.hours,[e]:{...t,close:i.target.value}}}),style:{width:116}})]})]},e)})})]})]},r)})})}),u===`reach`&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(k,{icon:(0,Y.jsx)(Dt,{size:16}),title:b(`Service areas`,`ai-rank-suite`),subtitle:b(`The towns and districts you travel to — the answer to “do you come to …?”`,`ai-rank-suite`),children:[(0,Y.jsx)(Je,{value:t.areas||[],onChange:e=>n({areas:e}),placeholder:b(`Add a town or district and press Enter`,`ai-rank-suite`)}),(0,Y.jsx)(ot,{title:b(`When service areas matter more than an address`,`ai-rank-suite`),children:(0,Y.jsx)(`p`,{children:b(`A plumber, a mobile physiotherapist or a wedding photographer serves a radius, not a shopfront. Listing those places as areaServed is what lets you appear for a town you have no office in — and it is the only local signal available at all to a business that works from home and publishes no address.`,`ai-rank-suite`)})})]}),(0,Y.jsx)(k,{title:b(`Services`,`ai-rank-suite`),subtitle:b(`Named services with prices, published as an offer catalogue`,`ai-rank-suite`),action:(0,Y.jsxs)(A,{variant:`ghost`,onClick:()=>w(`services`,{name:``,description:``,price:``,currency:``,url:``}),children:[`+ `,b(`Add service`,`ai-rank-suite`)]}),children:(t.services||[]).length===0?(0,Y.jsxs)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:[b(`Nothing listed. “What does a check-up cost?” is one of the most common questions asked of an assistant, and a priced service here is a concrete answer it can give — with your name attached. Render them on a page with`,`ai-rank-suite`),` `,(0,Y.jsx)(`code`,{className:`ars-mono`,children:`[airanksuite_services]`}),`.`]}):(0,Y.jsx)(`div`,{className:`grid gap-2`,children:(t.services||[]).map((e,n)=>(0,Y.jsxs)(`div`,{className:`ars-r-sm p-3 grid gap-2`,style:{background:`var(--ars-surface-2)`},children:[(0,Y.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-[2fr_1fr_1fr_auto]`,children:[(0,Y.jsx)(`input`,{type:`text`,placeholder:b(`Service name`,`ai-rank-suite`),value:e.name||``,onChange:e=>C(`services`,n,{name:e.target.value})}),(0,Y.jsx)(`input`,{type:`text`,placeholder:b(`Price`,`ai-rank-suite`),value:e.price||``,onChange:e=>C(`services`,n,{price:e.target.value})}),(0,Y.jsx)(`input`,{type:`text`,placeholder:t.currencies||`EUR`,value:e.currency||``,onChange:e=>C(`services`,n,{currency:e.target.value})}),(0,Y.jsx)(`button`,{type:`button`,"aria-label":b(`Remove service`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer`,style:{color:`var(--ars-ink-3)`},onClick:()=>ee(`services`,n),children:(0,Y.jsx)(Mt,{size:15})})]}),(0,Y.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:[(0,Y.jsx)(`input`,{type:`text`,placeholder:b(`Short description`,`ai-rank-suite`),value:e.description||``,onChange:e=>C(`services`,n,{description:e.target.value})}),(0,Y.jsx)(`input`,{type:`url`,placeholder:b(`Link to the service page (optional)`,`ai-rank-suite`),value:e.url||``,onChange:e=>C(`services`,n,{url:e.target.value})})]})]},n))})}),(0,Y.jsx)(k,{title:b(`Departments and practitioners`,`ai-rank-suite`),subtitle:b(`A clinic with three specialities, a firm with four partners — each becomes its own node`,`ai-rank-suite`),action:(0,Y.jsx)(A,{variant:`ghost`,onClick:()=>w(`departments`,{name:``,business_type:`LocalBusiness`,phone:``,email:``,url:``}),children:`+ Add department`}),children:(t.departments||[]).length===0?(0,Y.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`None yet. Use this when one address houses several distinct practices — an orthodontist inside a dental clinic, a tax adviser inside a law firm — so each can be found on its own terms.`,`ai-rank-suite`)}):(0,Y.jsx)(`div`,{className:`grid gap-2`,children:(t.departments||[]).map((t,n)=>(0,Y.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-[2fr_1.4fr_1fr_1fr_auto] items-center`,children:[(0,Y.jsx)(`input`,{type:`text`,placeholder:b(`Name`,`ai-rank-suite`),value:t.name||``,onChange:e=>C(`departments`,n,{name:e.target.value})}),(0,Y.jsx)(`select`,{value:t.business_type||`LocalBusiness`,onChange:e=>C(`departments`,n,{business_type:e.target.value}),children:Object.entries(e.type_groups||{}).map(([e,t])=>(0,Y.jsx)(`optgroup`,{label:e,children:t.map(e=>(0,Y.jsx)(`option`,{value:e,children:e},e))},e))}),(0,Y.jsx)(`input`,{type:`text`,placeholder:b(`Phone`,`ai-rank-suite`),value:t.phone||``,onChange:e=>C(`departments`,n,{phone:e.target.value})}),(0,Y.jsx)(`input`,{type:`email`,placeholder:b(`Email`,`ai-rank-suite`),value:t.email||``,onChange:e=>C(`departments`,n,{email:e.target.value})}),(0,Y.jsx)(`button`,{type:`button`,"aria-label":b(`Remove department`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer`,style:{color:`var(--ars-ink-3)`},onClick:()=>ee(`departments`,n),children:(0,Y.jsx)(Mt,{size:15})})]},n))})}),(0,Y.jsx)(k,{icon:(0,Y.jsx)(wt,{size:16}),title:b(`Amenities`,`ai-rank-suite`),subtitle:b(`“Is it wheelchair accessible?” is a question with a schema answer`,`ai-rank-suite`),children:(0,Y.jsx)(Ye,{options:Object.entries(e.amenities||{}).map(([e,t])=>({key:e,label:t})),value:t.amenities||[],onChange:e=>n({amenities:e})})}),(0,Y.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,Y.jsxs)(k,{icon:(0,Y.jsx)(St,{size:16}),title:b(`Linked profiles`,`ai-rank-suite`),subtitle:b(`Published as sameAs — how an engine confirms you are one entity`,`ai-rank-suite`),children:[(0,Y.jsx)(Je,{value:t.profiles||[],onChange:e=>n({profiles:e}),placeholder:`https://www.google.com/maps/place/…`}),(0,Y.jsx)(ot,{title:b(`Which links belong here`,`ai-rank-suite`),children:(0,Y.jsx)(`p`,{children:b(`Your Google Business Profile first, then the directories your industry actually uses — Facebook, LinkedIn, Instagram, Jameda, an industry register. Each one is a claim that the entity at that URL and the entity on this site are the same, which is what lets an assistant merge the reviews and the opening hours into a single confident answer.`,`ai-rank-suite`)})})]}),(0,Y.jsx)(k,{icon:(0,Y.jsx)(vt,{size:16}),title:b(`Languages spoken`,`ai-rank-suite`),subtitle:b(`Published as knowsLanguage`,`ai-rank-suite`),children:(0,Y.jsx)(Je,{value:t.languages||[],onChange:e=>n({languages:e}),suggestions:Pl,placeholder:b(`Add a language`,`ai-rank-suite`)})})]}),(0,Y.jsx)(k,{icon:(0,Y.jsx)(St,{size:16}),title:b(`Action links`,`ai-rank-suite`),subtitle:b(`Where an assistant sends someone who wants to act`,`ai-rank-suite`),children:(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Y.jsx)(Ke,{label:b(`Booking / appointment URL`,`ai-rank-suite`),hint:b(`Emitted as a ReserveAction.`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`url`,value:t.booking_url||``,onChange:e=>n({booking_url:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`Map URL`,`ai-rank-suite`),hint:b(`Leave empty to generate a Google Maps search from the address.`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`url`,value:t.map_url||``,onChange:e=>n({map_url:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`Menu URL`,`ai-rank-suite`),hint:b(`Restaurants and cafés.`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`url`,value:t.menu_url||``,onChange:e=>n({menu_url:e.target.value})})}),(0,Y.jsx)(Ke,{label:b(`Order URL`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`url`,value:t.order_url||``,onChange:e=>n({order_url:e.target.value})})})]})})]}),u===`listings`&&(0,Y.jsx)(El,{record:t,onImported:e=>{e?n(e):l()}}),u===`output`&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(k,{icon:(0,Y.jsx)(xt,{size:16}),title:b(`Structured data`,`ai-rank-suite`),subtitle:b(`Exactly what is printed on your home page — no view-source needed`,`ai-rank-suite`),action:f?.test&&(0,Y.jsx)(`a`,{className:`ars-url`,href:f.test,target:`_blank`,rel:`noreferrer noopener`,children:b(`Open in Google's Rich Results Test ↗`,`ai-rank-suite`)}),children:f?(0,Y.jsxs)(`div`,{className:`grid gap-2.5`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Y.jsx)(j,{tone:f.active?`good`:`warn`,children:f.active?b(`Published on the home page`,`ai-rank-suite`):b(`Not published — switch “Publish” on`,`ai-rank-suite`)}),(0,Y.jsx)(`span`,{className:`t-caption`,children:S(x(`%d node in the graph`,`%d nodes in the graph`,f.nodes,`ai-rank-suite`),f.nodes)})]}),(0,Y.jsx)(Xe,{code:f.json,language:`json`})]}):(0,Y.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Loading the preview…`,`ai-rank-suite`)})}),(0,Y.jsx)(k,{icon:(0,Y.jsx)(xt,{size:16}),title:b(`Shortcodes`,`ai-rank-suite`),subtitle:b(`Drop the business data into any page, post or widget`,`ai-rank-suite`),children:(0,Y.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Y.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Y.jsxs)(`table`,{className:`ars-table`,children:[(0,Y.jsx)(`thead`,{children:(0,Y.jsxs)(`tr`,{children:[(0,Y.jsx)(`th`,{style:{width:240},children:b(`Shortcode`,`ai-rank-suite`)}),(0,Y.jsx)(`th`,{children:b(`What it renders`,`ai-rank-suite`)})]})}),(0,Y.jsx)(`tbody`,{children:[[`[airanksuite_business_address]`,b(`Full address block, marked up as <address>`,`ai-rank-suite`)],[`[airanksuite_business_hours]`,b(`Opening-hours table, including upcoming holiday closures`,`ai-rank-suite`)],[`[airanksuite_business_hours special="no"]`,b(`The weekly grid only, without exceptions`,`ai-rank-suite`)],[`[airanksuite_business_phone]`,b(`Click-to-call phone number`,`ai-rank-suite`)],[`[airanksuite_open_now]`,b(`Live “Open now / Closed” badge in the site timezone`,`ai-rank-suite`)],[`[airanksuite_business_map]`,b(`Address as a link to your map pin`,`ai-rank-suite`)],[`[airanksuite_services]`,b(`Your service list with prices`,`ai-rank-suite`)],[`[airanksuite_locations]`,b(`Every branch, one address block each`,`ai-rank-suite`)]].map(([e,t])=>(0,Y.jsxs)(`tr`,{children:[(0,Y.jsx)(`td`,{children:(0,Y.jsx)(`code`,{className:`ars-mono`,children:e})}),(0,Y.jsx)(`td`,{children:t})]},e))})]})})})}),(0,Y.jsx)(k,{icon:(0,Y.jsx)(ht,{size:16}),title:b(`Profile checklist`,`ai-rank-suite`),subtitle:b(`Everything that goes into the score, in one list`,`ai-rank-suite`),children:(0,Y.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Y.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Y.jsxs)(`table`,{className:`ars-table`,children:[(0,Y.jsx)(`thead`,{children:(0,Y.jsxs)(`tr`,{children:[(0,Y.jsx)(`th`,{style:{width:34}}),(0,Y.jsx)(`th`,{style:{width:220},children:b(`Field`,`ai-rank-suite`)}),(0,Y.jsx)(`th`,{className:`is-mid`,children:b(`Weight`,`ai-rank-suite`)}),(0,Y.jsx)(`th`,{children:b(`Why it matters`,`ai-rank-suite`)})]})}),(0,Y.jsx)(`tbody`,{children:ne.checks.map(e=>(0,Y.jsxs)(`tr`,{children:[(0,Y.jsx)(`td`,{style:{width:34,color:e.ok?`var(--ars-c-green-ink)`:`var(--ars-ink-3)`},children:e.ok?`✓`:`○`}),(0,Y.jsx)(`td`,{style:{fontWeight:e.ok?400:600},children:e.label}),(0,Y.jsx)(`td`,{className:`is-mid`,children:(0,Y.jsx)(`span`,{className:`ars-tag`,style:{color:`var(--ars-c-${Ll[e.tier]}-ink)`,background:`var(--ars-c-${Ll[e.tier]})`},children:Il[e.tier]})}),(0,Y.jsx)(`td`,{style:{color:`var(--ars-ink-2)`},children:e.hint||`—`})]},e.id))})]})})})})]}),(0,Y.jsxs)(`div`,{className:`ars-savebar`,children:[(0,Y.jsx)(A,{onClick:r,busy:a,children:b(`Save changes`,`ai-rank-suite`)}),o&&(0,Y.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,Y.jsx)(`span`,{className:`t-caption ml-auto`,children:t.enabled?b(`Published on the home page as LocalBusiness structured data.`,`ai-rank-suite`):b(`Not published yet — turn on “Publish” at the top.`,`ai-rank-suite`)})]})]})}var Ml,Y,Nl,Pl,Fl,Il,Ll,Rl,zl=o((()=>{Ml=u(f(),1),C(),Ka(),D(),at(),ct(),kl(),Ft(),Y=O(),Nl={monday:b(`Monday`,`ai-rank-suite`),tuesday:b(`Tuesday`,`ai-rank-suite`),wednesday:b(`Wednesday`,`ai-rank-suite`),thursday:b(`Thursday`,`ai-rank-suite`),friday:b(`Friday`,`ai-rank-suite`),saturday:b(`Saturday`,`ai-rank-suite`),sunday:b(`Sunday`,`ai-rank-suite`)},Pl=[`English`,`Deutsch`,`العربية`,`Français`,`Español`,`Italiano`,`Nederlands`,`Türkçe`,`Русский`,`中文`],Fl=[{id:`profile`,label:b(`Profile`,`ai-rank-suite`)},{id:`hours`,label:b(`Hours`,`ai-rank-suite`)},{id:`locations`,label:b(`Locations`,`ai-rank-suite`)},{id:`reach`,label:b(`Reach & services`,`ai-rank-suite`)},{id:`listings`,label:b(`Listings`,`ai-rank-suite`)},{id:`output`,label:b(`Output`,`ai-rank-suite`)}],Il={required:b(`Required`,`ai-rank-suite`),recommended:b(`Recommended`,`ai-rank-suite`),optional:b(`Nice to have`,`ai-rank-suite`)},Ll={required:`red`,recommended:`yellow`,optional:`blue`},Rl={name:``,business_type:``,street:``,street2:``,postal_code:``,city:``,region:``,country:``,phone:``,email:``,latitude:``,longitude:``,map_url:``,booking_url:``,price_range:``,image_url:``,own_hours:!1,hours:{}}}));function Bl({settings:e,onSave:t,saving:n}){let[r,i]=(0,Vl.useState)(null),[a,o]=(0,Vl.useState)(null),[s,c]=(0,Vl.useState)(!1),[l,u]=(0,Vl.useState)(``),[d,f]=(0,Vl.useState)(null),[p,m]=(0,Vl.useState)(30),[h,g]=(0,Vl.useState)(null),_=h||e||{},v=(e=p)=>{c(!0),o(null),E.get(`/analytics/matomo?days=${e}`).then(i).catch(e=>o(e.message)).finally(()=>c(!1))};(0,Vl.useEffect)(()=>{v()},[]);let y=e=>g({..._,...e}),x=async()=>{c(!0),o(null);try{l&&(await E.put(`/analytics/matomo`,{token:l}),u(``)),await t(_),g(null),v()}catch(e){o(e.message)}finally{c(!1)}},C=async()=>{c(!0),f(null),o(null);try{f(await E.post(`/analytics/matomo/verify`))}catch(e){o(e.message)}finally{c(!1)}},w=r?.assistants;return(0,Hl.jsxs)(`div`,{className:`grid gap-3`,children:[a&&(0,Hl.jsx)(M,{tone:`serious`,children:a}),r?.configured&&w&&(0,Hl.jsxs)(k,{icon:(0,Hl.jsx)(bt,{size:16}),title:b(`Visits from AI assistants`,`ai-rank-suite`),subtitle:b(`Real people who arrived from an AI answer — the only hard evidence that being cited is working`,`ai-rank-suite`),action:(0,Hl.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Hl.jsxs)(`select`,{value:p,onChange:e=>{m(Number(e.target.value)),v(Number(e.target.value))},style:{maxWidth:130},"aria-label":b(`Period`,`ai-rank-suite`),children:[(0,Hl.jsx)(`option`,{value:7,children:b(`Last 7 days`,`ai-rank-suite`)}),(0,Hl.jsx)(`option`,{value:30,children:b(`Last 30 days`,`ai-rank-suite`)}),(0,Hl.jsx)(`option`,{value:90,children:b(`Last 90 days`,`ai-rank-suite`)}),(0,Hl.jsx)(`option`,{value:365,children:b(`Last year`,`ai-rank-suite`)})]}),(0,Hl.jsx)(A,{variant:`ghost`,busy:s,onClick:()=>v(),children:(0,Hl.jsx)(yt,{size:13})})]}),children:[(0,Hl.jsx)(be,{columns:4,metrics:[{id:`assistants`,label:b(`From assistants`,`ai-rank-suite`),hint:b(`Visits whose referrer names an AI assistant. A floor, not a total — many assistants strip the referrer entirely.`,`ai-rank-suite`),value:w.total.toLocaleString(),sub:S(b(`%s%% of all referred visits`,`ai-rank-suite`),w.share)},{id:`other`,label:b(`From other sites`,`ai-rank-suite`),hint:b(`Ordinary referral traffic, for scale.`,`ai-rank-suite`),value:w.other.toLocaleString()},{id:`visits`,label:b(`Visits`,`ai-rank-suite`),hint:b(`All visits in the selected period, straight from Matomo.`,`ai-rank-suite`),value:(r.totals?.visits||0).toLocaleString(),sub:S(b(`%s people`,`ai-rank-suite`),(r.totals?.visitors||0).toLocaleString())},{id:`depth`,label:b(`Pages per visit`,`ai-rank-suite`),value:r.totals?.visits>0?(r.totals.actions/r.totals.visits).toFixed(1):`—`,sub:S(b(`%s%% bounced`,`ai-rank-suite`),r.totals?.bounce||0)}]}),w.engines.length>0?(0,Hl.jsx)(`div`,{className:`mt-4`,children:(0,Hl.jsx)(We,{items:w.engines.map(e=>({label:e.name,value:e.visits})),max:Math.max(...w.engines.map(e=>e.visits)),color:`var(--ars-brand)`,format:e=>S(b(`%s visits`,`ai-rank-suite`),e.toLocaleString())})}):(0,Hl.jsx)(M,{tone:`warning`,children:b(`No visits from a named AI assistant in this period. That is normal early on — being cited takes weeks to turn into clicks, and many assistants strip the referrer entirely, so this number is a floor rather than a total.`,`ai-rank-suite`)}),r.series?.length>1&&(0,Hl.jsxs)(`div`,{className:`mt-4`,children:[(0,Hl.jsx)(`div`,{className:`t-overline mb-1`,children:b(`Visits per day`,`ai-rank-suite`)}),(0,Hl.jsx)(Le,{data:r.series.map(e=>e.value),height:44,color:`var(--ars-brand)`})]})]}),r?.configured&&(r.channels||[]).length>0&&(0,Hl.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:[(0,Hl.jsx)(k,{title:b(`Where visits come from`,`ai-rank-suite`),subtitle:`Matomo's own channel grouping`,flush:!0,children:(0,Hl.jsx)(`div`,{className:`p-4`,children:(0,Hl.jsx)(Ue,{segments:r.channels.map((e,t)=>({label:e.label,value:e.visits,color:[`var(--ars-series-1)`,`var(--ars-series-2)`,`var(--ars-series-3)`,`var(--ars-series-4)`,`var(--ars-ink-3)`][t%5]}))})})}),(0,Hl.jsx)(k,{title:b(`Most visited pages`,`ai-rank-suite`),flush:!0,children:(0,Hl.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Hl.jsxs)(`table`,{className:`ars-table`,children:[(0,Hl.jsx)(`thead`,{children:(0,Hl.jsxs)(`tr`,{children:[(0,Hl.jsx)(`th`,{children:b(`Page`,`ai-rank-suite`)}),(0,Hl.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Views`,`ai-rank-suite`)})]})}),(0,Hl.jsx)(`tbody`,{children:(r.pages||[]).slice(0,10).map((e,t)=>(0,Hl.jsxs)(`tr`,{children:[(0,Hl.jsx)(`td`,{className:`truncate`,children:e.path}),(0,Hl.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.views.toLocaleString()})]},t))})]})})})]}),(0,Hl.jsxs)(k,{icon:(0,Hl.jsx)(ht,{size:16}),title:b(`Matomo connection`,`ai-rank-suite`),subtitle:b(`Your own Matomo — self-hosted or Matomo Cloud. Nothing is proxied anywhere.`,`ai-rank-suite`),action:(0,Hl.jsxs)(`div`,{className:`flex items-center gap-2`,children:[r?.configured&&(0,Hl.jsx)(j,{tone:`good`,children:b(`Connected`,`ai-rank-suite`)}),(0,Hl.jsx)(A,{busy:s||n,onClick:x,disabled:!h&&!l,children:b(`Save`,`ai-rank-suite`)})]}),children:[(0,Hl.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Hl.jsx)(Ke,{label:b(`Matomo URL`,`ai-rank-suite`),hint:b(`The root, e.g. https://analytics.example.com/ — not the path to index.php.`,`ai-rank-suite`),className:`sm:col-span-2`,children:(0,Hl.jsx)(`input`,{type:`url`,value:_.matomo_url||``,placeholder:`https://analytics.example.com/`,onChange:e=>y({matomo_url:e.target.value})})}),(0,Hl.jsx)(Ke,{label:b(`Site ID`,`ai-rank-suite`),hint:b(`The idSite number in Matomo, usually 1.`,`ai-rank-suite`),children:(0,Hl.jsx)(`input`,{type:`number`,min:`1`,value:_.matomo_site_id||``,onChange:e=>y({matomo_site_id:Number(e.target.value)})})}),(0,Hl.jsx)(Ke,{label:b(`API token`,`ai-rank-suite`),hint:r?.hint?S(b(`Stored (%s). Enter a new one to replace it.`,`ai-rank-suite`),r.hint):b(`Matomo → Administration → Personal → Security → Auth tokens. Stored encrypted; sent by POST, never in a URL.`,`ai-rank-suite`),children:(0,Hl.jsx)(`input`,{type:`password`,autoComplete:`off`,value:l,placeholder:r?.hint?`••••••••`:b(`Paste the token`,`ai-rank-suite`),onChange:e=>u(e.target.value)})})]}),(0,Hl.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap mt-3`,children:[(0,Hl.jsx)(A,{variant:`ghost`,busy:s,onClick:C,children:b(`Test the connection`,`ai-rank-suite`)}),d&&(0,Hl.jsxs)(Hl.Fragment,{children:[(0,Hl.jsx)(j,{tone:d.matches?`good`:`warning`,children:d.name||b(`Connected`,`ai-rank-suite`)}),!d.matches&&(0,Hl.jsx)(`span`,{className:`text-[12px]`,style:{color:`var(--ars-warning)`},children:S(b(`That Matomo site is set up for %s, not this one — the report would be somebody else’s traffic.`,`ai-rank-suite`),d.main_url||b(`another address`,`ai-rank-suite`))})]})]}),(0,Hl.jsxs)(`div`,{className:`grid gap-2 mt-4`,children:[(0,Hl.jsx)(Ee,{checked:!!_.matomo_enabled,onChange:e=>y({matomo_enabled:e}),label:b(`Read reports from Matomo`,`ai-rank-suite`)}),(0,Hl.jsx)(Ee,{checked:!!_.matomo_track,onChange:e=>y({matomo_track:e}),label:b(`Also add the tracking code to the site`,`ai-rank-suite`)}),_.matomo_track&&(0,Hl.jsxs)(`div`,{className:`ml-[48px] grid gap-2`,children:[(0,Hl.jsx)(Ee,{checked:!!_.matomo_cookieless,onChange:e=>y({matomo_cookieless:e}),label:b(`Track without cookies`,`ai-rank-suite`)}),(0,Hl.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-2)`},children:b(`Cookieless is on by default. Matomo can measure without setting a cookie, and a site that chose Matomo over Google Analytics has usually chosen it for exactly that reason. Leave the tracking code off if Matomo is already installed by another plugin or by your theme — two snippets means every visit counted twice.`,`ai-rank-suite`)})]})]})]}),(0,Hl.jsxs)(ot,{title:b(`Why this number is a floor, not a total`,`ai-rank-suite`),children:[(0,Hl.jsx)(`p`,{children:b(`A visit is attributed to an assistant only when the browser sends a referrer naming it. Several assistants strip the referrer entirely, some open links in an in-app browser that sends nothing, and anyone who reads an answer and then types your name into a search box arrives as organic search. So the real influence of AI answers is always larger than this figure — treat it as the part you can prove.`,`ai-rank-suite`)}),(0,Hl.jsx)(`p`,{children:b(`The direction still matters more than the level. If this number is climbing month over month while your published pages are unchanged, the citations are working.`,`ai-rank-suite`)}),(0,Hl.jsxs)(`p`,{className:`flex items-center gap-1`,children:[(0,Hl.jsx)(`a`,{href:`https://matomo.org/faq/general/faq_114/`,target:`_blank`,rel:`noreferrer`,children:b(`How to create a Matomo auth token`,`ai-rank-suite`)}),(0,Hl.jsx)(vt,{size:10})]})]})]})}var Vl,Hl,Ul=o((()=>{Vl=u(f(),1),C(),D(),at(),ct(),Ft(),Hl=O()}));function Wl(){let{data:e,s:t,update:n,save:r,busy:i,saved:a,error:o}=Wa(`/settings/analytics`);if(!e)return(0,ql.jsx)(_e,{error:o});let s=t.consent_region||`eu`;return(0,ql.jsxs)(`div`,{className:`grid gap-4`,children:[o&&(0,ql.jsx)(M,{tone:`serious`,children:o}),(0,ql.jsx)(k,{title:b(`GDPR / consent manager`,`ai-rank-suite`),subtitle:b(`Categories, regional behaviour and Google Consent Mode v2 — one banner for EU opt-in and US opt-out`,`ai-rank-suite`),action:(0,ql.jsxs)(`div`,{className:`flex items-center gap-2`,children:[a&&(0,ql.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,ql.jsx)(Ee,{checked:!!t.consent_enabled,onChange:e=>n({consent_enabled:e}),label:t.consent_enabled?b(`Banner on`,`ai-rank-suite`):b(`Banner off`,`ai-rank-suite`)})]}),children:(0,ql.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-[minmax(0,1.15fr)_minmax(0,1fr)] items-start`,children:[(0,ql.jsxs)(`div`,{className:`grid gap-4`,children:[(0,ql.jsx)(Ke,{label:b(`Legal posture`,`ai-rank-suite`),hint:b(`EU: nothing non-essential runs until the visitor opts in. US: tracking runs, a persistent “Do not sell or share” link lets visitors opt out (CCPA/CPRA). Auto: an EU/UK/CH language or CDN country header selects EU, everything else US — a proxy, not geolocation.`,`ai-rank-suite`),children:(0,ql.jsx)(He,{value:s,onChange:e=>n({consent_region:e}),options:[{id:`eu`,label:b(`EU opt-in`,`ai-rank-suite`)},{id:`us`,label:b(`US opt-out`,`ai-rank-suite`)},{id:`auto`,label:b(`Auto by visitor`,`ai-rank-suite`)}]})}),(0,ql.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,ql.jsx)(Ke,{label:b(`Layout`,`ai-rank-suite`),children:(0,ql.jsx)(He,{value:t.consent_layout||`card`,onChange:e=>n({consent_layout:e}),options:[{id:`card`,label:b(`Card`,`ai-rank-suite`)},{id:`bar`,label:b(`Bar`,`ai-rank-suite`)}]})}),(0,ql.jsx)(Ke,{label:b(`Position`,`ai-rank-suite`),children:(0,ql.jsx)(He,{value:t.consent_position||`right`,onChange:e=>n({consent_position:e}),options:[{id:`left`,label:b(`Left`,`ai-rank-suite`)},{id:`right`,label:b(`Right`,`ai-rank-suite`)}]})}),(0,ql.jsx)(Ke,{label:b(`Theme`,`ai-rank-suite`),children:(0,ql.jsx)(He,{value:t.consent_theme||`auto`,onChange:e=>n({consent_theme:e}),options:[{id:`auto`,label:b(`Auto`,`ai-rank-suite`)},{id:`light`,label:b(`Light`,`ai-rank-suite`)},{id:`dark`,label:b(`Dark`,`ai-rank-suite`)}]})})]}),(0,ql.jsxs)(`div`,{className:`grid gap-2.5 ars-r-md p-3.5`,style:{background:`var(--ars-surface-2)`},children:[(0,ql.jsx)(`div`,{className:`font-semibold text-[13px]`,children:b(`Categories & signals`,`ai-rank-suite`)}),(0,ql.jsx)(Ee,{checked:!0,label:b(`Necessary — always on`,`ai-rank-suite`),disabled:!0,onChange:()=>{}}),(0,ql.jsx)(Ee,{checked:!0,label:b(`Analytics — GA4, Matomo, Clarity`,`ai-rank-suite`),disabled:!0,onChange:()=>{}}),(0,ql.jsx)(Ee,{checked:!!t.consent_marketing,onChange:e=>n({consent_marketing:e}),label:b(`Marketing — show a category for ad and remarketing pixels you add via snippets`,`ai-rank-suite`)}),(0,ql.jsx)(Ee,{checked:!!t.consent_gcm,onChange:e=>n({consent_gcm:e}),label:b(`Google Consent Mode v2 — default denied under opt-in, updated live on choice, so GA4 keeps modelled data`,`ai-rank-suite`)}),(0,ql.jsx)(Ee,{checked:!!t.consent_reopen,onChange:e=>n({consent_reopen:e}),label:b(`Persistent reopen control (🍪 button in EU, “Do not sell or share” link in US)`,`ai-rank-suite`)})]}),(0,ql.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,ql.jsx)(Ke,{label:b(`Title`,`ai-rank-suite`),children:(0,ql.jsx)(`input`,{type:`text`,value:t.consent_title||``,onChange:e=>n({consent_title:e.target.value})})}),(0,ql.jsx)(Ke,{label:b(`Privacy policy URL`,`ai-rank-suite`),hint:b(`Empty = WordPress' privacy page`,`ai-rank-suite`),children:(0,ql.jsx)(`input`,{type:`url`,placeholder:`https://…/privacy`,value:t.consent_policy||``,onChange:e=>n({consent_policy:e.target.value})})})]}),(0,ql.jsx)(Ke,{label:b(`Message`,`ai-rank-suite`),children:(0,ql.jsx)(`textarea`,{rows:3,value:t.consent_message||``,onChange:e=>n({consent_message:e.target.value})})}),(0,ql.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2 lg:grid-cols-3`,children:[[[`consent_accept`,b(`Accept button`,`ai-rank-suite`)],[`consent_reject`,b(`Reject button`,`ai-rank-suite`)],[`consent_save`,b(`Save button`,`ai-rank-suite`)],[`consent_manage`,b(`Manage button`,`ai-rank-suite`)],[`consent_dns`,b(`US opt-out link`,`ai-rank-suite`)]].map(([e,r])=>(0,ql.jsx)(Ke,{label:r,children:(0,ql.jsx)(`input`,{type:`text`,value:t[e]||``,onChange:t=>n({[e]:t.target.value})})},e)),(0,ql.jsx)(Ke,{label:b(`Remember choice for (days)`,`ai-rank-suite`),children:(0,ql.jsx)(`input`,{type:`number`,min:1,max:730,value:t.consent_expiry??180,onChange:e=>n({consent_expiry:Number(e.target.value)})})})]}),(0,ql.jsx)(`div`,{children:(0,ql.jsx)(A,{onClick:r,busy:i,children:b(`Save`,`ai-rank-suite`)})})]}),(0,ql.jsxs)(`div`,{className:`grid gap-2`,children:[(0,ql.jsxs)(`div`,{className:`t-caption`,children:[b(`Preview`,`ai-rank-suite`),` · `,b(s===`us`?`US opt-out`:s===`auto`?`Auto (EU shown)`:`EU opt-in`,`ai-rank-suite`)]}),(0,ql.jsx)(`div`,{className:`ars-r-lg p-6`,style:{background:t.consent_theme===`dark`?`#131318`:`var(--ars-canvas)`,minHeight:300,display:`flex`,alignItems:`flex-end`,justifyContent:t.consent_layout===`bar`?`stretch`:t.consent_position===`left`?`flex-start`:`flex-end`},children:(0,ql.jsxs)(`div`,{style:{background:t.consent_theme===`dark`?`#1c1c23`:`#fff`,color:t.consent_theme===`dark`?`#e9e9ef`:`#16161e`,border:`1px solid ${t.consent_theme===`dark`?`#34343f`:`#e4e5ea`}`,borderRadius:16,padding:`18px 18px 14px`,boxShadow:`0 12px 40px rgba(0,0,0,.22)`,width:t.consent_layout===`bar`?`100%`:340,maxWidth:`100%`},children:[(0,ql.jsx)(`div`,{style:{fontWeight:700,fontSize:15,marginBottom:4},children:t.consent_title||b(`We value your privacy`,`ai-rank-suite`)}),(0,ql.jsxs)(`div`,{style:{fontSize:12.5,opacity:.75,marginBottom:12},children:[t.consent_message||`…`,` `,(0,ql.jsx)(`span`,{style:{color:`var(--ars-brand)`,textDecoration:`underline`},children:b(`Privacy policy`,`ai-rank-suite`)})]}),(0,ql.jsxs)(`div`,{className:`flex gap-2 flex-wrap`,children:[(0,ql.jsx)(`span`,{className:`ars-btn ars-btn-primary`,style:{pointerEvents:`none`},children:t.consent_accept||b(`Accept all`,`ai-rank-suite`)}),(0,ql.jsx)(`span`,{className:`ars-btn ars-btn-ghost`,style:{pointerEvents:`none`},children:t.consent_reject||b(`Reject all`,`ai-rank-suite`)}),(0,ql.jsx)(`span`,{className:`ars-btn ars-btn-ghost`,style:{pointerEvents:`none`,borderColor:`transparent`,opacity:.7},children:t.consent_manage||b(`Manage`,`ai-rank-suite`)})]})]})}),s===`us`&&(0,ql.jsx)(`div`,{className:`t-caption`,children:S(b(`US mode also prints a persistent “%s” link.`,`ai-rank-suite`),t.consent_dns||b(`Do not sell or share my personal information`,`ai-rank-suite`))})]})]})}),(0,ql.jsx)(Gl,{s:t,update:n,save:r})]})}function Gl({s:e,update:t,save:n}){let[r,i]=(0,Kl.useState)(null),[a,o]=(0,Kl.useState)(``),[s,c]=(0,Kl.useState)(null),l=()=>E.get(`/consent/log`).then(i).catch(e=>c(e.message));(0,Kl.useEffect)(()=>{l()},[]);let u=async(e,t)=>{o(e),c(null);try{await t()}catch(e){c(e.message)}finally{o(``)}},d=Number(e.consent_version||1);return(0,ql.jsxs)(k,{title:b(`Proof of consent`,`ai-rank-suite`),subtitle:b(`An anonymous technical event log: what the banner reported, when, under which policy version. The endpoint that records it is public by necessity — the banner runs before any login — so treat this as an operational record, not as legal proof of consent.`,`ai-rank-suite`),action:(0,ql.jsx)(Ee,{checked:e.consent_log!==!1,onChange:e=>{t({consent_log:e}),n({consent_log:e})},label:b(`Keep a record`,`ai-rank-suite`)}),children:[s&&(0,ql.jsx)(M,{tone:`serious`,children:s}),e.consent_log===!1?(0,ql.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`No record is kept. The banner still works and still gates the tags — but if anyone asks the site to demonstrate that a visitor agreed, there will be nothing to show.`,`ai-rank-suite`)}):r?r.total===0?(0,ql.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Nothing recorded yet. The first visitor who answers the banner appears here — the record is written on their choice, not on their visit.`,`ai-rank-suite`)}):(0,ql.jsxs)(`div`,{className:`grid gap-4`,children:[(0,ql.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-4`,children:[{label:b(`Decisions`,`ai-rank-suite`),value:r.total,tone:`var(--ars-ink)`},{label:b(`Accepted all`,`ai-rank-suite`),value:r.accepted,tone:`var(--ars-good)`},{label:b(`Rejected all`,`ai-rank-suite`),value:r.rejected,tone:`var(--ars-serious)`},{label:b(`Chose their own`,`ai-rank-suite`),value:r.custom,tone:`var(--ars-brand)`}].map(e=>(0,ql.jsxs)(`div`,{className:`ars-r-md px-3 py-2.5`,style:{background:`var(--ars-surface-2)`},children:[(0,ql.jsx)(`div`,{className:`t-num text-[19px] font-bold`,style:{color:e.tone},children:Number(e.value).toLocaleString()}),(0,ql.jsx)(`div`,{className:`t-caption`,children:e.label})]},e.label))}),(0,ql.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,ql.jsx)(j,{tone:r.rate>=50?`good`:`neutral`,children:S(b(`%s%% accepted everything`,`ai-rank-suite`),r.rate)}),(0,ql.jsx)(j,{tone:`neutral`,children:S(b(`%s allowed analytics`,`ai-rank-suite`),r.analytics.toLocaleString())}),r.marketing>0&&(0,ql.jsx)(j,{tone:`neutral`,children:S(b(`%s allowed marketing`,`ai-rank-suite`),r.marketing.toLocaleString())}),r.first_at&&(0,ql.jsx)(`span`,{className:`t-caption`,children:S(b(`since %s`,`ai-rank-suite`),r.first_at.slice(0,10))})]}),r.stale>0&&(0,ql.jsx)(M,{tone:`warning`,children:S(b(`%s of these were given under an older policy version. Those visitors are being asked again — their old answer no longer counts, which is the correct behaviour after the cookie policy changes.`,`ai-rank-suite`),r.stale.toLocaleString())})]}):(0,ql.jsx)(`span`,{className:`t-caption`,children:b(`Reading the record…`,`ai-rank-suite`)}),(0,ql.jsxs)(`div`,{className:`grid gap-3 mt-4 pt-4`,style:{borderTop:`1px solid var(--ars-line)`},children:[(0,ql.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,ql.jsxs)(`div`,{className:`min-w-0`,children:[(0,ql.jsx)(`div`,{className:`font-semibold text-[13px]`,children:S(b(`Policy version %d`,`ai-rank-suite`),d)}),(0,ql.jsx)(`div`,{className:`t-caption`,children:b(`Raise this after changing the cookie policy or adding a tag. Everyone who agreed to the old text is asked again; everyone else is left alone.`,`ai-rank-suite`)})]}),(0,ql.jsx)(A,{variant:`ghost`,busy:a===`bump`,onClick:()=>u(`bump`,async()=>{let e=d+1;t({consent_version:e}),await n({consent_version:e}),await l()}),children:b(`Ask everyone again`,`ai-rank-suite`)})]}),(0,ql.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,ql.jsx)(A,{variant:`ghost`,busy:a===`csv`,onClick:()=>u(`csv`,async()=>{let e=[],t=0;for(let n=0;n<2e3;n++){let n=await E.get(`/consent/log/csv?after=${t}&per_page=2000`);if(e.push(n.csv||``),n.next===null||n.next===void 0)break;t=n.next}let n=URL.createObjectURL(new Blob(e,{type:`text/csv`})),r=document.createElement(`a`);r.href=n,r.download=`consent-record.csv`,r.click(),URL.revokeObjectURL(n)}),children:b(`Export the record (CSV)`,`ai-rank-suite`)}),(0,ql.jsx)(A,{variant:`ghost`,busy:a===`clear`,onClick:()=>{window.confirm(b(`Delete every recorded decision? The log cannot be rebuilt.`,`ai-rank-suite`))&&u(`clear`,async()=>i(await E.del(`/consent/log`)))},children:b(`Delete the record`,`ai-rank-suite`)}),(0,ql.jsx)(`span`,{className:`t-caption`,children:S(b(`Kept for %s days, then deleted automatically.`,`ai-rank-suite`),Number(e.consent_log_days||365).toLocaleString())})]})]})]})}var Kl,ql,Jl=o((()=>{Kl=u(f(),1),C(),Ka(),D(),at(),ql=O()})),Yl=c({default:()=>eu});function Xl(){let[e,t]=(0,ru.useState)(null),[n,r]=(0,ru.useState)(null),[i,a]=(0,ru.useState)(null),[o,s]=(0,ru.useState)(28),[c,l]=(0,ru.useState)(!1),[u,d]=(0,ru.useState)(!1),[f,p]=(0,ru.useState)(null),[m,h]=(0,ru.useState)(null),[g,_]=(0,ru.useState)(!1);if((0,ru.useEffect)(()=>{E.get(`/settings/analytics`).then(t).catch(e=>p(e.message))},[]),(0,ru.useEffect)(()=>{e?.settings?.property_id&&(r(null),E.get(`/analytics/report?days=${o}`).then(r).catch(e=>p(e.message)))},[e?.settings?.property_id,o]),!e)return(0,X.jsx)(_e,{error:f});let v=e.settings,y=n=>t({...e,settings:{...v,...n}}),x=async()=>{l(!0),p(null);try{t(await E.put(`/settings/analytics`,v)),d(!0),setTimeout(()=>d(!1),2200)}catch(e){p(e.message)}finally{l(!1)}},C=async()=>{l(!0),p(null);try{let e=await E.get(`/analytics/properties`);a(e.properties)}catch(e){p(e.message)}finally{l(!1)}},w=async()=>{l(!0),p(null),h(null);try{let e=await E.post(`/gsc/auto-configure`,{});h(e),e.ga4_property&&(t(await E.get(`/settings/analytics`)),_(!1))}catch(e){p(e.message)}finally{l(!1)}},ee=async()=>{l(!0),p(null);try{let e=``;try{e=(await E.get(`/gsc/signin-url`)).url||``}catch{e=(await E.get(`/gsc/connect-url`)).url||``}if(!e)throw Error(b(`Google sign-in is not available on this site.`,`ai-rank-suite`));window.location.href=e}catch(e){p(e.message),l(!1)}},T=e=>e>=1e4?`${(e/1e3).toFixed(1)}k`:String(e);return(0,X.jsxs)(`div`,{className:`grid gap-4`,children:[f&&(0,X.jsx)(M,{tone:`serious`,children:f}),n&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`div`,{className:`flex justify-end`,children:(0,X.jsx)(Ae,{tabs:[{id:7,label:b(`7 days`,`ai-rank-suite`)},{id:28,label:b(`28 days`,`ai-rank-suite`)},{id:90,label:b(`90 days`,`ai-rank-suite`)}],active:o,onChange:s})}),(0,X.jsx)(be,{columns:4,metrics:[{id:`users`,label:b(`Users`,`ai-rank-suite`),hint:b(`Distinct people, as GA4 counts them, in the reporting period.`,`ai-rank-suite`),value:n.totals.users==null?`—`:T(n.totals.users)},{id:`sessions`,label:b(`Sessions`,`ai-rank-suite`),hint:b(`Visits — one person coming back twice counts twice here.`,`ai-rank-suite`),value:n.totals.sessions==null?`—`:T(n.totals.sessions)},{id:`pageviews`,label:b(`Pageviews`,`ai-rank-suite`),hint:b(`Every page load, including repeat views of the same page.`,`ai-rank-suite`),value:n.totals.pageviews==null?`—`:T(n.totals.pageviews)},{id:`engagement`,label:b(`Engagement rate`,`ai-rank-suite`),hint:b(`Sessions that lasted, converted, or viewed more than one page — GA4’s replacement for bounce rate.`,`ai-rank-suite`),value:n.totals.engagement==null?`—`:n.totals.engagement,unit:n.totals.engagement==null?``:`%`}]}),(0,X.jsx)(k,{title:b(`Users over time`,`ai-rank-suite`),children:(0,X.jsx)(je,{label:b(`Active users`,`ai-rank-suite`),color:`var(--ars-series-1)`,data:n.series})}),n.pages.length>0&&(0,X.jsx)(k,{title:b(`Top pages`,`ai-rank-suite`),children:(0,X.jsx)(`div`,{className:`ars-table-wrap`,children:(0,X.jsxs)(`table`,{className:`ars-table`,children:[(0,X.jsx)(`thead`,{children:(0,X.jsxs)(`tr`,{children:[(0,X.jsx)(`th`,{children:b(`Path`,`ai-rank-suite`)}),(0,X.jsx)(`th`,{className:`is-num`,children:b(`Pageviews`,`ai-rank-suite`)}),(0,X.jsx)(`th`,{className:`is-num`,children:b(`Users`,`ai-rank-suite`)})]})}),(0,X.jsx)(`tbody`,{children:n.pages.map(e=>(0,X.jsxs)(`tr`,{children:[(0,X.jsx)(`td`,{className:`ars-mono`,style:{maxWidth:340},title:e.path,children:(0,X.jsx)(`span`,{className:`ars-url`,children:e.path})}),(0,X.jsx)(`td`,{className:`is-num`,children:e.pageviews}),(0,X.jsx)(`td`,{className:`is-num`,children:e.users})]},e.path))})]})})})]}),(0,X.jsx)(Se,{title:b(`Google Analytics settings`,`ai-rank-suite`),note:v.enabled?v.measurement_id||b(`Tracking on`,`ai-rank-suite`):b(`Tracking off`,`ai-rank-suite`),defaultOpen:!n,children:(0,X.jsx)(k,{title:b(`Google Analytics 4`,`ai-rank-suite`),subtitle:b(`Adds the tracking tag and pulls reports through your existing Google connection`,`ai-rank-suite`),action:(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[u&&(0,X.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,X.jsx)(Ee,{checked:!!v.enabled,onChange:e=>y({enabled:e}),label:v.enabled?b(`Tracking on`,`ai-rank-suite`):b(`Tracking off`,`ai-rank-suite`)})]}),children:(0,X.jsxs)(`div`,{className:`grid gap-4`,children:[e.connected?v.property_id?(0,X.jsxs)(`div`,{className:`ars-connect is-good`,children:[(0,X.jsxs)(`div`,{className:`min-w-0`,children:[(0,X.jsx)(`div`,{className:`font-semibold text-[13.5px]`,children:S(b(`Connected to property %s`,`ai-rank-suite`),v.property_id)}),(0,X.jsx)(`p`,{className:`m-0 t-caption`,children:v.measurement_id?S(b(`Reports read through your Google sign-in. Tracking tag: %s`,`ai-rank-suite`),v.measurement_id):b(`Reports read through your Google sign-in. No tracking tag set — reporting works without one.`,`ai-rank-suite`)})]}),(0,X.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(A,{variant:`ghost`,busy:c,onClick:w,children:b(`Re-detect`,`ai-rank-suite`)}),(0,X.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>_(e=>!e),children:b(g?`Hide IDs`:`Change IDs`,`ai-rank-suite`)})]})]}):(0,X.jsxs)(`div`,{className:`ars-connect`,children:[(0,X.jsxs)(`div`,{className:`min-w-0`,children:[(0,X.jsx)(`div`,{className:`font-semibold text-[13.5px]`,children:b(`Google is connected — no property picked yet`,`ai-rank-suite`)}),(0,X.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Matches your domain against the data streams in your Google account and saves the match.`,`ai-rank-suite`)})]}),(0,X.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(A,{variant:`primary`,busy:c,onClick:w,children:b(`Find my property`,`ai-rank-suite`)}),(0,X.jsx)(A,{variant:`ghost`,busy:c,onClick:C,children:b(`List all`,`ai-rank-suite`)})]})]}):(0,X.jsxs)(`div`,{className:`ars-connect`,children:[(0,X.jsxs)(`div`,{className:`min-w-0`,children:[(0,X.jsx)(`div`,{className:`font-semibold text-[13.5px]`,children:b(`Not connected to Google`,`ai-rank-suite`)}),(0,X.jsx)(`p`,{className:`m-0 t-caption`,children:b(`One sign-in covers Search Console and Analytics. Nothing is typed in by hand.`,`ai-rank-suite`)})]}),(0,X.jsx)(A,{variant:`primary`,busy:c,onClick:ee,children:b(`Sign in with Google`,`ai-rank-suite`)})]}),(g||e.connected&&!v.property_id&&i)&&(0,X.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Measurement ID`,`ai-rank-suite`)}),(0,X.jsx)(`input`,{type:`text`,placeholder:b(`G-XXXXXXXXXX`,`ai-rank-suite`),value:v.measurement_id,onChange:e=>y({measurement_id:e.target.value})})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Property ID (for reports)`,`ai-rank-suite`)}),(0,X.jsx)(`input`,{type:`text`,placeholder:`123456789`,value:v.property_id,onChange:e=>y({property_id:e.target.value})})]})]}),m&&!m.ga4_property&&(0,X.jsx)(M,{tone:`warning`,children:b(`No property in this Google account points at this site. Use “List all” and pick one, or create a web data stream for this domain in Analytics first.`,`ai-rank-suite`)}),i&&(0,X.jsxs)(`div`,{className:`grid gap-1.5`,children:[i.length===0&&(0,X.jsx)(`p`,{className:`m-0 text-[13px]`,children:b(`No GA4 properties found for this account.`,`ai-rank-suite`)}),i.map(e=>(0,X.jsxs)(A,{variant:`ghost`,onClick:()=>y({property_id:e.id}),children:[e.name,` — `,e.id]},e.id))]}),(0,X.jsx)(Ee,{checked:!!v.anonymize_ip,onChange:e=>y({anonymize_ip:e}),label:b(`Anonymize IP addresses`,`ai-rank-suite`)}),(0,X.jsx)(Ee,{checked:!!v.exclude_loggedin,onChange:e=>y({exclude_loggedin:e}),label:b(`Do not track logged-in users of these roles`,`ai-rank-suite`)}),v.exclude_loggedin&&(0,X.jsx)(`div`,{className:`flex gap-x-4 gap-y-2 flex-wrap text-[12.5px] ars-r-sm px-3 py-2.5 ml-[52px]`,style:{background:`var(--ars-surface-2)`},children:e.roles.map(e=>(0,X.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,X.jsx)(`input`,{type:`checkbox`,checked:v.exclude_roles.includes(e.slug),onChange:t=>y({exclude_roles:t.target.checked?[...v.exclude_roles,e.slug]:v.exclude_roles.filter(t=>t!==e.slug)})}),e.name]},e.slug))}),(0,X.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Consent for all analytics tags lives under the “GDPR / Consent” tab — categories, EU/US behaviour and Google Consent Mode v2.`,`ai-rank-suite`)}),(0,X.jsx)(`div`,{children:(0,X.jsx)(A,{onClick:x,busy:c,children:b(`Save`,`ai-rank-suite`)})})]})})})]})}function Zl(){let[e,t]=(0,ru.useState)(null),[n,r]=(0,ru.useState)(!1),[i,a]=(0,ru.useState)(!1),[o,s]=(0,ru.useState)(null),[c,l]=(0,ru.useState)(null);if((0,ru.useEffect)(()=>{E.get(`/settings/reports`).then(t).catch(e=>l(e.message))},[]),!e)return(0,X.jsx)(_e,{error:c});let u=e.settings,d=n=>t({...e,settings:{...u,...n}});return(0,X.jsxs)(`div`,{className:`ars-page`,children:[c&&(0,X.jsx)(M,{tone:`serious`,children:c}),(0,X.jsx)(k,{title:b(`Email reports`,`ai-rank-suite`),subtitle:b(`Scores, search performance and keyword movement — straight to your inbox or your client's`,`ai-rank-suite`),action:(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[i&&(0,X.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,X.jsx)(Ee,{checked:!!u.enabled,onChange:e=>d({enabled:e}),label:b(`Enabled`,`ai-rank-suite`)})]}),children:(0,X.jsxs)(`div`,{className:`grid gap-4`,children:[(0,X.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Frequency`,`ai-rank-suite`)}),(0,X.jsxs)(`select`,{value:u.frequency,onChange:e=>d({frequency:e.target.value}),children:[(0,X.jsx)(`option`,{value:`weekly`,children:b(`Weekly`,`ai-rank-suite`)}),(0,X.jsx)(`option`,{value:`monthly`,children:b(`Monthly (on the 1st)`,`ai-rank-suite`)})]})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Recipients`,`ai-rank-suite`)}),(0,X.jsx)(`input`,{type:`text`,placeholder:b(`you@example.com, client@example.com`,`ai-rank-suite`),value:u.recipients,onChange:e=>d({recipients:e.target.value})})]})]}),(0,X.jsxs)(`div`,{className:`ars-r-md p-3 grid gap-3`,style:{background:`var(--ars-surface-2)`},children:[(0,X.jsx)(`div`,{className:`font-semibold text-[13px]`,children:b(`White label`,`ai-rank-suite`)}),(0,X.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Brand name`,`ai-rank-suite`)}),(0,X.jsx)(`input`,{type:`text`,value:u.brand_name,onChange:e=>d({brand_name:e.target.value})})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Sender name`,`ai-rank-suite`)}),(0,X.jsx)(`input`,{type:`text`,value:u.from_name,onChange:e=>d({from_name:e.target.value})})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Logo URL`,`ai-rank-suite`)}),(0,X.jsx)(`input`,{type:`text`,value:u.logo_url,onChange:e=>d({logo_url:e.target.value})})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Accent color`,`ai-rank-suite`)}),(0,X.jsx)(`input`,{type:`text`,value:u.accent,onChange:e=>d({accent:e.target.value})})]})]}),(0,X.jsx)(Ee,{checked:!!u.white_label,onChange:e=>d({white_label:e}),label:b(`Replace the plugin footer with your brand`,`ai-rank-suite`)})]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,X.jsx)(A,{onClick:async()=>{r(!0),l(null);try{t(await E.put(`/settings/reports`,u)),a(!0),setTimeout(()=>a(!1),2200)}catch(e){l(e.message)}finally{r(!1)}},busy:n,children:b(`Save`,`ai-rank-suite`)}),(0,X.jsx)(A,{variant:`ghost`,onClick:async()=>{r(!0),l(null);try{let e=await E.post(`/reports/send`);s(e)}catch(e){l(e.message)}finally{r(!1)}},busy:n,children:b(`Send test report now`,`ai-rank-suite`)}),(0,X.jsx)(`a`,{href:`${window.airanksuiteData.restUrl}/reports/preview?_wpnonce=${window.airanksuiteData.nonce}`,target:`_blank`,rel:`noreferrer`,className:`text-[12.5px]`,children:b(`Preview data ↗`,`ai-rank-suite`)}),o&&(0,X.jsxs)(j,{tone:`good`,children:[`✓ `,S(x(`Sent to %d recipient`,`Sent to %d recipients`,o.sent,`ai-rank-suite`),o.sent)]})]}),e.next_run>0&&(0,X.jsxs)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[S(b(`Next report: %s`,`ai-rank-suite`),new Date(e.next_run*1e3).toLocaleString()),e.sent_at>0&&S(b(` · last sent %s`,`ai-rank-suite`),new Date(e.sent_at*1e3).toLocaleString())]})]})})]})}function Ql(){let[e,t]=(0,ru.useState)(null),[n,r]=(0,ru.useState)(``),[i,a]=(0,ru.useState)(!1),[o,s]=(0,ru.useState)(!1),[c,l]=(0,ru.useState)(null),[u,d]=(0,ru.useState)(!1);if((0,ru.useEffect)(()=>{E.get(`/settings/pagespeed`).then(t).catch(e=>l(e.message))},[]),!e)return(0,X.jsx)(_e,{error:c});let f=async()=>{a(!0),l(null);try{t(await E.put(`/settings/pagespeed`,{strategy:e.settings.strategy,api_key:n})),r(``),s(!0),setTimeout(()=>s(!1),2200)}catch(e){l(e.message)}finally{a(!1)}},p=async()=>{d(!0),l(null);try{let n=await E.post(`/pagespeed/home`,{});t({...e,home:n.result})}catch(e){l(e.message)}finally{d(!1)}},m=e.home;return(0,X.jsxs)(`div`,{className:`ars-page`,children:[c&&(0,X.jsx)(M,{tone:`serious`,children:c}),(0,X.jsx)(k,{title:b(`PageSpeed Insights`,`ai-rank-suite`),subtitle:b(`Core Web Vitals, measured by Google on your live front page`,`ai-rank-suite`),action:(0,X.jsx)(A,{variant:`primary`,busy:u,onClick:p,children:b(`Measure now`,`ai-rank-suite`)}),children:m?(0,X.jsxs)(`div`,{className:`grid gap-3`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-4 flex-wrap`,children:[(0,X.jsx)(`span`,{className:`ars-scorerow-score is-${(e=>e>=90?`good`:e>=50?`warn`:`bad`)(m.score??0)}`,style:{fontSize:22,minWidth:64,padding:`10px 0`},children:m.score??`—`}),(0,X.jsxs)(`span`,{className:`min-w-0`,children:[(0,X.jsx)(`span`,{className:`block font-semibold text-[13.5px]`,children:S(b(`Performance score, measured as %s`,`ai-rank-suite`),m.strategy===`desktop`?b(`desktop`,`ai-rank-suite`):b(`mobile`,`ai-rank-suite`))}),(0,X.jsx)(`span`,{className:`t-caption`,children:e.home_url})]})]}),(0,X.jsx)(be,{columns:4,metrics:[{id:`lcp`,label:`LCP`,hint:b(`Largest Contentful Paint — when the main thing on the page has drawn. Google wants under 2.5s.`,`ai-rank-suite`),value:m.lcp||`—`},{id:`cls`,label:`CLS`,hint:b(`Cumulative Layout Shift — how much the page jumps while it loads. Under 0.1.`,`ai-rank-suite`),value:m.cls||`—`},{id:`tbt`,label:`TBT`,hint:b(`Total Blocking Time — how long the page ignores a tap while scripts run.`,`ai-rank-suite`),value:m.tbt||`—`},{id:`fcp`,label:`FCP`,hint:b(`First Contentful Paint — when the first text or image appears.`,`ai-rank-suite`),value:m.fcp||`—`}]})]}):(0,X.jsx)(`p`,{className:`ars-empty-band`,children:b(`Nothing measured yet. “Measure now” asks Google to load your front page and report what a visitor would wait for.`,`ai-rank-suite`)})}),(0,X.jsx)(k,{title:b(`Settings`,`ai-rank-suite`),subtitle:b(`How the measurement runs, and the key it runs on`,`ai-rank-suite`),action:o&&(0,X.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),children:(0,X.jsxs)(`div`,{className:`grid gap-3`,children:[(0,X.jsxs)(`div`,{className:`sm:max-w-[260px]`,children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Measure as`,`ai-rank-suite`)}),(0,X.jsxs)(`select`,{value:e.settings.strategy,onChange:n=>t({...e,settings:{...e.settings,strategy:n.target.value}}),children:[(0,X.jsx)(`option`,{value:`mobile`,children:b(`Mobile (what Google ranks on)`,`ai-rank-suite`)}),(0,X.jsx)(`option`,{value:`desktop`,children:b(`Desktop`,`ai-rank-suite`)})]})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsxs)(`label`,{className:`block font-medium mb-1`,children:[b(`Google API key (optional)`,`ai-rank-suite`),` `,e.has_key&&(0,X.jsxs)(j,{tone:`good`,children:[`✓ `,b(`stored`,`ai-rank-suite`)]})]}),(0,X.jsx)(`input`,{type:`password`,placeholder:e.has_key?b(`•••••••• (leave empty to keep)`,`ai-rank-suite`):b(`Raises the request quota`,`ai-rank-suite`),value:n,onChange:e=>r(e.target.value)})]}),(0,X.jsx)(`div`,{children:(0,X.jsx)(A,{onClick:f,busy:i,children:b(`Save`,`ai-rank-suite`)})}),(0,X.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Works without a key at low volume. Each measurement takes up to a minute — Google runs a real Lighthouse test.`,`ai-rank-suite`)})]})})]})}function $l(){let[e,t]=(0,ru.useState)(null),[n,r]=(0,ru.useState)(null),[i,a]=(0,ru.useState)(!1),[o,s]=(0,ru.useState)(null);if((0,ru.useEffect)(()=>{E.get(`/settings/analytics`).then(t).catch(e=>s(e.message))},[]),!e)return(0,X.jsx)(_e,{error:o});let c=e.settings||{},l=(c.clarity_id||``).trim(),u=n===null?c.clarity_id||``:n,d=async e=>{a(!0),s(null);try{t(await E.put(`/settings/analytics`,{...c,...e}))}catch(e){s(e.message)}finally{a(!1)}};return(0,X.jsxs)(`div`,{className:`grid gap-4`,children:[o&&(0,X.jsx)(M,{tone:`serious`,children:o}),(0,X.jsx)(k,{title:b(`Microsoft Clarity`,`ai-rank-suite`),subtitle:b(`Free heatmaps and session recordings. No sampling, no row limit, and it does not count against any Google quota.`,`ai-rank-suite`),action:l?(0,X.jsx)(j,{tone:`good`,children:b(`Tag is live`,`ai-rank-suite`)}):(0,X.jsx)(j,{tone:`neutral`,children:b(`Not set up`,`ai-rank-suite`)}),children:(0,X.jsxs)(`div`,{className:`grid gap-3 max-w-[560px]`,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,htmlFor:`airanksuite-clarity-id`,children:b(`Project ID`,`ai-rank-suite`)}),(0,X.jsxs)(`div`,{className:`flex gap-2`,children:[(0,X.jsx)(`input`,{id:`airanksuite-clarity-id`,type:`text`,placeholder:`abcd1234ef`,value:u,onChange:e=>r(e.target.value),style:{flex:1}}),(0,X.jsx)(A,{busy:i,disabled:n===null||n.trim()===(c.clarity_id||``).trim(),onClick:async()=>{await d({clarity_id:n.trim()}),r(null)},children:b(`Save`,`ai-rank-suite`)}),n!==null&&(0,X.jsx)(A,{variant:`ghost`,onClick:()=>r(null),children:b(`Cancel`,`ai-rank-suite`)})]}),(0,X.jsx)(`div`,{className:`text-[11.5px] mt-1.5`,style:{color:`var(--ars-ink-3)`},children:b(`In Clarity: Settings → Overview → Project ID. Ten characters, letters and digits.`,`ai-rank-suite`)})]}),l&&(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,X.jsx)(`a`,{className:`ars-btn ars-btn-ghost`,href:`https://clarity.microsoft.com/projects/view/${encodeURIComponent(l)}/dashboard`,target:`_blank`,rel:`noreferrer noopener`,children:b(`Open this project in Clarity ↗`,`ai-rank-suite`)}),(0,X.jsx)(A,{variant:`ghost`,onClick:async()=>{await d({clarity_id:``}),r(null)},children:b(`Remove`,`ai-rank-suite`)})]})]})}),(0,X.jsx)(k,{title:b(`What the tag does on your site`,`ai-rank-suite`),subtitle:b(`The same rules the other analytics tags follow`,`ai-rank-suite`),children:(0,X.jsxs)(`ul`,{className:`grid gap-2 m-0 pl-4 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:[(0,X.jsx)(`li`,{children:b(`Loads only for visitors — logged-in users and the excluded roles never see it, so your own clicks stay out of the recordings.`,`ai-rank-suite`)}),(0,X.jsx)(`li`,{children:b(`Waits for consent where consent is required: with the cookie bar on, the tag is held until the visitor accepts the analytics category.`,`ai-rank-suite`)}),(0,X.jsx)(`li`,{children:b(`Loads asynchronously from clarity.ms and blocks nothing on the page.`,`ai-rank-suite`)}),(0,X.jsx)(`li`,{children:b(`Records interactions, not form values — Clarity masks input content by default.`,`ai-rank-suite`)})]})})]})}function eu({tab:e=`ga4`,onTab:t}){let n={ga4:Xl,matomo:nu,clarity:$l,consent:Wl,reports:Zl,speed:Ql}[e]||Xl;return(0,X.jsxs)(`div`,{className:`grid gap-4`,children:[(()=>{let{tabs:n,active:r}=op([{id:`ga4`,label:b(`Google Analytics`,`ai-rank-suite`)},{id:`matomo`,label:b(`Matomo`,`ai-rank-suite`)},{id:`clarity`,label:b(`Clarity`,`ai-rank-suite`)},{id:`consent`,label:b(`GDPR / Consent`,`ai-rank-suite`)},{id:`reports`,label:b(`Reports`,`ai-rank-suite`),needs:`reports`},{id:`speed`,label:b(`PageSpeed`,`ai-rank-suite`)}],e);return r!==e&&setTimeout(()=>t(r),0),(0,X.jsx)(Ae,{tabs:n,active:r,onChange:t})})(),(0,X.jsx)(n,{}),(0,X.jsx)(tu,{})]})}function tu(){let[e,t]=(0,ru.useState)(null),[n,r]=(0,ru.useState)(``),[i,a]=(0,ru.useState)(!1),[o,s]=(0,ru.useState)(!1),[c,l]=(0,ru.useState)(null),[u,d]=(0,ru.useState)(null);if((0,ru.useEffect)(()=>{E.get(`/analytics/database`).then(e=>{t(e),r(e.retention_days)}).catch(()=>{})},[]),!e)return(0,X.jsx)(Ze,{blocks:3,label:b(`Loading analytics`,`ai-rank-suite`)});let f=e.tables.find(e=>e.key===`ranks`),p=e.tables.find(e=>e.key===`mentions`),m=e=>e??`—`,h=e=>e==null?`—`:e>=1048576?`${(e/1048576).toFixed(1)} MB`:`${Math.max(1,Math.round(e/1024))} KB`,g=async e=>{a(!0),d(null);try{await e()}catch(e){d(e.message)}finally{a(!1)}},_=()=>g(async()=>{let e=Math.min(365,Math.max(30,Number(n)||90)),i=await E.put(`/analytics/database`,{retention_days:e});t(i),r(i.retention_days),s(!0),setTimeout(()=>s(!1),2200)}),v=()=>g(async()=>{l(null);let e=await E.post(`/analytics/database/refresh`);t(e),e.sync_error&&l(e.sync_error)}),y=e=>g(async()=>t(await E.post(`/analytics/database/purge`,{target:e})));return(0,X.jsx)(Se,{title:b(`Local data`,`ai-rank-suite`),note:S(x(`%d day kept`,`%d days kept`,e.retention_days,`ai-rank-suite`),e.retention_days),defaultOpen:!1,children:(0,X.jsxs)(`div`,{className:`grid gap-4`,children:[u&&(0,X.jsx)(M,{tone:`serious`,children:u}),c&&(0,X.jsx)(M,{tone:`warning`,children:S(b(`Caches were cleared, but the rank sync reported: %s`,`ai-rank-suite`),c)}),(0,X.jsx)(be,{columns:3,metrics:[{id:`ranks`,label:b(`Rank snapshots`,`ai-rank-suite`),hint:b(`One row per tracked keyword per day, pulled from your Search Console data.`,`ai-rank-suite`),value:m(f?.rows),sub:f?S(b(`%1$s days · %2$s`,`ai-rank-suite`),m(f.days),h(f.bytes)):`—`},{id:`mentions`,label:b(`Answer simulation runs`,`ai-rank-suite`),hint:b(`Kept for good: a past AI answer cannot be queried again for a past date, so this history can never be rebuilt — and is never deleted.`,`ai-rank-suite`),value:m(p?.rows),sub:p?h(p.bytes):`—`},{id:`cache`,label:b(`Cached reports`,`ai-rank-suite`),hint:b(`Stored copies of Google and AI responses. Safe to clear — each one rebuilds on its next view.`,`ai-rank-suite`),value:m(e.cache_entries)}]}),(0,X.jsxs)(`div`,{className:`flex items-end gap-2 flex-wrap`,children:[(0,X.jsxs)(`div`,{className:`sm:max-w-[160px]`,children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Keep snapshots for (days)`,`ai-rank-suite`)}),(0,X.jsx)(`input`,{type:`number`,min:30,max:365,value:n,onChange:e=>r(e.target.value)})]}),(0,X.jsx)(A,{onClick:_,busy:i,children:b(`Save`,`ai-rank-suite`)}),o&&(0,X.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]})]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,X.jsx)(A,{onClick:v,busy:i,children:b(`Update data now`,`ai-rank-suite`)}),(0,X.jsx)(A,{variant:`ghost`,busy:i,onClick:()=>window.confirm(b(`Delete every stored rank snapshot? Your keyword list stays, but the position history is gone for good.`,`ai-rank-suite`))&&y(`ranks`),children:b(`Delete rank snapshots`,`ai-rank-suite`)}),(0,X.jsx)(A,{variant:`ghost`,busy:i,onClick:()=>y(`cache`),children:b(`Clear cached reports`,`ai-rank-suite`)})]})]})})}function nu(){let[e,t]=(0,ru.useState)(null),[n,r]=(0,ru.useState)(!1),[i,a]=(0,ru.useState)(null);return(0,ru.useEffect)(()=>{E.get(`/settings/analytics`).then(e=>t(e.settings)).catch(e=>a(e.message))},[]),i?(0,X.jsx)(M,{tone:`serious`,children:i}):e?(0,X.jsx)(Bl,{settings:e,onSave:async n=>{r(!0);try{let r=await E.put(`/settings/analytics`,{...e,...n});t(r.settings)}finally{r(!1)}},saving:n}):(0,X.jsx)(k,{children:b(`Loading…`,`ai-rank-suite`)})}var ru,X,iu=o((()=>{ru=u(f(),1),C(),D(),Sp(),at(),Ul(),Jl(),X=O()})),au=c({default:()=>su});function ou({status:e}){return e===0?(0,lu.jsx)(j,{tone:`serious`,children:`unreachable`}):e>=500||e>=400?(0,lu.jsx)(j,{tone:`serious`,children:e}):e>=300?(0,lu.jsxs)(j,{tone:`warning`,children:[e,` redirect`]}):(0,lu.jsx)(j,{tone:`good`,children:e})}function su(){let[e,t]=(0,cu.useState)(null),[n,r]=(0,cu.useState)(!1),i=(0,cu.useRef)(null),a=e=>{d.setFilter(`status`,e),window.requestAnimationFrame(()=>{i.current?.scrollIntoView({behavior:`smooth`,block:`start`})})},[o,s]=(0,cu.useState)(null),[c,l]=(0,cu.useState)(null),u=(0,cu.useRef)(!1),d=Fs(`/linkcheck/links`,{orderby:`status`,order:`desc`,filters:{status:`issues`}}),f=()=>E.get(`/linkcheck/report`).then(t).catch(e=>s(e.message));(0,cu.useEffect)(()=>(f(),()=>{u.current=!0}),[]);let p=async()=>{r(!0),s(null),u.current=!1;try{await E.post(`/linkcheck/start`);let e=await E.post(`/linkcheck/tick`);for(;e.state===`running`&&!u.current;)(e.busy||e.error)&&await new Promise(e=>setTimeout(e,2e3)),e=await E.post(`/linkcheck/tick`),(e.checked||0)%24<8&&await f(),t(t=>t&&{...t,job:e});await f(),d.refresh()}catch(e){s(e.message)}finally{r(!1)}},m=async e=>{l(e);try{t(await E.post(`/linkcheck/recheck`,{url:e})),d.refresh()}catch(e){s(e.message)}finally{l(null)}};if(!e)return(0,lu.jsx)(_e,{error:o});let{totals:h,job:g}=e,_=h.broken+h.unreachable,v=e.by_destination||[],y=e.hosts||[],C=e=>{try{let t=new URL(e,window.location.origin);return t.pathname+t.search}catch{return e}},w=e=>{window.location.hash=`/links/redirects?from=${encodeURIComponent(C(e))}`},ee=!e?.snapshot||h.total===0?null:_>0?{tone:`bad`,text:S(x(`%1$s of %2$s links is broken.`,`%1$s of %2$s links are broken.`,_,`ai-rank-suite`),_.toLocaleString(),h.total.toLocaleString())+(v.length?` `+S(x(`%s distinct destination.`,`%s distinct destinations.`,v.length,`ai-rank-suite`),v.length===20?`20+`:v.length):``),why:b(`A dead link is a trust signal pointing the wrong way, for readers and for crawlers. Fix by destination: one redirect or one edited URL clears every page that points there.`,`ai-rank-suite`),action:b(`Show broken links`,`ai-rank-suite`),onAction:()=>a(`broken`)}:h.redirected>0?{tone:`warning`,text:S(b(`No broken links, but %s still go through a redirect hop.`,`ai-rank-suite`),h.redirected.toLocaleString()),why:b(`Each hop costs crawl budget and a few hundred milliseconds. Update them to the final URL when you touch the page.`,`ai-rank-suite`),action:b(`Show redirected`,`ai-rank-suite`),onAction:()=>a(`redirected`)}:{tone:`good`,text:S(b(`All %s links are healthy.`,`ai-rank-suite`),h.total.toLocaleString()),why:b(`Scan again after a publishing sprint or a domain change.`,`ai-rank-suite`)},T=e?.snapshot||null,te=e?.running||null,ne=g.phase===`extract`?g.done_posts||0:g.checked||0,re=g.phase===`extract`?g.total_posts||0:g.total_urls||0,ie=g.state===`running`?Math.min(100,Math.round(100*ne/Math.max(1,re))):null,D=g.state===`running`&&re>0&&ne>=re;return(0,lu.jsxs)(`div`,{className:`ars-page`,children:[o&&(0,lu.jsx)(M,{tone:`serious`,children:o}),ee&&!n&&g.state!==`running`&&(0,lu.jsx)(pa,{...ee}),!e?.snapshot&&!n&&g.state!==`running`&&(0,lu.jsx)(Wo,{badge:b(`Not scanned yet`,`ai-rank-suite`),ringLabel:b(`Link health`,`ai-rank-suite`),title:b(`No link on this site has been checked yet.`,`ai-rank-suite`),why:b(`The first scan reads every link in your published content — internal ones resolve instantly, external ones are verified over HTTP — and turns them into a health score, a broken-destinations list and a per-host view. On a large site it runs in slices; leave the tab open.`,`ai-rank-suite`),action:b(`Start the first scan`,`ai-rank-suite`),onAction:p,busy:n,stats:[{label:b(`Links found`,`ai-rank-suite`),hint:b(`Every link extracted from published content.`,`ai-rank-suite`)},{label:b(`Healthy`,`ai-rank-suite`),hint:b(`Answering 2xx.`,`ai-rank-suite`)},{label:b(`Redirected`,`ai-rank-suite`),hint:b(`Resolving only after a hop.`,`ai-rank-suite`)},{label:b(`Broken`,`ai-rank-suite`),hint:b(`4xx, 5xx or unreachable.`,`ai-rank-suite`)}],previews:[{title:b(`Broken destinations`,`ai-rank-suite`),text:b(`One row per dead target however many pages point at it — with a Redirect button that pre-fills the redirect form, and Recheck.`,`ai-rank-suite`)},{title:b(`External hosts`,`ai-rank-suite`),text:b(`Where your outbound links go and which of those hosts have gone dark, worst first.`,`ai-rank-suite`)},{title:b(`Every link, filtered`,`ai-rank-suite`),text:b(`Broken, redirected, healthy; internal or external; searchable by URL or anchor; server-paged for fifty thousand links.`,`ai-rank-suite`)}]}),(e?.snapshot||n||g.state===`running`)&&(0,lu.jsxs)(k,{title:b(`Site-wide scan`,`ai-rank-suite`),subtitle:b(`Extracts every link from your published content, then checks each one — internal links resolve instantly, external ones are verified over HTTP`,`ai-rank-suite`),action:(0,lu.jsx)(A,{onClick:p,busy:n,children:n?b(`Scanning…`,`ai-rank-suite`):h.total>0?b(`Scan again`,`ai-rank-suite`):b(`Start scan`,`ai-rank-suite`)}),children:[ie!==null&&(0,lu.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,lu.jsx)(Ne,{label:g.phase===`extract`?S(b(`Phase 1 of 2 — reading pages %1$s / %2$s`,`ai-rank-suite`),(g.done_posts||0).toLocaleString(),(g.total_posts||0).toLocaleString()):D?b(`Every destination checked — writing the results`,`ai-rank-suite`):S(b(`Phase 2 of 2 — checking unique destinations %1$s / %2$s`,`ai-rank-suite`),(g.checked||0).toLocaleString(),(g.total_urls||0).toLocaleString()),total:100,percent:ie}),te&&(0,lu.jsxs)(`p`,{className:`m-0 t-caption`,children:[S(b(`This run so far: %1$s links found across your pages, %2$s of them checked, %3$s broken. The bar above counts unique destinations, which is fewer — the same page is often linked many times.`,`ai-rank-suite`),te.found.toLocaleString(),te.checked.toLocaleString(),te.broken.toLocaleString()),` `,b(T?`The figures below are still the last completed scan.`:`Nothing is published yet — results appear when this scan completes.`,`ai-rank-suite`),` `,b(`Leaving this tab open is the quickest way to finish it. Close it and the scan carries on in the background, more slowly.`,`ai-rank-suite`)]})]}),T&&!n&&g.state!==`running`&&(0,lu.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:T.pages?S(b(`Showing the scan completed %1$s over %2$s pages.`,`ai-rank-suite`),new Date((T.finished_at||0)*1e3).toLocaleString(),T.pages.toLocaleString()):S(b(`Showing the scan completed %s.`,`ai-rank-suite`),new Date((T.finished_at||0)*1e3).toLocaleString())}),g.state===`cancelled`&&!n&&(0,lu.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(T?`Last scan was cancelled — the previous completed scan is still shown below.`:`Last scan was cancelled; nothing has been published yet.`,`ai-rank-suite`)}),g.state===`idle`&&(0,lu.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`No scan yet — run the first one to see the health of every link on your site.`,`ai-rank-suite`)})]}),e?.snapshot&&h.total>0&&(0,lu.jsx)(be,{columns:4,metrics:[{id:`total`,label:b(`Links found`,`ai-rank-suite`),hint:b(`Every link extracted from your published content in the last scan.`,`ai-rank-suite`),value:h.total,sub:S(b(`%1$s internal · %2$s external`,`ai-rank-suite`),h.internal,h.external)},{id:`healthy`,label:b(`Healthy`,`ai-rank-suite`),hint:b(`Responding 2xx — nothing to do here.`,`ai-rank-suite`),value:h.healthy},{id:`redirected`,label:b(`Redirected`,`ai-rank-suite`),hint:b(`Links that only resolve after a redirect hop. Update them to the final URL and save the hop.`,`ai-rank-suite`),value:h.redirected},{id:`broken`,label:b(`Broken`,`ai-rank-suite`),hint:b(`4xx, 5xx or unreachable. A dead link is a trust signal pointing the wrong way.`,`ai-rank-suite`),value:h.broken+h.unreachable,accent:h.broken+h.unreachable>0?`var(--ars-c-red-ink)`:void 0}]}),e?.snapshot&&h.total>0&&(0,lu.jsx)(k,{title:b(`Composition`,`ai-rank-suite`),subtitle:b(`Every checked link by what it answered`,`ai-rank-suite`),flush:!0,children:(0,lu.jsx)(`div`,{className:`px-4 py-3`,children:(0,lu.jsx)(Ue,{segments:[{label:b(`Healthy`,`ai-rank-suite`),value:h.healthy,color:`var(--ars-c-green-ink)`},{label:b(`Redirected`,`ai-rank-suite`),value:h.redirected,color:`var(--ars-accent)`},{label:b(`Broken`,`ai-rank-suite`),value:h.broken,color:`var(--ars-c-red-ink)`},{label:b(`Unreachable`,`ai-rank-suite`),value:h.unreachable,color:`var(--ars-ink-3)`}]})})}),(v.length>0||y.length>0)&&(0,lu.jsxs)(`div`,{className:`grid gap-4 items-stretch${v.length>0&&y.length>0?` lg:grid-cols-2`:``}`,children:[v.length>0&&(0,lu.jsx)(k,{title:b(`Broken destinations`,`ai-rank-suite`),subtitle:b(`Grouped by target — one fix per row, however many pages point there`,`ai-rank-suite`),flush:!0,children:(0,lu.jsx)(`div`,{className:`ars-destlist`,children:v.map(e=>(0,lu.jsxs)(`div`,{className:`ars-dest`,children:[(0,lu.jsx)(`span`,{className:`ars-dest-status`,children:(0,lu.jsx)(ou,{status:e.status})}),(0,lu.jsx)(`span`,{className:`ars-dest-url ars-mono`,title:e.url,children:e.url}),(0,lu.jsxs)(`span`,{className:`ars-dest-pages tabular-nums`,children:[e.pages.toLocaleString(),` `,e.pages===1?`page`:`pages`,e.internal?``:` · external`]}),(0,lu.jsxs)(`span`,{className:`ars-dest-actions`,children:[e.internal&&(0,lu.jsx)(A,{variant:`tonal`,onClick:()=>w(e.url),children:b(`Redirect`,`ai-rank-suite`)}),(0,lu.jsx)(A,{variant:`ghost`,busy:c===e.url,onClick:()=>m(e.url),children:b(`Recheck`,`ai-rank-suite`)})]})]},`${e.url}|${e.internal}`))})}),y.length>0&&(0,lu.jsx)(k,{title:b(`External hosts`,`ai-rank-suite`),subtitle:b(`Where your outbound links go, worst first`,`ai-rank-suite`),flush:!0,children:(0,lu.jsx)(`div`,{className:`ars-table-wrap`,children:(0,lu.jsxs)(`table`,{className:`ars-table`,children:[(0,lu.jsx)(`thead`,{children:(0,lu.jsxs)(`tr`,{children:[(0,lu.jsx)(`th`,{children:b(`Host`,`ai-rank-suite`)}),(0,lu.jsx)(`th`,{className:`is-num`,children:b(`Links`,`ai-rank-suite`)}),(0,lu.jsx)(`th`,{className:`is-num`,children:b(`Redirected`,`ai-rank-suite`)}),(0,lu.jsx)(`th`,{className:`is-num`,children:b(`Broken`,`ai-rank-suite`)})]})}),(0,lu.jsx)(`tbody`,{children:y.map(e=>(0,lu.jsxs)(`tr`,{children:[(0,lu.jsx)(`td`,{className:`font-medium`,children:e.host}),(0,lu.jsx)(`td`,{className:`is-num`,children:e.links.toLocaleString()}),(0,lu.jsx)(`td`,{className:`is-num is-muted`,children:e.redirected||`—`}),(0,lu.jsx)(`td`,{className:`is-num`,style:e.broken?{color:`var(--ars-c-red-ink)`,fontWeight:600}:void 0,children:e.broken||`—`})]},e.host))})]})})})]}),e?.snapshot&&h.total>0&&(0,lu.jsx)(`div`,{ref:i,className:`scroll-mt-4`,children:(0,lu.jsx)(Rs,{query:d,searchPlaceholder:b(`Search URL or anchor…`,`ai-rank-suite`),toolbar:(0,lu.jsxs)(lu.Fragment,{children:[(0,lu.jsx)(Ve,{label:b(`Show`,`ai-rank-suite`),value:d.state.filters.status||``,onChange:e=>d.setFilter(`status`,e),options:[{id:`issues`,label:b(`Issues`,`ai-rank-suite`)},{id:`broken`,label:b(`Broken`,`ai-rank-suite`)},{id:`redirected`,label:b(`Redirected`,`ai-rank-suite`)},{id:`healthy`,label:b(`Healthy`,`ai-rank-suite`)},{id:``,label:b(`All`,`ai-rank-suite`)}]}),(0,lu.jsx)(Ve,{label:b(`Scope`,`ai-rank-suite`),value:d.state.filters.internal||``,onChange:e=>d.setFilter(`internal`,e),options:[{id:``,label:b(`All`,`ai-rank-suite`)},{id:`internal`,label:b(`Internal`,`ai-rank-suite`)},{id:`external`,label:b(`External`,`ai-rank-suite`)}]})]}),columns:[{id:`status`,label:b(`Status`,`ai-rank-suite`),sortable:!0,render:e=>(0,lu.jsx)(ou,{status:e.status})},{id:`url`,label:b(`Link`,`ai-rank-suite`),sortable:!0,render:e=>(0,lu.jsxs)(`div`,{style:{maxWidth:360},children:[(0,lu.jsx)(`div`,{className:`ars-mono text-[12px] ars-url`,title:e.url,children:e.url}),(0,lu.jsxs)(`div`,{className:`text-[11.5px] mt-0.5`,style:{color:`var(--ars-ink-3)`},children:[`anchor: “`,e.anchor,`”`,e.redirect&&(0,lu.jsxs)(lu.Fragment,{children:[` `,`→ `,(0,lu.jsx)(`span`,{className:`ars-mono`,children:e.redirect})]})]})]})},{id:`post_title`,label:b(`Found on`,`ai-rank-suite`),render:e=>(0,lu.jsx)(`a`,{href:e.edit_url,target:`_blank`,rel:`noreferrer`,className:`font-medium`,style:{maxWidth:200,display:`inline-block`},children:e.post_title||`#${e.post_id}`})}],rowActions:e=>(0,lu.jsxs)(`div`,{className:`ars-actions`,children:[e.internal&&(e.status>=400||e.status===0)&&(0,lu.jsx)(A,{variant:`ghost`,onClick:()=>w(e.url),children:b(`Redirect`,`ai-rank-suite`)}),(0,lu.jsx)(A,{variant:`ghost`,busy:c===e.url,onClick:()=>m(e.url),children:b(`Recheck`,`ai-rank-suite`)})]}),empty:{title:b(`Nothing in this filter`,`ai-rank-suite`),children:b(`Every checked link matching this filter is healthy.`,`ai-rank-suite`)}})}),e?.snapshot&&h.total>0&&h.broken+h.unreachable+h.redirected===0&&(0,lu.jsx)(M,{tone:`good`,children:b(`Every checked link is healthy — nothing to fix.`,`ai-rank-suite`)})]})}var cu,lu,uu=o((()=>{C(),cu=u(f(),1),D(),at(),ha(),Ko(),Vs(),lu=O()}));function du(){let[e,t]=(0,fu.useState)(null),[n,r]=(0,fu.useState)(null),[i,a]=(0,fu.useState)(null),[o,s]=(0,fu.useState)(``),[c,l]=(0,fu.useState)(null),[u,d]=(0,fu.useState)(null),f=()=>E.get(`/webhooks`).then(t).catch(e=>r(e.message));(0,fu.useEffect)(()=>{f()},[]);let p=async(e,t)=>{s(e),r(null);try{await t()}catch(e){r(e.message)}finally{s(``)}},m=()=>p(`save`,async()=>{let e=await E.post(`/webhooks`,i);t(e),e.saved?.minted&&l({id:e.saved.id,secret:e.saved.minted}),a(null)}),h=e=>p(`del-${e}`,async()=>t(await E.del(`/webhooks/${e}`))),g=e=>p(`test-${e}`,async()=>{let n=await E.post(`/webhooks/${e}/test`,{});t(n),d({id:e,...n.result})}),_=e=>p(`toggle-${e.id}`,async()=>t(await E.post(`/webhooks`,{id:e.id,url:e.url,events:e.events,label:e.label,active:!e.active})));if(!e)return null;let v=Object.entries(e.events||{}),y=e.hooks||[],C=e.deliveries||[],w=e=>y.find(t=>t.id===e)?.label||y.find(t=>t.id===e)?.url||e.slice(0,8);return(0,pu.jsxs)(`div`,{className:`grid gap-4`,children:[n&&(0,pu.jsx)(M,{tone:`serious`,children:n}),c&&(0,pu.jsx)(M,{tone:`good`,children:(0,pu.jsxs)(`div`,{className:`grid gap-1`,children:[(0,pu.jsx)(`b`,{children:b(`Signing secret for this webhook — shown once, copy it now.`,`ai-rank-suite`)}),(0,pu.jsx)(`code`,{className:`ars-mono`,style:{wordBreak:`break-all`},children:c.secret}),(0,pu.jsxs)(`span`,{className:`t-caption`,children:[b(`Verify each delivery:`,`ai-rank-suite`),(0,pu.jsx)(`code`,{children:`sha256=HMAC_SHA256(raw_body, secret)`}),` `,b(`must equal the`,`ai-rank-suite`),` `,(0,pu.jsx)(`code`,{children:b(`X-AIRS-Signature`,`ai-rank-suite`)}),` `,b(`header. To rotate, edit the webhook and enter a new secret.`,`ai-rank-suite`)]}),(0,pu.jsx)(`button`,{type:`button`,className:`ars-linkbtn justify-self-start`,onClick:()=>l(null),children:b(`I have copied it`,`ai-rank-suite`)})]})}),(0,pu.jsxs)(k,{title:b(`Webhooks`,`ai-rank-suite`),subtitle:b(`A signed POST to your URL when something happens here — Zapier, Make, n8n, Slack, your own dashboard`,`ai-rank-suite`),action:!i&&(0,pu.jsx)(A,{onClick:()=>a({url:``,label:``,events:[`audit.finished`,`score.recalculated`],secret:``,active:!0}),children:b(`Add webhook`,`ai-rank-suite`)}),flush:!0,children:[i&&(0,pu.jsxs)(`div`,{className:`px-4 py-4 grid gap-3`,style:{borderBottom:`1px solid var(--ars-border)`,background:`var(--ars-surface-2)`},children:[(0,pu.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-[minmax(0,1fr)_240px]`,children:[(0,pu.jsx)(Ke,{label:b(`Endpoint URL`,`ai-rank-suite`),hint:b(`Public https URL. Private and local addresses are refused.`,`ai-rank-suite`),children:(0,pu.jsx)(`input`,{type:`url`,value:i.url,onChange:e=>a({...i,url:e.target.value}),placeholder:`https://hooks.zapier.com/hooks/catch/…`,style:{width:`100%`}})}),(0,pu.jsx)(Ke,{label:b(`Label`,`ai-rank-suite`),hint:b(`For the list only.`,`ai-rank-suite`),children:(0,pu.jsx)(`input`,{type:`text`,value:i.label,onChange:e=>a({...i,label:e.target.value}),placeholder:b(`Slack #seo`,`ai-rank-suite`),style:{width:`100%`}})})]}),(0,pu.jsx)(Ke,{label:b(`Events`,`ai-rank-suite`),hint:b(`Which of the plugin's events this URL receives.`,`ai-rank-suite`),children:(0,pu.jsx)(`div`,{className:`ars-eventgrid`,children:v.map(([e,t])=>{let n=i.events.includes(e);return(0,pu.jsxs)(`label`,{className:`ars-event${n?` is-on`:``}`,children:[(0,pu.jsx)(`input`,{type:`checkbox`,checked:n,onChange:()=>a({...i,events:n?i.events.filter(t=>t!==e):[...i.events,e]})}),(0,pu.jsxs)(`span`,{className:`grid gap-0.5 min-w-0`,children:[(0,pu.jsx)(`span`,{className:`font-semibold text-[12.5px]`,children:t.label}),(0,pu.jsx)(`span`,{className:`t-caption`,children:t.detail}),(0,pu.jsx)(`code`,{className:`ars-mono t-caption`,children:e})]})]},e)})})}),(0,pu.jsx)(Ke,{label:b(`Signing secret`,`ai-rank-suite`),hint:i.id?b(`Leave empty to keep the current secret; enter a new one to rotate it.`,`ai-rank-suite`):b(`Leave empty and one is generated for you — shown once after saving.`,`ai-rank-suite`),children:(0,pu.jsx)(`input`,{type:`password`,autoComplete:`off`,value:i.secret,onChange:e=>a({...i,secret:e.target.value}),placeholder:b(`optional`,`ai-rank-suite`),style:{maxWidth:360}})}),(0,pu.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,pu.jsx)(A,{onClick:m,busy:o===`save`,disabled:!i.url.trim()||i.events.length===0,children:i.id?b(`Save changes`,`ai-rank-suite`):b(`Create webhook`,`ai-rank-suite`)}),(0,pu.jsx)(A,{variant:`ghost`,onClick:()=>a(null),children:b(`Cancel`,`ai-rank-suite`)})]})]}),y.length===0&&!i?(0,pu.jsxs)(`div`,{className:`px-4 py-5 grid gap-2`,children:[(0,pu.jsx)(`span`,{className:`font-medium text-[13px]`,children:b(`No webhooks yet.`,`ai-rank-suite`)}),(0,pu.jsxs)(`span`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:[b(`Add one and the plugin will POST a signed JSON envelope —`,`ai-rank-suite`),(0,pu.jsx)(`code`,{children:`event`}),`, `,(0,pu.jsx)(`code`,{children:`site`}),`,`,` `,(0,pu.jsx)(`code`,{children:`time`}),`, `,(0,pu.jsx)(`code`,{children:`data`}),` `,b(`— to that URL whenever a selected event happens.`,`ai-rank-suite`)]})]}):(0,pu.jsx)(`div`,{className:`ars-table-wrap`,children:(0,pu.jsxs)(`table`,{className:`ars-table`,children:[(0,pu.jsx)(`thead`,{children:(0,pu.jsxs)(`tr`,{children:[(0,pu.jsx)(`th`,{children:b(`Endpoint`,`ai-rank-suite`)}),(0,pu.jsx)(`th`,{children:b(`Events`,`ai-rank-suite`)}),(0,pu.jsx)(`th`,{children:b(`Last delivery`,`ai-rank-suite`)}),(0,pu.jsx)(`th`,{style:{width:230}})]})}),(0,pu.jsx)(`tbody`,{children:y.map(e=>(0,pu.jsxs)(`tr`,{style:{opacity:e.active?1:.6},children:[(0,pu.jsx)(`td`,{children:(0,pu.jsxs)(`div`,{className:`grid gap-0.5`,style:{maxWidth:380},children:[(0,pu.jsx)(`span`,{className:`font-semibold text-[13px] truncate`,children:e.label||e.url}),e.label&&(0,pu.jsx)(`span`,{className:`ars-mono t-caption truncate`,children:e.url})]})}),(0,pu.jsx)(`td`,{children:(0,pu.jsx)(`span`,{className:`flex flex-wrap gap-1`,children:e.events.map(e=>(0,pu.jsx)(j,{tone:`neutral`,children:e},e))})}),(0,pu.jsx)(`td`,{children:e.last?(0,pu.jsxs)(`span`,{className:`grid gap-0.5`,children:[(0,pu.jsx)(j,{tone:e.last_ok?`good`:`serious`,children:e.last_ok?S(b(`%s ok`,`ai-rank-suite`),e.last_status):e.last_status?`HTTP ${e.last_status}`:b(`unreachable`,`ai-rank-suite`)}),(0,pu.jsxs)(`span`,{className:`t-caption`,children:[new Date(e.last*1e3).toLocaleString(),e.failures>1?` · ${S(x(`%d failure in a row`,`%d failures in a row`,e.failures,`ai-rank-suite`),e.failures)}`:``]})]}):(0,pu.jsx)(`span`,{className:`t-caption`,children:b(`never`,`ai-rank-suite`)})}),(0,pu.jsx)(`td`,{children:(0,pu.jsxs)(`div`,{className:`ars-actions`,children:[(0,pu.jsx)(Ee,{checked:!!e.active,onChange:()=>_(e),label:``}),(0,pu.jsx)(A,{variant:`ghost`,busy:o===`test-${e.id}`,onClick:()=>g(e.id),children:b(`Test`,`ai-rank-suite`)}),(0,pu.jsx)(A,{variant:`ghost`,onClick:()=>a({id:e.id,url:e.url,label:e.label||``,events:e.events,secret:``,active:e.active}),children:b(`Edit`,`ai-rank-suite`)}),(0,pu.jsx)(A,{variant:`ghost`,busy:o===`del-${e.id}`,onClick:()=>h(e.id),children:b(`Delete`,`ai-rank-suite`)})]})})]},e.id))})]})}),u&&(0,pu.jsxs)(`p`,{className:`m-0 px-4 py-2 t-caption`,children:[S(b(`Test to %s:`,`ai-rank-suite`),w(u.id)),` `,u.ok?S(b(`delivered, HTTP %1$s in %2$s ms`,`ai-rank-suite`),u.status,u.ms):S(b(`failed — %s`,`ai-rank-suite`),u.error||`HTTP ${u.status}`)]})]}),(0,pu.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2 items-stretch`,children:[(0,pu.jsx)(k,{title:b(`Recent deliveries`,`ai-rank-suite`),subtitle:b(`The last forty, newest first`,`ai-rank-suite`),flush:!0,children:C.length===0?(0,pu.jsx)(`div`,{className:`px-4 py-4 t-caption`,children:b(`Nothing delivered yet — press Test on a webhook.`,`ai-rank-suite`)}):(0,pu.jsx)(`div`,{className:`ars-table-wrap`,children:(0,pu.jsxs)(`table`,{className:`ars-table`,children:[(0,pu.jsx)(`thead`,{children:(0,pu.jsxs)(`tr`,{children:[(0,pu.jsx)(`th`,{children:b(`When`,`ai-rank-suite`)}),(0,pu.jsx)(`th`,{children:b(`Event`,`ai-rank-suite`)}),(0,pu.jsx)(`th`,{children:b(`To`,`ai-rank-suite`)}),(0,pu.jsx)(`th`,{className:`is-num`,children:b(`Result`,`ai-rank-suite`)})]})}),(0,pu.jsx)(`tbody`,{children:C.slice(0,20).map((e,t)=>(0,pu.jsxs)(`tr`,{children:[(0,pu.jsx)(`td`,{className:`is-muted`,style:{whiteSpace:`nowrap`},children:new Date(e.time*1e3).toLocaleString()}),(0,pu.jsx)(`td`,{children:(0,pu.jsx)(`code`,{className:`ars-mono text-[12px]`,children:e.event})}),(0,pu.jsx)(`td`,{className:`truncate`,style:{maxWidth:160},children:w(e.hook)}),(0,pu.jsx)(`td`,{className:`is-num`,children:(0,pu.jsx)(j,{tone:e.ok?`good`:`serious`,title:e.error||``,children:e.ok?`${e.status} · ${e.ms} ms`:e.status?`HTTP ${e.status}`:b(`unreachable`,`ai-rank-suite`)})})]},t))})]})})}),(0,pu.jsx)(k,{title:b(`Receiving a delivery`,`ai-rank-suite`),subtitle:b(`The envelope, the headers, and how to verify the signature`,`ai-rank-suite`),children:(0,pu.jsxs)(`div`,{className:`grid gap-3`,children:[(0,pu.jsx)(Xe,{code:`POST {your URL}
     88}`,"aria-label":b(`Service account JSON`,`ai-rank-suite`)}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,K.jsx)(A,{busy:i,disabled:f.trim()===``,onClick:()=>v(f),children:b(`Connect with this key`,`ai-rank-suite`)}),(0,K.jsx)(`span`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`or`,`ai-rank-suite`)}),(0,K.jsx)(A,{variant:`ghost`,onClick:()=>m.current?.click(),busy:i,children:b(`Choose the JSON file`,`ai-rank-suite`)})]}),(0,K.jsx)(`input`,{ref:m,type:`file`,accept:`application/json,.json`,style:{display:`none`},onChange:e=>e.target.files?.[0]&&y(e.target.files[0])})]})]})}),w.recent?.length>0&&(0,K.jsx)(k,{title:b(`Recent submissions`,`ai-rank-suite`),children:(0,K.jsx)(`div`,{className:`ars-table-wrap`,children:(0,K.jsxs)(`table`,{className:`ars-table`,children:[(0,K.jsx)(`thead`,{children:(0,K.jsxs)(`tr`,{children:[(0,K.jsx)(`th`,{children:b(`URL`,`ai-rank-suite`)}),(0,K.jsx)(`th`,{children:b(`Type`,`ai-rank-suite`)}),(0,K.jsx)(`th`,{children:b(`Result`,`ai-rank-suite`)}),(0,K.jsx)(`th`,{children:b(`When`,`ai-rank-suite`)})]})}),(0,K.jsx)(`tbody`,{children:w.recent.slice(0,15).map((e,t)=>(0,K.jsxs)(`tr`,{children:[(0,K.jsx)(`td`,{className:`ars-mono`,style:{maxWidth:320},title:e.url,children:(0,K.jsx)(`span`,{className:`ars-url`,children:e.url.replace(/^https?:\/\/[^/]+/,``)})}),(0,K.jsx)(`td`,{style:{color:`var(--ars-ink-3)`},children:e.type===`URL_DELETED`?b(`Removed`,`ai-rank-suite`):b(`Updated`,`ai-rank-suite`)}),(0,K.jsx)(`td`,{children:e.ok?(0,K.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Sent`,`ai-rank-suite`)]}):(0,K.jsxs)(j,{tone:`serious`,title:e.error,children:[`✕ `,b(`Failed`,`ai-rank-suite`)]})}),(0,K.jsx)(`td`,{style:{color:`var(--ars-ink-3)`},children:new Date(e.time*1e3).toLocaleString()})]},t))})]})})})]}),e===`rich`&&(0,K.jsx)(nl,{}),e===`bing`&&(0,K.jsx)(ka,{}),e===`indexnow`&&(0,K.jsx)(sl,{}),e===`verify`&&(0,K.jsx)(k,{title:b(`Site verification`,`ai-rank-suite`),subtitle:b(`Verification tags are output on your home page only — that is all these services read`,`ai-rank-suite`),action:o&&(0,K.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),children:(0,K.jsxs)(`div`,{className:`grid gap-3`,children:[ul.map(e=>(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`label`,{className:`block font-medium mb-1`,children:e.label}),(0,K.jsx)(`input`,{type:`text`,placeholder:e.hint,value:h[e.key]||``,onChange:t=>g({[e.key]:t.target.value})})]},e.key)),(0,K.jsx)(`div`,{children:(0,K.jsx)(A,{onClick:_,busy:i,children:b(`Save`,`ai-rank-suite`)})}),(0,K.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Paste only the content value, not the whole meta tag — the plugin builds the tag for you.`,`ai-rank-suite`)})]})})]})}var ll,K,ul,dl=o((()=>{ll=u(f(),1),C(),O(),xa(),Ma(),dt(),al(),K=_e(),ul=[{key:`verify_google`,label:b(`Google Search Console`,`ai-rank-suite`),hint:b(`The content value of the google-site-verification tag`,`ai-rank-suite`)},{key:`verify_bing`,label:b(`Bing Webmaster Tools`,`ai-rank-suite`),hint:`msvalidate.01`},{key:`verify_pinterest`,label:b(`Pinterest`,`ai-rank-suite`),hint:`p:domain_verify`},{key:`verify_yandex`,label:b(`Yandex`,`ai-rank-suite`),hint:`yandex-verification`},{key:`verify_baidu`,label:b(`Baidu`,`ai-rank-suite`),hint:b(`baidu-site-verification — China’s biggest engine, and its AI answer layer`,`ai-rank-suite`)},{key:`verify_naver`,label:b(`Naver`,`ai-rank-suite`),hint:b(`naver-site-verification — the default engine in South Korea`,`ai-rank-suite`)},{key:`verify_facebook`,label:b(`Meta / Facebook`,`ai-rank-suite`),hint:b(`facebook-domain-verification — needed for catalogue and ad domains`,`ai-rank-suite`)}]})),fl=c({default:()=>hl});function pl({item:e,checked:t,onToggle:n,inSitemap:r=null}){return(0,q.jsxs)(`button`,{type:`button`,onClick:n,className:`flex items-center justify-between gap-3 ars-r-lg px-4 py-2.5 text-left cursor-pointer w-full`,style:{background:t?`var(--ars-brand-tonal)`:`var(--ars-surface-2)`,border:`1px solid transparent`,opacity:e.count===0&&!t?.6:1},"aria-pressed":t,children:[(0,q.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0`,children:[(0,q.jsx)(`span`,{"aria-hidden":!0,style:{color:t?`var(--ars-brand-tonal-ink)`:`var(--ars-ink-3)`},children:t?`✓`:`○`}),(0,q.jsx)(`span`,{className:`font-medium text-[13px]`,style:{color:t?`var(--ars-brand-tonal-ink)`:`var(--ars-ink)`},children:e.label})]}),(0,q.jsx)(`span`,{className:`text-[12px] tabular-nums shrink-0 text-right`,style:{color:`var(--ars-ink-3)`},children:e.count===0?b(`empty`,`ai-rank-suite`):t&&r!==null?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{style:{color:`var(--ars-ink-2)`,fontWeight:600},children:S(x(`%s URL in the sitemap`,`%s URLs in the sitemap`,r,`ai-rank-suite`),r.toLocaleString())}),r!==e.count&&(0,q.jsx)(`span`,{className:`block text-[11px]`,children:S(b(`of %s published`,`ai-rank-suite`),e.count.toLocaleString())})]}):S(b(`%s published`,`ai-rank-suite`),e.count.toLocaleString())})]})}function ml({files:e}){let[t,n]=(0,gl.useState)({kind:`index`,type:``,page:1}),[r,i]=(0,gl.useState)(null),[a,o]=(0,gl.useState)(!1),[s,c]=(0,gl.useState)(null),[l,u]=(0,gl.useState)(!0),d=async e=>{o(!0),c(null),n(e);try{let t=new URLSearchParams({kind:e.kind,type:e.type||``,page:String(e.page||1)});i(await D.get(`/sitemap/preview?${t}`))}catch(e){c(e.message),i(null)}finally{o(!1)}};(0,gl.useEffect)(()=>{d({kind:`index`,type:``,page:1})},[]);let f=()=>{r?.xml&&ve(r.xml)},p=[{key:`index`,label:b(`Index`,`ai-rank-suite`),t:{kind:`index`,type:``,page:1}},...e.map(e=>({key:`${e.kind}:${e.slug}:${e.url}`,label:e.label,t:{kind:e.kind===`taxonomy`?`tax`:e.kind===`news`||e.kind===`video`?e.kind:`posts`,type:e.slug,page:Number((String(e.url).match(/-(\d+)\.xml$/)||[,1])[1])||1}}))],m=`${t.kind}|${t.type}|${t.page}`;return(0,q.jsxs)(`div`,{className:`grid gap-3`,children:[(0,q.jsx)(qe,{label:b(`File`,`ai-rank-suite`),value:m,onChange:e=>{let t=p.find(t=>`${t.t.kind}|${t.t.type}|${t.t.page}`===e);t&&d(t.t)},options:p.map(e=>({id:`${e.t.kind}|${e.t.type}|${e.t.page}`,label:e.label}))}),s&&(0,q.jsx)(M,{tone:`warning`,children:s}),r&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,q.jsx)(j,{tone:r.valid?`good`:`serious`,children:r.valid?(0,q.jsxs)(q.Fragment,{children:[`✓ `,b(`Valid XML`,`ai-rank-suite`)]}):b(`Malformed XML`,`ai-rank-suite`)}),(0,q.jsx)(j,{tone:`neutral`,children:r.kind===`index`?S(x(`%d file`,`%d files`,r.files,`ai-rank-suite`),r.files):S(x(`%d URL`,`%d URLs`,r.urls,`ai-rank-suite`),r.urls)}),(0,q.jsxs)(j,{tone:r.over?`serious`:`neutral`,children:[(r.bytes/1024).toFixed(1),` KB`]}),r.over&&(0,q.jsx)(M,{tone:`serious`,children:b(`Over Google’s 50,000-URL / 50 MB limit — lower URLs per file.`,`ai-rank-suite`)}),(0,q.jsxs)(`span`,{className:`ml-auto flex items-center gap-2`,children:[(0,q.jsx)(A,{variant:`ghost`,onClick:()=>u(!l),children:b(l?`No wrap`:`Wrap`,`ai-rank-suite`)}),(0,q.jsx)(A,{variant:`ghost`,onClick:f,children:b(`Copy XML`,`ai-rank-suite`)})]})]}),(0,q.jsx)(`pre`,{className:`ars-mono m-0 p-3 text-[11.5px]`,style:{background:`var(--ars-code-bg)`,color:`var(--ars-code-ink)`,borderRadius:`var(--ars-r-sm)`,maxHeight:460,overflow:`auto`,whiteSpace:l?`pre-wrap`:`pre`,wordBreak:l?`break-all`:`normal`},children:r.xml})]}),a&&!r&&(0,q.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Loading…`,`ai-rank-suite`)})]})}function hl({tab:e=`index`,onTab:t}){let{data:n,setData:r,s:i,update:a,save:o,run:s,busy:c,saved:l,error:u}=Xa(`/settings/sitemap`);if(!n)return(0,q.jsx)(Ce,{error:u});let d=n.breakdown?.files||[],f=d.reduce((e,t)=>(t.slug&&(e[t.slug]=(e[t.slug]||0)+(Number(t.urls)||0)),e),{}),p=()=>s(async()=>r(await D.post(`/sitemap/flush`,{}))),m=(e,t)=>a({[e]:i[e].includes(t)?i[e].filter(e=>e!==t):[...i[e],t]}),h=()=>(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(A,{onClick:o,busy:c,children:b(`Save`,`ai-rank-suite`)}),l&&(0,q.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]})]}),g=d.filter(e=>e.url),_=Number(n.total_urls||0),v=n.permalinks?i.enabled?_===0?{tone:`warning`,text:b(`The sitemap is live but lists no URLs.`,`ai-rank-suite`),why:b(`Every content type and taxonomy is unticked below, or nothing is published in the ticked ones.`,`ai-rank-suite`)}:{tone:`good`,text:S(b(`%1$s URLs are listed at %2$s.`,`ai-rank-suite`),_.toLocaleString(),String(n.url||``).replace(/^https?:\/\//,``)),why:b(`Submit that address once in Search Console and Bing Webmaster Tools; after that they read it on their own.`,`ai-rank-suite`),action:b(`Open the sitemap`,`ai-rank-suite`),onAction:()=>window.open(n.url,`_blank`,`noopener`)}:{tone:`warning`,text:b(`The sitemap is switched off, so nothing is listed for crawlers.`,`ai-rank-suite`),why:b(`Search engines and AI crawlers discover pages faster from a sitemap than by following links. Turning it on costs nothing.`,`ai-rank-suite`)}:{tone:`bad`,text:b(`The sitemap URL cannot work: pretty permalinks are off.`,`ai-rank-suite`),why:b(`WordPress serves the sitemap under /sitemap.xml only when permalinks are enabled. Until then crawlers get a 404 and every option below is moot.`,`ai-rank-suite`),action:b(`Open permalink settings`,`ai-rank-suite`),onAction:()=>{window.location.href=(window.airanksuiteData?.adminUrl||`/wp-admin/`)+`options-permalink.php`}},y=[{id:`status`,label:b(`Sitemap`,`ai-rank-suite`),hint:b(`A sitemap is a promise to a crawler: these URLs exist, they matter, and this is when they last changed.`,`ai-rank-suite`),value:i.enabled?b(`Live`,`ai-rank-suite`):b(`Off`,`ai-rank-suite`),accent:i.enabled?void 0:`var(--ars-accent)`,sub:i.enabled?b(`announced in robots.txt`,`ai-rank-suite`):b(`core sitemap is serving instead`,`ai-rank-suite`)},{id:`urls`,label:b(`URLs listed`,`ai-rank-suite`),hint:b(`Anything noindexed, password-protected or excluded is left out — this count is what the files actually contain.`,`ai-rank-suite`),value:n.total_urls??`—`},{id:`files`,label:b(`Files in the index`,`ai-rank-suite`),hint:b(`Large sites are split into several files so each one stays fast to fetch and re-crawl.`,`ai-rank-suite`),value:g.length,sub:S(b(`%s URLs per file`,`ai-rank-suite`),i.per_page)},(n.breakdown?.excluded??0)>0&&{id:`excluded`,label:b(`Excluded by ID`,`ai-rank-suite`),hint:b(`Excluded by hand on the Content tab. Anything set to noindex is already left out.`,`ai-rank-suite`),value:n.breakdown.excluded}].filter(Boolean);return(0,q.jsxs)(`div`,{className:`ars-page`,children:[u&&(0,q.jsx)(M,{tone:`serious`,children:u}),(0,q.jsx)(ya,{...v}),!n.permalinks&&(0,q.jsx)(M,{tone:`serious`,children:b(`Pretty permalinks are disabled — the sitemap URL will not work. Enable them under Settings → Permalinks.`,`ai-rank-suite`)}),!i.enabled&&(0,q.jsx)(M,{tone:`warning`,children:b(`The sitemap is switched off. WordPress will fall back to its own core sitemap, which ignores every setting on this page.`,`ai-rank-suite`)}),(0,q.jsx)(Ee,{columns:y.length,metrics:y}),(0,q.jsx)(Ie,{tabs:[{id:`index`,label:b(`Index`,`ai-rank-suite`)},{id:`xml`,label:b(`XML`,`ai-rank-suite`)},{id:`content`,label:b(`Content`,`ai-rank-suite`)},{id:`special`,label:b(`Extras`,`ai-rank-suite`)}],active:e,onChange:t,right:(0,q.jsxs)(A,{variant:`ghost`,busy:c,onClick:p,children:[(0,q.jsx)(Tt,{size:13}),b(`Rebuild now`,`ai-rank-suite`)]})}),e===`index`&&(0,q.jsxs)(k,{title:b(`The index, as it ships`,`ai-rank-suite`),subtitle:b(`The same list a crawler receives at your sitemap URL`,`ai-rank-suite`),action:(0,q.jsxs)(`a`,{href:n.url,target:`_blank`,rel:`noreferrer`,className:`text-[12.5px] font-medium inline-flex items-center gap-1`,style:{color:`var(--ars-brand)`,textDecoration:`none`},children:[n.url.replace(ne.homeUrl.replace(/\/$/,``),``),` `,(0,q.jsx)(wt,{size:11})]}),children:[g.length===0?(0,q.jsxs)(`div`,{className:`ars-r-lg px-4 py-5 grid gap-2 place-items-start`,style:{background:`var(--ars-surface-2)`},children:[(0,q.jsx)(`div`,{className:`font-medium text-[13px]`,children:b(`The sitemap is empty`,`ai-rank-suite`)}),(0,q.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Nothing is selected, or everything selected has no published content yet.`,`ai-rank-suite`)}),(0,q.jsx)(A,{variant:`tonal`,onClick:()=>t(`content`),children:b(`Choose what to include`,`ai-rank-suite`)})]}):(0,q.jsx)(`div`,{className:`ars-table-wrap`,children:(0,q.jsxs)(`table`,{className:`ars-table`,children:[(0,q.jsx)(`thead`,{children:(0,q.jsxs)(`tr`,{children:[(0,q.jsx)(`th`,{children:b(`File`,`ai-rank-suite`)}),(0,q.jsx)(`th`,{children:b(`Contains`,`ai-rank-suite`)}),(0,q.jsx)(`th`,{className:`is-num`,children:b(`URLs`,`ai-rank-suite`)}),(0,q.jsx)(`th`,{className:`is-num`,children:b(`Last change`,`ai-rank-suite`)})]})}),(0,q.jsx)(`tbody`,{children:g.map(e=>(0,q.jsxs)(`tr`,{children:[(0,q.jsx)(`td`,{children:(0,q.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`ars-mono text-[11.5px] inline-flex items-center gap-1`,children:[e.url.replace(ne.homeUrl.replace(/\/$/,``),``),` `,(0,q.jsx)(wt,{size:10})]})}),(0,q.jsx)(`td`,{className:`font-medium`,children:e.label}),(0,q.jsx)(`td`,{className:`is-num`,children:e.urls===null?`—`:e.urls}),(0,q.jsx)(`td`,{className:`is-num text-[12px]`,style:{color:`var(--ars-ink-3)`},children:e.lastmod?new Date(e.lastmod).toLocaleDateString():`—`})]},e.url))})]})}),d.some(e=>!e.url)&&(0,q.jsx)(`div`,{className:`mt-3`,children:(0,q.jsxs)(M,{tone:`info`,children:[b(`Selected but empty, so not listed:`,`ai-rank-suite`),` `,d.filter(e=>!e.url).map(e=>e.label).join(`, `),`. `,b(`They appear automatically as soon as they have published content.`,`ai-rank-suite`)]})})]}),e===`xml`&&(0,q.jsx)(k,{title:b(`The XML a crawler receives`,`ai-rank-suite`),subtitle:b(`Opening the sitemap in a browser shows the styled table, not the file — this shows the bytes`,`ai-rank-suite`),action:(0,q.jsxs)(`a`,{href:`${ne.homeUrl.replace(/\/$/,``)}/sitemap_index.xml`,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 text-[12.5px]`,children:[`sitemap_index.xml `,(0,q.jsx)(wt,{size:12})]}),children:(0,q.jsx)(ml,{files:d})}),e===`content`&&(0,q.jsxs)(`div`,{className:`grid gap-4`,children:[(0,q.jsx)(k,{title:b(`Content types`,`ai-rank-suite`),subtitle:b(`Pick what a crawler should be told about`,`ai-rank-suite`),action:(0,q.jsx)(h,{}),children:(0,q.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:n.post_types.map(e=>(0,q.jsx)(pl,{item:e,checked:i.post_types.includes(e.name),inSitemap:f[e.name]??null,onToggle:()=>m(`post_types`,e.name)},e.name))})}),(0,q.jsx)(k,{title:b(`Taxonomies`,`ai-rank-suite`),subtitle:b(`Category and tag archives. Worth including when they are real landing pages, not just lists.`,`ai-rank-suite`),children:(0,q.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:n.taxonomies.map(e=>(0,q.jsx)(pl,{item:e,checked:i.taxonomies.includes(e.name),inSitemap:f[e.name]??null,onToggle:()=>m(`taxonomies`,e.name)},e.name))})}),(0,q.jsx)(k,{title:b(`Options`,`ai-rank-suite`),action:(0,q.jsx)(h,{}),children:(0,q.jsxs)(`div`,{className:`grid gap-4`,children:[(0,q.jsx)(Me,{checked:!!i.enabled,onChange:e=>a({enabled:e}),label:b(`Publish the sitemap`,`ai-rank-suite`)}),(0,q.jsx)(Me,{checked:!!i.include_images,onChange:e=>a({include_images:e}),label:b(`Include images (helps image search and AI crawlers)`,`ai-rank-suite`)}),(0,q.jsx)(Me,{checked:!!i.include_featured,onChange:e=>a({include_featured:e}),label:b(`Include the featured image, even when it is not in the content`,`ai-rank-suite`)}),(0,q.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`URLs per file`,`ai-rank-suite`)}),(0,q.jsx)(`input`,{type:`number`,min:`50`,max:`1000`,value:i.per_page,onChange:e=>a({per_page:Number(e.target.value)}),style:{width:130}}),(0,q.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`Google accepts up to 50,000, but smaller files are fetched and re-crawled faster.`,`ai-rank-suite`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Exclude post IDs`,`ai-rank-suite`)}),(0,q.jsx)(`input`,{type:`text`,placeholder:`12, 45, 108`,value:i.exclude_ids,onChange:e=>a({exclude_ids:e.target.value})}),(0,q.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`Pages set to noindex, or excluded in their own analysis panel, are already left out.`,`ai-rank-suite`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Exclude term IDs`,`ai-rank-suite`)}),(0,q.jsx)(`input`,{type:`text`,value:i.exclude_terms||``,onChange:e=>a({exclude_terms:e.target.value}),placeholder:`7, 19`,style:{width:`100%`}}),(0,q.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`Category or tag IDs to keep out of the taxonomy sitemaps, comma-separated. The ID is in the URL when you edit the term.`,`ai-rank-suite`)})]})]})]})})]}),e===`special`&&(0,q.jsxs)(`div`,{className:`grid gap-4`,children:[(0,q.jsx)(k,{title:b(`Google News`,`ai-rank-suite`),subtitle:b(`A separate feed of articles from the last 48 hours — only useful if you are accepted into Google News`,`ai-rank-suite`),action:(0,q.jsx)(h,{}),children:(0,q.jsxs)(`div`,{className:`grid gap-4`,children:[(0,q.jsx)(Me,{checked:!!i.news_enabled,onChange:e=>a({news_enabled:e}),label:b(`Publish a Google News sitemap`,`ai-rank-suite`)}),i.news_enabled&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Publication name`,`ai-rank-suite`)}),(0,q.jsx)(`input`,{type:`text`,placeholder:ne.siteName,value:i.news_name,onChange:e=>a({news_name:e.target.value})}),(0,q.jsx)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`Must match the name registered in Google Publisher Center exactly.`,`ai-rank-suite`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`label`,{className:`block font-medium mb-1.5`,children:b(`Which content types count as news`,`ai-rank-suite`)}),(0,q.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:n.post_types.map(e=>(0,q.jsx)(pl,{item:e,checked:i.news_types.includes(e.name),onToggle:()=>m(`news_types`,e.name)},e.name))})]}),(0,q.jsxs)(`a`,{href:n.news_url,target:`_blank`,rel:`noreferrer`,className:`text-[12.5px] inline-flex items-center gap-1`,children:[n.news_url,` `,(0,q.jsx)(wt,{size:11})]})]})]})}),(0,q.jsx)(k,{title:b(`Video`,`ai-rank-suite`),subtitle:b(`YouTube and Vimeo embeds are detected in your content automatically — nothing to tag by hand`,`ai-rank-suite`),action:(0,q.jsx)(h,{}),children:(0,q.jsxs)(`div`,{className:`grid gap-3`,children:[(0,q.jsx)(Me,{checked:!!i.video_enabled,onChange:e=>a({video_enabled:e}),label:b(`Publish a video sitemap`,`ai-rank-suite`)}),i.video_enabled&&(0,q.jsxs)(`a`,{href:n.video_url,target:`_blank`,rel:`noreferrer`,className:`text-[12.5px] inline-flex items-center gap-1`,children:[n.video_url,` `,(0,q.jsx)(wt,{size:11})]})]})})]})]})}var gl,q,_l=o((()=>{C(),gl=u(f(),1),Qa(),xa(),O(),dt(),Vt(),ye(),q=_e()}));function vl(){let[e,t]=(0,yl.useState)(null),[n,r]=(0,yl.useState)(``),[i,a]=(0,yl.useState)([]),[o,s]=(0,yl.useState)(!1),[c,l]=(0,yl.useState)(!1),[u,d]=(0,yl.useState)(null),f=()=>D.get(`/htaccess`).then(e=>{t(e),r(e.ours||``)}).catch(e=>d(e.message));if((0,yl.useEffect)(()=>{f()},[]),!e)return(0,bl.jsx)(Ce,{error:u});if(!e.supported)return(0,bl.jsx)(k,{title:`.htaccess`,subtitle:b(`Not applicable on this server`,`ai-rank-suite`),children:(0,bl.jsxs)(M,{tone:`info`,children:[b(`This site runs on`,`ai-rank-suite`),` `,(0,bl.jsx)(`code`,{children:e.server||b(`a server`,`ai-rank-suite`)}),b(`, which does not read`,`ai-rank-suite`),` `,(0,bl.jsx)(`code`,{children:`.htaccess`}),` `,b(`at all. Nginx and Caddy need the equivalent rules in the server configuration, which only your host can change — editing a file here would do nothing and look like it worked.`,`ai-rank-suite`)]})});let p=async e=>{r(e);try{let t=await D.post(`/htaccess/check`,{block:e});a(t.problems||[])}catch{}},m=async()=>{s(!0),d(null);try{let e=await D.put(`/htaccess`,{block:n});t(e),l(!0),a([]),setTimeout(()=>l(!1),2400)}catch(e){d(e.message)}finally{s(!1)}},h=async e=>{s(!0),d(null);try{let n=await D.post(`/htaccess/restore`,{id:e});t(n),r(n.ours||``)}catch(e){d(e.message)}finally{s(!1)}},g=e=>p(`${n?`${n}\n\n`:``}${e.body}`);return(0,bl.jsxs)(`div`,{className:`ars-page`,children:[(0,bl.jsx)(k,{title:`.htaccess`,subtitle:b(`Server rules — caching, compression, security headers and redirects`,`ai-rank-suite`),action:e.writable?(0,bl.jsx)(j,{tone:`good`,children:b(`Writable`,`ai-rank-suite`)}):(0,bl.jsx)(j,{tone:`serious`,children:b(`Read-only`,`ai-rank-suite`)}),children:(0,bl.jsxs)(`div`,{className:`grid gap-3`,children:[(0,bl.jsxs)(ft,{title:b(`Read this before you edit`,`ai-rank-suite`),open:!n,children:[(0,bl.jsx)(`p`,{children:b(`A stray character here does not produce a warning — it produces a 500 on every URL of the site, including wp-admin, which would leave you unable to use this plugin to undo it.`,`ai-rank-suite`)}),(0,bl.jsxs)(`p`,{children:[b(`So only`,`ai-rank-suite`),` `,(0,bl.jsx)(`em`,{children:b(`our`,`ai-rank-suite`)}),` `,b(`block is editable. WordPress’s own rewrite rules and anything your host put there are read-only and preserved byte for byte. Every save takes a backup first, the last ten are kept, and you can restore any of them from this screen — recovery never needs FTP.`,`ai-rank-suite`)]})]}),!e.writable&&(0,bl.jsxs)(M,{tone:`warning`,children:[(0,bl.jsx)(`code`,{children:e.path}),` `,b(`is not writable, so nothing here can be saved. Either make it writable, or copy the block below and paste it into the file yourself.`,`ai-rank-suite`)]}),(0,bl.jsxs)(`div`,{children:[(0,bl.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Your rules`,`ai-rank-suite`)}),(0,bl.jsx)(`textarea`,{rows:14,className:`ars-mono`,style:{fontSize:12,lineHeight:1.6,whiteSpace:`pre`,overflowWrap:`normal`,overflowX:`auto`},value:n,placeholder:b(`# Add Apache directives here. The BEGIN/END markers are added for you.`,`ai-rank-suite`),onChange:e=>p(e.target.value)}),(0,bl.jsx)(`p`,{className:`m-0 mt-1.5 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:S(b(`%1$s · %2$s KB total on disk`,`ai-rank-suite`),e.path,(e.bytes/1024).toFixed(1))})]}),i.length>0&&(0,bl.jsxs)(M,{tone:`serious`,children:[(0,bl.jsx)(`strong`,{children:b(`Not saveable yet:`,`ai-rank-suite`)}),(0,bl.jsx)(`ul`,{className:`m-0 mt-1 pl-5`,children:i.map((e,t)=>(0,bl.jsx)(`li`,{children:e},t))})]}),(0,bl.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,bl.jsx)(A,{onClick:m,busy:o,disabled:!e.writable||i.length>0,children:b(`Save to .htaccess`,`ai-rank-suite`)}),(0,bl.jsx)(A,{variant:`ghost`,onClick:f,disabled:o,children:b(`Discard changes`,`ai-rank-suite`)}),c&&(0,bl.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved · backup taken`,`ai-rank-suite`)]})]}),u&&(0,bl.jsx)(M,{tone:`serious`,children:u})]})}),(0,bl.jsx)(k,{title:b(`Ready-made blocks`,`ai-rank-suite`),subtitle:b(`So nobody has to write Apache from memory`,`ai-rank-suite`),children:(0,bl.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:(e.recipes||[]).map(e=>(0,bl.jsxs)(`button`,{type:`button`,onClick:()=>g(e),className:`ars-pick`,children:[(0,bl.jsxs)(`span`,{className:`ars-pick-title`,children:[e.label,(0,bl.jsxs)(`span`,{style:{marginLeft:`auto`,color:`var(--ars-brand)`,fontSize:12},children:[`+ `,b(`Add`,`ai-rank-suite`)]})]}),(0,bl.jsx)(`span`,{className:`ars-pick-note`,children:e.desc})]},e.id))})}),(0,bl.jsx)(k,{title:b(`Backups`,`ai-rank-suite`),subtitle:e.backups.length>0?b(`The last ten states of the whole file, newest first`,`ai-rank-suite`):b(`A backup is taken automatically before every save`,`ai-rank-suite`),children:e.backups.length===0?(0,bl.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Nothing saved yet, so there is nothing to roll back to.`,`ai-rank-suite`)}):(0,bl.jsx)(`div`,{className:`ars-table-wrap`,children:(0,bl.jsxs)(`table`,{className:`ars-table`,children:[(0,bl.jsx)(`thead`,{children:(0,bl.jsxs)(`tr`,{children:[(0,bl.jsx)(`th`,{children:b(`Taken`,`ai-rank-suite`)}),(0,bl.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Size`,`ai-rank-suite`)}),(0,bl.jsx)(`th`,{className:`is-num is-mid`})]})}),(0,bl.jsx)(`tbody`,{children:e.backups.map(e=>(0,bl.jsxs)(`tr`,{children:[(0,bl.jsx)(`td`,{children:new Date(e.time*1e3).toLocaleString()}),(0,bl.jsxs)(`td`,{className:`is-num`,children:[(e.bytes/1024).toFixed(1),` KB`]}),(0,bl.jsx)(`td`,{className:`is-num`,children:(0,bl.jsx)(A,{variant:`ghost`,onClick:()=>h(e.id),disabled:o,children:b(`Restore`,`ai-rank-suite`)})})]},e.id))})]})})})]})}var yl,bl,xl=o((()=>{yl=u(f(),1),C(),O(),dt(),mt(),bl=_e()})),Sl=c({default:()=>kl});function Cl(e){let[t,n]=(0,Al.useState)(null),[r,i]=(0,Al.useState)(!1),[a,o]=(0,Al.useState)(!1),[s,c]=(0,Al.useState)(null);return(0,Al.useEffect)(()=>{D.get(e).then(n).catch(e=>c(e.message))},[e]),{data:t,update:e=>n(t=>({...t,settings:{...t.settings,...e}})),save:async()=>{i(!0),c(null);try{n(await D.put(e,t.settings)),o(!0),setTimeout(()=>o(!1),2200)}catch(e){c(e.message)}finally{i(!1)}},busy:r,saved:a,error:s}}function wl(){let{data:e,update:t,save:n,busy:r,saved:i,error:a}=Cl(`/settings/robots`);if(!e)return(0,J.jsx)(Ce,{error:a});let o=e.settings,s=[{key:`noindex_author`,label:b(`Author archives`,`ai-rank-suite`),hint:b(`Usually duplicate content on single-author sites`,`ai-rank-suite`)},{key:`noindex_date`,label:b(`Date archives`,`ai-rank-suite`),hint:b(`Rarely useful as search results`,`ai-rank-suite`)},{key:`noindex_search`,label:b(`Internal search results`,`ai-rank-suite`),hint:b(`Google explicitly discourages indexing these`,`ai-rank-suite`)},{key:`noindex_attachment`,label:b(`Attachment pages`,`ai-rank-suite`),hint:b(`Thin pages that only hold one media file`,`ai-rank-suite`)},{key:`noindex_paginated`,label:b(`Paginated archive pages`,`ai-rank-suite`),hint:b(`Page 2, 3, … of an archive`,`ai-rank-suite`)}],c=s.filter(e=>!!o[e.key]).length,l={tone:c===0?`warning`:`good`,text:c===0?b(`Every archive type is left indexable — search engines can spend their crawl on author, date and search pages.`,`ai-rank-suite`):o.robots_txt_enabled?S(b(`%1$d of %2$d archive types are set to noindex and custom robots.txt rules are on.`,`ai-rank-suite`),c,s.length):S(b(`%1$d of %2$d archive types are set to noindex.`,`ai-rank-suite`),c,s.length),why:b(c===0?`Author, date, search and attachment archives are the pages nobody wants to rank; noindexing them keeps the crawl on the pages that matter.`:`Blocked archives keep the crawl on real content. Anything here changes robots meta on the next request — no cache purge needed beyond the plugin's own.`,`ai-rank-suite`)};return(0,J.jsxs)(`div`,{className:`grid gap-4`,children:[a&&(0,J.jsx)(M,{tone:`serious`,children:a}),(0,J.jsx)(ya,{...l}),(0,J.jsx)(k,{title:b(`Indexing rules for archives`,`ai-rank-suite`),subtitle:b(`Keep thin, duplicated pages out of search results and AI training sets`,`ai-rank-suite`),action:i&&(0,J.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),children:(0,J.jsxs)(`div`,{className:`grid gap-3`,children:[s.map(e=>(0,J.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`div`,{className:`font-medium`,children:S(b(`Set %s to noindex`,`ai-rank-suite`),e.label)}),(0,J.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:e.hint})]}),(0,J.jsx)(Me,{checked:!!o[e.key],onChange:n=>t({[e.key]:n})})]},e.key)),(0,J.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2 mt-1`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Max snippet length`,`ai-rank-suite`)}),(0,J.jsx)(`input`,{type:`number`,value:o.max_snippet,onChange:e=>t({max_snippet:Number(e.target.value)})}),(0,J.jsx)(`div`,{className:`text-[12px] mt-1`,style:{color:`var(--ars-ink-3)`},children:b(`-1 = no limit (recommended)`,`ai-rank-suite`)})]}),(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Max image preview`,`ai-rank-suite`)}),(0,J.jsxs)(`select`,{value:o.max_image_preview,onChange:e=>t({max_image_preview:e.target.value}),children:[(0,J.jsx)(`option`,{value:`large`,children:`large`}),(0,J.jsx)(`option`,{value:`standard`,children:`standard`}),(0,J.jsx)(`option`,{value:`none`,children:`none`})]})]})]}),(0,J.jsx)(`div`,{children:(0,J.jsx)(A,{onClick:n,busy:r,children:b(`Save`,`ai-rank-suite`)})})]})}),(0,J.jsxs)(k,{title:`robots.txt`,subtitle:b(`Custom rules are appended after the AI crawler block`,`ai-rank-suite`),action:(0,J.jsx)(Me,{checked:!!o.robots_txt_enabled,onChange:e=>t({robots_txt_enabled:e}),label:b(`Enable custom rules`,`ai-rank-suite`)}),children:[e.physical_robots_txt&&(0,J.jsx)(`div`,{className:`mb-3`,children:(0,J.jsxs)(M,{tone:`serious`,children:[b(`A physical`,`ai-rank-suite`),` `,(0,J.jsx)(`code`,{children:`robots.txt`}),` `,b(`file exists on your server and overrides everything here. Delete it so WordPress can serve robots.txt dynamically.`,`ai-rank-suite`)]})}),(0,J.jsx)(`textarea`,{rows:8,className:`ars-mono`,placeholder:`User-agent: *
     89Disallow: /private/`,value:o.robots_txt_custom,onChange:e=>t({robots_txt_custom:e.target.value}),disabled:!o.robots_txt_enabled}),(0,J.jsxs)(`div`,{className:`flex items-center gap-3 mt-2`,children:[(0,J.jsx)(A,{onClick:n,busy:r,children:b(`Save`,`ai-rank-suite`)}),(0,J.jsxs)(`a`,{href:e.robots_url,target:`_blank`,rel:`noreferrer`,className:`text-[12.5px] inline-flex items-center gap-1`,children:[b(`View robots.txt`,`ai-rank-suite`),(0,J.jsx)(wt,{size:11})]})]})]})]})}function Tl(){let{data:e,update:t,save:n,busy:r,saved:i,error:a}=Cl(`/settings/breadcrumbs`);if(!e)return(0,J.jsx)(Ce,{error:a});let o=e.settings;return(0,J.jsxs)(`div`,{className:`grid gap-4`,children:[a&&(0,J.jsx)(M,{tone:`serious`,children:a}),(0,J.jsx)(k,{title:b(`Breadcrumbs`,`ai-rank-suite`),subtitle:b(`Shown via the [airanksuite_breadcrumbs] shortcode — and always emitted as BreadcrumbList schema`,`ai-rank-suite`),action:(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[i&&(0,J.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,J.jsx)(Me,{checked:!!o.enabled,onChange:e=>t({enabled:e}),label:b(`Enabled`,`ai-rank-suite`)})]}),children:(0,J.jsxs)(`div`,{className:`grid gap-4`,children:[(0,J.jsxs)(`div`,{className:`ars-r-md px-4 py-3`,style:{background:`var(--ars-surface-2)`},children:[(0,J.jsx)(`div`,{className:`text-[11px] font-semibold mb-1.5`,style:{color:`var(--ars-ink-3)`},children:b(`PREVIEW`,`ai-rank-suite`)}),(0,J.jsxs)(`div`,{className:`text-[13px]`,children:[o.prefix&&(0,J.jsxs)(`span`,{style:{color:`var(--ars-ink-3)`},children:[o.prefix,` `]}),e.preview.map((t,n)=>(0,J.jsxs)(`span`,{children:[n>0&&(0,J.jsxs)(`span`,{style:{color:`var(--ars-ink-3)`},children:[` `,o.separator,` `]}),(0,J.jsx)(`span`,{style:{color:n===e.preview.length-1?`var(--ars-ink)`:`var(--ars-brand)`},children:t})]},n))]})]}),(0,J.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Home label`,`ai-rank-suite`)}),(0,J.jsx)(`input`,{type:`text`,placeholder:b(`Home`,`ai-rank-suite`),value:o.home_label,onChange:e=>t({home_label:e.target.value})})]}),(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Separator`,`ai-rank-suite`)}),(0,J.jsx)(`input`,{type:`text`,value:o.separator,onChange:e=>t({separator:e.target.value})})]}),(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Prefix (optional)`,`ai-rank-suite`)}),(0,J.jsx)(`input`,{type:`text`,placeholder:b(`You are here:`,`ai-rank-suite`),value:o.prefix,onChange:e=>t({prefix:e.target.value})})]})]}),(0,J.jsx)(Me,{checked:!!o.show_current,onChange:e=>t({show_current:e}),label:b(`Show the current page as the last crumb`,`ai-rank-suite`)}),(0,J.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,J.jsx)(A,{onClick:n,busy:r,children:b(`Save`,`ai-rank-suite`)})}),(0,J.jsxs)(`div`,{className:`text-[12px] grid gap-1`,style:{color:`var(--ars-ink-3)`},children:[(0,J.jsxs)(`span`,{children:[b(`Shortcode:`,`ai-rank-suite`),(0,J.jsx)(`code`,{className:`ars-mono`,children:`[airanksuite_breadcrumbs]`})]}),(0,J.jsxs)(`span`,{children:[b(`In a theme template:`,`ai-rank-suite`),` `,(0,J.jsx)(`code`,{className:`ars-mono`,children:`<?php echo do_shortcode( '[airanksuite_breadcrumbs]' ); ?>`})]})]})]})})]})}function El(){let[e,t]=(0,Al.useState)(null),[n,r]=(0,Al.useState)(null),[i,a]=(0,Al.useState)(null),o=(e=!1)=>D.get(`/image-seo/audit${e?`?fresh=1`:``}`).then(t).catch(e=>r(e.message));(0,Al.useEffect)(()=>{o()},[]);let s=async()=>{r(null);let t=e?.no_alt||0,n=0,i=0,s=0;a({filled:i,skipped:s,total:t,done:!1});try{for(;;){let e=await D.post(`/image-seo/fill`,{offset:n});if(i+=e.filled,s+=e.skipped,n=e.offset,a({filled:i,skipped:s,total:t,done:e.done}),e.done)break}await o(!0)}catch(e){r(e.message),a(null)}};if(n)return(0,J.jsx)(M,{tone:`serious`,children:n});if(!e)return(0,J.jsx)(k,{children:b(`Counting the media library…`,`ai-rank-suite`)});let c=e=>e>=1048576?`${(e/1024/1024).toFixed(1)} MB`:`${Math.round(e/1024)} KB`;return(0,J.jsx)(k,{title:b(`Media library`,`ai-rank-suite`),subtitle:e.sampled?b(`Dimensions and weight read for the newest 5,000 images.`,`ai-rank-suite`):b(`Every image attachment on this site, counted.`,`ai-rank-suite`),action:(0,J.jsx)(A,{variant:`ghost`,onClick:()=>o(!0),children:b(`Recount`,`ai-rank-suite`)}),children:(0,J.jsxs)(`div`,{className:`grid gap-3`,children:[(0,J.jsx)(Ee,{columns:4,metrics:[{id:`total`,label:b(`Images`,`ai-rank-suite`),value:Number(e.total).toLocaleString()},{id:`no_alt`,label:b(`Without alt text`,`ai-rank-suite`),value:Number(e.no_alt).toLocaleString(),accent:e.no_alt?`var(--ars-warning)`:`var(--ars-good)`,hint:b(`Read by screen readers, image search and multimodal assistants. An empty alt is an image that says nothing.`,`ai-rank-suite`)},{id:`oversized`,label:b(`Wider than 2500 px`,`ai-rank-suite`),value:Number(e.oversized).toLocaleString(),accent:e.oversized?`var(--ars-warning)`:`var(--ars-good)`,hint:b(`Bigger than any screen shows. Resize before upload; the page loads faster and image search prefers it.`,`ai-rank-suite`)},{id:`heavy`,label:b(`Heavier than 500 KB`,`ai-rank-suite`),value:Number(e.heavy).toLocaleString(),accent:e.heavy?`var(--ars-warning)`:`var(--ars-good)`}]}),i?(0,J.jsx)(ze,{label:i.done?b(`Done`,`ai-rank-suite`):b(`Writing alt texts…`,`ai-rank-suite`),done:Math.min(i.total,i.filled+i.skipped),total:i.total,note:S(b(`%1$s written, %2$s skipped because the template and the image gave nothing to say`,`ai-rank-suite`),Number(i.filled).toLocaleString(),Number(i.skipped).toLocaleString())}):(0,J.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[(0,J.jsx)(A,{onClick:s,disabled:!e.no_alt,children:S(b(`Write alt text for %s images from the template`,`ai-rank-suite`),Number(e.no_alt).toLocaleString())}),(0,J.jsx)(`span`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:S(b(`Template: %s. Existing alt texts are never touched.`,`ai-rank-suite`),e.template||`%filename%`)})]}),e.largest&&e.largest.length>0&&(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-wide mb-1.5`,style:{color:`var(--ars-ink-3)`},children:b(`Largest images`,`ai-rank-suite`)}),(0,J.jsx)(`ul`,{className:`m-0 p-0 grid gap-1`,style:{listStyle:`none`},children:e.largest.map(e=>(0,J.jsxs)(`li`,{className:`flex items-center justify-between gap-3 text-[12.5px]`,children:[(0,J.jsx)(`a`,{href:e.edit,target:`_blank`,rel:`noreferrer`,className:`truncate`,children:e.title||`#${e.id}`}),(0,J.jsxs)(`span`,{className:`tabular-nums`,style:{color:`var(--ars-ink-3)`},children:[e.width,` × `,e.height,` px`,e.bytes?` · ${c(e.bytes)}`:``]})]},e.id))})]})]})})}function Dl(){let{data:e,update:t,save:n,busy:r,saved:i,error:a}=Cl(`/settings/image-seo`);if(!e)return(0,J.jsx)(Ce,{error:a});let o=e.settings;return(0,J.jsxs)(`div`,{className:`grid gap-4`,children:[a&&(0,J.jsx)(M,{tone:`serious`,children:a}),(0,J.jsx)(El,{}),(0,J.jsx)(k,{title:b(`Image SEO`,`ai-rank-suite`),subtitle:b(`Fill missing alt text automatically — good for search, required for accessibility`,`ai-rank-suite`),action:i&&(0,J.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),children:(0,J.jsxs)(`div`,{className:`grid gap-3`,children:[(0,J.jsx)(Me,{checked:!!o.auto_alt,onChange:e=>t({auto_alt:e}),label:b(`Add alt text when an image has none`,`ai-rank-suite`)}),(0,J.jsx)(Me,{checked:!!o.auto_title,onChange:e=>t({auto_title:e}),label:b(`Add title attribute when missing`,`ai-rank-suite`)}),(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Alt text template`,`ai-rank-suite`)}),(0,J.jsx)(`input`,{type:`text`,value:o.alt_template,onChange:e=>t({alt_template:e.target.value})}),(0,J.jsx)(`div`,{className:`text-[12px] mt-1.5 flex flex-wrap gap-1.5`,style:{color:`var(--ars-ink-3)`},children:[`%filename%`,`%title%`,`%caption%`,`%postname%`,`%sitename%`].map(e=>(0,J.jsx)(`code`,{className:`ars-mono px-1.5 py-0.5 rounded`,style:{background:`var(--ars-surface-2)`},children:e},e))})]}),(0,J.jsx)(`div`,{children:(0,J.jsx)(A,{onClick:n,busy:r,children:b(`Save`,`ai-rank-suite`)})}),(0,J.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Existing alt texts are never overwritten — this only fills gaps.`,`ai-rank-suite`)})]})}),(0,J.jsx)(k,{title:b(`Outbound links`,`ai-rank-suite`),subtitle:b(`How links to other websites are treated`,`ai-rank-suite`),children:(0,J.jsxs)(`div`,{className:`grid gap-3`,children:[(0,J.jsx)(Me,{checked:!!o.link_nofollow,onChange:e=>t({link_nofollow:e}),label:b(`Add rel="nofollow" to external links`,`ai-rank-suite`)}),(0,J.jsx)(Me,{checked:!!o.link_new_tab,onChange:e=>t({link_new_tab:e}),label:b(`Open external links in a new tab`,`ai-rank-suite`)}),(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Never touch these domains (one per line)`,`ai-rank-suite`)}),(0,J.jsx)(`textarea`,{rows:3,className:`ars-mono`,placeholder:`partner.com
     90affiliate-network.com`,value:o.link_exclude,onChange:e=>t({link_exclude:e.target.value})})]}),(0,J.jsx)(`div`,{children:(0,J.jsx)(A,{onClick:n,busy:r,children:b(`Save`,`ai-rank-suite`)})})]})})]})}function Ol(){let{data:e,update:t,save:n,busy:r,saved:i,error:a}=Cl(`/settings/hardening`);if(!e)return(0,J.jsx)(Ce,{error:a});let o=e.settings,s=[{key:`hide_generator`,label:b(`Hide the WordPress version`,`ai-rank-suite`),hint:b(`Removes the generator meta tag — attackers match versions to known exploits`,`ai-rank-suite`)},{key:`strip_ver`,label:b(`Strip ?ver= from assets`,`ai-rank-suite`),hint:b(`Plugin and theme versions leak through asset URLs`,`ai-rank-suite`)},{key:`remove_headers`,label:b(`Remove RSD, wlwmanifest & shortlink tags`,`ai-rank-suite`),hint:b(`Legacy discovery endpoints nothing modern needs`,`ai-rank-suite`)},{key:`disable_xmlrpc`,label:b(`Disable XML-RPC`,`ai-rank-suite`),hint:b(`A common brute-force and pingback-DDoS door. Jetpack and the mobile app need it — leave off in that case`,`ai-rank-suite`)},{key:`hide_login_error`,label:b(`Generic login errors`,`ai-rank-suite`),hint:b(`“Wrong password” confirms a username exists — replace with a neutral message`,`ai-rank-suite`)},{key:`block_enum`,label:b(`Block user enumeration`,`ai-rank-suite`),hint:b(`?author=1 redirects and the public REST users list reveal usernames for brute-forcing`,`ai-rank-suite`)},{key:`security_headers`,label:b(`Send security headers`,`ai-rank-suite`),hint:b(`X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy`,`ai-rank-suite`)},{key:`hide_admin_bar`,label:b(`Hide the AI Rank Suite admin-bar menu`,`ai-rank-suite`),hint:b(`Removes this plugin’s own entry from the WordPress toolbar. Everything stays reachable from the plugin screens`,`ai-rank-suite`)}];return(0,J.jsxs)(`div`,{className:`grid gap-4`,children:[a&&(0,J.jsx)(M,{tone:`serious`,children:a}),(0,J.jsx)(k,{title:b(`Ghost Mode`,`ai-rank-suite`),subtitle:b(`Hide WordPress fingerprints and close the doors attackers probe first — each toggle removes one signal without breaking the site`,`ai-rank-suite`),action:(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[i&&(0,J.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,J.jsx)(A,{onClick:n,busy:r,children:b(`Save`,`ai-rank-suite`)})]}),children:(0,J.jsxs)(`div`,{className:`grid gap-4`,children:[(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-3 ars-r-lg px-4 py-3`,style:{background:o.enabled?`var(--ars-good-tonal)`:`var(--ars-surface-2)`},children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`div`,{className:`font-semibold text-[13.5px]`,children:b(`Enable Ghost Mode`,`ai-rank-suite`)}),(0,J.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--ars-ink-2)`},children:b(`Master switch — the toggles below only apply while this is on.`,`ai-rank-suite`)})]}),(0,J.jsx)(Me,{checked:!!o.enabled,onChange:e=>t({enabled:e})})]}),(0,J.jsx)(`div`,{className:`grid gap-3`,style:{opacity:o.enabled?1:.5},children:s.map(e=>(0,J.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`div`,{className:`font-medium`,children:e.label}),(0,J.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:e.hint})]}),(0,J.jsx)(Me,{checked:!!o[e.key],onChange:n=>t({[e.key]:n}),disabled:!o.enabled})]},e.key))}),(0,J.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Changes take effect on the next page load. Nothing here touches your content or SEO output.`,`ai-rank-suite`)})]})})]})}function kl({tab:e=`robots`,onTab:t}){let n={robots:wl,htaccess:vl,breadcrumbs:Tl,images:Dl,ghost:Ol}[e];return(0,J.jsxs)(`div`,{className:`ars-page`,children:[(0,J.jsx)(Ie,{tabs:[{id:`robots`,label:b(`Robots`,`ai-rank-suite`)},{id:`htaccess`,label:`.htaccess`},{id:`breadcrumbs`,label:b(`Breadcrumbs`,`ai-rank-suite`)},{id:`images`,label:b(`Images`,`ai-rank-suite`)},{id:`ghost`,label:b(`Ghost Mode`,`ai-rank-suite`)}],active:e,onChange:t}),(0,J.jsx)(n,{})]})}var Al,J,jl=o((()=>{Al=u(f(),1),C(),O(),xa(),xl(),dt(),Vt(),J=_e()}));function Ml({record:e,onImported:t}){let[n,r]=(0,Nl.useState)(null),[i,a]=(0,Nl.useState)(null),[o,s]=(0,Nl.useState)(``),[c,l]=(0,Nl.useState)(``),[u,d]=(0,Nl.useState)(null),[f,p]=(0,Nl.useState)(``),[m,h]=(0,Nl.useState)(null),g=()=>D.get(`/local-seo/listings`).then(r).catch(e=>a(e.message));(0,Nl.useEffect)(()=>{g()},[]);let _=async(e,t)=>{p(e),a(null);try{await t()}catch(e){a(e.message)}finally{p(``)}},v=()=>_(`key`,async()=>{r(await D.post(`/local-seo/listings`,{key:o})),s(``)}),y=()=>_(`search`,async()=>d((await D.post(`/local-seo/listings/search`,{query:c})).places||[])),C=e=>_(`fetch`,async()=>{r(await D.post(`/local-seo/listings/fetch`,{place_id:e})),d(null)}),w=e=>_(e?`overwrite`:`import`,async()=>{let n=await D.post(`/local-seo/listings/import`,{overwrite:e});r(n),h(n.imported||[]),t&&t()}),T=()=>_(`forget`,async()=>r(await D.del(`/local-seo/listings/google`)));if(!n)return null;let E=n.google,ee=(n.compare||[]).filter(e=>e.match===!1),te=(n.history||[]).map(e=>({label:e.day.slice(5),value:e.reviews,rating:e.rating})),ne=n.history?.[0],re=n.history?.[n.history.length-1];return(0,Pl.jsxs)(`div`,{className:`grid gap-4`,children:[i&&(0,Pl.jsx)(M,{tone:`serious`,children:i}),E?ee.length===0?(0,Pl.jsxs)(M,{tone:`good`,children:[(0,Pl.jsx)(`b`,{children:b(`Google Business Profile matches your record`,`ai-rank-suite`)}),` — `,b(`name, address, phone and website agree with what Google shows.`,`ai-rank-suite`),` `,E.reviews?S(b(`%1$s ★ from %2$s reviews.`,`ai-rank-suite`),E.rating,E.reviews.toLocaleString()):``]}):(0,Pl.jsxs)(M,{tone:`warning`,children:[(0,Pl.jsx)(`b`,{children:S(x(`%d field differs between your record and Google`,`%d fields differ between your record and Google`,ee.length,`ai-rank-suite`),ee.length)}),` `,`— `,ee.map(e=>e.label).join(`, `),`. `,b(`To a matching engine a different street spelling is a different business. Fix one side: import Google’s values below, or edit the Profile tab and then correct the Google listing to match.`,`ai-rank-suite`)]}):(0,Pl.jsxs)(M,{tone:`info`,children:[(0,Pl.jsx)(`b`,{children:b(`No directory is connected yet.`,`ai-rank-suite`)}),` `,b(`Google Business Profile is where a “near me” answer starts; connect it to check that your record and Google’s agree character for character.`,`ai-rank-suite`)]}),(0,Pl.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2 items-stretch`,children:[(0,Pl.jsx)(k,{title:b(`Google Business Profile`,`ai-rank-suite`),subtitle:b(`Read through the Places API — the public listing, live from Google`,`ai-rank-suite`),action:E?(0,Pl.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Pl.jsx)(A,{variant:`ghost`,busy:f===`fetch`,onClick:()=>C(E.place_id),children:b(`Refresh`,`ai-rank-suite`)}),(0,Pl.jsx)(A,{variant:`ghost`,busy:f===`forget`,onClick:T,children:b(`Disconnect`,`ai-rank-suite`)})]}):null,children:n.has_key?E?(0,Pl.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Pl.jsxs)(`div`,{className:`ars-listing-head`,children:[(0,Pl.jsxs)(`div`,{className:`grid gap-0.5 min-w-0`,children:[(0,Pl.jsx)(`span`,{className:`font-semibold text-[15px] truncate`,children:E.name}),(0,Pl.jsx)(`span`,{className:`t-caption truncate`,children:E.address}),(0,Pl.jsxs)(`span`,{className:`t-caption`,children:[E.type,E.status&&E.status!==`OPERATIONAL`?` · ${E.status.toLowerCase().replace(/_/g,` `)}`:``]})]}),(0,Pl.jsxs)(`div`,{className:`ars-listing-rating`,children:[(0,Pl.jsx)(`span`,{className:`ars-listing-stars t-num`,children:E.rating??`–`}),(0,Pl.jsxs)(`span`,{className:`t-caption`,children:[`★ · `,S(x(`%s review`,`%s reviews`,E.reviews||0,`ai-rank-suite`),(E.reviews||0).toLocaleString())]})]})]}),E.hours&&E.hours.length>0&&(0,Pl.jsxs)(`details`,{children:[(0,Pl.jsx)(`summary`,{className:`t-caption cursor-pointer`,children:b(`Hours as Google shows them`,`ai-rank-suite`)}),(0,Pl.jsx)(`ul`,{className:`m-0 mt-1 pl-4 text-[12px]`,style:{color:`var(--ars-ink-2)`},children:E.hours.map(e=>(0,Pl.jsx)(`li`,{children:e},e))})]}),(0,Pl.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[E.maps_url&&(0,Pl.jsx)(`a`,{className:`ars-linkbtn`,href:E.maps_url,target:`_blank`,rel:`noreferrer`,children:b(`Open on Google Maps ↗`,`ai-rank-suite`)}),(0,Pl.jsx)(`a`,{className:`ars-linkbtn`,href:`https://business.google.com/`,target:`_blank`,rel:`noreferrer`,children:b(`Edit in Business Profile ↗`,`ai-rank-suite`)}),(0,Pl.jsx)(`span`,{className:`t-caption`,children:S(b(`Fetched %s · refreshed weekly`,`ai-rank-suite`),new Date(E.fetched*1e3).toLocaleString())})]})]}):(0,Pl.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Pl.jsx)(`span`,{className:`t-caption`,children:S(b(`Key saved (%s).`,`ai-rank-suite`),n.key_hint)}),(0,Pl.jsxs)(`form`,{className:`flex gap-2`,onSubmit:e=>{e.preventDefault(),y()},children:[(0,Pl.jsx)(`input`,{type:`text`,value:c,onChange:e=>l(e.target.value),placeholder:`${e.name||b(`Business name`,`ai-rank-suite`)}, ${e.city||b(`city`,`ai-rank-suite`)}`,style:{flex:1}}),(0,Pl.jsx)(A,{onClick:y,busy:f===`search`,disabled:!c.trim(),children:b(`Find my listing`,`ai-rank-suite`)})]}),u&&u.length===0&&(0,Pl.jsx)(`span`,{className:`t-caption`,children:b(`Nothing found — try the name as it appears on Google Maps.`,`ai-rank-suite`)}),u&&u.length>0&&(0,Pl.jsx)(`div`,{className:`grid gap-1.5`,children:u.map(e=>(0,Pl.jsxs)(`button`,{type:`button`,className:`ars-place`,onClick:()=>C(e.id),children:[(0,Pl.jsxs)(`span`,{className:`grid gap-0.5 min-w-0`,children:[(0,Pl.jsx)(`span`,{className:`font-semibold text-[13px] truncate`,children:e.name}),(0,Pl.jsx)(`span`,{className:`t-caption truncate`,children:e.address})]}),(0,Pl.jsx)(`span`,{className:`t-caption shrink-0`,children:e.rating?`${e.rating} ★ · ${e.reviews}`:e.type||``})]},e.id))}),(0,Pl.jsx)(`button`,{type:`button`,className:`ars-linkbtn justify-self-start`,onClick:()=>_(`key`,async()=>r(await D.post(`/local-seo/listings`,{key:``}))),children:b(`Remove key`,`ai-rank-suite`)})]}):(0,Pl.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Pl.jsx)(Qe,{label:b(`Google Places API key`,`ai-rank-suite`),hint:b(`Google Cloud → APIs & Services → Credentials → API key, with “Places API (New)” enabled. Stored encrypted; the first ~10,000 lookups a month are free.`,`ai-rank-suite`),children:(0,Pl.jsx)(`input`,{type:`password`,autoComplete:`off`,value:o,onChange:e=>s(e.target.value),placeholder:b(`AIza…`,`ai-rank-suite`)})}),(0,Pl.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Pl.jsx)(A,{onClick:v,busy:f===`key`,disabled:!o.trim(),children:b(`Save key`,`ai-rank-suite`)}),(0,Pl.jsx)(`a`,{className:`ars-linkbtn`,href:`https://console.cloud.google.com/apis/library/places-backend.googleapis.com`,target:`_blank`,rel:`noreferrer`,children:b(`Enable Places API (New) ↗`,`ai-rank-suite`)})]}),(0,Pl.jsx)(ft,{title:b(`Why a Places key and not “Sign in with Google”`,`ai-rank-suite`),children:(0,Pl.jsx)(`p`,{children:b(`Google’s Business Profile management API needs a project reviewed and approved by Google — weeks, and quota zero until then. The Places API answers with a plain key the same afternoon and returns the part of the profile that matters for consistency: name, address, phone, website, hours, rating and review count. Editing the profile stays on Google’s side; this checks and imports.`,`ai-rank-suite`)})})]})}),(0,Pl.jsx)(k,{title:b(`NAP consistency`,`ai-rank-suite`),subtitle:b(`Your record beside Google’s listing — the fields a matching engine compares`,`ai-rank-suite`),flush:!0,action:E&&(0,Pl.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Pl.jsx)(A,{variant:`tonal`,busy:f===`import`,onClick:()=>w(!1),children:b(`Fill empty fields`,`ai-rank-suite`)}),(0,Pl.jsx)(A,{variant:`ghost`,busy:f===`overwrite`,onClick:()=>w(!0),children:b(`Overwrite with Google`,`ai-rank-suite`)})]}),children:E?(0,Pl.jsxs)(`div`,{className:`ars-table-wrap`,children:[(0,Pl.jsxs)(`table`,{className:`ars-table`,children:[(0,Pl.jsx)(`thead`,{children:(0,Pl.jsxs)(`tr`,{children:[(0,Pl.jsx)(`th`,{children:b(`Field`,`ai-rank-suite`)}),(0,Pl.jsx)(`th`,{children:b(`Your record`,`ai-rank-suite`)}),(0,Pl.jsx)(`th`,{children:b(`Google`,`ai-rank-suite`)}),(0,Pl.jsx)(`th`,{style:{width:80}})]})}),(0,Pl.jsx)(`tbody`,{children:n.compare.map(e=>(0,Pl.jsxs)(`tr`,{children:[(0,Pl.jsx)(`td`,{className:`font-medium`,children:e.label}),(0,Pl.jsx)(`td`,{className:e.ours?``:`is-muted`,style:{maxWidth:220},children:(0,Pl.jsx)(`span`,{className:`truncate block`,children:e.ours||`—`})}),(0,Pl.jsx)(`td`,{className:e.theirs?``:`is-muted`,style:{maxWidth:220},children:(0,Pl.jsx)(`span`,{className:`truncate block`,children:e.theirs||`—`})}),(0,Pl.jsx)(`td`,{className:`is-num`,children:e.match===!0?(0,Pl.jsx)(j,{tone:`good`,children:b(`match`,`ai-rank-suite`)}):e.match===!1?(0,Pl.jsx)(j,{tone:`warning`,children:b(`differs`,`ai-rank-suite`)}):(0,Pl.jsx)(j,{tone:`neutral`,children:b(`n/a`,`ai-rank-suite`)})})]},e.key))})]}),m&&(0,Pl.jsx)(`p`,{className:`m-0 px-4 py-2 t-caption`,children:m.length?S(b(`Imported: %s. Save the profile to publish.`,`ai-rank-suite`),m.join(`, `)):b(`Nothing to import — every field was already filled.`,`ai-rank-suite`)})]}):(0,Pl.jsx)(`div`,{className:`px-4 py-4 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`Connect the Google listing and this becomes a field-by-field comparison with one-click import.`,`ai-rank-suite`)})})]}),te.length>0&&(0,Pl.jsxs)(k,{title:b(`Reviews over time`,`ai-rank-suite`),subtitle:b(`One point per weekly read — a listing that gains reviews is one an assistant trusts more`,`ai-rank-suite`),action:te.length>1&&re&&ne?(0,Pl.jsx)(We,{value:re.reviews-ne.reviews,suffix:` ${b(`reviews since first read`,`ai-rank-suite`)}`}):null,children:[(0,Pl.jsx)(Le,{data:te,label:b(`Reviews`,`ai-rank-suite`),color:`var(--ars-good)`,height:140,formatValue:e=>`${e}`}),re&&re.rating!==null&&(0,Pl.jsxs)(`p`,{className:`m-0 mt-2 t-caption`,children:[S(b(`Rating now %s ★`,`ai-rank-suite`),re.rating),ne&&ne.rating!==null&&ne!==re?` ${S(b(`(was %1$s ★ on %2$s)`,`ai-rank-suite`),ne.rating,ne.day)}`:``,`.`]})]}),(0,Pl.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2 items-stretch`,children:[(0,Pl.jsx)(k,{title:b(`Bing Places for Business`,`ai-rank-suite`),subtitle:b(`What Copilot and Bing Maps show — no public API, so it is attached by URL`,`ai-rank-suite`),children:(0,Pl.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Pl.jsx)(Qe,{label:b(`Your Bing Places listing URL`,`ai-rank-suite`),hint:b(`Published as sameAs alongside the Google listing.`,`ai-rank-suite`),children:(0,Pl.jsx)(`input`,{type:`url`,style:{width:`100%`},value:e.bing_url||``,onChange:e=>t&&t({bing_url:e.target.value}),placeholder:`https://www.bing.com/maps?…`})}),(0,Pl.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Pl.jsx)(`a`,{className:`ars-linkbtn`,href:`https://www.bingplaces.com/`,target:`_blank`,rel:`noreferrer`,children:b(`Open Bing Places ↗`,`ai-rank-suite`)}),e.bing_url?(0,Pl.jsx)(j,{tone:`good`,children:b(`attached`,`ai-rank-suite`)}):(0,Pl.jsx)(j,{tone:`neutral`,children:b(`not attached`,`ai-rank-suite`)})]}),(0,Pl.jsx)(ft,{title:b(`Keep Bing identical to Google in one click`,`ai-rank-suite`),children:(0,Pl.jsx)(`p`,{children:b(`Bing Places has an “Import from Google My Business” option in its dashboard that syncs name, address, phone, hours and photos from your Google profile — and can keep syncing. Use it, and the consistency check above covers Bing too.`,`ai-rank-suite`)})})]})}),(0,Pl.jsx)(k,{title:b(`Apple Business Connect`,`ai-rank-suite`),subtitle:b(`What Siri and Apple Maps show — attached by URL`,`ai-rank-suite`),children:(0,Pl.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Pl.jsx)(Qe,{label:b(`Your Apple Maps place URL`,`ai-rank-suite`),hint:b(`From Apple Business Connect → your location → Share. Published as sameAs.`,`ai-rank-suite`),children:(0,Pl.jsx)(`input`,{type:`url`,style:{width:`100%`},value:e.apple_url||``,onChange:e=>t&&t({apple_url:e.target.value}),placeholder:`https://maps.apple.com/place?…`})}),(0,Pl.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Pl.jsx)(`a`,{className:`ars-linkbtn`,href:`https://businessconnect.apple.com/`,target:`_blank`,rel:`noreferrer`,children:b(`Open Business Connect ↗`,`ai-rank-suite`)}),e.apple_url?(0,Pl.jsx)(j,{tone:`good`,children:b(`attached`,`ai-rank-suite`)}):(0,Pl.jsx)(j,{tone:`neutral`,children:b(`not attached`,`ai-rank-suite`)})]})]})})]})]})}var Nl,Pl,Fl=o((()=>{Nl=u(f(),1),C(),O(),dt(),mt(),Pl=_e()})),Il=c({default:()=>Ll});function Ll(){let{data:e,s:t,update:n,save:r,run:i,busy:a,saved:o,error:s,setError:c,reload:l}=Xa(`/settings/local-seo`),[u,d]=(0,Rl.useState)(()=>{let e=/#\/local-seo\/([a-z-]+)/.exec(window.location.hash||``);return e&&Vl.some(t=>t.id===e[1])?e[1]:`profile`}),[f,p]=(0,Rl.useState)(null),[m,h]=(0,Rl.useState)(null),[g,_]=(0,Rl.useState)(0);if((0,Rl.useEffect)(()=>{u!==`output`||!e||D.get(`/local-seo/preview`).then(p).catch(()=>p(null))},[u,e]),!e)return(0,Y.jsx)(Ce,{error:s});let v=(e,r)=>n({hours:{...t.hours,[e]:{...t.hours[e],...r}}}),y=(e,r)=>n({locations:t.locations.map((t,n)=>n===e?{...t,...r}:t)}),C=(e,r,i)=>n({[e]:(t[e]||[]).map((e,t)=>t===r?{...e,...i}:e)}),w=(e,r)=>n({[e]:[...t[e]||[],r]}),T=(e,r)=>n({[e]:(t[e]||[]).filter((e,t)=>t!==r)}),E=()=>i(async()=>{h(null);let e=await D.post(`/local-seo/geocode`);n({latitude:e.latitude,longitude:e.longitude}),h(e.matched||`${e.latitude}, ${e.longitude}`)}),ee=new Date().toISOString().slice(0,10),te=e.completeness||{score:0,checks:[],required:0},ne=te.checks.filter(e=>!e.ok),re=e.open_now||{};return(0,Y.jsxs)(`div`,{className:`ars-page`,children:[s&&(0,Y.jsx)(M,{tone:`serious`,children:s}),(0,Y.jsx)(k,{icon:(0,Y.jsx)(Ft,{size:16}),title:b(`Local business`,`ai-rank-suite`),subtitle:b(`One record, published as LocalBusiness schema and reused by every “near me” answer Google, ChatGPT and Perplexity give about you`,`ai-rank-suite`),action:(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[o&&(0,Y.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,Y.jsx)(Me,{checked:!!t.enabled,onChange:e=>n({enabled:e}),label:b(`Publish`,`ai-rank-suite`)})]}),children:(0,Y.jsxs)(`div`,{className:`ars-local-head`,children:[(0,Y.jsx)(`div`,{className:`shrink-0`,children:(0,Y.jsx)(Se,{value:te.score,label:b(`Profile completeness`,`ai-rank-suite`)})}),(0,Y.jsxs)(`div`,{className:`grid gap-3 min-w-0`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[t.enabled?(0,Y.jsxs)(j,{tone:re.open?`good`:`neutral`,children:[re.label,re.until?` · ${re.until}`:``]}):(0,Y.jsx)(j,{tone:`warning`,children:b(`Not published — nothing is emitted yet`,`ai-rank-suite`)}),(0,Y.jsxs)(`span`,{className:`t-caption`,children:[`Site timezone: `,e.timezone||`UTC`]})]}),ne.length===0?(0,Y.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Nothing left to fill in. The Output tab shows exactly what search engines and assistants will read.`,`ai-rank-suite`)}):(()=>{let e={hours:`hours`,areas:`reach`,services:`reach`,payment:`reach`,locations:`locations`},t=t=>e[t.id]||`profile`,n=e=>{d(t(e)),window.requestAnimationFrame(()=>{let t=document.querySelector(`[data-airanksuite-field="${e.id}"]`);t&&(t.scrollIntoView({behavior:`smooth`,block:`center`}),window.setTimeout(()=>t.focus({preventScroll:!0}),350))})},r=ne.filter(e=>e.tier===`required`),i=ne.filter(e=>e.tier===`recommended`),a=r[0]||i[0]||ne[0],o=(te.checks||[]).filter(e=>e.tier===`required`&&e.ok).length,s=(te.checks||[]).filter(e=>e.tier===`required`).length;return(0,Y.jsxs)(`div`,{className:`grid gap-2.5`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,Y.jsx)(`span`,{className:`text-[13.5px] font-semibold`,children:r.length>0?S(x(`%1$d of %2$d required field filled in`,`%1$d of %2$d required fields filled in`,s,`ai-rank-suite`),o,s):b(`Every required field is filled in`,`ai-rank-suite`)}),(0,Y.jsxs)(`span`,{className:`t-caption`,children:[r.length>0&&S(b(`%d required`,`ai-rank-suite`),r.length),r.length>0&&i.length>0&&` · `,i.length>0&&S(b(`%d recommended`,`ai-rank-suite`),i.length)]})]}),(0,Y.jsx)(`div`,{className:`ars-local-bar`,role:`img`,"aria-label":S(x(`%1$d of %2$d required field`,`%1$d of %2$d required fields`,s,`ai-rank-suite`),o,s),children:(te.checks||[]).filter(e=>e.tier===`required`).map(e=>(0,Y.jsx)(`span`,{className:`ars-local-seg${e.ok?` is-ok`:``}`,title:e.ok?e.label:S(b(`%s — still empty`,`ai-rank-suite`),e.label)},e.id))}),(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Y.jsx)(A,{onClick:()=>n(a),children:S(b(`Fill in %s`,`ai-rank-suite`),a.label)}),(0,Y.jsxs)(`span`,{className:`t-caption`,children:[S(b(`Next: %s`,`ai-rank-suite`),a.label),a.hint?` — ${a.hint}`:``]})]})]})})()]})]})}),(0,Y.jsx)(Ie,{tabs:Vl,active:u,onChange:d}),u===`profile`&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(k,{icon:(0,Y.jsx)(vt,{size:16}),title:b(`Identity`,`ai-rank-suite`),subtitle:b(`Who the business is, in the words an assistant will repeat`,`ai-rank-suite`),children:(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Y.jsx)(Qe,{label:b(`Business name`,`ai-rank-suite`),hint:b(`The name on the shopfront, not the legal entity.`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,"data-airanksuite-field":`name`,value:t.name||``,onChange:e=>n({name:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`Business type`,`ai-rank-suite`),hint:b(`A precise subtype earns a richer result than the generic LocalBusiness.`,`ai-rank-suite`),children:(0,Y.jsx)(`select`,{value:t.business_type,onChange:e=>n({business_type:e.target.value}),children:Object.entries(e.type_groups||{}).map(([e,t])=>(0,Y.jsx)(`optgroup`,{label:e,children:t.map(e=>(0,Y.jsx)(`option`,{value:e,children:e},e))},e))})}),(0,Y.jsx)(Qe,{label:b(`Legal name (optional)`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.legal_name||``,onChange:e=>n({legal_name:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`Slogan (optional)`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.slogan||``,onChange:e=>n({slogan:e.target.value})})}),(0,Y.jsx)(Qe,{span:!0,label:b(`Description`,`ai-rank-suite`),hint:b(`Two or three sentences. This is the passage a chat assistant quotes when someone asks what you do.`,`ai-rank-suite`),children:(0,Y.jsx)(`textarea`,{rows:3,value:t.description||``,onChange:e=>n({description:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`Founded`,`ai-rank-suite`),hint:b(`Year or full date, e.g. 2011 or 2011-04-01.`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.founding_date||``,onChange:e=>n({founding_date:e.target.value})})})]})}),(0,Y.jsx)(k,{icon:(0,Y.jsx)(Nt,{size:16}),title:b(`Contact`,`ai-rank-suite`),subtitle:b(`Used for click-to-call and for the contact block in an AI answer`,`ai-rank-suite`),children:(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Y.jsx)(Qe,{label:b(`Phone`,`ai-rank-suite`),hint:b(`International format (+49 …) so a call works from anywhere.`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,"data-airanksuite-field":`phone`,value:t.phone||``,onChange:e=>n({phone:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`Second phone (optional)`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.phone_secondary||``,onChange:e=>n({phone_secondary:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`WhatsApp (optional)`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.whatsapp||``,onChange:e=>n({whatsapp:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`Fax (optional)`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.fax||``,onChange:e=>n({fax:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`Email`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`email`,"data-airanksuite-field":`email`,value:t.email||``,onChange:e=>n({email:e.target.value})})})]})}),(0,Y.jsxs)(k,{icon:(0,Y.jsx)(Ft,{size:16}),title:b(`Address`,`ai-rank-suite`),subtitle:b(`The NAP — name, address, phone — that must match your Google Business Profile character for character`,`ai-rank-suite`),children:[(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Y.jsx)(Qe,{label:b(`Street and number`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,"data-airanksuite-field":`street`,value:t.street||``,onChange:e=>n({street:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`Suite / floor (optional)`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,"data-airanksuite-field":`street2`,value:t.street2||``,onChange:e=>n({street2:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`Postal code`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.postal_code||``,onChange:e=>n({postal_code:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`City`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,"data-airanksuite-field":`city`,value:t.city||``,onChange:e=>n({city:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`Region / state`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,"data-airanksuite-field":`region`,value:t.region||``,onChange:e=>n({region:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`Country code`,`ai-rank-suite`),hint:b(`Two letters — DE, AE, US.`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,maxLength:2,value:t.country||``,onChange:e=>n({country:e.target.value.toUpperCase()})})}),(0,Y.jsx)(Qe,{label:b(`Latitude`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.latitude||``,onChange:e=>n({latitude:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`Longitude`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.longitude||``,onChange:e=>n({longitude:e.target.value})})}),(0,Y.jsx)(Qe,{span:!0,children:(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Y.jsx)(A,{variant:`ghost`,onClick:E,busy:a,children:b(`Find coordinates from the address`,`ai-rank-suite`)}),m&&(0,Y.jsxs)(`span`,{className:`t-caption`,children:[`Matched: `,m]})]})})]}),(0,Y.jsx)(ft,{title:b(`Why coordinates matter for “near me”`,`ai-rank-suite`),children:(0,Y.jsx)(`p`,{children:b(`A street name is ambiguous — dozens of German towns have a Bahnhofstraße 1. Coordinates remove the guess, which is what decides whether you appear in a map pack for the right town. The lookup uses OpenStreetMap and needs no account; you can also paste the pair from Google Maps by right-clicking your pin.`,`ai-rank-suite`)})})]}),(0,Y.jsx)(k,{icon:(0,Y.jsx)(At,{size:16}),title:b(`Images`,`ai-rank-suite`),subtitle:b(`Google puts a picture next to a local result — without one, your listing is plain text`,`ai-rank-suite`),children:(0,Y.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,Y.jsx)($e,{label:b(`Logo`,`ai-rank-suite`),title:b(`Select a logo`,`ai-rank-suite`),value:t.logo_url,onChange:e=>n({logo_url:e}),hint:b(`Square, at least 112×112, on a plain background.`,`ai-rank-suite`)}),(0,Y.jsx)($e,{label:b(`Photo of the business`,`ai-rank-suite`),title:b(`Select a photo`,`ai-rank-suite`),value:t.image_url,onChange:e=>n({image_url:e}),hint:b(`The storefront, the practice, the workshop. At least 1200px wide.`,`ai-rank-suite`)})]})}),(0,Y.jsx)(k,{icon:(0,Y.jsx)(xt,{size:16}),title:b(`Commercial details`,`ai-rank-suite`),subtitle:b(`Answers to the questions people ask before they walk in`,`ai-rank-suite`),children:(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Y.jsx)(Qe,{label:b(`Price range`,`ai-rank-suite`),hint:b(`Either a symbol scale (€€) or a span (30–90 €).`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.price_range||``,onChange:e=>n({price_range:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`Currency`,`ai-rank-suite`),hint:b(`ISO code, e.g. EUR, AED, USD.`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.currencies||``,onChange:e=>n({currencies:e.target.value})})}),(0,Y.jsx)(Qe,{span:!0,label:b(`Payment accepted`,`ai-rank-suite`),children:(0,Y.jsx)(tt,{options:Object.entries(e.payment_methods||{}).map(([e,t])=>({key:e,label:t})),value:t.payments||[],onChange:e=>n({payments:e})})}),(0,Y.jsx)(Qe,{label:b(`VAT ID`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.vat_id||``,onChange:e=>n({vat_id:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`Tax ID`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.tax_id||``,onChange:e=>n({tax_id:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`Company registration number`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:t.registration_id||``,onChange:e=>n({registration_id:e.target.value})})})]})})]}),u===`hours`&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(k,{icon:(0,Y.jsx)(Ct,{size:16}),title:b(`Opening hours`,`ai-rank-suite`),subtitle:b(`Published as openingHoursSpecification and read out verbatim when someone asks whether you are open`,`ai-rank-suite`),action:(0,Y.jsx)(Me,{checked:!!t.show_open_now,onChange:e=>n({show_open_now:e}),label:b(`Live open/closed badge`,`ai-rank-suite`)}),children:[(0,Y.jsx)(`div`,{className:`grid gap-2`,children:e.days.map(e=>{let n=t.hours[e]||{},r=!!(n.break_start||n.break_end);return(0,Y.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,style:{minHeight:40},children:[(0,Y.jsx)(`span`,{className:`font-medium`,style:{minWidth:100},children:zl[e]}),(0,Y.jsx)(Me,{checked:!n.closed,onChange:t=>v(e,{closed:!t}),label:n.closed?`Closed`:`Open`}),n.closed?(0,Y.jsx)(`span`,{className:`t-caption`,children:b(`No hours published for this day`,`ai-rank-suite`)}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`input`,{type:`time`,value:n.open||``,onChange:t=>v(e,{open:t.target.value}),style:{width:116}}),(0,Y.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`–`}),(0,Y.jsx)(`input`,{type:`time`,value:n.close||``,onChange:t=>v(e,{close:t.target.value}),style:{width:116}}),r?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`span`,{className:`t-caption`,style:{marginLeft:8},children:b(`closed`,`ai-rank-suite`)}),(0,Y.jsx)(`input`,{type:`time`,value:n.break_start||``,onChange:t=>v(e,{break_start:t.target.value}),style:{width:116}}),(0,Y.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`–`}),(0,Y.jsx)(`input`,{type:`time`,value:n.break_end||``,onChange:t=>v(e,{break_end:t.target.value}),style:{width:116}}),(0,Y.jsx)(`button`,{type:`button`,"aria-label":b(`Remove break`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer`,style:{color:`var(--ars-ink-3)`},onClick:()=>v(e,{break_start:``,break_end:``}),children:(0,Y.jsx)(Rt,{size:14})})]}):(0,Y.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent cursor-pointer text-[12px] underline`,style:{color:`var(--ars-ink-3)`},onClick:()=>v(e,{break_start:`12:00`,break_end:`13:00`}),children:`+ midday break`})]})]},e)})}),(0,Y.jsx)(ft,{title:b(`Why a midday break is worth entering`,`ai-rank-suite`),children:(0,Y.jsx)(`p`,{children:b(`A practice that closes between 12 and 13 but publishes 09:00–17:00 tells an assistant it is open at 12:30. Two windows per day is the shape Google expects, and it is what stops someone standing in front of a locked door.`,`ai-rank-suite`)})})]}),(0,Y.jsx)(k,{title:b(`Holidays and one-off changes`,`ai-rank-suite`),subtitle:b(`Dated exceptions override the weekly grid — publish them before the holiday, not after`,`ai-rank-suite`),action:(0,Y.jsx)(A,{variant:`ghost`,onClick:()=>w(`special_hours`,{date:new Date().toISOString().slice(0,10),until:``,label:``,closed:!0,open:``,close:``}),children:`+ Add date`}),children:(t.special_hours||[]).length===0?(0,Y.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`No exceptions yet. Christmas, a public holiday, a week of stocktaking — each one entered here is a question your phone does not have to answer.`,`ai-rank-suite`)}):(0,Y.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Y.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Y.jsxs)(`table`,{className:`ars-table`,children:[(0,Y.jsx)(`thead`,{children:(0,Y.jsxs)(`tr`,{children:[(0,Y.jsx)(`th`,{className:`is-mid`,children:b(`From`,`ai-rank-suite`)}),(0,Y.jsx)(`th`,{className:`is-mid`,children:b(`To (optional)`,`ai-rank-suite`)}),(0,Y.jsx)(`th`,{children:b(`Label`,`ai-rank-suite`)}),(0,Y.jsx)(`th`,{className:`is-narrow`,children:b(`Closed`,`ai-rank-suite`)}),(0,Y.jsx)(`th`,{className:`is-mid`,children:b(`Hours`,`ai-rank-suite`)}),(0,Y.jsx)(`th`,{className:`is-action`})]})}),(0,Y.jsx)(`tbody`,{children:(t.special_hours||[]).map((e,t)=>{let n=(e.until||e.date||``)<ee;return(0,Y.jsxs)(`tr`,{style:n?{opacity:.6}:void 0,children:[(0,Y.jsx)(`td`,{children:(0,Y.jsx)(`input`,{type:`date`,value:e.date||``,onChange:e=>C(`special_hours`,t,{date:e.target.value})})}),(0,Y.jsx)(`td`,{children:(0,Y.jsx)(`input`,{type:`date`,value:e.until||``,onChange:e=>C(`special_hours`,t,{until:e.target.value})})}),(0,Y.jsx)(`td`,{children:(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Y.jsx)(`input`,{type:`text`,placeholder:b(`Christmas Day`,`ai-rank-suite`),value:e.label||``,onChange:e=>C(`special_hours`,t,{label:e.target.value})}),n&&(0,Y.jsx)(`span`,{className:`ars-tag shrink-0`,children:b(`Past`,`ai-rank-suite`)})]})}),(0,Y.jsx)(`td`,{className:`is-narrow`,children:(0,Y.jsx)(`input`,{type:`checkbox`,checked:!!e.closed,onChange:e=>C(`special_hours`,t,{closed:e.target.checked})})}),(0,Y.jsx)(`td`,{children:e.closed?(0,Y.jsx)(`span`,{className:`t-caption`,children:b(`Closed all day`,`ai-rank-suite`)}):(0,Y.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,Y.jsx)(`input`,{type:`time`,value:e.open||``,onChange:e=>C(`special_hours`,t,{open:e.target.value}),style:{width:104}}),(0,Y.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`–`}),(0,Y.jsx)(`input`,{type:`time`,value:e.close||``,onChange:e=>C(`special_hours`,t,{close:e.target.value}),style:{width:104}})]})}),(0,Y.jsx)(`td`,{className:`is-action`,children:(0,Y.jsx)(`button`,{type:`button`,"aria-label":b(`Remove date`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer`,style:{color:`var(--ars-ink-3)`},onClick:()=>T(`special_hours`,t),children:(0,Y.jsx)(Rt,{size:15})})})]},t)})})]})})})})]}),u===`locations`&&(0,Y.jsx)(k,{icon:(0,Y.jsx)(Nt,{size:16}),title:b(`Branches`,`ai-rank-suite`),subtitle:b(`Each branch becomes its own LocalBusiness node, linked back to head office as its parent`,`ai-rank-suite`),action:(0,Y.jsxs)(A,{variant:`ghost`,onClick:()=>{w(`locations`,{...Wl}),_((t.locations||[]).length)},children:[`+ `,b(`Add branch`,`ai-rank-suite`)]}),children:(t.locations||[]).length===0?(0,Y.jsxs)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:[b(`One location so far. Add branches if you have several — every field left empty inherits from the main profile, so a second surgery in the next town usually needs nothing but a street and a phone number. List them on any page with`,`ai-rank-suite`),` `,(0,Y.jsx)(`code`,{className:`ars-mono`,children:`[airanksuite_locations]`}),`.`]}):(0,Y.jsx)(`div`,{className:`grid gap-2`,children:(t.locations||[]).map((n,r)=>{let i=g===r;return(0,Y.jsxs)(`div`,{className:`ars-r-md`,style:{border:`1px solid var(--ars-border)`},children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 cursor-pointer`,style:{background:`var(--ars-surface-2)`},onClick:()=>_(i?-1:r),children:[(0,Y.jsx)(`span`,{"aria-hidden":!0,style:{color:`var(--ars-ink-3)`,width:12},children:i?`▾`:`▸`}),(0,Y.jsx)(`span`,{className:`font-medium`,children:n.name||S(b(`Branch %d`,`ai-rank-suite`),r+1)}),(0,Y.jsx)(`span`,{className:`t-caption truncate`,children:[n.street,n.city].filter(Boolean).join(`, `)||b(`inherits the main address`,`ai-rank-suite`)}),n.own_hours&&(0,Y.jsx)(`span`,{className:`ars-tag`,children:b(`own hours`,`ai-rank-suite`)}),(0,Y.jsx)(`button`,{type:`button`,"aria-label":b(`Remove branch`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer ml-auto`,style:{color:`var(--ars-ink-3)`},onClick:e=>{e.stopPropagation(),T(`locations`,r),_(-1)},children:(0,Y.jsx)(Rt,{size:15})})]}),i&&(0,Y.jsxs)(`div`,{className:`p-3 grid gap-3`,children:[(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Y.jsx)(Qe,{label:b(`Name`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`text`,value:n.name||``,onChange:e=>y(r,{name:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`Business type`,`ai-rank-suite`),hint:b(`Leave on “Same as main profile” unless this branch is different.`,`ai-rank-suite`),children:(0,Y.jsxs)(`select`,{value:n.business_type||``,onChange:e=>y(r,{business_type:e.target.value}),children:[(0,Y.jsx)(`option`,{value:``,children:b(`Same as main profile`,`ai-rank-suite`)}),Object.entries(e.type_groups||{}).map(([e,t])=>(0,Y.jsx)(`optgroup`,{label:e,children:t.map(e=>(0,Y.jsx)(`option`,{value:e,children:e},e))},e))]})}),[[`street`,b(`Street and number`,`ai-rank-suite`)],[`street2`,b(`Suite / floor`,`ai-rank-suite`)],[`postal_code`,b(`Postal code`,`ai-rank-suite`)],[`city`,b(`City`,`ai-rank-suite`)],[`region`,b(`Region / state`,`ai-rank-suite`)],[`country`,b(`Country code`,`ai-rank-suite`)],[`phone`,b(`Phone`,`ai-rank-suite`)],[`email`,b(`Email`,`ai-rank-suite`)],[`latitude`,b(`Latitude`,`ai-rank-suite`)],[`longitude`,b(`Longitude`,`ai-rank-suite`)],[`price_range`,b(`Price range`,`ai-rank-suite`)],[`map_url`,b(`Map link`,`ai-rank-suite`)],[`booking_url`,b(`Booking link`,`ai-rank-suite`)]].map(([e,t])=>(0,Y.jsx)(Qe,{label:t,children:(0,Y.jsx)(`input`,{type:`text`,value:n[e]||``,onChange:t=>y(r,{[e]:t.target.value})})},e))]}),(0,Y.jsx)($e,{label:b(`Photo of this branch`,`ai-rank-suite`),value:n.image_url,onChange:e=>y(r,{image_url:e}),height:72}),(0,Y.jsx)(Me,{checked:!!n.own_hours,onChange:e=>y(r,{own_hours:e,hours:e&&!Object.keys(n.hours||{}).length?t.hours:n.hours}),label:b(`This branch has its own opening hours`,`ai-rank-suite`)}),n.own_hours&&(0,Y.jsx)(`div`,{className:`grid gap-2`,children:e.days.map(e=>{let t=(n.hours||{})[e]||{};return(0,Y.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,style:{minHeight:36},children:[(0,Y.jsx)(`span`,{className:`font-medium`,style:{minWidth:100},children:zl[e]}),(0,Y.jsx)(Me,{checked:!t.closed,onChange:i=>y(r,{hours:{...n.hours,[e]:{...t,closed:!i}}}),label:t.closed?`Closed`:`Open`}),!t.closed&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`input`,{type:`time`,value:t.open||``,onChange:i=>y(r,{hours:{...n.hours,[e]:{...t,open:i.target.value}}}),style:{width:116}}),(0,Y.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:`–`}),(0,Y.jsx)(`input`,{type:`time`,value:t.close||``,onChange:i=>y(r,{hours:{...n.hours,[e]:{...t,close:i.target.value}}}),style:{width:116}})]})]},e)})})]})]},r)})})}),u===`reach`&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(k,{icon:(0,Y.jsx)(Nt,{size:16}),title:b(`Service areas`,`ai-rank-suite`),subtitle:b(`The towns and districts you travel to — the answer to “do you come to …?”`,`ai-rank-suite`),children:[(0,Y.jsx)(et,{value:t.areas||[],onChange:e=>n({areas:e}),placeholder:b(`Add a town or district and press Enter`,`ai-rank-suite`)}),(0,Y.jsx)(ft,{title:b(`When service areas matter more than an address`,`ai-rank-suite`),children:(0,Y.jsx)(`p`,{children:b(`A plumber, a mobile physiotherapist or a wedding photographer serves a radius, not a shopfront. Listing those places as areaServed is what lets you appear for a town you have no office in — and it is the only local signal available at all to a business that works from home and publishes no address.`,`ai-rank-suite`)})})]}),(0,Y.jsx)(k,{title:b(`Services`,`ai-rank-suite`),subtitle:b(`Named services with prices, published as an offer catalogue`,`ai-rank-suite`),action:(0,Y.jsxs)(A,{variant:`ghost`,onClick:()=>w(`services`,{name:``,description:``,price:``,currency:``,url:``}),children:[`+ `,b(`Add service`,`ai-rank-suite`)]}),children:(t.services||[]).length===0?(0,Y.jsxs)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:[b(`Nothing listed. “What does a check-up cost?” is one of the most common questions asked of an assistant, and a priced service here is a concrete answer it can give — with your name attached. Render them on a page with`,`ai-rank-suite`),` `,(0,Y.jsx)(`code`,{className:`ars-mono`,children:`[airanksuite_services]`}),`.`]}):(0,Y.jsx)(`div`,{className:`grid gap-2`,children:(t.services||[]).map((e,n)=>(0,Y.jsxs)(`div`,{className:`ars-r-sm p-3 grid gap-2`,style:{background:`var(--ars-surface-2)`},children:[(0,Y.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-[2fr_1fr_1fr_auto]`,children:[(0,Y.jsx)(`input`,{type:`text`,placeholder:b(`Service name`,`ai-rank-suite`),value:e.name||``,onChange:e=>C(`services`,n,{name:e.target.value})}),(0,Y.jsx)(`input`,{type:`text`,placeholder:b(`Price`,`ai-rank-suite`),value:e.price||``,onChange:e=>C(`services`,n,{price:e.target.value})}),(0,Y.jsx)(`input`,{type:`text`,placeholder:t.currencies||`EUR`,value:e.currency||``,onChange:e=>C(`services`,n,{currency:e.target.value})}),(0,Y.jsx)(`button`,{type:`button`,"aria-label":b(`Remove service`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer`,style:{color:`var(--ars-ink-3)`},onClick:()=>T(`services`,n),children:(0,Y.jsx)(Rt,{size:15})})]}),(0,Y.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:[(0,Y.jsx)(`input`,{type:`text`,placeholder:b(`Short description`,`ai-rank-suite`),value:e.description||``,onChange:e=>C(`services`,n,{description:e.target.value})}),(0,Y.jsx)(`input`,{type:`url`,placeholder:b(`Link to the service page (optional)`,`ai-rank-suite`),value:e.url||``,onChange:e=>C(`services`,n,{url:e.target.value})})]})]},n))})}),(0,Y.jsx)(k,{title:b(`Departments and practitioners`,`ai-rank-suite`),subtitle:b(`A clinic with three specialities, a firm with four partners — each becomes its own node`,`ai-rank-suite`),action:(0,Y.jsx)(A,{variant:`ghost`,onClick:()=>w(`departments`,{name:``,business_type:`LocalBusiness`,phone:``,email:``,url:``}),children:`+ Add department`}),children:(t.departments||[]).length===0?(0,Y.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`None yet. Use this when one address houses several distinct practices — an orthodontist inside a dental clinic, a tax adviser inside a law firm — so each can be found on its own terms.`,`ai-rank-suite`)}):(0,Y.jsx)(`div`,{className:`grid gap-2`,children:(t.departments||[]).map((t,n)=>(0,Y.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-[2fr_1.4fr_1fr_1fr_auto] items-center`,children:[(0,Y.jsx)(`input`,{type:`text`,placeholder:b(`Name`,`ai-rank-suite`),value:t.name||``,onChange:e=>C(`departments`,n,{name:e.target.value})}),(0,Y.jsx)(`select`,{value:t.business_type||`LocalBusiness`,onChange:e=>C(`departments`,n,{business_type:e.target.value}),children:Object.entries(e.type_groups||{}).map(([e,t])=>(0,Y.jsx)(`optgroup`,{label:e,children:t.map(e=>(0,Y.jsx)(`option`,{value:e,children:e},e))},e))}),(0,Y.jsx)(`input`,{type:`text`,placeholder:b(`Phone`,`ai-rank-suite`),value:t.phone||``,onChange:e=>C(`departments`,n,{phone:e.target.value})}),(0,Y.jsx)(`input`,{type:`email`,placeholder:b(`Email`,`ai-rank-suite`),value:t.email||``,onChange:e=>C(`departments`,n,{email:e.target.value})}),(0,Y.jsx)(`button`,{type:`button`,"aria-label":b(`Remove department`,`ai-rank-suite`),className:`border-0 bg-transparent cursor-pointer`,style:{color:`var(--ars-ink-3)`},onClick:()=>T(`departments`,n),children:(0,Y.jsx)(Rt,{size:15})})]},n))})}),(0,Y.jsx)(k,{icon:(0,Y.jsx)(At,{size:16}),title:b(`Amenities`,`ai-rank-suite`),subtitle:b(`“Is it wheelchair accessible?” is a question with a schema answer`,`ai-rank-suite`),children:(0,Y.jsx)(tt,{options:Object.entries(e.amenities||{}).map(([e,t])=>({key:e,label:t})),value:t.amenities||[],onChange:e=>n({amenities:e})})}),(0,Y.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,Y.jsxs)(k,{icon:(0,Y.jsx)(Ot,{size:16}),title:b(`Linked profiles`,`ai-rank-suite`),subtitle:b(`Published as sameAs — how an engine confirms you are one entity`,`ai-rank-suite`),children:[(0,Y.jsx)(et,{value:t.profiles||[],onChange:e=>n({profiles:e}),placeholder:`https://www.google.com/maps/place/…`}),(0,Y.jsx)(ft,{title:b(`Which links belong here`,`ai-rank-suite`),children:(0,Y.jsx)(`p`,{children:b(`Your Google Business Profile first, then the directories your industry actually uses — Facebook, LinkedIn, Instagram, Jameda, an industry register. Each one is a claim that the entity at that URL and the entity on this site are the same, which is what lets an assistant merge the reviews and the opening hours into a single confident answer.`,`ai-rank-suite`)})})]}),(0,Y.jsx)(k,{icon:(0,Y.jsx)(wt,{size:16}),title:b(`Languages spoken`,`ai-rank-suite`),subtitle:b(`Published as knowsLanguage`,`ai-rank-suite`),children:(0,Y.jsx)(et,{value:t.languages||[],onChange:e=>n({languages:e}),suggestions:Bl,placeholder:b(`Add a language`,`ai-rank-suite`)})})]}),(0,Y.jsx)(k,{icon:(0,Y.jsx)(Ot,{size:16}),title:b(`Action links`,`ai-rank-suite`),subtitle:b(`Where an assistant sends someone who wants to act`,`ai-rank-suite`),children:(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Y.jsx)(Qe,{label:b(`Booking / appointment URL`,`ai-rank-suite`),hint:b(`Emitted as a ReserveAction.`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`url`,value:t.booking_url||``,onChange:e=>n({booking_url:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`Map URL`,`ai-rank-suite`),hint:b(`Leave empty to generate a Google Maps search from the address.`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`url`,value:t.map_url||``,onChange:e=>n({map_url:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`Menu URL`,`ai-rank-suite`),hint:b(`Restaurants and cafés.`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`url`,value:t.menu_url||``,onChange:e=>n({menu_url:e.target.value})})}),(0,Y.jsx)(Qe,{label:b(`Order URL`,`ai-rank-suite`),children:(0,Y.jsx)(`input`,{type:`url`,value:t.order_url||``,onChange:e=>n({order_url:e.target.value})})})]})})]}),u===`listings`&&(0,Y.jsx)(Ml,{record:t,onImported:e=>{e?n(e):l()}}),u===`output`&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(k,{icon:(0,Y.jsx)(Dt,{size:16}),title:b(`Structured data`,`ai-rank-suite`),subtitle:b(`Exactly what is printed on your home page — no view-source needed`,`ai-rank-suite`),action:f?.test&&(0,Y.jsx)(`a`,{className:`ars-url`,href:f.test,target:`_blank`,rel:`noreferrer noopener`,children:b(`Open in Google's Rich Results Test ↗`,`ai-rank-suite`)}),children:f?(0,Y.jsxs)(`div`,{className:`grid gap-2.5`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Y.jsx)(j,{tone:f.active?`good`:`warn`,children:f.active?b(`Published on the home page`,`ai-rank-suite`):b(`Not published — switch “Publish” on`,`ai-rank-suite`)}),(0,Y.jsx)(`span`,{className:`t-caption`,children:S(x(`%d node in the graph`,`%d nodes in the graph`,f.nodes,`ai-rank-suite`),f.nodes)})]}),(0,Y.jsx)(nt,{code:f.json,language:`json`})]}):(0,Y.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Loading the preview…`,`ai-rank-suite`)})}),(0,Y.jsx)(k,{icon:(0,Y.jsx)(Dt,{size:16}),title:b(`Shortcodes`,`ai-rank-suite`),subtitle:b(`Drop the business data into any page, post or widget`,`ai-rank-suite`),children:(0,Y.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Y.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Y.jsxs)(`table`,{className:`ars-table`,children:[(0,Y.jsx)(`thead`,{children:(0,Y.jsxs)(`tr`,{children:[(0,Y.jsx)(`th`,{style:{width:240},children:b(`Shortcode`,`ai-rank-suite`)}),(0,Y.jsx)(`th`,{children:b(`What it renders`,`ai-rank-suite`)})]})}),(0,Y.jsx)(`tbody`,{children:[[`[airanksuite_business_address]`,b(`Full address block, marked up as <address>`,`ai-rank-suite`)],[`[airanksuite_business_hours]`,b(`Opening-hours table, including upcoming holiday closures`,`ai-rank-suite`)],[`[airanksuite_business_hours special="no"]`,b(`The weekly grid only, without exceptions`,`ai-rank-suite`)],[`[airanksuite_business_phone]`,b(`Click-to-call phone number`,`ai-rank-suite`)],[`[airanksuite_open_now]`,b(`Live “Open now / Closed” badge in the site timezone`,`ai-rank-suite`)],[`[airanksuite_business_map]`,b(`Address as a link to your map pin`,`ai-rank-suite`)],[`[airanksuite_services]`,b(`Your service list with prices`,`ai-rank-suite`)],[`[airanksuite_locations]`,b(`Every branch, one address block each`,`ai-rank-suite`)]].map(([e,t])=>(0,Y.jsxs)(`tr`,{children:[(0,Y.jsx)(`td`,{children:(0,Y.jsx)(`code`,{className:`ars-mono`,children:e})}),(0,Y.jsx)(`td`,{children:t})]},e))})]})})})}),(0,Y.jsx)(k,{icon:(0,Y.jsx)(xt,{size:16}),title:b(`Profile checklist`,`ai-rank-suite`),subtitle:b(`Everything that goes into the score, in one list`,`ai-rank-suite`),children:(0,Y.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Y.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Y.jsxs)(`table`,{className:`ars-table`,children:[(0,Y.jsx)(`thead`,{children:(0,Y.jsxs)(`tr`,{children:[(0,Y.jsx)(`th`,{style:{width:34}}),(0,Y.jsx)(`th`,{style:{width:220},children:b(`Field`,`ai-rank-suite`)}),(0,Y.jsx)(`th`,{className:`is-mid`,children:b(`Weight`,`ai-rank-suite`)}),(0,Y.jsx)(`th`,{children:b(`Why it matters`,`ai-rank-suite`)})]})}),(0,Y.jsx)(`tbody`,{children:te.checks.map(e=>(0,Y.jsxs)(`tr`,{children:[(0,Y.jsx)(`td`,{style:{width:34,color:e.ok?`var(--ars-c-green-ink)`:`var(--ars-ink-3)`},children:e.ok?`✓`:`○`}),(0,Y.jsx)(`td`,{style:{fontWeight:e.ok?400:600},children:e.label}),(0,Y.jsx)(`td`,{className:`is-mid`,children:(0,Y.jsx)(`span`,{className:`ars-tag`,style:{color:`var(--ars-c-${Ul[e.tier]}-ink)`,background:`var(--ars-c-${Ul[e.tier]})`},children:Hl[e.tier]})}),(0,Y.jsx)(`td`,{style:{color:`var(--ars-ink-2)`},children:e.hint||`—`})]},e.id))})]})})})})]}),(0,Y.jsxs)(`div`,{className:`ars-savebar`,children:[(0,Y.jsx)(A,{onClick:r,busy:a,children:b(`Save changes`,`ai-rank-suite`)}),o&&(0,Y.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,Y.jsx)(`span`,{className:`t-caption ml-auto`,children:t.enabled?b(`Published on the home page as LocalBusiness structured data.`,`ai-rank-suite`):b(`Not published yet — turn on “Publish” at the top.`,`ai-rank-suite`)})]})]})}var Rl,Y,zl,Bl,Vl,Hl,Ul,Wl,Gl=o((()=>{Rl=u(f(),1),C(),Qa(),O(),dt(),mt(),Fl(),Vt(),Y=_e(),zl={monday:b(`Monday`,`ai-rank-suite`),tuesday:b(`Tuesday`,`ai-rank-suite`),wednesday:b(`Wednesday`,`ai-rank-suite`),thursday:b(`Thursday`,`ai-rank-suite`),friday:b(`Friday`,`ai-rank-suite`),saturday:b(`Saturday`,`ai-rank-suite`),sunday:b(`Sunday`,`ai-rank-suite`)},Bl=[`English`,`Deutsch`,`العربية`,`Français`,`Español`,`Italiano`,`Nederlands`,`Türkçe`,`Русский`,`中文`],Vl=[{id:`profile`,label:b(`Profile`,`ai-rank-suite`)},{id:`hours`,label:b(`Hours`,`ai-rank-suite`)},{id:`locations`,label:b(`Locations`,`ai-rank-suite`)},{id:`reach`,label:b(`Reach & services`,`ai-rank-suite`)},{id:`listings`,label:b(`Listings`,`ai-rank-suite`)},{id:`output`,label:b(`Output`,`ai-rank-suite`)}],Hl={required:b(`Required`,`ai-rank-suite`),recommended:b(`Recommended`,`ai-rank-suite`),optional:b(`Nice to have`,`ai-rank-suite`)},Ul={required:`red`,recommended:`yellow`,optional:`blue`},Wl={name:``,business_type:``,street:``,street2:``,postal_code:``,city:``,region:``,country:``,phone:``,email:``,latitude:``,longitude:``,map_url:``,booking_url:``,price_range:``,image_url:``,own_hours:!1,hours:{}}}));function Kl({settings:e,onSave:t,saving:n}){let[r,i]=(0,ql.useState)(null),[a,o]=(0,ql.useState)(null),[s,c]=(0,ql.useState)(!1),[l,u]=(0,ql.useState)(``),[d,f]=(0,ql.useState)(null),[p,m]=(0,ql.useState)(30),[h,g]=(0,ql.useState)(null),_=h||e||{},v=(e=p)=>{c(!0),o(null),D.get(`/analytics/matomo?days=${e}`).then(i).catch(e=>o(e.message)).finally(()=>c(!1))};(0,ql.useEffect)(()=>{v()},[]);let y=e=>g({..._,...e}),x=async()=>{c(!0),o(null);try{l&&(await D.put(`/analytics/matomo`,{token:l}),u(``)),await t(_),g(null),v()}catch(e){o(e.message)}finally{c(!1)}},C=async()=>{c(!0),f(null),o(null);try{f(await D.post(`/analytics/matomo/verify`))}catch(e){o(e.message)}finally{c(!1)}},w=r?.assistants;return(0,Jl.jsxs)(`div`,{className:`grid gap-3`,children:[a&&(0,Jl.jsx)(M,{tone:`serious`,children:a}),r?.configured&&w&&(0,Jl.jsxs)(k,{icon:(0,Jl.jsx)(Et,{size:16}),title:b(`Visits from AI assistants`,`ai-rank-suite`),subtitle:b(`Real people who arrived from an AI answer — the only hard evidence that being cited is working`,`ai-rank-suite`),action:(0,Jl.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Jl.jsxs)(`select`,{value:p,onChange:e=>{m(Number(e.target.value)),v(Number(e.target.value))},style:{maxWidth:130},"aria-label":b(`Period`,`ai-rank-suite`),children:[(0,Jl.jsx)(`option`,{value:7,children:b(`Last 7 days`,`ai-rank-suite`)}),(0,Jl.jsx)(`option`,{value:30,children:b(`Last 30 days`,`ai-rank-suite`)}),(0,Jl.jsx)(`option`,{value:90,children:b(`Last 90 days`,`ai-rank-suite`)}),(0,Jl.jsx)(`option`,{value:365,children:b(`Last year`,`ai-rank-suite`)})]}),(0,Jl.jsx)(A,{variant:`ghost`,busy:s,onClick:()=>v(),children:(0,Jl.jsx)(Tt,{size:13})})]}),children:[(0,Jl.jsx)(Ee,{columns:4,metrics:[{id:`assistants`,label:b(`From assistants`,`ai-rank-suite`),hint:b(`Visits whose referrer names an AI assistant. A floor, not a total — many assistants strip the referrer entirely.`,`ai-rank-suite`),value:w.total.toLocaleString(),sub:S(b(`%s%% of all referred visits`,`ai-rank-suite`),w.share)},{id:`other`,label:b(`From other sites`,`ai-rank-suite`),hint:b(`Ordinary referral traffic, for scale.`,`ai-rank-suite`),value:w.other.toLocaleString()},{id:`visits`,label:b(`Visits`,`ai-rank-suite`),hint:b(`All visits in the selected period, straight from Matomo.`,`ai-rank-suite`),value:(r.totals?.visits||0).toLocaleString(),sub:S(b(`%s people`,`ai-rank-suite`),(r.totals?.visitors||0).toLocaleString())},{id:`depth`,label:b(`Pages per visit`,`ai-rank-suite`),value:r.totals?.visits>0?(r.totals.actions/r.totals.visits).toFixed(1):`—`,sub:S(b(`%s%% bounced`,`ai-rank-suite`),r.totals?.bounce||0)}]}),w.engines.length>0?(0,Jl.jsx)(`div`,{className:`mt-4`,children:(0,Jl.jsx)(Xe,{items:w.engines.map(e=>({label:e.name,value:e.visits})),max:Math.max(...w.engines.map(e=>e.visits)),color:`var(--ars-brand)`,format:e=>S(b(`%s visits`,`ai-rank-suite`),e.toLocaleString())})}):(0,Jl.jsx)(M,{tone:`warning`,children:b(`No visits from a named AI assistant in this period. That is normal early on — being cited takes weeks to turn into clicks, and many assistants strip the referrer entirely, so this number is a floor rather than a total.`,`ai-rank-suite`)}),r.series?.length>1&&(0,Jl.jsxs)(`div`,{className:`mt-4`,children:[(0,Jl.jsx)(`div`,{className:`t-overline mb-1`,children:b(`Visits per day`,`ai-rank-suite`)}),(0,Jl.jsx)(Ue,{data:r.series.map(e=>e.value),height:44,color:`var(--ars-brand)`})]})]}),r?.configured&&(r.channels||[]).length>0&&(0,Jl.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:[(0,Jl.jsx)(k,{title:b(`Where visits come from`,`ai-rank-suite`),subtitle:`Matomo's own channel grouping`,flush:!0,children:(0,Jl.jsx)(`div`,{className:`p-4`,children:(0,Jl.jsx)(Ye,{segments:r.channels.map((e,t)=>({label:e.label,value:e.visits,color:[`var(--ars-series-1)`,`var(--ars-series-2)`,`var(--ars-series-3)`,`var(--ars-series-4)`,`var(--ars-ink-3)`][t%5]}))})})}),(0,Jl.jsx)(k,{title:b(`Most visited pages`,`ai-rank-suite`),flush:!0,children:(0,Jl.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Jl.jsxs)(`table`,{className:`ars-table`,children:[(0,Jl.jsx)(`thead`,{children:(0,Jl.jsxs)(`tr`,{children:[(0,Jl.jsx)(`th`,{children:b(`Page`,`ai-rank-suite`)}),(0,Jl.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Views`,`ai-rank-suite`)})]})}),(0,Jl.jsx)(`tbody`,{children:(r.pages||[]).slice(0,10).map((e,t)=>(0,Jl.jsxs)(`tr`,{children:[(0,Jl.jsx)(`td`,{className:`truncate`,children:e.path}),(0,Jl.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.views.toLocaleString()})]},t))})]})})})]}),(0,Jl.jsxs)(k,{icon:(0,Jl.jsx)(xt,{size:16}),title:b(`Matomo connection`,`ai-rank-suite`),subtitle:b(`Your own Matomo — self-hosted or Matomo Cloud. Nothing is proxied anywhere.`,`ai-rank-suite`),action:(0,Jl.jsxs)(`div`,{className:`flex items-center gap-2`,children:[r?.configured&&(0,Jl.jsx)(j,{tone:`good`,children:b(`Connected`,`ai-rank-suite`)}),(0,Jl.jsx)(A,{busy:s||n,onClick:x,disabled:!h&&!l,children:b(`Save`,`ai-rank-suite`)})]}),children:[(0,Jl.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Jl.jsx)(Qe,{label:b(`Matomo URL`,`ai-rank-suite`),hint:b(`The root, e.g. https://analytics.example.com/ — not the path to index.php.`,`ai-rank-suite`),className:`sm:col-span-2`,children:(0,Jl.jsx)(`input`,{type:`url`,value:_.matomo_url||``,placeholder:`https://analytics.example.com/`,onChange:e=>y({matomo_url:e.target.value})})}),(0,Jl.jsx)(Qe,{label:b(`Site ID`,`ai-rank-suite`),hint:b(`The idSite number in Matomo, usually 1.`,`ai-rank-suite`),children:(0,Jl.jsx)(`input`,{type:`number`,min:`1`,value:_.matomo_site_id||``,onChange:e=>y({matomo_site_id:Number(e.target.value)})})}),(0,Jl.jsx)(Qe,{label:b(`API token`,`ai-rank-suite`),hint:r?.hint?S(b(`Stored (%s). Enter a new one to replace it.`,`ai-rank-suite`),r.hint):b(`Matomo → Administration → Personal → Security → Auth tokens. Stored encrypted; sent by POST, never in a URL.`,`ai-rank-suite`),children:(0,Jl.jsx)(`input`,{type:`password`,autoComplete:`off`,value:l,placeholder:r?.hint?`••••••••`:b(`Paste the token`,`ai-rank-suite`),onChange:e=>u(e.target.value)})})]}),(0,Jl.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap mt-3`,children:[(0,Jl.jsx)(A,{variant:`ghost`,busy:s,onClick:C,children:b(`Test the connection`,`ai-rank-suite`)}),d&&(0,Jl.jsxs)(Jl.Fragment,{children:[(0,Jl.jsx)(j,{tone:d.matches?`good`:`warning`,children:d.name||b(`Connected`,`ai-rank-suite`)}),!d.matches&&(0,Jl.jsx)(`span`,{className:`text-[12px]`,style:{color:`var(--ars-warning)`},children:S(b(`That Matomo site is set up for %s, not this one — the report would be somebody else’s traffic.`,`ai-rank-suite`),d.main_url||b(`another address`,`ai-rank-suite`))})]})]}),(0,Jl.jsxs)(`div`,{className:`grid gap-2 mt-4`,children:[(0,Jl.jsx)(Me,{checked:!!_.matomo_enabled,onChange:e=>y({matomo_enabled:e}),label:b(`Read reports from Matomo`,`ai-rank-suite`)}),(0,Jl.jsx)(Me,{checked:!!_.matomo_track,onChange:e=>y({matomo_track:e}),label:b(`Also add the tracking code to the site`,`ai-rank-suite`)}),_.matomo_track&&(0,Jl.jsxs)(`div`,{className:`ml-[48px] grid gap-2`,children:[(0,Jl.jsx)(Me,{checked:!!_.matomo_cookieless,onChange:e=>y({matomo_cookieless:e}),label:b(`Track without cookies`,`ai-rank-suite`)}),(0,Jl.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-2)`},children:b(`Cookieless is on by default. Matomo can measure without setting a cookie, and a site that chose Matomo over Google Analytics has usually chosen it for exactly that reason. Leave the tracking code off if Matomo is already installed by another plugin or by your theme — two snippets means every visit counted twice.`,`ai-rank-suite`)})]})]})]}),(0,Jl.jsxs)(ft,{title:b(`Why this number is a floor, not a total`,`ai-rank-suite`),children:[(0,Jl.jsx)(`p`,{children:b(`A visit is attributed to an assistant only when the browser sends a referrer naming it. Several assistants strip the referrer entirely, some open links in an in-app browser that sends nothing, and anyone who reads an answer and then types your name into a search box arrives as organic search. So the real influence of AI answers is always larger than this figure — treat it as the part you can prove.`,`ai-rank-suite`)}),(0,Jl.jsx)(`p`,{children:b(`The direction still matters more than the level. If this number is climbing month over month while your published pages are unchanged, the citations are working.`,`ai-rank-suite`)}),(0,Jl.jsxs)(`p`,{className:`flex items-center gap-1`,children:[(0,Jl.jsx)(`a`,{href:`https://matomo.org/faq/general/faq_114/`,target:`_blank`,rel:`noreferrer`,children:b(`How to create a Matomo auth token`,`ai-rank-suite`)}),(0,Jl.jsx)(wt,{size:10})]})]})]})}var ql,Jl,Yl=o((()=>{ql=u(f(),1),C(),O(),dt(),mt(),Vt(),Jl=_e()}));function Xl(){let{data:e,s:t,update:n,save:r,busy:i,saved:a,error:o}=Xa(`/settings/analytics`);if(!e)return(0,$l.jsx)(Ce,{error:o});let s=t.consent_region||`eu`;return(0,$l.jsxs)(`div`,{className:`grid gap-4`,children:[o&&(0,$l.jsx)(M,{tone:`serious`,children:o}),(0,$l.jsx)(k,{title:b(`GDPR / consent manager`,`ai-rank-suite`),subtitle:b(`Categories, regional behaviour and Google Consent Mode v2 — one banner for EU opt-in and US opt-out`,`ai-rank-suite`),action:(0,$l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[a&&(0,$l.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,$l.jsx)(Me,{checked:!!t.consent_enabled,onChange:e=>n({consent_enabled:e}),label:t.consent_enabled?b(`Banner on`,`ai-rank-suite`):b(`Banner off`,`ai-rank-suite`)})]}),children:(0,$l.jsxs)(`div`,{className:`grid gap-5 lg:grid-cols-[minmax(0,1.15fr)_minmax(0,1fr)] items-start`,children:[(0,$l.jsxs)(`div`,{className:`grid gap-4`,children:[(0,$l.jsx)(Qe,{label:b(`Legal posture`,`ai-rank-suite`),hint:b(`EU: nothing non-essential runs until the visitor opts in. US: tracking runs, a persistent “Do not sell or share” link lets visitors opt out (CCPA/CPRA). Auto: an EU/UK/CH language or CDN country header selects EU, everything else US — a proxy, not geolocation.`,`ai-rank-suite`),children:(0,$l.jsx)(Je,{value:s,onChange:e=>n({consent_region:e}),options:[{id:`eu`,label:b(`EU opt-in`,`ai-rank-suite`)},{id:`us`,label:b(`US opt-out`,`ai-rank-suite`)},{id:`auto`,label:b(`Auto by visitor`,`ai-rank-suite`)}]})}),(0,$l.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,$l.jsx)(Qe,{label:b(`Layout`,`ai-rank-suite`),children:(0,$l.jsx)(Je,{value:t.consent_layout||`card`,onChange:e=>n({consent_layout:e}),options:[{id:`card`,label:b(`Card`,`ai-rank-suite`)},{id:`bar`,label:b(`Bar`,`ai-rank-suite`)}]})}),(0,$l.jsx)(Qe,{label:b(`Position`,`ai-rank-suite`),children:(0,$l.jsx)(Je,{value:t.consent_position||`right`,onChange:e=>n({consent_position:e}),options:[{id:`left`,label:b(`Left`,`ai-rank-suite`)},{id:`right`,label:b(`Right`,`ai-rank-suite`)}]})}),(0,$l.jsx)(Qe,{label:b(`Theme`,`ai-rank-suite`),children:(0,$l.jsx)(Je,{value:t.consent_theme||`auto`,onChange:e=>n({consent_theme:e}),options:[{id:`auto`,label:b(`Auto`,`ai-rank-suite`)},{id:`light`,label:b(`Light`,`ai-rank-suite`)},{id:`dark`,label:b(`Dark`,`ai-rank-suite`)}]})})]}),(0,$l.jsxs)(`div`,{className:`grid gap-2.5 ars-r-md p-3.5`,style:{background:`var(--ars-surface-2)`},children:[(0,$l.jsx)(`div`,{className:`font-semibold text-[13px]`,children:b(`Categories & signals`,`ai-rank-suite`)}),(0,$l.jsx)(Me,{checked:!0,label:b(`Necessary — always on`,`ai-rank-suite`),disabled:!0,onChange:()=>{}}),(0,$l.jsx)(Me,{checked:!0,label:b(`Analytics — GA4, Matomo, Clarity`,`ai-rank-suite`),disabled:!0,onChange:()=>{}}),(0,$l.jsx)(Me,{checked:!!t.consent_marketing,onChange:e=>n({consent_marketing:e}),label:b(`Marketing — show a category for ad and remarketing pixels you add via snippets`,`ai-rank-suite`)}),(0,$l.jsx)(Me,{checked:!!t.consent_gcm,onChange:e=>n({consent_gcm:e}),label:b(`Google Consent Mode v2 — default denied under opt-in, updated live on choice, so GA4 keeps modelled data`,`ai-rank-suite`)}),(0,$l.jsx)(Me,{checked:!!t.consent_reopen,onChange:e=>n({consent_reopen:e}),label:b(`Persistent reopen control (🍪 button in EU, “Do not sell or share” link in US)`,`ai-rank-suite`)})]}),(0,$l.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,$l.jsx)(Qe,{label:b(`Title`,`ai-rank-suite`),children:(0,$l.jsx)(`input`,{type:`text`,value:t.consent_title||``,onChange:e=>n({consent_title:e.target.value})})}),(0,$l.jsx)(Qe,{label:b(`Privacy policy URL`,`ai-rank-suite`),hint:b(`Empty = WordPress' privacy page`,`ai-rank-suite`),children:(0,$l.jsx)(`input`,{type:`url`,placeholder:`https://…/privacy`,value:t.consent_policy||``,onChange:e=>n({consent_policy:e.target.value})})})]}),(0,$l.jsx)(Qe,{label:b(`Message`,`ai-rank-suite`),children:(0,$l.jsx)(`textarea`,{rows:3,value:t.consent_message||``,onChange:e=>n({consent_message:e.target.value})})}),(0,$l.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2 lg:grid-cols-3`,children:[[[`consent_accept`,b(`Accept button`,`ai-rank-suite`)],[`consent_reject`,b(`Reject button`,`ai-rank-suite`)],[`consent_save`,b(`Save button`,`ai-rank-suite`)],[`consent_manage`,b(`Manage button`,`ai-rank-suite`)],[`consent_dns`,b(`US opt-out link`,`ai-rank-suite`)]].map(([e,r])=>(0,$l.jsx)(Qe,{label:r,children:(0,$l.jsx)(`input`,{type:`text`,value:t[e]||``,onChange:t=>n({[e]:t.target.value})})},e)),(0,$l.jsx)(Qe,{label:b(`Remember choice for (days)`,`ai-rank-suite`),children:(0,$l.jsx)(`input`,{type:`number`,min:1,max:730,value:t.consent_expiry??180,onChange:e=>n({consent_expiry:Number(e.target.value)})})})]}),(0,$l.jsx)(`div`,{children:(0,$l.jsx)(A,{onClick:r,busy:i,children:b(`Save`,`ai-rank-suite`)})})]}),(0,$l.jsxs)(`div`,{className:`grid gap-2`,children:[(0,$l.jsxs)(`div`,{className:`t-caption`,children:[b(`Preview`,`ai-rank-suite`),` · `,b(s===`us`?`US opt-out`:s===`auto`?`Auto (EU shown)`:`EU opt-in`,`ai-rank-suite`)]}),(0,$l.jsx)(`div`,{className:`ars-r-lg p-6`,style:{background:t.consent_theme===`dark`?`#131318`:`var(--ars-canvas)`,minHeight:300,display:`flex`,alignItems:`flex-end`,justifyContent:t.consent_layout===`bar`?`stretch`:t.consent_position===`left`?`flex-start`:`flex-end`},children:(0,$l.jsxs)(`div`,{style:{background:t.consent_theme===`dark`?`#1c1c23`:`#fff`,color:t.consent_theme===`dark`?`#e9e9ef`:`#16161e`,border:`1px solid ${t.consent_theme===`dark`?`#34343f`:`#e4e5ea`}`,borderRadius:16,padding:`18px 18px 14px`,boxShadow:`0 12px 40px rgba(0,0,0,.22)`,width:t.consent_layout===`bar`?`100%`:340,maxWidth:`100%`},children:[(0,$l.jsx)(`div`,{style:{fontWeight:700,fontSize:15,marginBottom:4},children:t.consent_title||b(`We value your privacy`,`ai-rank-suite`)}),(0,$l.jsxs)(`div`,{style:{fontSize:12.5,opacity:.75,marginBottom:12},children:[t.consent_message||`…`,` `,(0,$l.jsx)(`span`,{style:{color:`var(--ars-brand)`,textDecoration:`underline`},children:b(`Privacy policy`,`ai-rank-suite`)})]}),(0,$l.jsxs)(`div`,{className:`flex gap-2 flex-wrap`,children:[(0,$l.jsx)(`span`,{className:`ars-btn ars-btn-primary`,style:{pointerEvents:`none`},children:t.consent_accept||b(`Accept all`,`ai-rank-suite`)}),(0,$l.jsx)(`span`,{className:`ars-btn ars-btn-ghost`,style:{pointerEvents:`none`},children:t.consent_reject||b(`Reject all`,`ai-rank-suite`)}),(0,$l.jsx)(`span`,{className:`ars-btn ars-btn-ghost`,style:{pointerEvents:`none`,borderColor:`transparent`,opacity:.7},children:t.consent_manage||b(`Manage`,`ai-rank-suite`)})]})]})}),s===`us`&&(0,$l.jsx)(`div`,{className:`t-caption`,children:S(b(`US mode also prints a persistent “%s” link.`,`ai-rank-suite`),t.consent_dns||b(`Do not sell or share my personal information`,`ai-rank-suite`))})]})]})}),(0,$l.jsx)(Zl,{s:t,update:n,save:r})]})}function Zl({s:e,update:t,save:n}){let[r,i]=(0,Ql.useState)(null),[a,o]=(0,Ql.useState)(``),[s,c]=(0,Ql.useState)(null),l=()=>D.get(`/consent/log`).then(i).catch(e=>c(e.message));(0,Ql.useEffect)(()=>{l()},[]);let u=async(e,t)=>{o(e),c(null);try{await t()}catch(e){c(e.message)}finally{o(``)}},d=Number(e.consent_version||1);return(0,$l.jsxs)(k,{title:b(`Proof of consent`,`ai-rank-suite`),subtitle:b(`An anonymous technical event log: what the banner reported, when, under which policy version. The endpoint that records it is public by necessity — the banner runs before any login — so treat this as an operational record, not as legal proof of consent.`,`ai-rank-suite`),action:(0,$l.jsx)(Me,{checked:e.consent_log!==!1,onChange:e=>{t({consent_log:e}),n({consent_log:e})},label:b(`Keep a record`,`ai-rank-suite`)}),children:[s&&(0,$l.jsx)(M,{tone:`serious`,children:s}),e.consent_log===!1?(0,$l.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`No record is kept. The banner still works and still gates the tags — but if anyone asks the site to demonstrate that a visitor agreed, there will be nothing to show.`,`ai-rank-suite`)}):r?r.total===0?(0,$l.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Nothing recorded yet. The first visitor who answers the banner appears here — the record is written on their choice, not on their visit.`,`ai-rank-suite`)}):(0,$l.jsxs)(`div`,{className:`grid gap-4`,children:[(0,$l.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-4`,children:[{label:b(`Decisions`,`ai-rank-suite`),value:r.total,tone:`var(--ars-ink)`},{label:b(`Accepted all`,`ai-rank-suite`),value:r.accepted,tone:`var(--ars-good)`},{label:b(`Rejected all`,`ai-rank-suite`),value:r.rejected,tone:`var(--ars-serious)`},{label:b(`Chose their own`,`ai-rank-suite`),value:r.custom,tone:`var(--ars-brand)`}].map(e=>(0,$l.jsxs)(`div`,{className:`ars-r-md px-3 py-2.5`,style:{background:`var(--ars-surface-2)`},children:[(0,$l.jsx)(`div`,{className:`t-num text-[19px] font-bold`,style:{color:e.tone},children:Number(e.value).toLocaleString()}),(0,$l.jsx)(`div`,{className:`t-caption`,children:e.label})]},e.label))}),(0,$l.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,$l.jsx)(j,{tone:r.rate>=50?`good`:`neutral`,children:S(b(`%s%% accepted everything`,`ai-rank-suite`),r.rate)}),(0,$l.jsx)(j,{tone:`neutral`,children:S(b(`%s allowed analytics`,`ai-rank-suite`),r.analytics.toLocaleString())}),r.marketing>0&&(0,$l.jsx)(j,{tone:`neutral`,children:S(b(`%s allowed marketing`,`ai-rank-suite`),r.marketing.toLocaleString())}),r.first_at&&(0,$l.jsx)(`span`,{className:`t-caption`,children:S(b(`since %s`,`ai-rank-suite`),r.first_at.slice(0,10))})]}),r.stale>0&&(0,$l.jsx)(M,{tone:`warning`,children:S(b(`%s of these were given under an older policy version. Those visitors are being asked again — their old answer no longer counts, which is the correct behaviour after the cookie policy changes.`,`ai-rank-suite`),r.stale.toLocaleString())})]}):(0,$l.jsx)(`span`,{className:`t-caption`,children:b(`Reading the record…`,`ai-rank-suite`)}),(0,$l.jsxs)(`div`,{className:`grid gap-3 mt-4 pt-4`,style:{borderTop:`1px solid var(--ars-line)`},children:[(0,$l.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,$l.jsxs)(`div`,{className:`min-w-0`,children:[(0,$l.jsx)(`div`,{className:`font-semibold text-[13px]`,children:S(b(`Policy version %d`,`ai-rank-suite`),d)}),(0,$l.jsx)(`div`,{className:`t-caption`,children:b(`Raise this after changing the cookie policy or adding a tag. Everyone who agreed to the old text is asked again; everyone else is left alone.`,`ai-rank-suite`)})]}),(0,$l.jsx)(A,{variant:`ghost`,busy:a===`bump`,onClick:()=>u(`bump`,async()=>{let e=d+1;t({consent_version:e}),await n({consent_version:e}),await l()}),children:b(`Ask everyone again`,`ai-rank-suite`)})]}),(0,$l.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,$l.jsx)(A,{variant:`ghost`,busy:a===`csv`,onClick:()=>u(`csv`,async()=>{let e=[],t=0;for(let n=0;n<2e3;n++){let n=await D.get(`/consent/log/csv?after=${t}&per_page=2000`);if(e.push(n.csv||``),n.next===null||n.next===void 0)break;t=n.next}let n=URL.createObjectURL(new Blob(e,{type:`text/csv`})),r=document.createElement(`a`);r.href=n,r.download=`consent-record.csv`,r.click(),URL.revokeObjectURL(n)}),children:b(`Export the record (CSV)`,`ai-rank-suite`)}),(0,$l.jsx)(A,{variant:`ghost`,busy:a===`clear`,onClick:()=>{window.confirm(b(`Delete every recorded decision? The log cannot be rebuilt.`,`ai-rank-suite`))&&u(`clear`,async()=>i(await D.del(`/consent/log`)))},children:b(`Delete the record`,`ai-rank-suite`)}),(0,$l.jsx)(`span`,{className:`t-caption`,children:S(b(`Kept for %s days, then deleted automatically.`,`ai-rank-suite`),Number(e.consent_log_days||365).toLocaleString())})]})]})]})}var Ql,$l,eu=o((()=>{Ql=u(f(),1),C(),Qa(),O(),dt(),$l=_e()})),tu=c({default:()=>ou});function nu(){let[e,t]=(0,lu.useState)(null),[n,r]=(0,lu.useState)(null),[i,a]=(0,lu.useState)(null),[o,s]=(0,lu.useState)(28),[c,l]=(0,lu.useState)(!1),[u,d]=(0,lu.useState)(!1),[f,p]=(0,lu.useState)(null),[m,h]=(0,lu.useState)(null),[g,_]=(0,lu.useState)(!1);if((0,lu.useEffect)(()=>{D.get(`/settings/analytics`).then(t).catch(e=>p(e.message))},[]),(0,lu.useEffect)(()=>{e?.settings?.property_id&&(r(null),D.get(`/analytics/report?days=${o}`).then(r).catch(e=>p(e.message)))},[e?.settings?.property_id,o]),!e)return(0,X.jsx)(Ce,{error:f});let v=e.settings,y=n=>t({...e,settings:{...v,...n}}),x=async()=>{l(!0),p(null);try{t(await D.put(`/settings/analytics`,v)),d(!0),setTimeout(()=>d(!1),2200)}catch(e){p(e.message)}finally{l(!1)}},C=async()=>{l(!0),p(null);try{let e=await D.get(`/analytics/properties`);a(e.properties)}catch(e){p(e.message)}finally{l(!1)}},w=async()=>{l(!0),p(null),h(null);try{let e=await D.post(`/gsc/auto-configure`,{});h(e),e.ga4_property&&(t(await D.get(`/settings/analytics`)),_(!1))}catch(e){p(e.message)}finally{l(!1)}},T=async()=>{l(!0),p(null);try{let e=``;try{e=(await D.get(`/gsc/signin-url`)).url||``}catch{e=(await D.get(`/gsc/connect-url`)).url||``}if(!e)throw Error(b(`Google sign-in is not available on this site.`,`ai-rank-suite`));window.location.href=e}catch(e){p(e.message),l(!1)}},E=e=>e>=1e4?`${(e/1e3).toFixed(1)}k`:String(e);return(0,X.jsxs)(`div`,{className:`grid gap-4`,children:[f&&(0,X.jsx)(M,{tone:`serious`,children:f}),n&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`div`,{className:`flex justify-end`,children:(0,X.jsx)(Ie,{tabs:[{id:7,label:b(`7 days`,`ai-rank-suite`)},{id:28,label:b(`28 days`,`ai-rank-suite`)},{id:90,label:b(`90 days`,`ai-rank-suite`)}],active:o,onChange:s})}),(0,X.jsx)(Ee,{columns:4,metrics:[{id:`users`,label:b(`Users`,`ai-rank-suite`),hint:b(`Distinct people, as GA4 counts them, in the reporting period.`,`ai-rank-suite`),value:n.totals.users==null?`—`:E(n.totals.users)},{id:`sessions`,label:b(`Sessions`,`ai-rank-suite`),hint:b(`Visits — one person coming back twice counts twice here.`,`ai-rank-suite`),value:n.totals.sessions==null?`—`:E(n.totals.sessions)},{id:`pageviews`,label:b(`Pageviews`,`ai-rank-suite`),hint:b(`Every page load, including repeat views of the same page.`,`ai-rank-suite`),value:n.totals.pageviews==null?`—`:E(n.totals.pageviews)},{id:`engagement`,label:b(`Engagement rate`,`ai-rank-suite`),hint:b(`Sessions that lasted, converted, or viewed more than one page — GA4’s replacement for bounce rate.`,`ai-rank-suite`),value:n.totals.engagement==null?`—`:n.totals.engagement,unit:n.totals.engagement==null?``:`%`}]}),(0,X.jsx)(k,{title:b(`Users over time`,`ai-rank-suite`),children:(0,X.jsx)(Le,{label:b(`Active users`,`ai-rank-suite`),color:`var(--ars-series-1)`,data:n.series})}),n.pages.length>0&&(0,X.jsx)(k,{title:b(`Top pages`,`ai-rank-suite`),children:(0,X.jsx)(`div`,{className:`ars-table-wrap`,children:(0,X.jsxs)(`table`,{className:`ars-table`,children:[(0,X.jsx)(`thead`,{children:(0,X.jsxs)(`tr`,{children:[(0,X.jsx)(`th`,{children:b(`Path`,`ai-rank-suite`)}),(0,X.jsx)(`th`,{className:`is-num`,children:b(`Pageviews`,`ai-rank-suite`)}),(0,X.jsx)(`th`,{className:`is-num`,children:b(`Users`,`ai-rank-suite`)})]})}),(0,X.jsx)(`tbody`,{children:n.pages.map(e=>(0,X.jsxs)(`tr`,{children:[(0,X.jsx)(`td`,{className:`ars-mono`,style:{maxWidth:340},title:e.path,children:(0,X.jsx)(`span`,{className:`ars-url`,children:e.path})}),(0,X.jsx)(`td`,{className:`is-num`,children:e.pageviews}),(0,X.jsx)(`td`,{className:`is-num`,children:e.users})]},e.path))})]})})})]}),(0,X.jsx)(Oe,{title:b(`Google Analytics settings`,`ai-rank-suite`),note:v.enabled?v.measurement_id||b(`Tracking on`,`ai-rank-suite`):b(`Tracking off`,`ai-rank-suite`),defaultOpen:!n,children:(0,X.jsx)(k,{title:b(`Google Analytics 4`,`ai-rank-suite`),subtitle:b(`Adds the tracking tag and pulls reports through your existing Google connection`,`ai-rank-suite`),action:(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[u&&(0,X.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,X.jsx)(Me,{checked:!!v.enabled,onChange:e=>y({enabled:e}),label:v.enabled?b(`Tracking on`,`ai-rank-suite`):b(`Tracking off`,`ai-rank-suite`)})]}),children:(0,X.jsxs)(`div`,{className:`grid gap-4`,children:[e.connected?v.property_id?(0,X.jsxs)(`div`,{className:`ars-connect is-good`,children:[(0,X.jsxs)(`div`,{className:`min-w-0`,children:[(0,X.jsx)(`div`,{className:`font-semibold text-[13.5px]`,children:S(b(`Connected to property %s`,`ai-rank-suite`),v.property_id)}),(0,X.jsx)(`p`,{className:`m-0 t-caption`,children:v.measurement_id?S(b(`Reports read through your Google sign-in. Tracking tag: %s`,`ai-rank-suite`),v.measurement_id):b(`Reports read through your Google sign-in. No tracking tag set — reporting works without one.`,`ai-rank-suite`)})]}),(0,X.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(A,{variant:`ghost`,busy:c,onClick:w,children:b(`Re-detect`,`ai-rank-suite`)}),(0,X.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>_(e=>!e),children:b(g?`Hide IDs`:`Change IDs`,`ai-rank-suite`)})]})]}):(0,X.jsxs)(`div`,{className:`ars-connect`,children:[(0,X.jsxs)(`div`,{className:`min-w-0`,children:[(0,X.jsx)(`div`,{className:`font-semibold text-[13.5px]`,children:b(`Google is connected — no property picked yet`,`ai-rank-suite`)}),(0,X.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Matches your domain against the data streams in your Google account and saves the match.`,`ai-rank-suite`)})]}),(0,X.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(A,{variant:`primary`,busy:c,onClick:w,children:b(`Find my property`,`ai-rank-suite`)}),(0,X.jsx)(A,{variant:`ghost`,busy:c,onClick:C,children:b(`List all`,`ai-rank-suite`)})]})]}):(0,X.jsxs)(`div`,{className:`ars-connect`,children:[(0,X.jsxs)(`div`,{className:`min-w-0`,children:[(0,X.jsx)(`div`,{className:`font-semibold text-[13.5px]`,children:b(`Not connected to Google`,`ai-rank-suite`)}),(0,X.jsx)(`p`,{className:`m-0 t-caption`,children:b(`One sign-in covers Search Console and Analytics. Nothing is typed in by hand.`,`ai-rank-suite`)})]}),(0,X.jsx)(A,{variant:`primary`,busy:c,onClick:T,children:b(`Sign in with Google`,`ai-rank-suite`)})]}),(g||e.connected&&!v.property_id&&i)&&(0,X.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Measurement ID`,`ai-rank-suite`)}),(0,X.jsx)(`input`,{type:`text`,placeholder:b(`G-XXXXXXXXXX`,`ai-rank-suite`),value:v.measurement_id,onChange:e=>y({measurement_id:e.target.value})})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Property ID (for reports)`,`ai-rank-suite`)}),(0,X.jsx)(`input`,{type:`text`,placeholder:`123456789`,value:v.property_id,onChange:e=>y({property_id:e.target.value})})]})]}),m&&!m.ga4_property&&(0,X.jsx)(M,{tone:`warning`,children:b(`No property in this Google account points at this site. Use “List all” and pick one, or create a web data stream for this domain in Analytics first.`,`ai-rank-suite`)}),i&&(0,X.jsxs)(`div`,{className:`grid gap-1.5`,children:[i.length===0&&(0,X.jsx)(`p`,{className:`m-0 text-[13px]`,children:b(`No GA4 properties found for this account.`,`ai-rank-suite`)}),i.map(e=>(0,X.jsxs)(A,{variant:`ghost`,onClick:()=>y({property_id:e.id}),children:[e.name,` — `,e.id]},e.id))]}),(0,X.jsx)(Me,{checked:!!v.anonymize_ip,onChange:e=>y({anonymize_ip:e}),label:b(`Anonymize IP addresses`,`ai-rank-suite`)}),(0,X.jsx)(Me,{checked:!!v.exclude_loggedin,onChange:e=>y({exclude_loggedin:e}),label:b(`Do not track logged-in users of these roles`,`ai-rank-suite`)}),v.exclude_loggedin&&(0,X.jsx)(`div`,{className:`flex gap-x-4 gap-y-2 flex-wrap text-[12.5px] ars-r-sm px-3 py-2.5 ml-[52px]`,style:{background:`var(--ars-surface-2)`},children:e.roles.map(e=>(0,X.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,X.jsx)(`input`,{type:`checkbox`,checked:v.exclude_roles.includes(e.slug),onChange:t=>y({exclude_roles:t.target.checked?[...v.exclude_roles,e.slug]:v.exclude_roles.filter(t=>t!==e.slug)})}),e.name]},e.slug))}),(0,X.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Consent for all analytics tags lives under the “GDPR / Consent” tab — categories, EU/US behaviour and Google Consent Mode v2.`,`ai-rank-suite`)}),(0,X.jsx)(`div`,{children:(0,X.jsx)(A,{onClick:x,busy:c,children:b(`Save`,`ai-rank-suite`)})})]})})})]})}function ru(){let[e,t]=(0,lu.useState)(null),[n,r]=(0,lu.useState)(!1),[i,a]=(0,lu.useState)(!1),[o,s]=(0,lu.useState)(null),[c,l]=(0,lu.useState)(null);if((0,lu.useEffect)(()=>{D.get(`/settings/reports`).then(t).catch(e=>l(e.message))},[]),!e)return(0,X.jsx)(Ce,{error:c});let u=e.settings,d=n=>t({...e,settings:{...u,...n}});return(0,X.jsxs)(`div`,{className:`ars-page`,children:[c&&(0,X.jsx)(M,{tone:`serious`,children:c}),(0,X.jsx)(k,{title:b(`Email reports`,`ai-rank-suite`),subtitle:b(`Scores, search performance and keyword movement — straight to your inbox or your client's`,`ai-rank-suite`),action:(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[i&&(0,X.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,X.jsx)(Me,{checked:!!u.enabled,onChange:e=>d({enabled:e}),label:b(`Enabled`,`ai-rank-suite`)})]}),children:(0,X.jsxs)(`div`,{className:`grid gap-4`,children:[(0,X.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Frequency`,`ai-rank-suite`)}),(0,X.jsxs)(`select`,{value:u.frequency,onChange:e=>d({frequency:e.target.value}),children:[(0,X.jsx)(`option`,{value:`weekly`,children:b(`Weekly`,`ai-rank-suite`)}),(0,X.jsx)(`option`,{value:`monthly`,children:b(`Monthly (on the 1st)`,`ai-rank-suite`)})]})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Recipients`,`ai-rank-suite`)}),(0,X.jsx)(`input`,{type:`text`,placeholder:b(`you@example.com, client@example.com`,`ai-rank-suite`),value:u.recipients,onChange:e=>d({recipients:e.target.value})})]})]}),(0,X.jsxs)(`div`,{className:`ars-r-md p-3 grid gap-3`,style:{background:`var(--ars-surface-2)`},children:[(0,X.jsx)(`div`,{className:`font-semibold text-[13px]`,children:b(`White label`,`ai-rank-suite`)}),(0,X.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Brand name`,`ai-rank-suite`)}),(0,X.jsx)(`input`,{type:`text`,value:u.brand_name,onChange:e=>d({brand_name:e.target.value})})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Sender name`,`ai-rank-suite`)}),(0,X.jsx)(`input`,{type:`text`,value:u.from_name,onChange:e=>d({from_name:e.target.value})})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Logo URL`,`ai-rank-suite`)}),(0,X.jsx)(`input`,{type:`text`,value:u.logo_url,onChange:e=>d({logo_url:e.target.value})})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Accent color`,`ai-rank-suite`)}),(0,X.jsx)(`input`,{type:`text`,value:u.accent,onChange:e=>d({accent:e.target.value})})]})]}),(0,X.jsx)(Me,{checked:!!u.white_label,onChange:e=>d({white_label:e}),label:b(`Replace the plugin footer with your brand`,`ai-rank-suite`)})]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,X.jsx)(A,{onClick:async()=>{r(!0),l(null);try{t(await D.put(`/settings/reports`,u)),a(!0),setTimeout(()=>a(!1),2200)}catch(e){l(e.message)}finally{r(!1)}},busy:n,children:b(`Save`,`ai-rank-suite`)}),(0,X.jsx)(A,{variant:`ghost`,onClick:async()=>{r(!0),l(null);try{let e=await D.post(`/reports/send`);s(e)}catch(e){l(e.message)}finally{r(!1)}},busy:n,children:b(`Send test report now`,`ai-rank-suite`)}),(0,X.jsx)(`a`,{href:`${window.airanksuiteData.restUrl}/reports/preview?_wpnonce=${window.airanksuiteData.nonce}`,target:`_blank`,rel:`noreferrer`,className:`text-[12.5px]`,children:b(`Preview data ↗`,`ai-rank-suite`)}),o&&(0,X.jsxs)(j,{tone:`good`,children:[`✓ `,S(x(`Sent to %d recipient`,`Sent to %d recipients`,o.sent,`ai-rank-suite`),o.sent)]})]}),e.next_run>0&&(0,X.jsxs)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[S(b(`Next report: %s`,`ai-rank-suite`),new Date(e.next_run*1e3).toLocaleString()),e.sent_at>0&&S(b(` · last sent %s`,`ai-rank-suite`),new Date(e.sent_at*1e3).toLocaleString())]})]})})]})}function iu(){let[e,t]=(0,lu.useState)(null),[n,r]=(0,lu.useState)(``),[i,a]=(0,lu.useState)(!1),[o,s]=(0,lu.useState)(!1),[c,l]=(0,lu.useState)(null),[u,d]=(0,lu.useState)(!1);if((0,lu.useEffect)(()=>{D.get(`/settings/pagespeed`).then(t).catch(e=>l(e.message))},[]),!e)return(0,X.jsx)(Ce,{error:c});let f=async()=>{a(!0),l(null);try{t(await D.put(`/settings/pagespeed`,{strategy:e.settings.strategy,api_key:n})),r(``),s(!0),setTimeout(()=>s(!1),2200)}catch(e){l(e.message)}finally{a(!1)}},p=async()=>{d(!0),l(null);try{let n=await D.post(`/pagespeed/home`,{});t({...e,home:n.result})}catch(e){l(e.message)}finally{d(!1)}},m=e.home;return(0,X.jsxs)(`div`,{className:`ars-page`,children:[c&&(0,X.jsx)(M,{tone:`serious`,children:c}),(0,X.jsx)(k,{title:b(`PageSpeed Insights`,`ai-rank-suite`),subtitle:b(`Core Web Vitals, measured by Google on your live front page`,`ai-rank-suite`),action:(0,X.jsx)(A,{variant:`primary`,busy:u,onClick:p,children:b(`Measure now`,`ai-rank-suite`)}),children:m?(0,X.jsxs)(`div`,{className:`grid gap-3`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-4 flex-wrap`,children:[(0,X.jsx)(`span`,{className:`ars-scorerow-score is-${(e=>e>=90?`good`:e>=50?`warn`:`bad`)(m.score??0)}`,style:{fontSize:22,minWidth:64,padding:`10px 0`},children:m.score??`—`}),(0,X.jsxs)(`span`,{className:`min-w-0`,children:[(0,X.jsx)(`span`,{className:`block font-semibold text-[13.5px]`,children:S(b(`Performance score, measured as %s`,`ai-rank-suite`),m.strategy===`desktop`?b(`desktop`,`ai-rank-suite`):b(`mobile`,`ai-rank-suite`))}),(0,X.jsx)(`span`,{className:`t-caption`,children:e.home_url})]})]}),(0,X.jsx)(Ee,{columns:4,metrics:[{id:`lcp`,label:`LCP`,hint:b(`Largest Contentful Paint — when the main thing on the page has drawn. Google wants under 2.5s.`,`ai-rank-suite`),value:m.lcp||`—`},{id:`cls`,label:`CLS`,hint:b(`Cumulative Layout Shift — how much the page jumps while it loads. Under 0.1.`,`ai-rank-suite`),value:m.cls||`—`},{id:`tbt`,label:`TBT`,hint:b(`Total Blocking Time — how long the page ignores a tap while scripts run.`,`ai-rank-suite`),value:m.tbt||`—`},{id:`fcp`,label:`FCP`,hint:b(`First Contentful Paint — when the first text or image appears.`,`ai-rank-suite`),value:m.fcp||`—`}]})]}):(0,X.jsx)(`p`,{className:`ars-empty-band`,children:b(`Nothing measured yet. “Measure now” asks Google to load your front page and report what a visitor would wait for.`,`ai-rank-suite`)})}),(0,X.jsx)(k,{title:b(`Settings`,`ai-rank-suite`),subtitle:b(`How the measurement runs, and the key it runs on`,`ai-rank-suite`),action:o&&(0,X.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),children:(0,X.jsxs)(`div`,{className:`grid gap-3`,children:[(0,X.jsxs)(`div`,{className:`sm:max-w-[260px]`,children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Measure as`,`ai-rank-suite`)}),(0,X.jsxs)(`select`,{value:e.settings.strategy,onChange:n=>t({...e,settings:{...e.settings,strategy:n.target.value}}),children:[(0,X.jsx)(`option`,{value:`mobile`,children:b(`Mobile (what Google ranks on)`,`ai-rank-suite`)}),(0,X.jsx)(`option`,{value:`desktop`,children:b(`Desktop`,`ai-rank-suite`)})]})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsxs)(`label`,{className:`block font-medium mb-1`,children:[b(`Google API key (optional)`,`ai-rank-suite`),` `,e.has_key&&(0,X.jsxs)(j,{tone:`good`,children:[`✓ `,b(`stored`,`ai-rank-suite`)]})]}),(0,X.jsx)(`input`,{type:`password`,placeholder:e.has_key?b(`•••••••• (leave empty to keep)`,`ai-rank-suite`):b(`Raises the request quota`,`ai-rank-suite`),value:n,onChange:e=>r(e.target.value)})]}),(0,X.jsx)(`div`,{children:(0,X.jsx)(A,{onClick:f,busy:i,children:b(`Save`,`ai-rank-suite`)})}),(0,X.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Works without a key at low volume. Each measurement takes up to a minute — Google runs a real Lighthouse test.`,`ai-rank-suite`)})]})})]})}function au(){let[e,t]=(0,lu.useState)(null),[n,r]=(0,lu.useState)(null),[i,a]=(0,lu.useState)(!1),[o,s]=(0,lu.useState)(null);if((0,lu.useEffect)(()=>{D.get(`/settings/analytics`).then(t).catch(e=>s(e.message))},[]),!e)return(0,X.jsx)(Ce,{error:o});let c=e.settings||{},l=(c.clarity_id||``).trim(),u=n===null?c.clarity_id||``:n,d=async e=>{a(!0),s(null);try{t(await D.put(`/settings/analytics`,{...c,...e}))}catch(e){s(e.message)}finally{a(!1)}};return(0,X.jsxs)(`div`,{className:`grid gap-4`,children:[o&&(0,X.jsx)(M,{tone:`serious`,children:o}),(0,X.jsx)(k,{title:b(`Microsoft Clarity`,`ai-rank-suite`),subtitle:b(`Free heatmaps and session recordings. No sampling, no row limit, and it does not count against any Google quota.`,`ai-rank-suite`),action:l?(0,X.jsx)(j,{tone:`good`,children:b(`Tag is live`,`ai-rank-suite`)}):(0,X.jsx)(j,{tone:`neutral`,children:b(`Not set up`,`ai-rank-suite`)}),children:(0,X.jsxs)(`div`,{className:`grid gap-3 max-w-[560px]`,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,htmlFor:`airanksuite-clarity-id`,children:b(`Project ID`,`ai-rank-suite`)}),(0,X.jsxs)(`div`,{className:`flex gap-2`,children:[(0,X.jsx)(`input`,{id:`airanksuite-clarity-id`,type:`text`,placeholder:`abcd1234ef`,value:u,onChange:e=>r(e.target.value),style:{flex:1}}),(0,X.jsx)(A,{busy:i,disabled:n===null||n.trim()===(c.clarity_id||``).trim(),onClick:async()=>{await d({clarity_id:n.trim()}),r(null)},children:b(`Save`,`ai-rank-suite`)}),n!==null&&(0,X.jsx)(A,{variant:`ghost`,onClick:()=>r(null),children:b(`Cancel`,`ai-rank-suite`)})]}),(0,X.jsx)(`div`,{className:`text-[11.5px] mt-1.5`,style:{color:`var(--ars-ink-3)`},children:b(`In Clarity: Settings → Overview → Project ID. Ten characters, letters and digits.`,`ai-rank-suite`)})]}),l&&(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,X.jsx)(`a`,{className:`ars-btn ars-btn-ghost`,href:`https://clarity.microsoft.com/projects/view/${encodeURIComponent(l)}/dashboard`,target:`_blank`,rel:`noreferrer noopener`,children:b(`Open this project in Clarity ↗`,`ai-rank-suite`)}),(0,X.jsx)(A,{variant:`ghost`,onClick:async()=>{await d({clarity_id:``}),r(null)},children:b(`Remove`,`ai-rank-suite`)})]})]})}),(0,X.jsx)(k,{title:b(`What the tag does on your site`,`ai-rank-suite`),subtitle:b(`The same rules the other analytics tags follow`,`ai-rank-suite`),children:(0,X.jsxs)(`ul`,{className:`grid gap-2 m-0 pl-4 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:[(0,X.jsx)(`li`,{children:b(`Loads only for visitors — logged-in users and the excluded roles never see it, so your own clicks stay out of the recordings.`,`ai-rank-suite`)}),(0,X.jsx)(`li`,{children:b(`Waits for consent where consent is required: with the cookie bar on, the tag is held until the visitor accepts the analytics category.`,`ai-rank-suite`)}),(0,X.jsx)(`li`,{children:b(`Loads asynchronously from clarity.ms and blocks nothing on the page.`,`ai-rank-suite`)}),(0,X.jsx)(`li`,{children:b(`Records interactions, not form values — Clarity masks input content by default.`,`ai-rank-suite`)})]})})]})}function ou({tab:e=`ga4`,onTab:t}){let n={ga4:nu,matomo:cu,clarity:au,consent:Xl,reports:ru,speed:iu}[e]||nu;return(0,X.jsxs)(`div`,{className:`grid gap-4`,children:[(()=>{let{tabs:n,active:r}=mp([{id:`ga4`,label:b(`Google Analytics`,`ai-rank-suite`)},{id:`matomo`,label:b(`Matomo`,`ai-rank-suite`)},{id:`clarity`,label:b(`Clarity`,`ai-rank-suite`)},{id:`consent`,label:b(`GDPR / Consent`,`ai-rank-suite`)},{id:`reports`,label:b(`Reports`,`ai-rank-suite`),needs:`reports`},{id:`speed`,label:b(`PageSpeed`,`ai-rank-suite`)}],e);return r!==e&&setTimeout(()=>t(r),0),(0,X.jsx)(Ie,{tabs:n,active:r,onChange:t})})(),(0,X.jsx)(n,{}),(0,X.jsx)(su,{})]})}function su(){let[e,t]=(0,lu.useState)(null),[n,r]=(0,lu.useState)(``),[i,a]=(0,lu.useState)(!1),[o,s]=(0,lu.useState)(!1),[c,l]=(0,lu.useState)(null),[u,d]=(0,lu.useState)(null);if((0,lu.useEffect)(()=>{D.get(`/analytics/database`).then(e=>{t(e),r(e.retention_days)}).catch(()=>{})},[]),!e)return(0,X.jsx)(rt,{blocks:3,label:b(`Loading analytics`,`ai-rank-suite`)});let f=e.tables.find(e=>e.key===`ranks`),p=e.tables.find(e=>e.key===`mentions`),m=e=>e??`—`,h=e=>e==null?`—`:e>=1048576?`${(e/1048576).toFixed(1)} MB`:`${Math.max(1,Math.round(e/1024))} KB`,g=async e=>{a(!0),d(null);try{await e()}catch(e){d(e.message)}finally{a(!1)}},_=()=>g(async()=>{let e=Math.min(365,Math.max(30,Number(n)||90)),i=await D.put(`/analytics/database`,{retention_days:e});t(i),r(i.retention_days),s(!0),setTimeout(()=>s(!1),2200)}),v=()=>g(async()=>{l(null);let e=await D.post(`/analytics/database/refresh`);t(e),e.sync_error&&l(e.sync_error)}),y=e=>g(async()=>t(await D.post(`/analytics/database/purge`,{target:e})));return(0,X.jsx)(Oe,{title:b(`Local data`,`ai-rank-suite`),note:S(x(`%d day kept`,`%d days kept`,e.retention_days,`ai-rank-suite`),e.retention_days),defaultOpen:!1,children:(0,X.jsxs)(`div`,{className:`grid gap-4`,children:[u&&(0,X.jsx)(M,{tone:`serious`,children:u}),c&&(0,X.jsx)(M,{tone:`warning`,children:S(b(`Caches were cleared, but the rank sync reported: %s`,`ai-rank-suite`),c)}),(0,X.jsx)(Ee,{columns:3,metrics:[{id:`ranks`,label:b(`Rank snapshots`,`ai-rank-suite`),hint:b(`One row per tracked keyword per day, pulled from your Search Console data.`,`ai-rank-suite`),value:m(f?.rows),sub:f?S(b(`%1$s days · %2$s`,`ai-rank-suite`),m(f.days),h(f.bytes)):`—`},{id:`mentions`,label:b(`Answer simulation runs`,`ai-rank-suite`),hint:b(`Kept for good: a past AI answer cannot be queried again for a past date, so this history can never be rebuilt — and is never deleted.`,`ai-rank-suite`),value:m(p?.rows),sub:p?h(p.bytes):`—`},{id:`cache`,label:b(`Cached reports`,`ai-rank-suite`),hint:b(`Stored copies of Google and AI responses. Safe to clear — each one rebuilds on its next view.`,`ai-rank-suite`),value:m(e.cache_entries)}]}),(0,X.jsxs)(`div`,{className:`flex items-end gap-2 flex-wrap`,children:[(0,X.jsxs)(`div`,{className:`sm:max-w-[160px]`,children:[(0,X.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Keep snapshots for (days)`,`ai-rank-suite`)}),(0,X.jsx)(`input`,{type:`number`,min:30,max:365,value:n,onChange:e=>r(e.target.value)})]}),(0,X.jsx)(A,{onClick:_,busy:i,children:b(`Save`,`ai-rank-suite`)}),o&&(0,X.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]})]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,X.jsx)(A,{onClick:v,busy:i,children:b(`Update data now`,`ai-rank-suite`)}),(0,X.jsx)(A,{variant:`ghost`,busy:i,onClick:()=>window.confirm(b(`Delete every stored rank snapshot? Your keyword list stays, but the position history is gone for good.`,`ai-rank-suite`))&&y(`ranks`),children:b(`Delete rank snapshots`,`ai-rank-suite`)}),(0,X.jsx)(A,{variant:`ghost`,busy:i,onClick:()=>y(`cache`),children:b(`Clear cached reports`,`ai-rank-suite`)})]})]})})}function cu(){let[e,t]=(0,lu.useState)(null),[n,r]=(0,lu.useState)(!1),[i,a]=(0,lu.useState)(null);return(0,lu.useEffect)(()=>{D.get(`/settings/analytics`).then(e=>t(e.settings)).catch(e=>a(e.message))},[]),i?(0,X.jsx)(M,{tone:`serious`,children:i}):e?(0,X.jsx)(Kl,{settings:e,onSave:async n=>{r(!0);try{let r=await D.put(`/settings/analytics`,{...e,...n});t(r.settings)}finally{r(!1)}},saving:n}):(0,X.jsx)(k,{children:b(`Loading…`,`ai-rank-suite`)})}var lu,X,uu=o((()=>{lu=u(f(),1),C(),O(),Ap(),dt(),Yl(),eu(),X=_e()})),du=c({default:()=>pu});function fu({status:e}){return e===0?(0,hu.jsx)(j,{tone:`serious`,children:`unreachable`}):e>=500||e>=400?(0,hu.jsx)(j,{tone:`serious`,children:e}):e>=300?(0,hu.jsxs)(j,{tone:`warning`,children:[e,` redirect`]}):(0,hu.jsx)(j,{tone:`good`,children:e})}function pu(){let[e,t]=(0,mu.useState)(null),[n,r]=(0,mu.useState)(!1),i=(0,mu.useRef)(null),a=e=>{d.setFilter(`status`,e),window.requestAnimationFrame(()=>{i.current?.scrollIntoView({behavior:`smooth`,block:`start`})})},[o,s]=(0,mu.useState)(null),[c,l]=(0,mu.useState)(null),u=(0,mu.useRef)(!1),d=Vs(`/linkcheck/links`,{orderby:`status`,order:`desc`,filters:{status:`issues`}}),f=()=>D.get(`/linkcheck/report`).then(t).catch(e=>s(e.message));(0,mu.useEffect)(()=>(f(),()=>{u.current=!0}),[]);let p=async()=>{r(!0),s(null),u.current=!1;try{await D.post(`/linkcheck/start`);let e=await D.post(`/linkcheck/tick`);for(;e.state===`running`&&!u.current;)(e.busy||e.error)&&await new Promise(e=>setTimeout(e,2e3)),e=await D.post(`/linkcheck/tick`),(e.checked||0)%24<8&&await f(),t(t=>t&&{...t,job:e});await f(),d.refresh()}catch(e){s(e.message)}finally{r(!1)}},m=async e=>{l(e);try{t(await D.post(`/linkcheck/recheck`,{url:e})),d.refresh()}catch(e){s(e.message)}finally{l(null)}};if(!e)return(0,hu.jsx)(Ce,{error:o});let{totals:h,job:g}=e,_=h.broken+h.unreachable,v=e.by_destination||[],y=e.hosts||[],C=e=>{try{let t=new URL(e,window.location.origin);return t.pathname+t.search}catch{return e}},w=e=>{window.location.hash=`/links/redirects?from=${encodeURIComponent(C(e))}`},T=!e?.snapshot||h.total===0?null:_>0?{tone:`bad`,text:S(x(`%1$s of %2$s links is broken.`,`%1$s of %2$s links are broken.`,_,`ai-rank-suite`),_.toLocaleString(),h.total.toLocaleString())+(v.length?` `+S(x(`%s distinct destination.`,`%s distinct destinations.`,v.length,`ai-rank-suite`),v.length===20?`20+`:v.length):``),why:b(`A dead link is a trust signal pointing the wrong way, for readers and for crawlers. Fix by destination: one redirect or one edited URL clears every page that points there.`,`ai-rank-suite`),action:b(`Show broken links`,`ai-rank-suite`),onAction:()=>a(`broken`)}:h.redirected>0?{tone:`warning`,text:S(b(`No broken links, but %s still go through a redirect hop.`,`ai-rank-suite`),h.redirected.toLocaleString()),why:b(`Each hop costs crawl budget and a few hundred milliseconds. Update them to the final URL when you touch the page.`,`ai-rank-suite`),action:b(`Show redirected`,`ai-rank-suite`),onAction:()=>a(`redirected`)}:{tone:`good`,text:S(b(`All %s links are healthy.`,`ai-rank-suite`),h.total.toLocaleString()),why:b(`Scan again after a publishing sprint or a domain change.`,`ai-rank-suite`)},E=e?.snapshot||null,ee=e?.running||null,te=g.phase===`extract`?g.done_posts||0:g.checked||0,ne=g.phase===`extract`?g.total_posts||0:g.total_urls||0,re=g.state===`running`?Math.min(100,Math.round(100*te/Math.max(1,ne))):null,O=g.state===`running`&&ne>0&&te>=ne;return(0,hu.jsxs)(`div`,{className:`ars-page`,children:[o&&(0,hu.jsx)(M,{tone:`serious`,children:o}),T&&!n&&g.state!==`running`&&(0,hu.jsx)(ya,{...T}),!e?.snapshot&&!n&&g.state!==`running`&&(0,hu.jsx)(Xo,{badge:b(`Not scanned yet`,`ai-rank-suite`),ringLabel:b(`Link health`,`ai-rank-suite`),title:b(`No link on this site has been checked yet.`,`ai-rank-suite`),why:b(`The first scan reads every link in your published content — internal ones resolve instantly, external ones are verified over HTTP — and turns them into a health score, a broken-destinations list and a per-host view. On a large site it runs in slices; leave the tab open.`,`ai-rank-suite`),action:b(`Start the first scan`,`ai-rank-suite`),onAction:p,busy:n,stats:[{label:b(`Links found`,`ai-rank-suite`),hint:b(`Every link extracted from published content.`,`ai-rank-suite`)},{label:b(`Healthy`,`ai-rank-suite`),hint:b(`Answering 2xx.`,`ai-rank-suite`)},{label:b(`Redirected`,`ai-rank-suite`),hint:b(`Resolving only after a hop.`,`ai-rank-suite`)},{label:b(`Broken`,`ai-rank-suite`),hint:b(`4xx, 5xx or unreachable.`,`ai-rank-suite`)}],previews:[{title:b(`Broken destinations`,`ai-rank-suite`),text:b(`One row per dead target however many pages point at it — with a Redirect button that pre-fills the redirect form, and Recheck.`,`ai-rank-suite`)},{title:b(`External hosts`,`ai-rank-suite`),text:b(`Where your outbound links go and which of those hosts have gone dark, worst first.`,`ai-rank-suite`)},{title:b(`Every link, filtered`,`ai-rank-suite`),text:b(`Broken, redirected, healthy; internal or external; searchable by URL or anchor; server-paged for fifty thousand links.`,`ai-rank-suite`)}]}),(e?.snapshot||n||g.state===`running`)&&(0,hu.jsxs)(k,{title:b(`Site-wide scan`,`ai-rank-suite`),subtitle:b(`Extracts every link from your published content, then checks each one — internal links resolve instantly, external ones are verified over HTTP`,`ai-rank-suite`),action:(0,hu.jsx)(A,{onClick:p,busy:n,children:n?b(`Scanning…`,`ai-rank-suite`):h.total>0?b(`Scan again`,`ai-rank-suite`):b(`Start scan`,`ai-rank-suite`)}),children:[re!==null&&(0,hu.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,hu.jsx)(ze,{label:g.phase===`extract`?S(b(`Phase 1 of 2 — reading pages %1$s / %2$s`,`ai-rank-suite`),(g.done_posts||0).toLocaleString(),(g.total_posts||0).toLocaleString()):O?b(`Every destination checked — writing the results`,`ai-rank-suite`):S(b(`Phase 2 of 2 — checking unique destinations %1$s / %2$s`,`ai-rank-suite`),(g.checked||0).toLocaleString(),(g.total_urls||0).toLocaleString()),total:100,percent:re}),ee&&(0,hu.jsxs)(`p`,{className:`m-0 t-caption`,children:[S(b(`This run so far: %1$s links found across your pages, %2$s of them checked, %3$s broken. The bar above counts unique destinations, which is fewer — the same page is often linked many times.`,`ai-rank-suite`),ee.found.toLocaleString(),ee.checked.toLocaleString(),ee.broken.toLocaleString()),` `,b(E?`The figures below are still the last completed scan.`:`Nothing is published yet — results appear when this scan completes.`,`ai-rank-suite`),` `,b(`Leaving this tab open is the quickest way to finish it. Close it and the scan carries on in the background, more slowly.`,`ai-rank-suite`)]})]}),E&&!n&&g.state!==`running`&&(0,hu.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:E.pages?S(b(`Showing the scan completed %1$s over %2$s pages.`,`ai-rank-suite`),new Date((E.finished_at||0)*1e3).toLocaleString(),E.pages.toLocaleString()):S(b(`Showing the scan completed %s.`,`ai-rank-suite`),new Date((E.finished_at||0)*1e3).toLocaleString())}),g.state===`cancelled`&&!n&&(0,hu.jsx)(`p`,{className:`m-0 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(E?`Last scan was cancelled — the previous completed scan is still shown below.`:`Last scan was cancelled; nothing has been published yet.`,`ai-rank-suite`)}),g.state===`idle`&&(0,hu.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:b(`No scan yet — run the first one to see the health of every link on your site.`,`ai-rank-suite`)})]}),e?.snapshot&&h.total>0&&(0,hu.jsx)(Ee,{columns:4,metrics:[{id:`total`,label:b(`Links found`,`ai-rank-suite`),hint:b(`Every link extracted from your published content in the last scan.`,`ai-rank-suite`),value:h.total,sub:S(b(`%1$s internal · %2$s external`,`ai-rank-suite`),h.internal,h.external)},{id:`healthy`,label:b(`Healthy`,`ai-rank-suite`),hint:b(`Responding 2xx — nothing to do here.`,`ai-rank-suite`),value:h.healthy},{id:`redirected`,label:b(`Redirected`,`ai-rank-suite`),hint:b(`Links that only resolve after a redirect hop. Update them to the final URL and save the hop.`,`ai-rank-suite`),value:h.redirected},{id:`broken`,label:b(`Broken`,`ai-rank-suite`),hint:b(`4xx, 5xx or unreachable. A dead link is a trust signal pointing the wrong way.`,`ai-rank-suite`),value:h.broken+h.unreachable,accent:h.broken+h.unreachable>0?`var(--ars-c-red-ink)`:void 0}]}),e?.snapshot&&h.total>0&&(0,hu.jsx)(k,{title:b(`Composition`,`ai-rank-suite`),subtitle:b(`Every checked link by what it answered`,`ai-rank-suite`),flush:!0,children:(0,hu.jsx)(`div`,{className:`px-4 py-3`,children:(0,hu.jsx)(Ye,{segments:[{label:b(`Healthy`,`ai-rank-suite`),value:h.healthy,color:`var(--ars-c-green-ink)`},{label:b(`Redirected`,`ai-rank-suite`),value:h.redirected,color:`var(--ars-accent)`},{label:b(`Broken`,`ai-rank-suite`),value:h.broken,color:`var(--ars-c-red-ink)`},{label:b(`Unreachable`,`ai-rank-suite`),value:h.unreachable,color:`var(--ars-ink-3)`}]})})}),(v.length>0||y.length>0)&&(0,hu.jsxs)(`div`,{className:`grid gap-4 items-stretch${v.length>0&&y.length>0?` lg:grid-cols-2`:``}`,children:[v.length>0&&(0,hu.jsx)(k,{title:b(`Broken destinations`,`ai-rank-suite`),subtitle:b(`Grouped by target — one fix per row, however many pages point there`,`ai-rank-suite`),flush:!0,children:(0,hu.jsx)(`div`,{className:`ars-destlist`,children:v.map(e=>(0,hu.jsxs)(`div`,{className:`ars-dest`,children:[(0,hu.jsx)(`span`,{className:`ars-dest-status`,children:(0,hu.jsx)(fu,{status:e.status})}),(0,hu.jsx)(`span`,{className:`ars-dest-url ars-mono`,title:e.url,children:e.url}),(0,hu.jsxs)(`span`,{className:`ars-dest-pages tabular-nums`,children:[e.pages.toLocaleString(),` `,e.pages===1?`page`:`pages`,e.internal?``:` · external`]}),(0,hu.jsxs)(`span`,{className:`ars-dest-actions`,children:[e.internal&&(0,hu.jsx)(A,{variant:`tonal`,onClick:()=>w(e.url),children:b(`Redirect`,`ai-rank-suite`)}),(0,hu.jsx)(A,{variant:`ghost`,busy:c===e.url,onClick:()=>m(e.url),children:b(`Recheck`,`ai-rank-suite`)})]})]},`${e.url}|${e.internal}`))})}),y.length>0&&(0,hu.jsx)(k,{title:b(`External hosts`,`ai-rank-suite`),subtitle:b(`Where your outbound links go, worst first`,`ai-rank-suite`),flush:!0,children:(0,hu.jsx)(`div`,{className:`ars-table-wrap`,children:(0,hu.jsxs)(`table`,{className:`ars-table`,children:[(0,hu.jsx)(`thead`,{children:(0,hu.jsxs)(`tr`,{children:[(0,hu.jsx)(`th`,{children:b(`Host`,`ai-rank-suite`)}),(0,hu.jsx)(`th`,{className:`is-num`,children:b(`Links`,`ai-rank-suite`)}),(0,hu.jsx)(`th`,{className:`is-num`,children:b(`Redirected`,`ai-rank-suite`)}),(0,hu.jsx)(`th`,{className:`is-num`,children:b(`Broken`,`ai-rank-suite`)})]})}),(0,hu.jsx)(`tbody`,{children:y.map(e=>(0,hu.jsxs)(`tr`,{children:[(0,hu.jsx)(`td`,{className:`font-medium`,children:e.host}),(0,hu.jsx)(`td`,{className:`is-num`,children:e.links.toLocaleString()}),(0,hu.jsx)(`td`,{className:`is-num is-muted`,children:e.redirected||`—`}),(0,hu.jsx)(`td`,{className:`is-num`,style:e.broken?{color:`var(--ars-c-red-ink)`,fontWeight:600}:void 0,children:e.broken||`—`})]},e.host))})]})})})]}),e?.snapshot&&h.total>0&&(0,hu.jsx)(`div`,{ref:i,className:`scroll-mt-4`,children:(0,hu.jsx)(Ws,{query:d,searchPlaceholder:b(`Search URL or anchor…`,`ai-rank-suite`),toolbar:(0,hu.jsxs)(hu.Fragment,{children:[(0,hu.jsx)(qe,{label:b(`Show`,`ai-rank-suite`),value:d.state.filters.status||``,onChange:e=>d.setFilter(`status`,e),options:[{id:`issues`,label:b(`Issues`,`ai-rank-suite`)},{id:`broken`,label:b(`Broken`,`ai-rank-suite`)},{id:`redirected`,label:b(`Redirected`,`ai-rank-suite`)},{id:`healthy`,label:b(`Healthy`,`ai-rank-suite`)},{id:``,label:b(`All`,`ai-rank-suite`)}]}),(0,hu.jsx)(qe,{label:b(`Scope`,`ai-rank-suite`),value:d.state.filters.internal||``,onChange:e=>d.setFilter(`internal`,e),options:[{id:``,label:b(`All`,`ai-rank-suite`)},{id:`internal`,label:b(`Internal`,`ai-rank-suite`)},{id:`external`,label:b(`External`,`ai-rank-suite`)}]})]}),columns:[{id:`status`,label:b(`Status`,`ai-rank-suite`),sortable:!0,render:e=>(0,hu.jsx)(fu,{status:e.status})},{id:`url`,label:b(`Link`,`ai-rank-suite`),sortable:!0,render:e=>(0,hu.jsxs)(`div`,{style:{maxWidth:360},children:[(0,hu.jsx)(`div`,{className:`ars-mono text-[12px] ars-url`,title:e.url,children:e.url}),(0,hu.jsxs)(`div`,{className:`text-[11.5px] mt-0.5`,style:{color:`var(--ars-ink-3)`},children:[`anchor: “`,e.anchor,`”`,e.redirect&&(0,hu.jsxs)(hu.Fragment,{children:[` `,`→ `,(0,hu.jsx)(`span`,{className:`ars-mono`,children:e.redirect})]})]})]})},{id:`post_title`,label:b(`Found on`,`ai-rank-suite`),render:e=>(0,hu.jsx)(`a`,{href:e.edit_url,target:`_blank`,rel:`noreferrer`,className:`font-medium`,style:{maxWidth:200,display:`inline-block`},children:e.post_title||`#${e.post_id}`})}],rowActions:e=>(0,hu.jsxs)(`div`,{className:`ars-actions`,children:[e.internal&&(e.status>=400||e.status===0)&&(0,hu.jsx)(A,{variant:`ghost`,onClick:()=>w(e.url),children:b(`Redirect`,`ai-rank-suite`)}),(0,hu.jsx)(A,{variant:`ghost`,busy:c===e.url,onClick:()=>m(e.url),children:b(`Recheck`,`ai-rank-suite`)})]}),empty:{title:b(`Nothing in this filter`,`ai-rank-suite`),children:b(`Every checked link matching this filter is healthy.`,`ai-rank-suite`)}})}),e?.snapshot&&h.total>0&&h.broken+h.unreachable+h.redirected===0&&(0,hu.jsx)(M,{tone:`good`,children:b(`Every checked link is healthy — nothing to fix.`,`ai-rank-suite`)})]})}var mu,hu,gu=o((()=>{C(),mu=u(f(),1),O(),dt(),xa(),Qo(),qs(),hu=_e()}));function _u(){let[e,t]=(0,vu.useState)(null),[n,r]=(0,vu.useState)(null),[i,a]=(0,vu.useState)(null),[o,s]=(0,vu.useState)(``),[c,l]=(0,vu.useState)(null),[u,d]=(0,vu.useState)(null),f=()=>D.get(`/webhooks`).then(t).catch(e=>r(e.message));(0,vu.useEffect)(()=>{f()},[]);let p=async(e,t)=>{s(e),r(null);try{await t()}catch(e){r(e.message)}finally{s(``)}},m=()=>p(`save`,async()=>{let e=await D.post(`/webhooks`,i);t(e),e.saved?.minted&&l({id:e.saved.id,secret:e.saved.minted}),a(null)}),h=e=>p(`del-${e}`,async()=>t(await D.del(`/webhooks/${e}`))),g=e=>p(`test-${e}`,async()=>{let n=await D.post(`/webhooks/${e}/test`,{});t(n),d({id:e,...n.result})}),_=e=>p(`toggle-${e.id}`,async()=>t(await D.post(`/webhooks`,{id:e.id,url:e.url,events:e.events,label:e.label,active:!e.active})));if(!e)return null;let v=Object.entries(e.events||{}),y=e.hooks||[],C=e.deliveries||[],w=e=>y.find(t=>t.id===e)?.label||y.find(t=>t.id===e)?.url||e.slice(0,8);return(0,yu.jsxs)(`div`,{className:`grid gap-4`,children:[n&&(0,yu.jsx)(M,{tone:`serious`,children:n}),c&&(0,yu.jsx)(M,{tone:`good`,children:(0,yu.jsxs)(`div`,{className:`grid gap-1`,children:[(0,yu.jsx)(`b`,{children:b(`Signing secret for this webhook — shown once, copy it now.`,`ai-rank-suite`)}),(0,yu.jsx)(`code`,{className:`ars-mono`,style:{wordBreak:`break-all`},children:c.secret}),(0,yu.jsxs)(`span`,{className:`t-caption`,children:[b(`Verify each delivery:`,`ai-rank-suite`),(0,yu.jsx)(`code`,{children:`sha256=HMAC_SHA256(raw_body, secret)`}),` `,b(`must equal the`,`ai-rank-suite`),` `,(0,yu.jsx)(`code`,{children:b(`X-AIRS-Signature`,`ai-rank-suite`)}),` `,b(`header. To rotate, edit the webhook and enter a new secret.`,`ai-rank-suite`)]}),(0,yu.jsx)(`button`,{type:`button`,className:`ars-linkbtn justify-self-start`,onClick:()=>l(null),children:b(`I have copied it`,`ai-rank-suite`)})]})}),(0,yu.jsxs)(k,{title:b(`Webhooks`,`ai-rank-suite`),subtitle:b(`A signed POST to your URL when something happens here — Zapier, Make, n8n, Slack, your own dashboard`,`ai-rank-suite`),action:!i&&(0,yu.jsx)(A,{onClick:()=>a({url:``,label:``,events:[`audit.finished`,`score.recalculated`],secret:``,active:!0}),children:b(`Add webhook`,`ai-rank-suite`)}),flush:!0,children:[i&&(0,yu.jsxs)(`div`,{className:`px-4 py-4 grid gap-3`,style:{borderBottom:`1px solid var(--ars-border)`,background:`var(--ars-surface-2)`},children:[(0,yu.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-[minmax(0,1fr)_240px]`,children:[(0,yu.jsx)(Qe,{label:b(`Endpoint URL`,`ai-rank-suite`),hint:b(`Public https URL. Private and local addresses are refused.`,`ai-rank-suite`),children:(0,yu.jsx)(`input`,{type:`url`,value:i.url,onChange:e=>a({...i,url:e.target.value}),placeholder:`https://hooks.zapier.com/hooks/catch/…`,style:{width:`100%`}})}),(0,yu.jsx)(Qe,{label:b(`Label`,`ai-rank-suite`),hint:b(`For the list only.`,`ai-rank-suite`),children:(0,yu.jsx)(`input`,{type:`text`,value:i.label,onChange:e=>a({...i,label:e.target.value}),placeholder:b(`Slack #seo`,`ai-rank-suite`),style:{width:`100%`}})})]}),(0,yu.jsx)(Qe,{label:b(`Events`,`ai-rank-suite`),hint:b(`Which of the plugin's events this URL receives.`,`ai-rank-suite`),children:(0,yu.jsx)(`div`,{className:`ars-eventgrid`,children:v.map(([e,t])=>{let n=i.events.includes(e);return(0,yu.jsxs)(`label`,{className:`ars-event${n?` is-on`:``}`,children:[(0,yu.jsx)(`input`,{type:`checkbox`,checked:n,onChange:()=>a({...i,events:n?i.events.filter(t=>t!==e):[...i.events,e]})}),(0,yu.jsxs)(`span`,{className:`grid gap-0.5 min-w-0`,children:[(0,yu.jsx)(`span`,{className:`font-semibold text-[12.5px]`,children:t.label}),(0,yu.jsx)(`span`,{className:`t-caption`,children:t.detail}),(0,yu.jsx)(`code`,{className:`ars-mono t-caption`,children:e})]})]},e)})})}),(0,yu.jsx)(Qe,{label:b(`Signing secret`,`ai-rank-suite`),hint:i.id?b(`Leave empty to keep the current secret; enter a new one to rotate it.`,`ai-rank-suite`):b(`Leave empty and one is generated for you — shown once after saving.`,`ai-rank-suite`),children:(0,yu.jsx)(`input`,{type:`password`,autoComplete:`off`,value:i.secret,onChange:e=>a({...i,secret:e.target.value}),placeholder:b(`optional`,`ai-rank-suite`),style:{maxWidth:360}})}),(0,yu.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,yu.jsx)(A,{onClick:m,busy:o===`save`,disabled:!i.url.trim()||i.events.length===0,children:i.id?b(`Save changes`,`ai-rank-suite`):b(`Create webhook`,`ai-rank-suite`)}),(0,yu.jsx)(A,{variant:`ghost`,onClick:()=>a(null),children:b(`Cancel`,`ai-rank-suite`)})]})]}),y.length===0&&!i?(0,yu.jsxs)(`div`,{className:`px-4 py-5 grid gap-2`,children:[(0,yu.jsx)(`span`,{className:`font-medium text-[13px]`,children:b(`No webhooks yet.`,`ai-rank-suite`)}),(0,yu.jsxs)(`span`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:[b(`Add one and the plugin will POST a signed JSON envelope —`,`ai-rank-suite`),(0,yu.jsx)(`code`,{children:`event`}),`, `,(0,yu.jsx)(`code`,{children:`site`}),`,`,` `,(0,yu.jsx)(`code`,{children:`time`}),`, `,(0,yu.jsx)(`code`,{children:`data`}),` `,b(`— to that URL whenever a selected event happens.`,`ai-rank-suite`)]})]}):(0,yu.jsx)(`div`,{className:`ars-table-wrap`,children:(0,yu.jsxs)(`table`,{className:`ars-table`,children:[(0,yu.jsx)(`thead`,{children:(0,yu.jsxs)(`tr`,{children:[(0,yu.jsx)(`th`,{children:b(`Endpoint`,`ai-rank-suite`)}),(0,yu.jsx)(`th`,{children:b(`Events`,`ai-rank-suite`)}),(0,yu.jsx)(`th`,{children:b(`Last delivery`,`ai-rank-suite`)}),(0,yu.jsx)(`th`,{style:{width:230}})]})}),(0,yu.jsx)(`tbody`,{children:y.map(e=>(0,yu.jsxs)(`tr`,{style:{opacity:e.active?1:.6},children:[(0,yu.jsx)(`td`,{children:(0,yu.jsxs)(`div`,{className:`grid gap-0.5`,style:{maxWidth:380},children:[(0,yu.jsx)(`span`,{className:`font-semibold text-[13px] truncate`,children:e.label||e.url}),e.label&&(0,yu.jsx)(`span`,{className:`ars-mono t-caption truncate`,children:e.url})]})}),(0,yu.jsx)(`td`,{children:(0,yu.jsx)(`span`,{className:`flex flex-wrap gap-1`,children:e.events.map(e=>(0,yu.jsx)(j,{tone:`neutral`,children:e},e))})}),(0,yu.jsx)(`td`,{children:e.last?(0,yu.jsxs)(`span`,{className:`grid gap-0.5`,children:[(0,yu.jsx)(j,{tone:e.last_ok?`good`:`serious`,children:e.last_ok?S(b(`%s ok`,`ai-rank-suite`),e.last_status):e.last_status?`HTTP ${e.last_status}`:b(`unreachable`,`ai-rank-suite`)}),(0,yu.jsxs)(`span`,{className:`t-caption`,children:[new Date(e.last*1e3).toLocaleString(),e.failures>1?` · ${S(x(`%d failure in a row`,`%d failures in a row`,e.failures,`ai-rank-suite`),e.failures)}`:``]})]}):(0,yu.jsx)(`span`,{className:`t-caption`,children:b(`never`,`ai-rank-suite`)})}),(0,yu.jsx)(`td`,{children:(0,yu.jsxs)(`div`,{className:`ars-actions`,children:[(0,yu.jsx)(Me,{checked:!!e.active,onChange:()=>_(e),label:``}),(0,yu.jsx)(A,{variant:`ghost`,busy:o===`test-${e.id}`,onClick:()=>g(e.id),children:b(`Test`,`ai-rank-suite`)}),(0,yu.jsx)(A,{variant:`ghost`,onClick:()=>a({id:e.id,url:e.url,label:e.label||``,events:e.events,secret:``,active:e.active}),children:b(`Edit`,`ai-rank-suite`)}),(0,yu.jsx)(A,{variant:`ghost`,busy:o===`del-${e.id}`,onClick:()=>h(e.id),children:b(`Delete`,`ai-rank-suite`)})]})})]},e.id))})]})}),u&&(0,yu.jsxs)(`p`,{className:`m-0 px-4 py-2 t-caption`,children:[S(b(`Test to %s:`,`ai-rank-suite`),w(u.id)),` `,u.ok?S(b(`delivered, HTTP %1$s in %2$s ms`,`ai-rank-suite`),u.status,u.ms):S(b(`failed — %s`,`ai-rank-suite`),u.error||`HTTP ${u.status}`)]})]}),(0,yu.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2 items-stretch`,children:[(0,yu.jsx)(k,{title:b(`Recent deliveries`,`ai-rank-suite`),subtitle:b(`The last forty, newest first`,`ai-rank-suite`),flush:!0,children:C.length===0?(0,yu.jsx)(`div`,{className:`px-4 py-4 t-caption`,children:b(`Nothing delivered yet — press Test on a webhook.`,`ai-rank-suite`)}):(0,yu.jsx)(`div`,{className:`ars-table-wrap`,children:(0,yu.jsxs)(`table`,{className:`ars-table`,children:[(0,yu.jsx)(`thead`,{children:(0,yu.jsxs)(`tr`,{children:[(0,yu.jsx)(`th`,{children:b(`When`,`ai-rank-suite`)}),(0,yu.jsx)(`th`,{children:b(`Event`,`ai-rank-suite`)}),(0,yu.jsx)(`th`,{children:b(`To`,`ai-rank-suite`)}),(0,yu.jsx)(`th`,{className:`is-num`,children:b(`Result`,`ai-rank-suite`)})]})}),(0,yu.jsx)(`tbody`,{children:C.slice(0,20).map((e,t)=>(0,yu.jsxs)(`tr`,{children:[(0,yu.jsx)(`td`,{className:`is-muted`,style:{whiteSpace:`nowrap`},children:new Date(e.time*1e3).toLocaleString()}),(0,yu.jsx)(`td`,{children:(0,yu.jsx)(`code`,{className:`ars-mono text-[12px]`,children:e.event})}),(0,yu.jsx)(`td`,{className:`truncate`,style:{maxWidth:160},children:w(e.hook)}),(0,yu.jsx)(`td`,{className:`is-num`,children:(0,yu.jsx)(j,{tone:e.ok?`good`:`serious`,title:e.error||``,children:e.ok?`${e.status} · ${e.ms} ms`:e.status?`HTTP ${e.status}`:b(`unreachable`,`ai-rank-suite`)})})]},t))})]})})}),(0,yu.jsx)(k,{title:b(`Receiving a delivery`,`ai-rank-suite`),subtitle:b(`The envelope, the headers, and how to verify the signature`,`ai-rank-suite`),children:(0,yu.jsxs)(`div`,{className:`grid gap-3`,children:[(0,yu.jsx)(nt,{code:`POST {your URL}
    9191Content-Type: application/json
    9292X-AIRS-Event: audit.finished
    … …  
    100100  "version": "${(window.airanksuiteData||{}).version||``}",
    101101  "data": { "run_id": "…", "score": 74, "totals": { "critical": 0, "warning": 12, "notice": 3 } }
    102 }`}),(0,pu.jsx)(ot,{title:b(`Verify in PHP, Node or n8n`,`ai-rank-suite`),children:(0,pu.jsxs)(`p`,{children:[(0,pu.jsx)(`code`,{children:`hash_equals('sha256=' . hash_hmac('sha256', $rawBody, $secret), $_SERVER['HTTP_X_AIRANKSUITE_SIGNATURE'])`}),` `,b(`— the same in Node with`,`ai-rank-suite`),` `,(0,pu.jsx)(`code`,{children:`crypto.createHmac('sha256', secret).update(rawBody).digest('hex')`}),`. `,b(`In n8n or Make, add a Crypto/HMAC step on the raw body and compare with the header. Reject anything that does not match; a 2xx from your side marks the delivery as ok here.`,`ai-rank-suite`)]})}),(0,pu.jsxs)(`p`,{className:`m-0 t-caption`,children:[b(`On the same install, no HTTP is needed:`,`ai-rank-suite`),(0,pu.jsx)(`code`,{children:`add_action('airanksuite/event', fn($name, $envelope) => …)`}),` `,b(`or`,`ai-rank-suite`),` `,(0,pu.jsx)(`code`,{children:`add_action('airanksuite/event/audit.finished', …)`}),` `,b(`receive every event as a PHP action.`,`ai-rank-suite`)]})]})})]})]})}var fu,pu,mu=o((()=>{fu=u(f(),1),C(),D(),at(),ct(),pu=O()})),hu=c({default:()=>bu});function gu({data:e,onMessage:t}){let[n,r]=(0,xu.useState)(null),i=async e=>{r(e);try{t((await E.post(`/dev/maintenance`,{task:e})).message)}catch(e){t(e.message,!0)}finally{r(null)}},a=e.environment,o=[[b(`Plugin`,`ai-rank-suite`),S(b(`v%1$s · schema %2$s`,`ai-rank-suite`),a.plugin,a.db_schema)],[`WordPress`,a.multisite?S(b(`%s (multisite)`,`ai-rank-suite`),a.wordpress):a.wordpress],[`PHP / MySQL`,`${a.php} / ${a.mysql}`],[b(`Theme`,`ai-rank-suite`),a.theme],[b(`Memory limit`,`ai-rank-suite`),a.memory],[b(`Locale`,`ai-rank-suite`),a.locale],[b(`Pretty permalinks`,`ai-rank-suite`),a.permalinks?b(`✓ on`,`ai-rank-suite`):b(`✕ off — required for llms.txt, sitemaps, IndexNow`,`ai-rank-suite`)],[`HTTPS`,a.ssl?`✓`:`✕`],[`WP-Cron`,e.constants.WP_CRON?b(`✓ running`,`ai-rank-suite`):b(`✕ disabled — reports & answer simulations need a real cron`,`ai-rank-suite`)],[b(`Object cache`,`ai-rank-suite`),e.constants.OBJECT_CACHE?b(`✓ external`,`ai-rank-suite`):b(`database (default)`,`ai-rank-suite`)]],s=[...o.map(([e,t])=>`${e}: ${t}`),S(b(`Active modules: %s`,`ai-rank-suite`),e.modules.active.join(`, `)),S(b(`Disabled: %s`,`ai-rank-suite`),e.modules.disabled.join(`, `)||`—`),...e.tables.map(e=>S(b(`%1$s: %2$s rows`,`ai-rank-suite`),e.name,e.rows))].join(`
    103 `),c=[{task:`flush_transients`,label:b(`Clear plugin caches`,`ai-rank-suite`),hint:b(`Drops every airanksuite_ transient — llms.txt, reports, rate limits`,`ai-rank-suite`)},{task:`flush_rewrites`,label:b(`Rebuild rewrite rules`,`ai-rank-suite`),hint:b(`Re-registers llms.txt, sitemaps and the IndexNow key file`,`ai-rank-suite`)},{task:`rerun_migration`,label:b(`Re-run database migration`,`ai-rank-suite`),hint:b(`Rebuilds tables idempotently — safe, takes a backup first`,`ai-rank-suite`)},{task:`reanalyze_all`,label:b(`Reset all analyses`,`ai-rank-suite`),hint:b(`Every page is re-scored on next access`,`ai-rank-suite`)},{task:`clear_quarantine`,label:b(`Clear module quarantine`,`ai-rank-suite`),hint:b(`Failed modules retry on the next load`,`ai-rank-suite`)}];return(0,Z.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Z.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2 items-start`,children:[(0,Z.jsxs)(k,{title:b(`System status`,`ai-rank-suite`),subtitle:b(`Everything support needs in one place`,`ai-rank-suite`),action:(0,Z.jsx)(A,{variant:`ghost`,onClick:()=>fe(s),children:b(`Copy report`,`ai-rank-suite`)}),children:[(0,Z.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Z.jsx)(`table`,{className:`ars-table`,children:(0,Z.jsx)(`tbody`,{children:o.map(([e,t])=>(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`td`,{className:`font-medium`,style:{width:170},children:e}),(0,Z.jsx)(`td`,{style:{color:`var(--ars-ink-2)`},children:t})]},e))})})}),Object.keys(e.modules.quarantine).length>0&&(0,Z.jsx)(`div`,{className:`mt-3`,children:(0,Z.jsx)(M,{tone:`serious`,children:S(b(`Quarantined modules: %s — check the error, then clear the quarantine.`,`ai-rank-suite`),Object.keys(e.modules.quarantine).join(`, `))})})]}),(e.hook_faults||[]).length>0&&(0,Z.jsxs)(k,{title:b(`Failing on the public site`,`ai-rank-suite`),subtitle:b(`Caught, so pages still render — but this output is missing from every page it runs on`,`ai-rank-suite`),flush:!0,children:[(0,Z.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Z.jsxs)(`table`,{className:`ars-table`,children:[(0,Z.jsx)(`thead`,{children:(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`th`,{children:b(`Where`,`ai-rank-suite`)}),(0,Z.jsx)(`th`,{children:b(`Error`,`ai-rank-suite`)}),(0,Z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Times`,`ai-rank-suite`)})]})}),(0,Z.jsx)(`tbody`,{children:e.hook_faults.map(e=>(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`td`,{className:`font-medium`,children:e.label}),(0,Z.jsxs)(`td`,{style:{color:`var(--ars-ink-2)`},children:[(0,Z.jsx)(`div`,{children:e.message}),(0,Z.jsxs)(`div`,{className:`t-caption`,children:[e.class,` · `,e.file,`:`,e.line]})]}),(0,Z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.count})]},e.label))})]})}),(0,Z.jsx)(`div`,{className:`p-4 pt-3`,children:(0,Z.jsx)(M,{tone:`serious`,children:b(`Send this to support as it is — the file and line are the whole diagnosis. Clearing the quarantine below also empties this list, so fix first and clear second.`,`ai-rank-suite`)})})]}),(0,Z.jsx)(k,{title:b(`Maintenance`,`ai-rank-suite`),subtitle:b(`Safe one-click operations — nothing here deletes settings or content`,`ai-rank-suite`),children:(0,Z.jsx)(`div`,{className:`grid gap-2.5`,children:c.map(e=>(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-3 ars-r-lg px-4 py-2.5`,style:{background:`var(--ars-surface-2)`},children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`div`,{className:`font-medium text-[13px]`,children:e.label}),(0,Z.jsx)(`div`,{className:`text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:e.hint})]}),(0,Z.jsx)(A,{variant:`ghost`,busy:n===e.task,onClick:()=>i(e.task),children:b(`Run`,`ai-rank-suite`)})]},e.task))})})]}),(0,Z.jsx)(k,{title:b(`Data`,`ai-rank-suite`),subtitle:b(`Plugin tables and scheduled jobs`,`ai-rank-suite`),children:(0,Z.jsxs)(`div`,{className:`grid gap-x-8 md:grid-cols-2 items-start`,children:[(0,Z.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Z.jsxs)(`table`,{className:`ars-table`,children:[(0,Z.jsx)(`thead`,{children:(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`th`,{children:b(`Table`,`ai-rank-suite`)}),(0,Z.jsx)(`th`,{className:`is-num is-mid`,children:b(`Rows`,`ai-rank-suite`)})]})}),(0,Z.jsx)(`tbody`,{children:e.tables.map(e=>(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`td`,{className:`ars-mono text-[12px]`,children:e.name}),(0,Z.jsx)(`td`,{className:`is-num is-mid`,children:e.rows})]},e.name))})]})}),(0,Z.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Z.jsxs)(`table`,{className:`ars-table`,children:[(0,Z.jsx)(`thead`,{children:(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`th`,{children:b(`Scheduled job`,`ai-rank-suite`)}),(0,Z.jsx)(`th`,{className:`is-num`,children:b(`Next run`,`ai-rank-suite`)})]})}),(0,Z.jsx)(`tbody`,{children:e.crons.map(e=>(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`td`,{className:`ars-mono text-[12px]`,children:e.hook}),(0,Z.jsx)(`td`,{className:`is-num text-[12px]`,style:{color:`var(--ars-ink-3)`},children:e.next||b(`not scheduled`,`ai-rank-suite`)})]},e.hook))})]})})]})})]})}function _u(){let[e,t]=(0,xu.useState)(null);if((0,xu.useEffect)(()=>{E.get(`/integrations`).then(e=>t(e.integrations)).catch(()=>t([]))},[]),!e)return(0,Z.jsx)(k,{title:b(`Plugin integrations`,`ai-rank-suite`),children:b(`Loading…`,`ai-rank-suite`)});let n=e.filter(e=>e.active);return(0,Z.jsx)(k,{title:b(`Plugin integrations`,`ai-rank-suite`),subtitle:S(b(`%1$s of %2$s detected on this site — data is read automatically, nothing to configure`,`ai-rank-suite`),n.length,e.length),children:(0,Z.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:[...e].sort((e,t)=>Number(t.active)-Number(e.active)).map(e=>(0,Z.jsx)(`div`,{className:`flex items-start justify-between gap-3 ars-r-lg px-4 py-3`,style:{background:e.active?`var(--ars-good-tonal)`:`var(--ars-surface-2)`},children:(0,Z.jsxs)(`div`,{className:`min-w-0`,children:[(0,Z.jsxs)(`div`,{className:`font-medium text-[13px] flex items-center gap-1.5`,children:[(0,Z.jsx)(`span`,{"aria-hidden":!0,style:{color:e.active?`var(--ars-good)`:`var(--ars-ink-3)`},children:e.active?`✓`:`○`}),e.label]}),(0,Z.jsx)(`div`,{className:`text-[11.5px] mt-0.5`,style:{color:`var(--ars-ink-2)`},children:e.provides})]})},e.key))})})}function vu({data:e}){let t=[],n=new Map;return(e.hooks||[]).forEach(e=>{n.has(e.module)||(n.set(e.module,[]),t.push(e.module)),n.get(e.module).push(e)}),(0,Z.jsxs)(k,{title:b(`Hooks reference`,`ai-rank-suite`),subtitle:S(b(`%s extension points, generated from the code that fires them — build your own modules, schema types and crawler rules on top`,`ai-rank-suite`),(e.hooks||[]).length),children:[(0,Z.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Z.jsxs)(`table`,{className:`ars-table`,children:[(0,Z.jsx)(`thead`,{children:(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`th`,{children:b(`Hook`,`ai-rank-suite`)}),(0,Z.jsx)(`th`,{children:b(`Type`,`ai-rank-suite`)}),(0,Z.jsx)(`th`,{children:b(`Arguments`,`ai-rank-suite`)}),(0,Z.jsx)(`th`,{children:b(`What it does`,`ai-rank-suite`)})]})}),(0,Z.jsx)(`tbody`,{children:t.map(e=>(0,Z.jsxs)(xu.Fragment,{children:[(0,Z.jsx)(`tr`,{children:(0,Z.jsx)(`td`,{colSpan:4,className:`t-overline`,style:{background:`var(--ars-surface-2)`,paddingTop:8,paddingBottom:8},children:e})}),n.get(e).map(e=>(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`td`,{className:`ars-mono text-[12px]`,style:{whiteSpace:`nowrap`},title:(e.sources||[]).join(`
    104 `),children:e.hook}),(0,Z.jsx)(`td`,{children:(0,Z.jsx)(j,{tone:e.type===`filter`?`brand`:`neutral`,children:e.type})}),(0,Z.jsx)(`td`,{className:`ars-mono text-[11.5px]`,style:{color:`var(--ars-ink-2)`},children:e.args}),(0,Z.jsx)(`td`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:e.desc})]},e.hook))]},e))})]})}),(0,Z.jsxs)(`p`,{className:`m-0 mt-3 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[b(`Example:`,`ai-rank-suite`),(0,Z.jsx)(`code`,{className:`ars-mono`,children:`add_filter( 'airanksuite/schema/graph', fn( $graph ) => [...$graph, $myNode] );`})]})]})}function yu({data:e}){let[t,n]=(0,xu.useState)(``),[r,i]=(0,xu.useState)(null),[a,o]=(0,xu.useState)(null),s=e.routes.filter(e=>e.route!==`/airanksuite/v1`),c=s.filter(e=>!t||e.route.toLowerCase().includes(t.toLowerCase())),l=e=>e.methods.includes(`GET`)&&!/\(\?P</.test(e.route),u=e=>e.replace(/^\/airanksuite\/v1/,``).replace(/\(\?P<([a-z_]+)>[^)]*\)/gi,`{$1}`)||`/`,d=async e=>{o(e.route);let t=e.route.replace(/^\/airanksuite\/v1/,``),n=performance.now();try{let r=await E.get(t);i({route:e.route,status:200,ms:Math.round(performance.now()-n),body:r})}catch(t){i({route:e.route,status:t.status||`error`,ms:Math.round(performance.now()-n),body:{error:t.message}})}finally{o(null)}};return(0,Z.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[minmax(0,1.15fr)_minmax(0,1fr)] items-start`,children:[(0,Z.jsx)(k,{title:b(`REST API`,`ai-rank-suite`),subtitle:S(b(`%1$s of %2$s routes under airanksuite/v1 — every one requires a capability; authenticate with an application password or the X-WP-Nonce header`,`ai-rank-suite`),c.length,s.length),action:(0,Z.jsx)(`input`,{type:`search`,placeholder:b(`Filter routes…`,`ai-rank-suite`),value:t,onChange:e=>n(e.target.value),style:{minHeight:30,width:180}}),flush:!0,children:(0,Z.jsx)(`div`,{style:{maxHeight:560,overflowY:`auto`,overflowX:`hidden`},children:(0,Z.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Z.jsxs)(`table`,{className:`ars-table`,style:{tableLayout:`fixed`,width:`100%`},children:[(0,Z.jsxs)(`colgroup`,{children:[(0,Z.jsx)(`col`,{}),(0,Z.jsx)(`col`,{style:{width:104}}),(0,Z.jsx)(`col`,{style:{width:96}})]}),(0,Z.jsx)(`thead`,{children:(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`th`,{children:b(`Route`,`ai-rank-suite`)}),(0,Z.jsx)(`th`,{children:b(`Methods`,`ai-rank-suite`)}),(0,Z.jsx)(`th`,{"aria-label":b(`Try`,`ai-rank-suite`)})]})}),(0,Z.jsx)(`tbody`,{children:c.map(e=>(0,Z.jsxs)(`tr`,{className:r?.route===e.route?`is-active`:``,children:[(0,Z.jsx)(`td`,{className:`ars-mono text-[12px]`,style:{minWidth:0},title:e.route,children:(0,Z.jsx)(`span`,{className:`ars-url`,style:{display:`block`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:u(e.route)})}),(0,Z.jsx)(`td`,{children:(0,Z.jsx)(`div`,{className:`flex gap-1`,children:e.methods.map(e=>(0,Z.jsx)(j,{tone:e===`GET`?`good`:e===`DELETE`?`serious`:`brand`,children:e},e))})}),(0,Z.jsxs)(`td`,{className:`is-num`,style:{whiteSpace:`nowrap`,paddingInline:8},children:[!l(e)&&(0,Z.jsx)(`span`,{className:`t-caption`,title:/\(\?P</.test(e.route)?b(`Needs an id in the path`,`ai-rank-suite`):b(`Not a GET route`,`ai-rank-suite`),children:/\(\?P</.test(e.route)?b(`needs id`,`ai-rank-suite`):`—`}),l(e)&&(0,Z.jsx)(A,{variant:`ghost`,busy:a===e.route,onClick:()=>d(e),children:b(`Try`,`ai-rank-suite`)})]})]},e.route))})]})})})}),(0,Z.jsx)(k,{title:b(`Response`,`ai-rank-suite`),subtitle:r?S(b(`%1$s · %2$s · %3$s ms`,`ai-rank-suite`),r.route.replace(/^\/airanksuite\/v1/,``),r.status,r.ms):b(`Press Try on any GET route to see its live JSON`,`ai-rank-suite`),action:r&&(0,Z.jsx)(A,{variant:`ghost`,onClick:()=>fe(JSON.stringify(r.body,null,2)),children:b(`Copy JSON`,`ai-rank-suite`)}),children:r?(0,Z.jsx)(`pre`,{className:`ars-mono m-0`,style:{fontSize:11.5,lineHeight:1.5,maxHeight:520,overflow:`auto`,padding:12,borderRadius:`var(--ars-r-md)`,background:`var(--ars-surface-2)`,color:`var(--ars-ink)`,whiteSpace:`pre-wrap`,wordBreak:`break-word`},children:JSON.stringify(r.body,null,2)}):(0,Z.jsx)(`div`,{className:`t-caption`,children:b(`Nothing requested yet.`,`ai-rank-suite`)})})]})}function bu({tab:e=`status`,onTab:t}){let[n,r]=(0,xu.useState)(null),[i,a]=(0,xu.useState)(null),[o,s]=(0,xu.useState)(null),c=()=>E.get(`/dev/status`).then(r).catch(e=>s(e.message));if((0,xu.useEffect)(()=>{c()},[]),!n)return(0,Z.jsx)(_e,{error:o});let l=(e,t)=>{a({msg:e,isError:t}),setTimeout(()=>a(null),4e3),t||c()};return(0,Z.jsxs)(`div`,{className:`ars-page`,children:[(0,Z.jsx)(Ae,{tabs:[{id:`status`,label:b(`Status`,`ai-rank-suite`)},{id:`integrations`,label:b(`Integrations`,`ai-rank-suite`)},{id:`hooks`,label:b(`Hooks`,`ai-rank-suite`)},{id:`webhooks`,label:b(`Webhooks`,`ai-rank-suite`)},...window.airanksuiteData?.debug?[{id:`api`,label:b(`API`,`ai-rank-suite`)}]:[]],active:e,onChange:t}),i&&(0,Z.jsx)(M,{tone:i.isError?`serious`:`good`,children:i.msg}),e===`status`&&(0,Z.jsx)(gu,{data:n,onMessage:l}),e===`integrations`&&(0,Z.jsx)(_u,{}),e===`hooks`&&(0,Z.jsx)(vu,{data:n}),e===`webhooks`&&(0,Z.jsx)(du,{}),e===`api`&&window.airanksuiteData?.debug&&(0,Z.jsx)(yu,{data:n})]})}var xu,Z,Su=o((()=>{xu=u(f(),1),C(),D(),at(),pe(),mu(),Z=O()})),Cu=c({default:()=>wu});function wu(){let{data:e,setData:t,s:n,update:r,save:i,busy:a,saved:o,error:s,setError:c}=Wa(`/settings/feeds`),[l,u]=(0,Tu.useState)(!1);if(!e)return(0,Eu.jsx)(_e,{error:s});let d=e.options||{},f=async()=>{u(!0),c(null);try{t(await E.post(`/feeds/rebuild`,{}))}catch(e){c(e.message)}finally{u(!1)}},p=[{key:`google`,flag:`google_enabled`,label:b(`Google Merchant Center`,`ai-rank-suite`),hint:b(`Shopping ads, free listings and the Shopping tab`,`ai-rank-suite`)},{key:`meta`,flag:`meta_enabled`,label:b(`Meta Commerce Manager`,`ai-rank-suite`),hint:b(`Facebook and Instagram Shops, catalog ads`,`ai-rank-suite`)}];return(0,Eu.jsxs)(`div`,{className:`ars-page`,children:[s&&(0,Eu.jsx)(M,{tone:`serious`,children:s}),!e.woo_active&&(0,Eu.jsx)(M,{tone:`info`,children:b(`Catalog feeds need WooCommerce — activate it and this page fills itself in.`,`ai-rank-suite`)}),!e.permalinks&&(0,Eu.jsx)(M,{tone:`serious`,children:b(`Feeds need pretty permalinks. Switch Settings → Permalinks away from “Plain” first.`,`ai-rank-suite`)}),(0,Eu.jsxs)(`section`,{className:`grid gap-2`,children:[(0,Eu.jsx)(Ce,{hint:b(`One catalog, two platforms — paste the URL and your products appear. No export, no spreadsheet, no sync plugin.`,`ai-rank-suite`),children:b(`Feed targets`,`ai-rank-suite`)}),(0,Eu.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:p.map(t=>{let i=e.feeds[t.key]||{},a=!!n[t.flag];return(0,Eu.jsx)(k,{title:t.label,subtitle:t.hint,children:(0,Eu.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Eu.jsx)(Ee,{checked:a,onChange:e=>r({[t.flag]:e}),label:b(`Publish this feed`,`ai-rank-suite`)}),a&&(0,Eu.jsxs)(Eu.Fragment,{children:[(0,Eu.jsxs)(`div`,{className:`ars-r-lg px-4 py-3 grid gap-1.5`,style:{background:`var(--ars-surface-2)`},children:[(0,Eu.jsx)(`a`,{href:i.url,target:`_blank`,rel:`noreferrer`,className:`ars-mono text-[12px] ars-url`,title:i.url,children:i.url}),(0,Eu.jsx)(`div`,{className:`flex items-center gap-2`,children:i.cached?(0,Eu.jsxs)(j,{tone:`good`,children:[`✓ `,S(b(`%1$s items · %2$s KB`,`ai-rank-suite`),i.items,Math.round(i.bytes/1024))]}):(0,Eu.jsx)(j,{tone:`neutral`,children:b(`Not built yet`,`ai-rank-suite`)})})]}),(0,Eu.jsx)(`p`,{className:`m-0 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Paste this URL as a scheduled fetch. The feed rebuilds itself whenever a product changes.`,`ai-rank-suite`)})]})]})},t.key)})})]}),(0,Eu.jsx)(k,{title:b(`Catalog defaults`,`ai-rank-suite`),subtitle:b(`Applied to every product that has no value of its own — individual products always win`,`ai-rank-suite`),action:(0,Eu.jsxs)(`div`,{className:`flex items-center gap-2`,children:[o&&(0,Eu.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,Eu.jsx)(A,{variant:`ghost`,onClick:f,busy:l,children:b(`Rebuild now`,`ai-rank-suite`)}),(0,Eu.jsx)(A,{onClick:i,busy:a,children:b(`Save`,`ai-rank-suite`)})]}),children:(0,Eu.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Eu.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:Du.map(e=>(0,Eu.jsxs)(`div`,{children:[(0,Eu.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:e.label}),(0,Eu.jsx)(`select`,{value:n[e.key]??``,onChange:t=>r({[e.key]:t.target.value}),children:(d[e.key]||[``]).map(e=>(0,Eu.jsx)(`option`,{value:e,children:e===``?b(`— not set —`,`ai-rank-suite`):e},e))})]},e.key))}),(0,Eu.jsxs)(`div`,{children:[(0,Eu.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Google product category ID`,`ai-rank-suite`)}),(0,Eu.jsx)(`input`,{type:`text`,placeholder:b(`e.g. 187 (Apparel & Accessories &gt; Shoes)`,`ai-rank-suite`),value:n.google_category,onChange:e=>r({google_category:e.target.value})}),(0,Eu.jsxs)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:[b(`The numeric id from`,`ai-rank-suite`),` `,(0,Eu.jsx)(`a`,{href:`https://www.google.com/basepages/producttype/taxonomy-with-ids.en-US.txt`,target:`_blank`,rel:`noreferrer`,children:b(`Google’s product taxonomy`,`ai-rank-suite`)}),`. `,b(`Products can override it individually.`,`ai-rank-suite`)]})]}),(0,Eu.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,Eu.jsxs)(`div`,{children:[(0,Eu.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Max items`,`ai-rank-suite`)}),(0,Eu.jsx)(`input`,{type:`number`,min:`1`,max:`10000`,value:n.max_items,onChange:e=>r({max_items:Number(e.target.value)||1})})]}),(0,Eu.jsxs)(`div`,{children:[(0,Eu.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Cache (hours)`,`ai-rank-suite`)}),(0,Eu.jsx)(`input`,{type:`number`,min:`1`,max:`168`,value:n.cache_hours,onChange:e=>r({cache_hours:Number(e.target.value)||1})})]})]}),(0,Eu.jsx)(Ee,{checked:!!n.variations,onChange:e=>r({variations:e}),label:b(`List variations as individual items (recommended for apparel)`,`ai-rank-suite`)}),(0,Eu.jsx)(Ee,{checked:!!n.exclude_out_of_stock,onChange:e=>r({exclude_out_of_stock:e}),label:b(`Leave out-of-stock products out of the feed`,`ai-rank-suite`)})]})}),e.woo_active&&e.empty_why&&(0,Eu.jsxs)(M,{tone:e.empty_why.reason===`not_built`?`info`:`warning`,children:[(0,Eu.jsx)(`strong`,{children:b(`Feed is empty:`,`ai-rank-suite`)}),` `,e.empty_why.message,` `,e.empty_why.action,e.empty_why.counts&&Object.keys(e.empty_why.counts).length>0&&(0,Eu.jsx)(`span`,{className:`t-caption block mt-1`,children:Object.entries(e.empty_why.counts).map(([e,t])=>`${e.replace(/_/g,` `)}: ${t}`).join(` · `)})]}),e.woo_active&&(0,Eu.jsx)(be,{columns:3,metrics:[{id:`google-items`,label:b(`Google items`,`ai-rank-suite`),hint:b(`Products in the built Google Merchant feed.`,`ai-rank-suite`),value:e.feeds.google?.items??`—`,sub:e.feeds.google?.items?b(`in the built feed`,`ai-rank-suite`):e.empty_why?e.empty_why.message:b(`not built yet`,`ai-rank-suite`)},{id:`meta-items`,label:b(`Meta items`,`ai-rank-suite`),hint:b(`Products in the built Meta catalog feed.`,`ai-rank-suite`),value:e.feeds.meta?.items??`—`,sub:e.feeds.meta?.items?b(`in the built feed`,`ai-rank-suite`):e.empty_why?e.empty_why.message:b(`not built yet`,`ai-rank-suite`)},{id:`feed-size`,label:b(`Feed size`,`ai-rank-suite`),hint:b(`The cached Google feed on disk. Built once, then served instantly.`,`ai-rank-suite`),value:e.feeds.google?.bytes==null?`—`:Math.round(e.feeds.google.bytes/1024),unit:e.feeds.google?.bytes==null?``:`KB`,sub:e.feeds.google?.bytes==null?b(`not built yet`,`ai-rank-suite`):b(`cached, served instantly`,`ai-rank-suite`)}]})]})}var Tu,Eu,Du,Ou=o((()=>{Tu=u(f(),1),C(),Ka(),D(),at(),Eu=O(),Du=[{key:`condition`,label:b(`Default condition`,`ai-rank-suite`)},{key:`age_group`,label:b(`Age group`,`ai-rank-suite`)},{key:`gender`,label:b(`Gender`,`ai-rank-suite`)},{key:`adult`,label:b(`Adult content`,`ai-rank-suite`)},{key:`size_system`,label:b(`Size system`,`ai-rank-suite`)},{key:`size_type`,label:b(`Size type`,`ai-rank-suite`)}]})),ku=c({default:()=>Au});function Au(){let[e,t]=(0,ju.useState)(null),[n,r]=(0,ju.useState)(null),[i,a]=(0,ju.useState)(!1),o=(e=!1)=>{a(!0),E.get(`/store/overview${e?`?fresh=1`:``}`).then(t).catch(e=>r(e.message)).finally(()=>a(!1))};(0,ju.useEffect)(()=>{o()},[]);let s=e=>{window.location.hash=e};if(n)return(0,Mu.jsx)(M,{tone:`serious`,children:n});if(!e)return(0,Mu.jsx)(k,{children:b(`Reading the shop…`,`ai-rank-suite`)});if(!e.active)return(0,Mu.jsx)(M,{tone:`warning`,children:b(`WooCommerce is not active on this site.`,`ai-rank-suite`)});let c=e.counts||{},l=e=>e>=80?`good`:e>=50?`warn`:`bad`,u=e.readiness>=80?b(`Your catalogue is ready for search and for AI answers.`,`ai-rank-suite`):e.readiness>=50?b(`Your catalogue is findable, but a part of it is invisible where it matters.`,`ai-rank-suite`):b(`Most of your catalogue cannot be shown as products by Google or quoted by an AI yet.`,`ai-rank-suite`),d=[{id:`no_image`,label:b(`Without image`,`ai-rank-suite`),value:c.no_image??0},{id:`no_price`,label:b(`Without price`,`ai-rank-suite`),value:c.no_price??0},{id:`no_gtin`,label:b(`Without GTIN`,`ai-rank-suite`),value:c.no_gtin??0},{id:`thin`,label:b(`Thin description`,`ai-rank-suite`),value:c.thin??0,hint:b(`Under 200 characters. An AI answer has nothing to quote.`,`ai-rank-suite`)},{id:`no_meta_desc`,label:b(`No meta description`,`ai-rank-suite`),value:c.no_meta_desc??0},{id:`stranded`,label:b(`Out of stock, still indexed`,`ai-rank-suite`),value:c.stranded??0}];return(0,Mu.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Mu.jsxs)(k,{children:[(0,Mu.jsxs)(`div`,{className:`ars-hero`,children:[(0,Mu.jsxs)(`div`,{className:`ars-hero-ring`,children:[(0,Mu.jsx)(Oe,{value:e.readiness,label:b(`Shop readiness`,`ai-rank-suite`)}),(0,Mu.jsx)(`p`,{className:`t-caption ars-hero-ring-note`,children:S(x(`%s published product`,`%s published products`,e.products,`ai-rank-suite`),e.products.toLocaleString())})]}),(0,Mu.jsxs)(`div`,{className:`ars-hero-body`,children:[(0,Mu.jsx)(`span`,{className:`ars-hero-badge is-${l(e.readiness)===`good`?`good`:l(e.readiness)===`warn`?`warning`:`bad`}`,children:b(`Shop readiness`,`ai-rank-suite`)}),(0,Mu.jsx)(`h2`,{className:`ars-hero-title`,children:u}),(0,Mu.jsx)(`p`,{className:`ars-hero-why`,children:b(`Four things make the number: product data, product text, sellable pages and product schema. Each one below says what it is missing.`,`ai-rank-suite`)}),(0,Mu.jsxs)(`div`,{className:`ars-hero-actions`,children:[(0,Mu.jsx)(A,{onClick:()=>s(`/content`),children:b(`Optimise products`,`ai-rank-suite`)}),(0,Mu.jsx)(A,{variant:`ghost`,onClick:()=>o(!0),busy:i,children:b(`Re-read the catalogue`,`ai-rank-suite`)})]})]})]}),(0,Mu.jsx)(`div`,{className:`ars-hero-stats`,children:(e.pillars||[]).map(e=>(0,Mu.jsxs)(`div`,{className:`ars-hero-stat`,title:e.hint,children:[(0,Mu.jsxs)(`span`,{className:`ars-hero-stat-v is-${l(e.score)}`,children:[e.score,` / 100`]}),(0,Mu.jsx)(`span`,{className:`ars-hero-stat-l`,children:e.label}),(0,Mu.jsx)(`span`,{className:`ars-hero-stat-h`,children:e.hint})]},e.id))})]}),(0,Mu.jsx)(k,{title:b(`Where the catalogue is short`,`ai-rank-suite`),subtitle:b(`Products, not percentages. Each tile is a list of products to fix.`,`ai-rank-suite`),children:(0,Mu.jsx)(be,{columns:3,metrics:d.map(t=>({id:t.id,label:t.label,value:Number(t.value).toLocaleString(),sub:t.hint||(e.products?S(b(`%d%% of the catalogue`,`ai-rank-suite`),Math.round(t.value/e.products*100)):``),accent:t.value===0?`var(--ars-good)`:`var(--ars-warning)`}))})}),(0,Mu.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[(0,Mu.jsx)(k,{title:b(`Products pulling the score down`,`ai-rank-suite`),subtitle:e.unscored>0?S(x(`%s product has no score yet; analyse it under Content.`,`%s products have no score yet; analyse them under Content.`,e.unscored,`ai-rank-suite`),e.unscored.toLocaleString()):b(`The ten lowest AI-search scores in the catalogue.`,`ai-rank-suite`),action:(0,Mu.jsx)(A,{variant:`ghost`,onClick:()=>s(`/content`),children:b(`All products`,`ai-rank-suite`)}),children:(e.weakest||[]).length===0?(0,Mu.jsx)(`p`,{className:`t-caption`,children:b(`No product has been scored yet. Open Content and analyse the catalogue once; the queue appears here.`,`ai-rank-suite`)}):(0,Mu.jsx)(`ul`,{className:`ars-board`,children:e.weakest.map(e=>(0,Mu.jsx)(`li`,{className:`ars-board-row is-clickable`,children:(0,Mu.jsxs)(`button`,{type:`button`,className:`ars-board-hit`,onClick:()=>s(`/content/${e.id}`),children:[(0,Mu.jsx)(`span`,{className:`ars-board-label`,title:e.title,children:e.title}),(0,Mu.jsx)(`span`,{className:`ars-board-value tabular-nums`,children:(0,Mu.jsxs)(j,{tone:l(e.score)===`good`?`good`:l(e.score)===`warn`?`warning`:`serious`,children:[e.score,` / 100`]})})]})},e.id))})}),(0,Mu.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Mu.jsx)(k,{title:b(`Product schema`,`ai-rank-suite`),subtitle:b(`What a product page tells Google and the AI engines as structured data.`,`ai-rank-suite`),action:(0,Mu.jsx)(A,{variant:`ghost`,onClick:()=>s(`/schema/products`),children:b(`Settings`,`ai-rank-suite`)}),children:(0,Mu.jsx)(`div`,{className:`grid gap-2`,children:[[`product_schema`,b(`Product with price and availability`,`ai-rank-suite`)],[`identifiers`,b(`GTIN, MPN and brand`,`ai-rank-suite`)],[`shipping_details`,b(`Shipping details`,`ai-rank-suite`)],[`return_policy`,b(`Return policy`,`ai-rank-suite`)],[`noindex_cart`,b(`Cart and checkout kept out of the index`,`ai-rank-suite`)]].map(([t,n])=>(0,Mu.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-[13px]`,children:[(0,Mu.jsx)(`span`,{children:n}),(0,Mu.jsx)(j,{tone:e.schema?.[t]?`good`:`warning`,children:e.schema?.[t]?b(`On`,`ai-rank-suite`):b(`Off`,`ai-rank-suite`)})]},t))})}),(0,Mu.jsx)(k,{title:b(`Catalog feeds`,`ai-rank-suite`),subtitle:b(`The files Google Merchant Center and Meta read the catalogue from.`,`ai-rank-suite`),action:(0,Mu.jsx)(A,{variant:`ghost`,onClick:()=>s(`/feeds`),children:b(`Feeds`,`ai-rank-suite`)}),children:(0,Mu.jsx)(`div`,{className:`grid gap-2 text-[13px]`,children:[[`google`,b(`Google Merchant`,`ai-rank-suite`)],[`meta`,b(`Meta catalogue`,`ai-rank-suite`)]].map(([t,n])=>{let r=e.feeds?.[t]||{};return(0,Mu.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Mu.jsx)(`span`,{children:n}),r.items===null||r.items===void 0?(0,Mu.jsx)(j,{tone:`neutral`,children:b(`Not built`,`ai-rank-suite`)}):(0,Mu.jsx)(j,{tone:`good`,children:S(x(`%s item`,`%s items`,r.items,`ai-rank-suite`),Number(r.items).toLocaleString())})]},t)})})})]})]}),(0,Mu.jsx)(Ce,{hint:b(`Index bloat, dead ends, category text and the data gaps, counted across the whole catalogue.`,`ai-rank-suite`),children:b(`Catalogue audit`,`ai-rank-suite`)}),(0,Mu.jsx)(Vt,{})]})}var ju,Mu,Nu=o((()=>{ju=u(f(),1),C(),D(),at(),Gt(),Mu=O()})),Pu=c({default:()=>Fu});function Fu(){let[e,t]=(0,Iu.useState)(`28`),[n,r]=(0,Iu.useState)(null),[i,a]=(0,Iu.useState)(null),[o,s]=(0,Iu.useState)(null),[c,l]=(0,Iu.useState)(null),[u,d]=(0,Iu.useState)(null),[f,p]=(0,Iu.useState)(!1);(0,Iu.useEffect)(()=>{E.get(`/gsc/status`).then(r).catch(e=>d(e.message)),E.get(`/bing`).then(l).catch(()=>l(null))},[]),(0,Iu.useEffect)(()=>{n?.connected&&(p(!0),Promise.allSettled([E.get(`/gsc/performance?days=${e}`),E.get(`/analytics/report?days=${e}`)]).then(([e,t])=>{a(e.status===`fulfilled`?e.value:{error:e.reason?.message}),s(t.status===`fulfilled`?t.value:{error:t.reason?.message}),p(!1)}))},[n?.connected,e]);let m=e=>{window.location.hash=e};if(u)return(0,Lu.jsx)(M,{tone:`serious`,children:u});if(!n)return(0,Lu.jsx)(k,{children:b(`Reading the connections…`,`ai-rank-suite`)});if(!n.connected)return(0,Lu.jsxs)(`div`,{className:`ars-page`,children:[(0,Lu.jsx)(he,{tone:`neutral`,text:b(`Search Console and Analytics are not connected yet.`,`ai-rank-suite`),sub:b(`One sign-in with Google connects both, read-only. This screen then shows clicks, impressions, users and sessions for the same days side by side.`,`ai-rank-suite`),action:b(`Connect Google`,`ai-rank-suite`),onAction:()=>m(`/search-console`)}),(0,Lu.jsx)(k,{title:b(`What this screen will show`,`ai-rank-suite`),children:(0,Lu.jsxs)(`ul`,{className:`m-0 pl-5 text-[13px] grid gap-1`,children:[(0,Lu.jsx)(`li`,{children:b(`Search: clicks, impressions, click-through rate and average position, against the same number of days before.`,`ai-rank-suite`)}),(0,Lu.jsx)(`li`,{children:b(`Visits: users, sessions, page views and engagement from Google Analytics 4, for the same period.`,`ai-rank-suite`)}),(0,Lu.jsx)(`li`,{children:b(`The two lines on one time axis, and the top pages with both numbers next to each other.`,`ai-rank-suite`)}),(0,Lu.jsx)(`li`,{children:b(`Bing beside Google, once its API key is stored.`,`ai-rank-suite`)})]})})]});let h=i?.totals||{},g=i?.previous||{},_=o?.totals||{},v=(e,t=!1)=>e==null?`plain`:(t?-e:e)>=0?`green`:`red`,y=(e,t)=>{let n=Bu(Number(e||0),Number(t||0));return n===null?void 0:n},x=new Map((o?.pages||[]).map(e=>[String(e.path||e.page||``).replace(/\/$/,``),e])),C=(i?.pages||[]).slice(0,10).map(e=>{let t=``;try{t=new URL(e.page||e.key||e.url||``,window.location.origin).pathname.replace(/\/$/,``)}catch{t=String(e.page||``).replace(/\/$/,``)}let n=x.get(t)||x.get(t+`/`)||null;return{path:t||`/`,clicks:e.clicks,impressions:e.impressions,position:e.position,users:n?n.users:null,views:n?n.views??n.pageviews:null}});return(0,Lu.jsxs)(`div`,{className:`ars-page`,children:[(0,Lu.jsx)(he,{tone:`good`,text:S(b(`Connected to %s.`,`ai-rank-suite`),n.property||b(`your Search Console property`,`ai-rank-suite`)),sub:b(`Search and visits for the same days, each against the same number of days immediately before. Detail and settings sit behind Search Console and Analytics.`,`ai-rank-suite`),action:b(`Search Console`,`ai-rank-suite`),onAction:()=>m(`/search-console`)}),(0,Lu.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,Lu.jsx)(Ve,{options:Ru.map(e=>({id:e.id,label:S(b(`%s days`,`ai-rank-suite`),e.label)})),value:e,onChange:t,label:b(`Period`,`ai-rank-suite`)}),f&&(0,Lu.jsx)(j,{tone:`neutral`,children:b(`Reading…`,`ai-rank-suite`)})]}),(0,Lu.jsxs)(k,{title:b(`Search`,`ai-rank-suite`),subtitle:b(`Google Search Console. Position is an average; lower is better.`,`ai-rank-suite`),action:(0,Lu.jsx)(A,{variant:`ghost`,onClick:()=>m(`/search-console`),children:b(`Queries and pages`,`ai-rank-suite`)}),children:[i?.error?(0,Lu.jsx)(M,{tone:`warning`,children:i.error}):(0,Lu.jsxs)(`div`,{className:`ars-metrics`,"data-columns":`4`,style:{"--ars-metrics-cols":4},children:[(0,Lu.jsx)(ze,{label:b(`Clicks`,`ai-rank-suite`),value:zu(h.clicks),delta:y(h.clicks,g.clicks),tone:v(y(h.clicks,g.clicks))}),(0,Lu.jsx)(ze,{label:b(`Impressions`,`ai-rank-suite`),value:zu(h.impressions),delta:y(h.impressions,g.impressions),tone:v(y(h.impressions,g.impressions))}),(0,Lu.jsx)(ze,{label:b(`Click-through rate`,`ai-rank-suite`),value:`${Number(h.ctr||0).toFixed(1)}%`}),(0,Lu.jsx)(ze,{label:b(`Average position`,`ai-rank-suite`),value:Number(h.position||0).toFixed(1),delta:g.position?Math.round((Number(h.position)-Number(g.position))*10)/10:void 0,tone:g.position?Number(h.position)<=Number(g.position)?`green`:`red`:`plain`})]}),i?.series?.length>2&&(0,Lu.jsx)(`div`,{className:`mt-3`,children:(0,Lu.jsx)(je,{data:i.series.map(e=>({date:e.date,value:e.clicks})),label:b(`Clicks`,`ai-rank-suite`),color:`var(--ars-brand)`,height:120,formatValue:e=>zu(e),bleed:!0})})]}),(0,Lu.jsxs)(k,{title:b(`Visits`,`ai-rank-suite`),subtitle:b(`Google Analytics 4, the same period.`,`ai-rank-suite`),action:(0,Lu.jsx)(A,{variant:`ghost`,onClick:()=>m(`/analytics`),children:b(`Analytics`,`ai-rank-suite`)}),children:[o?.error?(0,Lu.jsx)(M,{tone:`warning`,children:o.error}):o&&!o.totals?(0,Lu.jsx)(M,{tone:`neutral`,children:b(`Analytics is not set up for this site yet. Pick the GA4 property under Analytics; the same Google sign-in covers it.`,`ai-rank-suite`)}):(0,Lu.jsxs)(`div`,{className:`ars-metrics`,"data-columns":`4`,style:{"--ars-metrics-cols":4},children:[(0,Lu.jsx)(ze,{label:b(`Users`,`ai-rank-suite`),value:zu(_.users)}),(0,Lu.jsx)(ze,{label:b(`Sessions`,`ai-rank-suite`),value:zu(_.sessions)}),(0,Lu.jsx)(ze,{label:b(`Page views`,`ai-rank-suite`),value:zu(_.pageviews)}),(0,Lu.jsx)(ze,{label:b(`Engagement`,`ai-rank-suite`),value:`${Number(_.engagement||0).toFixed(1)}%`})]}),o?.series?.length>2&&(0,Lu.jsx)(`div`,{className:`mt-3`,children:(0,Lu.jsx)(je,{data:o.series,label:b(`Users`,`ai-rank-suite`),color:`var(--ars-good)`,height:120,formatValue:e=>zu(e),bleed:!0})})]}),C.length>0&&(0,Lu.jsx)(k,{title:b(`Top pages, both numbers`,`ai-rank-suite`),subtitle:b(`The pages Google shows most, with what Analytics saw on them in the same days.`,`ai-rank-suite`),flush:!0,children:(0,Lu.jsxs)(`table`,{className:`ars-table`,children:[(0,Lu.jsx)(`thead`,{children:(0,Lu.jsxs)(`tr`,{children:[(0,Lu.jsx)(`th`,{children:b(`Page`,`ai-rank-suite`)}),(0,Lu.jsx)(`th`,{className:`text-right`,children:b(`Clicks`,`ai-rank-suite`)}),(0,Lu.jsx)(`th`,{className:`text-right`,children:b(`Impressions`,`ai-rank-suite`)}),(0,Lu.jsx)(`th`,{className:`text-right`,children:b(`Position`,`ai-rank-suite`)}),(0,Lu.jsx)(`th`,{className:`text-right`,children:b(`Users`,`ai-rank-suite`)})]})}),(0,Lu.jsx)(`tbody`,{children:C.map(e=>(0,Lu.jsxs)(`tr`,{children:[(0,Lu.jsx)(`td`,{className:`ars-mono text-[12px]`,children:e.path}),(0,Lu.jsx)(`td`,{className:`text-right tabular-nums`,children:zu(e.clicks)}),(0,Lu.jsx)(`td`,{className:`text-right tabular-nums`,children:zu(e.impressions)}),(0,Lu.jsx)(`td`,{className:`text-right tabular-nums`,children:Number(e.position||0).toFixed(1)}),(0,Lu.jsx)(`td`,{className:`text-right tabular-nums`,children:e.users===null?`–`:zu(e.users)})]},e.path))})]})}),(0,Lu.jsx)(k,{title:b(`Bing`,`ai-rank-suite`),subtitle:c?.has_key?b(`Connected. Clicks and index coverage on Bing sit behind Search Console → Bing.`,`ai-rank-suite`):b(`Not connected. Bing is the index Copilot answers from; its numbers appear here once the API key is stored.`,`ai-rank-suite`),action:(0,Lu.jsx)(A,{variant:`ghost`,onClick:()=>m(`/search-console/bing`),children:b(`Bing`,`ai-rank-suite`)})})]})}var Iu,Lu,Ru,zu,Bu,Vu=o((()=>{Iu=u(f(),1),C(),D(),at(),Lu=O(),Ru=[{id:`7`,label:`7`},{id:`28`,label:`28`},{id:`90`,label:`90`}],zu=e=>Number(e||0).toLocaleString(),Bu=(e,t)=>t>0?Math.round((e-t)/t*100):null})),Hu=c({default:()=>Uu});function Uu(){let[e,t]=(0,Wu.useState)(null),[n,r]=(0,Wu.useState)(!1),[i,a]=(0,Wu.useState)(!1),[o,s]=(0,Wu.useState)(null),[c,l]=(0,Wu.useState)(null),[u,d]=(0,Wu.useState)(!1),f=()=>E.get(`/coexistence`).then(t).catch(e=>s(e.message));if((0,Wu.useEffect)(()=>{f()},[]),!e)return(0,Gu.jsx)(_e,{error:o});let p=e.settings,m=e.primary,h=async e=>{r(!0),s(null);try{let n=await E.put(`/coexistence`,{...p,...e});t(n),a(!0),setTimeout(()=>a(!1),2200)}catch(e){s(e.message)}finally{r(!1)}};return(0,Gu.jsxs)(`div`,{className:`ars-page`,children:[(0,Gu.jsx)(k,{title:b(`Coexistence`,`ai-rank-suite`),subtitle:b(`Keep the SEO plugin you already trust. Add the AI layer without a single duplicate tag.`,`ai-rank-suite`),action:m?(0,Gu.jsxs)(j,{tone:`warning`,children:[m.label,` `,m.version]}):e.unknown?(0,Gu.jsx)(j,{tone:`warning`,children:b(`Something else writes tags`,`ai-rank-suite`)}):(0,Gu.jsx)(j,{tone:`good`,children:b(`No other SEO plugin`,`ai-rank-suite`)}),children:(0,Gu.jsxs)(`div`,{className:`grid gap-4`,children:[m?(0,Gu.jsxs)(M,{tone:`info`,children:[(0,Gu.jsx)(`strong`,{children:m.label}),` `,S(b(`is active and writes %d of the same tags we do. Pick who owns what below — nothing is duplicated either way.`,`ai-rank-suite`),m.surfaces.length)]}):e.unknown?(0,Gu.jsx)(M,{tone:`warning`,children:b(`The last scan found SEO tags on this site that are not ours, from something we cannot name — a white-labelled build, a theme with its own SEO fields, or code in functions.php. AI Rank Suite owns every tag and strips the other copy, so the page still has exactly one of each. Run the scan again below to confirm.`,`ai-rank-suite`)}):(0,Gu.jsx)(M,{tone:`good`,children:b(`Nothing else is writing SEO tags on this site, so AI Rank Suite owns everything. Install another SEO plugin later and this screen switches to safe mode by itself.`,`ai-rank-suite`)}),(0,Gu.jsxs)(`div`,{children:[(0,Gu.jsx)(`label`,{className:`block font-medium mb-2`,children:b(`Mode`,`ai-rank-suite`)}),(0,Gu.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:Ku.map(e=>(0,Gu.jsxs)(`button`,{type:`button`,onClick:()=>h({mode:e.id}),className:`ars-pick${p.mode===e.id?` is-active`:``}`,children:[(0,Gu.jsxs)(`span`,{className:`ars-pick-title`,children:[e.label,p.mode===e.id&&(0,Gu.jsx)(`span`,{style:{marginLeft:`auto`,color:`var(--ars-brand)`},children:`✓`})]}),(0,Gu.jsx)(`span`,{className:`ars-pick-note`,children:e.note})]},e.id))})]}),(0,Gu.jsx)(Ee,{checked:!!p.enforce,onChange:e=>h({enforce:e}),label:b(`Enforce on the rendered page (duplicate-tag firewall)`,`ai-rank-suite`)}),(0,Gu.jsxs)(ot,{title:b(`How the firewall works`,`ai-rank-suite`),children:[(0,Gu.jsxs)(`p`,{children:[b(`Deciding who`,`ai-rank-suite`),` `,(0,Gu.jsx)(`em`,{children:b(`should`,`ai-rank-suite`)}),` `,b(`write a tag is not enough — plugins hook`,`ai-rank-suite`),` `,(0,Gu.jsx)(`code`,{children:`wp_head`}),` `,b(`at every priority, and some write from the theme. So the page itself is checked: the head is captured as it renders, split into “ours” and “everything else”, and whichever copy does not own that surface is removed before the browser sees it.`,`ai-rank-suite`)]}),(0,Gu.jsx)(`p`,{children:b(`The result is exactly one canonical, one description and one JSON-LD graph — whoever wrote them. Turn this off only if you want to inspect the raw output of both plugins.`,`ai-rank-suite`)})]}),o&&(0,Gu.jsx)(M,{tone:`serious`,children:o}),i&&(0,Gu.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]})]})}),(0,Gu.jsx)(k,{title:b(`Who owns which tag`,`ai-rank-suite`),subtitle:p.mode===`manual`?b(`Your choices, applied exactly`,`ai-rank-suite`):S(b(`Derived from the “%s” mode — switch to Per tag to edit`,`ai-rank-suite`),Ku.find(e=>e.id===p.mode)?.label),children:(0,Gu.jsx)(`div`,{className:`grid gap-2`,children:e.surfaces.map(t=>{let n=e.effective[t.id]||`airs`;return(0,Gu.jsxs)(`div`,{className:`flex items-center justify-between gap-4 px-3 py-2.5 flex-wrap`,style:{background:`var(--ars-surface-2)`,borderRadius:`var(--ars-r-sm)`},children:[(0,Gu.jsxs)(`div`,{className:`min-w-[220px]`,children:[(0,Gu.jsx)(`div`,{className:`font-semibold text-[13px]`,children:t.label}),(0,Gu.jsx)(`div`,{className:`text-[11.5px] mt-0.5`,style:{color:`var(--ars-ink-3)`},children:t.desc})]}),p.mode===`manual`?(0,Gu.jsx)(He,{value:n,onChange:n=>h({ownership:{...e.effective,[t.id]:n}}),options:qu.map(e=>({id:e.id,label:e.id===`other`&&m?m.label:e.label}))}):(0,Gu.jsx)(j,{tone:n===`airs`?`good`:n===`both`?`warning`:`neutral`,children:n===`airs`?`AI Rank Suite`:n===`both`?b(`Both (not deduplicated)`,`ai-rank-suite`):m?.label||b(`Other plugin`,`ai-rank-suite`)})]},t.id)})})}),(0,Gu.jsx)(k,{title:b(`Live conflict scan`,`ai-rank-suite`),subtitle:b(`Fetches your home page and counts every tag actually rendered — proof, not a promise`,`ai-rank-suite`),action:(0,Gu.jsx)(A,{variant:`ghost`,busy:u,onClick:async()=>{d(!0),s(null);try{let e=await E.post(`/coexistence/scan`,{});l(e),t(t=>t&&{...t,unknown:!!e.unknown})}catch(e){s(e.message)}finally{d(!1)}},children:b(`Run scan`,`ai-rank-suite`)}),children:c?(0,Gu.jsxs)(`div`,{className:`grid gap-3`,children:[c.clean?(0,Gu.jsx)(M,{tone:`good`,children:b(`No duplicate tags. Both plugins are running side by side cleanly.`,`ai-rank-suite`)}):(0,Gu.jsx)(M,{tone:`warning`,children:S(x(`%d surface is written by both plugins. Turn the firewall on, or hand those surfaces to one owner.`,`%d surfaces are written by both plugins. Turn the firewall on, or hand those surfaces to one owner.`,c.duplicates,`ai-rank-suite`),c.duplicates)}),(0,Gu.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Gu.jsxs)(`table`,{className:`ars-table`,children:[(0,Gu.jsx)(`thead`,{children:(0,Gu.jsxs)(`tr`,{children:[(0,Gu.jsx)(`th`,{children:b(`Tag`,`ai-rank-suite`)}),(0,Gu.jsx)(`th`,{style:{textAlign:`right`},children:b(`From us`,`ai-rank-suite`)}),(0,Gu.jsx)(`th`,{style:{textAlign:`right`},children:b(`From others`,`ai-rank-suite`)}),(0,Gu.jsx)(`th`,{style:{textAlign:`right`},children:b(`Status`,`ai-rank-suite`)})]})}),(0,Gu.jsx)(`tbody`,{children:c.rows.map(e=>(0,Gu.jsxs)(`tr`,{children:[(0,Gu.jsx)(`td`,{children:e.label}),(0,Gu.jsx)(`td`,{style:{textAlign:`right`},children:e.ours}),(0,Gu.jsx)(`td`,{style:{textAlign:`right`},children:e.theirs}),(0,Gu.jsx)(`td`,{style:{textAlign:`right`},children:e.clash?(0,Gu.jsx)(j,{tone:`serious`,children:b(`Duplicated`,`ai-rank-suite`)}):(0,Gu.jsx)(j,{tone:`good`,children:b(`Clean`,`ai-rank-suite`)})})]},e.id))})]})})]}):(0,Gu.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Run the scan after changing anything above. It requests one page as an anonymous visitor and reports what the browser would receive.`,`ai-rank-suite`)})}),e.detected.length>0&&(0,Gu.jsx)(k,{title:b(`Detected on this site`,`ai-rank-suite`),subtitle:b(`Everything that writes SEO or social tags`,`ai-rank-suite`),children:(0,Gu.jsx)(`div`,{className:`grid gap-2`,children:e.detected.map(e=>(0,Gu.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,Gu.jsxs)(`div`,{className:`font-medium text-[13px]`,children:[e.label,` `,e.version&&(0,Gu.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:e.version})]}),(0,Gu.jsxs)(`div`,{className:`text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:[b(`writes:`,`ai-rank-suite`),` `,e.surfaces.join(`, `)]})]},e.id))})})]})}var Wu,Gu,Ku,qu,Ju=o((()=>{Wu=u(f(),1),C(),D(),at(),ct(),Gu=O(),Ku=[{id:`auto`,label:b(`Automatic`,`ai-rank-suite`),note:b(`Detect what is installed and pick the safe option. Recommended.`,`ai-rank-suite`)},{id:`geo`,label:b(`GEO layer only`,`ai-rank-suite`),note:b(`Your current SEO plugin keeps titles, descriptions and canonicals. We add the AI layer on top.`,`ai-rank-suite`)},{id:`solo`,label:b(`Take over`,`ai-rank-suite`),note:b(`AI Rank Suite owns every tag. Whatever else writes them — named plugin or not — its copy is stripped from the page.`,`ai-rank-suite`)},{id:`manual`,label:b(`Per tag`,`ai-rank-suite`),note:b(`Decide surface by surface who writes what.`,`ai-rank-suite`)}],qu=[{id:`airs`,label:b(`AI Rank Suite`,`ai-rank-suite`)},{id:`other`,label:b(`Other plugin`,`ai-rank-suite`)},{id:`both`,label:b(`Both`,`ai-rank-suite`)}]}));function Yu({hasRun:e}){let[t,n]=(0,Xu.useState)(null),[r,i]=(0,Xu.useState)(!1),[a,o]=(0,Xu.useState)(null);return(0,Zu.jsxs)(k,{title:b(`Audit copilot`,`ai-rank-suite`),subtitle:b(`Turns the findings into a plan: grouped, explained, with effort and risk, in the order worth working. The checks stay the source of truth — the AI only reads them.`,`ai-rank-suite`),icon:(0,Zu.jsx)(bt,{size:18}),action:(0,Zu.jsxs)(A,{onClick:async()=>{i(!0),o(null);try{n(await E.post(`/ai/audit/explain`,{}))}catch(e){o(e.message)}finally{i(!1)}},busy:r,disabled:!e,children:[(0,Zu.jsx)(bt,{size:13}),` `,b(t?`Explain again`:`Explain this audit`,`ai-rank-suite`)]}),children:[!e&&(0,Zu.jsx)(`span`,{className:`t-caption`,children:b(`Run the audit first; the copilot explains its results.`,`ai-rank-suite`)}),e&&!t&&!a&&!r&&(0,Zu.jsxs)(`div`,{className:`ars-copilot-idle`,children:[(0,Zu.jsx)(`span`,{className:`ars-copilot-idle-mark`,"aria-hidden":!0,children:(0,Zu.jsx)(bt,{size:14})}),(0,Zu.jsx)(`span`,{children:b(`Nothing explained yet. The AI reads every finding of the last run, groups them by cause, and writes the steps in the order worth working — with effort and risk for each group.`,`ai-rank-suite`)})]}),r&&!t&&(0,Zu.jsx)(`span`,{className:`t-caption`,children:b(`Reading the findings…`,`ai-rank-suite`)}),a&&(0,Zu.jsx)(M,{tone:`serious`,children:a}),t&&t.groups.length===0&&(0,Zu.jsx)(M,{tone:`good`,children:b(`Nothing to explain — the run has no findings.`,`ai-rank-suite`)}),t&&t.groups.length>0&&(0,Zu.jsxs)(`div`,{className:`grid gap-3`,children:[t.groups.map((e,n)=>{let r=t.findings.filter(t=>e.finding_ids.includes(t.id)),i=r.reduce((e,t)=>e+t.count,0);return(0,Zu.jsxs)(`div`,{className:`ars-copilot-group`,children:[(0,Zu.jsxs)(`div`,{className:`flex items-start justify-between gap-3 flex-wrap`,children:[(0,Zu.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Zu.jsx)(`span`,{className:`ars-copilot-rank`,children:e.priority}),(0,Zu.jsx)(`span`,{className:`font-semibold text-[13.5px]`,children:e.title})]}),(0,Zu.jsxs)(`span`,{className:`flex items-center gap-1.5 flex-wrap`,children:[(0,Zu.jsxs)(j,{tone:Qu(e.effort),children:[b(`effort`,`ai-rank-suite`),` `,e.effort]}),(0,Zu.jsxs)(j,{tone:Qu(e.risk),children:[b(`risk`,`ai-rank-suite`),` `,e.risk]}),(0,Zu.jsxs)(j,{tone:`neutral`,children:[i.toLocaleString(),` `,b(`pages`,`ai-rank-suite`)]})]})]}),e.cause&&(0,Zu.jsxs)(`p`,{className:`m-0 text-[12.5px]`,children:[(0,Zu.jsxs)(`strong`,{children:[b(`Cause`,`ai-rank-suite`),`:`]}),` `,e.cause]}),e.impact&&(0,Zu.jsxs)(`p`,{className:`m-0 text-[12.5px]`,children:[(0,Zu.jsxs)(`strong`,{children:[b(`Impact`,`ai-rank-suite`),`:`]}),` `,e.impact]}),(0,Zu.jsx)(`ol`,{className:`m-0 pl-5 grid gap-1 text-[12.5px]`,children:e.steps.map((e,t)=>(0,Zu.jsx)(`li`,{children:e},t))}),(0,Zu.jsx)(`div`,{className:`flex gap-1 flex-wrap`,children:r.map(e=>(0,Zu.jsxs)(j,{tone:e.severity===`critical`?`serious`:e.severity===`warning`?`warning`:`neutral`,children:[e.label,` · `,e.count]},e.id))})]},n)}),t.receipt&&t.receipt.model&&(0,Zu.jsxs)(`span`,{className:`t-caption`,children:[t.receipt.provider,` · `,t.receipt.model,` · `,t.receipt.cost,` · `,t.receipt.latency_ms,` ms`]})]})]})}var Xu,Zu,Qu,$u=o((()=>{Xu=u(f(),1),C(),D(),at(),Ft(),Zu=O(),Qu=e=>e===`high`?`serious`:e===`medium`?`warning`:`good`})),ed=c({default:()=>nd});function td(){let[e,t]=(0,od.useState)(null),[n,r]=(0,od.useState)(!1),[i,a]=(0,od.useState)(null),[o,s]=(0,od.useState)(null);if((0,od.useEffect)(()=>{E.get(`/audit/alerts`).then(t).catch(e=>s(e.message))},[]),!e)return(0,Q.jsx)(Ze,{blocks:3,label:b(`Loading the audit`,`ai-rank-suite`)});let c=e.settings,l=async e=>{r(!0),s(null);try{t(await E.put(`/audit/alerts`,{...c,...e}))}catch(e){s(e.message)}finally{r(!1)}};return(0,Q.jsx)(k,{title:b(`Alerts`,`ai-rank-suite`),subtitle:b(`An email the day something breaks, not at the end of the month`,`ai-rank-suite`),action:c.enabled&&e.next?(0,Q.jsxs)(j,{tone:`good`,children:[`Next check `,new Date(e.next*1e3).toLocaleString()]}):(0,Q.jsx)(j,{tone:`neutral`,children:b(`Off`,`ai-rank-suite`)}),children:(0,Q.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Q.jsx)(Ee,{checked:!!c.enabled,onChange:e=>l({enabled:e}),label:b(`Audit the site on a schedule and email new issues`,`ai-rank-suite`)}),c.enabled&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`How often`,`ai-rank-suite`)}),(0,Q.jsxs)(`select`,{value:c.frequency,onChange:e=>l({frequency:e.target.value}),children:[(0,Q.jsx)(`option`,{value:`daily`,children:b(`Daily`,`ai-rank-suite`)}),(0,Q.jsx)(`option`,{value:`weekly`,children:b(`Weekly`,`ai-rank-suite`)})]})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Alert on`,`ai-rank-suite`)}),(0,Q.jsxs)(`select`,{value:c.severity,onChange:e=>l({severity:e.target.value}),children:[(0,Q.jsx)(`option`,{value:`critical`,children:b(`Critical only`,`ai-rank-suite`)}),(0,Q.jsx)(`option`,{value:`warning`,children:b(`Critical and warnings`,`ai-rank-suite`)})]})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Send to`,`ai-rank-suite`)}),(0,Q.jsx)(`input`,{type:`text`,placeholder:b(`Defaults to the admin email`,`ai-rank-suite`),defaultValue:c.recipients,onBlur:e=>l({recipients:e.target.value})})]})]}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Q.jsx)(A,{variant:`ghost`,busy:n,onClick:async()=>{r(!0),a(null);try{let e=await E.post(`/audit/alerts/test`,{});a(e.new===0?b(`Nothing new since the last check — no mail sent, which is the point.`,`ai-rank-suite`):S(x(`%d new issue found and mailed.`,`%d new issues found and mailed.`,e.new,`ai-rank-suite`),e.new))}catch(e){s(e.message)}finally{r(!1)}},children:b(`Check now`,`ai-rank-suite`)}),i&&(0,Q.jsx)(`span`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:i})]})]}),(0,Q.jsxs)(ot,{title:b(`What counts as an alert`,`ai-rank-suite`),children:[(0,Q.jsx)(`p`,{children:b(`Only findings that were not present at the previous check. A weekly summary of everything already known gets read once and filtered forever; the failures that cost money are the sudden ones — a deploy carrying “discourage search engines”, a theme update dropping the canonical, a plugin noindexing a category.`,`ai-rank-suite`)}),(0,Q.jsx)(`p`,{children:b(`A problem you fixed that comes back alerts again, because that is genuinely news rather than a repeat.`,`ai-rank-suite`)})]}),o&&(0,Q.jsx)(M,{tone:`serious`,children:o})]})})}function nd(){let[e,t]=(0,od.useState)(null),[n,r]=(0,od.useState)(null),[i,a]=(0,od.useState)(!1),[o,s]=(0,od.useState)(null),[c,l]=(0,od.useState)(``),u=(0,od.useCallback)(async()=>{a(!0);try{let e=await E.get(`/audit/export`),t=``+(Array.isArray(e?.rows)?e.rows:[]).map(e=>e.map(e=>`"${String(e??``).replace(/"/g,`""`)}"`).join(`,`)).join(`\r
    105 `),n=URL.createObjectURL(new Blob([t],{type:`text/csv;charset=utf-8`})),r=document.createElement(`a`);r.href=n,r.download=e?.filename||`site-audit.csv`,document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(n)}finally{a(!1)}},[]),[d,f]=(0,od.useState)(``),[p,m]=(0,od.useState)(``),[h,g]=(0,od.useState)(``),[_,v]=(0,od.useState)([]),[y,C]=(0,od.useState)(1),[w,ee]=(0,od.useState)(!1),[T,te]=(0,od.useState)(null),ne=(0,od.useRef)(!1),ie=(0,od.useRef)(null),D=re.i18n||{multilingual:!1,perPost:!1,languages:[]},ae=()=>{requestAnimationFrame(()=>{ie.current?.scrollIntoView({behavior:`smooth`,block:`start`})})},oe=(0,od.useCallback)((e=c,t=p,n=y,i=d,a=h)=>E.get(`/audit/report?group=${e}&severity=${t}&page=${n}&per_page=50&lang=${encodeURIComponent(i)}&type=${encodeURIComponent(a)}`).then(r).catch(e=>te(e.message)),[c,p,y,d,h]);(0,od.useEffect)(()=>{E.get(`/audit/status`).then(t).catch(e=>te(e.message)),E.get(`/audit/trend?limit=20`).then(e=>s(e.runs||[])).catch(()=>s([])),oe()},[]),(0,od.useEffect)(()=>{oe(c,p,y,d,h)},[c,p,y,d,h]),(0,od.useEffect)(()=>{E.get(`/content/library`).then(e=>v((e.types||[]).filter(e=>e.total>0))).catch(()=>{})},[]);let se=(0,od.useCallback)(async()=>{if(!ne.current){ne.current=!0;try{for(;;){let e=await E.post(`/audit/tick`,{});if(t(e),e.state!==`running`)break}await oe()}catch(e){te(e.message)}finally{ne.current=!1,ee(!1)}}},[oe]);(0,od.useEffect)(()=>{e?.state===`running`&&!ne.current&&(ee(!0),se())},[e?.state,se]);let ce=async()=>{ee(!0),te(null);try{t(await E.post(`/audit/start`,{})),se()}catch(e){te(e.message),ee(!1)}},le=async()=>{try{t(await E.post(`/audit/cancel`,{}))}catch(e){te(e.message)}},ue=async(e,t=!0)=>{try{await E.post(`/audit/ignore`,{check_id:e,on:t}),await oe()}catch(e){te(e.message)}},de=async e=>{try{await E.post(`/audit/ignore`,{fingerprint:e,on:!0}),await oe()}catch(e){te(e.message)}},O=e?.state===`running`,fe=Math.max(1,...(n?.checks||[]).slice(0,8).map(e=>e.count||0)),pe=n?.totals||{critical:0,warning:0,notice:0},me=new Set((n?.checks||[]).map(e=>e.id)).size,he=Math.max(0,30-me),ge=!!n,_e=ge&&!n.run_id,ye=(()=>{if(!ge||_e)return null;let e=pe.critical,t=pe.warning,r=pe.notice,i=n.checked||0;return e===0&&t===0&&r===0?{tone:`good`,badge:b(`All clear`,`ai-rank-suite`),text:S(x(`The single page checked passed all 30 rules.`,`Every one of %s pages passed all 30 rules.`,i,`ai-rank-suite`),i.toLocaleString()),why:b(`Nothing comparative is wrong: no duplicates, no orphans, no blocked pages. Run again after a publishing sprint.`,`ai-rank-suite`),action:null}:e>0?{tone:`bad`,badge:b(`Needs attention`,`ai-rank-suite`),text:S(x(`%d critical problem is costing you search traffic today.`,`%d critical problems are costing you search traffic today.`,e,`ai-rank-suite`),e),why:S(b(`%1$s warnings and %2$s notices sit behind them across %3$s pages. Clear the criticals first — each one blocks pages from ranking regardless of how good the content is.`,`ai-rank-suite`),t.toLocaleString(),r.toLocaleString(),i.toLocaleString()),action:b(`Show the criticals`,`ai-rank-suite`),severity:`critical`}:t>0?{tone:`warning`,badge:b(`Room to improve`,`ai-rank-suite`),text:S(b(`Nothing is blocking, but %1$s warnings across %2$s pages hold the site back.`,`ai-rank-suite`),t.toLocaleString(),i.toLocaleString()),why:b(`Thin content, duplicate descriptions and unlinked pages are the usual weight here. Work them by rule, not by page — one fix clears hundreds.`,`ai-rank-suite`),action:b(`Show the warnings`,`ai-rank-suite`),severity:`warning`}:{tone:`good`,badge:b(`Healthy`,`ai-rank-suite`),text:S(b(`Only %1$s notices remain across %2$s pages.`,`ai-rank-suite`),r.toLocaleString(),i.toLocaleString()),why:b(`Nothing here costs traffic. Worth clearing on a quiet afternoon.`,`ai-rank-suite`),action:b(`Show the notices`,`ai-rank-suite`),severity:`notice`}})(),be=(e,t=``)=>{m(e),l(t),C(1),ae()},xe=O?(0,Q.jsx)(A,{variant:`ghost`,onClick:le,children:b(`Stop`,`ai-rank-suite`)}):(0,Q.jsxs)(A,{onClick:ce,busy:w,children:[(0,Q.jsx)(yt,{size:13}),` `,b(_e?`Run first audit`:`Run audit again`,`ai-rank-suite`)]});return(0,Q.jsxs)(`div`,{className:`ars-page`,children:[(O||!ge||_e)&&(0,Q.jsxs)(k,{title:b(`Site Audit`,`ai-rank-suite`),subtitle:b(`Every published page checked against 37 rules: the comparative problems a single-page score cannot see`,`ai-rank-suite`),action:xe,children:[O?(0,Q.jsx)(Ne,{label:e.phase===`pages`?S(b(`Checking pages — %1$s of %2$s`,`ai-rank-suite`),e.done,e.total):e.phase===`duplicates`?b(`Comparing every page against every other…`,`ai-rank-suite`):b(`Checking site foundations…`,`ai-rank-suite`),total:100,percent:e.percent,note:S(x(`%s finding so far. The run continues in slices — leave this tab open.`,`%s findings so far. The run continues in slices — leave this tab open.`,e.issues,`ai-rank-suite`),e.issues.toLocaleString())}):ge?(0,Q.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Q.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Nothing audited yet. The first run reads every published page, then compares them against each other.`,`ai-rank-suite`)}),(0,Q.jsxs)(ot,{title:b(`What the audit finds that a page score cannot`,`ai-rank-suite`),children:[(0,Q.jsx)(`p`,{children:b(`A per-page score is blind to everything comparative. Forty product pages can each score 80 and still share one description; a category can be noindexed by a theme setting nobody remembers; a page can be perfect and completely unlinked, so no crawler reaches it.`,`ai-rank-suite`)}),(0,Q.jsx)(`p`,{children:b(`The audit runs those checks across the whole site: duplicate titles, descriptions and H1s, orphan pages, foreign canonicals, thin content, missing structured data, and — on a shop — products without an image, price, identifier, brand or description, which is exactly what Google Merchant rejects.`,`ai-rank-suite`)})]})]}):(0,Q.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Loading…`,`ai-rank-suite`)}),T&&(0,Q.jsx)(M,{tone:`serious`,children:T})]}),ge&&!_e&&!O&&ye&&(0,Q.jsxs)(`div`,{className:`ars-hero`,children:[(0,Q.jsx)(`div`,{className:`ars-hero-ring`,children:(0,Q.jsx)(Oe,{value:n.score,size:132,label:b(`Audit score`,`ai-rank-suite`),onLight:!0})}),(0,Q.jsxs)(`div`,{className:`ars-hero-body`,children:[(0,Q.jsx)(`span`,{className:`ars-hero-badge is-${ye.tone}`,children:ye.badge}),(0,Q.jsx)(`h2`,{className:`ars-hero-title`,children:ye.text}),(0,Q.jsx)(`p`,{className:`ars-hero-why`,children:ye.why}),(0,Q.jsxs)(`div`,{className:`ars-hero-actions`,children:[ye.action&&(0,Q.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:()=>be(ye.severity),children:ye.action}),xe,n.delta&&(0,Q.jsxs)(`span`,{className:`ars-delta-strip`,title:S(b(`Compared with the previous run %s`,`ai-rank-suite`),n.delta.previous),children:[(0,Q.jsx)(`span`,{className:`is-new`,children:S(b(`+%s new`,`ai-rank-suite`),n.delta.new.toLocaleString())}),(0,Q.jsx)(`span`,{className:`is-fixed`,children:S(b(`−%s fixed`,`ai-rank-suite`),n.delta.fixed.toLocaleString())}),(0,Q.jsx)(`span`,{className:`is-recurring`,children:S(b(`%s still there`,`ai-rank-suite`),n.delta.recurring.toLocaleString())})]}),(0,Q.jsxs)(`span`,{className:`t-caption`,children:[S(x(`%1$s page · %2$s rules · %3$s passing`,`%1$s pages · %2$s rules · %3$s passing`,n.checked,`ai-rank-suite`),n.checked.toLocaleString(),30 .toLocaleString(),he.toLocaleString()),n.ended?` · ${new Date(n.ended*1e3).toLocaleString()}`:``]})]})]}),(0,Q.jsx)(`div`,{className:`ars-hero-stats`,children:[{label:b(`Critical`,`ai-rank-suite`),value:pe.critical,sev:`critical`,tone:pe.critical?`bad`:`good`},{label:b(`Warnings`,`ai-rank-suite`),value:pe.warning,sev:`warning`,tone:pe.warning?`warn`:`good`},{label:b(`Notices`,`ai-rank-suite`),value:pe.notice,sev:`notice`},{label:b(`Accepted`,`ai-rank-suite`),value:n.ignored||0,sev:null}].map(e=>(0,Q.jsxs)(`button`,{type:`button`,className:`ars-hero-stat`,onClick:()=>e.sev!==null&&be(e.sev),title:e.sev===null?b(`Findings you accepted — they stay out of the score`,`ai-rank-suite`):S(b(`Show only %s`,`ai-rank-suite`),e.label),children:[(0,Q.jsx)(`span`,{className:`ars-hero-stat-v${e.tone?` is-`+e.tone:``}`,children:e.value.toLocaleString()}),(0,Q.jsx)(`span`,{className:`ars-hero-stat-l`,children:e.label})]},e.label))})]}),T&&ge&&!_e&&!O&&(0,Q.jsx)(M,{tone:`serious`,children:T}),o&&o.length>0&&(0,Q.jsxs)(k,{title:b(`Findings over time`,`ai-rank-suite`),subtitle:b(`One point per audit run — the number that should be falling`,`ai-rank-suite`),action:(0,Q.jsx)(Re,{value:(o[o.length-1]?.value??0)-(o[0]?.value??0),invert:!0,suffix:` `+b(`since first run`,`ai-rank-suite`)}),children:[o.length>=3&&new Set(o.map(e=>e.value)).size>1?(0,Q.jsx)(je,{data:o,label:b(`Open findings`,`ai-rank-suite`),color:`var(--ars-series-3)`,height:140,formatValue:e=>`${e}`,bleed:!0}):(0,Q.jsx)($e,{parts:[{label:b(`Critical`,`ai-rank-suite`),value:o[o.length-1]?.critical??0,color:`var(--ars-c-red-ink)`},{label:b(`Warning`,`ai-rank-suite`),value:o[o.length-1]?.warning??0,color:`var(--ars-accent)`},{label:b(`Notice`,`ai-rank-suite`),value:o[o.length-1]?.notice??0,color:`var(--ars-brand)`}],total:o[o.length-1]?.value??null}),(0,Q.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-3 mt-3`,children:[[`critical`,b(`Critical`,`ai-rank-suite`),`var(--ars-c-red-ink)`],[`warning`,b(`Warning`,`ai-rank-suite`),`var(--ars-accent)`],[`notice`,b(`Notice`,`ai-rank-suite`),`var(--ars-brand)`]].map(([e,t,n])=>{let r=o[o.length-1]?.[e]??0,i=o[0]?.[e]??0;return(0,Q.jsxs)(`div`,{className:`ars-r-md px-3 py-2.5`,style:{background:`var(--ars-surface-2)`},children:[(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,Q.jsx)(`span`,{className:`text-[12px] font-semibold`,style:{color:n},children:t}),(0,Q.jsx)(Re,{value:i-r,invert:!0})]}),(0,Q.jsx)(`div`,{className:`t-num text-[18px] font-bold mt-0.5`,children:r})]},e)})})]}),n&&n.run_id&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(k,{title:b(`Where this site is weak`,`ai-rank-suite`),subtitle:b(`Every audited area, worst first — click one to see only its findings`,`ai-rank-suite`),children:(0,Q.jsx)(`div`,{className:`ars-areagrid`,children:rd(n).map(e=>{let t=e.segments.reduce((e,t)=>e+t.value,0)||1,n=e.score>=80?`good`:e.score>=50?`mid`:`bad`;return(0,Q.jsxs)(`button`,{type:`button`,className:`ars-areacard is-${n}${c===e.id?` is-active`:``}`,onClick:()=>be(p,e.id),children:[(0,Q.jsx)(`span`,{className:`ars-areacard-score t-num`,children:e.score}),(0,Q.jsxs)(`span`,{className:`ars-areacard-body`,children:[(0,Q.jsx)(`span`,{className:`ars-areacard-label`,children:e.label}),(0,Q.jsx)(`span`,{className:`ars-areacard-sub`,children:e.sub}),(0,Q.jsx)(`span`,{className:`ars-areacard-bar`,"aria-hidden":!0,children:e.segments.filter(e=>e.value>0).map(e=>(0,Q.jsx)(`span`,{style:{width:`${e.value/t*100}%`,background:e.color}},e.label))})]}),(0,Q.jsx)(`span`,{className:`ars-areacard-reach${e.findings?``:` is-clear`}`,children:e.reach})]},e.id)})})}),(0,Q.jsx)(Yu,{hasRun:(n?.checks||[]).length>0}),(0,Q.jsx)(k,{title:b(`Biggest wins first`,`ai-rank-suite`),subtitle:b(`Ranked by severity, then by how many pages are affected — the bar is reach`,`ai-rank-suite`),children:(0,Q.jsx)(`div`,{className:`grid gap-1.5`,children:(n.checks||[]).slice(0,8).map(e=>(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>be(e.severity,e.group),className:`flex items-center justify-between gap-3 px-3 py-2 text-left cursor-pointer`,style:{border:`1px solid var(--ars-border)`,borderRadius:`var(--ars-r-sm)`,background:`var(--ars-surface)`},children:[(0,Q.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0`,children:[(0,Q.jsx)(`span`,{className:`ars-tag`,style:{background:`var(--ars-c-${sd[e.severity]})`,color:`var(--ars-c-${sd[e.severity]}-ink)`},children:cd[e.severity]}),(0,Q.jsx)(`span`,{className:`font-medium text-[13px] truncate`,children:e.label})]}),(0,Q.jsxs)(`span`,{className:`flex items-center gap-2 shrink-0`,children:[(0,Q.jsx)(`span`,{className:`ars-winbar`,"aria-hidden":!0,children:(0,Q.jsx)(`span`,{style:{width:`${Math.max(4,Math.round(e.count/fe*100))}%`,background:`var(--ars-c-${sd[e.severity]}-ink)`}})}),(0,Q.jsx)(`span`,{className:`t-num font-semibold`,style:{minWidth:48,textAlign:`right`},children:e.count.toLocaleString()})]})]},e.id))})}),(0,Q.jsx)(`div`,{ref:ie,"aria-hidden":!0,style:{scrollMarginTop:12}}),(0,Q.jsx)(k,{title:b(`Findings`,`ai-rank-suite`),subtitle:S(b(`%d on this filter`,`ai-rank-suite`),n.total),action:(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[n.total>0&&(0,Q.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,disabled:i,onClick:u,title:b(`Every finding of the last completed audit, one row each, for a spreadsheet or a ticket.`,`ai-rank-suite`),children:b(i?`Preparing…`:`Export CSV`,`ai-rank-suite`)}),D.multilingual&&!D.perPost&&(0,Q.jsx)(`a`,{href:`#/content/urls`,className:`ars-btn ars-btn-ghost`,title:b(`This site translates by URL, not by post. Filtering by language here shows findings on posts that have a page in that language; per-URL findings live in the URL inventory.`,`ai-rank-suite`),children:b(`Per language → URLs`,`ai-rank-suite`)}),D.multilingual&&(D.perPost||D.urlLangs)&&(0,Q.jsxs)(`select`,{value:d,onChange:e=>{f(e.target.value),C(1)},style:{minWidth:`11rem`},"aria-label":b(`Language`,`ai-rank-suite`),children:[(0,Q.jsx)(`option`,{value:``,children:b(`All languages`,`ai-rank-suite`)}),D.languages.map(e=>(0,Q.jsx)(`option`,{value:e.code,children:e.label},e.code))]}),(0,Q.jsx)(Ve,{label:b(`Severity`,`ai-rank-suite`),value:p,onChange:e=>{m(e),C(1)},options:[{id:``,label:b(`All`,`ai-rank-suite`)},{id:`critical`,label:b(`Critical`,`ai-rank-suite`)},{id:`warning`,label:b(`Warning`,`ai-rank-suite`)},{id:`notice`,label:b(`Notice`,`ai-rank-suite`)}]})]}),children:(0,Q.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Q.jsx)(Ve,{label:b(`Area`,`ai-rank-suite`),value:c,onChange:e=>{l(e),C(1)},options:[{id:``,label:b(`All areas`,`ai-rank-suite`)},...(n.groups||[]).filter(e=>e.count>0).map(e=>({id:e.id,label:e.label,count:e.count}))]}),_.length>1&&(0,Q.jsx)(Ve,{label:b(`Type`,`ai-rank-suite`),value:h,onChange:e=>{g(e),C(1)},options:[{id:``,label:b(`All types`,`ai-rank-suite`)},..._.map(e=>({id:e.name,label:e.label}))]}),(n.ignored_rules||[]).length>0&&(0,Q.jsxs)(`div`,{className:`ars-accepted-rules`,children:[(0,Q.jsx)(`span`,{className:`t-caption`,children:b(`Accepted rules (not reported):`,`ai-rank-suite`)}),n.ignored_rules.map(e=>(0,Q.jsxs)(`button`,{type:`button`,className:`ars-chip`,onClick:()=>ue(e,!1),title:b(`Report this rule again`,`ai-rank-suite`),children:[e,` ×`]},e))]}),n.items.length===0?(0,Q.jsx)(ve,{title:b(`Nothing to fix in this area`,`ai-rank-suite`),compact:!0,children:b(`Every rule in this area passed on every page checked.`,`ai-rank-suite`)}):(0,Q.jsx)(`div`,{className:`grid gap-2`,children:id(n.items).map(e=>(0,Q.jsx)(ad,{group:e,onAccept:de,onAcceptRule:ue},e.key))}),n.total>n.per_page&&(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(A,{variant:`ghost`,disabled:y<=1,onClick:()=>C(y-1),children:b(`Previous`,`ai-rank-suite`)}),(0,Q.jsx)(`span`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:S(b(`Page %1$s of %2$s`,`ai-rank-suite`),y.toLocaleString(),Math.ceil(n.total/n.per_page).toLocaleString())}),(0,Q.jsx)(A,{variant:`ghost`,disabled:y>=Math.ceil(n.total/n.per_page),onClick:()=>C(y+1),children:b(`Next`,`ai-rank-suite`)})]})]})}),(0,Q.jsx)(Se,{title:b(`Audit alerts`,`ai-rank-suite`),note:b(`Email on new findings`,`ai-rank-suite`),children:(0,Q.jsx)(td,{})})]})]})}function rd(e){let t={critical:4,warning:2,notice:1},n=new Map((e.groups||[]).map(e=>[e.id,{...e,critical:0,warning:0,notice:0,load:0}]));(e.checks||[]).forEach(e=>{let r=n.get(e.group);r&&(r[e.severity]=(r[e.severity]||0)+(e.count||0),r.load+=(t[e.severity]||1)*(e.count||0))});let r=Math.max(1,e.checked||1);return[...n.values()].map(e=>{let t=e.critical+e.warning+e.notice,n=t===0?100:Math.max(0,Math.round(100-Math.min(100,e.load/(r*4)*100)));return e.critical>0?n=Math.min(n,45):e.warning>0?n=Math.min(n,79):e.notice>0&&(n=Math.min(n,94)),{id:e.id,label:e.label,score:n,sub:t===0?b(`nothing outstanding`,`ai-rank-suite`):[e.critical?S(b(`%s critical`,`ai-rank-suite`),e.critical.toLocaleString()):null,e.warning?S(b(`%s warning`,`ai-rank-suite`),e.warning.toLocaleString()):null,e.notice?S(b(`%s notice`,`ai-rank-suite`),e.notice.toLocaleString()):null].filter(Boolean).join(` · `),segments:[{label:b(`Critical`,`ai-rank-suite`),value:e.critical,color:`var(--ars-c-red-ink)`},{label:b(`Warning`,`ai-rank-suite`),value:e.warning,color:`var(--ars-accent)`},{label:b(`Notice`,`ai-rank-suite`),value:e.notice,color:`var(--ars-brand)`},{label:b(`Clear`,`ai-rank-suite`),value:+(t===0),color:`var(--ars-c-green-ink)`}],reach:t===0?b(`clear`,`ai-rank-suite`):S(x(`%d to fix`,`%d to fix`,t,`ai-rank-suite`),t),findings:t}}).sort((e,t)=>e.score-t.score||t.findings-e.findings)}function id(e){let t={critical:0,warning:1,notice:2},n=new Map;return e.forEach(e=>{let t=e.check_label+`|`+e.severity;n.has(t)||n.set(t,{key:t,label:e.check_label,severity:e.severity,fix:e.fix,items:[]}),n.get(t).items.push(e)}),[...n.values()].sort((e,n)=>(t[e.severity]??3)-(t[n.severity]??3)||n.items.length-e.items.length)}function ad({group:e,onAccept:t,onAcceptRule:n}){let[r,i]=od.useState(e.items.length===1);return(0,Q.jsxs)(`section`,{className:`ars-issue is-${e.severity}${r?` is-open`:``}`,children:[(0,Q.jsxs)(`button`,{type:`button`,className:`ars-issue-head`,onClick:()=>i(e=>!e),"aria-expanded":r,children:[(0,Q.jsx)(`span`,{className:`ars-issue-sev`,children:cd[e.severity]}),(0,Q.jsx)(`span`,{className:`ars-issue-label`,children:e.label}),(0,Q.jsxs)(`span`,{className:`ars-issue-count tabular-nums`,children:[e.items.length,` `,e.items.length===1?`page`:`pages`]}),(0,Q.jsx)(`svg`,{className:`ars-issue-caret`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,Q.jsx)(`path`,{d:`m9 6 6 6-6 6`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`})})]}),r&&(0,Q.jsxs)(`div`,{className:`ars-issue-body`,children:[(0,Q.jsx)(`p`,{className:`ars-issue-fix`,children:e.fix}),e.items.length>1&&n&&e.items[0]?.check&&(0,Q.jsx)(`p`,{className:`m-0 mb-2`,children:(0,Q.jsx)(`button`,{type:`button`,className:`ars-chip`,onClick:()=>n(e.items[0].check),title:b(`Accept this rule for the whole site: every current finding is removed and future runs skip it. Reversible above.`,`ai-rank-suite`),children:S(x(`Accept this rule for the %s page`,`Accept this rule for all %s pages`,e.items.length,`ai-rank-suite`),e.items.length.toLocaleString())})}),(0,Q.jsx)(`ul`,{className:`ars-issue-pages`,children:e.items.map(e=>(0,Q.jsxs)(`li`,{children:[(0,Q.jsx)(`span`,{className:`ars-issue-page`,title:e.label,children:e.label}),e.detail&&(0,Q.jsx)(`span`,{className:`ars-issue-detail`,children:e.detail}),(0,Q.jsxs)(`span`,{className:`ars-issue-links`,children:[e.post_id?(0,Q.jsx)(`a`,{href:`#/content/${e.post_id}`,title:b(`Open this page in the optimiser: keyword, title, description and the failing checks in one place`,`ai-rank-suite`),children:b(`Optimise`,`ai-rank-suite`)}):null,e.edit_url&&(0,Q.jsx)(`a`,{href:e.edit_url,target:`_blank`,rel:`noreferrer`,children:b(`Edit`,`ai-rank-suite`)}),(0,Q.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1`,children:[b(`View`,`ai-rank-suite`),(0,Q.jsx)(vt,{size:10})]}),(0,Q.jsx)(`button`,{type:`button`,onClick:()=>t(e.fingerprint),className:`ars-chip`,title:b(`Accept this finding — it stops being reported`,`ai-rank-suite`),children:b(`Accept`,`ai-rank-suite`)})]})]},e.id))})]})]})}var od,Q,sd,cd,ld=o((()=>{C(),od=u(f(),1),D(),at(),Ft(),ct(),$u(),Q=O(),sd={critical:`red`,warning:`yellow`,notice:`blue`},cd={critical:`Critical`,warning:`Warning`,notice:`Notice`}})),ud=c({default:()=>md});function dd({job:e,last:t,running:n,urls:r,onCancel:i,onDiscover:a,cancelling:o}){let s=e||{};if(n){let e;e=s.phase===`sitemap`?s.current_sitemap?S(b(`Discovering — reading sitemap file %1$s from URL %2$s; %3$s files done, %4$s failed`,`ai-rank-suite`),xd(s.current_sitemap),bd(s.current_offset),bd(s.sitemaps_done),bd(s.sitemaps_failed)):S(b(`Discovering — reading sitemap files; %1$s done, %2$s failed`,`ai-rank-suite`),bd(s.sitemaps_done),bd(s.sitemaps_failed)):s.phase===`finish`?b(`Discovering — publishing the run…`,`ai-rank-suite`):S(b(`Discovering — reading posts %1$s / %2$s`,`ai-rank-suite`),bd(s.done),bd(s.total));let n=S(b(`%1$s new URLs so far, %2$s confirmed.`,`ai-rank-suite`),bd(s.found),bd(s.seen));return{tone:`neutral`,text:e,why:n+` `+b(t?`The numbers on this screen are still the last completed discovery until this run finishes.`:`Nothing is published yet — the inventory appears when this run completes.`,`ai-rank-suite`),progress:s.phase===`posts`&&s.total>0?Math.min(100,Math.round(100*(s.done||0)/s.total)):null,action:b(`Cancel discovery`,`ai-rank-suite`),onAction:i,busy:o}}if(t&&t.complete===!0){let e=S(b(`%1$s URLs from posts, the translation plugin and %2$s sitemap files; %3$s URLs no longer on the site were removed.`,`ai-rank-suite`),bd(t.urls??r),bd(t.sitemaps_done),bd(t.removed));return s.state===`cancelled`&&(s.started||0)>(t.ended||0)&&(e+=` `+S(b(`A later discovery was cancelled on %s; the inventory is unchanged.`,`ai-rank-suite`),yd(s.ended))),{tone:`good`,text:S(b(`Fully discovered on %s`,`ai-rank-suite`),yd(t.ended)),why:e}}return t&&t.complete===!1?{tone:`bad`,text:S(x(`Incomplete — %1$s sitemap file failed, %2$s URLs skipped`,`Incomplete — %1$s sitemap files failed, %2$s URLs skipped`,Number(t.sitemaps_failed)||0,`ai-rank-suite`),bd(t.sitemaps_failed),bd(t.skipped_urls)),why:S(b(`The run on %s published what it found and removed nothing — a partial run cannot tell a vanished URL from an unread sitemap. Fix the files below, then discover again; the last complete inventory stays until a run finishes without failures.`,`ai-rank-suite`),yd(t.ended)),failed:Array.isArray(t.failed)?t.failed:[],action:b(`Discover again`,`ai-rank-suite`),onAction:a}:s.state===`cancelled`?{tone:`warning`,text:S(b(`Discovery cancelled on %s — no complete discovery on record.`,`ai-rank-suite`),yd(s.ended)),why:b(`Nothing from the cancelled run was published. Discover again to get a verified inventory.`,`ai-rank-suite`),action:b(`Discover again`,`ai-rank-suite`),onAction:a}:r>0?{tone:`warning`,text:b(`Discovered before completeness was tracked — whether this inventory is complete is unknown.`,`ai-rank-suite`),why:b(`Discover again to get a verified inventory: the run reports every sitemap file it read and every one it could not.`,`ai-rank-suite`),action:b(`Discover again`,`ai-rank-suite`),onAction:a}:null}function fd({job:e,last:t,running:n,scanned:r}){let i=e||{};if(n)return i.phase===`publish`?{tone:`info`,text:b(`Rescan complete — publishing the new scores in chunks; the numbers above switch when the last chunk lands`,`ai-rank-suite`)}:{tone:`info`,text:i.rescan?b(`Rescan running — the numbers above are from the last completed scan until it finishes`,`ai-rank-suite`):b(`First scan running — each URL is scored as soon as it has been fetched, so the averages move with it`,`ai-rank-suite`)};if(t){let e=S(b(`Scores from the scan completed on %1$s — %2$s URLs fetched, %3$s failed.`,`ai-rank-suite`),yd(t.ended),bd(t.done),bd(t.failed));return i.state===`cancelled`&&(i.started||0)>(t.ended||0)&&(e+=` `+b(`A later scan was cancelled; the published scores are unchanged.`,`ai-rank-suite`)),{tone:`good`,text:e}}return i.state===`cancelled`?{tone:`warning`,text:b(`The scan was cancelled before it completed — the scores shown are partial. Rescan to get a consistent set.`,`ai-rank-suite`)}:r>0?{tone:`warning`,text:b(`These scores are not from a completed scan — the last scan was interrupted or predates scan tracking. Rescan to get a consistent set.`,`ai-rank-suite`)}:null}function pd({verdict:e}){if(!e)return null;let{progress:t,failed:n,...r}=e;return(0,gd.jsxs)(pa,{...r,children:[t!=null&&(0,gd.jsx)(`div`,{className:`mt-2`,style:{maxWidth:360},children:(0,gd.jsx)(Pe,{value:t})}),Array.isArray(n)&&n.length>0&&(0,gd.jsx)(`ul`,{className:`m-0 mt-2 p-0 grid gap-1`,style:{listStyle:`none`},children:n.map(e=>(0,gd.jsxs)(`li`,{className:`text-[12px] flex gap-2 flex-wrap items-baseline`,children:[(0,gd.jsx)(j,{tone:`serious`,children:b(`Failed`,`ai-rank-suite`)}),(0,gd.jsx)(`code`,{className:`ars-mono`,style:{wordBreak:`break-all`},children:e.url}),(0,gd.jsx)(`span`,{style:{color:`var(--ars-ink-2)`},children:e.error})]},e.url))})]})}function md(){let[e,t]=(0,hd.useState)(null),[n,r]=(0,hd.useState)([]),[i,a]=(0,hd.useState)(0),[o,s]=(0,hd.useState)(1),[c,l]=(0,hd.useState)(``),[u,d]=(0,hd.useState)(``),[f,p]=(0,hd.useState)(`id`),[m,h]=(0,hd.useState)(``),[g,_]=(0,hd.useState)(null),[v,y]=(0,hd.useState)(``),[C,w]=(0,hd.useState)(``),ee=(0,hd.useRef)(!1),T=(0,hd.useCallback)(()=>E.get(`/urls/summary`).then(t).catch(e=>_(e.message)),[]),te=e?.discover?.state===`running`||e?.scan?.state===`running`;(0,hd.useEffect)(()=>{if(!te||v)return;let e=setInterval(T,4e3);return()=>clearInterval(e)},[te,v,T]);let ne=async(e,t)=>{w(e),_(null);try{await E.post(t,{}),await T()}catch(e){_(e.message)}finally{w(``)}},re=(0,hd.useCallback)(async()=>{try{let e=new URLSearchParams({lang:c,issue:u,orderby:f,search:m,page:String(o),per_page:`50`}),t=await fetch(`${window.airanksuiteData.restUrl}/urls?${e}`,{headers:{"X-WP-Nonce":window.airanksuiteData.nonce},credentials:`same-origin`});if(!t.ok)throw Error(S(b(`Request failed (%s)`,`ai-rank-suite`),t.status));a(Number(t.headers.get(`X-WP-Total`)||0)),r(await t.json())}catch(e){_(e.message)}},[c,u,f,m,o]);(0,hd.useEffect)(()=>{T()},[T]),(0,hd.useEffect)(()=>{re()},[re]);let ie=async(e,t,n,r={})=>{if(!ee.current){ee.current=!0,y(e),_(null);try{let e=await E.post(t,r);T();let i=0;for(;e.state===`running`;)(e.busy||e.error)&&await vd(2e3),e=await E.post(n,{}),++i%5==0&&T();await T(),await re()}catch(e){_(e.message)}finally{ee.current=!1,y(``)}}};if(!e)return g?(0,gd.jsx)(`div`,{className:`ars-page`,children:(0,gd.jsx)(M,{tone:`serious`,children:S(b(`URL inventory could not be loaded: %s`,`ai-rank-suite`),g)})}):(0,gd.jsx)(Ze,{blocks:3,label:b(`Loading URLs`,`ai-rank-suite`)});let D=e,ae=D.urls?Math.round(100*D.scanned/D.urls):0,oe=D.discover?.state===`running`||v===`discover`,se=D.scan?.state===`running`||v===`scan`,ce=()=>ie(`discover`,`/urls/discover/start`,`/urls/discover/tick`),le=dd({job:D.discover,last:D.discover_last||null,running:oe,urls:D.urls,onCancel:()=>ne(`discover`,`/urls/discover/cancel`),onDiscover:ce,cancelling:C===`discover`}),ue=fd({job:D.scan,last:D.scan_last||null,running:se,scanned:D.scanned});if(D.urls===0&&oe&&le)return(0,gd.jsxs)(`div`,{className:`ars-page`,children:[g&&(0,gd.jsx)(M,{tone:`serious`,children:g}),(0,gd.jsx)(pd,{verdict:le})]});if(D.urls===0&&!oe)return(0,gd.jsxs)(`div`,{className:`ars-page`,children:[g&&(0,gd.jsx)(M,{tone:`serious`,children:g}),(0,gd.jsx)(Wo,{badge:b(`Not discovered yet`,`ai-rank-suite`),ringLabel:b(`URL score`,`ai-rank-suite`),title:b(`No URL of this site has been inventoried yet.`,`ai-rank-suite`),why:D.languages>1?S(b(`This site serves %1$d languages%2$s. The post list sees one object per page; the URL inventory sees every language version as its own URL — discovered from posts, the translation plugin and the sitemap, then fetched and read as rendered HTML.`,`ai-rank-suite`),D.languages,D.plugin?S(b(` through %s`,`ai-rank-suite`),D.plugin):``):b(`The URL inventory lists every indexable URL a crawler would find — from posts and the sitemap — and scans each one as rendered HTML: title, description, H1, canonical, hreflang, robots and word count, scored per URL.`,`ai-rank-suite`),action:b(`Discover URLs`,`ai-rank-suite`),onAction:ce,busy:v===`discover`,stats:[{label:b(`URLs`,`ai-rank-suite`)},{label:b(`Languages`,`ai-rank-suite`)},{label:b(`Scanned`,`ai-rank-suite`)},{label:b(`Indexable`,`ai-rank-suite`)}],previews:[{title:b(`Per language`,`ai-rank-suite`),text:b(`URLs, scanned share, average SEO and GEO, missing hreflang and broken pages — one row per language.`,`ai-rank-suite`)},{title:b(`Every URL, filtered`,`ai-rank-suite`),text:b(`By language, by issue, by post type; sorted by the weakest score first; server-paged.`,`ai-rank-suite`)},{title:b(`What the page really says`,`ai-rank-suite`),text:b(`The scan reads the rendered HTML, not the database — a translated title that never made it into the page is caught here.`,`ai-rank-suite`)}]})]});let de=D.avg_seo===null?`neutral`:D.avg_seo>=80?`good`:D.avg_seo>=50?`warning`:`bad`,O=[...D.by_lang||[]].filter(e=>e.avg_seo!==null).sort((e,t)=>e.avg_seo-t.avg_seo)[0],fe=(le&&le.tone===`bad`?{tone:`bad`,label:b(`Incomplete inventory`,`ai-rank-suite`)}:le&&le.tone===`warning`?{tone:`warning`,label:b(`Completeness unknown`,`ai-rank-suite`)}:null)||{tone:de,label:D.scanned===0?b(`Discovered, not scanned`,`ai-rank-suite`):b(de===`good`?`Healthy`:de===`warning`?`Room to improve`:`Needs attention`,`ai-rank-suite`)};return(0,gd.jsxs)(`div`,{className:`ars-page`,children:[g&&(0,gd.jsx)(M,{tone:`serious`,children:g}),(0,gd.jsx)(pd,{verdict:le}),(0,gd.jsxs)(`div`,{className:`ars-hero`,children:[(0,gd.jsx)(`div`,{className:`ars-hero-ring`,children:(0,gd.jsx)(Oe,{value:D.avg_seo,size:132,label:b(`Avg URL SEO`,`ai-rank-suite`),onLight:!0})}),(0,gd.jsxs)(`div`,{className:`ars-hero-body`,children:[(0,gd.jsx)(`span`,{className:`ars-hero-badge is-${fe.tone}`,children:fe.label}),(0,gd.jsxs)(`h2`,{className:`ars-hero-title`,children:[S(b(`%1$s URLs %2$s — %3$s scanned`,`ai-rank-suite`),bd(D.urls),D.languages>1?S(x(`in %d language`,`in %d languages`,D.languages,`ai-rank-suite`),D.languages):b(`in one language`,`ai-rank-suite`),bd(D.scanned)),D.avg_seo===null?`.`:S(b(`, average SEO %1$d, GEO %2$d.`,`ai-rank-suite`),D.avg_seo,D.avg_geo)]}),(0,gd.jsx)(`p`,{className:`ars-hero-why`,children:D.scanned===0?b(`Scanning fetches every URL as a visitor and reads what the page says about itself — title, description, H1, canonical, hreflang, robots, words. On a large site it runs in slices; you can leave and it continues.`,`ai-rank-suite`):O&&D.by_lang.length>1?S(b(`%1$s is the weakest language at SEO %2$d%3$s. Every language is scored with the same rubric.`,`ai-rank-suite`),O.label,O.avg_seo,O.hreflang_missing?S(b(` with %s URLs missing hreflang`,`ai-rank-suite`),O.hreflang_missing.toLocaleString()):``):b(`Scores are per URL and per language, from the rendered page — the same rubric everywhere.`,`ai-rank-suite`)}),(0,gd.jsxs)(`div`,{className:`ars-hero-actions`,children:[(0,gd.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:()=>ie(`scan`,`/urls/scan/start`,`/urls/scan/tick`,{rescan:D.scanned>=D.urls}),disabled:!!v||se,children:se?S(D.scan?.rescan?b(`Rescanning… %1$s / %2$s`,`ai-rank-suite`):b(`Scanning… %1$s / %2$s`,`ai-rank-suite`),bd(D.scan?.done),bd(D.scan?.total??D.urls)):D.scanned===0?b(`Scan all URLs`,`ai-rank-suite`):D.scanned<D.urls?S(b(`Scan %s unscanned`,`ai-rank-suite`),bd(D.urls-D.scanned)):b(`Rescan everything`,`ai-rank-suite`)}),se&&(0,gd.jsx)(A,{variant:`ghost`,busy:C===`scan`,onClick:()=>ne(`scan`,`/urls/scan/cancel`),children:b(`Cancel scan`,`ai-rank-suite`)}),!oe&&(0,gd.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,onClick:ce,disabled:!!v,children:b(`Discover again`,`ai-rank-suite`)}),se&&D.scan?.total>0&&(0,gd.jsx)(`span`,{style:{minWidth:160},children:(0,gd.jsx)(Pe,{value:Math.round(100*(D.scan.done||0)/Math.max(1,D.scan.total))})})]}),ue&&(0,gd.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:ue.tone===`warning`?`var(--ars-warning)`:`var(--ars-ink-2)`},children:ue.text})]}),(0,gd.jsx)(`div`,{className:`ars-hero-stats`,children:[{label:b(`URLs`,`ai-rank-suite`),value:D.urls.toLocaleString()},{label:b(`Languages`,`ai-rank-suite`),value:D.languages},{label:b(`Scanned`,`ai-rank-suite`),value:`${ae}%`},{label:b(`Indexable`,`ai-rank-suite`),value:D.indexable.toLocaleString()}].map(e=>(0,gd.jsxs)(`div`,{className:`ars-hero-stat`,style:{cursor:`default`},children:[(0,gd.jsx)(`span`,{className:`ars-hero-stat-v`,children:e.value}),(0,gd.jsx)(`span`,{className:`ars-hero-stat-l`,children:e.label})]},e.label))})]}),D.by_lang.length>0&&(0,gd.jsx)(k,{title:b(`By language`,`ai-rank-suite`),subtitle:b(`Click a language to filter the list — the same rubric on every one`,`ai-rank-suite`),flush:!0,children:(0,gd.jsx)(`div`,{className:`ars-table-wrap`,children:(0,gd.jsxs)(`table`,{className:`ars-table`,children:[(0,gd.jsx)(`thead`,{children:(0,gd.jsxs)(`tr`,{children:[(0,gd.jsx)(`th`,{children:b(`Language`,`ai-rank-suite`)}),(0,gd.jsx)(`th`,{className:`is-num`,children:b(`URLs`,`ai-rank-suite`)}),(0,gd.jsx)(`th`,{className:`is-num`,children:b(`Scanned`,`ai-rank-suite`)}),(0,gd.jsx)(`th`,{className:`is-num`,children:b(`Indexable`,`ai-rank-suite`)}),(0,gd.jsx)(`th`,{className:`is-num`,children:b(`SEO`,`ai-rank-suite`)}),(0,gd.jsx)(`th`,{className:`is-num`,children:b(`GEO`,`ai-rank-suite`)}),(0,gd.jsx)(`th`,{className:`is-num`,children:b(`Hreflang missing`,`ai-rank-suite`)}),(0,gd.jsx)(`th`,{className:`is-num`,children:b(`Broken`,`ai-rank-suite`)})]})}),(0,gd.jsx)(`tbody`,{children:D.by_lang.map(e=>(0,gd.jsxs)(`tr`,{onClick:()=>{l(c===e.lang?``:e.lang),s(1)},style:{cursor:`pointer`},className:c===e.lang?`is-selected`:``,children:[(0,gd.jsxs)(`td`,{className:`font-medium`,children:[e.label,` `,e.lang&&(0,gd.jsx)(`code`,{className:`ars-mono t-caption`,children:e.lang})]}),(0,gd.jsx)(`td`,{className:`is-num`,children:e.urls.toLocaleString()}),(0,gd.jsx)(`td`,{className:`is-num`,children:e.scanned.toLocaleString()}),(0,gd.jsx)(`td`,{className:`is-num`,children:e.indexable.toLocaleString()}),(0,gd.jsx)(`td`,{className:`is-num`,children:(0,gd.jsx)(ke,{value:e.avg_seo})}),(0,gd.jsx)(`td`,{className:`is-num`,children:(0,gd.jsx)(ke,{value:e.avg_geo})}),(0,gd.jsx)(`td`,{className:`is-num`,style:e.hreflang_missing?{color:`var(--ars-warning)`,fontWeight:600}:void 0,children:e.hreflang_missing||`—`}),(0,gd.jsx)(`td`,{className:`is-num`,style:e.broken?{color:`var(--ars-serious)`,fontWeight:600}:void 0,children:e.broken||`—`})]},e.lang))})]})})}),(0,gd.jsxs)(k,{title:b(`URLs`,`ai-rank-suite`),subtitle:S(b(`%s on this filter — click a row’s Edit to fix the page it renders`,`ai-rank-suite`),i.toLocaleString()),action:(0,gd.jsx)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:(0,gd.jsx)(Ve,{label:b(`Sort`,`ai-rank-suite`),value:f,onChange:p,options:[{id:`id`,label:b(`Discovered`,`ai-rank-suite`)},{id:`seo`,label:b(`Weakest SEO`,`ai-rank-suite`)},{id:`geo`,label:b(`Weakest GEO`,`ai-rank-suite`)},{id:`words`,label:b(`Fewest words`,`ai-rank-suite`)}]})}),flush:!0,children:[(0,gd.jsx)(`div`,{className:`p-3 grid gap-2`,style:{borderBottom:`1px solid var(--ars-border)`},children:(0,gd.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,gd.jsx)(Ve,{label:b(`Issue`,`ai-rank-suite`),value:u,onChange:e=>{d(e),s(1)},options:[{id:``,label:b(`All`,`ai-rank-suite`)},...Object.entries(_d).map(([e,t])=>({id:e,label:t}))]}),(0,gd.jsx)(`input`,{type:`search`,placeholder:b(`Search URL or title…`,`ai-rank-suite`),value:m,onChange:e=>{h(e.target.value),s(1)},style:{minWidth:220}})]})}),(0,gd.jsx)(`div`,{className:`ars-table-wrap`,children:(0,gd.jsxs)(`table`,{className:`ars-table`,children:[(0,gd.jsx)(`thead`,{children:(0,gd.jsxs)(`tr`,{children:[(0,gd.jsx)(`th`,{children:b(`URL`,`ai-rank-suite`)}),(0,gd.jsx)(`th`,{style:{width:70},children:b(`Lang`,`ai-rank-suite`)}),(0,gd.jsx)(`th`,{className:`is-num`,style:{width:60},children:b(`HTTP`,`ai-rank-suite`)}),(0,gd.jsx)(`th`,{className:`is-num`,style:{width:70},children:b(`Words`,`ai-rank-suite`)}),(0,gd.jsx)(`th`,{className:`is-num`,style:{width:60},children:b(`SEO`,`ai-rank-suite`)}),(0,gd.jsx)(`th`,{className:`is-num`,style:{width:60},children:b(`GEO`,`ai-rank-suite`)}),(0,gd.jsx)(`th`,{children:b(`Issues`,`ai-rank-suite`)}),(0,gd.jsx)(`th`,{style:{width:90}})]})}),(0,gd.jsx)(`tbody`,{children:n.map(e=>(0,gd.jsxs)(`tr`,{children:[(0,gd.jsxs)(`td`,{style:{maxWidth:420},children:[(0,gd.jsx)(`div`,{className:`ars-mono text-[12px] truncate`,title:e.url,children:e.url.replace(/^https?:\/\/[^/]+/,``)||`/`}),e.title&&(0,gd.jsx)(`div`,{className:`t-caption truncate`,children:e.title})]}),(0,gd.jsx)(`td`,{children:(0,gd.jsx)(`code`,{className:`ars-mono text-[11.5px]`,children:e.lang||`—`})}),(0,gd.jsx)(`td`,{className:`is-num`,children:e.scanned_at?(0,gd.jsx)(j,{tone:e.status===200?`good`:`serious`,children:e.status||`×`}):(0,gd.jsx)(`span`,{className:`is-muted`,children:`—`})}),(0,gd.jsx)(`td`,{className:`is-num`,children:e.scanned_at?e.words.toLocaleString():`—`}),(0,gd.jsx)(`td`,{className:`is-num`,children:(0,gd.jsx)(ke,{value:e.seo_score})}),(0,gd.jsx)(`td`,{className:`is-num`,children:(0,gd.jsx)(ke,{value:e.geo_score})}),(0,gd.jsx)(`td`,{children:(0,gd.jsxs)(`span`,{className:`flex flex-wrap gap-1`,children:[(e.issues||[]).slice(0,4).map(e=>(0,gd.jsx)(j,{tone:[`noindex`,`canonical_foreign`,`unreachable`].includes(e)?`serious`:`warning`,children:_d[e]||e},e)),(e.issues||[]).length>4&&(0,gd.jsxs)(`span`,{className:`t-caption`,children:[`+`,e.issues.length-4]})]})}),(0,gd.jsx)(`td`,{className:`is-num`,children:(0,gd.jsxs)(`span`,{className:`ars-rowacts`,style:{opacity:1},children:[e.edit_url&&(0,gd.jsx)(`a`,{href:e.edit_url,target:`_blank`,rel:`noreferrer`,children:b(`Edit`,`ai-rank-suite`)}),(0,gd.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,children:b(`View`,`ai-rank-suite`)})]})})]},e.id))})]})}),i>50&&(0,gd.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2`,children:[(0,gd.jsx)(`span`,{className:`t-caption`,children:S(b(`Page %1$s of %2$s`,`ai-rank-suite`),o,Math.ceil(i/50))}),(0,gd.jsxs)(`span`,{className:`flex gap-2`,children:[(0,gd.jsx)(A,{variant:`ghost`,disabled:o<=1,onClick:()=>s(o-1),children:b(`← Prev`,`ai-rank-suite`)}),(0,gd.jsx)(A,{variant:`ghost`,disabled:o>=Math.ceil(i/50),onClick:()=>s(o+1),children:b(`Next →`,`ai-rank-suite`)})]})]})]})]})}var hd,gd,_d,vd,yd,bd,xd,Sd=o((()=>{hd=u(f(),1),C(),D(),at(),ha(),Ko(),gd=O(),_d={noindex:b(`Noindex`,`ai-rank-suite`),no_title:b(`No title`,`ai-rank-suite`),title_long:b(`Title too long`,`ai-rank-suite`),no_desc:b(`No description`,`ai-rank-suite`),no_h1:b(`No H1`,`ai-rank-suite`),many_h1:b(`Several H1`,`ai-rank-suite`),canonical_foreign:b(`Canonical elsewhere`,`ai-rank-suite`),hreflang_missing:b(`Hreflang missing`,`ai-rank-suite`),thin:b(`Thin (<300 words)`,`ai-rank-suite`),html_lang_mismatch:b(`html lang differs`,`ai-rank-suite`),unreachable:b(`Unreachable`,`ai-rank-suite`)},vd=e=>new Promise(t=>setTimeout(t,e)),yd=e=>new Date((Number(e)||0)*1e3).toLocaleString(),bd=e=>(Number(e)||0).toLocaleString(),xd=e=>String(e||``).replace(/^https?:\/\/[^/]+/,``)||`/`})),Cd=c({default:()=>wd});function wd(){let[e,t]=(0,Td.useState)(null),[n,r]=(0,Td.useState)(!1),[i,a]=(0,Td.useState)(null);(0,Td.useEffect)(()=>{E.get(`/audit/site-tests`).then(t).catch(e=>a(e.message))},[]);let o=async()=>{r(!0),a(null);try{t(await E.post(`/audit/site-tests`))}catch(e){a(e.message)}finally{r(!1)}};if(!e)return(0,Ed.jsx)(_e,{error:i});let s=e.tests||[],c=e.groups||{},l=e.counts||{fail:0,warn:0,pass:0,info:0};return s.length?(0,Ed.jsxs)(`div`,{className:`ars-page`,children:[i&&(0,Ed.jsx)(M,{tone:`serious`,children:i}),(0,Ed.jsx)(pa,{tone:l.fail>0?`bad`:l.warn>0?`warning`:`good`,text:l.fail>0?S(x(`%1$d of %2$d site checks fails.`,`%1$d of %2$d site checks fail.`,l.fail,`ai-rank-suite`),l.fail,s.length):l.warn>0?S(x(`No site check fails; %d warns.`,`No site check fails; %d warn.`,l.warn,`ai-rank-suite`),l.warn):S(b(`All %d site checks pass.`,`ai-rank-suite`),s.length),why:l.fail>0?b(`A failing site check affects every page at once — fix these before any per-page work.`,`ai-rank-suite`):l.warn>0?b(`Warnings are worth a look but block nothing.`,`ai-rank-suite`):b(`Run again after changing hosting, permalinks or the theme.`,`ai-rank-suite`)}),(0,Ed.jsxs)(k,{icon:(0,Ed.jsx)(Ot,{size:16}),title:b(`Site tests`,`ai-rank-suite`),subtitle:b(`The setup itself — the faults that belong to no single page`,`ai-rank-suite`),action:(0,Ed.jsxs)(A,{variant:`ghost`,onClick:o,busy:n,children:[(0,Ed.jsx)(yt,{size:13}),b(`Run again`,`ai-rank-suite`)]}),children:[(0,Ed.jsxs)(`div`,{className:`flex gap-5 flex-wrap items-center`,children:[(0,Ed.jsx)(ge,{value:e.score,label:b(`Site setup`,`ai-rank-suite`)}),(0,Ed.jsx)(`div`,{className:`flex-1 min-w-[300px]`,children:(0,Ed.jsx)(be,{columns:4,metrics:[{id:`fail`,label:b(`Failing`,`ai-rank-suite`),hint:b(`These cost traffic today rather than eventually.`,`ai-rank-suite`),value:l.fail,accent:l.fail?`var(--ars-c-red-ink)`:void 0},{id:`warn`,label:b(`Worth fixing`,`ai-rank-suite`),hint:b(`Not urgent, but each one is a small leak.`,`ai-rank-suite`),value:l.warn,accent:l.warn?`var(--ars-accent)`:void 0},{id:`pass`,label:b(`Passing`,`ai-rank-suite`),value:l.pass,sub:S(b(`%s tests run`,`ai-rank-suite`),s.length)},(l.info??0)>0&&{id:`info`,label:b(`Noted`,`ai-rank-suite`),hint:b(`Readings rather than verdicts: nothing to fix, but worth knowing. They do not affect the score.`,`ai-rank-suite`),value:l.info,sub:b(`not scored`,`ai-rank-suite`)}].filter(Boolean)})})]}),e.ran_at>0&&(0,Ed.jsx)(`p`,{className:`m-0 mt-3 t-caption`,children:S(b(`Last run %s.`,`ai-rank-suite`),new Date(e.ran_at*1e3).toLocaleString())})]}),Object.entries(c).map(([e,t])=>{let n=s.filter(t=>t.group===e);if(!n.length)return null;let r=n.filter(e=>e.status===`fail`||e.status===`warn`);return(0,Ed.jsx)(k,{title:t,action:r.length===0?(0,Ed.jsxs)(j,{tone:`good`,children:[`✓ `,b(`All good`,`ai-rank-suite`)]}):(0,Ed.jsx)(j,{tone:n.some(e=>e.status===`fail`)?`serious`:`warning`,children:S(x(`%d to fix`,`%d to fix`,r.length,`ai-rank-suite`),r.length)}),flush:!0,children:(0,Ed.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Ed.jsxs)(`table`,{className:`ars-table`,children:[(0,Ed.jsx)(`thead`,{children:(0,Ed.jsxs)(`tr`,{children:[(0,Ed.jsx)(`th`,{style:{width:34}}),(0,Ed.jsx)(`th`,{style:{width:260},children:b(`Test`,`ai-rank-suite`)}),(0,Ed.jsx)(`th`,{style:{width:260},children:b(`What it found`,`ai-rank-suite`)}),(0,Ed.jsx)(`th`,{children:b(`Why it matters`,`ai-rank-suite`)})]})}),(0,Ed.jsx)(`tbody`,{children:n.map(e=>{let t=Dd[e.status]||Dd.info;return(0,Ed.jsxs)(`tr`,{children:[(0,Ed.jsx)(`td`,{style:{width:34},children:(0,Ed.jsx)(`span`,{"aria-hidden":!0,className:`inline-flex items-center justify-center`,style:{width:17,height:17,borderRadius:`var(--ars-r-xs)`,background:t.bg,color:t.tone,fontSize:11,fontWeight:700},children:t.glyph})}),(0,Ed.jsx)(`td`,{style:{fontWeight:e.status===`pass`?400:600},children:e.label}),(0,Ed.jsx)(`td`,{style:{color:`var(--ars-ink-2)`},children:e.value}),(0,Ed.jsx)(`td`,{style:{color:`var(--ars-ink-2)`},children:e.fix})]},e.id)})})]})})},e)})]}):(0,Ed.jsxs)(`div`,{className:`ars-page`,children:[i&&(0,Ed.jsx)(M,{tone:`serious`,children:i}),(0,Ed.jsx)(Wo,{badge:b(`Not run yet`,`ai-rank-suite`),ringLabel:b(`Site health`,`ai-rank-suite`),title:b(`The site itself has not been checked yet.`,`ai-rank-suite`),why:b(`Twenty-one checks on the setup rather than on any page: robots.txt that blocks everything, a default tagline, missing HTTPS, discouraged search engines, no organisation identity, sitemaps that do not resolve. Fast, local, and the faults it finds are the ones no page score can see.`,`ai-rank-suite`),action:b(`Run the site tests`,`ai-rank-suite`),onAction:o,busy:n,stats:[{label:b(`Passing`,`ai-rank-suite`)},{label:b(`Warnings`,`ai-rank-suite`)},{label:b(`Failing`,`ai-rank-suite`)},{label:b(`Checks`,`ai-rank-suite`)}],previews:[{title:b(`Grouped by area`,`ai-rank-suite`),text:b(`Indexability, identity, security, structure — each with its checks and the fix in one sentence.`,`ai-rank-suite`)},{title:b(`Health gauge`,`ai-rank-suite`),text:b(`The share of checks passing, weighted so a blocker outweighs a notice.`,`ai-rank-suite`)},{title:b(`Re-run any time`,`ai-rank-suite`),text:b(`Cheap enough to run after every settings change; the audit alerts can mail you when a check flips.`,`ai-rank-suite`)}]}),(0,Ed.jsx)(k,{icon:(0,Ed.jsx)(Ot,{size:16}),title:b(`Site tests`,`ai-rank-suite`),subtitle:b(`Twenty-one checks on the site itself, not on its pages`,`ai-rank-suite`),children:(0,Ed.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Ed.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Some faults belong to no page: a robots.txt that blocks everything, a tagline still reading “Just another WordPress site”, search engine visibility switched off in Settings → Reading. Each one defeats the work done on every page, and none of them shows up in a per-page report.`,`ai-rank-suite`)}),(0,Ed.jsx)(`div`,{children:(0,Ed.jsxs)(A,{onClick:o,busy:n,children:[(0,Ed.jsx)(yt,{size:13}),b(`Run the tests`,`ai-rank-suite`)]})})]})})]})}var Td,Ed,Dd,Od=o((()=>{Td=u(f(),1),C(),D(),Ko(),ha(),at(),Ft(),Ed=O(),Dd={pass:{glyph:`✓`,tone:`var(--ars-good)`,bg:`var(--ars-good-tonal)`},warn:{glyph:`!`,tone:`var(--ars-warning)`,bg:`var(--ars-warning-tonal)`},fail:{glyph:`✕`,tone:`var(--ars-serious)`,bg:`var(--ars-serious-tonal)`},info:{glyph:`i`,tone:`var(--ars-ink-3)`,bg:`var(--ars-surface-3)`}}}));function kd({refreshKey:e}){let[t,n]=(0,Ad.useState)(null),[r,i]=(0,Ad.useState)(1),[a,o]=(0,Ad.useState)({}),[s,c]=(0,Ad.useState)(``),[l,u]=(0,Ad.useState)(null),d=()=>E.get(`/autopilot/proposals?page=${r}&per_page=25`).then(e=>{n(e),o(Object.fromEntries(e.items.map(e=>[`${e.post_id}:${e.task}`,e.task===`faq`?JSON.stringify(e.proposal,null,1):e.proposal])))}).catch(e=>u(e.message));if((0,Ad.useEffect)(()=>{d()},[r,e]),!t||t.total===0)return null;let f=async(e,t)=>{let n=`${e.post_id}:${e.task}`;c(n+t),u(null);try{if(t===`apply`){let t=a[n];if(e.task===`faq`)try{t=JSON.parse(t)}catch{throw Error(b(`The FAQ list is not valid JSON — fix it or reject.`,`ai-rank-suite`))}await E.post(`/autopilot/proposals/apply`,{post_id:e.post_id,task:e.task,value:t})}else await E.post(`/autopilot/proposals/reject`,{post_id:e.post_id,task:e.task});await d()}catch(e){u(e.message)}finally{c(``)}},p=Math.max(1,Math.ceil(t.total/25));return(0,jd.jsxs)(k,{title:b(`Proposals waiting for review`,`ai-rank-suite`),subtitle:b(`What the last suggest/approve runs parked. Nothing here is live until you apply it — as proposed, or edited.`,`ai-rank-suite`),action:(0,jd.jsxs)(j,{tone:`warning`,children:[t.total.toLocaleString(),` `,b(`open`,`ai-rank-suite`)]}),children:[l&&(0,jd.jsx)(M,{tone:`serious`,children:l}),(0,jd.jsx)(`div`,{className:`grid gap-2`,children:t.items.map(e=>{let t=`${e.post_id}:${e.task}`;return(0,jd.jsxs)(`div`,{className:`ars-review-field`,children:[(0,jd.jsxs)(`div`,{className:`flex items-center justify-between gap-2 flex-wrap`,children:[(0,jd.jsxs)(`span`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,jd.jsx)(j,{tone:`brand`,children:e.task}),(0,jd.jsx)(`a`,{href:`#/content/${e.post_id}`,className:`font-semibold text-[13px]`,children:e.title||`#${e.post_id}`})]}),(0,jd.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,jd.jsx)(A,{variant:`ghost`,busy:s===t+`reject`,onClick:()=>f(e,`reject`),children:b(`Reject`,`ai-rank-suite`)}),(0,jd.jsx)(A,{busy:s===t+`apply`,onClick:()=>f(e,`apply`),children:b(`Apply`,`ai-rank-suite`)})]})]}),(0,jd.jsxs)(`div`,{className:`ars-review-orig`,children:[(0,jd.jsxs)(`span`,{className:`t-caption`,children:[b(`Now`,`ai-rank-suite`),`:`]}),` `,e.task===`faq`?`${Array.isArray(e.current)?e.current.length:0} ${b(`FAQ items`,`ai-rank-suite`)}`:e.current||(0,jd.jsx)(`em`,{style:{color:`var(--ars-ink-3)`},children:b(`empty`,`ai-rank-suite`)})]}),(0,jd.jsx)(`textarea`,{rows:e.task===`faq`?6:2,value:a[t]||``,onChange:e=>o({...a,[t]:e.target.value})})]},t)})}),p>1&&(0,jd.jsxs)(`div`,{className:`flex items-center justify-between gap-3 mt-3`,children:[(0,jd.jsxs)(`span`,{className:`t-caption`,children:[b(`Page`,`ai-rank-suite`),` `,r,` `,b(`of`,`ai-rank-suite`),` `,p]}),(0,jd.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,jd.jsx)(A,{variant:`ghost`,disabled:r<=1,onClick:()=>i(e=>e-1),children:`‹`}),(0,jd.jsx)(A,{variant:`ghost`,disabled:r>=p,onClick:()=>i(e=>e+1),children:`›`})]})]})]})}var Ad,jd,Md=o((()=>{Ad=u(f(),1),C(),D(),at(),jd=O()})),Nd=c({default:()=>Pd});function Pd(){let[e,t]=(0,Id.useState)(null),[n,r]=(0,Id.useState)(!1),[i,a]=(0,Id.useState)(null),[o,s]=(0,Id.useState)([`description`,`faq`,`title`]),[c,l]=(0,Id.useState)(`suggest`),[u,d]=(0,Id.useState)(0),[f,p]=(0,Id.useState)(0),m=c===`auto`?`apply`:`draft`,[h,g]=(0,Id.useState)([]),[_,v]=(0,Id.useState)(25),[y,C]=(0,Id.useState)(!1),w=()=>E.get(`/autopilot/status`).then(e=>{t(e),e.running||r(!1)}).catch(e=>a(e.message));if((0,Id.useEffect)(()=>{w()},[]),(0,Id.useEffect)(()=>{if(!n&&!e?.running)return;let t=setInterval(w,5e3);return()=>clearInterval(t)},[n,e?.running]),!e)return(0,Ld.jsx)(_e,{error:i});let ee=e.state||{},T=ee.total||0,te=ee.done||0,ne=T>0?Math.round(te/T*100):0,re=async()=>{r(!0),a(null),window.dispatchEvent(new CustomEvent(`airanksuite:working`));try{let e=await E.post(`/autopilot/plan`,{tasks:o,level:c,max_changes:u,budget_usd:f,post_types:h,limit:_});t(e),e.running||r(!1)}catch(e){a(e.message),r(!1)}},ie=async()=>{r(!0),a(null);try{let e=await E.post(`/autopilot/resume`);t(e),e.running||r(!1)}catch(e){a(e.message),r(!1)}},D=async()=>{t(await E.post(`/autopilot/cancel`)),r(!1)},ae=async()=>{r(!0),C(!0),a(null);try{let e=await E.post(`/autopilot/undo`,{since:ee.started||0});t(e)}catch(e){a(e.message)}finally{r(!1),C(!1)}},oe=e=>s(o.includes(e)?o.filter(t=>t!==e):[...o,e]),se=e=>g(h.includes(e)?h.filter(t=>t!==e):[...h,e]),ce=e.tasks||{},le=(()=>{if(!e.has_key)return{tone:`warning`,text:b(`No AI engine is connected, so the autopilot has nothing to write with.`,`ai-rank-suite`),why:b(`One key, stored encrypted on your own server, switches it on — descriptions, FAQs and titles across the whole site.`,`ai-rank-suite`),action:b(`Connect an engine`,`ai-rank-suite`),onAction:()=>{window.location.hash=`/ai`}};if(y)return{tone:`neutral`,text:b(`Undoing the last run…`,`ai-rank-suite`),why:b(`Every value the run replaced is being put back exactly as it was.`,`ai-rank-suite`)};if(n||e.running)return{tone:`neutral`,text:S(b(`Writing — %1$d of %2$d AI tasks done.`,`ai-rank-suite`),te,T),why:b(`The queue runs safely on the server. You can close this tab; stopping keeps everything already written.`,`ai-rank-suite`),action:b(`Stop`,`ai-rank-suite`),onAction:D};if(e.stalled)return{tone:`warning`,text:b(`A previous run was left unfinished.`,`ai-rank-suite`),why:b(`The server queue paused before every planned task finished. Resuming picks up where it left off — nothing already written is repeated.`,`ai-rank-suite`),action:b(`Resume the run`,`ai-rank-suite`),onAction:ie};if(o.length===0)return{tone:`neutral`,text:b(`Nothing is selected for the autopilot to write.`,`ai-rank-suite`),why:b(`Turn on at least one task under “What it should write” below.`,`ai-rank-suite`)};let t=o.map(e=>ce[e]?.label||e);return{tone:`neutral`,text:S(b(`The next run will write %s for every page missing them.`,`ai-rank-suite`),Rd(t)),why:b(m===`apply`?`Changes apply directly. Every write is logged with the value it replaced, so the whole run can be undone — and it never overwrites something you wrote.`:`Nothing is published — the suggestions are parked on each page for you to accept or ignore.`,`ai-rank-suite`),action:b(`Run the autopilot`,`ai-rank-suite`),onAction:re}})();return(0,Ld.jsxs)(`div`,{className:`ars-page`,children:[i&&(0,Ld.jsx)(M,{tone:`serious`,children:i}),(0,Ld.jsx)(he,{tone:le.tone,text:le.text,sub:le.why,action:le.action,onAction:le.onAction}),(0,Ld.jsxs)(k,{title:b(`How much the autopilot may do`,`ai-rank-suite`),subtitle:b(`Every level below Controlled auto parks its work for review. Nothing is written to a live page except at the last one.`,`ai-rank-suite`),action:(0,Ld.jsx)(Ee,{checked:!!e.killed,onChange:async e=>{try{t(await E.post(`/autopilot/kill`,{on:e}))}catch(e){a(e.message)}},label:b(`Kill switch`,`ai-rank-suite`)}),children:[e.killed&&(0,Ld.jsx)(M,{tone:`serious`,children:b(`The kill switch is on: no run may write to a live page, whatever level is selected. Proposals are still made.`,`ai-rank-suite`)}),(0,Ld.jsx)(`div`,{className:`ars-levels`,children:[{id:`observe`,name:b(`Observe`,`ai-rank-suite`),one:b(`Plans and prices the work`,`ai-rank-suite`),detail:b(`A dry run. Matches the pages, counts the calls and estimates the cost. No model is called and nothing is written.`,`ai-rank-suite`),writes:!1},{id:`suggest`,name:b(`Suggest`,`ai-rank-suite`),one:b(`Writes proposals, not pages`,`ai-rank-suite`),detail:b(`Calls the engine and parks every result beside its page. Nothing on the live site changes until you apply it.`,`ai-rank-suite`),writes:!1},{id:`approve`,name:b(`Approve`,`ai-rank-suite`),one:b(`Proposals plus a review queue`,`ai-rank-suite`),detail:b(`As Suggest, and every proposal lands in the queue below where you apply it — as written or edited — or reject it.`,`ai-rank-suite`),writes:!1},{id:`auto`,name:b(`Controlled auto`,`ai-rank-suite`),one:b(`Writes directly, within limits`,`ai-rank-suite`),detail:b(`Only descriptions, FAQs and titles on pages that had none. Capped per run, logged with the previous value, undoable, stopped instantly by the kill switch.`,`ai-rank-suite`),writes:!0}].map(e=>(0,Ld.jsxs)(`button`,{type:`button`,className:`ars-level${c===e.id?` is-active`:``}${e.writes?` is-writing`:``}`,onClick:()=>l(e.id),"aria-pressed":c===e.id,children:[(0,Ld.jsxs)(`span`,{className:`ars-level-head`,children:[(0,Ld.jsx)(`span`,{className:`ars-level-name`,children:e.name}),(0,Ld.jsx)(`span`,{className:`ars-level-tag${e.writes?` is-writing`:``}`,children:e.writes?b(`writes live`,`ai-rank-suite`):b(`no live writes`,`ai-rank-suite`)})]}),(0,Ld.jsx)(`span`,{className:`ars-level-one`,children:e.one}),(0,Ld.jsx)(`span`,{className:`ars-level-detail`,children:e.detail})]},e.id))}),c===`auto`&&(0,Ld.jsxs)(`div`,{className:`ars-level-policy`,children:[(0,Ld.jsxs)(`label`,{className:`grid gap-1`,children:[(0,Ld.jsx)(`span`,{className:`t-caption`,children:b(`Stop after this many changes (0 = the plan's own limit)`,`ai-rank-suite`)}),(0,Ld.jsx)(`input`,{type:`number`,min:`0`,value:u,onChange:e=>d(Number(e.target.value))})]}),(0,Ld.jsxs)(`label`,{className:`grid gap-1`,children:[(0,Ld.jsx)(`span`,{className:`t-caption`,children:b(`Stop at this spend, USD (0 = the per-job budget)`,`ai-rank-suite`)}),(0,Ld.jsx)(`input`,{type:`number`,min:`0`,step:`0.5`,value:f,onChange:e=>p(Number(e.target.value))})]})]}),(0,Ld.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap mt-1`,children:[(0,Ld.jsx)(A,{onClick:re,busy:n,disabled:e.running||e.killed===!0&&c===`auto`,children:b(c===`observe`?`Plan and estimate`:c===`auto`?`Run and write`:`Run and propose`,`ai-rank-suite`)}),(0,Ld.jsxs)(`span`,{className:`t-caption`,children:[S(b(`%1$d of %2$d tasks · up to %3$d pages`,`ai-rank-suite`),o.length,Object.keys(ce).length,_),h.length>0?` · ${S(x(`%d type`,`%d types`,h.length,`ai-rank-suite`),h.length)}`:` · ${b(`all types`,`ai-rank-suite`)}`]})]})]}),(n||e.running||T>0)&&(0,Ld.jsx)(k,{title:b(`The run`,`ai-rank-suite`),subtitle:b(`What the plan matched, and what has happened to it`,`ai-rank-suite`),children:(0,Ld.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Ld.jsx)(be,{columns:4,metrics:[{id:`queued`,label:b(`AI tasks queued`,`ai-rank-suite`),hint:b(`One paid model call per queue item. The queue survives a closed tab and never runs two items at once.`,`ai-rank-suite`),value:T,sub:e.running?b(`server queue active`,`ai-rank-suite`):b(`in the last plan`,`ai-rank-suite`)},{id:`written`,label:b(`Written`,`ai-rank-suite`),hint:b(`Values the engine produced and that were applied or parked, depending on the mode.`,`ai-rank-suite`),value:ee.written||0},{id:`skipped`,label:b(`Skipped`,`ai-rank-suite`),hint:b(`These pages already had a value — the autopilot never overwrites a sentence a person wrote.`,`ai-rank-suite`),value:ee.skipped||0},{id:`failed`,label:b(`Failed`,`ai-rank-suite`),hint:b(`The engine refused or errored. The page is left untouched and listed below.`,`ai-rank-suite`),value:ee.failed||0,accent:ee.failed>0?`var(--ars-c-red-ink)`:void 0,sub:ee.failed>0?b(`the engine refused`,`ai-rank-suite`):b(`no errors`,`ai-rank-suite`)}]}),(0,Ld.jsxs)(`div`,{children:[(0,Ld.jsx)(`div`,{className:`ars-r-sm overflow-hidden`,style:{height:8,background:`var(--ars-surface-3)`},children:(0,Ld.jsx)(`div`,{style:{width:`${ne}%`,height:`100%`,background:`var(--ars-grad)`,transition:`width 320ms cubic-bezier(0.2,0,0,1)`}})}),(0,Ld.jsxs)(`p`,{className:`m-0 mt-1.5 t-caption`,children:[S(b(`%1$d of %2$d AI tasks across %3$d pages`,`ai-rank-suite`),te,T,ee.planned_pages||0),e.running?` — ${S(b(`server queue active · up to %d AI calls planned`,`ai-rank-suite`),ee.planned_calls||0)}`:``,ee.level?` · ${S(b(`level: %s`,`ai-rank-suite`),ee.level)}`:``,ee.estimate?.calls?` · ${S(b(`estimated %1$s calls ≈ %2$s`,`ai-rank-suite`),ee.estimate.calls,ee.estimate.cost)}`:``,ee.stopped?` · ${S(b(`stopped: %s`,`ai-rank-suite`),ee.stopped.replace(`_`,` `))}`:``]})]})]})}),ee.level===`observe`&&ee.finished>0&&(0,Ld.jsx)(M,{tone:`neutral`,children:S(b(`Dry run complete: %1$s AI calls across %2$s pages would cost about %3$s. Nothing was called or written. Switch the level to run for real.`,`ai-rank-suite`),(ee.total??0).toLocaleString(),(ee.planned_pages||0).toLocaleString(),ee.estimate?.cost??``)}),(0,Ld.jsx)(kd,{refreshKey:`${ee.finished||0}-${ee.done||0}`}),(ee.errors||[]).length>0&&(0,Ld.jsxs)(M,{tone:`serious`,children:[ee.errors.length,` page`,ee.errors.length===1?``:`s`,` failed — most recently “`,ee.errors[ee.errors.length-1].title,`”:`,` `,ee.errors[ee.errors.length-1].error]}),(0,Ld.jsx)(k,{title:b(`What the agent changed`,`ai-rank-suite`),subtitle:b(`Every write, with the value that was there before it`,`ai-rank-suite`),action:(e.log||[]).some(e=>e.status===`applied`)&&(0,Ld.jsxs)(A,{variant:`ghost`,onClick:ae,busy:n,children:[(0,Ld.jsx)(yt,{size:13}),b(`Undo the last run`,`ai-rank-suite`)]}),flush:!0,children:(e.log||[]).length===0?(0,Ld.jsx)(`p`,{className:`m-0 p-5 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Nothing yet. Nothing is written until you press the button.`,`ai-rank-suite`)}):(0,Ld.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Ld.jsxs)(`table`,{className:`ars-table`,children:[(0,Ld.jsx)(`thead`,{children:(0,Ld.jsxs)(`tr`,{children:[(0,Ld.jsx)(`th`,{style:{width:220},children:b(`Page`,`ai-rank-suite`)}),(0,Ld.jsx)(`th`,{className:`is-mid`,children:b(`What`,`ai-rank-suite`)}),(0,Ld.jsx)(`th`,{children:b(`Before`,`ai-rank-suite`)}),(0,Ld.jsx)(`th`,{children:b(`After`,`ai-rank-suite`)}),(0,Ld.jsx)(`th`,{className:`is-mid`,children:b(`Status`,`ai-rank-suite`)})]})}),(0,Ld.jsx)(`tbody`,{children:(e.log||[]).map((e,t)=>(0,Ld.jsxs)(`tr`,{children:[(0,Ld.jsx)(`td`,{className:`truncate`,children:e.title}),(0,Ld.jsx)(`td`,{className:`is-mid`,children:e.task}),(0,Ld.jsx)(`td`,{style:{color:`var(--ars-ink-3)`},children:(0,Ld.jsx)(`span`,{className:`truncate inline-block`,style:{maxWidth:260},children:e.before||`—`})}),(0,Ld.jsx)(`td`,{style:{color:`var(--ars-ink-2)`},children:(0,Ld.jsx)(`span`,{className:`truncate inline-block`,style:{maxWidth:320},children:e.after})}),(0,Ld.jsx)(`td`,{className:`is-mid`,children:(0,Ld.jsx)(j,{tone:e.status===`applied`?`good`:e.status===`undone`?`neutral`:`brand`,children:e.status})})]},t))})]})})}),(0,Ld.jsx)(Se,{title:b(`What it should write`,`ai-rank-suite`),note:`${S(b(`%1$d of %2$d tasks on`,`ai-rank-suite`),o.length,Object.keys(ce).length)} · ${b(m===`apply`?`applies directly`:`proposes only`,`ai-rank-suite`)}${h.length>0?` · ${S(x(`%d type`,`%d types`,h.length,`ai-rank-suite`),h.length)}`:``}`,children:(0,Ld.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Ld.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-2`,children:[(0,Ld.jsxs)(`div`,{children:[(0,Ld.jsx)(`div`,{className:`t-overline mb-2`,children:b(`What it should write`,`ai-rank-suite`)}),(0,Ld.jsx)(`div`,{className:`grid gap-2`,children:Object.entries(ce).map(([e,t])=>(0,Ld.jsxs)(`div`,{className:`ars-r-sm px-3 py-2.5`,style:{border:`1px solid var(--ars-border)`,background:`var(--ars-surface)`},children:[(0,Ld.jsx)(Ee,{checked:o.includes(e),onChange:()=>oe(e),label:t.label}),(0,Ld.jsx)(`p`,{className:`m-0 mt-1 ml-[48px] text-[12px]`,style:{color:`var(--ars-ink-2)`},children:t.why})]},e))})]}),(0,Ld.jsxs)(`div`,{className:`grid gap-3 content-start`,children:[(0,Ld.jsxs)(`div`,{children:[(0,Ld.jsx)(`div`,{className:`t-overline mb-2`,children:b(`Where`,`ai-rank-suite`)}),(0,Ld.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:(e.post_types||[]).map(e=>(0,Ld.jsx)(`button`,{type:`button`,onClick:()=>se(e.name),className:`ars-chip${h.includes(e.name)?` is-active`:``}`,children:e.label},e.name))}),(0,Ld.jsx)(`p`,{className:`m-0 mt-1.5 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:h.length===0?b(`Everything, unless you pick a type.`,`ai-rank-suite`):S(x(`%d type selected.`,`%d types selected.`,h.length,`ai-rank-suite`),h.length)})]}),(0,Ld.jsxs)(`label`,{className:`grid gap-1.5`,children:[(0,Ld.jsx)(`span`,{className:`t-overline`,children:b(`Maximum pages this run`,`ai-rank-suite`)}),(0,Ld.jsx)(`input`,{type:`number`,min:`1`,max:`100`,value:_,onChange:e=>v(Math.max(1,Math.min(100,Number(e.target.value)||1)))}),(0,Ld.jsx)(`span`,{className:`t-caption`,children:b(`Hard limit: 100 pages. The plan reports the maximum number of paid AI calls before work begins.`,`ai-rank-suite`)})]})]})]}),(0,Ld.jsx)(ot,{title:b(`What it will never do`,`ai-rank-suite`),children:(0,Ld.jsx)(`p`,{children:b(`It never overwrites something you wrote. Every task checks for an existing value first and skips the page rather than “improving” your sentence — and it checks again immediately before writing, so a page you edited while the run was going is still safe. Everything it does write is recorded together with the previous value, which is what makes the undo above work months later without a database backup.`,`ai-rank-suite`)})})]})}),(0,Ld.jsxs)(k,{icon:(0,Ld.jsx)(mt,{size:16}),title:b(`The floor`,`ai-rank-suite`),subtitle:b(`Every circuit, every desk and every gear — live, and only moving when something really is`,`ai-rank-suite`),flush:!0,children:[(0,Ld.jsx)(Qt,{routing:e.routing,systems:e.systems,now:e.now,running:n||e.running}),(0,Ld.jsx)(Fd,{routing:e.routing,onSaved:n=>t({...e,routing:n}),onError:a})]})]})}function Fd({routing:e,onSaved:t,onError:n}){let[r,i]=(0,Id.useState)(null),[a,o]=(0,Id.useState)(null),[s,c]=(0,Id.useState)(!1),[l,u]=(0,Id.useState)(!1);if(!e||(e.engines||[]).length===0)return null;let d=Object.fromEntries((e.jobs||[]).map(e=>[e.id,e.assigned?e.provider:``])),f=r||d,p=a===null?!!e.exclusive:a,m=r!==null&&(e.jobs||[]).some(e=>(f[e.id]||``)!==(d[e.id]||``))||a!==null&&a!==!!e.exclusive;return(0,Ld.jsxs)(`div`,{className:`ars-routing`,children:[(0,Ld.jsxs)(`div`,{className:`ars-routing-head`,children:[(0,Ld.jsxs)(`div`,{children:[(0,Ld.jsx)(`div`,{className:`t-overline`,children:b(`Assignment`,`ai-rank-suite`)}),(0,Ld.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Each job has exactly one engine. There is no fallback chain, because a job that quietly changes vendor mid-run is how one site ends up written in two voices.`,`ai-rank-suite`)})]}),(0,Ld.jsxs)(`div`,{className:`flex items-center gap-2`,children:[l&&(0,Ld.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,Ld.jsx)(Ee,{checked:p,disabled:s,onChange:o,label:b(`One writer per field`,`ai-rank-suite`)})]})]}),(e.conflicts||[]).length>0&&(0,Ld.jsx)(`div`,{className:`grid gap-1.5 mb-3`,children:e.conflicts.map((e,t)=>(0,Ld.jsxs)(`div`,{className:`ars-head-issue is-${e.level}`,children:[(0,Ld.jsx)(`span`,{"aria-hidden":!0,className:`ars-head-issue-mark`,children:e.level===`error`?`✕`:e.level===`warn`?`!`:`i`}),(0,Ld.jsxs)(`div`,{children:[(0,Ld.jsx)(`div`,{className:`font-semibold text-[12.5px]`,children:e.title}),(0,Ld.jsx)(`div`,{className:`text-[12px] mt-0.5`,style:{color:`var(--ars-ink-2)`},children:e.text})]})]},t))}),(0,Ld.jsx)(`div`,{className:`ars-routing-grid`,children:(e.jobs||[]).map(t=>(0,Ld.jsxs)(`div`,{className:`ars-routing-row`,children:[(0,Ld.jsxs)(`div`,{className:`min-w-0`,children:[(0,Ld.jsx)(`div`,{className:`font-medium text-[12.5px]`,children:t.label}),(0,Ld.jsx)(`div`,{className:`t-caption`,children:t.about}),(0,Ld.jsx)(`div`,{className:`flex gap-1 mt-1 flex-wrap`,children:(t.traits||[]).map(e=>(0,Ld.jsx)(`span`,{className:`ars-trait`,children:e},e))})]}),(0,Ld.jsxs)(`select`,{value:f[t.id]||``,disabled:s,onChange:e=>i({...f,[t.id]:e.target.value}),children:[(0,Ld.jsx)(`option`,{value:``,children:b(`Default engine`,`ai-rank-suite`)}),(e.engines||[]).map(e=>(0,Ld.jsx)(`option`,{value:e.id,children:e.label},e.id))]})]},t.id))}),m&&(0,Ld.jsxs)(`div`,{className:`ars-routing-actions`,children:[(0,Ld.jsxs)(`span`,{className:`t-caption`,children:[(e.jobs||[]).filter(e=>(f[e.id]||``)!==(d[e.id]||``)).length+ +(a!==null&&a!==!!e.exclusive),` `,b(`unsaved change(s)`,`ai-rank-suite`)]}),(0,Ld.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Ld.jsx)(A,{variant:`ghost`,onClick:()=>{i(null),o(null)},disabled:s,children:b(`Cancel`,`ai-rank-suite`)}),(0,Ld.jsx)(A,{onClick:async()=>{c(!0);try{t(await E.put(`/ai/routing`,{assignments:f,exclusive:p})),i(null),o(null),u(!0),setTimeout(()=>u(!1),1800)}catch(e){n(e.message)}finally{c(!1)}},busy:s,children:b(`Save routing`,`ai-rank-suite`)})]})]})]})}var Id,Ld,Rd,zd=o((()=>{C(),Id=u(f(),1),D(),at(),ct(),hn(),Md(),Ft(),Ld=O(),Rd=e=>e.length<=1?e.join(``):S(b(`%1$s and %2$s`,`ai-rank-suite`),e.slice(0,-1).join(`, `),e[e.length-1])})),Bd=c({default:()=>Vd});function Vd(){let[e,t]=(0,Hd.useState)(null),[n,r]=(0,Hd.useState)(null),[i,a]=(0,Hd.useState)(!1),[o,s]=(0,Hd.useState)(``),[c,l]=(0,Hd.useState)(null),[u,d]=(0,Hd.useState)(``),[f,p]=(0,Hd.useState)(``),[m,h]=(0,Hd.useState)(1),[g,_]=(0,Hd.useState)(`links`),[v,y]=(0,Hd.useState)(``),[C,w]=(0,Hd.useState)(null),ee=(0,Hd.useCallback)(async(e=m,n=o,i=u,a=f)=>{try{let o=new URLSearchParams({page:String(e),per_page:`25`,status:n,via:i,search:a});t(await E.get(`/backlinks?${o}`)),r(null)}catch(e){r(e.message)}},[m,o,u,f]);if((0,Hd.useEffect)(()=>{ee(m,o,u,f)},[m,o,u]),(0,Hd.useEffect)(()=>{E.get(`/backlinks/growth?weeks=26`).then(e=>l(e.weeks||[])).catch(()=>l([]))},[]),!e)return(0,Ud.jsx)(_e,{error:n});let T=e.summary||{},te=Math.max(1,Math.ceil((e.total||0)/25)),ne=async e=>{a(!0),w(null);try{let t=await E.post(`/backlinks/verify`,{ids:e||[]});w(t.checked===0?b(`Nothing was waiting to be checked — every link has been read in the last week.`,`ai-rank-suite`):S(x(`Read %1$d source page. %2$d still queued.`,`Read %1$d source pages. %2$d still queued.`,t.checked,`ai-rank-suite`),t.checked,t.pending)),await ee()}catch(e){r(e.message)}finally{a(!1)}},re=async()=>{a(!0),w(null);try{let e=await E.post(`/backlinks/bing`);w(S(b(`Bing returned %1$s links across %2$s of your pages.`,`ai-rank-suite`),e.imported,e.pages)),await ee()}catch(e){r(e.message)}finally{a(!1)}},ie=async()=>{a(!0);try{await E.put(`/backlinks/bing`,{key:v}),y(``),await ee()}catch(e){r(e.message)}finally{a(!1)}},D=async e=>{await E.del(`/backlinks/${e}`),ee()};return(0,Ud.jsxs)(`div`,{className:`ars-page`,children:[n&&(0,Ud.jsx)(M,{tone:`serious`,children:n}),C&&(0,Ud.jsx)(M,{tone:`good`,children:C}),(0,Ud.jsx)(pa,{...(()=>{let t=e?.summary||{},n=t.total||0;return e?.bing?.connected?n===0?{tone:`warning`,text:b(`Connected, but no backlinks have come back yet.`,`ai-rank-suite`),why:b(`Either the index genuinely has none for this domain, or the site is not verified in that account — Bing only returns links for a site you own there.`,`ai-rank-suite`)}:{tone:t.lost>0?`warning`:`good`,text:S(x(`%1$s link from %2$s domains.`,`%1$s links from %2$s domains.`,n,`ai-rank-suite`),n.toLocaleString(),(t.domains||0).toLocaleString()),why:t.lost>0?S(b(`%s were there before and are not now — a lost link is worth chasing while the editor still remembers the page.`,`ai-rank-suite`),t.lost.toLocaleString()):b(`Nothing has been lost since the last check. The anchors below show what those links say you are about.`,`ai-rank-suite`)}:{tone:`neutral`,text:b(`No backlink source is connected, so this screen has nothing to read.`,`ai-rank-suite`),why:b(`Bing Webmaster Tools is free and is the one backlink index a site can read for its own domain. Connect it under Sources and the numbers below fill in.`,`ai-rank-suite`),action:b(`Open Sources`,`ai-rank-suite`),onAction:()=>_(`sources`)}})()}),(0,Ud.jsx)(be,{columns:4,metrics:[{id:`domains`,label:b(`Referring domains`,`ai-rank-suite`),hint:b(`Distinct sites known to link here — from visitors, Bing and your own imports.`,`ai-rank-suite`),value:T.domains??`—`,sub:S(x(`%s link in total`,`%s links in total`,T.total||0,`ai-rank-suite`),(T.total||0).toLocaleString())},{id:`live`,label:b(`Verified live`,`ai-rank-suite`),hint:b(`The source page was fetched and read: the link is there and followed.`,`ai-rank-suite`),value:T.live??`—`,sub:T.nofollow?S(b(`%d more are nofollow`,`ai-rank-suite`),T.nofollow):void 0},{id:`lost`,label:b(`Lost`,`ai-rank-suite`),hint:b(`The source page was read again and the link is no longer on it — a claim worth trusting, unlike an index that last crawled months ago.`,`ai-rank-suite`),value:T.lost??`—`,accent:T.lost>0?`var(--ars-c-red-ink)`:void 0},{id:`clicks`,label:b(`Clicks through`,`ai-rank-suite`),hint:b(`Visits that arrived by a link — the links that actually send you people.`,`ai-rank-suite`),value:T.clicks??`—`}]}),c&&c.length>1&&(0,Ud.jsx)(k,{title:b(`Backlink profile over time`,`ai-rank-suite`),subtitle:b(`Every link this site knows about, accumulated week by week`,`ai-rank-suite`),action:(0,Ud.jsx)(Re,{value:(c[c.length-1]?.value??0)-(c[0]?.value??0),suffix:` ${b(`in this window`,`ai-rank-suite`)}`}),children:(0,Ud.jsx)(je,{data:c,label:b(`Known backlinks`,`ai-rank-suite`),color:`var(--ars-series-4)`,height:140,formatValue:e=>`${e}`})}),(0,Ud.jsx)(He,{value:g,onChange:_,label:b(`View`,`ai-rank-suite`),options:[{id:`links`,label:S(b(`Links (%s)`,`ai-rank-suite`),(e.total||0).toLocaleString())},{id:`domains`,label:S(b(`Domains (%s)`,`ai-rank-suite`),T.domains||0)},{id:`anchors`,label:b(`Anchors`,`ai-rank-suite`)},{id:`sources`,label:b(`Sources`,`ai-rank-suite`)}]}),g===`links`&&(0,Ud.jsxs)(k,{icon:(0,Ud.jsx)(St,{size:16}),title:b(`Every link we know about`,`ai-rank-suite`),subtitle:b(`Where it came from, whether the page still carries it, and what the anchor says`,`ai-rank-suite`),action:(0,Ud.jsxs)(`div`,{className:`flex items-center gap-2`,children:[T.unverified>0&&(0,Ud.jsx)(j,{tone:`brand`,children:S(b(`%d not read yet`,`ai-rank-suite`),T.unverified)}),(0,Ud.jsxs)(A,{variant:`ghost`,busy:i,onClick:()=>ne(),children:[(0,Ud.jsx)(yt,{size:13}),b(`Check the next 10`,`ai-rank-suite`)]})]}),flush:!0,children:[(0,Ud.jsxs)(Be,{right:(0,Ud.jsx)(Ve,{label:b(`Found by`,`ai-rank-suite`),value:u,onChange:e=>{d(e),h(1)},options:[{id:``,label:b(`Any`,`ai-rank-suite`)},{id:`referrer`,label:b(`Visitors`,`ai-rank-suite`)},{id:`bing`,label:b(`Bing`,`ai-rank-suite`)},{id:`import`,label:b(`Imported`,`ai-rank-suite`)}]}),children:[(0,Ud.jsxs)(`div`,{className:`ars-search`,children:[(0,Ud.jsx)(gt,{size:14}),(0,Ud.jsx)(`input`,{type:`search`,value:f,placeholder:b(`Domain or anchor text`,`ai-rank-suite`),onChange:e=>p(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(h(1),ee(1,o,u,f))}})]}),(0,Ud.jsx)(Ve,{label:b(`Status`,`ai-rank-suite`),value:o,onChange:e=>{s(e),h(1)},options:[{id:``,label:b(`All`,`ai-rank-suite`)},{id:`live`,label:b(`Live`,`ai-rank-suite`)},{id:`nofollow`,label:b(`Nofollow`,`ai-rank-suite`)},{id:`lost`,label:b(`Lost`,`ai-rank-suite`)},{id:`unverified`,label:b(`Unverified`,`ai-rank-suite`)},{id:`unreachable`,label:b(`Unreachable`,`ai-rank-suite`)}]})]}),e.rows.length===0?(0,Ud.jsxs)(`div`,{className:`ars-empty`,children:[(0,Ud.jsx)(St,{size:22}),(0,Ud.jsx)(`div`,{className:`font-semibold mt-2`,children:b(`No links recorded yet`,`ai-rank-suite`)}),(0,Ud.jsx)(`p`,{className:`m-0 mt-1 text-[13px] max-w-[62ch] mx-auto`,style:{color:`var(--ars-ink-2)`},children:b(`The list fills itself: every visitor who arrives from another site proves a link exists and gets recorded here. Connect Bing Webmaster Tools under Sources for the links nobody has clicked yet.`,`ai-rank-suite`)})]}):(0,Ud.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Ud.jsxs)(`table`,{className:`ars-table`,children:[(0,Ud.jsx)(`thead`,{children:(0,Ud.jsxs)(`tr`,{children:[(0,Ud.jsx)(`th`,{style:{width:210},children:b(`From`,`ai-rank-suite`)}),(0,Ud.jsx)(`th`,{children:b(`Anchor`,`ai-rank-suite`)}),(0,Ud.jsx)(`th`,{style:{width:190},children:`To`}),(0,Ud.jsx)(`th`,{className:`is-mid`,style:{width:108},children:b(`Status`,`ai-rank-suite`)}),(0,Ud.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Clicks`,`ai-rank-suite`)}),(0,Ud.jsx)(`th`,{className:`is-mid`,style:{width:92},children:b(`Found by`,`ai-rank-suite`)}),(0,Ud.jsx)(`th`,{style:{width:34},"aria-label":b(`Remove`,`ai-rank-suite`)})]})}),(0,Ud.jsx)(`tbody`,{children:e.rows.map(e=>{let t=Wd[e.status]||Wd.unverified;return(0,Ud.jsxs)(`tr`,{children:[(0,Ud.jsx)(`td`,{children:(0,Ud.jsxs)(`a`,{href:e.source,target:`_blank`,rel:`noreferrer nofollow`,className:`inline-flex items-center gap-1 font-medium`,title:e.source,children:[e.domain,` `,(0,Ud.jsx)(vt,{size:10})]})}),(0,Ud.jsx)(`td`,{style:{color:`var(--ars-ink-2)`},children:e.anchor?(0,Ud.jsx)(`span`,{className:`truncate inline-block`,style:{maxWidth:260},children:e.anchor}):(0,Ud.jsx)(`i`,{style:{color:`var(--ars-ink-3)`},children:b(`not read yet`,`ai-rank-suite`)})}),(0,Ud.jsx)(`td`,{className:`truncate`,style:{color:`var(--ars-ink-2)`},children:e.post_title||e.target}),(0,Ud.jsx)(`td`,{className:`is-mid`,children:(0,Ud.jsx)(`span`,{title:t.why,children:(0,Ud.jsx)(j,{tone:t.tone,children:t.label})})}),(0,Ud.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.hits||`—`}),(0,Ud.jsx)(`td`,{className:`is-mid`,children:(0,Ud.jsx)(`span`,{className:`ars-tag`,title:Gd[e.via]||e.via,children:e.via})}),(0,Ud.jsx)(`td`,{children:(0,Ud.jsx)(`button`,{type:`button`,className:`ars-move`,"aria-label":b(`Remove this link`,`ai-rank-suite`),title:b(`Remove from the list`,`ai-rank-suite`),onClick:()=>D(e.id),children:(0,Ud.jsx)(Mt,{size:12})})})]},e.id)})})]})}),te>1&&(0,Ud.jsxs)(`div`,{className:`flex items-center gap-2 p-3`,children:[(0,Ud.jsx)(A,{variant:`ghost`,disabled:m<=1,onClick:()=>h(m-1),children:`← Previous`}),(0,Ud.jsx)(`span`,{className:`t-caption`,children:S(b(`Page %1$s of %2$s`,`ai-rank-suite`),m.toLocaleString(),te.toLocaleString())}),(0,Ud.jsx)(A,{variant:`ghost`,disabled:m>=te,onClick:()=>h(m+1),children:b(`Next →`,`ai-rank-suite`)})]})]}),g===`domains`&&(0,Ud.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:[(0,Ud.jsx)(k,{title:b(`Who links to you most`,`ai-rank-suite`),subtitle:b(`By number of linking pages`,`ai-rank-suite`),flush:!0,children:(T.top_domains||[]).length===0?(0,Ud.jsx)(`p`,{className:`m-0 p-4 t-caption`,children:b(`Nothing recorded yet.`,`ai-rank-suite`)}):(0,Ud.jsx)(`div`,{className:`p-4`,children:(0,Ud.jsx)(We,{items:(T.top_domains||[]).map(e=>({label:e.domain,value:e.links})),max:Math.max(...(T.top_domains||[{links:1}]).map(e=>e.links)),format:e=>S(x(`%d link`,`%d links`,e,`ai-rank-suite`),e)})})}),(0,Ud.jsx)(k,{title:b(`Which of your pages earn links`,`ai-rank-suite`),subtitle:b(`By number of distinct referring domains`,`ai-rank-suite`),flush:!0,children:(T.top_pages||[]).length===0?(0,Ud.jsx)(`p`,{className:`m-0 p-4 t-caption`,children:b(`Nothing recorded yet.`,`ai-rank-suite`)}):(0,Ud.jsx)(`div`,{className:`p-4`,children:(0,Ud.jsx)(We,{items:(T.top_pages||[]).map(e=>({label:e.title||`#${e.post_id}`,value:e.domains})),max:Math.max(...(T.top_pages||[{domains:1}]).map(e=>e.domains)),format:e=>`${e} domain${e===1?``:`s`}`,color:`var(--ars-accent)`})})})]}),g===`anchors`&&(0,Ud.jsx)(k,{title:b(`Anchor text`,`ai-rank-suite`),subtitle:b(`What other sites call you — the phrase a search engine most strongly associates with the page`,`ai-rank-suite`),flush:!0,children:(T.anchors||[]).length===0?(0,Ud.jsx)(`p`,{className:`m-0 p-4 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Anchors are read from the source page during verification, so this fills up as links are checked.`,`ai-rank-suite`)}):(0,Ud.jsxs)(`div`,{className:`p-4`,children:[(0,Ud.jsx)(We,{items:(T.anchors||[]).map(e=>({label:e.text,value:e.n})),max:Math.max(...(T.anchors||[{n:1}]).map(e=>e.n)),format:e=>`${e}×`}),(0,Ud.jsx)(`p`,{className:`m-0 mt-3 t-caption max-w-[70ch]`,children:b(`A healthy profile is mostly your brand name and natural phrases. A single commercial keyword dominating the list is the pattern link schemes produce, and the pattern penalties look for.`,`ai-rank-suite`)})]})}),g===`sources`&&(0,Ud.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Ud.jsx)(k,{title:b(`Bing Webmaster Tools`,`ai-rank-suite`),subtitle:b(`The one backlink index a site can read for free — generate an API key in Bing Webmaster Tools under Settings → API access`,`ai-rank-suite`),action:e.bing?.connected&&(0,Ud.jsx)(A,{busy:i,onClick:re,children:b(`Import links now`,`ai-rank-suite`)}),children:(0,Ud.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Ud.jsx)(Ke,{label:b(`API key`,`ai-rank-suite`),hint:e.bing?.connected?S(b(`Stored (%s). Enter a new one to replace it.`,`ai-rank-suite`),e.bing.hint):b(`Stored encrypted. Bing only returns links for a site verified in your account.`,`ai-rank-suite`),children:(0,Ud.jsx)(`input`,{type:`password`,value:v,autoComplete:`off`,placeholder:e.bing?.connected?`••••••••`:b(`Paste the key`,`ai-rank-suite`),onChange:e=>y(e.target.value)})}),(0,Ud.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,Ud.jsx)(A,{variant:`ghost`,busy:i,onClick:ie,disabled:!v,children:b(`Save key`,`ai-rank-suite`)}),e.bing?.connected&&(0,Ud.jsx)(j,{tone:`good`,children:b(`Connected`,`ai-rank-suite`)}),e.bing?.last>0&&(0,Ud.jsx)(`span`,{className:`t-caption`,children:S(b(`Last import %s`,`ai-rank-suite`),new Date(e.bing.last*1e3).toLocaleString())})]})]})}),(0,Ud.jsxs)(ot,{title:b(`Where these numbers come from, and what they are not`,`ai-rank-suite`),children:[(0,Ud.jsx)(`p`,{children:b(`No plugin can produce an Ahrefs-style backlink index from inside a WordPress install — those are built by crawling the web for years. So this is built around three sources, and every row says which one it came from.`,`ai-rank-suite`)}),(0,Ud.jsxs)(`p`,{children:[(0,Ud.jsx)(`b`,{children:b(`Visitors.`,`ai-rank-suite`)}),` `,b(`Someone arriving from another domain proves a link exists and that it is being clicked. That is a smaller set than a commercial index and a more useful one: these are the links that send you people. Note that a full-page cache serves most visits without PHP running, so a site behind one records fewer referrals than it receives.`,`ai-rank-suite`)]}),(0,Ud.jsxs)(`p`,{children:[(0,Ud.jsx)(`b`,{children:b(`Verification.`,`ai-rank-suite`)}),` `,b(`For any link here, the source page is fetched and read: is the link still on it, what does the anchor say, is it nofollow. A commercial index tells you a link existed when it last crawled. This tells you what the page says now — which is why “Lost” is a claim worth trusting, and why “Unreachable” is kept separate from it rather than counted as a removal.`,`ai-rank-suite`)]}),(0,Ud.jsxs)(`p`,{children:[(0,Ud.jsx)(`b`,{children:b(`Bing.`,`ai-rank-suite`)}),` `,b(`Free, real crawl data, limited to sites verified in your Webmaster Tools account and to Bing's own index, which is smaller than Google's. Useful for breadth; not a total.`,`ai-rank-suite`)]})]})]})]})}var Hd,Ud,Wd,Gd,Kd=o((()=>{C(),Hd=u(f(),1),D(),ha(),at(),ct(),Ft(),Ud=O(),Wd={live:{tone:`good`,label:b(`Live`,`ai-rank-suite`),why:b(`Read the page; the link is there and followed.`,`ai-rank-suite`)},nofollow:{tone:`neutral`,label:b(`Nofollow`,`ai-rank-suite`),why:b(`The link is there but carries rel=nofollow, ugc or sponsored.`,`ai-rank-suite`)},lost:{tone:`serious`,label:b(`Lost`,`ai-rank-suite`),why:b(`We read the page and the link is no longer on it.`,`ai-rank-suite`)},unreachable:{tone:`warning`,label:b(`Unreachable`,`ai-rank-suite`),why:b(`The source did not answer. Not the same as removed.`,`ai-rank-suite`)},unverified:{tone:`brand`,label:b(`Unverified`,`ai-rank-suite`),why:b(`Known from a visit or an import; not read yet.`,`ai-rank-suite`)}},Gd={referrer:b(`A real visitor arrived through it`,`ai-rank-suite`),bing:`Bing Webmaster Tools`,import:b(`Imported by you`,`ai-rank-suite`)}})),qd=c({default:()=>Zd});function Jd({id:e,label:t}){let[n,r]=Qd.useState(!1),i=window.airanksuiteData&&window.airanksuiteData.assetsUrl||``,a=i?`${i}img/providers/${e}.png`:``;if(a&&!n)return(0,$d.jsx)(`span`,{className:`ars-provider-mark is-image`,"aria-hidden":!0,children:(0,$d.jsx)(`img`,{src:a,alt:``,width:38,height:38,loading:`lazy`,onError:()=>r(!0)})});let o=t.replace(/[^A-Za-z ]/g,``).split(/\s+/).filter(Boolean).slice(0,2).map(e=>e[0].toUpperCase()).join(``),s=0;for(let e of t)s=(s*31+e.charCodeAt(0))%360;return(0,$d.jsx)(`span`,{className:`ars-provider-mark`,style:{"--mark-h":s},"aria-hidden":!0,children:o||`?`})}function Yd({provider:e,domain:t,onSaved:n}){let[r,i]=(0,Qd.useState)(!1),[a,o]=(0,Qd.useState)({}),[s,c]=(0,Qd.useState)(``),[l,u]=(0,Qd.useState)(null),[d,f]=(0,Qd.useState)(e.metrics||null),[p,m]=(0,Qd.useState)(e.fetched||0),[h,g]=(0,Qd.useState)(null);(0,Qd.useEffect)(()=>{f(e.metrics||null),m(e.fetched||0)},[e.metrics,e.fetched]);let _=e.capabilities.includes(`metrics`),v=e.capabilities.includes(`serp`),y=async(e,t)=>{c(e),g(null),u(null);try{await t()}catch(e){g(e.message)}finally{c(``)}},x=()=>y(`save`,async()=>{let t=await E.post(`/seo-apis/${e.id}/credentials`,{values:a});o({}),i(!1),n(t.providers)}),S=()=>y(`test`,async()=>{u(await E.post(`/seo-apis/${e.id}/test`,{}))}),C=()=>y(`metrics`,async()=>{let n=await E.post(`/seo-apis/${e.id}/metrics`,{domain:t,force:!0});f(n.metrics),m(n.fetched)}),w=()=>y(`forget`,async()=>{let t=await E.del(`/seo-apis/${e.id}/credentials`);f(null),m(0),u(null),n(t.providers)}),ee=ef.filter(e=>d&&d[e.key]!==void 0&&d[e.key]!==null);return(0,$d.jsxs)(`div`,{className:`ars-provider${e.configured?` is-connected`:``}${r?` is-open`:``}`,children:[(0,$d.jsxs)(`div`,{className:`ars-provider-head`,children:[(0,$d.jsx)(Jd,{id:e.id,label:e.label}),(0,$d.jsxs)(`div`,{className:`grid gap-0.5 min-w-0 flex-1`,children:[(0,$d.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,$d.jsx)(`span`,{className:`ars-provider-name`,children:e.label}),e.configured?(0,$d.jsx)(`span`,{className:`ars-provider-state is-on`,children:b(`Connected`,`ai-rank-suite`)}):(0,$d.jsx)(`span`,{className:`ars-provider-state`,children:b(`Not connected`,`ai-rank-suite`)})]}),(0,$d.jsxs)(`div`,{className:`ars-provider-caps`,children:[_&&(0,$d.jsx)(`span`,{className:`ars-provider-cap is-metrics`,children:b(`Domain authority`,`ai-rank-suite`)}),v&&(0,$d.jsx)(`span`,{className:`ars-provider-cap is-serp`,children:b(`Live SERP`,`ai-rank-suite`)})]})]}),(0,$d.jsx)(`a`,{className:`ars-provider-docs`,href:e.docs,target:`_blank`,rel:`noreferrer noopener`,title:b(`Vendor documentation`,`ai-rank-suite`),children:`↗`})]}),(0,$d.jsx)(`p`,{className:`ars-provider-blurb`,children:e.blurb}),h&&(0,$d.jsx)(M,{tone:`serious`,children:h}),l&&(0,$d.jsx)(M,{tone:l.ok?`good`:`serious`,children:l.message}),ee.length>0&&(0,$d.jsx)(`div`,{className:`ars-vendor-metrics`,children:ee.map(e=>(0,$d.jsxs)(`div`,{className:`ars-vendor-metric`,children:[(0,$d.jsx)(`span`,{className:`ars-vendor-metric-n tabular-nums`,children:tf(d[e.key],e.kind)}),(0,$d.jsx)(`span`,{className:`ars-vendor-metric-l`,children:e.key===`authority`&&d.authority_label?d.authority_label:e.label})]},e.key))}),p>0&&(0,$d.jsxs)(`span`,{className:`t-caption`,children:[b(`Measured for`,`ai-rank-suite`),` `,t,` · `,nf(p)]}),r&&(0,$d.jsxs)(`div`,{className:`grid gap-3 pt-1`,children:[e.fields.map(t=>(0,$d.jsx)(Ke,{label:t.label,hint:t.hint,htmlFor:`${e.id}-${t.key}`,children:(0,$d.jsx)(`input`,{id:`${e.id}-${t.key}`,type:`password`,autoComplete:`off`,placeholder:t.set?b(`Saved — type to replace`,`ai-rank-suite`):``,value:a[t.key]??``,onChange:e=>o({...a,[t.key]:e.target.value})})},t.key)),(0,$d.jsxs)(`p`,{className:`t-caption`,style:{margin:0},children:[e.notes,` `,(0,$d.jsxs)(`a`,{href:e.docs,target:`_blank`,rel:`noreferrer noopener`,children:[b(`Vendor documentation`,`ai-rank-suite`),` ↗`]})]}),(0,$d.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,$d.jsx)(A,{onClick:x,busy:s===`save`,disabled:Object.keys(a).length===0,children:b(`Save credentials`,`ai-rank-suite`)}),(0,$d.jsx)(A,{variant:`ghost`,onClick:()=>{i(!1),o({})},children:b(`Cancel`,`ai-rank-suite`)})]})]}),!r&&(0,$d.jsxs)(`div`,{className:`ars-provider-foot`,children:[(0,$d.jsx)(A,{variant:e.configured?`ghost`:`primary`,onClick:()=>i(!0),children:e.configured?b(`Edit credentials`,`ai-rank-suite`):b(`Connect`,`ai-rank-suite`)}),e.configured&&(0,$d.jsxs)($d.Fragment,{children:[(0,$d.jsx)(A,{variant:`ghost`,onClick:S,busy:s===`test`,children:b(`Test`,`ai-rank-suite`)}),_&&(0,$d.jsx)(A,{variant:`ghost`,onClick:C,busy:s===`metrics`,children:b(d?`Refresh`:`Fetch metrics`,`ai-rank-suite`)}),(0,$d.jsx)(A,{variant:`ghost`,onClick:w,busy:s===`forget`,children:b(`Disconnect`,`ai-rank-suite`)})]})]})]})}function Xd({providers:e,domain:t}){let n=e.filter(e=>e.configured&&e.capabilities.includes(`serp`)),[r,i]=(0,Qd.useState)(n[0]?.id||``),[a,o]=(0,Qd.useState)(``),[s,c]=(0,Qd.useState)(``),[l,u]=(0,Qd.useState)(!1),[d,f]=(0,Qd.useState)(null),[p,m]=(0,Qd.useState)(null);if((0,Qd.useEffect)(()=>{n.some(e=>e.id===r)||i(n[0]?.id||``)},[e]),n.length===0)return(0,$d.jsx)(k,{title:b(`Rank check`,`ai-rank-suite`),icon:(0,$d.jsx)(gt,{size:18}),children:(0,$d.jsx)(ve,{icon:(0,$d.jsx)(gt,{size:18}),title:b(`No live SERP vendor is connected yet`,`ai-rank-suite`),children:b(`Connect DataForSEO, SerpApi, Serper.dev, ValueSERP, Scale SERP or Zenserp above, and this becomes a real-time position check for any keyword — with your own domain highlighted in the results.`,`ai-rank-suite`)})});let h=async()=>{if(a.trim()){u(!0),f(null),m(null);try{m(await E.post(`/seo-apis/${r}/serp`,{keyword:a.trim(),location:s}))}catch(e){f(e.message)}finally{u(!1)}}};return(0,$d.jsxs)(k,{title:b(`Rank check`,`ai-rank-suite`),subtitle:b(`One live search, run through a vendor you have connected. Costs one credit per check.`,`ai-rank-suite`),icon:(0,$d.jsx)(gt,{size:18}),children:[(0,$d.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto] items-end`,children:[(0,$d.jsx)(Ke,{label:b(`Keyword`,`ai-rank-suite`),htmlFor:`airanksuite-serp-kw`,children:(0,$d.jsx)(`input`,{id:`airanksuite-serp-kw`,value:a,placeholder:b(`best coffee dubai`,`ai-rank-suite`),onChange:e=>o(e.target.value),onKeyDown:e=>{e.key===`Enter`&&h()}})}),(0,$d.jsx)(Ke,{label:b(`Location`,`ai-rank-suite`),hint:b(`Optional. A place name, or a country code for Serper.`,`ai-rank-suite`),htmlFor:`airanksuite-serp-loc`,children:(0,$d.jsx)(`input`,{id:`airanksuite-serp-loc`,value:s,placeholder:b(`United Arab Emirates`,`ai-rank-suite`),onChange:e=>c(e.target.value)})}),(0,$d.jsx)(A,{onClick:h,busy:l,disabled:!a.trim(),children:b(`Check`,`ai-rank-suite`)})]}),(0,$d.jsx)(`div`,{className:`mt-3`,children:(0,$d.jsx)(Rr,{onPick:o,label:b(`Let AI pick a keyword`,`ai-rank-suite`)})}),(0,$d.jsx)(`div`,{className:`mt-3`,children:(0,$d.jsx)(He,{label:b(`Vendor`,`ai-rank-suite`),value:r,onChange:i,options:n.map(e=>({id:e.id,label:e.label}))})}),d&&(0,$d.jsx)(`div`,{className:`mt-3`,children:(0,$d.jsx)(M,{tone:`serious`,children:d})}),p&&(0,$d.jsxs)(`div`,{className:`mt-4 grid gap-3`,children:[(0,$d.jsx)(M,{tone:p.position?`good`:`warning`,children:p.position?`${t} ${b(`ranks at position`,`ai-rank-suite`)} ${p.position} ${b(`for`,`ai-rank-suite`)} “${a}”.`:`${t} ${b(`is not in the top`,`ai-rank-suite`)} ${p.results.length} ${b(`for`,`ai-rank-suite`)} “${a}”.`}),(0,$d.jsx)(`div`,{className:`ars-serp-list`,children:p.results.slice(0,20).map(e=>{let n=e.domain===t;return(0,$d.jsxs)(`div`,{className:`ars-serp-row${n?` is-mine`:``}`,children:[(0,$d.jsx)(Me,{value:e.position}),(0,$d.jsxs)(`div`,{className:`grid gap-0.5 min-w-0`,children:[(0,$d.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer noopener`,className:`ars-serp-title`,children:e.title||e.url}),(0,$d.jsx)(`span`,{className:`ars-serp-url`,children:e.domain})]})]},`${e.position}-${e.url}`)})}),p.results.length>20&&(0,$d.jsxs)(`span`,{className:`t-caption`,children:[b(`Showing the top 20 of`,`ai-rank-suite`),` `,p.results.length,` `,b(`results returned.`,`ai-rank-suite`)]})]})]})}function Zd(){let[e,t]=(0,Qd.useState)(null),[n,r]=(0,Qd.useState)(``),[i,a]=(0,Qd.useState)(null),[o,s]=(0,Qd.useState)(`all`);(0,Qd.useEffect)(()=>{E.get(`/seo-apis`).then(e=>{t(e.providers),r(e.domain)}).catch(e=>a(e.message))},[]);let c=(0,Qd.useMemo)(()=>(e||[]).filter(e=>o===`all`||e.category===o),[e,o]),l=(e||[]).filter(e=>e.configured).length;return e?(0,$d.jsxs)(`div`,{className:`grid gap-5`,children:[(0,$d.jsx)(k,{title:b(`SEO data providers`,`ai-rank-suite`),subtitle:b(`Bring third-party authority scores and live search results into this dashboard. Keys are encrypted on your own server and never leave it except to the vendor they belong to.`,`ai-rank-suite`),icon:(0,$d.jsx)(St,{size:18}),action:(0,$d.jsx)(He,{value:o,onChange:s,options:[{id:`all`,label:b(`All`,`ai-rank-suite`)},{id:`authority`,label:b(`Domain authority`,`ai-rank-suite`)},{id:`serp`,label:b(`Live SERP`,`ai-rank-suite`)}]}),children:(0,$d.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,$d.jsxs)(j,{tone:l>0?`good`:`neutral`,children:[l,` `,b(`of`,`ai-rank-suite`),` `,e.length,` `,b(`connected`,`ai-rank-suite`)]}),(0,$d.jsxs)(`span`,{className:`t-caption`,children:[b(`Measuring`,`ai-rank-suite`),` `,n]})]})}),(0,$d.jsxs)(`div`,{children:[(0,$d.jsx)(Ce,{hint:b(`Each vendor bills you directly. Nothing here calls out until you press a button.`,`ai-rank-suite`),children:b(o===`serp`?`Live search results`:o===`authority`?`Domain authority`:`All vendors`,`ai-rank-suite`)}),(0,$d.jsx)(`div`,{className:`ars-provider-grid mt-3`,children:c.map(e=>(0,$d.jsx)(Yd,{provider:e,domain:n,onSaved:t},e.id))})]}),(0,$d.jsx)(Xd,{providers:e,domain:n})]}):(0,$d.jsx)(_e,{error:i,label:b(`Loading vendors`,`ai-rank-suite`)})}var Qd,$d,ef,tf,nf,rf=o((()=>{Qd=u(f(),1),C(),D(),at(),Ft(),Vr(),$d=O(),ef=[{key:`authority`,label:b(`Authority`,`ai-rank-suite`),kind:`score`},{key:`trust_flow`,label:b(`Trust Flow`,`ai-rank-suite`),kind:`score`},{key:`citation_flow`,label:b(`Citation Flow`,`ai-rank-suite`),kind:`score`},{key:`page_authority`,label:b(`Page Authority`,`ai-rank-suite`),kind:`score`},{key:`visibility_index`,label:b(`Visibility Index`,`ai-rank-suite`),kind:`decimal`},{key:`referring_domains`,label:b(`Referring domains`,`ai-rank-suite`),kind:`count`},{key:`backlinks`,label:b(`Backlinks`,`ai-rank-suite`),kind:`count`},{key:`organic_keywords`,label:b(`Organic keywords`,`ai-rank-suite`),kind:`count`},{key:`organic_traffic`,label:b(`Est. monthly visits`,`ai-rank-suite`),kind:`count`},{key:`spam_score`,label:b(`Spam score`,`ai-rank-suite`),kind:`score`}],tf=(e,t)=>{let n=Number(e);return Number.isFinite(n)?t===`decimal`?n.toLocaleString(void 0,{maximumFractionDigits:2}):t===`count`?n.toLocaleString():String(Math.round(n)):`–`},nf=e=>{if(!e)return``;let t=Math.round((Date.now()/1e3-e)/60);if(t<1)return b(`just now`,`ai-rank-suite`);if(t<60)return`${t} min ago`;let n=Math.round(t/60);return n<24?`${n} h ago`:`${Math.round(n/24)} d ago`}})),af=c({default:()=>of});function of(){let[e,t]=(0,sf.useState)(null),[n,r]=(0,sf.useState)(``),[i,a]=(0,sf.useState)(``),[o,s]=(0,sf.useState)(``),[c,l]=(0,sf.useState)(!1),[u,d]=(0,sf.useState)(null),[f,p]=(0,sf.useState)(null);if((0,sf.useEffect)(()=>{E.get(`/packs`).then(e=>{t(e),e.applied&&(r(e.applied.pack),a(e.applied.region),s(e.applied.city||``))}).catch(e=>p(e.message))},[]),!e)return(0,cf.jsx)(_e,{error:f});let m=e.packs.find(e=>e.id===n),h=e.regions.find(e=>e.id===i);return(0,cf.jsxs)(`div`,{className:`ars-page`,children:[(0,cf.jsx)(k,{title:b(`Industry packs`,`ai-rank-suite`),subtitle:b(`Your trade and your market, turned into a configured site`,`ai-rank-suite`),action:e.applied?(0,cf.jsxs)(j,{tone:`good`,children:[`✓ `,e.packs.find(t=>t.id===e.applied.pack)?.label,` ·`,` `,e.regions.find(t=>t.id===e.applied.region)?.short]}):(0,cf.jsx)(j,{tone:`neutral`,children:b(`Nothing applied yet`,`ai-rank-suite`)}),children:(0,cf.jsxs)(ot,{title:b(`What a pack actually does — and what it never does`,`ai-rank-suite`),children:[(0,cf.jsxs)(`p`,{children:[b(`A dentist does not know that schema.org has a Dentist type, that`,`ai-rank-suite`),` `,(0,cf.jsx)(`code`,{children:`knowsAbout`}),` `,b(`is the strongest expertise signal an assistant reads, or which four questions patients type into ChatGPT before booking. They know they run a practice in Munich. A pack turns that one fact into configuration.`,`ai-rank-suite`)]}),(0,cf.jsx)(`p`,{children:b(`Applying a pack is additive. It fills empty fields, adds subjects and prompts that are not already there, and leaves every value you have typed exactly as it is — so pressing it twice is safe, and pressing it after months of tuning does not undo any of that tuning.`,`ai-rank-suite`)})]})}),(0,cf.jsx)(k,{title:b(`1 · What do you do?`,`ai-rank-suite`),subtitle:b(`Sets the schema type, the subjects you claim, and the questions worth watching`,`ai-rank-suite`),children:(0,cf.jsx)(`div`,{className:`ars-cardgrid`,style:{"--min":`250px`},children:e.packs.map(e=>(0,cf.jsxs)(`button`,{type:`button`,onClick:()=>r(e.id),className:`ars-pick${n===e.id?` is-active`:``}`,children:[(0,cf.jsxs)(`span`,{className:`ars-pick-title`,children:[e.label,n===e.id&&(0,cf.jsx)(`span`,{style:{marginLeft:`auto`,color:`var(--ars-brand)`},children:`✓`})]}),(0,cf.jsx)(`span`,{className:`ars-pick-note`,children:e.summary})]},e.id))})}),(0,cf.jsx)(k,{title:b(`2 · Which market?`,`ai-rank-suite`),subtitle:b(`Currency, payment methods, languages and the identifiers that market asks for`,`ai-rank-suite`),children:(0,cf.jsx)(`div`,{className:`ars-cardgrid`,style:{"--min":`250px`},children:e.regions.map(e=>(0,cf.jsxs)(`button`,{type:`button`,onClick:()=>a(e.id),className:`ars-pick${i===e.id?` is-active`:``}`,children:[(0,cf.jsxs)(`span`,{className:`ars-pick-title`,children:[e.label,i===e.id&&(0,cf.jsx)(`span`,{style:{marginLeft:`auto`,color:`var(--ars-brand)`},children:`✓`})]}),(0,cf.jsxs)(`span`,{className:`ars-pick-note`,children:[e.currency,` · `,e.languages.join(`, `),e.countries.length>0?` · ${e.countries.join(`, `)}`:``]})]},e.id))})}),m&&h&&(0,cf.jsx)(k,{title:b(`3 · Where are you based?`,`ai-rank-suite`),subtitle:b(`Used to write the local prompts — leave blank if you sell online only`,`ai-rank-suite`),children:(0,cf.jsxs)(`div`,{className:`grid gap-3`,children:[(0,cf.jsxs)(`div`,{className:`max-w-[320px]`,children:[(0,cf.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`City`,`ai-rank-suite`)}),(0,cf.jsx)(`input`,{type:`text`,value:o,placeholder:b(`Dubai`,`ai-rank-suite`),onChange:e=>s(e.target.value)})]}),(0,cf.jsxs)(`div`,{className:`p-3 grid gap-2`,style:{background:`var(--ars-surface-2)`,borderRadius:`var(--ars-r-sm)`},children:[(0,cf.jsx)(`div`,{className:`t-overline`,children:b(`Why this pack matters`,`ai-rank-suite`)}),(0,cf.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:m.why}),(0,cf.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-1`,children:m.schema.map(e=>(0,cf.jsx)(`span`,{className:`ars-tag`,style:{background:`var(--ars-c-blue)`,color:`var(--ars-c-blue-ink)`},children:e},e))})]}),(0,cf.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,cf.jsx)(A,{onClick:async()=>{l(!0),p(null);try{d(await E.post(`/packs/apply`,{pack:n,region:i,city:o}))}catch(e){p(e.message)}finally{l(!1)}},busy:c,disabled:!n||!i,children:b(`Apply pack`,`ai-rank-suite`)}),(0,cf.jsx)(`span`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Nothing you have already set will be overwritten.`,`ai-rank-suite`)})]}),f&&(0,cf.jsx)(M,{tone:`serious`,children:f})]})}),u&&(0,cf.jsxs)(cf.Fragment,{children:[(0,cf.jsx)(k,{title:b(`What changed`,`ai-rank-suite`),subtitle:b(`And what was deliberately left alone`,`ai-rank-suite`),children:(0,cf.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-2`,children:[(0,cf.jsxs)(`div`,{children:[(0,cf.jsx)(`div`,{className:`t-overline mb-1.5`,children:b(`Applied`,`ai-rank-suite`)}),u.changed.length===0?(0,cf.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Everything this pack sets was already in place.`,`ai-rank-suite`)}):(0,cf.jsx)(`ul`,{className:`m-0 pl-5 grid gap-1 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:u.changed.map((e,t)=>(0,cf.jsx)(`li`,{children:e},t))})]}),(0,cf.jsxs)(`div`,{children:[(0,cf.jsx)(`div`,{className:`t-overline mb-1.5`,children:b(`Left as you set it`,`ai-rank-suite`)}),u.kept.length===0?(0,cf.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Nothing to preserve — these fields were empty.`,`ai-rank-suite`)}):(0,cf.jsx)(`ul`,{className:`m-0 pl-5 grid gap-1 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:u.kept.map((e,t)=>(0,cf.jsx)(`li`,{children:e},t))})]})]})}),(0,cf.jsx)(k,{title:b(`Do these next`,`ai-rank-suite`),subtitle:b(`What the pack cannot fill in for you`,`ai-rank-suite`),children:(0,cf.jsxs)(`div`,{className:`grid gap-4`,children:[(0,cf.jsxs)(`div`,{children:[(0,cf.jsx)(`div`,{className:`t-overline mb-1.5`,children:b(`Market notes`,`ai-rank-suite`)}),(0,cf.jsx)(`ul`,{className:`m-0 pl-5 grid gap-1.5 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:u.notes.map((e,t)=>(0,cf.jsx)(`li`,{children:e},t))})]}),(0,cf.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,cf.jsxs)(`div`,{children:[(0,cf.jsx)(`div`,{className:`t-overline mb-1.5`,children:b(`Identifiers worth adding`,`ai-rank-suite`)}),(0,cf.jsxs)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:[u.identifiers.join(`, `),` — fill these in under Schema → Identity.`]})]}),(0,cf.jsxs)(`div`,{children:[(0,cf.jsx)(`div`,{className:`t-overline mb-1.5`,children:b(`Profiles to link (sameAs)`,`ai-rank-suite`)}),(0,cf.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:u.directories.join(`, `)})]})]}),(0,cf.jsxs)(`div`,{children:[(0,cf.jsx)(`div`,{className:`t-overline mb-1.5`,children:b(`FAQ questions that get quoted`,`ai-rank-suite`)}),(0,cf.jsx)(`ul`,{className:`m-0 pl-5 grid gap-1 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:u.faq.map((e,t)=>(0,cf.jsx)(`li`,{children:e},t))})]})]})})]})]})}var sf,cf,lf=o((()=>{sf=u(f(),1),C(),D(),at(),ct(),cf=O()}));function uf(){return(0,$.jsx)(Ze,{blocks:3})}function df({tab:e,onTab:t}){return(0,$.jsxs)(`div`,{className:`grid gap-4`,children:[(0,$.jsx)(Ae,{tabs:[{id:`feeds`,label:b(`Feeds`,`ai-rank-suite`)},{id:`audit`,label:b(`Catalog audit`,`ai-rank-suite`)}],active:e,onChange:t}),e===`audit`?(0,$.jsx)(Vt,{}):(0,$.jsx)(Yf,{})]})}function ff({tab:e,onTab:t}){let{tabs:n,active:r}=op([{id:`pages`,label:b(`Pages`,`ai-rank-suite`)},{id:`urls`,label:b(`URLs & languages`,`ai-rank-suite`),needs:`urls`},{id:`words`,label:b(`Words`,`ai-rank-suite`)},{id:`bulk`,label:b(`Bulk`,`ai-rank-suite`),needs:`bulk`}],e);return(0,$.jsxs)(`div`,{className:`grid gap-4`,children:[(0,$.jsx)(Ae,{tabs:n,active:r,onChange:t}),r===`bulk`&&(0,$.jsx)(Rf,{}),r===`words`&&(0,$.jsx)(It,{onOpen:e=>{window.location.hash=`/content/${e}`}}),r===`urls`&&(0,$.jsx)(ep,{}),r!==`bulk`&&r!==`words`&&r!==`urls`&&(0,$.jsx)(Cf,{})]})}function pf({tab:e,onTab:t}){return(0,$.jsxs)(`div`,{className:`grid gap-4`,children:[(0,$.jsx)(Ae,{tabs:[{id:`pages`,label:b(`Pages`,`ai-rank-suite`)},{id:`site`,label:b(`Site tests`,`ai-rank-suite`)}],active:e,onChange:t}),e===`site`?(0,$.jsx)(tp,{}):(0,$.jsx)($f,{})]})}function mf({tab:e,onTab:t}){let{tabs:n,active:r}=op([{id:`checker`,label:b(`Checker`,`ai-rank-suite`),needs:`link_checker`},{id:`internal`,label:b(`Internal`,`ai-rank-suite`),needs:`internal_links`},{id:`structure`,label:b(`Structure`,`ai-rank-suite`),needs:`internal_links`},{id:`redirects`,label:b(`Redirects`,`ai-rank-suite`)}],e);return(0,$.jsxs)(`div`,{className:`grid gap-4`,children:[(0,$.jsx)(Ae,{tabs:n,active:r,onChange:t}),r===`internal`?(0,$.jsx)(Ff,{}):r===`structure`?(0,$.jsx)(If,{}):r===`redirects`?(0,$.jsx)(Lf,{}):(0,$.jsx)(qf,{})]})}function hf({tab:e,onTab:t}){return(0,$.jsxs)(`div`,{className:`grid gap-4`,children:[(0,$.jsx)(Ae,{tabs:[{id:`general`,label:b(`Modules`,`ai-rank-suite`)},{id:`compat`,label:b(`Compatibility`,`ai-rank-suite`)},{id:`env`,label:b(`Environment`,`ai-rank-suite`)},{id:`data`,label:b(`Data`,`ai-rank-suite`)},{id:`license`,label:b(`License`,`ai-rank-suite`)}],active:e,onChange:t}),e===`license`?(0,$.jsx)(jf,{}):e===`data`?(0,$.jsx)(Nf,{}):e===`compat`?(0,$.jsx)(Qf,{}):e===`env`?(0,$.jsx)(Pf,{}):(0,$.jsx)(Mf,{})]})}function gf({title:e}){return(0,$.jsx)(`div`,{className:`ars-page`,children:(0,$.jsx)(k,{title:e,children:(0,$.jsxs)(`div`,{className:`ars-pro is-compact`,children:[(0,$.jsx)(`span`,{className:`ars-pro-badge`,children:b(`Pro`,`ai-rank-suite`)}),(0,$.jsx)(`div`,{className:`min-w-0`,children:(0,$.jsx)(`p`,{className:`ars-pro-text`,children:b(`This is part of AI Rank Suite Pro. Everything it has already collected on this site is kept — activating a licence brings the screen back with its data.`,`ai-rank-suite`)})}),(0,$.jsx)(`a`,{className:`ars-btn ars-btn-ghost ars-pro-cta`,href:`#/settings/license`,children:b(`See Pro`,`ai-rank-suite`)})]})})})}function _f({onOpen:e}){let t={seo:b(`Title and description templates, social cards, and what gets indexed.`,`ai-rank-suite`),schema:b(`Structured data: what each page tells Google and an assistant it is.`,`ai-rank-suite`),sitemap:b(`Which URLs are listed for crawlers, and which are deliberately left out.`,`ai-rank-suite`),"local-seo":b(`Business details, opening hours and locations, for local results and maps.`,`ai-rank-suite`),"llms-txt":b(`The curated map of your site that AI crawlers read instead of guessing.`,`ai-rank-suite`),crawlers:b(`Which AI crawlers may read the site, one by one.`,`ai-rank-suite`),packs:b(`Preset schema, prompts and rules for your industry.`,`ai-rank-suite`),snippets:b(`Your own PHP, CSS and JavaScript, without a child theme.`,`ai-rank-suite`),advanced:b(`robots.txt, .htaccess, breadcrumbs, image SEO.`,`ai-rank-suite`),import:b(`Move settings in from another SEO plugin, or back yours up.`,`ai-rank-suite`),developer:b(`System status, integrations, hooks and the REST API.`,`ai-rank-suite`),settings:b(`Modules, compatibility, environment, data and your licence.`,`ai-rank-suite`)},[n,r]=(0,yf.useState)(null),[i,a]=(0,yf.useState)(null);(0,yf.useEffect)(()=>{E.get(`/setup/status`).then(r).catch(()=>r({})),E.get(`/score`).then(e=>a(e.checks||[])).catch(()=>a([]))},[]);let o=e=>(i||[]).filter(t=>t.status===`fail`&&e.some(e=>t.id.startsWith(e))).length,s=e=>{if(!n||!i)return null;switch(e){case`llms-txt`:return i.some(e=>e.id===`llms_txt_enabled`&&e.status===`pass`)?{tone:`good`,label:b(`Live`,`ai-rank-suite`)}:{tone:`warning`,label:b(`Off`,`ai-rank-suite`)};case`sitemap`:return i.some(e=>e.id===`sitemap_present`&&e.status===`pass`)?{tone:`good`,label:b(`Live`,`ai-rank-suite`)}:{tone:`warning`,label:b(`Missing`,`ai-rank-suite`)};case`seo`:{let e=o([`site_indexable`,`pretty_permalinks`,`tagline_set`]);return e?{tone:`serious`,label:`${e} ${b(`to fix`,`ai-rank-suite`)}`}:{tone:`good`,label:b(`OK`,`ai-rank-suite`)}}case`schema`:{let e=o([`schema_`]);return e?{tone:`serious`,label:`${e} ${b(`to fix`,`ai-rank-suite`)}`}:{tone:`good`,label:b(`OK`,`ai-rank-suite`)}}case`developer`:case`settings`:return n.other_seo_plugin?{tone:`warning`,label:b(`Conflict`,`ai-rank-suite`)}:null;default:return null}},c=pp().map(e=>({...e,status:s(e.id)})),l=c.filter(e=>e.status),u=l.filter(e=>e.status.tone===`good`).length,d=l.length?Math.round(u/l.length*100):0,f=l.filter(e=>e.status.tone!==`good`),p=[{id:`AI search`,label:b(`AI search`,`ai-rank-suite`),lede:b(`What assistants and AI crawlers are allowed to read, and how the site describes itself to them.`,`ai-rank-suite`)},{id:`Search`,label:b(`Search`,`ai-rank-suite`),lede:b(`What Google sees: titles, structured data, sitemap, local presence.`,`ai-rank-suite`)},{id:`Overview`,label:b(`Content`,`ai-rank-suite`),lede:b(`Presets that shape how content is optimised.`,`ai-rank-suite`)},{id:`Store`,label:b(`Store`,`ai-rank-suite`),lede:b(`Product feeds and store checks.`,`ai-rank-suite`)},{id:`System`,label:b(`System`,`ai-rank-suite`),lede:b(`The plumbing: code, imports, environment, licence.`,`ai-rank-suite`)}];return(0,$.jsxs)(`div`,{className:`grid gap-5`,children:[(0,$.jsxs)(`div`,{className:`ars-setup-hero`,children:[(0,$.jsx)(`div`,{className:`ars-setup-hero-ring`,children:(0,$.jsx)(Oe,{value:l.length?d:null,size:112,label:b(`Configured`,`ai-rank-suite`),onLight:!0})}),(0,$.jsxs)(`div`,{className:`grid gap-2 min-w-0`,children:[(0,$.jsx)(`div`,{className:`t-overline`,children:b(`Setup`,`ai-rank-suite`)}),(0,$.jsx)(`h2`,{className:`m-0 text-[20px] font-semibold tracking-tight`,children:!i||!n?b(`Reading the site…`,`ai-rank-suite`):f.length===0?b(`Every area we can check is in a good state.`,`ai-rank-suite`):`${f.length} ${f.length===1?b(`area needs attention`,`ai-rank-suite`):b(`areas need attention`,`ai-rank-suite`)}: ${f.map(e=>e.label).join(`, `)}.`}),(0,$.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`These are configured once and then left alone. The wizard walks the essentials in a few minutes; the AI setup reads a description of your business and proposes the rest.`,`ai-rank-suite`)}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap mt-1`,children:[(0,$.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:()=>{window.location.hash=`/wizard`},children:b(`Run the setup wizard`,`ai-rank-suite`)}),(0,$.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,onClick:()=>{window.location.hash=`/ai-wizard`},children:b(`AI setup from a description`,`ai-rank-suite`)}),(0,$.jsxs)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>e(`dashboard`),children:[b(`Back to reports`,`ai-rank-suite`),` →`]})]})]})]}),n?.checklist&&(0,$.jsxs)(`section`,{className:`ars-card`,children:[(0,$.jsxs)(`div`,{className:`ars-card-head`,children:[(0,$.jsxs)(`div`,{className:`grid gap-1 min-w-0`,children:[(0,$.jsx)(`h3`,{className:`ars-card-title`,children:b(`Setup checklist`,`ai-rank-suite`)}),(0,$.jsx)(`p`,{className:`ars-card-sub`,children:n.checklist.required_done>=n.checklist.required_total?b(`The essentials are done. Everything below them is worth having, not required.`,`ai-rank-suite`):`${n.checklist.required_done} / ${n.checklist.required_total} ${b(`essentials done — do these in order first.`,`ai-rank-suite`)}`})]}),(0,$.jsxs)(`span`,{className:`ars-num`,style:{fontSize:22},children:[n.checklist.done,`/`,n.checklist.total]})]}),(0,$.jsx)(`ol`,{className:`ars-checklist`,children:(()=>{let e=0;return n.checklist.steps.map(t=>{t.done||(e+=1);let n=e;return(0,$.jsxs)(`li`,{className:`ars-checklist-item${t.done?` is-done`:``}`,children:[(0,$.jsx)(`span`,{className:`ars-checklist-mark${t.done?` is-done`:``}`,"aria-hidden":!0,children:t.done?`✓`:n}),(0,$.jsxs)(`span`,{className:`min-w-0 grid gap-0.5`,children:[(0,$.jsxs)(`span`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,$.jsx)(`a`,{href:t.route,className:`font-medium text-[13px]`,children:t.label}),(0,$.jsx)(`span`,{className:`ars-tier is-${t.tier}`,children:t.tier===`required`?b(`required`,`ai-rank-suite`):t.tier===`recommended`?b(`recommended`,`ai-rank-suite`):b(`optional`,`ai-rank-suite`)}),t.note&&(0,$.jsx)(`span`,{className:`t-caption`,children:t.note})]}),(0,$.jsx)(`span`,{className:`t-caption`,children:t.why})]})]},t.id)})})()})]}),p.map(n=>{let r=c.filter(e=>e.group===n.id);return r.length===0?null:(0,$.jsxs)(`section`,{className:`grid gap-3`,children:[(0,$.jsxs)(`div`,{className:`ars-setup-group`,children:[(0,$.jsx)(`h3`,{className:`m-0 text-[14px] font-semibold`,children:n.label}),(0,$.jsx)(`p`,{className:`m-0 t-caption`,children:n.lede})]}),(0,$.jsx)(`div`,{className:`ars-setup-grid`,children:r.map(n=>{let r=n.icon;return(0,$.jsxs)(`button`,{type:`button`,className:`ars-setup-card${n.status?` is-`+n.status.tone:``}`,onClick:()=>e(n.id),children:[(0,$.jsx)(`span`,{className:`ars-setup-icon`,children:(0,$.jsx)(r,{size:17})}),(0,$.jsxs)(`span`,{className:`ars-setup-text`,children:[(0,$.jsxs)(`span`,{className:`ars-setup-name`,children:[n.label,n.status&&(0,$.jsx)(`span`,{className:`ars-setup-status is-${n.status.tone}`,children:n.status.label})]}),(0,$.jsx)(`span`,{className:`ars-setup-what`,children:t[n.id]||``})]}),(0,$.jsx)(`span`,{className:`ars-setup-go`,"aria-hidden":!0,children:`›`})]},n.id)})})]},n.id)})]})}function vf(){let[e,t]=(0,yf.useState)(xp),[n,r]=(0,yf.useState)(null);(0,yf.useEffect)(()=>{let e=e=>r(e.detail||null);return window.addEventListener(`airanksuite:request-failed`,e),()=>window.removeEventListener(`airanksuite:request-failed`,e)},[]);let[i,a]=(0,yf.useState)(()=>window.location.hash.replace(/^#\/?/,``)===`wizard`||re.setupDone===!1&&!window.location.hash),[o,s]=(0,yf.useState)(()=>window.location.hash.replace(/^#\/?/,``)===`ai-wizard`);(0,yf.useEffect)(()=>{let e=()=>{let e=window.location.hash.replace(/^#\/?/,``);a(e===`wizard`),s(e===`ai-wizard`)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]);let[c,l]=(0,yf.useState)(``),[u,d]=(0,yf.useState)(()=>{try{let e=window.localStorage.getItem(`airanksuite-rail`);if(e===`mini`)return!1;if(e===`wide`)return!0}catch{}return window.innerWidth>=1280}),[f,p]=(0,yf.useState)(!1),m=()=>{d(e=>{try{window.localStorage.setItem(`airanksuite-rail`,e?`mini`:`wide`)}catch{}return!e})},[h,g]=(0,yf.useState)(ae);(0,yf.useEffect)(()=>{oe(h)},[h]),(0,yf.useEffect)(()=>se(e=>g(e)),[]);let _=()=>g(e=>e===`dark`?`light`:`dark`);(0,yf.useEffect)(()=>{let e=()=>t(xp());return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]);let v=(n,r)=>{let i=r?`/${n}/${r}`:`/${n}`,a=up().find(e=>e.id===n),o=a&&a.group!==_p(e.page)?gp(a.group):null;if(o&&o.url){window.location.assign(`${o.url}#${i}`);return}window.location.hash=i,t({page:n,tab:r||(lp().find(e=>e.id===n)?.tabs?.[0]??null)}),l(``)},y=(0,yf.useMemo)(()=>{let t=_p(e.page),n=up().filter(e=>e.group===t),r=gp(t);if(r){let e=n.findIndex(e=>e.id===r.route);e>0&&n.unshift(n.splice(e,1)[0])}return t===`System`&&n.push({id:`setup`,label:b(`All settings`,`ai-rank-suite`),setup:!0,group:`System`}),n},[e.page]),x=(0,yf.useMemo)(()=>{let e=c.trim().toLowerCase();return e?up().filter(t=>t.label.toLowerCase().includes(e)||mp(t.group).toLowerCase().includes(e)):null},[c]);if(o)return(0,$.jsx)(yf.Suspense,{fallback:(0,$.jsx)(uf,{}),children:(0,$.jsx)(Bf,{onDone:()=>{s(!1),window.location.hash.replace(/^#\/?/,``)===`ai-wizard`&&(window.location.hash=`/dashboard`)}})});if(i)return(0,$.jsx)(yf.Suspense,{fallback:(0,$.jsx)(uf,{}),children:(0,$.jsx)(zf,{onDone:()=>{a(!1),window.location.hash.replace(/^#\/?/,``)===`wizard`&&(window.location.hash=`/dashboard`)}})});let C=up().find(t=>t.id===e.page)||lp()[0],w=e.page===`setup`||!!C.setup,ee=C.view;return(0,$.jsx)(`div`,{className:`pr-4 py-4`,children:(0,$.jsxs)(`div`,{className:`ars-app grid items-stretch${u?` ars-app-wide`:` ars-app-mini`}${f?` is-nav-open`:``}`,children:[(0,$.jsx)(`button`,{type:`button`,className:`ars-nav-scrim`,"aria-label":b(`Close menu`,`ai-rank-suite`),onClick:()=>p(!1)}),(0,$.jsxs)(`nav`,{className:`ars-rail flex flex-col py-3 px-2${u?``:` is-mini`}`,"aria-label":b(`AI Rank Suite`,`ai-rank-suite`),onClick:e=>{e.target.closest(`.ars-nav-item`)&&p(!1)},children:[(0,$.jsxs)(`button`,{type:`button`,onClick:m,className:`ars-brand`,title:b(u?`Collapse navigation`:`Expand navigation`,`ai-rank-suite`),"aria-expanded":u,children:[(0,$.jsx)(`span`,{className:`ars-brand-mark ars-brand-mono`,"aria-hidden":!0,children:String(re.brand||`AI Rank Suite`).replace(/[^A-Za-z0-9]/g,``).slice(0,1).toUpperCase()||`A`}),u&&(0,$.jsxs)(`span`,{className:`leading-tight text-left min-w-0`,children:[(0,$.jsx)(`span`,{className:`block font-bold text-[15px] truncate ars-brand-name`,children:re.brand&&re.brand!==`AI Rank Suite`?(0,$.jsx)(`span`,{className:`ars-grad-text`,children:re.brand}):(0,$.jsxs)($.Fragment,{children:[`AI Rank `,(0,$.jsx)(`span`,{className:`ars-grad-text`,children:b(`Suite`,`ai-rank-suite`)})]})}),(0,$.jsxs)(`span`,{className:`block text-[10.5px]`,style:{color:`var(--ars-ink-3)`},children:[`v`,re.version]})]})]}),u&&(0,$.jsx)(`div`,{className:`px-1 pb-1.5`,children:(0,$.jsxs)(`div`,{className:`ars-jump-wrap`,children:[(0,$.jsx)(`input`,{type:`search`,name:`airanksuite-nav-filter`,id:`airanksuite-nav-filter`,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,spellCheck:`false`,"data-form-type":`other`,"data-lpignore":`true`,"data-1p-ignore":`true`,placeholder:b(`Jump to…`,`ai-rank-suite`),value:c,onChange:e=>l(e.target.value),onKeyDown:e=>{e.key===`Enter`&&x&&x[0]&&v(x[0].id),e.key===`Escape`&&l(``)},className:`ars-jump`,"aria-label":b(`Jump to a page`,`ai-rank-suite`)}),c&&(0,$.jsx)(`button`,{type:`button`,className:`ars-jump-clear`,onClick:()=>l(``),"aria-label":b(`Clear the filter`,`ai-rank-suite`),title:b(`Clear the filter`,`ai-rank-suite`),children:`✕`})]})}),(0,$.jsx)(`div`,{className:`grid gap-0.5 overflow-y-auto`,style:{scrollbarWidth:`thin`},children:x?(0,$.jsxs)(`div`,{className:`grid gap-0.5`,children:[x.length===0&&(0,$.jsxs)(`div`,{className:`px-4 py-2 text-[12px] grid gap-1`,style:{color:`var(--ars-ink-3)`},children:[(0,$.jsx)(`span`,{children:S(b(`No screen matches “%s”.`,`ai-rank-suite`),c)}),(0,$.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>l(``),children:b(`Show all screens`,`ai-rank-suite`)})]}),x.map(e=>{let t=e.icon;return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>v(e.id),className:`ars-nav-item`,children:[(0,$.jsx)(t,{size:16}),e.label,(0,$.jsx)(`span`,{className:`ml-auto text-[10px]`,style:{color:`var(--ars-ink-3)`},children:mp(e.group)})]},e.id)})]}):w?(0,$.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,$.jsxs)(`button`,{type:`button`,onClick:()=>v(`dashboard`),className:`ars-nav-item is-back`,title:b(`Back to the reports`,`ai-rank-suite`),children:[(0,$.jsx)(dt,{size:16}),u&&b(`Back to reports`,`ai-rank-suite`)]}),u&&(0,$.jsx)(`div`,{className:`ars-nav-group`,children:b(`Setup`,`ai-rank-suite`)}),pp().map(t=>{let n=t.icon;return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>v(t.id),title:u?void 0:t.label,"aria-label":t.label,className:`ars-nav-item${e.page===t.id?` is-active`:``}`,children:[(0,$.jsx)(n,{size:16}),u&&t.label]},t.id)})]}):(0,$.jsxs)($.Fragment,{children:[dp.map(t=>{let n=fp().filter(e=>e.group===t);return n.length?(0,$.jsxs)(`div`,{className:`grid gap-0.5`,children:[u?(0,$.jsx)(`div`,{className:`ars-nav-group`,children:mp(t)}):(0,$.jsx)(`div`,{className:`ars-nav-rule`,"aria-hidden":!0}),n.map(n=>{let r=n.icon;return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>v(n.id),title:u?void 0:`${n.label} — ${t}`,"aria-label":n.label,className:`ars-nav-item${e.page===n.id?` is-active`:``}`,children:[(0,$.jsx)(r,{size:16}),u&&n.label]},n.id)})]},t):null}),(0,$.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,$.jsx)(`div`,{className:`ars-nav-rule`,"aria-hidden":!0}),(0,$.jsxs)(`button`,{type:`button`,onClick:()=>v(`setup`),title:u?void 0:b(`Setup`,`ai-rank-suite`),className:`ars-nav-item is-setup`,children:[(0,$.jsx)(_t,{size:16}),u&&b(`Setup`,`ai-rank-suite`)]})]})]})}),u&&!re.whiteLabel&&(0,$.jsx)(`div`,{className:`mt-auto px-3 pt-3 text-[10.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Built for AI answers and Google search`,`ai-rank-suite`)})]}),(0,$.jsxs)(`div`,{className:`ars-main min-w-0 flex flex-col`,children:[(0,$.jsxs)(`header`,{className:`ars-header flex items-center justify-between gap-3 px-6`,children:[(0,$.jsx)(`button`,{type:`button`,className:`ars-nav-toggle`,"aria-label":b(`Menu`,`ai-rank-suite`),"aria-expanded":f,onClick:()=>p(e=>!e),children:(0,$.jsx)(`span`,{"aria-hidden":!0})}),(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`div`,{className:`t-overline`,style:{fontSize:10,marginBottom:1},children:e.page===`setup`||C.setup?b(`Setup`,`ai-rank-suite`):mp(C.group)}),(0,$.jsx)(`h1`,{className:`ars-page-title truncate`,children:e.page===`setup`?b(`Setup`,`ai-rank-suite`):C.label})]}),(0,$.jsxs)(`div`,{className:`flex items-center gap-3 shrink-0`,children:[(0,$.jsx)(`button`,{type:`button`,className:`ars-theme-toggle`,onClick:_,"aria-label":b(h===`dark`?`Switch to light theme`:`Switch to dark theme`,`ai-rank-suite`),title:b(h===`dark`?`Light`:`Dark`,`ai-rank-suite`),children:h===`dark`?(0,$.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:[(0,$.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`}),(0,$.jsx)(`path`,{d:`M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4`})]}):(0,$.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:(0,$.jsx)(`path`,{d:`M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z`})})}),(0,$.jsx)(`a`,{href:`${re.homeUrl.replace(/\/$/,``)}/llms.txt`,target:`_blank`,rel:`noreferrer`,className:`ars-theme-toggle ars-header-chip`,title:b(`View your live llms.txt`,`ai-rank-suite`),children:`/llms.txt ↗`})]})]}),n&&(0,$.jsx)(`div`,{className:`px-6 pt-4`,children:(0,$.jsx)(M,{tone:`serious`,children:(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`strong`,{children:b(`That change was not saved.`,`ai-rank-suite`)}),` `,n.message||(n.status===403||n.status===405?S(b(`The server refused a %1$s request (%2$s). Some hosts and firewalls block it — send them this message and ask them to allow it for /wp-json/.`,`ai-rank-suite`),n.method,n.status):S(b(`The server answered %s.`,`ai-rank-suite`),n.status)),(0,$.jsxs)(`div`,{className:`t-caption mt-1`,children:[n.method,` `,n.path]})]}),(0,$.jsx)(`button`,{type:`button`,className:`ars-chip shrink-0`,onClick:()=>r(null),children:b(`Dismiss`,`ai-rank-suite`)})]})})}),y.length>1&&(0,$.jsx)(`nav`,{className:`ars-grouptabs`,"aria-label":mp(_p(e.page)),children:y.map(t=>(0,$.jsxs)(`button`,{type:`button`,onClick:()=>v(t.id),"aria-current":e.page===t.id?`page`:void 0,className:`ars-grouptab${e.page===t.id?` is-active`:``}`,children:[t.label,t.needs&&!ie(t.needs)&&(0,$.jsx)(`span`,{className:`ars-grouptab-pro`,children:b(`Pro`,`ai-rank-suite`)})]},t.id))}),(0,$.jsx)(`main`,{className:`min-w-0 px-6 py-5 ars-view`,children:e.page===`setup`?(0,$.jsx)(_f,{onOpen:e=>v(e)}):C.needs&&!ie(C.needs)?(0,$.jsx)(gf,{title:C.label}):C.tabs?(0,$.jsx)(yf.Suspense,{fallback:(0,$.jsx)(uf,{}),children:(0,$.jsx)(ee,{tab:e.tab||C.tabs[0],onTab:e=>v(C.id,e)})}):(0,$.jsx)(yf.Suspense,{fallback:(0,$.jsx)(uf,{}),children:(0,$.jsx)(ee,{})})},e.page+(e.tab||``))]})]})})}var yf,$,bf,xf,Sf,Cf,wf,Tf,Ef,Df,Of,kf,Af,jf,Mf,Nf,Pf,Ff,If,Lf,Rf,zf,Bf,Vf,Hf,Uf,Wf,Gf,Kf,qf,Jf,Yf,Xf,Zf,Qf,$f,ep,tp,np,rp,ip,ap,op,sp,cp,lp,up,dp,fp,pp,mp,hp,gp,_p,vp,yp,bp,xp,Sp=o((()=>{yf=u(f(),1),C(),D(),ue(),$=O(),Bt(),Gt(),at(),Ft(),qt(),bf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Nn(),Dn)),void 0,{}.url)),xf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Yn(),Vn)),void 0,{}.url)),Sf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(jr(),Er)),void 0,{}.url)),Cf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(ia(),Wi)),void 0,{}.url)),wf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(fa(),aa)),void 0,{}.url)),Tf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Sa(),ga)),void 0,{}.url)),Ef=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Ua(),Ma)),void 0,{}.url)),Df=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(ro(),Xa)),void 0,{}.url)),Of=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(bo(),co)),void 0,{}.url)),kf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Uo(),Io)),void 0,{}.url)),Af=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(ts(),qo)),void 0,{}.url)),jf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(cs(),ns)),void 0,{}.url)),Mf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(bs(),ls)).then(e=>({default:e.Modules})),void 0,{}.url)),Nf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(bs(),ls)).then(e=>({default:e.DataPrivacy})),void 0,{}.url)),Pf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(bs(),ls)).then(e=>({default:e.Environment})),void 0,{}.url)),Ff=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Ts(),xs)),void 0,{}.url)),If=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Ps(),Es)),void 0,{}.url)),Lf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Ks(),Hs)),void 0,{}.url)),Rf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Qs(),qs)),void 0,{}.url)),zf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Hc(),Cc)),void 0,{}.url)),Bf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Yc(),Uc)),void 0,{}.url)),Vf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Sc(),pc)),void 0,{}.url)),Hf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(al(),el)),void 0,{}.url)),Uf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(dl(),ol)),void 0,{}.url)),Wf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Tl(),gl)),void 0,{}.url)),Gf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(zl(),Al)),void 0,{}.url)),Kf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(iu(),Yl)),void 0,{}.url)),qf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(uu(),au)),void 0,{}.url)),Jf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Su(),hu)),void 0,{}.url)),Yf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Ou(),Cu)),void 0,{}.url)),Xf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Nu(),ku)),void 0,{}.url)),Zf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Vu(),Pu)),void 0,{}.url)),Qf=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Ju(),Hu)),void 0,{}.url)),$f=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(ld(),ed)),void 0,{}.url)),ep=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Sd(),ud)),void 0,{}.url)),tp=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Od(),Cd)),void 0,{}.url)),np=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(zd(),Nd)),void 0,{}.url)),rp=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(Kd(),Bd)),void 0,{}.url)),ip=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(rf(),qd)),void 0,{}.url)),ap=(0,yf.lazy)(()=>Kt(()=>Promise.resolve().then(()=>(lf(),af)),void 0,{}.url)),op=(e,t)=>{let n=e.filter(e=>!e.needs||ie(e.needs));return{tabs:n,active:n.some(e=>e.id===t)?t:n[0].id}},sp=()=>[{id:`dashboard`,label:b(`Dashboard`,`ai-rank-suite`),icon:dt,view:bf,group:`Overview`},{id:`measure`,label:b(`Overview`,`ai-rank-suite`),icon:ht,view:Zf,group:`Measure`},{id:`insights`,label:b(`Insights`,`ai-rank-suite`),icon:At,view:xf,group:`Measure`,needs:`insights`},{id:`content`,label:b(`Content`,`ai-rank-suite`),icon:ft,view:ff,group:`Optimize`,tabs:[`pages`,`urls`,`words`,`bulk`]},{id:`audit`,label:b(`Site Audit`,`ai-rank-suite`),icon:Ot,view:pf,group:`Optimize`,tabs:[`pages`,`site`]},{id:`analyzer`,label:b(`Site analysis`,`ai-rank-suite`),icon:dt,view:Sf,group:`Overview`},{id:`packs`,label:b(`Industry packs`,`ai-rank-suite`),icon:Nt,view:ap,group:`Overview`,setup:!0},{id:`autopilot`,label:b(`AI Autopilot`,`ai-rank-suite`),icon:bt,view:np,group:`AI search`,needs:`autopilot`},{id:`ai-visibility`,label:b(`AI Answer Simulation`,`ai-rank-suite`),icon:Pt,view:Af,group:`AI search`,tabs:[`track`,`prompts`,`brand`],needs:`ai_visibility`},{id:`llms-txt`,label:b(`llms.txt`,`ai-rank-suite`),icon:pt,view:wf,group:`AI search`,tabs:[`short`,`full`,`dev`],setup:!0},{id:`crawlers`,label:b(`AI Crawlers`,`ai-rank-suite`),icon:mt,view:Tf,group:`AI search`,setup:!0},{id:`seo`,label:b(`SEO`,`ai-rank-suite`),icon:gt,view:Df,group:`Search`,tabs:[`general`,`templates`,`social`,`rss`],setup:!0},{id:`schema`,label:b(`Schema`,`ai-rank-suite`),icon:xt,view:Of,group:`Search`,tabs:[`overview`,`identity`,`templates`,`library`,`products`],setup:!0},{id:`sitemap`,label:b(`Sitemap`,`ai-rank-suite`),icon:Dt,view:Uf,group:`Search`,tabs:[`index`,`xml`,`content`,`special`],setup:!0},{id:`local-seo`,label:b(`Local SEO`,`ai-rank-suite`),icon:kt,view:Gf,group:`Search`,setup:!0},{id:`links`,label:b(`Links`,`ai-rank-suite`),icon:St,view:mf,group:`Optimize`,tabs:[`checker`,`internal`,`structure`,`redirects`]},{id:`backlinks`,label:b(`Backlinks`,`ai-rank-suite`),icon:At,view:rp,group:`Measure`,needs:`backlinks`},{id:`seo-apis`,label:b(`SEO data providers`,`ai-rank-suite`),icon:St,view:ip,group:`Measure`,needs:`seo_apis`},{id:`search-console`,label:b(`Search Console`,`ai-rank-suite`),icon:ht,view:Ef,group:`Measure`,tabs:[`performance`,`keywords`,`bing`]},{id:`google`,label:b(`Indexing`,`ai-rank-suite`),icon:Et,view:Hf,group:`Measure`,tabs:[`indexing`,`rich`,`bing`,`indexnow`,`verify`]},{id:`analytics`,label:b(`Analytics`,`ai-rank-suite`),icon:jt,view:Kf,group:`Measure`,tabs:[`ga4`,`matomo`,`clarity`,`consent`,`reports`,`speed`]},{id:`shop`,label:b(`Shop`,`ai-rank-suite`),icon:wt,view:Xf,group:`Shop`,when:()=>!!re.hasWoo},{id:`feeds`,label:b(`Catalog feeds`,`ai-rank-suite`),icon:Tt,view:df,group:`Shop`,when:()=>!!re.hasWoo,tabs:[`feeds`,`audit`],needs:`feeds`},{id:`ai`,label:b(`AI Engine`,`ai-rank-suite`),icon:bt,view:kf,group:`AI search`,needs:`ai`},{id:`advanced`,label:b(`Advanced`,`ai-rank-suite`),icon:Ot,view:Wf,group:`System`,tabs:[`robots`,`htaccess`,`breadcrumbs`,`images`,`ghost`],setup:!0},{id:`import`,label:b(`Import & backup`,`ai-rank-suite`),icon:Tt,view:Vf,group:`System`,setup:!0},{id:`developer`,label:b(`Developer`,`ai-rank-suite`),icon:xt,view:Jf,group:`System`,tabs:[`status`,`integrations`,`hooks`,`webhooks`,`api`],setup:!0},{id:`settings`,label:b(`Settings`,`ai-rank-suite`),icon:_t,view:hf,group:`System`,tabs:[`general`,`compat`,`env`,`data`,`license`],setup:!0}],cp=null,lp=()=>(cp===null&&(cp=sp()),cp),up=()=>lp().filter(e=>!e.when||e.when()),dp=[`Overview`,`Shop`,`Optimize`,`Measure`,`AI search`],fp=()=>up().filter(e=>!e.setup),pp=()=>up().filter(e=>e.setup),mp=e=>({Overview:b(`Overview`,`ai-rank-suite`),Shop:b(`Shop`,`ai-rank-suite`),Optimize:b(`Optimize`,`ai-rank-suite`),Measure:b(`Measure`,`ai-rank-suite`),"AI search":b(`AI search`,`ai-rank-suite`),Search:b(`Search`,`ai-rank-suite`),System:b(`System`,`ai-rank-suite`)})[e]||e,hp=()=>Array.isArray(re.screens)?re.screens:[],gp=e=>hp().find(t=>t.group===e)||null,_p=e=>{let t=e?up().find(t=>t.id===e):null;if(t&&t.group)return t.group;let n=hp().find(e=>e.route===yp());return n?n.group:`Overview`},vp={bulk:[`content`,`bulk`],"link-checker":[`links`,`checker`],"internal-links":[`links`,`internal`],redirects:[`links`,`redirects`],license:[`settings`,`license`],social:[`seo`,`social`],"rank-tracker":[`search-console`,`keywords`],coexistence:[`settings`,`compat`],bing:[`search-console`,`bing`],htaccess:[`advanced`,`htaccess`],compatibility:[`settings`,`compat`],visibility:[`ai-visibility`,null],local:[`local-seo`,null],"local-business":[`local-seo`,null],indexing:[`google`,`indexing`],"rich-results":[`google`,`rich`],indexnow:[`google`,`indexnow`],backup:[`import`,null],export:[`import`,null],tools:[`developer`,`status`],dev:[`developer`,`status`],matomo:[`analytics`,`matomo`],clarity:[`analytics`,`clarity`],ga4:[`analytics`,`ga4`],pagespeed:[`analytics`,`speed`],reports:[`analytics`,`reports`],robots:[`advanced`,`robots`],breadcrumbs:[`advanced`,`breadcrumbs`],images:[`advanced`,`images`],words:[`content`,`words`],products:[`schema`,`products`],store:[`feeds`,`audit`],woocommerce:[`feeds`,`audit`]},yp=()=>{let e=document.getElementById(`airanksuite-root`);return e&&e.dataset&&e.dataset.route||`dashboard`},bp=()=>{let e=up().find(e=>e.id===yp());if(e&&(!e.needs||ie(e.needs)))return e;let t=e?e.group:null;return(t?up().find(e=>e.group===t&&(!e.needs||ie(e.needs))):null)||e||up().find(e=>e.id===`dashboard`)||null},xp=()=>{let e=window.location.hash.match(/^#\/([a-z-]+)(?:\/([a-z-]+))?/);if(!e){let e=bp();return e?{page:e.id,tab:e.tabs?e.tabs[0]:null}:{page:`dashboard`,tab:null}}if(e[1]===`setup`)return{page:`setup`,tab:null};let[t,n]=vp[e[1]]?vp[e[1]]:[e[1],e[2]],r=up().find(e=>e.id===t);if(!r){let e=bp();return e?{page:e.id,tab:e.tabs?e.tabs[0]:null}:{page:`dashboard`,tab:null}}let i=r.tabs&&r.tabs.includes(n)?n:r.tabs?r.tabs[0]:null;return{page:r.id,tab:i}}})),Cp=_(),wp=u(f(),1);C();var Tp=O(),Ep=class extends wp.Component{constructor(e){super(e),this.state={error:null,info:null}}static getDerivedStateFromError(e){return{error:e}}componentDidMount(){this.onHash=()=>{this.state.error&&this.setState({error:null,info:null})},window.addEventListener(`hashchange`,this.onHash)}componentWillUnmount(){window.removeEventListener(`hashchange`,this.onHash)}componentDidCatch(e,t){this.setState({info:t}),console.error(`AI Rank Suite: a screen failed to render.`,e,t)}isChunkFailure(){let e=String(this.state.error?.message||``);return/Loading chunk|dynamically imported module|Importing a module script failed|Failed to fetch dynamically/i.test(e)||/ChunkLoadError/i.test(String(this.state.error?.name||``))}hardReload(){let e=new URL(window.location.href);e.searchParams.set(`airanksuite-reload`,String(Date.now())),window.location.replace(e.toString())}render(){let{error:e}=this.state;if(!e)return this.props.children;let t=this.isChunkFailure(),n=(window.airanksuiteData||{}).version||`unknown`,r=window.location.hash||`#/`,i=[`AI Rank Suite ${n}`,`Screen: ${r}`,`Error: ${e.name||`Error`}: ${e.message||String(e)}`,this.state.info?.componentStack?`Component: ${String(this.state.info.componentStack).trim().split(`
     102}`}),(0,yu.jsx)(ft,{title:b(`Verify in PHP, Node or n8n`,`ai-rank-suite`),children:(0,yu.jsxs)(`p`,{children:[(0,yu.jsx)(`code`,{children:`hash_equals('sha256=' . hash_hmac('sha256', $rawBody, $secret), $_SERVER['HTTP_X_AIRANKSUITE_SIGNATURE'])`}),` `,b(`— the same in Node with`,`ai-rank-suite`),` `,(0,yu.jsx)(`code`,{children:`crypto.createHmac('sha256', secret).update(rawBody).digest('hex')`}),`. `,b(`In n8n or Make, add a Crypto/HMAC step on the raw body and compare with the header. Reject anything that does not match; a 2xx from your side marks the delivery as ok here.`,`ai-rank-suite`)]})}),(0,yu.jsxs)(`p`,{className:`m-0 t-caption`,children:[b(`On the same install, no HTTP is needed:`,`ai-rank-suite`),(0,yu.jsx)(`code`,{children:`add_action('airanksuite/event', fn($name, $envelope) => …)`}),` `,b(`or`,`ai-rank-suite`),` `,(0,yu.jsx)(`code`,{children:`add_action('airanksuite/event/audit.finished', …)`}),` `,b(`receive every event as a PHP action.`,`ai-rank-suite`)]})]})})]})]})}var vu,yu,bu=o((()=>{vu=u(f(),1),C(),O(),dt(),mt(),yu=_e()})),xu=c({default:()=>Eu});function Su({data:e,onMessage:t}){let[n,r]=(0,Du.useState)(null),i=async e=>{r(e);try{t((await D.post(`/dev/maintenance`,{task:e})).message)}catch(e){t(e.message,!0)}finally{r(null)}},a=e.environment,o=[[b(`Plugin`,`ai-rank-suite`),S(b(`v%1$s · schema %2$s`,`ai-rank-suite`),a.plugin,a.db_schema)],[`WordPress`,a.multisite?S(b(`%s (multisite)`,`ai-rank-suite`),a.wordpress):a.wordpress],[`PHP / MySQL`,`${a.php} / ${a.mysql}`],[b(`Theme`,`ai-rank-suite`),a.theme],[b(`Memory limit`,`ai-rank-suite`),a.memory],[b(`Locale`,`ai-rank-suite`),a.locale],[b(`Pretty permalinks`,`ai-rank-suite`),a.permalinks?b(`✓ on`,`ai-rank-suite`):b(`✕ off — required for llms.txt, sitemaps, IndexNow`,`ai-rank-suite`)],[`HTTPS`,a.ssl?`✓`:`✕`],[`WP-Cron`,e.constants.WP_CRON?b(`✓ running`,`ai-rank-suite`):b(`✕ disabled — reports & answer simulations need a real cron`,`ai-rank-suite`)],[b(`Object cache`,`ai-rank-suite`),e.constants.OBJECT_CACHE?b(`✓ external`,`ai-rank-suite`):b(`database (default)`,`ai-rank-suite`)]],s=[...o.map(([e,t])=>`${e}: ${t}`),S(b(`Active modules: %s`,`ai-rank-suite`),e.modules.active.join(`, `)),S(b(`Disabled: %s`,`ai-rank-suite`),e.modules.disabled.join(`, `)||`—`),...e.tables.map(e=>S(b(`%1$s: %2$s rows`,`ai-rank-suite`),e.name,e.rows))].join(`
     103`),c=[{task:`flush_transients`,label:b(`Clear plugin caches`,`ai-rank-suite`),hint:b(`Drops every airanksuite_ transient — llms.txt, reports, rate limits`,`ai-rank-suite`)},{task:`flush_rewrites`,label:b(`Rebuild rewrite rules`,`ai-rank-suite`),hint:b(`Re-registers llms.txt, sitemaps and the IndexNow key file`,`ai-rank-suite`)},{task:`rerun_migration`,label:b(`Re-run database migration`,`ai-rank-suite`),hint:b(`Rebuilds tables idempotently — safe, takes a backup first`,`ai-rank-suite`)},{task:`reanalyze_all`,label:b(`Reset all analyses`,`ai-rank-suite`),hint:b(`Every page is re-scored on next access`,`ai-rank-suite`)},{task:`clear_quarantine`,label:b(`Clear module quarantine`,`ai-rank-suite`),hint:b(`Failed modules retry on the next load`,`ai-rank-suite`)}];return(0,Z.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Z.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2 items-start`,children:[(0,Z.jsxs)(k,{title:b(`System status`,`ai-rank-suite`),subtitle:b(`Everything support needs in one place`,`ai-rank-suite`),action:(0,Z.jsx)(A,{variant:`ghost`,onClick:()=>ve(s),children:b(`Copy report`,`ai-rank-suite`)}),children:[(0,Z.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Z.jsx)(`table`,{className:`ars-table`,children:(0,Z.jsx)(`tbody`,{children:o.map(([e,t])=>(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`td`,{className:`font-medium`,style:{width:170},children:e}),(0,Z.jsx)(`td`,{style:{color:`var(--ars-ink-2)`},children:t})]},e))})})}),Object.keys(e.modules.quarantine).length>0&&(0,Z.jsx)(`div`,{className:`mt-3`,children:(0,Z.jsx)(M,{tone:`serious`,children:S(b(`Quarantined modules: %s — check the error, then clear the quarantine.`,`ai-rank-suite`),Object.keys(e.modules.quarantine).join(`, `))})})]}),(e.hook_faults||[]).length>0&&(0,Z.jsxs)(k,{title:b(`Failing on the public site`,`ai-rank-suite`),subtitle:b(`Caught, so pages still render — but this output is missing from every page it runs on`,`ai-rank-suite`),flush:!0,children:[(0,Z.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Z.jsxs)(`table`,{className:`ars-table`,children:[(0,Z.jsx)(`thead`,{children:(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`th`,{children:b(`Where`,`ai-rank-suite`)}),(0,Z.jsx)(`th`,{children:b(`Error`,`ai-rank-suite`)}),(0,Z.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Times`,`ai-rank-suite`)})]})}),(0,Z.jsx)(`tbody`,{children:e.hook_faults.map(e=>(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`td`,{className:`font-medium`,children:e.label}),(0,Z.jsxs)(`td`,{style:{color:`var(--ars-ink-2)`},children:[(0,Z.jsx)(`div`,{children:e.message}),(0,Z.jsxs)(`div`,{className:`t-caption`,children:[e.class,` · `,e.file,`:`,e.line]})]}),(0,Z.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.count})]},e.label))})]})}),(0,Z.jsx)(`div`,{className:`p-4 pt-3`,children:(0,Z.jsx)(M,{tone:`serious`,children:b(`Send this to support as it is — the file and line are the whole diagnosis. Clearing the quarantine below also empties this list, so fix first and clear second.`,`ai-rank-suite`)})})]}),(0,Z.jsx)(k,{title:b(`Maintenance`,`ai-rank-suite`),subtitle:b(`Safe one-click operations — nothing here deletes settings or content`,`ai-rank-suite`),children:(0,Z.jsx)(`div`,{className:`grid gap-2.5`,children:c.map(e=>(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-3 ars-r-lg px-4 py-2.5`,style:{background:`var(--ars-surface-2)`},children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`div`,{className:`font-medium text-[13px]`,children:e.label}),(0,Z.jsx)(`div`,{className:`text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:e.hint})]}),(0,Z.jsx)(A,{variant:`ghost`,busy:n===e.task,onClick:()=>i(e.task),children:b(`Run`,`ai-rank-suite`)})]},e.task))})})]}),(0,Z.jsx)(k,{title:b(`Data`,`ai-rank-suite`),subtitle:b(`Plugin tables and scheduled jobs`,`ai-rank-suite`),children:(0,Z.jsxs)(`div`,{className:`grid gap-x-8 md:grid-cols-2 items-start`,children:[(0,Z.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Z.jsxs)(`table`,{className:`ars-table`,children:[(0,Z.jsx)(`thead`,{children:(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`th`,{children:b(`Table`,`ai-rank-suite`)}),(0,Z.jsx)(`th`,{className:`is-num is-mid`,children:b(`Rows`,`ai-rank-suite`)})]})}),(0,Z.jsx)(`tbody`,{children:e.tables.map(e=>(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`td`,{className:`ars-mono text-[12px]`,children:e.name}),(0,Z.jsx)(`td`,{className:`is-num is-mid`,children:e.rows})]},e.name))})]})}),(0,Z.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Z.jsxs)(`table`,{className:`ars-table`,children:[(0,Z.jsx)(`thead`,{children:(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`th`,{children:b(`Scheduled job`,`ai-rank-suite`)}),(0,Z.jsx)(`th`,{className:`is-num`,children:b(`Next run`,`ai-rank-suite`)})]})}),(0,Z.jsx)(`tbody`,{children:e.crons.map(e=>(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`td`,{className:`ars-mono text-[12px]`,children:e.hook}),(0,Z.jsx)(`td`,{className:`is-num text-[12px]`,style:{color:`var(--ars-ink-3)`},children:e.next||b(`not scheduled`,`ai-rank-suite`)})]},e.hook))})]})})]})})]})}function Cu(){let[e,t]=(0,Du.useState)(null);if((0,Du.useEffect)(()=>{D.get(`/integrations`).then(e=>t(e.integrations)).catch(()=>t([]))},[]),!e)return(0,Z.jsx)(k,{title:b(`Plugin integrations`,`ai-rank-suite`),children:b(`Loading…`,`ai-rank-suite`)});let n=e.filter(e=>e.active);return(0,Z.jsx)(k,{title:b(`Plugin integrations`,`ai-rank-suite`),subtitle:S(b(`%1$s of %2$s detected on this site — data is read automatically, nothing to configure`,`ai-rank-suite`),n.length,e.length),children:(0,Z.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:[...e].sort((e,t)=>Number(t.active)-Number(e.active)).map(e=>(0,Z.jsx)(`div`,{className:`flex items-start justify-between gap-3 ars-r-lg px-4 py-3`,style:{background:e.active?`var(--ars-good-tonal)`:`var(--ars-surface-2)`},children:(0,Z.jsxs)(`div`,{className:`min-w-0`,children:[(0,Z.jsxs)(`div`,{className:`font-medium text-[13px] flex items-center gap-1.5`,children:[(0,Z.jsx)(`span`,{"aria-hidden":!0,style:{color:e.active?`var(--ars-good)`:`var(--ars-ink-3)`},children:e.active?`✓`:`○`}),e.label]}),(0,Z.jsx)(`div`,{className:`text-[11.5px] mt-0.5`,style:{color:`var(--ars-ink-2)`},children:e.provides})]})},e.key))})})}function wu({data:e}){let t=[],n=new Map;return(e.hooks||[]).forEach(e=>{n.has(e.module)||(n.set(e.module,[]),t.push(e.module)),n.get(e.module).push(e)}),(0,Z.jsxs)(k,{title:b(`Hooks reference`,`ai-rank-suite`),subtitle:S(b(`%s extension points, generated from the code that fires them — build your own modules, schema types and crawler rules on top`,`ai-rank-suite`),(e.hooks||[]).length),children:[(0,Z.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Z.jsxs)(`table`,{className:`ars-table`,children:[(0,Z.jsx)(`thead`,{children:(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`th`,{children:b(`Hook`,`ai-rank-suite`)}),(0,Z.jsx)(`th`,{children:b(`Type`,`ai-rank-suite`)}),(0,Z.jsx)(`th`,{children:b(`Arguments`,`ai-rank-suite`)}),(0,Z.jsx)(`th`,{children:b(`What it does`,`ai-rank-suite`)})]})}),(0,Z.jsx)(`tbody`,{children:t.map(e=>(0,Z.jsxs)(Du.Fragment,{children:[(0,Z.jsx)(`tr`,{children:(0,Z.jsx)(`td`,{colSpan:4,className:`t-overline`,style:{background:`var(--ars-surface-2)`,paddingTop:8,paddingBottom:8},children:e})}),n.get(e).map(e=>(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`td`,{className:`ars-mono text-[12px]`,style:{whiteSpace:`nowrap`},title:(e.sources||[]).join(`
     104`),children:e.hook}),(0,Z.jsx)(`td`,{children:(0,Z.jsx)(j,{tone:e.type===`filter`?`brand`:`neutral`,children:e.type})}),(0,Z.jsx)(`td`,{className:`ars-mono text-[11.5px]`,style:{color:`var(--ars-ink-2)`},children:e.args}),(0,Z.jsx)(`td`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:e.desc})]},e.hook))]},e))})]})}),(0,Z.jsxs)(`p`,{className:`m-0 mt-3 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:[b(`Example:`,`ai-rank-suite`),(0,Z.jsx)(`code`,{className:`ars-mono`,children:`add_filter( 'airanksuite/schema/graph', fn( $graph ) => [...$graph, $myNode] );`})]})]})}function Tu({data:e}){let[t,n]=(0,Du.useState)(``),[r,i]=(0,Du.useState)(null),[a,o]=(0,Du.useState)(null),s=e.routes.filter(e=>e.route!==`/airanksuite/v1`),c=s.filter(e=>!t||e.route.toLowerCase().includes(t.toLowerCase())),l=e=>e.methods.includes(`GET`)&&!/\(\?P</.test(e.route),u=e=>e.replace(/^\/airanksuite\/v1/,``).replace(/\(\?P<([a-z_]+)>[^)]*\)/gi,`{$1}`)||`/`,d=async e=>{o(e.route);let t=e.route.replace(/^\/airanksuite\/v1/,``),n=performance.now();try{let r=await D.get(t);i({route:e.route,status:200,ms:Math.round(performance.now()-n),body:r})}catch(t){i({route:e.route,status:t.status||`error`,ms:Math.round(performance.now()-n),body:{error:t.message}})}finally{o(null)}};return(0,Z.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[minmax(0,1.15fr)_minmax(0,1fr)] items-start`,children:[(0,Z.jsx)(k,{title:b(`REST API`,`ai-rank-suite`),subtitle:S(b(`%1$s of %2$s routes under airanksuite/v1 — every one requires a capability; authenticate with an application password or the X-WP-Nonce header`,`ai-rank-suite`),c.length,s.length),action:(0,Z.jsx)(`input`,{type:`search`,placeholder:b(`Filter routes…`,`ai-rank-suite`),value:t,onChange:e=>n(e.target.value),style:{minHeight:30,width:180}}),flush:!0,children:(0,Z.jsx)(`div`,{style:{maxHeight:560,overflowY:`auto`,overflowX:`hidden`},children:(0,Z.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Z.jsxs)(`table`,{className:`ars-table`,style:{tableLayout:`fixed`,width:`100%`},children:[(0,Z.jsxs)(`colgroup`,{children:[(0,Z.jsx)(`col`,{}),(0,Z.jsx)(`col`,{style:{width:104}}),(0,Z.jsx)(`col`,{style:{width:96}})]}),(0,Z.jsx)(`thead`,{children:(0,Z.jsxs)(`tr`,{children:[(0,Z.jsx)(`th`,{children:b(`Route`,`ai-rank-suite`)}),(0,Z.jsx)(`th`,{children:b(`Methods`,`ai-rank-suite`)}),(0,Z.jsx)(`th`,{"aria-label":b(`Try`,`ai-rank-suite`)})]})}),(0,Z.jsx)(`tbody`,{children:c.map(e=>(0,Z.jsxs)(`tr`,{className:r?.route===e.route?`is-active`:``,children:[(0,Z.jsx)(`td`,{className:`ars-mono text-[12px]`,style:{minWidth:0},title:e.route,children:(0,Z.jsx)(`span`,{className:`ars-url`,style:{display:`block`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:u(e.route)})}),(0,Z.jsx)(`td`,{children:(0,Z.jsx)(`div`,{className:`flex gap-1`,children:e.methods.map(e=>(0,Z.jsx)(j,{tone:e===`GET`?`good`:e===`DELETE`?`serious`:`brand`,children:e},e))})}),(0,Z.jsxs)(`td`,{className:`is-num`,style:{whiteSpace:`nowrap`,paddingInline:8},children:[!l(e)&&(0,Z.jsx)(`span`,{className:`t-caption`,title:/\(\?P</.test(e.route)?b(`Needs an id in the path`,`ai-rank-suite`):b(`Not a GET route`,`ai-rank-suite`),children:/\(\?P</.test(e.route)?b(`needs id`,`ai-rank-suite`):`—`}),l(e)&&(0,Z.jsx)(A,{variant:`ghost`,busy:a===e.route,onClick:()=>d(e),children:b(`Try`,`ai-rank-suite`)})]})]},e.route))})]})})})}),(0,Z.jsx)(k,{title:b(`Response`,`ai-rank-suite`),subtitle:r?S(b(`%1$s · %2$s · %3$s ms`,`ai-rank-suite`),r.route.replace(/^\/airanksuite\/v1/,``),r.status,r.ms):b(`Press Try on any GET route to see its live JSON`,`ai-rank-suite`),action:r&&(0,Z.jsx)(A,{variant:`ghost`,onClick:()=>ve(JSON.stringify(r.body,null,2)),children:b(`Copy JSON`,`ai-rank-suite`)}),children:r?(0,Z.jsx)(`pre`,{className:`ars-mono m-0`,style:{fontSize:11.5,lineHeight:1.5,maxHeight:520,overflow:`auto`,padding:12,borderRadius:`var(--ars-r-md)`,background:`var(--ars-surface-2)`,color:`var(--ars-ink)`,whiteSpace:`pre-wrap`,wordBreak:`break-word`},children:JSON.stringify(r.body,null,2)}):(0,Z.jsx)(`div`,{className:`t-caption`,children:b(`Nothing requested yet.`,`ai-rank-suite`)})})]})}function Eu({tab:e=`status`,onTab:t}){let[n,r]=(0,Du.useState)(null),[i,a]=(0,Du.useState)(null),[o,s]=(0,Du.useState)(null),c=()=>D.get(`/dev/status`).then(r).catch(e=>s(e.message));if((0,Du.useEffect)(()=>{c()},[]),!n)return(0,Z.jsx)(Ce,{error:o});let l=(e,t)=>{a({msg:e,isError:t}),setTimeout(()=>a(null),4e3),t||c()};return(0,Z.jsxs)(`div`,{className:`ars-page`,children:[(0,Z.jsx)(Ie,{tabs:[{id:`status`,label:b(`Status`,`ai-rank-suite`)},{id:`integrations`,label:b(`Integrations`,`ai-rank-suite`)},{id:`hooks`,label:b(`Hooks`,`ai-rank-suite`)},{id:`webhooks`,label:b(`Webhooks`,`ai-rank-suite`)},...window.airanksuiteData?.debug?[{id:`api`,label:b(`API`,`ai-rank-suite`)}]:[]],active:e,onChange:t}),i&&(0,Z.jsx)(M,{tone:i.isError?`serious`:`good`,children:i.msg}),e===`status`&&(0,Z.jsx)(Su,{data:n,onMessage:l}),e===`integrations`&&(0,Z.jsx)(Cu,{}),e===`hooks`&&(0,Z.jsx)(wu,{data:n}),e===`webhooks`&&(0,Z.jsx)(_u,{}),e===`api`&&window.airanksuiteData?.debug&&(0,Z.jsx)(Tu,{data:n})]})}var Du,Z,Ou=o((()=>{Du=u(f(),1),C(),O(),dt(),ye(),bu(),Z=_e()})),ku=c({default:()=>Au});function Au(){let{data:e,setData:t,s:n,update:r,save:i,busy:a,saved:o,error:s,setError:c}=Xa(`/settings/feeds`),[l,u]=(0,ju.useState)(!1);if(!e)return(0,Mu.jsx)(Ce,{error:s});let d=e.options||{},f=async()=>{u(!0),c(null);try{t(await D.post(`/feeds/rebuild`,{}))}catch(e){c(e.message)}finally{u(!1)}},p=[{key:`google`,flag:`google_enabled`,label:b(`Google Merchant Center`,`ai-rank-suite`),hint:b(`Shopping ads, free listings and the Shopping tab`,`ai-rank-suite`)},{key:`meta`,flag:`meta_enabled`,label:b(`Meta Commerce Manager`,`ai-rank-suite`),hint:b(`Facebook and Instagram Shops, catalog ads`,`ai-rank-suite`)}];return(0,Mu.jsxs)(`div`,{className:`ars-page`,children:[s&&(0,Mu.jsx)(M,{tone:`serious`,children:s}),!e.woo_active&&(0,Mu.jsx)(M,{tone:`info`,children:b(`Catalog feeds need WooCommerce — activate it and this page fills itself in.`,`ai-rank-suite`)}),!e.permalinks&&(0,Mu.jsx)(M,{tone:`serious`,children:b(`Feeds need pretty permalinks. Switch Settings → Permalinks away from “Plain” first.`,`ai-rank-suite`)}),(0,Mu.jsxs)(`section`,{className:`grid gap-2`,children:[(0,Mu.jsx)(ke,{hint:b(`One catalog, two platforms — paste the URL and your products appear. No export, no spreadsheet, no sync plugin.`,`ai-rank-suite`),children:b(`Feed targets`,`ai-rank-suite`)}),(0,Mu.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:p.map(t=>{let i=e.feeds[t.key]||{},a=!!n[t.flag];return(0,Mu.jsx)(k,{title:t.label,subtitle:t.hint,children:(0,Mu.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Mu.jsx)(Me,{checked:a,onChange:e=>r({[t.flag]:e}),label:b(`Publish this feed`,`ai-rank-suite`)}),a&&(0,Mu.jsxs)(Mu.Fragment,{children:[(0,Mu.jsxs)(`div`,{className:`ars-r-lg px-4 py-3 grid gap-1.5`,style:{background:`var(--ars-surface-2)`},children:[(0,Mu.jsx)(`a`,{href:i.url,target:`_blank`,rel:`noreferrer`,className:`ars-mono text-[12px] ars-url`,title:i.url,children:i.url}),(0,Mu.jsx)(`div`,{className:`flex items-center gap-2`,children:i.cached?(0,Mu.jsxs)(j,{tone:`good`,children:[`✓ `,S(b(`%1$s items · %2$s KB`,`ai-rank-suite`),i.items,Math.round(i.bytes/1024))]}):(0,Mu.jsx)(j,{tone:`neutral`,children:b(`Not built yet`,`ai-rank-suite`)})})]}),(0,Mu.jsx)(`p`,{className:`m-0 text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Paste this URL as a scheduled fetch. The feed rebuilds itself whenever a product changes.`,`ai-rank-suite`)})]})]})},t.key)})})]}),(0,Mu.jsx)(k,{title:b(`Catalog defaults`,`ai-rank-suite`),subtitle:b(`Applied to every product that has no value of its own — individual products always win`,`ai-rank-suite`),action:(0,Mu.jsxs)(`div`,{className:`flex items-center gap-2`,children:[o&&(0,Mu.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,Mu.jsx)(A,{variant:`ghost`,onClick:f,busy:l,children:b(`Rebuild now`,`ai-rank-suite`)}),(0,Mu.jsx)(A,{onClick:i,busy:a,children:b(`Save`,`ai-rank-suite`)})]}),children:(0,Mu.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Mu.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:Nu.map(e=>(0,Mu.jsxs)(`div`,{children:[(0,Mu.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:e.label}),(0,Mu.jsx)(`select`,{value:n[e.key]??``,onChange:t=>r({[e.key]:t.target.value}),children:(d[e.key]||[``]).map(e=>(0,Mu.jsx)(`option`,{value:e,children:e===``?b(`— not set —`,`ai-rank-suite`):e},e))})]},e.key))}),(0,Mu.jsxs)(`div`,{children:[(0,Mu.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Google product category ID`,`ai-rank-suite`)}),(0,Mu.jsx)(`input`,{type:`text`,placeholder:b(`e.g. 187 (Apparel & Accessories &gt; Shoes)`,`ai-rank-suite`),value:n.google_category,onChange:e=>r({google_category:e.target.value})}),(0,Mu.jsxs)(`div`,{className:`text-[11.5px] mt-1`,style:{color:`var(--ars-ink-3)`},children:[b(`The numeric id from`,`ai-rank-suite`),` `,(0,Mu.jsx)(`a`,{href:`https://www.google.com/basepages/producttype/taxonomy-with-ids.en-US.txt`,target:`_blank`,rel:`noreferrer`,children:b(`Google’s product taxonomy`,`ai-rank-suite`)}),`. `,b(`Products can override it individually.`,`ai-rank-suite`)]})]}),(0,Mu.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,Mu.jsxs)(`div`,{children:[(0,Mu.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Max items`,`ai-rank-suite`)}),(0,Mu.jsx)(`input`,{type:`number`,min:`1`,max:`10000`,value:n.max_items,onChange:e=>r({max_items:Number(e.target.value)||1})})]}),(0,Mu.jsxs)(`div`,{children:[(0,Mu.jsx)(`label`,{className:`block font-medium mb-1 text-[12.5px]`,children:b(`Cache (hours)`,`ai-rank-suite`)}),(0,Mu.jsx)(`input`,{type:`number`,min:`1`,max:`168`,value:n.cache_hours,onChange:e=>r({cache_hours:Number(e.target.value)||1})})]})]}),(0,Mu.jsx)(Me,{checked:!!n.variations,onChange:e=>r({variations:e}),label:b(`List variations as individual items (recommended for apparel)`,`ai-rank-suite`)}),(0,Mu.jsx)(Me,{checked:!!n.exclude_out_of_stock,onChange:e=>r({exclude_out_of_stock:e}),label:b(`Leave out-of-stock products out of the feed`,`ai-rank-suite`)})]})}),e.woo_active&&e.empty_why&&(0,Mu.jsxs)(M,{tone:e.empty_why.reason===`not_built`?`info`:`warning`,children:[(0,Mu.jsx)(`strong`,{children:b(`Feed is empty:`,`ai-rank-suite`)}),` `,e.empty_why.message,` `,e.empty_why.action,e.empty_why.counts&&Object.keys(e.empty_why.counts).length>0&&(0,Mu.jsx)(`span`,{className:`t-caption block mt-1`,children:Object.entries(e.empty_why.counts).map(([e,t])=>`${e.replace(/_/g,` `)}: ${t}`).join(` · `)})]}),e.woo_active&&(0,Mu.jsx)(Ee,{columns:3,metrics:[{id:`google-items`,label:b(`Google items`,`ai-rank-suite`),hint:b(`Products in the built Google Merchant feed.`,`ai-rank-suite`),value:e.feeds.google?.items??`—`,sub:e.feeds.google?.items?b(`in the built feed`,`ai-rank-suite`):e.empty_why?e.empty_why.message:b(`not built yet`,`ai-rank-suite`)},{id:`meta-items`,label:b(`Meta items`,`ai-rank-suite`),hint:b(`Products in the built Meta catalog feed.`,`ai-rank-suite`),value:e.feeds.meta?.items??`—`,sub:e.feeds.meta?.items?b(`in the built feed`,`ai-rank-suite`):e.empty_why?e.empty_why.message:b(`not built yet`,`ai-rank-suite`)},{id:`feed-size`,label:b(`Feed size`,`ai-rank-suite`),hint:b(`The cached Google feed on disk. Built once, then served instantly.`,`ai-rank-suite`),value:e.feeds.google?.bytes==null?`—`:Math.round(e.feeds.google.bytes/1024),unit:e.feeds.google?.bytes==null?``:`KB`,sub:e.feeds.google?.bytes==null?b(`not built yet`,`ai-rank-suite`):b(`cached, served instantly`,`ai-rank-suite`)}]})]})}var ju,Mu,Nu,Pu=o((()=>{ju=u(f(),1),C(),Qa(),O(),dt(),Mu=_e(),Nu=[{key:`condition`,label:b(`Default condition`,`ai-rank-suite`)},{key:`age_group`,label:b(`Age group`,`ai-rank-suite`)},{key:`gender`,label:b(`Gender`,`ai-rank-suite`)},{key:`adult`,label:b(`Adult content`,`ai-rank-suite`)},{key:`size_system`,label:b(`Size system`,`ai-rank-suite`)},{key:`size_type`,label:b(`Size type`,`ai-rank-suite`)}]})),Fu=c({default:()=>Iu});function Iu(){let[e,t]=(0,Lu.useState)(null),[n,r]=(0,Lu.useState)(null),[i,a]=(0,Lu.useState)(!1),o=(e=!1)=>{a(!0),D.get(`/store/overview${e?`?fresh=1`:``}`).then(t).catch(e=>r(e.message)).finally(()=>a(!1))};(0,Lu.useEffect)(()=>{o()},[]);let s=e=>{window.location.hash=e};if(n)return(0,Ru.jsx)(M,{tone:`serious`,children:n});if(!e)return(0,Ru.jsx)(k,{children:b(`Reading the shop…`,`ai-rank-suite`)});if(!e.active)return(0,Ru.jsx)(M,{tone:`warning`,children:b(`WooCommerce is not active on this site.`,`ai-rank-suite`)});let c=e.counts||{},l=e=>e>=80?`good`:e>=50?`warn`:`bad`,u=e.readiness>=80?b(`Your catalogue is ready for search and for AI answers.`,`ai-rank-suite`):e.readiness>=50?b(`Your catalogue is findable, but a part of it is invisible where it matters.`,`ai-rank-suite`):b(`Most of your catalogue cannot be shown as products by Google or quoted by an AI yet.`,`ai-rank-suite`),d=[{id:`no_image`,label:b(`Without image`,`ai-rank-suite`),value:c.no_image??0},{id:`no_price`,label:b(`Without price`,`ai-rank-suite`),value:c.no_price??0},{id:`no_gtin`,label:b(`Without GTIN`,`ai-rank-suite`),value:c.no_gtin??0},{id:`thin`,label:b(`Thin description`,`ai-rank-suite`),value:c.thin??0,hint:b(`Under 200 characters. An AI answer has nothing to quote.`,`ai-rank-suite`)},{id:`no_meta_desc`,label:b(`No meta description`,`ai-rank-suite`),value:c.no_meta_desc??0},{id:`stranded`,label:b(`Out of stock, still indexed`,`ai-rank-suite`),value:c.stranded??0}];return(0,Ru.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Ru.jsxs)(k,{children:[(0,Ru.jsxs)(`div`,{className:`ars-hero`,children:[(0,Ru.jsxs)(`div`,{className:`ars-hero-ring`,children:[(0,Ru.jsx)(Pe,{value:e.readiness,label:b(`Shop readiness`,`ai-rank-suite`)}),(0,Ru.jsx)(`p`,{className:`t-caption ars-hero-ring-note`,children:S(x(`%s published product`,`%s published products`,e.products,`ai-rank-suite`),e.products.toLocaleString())})]}),(0,Ru.jsxs)(`div`,{className:`ars-hero-body`,children:[(0,Ru.jsx)(`span`,{className:`ars-hero-badge is-${l(e.readiness)===`good`?`good`:l(e.readiness)===`warn`?`warning`:`bad`}`,children:b(`Shop readiness`,`ai-rank-suite`)}),(0,Ru.jsx)(`h2`,{className:`ars-hero-title`,children:u}),(0,Ru.jsx)(`p`,{className:`ars-hero-why`,children:b(`Four things make the number: product data, product text, sellable pages and product schema. Each one below says what it is missing.`,`ai-rank-suite`)}),(0,Ru.jsxs)(`div`,{className:`ars-hero-actions`,children:[(0,Ru.jsx)(A,{onClick:()=>s(`/content`),children:b(`Optimise products`,`ai-rank-suite`)}),(0,Ru.jsx)(A,{variant:`ghost`,onClick:()=>o(!0),busy:i,children:b(`Re-read the catalogue`,`ai-rank-suite`)})]})]})]}),(0,Ru.jsx)(`div`,{className:`ars-hero-stats`,children:(e.pillars||[]).map(e=>(0,Ru.jsxs)(`div`,{className:`ars-hero-stat`,title:e.hint,children:[(0,Ru.jsxs)(`span`,{className:`ars-hero-stat-v is-${l(e.score)}`,children:[e.score,` / 100`]}),(0,Ru.jsx)(`span`,{className:`ars-hero-stat-l`,children:e.label}),(0,Ru.jsx)(`span`,{className:`ars-hero-stat-h`,children:e.hint})]},e.id))})]}),(0,Ru.jsx)(k,{title:b(`Where the catalogue is short`,`ai-rank-suite`),subtitle:b(`Products, not percentages. Each tile is a list of products to fix.`,`ai-rank-suite`),children:(0,Ru.jsx)(Ee,{columns:3,metrics:d.map(t=>({id:t.id,label:t.label,value:Number(t.value).toLocaleString(),sub:t.hint||(e.products?S(b(`%d%% of the catalogue`,`ai-rank-suite`),Math.round(t.value/e.products*100)):``),accent:t.value===0?`var(--ars-good)`:`var(--ars-warning)`}))})}),(0,Ru.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[(0,Ru.jsx)(k,{title:b(`Products pulling the score down`,`ai-rank-suite`),subtitle:e.unscored>0?S(x(`%s product has no score yet; analyse it under Content.`,`%s products have no score yet; analyse them under Content.`,e.unscored,`ai-rank-suite`),e.unscored.toLocaleString()):b(`The ten lowest AI-search scores in the catalogue.`,`ai-rank-suite`),action:(0,Ru.jsx)(A,{variant:`ghost`,onClick:()=>s(`/content`),children:b(`All products`,`ai-rank-suite`)}),children:(e.weakest||[]).length===0?(0,Ru.jsx)(`p`,{className:`t-caption`,children:b(`No product has been scored yet. Open Content and analyse the catalogue once; the queue appears here.`,`ai-rank-suite`)}):(0,Ru.jsx)(`ul`,{className:`ars-board`,children:e.weakest.map(e=>(0,Ru.jsx)(`li`,{className:`ars-board-row is-clickable`,children:(0,Ru.jsxs)(`button`,{type:`button`,className:`ars-board-hit`,onClick:()=>s(`/content/${e.id}`),children:[(0,Ru.jsx)(`span`,{className:`ars-board-label`,title:e.title,children:e.title}),(0,Ru.jsx)(`span`,{className:`ars-board-value tabular-nums`,children:(0,Ru.jsxs)(j,{tone:l(e.score)===`good`?`good`:l(e.score)===`warn`?`warning`:`serious`,children:[e.score,` / 100`]})})]})},e.id))})}),(0,Ru.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Ru.jsx)(k,{title:b(`Product schema`,`ai-rank-suite`),subtitle:b(`What a product page tells Google and the AI engines as structured data.`,`ai-rank-suite`),action:(0,Ru.jsx)(A,{variant:`ghost`,onClick:()=>s(`/schema/products`),children:b(`Settings`,`ai-rank-suite`)}),children:(0,Ru.jsx)(`div`,{className:`grid gap-2`,children:[[`product_schema`,b(`Product with price and availability`,`ai-rank-suite`)],[`identifiers`,b(`GTIN, MPN and brand`,`ai-rank-suite`)],[`shipping_details`,b(`Shipping details`,`ai-rank-suite`)],[`return_policy`,b(`Return policy`,`ai-rank-suite`)],[`noindex_cart`,b(`Cart and checkout kept out of the index`,`ai-rank-suite`)]].map(([t,n])=>(0,Ru.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-[13px]`,children:[(0,Ru.jsx)(`span`,{children:n}),(0,Ru.jsx)(j,{tone:e.schema?.[t]?`good`:`warning`,children:e.schema?.[t]?b(`On`,`ai-rank-suite`):b(`Off`,`ai-rank-suite`)})]},t))})}),(0,Ru.jsx)(k,{title:b(`Catalog feeds`,`ai-rank-suite`),subtitle:b(`The files Google Merchant Center and Meta read the catalogue from.`,`ai-rank-suite`),action:(0,Ru.jsx)(A,{variant:`ghost`,onClick:()=>s(`/feeds`),children:b(`Feeds`,`ai-rank-suite`)}),children:(0,Ru.jsx)(`div`,{className:`grid gap-2 text-[13px]`,children:[[`google`,b(`Google Merchant`,`ai-rank-suite`)],[`meta`,b(`Meta catalogue`,`ai-rank-suite`)]].map(([t,n])=>{let r=e.feeds?.[t]||{};return(0,Ru.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Ru.jsx)(`span`,{children:n}),r.items===null||r.items===void 0?(0,Ru.jsx)(j,{tone:`neutral`,children:b(`Not built`,`ai-rank-suite`)}):(0,Ru.jsx)(j,{tone:`good`,children:S(x(`%s item`,`%s items`,r.items,`ai-rank-suite`),Number(r.items).toLocaleString())})]},t)})})})]})]}),(0,Ru.jsx)(ke,{hint:b(`Index bloat, dead ends, category text and the data gaps, counted across the whole catalogue.`,`ai-rank-suite`),children:b(`Catalogue audit`,`ai-rank-suite`)}),(0,Ru.jsx)(qt,{})]})}var Lu,Ru,zu=o((()=>{Lu=u(f(),1),C(),O(),dt(),Zt(),Ru=_e()})),Bu=c({default:()=>Vu});function Vu(){let[e,t]=(0,Hu.useState)(`28`),[n,r]=(0,Hu.useState)(null),[i,a]=(0,Hu.useState)(null),[o,s]=(0,Hu.useState)(null),[c,l]=(0,Hu.useState)(null),[u,d]=(0,Hu.useState)(null),[f,p]=(0,Hu.useState)(!1);(0,Hu.useEffect)(()=>{D.get(`/gsc/status`).then(r).catch(e=>d(e.message)),D.get(`/bing`).then(l).catch(()=>l(null))},[]),(0,Hu.useEffect)(()=>{n?.connected&&(p(!0),Promise.allSettled([D.get(`/gsc/performance?days=${e}`),D.get(`/analytics/report?days=${e}`)]).then(([e,t])=>{a(e.status===`fulfilled`?e.value:{error:e.reason?.message}),s(t.status===`fulfilled`?t.value:{error:t.reason?.message}),p(!1)}))},[n?.connected,e]);let m=e=>{window.location.hash=e};if(u)return(0,Uu.jsx)(M,{tone:`serious`,children:u});if(!n)return(0,Uu.jsx)(k,{children:b(`Reading the connections…`,`ai-rank-suite`)});if(!n.connected)return(0,Uu.jsxs)(`div`,{className:`ars-page`,children:[(0,Uu.jsx)(xe,{tone:`neutral`,text:b(`Search Console and Analytics are not connected yet.`,`ai-rank-suite`),sub:b(`One sign-in with Google connects both, read-only. This screen then shows clicks, impressions, users and sessions for the same days side by side.`,`ai-rank-suite`),action:b(`Connect Google`,`ai-rank-suite`),onAction:()=>m(`/search-console`)}),(0,Uu.jsx)(k,{title:b(`What this screen will show`,`ai-rank-suite`),children:(0,Uu.jsxs)(`ul`,{className:`m-0 pl-5 text-[13px] grid gap-1`,children:[(0,Uu.jsx)(`li`,{children:b(`Search: clicks, impressions, click-through rate and average position, against the same number of days before.`,`ai-rank-suite`)}),(0,Uu.jsx)(`li`,{children:b(`Visits: users, sessions, page views and engagement from Google Analytics 4, for the same period.`,`ai-rank-suite`)}),(0,Uu.jsx)(`li`,{children:b(`The two lines on one time axis, and the top pages with both numbers next to each other.`,`ai-rank-suite`)}),(0,Uu.jsx)(`li`,{children:b(`Bing beside Google, once its API key is stored.`,`ai-rank-suite`)})]})})]});let h=i?.totals||{},g=i?.previous||{},_=o?.totals||{},v=(e,t=!1)=>e==null?`plain`:(t?-e:e)>=0?`green`:`red`,y=(e,t)=>{let n=Ku(Number(e||0),Number(t||0));return n===null?void 0:n},x=new Map((o?.pages||[]).map(e=>[String(e.path||e.page||``).replace(/\/$/,``),e])),C=(i?.pages||[]).slice(0,10).map(e=>{let t=``;try{t=new URL(e.page||e.key||e.url||``,window.location.origin).pathname.replace(/\/$/,``)}catch{t=String(e.page||``).replace(/\/$/,``)}let n=x.get(t)||x.get(t+`/`)||null;return{path:t||`/`,clicks:e.clicks,impressions:e.impressions,position:e.position,users:n?n.users:null,views:n?n.views??n.pageviews:null}});return(0,Uu.jsxs)(`div`,{className:`ars-page`,children:[(0,Uu.jsx)(xe,{tone:`good`,text:S(b(`Connected to %s.`,`ai-rank-suite`),n.property||b(`your Search Console property`,`ai-rank-suite`)),sub:b(`Search and visits for the same days, each against the same number of days immediately before. Detail and settings sit behind Search Console and Analytics.`,`ai-rank-suite`),action:b(`Search Console`,`ai-rank-suite`),onAction:()=>m(`/search-console`)}),(0,Uu.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,Uu.jsx)(qe,{options:Wu.map(e=>({id:e.id,label:S(b(`%s days`,`ai-rank-suite`),e.label)})),value:e,onChange:t,label:b(`Period`,`ai-rank-suite`)}),f&&(0,Uu.jsx)(j,{tone:`neutral`,children:b(`Reading…`,`ai-rank-suite`)})]}),(0,Uu.jsxs)(k,{title:b(`Search`,`ai-rank-suite`),subtitle:b(`Google Search Console. Position is an average; lower is better.`,`ai-rank-suite`),action:(0,Uu.jsx)(A,{variant:`ghost`,onClick:()=>m(`/search-console`),children:b(`Queries and pages`,`ai-rank-suite`)}),children:[i?.error?(0,Uu.jsx)(M,{tone:`warning`,children:i.error}):(0,Uu.jsxs)(`div`,{className:`ars-metrics`,"data-columns":`4`,style:{"--ars-metrics-cols":4},children:[(0,Uu.jsx)(Ge,{label:b(`Clicks`,`ai-rank-suite`),value:Gu(h.clicks),delta:y(h.clicks,g.clicks),tone:v(y(h.clicks,g.clicks))}),(0,Uu.jsx)(Ge,{label:b(`Impressions`,`ai-rank-suite`),value:Gu(h.impressions),delta:y(h.impressions,g.impressions),tone:v(y(h.impressions,g.impressions))}),(0,Uu.jsx)(Ge,{label:b(`Click-through rate`,`ai-rank-suite`),value:`${Number(h.ctr||0).toFixed(1)}%`}),(0,Uu.jsx)(Ge,{label:b(`Average position`,`ai-rank-suite`),value:Number(h.position||0).toFixed(1),delta:g.position?Math.round((Number(h.position)-Number(g.position))*10)/10:void 0,tone:g.position?Number(h.position)<=Number(g.position)?`green`:`red`:`plain`})]}),i?.series?.length>2&&(0,Uu.jsx)(`div`,{className:`mt-3`,children:(0,Uu.jsx)(Le,{data:i.series.map(e=>({date:e.date,value:e.clicks})),label:b(`Clicks`,`ai-rank-suite`),color:`var(--ars-brand)`,height:120,formatValue:e=>Gu(e),bleed:!0})})]}),(0,Uu.jsxs)(k,{title:b(`Visits`,`ai-rank-suite`),subtitle:b(`Google Analytics 4, the same period.`,`ai-rank-suite`),action:(0,Uu.jsx)(A,{variant:`ghost`,onClick:()=>m(`/analytics`),children:b(`Analytics`,`ai-rank-suite`)}),children:[o?.error?(0,Uu.jsx)(M,{tone:`warning`,children:o.error}):o&&!o.totals?(0,Uu.jsx)(M,{tone:`neutral`,children:b(`Analytics is not set up for this site yet. Pick the GA4 property under Analytics; the same Google sign-in covers it.`,`ai-rank-suite`)}):(0,Uu.jsxs)(`div`,{className:`ars-metrics`,"data-columns":`4`,style:{"--ars-metrics-cols":4},children:[(0,Uu.jsx)(Ge,{label:b(`Users`,`ai-rank-suite`),value:Gu(_.users)}),(0,Uu.jsx)(Ge,{label:b(`Sessions`,`ai-rank-suite`),value:Gu(_.sessions)}),(0,Uu.jsx)(Ge,{label:b(`Page views`,`ai-rank-suite`),value:Gu(_.pageviews)}),(0,Uu.jsx)(Ge,{label:b(`Engagement`,`ai-rank-suite`),value:`${Number(_.engagement||0).toFixed(1)}%`})]}),o?.series?.length>2&&(0,Uu.jsx)(`div`,{className:`mt-3`,children:(0,Uu.jsx)(Le,{data:o.series,label:b(`Users`,`ai-rank-suite`),color:`var(--ars-good)`,height:120,formatValue:e=>Gu(e),bleed:!0})})]}),C.length>0&&(0,Uu.jsx)(k,{title:b(`Top pages, both numbers`,`ai-rank-suite`),subtitle:b(`The pages Google shows most, with what Analytics saw on them in the same days.`,`ai-rank-suite`),flush:!0,children:(0,Uu.jsxs)(`table`,{className:`ars-table`,children:[(0,Uu.jsx)(`thead`,{children:(0,Uu.jsxs)(`tr`,{children:[(0,Uu.jsx)(`th`,{children:b(`Page`,`ai-rank-suite`)}),(0,Uu.jsx)(`th`,{className:`text-right`,children:b(`Clicks`,`ai-rank-suite`)}),(0,Uu.jsx)(`th`,{className:`text-right`,children:b(`Impressions`,`ai-rank-suite`)}),(0,Uu.jsx)(`th`,{className:`text-right`,children:b(`Position`,`ai-rank-suite`)}),(0,Uu.jsx)(`th`,{className:`text-right`,children:b(`Users`,`ai-rank-suite`)})]})}),(0,Uu.jsx)(`tbody`,{children:C.map(e=>(0,Uu.jsxs)(`tr`,{children:[(0,Uu.jsx)(`td`,{className:`ars-mono text-[12px]`,children:e.path}),(0,Uu.jsx)(`td`,{className:`text-right tabular-nums`,children:Gu(e.clicks)}),(0,Uu.jsx)(`td`,{className:`text-right tabular-nums`,children:Gu(e.impressions)}),(0,Uu.jsx)(`td`,{className:`text-right tabular-nums`,children:Number(e.position||0).toFixed(1)}),(0,Uu.jsx)(`td`,{className:`text-right tabular-nums`,children:e.users===null?`–`:Gu(e.users)})]},e.path))})]})}),(0,Uu.jsx)(k,{title:b(`Bing`,`ai-rank-suite`),subtitle:c?.has_key?b(`Connected. Clicks and index coverage on Bing sit behind Search Console → Bing.`,`ai-rank-suite`):b(`Not connected. Bing is the index Copilot answers from; its numbers appear here once the API key is stored.`,`ai-rank-suite`),action:(0,Uu.jsx)(A,{variant:`ghost`,onClick:()=>m(`/search-console/bing`),children:b(`Bing`,`ai-rank-suite`)})})]})}var Hu,Uu,Wu,Gu,Ku,qu=o((()=>{Hu=u(f(),1),C(),O(),dt(),Uu=_e(),Wu=[{id:`7`,label:`7`},{id:`28`,label:`28`},{id:`90`,label:`90`}],Gu=e=>Number(e||0).toLocaleString(),Ku=(e,t)=>t>0?Math.round((e-t)/t*100):null})),Ju=c({default:()=>Yu});function Yu(){let[e,t]=(0,Xu.useState)(null),[n,r]=(0,Xu.useState)(!1),[i,a]=(0,Xu.useState)(!1),[o,s]=(0,Xu.useState)(null),[c,l]=(0,Xu.useState)(null),[u,d]=(0,Xu.useState)(!1),f=()=>D.get(`/coexistence`).then(t).catch(e=>s(e.message));if((0,Xu.useEffect)(()=>{f()},[]),!e)return(0,Zu.jsx)(Ce,{error:o});let p=e.settings,m=e.primary,h=async e=>{r(!0),s(null);try{let n=await D.put(`/coexistence`,{...p,...e});t(n),a(!0),setTimeout(()=>a(!1),2200)}catch(e){s(e.message)}finally{r(!1)}};return(0,Zu.jsxs)(`div`,{className:`ars-page`,children:[(0,Zu.jsx)(k,{title:b(`Coexistence`,`ai-rank-suite`),subtitle:b(`Keep the SEO plugin you already trust. Add the AI layer without a single duplicate tag.`,`ai-rank-suite`),action:m?(0,Zu.jsxs)(j,{tone:`warning`,children:[m.label,` `,m.version]}):e.unknown?(0,Zu.jsx)(j,{tone:`warning`,children:b(`Something else writes tags`,`ai-rank-suite`)}):(0,Zu.jsx)(j,{tone:`good`,children:b(`No other SEO plugin`,`ai-rank-suite`)}),children:(0,Zu.jsxs)(`div`,{className:`grid gap-4`,children:[m?(0,Zu.jsxs)(M,{tone:`info`,children:[(0,Zu.jsx)(`strong`,{children:m.label}),` `,S(b(`is active and writes %d of the same tags we do. Pick who owns what below — nothing is duplicated either way.`,`ai-rank-suite`),m.surfaces.length)]}):e.unknown?(0,Zu.jsx)(M,{tone:`warning`,children:b(`The last scan found SEO tags on this site that are not ours, from something we cannot name — a white-labelled build, a theme with its own SEO fields, or code in functions.php. AI Rank Suite owns every tag and strips the other copy, so the page still has exactly one of each. Run the scan again below to confirm.`,`ai-rank-suite`)}):(0,Zu.jsx)(M,{tone:`good`,children:b(`Nothing else is writing SEO tags on this site, so AI Rank Suite owns everything. Install another SEO plugin later and this screen switches to safe mode by itself.`,`ai-rank-suite`)}),(0,Zu.jsxs)(`div`,{children:[(0,Zu.jsx)(`label`,{className:`block font-medium mb-2`,children:b(`Mode`,`ai-rank-suite`)}),(0,Zu.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:Qu.map(e=>(0,Zu.jsxs)(`button`,{type:`button`,onClick:()=>h({mode:e.id}),className:`ars-pick${p.mode===e.id?` is-active`:``}`,children:[(0,Zu.jsxs)(`span`,{className:`ars-pick-title`,children:[e.label,p.mode===e.id&&(0,Zu.jsx)(`span`,{style:{marginLeft:`auto`,color:`var(--ars-brand)`},children:`✓`})]}),(0,Zu.jsx)(`span`,{className:`ars-pick-note`,children:e.note})]},e.id))})]}),(0,Zu.jsx)(Me,{checked:!!p.enforce,onChange:e=>h({enforce:e}),label:b(`Enforce on the rendered page (duplicate-tag firewall)`,`ai-rank-suite`)}),(0,Zu.jsxs)(ft,{title:b(`How the firewall works`,`ai-rank-suite`),children:[(0,Zu.jsxs)(`p`,{children:[b(`Deciding who`,`ai-rank-suite`),` `,(0,Zu.jsx)(`em`,{children:b(`should`,`ai-rank-suite`)}),` `,b(`write a tag is not enough — plugins hook`,`ai-rank-suite`),` `,(0,Zu.jsx)(`code`,{children:`wp_head`}),` `,b(`at every priority, and some write from the theme. So the page itself is checked: the head is captured as it renders, split into “ours” and “everything else”, and whichever copy does not own that surface is removed before the browser sees it.`,`ai-rank-suite`)]}),(0,Zu.jsx)(`p`,{children:b(`The result is exactly one canonical, one description and one JSON-LD graph — whoever wrote them. Turn this off only if you want to inspect the raw output of both plugins.`,`ai-rank-suite`)})]}),o&&(0,Zu.jsx)(M,{tone:`serious`,children:o}),i&&(0,Zu.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]})]})}),(0,Zu.jsx)(k,{title:b(`Who owns which tag`,`ai-rank-suite`),subtitle:p.mode===`manual`?b(`Your choices, applied exactly`,`ai-rank-suite`):S(b(`Derived from the “%s” mode — switch to Per tag to edit`,`ai-rank-suite`),Qu.find(e=>e.id===p.mode)?.label),children:(0,Zu.jsx)(`div`,{className:`grid gap-2`,children:e.surfaces.map(t=>{let n=e.effective[t.id]||`airs`;return(0,Zu.jsxs)(`div`,{className:`flex items-center justify-between gap-4 px-3 py-2.5 flex-wrap`,style:{background:`var(--ars-surface-2)`,borderRadius:`var(--ars-r-sm)`},children:[(0,Zu.jsxs)(`div`,{className:`min-w-[220px]`,children:[(0,Zu.jsx)(`div`,{className:`font-semibold text-[13px]`,children:t.label}),(0,Zu.jsx)(`div`,{className:`text-[11.5px] mt-0.5`,style:{color:`var(--ars-ink-3)`},children:t.desc})]}),p.mode===`manual`?(0,Zu.jsx)(Je,{value:n,onChange:n=>h({ownership:{...e.effective,[t.id]:n}}),options:$u.map(e=>({id:e.id,label:e.id===`other`&&m?m.label:e.label}))}):(0,Zu.jsx)(j,{tone:n===`airs`?`good`:n===`both`?`warning`:`neutral`,children:n===`airs`?`AI Rank Suite`:n===`both`?b(`Both (not deduplicated)`,`ai-rank-suite`):m?.label||b(`Other plugin`,`ai-rank-suite`)})]},t.id)})})}),(0,Zu.jsx)(k,{title:b(`Live conflict scan`,`ai-rank-suite`),subtitle:b(`Fetches your home page and counts every tag actually rendered — proof, not a promise`,`ai-rank-suite`),action:(0,Zu.jsx)(A,{variant:`ghost`,busy:u,onClick:async()=>{d(!0),s(null);try{let e=await D.post(`/coexistence/scan`,{});l(e),t(t=>t&&{...t,unknown:!!e.unknown})}catch(e){s(e.message)}finally{d(!1)}},children:b(`Run scan`,`ai-rank-suite`)}),children:c?(0,Zu.jsxs)(`div`,{className:`grid gap-3`,children:[c.clean?(0,Zu.jsx)(M,{tone:`good`,children:b(`No duplicate tags. Both plugins are running side by side cleanly.`,`ai-rank-suite`)}):(0,Zu.jsx)(M,{tone:`warning`,children:S(x(`%d surface is written by both plugins. Turn the firewall on, or hand those surfaces to one owner.`,`%d surfaces are written by both plugins. Turn the firewall on, or hand those surfaces to one owner.`,c.duplicates,`ai-rank-suite`),c.duplicates)}),(0,Zu.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Zu.jsxs)(`table`,{className:`ars-table`,children:[(0,Zu.jsx)(`thead`,{children:(0,Zu.jsxs)(`tr`,{children:[(0,Zu.jsx)(`th`,{children:b(`Tag`,`ai-rank-suite`)}),(0,Zu.jsx)(`th`,{style:{textAlign:`right`},children:b(`From us`,`ai-rank-suite`)}),(0,Zu.jsx)(`th`,{style:{textAlign:`right`},children:b(`From others`,`ai-rank-suite`)}),(0,Zu.jsx)(`th`,{style:{textAlign:`right`},children:b(`Status`,`ai-rank-suite`)})]})}),(0,Zu.jsx)(`tbody`,{children:c.rows.map(e=>(0,Zu.jsxs)(`tr`,{children:[(0,Zu.jsx)(`td`,{children:e.label}),(0,Zu.jsx)(`td`,{style:{textAlign:`right`},children:e.ours}),(0,Zu.jsx)(`td`,{style:{textAlign:`right`},children:e.theirs}),(0,Zu.jsx)(`td`,{style:{textAlign:`right`},children:e.clash?(0,Zu.jsx)(j,{tone:`serious`,children:b(`Duplicated`,`ai-rank-suite`)}):(0,Zu.jsx)(j,{tone:`good`,children:b(`Clean`,`ai-rank-suite`)})})]},e.id))})]})})]}):(0,Zu.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Run the scan after changing anything above. It requests one page as an anonymous visitor and reports what the browser would receive.`,`ai-rank-suite`)})}),e.detected.length>0&&(0,Zu.jsx)(k,{title:b(`Detected on this site`,`ai-rank-suite`),subtitle:b(`Everything that writes SEO or social tags`,`ai-rank-suite`),children:(0,Zu.jsx)(`div`,{className:`grid gap-2`,children:e.detected.map(e=>(0,Zu.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,Zu.jsxs)(`div`,{className:`font-medium text-[13px]`,children:[e.label,` `,e.version&&(0,Zu.jsx)(`span`,{style:{color:`var(--ars-ink-3)`},children:e.version})]}),(0,Zu.jsxs)(`div`,{className:`text-[11.5px]`,style:{color:`var(--ars-ink-3)`},children:[b(`writes:`,`ai-rank-suite`),` `,e.surfaces.join(`, `)]})]},e.id))})})]})}var Xu,Zu,Qu,$u,ed=o((()=>{Xu=u(f(),1),C(),O(),dt(),mt(),Zu=_e(),Qu=[{id:`auto`,label:b(`Automatic`,`ai-rank-suite`),note:b(`Detect what is installed and pick the safe option. Recommended.`,`ai-rank-suite`)},{id:`geo`,label:b(`GEO layer only`,`ai-rank-suite`),note:b(`Your current SEO plugin keeps titles, descriptions and canonicals. We add the AI layer on top.`,`ai-rank-suite`)},{id:`solo`,label:b(`Take over`,`ai-rank-suite`),note:b(`AI Rank Suite owns every tag. Whatever else writes them — named plugin or not — its copy is stripped from the page.`,`ai-rank-suite`)},{id:`manual`,label:b(`Per tag`,`ai-rank-suite`),note:b(`Decide surface by surface who writes what.`,`ai-rank-suite`)}],$u=[{id:`airs`,label:b(`AI Rank Suite`,`ai-rank-suite`)},{id:`other`,label:b(`Other plugin`,`ai-rank-suite`)},{id:`both`,label:b(`Both`,`ai-rank-suite`)}]}));function td({hasRun:e}){let[t,n]=(0,nd.useState)(null),[r,i]=(0,nd.useState)(!1),[a,o]=(0,nd.useState)(null);return(0,rd.jsxs)(k,{title:b(`Audit copilot`,`ai-rank-suite`),subtitle:b(`Turns the findings into a plan: grouped, explained, with effort and risk, in the order worth working. The checks stay the source of truth — the AI only reads them.`,`ai-rank-suite`),icon:(0,rd.jsx)(Et,{size:18}),action:(0,rd.jsxs)(A,{onClick:async()=>{i(!0),o(null);try{n(await D.post(`/ai/audit/explain`,{}))}catch(e){o(e.message)}finally{i(!1)}},busy:r,disabled:!e,children:[(0,rd.jsx)(Et,{size:13}),` `,b(t?`Explain again`:`Explain this audit`,`ai-rank-suite`)]}),children:[!e&&(0,rd.jsx)(`span`,{className:`t-caption`,children:b(`Run the audit first; the copilot explains its results.`,`ai-rank-suite`)}),e&&!t&&!a&&!r&&(0,rd.jsxs)(`div`,{className:`ars-copilot-idle`,children:[(0,rd.jsx)(`span`,{className:`ars-copilot-idle-mark`,"aria-hidden":!0,children:(0,rd.jsx)(Et,{size:14})}),(0,rd.jsx)(`span`,{children:b(`Nothing explained yet. The AI reads every finding of the last run, groups them by cause, and writes the steps in the order worth working — with effort and risk for each group.`,`ai-rank-suite`)})]}),r&&!t&&(0,rd.jsx)(`span`,{className:`t-caption`,children:b(`Reading the findings…`,`ai-rank-suite`)}),a&&(0,rd.jsx)(M,{tone:`serious`,children:a}),t&&t.groups.length===0&&(0,rd.jsx)(M,{tone:`good`,children:b(`Nothing to explain — the run has no findings.`,`ai-rank-suite`)}),t&&t.groups.length>0&&(0,rd.jsxs)(`div`,{className:`grid gap-3`,children:[t.groups.map((e,n)=>{let r=t.findings.filter(t=>e.finding_ids.includes(t.id)),i=r.reduce((e,t)=>e+t.count,0);return(0,rd.jsxs)(`div`,{className:`ars-copilot-group`,children:[(0,rd.jsxs)(`div`,{className:`flex items-start justify-between gap-3 flex-wrap`,children:[(0,rd.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,rd.jsx)(`span`,{className:`ars-copilot-rank`,children:e.priority}),(0,rd.jsx)(`span`,{className:`font-semibold text-[13.5px]`,children:e.title})]}),(0,rd.jsxs)(`span`,{className:`flex items-center gap-1.5 flex-wrap`,children:[(0,rd.jsxs)(j,{tone:id(e.effort),children:[b(`effort`,`ai-rank-suite`),` `,e.effort]}),(0,rd.jsxs)(j,{tone:id(e.risk),children:[b(`risk`,`ai-rank-suite`),` `,e.risk]}),(0,rd.jsxs)(j,{tone:`neutral`,children:[i.toLocaleString(),` `,b(`pages`,`ai-rank-suite`)]})]})]}),e.cause&&(0,rd.jsxs)(`p`,{className:`m-0 text-[12.5px]`,children:[(0,rd.jsxs)(`strong`,{children:[b(`Cause`,`ai-rank-suite`),`:`]}),` `,e.cause]}),e.impact&&(0,rd.jsxs)(`p`,{className:`m-0 text-[12.5px]`,children:[(0,rd.jsxs)(`strong`,{children:[b(`Impact`,`ai-rank-suite`),`:`]}),` `,e.impact]}),(0,rd.jsx)(`ol`,{className:`m-0 pl-5 grid gap-1 text-[12.5px]`,children:e.steps.map((e,t)=>(0,rd.jsx)(`li`,{children:e},t))}),(0,rd.jsx)(`div`,{className:`flex gap-1 flex-wrap`,children:r.map(e=>(0,rd.jsxs)(j,{tone:e.severity===`critical`?`serious`:e.severity===`warning`?`warning`:`neutral`,children:[e.label,` · `,e.count]},e.id))})]},n)}),t.receipt&&t.receipt.model&&(0,rd.jsxs)(`span`,{className:`t-caption`,children:[t.receipt.provider,` · `,t.receipt.model,` · `,t.receipt.cost,` · `,t.receipt.latency_ms,` ms`]})]})]})}var nd,rd,id,ad=o((()=>{nd=u(f(),1),C(),O(),dt(),Vt(),rd=_e(),id=e=>e===`high`?`serious`:e===`medium`?`warning`:`good`})),od=c({default:()=>cd});function sd(){let[e,t]=(0,fd.useState)(null),[n,r]=(0,fd.useState)(!1),[i,a]=(0,fd.useState)(null),[o,s]=(0,fd.useState)(null);if((0,fd.useEffect)(()=>{D.get(`/audit/alerts`).then(t).catch(e=>s(e.message))},[]),!e)return(0,Q.jsx)(rt,{blocks:3,label:b(`Loading the audit`,`ai-rank-suite`)});let c=e.settings,l=async e=>{r(!0),s(null);try{t(await D.put(`/audit/alerts`,{...c,...e}))}catch(e){s(e.message)}finally{r(!1)}};return(0,Q.jsx)(k,{title:b(`Alerts`,`ai-rank-suite`),subtitle:b(`An email the day something breaks, not at the end of the month`,`ai-rank-suite`),action:c.enabled&&e.next?(0,Q.jsxs)(j,{tone:`good`,children:[`Next check `,new Date(e.next*1e3).toLocaleString()]}):(0,Q.jsx)(j,{tone:`neutral`,children:b(`Off`,`ai-rank-suite`)}),children:(0,Q.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Q.jsx)(Me,{checked:!!c.enabled,onChange:e=>l({enabled:e}),label:b(`Audit the site on a schedule and email new issues`,`ai-rank-suite`)}),c.enabled&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`How often`,`ai-rank-suite`)}),(0,Q.jsxs)(`select`,{value:c.frequency,onChange:e=>l({frequency:e.target.value}),children:[(0,Q.jsx)(`option`,{value:`daily`,children:b(`Daily`,`ai-rank-suite`)}),(0,Q.jsx)(`option`,{value:`weekly`,children:b(`Weekly`,`ai-rank-suite`)})]})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Alert on`,`ai-rank-suite`)}),(0,Q.jsxs)(`select`,{value:c.severity,onChange:e=>l({severity:e.target.value}),children:[(0,Q.jsx)(`option`,{value:`critical`,children:b(`Critical only`,`ai-rank-suite`)}),(0,Q.jsx)(`option`,{value:`warning`,children:b(`Critical and warnings`,`ai-rank-suite`)})]})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`Send to`,`ai-rank-suite`)}),(0,Q.jsx)(`input`,{type:`text`,placeholder:b(`Defaults to the admin email`,`ai-rank-suite`),defaultValue:c.recipients,onBlur:e=>l({recipients:e.target.value})})]})]}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Q.jsx)(A,{variant:`ghost`,busy:n,onClick:async()=>{r(!0),a(null);try{let e=await D.post(`/audit/alerts/test`,{});a(e.new===0?b(`Nothing new since the last check — no mail sent, which is the point.`,`ai-rank-suite`):S(x(`%d new issue found and mailed.`,`%d new issues found and mailed.`,e.new,`ai-rank-suite`),e.new))}catch(e){s(e.message)}finally{r(!1)}},children:b(`Check now`,`ai-rank-suite`)}),i&&(0,Q.jsx)(`span`,{className:`text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:i})]})]}),(0,Q.jsxs)(ft,{title:b(`What counts as an alert`,`ai-rank-suite`),children:[(0,Q.jsx)(`p`,{children:b(`Only findings that were not present at the previous check. A weekly summary of everything already known gets read once and filtered forever; the failures that cost money are the sudden ones — a deploy carrying “discourage search engines”, a theme update dropping the canonical, a plugin noindexing a category.`,`ai-rank-suite`)}),(0,Q.jsx)(`p`,{children:b(`A problem you fixed that comes back alerts again, because that is genuinely news rather than a repeat.`,`ai-rank-suite`)})]}),o&&(0,Q.jsx)(M,{tone:`serious`,children:o})]})})}function cd(){let[e,t]=(0,fd.useState)(null),[n,r]=(0,fd.useState)(null),[i,a]=(0,fd.useState)(!1),[o,s]=(0,fd.useState)(null),[c,l]=(0,fd.useState)(``),u=(0,fd.useCallback)(async()=>{a(!0);try{let e=await D.get(`/audit/export`),t=``+(Array.isArray(e?.rows)?e.rows:[]).map(e=>e.map(e=>`"${String(e??``).replace(/"/g,`""`)}"`).join(`,`)).join(`\r
     105`),n=URL.createObjectURL(new Blob([t],{type:`text/csv;charset=utf-8`})),r=document.createElement(`a`);r.href=n,r.download=e?.filename||`site-audit.csv`,document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(n)}finally{a(!1)}},[]),[d,f]=(0,fd.useState)(``),[p,m]=(0,fd.useState)(``),[h,g]=(0,fd.useState)(``),[_,v]=(0,fd.useState)([]),[y,C]=(0,fd.useState)(1),[w,T]=(0,fd.useState)(!1),[E,ee]=(0,fd.useState)(null),te=(0,fd.useRef)(!1),re=(0,fd.useRef)(null),O=ne.i18n||{multilingual:!1,perPost:!1,languages:[]},ie=()=>{requestAnimationFrame(()=>{re.current?.scrollIntoView({behavior:`smooth`,block:`start`})})},ae=(0,fd.useCallback)((e=c,t=p,n=y,i=d,a=h)=>D.get(`/audit/report?group=${e}&severity=${t}&page=${n}&per_page=50&lang=${encodeURIComponent(i)}&type=${encodeURIComponent(a)}`).then(r).catch(e=>ee(e.message)),[c,p,y,d,h]);(0,fd.useEffect)(()=>{D.get(`/audit/status`).then(t).catch(e=>ee(e.message)),D.get(`/audit/trend?limit=20`).then(e=>s(e.runs||[])).catch(()=>s([])),ae()},[]),(0,fd.useEffect)(()=>{ae(c,p,y,d,h)},[c,p,y,d,h]),(0,fd.useEffect)(()=>{D.get(`/content/library`).then(e=>v((e.types||[]).filter(e=>e.total>0))).catch(()=>{})},[]);let oe=(0,fd.useCallback)(async()=>{if(!te.current){te.current=!0;try{for(;;){let e=await D.post(`/audit/tick`,{});if(t(e),e.state!==`running`)break}await ae()}catch(e){ee(e.message)}finally{te.current=!1,T(!1)}}},[ae]);(0,fd.useEffect)(()=>{e?.state===`running`&&!te.current&&(T(!0),oe())},[e?.state,oe]);let se=async()=>{T(!0),ee(null);try{t(await D.post(`/audit/start`,{})),oe()}catch(e){ee(e.message),T(!1)}},ce=async()=>{try{t(await D.post(`/audit/cancel`,{}))}catch(e){ee(e.message)}},le=async(e,t=!0)=>{try{await D.post(`/audit/ignore`,{check_id:e,on:t}),await ae()}catch(e){ee(e.message)}},ue=async e=>{try{await D.post(`/audit/ignore`,{fingerprint:e,on:!0}),await ae()}catch(e){ee(e.message)}},de=e?.state===`running`,fe=Math.max(1,...(n?.checks||[]).slice(0,8).map(e=>e.count||0)),pe=n?.totals||{critical:0,warning:0,notice:0},me=new Set((n?.checks||[]).map(e=>e.id)).size,he=Math.max(0,30-me),ge=!!n,_e=ge&&!n.run_id,ve=(()=>{if(!ge||_e)return null;let e=pe.critical,t=pe.warning,r=pe.notice,i=n.checked||0;return e===0&&t===0&&r===0?{tone:`good`,badge:b(`All clear`,`ai-rank-suite`),text:S(x(`The single page checked passed all 30 rules.`,`Every one of %s pages passed all 30 rules.`,i,`ai-rank-suite`),i.toLocaleString()),why:b(`Nothing comparative is wrong: no duplicates, no orphans, no blocked pages. Run again after a publishing sprint.`,`ai-rank-suite`),action:null}:e>0?{tone:`bad`,badge:b(`Needs attention`,`ai-rank-suite`),text:S(x(`%d critical problem is costing you search traffic today.`,`%d critical problems are costing you search traffic today.`,e,`ai-rank-suite`),e),why:S(b(`%1$s warnings and %2$s notices sit behind them across %3$s pages. Clear the criticals first — each one blocks pages from ranking regardless of how good the content is.`,`ai-rank-suite`),t.toLocaleString(),r.toLocaleString(),i.toLocaleString()),action:b(`Show the criticals`,`ai-rank-suite`),severity:`critical`}:t>0?{tone:`warning`,badge:b(`Room to improve`,`ai-rank-suite`),text:S(b(`Nothing is blocking, but %1$s warnings across %2$s pages hold the site back.`,`ai-rank-suite`),t.toLocaleString(),i.toLocaleString()),why:b(`Thin content, duplicate descriptions and unlinked pages are the usual weight here. Work them by rule, not by page — one fix clears hundreds.`,`ai-rank-suite`),action:b(`Show the warnings`,`ai-rank-suite`),severity:`warning`}:{tone:`good`,badge:b(`Healthy`,`ai-rank-suite`),text:S(b(`Only %1$s notices remain across %2$s pages.`,`ai-rank-suite`),r.toLocaleString(),i.toLocaleString()),why:b(`Nothing here costs traffic. Worth clearing on a quiet afternoon.`,`ai-rank-suite`),action:b(`Show the notices`,`ai-rank-suite`),severity:`notice`}})(),ye=(e,t=``)=>{m(e),l(t),C(1),ie()},be=de?(0,Q.jsx)(A,{variant:`ghost`,onClick:ce,children:b(`Stop`,`ai-rank-suite`)}):(0,Q.jsxs)(A,{onClick:se,busy:w,children:[(0,Q.jsx)(Tt,{size:13}),` `,b(_e?`Run first audit`:`Run audit again`,`ai-rank-suite`)]});return(0,Q.jsxs)(`div`,{className:`ars-page`,children:[(de||!ge||_e)&&(0,Q.jsxs)(k,{title:b(`Site Audit`,`ai-rank-suite`),subtitle:b(`Every published page checked against 37 rules: the comparative problems a single-page score cannot see`,`ai-rank-suite`),action:be,children:[de?(0,Q.jsx)(ze,{label:e.phase===`pages`?S(b(`Checking pages — %1$s of %2$s`,`ai-rank-suite`),e.done,e.total):e.phase===`duplicates`?b(`Comparing every page against every other…`,`ai-rank-suite`):b(`Checking site foundations…`,`ai-rank-suite`),total:100,percent:e.percent,note:S(x(`%s finding so far. The run continues in slices — leave this tab open.`,`%s findings so far. The run continues in slices — leave this tab open.`,e.issues,`ai-rank-suite`),e.issues.toLocaleString())}):ge?(0,Q.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Q.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Nothing audited yet. The first run reads every published page, then compares them against each other.`,`ai-rank-suite`)}),(0,Q.jsxs)(ft,{title:b(`What the audit finds that a page score cannot`,`ai-rank-suite`),children:[(0,Q.jsx)(`p`,{children:b(`A per-page score is blind to everything comparative. Forty product pages can each score 80 and still share one description; a category can be noindexed by a theme setting nobody remembers; a page can be perfect and completely unlinked, so no crawler reaches it.`,`ai-rank-suite`)}),(0,Q.jsx)(`p`,{children:b(`The audit runs those checks across the whole site: duplicate titles, descriptions and H1s, orphan pages, foreign canonicals, thin content, missing structured data, and — on a shop — products without an image, price, identifier, brand or description, which is exactly what Google Merchant rejects.`,`ai-rank-suite`)})]})]}):(0,Q.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Loading…`,`ai-rank-suite`)}),E&&(0,Q.jsx)(M,{tone:`serious`,children:E})]}),ge&&!_e&&!de&&ve&&(0,Q.jsxs)(`div`,{className:`ars-hero`,children:[(0,Q.jsx)(`div`,{className:`ars-hero-ring`,children:(0,Q.jsx)(Pe,{value:n.score,size:132,label:b(`Audit score`,`ai-rank-suite`),onLight:!0})}),(0,Q.jsxs)(`div`,{className:`ars-hero-body`,children:[(0,Q.jsx)(`span`,{className:`ars-hero-badge is-${ve.tone}`,children:ve.badge}),(0,Q.jsx)(`h2`,{className:`ars-hero-title`,children:ve.text}),(0,Q.jsx)(`p`,{className:`ars-hero-why`,children:ve.why}),(0,Q.jsxs)(`div`,{className:`ars-hero-actions`,children:[ve.action&&(0,Q.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:()=>ye(ve.severity),children:ve.action}),be,n.delta&&(0,Q.jsxs)(`span`,{className:`ars-delta-strip`,title:S(b(`Compared with the previous run %s`,`ai-rank-suite`),n.delta.previous),children:[(0,Q.jsx)(`span`,{className:`is-new`,children:S(b(`+%s new`,`ai-rank-suite`),n.delta.new.toLocaleString())}),(0,Q.jsx)(`span`,{className:`is-fixed`,children:S(b(`−%s fixed`,`ai-rank-suite`),n.delta.fixed.toLocaleString())}),(0,Q.jsx)(`span`,{className:`is-recurring`,children:S(b(`%s still there`,`ai-rank-suite`),n.delta.recurring.toLocaleString())})]}),(0,Q.jsxs)(`span`,{className:`t-caption`,children:[S(x(`%1$s page · %2$s rules · %3$s passing`,`%1$s pages · %2$s rules · %3$s passing`,n.checked,`ai-rank-suite`),n.checked.toLocaleString(),30 .toLocaleString(),he.toLocaleString()),n.ended?` · ${new Date(n.ended*1e3).toLocaleString()}`:``]})]})]}),(0,Q.jsx)(`div`,{className:`ars-hero-stats`,children:[{label:b(`Critical`,`ai-rank-suite`),value:pe.critical,sev:`critical`,tone:pe.critical?`bad`:`good`},{label:b(`Warnings`,`ai-rank-suite`),value:pe.warning,sev:`warning`,tone:pe.warning?`warn`:`good`},{label:b(`Notices`,`ai-rank-suite`),value:pe.notice,sev:`notice`},{label:b(`Accepted`,`ai-rank-suite`),value:n.ignored||0,sev:null}].map(e=>(0,Q.jsxs)(`button`,{type:`button`,className:`ars-hero-stat`,onClick:()=>e.sev!==null&&ye(e.sev),title:e.sev===null?b(`Findings you accepted — they stay out of the score`,`ai-rank-suite`):S(b(`Show only %s`,`ai-rank-suite`),e.label),children:[(0,Q.jsx)(`span`,{className:`ars-hero-stat-v${e.tone?` is-`+e.tone:``}`,children:e.value.toLocaleString()}),(0,Q.jsx)(`span`,{className:`ars-hero-stat-l`,children:e.label})]},e.label))})]}),E&&ge&&!_e&&!de&&(0,Q.jsx)(M,{tone:`serious`,children:E}),o&&o.length>0&&(0,Q.jsxs)(k,{title:b(`Findings over time`,`ai-rank-suite`),subtitle:b(`One point per audit run — the number that should be falling`,`ai-rank-suite`),action:(0,Q.jsx)(We,{value:(o[o.length-1]?.value??0)-(o[0]?.value??0),invert:!0,suffix:` `+b(`since first run`,`ai-rank-suite`)}),children:[o.length>=3&&new Set(o.map(e=>e.value)).size>1?(0,Q.jsx)(Le,{data:o,label:b(`Open findings`,`ai-rank-suite`),color:`var(--ars-series-3)`,height:140,formatValue:e=>`${e}`,bleed:!0}):(0,Q.jsx)(at,{parts:[{label:b(`Critical`,`ai-rank-suite`),value:o[o.length-1]?.critical??0,color:`var(--ars-c-red-ink)`},{label:b(`Warning`,`ai-rank-suite`),value:o[o.length-1]?.warning??0,color:`var(--ars-accent)`},{label:b(`Notice`,`ai-rank-suite`),value:o[o.length-1]?.notice??0,color:`var(--ars-brand)`}],total:o[o.length-1]?.value??null}),(0,Q.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-3 mt-3`,children:[[`critical`,b(`Critical`,`ai-rank-suite`),`var(--ars-c-red-ink)`],[`warning`,b(`Warning`,`ai-rank-suite`),`var(--ars-accent)`],[`notice`,b(`Notice`,`ai-rank-suite`),`var(--ars-brand)`]].map(([e,t,n])=>{let r=o[o.length-1]?.[e]??0,i=o[0]?.[e]??0;return(0,Q.jsxs)(`div`,{className:`ars-r-md px-3 py-2.5`,style:{background:`var(--ars-surface-2)`},children:[(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,Q.jsx)(`span`,{className:`text-[12px] font-semibold`,style:{color:n},children:t}),(0,Q.jsx)(We,{value:i-r,invert:!0})]}),(0,Q.jsx)(`div`,{className:`t-num text-[18px] font-bold mt-0.5`,children:r})]},e)})})]}),n&&n.run_id&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(k,{title:b(`Where this site is weak`,`ai-rank-suite`),subtitle:b(`Every audited area, worst first — click one to see only its findings`,`ai-rank-suite`),children:(0,Q.jsx)(`div`,{className:`ars-areagrid`,children:ld(n).map(e=>{let t=e.segments.reduce((e,t)=>e+t.value,0)||1,n=e.score>=80?`good`:e.score>=50?`mid`:`bad`;return(0,Q.jsxs)(`button`,{type:`button`,className:`ars-areacard is-${n}${c===e.id?` is-active`:``}`,onClick:()=>ye(p,e.id),children:[(0,Q.jsx)(`span`,{className:`ars-areacard-score t-num`,children:e.score}),(0,Q.jsxs)(`span`,{className:`ars-areacard-body`,children:[(0,Q.jsx)(`span`,{className:`ars-areacard-label`,children:e.label}),(0,Q.jsx)(`span`,{className:`ars-areacard-sub`,children:e.sub}),(0,Q.jsx)(`span`,{className:`ars-areacard-bar`,"aria-hidden":!0,children:e.segments.filter(e=>e.value>0).map(e=>(0,Q.jsx)(`span`,{style:{width:`${e.value/t*100}%`,background:e.color}},e.label))})]}),(0,Q.jsx)(`span`,{className:`ars-areacard-reach${e.findings?``:` is-clear`}`,children:e.reach})]},e.id)})})}),(0,Q.jsx)(td,{hasRun:(n?.checks||[]).length>0}),(0,Q.jsx)(k,{title:b(`Biggest wins first`,`ai-rank-suite`),subtitle:b(`Ranked by severity, then by how many pages are affected — the bar is reach`,`ai-rank-suite`),children:(0,Q.jsx)(`div`,{className:`grid gap-1.5`,children:(n.checks||[]).slice(0,8).map(e=>(0,Q.jsxs)(`button`,{type:`button`,onClick:()=>ye(e.severity,e.group),className:`flex items-center justify-between gap-3 px-3 py-2 text-left cursor-pointer`,style:{border:`1px solid var(--ars-border)`,borderRadius:`var(--ars-r-sm)`,background:`var(--ars-surface)`},children:[(0,Q.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0`,children:[(0,Q.jsx)(`span`,{className:`ars-tag`,style:{background:`var(--ars-c-${pd[e.severity]})`,color:`var(--ars-c-${pd[e.severity]}-ink)`},children:md[e.severity]}),(0,Q.jsx)(`span`,{className:`font-medium text-[13px] truncate`,children:e.label})]}),(0,Q.jsxs)(`span`,{className:`flex items-center gap-2 shrink-0`,children:[(0,Q.jsx)(`span`,{className:`ars-winbar`,"aria-hidden":!0,children:(0,Q.jsx)(`span`,{style:{width:`${Math.max(4,Math.round(e.count/fe*100))}%`,background:`var(--ars-c-${pd[e.severity]}-ink)`}})}),(0,Q.jsx)(`span`,{className:`t-num font-semibold`,style:{minWidth:48,textAlign:`right`},children:e.count.toLocaleString()})]})]},e.id))})}),(0,Q.jsx)(`div`,{ref:re,"aria-hidden":!0,style:{scrollMarginTop:12}}),(0,Q.jsx)(k,{title:b(`Findings`,`ai-rank-suite`),subtitle:S(b(`%d on this filter`,`ai-rank-suite`),n.total),action:(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[n.total>0&&(0,Q.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,disabled:i,onClick:u,title:b(`Every finding of the last completed audit, one row each, for a spreadsheet or a ticket.`,`ai-rank-suite`),children:b(i?`Preparing…`:`Export CSV`,`ai-rank-suite`)}),O.multilingual&&!O.perPost&&(0,Q.jsx)(`a`,{href:`#/content/urls`,className:`ars-btn ars-btn-ghost`,title:b(`This site translates by URL, not by post. Filtering by language here shows findings on posts that have a page in that language; per-URL findings live in the URL inventory.`,`ai-rank-suite`),children:b(`Per language → URLs`,`ai-rank-suite`)}),O.multilingual&&(O.perPost||O.urlLangs)&&(0,Q.jsxs)(`select`,{value:d,onChange:e=>{f(e.target.value),C(1)},style:{minWidth:`11rem`},"aria-label":b(`Language`,`ai-rank-suite`),children:[(0,Q.jsx)(`option`,{value:``,children:b(`All languages`,`ai-rank-suite`)}),O.languages.map(e=>(0,Q.jsx)(`option`,{value:e.code,children:e.label},e.code))]}),(0,Q.jsx)(qe,{label:b(`Severity`,`ai-rank-suite`),value:p,onChange:e=>{m(e),C(1)},options:[{id:``,label:b(`All`,`ai-rank-suite`)},{id:`critical`,label:b(`Critical`,`ai-rank-suite`)},{id:`warning`,label:b(`Warning`,`ai-rank-suite`)},{id:`notice`,label:b(`Notice`,`ai-rank-suite`)}]})]}),children:(0,Q.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Q.jsx)(qe,{label:b(`Area`,`ai-rank-suite`),value:c,onChange:e=>{l(e),C(1)},options:[{id:``,label:b(`All areas`,`ai-rank-suite`)},...(n.groups||[]).filter(e=>e.count>0).map(e=>({id:e.id,label:e.label,count:e.count}))]}),_.length>1&&(0,Q.jsx)(qe,{label:b(`Type`,`ai-rank-suite`),value:h,onChange:e=>{g(e),C(1)},options:[{id:``,label:b(`All types`,`ai-rank-suite`)},..._.map(e=>({id:e.name,label:e.label}))]}),(n.ignored_rules||[]).length>0&&(0,Q.jsxs)(`div`,{className:`ars-accepted-rules`,children:[(0,Q.jsx)(`span`,{className:`t-caption`,children:b(`Accepted rules (not reported):`,`ai-rank-suite`)}),n.ignored_rules.map(e=>(0,Q.jsxs)(`button`,{type:`button`,className:`ars-chip`,onClick:()=>le(e,!1),title:b(`Report this rule again`,`ai-rank-suite`),children:[e,` ×`]},e))]}),n.items.length===0?(0,Q.jsx)(we,{title:b(`Nothing to fix in this area`,`ai-rank-suite`),compact:!0,children:b(`Every rule in this area passed on every page checked.`,`ai-rank-suite`)}):(0,Q.jsx)(`div`,{className:`grid gap-2`,children:ud(n.items).map(e=>(0,Q.jsx)(dd,{group:e,onAccept:ue,onAcceptRule:le},e.key))}),n.total>n.per_page&&(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(A,{variant:`ghost`,disabled:y<=1,onClick:()=>C(y-1),children:b(`Previous`,`ai-rank-suite`)}),(0,Q.jsx)(`span`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:S(b(`Page %1$s of %2$s`,`ai-rank-suite`),y.toLocaleString(),Math.ceil(n.total/n.per_page).toLocaleString())}),(0,Q.jsx)(A,{variant:`ghost`,disabled:y>=Math.ceil(n.total/n.per_page),onClick:()=>C(y+1),children:b(`Next`,`ai-rank-suite`)})]})]})}),(0,Q.jsx)(Oe,{title:b(`Audit alerts`,`ai-rank-suite`),note:b(`Email on new findings`,`ai-rank-suite`),children:(0,Q.jsx)(sd,{})})]})]})}function ld(e){let t={critical:4,warning:2,notice:1},n=new Map((e.groups||[]).map(e=>[e.id,{...e,critical:0,warning:0,notice:0,load:0}]));(e.checks||[]).forEach(e=>{let r=n.get(e.group);r&&(r[e.severity]=(r[e.severity]||0)+(e.count||0),r.load+=(t[e.severity]||1)*(e.count||0))});let r=Math.max(1,e.checked||1);return[...n.values()].map(e=>{let t=e.critical+e.warning+e.notice,n=t===0?100:Math.max(0,Math.round(100-Math.min(100,e.load/(r*4)*100)));return e.critical>0?n=Math.min(n,45):e.warning>0?n=Math.min(n,79):e.notice>0&&(n=Math.min(n,94)),{id:e.id,label:e.label,score:n,sub:t===0?b(`nothing outstanding`,`ai-rank-suite`):[e.critical?S(b(`%s critical`,`ai-rank-suite`),e.critical.toLocaleString()):null,e.warning?S(b(`%s warning`,`ai-rank-suite`),e.warning.toLocaleString()):null,e.notice?S(b(`%s notice`,`ai-rank-suite`),e.notice.toLocaleString()):null].filter(Boolean).join(` · `),segments:[{label:b(`Critical`,`ai-rank-suite`),value:e.critical,color:`var(--ars-c-red-ink)`},{label:b(`Warning`,`ai-rank-suite`),value:e.warning,color:`var(--ars-accent)`},{label:b(`Notice`,`ai-rank-suite`),value:e.notice,color:`var(--ars-brand)`},{label:b(`Clear`,`ai-rank-suite`),value:+(t===0),color:`var(--ars-c-green-ink)`}],reach:t===0?b(`clear`,`ai-rank-suite`):S(x(`%d to fix`,`%d to fix`,t,`ai-rank-suite`),t),findings:t}}).sort((e,t)=>e.score-t.score||t.findings-e.findings)}function ud(e){let t={critical:0,warning:1,notice:2},n=new Map;return e.forEach(e=>{let t=e.check_label+`|`+e.severity;n.has(t)||n.set(t,{key:t,label:e.check_label,severity:e.severity,fix:e.fix,items:[]}),n.get(t).items.push(e)}),[...n.values()].sort((e,n)=>(t[e.severity]??3)-(t[n.severity]??3)||n.items.length-e.items.length)}function dd({group:e,onAccept:t,onAcceptRule:n}){let[r,i]=fd.useState(e.items.length===1);return(0,Q.jsxs)(`section`,{className:`ars-issue is-${e.severity}${r?` is-open`:``}`,children:[(0,Q.jsxs)(`button`,{type:`button`,className:`ars-issue-head`,onClick:()=>i(e=>!e),"aria-expanded":r,children:[(0,Q.jsx)(`span`,{className:`ars-issue-sev`,children:md[e.severity]}),(0,Q.jsx)(`span`,{className:`ars-issue-label`,children:e.label}),(0,Q.jsxs)(`span`,{className:`ars-issue-count tabular-nums`,children:[e.items.length,` `,e.items.length===1?`page`:`pages`]}),(0,Q.jsx)(`svg`,{className:`ars-issue-caret`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:(0,Q.jsx)(`path`,{d:`m9 6 6 6-6 6`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`})})]}),r&&(0,Q.jsxs)(`div`,{className:`ars-issue-body`,children:[(0,Q.jsx)(`p`,{className:`ars-issue-fix`,children:e.fix}),e.items.length>1&&n&&e.items[0]?.check&&(0,Q.jsx)(`p`,{className:`m-0 mb-2`,children:(0,Q.jsx)(`button`,{type:`button`,className:`ars-chip`,onClick:()=>n(e.items[0].check),title:b(`Accept this rule for the whole site: every current finding is removed and future runs skip it. Reversible above.`,`ai-rank-suite`),children:S(x(`Accept this rule for the %s page`,`Accept this rule for all %s pages`,e.items.length,`ai-rank-suite`),e.items.length.toLocaleString())})}),(0,Q.jsx)(`ul`,{className:`ars-issue-pages`,children:e.items.map(e=>(0,Q.jsxs)(`li`,{children:[(0,Q.jsx)(`span`,{className:`ars-issue-page`,title:e.label,children:e.label}),e.detail&&(0,Q.jsx)(`span`,{className:`ars-issue-detail`,children:e.detail}),(0,Q.jsxs)(`span`,{className:`ars-issue-links`,children:[e.post_id?(0,Q.jsx)(`a`,{href:`#/content/${e.post_id}`,title:b(`Open this page in the optimiser: keyword, title, description and the failing checks in one place`,`ai-rank-suite`),children:b(`Optimise`,`ai-rank-suite`)}):null,e.edit_url&&(0,Q.jsx)(`a`,{href:e.edit_url,target:`_blank`,rel:`noreferrer`,children:b(`Edit`,`ai-rank-suite`)}),(0,Q.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1`,children:[b(`View`,`ai-rank-suite`),(0,Q.jsx)(wt,{size:10})]}),(0,Q.jsx)(`button`,{type:`button`,onClick:()=>t(e.fingerprint),className:`ars-chip`,title:b(`Accept this finding — it stops being reported`,`ai-rank-suite`),children:b(`Accept`,`ai-rank-suite`)})]})]},e.id))})]})]})}var fd,Q,pd,md,hd=o((()=>{C(),fd=u(f(),1),O(),dt(),Vt(),mt(),ad(),Q=_e(),pd={critical:`red`,warning:`yellow`,notice:`blue`},md={critical:`Critical`,warning:`Warning`,notice:`Notice`}})),gd=c({default:()=>bd});function _d({job:e,last:t,running:n,urls:r,onCancel:i,onDiscover:a,cancelling:o}){let s=e||{};if(n){let e;e=s.phase===`sitemap`?s.current_sitemap?S(b(`Discovering — reading sitemap file %1$s from URL %2$s; %3$s files done, %4$s failed`,`ai-rank-suite`),Dd(s.current_sitemap),Ed(s.current_offset),Ed(s.sitemaps_done),Ed(s.sitemaps_failed)):S(b(`Discovering — reading sitemap files; %1$s done, %2$s failed`,`ai-rank-suite`),Ed(s.sitemaps_done),Ed(s.sitemaps_failed)):s.phase===`finish`?b(`Discovering — publishing the run…`,`ai-rank-suite`):S(b(`Discovering — reading posts %1$s / %2$s`,`ai-rank-suite`),Ed(s.done),Ed(s.total));let n=S(b(`%1$s new URLs so far, %2$s confirmed.`,`ai-rank-suite`),Ed(s.found),Ed(s.seen));return{tone:`neutral`,text:e,why:n+` `+b(t?`The numbers on this screen are still the last completed discovery until this run finishes.`:`Nothing is published yet — the inventory appears when this run completes.`,`ai-rank-suite`),progress:s.phase===`posts`&&s.total>0?Math.min(100,Math.round(100*(s.done||0)/s.total)):null,action:b(`Cancel discovery`,`ai-rank-suite`),onAction:i,busy:o}}if(t&&t.complete===!0){let e=S(b(`%1$s URLs from posts, the translation plugin and %2$s sitemap files; %3$s URLs no longer on the site were removed.`,`ai-rank-suite`),Ed(t.urls??r),Ed(t.sitemaps_done),Ed(t.removed));return s.state===`cancelled`&&(s.started||0)>(t.ended||0)&&(e+=` `+S(b(`A later discovery was cancelled on %s; the inventory is unchanged.`,`ai-rank-suite`),Td(s.ended))),{tone:`good`,text:S(b(`Fully discovered on %s`,`ai-rank-suite`),Td(t.ended)),why:e}}return t&&t.complete===!1?{tone:`bad`,text:S(x(`Incomplete — %1$s sitemap file failed, %2$s URLs skipped`,`Incomplete — %1$s sitemap files failed, %2$s URLs skipped`,Number(t.sitemaps_failed)||0,`ai-rank-suite`),Ed(t.sitemaps_failed),Ed(t.skipped_urls)),why:S(b(`The run on %s published what it found and removed nothing — a partial run cannot tell a vanished URL from an unread sitemap. Fix the files below, then discover again; the last complete inventory stays until a run finishes without failures.`,`ai-rank-suite`),Td(t.ended)),failed:Array.isArray(t.failed)?t.failed:[],action:b(`Discover again`,`ai-rank-suite`),onAction:a}:s.state===`cancelled`?{tone:`warning`,text:S(b(`Discovery cancelled on %s — no complete discovery on record.`,`ai-rank-suite`),Td(s.ended)),why:b(`Nothing from the cancelled run was published. Discover again to get a verified inventory.`,`ai-rank-suite`),action:b(`Discover again`,`ai-rank-suite`),onAction:a}:r>0?{tone:`warning`,text:b(`Discovered before completeness was tracked — whether this inventory is complete is unknown.`,`ai-rank-suite`),why:b(`Discover again to get a verified inventory: the run reports every sitemap file it read and every one it could not.`,`ai-rank-suite`),action:b(`Discover again`,`ai-rank-suite`),onAction:a}:null}function vd({job:e,last:t,running:n,scanned:r}){let i=e||{};if(n)return i.phase===`publish`?{tone:`info`,text:b(`Rescan complete — publishing the new scores in chunks; the numbers above switch when the last chunk lands`,`ai-rank-suite`)}:{tone:`info`,text:i.rescan?b(`Rescan running — the numbers above are from the last completed scan until it finishes`,`ai-rank-suite`):b(`First scan running — each URL is scored as soon as it has been fetched, so the averages move with it`,`ai-rank-suite`)};if(t){let e=S(b(`Scores from the scan completed on %1$s — %2$s URLs fetched, %3$s failed.`,`ai-rank-suite`),Td(t.ended),Ed(t.done),Ed(t.failed));return i.state===`cancelled`&&(i.started||0)>(t.ended||0)&&(e+=` `+b(`A later scan was cancelled; the published scores are unchanged.`,`ai-rank-suite`)),{tone:`good`,text:e}}return i.state===`cancelled`?{tone:`warning`,text:b(`The scan was cancelled before it completed — the scores shown are partial. Rescan to get a consistent set.`,`ai-rank-suite`)}:r>0?{tone:`warning`,text:b(`These scores are not from a completed scan — the last scan was interrupted or predates scan tracking. Rescan to get a consistent set.`,`ai-rank-suite`)}:null}function yd({verdict:e}){if(!e)return null;let{progress:t,failed:n,...r}=e;return(0,Sd.jsxs)(ya,{...r,children:[t!=null&&(0,Sd.jsx)(`div`,{className:`mt-2`,style:{maxWidth:360},children:(0,Sd.jsx)(Be,{value:t})}),Array.isArray(n)&&n.length>0&&(0,Sd.jsx)(`ul`,{className:`m-0 mt-2 p-0 grid gap-1`,style:{listStyle:`none`},children:n.map(e=>(0,Sd.jsxs)(`li`,{className:`text-[12px] flex gap-2 flex-wrap items-baseline`,children:[(0,Sd.jsx)(j,{tone:`serious`,children:b(`Failed`,`ai-rank-suite`)}),(0,Sd.jsx)(`code`,{className:`ars-mono`,style:{wordBreak:`break-all`},children:e.url}),(0,Sd.jsx)(`span`,{style:{color:`var(--ars-ink-2)`},children:e.error})]},e.url))})]})}function bd(){let[e,t]=(0,xd.useState)(null),[n,r]=(0,xd.useState)([]),[i,a]=(0,xd.useState)(0),[o,s]=(0,xd.useState)(1),[c,l]=(0,xd.useState)(``),[u,d]=(0,xd.useState)(``),[f,p]=(0,xd.useState)(`id`),[m,h]=(0,xd.useState)(``),[g,_]=(0,xd.useState)(null),[v,y]=(0,xd.useState)(``),[C,w]=(0,xd.useState)(``),T=(0,xd.useRef)(!1),E=(0,xd.useCallback)(()=>D.get(`/urls/summary`).then(t).catch(e=>_(e.message)),[]),ee=e?.discover?.state===`running`||e?.scan?.state===`running`;(0,xd.useEffect)(()=>{if(!ee||v)return;let e=setInterval(E,4e3);return()=>clearInterval(e)},[ee,v,E]);let te=async(e,t)=>{w(e),_(null);try{await D.post(t,{}),await E()}catch(e){_(e.message)}finally{w(``)}},ne=(0,xd.useCallback)(async()=>{try{let e=new URLSearchParams({lang:c,issue:u,orderby:f,search:m,page:String(o),per_page:`50`}),t=await fetch(`${window.airanksuiteData.restUrl}/urls?${e}`,{headers:{"X-WP-Nonce":window.airanksuiteData.nonce},credentials:`same-origin`});if(!t.ok)throw Error(S(b(`Request failed (%s)`,`ai-rank-suite`),t.status));a(Number(t.headers.get(`X-WP-Total`)||0)),r(await t.json())}catch(e){_(e.message)}},[c,u,f,m,o]);(0,xd.useEffect)(()=>{E()},[E]),(0,xd.useEffect)(()=>{ne()},[ne]);let re=async(e,t,n,r={})=>{if(!T.current){T.current=!0,y(e),_(null);try{let e=await D.post(t,r);E();let i=0;for(;e.state===`running`;)(e.busy||e.error)&&await wd(2e3),e=await D.post(n,{}),++i%5==0&&E();await E(),await ne()}catch(e){_(e.message)}finally{T.current=!1,y(``)}}};if(!e)return g?(0,Sd.jsx)(`div`,{className:`ars-page`,children:(0,Sd.jsx)(M,{tone:`serious`,children:S(b(`URL inventory could not be loaded: %s`,`ai-rank-suite`),g)})}):(0,Sd.jsx)(rt,{blocks:3,label:b(`Loading URLs`,`ai-rank-suite`)});let O=e,ie=O.urls?Math.round(100*O.scanned/O.urls):0,ae=O.discover?.state===`running`||v===`discover`,oe=O.scan?.state===`running`||v===`scan`,se=()=>re(`discover`,`/urls/discover/start`,`/urls/discover/tick`),ce=_d({job:O.discover,last:O.discover_last||null,running:ae,urls:O.urls,onCancel:()=>te(`discover`,`/urls/discover/cancel`),onDiscover:se,cancelling:C===`discover`}),le=vd({job:O.scan,last:O.scan_last||null,running:oe,scanned:O.scanned});if(O.urls===0&&ae&&ce)return(0,Sd.jsxs)(`div`,{className:`ars-page`,children:[g&&(0,Sd.jsx)(M,{tone:`serious`,children:g}),(0,Sd.jsx)(yd,{verdict:ce})]});if(O.urls===0&&!ae)return(0,Sd.jsxs)(`div`,{className:`ars-page`,children:[g&&(0,Sd.jsx)(M,{tone:`serious`,children:g}),(0,Sd.jsx)(Xo,{badge:b(`Not discovered yet`,`ai-rank-suite`),ringLabel:b(`URL score`,`ai-rank-suite`),title:b(`No URL of this site has been inventoried yet.`,`ai-rank-suite`),why:O.languages>1?S(b(`This site serves %1$d languages%2$s. The post list sees one object per page; the URL inventory sees every language version as its own URL — discovered from posts, the translation plugin and the sitemap, then fetched and read as rendered HTML.`,`ai-rank-suite`),O.languages,O.plugin?S(b(` through %s`,`ai-rank-suite`),O.plugin):``):b(`The URL inventory lists every indexable URL a crawler would find — from posts and the sitemap — and scans each one as rendered HTML: title, description, H1, canonical, hreflang, robots and word count, scored per URL.`,`ai-rank-suite`),action:b(`Discover URLs`,`ai-rank-suite`),onAction:se,busy:v===`discover`,stats:[{label:b(`URLs`,`ai-rank-suite`)},{label:b(`Languages`,`ai-rank-suite`)},{label:b(`Scanned`,`ai-rank-suite`)},{label:b(`Indexable`,`ai-rank-suite`)}],previews:[{title:b(`Per language`,`ai-rank-suite`),text:b(`URLs, scanned share, average SEO and GEO, missing hreflang and broken pages — one row per language.`,`ai-rank-suite`)},{title:b(`Every URL, filtered`,`ai-rank-suite`),text:b(`By language, by issue, by post type; sorted by the weakest score first; server-paged.`,`ai-rank-suite`)},{title:b(`What the page really says`,`ai-rank-suite`),text:b(`The scan reads the rendered HTML, not the database — a translated title that never made it into the page is caught here.`,`ai-rank-suite`)}]})]});let ue=O.avg_seo===null?`neutral`:O.avg_seo>=80?`good`:O.avg_seo>=50?`warning`:`bad`,de=[...O.by_lang||[]].filter(e=>e.avg_seo!==null).sort((e,t)=>e.avg_seo-t.avg_seo)[0],fe=(ce&&ce.tone===`bad`?{tone:`bad`,label:b(`Incomplete inventory`,`ai-rank-suite`)}:ce&&ce.tone===`warning`?{tone:`warning`,label:b(`Completeness unknown`,`ai-rank-suite`)}:null)||{tone:ue,label:O.scanned===0?b(`Discovered, not scanned`,`ai-rank-suite`):b(ue===`good`?`Healthy`:ue===`warning`?`Room to improve`:`Needs attention`,`ai-rank-suite`)};return(0,Sd.jsxs)(`div`,{className:`ars-page`,children:[g&&(0,Sd.jsx)(M,{tone:`serious`,children:g}),(0,Sd.jsx)(yd,{verdict:ce}),(0,Sd.jsxs)(`div`,{className:`ars-hero`,children:[(0,Sd.jsx)(`div`,{className:`ars-hero-ring`,children:(0,Sd.jsx)(Pe,{value:O.avg_seo,size:132,label:b(`Avg URL SEO`,`ai-rank-suite`),onLight:!0})}),(0,Sd.jsxs)(`div`,{className:`ars-hero-body`,children:[(0,Sd.jsx)(`span`,{className:`ars-hero-badge is-${fe.tone}`,children:fe.label}),(0,Sd.jsxs)(`h2`,{className:`ars-hero-title`,children:[S(b(`%1$s URLs %2$s — %3$s scanned`,`ai-rank-suite`),Ed(O.urls),O.languages>1?S(x(`in %d language`,`in %d languages`,O.languages,`ai-rank-suite`),O.languages):b(`in one language`,`ai-rank-suite`),Ed(O.scanned)),O.avg_seo===null?`.`:S(b(`, average SEO %1$d, GEO %2$d.`,`ai-rank-suite`),O.avg_seo,O.avg_geo)]}),(0,Sd.jsx)(`p`,{className:`ars-hero-why`,children:O.scanned===0?b(`Scanning fetches every URL as a visitor and reads what the page says about itself — title, description, H1, canonical, hreflang, robots, words. On a large site it runs in slices; you can leave and it continues.`,`ai-rank-suite`):de&&O.by_lang.length>1?S(b(`%1$s is the weakest language at SEO %2$d%3$s. Every language is scored with the same rubric.`,`ai-rank-suite`),de.label,de.avg_seo,de.hreflang_missing?S(b(` with %s URLs missing hreflang`,`ai-rank-suite`),de.hreflang_missing.toLocaleString()):``):b(`Scores are per URL and per language, from the rendered page — the same rubric everywhere.`,`ai-rank-suite`)}),(0,Sd.jsxs)(`div`,{className:`ars-hero-actions`,children:[(0,Sd.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:()=>re(`scan`,`/urls/scan/start`,`/urls/scan/tick`,{rescan:O.scanned>=O.urls}),disabled:!!v||oe,children:oe?S(O.scan?.rescan?b(`Rescanning… %1$s / %2$s`,`ai-rank-suite`):b(`Scanning… %1$s / %2$s`,`ai-rank-suite`),Ed(O.scan?.done),Ed(O.scan?.total??O.urls)):O.scanned===0?b(`Scan all URLs`,`ai-rank-suite`):O.scanned<O.urls?S(b(`Scan %s unscanned`,`ai-rank-suite`),Ed(O.urls-O.scanned)):b(`Rescan everything`,`ai-rank-suite`)}),oe&&(0,Sd.jsx)(A,{variant:`ghost`,busy:C===`scan`,onClick:()=>te(`scan`,`/urls/scan/cancel`),children:b(`Cancel scan`,`ai-rank-suite`)}),!ae&&(0,Sd.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,onClick:se,disabled:!!v,children:b(`Discover again`,`ai-rank-suite`)}),oe&&O.scan?.total>0&&(0,Sd.jsx)(`span`,{style:{minWidth:160},children:(0,Sd.jsx)(Be,{value:Math.round(100*(O.scan.done||0)/Math.max(1,O.scan.total))})})]}),le&&(0,Sd.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:le.tone===`warning`?`var(--ars-warning)`:`var(--ars-ink-2)`},children:le.text})]}),(0,Sd.jsx)(`div`,{className:`ars-hero-stats`,children:[{label:b(`URLs`,`ai-rank-suite`),value:O.urls.toLocaleString()},{label:b(`Languages`,`ai-rank-suite`),value:O.languages},{label:b(`Scanned`,`ai-rank-suite`),value:`${ie}%`},{label:b(`Indexable`,`ai-rank-suite`),value:O.indexable.toLocaleString()}].map(e=>(0,Sd.jsxs)(`div`,{className:`ars-hero-stat`,style:{cursor:`default`},children:[(0,Sd.jsx)(`span`,{className:`ars-hero-stat-v`,children:e.value}),(0,Sd.jsx)(`span`,{className:`ars-hero-stat-l`,children:e.label})]},e.label))})]}),O.by_lang.length>0&&(0,Sd.jsx)(k,{title:b(`By language`,`ai-rank-suite`),subtitle:b(`Click a language to filter the list — the same rubric on every one`,`ai-rank-suite`),flush:!0,children:(0,Sd.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Sd.jsxs)(`table`,{className:`ars-table`,children:[(0,Sd.jsx)(`thead`,{children:(0,Sd.jsxs)(`tr`,{children:[(0,Sd.jsx)(`th`,{children:b(`Language`,`ai-rank-suite`)}),(0,Sd.jsx)(`th`,{className:`is-num`,children:b(`URLs`,`ai-rank-suite`)}),(0,Sd.jsx)(`th`,{className:`is-num`,children:b(`Scanned`,`ai-rank-suite`)}),(0,Sd.jsx)(`th`,{className:`is-num`,children:b(`Indexable`,`ai-rank-suite`)}),(0,Sd.jsx)(`th`,{className:`is-num`,children:b(`SEO`,`ai-rank-suite`)}),(0,Sd.jsx)(`th`,{className:`is-num`,children:b(`GEO`,`ai-rank-suite`)}),(0,Sd.jsx)(`th`,{className:`is-num`,children:b(`Hreflang missing`,`ai-rank-suite`)}),(0,Sd.jsx)(`th`,{className:`is-num`,children:b(`Broken`,`ai-rank-suite`)})]})}),(0,Sd.jsx)(`tbody`,{children:O.by_lang.map(e=>(0,Sd.jsxs)(`tr`,{onClick:()=>{l(c===e.lang?``:e.lang),s(1)},style:{cursor:`pointer`},className:c===e.lang?`is-selected`:``,children:[(0,Sd.jsxs)(`td`,{className:`font-medium`,children:[e.label,` `,e.lang&&(0,Sd.jsx)(`code`,{className:`ars-mono t-caption`,children:e.lang})]}),(0,Sd.jsx)(`td`,{className:`is-num`,children:e.urls.toLocaleString()}),(0,Sd.jsx)(`td`,{className:`is-num`,children:e.scanned.toLocaleString()}),(0,Sd.jsx)(`td`,{className:`is-num`,children:e.indexable.toLocaleString()}),(0,Sd.jsx)(`td`,{className:`is-num`,children:(0,Sd.jsx)(Fe,{value:e.avg_seo})}),(0,Sd.jsx)(`td`,{className:`is-num`,children:(0,Sd.jsx)(Fe,{value:e.avg_geo})}),(0,Sd.jsx)(`td`,{className:`is-num`,style:e.hreflang_missing?{color:`var(--ars-warning)`,fontWeight:600}:void 0,children:e.hreflang_missing||`—`}),(0,Sd.jsx)(`td`,{className:`is-num`,style:e.broken?{color:`var(--ars-serious)`,fontWeight:600}:void 0,children:e.broken||`—`})]},e.lang))})]})})}),(0,Sd.jsxs)(k,{title:b(`URLs`,`ai-rank-suite`),subtitle:S(b(`%s on this filter — click a row’s Edit to fix the page it renders`,`ai-rank-suite`),i.toLocaleString()),action:(0,Sd.jsx)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:(0,Sd.jsx)(qe,{label:b(`Sort`,`ai-rank-suite`),value:f,onChange:p,options:[{id:`id`,label:b(`Discovered`,`ai-rank-suite`)},{id:`seo`,label:b(`Weakest SEO`,`ai-rank-suite`)},{id:`geo`,label:b(`Weakest GEO`,`ai-rank-suite`)},{id:`words`,label:b(`Fewest words`,`ai-rank-suite`)}]})}),flush:!0,children:[(0,Sd.jsx)(`div`,{className:`p-3 grid gap-2`,style:{borderBottom:`1px solid var(--ars-border)`},children:(0,Sd.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Sd.jsx)(qe,{label:b(`Issue`,`ai-rank-suite`),value:u,onChange:e=>{d(e),s(1)},options:[{id:``,label:b(`All`,`ai-rank-suite`)},...Object.entries(Cd).map(([e,t])=>({id:e,label:t}))]}),(0,Sd.jsx)(`input`,{type:`search`,placeholder:b(`Search URL or title…`,`ai-rank-suite`),value:m,onChange:e=>{h(e.target.value),s(1)},style:{minWidth:220}})]})}),(0,Sd.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Sd.jsxs)(`table`,{className:`ars-table`,children:[(0,Sd.jsx)(`thead`,{children:(0,Sd.jsxs)(`tr`,{children:[(0,Sd.jsx)(`th`,{children:b(`URL`,`ai-rank-suite`)}),(0,Sd.jsx)(`th`,{style:{width:70},children:b(`Lang`,`ai-rank-suite`)}),(0,Sd.jsx)(`th`,{className:`is-num`,style:{width:60},children:b(`HTTP`,`ai-rank-suite`)}),(0,Sd.jsx)(`th`,{className:`is-num`,style:{width:70},children:b(`Words`,`ai-rank-suite`)}),(0,Sd.jsx)(`th`,{className:`is-num`,style:{width:60},children:b(`SEO`,`ai-rank-suite`)}),(0,Sd.jsx)(`th`,{className:`is-num`,style:{width:60},children:b(`GEO`,`ai-rank-suite`)}),(0,Sd.jsx)(`th`,{children:b(`Issues`,`ai-rank-suite`)}),(0,Sd.jsx)(`th`,{style:{width:90}})]})}),(0,Sd.jsx)(`tbody`,{children:n.map(e=>(0,Sd.jsxs)(`tr`,{children:[(0,Sd.jsxs)(`td`,{style:{maxWidth:420},children:[(0,Sd.jsx)(`div`,{className:`ars-mono text-[12px] truncate`,title:e.url,children:e.url.replace(/^https?:\/\/[^/]+/,``)||`/`}),e.title&&(0,Sd.jsx)(`div`,{className:`t-caption truncate`,children:e.title})]}),(0,Sd.jsx)(`td`,{children:(0,Sd.jsx)(`code`,{className:`ars-mono text-[11.5px]`,children:e.lang||`—`})}),(0,Sd.jsx)(`td`,{className:`is-num`,children:e.scanned_at?(0,Sd.jsx)(j,{tone:e.status===200?`good`:`serious`,children:e.status||`×`}):(0,Sd.jsx)(`span`,{className:`is-muted`,children:`—`})}),(0,Sd.jsx)(`td`,{className:`is-num`,children:e.scanned_at?e.words.toLocaleString():`—`}),(0,Sd.jsx)(`td`,{className:`is-num`,children:(0,Sd.jsx)(Fe,{value:e.seo_score})}),(0,Sd.jsx)(`td`,{className:`is-num`,children:(0,Sd.jsx)(Fe,{value:e.geo_score})}),(0,Sd.jsx)(`td`,{children:(0,Sd.jsxs)(`span`,{className:`flex flex-wrap gap-1`,children:[(e.issues||[]).slice(0,4).map(e=>(0,Sd.jsx)(j,{tone:[`noindex`,`canonical_foreign`,`unreachable`].includes(e)?`serious`:`warning`,children:Cd[e]||e},e)),(e.issues||[]).length>4&&(0,Sd.jsxs)(`span`,{className:`t-caption`,children:[`+`,e.issues.length-4]})]})}),(0,Sd.jsx)(`td`,{className:`is-num`,children:(0,Sd.jsxs)(`span`,{className:`ars-rowacts`,style:{opacity:1},children:[e.edit_url&&(0,Sd.jsx)(`a`,{href:e.edit_url,target:`_blank`,rel:`noreferrer`,children:b(`Edit`,`ai-rank-suite`)}),(0,Sd.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,children:b(`View`,`ai-rank-suite`)})]})})]},e.id))})]})}),i>50&&(0,Sd.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2`,children:[(0,Sd.jsx)(`span`,{className:`t-caption`,children:S(b(`Page %1$s of %2$s`,`ai-rank-suite`),o,Math.ceil(i/50))}),(0,Sd.jsxs)(`span`,{className:`flex gap-2`,children:[(0,Sd.jsx)(A,{variant:`ghost`,disabled:o<=1,onClick:()=>s(o-1),children:b(`← Prev`,`ai-rank-suite`)}),(0,Sd.jsx)(A,{variant:`ghost`,disabled:o>=Math.ceil(i/50),onClick:()=>s(o+1),children:b(`Next →`,`ai-rank-suite`)})]})]})]})]})}var xd,Sd,Cd,wd,Td,Ed,Dd,Od=o((()=>{xd=u(f(),1),C(),O(),dt(),xa(),Qo(),Sd=_e(),Cd={noindex:b(`Noindex`,`ai-rank-suite`),no_title:b(`No title`,`ai-rank-suite`),title_long:b(`Title too long`,`ai-rank-suite`),no_desc:b(`No description`,`ai-rank-suite`),no_h1:b(`No H1`,`ai-rank-suite`),many_h1:b(`Several H1`,`ai-rank-suite`),canonical_foreign:b(`Canonical elsewhere`,`ai-rank-suite`),hreflang_missing:b(`Hreflang missing`,`ai-rank-suite`),thin:b(`Thin (<300 words)`,`ai-rank-suite`),html_lang_mismatch:b(`html lang differs`,`ai-rank-suite`),unreachable:b(`Unreachable`,`ai-rank-suite`)},wd=e=>new Promise(t=>setTimeout(t,e)),Td=e=>new Date((Number(e)||0)*1e3).toLocaleString(),Ed=e=>(Number(e)||0).toLocaleString(),Dd=e=>String(e||``).replace(/^https?:\/\/[^/]+/,``)||`/`})),kd=c({default:()=>Ad});function Ad(){let[e,t]=(0,jd.useState)(null),[n,r]=(0,jd.useState)(!1),[i,a]=(0,jd.useState)(null);(0,jd.useEffect)(()=>{D.get(`/audit/site-tests`).then(t).catch(e=>a(e.message))},[]);let o=async()=>{r(!0),a(null);try{t(await D.post(`/audit/site-tests`))}catch(e){a(e.message)}finally{r(!1)}};if(!e)return(0,Md.jsx)(Ce,{error:i});let s=e.tests||[],c=e.groups||{},l=e.counts||{fail:0,warn:0,pass:0,info:0};return s.length?(0,Md.jsxs)(`div`,{className:`ars-page`,children:[i&&(0,Md.jsx)(M,{tone:`serious`,children:i}),(0,Md.jsx)(ya,{tone:l.fail>0?`bad`:l.warn>0?`warning`:`good`,text:l.fail>0?S(x(`%1$d of %2$d site checks fails.`,`%1$d of %2$d site checks fail.`,l.fail,`ai-rank-suite`),l.fail,s.length):l.warn>0?S(x(`No site check fails; %d warns.`,`No site check fails; %d warn.`,l.warn,`ai-rank-suite`),l.warn):S(b(`All %d site checks pass.`,`ai-rank-suite`),s.length),why:l.fail>0?b(`A failing site check affects every page at once — fix these before any per-page work.`,`ai-rank-suite`):l.warn>0?b(`Warnings are worth a look but block nothing.`,`ai-rank-suite`):b(`Run again after changing hosting, permalinks or the theme.`,`ai-rank-suite`)}),(0,Md.jsxs)(k,{icon:(0,Md.jsx)(Pt,{size:16}),title:b(`Site tests`,`ai-rank-suite`),subtitle:b(`The setup itself — the faults that belong to no single page`,`ai-rank-suite`),action:(0,Md.jsxs)(A,{variant:`ghost`,onClick:o,busy:n,children:[(0,Md.jsx)(Tt,{size:13}),b(`Run again`,`ai-rank-suite`)]}),children:[(0,Md.jsxs)(`div`,{className:`flex gap-5 flex-wrap items-center`,children:[(0,Md.jsx)(Se,{value:e.score,label:b(`Site setup`,`ai-rank-suite`)}),(0,Md.jsx)(`div`,{className:`flex-1 min-w-[300px]`,children:(0,Md.jsx)(Ee,{columns:4,metrics:[{id:`fail`,label:b(`Failing`,`ai-rank-suite`),hint:b(`These cost traffic today rather than eventually.`,`ai-rank-suite`),value:l.fail,accent:l.fail?`var(--ars-c-red-ink)`:void 0},{id:`warn`,label:b(`Worth fixing`,`ai-rank-suite`),hint:b(`Not urgent, but each one is a small leak.`,`ai-rank-suite`),value:l.warn,accent:l.warn?`var(--ars-accent)`:void 0},{id:`pass`,label:b(`Passing`,`ai-rank-suite`),value:l.pass,sub:S(b(`%s tests run`,`ai-rank-suite`),s.length)},(l.info??0)>0&&{id:`info`,label:b(`Noted`,`ai-rank-suite`),hint:b(`Readings rather than verdicts: nothing to fix, but worth knowing. They do not affect the score.`,`ai-rank-suite`),value:l.info,sub:b(`not scored`,`ai-rank-suite`)}].filter(Boolean)})})]}),e.ran_at>0&&(0,Md.jsx)(`p`,{className:`m-0 mt-3 t-caption`,children:S(b(`Last run %s.`,`ai-rank-suite`),new Date(e.ran_at*1e3).toLocaleString())})]}),Object.entries(c).map(([e,t])=>{let n=s.filter(t=>t.group===e);if(!n.length)return null;let r=n.filter(e=>e.status===`fail`||e.status===`warn`);return(0,Md.jsx)(k,{title:t,action:r.length===0?(0,Md.jsxs)(j,{tone:`good`,children:[`✓ `,b(`All good`,`ai-rank-suite`)]}):(0,Md.jsx)(j,{tone:n.some(e=>e.status===`fail`)?`serious`:`warning`,children:S(x(`%d to fix`,`%d to fix`,r.length,`ai-rank-suite`),r.length)}),flush:!0,children:(0,Md.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Md.jsxs)(`table`,{className:`ars-table`,children:[(0,Md.jsx)(`thead`,{children:(0,Md.jsxs)(`tr`,{children:[(0,Md.jsx)(`th`,{style:{width:34}}),(0,Md.jsx)(`th`,{style:{width:260},children:b(`Test`,`ai-rank-suite`)}),(0,Md.jsx)(`th`,{style:{width:260},children:b(`What it found`,`ai-rank-suite`)}),(0,Md.jsx)(`th`,{children:b(`Why it matters`,`ai-rank-suite`)})]})}),(0,Md.jsx)(`tbody`,{children:n.map(e=>{let t=Nd[e.status]||Nd.info;return(0,Md.jsxs)(`tr`,{children:[(0,Md.jsx)(`td`,{style:{width:34},children:(0,Md.jsx)(`span`,{"aria-hidden":!0,className:`inline-flex items-center justify-center`,style:{width:17,height:17,borderRadius:`var(--ars-r-xs)`,background:t.bg,color:t.tone,fontSize:11,fontWeight:700},children:t.glyph})}),(0,Md.jsx)(`td`,{style:{fontWeight:e.status===`pass`?400:600},children:e.label}),(0,Md.jsx)(`td`,{style:{color:`var(--ars-ink-2)`},children:e.value}),(0,Md.jsx)(`td`,{style:{color:`var(--ars-ink-2)`},children:e.fix})]},e.id)})})]})})},e)})]}):(0,Md.jsxs)(`div`,{className:`ars-page`,children:[i&&(0,Md.jsx)(M,{tone:`serious`,children:i}),(0,Md.jsx)(Xo,{badge:b(`Not run yet`,`ai-rank-suite`),ringLabel:b(`Site health`,`ai-rank-suite`),title:b(`The site itself has not been checked yet.`,`ai-rank-suite`),why:b(`Twenty-one checks on the setup rather than on any page: robots.txt that blocks everything, a default tagline, missing HTTPS, discouraged search engines, no organisation identity, sitemaps that do not resolve. Fast, local, and the faults it finds are the ones no page score can see.`,`ai-rank-suite`),action:b(`Run the site tests`,`ai-rank-suite`),onAction:o,busy:n,stats:[{label:b(`Passing`,`ai-rank-suite`)},{label:b(`Warnings`,`ai-rank-suite`)},{label:b(`Failing`,`ai-rank-suite`)},{label:b(`Checks`,`ai-rank-suite`)}],previews:[{title:b(`Grouped by area`,`ai-rank-suite`),text:b(`Indexability, identity, security, structure — each with its checks and the fix in one sentence.`,`ai-rank-suite`)},{title:b(`Health gauge`,`ai-rank-suite`),text:b(`The share of checks passing, weighted so a blocker outweighs a notice.`,`ai-rank-suite`)},{title:b(`Re-run any time`,`ai-rank-suite`),text:b(`Cheap enough to run after every settings change; the audit alerts can mail you when a check flips.`,`ai-rank-suite`)}]}),(0,Md.jsx)(k,{icon:(0,Md.jsx)(Pt,{size:16}),title:b(`Site tests`,`ai-rank-suite`),subtitle:b(`Twenty-one checks on the site itself, not on its pages`,`ai-rank-suite`),children:(0,Md.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Md.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Some faults belong to no page: a robots.txt that blocks everything, a tagline still reading “Just another WordPress site”, search engine visibility switched off in Settings → Reading. Each one defeats the work done on every page, and none of them shows up in a per-page report.`,`ai-rank-suite`)}),(0,Md.jsx)(`div`,{children:(0,Md.jsxs)(A,{onClick:o,busy:n,children:[(0,Md.jsx)(Tt,{size:13}),b(`Run the tests`,`ai-rank-suite`)]})})]})})]})}var jd,Md,Nd,Pd=o((()=>{jd=u(f(),1),C(),O(),Qo(),xa(),dt(),Vt(),Md=_e(),Nd={pass:{glyph:`✓`,tone:`var(--ars-good)`,bg:`var(--ars-good-tonal)`},warn:{glyph:`!`,tone:`var(--ars-warning)`,bg:`var(--ars-warning-tonal)`},fail:{glyph:`✕`,tone:`var(--ars-serious)`,bg:`var(--ars-serious-tonal)`},info:{glyph:`i`,tone:`var(--ars-ink-3)`,bg:`var(--ars-surface-3)`}}}));function Fd({refreshKey:e}){let[t,n]=(0,Id.useState)(null),[r,i]=(0,Id.useState)(1),[a,o]=(0,Id.useState)({}),[s,c]=(0,Id.useState)(``),[l,u]=(0,Id.useState)(null),d=()=>D.get(`/autopilot/proposals?page=${r}&per_page=25`).then(e=>{n(e),o(Object.fromEntries(e.items.map(e=>[`${e.post_id}:${e.task}`,e.task===`faq`?JSON.stringify(e.proposal,null,1):e.proposal])))}).catch(e=>u(e.message));if((0,Id.useEffect)(()=>{d()},[r,e]),!t||t.total===0)return null;let f=async(e,t)=>{let n=`${e.post_id}:${e.task}`;c(n+t),u(null);try{if(t===`apply`){let t=a[n];if(e.task===`faq`)try{t=JSON.parse(t)}catch{throw Error(b(`The FAQ list is not valid JSON — fix it or reject.`,`ai-rank-suite`))}await D.post(`/autopilot/proposals/apply`,{post_id:e.post_id,task:e.task,value:t})}else await D.post(`/autopilot/proposals/reject`,{post_id:e.post_id,task:e.task});await d()}catch(e){u(e.message)}finally{c(``)}},p=Math.max(1,Math.ceil(t.total/25));return(0,Ld.jsxs)(k,{title:b(`Proposals waiting for review`,`ai-rank-suite`),subtitle:b(`What the last suggest/approve runs parked. Nothing here is live until you apply it — as proposed, or edited.`,`ai-rank-suite`),action:(0,Ld.jsxs)(j,{tone:`warning`,children:[t.total.toLocaleString(),` `,b(`open`,`ai-rank-suite`)]}),children:[l&&(0,Ld.jsx)(M,{tone:`serious`,children:l}),(0,Ld.jsx)(`div`,{className:`grid gap-2`,children:t.items.map(e=>{let t=`${e.post_id}:${e.task}`;return(0,Ld.jsxs)(`div`,{className:`ars-review-field`,children:[(0,Ld.jsxs)(`div`,{className:`flex items-center justify-between gap-2 flex-wrap`,children:[(0,Ld.jsxs)(`span`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Ld.jsx)(j,{tone:`brand`,children:e.task}),(0,Ld.jsx)(`a`,{href:`#/content/${e.post_id}`,className:`font-semibold text-[13px]`,children:e.title||`#${e.post_id}`})]}),(0,Ld.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Ld.jsx)(A,{variant:`ghost`,busy:s===t+`reject`,onClick:()=>f(e,`reject`),children:b(`Reject`,`ai-rank-suite`)}),(0,Ld.jsx)(A,{busy:s===t+`apply`,onClick:()=>f(e,`apply`),children:b(`Apply`,`ai-rank-suite`)})]})]}),(0,Ld.jsxs)(`div`,{className:`ars-review-orig`,children:[(0,Ld.jsxs)(`span`,{className:`t-caption`,children:[b(`Now`,`ai-rank-suite`),`:`]}),` `,e.task===`faq`?`${Array.isArray(e.current)?e.current.length:0} ${b(`FAQ items`,`ai-rank-suite`)}`:e.current||(0,Ld.jsx)(`em`,{style:{color:`var(--ars-ink-3)`},children:b(`empty`,`ai-rank-suite`)})]}),(0,Ld.jsx)(`textarea`,{rows:e.task===`faq`?6:2,value:a[t]||``,onChange:e=>o({...a,[t]:e.target.value})})]},t)})}),p>1&&(0,Ld.jsxs)(`div`,{className:`flex items-center justify-between gap-3 mt-3`,children:[(0,Ld.jsxs)(`span`,{className:`t-caption`,children:[b(`Page`,`ai-rank-suite`),` `,r,` `,b(`of`,`ai-rank-suite`),` `,p]}),(0,Ld.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,Ld.jsx)(A,{variant:`ghost`,disabled:r<=1,onClick:()=>i(e=>e-1),children:`‹`}),(0,Ld.jsx)(A,{variant:`ghost`,disabled:r>=p,onClick:()=>i(e=>e+1),children:`›`})]})]})]})}var Id,Ld,Rd=o((()=>{Id=u(f(),1),C(),O(),dt(),Ld=_e()})),zd=c({default:()=>Bd});function Bd(){let[e,t]=(0,Hd.useState)(null),[n,r]=(0,Hd.useState)(!1),[i,a]=(0,Hd.useState)(null),[o,s]=(0,Hd.useState)([`description`,`faq`,`title`]),[c,l]=(0,Hd.useState)(`suggest`),[u,d]=(0,Hd.useState)(0),[f,p]=(0,Hd.useState)(0),m=c===`auto`?`apply`:`draft`,[h,g]=(0,Hd.useState)([]),[_,v]=(0,Hd.useState)(25),[y,C]=(0,Hd.useState)(!1),w=()=>D.get(`/autopilot/status`).then(e=>{t(e),e.running||r(!1)}).catch(e=>a(e.message));if((0,Hd.useEffect)(()=>{w()},[]),(0,Hd.useEffect)(()=>{if(!n&&!e?.running)return;let t=setInterval(w,5e3);return()=>clearInterval(t)},[n,e?.running]),!e)return(0,Ud.jsx)(Ce,{error:i});let T=e.state||{},E=T.total||0,ee=T.done||0,te=E>0?Math.round(ee/E*100):0,ne=async()=>{r(!0),a(null),window.dispatchEvent(new CustomEvent(`airanksuite:working`));try{let e=await D.post(`/autopilot/plan`,{tasks:o,level:c,max_changes:u,budget_usd:f,post_types:h,limit:_});t(e),e.running||r(!1)}catch(e){a(e.message),r(!1)}},re=async()=>{r(!0),a(null);try{let e=await D.post(`/autopilot/resume`);t(e),e.running||r(!1)}catch(e){a(e.message),r(!1)}},O=async()=>{t(await D.post(`/autopilot/cancel`)),r(!1)},ie=async()=>{r(!0),C(!0),a(null);try{let e=await D.post(`/autopilot/undo`,{since:T.started||0});t(e)}catch(e){a(e.message)}finally{r(!1),C(!1)}},ae=e=>s(o.includes(e)?o.filter(t=>t!==e):[...o,e]),oe=e=>g(h.includes(e)?h.filter(t=>t!==e):[...h,e]),se=e.tasks||{},ce=(()=>{if(!e.has_key)return{tone:`warning`,text:b(`No AI engine is connected, so the autopilot has nothing to write with.`,`ai-rank-suite`),why:b(`One key, stored encrypted on your own server, switches it on — descriptions, FAQs and titles across the whole site.`,`ai-rank-suite`),action:b(`Connect an engine`,`ai-rank-suite`),onAction:()=>{window.location.hash=`/ai`}};if(y)return{tone:`neutral`,text:b(`Undoing the last run…`,`ai-rank-suite`),why:b(`Every value the run replaced is being put back exactly as it was.`,`ai-rank-suite`)};if(n||e.running)return{tone:`neutral`,text:S(b(`Writing — %1$d of %2$d AI tasks done.`,`ai-rank-suite`),ee,E),why:b(`The queue runs safely on the server. You can close this tab; stopping keeps everything already written.`,`ai-rank-suite`),action:b(`Stop`,`ai-rank-suite`),onAction:O};if(e.stalled)return{tone:`warning`,text:b(`A previous run was left unfinished.`,`ai-rank-suite`),why:b(`The server queue paused before every planned task finished. Resuming picks up where it left off — nothing already written is repeated.`,`ai-rank-suite`),action:b(`Resume the run`,`ai-rank-suite`),onAction:re};if(o.length===0)return{tone:`neutral`,text:b(`Nothing is selected for the autopilot to write.`,`ai-rank-suite`),why:b(`Turn on at least one task under “What it should write” below.`,`ai-rank-suite`)};let t=o.map(e=>se[e]?.label||e);return{tone:`neutral`,text:S(b(`The next run will write %s for every page missing them.`,`ai-rank-suite`),Wd(t)),why:b(m===`apply`?`Changes apply directly. Every write is logged with the value it replaced, so the whole run can be undone — and it never overwrites something you wrote.`:`Nothing is published — the suggestions are parked on each page for you to accept or ignore.`,`ai-rank-suite`),action:b(`Run the autopilot`,`ai-rank-suite`),onAction:ne}})();return(0,Ud.jsxs)(`div`,{className:`ars-page`,children:[i&&(0,Ud.jsx)(M,{tone:`serious`,children:i}),(0,Ud.jsx)(xe,{tone:ce.tone,text:ce.text,sub:ce.why,action:ce.action,onAction:ce.onAction}),(0,Ud.jsxs)(k,{title:b(`How much the autopilot may do`,`ai-rank-suite`),subtitle:b(`Every level below Controlled auto parks its work for review. Nothing is written to a live page except at the last one.`,`ai-rank-suite`),action:(0,Ud.jsx)(Me,{checked:!!e.killed,onChange:async e=>{try{t(await D.post(`/autopilot/kill`,{on:e}))}catch(e){a(e.message)}},label:b(`Kill switch`,`ai-rank-suite`)}),children:[e.killed&&(0,Ud.jsx)(M,{tone:`serious`,children:b(`The kill switch is on: no run may write to a live page, whatever level is selected. Proposals are still made.`,`ai-rank-suite`)}),(0,Ud.jsx)(`div`,{className:`ars-levels`,children:[{id:`observe`,name:b(`Observe`,`ai-rank-suite`),one:b(`Plans and prices the work`,`ai-rank-suite`),detail:b(`A dry run. Matches the pages, counts the calls and estimates the cost. No model is called and nothing is written.`,`ai-rank-suite`),writes:!1},{id:`suggest`,name:b(`Suggest`,`ai-rank-suite`),one:b(`Writes proposals, not pages`,`ai-rank-suite`),detail:b(`Calls the engine and parks every result beside its page. Nothing on the live site changes until you apply it.`,`ai-rank-suite`),writes:!1},{id:`approve`,name:b(`Approve`,`ai-rank-suite`),one:b(`Proposals plus a review queue`,`ai-rank-suite`),detail:b(`As Suggest, and every proposal lands in the queue below where you apply it — as written or edited — or reject it.`,`ai-rank-suite`),writes:!1},{id:`auto`,name:b(`Controlled auto`,`ai-rank-suite`),one:b(`Writes directly, within limits`,`ai-rank-suite`),detail:b(`Only descriptions, FAQs and titles on pages that had none. Capped per run, logged with the previous value, undoable, stopped instantly by the kill switch.`,`ai-rank-suite`),writes:!0}].map(e=>(0,Ud.jsxs)(`button`,{type:`button`,className:`ars-level${c===e.id?` is-active`:``}${e.writes?` is-writing`:``}`,onClick:()=>l(e.id),"aria-pressed":c===e.id,children:[(0,Ud.jsxs)(`span`,{className:`ars-level-head`,children:[(0,Ud.jsx)(`span`,{className:`ars-level-name`,children:e.name}),(0,Ud.jsx)(`span`,{className:`ars-level-tag${e.writes?` is-writing`:``}`,children:e.writes?b(`writes live`,`ai-rank-suite`):b(`no live writes`,`ai-rank-suite`)})]}),(0,Ud.jsx)(`span`,{className:`ars-level-one`,children:e.one}),(0,Ud.jsx)(`span`,{className:`ars-level-detail`,children:e.detail})]},e.id))}),c===`auto`&&(0,Ud.jsxs)(`div`,{className:`ars-level-policy`,children:[(0,Ud.jsxs)(`label`,{className:`grid gap-1`,children:[(0,Ud.jsx)(`span`,{className:`t-caption`,children:b(`Stop after this many changes (0 = the plan's own limit)`,`ai-rank-suite`)}),(0,Ud.jsx)(`input`,{type:`number`,min:`0`,value:u,onChange:e=>d(Number(e.target.value))})]}),(0,Ud.jsxs)(`label`,{className:`grid gap-1`,children:[(0,Ud.jsx)(`span`,{className:`t-caption`,children:b(`Stop at this spend, USD (0 = the per-job budget)`,`ai-rank-suite`)}),(0,Ud.jsx)(`input`,{type:`number`,min:`0`,step:`0.5`,value:f,onChange:e=>p(Number(e.target.value))})]})]}),(0,Ud.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap mt-1`,children:[(0,Ud.jsx)(A,{onClick:ne,busy:n,disabled:e.running||e.killed===!0&&c===`auto`,children:b(c===`observe`?`Plan and estimate`:c===`auto`?`Run and write`:`Run and propose`,`ai-rank-suite`)}),(0,Ud.jsxs)(`span`,{className:`t-caption`,children:[S(b(`%1$d of %2$d tasks · up to %3$d pages`,`ai-rank-suite`),o.length,Object.keys(se).length,_),h.length>0?` · ${S(x(`%d type`,`%d types`,h.length,`ai-rank-suite`),h.length)}`:` · ${b(`all types`,`ai-rank-suite`)}`]})]})]}),(n||e.running||E>0)&&(0,Ud.jsx)(k,{title:b(`The run`,`ai-rank-suite`),subtitle:b(`What the plan matched, and what has happened to it`,`ai-rank-suite`),children:(0,Ud.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Ud.jsx)(Ee,{columns:4,metrics:[{id:`queued`,label:b(`AI tasks queued`,`ai-rank-suite`),hint:b(`One paid model call per queue item. The queue survives a closed tab and never runs two items at once.`,`ai-rank-suite`),value:E,sub:e.running?b(`server queue active`,`ai-rank-suite`):b(`in the last plan`,`ai-rank-suite`)},{id:`written`,label:b(`Written`,`ai-rank-suite`),hint:b(`Values the engine produced and that were applied or parked, depending on the mode.`,`ai-rank-suite`),value:T.written||0},{id:`skipped`,label:b(`Skipped`,`ai-rank-suite`),hint:b(`These pages already had a value — the autopilot never overwrites a sentence a person wrote.`,`ai-rank-suite`),value:T.skipped||0},{id:`failed`,label:b(`Failed`,`ai-rank-suite`),hint:b(`The engine refused or errored. The page is left untouched and listed below.`,`ai-rank-suite`),value:T.failed||0,accent:T.failed>0?`var(--ars-c-red-ink)`:void 0,sub:T.failed>0?b(`the engine refused`,`ai-rank-suite`):b(`no errors`,`ai-rank-suite`)}]}),(0,Ud.jsxs)(`div`,{children:[(0,Ud.jsx)(`div`,{className:`ars-r-sm overflow-hidden`,style:{height:8,background:`var(--ars-surface-3)`},children:(0,Ud.jsx)(`div`,{style:{width:`${te}%`,height:`100%`,background:`var(--ars-grad)`,transition:`width 320ms cubic-bezier(0.2,0,0,1)`}})}),(0,Ud.jsxs)(`p`,{className:`m-0 mt-1.5 t-caption`,children:[S(b(`%1$d of %2$d AI tasks across %3$d pages`,`ai-rank-suite`),ee,E,T.planned_pages||0),e.running?` — ${S(b(`server queue active · up to %d AI calls planned`,`ai-rank-suite`),T.planned_calls||0)}`:``,T.level?` · ${S(b(`level: %s`,`ai-rank-suite`),T.level)}`:``,T.estimate?.calls?` · ${S(b(`estimated %1$s calls ≈ %2$s`,`ai-rank-suite`),T.estimate.calls,T.estimate.cost)}`:``,T.stopped?` · ${S(b(`stopped: %s`,`ai-rank-suite`),T.stopped.replace(`_`,` `))}`:``]})]})]})}),T.level===`observe`&&T.finished>0&&(0,Ud.jsx)(M,{tone:`neutral`,children:S(b(`Dry run complete: %1$s AI calls across %2$s pages would cost about %3$s. Nothing was called or written. Switch the level to run for real.`,`ai-rank-suite`),(T.total??0).toLocaleString(),(T.planned_pages||0).toLocaleString(),T.estimate?.cost??``)}),(0,Ud.jsx)(Fd,{refreshKey:`${T.finished||0}-${T.done||0}`}),(T.errors||[]).length>0&&(0,Ud.jsxs)(M,{tone:`serious`,children:[T.errors.length,` page`,T.errors.length===1?``:`s`,` failed — most recently “`,T.errors[T.errors.length-1].title,`”:`,` `,T.errors[T.errors.length-1].error]}),(0,Ud.jsx)(k,{title:b(`What the agent changed`,`ai-rank-suite`),subtitle:b(`Every write, with the value that was there before it`,`ai-rank-suite`),action:(e.log||[]).some(e=>e.status===`applied`)&&(0,Ud.jsxs)(A,{variant:`ghost`,onClick:ie,busy:n,children:[(0,Ud.jsx)(Tt,{size:13}),b(`Undo the last run`,`ai-rank-suite`)]}),flush:!0,children:(e.log||[]).length===0?(0,Ud.jsx)(`p`,{className:`m-0 p-5 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Nothing yet. Nothing is written until you press the button.`,`ai-rank-suite`)}):(0,Ud.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Ud.jsxs)(`table`,{className:`ars-table`,children:[(0,Ud.jsx)(`thead`,{children:(0,Ud.jsxs)(`tr`,{children:[(0,Ud.jsx)(`th`,{style:{width:220},children:b(`Page`,`ai-rank-suite`)}),(0,Ud.jsx)(`th`,{className:`is-mid`,children:b(`What`,`ai-rank-suite`)}),(0,Ud.jsx)(`th`,{children:b(`Before`,`ai-rank-suite`)}),(0,Ud.jsx)(`th`,{children:b(`After`,`ai-rank-suite`)}),(0,Ud.jsx)(`th`,{className:`is-mid`,children:b(`Status`,`ai-rank-suite`)})]})}),(0,Ud.jsx)(`tbody`,{children:(e.log||[]).map((e,t)=>(0,Ud.jsxs)(`tr`,{children:[(0,Ud.jsx)(`td`,{className:`truncate`,children:e.title}),(0,Ud.jsx)(`td`,{className:`is-mid`,children:e.task}),(0,Ud.jsx)(`td`,{style:{color:`var(--ars-ink-3)`},children:(0,Ud.jsx)(`span`,{className:`truncate inline-block`,style:{maxWidth:260},children:e.before||`—`})}),(0,Ud.jsx)(`td`,{style:{color:`var(--ars-ink-2)`},children:(0,Ud.jsx)(`span`,{className:`truncate inline-block`,style:{maxWidth:320},children:e.after})}),(0,Ud.jsx)(`td`,{className:`is-mid`,children:(0,Ud.jsx)(j,{tone:e.status===`applied`?`good`:e.status===`undone`?`neutral`:`brand`,children:e.status})})]},t))})]})})}),(0,Ud.jsx)(Oe,{title:b(`What it should write`,`ai-rank-suite`),note:`${S(b(`%1$d of %2$d tasks on`,`ai-rank-suite`),o.length,Object.keys(se).length)} · ${b(m===`apply`?`applies directly`:`proposes only`,`ai-rank-suite`)}${h.length>0?` · ${S(x(`%d type`,`%d types`,h.length,`ai-rank-suite`),h.length)}`:``}`,children:(0,Ud.jsxs)(`div`,{className:`grid gap-4`,children:[(0,Ud.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-2`,children:[(0,Ud.jsxs)(`div`,{children:[(0,Ud.jsx)(`div`,{className:`t-overline mb-2`,children:b(`What it should write`,`ai-rank-suite`)}),(0,Ud.jsx)(`div`,{className:`grid gap-2`,children:Object.entries(se).map(([e,t])=>(0,Ud.jsxs)(`div`,{className:`ars-r-sm px-3 py-2.5`,style:{border:`1px solid var(--ars-border)`,background:`var(--ars-surface)`},children:[(0,Ud.jsx)(Me,{checked:o.includes(e),onChange:()=>ae(e),label:t.label}),(0,Ud.jsx)(`p`,{className:`m-0 mt-1 ml-[48px] text-[12px]`,style:{color:`var(--ars-ink-2)`},children:t.why})]},e))})]}),(0,Ud.jsxs)(`div`,{className:`grid gap-3 content-start`,children:[(0,Ud.jsxs)(`div`,{children:[(0,Ud.jsx)(`div`,{className:`t-overline mb-2`,children:b(`Where`,`ai-rank-suite`)}),(0,Ud.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:(e.post_types||[]).map(e=>(0,Ud.jsx)(`button`,{type:`button`,onClick:()=>oe(e.name),className:`ars-chip${h.includes(e.name)?` is-active`:``}`,children:e.label},e.name))}),(0,Ud.jsx)(`p`,{className:`m-0 mt-1.5 text-[12px]`,style:{color:`var(--ars-ink-3)`},children:h.length===0?b(`Everything, unless you pick a type.`,`ai-rank-suite`):S(x(`%d type selected.`,`%d types selected.`,h.length,`ai-rank-suite`),h.length)})]}),(0,Ud.jsxs)(`label`,{className:`grid gap-1.5`,children:[(0,Ud.jsx)(`span`,{className:`t-overline`,children:b(`Maximum pages this run`,`ai-rank-suite`)}),(0,Ud.jsx)(`input`,{type:`number`,min:`1`,max:`100`,value:_,onChange:e=>v(Math.max(1,Math.min(100,Number(e.target.value)||1)))}),(0,Ud.jsx)(`span`,{className:`t-caption`,children:b(`Hard limit: 100 pages. The plan reports the maximum number of paid AI calls before work begins.`,`ai-rank-suite`)})]})]})]}),(0,Ud.jsx)(ft,{title:b(`What it will never do`,`ai-rank-suite`),children:(0,Ud.jsx)(`p`,{children:b(`It never overwrites something you wrote. Every task checks for an existing value first and skips the page rather than “improving” your sentence — and it checks again immediately before writing, so a page you edited while the run was going is still safe. Everything it does write is recorded together with the previous value, which is what makes the undo above work months later without a database backup.`,`ai-rank-suite`)})})]})}),(0,Ud.jsxs)(k,{icon:(0,Ud.jsx)(bt,{size:16}),title:b(`The floor`,`ai-rank-suite`),subtitle:b(`Every circuit, every desk and every gear — live, and only moving when something really is`,`ai-rank-suite`),flush:!0,children:[(0,Ud.jsx)(an,{routing:e.routing,systems:e.systems,now:e.now,running:n||e.running}),(0,Ud.jsx)(Vd,{routing:e.routing,onSaved:n=>t({...e,routing:n}),onError:a})]})]})}function Vd({routing:e,onSaved:t,onError:n}){let[r,i]=(0,Hd.useState)(null),[a,o]=(0,Hd.useState)(null),[s,c]=(0,Hd.useState)(!1),[l,u]=(0,Hd.useState)(!1);if(!e||(e.engines||[]).length===0)return null;let d=Object.fromEntries((e.jobs||[]).map(e=>[e.id,e.assigned?e.provider:``])),f=r||d,p=a===null?!!e.exclusive:a,m=r!==null&&(e.jobs||[]).some(e=>(f[e.id]||``)!==(d[e.id]||``))||a!==null&&a!==!!e.exclusive;return(0,Ud.jsxs)(`div`,{className:`ars-routing`,children:[(0,Ud.jsxs)(`div`,{className:`ars-routing-head`,children:[(0,Ud.jsxs)(`div`,{children:[(0,Ud.jsx)(`div`,{className:`t-overline`,children:b(`Assignment`,`ai-rank-suite`)}),(0,Ud.jsx)(`p`,{className:`m-0 t-caption`,children:b(`Each job has exactly one engine. There is no fallback chain, because a job that quietly changes vendor mid-run is how one site ends up written in two voices.`,`ai-rank-suite`)})]}),(0,Ud.jsxs)(`div`,{className:`flex items-center gap-2`,children:[l&&(0,Ud.jsxs)(j,{tone:`good`,children:[`✓ `,b(`Saved`,`ai-rank-suite`)]}),(0,Ud.jsx)(Me,{checked:p,disabled:s,onChange:o,label:b(`One writer per field`,`ai-rank-suite`)})]})]}),(e.conflicts||[]).length>0&&(0,Ud.jsx)(`div`,{className:`grid gap-1.5 mb-3`,children:e.conflicts.map((e,t)=>(0,Ud.jsxs)(`div`,{className:`ars-head-issue is-${e.level}`,children:[(0,Ud.jsx)(`span`,{"aria-hidden":!0,className:`ars-head-issue-mark`,children:e.level===`error`?`✕`:e.level===`warn`?`!`:`i`}),(0,Ud.jsxs)(`div`,{children:[(0,Ud.jsx)(`div`,{className:`font-semibold text-[12.5px]`,children:e.title}),(0,Ud.jsx)(`div`,{className:`text-[12px] mt-0.5`,style:{color:`var(--ars-ink-2)`},children:e.text})]})]},t))}),(0,Ud.jsx)(`div`,{className:`ars-routing-grid`,children:(e.jobs||[]).map(t=>(0,Ud.jsxs)(`div`,{className:`ars-routing-row`,children:[(0,Ud.jsxs)(`div`,{className:`min-w-0`,children:[(0,Ud.jsx)(`div`,{className:`font-medium text-[12.5px]`,children:t.label}),(0,Ud.jsx)(`div`,{className:`t-caption`,children:t.about}),(0,Ud.jsx)(`div`,{className:`flex gap-1 mt-1 flex-wrap`,children:(t.traits||[]).map(e=>(0,Ud.jsx)(`span`,{className:`ars-trait`,children:e},e))})]}),(0,Ud.jsxs)(`select`,{value:f[t.id]||``,disabled:s,onChange:e=>i({...f,[t.id]:e.target.value}),children:[(0,Ud.jsx)(`option`,{value:``,children:b(`Default engine`,`ai-rank-suite`)}),(e.engines||[]).map(e=>(0,Ud.jsx)(`option`,{value:e.id,children:e.label},e.id))]})]},t.id))}),m&&(0,Ud.jsxs)(`div`,{className:`ars-routing-actions`,children:[(0,Ud.jsxs)(`span`,{className:`t-caption`,children:[(e.jobs||[]).filter(e=>(f[e.id]||``)!==(d[e.id]||``)).length+ +(a!==null&&a!==!!e.exclusive),` `,b(`unsaved change(s)`,`ai-rank-suite`)]}),(0,Ud.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Ud.jsx)(A,{variant:`ghost`,onClick:()=>{i(null),o(null)},disabled:s,children:b(`Cancel`,`ai-rank-suite`)}),(0,Ud.jsx)(A,{onClick:async()=>{c(!0);try{t(await D.put(`/ai/routing`,{assignments:f,exclusive:p})),i(null),o(null),u(!0),setTimeout(()=>u(!1),1800)}catch(e){n(e.message)}finally{c(!1)}},busy:s,children:b(`Save routing`,`ai-rank-suite`)})]})]})]})}var Hd,Ud,Wd,Gd=o((()=>{C(),Hd=u(f(),1),O(),dt(),mt(),xn(),Rd(),Vt(),Ud=_e(),Wd=e=>e.length<=1?e.join(``):S(b(`%1$s and %2$s`,`ai-rank-suite`),e.slice(0,-1).join(`, `),e[e.length-1])})),Kd=c({default:()=>qd});function qd(){let[e,t]=(0,Jd.useState)(null),[n,r]=(0,Jd.useState)(null),[i,a]=(0,Jd.useState)(!1),[o,s]=(0,Jd.useState)(``),[c,l]=(0,Jd.useState)(null),[u,d]=(0,Jd.useState)(``),[f,p]=(0,Jd.useState)(``),[m,h]=(0,Jd.useState)(1),[g,_]=(0,Jd.useState)(`links`),[v,y]=(0,Jd.useState)(``),[C,w]=(0,Jd.useState)(null),T=(0,Jd.useCallback)(async(e=m,n=o,i=u,a=f)=>{try{let o=new URLSearchParams({page:String(e),per_page:`25`,status:n,via:i,search:a});t(await D.get(`/backlinks?${o}`)),r(null)}catch(e){r(e.message)}},[m,o,u,f]);if((0,Jd.useEffect)(()=>{T(m,o,u,f)},[m,o,u]),(0,Jd.useEffect)(()=>{D.get(`/backlinks/growth?weeks=26`).then(e=>l(e.weeks||[])).catch(()=>l([]))},[]),!e)return(0,Yd.jsx)(Ce,{error:n});let E=e.summary||{},ee=Math.max(1,Math.ceil((e.total||0)/25)),te=async e=>{a(!0),w(null);try{let t=await D.post(`/backlinks/verify`,{ids:e||[]});w(t.checked===0?b(`Nothing was waiting to be checked — every link has been read in the last week.`,`ai-rank-suite`):S(x(`Read %1$d source page. %2$d still queued.`,`Read %1$d source pages. %2$d still queued.`,t.checked,`ai-rank-suite`),t.checked,t.pending)),await T()}catch(e){r(e.message)}finally{a(!1)}},ne=async()=>{a(!0),w(null);try{let e=await D.post(`/backlinks/bing`);w(S(b(`Bing returned %1$s links across %2$s of your pages.`,`ai-rank-suite`),e.imported,e.pages)),await T()}catch(e){r(e.message)}finally{a(!1)}},re=async()=>{a(!0);try{await D.put(`/backlinks/bing`,{key:v}),y(``),await T()}catch(e){r(e.message)}finally{a(!1)}},O=async e=>{await D.del(`/backlinks/${e}`),T()};return(0,Yd.jsxs)(`div`,{className:`ars-page`,children:[n&&(0,Yd.jsx)(M,{tone:`serious`,children:n}),C&&(0,Yd.jsx)(M,{tone:`good`,children:C}),(0,Yd.jsx)(ya,{...(()=>{let t=e?.summary||{},n=t.total||0;return e?.bing?.connected?n===0?{tone:`warning`,text:b(`Connected, but no backlinks have come back yet.`,`ai-rank-suite`),why:b(`Either the index genuinely has none for this domain, or the site is not verified in that account — Bing only returns links for a site you own there.`,`ai-rank-suite`)}:{tone:t.lost>0?`warning`:`good`,text:S(x(`%1$s link from %2$s domains.`,`%1$s links from %2$s domains.`,n,`ai-rank-suite`),n.toLocaleString(),(t.domains||0).toLocaleString()),why:t.lost>0?S(b(`%s were there before and are not now — a lost link is worth chasing while the editor still remembers the page.`,`ai-rank-suite`),t.lost.toLocaleString()):b(`Nothing has been lost since the last check. The anchors below show what those links say you are about.`,`ai-rank-suite`)}:{tone:`neutral`,text:b(`No backlink source is connected, so this screen has nothing to read.`,`ai-rank-suite`),why:b(`Bing Webmaster Tools is free and is the one backlink index a site can read for its own domain. Connect it under Sources and the numbers below fill in.`,`ai-rank-suite`),action:b(`Open Sources`,`ai-rank-suite`),onAction:()=>_(`sources`)}})()}),(0,Yd.jsx)(Ee,{columns:4,metrics:[{id:`domains`,label:b(`Referring domains`,`ai-rank-suite`),hint:b(`Distinct sites known to link here — from visitors, Bing and your own imports.`,`ai-rank-suite`),value:E.domains??`—`,sub:S(x(`%s link in total`,`%s links in total`,E.total||0,`ai-rank-suite`),(E.total||0).toLocaleString())},{id:`live`,label:b(`Verified live`,`ai-rank-suite`),hint:b(`The source page was fetched and read: the link is there and followed.`,`ai-rank-suite`),value:E.live??`—`,sub:E.nofollow?S(b(`%d more are nofollow`,`ai-rank-suite`),E.nofollow):void 0},{id:`lost`,label:b(`Lost`,`ai-rank-suite`),hint:b(`The source page was read again and the link is no longer on it — a claim worth trusting, unlike an index that last crawled months ago.`,`ai-rank-suite`),value:E.lost??`—`,accent:E.lost>0?`var(--ars-c-red-ink)`:void 0},{id:`clicks`,label:b(`Clicks through`,`ai-rank-suite`),hint:b(`Visits that arrived by a link — the links that actually send you people.`,`ai-rank-suite`),value:E.clicks??`—`}]}),c&&c.length>1&&(0,Yd.jsx)(k,{title:b(`Backlink profile over time`,`ai-rank-suite`),subtitle:b(`Every link this site knows about, accumulated week by week`,`ai-rank-suite`),action:(0,Yd.jsx)(We,{value:(c[c.length-1]?.value??0)-(c[0]?.value??0),suffix:` ${b(`in this window`,`ai-rank-suite`)}`}),children:(0,Yd.jsx)(Le,{data:c,label:b(`Known backlinks`,`ai-rank-suite`),color:`var(--ars-series-4)`,height:140,formatValue:e=>`${e}`})}),(0,Yd.jsx)(Je,{value:g,onChange:_,label:b(`View`,`ai-rank-suite`),options:[{id:`links`,label:S(b(`Links (%s)`,`ai-rank-suite`),(e.total||0).toLocaleString())},{id:`domains`,label:S(b(`Domains (%s)`,`ai-rank-suite`),E.domains||0)},{id:`anchors`,label:b(`Anchors`,`ai-rank-suite`)},{id:`sources`,label:b(`Sources`,`ai-rank-suite`)}]}),g===`links`&&(0,Yd.jsxs)(k,{icon:(0,Yd.jsx)(Ot,{size:16}),title:b(`Every link we know about`,`ai-rank-suite`),subtitle:b(`Where it came from, whether the page still carries it, and what the anchor says`,`ai-rank-suite`),action:(0,Yd.jsxs)(`div`,{className:`flex items-center gap-2`,children:[E.unverified>0&&(0,Yd.jsx)(j,{tone:`brand`,children:S(b(`%d not read yet`,`ai-rank-suite`),E.unverified)}),(0,Yd.jsxs)(A,{variant:`ghost`,busy:i,onClick:()=>te(),children:[(0,Yd.jsx)(Tt,{size:13}),b(`Check the next 10`,`ai-rank-suite`)]})]}),flush:!0,children:[(0,Yd.jsxs)(Ke,{right:(0,Yd.jsx)(qe,{label:b(`Found by`,`ai-rank-suite`),value:u,onChange:e=>{d(e),h(1)},options:[{id:``,label:b(`Any`,`ai-rank-suite`)},{id:`referrer`,label:b(`Visitors`,`ai-rank-suite`)},{id:`bing`,label:b(`Bing`,`ai-rank-suite`)},{id:`import`,label:b(`Imported`,`ai-rank-suite`)}]}),children:[(0,Yd.jsxs)(`div`,{className:`ars-search`,children:[(0,Yd.jsx)(St,{size:14}),(0,Yd.jsx)(`input`,{type:`search`,value:f,placeholder:b(`Domain or anchor text`,`ai-rank-suite`),onChange:e=>p(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(h(1),T(1,o,u,f))}})]}),(0,Yd.jsx)(qe,{label:b(`Status`,`ai-rank-suite`),value:o,onChange:e=>{s(e),h(1)},options:[{id:``,label:b(`All`,`ai-rank-suite`)},{id:`live`,label:b(`Live`,`ai-rank-suite`)},{id:`nofollow`,label:b(`Nofollow`,`ai-rank-suite`)},{id:`lost`,label:b(`Lost`,`ai-rank-suite`)},{id:`unverified`,label:b(`Unverified`,`ai-rank-suite`)},{id:`unreachable`,label:b(`Unreachable`,`ai-rank-suite`)}]})]}),e.rows.length===0?(0,Yd.jsxs)(`div`,{className:`ars-empty`,children:[(0,Yd.jsx)(Ot,{size:22}),(0,Yd.jsx)(`div`,{className:`font-semibold mt-2`,children:b(`No links recorded yet`,`ai-rank-suite`)}),(0,Yd.jsx)(`p`,{className:`m-0 mt-1 text-[13px] max-w-[62ch] mx-auto`,style:{color:`var(--ars-ink-2)`},children:b(`The list fills itself: every visitor who arrives from another site proves a link exists and gets recorded here. Connect Bing Webmaster Tools under Sources for the links nobody has clicked yet.`,`ai-rank-suite`)})]}):(0,Yd.jsx)(`div`,{className:`ars-table-wrap`,children:(0,Yd.jsxs)(`table`,{className:`ars-table`,children:[(0,Yd.jsx)(`thead`,{children:(0,Yd.jsxs)(`tr`,{children:[(0,Yd.jsx)(`th`,{style:{width:210},children:b(`From`,`ai-rank-suite`)}),(0,Yd.jsx)(`th`,{children:b(`Anchor`,`ai-rank-suite`)}),(0,Yd.jsx)(`th`,{style:{width:190},children:`To`}),(0,Yd.jsx)(`th`,{className:`is-mid`,style:{width:108},children:b(`Status`,`ai-rank-suite`)}),(0,Yd.jsx)(`th`,{className:`is-num is-narrow`,children:b(`Clicks`,`ai-rank-suite`)}),(0,Yd.jsx)(`th`,{className:`is-mid`,style:{width:92},children:b(`Found by`,`ai-rank-suite`)}),(0,Yd.jsx)(`th`,{style:{width:34},"aria-label":b(`Remove`,`ai-rank-suite`)})]})}),(0,Yd.jsx)(`tbody`,{children:e.rows.map(e=>{let t=Xd[e.status]||Xd.unverified;return(0,Yd.jsxs)(`tr`,{children:[(0,Yd.jsx)(`td`,{children:(0,Yd.jsxs)(`a`,{href:e.source,target:`_blank`,rel:`noreferrer nofollow`,className:`inline-flex items-center gap-1 font-medium`,title:e.source,children:[e.domain,` `,(0,Yd.jsx)(wt,{size:10})]})}),(0,Yd.jsx)(`td`,{style:{color:`var(--ars-ink-2)`},children:e.anchor?(0,Yd.jsx)(`span`,{className:`truncate inline-block`,style:{maxWidth:260},children:e.anchor}):(0,Yd.jsx)(`i`,{style:{color:`var(--ars-ink-3)`},children:b(`not read yet`,`ai-rank-suite`)})}),(0,Yd.jsx)(`td`,{className:`truncate`,style:{color:`var(--ars-ink-2)`},children:e.post_title||e.target}),(0,Yd.jsx)(`td`,{className:`is-mid`,children:(0,Yd.jsx)(`span`,{title:t.why,children:(0,Yd.jsx)(j,{tone:t.tone,children:t.label})})}),(0,Yd.jsx)(`td`,{className:`is-num is-narrow tabular-nums`,children:e.hits||`—`}),(0,Yd.jsx)(`td`,{className:`is-mid`,children:(0,Yd.jsx)(`span`,{className:`ars-tag`,title:Zd[e.via]||e.via,children:e.via})}),(0,Yd.jsx)(`td`,{children:(0,Yd.jsx)(`button`,{type:`button`,className:`ars-move`,"aria-label":b(`Remove this link`,`ai-rank-suite`),title:b(`Remove from the list`,`ai-rank-suite`),onClick:()=>O(e.id),children:(0,Yd.jsx)(Rt,{size:12})})})]},e.id)})})]})}),ee>1&&(0,Yd.jsxs)(`div`,{className:`flex items-center gap-2 p-3`,children:[(0,Yd.jsx)(A,{variant:`ghost`,disabled:m<=1,onClick:()=>h(m-1),children:`← Previous`}),(0,Yd.jsx)(`span`,{className:`t-caption`,children:S(b(`Page %1$s of %2$s`,`ai-rank-suite`),m.toLocaleString(),ee.toLocaleString())}),(0,Yd.jsx)(A,{variant:`ghost`,disabled:m>=ee,onClick:()=>h(m+1),children:b(`Next →`,`ai-rank-suite`)})]})]}),g===`domains`&&(0,Yd.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:[(0,Yd.jsx)(k,{title:b(`Who links to you most`,`ai-rank-suite`),subtitle:b(`By number of linking pages`,`ai-rank-suite`),flush:!0,children:(E.top_domains||[]).length===0?(0,Yd.jsx)(`p`,{className:`m-0 p-4 t-caption`,children:b(`Nothing recorded yet.`,`ai-rank-suite`)}):(0,Yd.jsx)(`div`,{className:`p-4`,children:(0,Yd.jsx)(Xe,{items:(E.top_domains||[]).map(e=>({label:e.domain,value:e.links})),max:Math.max(...(E.top_domains||[{links:1}]).map(e=>e.links)),format:e=>S(x(`%d link`,`%d links`,e,`ai-rank-suite`),e)})})}),(0,Yd.jsx)(k,{title:b(`Which of your pages earn links`,`ai-rank-suite`),subtitle:b(`By number of distinct referring domains`,`ai-rank-suite`),flush:!0,children:(E.top_pages||[]).length===0?(0,Yd.jsx)(`p`,{className:`m-0 p-4 t-caption`,children:b(`Nothing recorded yet.`,`ai-rank-suite`)}):(0,Yd.jsx)(`div`,{className:`p-4`,children:(0,Yd.jsx)(Xe,{items:(E.top_pages||[]).map(e=>({label:e.title||`#${e.post_id}`,value:e.domains})),max:Math.max(...(E.top_pages||[{domains:1}]).map(e=>e.domains)),format:e=>`${e} domain${e===1?``:`s`}`,color:`var(--ars-accent)`})})})]}),g===`anchors`&&(0,Yd.jsx)(k,{title:b(`Anchor text`,`ai-rank-suite`),subtitle:b(`What other sites call you — the phrase a search engine most strongly associates with the page`,`ai-rank-suite`),flush:!0,children:(E.anchors||[]).length===0?(0,Yd.jsx)(`p`,{className:`m-0 p-4 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`Anchors are read from the source page during verification, so this fills up as links are checked.`,`ai-rank-suite`)}):(0,Yd.jsxs)(`div`,{className:`p-4`,children:[(0,Yd.jsx)(Xe,{items:(E.anchors||[]).map(e=>({label:e.text,value:e.n})),max:Math.max(...(E.anchors||[{n:1}]).map(e=>e.n)),format:e=>`${e}×`}),(0,Yd.jsx)(`p`,{className:`m-0 mt-3 t-caption max-w-[70ch]`,children:b(`A healthy profile is mostly your brand name and natural phrases. A single commercial keyword dominating the list is the pattern link schemes produce, and the pattern penalties look for.`,`ai-rank-suite`)})]})}),g===`sources`&&(0,Yd.jsxs)(`div`,{className:`grid gap-3`,children:[(0,Yd.jsx)(k,{title:b(`Bing Webmaster Tools`,`ai-rank-suite`),subtitle:b(`The one backlink index a site can read for free — generate an API key in Bing Webmaster Tools under Settings → API access`,`ai-rank-suite`),action:e.bing?.connected&&(0,Yd.jsx)(A,{busy:i,onClick:ne,children:b(`Import links now`,`ai-rank-suite`)}),children:(0,Yd.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Yd.jsx)(Qe,{label:b(`API key`,`ai-rank-suite`),hint:e.bing?.connected?S(b(`Stored (%s). Enter a new one to replace it.`,`ai-rank-suite`),e.bing.hint):b(`Stored encrypted. Bing only returns links for a site verified in your account.`,`ai-rank-suite`),children:(0,Yd.jsx)(`input`,{type:`password`,value:v,autoComplete:`off`,placeholder:e.bing?.connected?`••••••••`:b(`Paste the key`,`ai-rank-suite`),onChange:e=>y(e.target.value)})}),(0,Yd.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,Yd.jsx)(A,{variant:`ghost`,busy:i,onClick:re,disabled:!v,children:b(`Save key`,`ai-rank-suite`)}),e.bing?.connected&&(0,Yd.jsx)(j,{tone:`good`,children:b(`Connected`,`ai-rank-suite`)}),e.bing?.last>0&&(0,Yd.jsx)(`span`,{className:`t-caption`,children:S(b(`Last import %s`,`ai-rank-suite`),new Date(e.bing.last*1e3).toLocaleString())})]})]})}),(0,Yd.jsxs)(ft,{title:b(`Where these numbers come from, and what they are not`,`ai-rank-suite`),children:[(0,Yd.jsx)(`p`,{children:b(`No plugin can produce an Ahrefs-style backlink index from inside a WordPress install — those are built by crawling the web for years. So this is built around three sources, and every row says which one it came from.`,`ai-rank-suite`)}),(0,Yd.jsxs)(`p`,{children:[(0,Yd.jsx)(`b`,{children:b(`Visitors.`,`ai-rank-suite`)}),` `,b(`Someone arriving from another domain proves a link exists and that it is being clicked. That is a smaller set than a commercial index and a more useful one: these are the links that send you people. Note that a full-page cache serves most visits without PHP running, so a site behind one records fewer referrals than it receives.`,`ai-rank-suite`)]}),(0,Yd.jsxs)(`p`,{children:[(0,Yd.jsx)(`b`,{children:b(`Verification.`,`ai-rank-suite`)}),` `,b(`For any link here, the source page is fetched and read: is the link still on it, what does the anchor say, is it nofollow. A commercial index tells you a link existed when it last crawled. This tells you what the page says now — which is why “Lost” is a claim worth trusting, and why “Unreachable” is kept separate from it rather than counted as a removal.`,`ai-rank-suite`)]}),(0,Yd.jsxs)(`p`,{children:[(0,Yd.jsx)(`b`,{children:b(`Bing.`,`ai-rank-suite`)}),` `,b(`Free, real crawl data, limited to sites verified in your Webmaster Tools account and to Bing's own index, which is smaller than Google's. Useful for breadth; not a total.`,`ai-rank-suite`)]})]})]})]})}var Jd,Yd,Xd,Zd,Qd=o((()=>{C(),Jd=u(f(),1),O(),xa(),dt(),mt(),Vt(),Yd=_e(),Xd={live:{tone:`good`,label:b(`Live`,`ai-rank-suite`),why:b(`Read the page; the link is there and followed.`,`ai-rank-suite`)},nofollow:{tone:`neutral`,label:b(`Nofollow`,`ai-rank-suite`),why:b(`The link is there but carries rel=nofollow, ugc or sponsored.`,`ai-rank-suite`)},lost:{tone:`serious`,label:b(`Lost`,`ai-rank-suite`),why:b(`We read the page and the link is no longer on it.`,`ai-rank-suite`)},unreachable:{tone:`warning`,label:b(`Unreachable`,`ai-rank-suite`),why:b(`The source did not answer. Not the same as removed.`,`ai-rank-suite`)},unverified:{tone:`brand`,label:b(`Unverified`,`ai-rank-suite`),why:b(`Known from a visit or an import; not read yet.`,`ai-rank-suite`)}},Zd={referrer:b(`A real visitor arrived through it`,`ai-rank-suite`),bing:`Bing Webmaster Tools`,import:b(`Imported by you`,`ai-rank-suite`)}})),$d=c({default:()=>rf});function ef({id:e,label:t}){let[n,r]=af.useState(!1),i=window.airanksuiteData&&window.airanksuiteData.assetsUrl||``,a=i?`${i}img/providers/${e}.png`:``;if(a&&!n)return(0,of.jsx)(`span`,{className:`ars-provider-mark is-image`,"aria-hidden":!0,children:(0,of.jsx)(`img`,{src:a,alt:``,width:38,height:38,loading:`lazy`,onError:()=>r(!0)})});let o=t.replace(/[^A-Za-z ]/g,``).split(/\s+/).filter(Boolean).slice(0,2).map(e=>e[0].toUpperCase()).join(``),s=0;for(let e of t)s=(s*31+e.charCodeAt(0))%360;return(0,of.jsx)(`span`,{className:`ars-provider-mark`,style:{"--mark-h":s},"aria-hidden":!0,children:o||`?`})}function tf({provider:e,domain:t,onSaved:n}){let[r,i]=(0,af.useState)(!1),[a,o]=(0,af.useState)({}),[s,c]=(0,af.useState)(``),[l,u]=(0,af.useState)(null),[d,f]=(0,af.useState)(e.metrics||null),[p,m]=(0,af.useState)(e.fetched||0),[h,g]=(0,af.useState)(null);(0,af.useEffect)(()=>{f(e.metrics||null),m(e.fetched||0)},[e.metrics,e.fetched]);let _=e.capabilities.includes(`metrics`),v=e.capabilities.includes(`serp`),y=async(e,t)=>{c(e),g(null),u(null);try{await t()}catch(e){g(e.message)}finally{c(``)}},x=()=>y(`save`,async()=>{let t=await D.post(`/seo-apis/${e.id}/credentials`,{values:a});o({}),i(!1),n(t.providers)}),S=()=>y(`test`,async()=>{u(await D.post(`/seo-apis/${e.id}/test`,{}))}),C=()=>y(`metrics`,async()=>{let n=await D.post(`/seo-apis/${e.id}/metrics`,{domain:t,force:!0});f(n.metrics),m(n.fetched)}),w=()=>y(`forget`,async()=>{let t=await D.del(`/seo-apis/${e.id}/credentials`);f(null),m(0),u(null),n(t.providers)}),T=sf.filter(e=>d&&d[e.key]!==void 0&&d[e.key]!==null);return(0,of.jsxs)(`div`,{className:`ars-provider${e.configured?` is-connected`:``}${r?` is-open`:``}`,children:[(0,of.jsxs)(`div`,{className:`ars-provider-head`,children:[(0,of.jsx)(ef,{id:e.id,label:e.label}),(0,of.jsxs)(`div`,{className:`grid gap-0.5 min-w-0 flex-1`,children:[(0,of.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,of.jsx)(`span`,{className:`ars-provider-name`,children:e.label}),e.configured?(0,of.jsx)(`span`,{className:`ars-provider-state is-on`,children:b(`Connected`,`ai-rank-suite`)}):(0,of.jsx)(`span`,{className:`ars-provider-state`,children:b(`Not connected`,`ai-rank-suite`)})]}),(0,of.jsxs)(`div`,{className:`ars-provider-caps`,children:[_&&(0,of.jsx)(`span`,{className:`ars-provider-cap is-metrics`,children:b(`Domain authority`,`ai-rank-suite`)}),v&&(0,of.jsx)(`span`,{className:`ars-provider-cap is-serp`,children:b(`Live SERP`,`ai-rank-suite`)})]})]}),(0,of.jsx)(`a`,{className:`ars-provider-docs`,href:e.docs,target:`_blank`,rel:`noreferrer noopener`,title:b(`Vendor documentation`,`ai-rank-suite`),children:`↗`})]}),(0,of.jsx)(`p`,{className:`ars-provider-blurb`,children:e.blurb}),h&&(0,of.jsx)(M,{tone:`serious`,children:h}),l&&(0,of.jsx)(M,{tone:l.ok?`good`:`serious`,children:l.message}),T.length>0&&(0,of.jsx)(`div`,{className:`ars-vendor-metrics`,children:T.map(e=>(0,of.jsxs)(`div`,{className:`ars-vendor-metric`,children:[(0,of.jsx)(`span`,{className:`ars-vendor-metric-n tabular-nums`,children:cf(d[e.key],e.kind)}),(0,of.jsx)(`span`,{className:`ars-vendor-metric-l`,children:e.key===`authority`&&d.authority_label?d.authority_label:e.label})]},e.key))}),p>0&&(0,of.jsxs)(`span`,{className:`t-caption`,children:[b(`Measured for`,`ai-rank-suite`),` `,t,` · `,lf(p)]}),r&&(0,of.jsxs)(`div`,{className:`grid gap-3 pt-1`,children:[e.fields.map(t=>(0,of.jsx)(Qe,{label:t.label,hint:t.hint,htmlFor:`${e.id}-${t.key}`,children:(0,of.jsx)(`input`,{id:`${e.id}-${t.key}`,type:`password`,autoComplete:`off`,placeholder:t.set?b(`Saved — type to replace`,`ai-rank-suite`):``,value:a[t.key]??``,onChange:e=>o({...a,[t.key]:e.target.value})})},t.key)),(0,of.jsxs)(`p`,{className:`t-caption`,style:{margin:0},children:[e.notes,` `,(0,of.jsxs)(`a`,{href:e.docs,target:`_blank`,rel:`noreferrer noopener`,children:[b(`Vendor documentation`,`ai-rank-suite`),` ↗`]})]}),(0,of.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,of.jsx)(A,{onClick:x,busy:s===`save`,disabled:Object.keys(a).length===0,children:b(`Save credentials`,`ai-rank-suite`)}),(0,of.jsx)(A,{variant:`ghost`,onClick:()=>{i(!1),o({})},children:b(`Cancel`,`ai-rank-suite`)})]})]}),!r&&(0,of.jsxs)(`div`,{className:`ars-provider-foot`,children:[(0,of.jsx)(A,{variant:e.configured?`ghost`:`primary`,onClick:()=>i(!0),children:e.configured?b(`Edit credentials`,`ai-rank-suite`):b(`Connect`,`ai-rank-suite`)}),e.configured&&(0,of.jsxs)(of.Fragment,{children:[(0,of.jsx)(A,{variant:`ghost`,onClick:S,busy:s===`test`,children:b(`Test`,`ai-rank-suite`)}),_&&(0,of.jsx)(A,{variant:`ghost`,onClick:C,busy:s===`metrics`,children:b(d?`Refresh`:`Fetch metrics`,`ai-rank-suite`)}),(0,of.jsx)(A,{variant:`ghost`,onClick:w,busy:s===`forget`,children:b(`Disconnect`,`ai-rank-suite`)})]})]})]})}function nf({providers:e,domain:t}){let n=e.filter(e=>e.configured&&e.capabilities.includes(`serp`)),[r,i]=(0,af.useState)(n[0]?.id||``),[a,o]=(0,af.useState)(``),[s,c]=(0,af.useState)(``),[l,u]=(0,af.useState)(!1),[d,f]=(0,af.useState)(null),[p,m]=(0,af.useState)(null);if((0,af.useEffect)(()=>{n.some(e=>e.id===r)||i(n[0]?.id||``)},[e]),n.length===0)return(0,of.jsx)(k,{title:b(`Rank check`,`ai-rank-suite`),icon:(0,of.jsx)(St,{size:18}),children:(0,of.jsx)(we,{icon:(0,of.jsx)(St,{size:18}),title:b(`No live SERP vendor is connected yet`,`ai-rank-suite`),children:b(`Connect DataForSEO, SerpApi, Serper.dev, ValueSERP, Scale SERP or Zenserp above, and this becomes a real-time position check for any keyword — with your own domain highlighted in the results.`,`ai-rank-suite`)})});let h=async()=>{if(a.trim()){u(!0),f(null),m(null);try{m(await D.post(`/seo-apis/${r}/serp`,{keyword:a.trim(),location:s}))}catch(e){f(e.message)}finally{u(!1)}}};return(0,of.jsxs)(k,{title:b(`Rank check`,`ai-rank-suite`),subtitle:b(`One live search, run through a vendor you have connected. Costs one credit per check.`,`ai-rank-suite`),icon:(0,of.jsx)(St,{size:18}),children:[(0,of.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto] items-end`,children:[(0,of.jsx)(Qe,{label:b(`Keyword`,`ai-rank-suite`),htmlFor:`airanksuite-serp-kw`,children:(0,of.jsx)(`input`,{id:`airanksuite-serp-kw`,value:a,placeholder:b(`best coffee dubai`,`ai-rank-suite`),onChange:e=>o(e.target.value),onKeyDown:e=>{e.key===`Enter`&&h()}})}),(0,of.jsx)(Qe,{label:b(`Location`,`ai-rank-suite`),hint:b(`Optional. A place name, or a country code for Serper.`,`ai-rank-suite`),htmlFor:`airanksuite-serp-loc`,children:(0,of.jsx)(`input`,{id:`airanksuite-serp-loc`,value:s,placeholder:b(`United Arab Emirates`,`ai-rank-suite`),onChange:e=>c(e.target.value)})}),(0,of.jsx)(A,{onClick:h,busy:l,disabled:!a.trim(),children:b(`Check`,`ai-rank-suite`)})]}),(0,of.jsx)(`div`,{className:`mt-3`,children:(0,of.jsx)(Wr,{onPick:o,label:b(`Let AI pick a keyword`,`ai-rank-suite`)})}),(0,of.jsx)(`div`,{className:`mt-3`,children:(0,of.jsx)(Je,{label:b(`Vendor`,`ai-rank-suite`),value:r,onChange:i,options:n.map(e=>({id:e.id,label:e.label}))})}),d&&(0,of.jsx)(`div`,{className:`mt-3`,children:(0,of.jsx)(M,{tone:`serious`,children:d})}),p&&(0,of.jsxs)(`div`,{className:`mt-4 grid gap-3`,children:[(0,of.jsx)(M,{tone:p.position?`good`:`warning`,children:p.position?`${t} ${b(`ranks at position`,`ai-rank-suite`)} ${p.position} ${b(`for`,`ai-rank-suite`)} “${a}”.`:`${t} ${b(`is not in the top`,`ai-rank-suite`)} ${p.results.length} ${b(`for`,`ai-rank-suite`)} “${a}”.`}),(0,of.jsx)(`div`,{className:`ars-serp-list`,children:p.results.slice(0,20).map(e=>{let n=e.domain===t;return(0,of.jsxs)(`div`,{className:`ars-serp-row${n?` is-mine`:``}`,children:[(0,of.jsx)(Re,{value:e.position}),(0,of.jsxs)(`div`,{className:`grid gap-0.5 min-w-0`,children:[(0,of.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer noopener`,className:`ars-serp-title`,children:e.title||e.url}),(0,of.jsx)(`span`,{className:`ars-serp-url`,children:e.domain})]})]},`${e.position}-${e.url}`)})}),p.results.length>20&&(0,of.jsxs)(`span`,{className:`t-caption`,children:[b(`Showing the top 20 of`,`ai-rank-suite`),` `,p.results.length,` `,b(`results returned.`,`ai-rank-suite`)]})]})]})}function rf(){let[e,t]=(0,af.useState)(null),[n,r]=(0,af.useState)(``),[i,a]=(0,af.useState)(null),[o,s]=(0,af.useState)(`all`);(0,af.useEffect)(()=>{D.get(`/seo-apis`).then(e=>{t(e.providers),r(e.domain)}).catch(e=>a(e.message))},[]);let c=(0,af.useMemo)(()=>(e||[]).filter(e=>o===`all`||e.category===o),[e,o]),l=(e||[]).filter(e=>e.configured).length;return e?(0,of.jsxs)(`div`,{className:`grid gap-5`,children:[(0,of.jsx)(k,{title:b(`SEO data providers`,`ai-rank-suite`),subtitle:b(`Bring third-party authority scores and live search results into this dashboard. Keys are encrypted on your own server and never leave it except to the vendor they belong to.`,`ai-rank-suite`),icon:(0,of.jsx)(Ot,{size:18}),action:(0,of.jsx)(Je,{value:o,onChange:s,options:[{id:`all`,label:b(`All`,`ai-rank-suite`)},{id:`authority`,label:b(`Domain authority`,`ai-rank-suite`)},{id:`serp`,label:b(`Live SERP`,`ai-rank-suite`)}]}),children:(0,of.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,of.jsxs)(j,{tone:l>0?`good`:`neutral`,children:[l,` `,b(`of`,`ai-rank-suite`),` `,e.length,` `,b(`connected`,`ai-rank-suite`)]}),(0,of.jsxs)(`span`,{className:`t-caption`,children:[b(`Measuring`,`ai-rank-suite`),` `,n]})]})}),(0,of.jsxs)(`div`,{children:[(0,of.jsx)(ke,{hint:b(`Each vendor bills you directly. Nothing here calls out until you press a button.`,`ai-rank-suite`),children:b(o===`serp`?`Live search results`:o===`authority`?`Domain authority`:`All vendors`,`ai-rank-suite`)}),(0,of.jsx)(`div`,{className:`ars-provider-grid mt-3`,children:c.map(e=>(0,of.jsx)(tf,{provider:e,domain:n,onSaved:t},e.id))})]}),(0,of.jsx)(nf,{providers:e,domain:n})]}):(0,of.jsx)(Ce,{error:i,label:b(`Loading vendors`,`ai-rank-suite`)})}var af,of,sf,cf,lf,uf=o((()=>{af=u(f(),1),C(),O(),dt(),Vt(),qr(),of=_e(),sf=[{key:`authority`,label:b(`Authority`,`ai-rank-suite`),kind:`score`},{key:`trust_flow`,label:b(`Trust Flow`,`ai-rank-suite`),kind:`score`},{key:`citation_flow`,label:b(`Citation Flow`,`ai-rank-suite`),kind:`score`},{key:`page_authority`,label:b(`Page Authority`,`ai-rank-suite`),kind:`score`},{key:`visibility_index`,label:b(`Visibility Index`,`ai-rank-suite`),kind:`decimal`},{key:`referring_domains`,label:b(`Referring domains`,`ai-rank-suite`),kind:`count`},{key:`backlinks`,label:b(`Backlinks`,`ai-rank-suite`),kind:`count`},{key:`organic_keywords`,label:b(`Organic keywords`,`ai-rank-suite`),kind:`count`},{key:`organic_traffic`,label:b(`Est. monthly visits`,`ai-rank-suite`),kind:`count`},{key:`spam_score`,label:b(`Spam score`,`ai-rank-suite`),kind:`score`}],cf=(e,t)=>{let n=Number(e);return Number.isFinite(n)?t===`decimal`?n.toLocaleString(void 0,{maximumFractionDigits:2}):t===`count`?n.toLocaleString():String(Math.round(n)):`–`},lf=e=>{if(!e)return``;let t=Math.round((Date.now()/1e3-e)/60);if(t<1)return b(`just now`,`ai-rank-suite`);if(t<60)return`${t} min ago`;let n=Math.round(t/60);return n<24?`${n} h ago`:`${Math.round(n/24)} d ago`}})),df=c({default:()=>ff});function ff(){let[e,t]=(0,pf.useState)(null),[n,r]=(0,pf.useState)(``),[i,a]=(0,pf.useState)(``),[o,s]=(0,pf.useState)(``),[c,l]=(0,pf.useState)(!1),[u,d]=(0,pf.useState)(null),[f,p]=(0,pf.useState)(null);if((0,pf.useEffect)(()=>{D.get(`/packs`).then(e=>{t(e),e.applied&&(r(e.applied.pack),a(e.applied.region),s(e.applied.city||``))}).catch(e=>p(e.message))},[]),!e)return(0,mf.jsx)(Ce,{error:f});let m=e.packs.find(e=>e.id===n),h=e.regions.find(e=>e.id===i);return(0,mf.jsxs)(`div`,{className:`ars-page`,children:[(0,mf.jsx)(k,{title:b(`Industry packs`,`ai-rank-suite`),subtitle:b(`Your trade and your market, turned into a configured site`,`ai-rank-suite`),action:e.applied?(0,mf.jsxs)(j,{tone:`good`,children:[`✓ `,e.packs.find(t=>t.id===e.applied.pack)?.label,` ·`,` `,e.regions.find(t=>t.id===e.applied.region)?.short]}):(0,mf.jsx)(j,{tone:`neutral`,children:b(`Nothing applied yet`,`ai-rank-suite`)}),children:(0,mf.jsxs)(ft,{title:b(`What a pack actually does — and what it never does`,`ai-rank-suite`),children:[(0,mf.jsxs)(`p`,{children:[b(`A dentist does not know that schema.org has a Dentist type, that`,`ai-rank-suite`),` `,(0,mf.jsx)(`code`,{children:`knowsAbout`}),` `,b(`is the strongest expertise signal an assistant reads, or which four questions patients type into ChatGPT before booking. They know they run a practice in Munich. A pack turns that one fact into configuration.`,`ai-rank-suite`)]}),(0,mf.jsx)(`p`,{children:b(`Applying a pack is additive. It fills empty fields, adds subjects and prompts that are not already there, and leaves every value you have typed exactly as it is — so pressing it twice is safe, and pressing it after months of tuning does not undo any of that tuning.`,`ai-rank-suite`)})]})}),(0,mf.jsx)(k,{title:b(`1 · What do you do?`,`ai-rank-suite`),subtitle:b(`Sets the schema type, the subjects you claim, and the questions worth watching`,`ai-rank-suite`),children:(0,mf.jsx)(`div`,{className:`ars-cardgrid`,style:{"--min":`250px`},children:e.packs.map(e=>(0,mf.jsxs)(`button`,{type:`button`,onClick:()=>r(e.id),className:`ars-pick${n===e.id?` is-active`:``}`,children:[(0,mf.jsxs)(`span`,{className:`ars-pick-title`,children:[e.label,n===e.id&&(0,mf.jsx)(`span`,{style:{marginLeft:`auto`,color:`var(--ars-brand)`},children:`✓`})]}),(0,mf.jsx)(`span`,{className:`ars-pick-note`,children:e.summary})]},e.id))})}),(0,mf.jsx)(k,{title:b(`2 · Which market?`,`ai-rank-suite`),subtitle:b(`Currency, payment methods, languages and the identifiers that market asks for`,`ai-rank-suite`),children:(0,mf.jsx)(`div`,{className:`ars-cardgrid`,style:{"--min":`250px`},children:e.regions.map(e=>(0,mf.jsxs)(`button`,{type:`button`,onClick:()=>a(e.id),className:`ars-pick${i===e.id?` is-active`:``}`,children:[(0,mf.jsxs)(`span`,{className:`ars-pick-title`,children:[e.label,i===e.id&&(0,mf.jsx)(`span`,{style:{marginLeft:`auto`,color:`var(--ars-brand)`},children:`✓`})]}),(0,mf.jsxs)(`span`,{className:`ars-pick-note`,children:[e.currency,` · `,e.languages.join(`, `),e.countries.length>0?` · ${e.countries.join(`, `)}`:``]})]},e.id))})}),m&&h&&(0,mf.jsx)(k,{title:b(`3 · Where are you based?`,`ai-rank-suite`),subtitle:b(`Used to write the local prompts — leave blank if you sell online only`,`ai-rank-suite`),children:(0,mf.jsxs)(`div`,{className:`grid gap-3`,children:[(0,mf.jsxs)(`div`,{className:`max-w-[320px]`,children:[(0,mf.jsx)(`label`,{className:`block font-medium mb-1`,children:b(`City`,`ai-rank-suite`)}),(0,mf.jsx)(`input`,{type:`text`,value:o,placeholder:b(`Dubai`,`ai-rank-suite`),onChange:e=>s(e.target.value)})]}),(0,mf.jsxs)(`div`,{className:`p-3 grid gap-2`,style:{background:`var(--ars-surface-2)`,borderRadius:`var(--ars-r-sm)`},children:[(0,mf.jsx)(`div`,{className:`t-overline`,children:b(`Why this pack matters`,`ai-rank-suite`)}),(0,mf.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:m.why}),(0,mf.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-1`,children:m.schema.map(e=>(0,mf.jsx)(`span`,{className:`ars-tag`,style:{background:`var(--ars-c-blue)`,color:`var(--ars-c-blue-ink)`},children:e},e))})]}),(0,mf.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,mf.jsx)(A,{onClick:async()=>{l(!0),p(null);try{d(await D.post(`/packs/apply`,{pack:n,region:i,city:o}))}catch(e){p(e.message)}finally{l(!1)}},busy:c,disabled:!n||!i,children:b(`Apply pack`,`ai-rank-suite`)}),(0,mf.jsx)(`span`,{className:`text-[12px]`,style:{color:`var(--ars-ink-3)`},children:b(`Nothing you have already set will be overwritten.`,`ai-rank-suite`)})]}),f&&(0,mf.jsx)(M,{tone:`serious`,children:f})]})}),u&&(0,mf.jsxs)(mf.Fragment,{children:[(0,mf.jsx)(k,{title:b(`What changed`,`ai-rank-suite`),subtitle:b(`And what was deliberately left alone`,`ai-rank-suite`),children:(0,mf.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-2`,children:[(0,mf.jsxs)(`div`,{children:[(0,mf.jsx)(`div`,{className:`t-overline mb-1.5`,children:b(`Applied`,`ai-rank-suite`)}),u.changed.length===0?(0,mf.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Everything this pack sets was already in place.`,`ai-rank-suite`)}):(0,mf.jsx)(`ul`,{className:`m-0 pl-5 grid gap-1 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:u.changed.map((e,t)=>(0,mf.jsx)(`li`,{children:e},t))})]}),(0,mf.jsxs)(`div`,{children:[(0,mf.jsx)(`div`,{className:`t-overline mb-1.5`,children:b(`Left as you set it`,`ai-rank-suite`)}),u.kept.length===0?(0,mf.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Nothing to preserve — these fields were empty.`,`ai-rank-suite`)}):(0,mf.jsx)(`ul`,{className:`m-0 pl-5 grid gap-1 text-[12.5px]`,style:{color:`var(--ars-ink-3)`},children:u.kept.map((e,t)=>(0,mf.jsx)(`li`,{children:e},t))})]})]})}),(0,mf.jsx)(k,{title:b(`Do these next`,`ai-rank-suite`),subtitle:b(`What the pack cannot fill in for you`,`ai-rank-suite`),children:(0,mf.jsxs)(`div`,{className:`grid gap-4`,children:[(0,mf.jsxs)(`div`,{children:[(0,mf.jsx)(`div`,{className:`t-overline mb-1.5`,children:b(`Market notes`,`ai-rank-suite`)}),(0,mf.jsx)(`ul`,{className:`m-0 pl-5 grid gap-1.5 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:u.notes.map((e,t)=>(0,mf.jsx)(`li`,{children:e},t))})]}),(0,mf.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,mf.jsxs)(`div`,{children:[(0,mf.jsx)(`div`,{className:`t-overline mb-1.5`,children:b(`Identifiers worth adding`,`ai-rank-suite`)}),(0,mf.jsxs)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:[u.identifiers.join(`, `),` — fill these in under Schema → Identity.`]})]}),(0,mf.jsxs)(`div`,{children:[(0,mf.jsx)(`div`,{className:`t-overline mb-1.5`,children:b(`Profiles to link (sameAs)`,`ai-rank-suite`)}),(0,mf.jsx)(`p`,{className:`m-0 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:u.directories.join(`, `)})]})]}),(0,mf.jsxs)(`div`,{children:[(0,mf.jsx)(`div`,{className:`t-overline mb-1.5`,children:b(`FAQ questions that get quoted`,`ai-rank-suite`)}),(0,mf.jsx)(`ul`,{className:`m-0 pl-5 grid gap-1 text-[12.5px]`,style:{color:`var(--ars-ink-2)`},children:u.faq.map((e,t)=>(0,mf.jsx)(`li`,{children:e},t))})]})]})})]})]})}var pf,mf,hf=o((()=>{pf=u(f(),1),C(),O(),dt(),mt(),mf=_e()}));function gf(){return(0,$.jsx)(rt,{blocks:3})}function _f({tab:e,onTab:t}){return(0,$.jsxs)(`div`,{className:`grid gap-4`,children:[(0,$.jsx)(Ie,{tabs:[{id:`feeds`,label:b(`Feeds`,`ai-rank-suite`)},{id:`audit`,label:b(`Catalog audit`,`ai-rank-suite`)}],active:e,onChange:t}),e===`audit`?(0,$.jsx)(qt,{}):(0,$.jsx)(rp,{})]})}function vf({tab:e,onTab:t}){let{tabs:n,active:r}=mp([{id:`pages`,label:b(`Pages`,`ai-rank-suite`)},{id:`urls`,label:b(`URLs & languages`,`ai-rank-suite`),needs:`urls`},{id:`words`,label:b(`Words`,`ai-rank-suite`)},{id:`bulk`,label:b(`Bulk`,`ai-rank-suite`),needs:`bulk`}],e);return(0,$.jsxs)(`div`,{className:`grid gap-4`,children:[(0,$.jsx)(Ie,{tabs:n,active:r,onChange:t}),r===`bulk`&&(0,$.jsx)(Kf,{}),r===`words`&&(0,$.jsx)(Ht,{onOpen:e=>{window.location.hash=`/content/${e}`}}),r===`urls`&&(0,$.jsx)(cp,{}),r!==`bulk`&&r!==`words`&&r!==`urls`&&(0,$.jsx)(jf,{})]})}function yf({tab:e,onTab:t}){return(0,$.jsxs)(`div`,{className:`grid gap-4`,children:[(0,$.jsx)(Ie,{tabs:[{id:`pages`,label:b(`Pages`,`ai-rank-suite`)},{id:`site`,label:b(`Site tests`,`ai-rank-suite`)}],active:e,onChange:t}),e===`site`?(0,$.jsx)(lp,{}):(0,$.jsx)(sp,{})]})}function bf({tab:e,onTab:t}){let{tabs:n,active:r}=mp([{id:`checker`,label:b(`Checker`,`ai-rank-suite`),needs:`link_checker`},{id:`internal`,label:b(`Internal`,`ai-rank-suite`),needs:`internal_links`},{id:`structure`,label:b(`Structure`,`ai-rank-suite`),needs:`internal_links`},{id:`redirects`,label:b(`Redirects`,`ai-rank-suite`)}],e);return(0,$.jsxs)(`div`,{className:`grid gap-4`,children:[(0,$.jsx)(Ie,{tabs:n,active:r,onChange:t}),r===`internal`?(0,$.jsx)(Uf,{}):r===`structure`?(0,$.jsx)(Wf,{}):r===`redirects`?(0,$.jsx)(Gf,{}):(0,$.jsx)(tp,{})]})}function xf({tab:e,onTab:t}){let{tabs:n,active:r}=mp([{id:`overview`,label:b(`Overview`,`ai-rank-suite`)},{id:`insights`,label:b(`Insights`,`ai-rank-suite`),needs:`insights`}],e);return(0,$.jsxs)(`div`,{className:`grid gap-4`,children:[n.length>1&&(0,$.jsx)(Ie,{tabs:n,active:r,onChange:t}),r===`insights`?(0,$.jsx)(kf,{}):(0,$.jsx)(ap,{})]})}function Sf({tab:e,onTab:t}){let{tabs:n,active:r}=mp([{id:`links`,label:b(`Backlinks`,`ai-rank-suite`),needs:`backlinks`},{id:`providers`,label:b(`Data providers`,`ai-rank-suite`),needs:`seo_apis`}],e);return(0,$.jsxs)(`div`,{className:`grid gap-4`,children:[n.length>1&&(0,$.jsx)(Ie,{tabs:n,active:r,onChange:t}),r===`providers`?(0,$.jsx)(fp,{}):(0,$.jsx)(dp,{})]})}function Cf({tab:e,onTab:t}){return(0,$.jsxs)(`div`,{className:`grid gap-4`,children:[(0,$.jsx)(Ie,{tabs:[{id:`general`,label:b(`Modules`,`ai-rank-suite`)},{id:`import`,label:b(`Import & backup`,`ai-rank-suite`)},{id:`compat`,label:b(`Compatibility`,`ai-rank-suite`)},{id:`env`,label:b(`Environment`,`ai-rank-suite`)},{id:`data`,label:b(`Data`,`ai-rank-suite`)},{id:`license`,label:b(`License`,`ai-rank-suite`)}],active:e,onChange:t}),e===`license`?(0,$.jsx)(zf,{}):e===`import`?(0,$.jsx)(Yf,{}):e===`data`?(0,$.jsx)(Vf,{}):e===`compat`?(0,$.jsx)(op,{}):e===`env`?(0,$.jsx)(Hf,{}):(0,$.jsx)(Bf,{})]})}function wf({title:e}){return(0,$.jsx)(`div`,{className:`ars-page`,children:(0,$.jsx)(k,{title:e,children:(0,$.jsxs)(`div`,{className:`ars-pro is-compact`,children:[(0,$.jsx)(`span`,{className:`ars-pro-badge`,children:b(`Pro`,`ai-rank-suite`)}),(0,$.jsx)(`div`,{className:`min-w-0`,children:(0,$.jsx)(`p`,{className:`ars-pro-text`,children:b(`This is part of AI Rank Suite Pro. Everything it has already collected on this site is kept — activating a licence brings the screen back with its data.`,`ai-rank-suite`)})}),(0,$.jsx)(`a`,{className:`ars-btn ars-btn-ghost ars-pro-cta`,href:`#/settings/license`,children:b(`See Pro`,`ai-rank-suite`)})]})})})}function Tf({onOpen:e}){let t={seo:b(`Title and description templates, social cards, and what gets indexed.`,`ai-rank-suite`),schema:b(`Structured data: what each page tells Google and an assistant it is.`,`ai-rank-suite`),sitemap:b(`Which URLs are listed for crawlers, and which are deliberately left out.`,`ai-rank-suite`),"local-seo":b(`Business details, opening hours and locations, for local results and maps.`,`ai-rank-suite`),"llms-txt":b(`The curated map of your site that AI crawlers read instead of guessing.`,`ai-rank-suite`),crawlers:b(`Which AI crawlers may read the site, one by one.`,`ai-rank-suite`),packs:b(`Preset schema, prompts and rules for your industry.`,`ai-rank-suite`),snippets:b(`Your own PHP, CSS and JavaScript, without a child theme.`,`ai-rank-suite`),advanced:b(`robots.txt, .htaccess, breadcrumbs, image SEO.`,`ai-rank-suite`),developer:b(`System status, integrations, hooks and the REST API.`,`ai-rank-suite`),settings:b(`Modules, import and backup, compatibility, environment, data and your licence.`,`ai-rank-suite`)},[n,r]=(0,Df.useState)(null),[i,a]=(0,Df.useState)(null);(0,Df.useEffect)(()=>{D.get(`/setup/status`).then(r).catch(()=>r({})),D.get(`/score`).then(e=>a(e.checks||[])).catch(()=>a([]))},[]);let o=e=>(i||[]).filter(t=>t.status===`fail`&&e.some(e=>t.id.startsWith(e))).length,s=e=>{if(!n||!i)return null;switch(e){case`llms-txt`:return i.some(e=>e.id===`llms_txt_enabled`&&e.status===`pass`)?{tone:`good`,label:b(`Live`,`ai-rank-suite`)}:{tone:`warning`,label:b(`Off`,`ai-rank-suite`)};case`sitemap`:return i.some(e=>e.id===`sitemap_present`&&e.status===`pass`)?{tone:`good`,label:b(`Live`,`ai-rank-suite`)}:{tone:`warning`,label:b(`Missing`,`ai-rank-suite`)};case`seo`:{let e=o([`site_indexable`,`pretty_permalinks`,`tagline_set`]);return e?{tone:`serious`,label:`${e} ${b(`to fix`,`ai-rank-suite`)}`}:{tone:`good`,label:b(`OK`,`ai-rank-suite`)}}case`schema`:{let e=o([`schema_`]);return e?{tone:`serious`,label:`${e} ${b(`to fix`,`ai-rank-suite`)}`}:{tone:`good`,label:b(`OK`,`ai-rank-suite`)}}case`developer`:case`settings`:return n.other_seo_plugin?{tone:`warning`,label:b(`Conflict`,`ai-rank-suite`)}:null;default:return null}},c=xp().map(e=>({...e,status:s(e.id)})),l=c.filter(e=>e.status),u=l.filter(e=>e.status.tone===`good`).length,d=l.length?Math.round(u/l.length*100):0,f=l.filter(e=>e.status.tone!==`good`),p=[{id:`AI search`,label:b(`AI search`,`ai-rank-suite`),lede:b(`What assistants and AI crawlers are allowed to read, and how the site describes itself to them.`,`ai-rank-suite`)},{id:`Search`,label:b(`Search`,`ai-rank-suite`),lede:b(`What Google sees: titles, structured data, sitemap, local presence.`,`ai-rank-suite`)},{id:`Overview`,label:b(`Content`,`ai-rank-suite`),lede:b(`Presets that shape how content is optimised.`,`ai-rank-suite`)},{id:`Store`,label:b(`Store`,`ai-rank-suite`),lede:b(`Product feeds and store checks.`,`ai-rank-suite`)},{id:`System`,label:b(`System`,`ai-rank-suite`),lede:b(`The plumbing: code, imports, environment, licence.`,`ai-rank-suite`)}];return(0,$.jsxs)(`div`,{className:`grid gap-5`,children:[(0,$.jsxs)(`div`,{className:`ars-setup-hero`,children:[(0,$.jsx)(`div`,{className:`ars-setup-hero-ring`,children:(0,$.jsx)(Pe,{value:l.length?d:null,size:112,label:b(`Configured`,`ai-rank-suite`),onLight:!0})}),(0,$.jsxs)(`div`,{className:`grid gap-2 min-w-0`,children:[(0,$.jsx)(`div`,{className:`t-overline`,children:b(`Setup`,`ai-rank-suite`)}),(0,$.jsx)(`h2`,{className:`m-0 text-[20px] font-semibold tracking-tight`,children:!i||!n?b(`Reading the site…`,`ai-rank-suite`):f.length===0?b(`Every area we can check is in a good state.`,`ai-rank-suite`):`${f.length} ${f.length===1?b(`area needs attention`,`ai-rank-suite`):b(`areas need attention`,`ai-rank-suite`)}: ${f.map(e=>e.label).join(`, `)}.`}),(0,$.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`},children:b(`These are configured once and then left alone. The wizard walks the essentials in a few minutes; the AI setup reads a description of your business and proposes the rest.`,`ai-rank-suite`)}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap mt-1`,children:[(0,$.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:()=>{window.location.hash=`/wizard`},children:b(`Run the setup wizard`,`ai-rank-suite`)}),(0,$.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,onClick:()=>{window.location.hash=`/ai-wizard`},children:b(`AI setup from a description`,`ai-rank-suite`)}),(0,$.jsxs)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>e(`dashboard`),children:[b(`Back to reports`,`ai-rank-suite`),` →`]})]})]})]}),n?.checklist&&(0,$.jsxs)(`section`,{className:`ars-card`,children:[(0,$.jsxs)(`div`,{className:`ars-card-head`,children:[(0,$.jsxs)(`div`,{className:`grid gap-1 min-w-0`,children:[(0,$.jsx)(`h3`,{className:`ars-card-title`,children:b(`Setup checklist`,`ai-rank-suite`)}),(0,$.jsx)(`p`,{className:`ars-card-sub`,children:n.checklist.required_done>=n.checklist.required_total?b(`The essentials are done. Everything below them is worth having, not required.`,`ai-rank-suite`):`${n.checklist.required_done} / ${n.checklist.required_total} ${b(`essentials done — do these in order first.`,`ai-rank-suite`)}`})]}),(0,$.jsxs)(`span`,{className:`ars-num`,style:{fontSize:22},children:[n.checklist.done,`/`,n.checklist.total]})]}),(0,$.jsx)(`ol`,{className:`ars-checklist`,children:(()=>{let e=0;return n.checklist.steps.map(t=>{t.done||(e+=1);let n=e;return(0,$.jsxs)(`li`,{className:`ars-checklist-item${t.done?` is-done`:``}`,children:[(0,$.jsx)(`span`,{className:`ars-checklist-mark${t.done?` is-done`:``}`,"aria-hidden":!0,children:t.done?`✓`:n}),(0,$.jsxs)(`span`,{className:`min-w-0 grid gap-0.5`,children:[(0,$.jsxs)(`span`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,$.jsx)(`a`,{href:t.route,className:`font-medium text-[13px]`,children:t.label}),(0,$.jsx)(`span`,{className:`ars-tier is-${t.tier}`,children:t.tier===`required`?b(`required`,`ai-rank-suite`):t.tier===`recommended`?b(`recommended`,`ai-rank-suite`):b(`optional`,`ai-rank-suite`)}),t.note&&(0,$.jsx)(`span`,{className:`t-caption`,children:t.note})]}),(0,$.jsx)(`span`,{className:`t-caption`,children:t.why})]})]},t.id)})})()})]}),p.map(n=>{let r=c.filter(e=>e.group===n.id);return r.length===0?null:(0,$.jsxs)(`section`,{className:`grid gap-3`,children:[(0,$.jsxs)(`div`,{className:`ars-setup-group`,children:[(0,$.jsx)(`h3`,{className:`m-0 text-[14px] font-semibold`,children:n.label}),(0,$.jsx)(`p`,{className:`m-0 t-caption`,children:n.lede})]}),(0,$.jsx)(`div`,{className:`ars-setup-grid`,children:r.map(n=>{let r=n.icon;return(0,$.jsxs)(`button`,{type:`button`,className:`ars-setup-card${n.status?` is-`+n.status.tone:``}`,onClick:()=>e(n.id),children:[(0,$.jsx)(`span`,{className:`ars-setup-icon`,children:(0,$.jsx)(r,{size:17})}),(0,$.jsxs)(`span`,{className:`ars-setup-text`,children:[(0,$.jsxs)(`span`,{className:`ars-setup-name`,children:[n.label,n.status&&(0,$.jsx)(`span`,{className:`ars-setup-status is-${n.status.tone}`,children:n.status.label})]}),(0,$.jsx)(`span`,{className:`ars-setup-what`,children:t[n.id]||``})]}),(0,$.jsx)(`span`,{className:`ars-setup-go`,"aria-hidden":!0,children:`›`})]},n.id)})})]},n.id)})]})}function Ef(){let[e,t]=(0,Df.useState)(kp),[n,r]=(0,Df.useState)(null);(0,Df.useEffect)(()=>{let e=e=>r(e.detail||null);return window.addEventListener(`airanksuite:request-failed`,e),()=>window.removeEventListener(`airanksuite:request-failed`,e)},[]);let[i,a]=(0,Df.useState)(()=>window.location.hash.replace(/^#\/?/,``)===`wizard`||ne.setupDone===!1&&!window.location.hash),[o,s]=(0,Df.useState)(()=>window.location.hash.replace(/^#\/?/,``)===`ai-wizard`);(0,Df.useEffect)(()=>{let e=()=>{let e=window.location.hash.replace(/^#\/?/,``);a(e===`wizard`),s(e===`ai-wizard`)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]);let[c,l]=(0,Df.useState)(``),[u,d]=(0,Df.useState)(()=>{try{let e=window.localStorage.getItem(`airanksuite-rail`);if(e===`mini`)return!1;if(e===`wide`)return!0}catch{}return window.innerWidth>=1280}),[f,p]=(0,Df.useState)(!1),m=()=>{d(e=>{try{window.localStorage.setItem(`airanksuite-rail`,e?`mini`:`wide`)}catch{}return!e})},[h,g]=(0,Df.useState)(ie);(0,Df.useEffect)(()=>{ae(h),h===`dark`?ce():se()},[h]),(0,Df.useEffect)(()=>oe(e=>g(e)),[]);let _=()=>g(e=>e===`dark`?`light`:`dark`);(0,Df.useEffect)(()=>{let e=()=>t(kp());return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]);let v=(n,r)=>{let i=r?`/${n}/${r}`:`/${n}`,a=vp().find(e=>e.id===n),o=a&&a.group!==Tp(e.page)?wp(a.group):null;if(o&&o.url){window.location.assign(`${o.url}#${i}`);return}window.location.hash=i,t({page:n,tab:r||(_p().find(e=>e.id===n)?.tabs?.[0]??null)}),l(``)},y=(0,Df.useMemo)(()=>{let t=Tp(e.page),n=vp().filter(n=>n.group===t&&(!n.hidden||!n.hidden()||n.id===e.page)),r=wp(t);if(r){let e=n.findIndex(e=>e.id===r.route);e>0&&n.unshift(n.splice(e,1)[0])}return t===`System`&&n.push({id:`setup`,label:b(`All settings`,`ai-rank-suite`),setup:!0,group:`System`}),n},[e.page]),x=(0,Df.useMemo)(()=>{let e=c.trim().toLowerCase();return e?vp().filter(t=>t.label.toLowerCase().includes(e)||Sp(t.group).toLowerCase().includes(e)):null},[c]);if(o)return(0,$.jsx)(Df.Suspense,{fallback:(0,$.jsx)(gf,{}),children:(0,$.jsx)(Jf,{onDone:()=>{s(!1),window.location.hash.replace(/^#\/?/,``)===`ai-wizard`&&(window.location.hash=`/dashboard`)}})});if(i)return(0,$.jsx)(Df.Suspense,{fallback:(0,$.jsx)(gf,{}),children:(0,$.jsx)(qf,{onDone:()=>{a(!1),window.location.hash.replace(/^#\/?/,``)===`wizard`&&(window.location.hash=`/dashboard`)}})});let C=vp().find(t=>t.id===e.page)||_p()[0],w=e.page===`setup`||!!C.setup,T=C.view;return(0,$.jsx)(`div`,{className:`pr-4 py-4`,children:(0,$.jsxs)(`div`,{className:`ars-app grid items-stretch${u?` ars-app-wide`:` ars-app-mini`}${f?` is-nav-open`:``}`,children:[(0,$.jsx)(`button`,{type:`button`,className:`ars-nav-scrim`,"aria-label":b(`Close menu`,`ai-rank-suite`),onClick:()=>p(!1)}),(0,$.jsxs)(`nav`,{className:`ars-rail flex flex-col py-3 px-2${u?``:` is-mini`}`,"aria-label":b(`AI Rank Suite`,`ai-rank-suite`),onClick:e=>{e.target.closest(`.ars-nav-item`)&&p(!1)},children:[(0,$.jsxs)(`button`,{type:`button`,onClick:m,className:`ars-brand`,title:b(u?`Collapse navigation`:`Expand navigation`,`ai-rank-suite`),"aria-expanded":u,children:[(0,$.jsx)(`span`,{className:`ars-brand-mark ars-brand-mono`,"aria-hidden":!0,children:String(ne.brand||`AI Rank Suite`).replace(/[^A-Za-z0-9]/g,``).slice(0,1).toUpperCase()||`A`}),u&&(0,$.jsxs)(`span`,{className:`leading-tight text-left min-w-0`,children:[(0,$.jsx)(`span`,{className:`block font-bold text-[15px] truncate ars-brand-name`,children:ne.brand&&ne.brand!==`AI Rank Suite`?(0,$.jsx)(`span`,{className:`ars-grad-text`,children:ne.brand}):(0,$.jsxs)($.Fragment,{children:[`AI Rank `,(0,$.jsx)(`span`,{className:`ars-grad-text`,children:b(`Suite`,`ai-rank-suite`)})]})}),(0,$.jsxs)(`span`,{className:`block text-[10.5px]`,style:{color:`var(--ars-ink-3)`},children:[`v`,ne.version]})]})]}),u&&(0,$.jsx)(`div`,{className:`px-1 pb-1.5`,children:(0,$.jsxs)(`div`,{className:`ars-jump-wrap`,children:[(0,$.jsx)(`input`,{type:`search`,name:`airanksuite-nav-filter`,id:`airanksuite-nav-filter`,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,spellCheck:`false`,"data-form-type":`other`,"data-lpignore":`true`,"data-1p-ignore":`true`,placeholder:b(`Jump to…`,`ai-rank-suite`),value:c,onChange:e=>l(e.target.value),onKeyDown:e=>{e.key===`Enter`&&x&&x[0]&&v(x[0].id),e.key===`Escape`&&l(``)},className:`ars-jump`,"aria-label":b(`Jump to a page`,`ai-rank-suite`)}),c&&(0,$.jsx)(`button`,{type:`button`,className:`ars-jump-clear`,onClick:()=>l(``),"aria-label":b(`Clear the filter`,`ai-rank-suite`),title:b(`Clear the filter`,`ai-rank-suite`),children:`✕`})]})}),(0,$.jsx)(`div`,{className:`grid gap-0.5 overflow-y-auto`,style:{scrollbarWidth:`thin`},children:x?(0,$.jsxs)(`div`,{className:`grid gap-0.5`,children:[x.length===0&&(0,$.jsxs)(`div`,{className:`px-4 py-2 text-[12px] grid gap-1`,style:{color:`var(--ars-ink-3)`},children:[(0,$.jsx)(`span`,{children:S(b(`No screen matches “%s”.`,`ai-rank-suite`),c)}),(0,$.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>l(``),children:b(`Show all screens`,`ai-rank-suite`)})]}),x.map(e=>{let t=e.icon;return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>v(e.id),className:`ars-nav-item`,children:[(0,$.jsx)(t,{size:16}),e.label,(0,$.jsx)(`span`,{className:`ml-auto text-[10px]`,style:{color:`var(--ars-ink-3)`},children:Sp(e.group)})]},e.id)})]}):w?(0,$.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,$.jsxs)(`button`,{type:`button`,onClick:()=>v(`dashboard`),className:`ars-nav-item is-back`,title:b(`Back to the reports`,`ai-rank-suite`),children:[(0,$.jsx)(_t,{size:16}),u&&b(`Back to reports`,`ai-rank-suite`)]}),u&&(0,$.jsx)(`div`,{className:`ars-nav-group`,children:b(`Setup`,`ai-rank-suite`)}),xp().map(t=>{let n=t.icon;return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>v(t.id),title:u?void 0:t.label,"aria-label":t.label,className:`ars-nav-item${e.page===t.id?` is-active`:``}`,children:[(0,$.jsx)(n,{size:16}),u&&t.label]},t.id)})]}):(0,$.jsxs)($.Fragment,{children:[yp.map(t=>{let n=bp().filter(e=>e.group===t);return n.length?(0,$.jsxs)(`div`,{className:`grid gap-0.5`,children:[u?(0,$.jsx)(`div`,{className:`ars-nav-group`,children:Sp(t)}):(0,$.jsx)(`div`,{className:`ars-nav-rule`,"aria-hidden":!0}),n.map(n=>{let r=n.icon;return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>v(n.id),title:u?void 0:`${n.label} — ${t}`,"aria-label":n.label,className:`ars-nav-item${e.page===n.id?` is-active`:``}`,children:[(0,$.jsx)(r,{size:16}),u&&n.label]},n.id)})]},t):null}),(0,$.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,$.jsx)(`div`,{className:`ars-nav-rule`,"aria-hidden":!0}),(0,$.jsxs)(`button`,{type:`button`,onClick:()=>v(`setup`),title:u?void 0:b(`Setup`,`ai-rank-suite`),className:`ars-nav-item is-setup`,children:[(0,$.jsx)(Ct,{size:16}),u&&b(`Setup`,`ai-rank-suite`)]})]})]})}),u&&!ne.whiteLabel&&(0,$.jsx)(`div`,{className:`mt-auto px-3 pt-3 text-[10.5px]`,style:{color:`var(--ars-ink-3)`},children:b(`Built for AI answers and Google search`,`ai-rank-suite`)})]}),(0,$.jsxs)(`div`,{className:`ars-main min-w-0 flex flex-col`,children:[(0,$.jsxs)(`header`,{className:`ars-header flex items-center justify-between gap-3 px-6`,children:[(0,$.jsx)(`button`,{type:`button`,className:`ars-nav-toggle`,"aria-label":b(`Menu`,`ai-rank-suite`),"aria-expanded":f,onClick:()=>p(e=>!e),children:(0,$.jsx)(`span`,{"aria-hidden":!0})}),(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`div`,{className:`t-overline`,style:{fontSize:10,marginBottom:1},children:e.page===`setup`||C.setup?b(`Setup`,`ai-rank-suite`):Sp(C.group)}),(0,$.jsx)(`h1`,{className:`ars-page-title truncate`,children:e.page===`setup`?b(`Setup`,`ai-rank-suite`):C.label})]}),(0,$.jsxs)(`div`,{className:`flex items-center gap-3 shrink-0`,children:[(0,$.jsx)(`button`,{type:`button`,className:`ars-theme-toggle`,onClick:_,"aria-label":b(h===`dark`?`Switch to light theme`:`Switch to dark theme`,`ai-rank-suite`),title:b(h===`dark`?`Light`:`Dark`,`ai-rank-suite`),children:h===`dark`?(0,$.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:[(0,$.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`}),(0,$.jsx)(`path`,{d:`M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4`})]}):(0,$.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,children:(0,$.jsx)(`path`,{d:`M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z`})})}),(0,$.jsx)(`a`,{href:`${ne.homeUrl.replace(/\/$/,``)}/llms.txt`,target:`_blank`,rel:`noreferrer`,className:`ars-theme-toggle ars-header-chip`,title:b(`View your live llms.txt`,`ai-rank-suite`),children:`/llms.txt ↗`})]})]}),n&&(0,$.jsx)(`div`,{className:`px-6 pt-4`,children:(0,$.jsx)(M,{tone:`serious`,children:(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`strong`,{children:b(`That change was not saved.`,`ai-rank-suite`)}),` `,n.message||(n.status===403||n.status===405?S(b(`The server refused a %1$s request (%2$s). Some hosts and firewalls block it — send them this message and ask them to allow it for /wp-json/.`,`ai-rank-suite`),n.method,n.status):S(b(`The server answered %s.`,`ai-rank-suite`),n.status)),(0,$.jsxs)(`div`,{className:`t-caption mt-1`,children:[n.method,` `,n.path]})]}),(0,$.jsx)(`button`,{type:`button`,className:`ars-chip shrink-0`,onClick:()=>r(null),children:b(`Dismiss`,`ai-rank-suite`)})]})})}),y.length>1&&(0,$.jsx)(`nav`,{className:`ars-grouptabs`,"aria-label":Sp(Tp(e.page)),children:y.map(t=>(0,$.jsxs)(`button`,{type:`button`,onClick:()=>v(t.id),"aria-current":e.page===t.id?`page`:void 0,className:`ars-grouptab${e.page===t.id?` is-active`:``}`,children:[t.label,t.needs&&!re(t.needs)&&(0,$.jsx)(`span`,{className:`ars-grouptab-pro`,children:b(`Pro`,`ai-rank-suite`)})]},t.id))}),(0,$.jsx)(`main`,{className:`min-w-0 px-6 py-5 ars-view`,children:e.page===`setup`?(0,$.jsx)(Tf,{onOpen:e=>v(e)}):C.needs&&!re(C.needs)?(0,$.jsx)(wf,{title:C.label}):C.tabs?(0,$.jsx)(Df.Suspense,{fallback:(0,$.jsx)(gf,{}),children:(0,$.jsx)(T,{tab:e.tab||C.tabs[0],onTab:e=>v(C.id,e)})}):(0,$.jsx)(Df.Suspense,{fallback:(0,$.jsx)(gf,{}),children:(0,$.jsx)(T,{})})},e.page+(e.tab||``))]})]})})}var Df,$,Of,kf,Af,jf,Mf,Nf,Pf,Ff,If,Lf,Rf,zf,Bf,Vf,Hf,Uf,Wf,Gf,Kf,qf,Jf,Yf,Xf,Zf,Qf,$f,ep,tp,np,rp,ip,ap,op,sp,cp,lp,up,dp,fp,pp,mp,hp,gp,_p,vp,yp,bp,xp,Sp,Cp,wp,Tp,Ep,Dp,Op,kp,Ap=o((()=>{Df=u(f(),1),C(),O(),he(),$=_e(),Kt(),Zt(),dt(),Vt(),$t(),Of=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(zn(),Nn)),void 0,{}.url)),kf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(tr(),qn)),void 0,{}.url)),Af=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(Lr(),Mr)),void 0,{}.url)),jf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(ua(),Xi)),void 0,{}.url)),Mf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(va(),da)),void 0,{}.url)),Nf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(Oa(),Sa)),void 0,{}.url)),Pf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(Ya(),Ra)),void 0,{}.url)),Ff=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(lo(),no)),void 0,{}.url)),If=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(Eo(),ho)),void 0,{}.url)),Lf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(Yo(),Ho)),void 0,{}.url)),Rf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(ss(),$o)),void 0,{}.url)),zf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(ms(),cs)),void 0,{}.url)),Bf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(Es(),hs)).then(e=>({default:e.Modules})),void 0,{}.url)),Vf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(Es(),hs)).then(e=>({default:e.DataPrivacy})),void 0,{}.url)),Hf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(Es(),hs)).then(e=>({default:e.Environment})),void 0,{}.url)),Uf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(js(),Ds)),void 0,{}.url)),Wf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(Bs(),Ms)),void 0,{}.url)),Gf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(Qs(),Js)),void 0,{}.url)),Kf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(ic(),$s)),void 0,{}.url)),qf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(Jc(),kc)),void 0,{}.url)),Jf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(tl(),Yc)),void 0,{}.url)),Yf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(Oc(),yc)),void 0,{}.url)),Xf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(dl(),ol)),void 0,{}.url)),Zf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(_l(),fl)),void 0,{}.url)),Qf=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(jl(),Sl)),void 0,{}.url)),$f=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(Gl(),Il)),void 0,{}.url)),ep=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(uu(),tu)),void 0,{}.url)),tp=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(gu(),du)),void 0,{}.url)),np=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(Ou(),xu)),void 0,{}.url)),rp=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(Pu(),ku)),void 0,{}.url)),ip=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(zu(),Fu)),void 0,{}.url)),ap=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(qu(),Bu)),void 0,{}.url)),op=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(ed(),Ju)),void 0,{}.url)),sp=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(hd(),od)),void 0,{}.url)),cp=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(Od(),gd)),void 0,{}.url)),lp=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(Pd(),kd)),void 0,{}.url)),up=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(Gd(),zd)),void 0,{}.url)),dp=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(Qd(),Kd)),void 0,{}.url)),fp=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(uf(),$d)),void 0,{}.url)),pp=(0,Df.lazy)(()=>Qt(()=>Promise.resolve().then(()=>(hf(),df)),void 0,{}.url)),mp=(e,t)=>{let n=e.filter(e=>!e.needs||re(e.needs));return n.length===0?{tabs:[],active:t}:{tabs:n,active:n.some(e=>e.id===t)?t:n[0].id}},hp=()=>[{id:`dashboard`,label:b(`Dashboard`,`ai-rank-suite`),icon:_t,view:Of,group:`Overview`},{id:`measure`,label:b(`Overview`,`ai-rank-suite`),icon:xt,view:xf,group:`Measure`,tabs:[`overview`,`insights`]},{id:`content`,label:b(`Content`,`ai-rank-suite`),icon:vt,view:vf,group:`Optimize`,tabs:[`pages`,`urls`,`words`,`bulk`]},{id:`audit`,label:b(`Site Audit`,`ai-rank-suite`),icon:Pt,view:yf,group:`Optimize`,tabs:[`pages`,`site`]},{id:`analyzer`,label:b(`Site analysis`,`ai-rank-suite`),icon:_t,view:Af,group:`Overview`},{id:`packs`,label:b(`Industry packs`,`ai-rank-suite`),icon:zt,view:pp,group:`Overview`,setup:!0},{id:`autopilot`,label:b(`AI Autopilot`,`ai-rank-suite`),icon:Et,view:up,group:`AI search`,needs:`autopilot`},{id:`ai-visibility`,label:b(`AI Answer Simulation`,`ai-rank-suite`),icon:Bt,view:Rf,group:`AI search`,tabs:[`track`,`prompts`,`brand`],needs:`ai_visibility`},{id:`llms-txt`,label:b(`llms.txt`,`ai-rank-suite`),icon:yt,view:Mf,group:`AI search`,tabs:[`short`,`full`,`dev`],setup:!0},{id:`crawlers`,label:b(`AI Crawlers`,`ai-rank-suite`),icon:bt,view:Nf,group:`AI search`,setup:!0},{id:`seo`,label:b(`SEO`,`ai-rank-suite`),icon:St,view:Ff,group:`Search`,tabs:[`general`,`templates`,`social`,`rss`],setup:!0},{id:`schema`,label:b(`Schema`,`ai-rank-suite`),icon:Dt,view:If,group:`Search`,tabs:[`overview`,`identity`,`templates`,`library`,`products`],setup:!0},{id:`sitemap`,label:b(`Sitemap`,`ai-rank-suite`),icon:Nt,view:Zf,group:`Search`,tabs:[`index`,`xml`,`content`,`special`],setup:!0},{id:`local-seo`,label:b(`Local SEO`,`ai-rank-suite`),icon:Ft,view:$f,group:`Search`,setup:!0},{id:`links`,label:b(`Links`,`ai-rank-suite`),icon:Ot,view:bf,group:`Optimize`,tabs:[`checker`,`internal`,`structure`,`redirects`]},{id:`backlinks`,label:b(`Backlinks`,`ai-rank-suite`),icon:It,view:Sf,group:`Measure`,tabs:[`links`,`providers`],needs:`backlinks`},{id:`search-console`,label:b(`Search Console`,`ai-rank-suite`),icon:xt,view:Pf,group:`Measure`,tabs:[`performance`,`keywords`,`bing`]},{id:`google`,label:b(`Indexing`,`ai-rank-suite`),icon:Mt,view:Xf,group:`Measure`,tabs:[`indexing`,`rich`,`bing`,`indexnow`,`verify`]},{id:`analytics`,label:b(`Analytics`,`ai-rank-suite`),icon:Lt,view:ep,group:`Measure`,tabs:[`ga4`,`matomo`,`clarity`,`consent`,`reports`,`speed`]},{id:`shop`,label:b(`Shop`,`ai-rank-suite`),icon:At,view:ip,group:`Shop`,when:()=>!!ne.hasWoo},{id:`feeds`,label:b(`Catalog feeds`,`ai-rank-suite`),icon:jt,view:_f,group:`Shop`,when:()=>!!ne.hasWoo,tabs:[`feeds`,`audit`],needs:`feeds`},{id:`ai`,label:b(`AI Engine`,`ai-rank-suite`),icon:Et,view:Lf,group:`AI search`,needs:`ai`},{id:`advanced`,label:b(`Advanced`,`ai-rank-suite`),icon:Pt,view:Qf,group:`System`,tabs:[`robots`,`htaccess`,`breadcrumbs`,`images`,`ghost`],setup:!0},{id:`developer`,label:b(`Developer`,`ai-rank-suite`),icon:Dt,view:np,group:`System`,tabs:[`status`,`integrations`,`hooks`,`webhooks`,`api`],setup:!0,hidden:()=>!ne.showDeveloper},{id:`settings`,label:b(`Settings`,`ai-rank-suite`),icon:Ct,view:Cf,group:`System`,tabs:[`general`,`import`,`compat`,`env`,`data`,`license`],setup:!0}],gp=null,_p=()=>(gp===null&&(gp=hp()),gp),vp=()=>_p().filter(e=>!e.when||e.when()),yp=[`Overview`,`Shop`,`Optimize`,`Measure`,`AI search`],bp=()=>vp().filter(e=>!e.setup),xp=()=>vp().filter(e=>e.setup),Sp=e=>({Overview:b(`Overview`,`ai-rank-suite`),Shop:b(`Shop`,`ai-rank-suite`),Optimize:b(`Optimize`,`ai-rank-suite`),Measure:b(`Measure`,`ai-rank-suite`),"AI search":b(`AI search`,`ai-rank-suite`),Search:b(`Search`,`ai-rank-suite`),System:b(`System`,`ai-rank-suite`)})[e]||e,Cp=()=>Array.isArray(ne.screens)?ne.screens:[],wp=e=>Cp().find(t=>t.group===e)||null,Tp=e=>{let t=e?vp().find(t=>t.id===e):null;if(t&&t.group)return t.group;let n=Cp().find(e=>e.route===Dp());return n?n.group:`Overview`},Ep={bulk:[`content`,`bulk`],"link-checker":[`links`,`checker`],"internal-links":[`links`,`internal`],redirects:[`links`,`redirects`],license:[`settings`,`license`],social:[`seo`,`social`],"rank-tracker":[`search-console`,`keywords`],coexistence:[`settings`,`compat`],bing:[`search-console`,`bing`],htaccess:[`advanced`,`htaccess`],compatibility:[`settings`,`compat`],insights:[`measure`,`insights`],"seo-apis":[`backlinks`,`providers`],import:[`settings`,`import`],visibility:[`ai-visibility`,null],local:[`local-seo`,null],"local-business":[`local-seo`,null],indexing:[`google`,`indexing`],"rich-results":[`google`,`rich`],indexnow:[`google`,`indexnow`],backup:[`import`,null],export:[`import`,null],tools:[`developer`,`status`],dev:[`developer`,`status`],matomo:[`analytics`,`matomo`],clarity:[`analytics`,`clarity`],ga4:[`analytics`,`ga4`],pagespeed:[`analytics`,`speed`],reports:[`analytics`,`reports`],robots:[`advanced`,`robots`],breadcrumbs:[`advanced`,`breadcrumbs`],images:[`advanced`,`images`],words:[`content`,`words`],products:[`schema`,`products`],store:[`feeds`,`audit`],woocommerce:[`feeds`,`audit`]},Dp=()=>{let e=document.getElementById(`airanksuite-root`);return e&&e.dataset&&e.dataset.route||`dashboard`},Op=()=>{let e=vp().find(e=>e.id===Dp());if(e&&(!e.needs||re(e.needs)))return e;let t=e?e.group:null;return(t?vp().find(e=>e.group===t&&(!e.needs||re(e.needs))):null)||e||vp().find(e=>e.id===`dashboard`)||null},kp=()=>{let e=window.location.hash.match(/^#\/([a-z-]+)(?:\/([a-z-]+))?/);if(!e){let e=Op();return e?{page:e.id,tab:e.tabs?e.tabs[0]:null}:{page:`dashboard`,tab:null}}if(e[1]===`setup`)return{page:`setup`,tab:null};let[t,n]=Ep[e[1]]?Ep[e[1]]:[e[1],e[2]],r=vp().find(e=>e.id===t);if(!r){let e=Op();return e?{page:e.id,tab:e.tabs?e.tabs[0]:null}:{page:`dashboard`,tab:null}}let i=r.tabs&&r.tabs.includes(n)?n:r.tabs?r.tabs[0]:null;return{page:r.id,tab:i}}})),jp=_(),Mp=u(f(),1);C();var Np=_e(),Pp=class extends Mp.Component{constructor(e){super(e),this.state={error:null,info:null}}static getDerivedStateFromError(e){return{error:e}}componentDidMount(){this.onHash=()=>{this.state.error&&this.setState({error:null,info:null})},window.addEventListener(`hashchange`,this.onHash)}componentWillUnmount(){window.removeEventListener(`hashchange`,this.onHash)}componentDidCatch(e,t){this.setState({info:t}),console.error(`AI Rank Suite: a screen failed to render.`,e,t)}isChunkFailure(){let e=String(this.state.error?.message||``);return/Loading chunk|dynamically imported module|Importing a module script failed|Failed to fetch dynamically/i.test(e)||/ChunkLoadError/i.test(String(this.state.error?.name||``))}hardReload(){let e=new URL(window.location.href);e.searchParams.set(`airanksuite-reload`,String(Date.now())),window.location.replace(e.toString())}render(){let{error:e}=this.state;if(!e)return this.props.children;let t=this.isChunkFailure(),n=(window.airanksuiteData||{}).version||`unknown`,r=window.location.hash||`#/`,i=[`AI Rank Suite ${n}`,`Screen: ${r}`,`Error: ${e.name||`Error`}: ${e.message||String(e)}`,this.state.info?.componentStack?`Component: ${String(this.state.info.componentStack).trim().split(`
    106106`)[1]||``}`:``].filter(Boolean).join(`
    107 `);return(0,Tp.jsxs)(`div`,{className:`ars-boundary`,children:[(0,Tp.jsx)(`div`,{className:`ars-boundary-mark`,"aria-hidden":!0,children:`!`}),(0,Tp.jsxs)(`div`,{className:`grid gap-2 min-w-0`,children:[(0,Tp.jsx)(`h2`,{className:`m-0 text-[17px] font-semibold`,children:b(t?`This screen was served from a stale cache`:`This screen could not be drawn`,`ai-rank-suite`)}),(0,Tp.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`,maxWidth:`68ch`},children:b(t?`The plugin was updated but your browser or a caching plugin is still serving the previous version of its code, which asks for files that no longer exist. Reloading past the cache fixes it. If it comes back, clear the site cache (LiteSpeed, WP Rocket, Cloudflare) once.`:`Something in this screen threw an error, so it was stopped rather than left half-drawn. The rest of the plugin is unaffected — every other screen, and everything on the front end, keeps working.`,`ai-rank-suite`)}),(0,Tp.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap mt-1`,children:[(0,Tp.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:()=>this.hardReload(),children:b(`Reload past the cache`,`ai-rank-suite`)}),(0,Tp.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,onClick:()=>{window.location.hash=`/dashboard`,this.setState({error:null,info:null})},children:b(`Back to the dashboard`,`ai-rank-suite`)}),(0,Tp.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>{try{navigator.clipboard.writeText(i)}catch{}},children:b(`Copy the details`,`ai-rank-suite`)})]}),(0,Tp.jsx)(`pre`,{className:`ars-boundary-detail`,children:i})]})]})}};Sp();var Dp=document.getElementById(`airanksuite-root`);Dp&&(!window.airanksuiteData||!window.airanksuiteData.restUrl?Dp.innerHTML=`<div class="ars-boundary"><div class="ars-boundary-mark">!</div><div><h2 class="m-0 text-[17px] font-semibold">The plugin could not read its own settings</h2><p class="m-0 mt-2 text-[13px]">The small script that carries this screen’s configuration did not reach the page. That is almost always a caching or "optimise JavaScript" feature removing inline script — in LiteSpeed, WP Rocket or Autoptimize, exclude this plugin from JavaScript combining and clear the cache.</p></div></div>`:(0,Cp.createRoot)(Dp).render((0,Tp.jsx)(Ep,{children:(0,Tp.jsx)(vf,{})})))})();
     107`);return(0,Np.jsxs)(`div`,{className:`ars-boundary`,children:[(0,Np.jsx)(`div`,{className:`ars-boundary-mark`,"aria-hidden":!0,children:`!`}),(0,Np.jsxs)(`div`,{className:`grid gap-2 min-w-0`,children:[(0,Np.jsx)(`h2`,{className:`m-0 text-[17px] font-semibold`,children:b(t?`This screen was served from a stale cache`:`This screen could not be drawn`,`ai-rank-suite`)}),(0,Np.jsx)(`p`,{className:`m-0 text-[13px]`,style:{color:`var(--ars-ink-2)`,maxWidth:`68ch`},children:b(t?`The plugin was updated but your browser or a caching plugin is still serving the previous version of its code, which asks for files that no longer exist. Reloading past the cache fixes it. If it comes back, clear the site cache (LiteSpeed, WP Rocket, Cloudflare) once.`:`Something in this screen threw an error, so it was stopped rather than left half-drawn. The rest of the plugin is unaffected — every other screen, and everything on the front end, keeps working.`,`ai-rank-suite`)}),(0,Np.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap mt-1`,children:[(0,Np.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-primary`,onClick:()=>this.hardReload(),children:b(`Reload past the cache`,`ai-rank-suite`)}),(0,Np.jsx)(`button`,{type:`button`,className:`ars-btn ars-btn-ghost`,onClick:()=>{window.location.hash=`/dashboard`,this.setState({error:null,info:null})},children:b(`Back to the dashboard`,`ai-rank-suite`)}),(0,Np.jsx)(`button`,{type:`button`,className:`ars-linkbtn`,onClick:()=>{try{navigator.clipboard.writeText(i)}catch{}},children:b(`Copy the details`,`ai-rank-suite`)})]}),(0,Np.jsx)(`pre`,{className:`ars-boundary-detail`,children:i})]})]})}};Ap();var Fp=document.getElementById(`airanksuite-root`);Fp&&(!window.airanksuiteData||!window.airanksuiteData.restUrl?Fp.innerHTML=`<div class="ars-boundary"><div class="ars-boundary-mark">!</div><div><h2 class="m-0 text-[17px] font-semibold">The plugin could not read its own settings</h2><p class="m-0 mt-2 text-[13px]">The small script that carries this screen’s configuration did not reach the page. That is almost always a caching or "optimise JavaScript" feature removing inline script — in LiteSpeed, WP Rocket or Autoptimize, exclude this plugin from JavaScript combining and clear the cache.</p></div></div>`:(0,jp.createRoot)(Fp).render((0,Np.jsx)(Pp,{children:(0,Np.jsx)(Ef,{})})))})();
  • ai-rank-suite/trunk/assets/admin/src/App.jsx

    r3740630 r3753434  
    22import { __, sprintf } from '@wordpress/i18n';
    33import { api, env, moduleRunning } from './api';
    4 import { readTheme, writeTheme, onThemeChange } from './theme.js';
     4import { readTheme, writeTheme, onThemeChange, syncAdminColour, clearAdminColour } from './theme.js';
    55const Dashboard = lazy(() => import('./pages/Dashboard'));
    66const Insights = lazy(() => import('./pages/Insights'));
    … …  
    176176}
    177177
     178/*
     179 * Measure opened with seven tabs, three of which were Pro badges in the free
     180 * edition. "Overview" and "Insights" answer the same question at two levels of
     181 * detail, so they are one screen with two tabs; the row above lost an entry
     182 * without losing a destination.
     183 */
     184function MeasureHub({ tab, onTab }) {
     185        const { tabs, active } = usableTabs(
     186                [
     187                        { id: 'overview', label: __('Overview', 'ai-rank-suite') },
     188                        { id: 'insights', label: __('Insights', 'ai-rank-suite'), needs: 'insights' },
     189                ],
     190                tab
     191        );
     192        return (
     193                <div className="grid gap-4">
     194                        {tabs.length > 1 && <Tabs tabs={tabs} active={active} onChange={onTab} />}
     195                        {active === 'insights' ? <Insights /> : <Measure />}
     196                </div>
     197        );
     198}
     199
     200/* The data providers are the keys that feed the backlink and rank numbers, so
     201   they belong behind the screen that spends them, not beside it. */
     202function BacklinksHub({ tab, onTab }) {
     203        const { tabs, active } = usableTabs(
     204                [
     205                        { id: 'links', label: __('Backlinks', 'ai-rank-suite'), needs: 'backlinks' },
     206                        { id: 'providers', label: __('Data providers', 'ai-rank-suite'), needs: 'seo_apis' },
     207                ],
     208                tab
     209        );
     210        return (
     211                <div className="grid gap-4">
     212                        {tabs.length > 1 && <Tabs tabs={tabs} active={active} onChange={onTab} />}
     213                        {active === 'providers' ? <SeoApis /> : <Backlinks />}
     214                </div>
     215        );
     216}
     217
    178218function SettingsHub({ tab, onTab }) {
    179219        return (
    … …  
    182222                                tabs={[
    183223                                        { id: 'general', label: __('Modules', 'ai-rank-suite') },
     224                                        { id: 'import', label: __('Import & backup', 'ai-rank-suite') },
    184225                                        { id: 'compat', label: __('Compatibility', 'ai-rank-suite') },
    185226                                        { id: 'env', label: __('Environment', 'ai-rank-suite') },
    … …  
    192233                        {tab === 'license' ? (
    193234                                <License />
     235                        ) : tab === 'import' ? (
     236                                <Import />
    194237                        ) : tab === 'data' ? (
    195238                                <DataPrivacy />
    … …  
    230273export const usableTabs = (tabs, active) => {
    231274        const usable = tabs.filter((t) => !t.needs || moduleRunning(t.needs));
     275        // A hub whose every tab belongs to a module this build does not have
     276        // would otherwise read usable[0].id off nothing and take the screen down
     277        // with it. The caller renders its own default in that case.
     278        if (usable.length === 0) return { tabs: [], active };
    232279        return {
    233280                tabs: usable,
    … …  
    258305const buildNav = () => [
    259306        { id: 'dashboard', label: __('Dashboard', 'ai-rank-suite'), icon: IconGauge, view: Dashboard, group: 'Overview' },
    260         { id: 'measure', label: __('Overview', 'ai-rank-suite'), icon: IconChart, view: Measure, group: 'Measure' },
    261         { id: 'insights', label: __('Insights', 'ai-rank-suite'), icon: IconTrend, view: Insights, group: 'Measure', needs: 'insights' },
     307        { id: 'measure', label: __('Overview', 'ai-rank-suite'), icon: IconChart, view: MeasureHub, group: 'Measure', tabs: ['overview', 'insights'] },
    262308        { id: 'content', label: __('Content', 'ai-rank-suite'), icon: IconFile, view: ContentHub, group: 'Optimize', tabs: ['pages', 'urls', 'words', 'bulk'] },
    263309        { id: 'audit', label: __('Site Audit', 'ai-rank-suite'), icon: IconShield, view: AuditHub, group: 'Optimize', tabs: ['pages', 'site'] },
    … …  
    275321        { id: 'local-seo', label: __('Local SEO', 'ai-rank-suite'), icon: IconPin, view: LocalSeo, group: 'Search' , setup: true },
    276322        { id: 'links', label: __('Links', 'ai-rank-suite'), icon: IconLink, view: LinksHub, group: 'Optimize', tabs: ['checker', 'internal', 'structure', 'redirects'] },
    277         { id: 'backlinks', label: __('Backlinks', 'ai-rank-suite'), icon: IconTrend, view: Backlinks, group: 'Measure', needs: 'backlinks' },
    278         { id: 'seo-apis', label: __('SEO data providers', 'ai-rank-suite'), icon: IconLink, view: SeoApis, group: 'Measure', needs: 'seo_apis' },
     323        { id: 'backlinks', label: __('Backlinks', 'ai-rank-suite'), icon: IconTrend, view: BacklinksHub, group: 'Measure', tabs: ['links', 'providers'], needs: 'backlinks' },
    279324
    280325        { id: 'search-console', label: __('Search Console', 'ai-rank-suite'), icon: IconChart, view: SearchConsole, group: 'Measure', tabs: ['performance', 'keywords', 'bing'] },
    … …  
    289334        { id: 'ai', label: __('AI Engine', 'ai-rank-suite'), icon: IconSparkle, view: Ai, group: 'AI search', needs: 'ai' },
    290335        { id: 'advanced', label: __('Advanced', 'ai-rank-suite'), icon: IconShield, view: Advanced, group: 'System' , tabs: ['robots', 'htaccess', 'breadcrumbs', 'images', 'ghost'] , setup: true },
    291         { id: 'import', label: __('Import & backup', 'ai-rank-suite'), icon: IconDownload, view: Import, group: 'System' , setup: true },
    292         { id: 'developer', label: __('Developer', 'ai-rank-suite'), icon: IconCode, view: DevTools, group: 'System' , tabs: ['status', 'integrations', 'hooks', 'webhooks', 'api'] , setup: true },
    293         { id: 'settings', label: __('Settings', 'ai-rank-suite'), icon: IconSliders, view: SettingsHub, group: 'System', tabs: ['general', 'compat', 'env', 'data', 'license'] , setup: true },
     336        /*
     337         * Hooks, webhooks and the REST reference are developer reference, and on a
     338         * site that never calls them the entry is a row of chrome on every screen
     339         * in this group. It appears when WP_DEBUG is on, or when somebody turns it
     340         * on under Settings, and the route itself keeps working either way so an
     341         * existing bookmark does not break.
     342         */
     343        { id: 'developer', label: __('Developer', 'ai-rank-suite'), icon: IconCode, view: DevTools, group: 'System' , tabs: ['status', 'integrations', 'hooks', 'webhooks', 'api'] , setup: true, hidden: () => !env.showDeveloper },
     344        { id: 'settings', label: __('Settings', 'ai-rank-suite'), icon: IconSliders, view: SettingsHub, group: 'System', tabs: ['general', 'import', 'compat', 'env', 'data', 'license'] , setup: true },
    294345];
    295346
    … …  
    400451        htaccess: ['advanced', 'htaccess'],
    401452        compatibility: ['settings', 'compat'],
     453        // Moved in 0.2.46: Insights became a tab of Overview, the data providers a
     454        // tab of Backlinks, and Import a tab of Settings.
     455        insights: ['measure', 'insights'],
     456        'seo-apis': ['backlinks', 'providers'],
     457        import: ['settings', 'import'],
    402458        // The short names people actually type, and the ones used in our own
    403459        // documentation before these screens were renamed. Without them the hash
    … …  
    448504                snippets: __('Your own PHP, CSS and JavaScript, without a child theme.', 'ai-rank-suite'),
    449505                advanced: __('robots.txt, .htaccess, breadcrumbs, image SEO.', 'ai-rank-suite'),
    450                 import: __('Move settings in from another SEO plugin, or back yours up.', 'ai-rank-suite'),
    451506                developer: __('System status, integrations, hooks and the REST API.', 'ai-rank-suite'),
    452                 settings: __('Modules, compatibility, environment, data and your licence.', 'ai-rank-suite'),
     507                settings: __('Modules, import and backup, compatibility, environment, data and your licence.', 'ai-rank-suite'),
    453508        };
    454509
    … …  
    789844        useEffect(() => {
    790845                writeTheme(theme);
     846                // And then take the accent from the admin colour scheme the person
     847                // actually chose, measured off a real core button. Light only: the
     848                // dark palette is lifted for a dark ground and a scheme colour picked
     849                // for a white page is not that colour.
     850                if (theme === 'dark') {
     851                        clearAdminColour();
     852                } else {
     853                        syncAdminColour();
     854                }
    791855        }, [theme]);
    792856        useEffect(() => onThemeChange((t) => setTheme(t)), []);
    … …  
    821885        const groupScreens = useMemo(() => {
    822886                const group = currentGroup(route.page);
    823                 const items = VISIBLE().filter((n) => n.group === group);
     887                const items = VISIBLE().filter(
     888                        (n) => n.group === group && (!n.hidden || !n.hidden() || n.id === route.page)
     889                );
    824890                // The screen the submenu opens leads its own row. Anything else and the
    825891                // first tab is not the page you just clicked, which reads as a jump.
  • ai-rank-suite/trunk/assets/admin/src/components/AiAtWork.jsx

    r3740630 r3753434  
    7171        // the dashboard should not grow an error card for something it never had.
    7272        if (status === false || status === null) return null;
     73
     74        /*
     75         * Without a key this card said nothing the screen above it had not already
     76         * said. The headline, the "AI engine" counter and the first of the next
     77         * three actions all read "no engine connected"; this card made it four,
     78         * and the floor underneath it made it five. One statement is a prompt,
     79         * five are noise. So the card appears once there is a key and there is
     80         * something to report: what ran, what it cost, what is queued.
     81         */
     82        if (!status.has_key) return null;
    7383
    7484        const st = status.state || {};
    … …  
    253263
    254264                                {/*
    255                                   * The floor itself, without the clockwork column — that belongs
    256                                   * to the screen that owns it. Drawn with or without a key: the
    257                                   * dark state is the argument for connecting one, and hiding it
    258                                   * left this card as four words and a button.
     265                                  * The floor itself, without the clockwork column: that belongs
     266                                  * to the screen that owns it. The autopilot screen draws the
     267                                  * whole thing; here it is the short version, and only once
     268                                  * there is a key, so the dashboard does not open with a wall
     269                                  * of desks that are all switched off.
    259270                                  */}
    260271                                {status.routing && (
  • ai-rank-suite/trunk/assets/admin/src/pages/Dashboard.jsx

    r3740630 r3753434  
    366366
    367367                        {/*
    368                          * Second, because the verdict above is what somebody came for — but
    369                          * close enough to the top that "is the AI actually doing anything?"
    370                          * is answered without scrolling. It draws nothing when the module is
    371                          * absent and moves only while a run is genuinely in flight.
     368                         * What to do, before what is wrong.
     369                         *
     370                         * The three actions used to sit below the AI card, which meant the
     371                         * first thing under the verdict was a status report. Somebody who
     372                         * opens this screen has a few minutes: the shortest path from the
     373                         * headline to a fix is the list of fixes, so it comes first.
    372374                         */}
    373                         <AiAtWork />
    374 
    375375                        {priorities.length > 0 && (
    376376                                <Card title={__('Your next 3 actions', 'ai-rank-suite')} subtitle={__('Ordered by impact — finish one, then come back for the next', 'ai-rank-suite')}>
    … …  
    395395                                </Card>
    396396                        )}
     397
     398                        {/*
     399                         * What the AI has actually been doing, with what it cost. Drawn
     400                         * only once an engine is connected; until then there is nothing to
     401                         * report and the verdict above has already asked for a key.
     402                         */}
     403                        <AiAtWork />
    397404
    398405                        {/*
  • ai-rank-suite/trunk/assets/admin/src/styles.css

    r3740630 r3753434  
    88088808        #airanksuite-root .ars-chart-bleed > div:first-child { margin-inline: 8px; }
    88098809}
     8810
     8811/* ===========================================================================
     8812   Core's own geometry (0.2.46)
     8813   ---------------------------------------------------------------------------
     8814   The admin app already borrowed WordPress's typeface, its 13px body and its
     8815   hairline. What still gave it away was the furniture: buttons a touch
     8816   rounder and heavier than core's, a secondary button in a lilac that belongs
     8817   to no admin colour scheme, and a second-level tab row drawn as pills.
     8818
     8819   Nothing here invents a look. Every value is the one core uses, so the two
     8820   sit together whichever colour scheme and whichever WordPress version is
     8821   running: the accent arrives at runtime from the admin's own primary button
     8822   (see theme.js), and the shapes below are core's.
     8823   ======================================================================== */
     8824
     8825#airanksuite-root .ars-btn {
     8826        border-radius: 3px;
     8827        font-weight: 500;
     8828        min-height: 32px;
     8829        padding: 4px 14px;
     8830        line-height: 22px;
     8831        box-shadow: none;
     8832        /* Core's secondary: the accent as text and outline on a near-white
     8833           field. It reads as a button without competing with the primary. */
     8834        background: var(--ars-wp-button-bg);
     8835        border-color: var(--ars-brand);
     8836        color: var(--ars-brand-ink);
     8837}
     8838
     8839#airanksuite-root .ars-btn:hover:not(:disabled) {
     8840        background: #f0f0f1;
     8841        border-color: var(--ars-brand-hover);
     8842        color: var(--ars-brand-hover);
     8843}
     8844
     8845/* The ghost is the quiet one, so it keeps the hairline rather than the
     8846   accent: three accent outlines in a row is a toolbar, not a hierarchy. */
     8847#airanksuite-root .ars-btn.ars-btn-ghost {
     8848        background: transparent;
     8849        border-color: var(--ars-border);
     8850        color: var(--ars-ink);
     8851}
     8852
     8853#airanksuite-root .ars-btn.ars-btn-ghost:hover:not(:disabled) {
     8854        background: var(--ars-surface-2);
     8855        border-color: var(--ars-wp-field-line);
     8856        color: var(--ars-ink);
     8857}
     8858
     8859#airanksuite-root .ars-btn.ars-btn-primary {
     8860        background: var(--ars-brand-fill);
     8861        border-color: var(--ars-brand-fill);
     8862        color: #fff;
     8863}
     8864
     8865#airanksuite-root .ars-btn.ars-btn-primary:hover:not(:disabled) {
     8866        background: var(--ars-brand-fill-hover);
     8867        border-color: var(--ars-brand-fill-hover);
     8868        color: #fff;
     8869}
     8870
     8871/* Core's focus ring, which is a second outline rather than a glow. */
     8872#airanksuite-root .ars-btn:focus-visible {
     8873        outline: 2px solid var(--ars-brand);
     8874        outline-offset: 1px;
     8875        box-shadow: none;
     8876}
     8877
     8878/*
     8879 * Second-level tabs, the way core writes a sub-list: text in the accent, the
     8880 * current one in ink and bold, a hairline under the row. The pill version
     8881 * carried its own border radius, its own fill and its own shadow, which made
     8882 * the row the loudest thing on screens whose content was a table.
     8883 */
     8884#airanksuite-root .ars-tabbar {
     8885        border-bottom: 1px solid var(--ars-wp-line);
     8886        padding-bottom: 0;
     8887        gap: 0;
     8888}
     8889
     8890#airanksuite-root .ars-tab {
     8891        background: transparent;
     8892        border: 1px solid transparent;
     8893        border-bottom: none;
     8894        border-radius: 3px 3px 0 0;
     8895        margin-bottom: -1px;
     8896        padding: 7px 12px;
     8897        font-weight: 400;
     8898        color: var(--ars-brand-ink);
     8899        box-shadow: none;
     8900}
     8901
     8902#airanksuite-root .ars-tab:hover:not(.is-active) {
     8903        background: var(--ars-surface-2);
     8904        color: var(--ars-brand-hover);
     8905}
     8906
     8907#airanksuite-root .ars-tab.is-active {
     8908        background: var(--ars-surface);
     8909        border-color: var(--ars-wp-line);
     8910        border-bottom: 1px solid var(--ars-surface);
     8911        color: var(--ars-ink);
     8912        font-weight: 600;
     8913}
     8914
     8915/* The card header is core's postbox header: the title at 14px/600 in ink,
     8916   the rule under it, and nothing tinted behind it. */
     8917#airanksuite-root .ars-card {
     8918        border-radius: 8px;
     8919}
     8920
     8921#airanksuite-root .ars-card-head .t-title {
     8922        font-size: 14px;
     8923        font-weight: 600;
     8924        color: var(--ars-ink);
     8925}
  • ai-rank-suite/trunk/assets/admin/src/theme.js

    r3740630 r3753434  
    4545        return () => listeners.delete(fn);
    4646}
     47
     48/* ---------------------------------------------------------------------------
     49 * The plugin takes its accent from WordPress, not from a hex of its own.
     50 *
     51 * Every admin colour scheme ships its own primary-button colour, and core
     52 * publishes no custom property for it: --wp-admin-theme-color is the block
     53 * editor's blue and stays #007cba whichever scheme is picked. So the colour is
     54 * read off the thing itself. A real .button-primary is measured once, off
     55 * screen, and what it answers becomes the accent for the whole admin app.
     56 *
     57 * The effect is that somebody running Midnight or Ocean opens this plugin and
     58 * finds their own colour, which is the difference between a plugin that sits
     59 * inside WordPress and one that merely runs there. The hard-coded blue stays
     60 * as the fallback for the case where the probe measures nothing.
     61 * ------------------------------------------------------------------------- */
     62
     63/** Parse "rgb(r, g, b)" / "rgba(...)" into [r,g,b], or null. */
     64const rgbOf = (value) => {
     65        const m = /^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)/.exec(value || '');
     66        if (!m) return null;
     67        const a = /^rgba\(/.test(value) ? Number((/[\d.]+\s*\)$/.exec(value) || ['1'])[0].replace(')', '')) : 1;
     68        if (a < 0.9) return null; // a transparent button tells us nothing
     69        return [Number(m[1]), Number(m[2]), Number(m[3])];
     70};
     71
     72const luminance = ([r, g, b]) => {
     73        const f = (c) => {
     74                const s = c / 255;
     75                return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;
     76        };
     77        return 0.2126 * f(r) + 0.7152 * f(g) + 0.0722 * f(b);
     78};
     79
     80const mix = ([r, g, b], amount) => [
     81        Math.round(r * (1 - amount)),
     82        Math.round(g * (1 - amount)),
     83        Math.round(b * (1 - amount)),
     84];
     85
     86const css = ([r, g, b]) => `rgb(${r}, ${g}, ${b})`;
     87
     88/**
     89 * Measure the admin's own primary button and adopt its colour.
     90 *
     91 * Only in the light theme: the dark one carries a palette lifted for a dark
     92 * ground, and a scheme colour chosen for white text on a light page is not
     93 * the same colour on it. A scheme whose button is too pale for white text
     94 * (Sunrise, Coffee) is darkened until it carries 4.5:1, so a button that was
     95 * legible in core stays legible here.
     96 */
     97export function syncAdminColour() {
     98        const root = document.getElementById('airanksuite-root');
     99        if (!root || root.getAttribute('data-theme') === 'dark') return null;
     100        let probe;
     101        try {
     102                probe = document.createElement('button');
     103                probe.className = 'button button-primary';
     104                probe.setAttribute('aria-hidden', 'true');
     105                probe.tabIndex = -1;
     106                probe.style.cssText = 'position:fixed;left:-9999px;top:-9999px;width:1px;height:1px;pointer-events:none';
     107                document.body.appendChild(probe);
     108                let rgb = rgbOf(window.getComputedStyle(probe).backgroundColor);
     109                probe.remove();
     110                if (!rgb) return null;
     111                // White on the fill has to be readable; darken in small steps rather
     112                // than picking a different colour, so it is still the scheme's own.
     113                let guard = 0;
     114                while ((1.05) / (luminance(rgb) + 0.05) < 4.5 && guard < 12) {
     115                        rgb = mix(rgb, 0.08);
     116                        guard += 1;
     117                }
     118                const base = css(rgb);
     119                const hover = css(mix(rgb, 0.14));
     120                root.style.setProperty('--ars-brand', base);
     121                root.style.setProperty('--ars-brand-ink', base);
     122                root.style.setProperty('--ars-brand-hover', hover);
     123                root.style.setProperty('--ars-brand-fill', base);
     124                root.style.setProperty('--ars-brand-fill-hover', hover);
     125                return base;
     126        } catch {
     127                if (probe && probe.remove) probe.remove();
     128                return null;
     129        }
     130}
     131
     132/** Drop the adopted colour again, so the dark palette is not tinted by it. */
     133export function clearAdminColour() {
     134        const root = document.getElementById('airanksuite-root');
     135        if (!root) return;
     136        for (const n of ['--ars-brand', '--ars-brand-ink', '--ars-brand-hover', '--ars-brand-fill', '--ars-brand-fill-hover']) {
     137                root.style.removeProperty(n);
     138        }
     139}
  • ai-rank-suite/trunk/readme.txt

    r3740809 r3753434  
    55Tested up to: 7.1
    66Requires PHP: 8.1
    7 Stable tag: 0.2.45
     7Stable tag: 0.2.46
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    266266== Changelog ==
    267267
     268= 0.2.46 =
     269* **The admin takes its colour from WordPress.** Whatever admin colour scheme you run, the plugin's buttons, tabs, toggles and charts arrive in it. The accent is measured from one of WordPress's own buttons at load, so Midnight stays Midnight and Sunrise stays Sunrise, on any WordPress version.
     270* Buttons, second-level tabs and card headers use core's own geometry instead of a set of their own: core's radius, core's weight, core's sub-tab row with its rule.
     271* **The dashboard opens with what to do, not with what is missing.** The three next actions moved above the status, and the agent floor, which drew seven connection cards and ten job rows all reading "no engine", now appears only once an engine is connected. The same sentence used to be on the screen five times.
     272* Fewer places to look. Measure went from seven screens to five: Insights is a tab of Overview, and the data providers are a tab of Backlinks. Import and backup is a tab of Settings. The developer reference is there when WP_DEBUG is on, when the `airanksuite_show_developer_tools` filter asks for it, or from the All settings index, and its address keeps working either way.
     273
    268274= 0.2.45 =
    269275* The plugin's own capabilities no longer guard anything. Every REST route and every screen asks WordPress directly, and the capability stands in the route itself: `current_user_can( 'manage_options' )`. Routes that name a post also ask WordPress about that post.
  • ai-rank-suite/trunk/src/Modules/Core/CoreModule.php

    r3740630 r3753434  
    612612                                        ),
    613613                                        'setupDone' => (bool) ( get_option( 'airanksuite_core_settings', array() )['setup_done'] ?? false ),
     614                                        /*
     615                                         * Hooks, webhooks and the REST reference are developer
     616                                         * reference. On a site that never calls them the entry is
     617                                         * a row of chrome on every settings screen, so it shows up
     618                                         * when the site is already in developer mode, when the
     619                                         * setting asks for it, or for a plugin that filters it on.
     620                                         * The screen itself stays reachable by its own address
     621                                         * either way, so an old bookmark still opens.
     622                                         */
     623                                        'showDeveloper' => (bool) apply_filters(
     624                                                'airanksuite_show_developer_tools',
     625                                                ( defined( 'WP_DEBUG' ) && WP_DEBUG )
     626                                                        || ! empty( get_option( 'airanksuite_core_settings', array() )['developer_tools'] )
     627                                        ),
    614628                                        // Which modules are actually running. The free edition ships
    615629                                        // without the Pro folders, so their screens must not be
Note: See TracChangeset for help on using the changeset viewer.