| @@ -42,11 +42,12 @@ | ||
| 42 | 42 | (0,i._n)("%d line","%d lines",s,"thinkrank"),s)),(0,a.createElement)("span",{className:"tr-ml-auto"},(0,a.createElement)(d,{value:n,label:(0,i.sprintf)(/* translators: %s: schema type, e.g. "Organization". */ /* translators: %s: schema type, e.g. "Organization". */ |
| 43 | 43 | (0,i.__)("Copy %s schema","thinkrank"),e)}))),(0,a.createElement)("pre",{className:"tr-m-0 tr-px-4 tr-py-3 tr-bg-[#FAFBFC] tr-border-t tr-border-secondary tr-text-xs tr-leading-relaxed tr-text-primary tr-overflow-auto tr-max-h-80 tr-whitespace-pre-wrap tr-break-words tr-font-mono"},n))},M=({schemaPreview:e})=>{const t=e.rich_snippets||{},r=Object.keys(t);return 0===r.length?(0,a.createElement)("div",{className:"tr-rounded-lg tr-border tr-border-dashed tr-border-primary tr-px-4 tr-py-6 tr-text-center"},(0,a.createElement)("p",{className:"tr-text-sm tr-text-tertiary tr-m-0"},(0,i.__)("No rich snippets preview available. Generate schema markup first.","thinkrank"))):(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-4"},r.map(e=>{let r=t[e];if(r&&"object"==typeof r&&!r.title&&!r.url&&!r.description){const e=Object.keys(r);e.length>0&&(r=r[e[0]])}const n=e=>"string"==typeof e?e:JSON.stringify(e);return(0,a.createElement)("div",{key:e},(0,a.createElement)("p",{className:"tr-text-xs tr-font-medium tr-text-tertiary tr-m-0 tr-mb-1.5"},e),r&&"object"==typeof r?(0,a.createElement)("div",{className:"tr-rounded-lg tr-border tr-border-secondary tr-px-4 tr-py-3"},r.title&&(0,a.createElement)("div",{className:"tr-text-[18px] tr-leading-snug tr-text-[#1a0dab]"},n(r.title)),r.url&&(0,a.createElement)("div",{className:"tr-text-xs tr-text-[#006621] tr-mt-0.5"},n(r.url)),r.description&&(0,a.createElement)("div",{className:"tr-text-[13px] tr-leading-relaxed tr-text-secondary tr-mt-1"},n(r.description)),r.additional_info&&(0,a.createElement)("div",{className:"tr-text-xs tr-text-tertiary tr-mt-2"},"object"==typeof r.additional_info?Object.entries(r.additional_info).map(([e,t])=>(0,a.createElement)("div",{key:e},(0,a.createElement)("strong",null,e,":")," ",n(t))):(0,a.createElement)("div",null,n(r.additional_info)))):(0,a.createElement)("div",{className:"tr-rounded-lg tr-border tr-border-secondary tr-px-4 tr-py-3 tr-text-sm tr-text-tertiary tr-text-center"},(0,i.__)("Preview data not available for this schema type.","thinkrank")))}))},u=({generatedSchemas:e,schemaPreview:t,isGeneratingPreview:r=!1,onGeneratePreview:n})=>{if(!e)return null;const l=e.generated_schemas||{},o=Object.keys(l),{errors:c,hints:u}=(e=>{const t=[],r=[];return(e||[]).forEach(e=>{const a="string"==typeof e?e:e?.message||JSON.stringify(e);("error"===("object"==typeof e?e?.severity||e?.type:"")||/\b(failed|invalid|error|missing required)\b/i.test(a)?t:r).push(a)}),{errors:t,hints:r}})(e.optimization_recommendations),m=JSON.stringify(1===o.length?l[o[0]]:Object.values(l),null,2);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(s.Zp,{className:"tr-mt-6"},(0,a.createElement)(s.aR,{title:(0,i.__)("Generated Schema Markup","thinkrank"),description:(0,i.__)("What the generator produced from your current settings.","thinkrank"),action:o.length>0&&(0,a.createElement)(d,{value:m,label:(0,i.__)("Copy all schema","thinkrank")})}),o.length>0&&(0,a.createElement)("div",{className:"tr-flex tr-flex-wrap tr-items-center tr-gap-2 tr-mb-5"},(0,a.createElement)("span",{className:"tr-text-xs tr-font-medium tr-text-tertiary tr-uppercase tr-tracking-wide"},(0,i.__)("Types","thinkrank")),o.map(e=>(0,a.createElement)(s.Ex,{key:e,variant:"info"},e)),e.deployment_ready&&(0,a.createElement)(s.Ex,{variant:"good",className:"tr-ml-auto"},(0,i.__)("Ready to deploy","thinkrank"))),c.length>0&&(0,a.createElement)("div",{className:"tr-mb-4 tr-rounded-lg tr-border tr-border-danger tr-bg-danger-bg tr-px-4 tr-py-3"},(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-danger tr-m-0 tr-mb-1.5"},(0,i.sprintf)(/* translators: %d: number of validation problems. */ /* translators: %d: number of validation problems. */ |
| 44 | 44 | (0,i._n)("%d problem to fix","%d problems to fix",c.length,"thinkrank"),c.length)),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-4 tr-text-sm tr-text-danger"},c.map((e,t)=>(0,a.createElement)("li",{key:t},e)))),u.length>0&&(0,a.createElement)("div",{className:"tr-mb-4 tr-rounded-lg tr-border tr-border-secondary tr-bg-white tr-px-4 tr-py-3"},(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-secondary tr-m-0 tr-mb-1.5"},(0,i.__)("Recommended additions","thinkrank")),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-4 tr-text-sm tr-text-tertiary"},u.map((e,t)=>(0,a.createElement)("li",{key:t},e)))),o.length>0&&(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-2"},o.map((e,t)=>(0,a.createElement)(g,{key:e,schemaType:e,schemaData:l[e],defaultOpen:0===t})))),(0,a.createElement)(s.Zp,{className:"tr-mt-6"},(0,a.createElement)(s.aR,{title:(0,i.__)("Rich Snippets Preview","thinkrank"),description:(0,i.__)("How your content might appear in search results with this markup.","thinkrank"),action:(0,a.createElement)(s.$n,{variant:"secondary",size:"sm",onClick:n,loading:r,disabled:r||0===o.length},t?(0,i.__)("Refresh Preview","thinkrank"):(0,i.__)("Generate Preview","thinkrank"))}),t?(0,a.createElement)(M,{schemaPreview:t}):(0,a.createElement)("div",{className:"tr-rounded-lg tr-border tr-border-dashed tr-border-primary tr-px-4 tr-py-6 tr-text-center"},(0,a.createElement)("p",{className:"tr-text-sm tr-text-tertiary tr-m-0"},0===o.length?(0,i.__)("Generate schema first, then preview how it appears in search results.","thinkrank"):(0,i.__)("Preview how this markup appears in a Google search result.","thinkrank")))))}},18095:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M3 6.75C3 5.784 3.784 5 4.75 5H15V7.313l.05.027 5.056 2.73.394.212v3.468a1.75 1.75 0 01-1.75 1.75h-.012a2.5 2.5 0 11-4.975 0H9.737a2.5 2.5 0 11-4.975 0H3V6.75zM13.5 14V6.5H4.75a.25.25 0 00-.25.25V14h.965a2.493 2.493 0 011.785-.75c.7 0 1.332.287 1.785.75H13.5zm4.535 0h.715a.25.25 0 00.25-.25v-2.573l-4-2.16v4.568a2.487 2.487 0 011.25-.335c.7 0 1.332.287 1.785.75zM6.282 15.5a1.002 1.002 0 00.968 1.25 1 1 0 10-.968-1.25zm9 0a1 1 0 101.937.498 1 1 0 00-1.938-.498z"}))},18342:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(51609),n=r(27723),i=r(49323);const s=({keywords:e=[""],onChange:t,label:r=(0,n.__)("Keywords","thinkrank"),help:s="",placeholder:l=(0,n.__)("Enter keyword…","thinkrank"),maxItems:o=10})=>{const c=()=>{e.length<o&&t([...e,""])};return(0,a.createElement)("div",null,(0,a.createElement)("span",{className:"tr-block tr-text-sm tr-font-medium tr-text-secondary tr-mb-1"},r),s&&(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-mb-3 tr-m-0 tr-mt-1"},s),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-2 tr-mt-2"},e.map((s,d)=>(0,a.createElement)("div",{key:d,className:"tr-flex tr-items-center tr-gap-2"},(0,a.createElement)("div",{className:"tr-flex-1"},(0,a.createElement)(i.pd,{value:s,onChange:r=>((r,a)=>{const n=[...e];n[r]=a,t(n)})(d,r.target.value),onKeyDown:t=>((t,r)=>{"Enter"===r.key&&(r.preventDefault(),e[t].trim()&&e.length<o&&c())})(d,t),placeholder:l,"aria-label":`${r} ${d+1}`})),e.length>1&&(0,a.createElement)("button",{type:"button",onClick:()=>(r=>{e.length>1&&t(e.filter((e,t)=>t!==r))})(d),title:(0,n.__)("Remove","thinkrank"),className:"tr-shrink-0 tr-flex tr-items-center tr-justify-center tr-w-10 tr-h-10 tr-rounded-md tr-border tr-border-danger tr-bg-white tr-text-danger hover:tr-bg-danger-bg tr-transition-colors"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})))))),e.length<o&&(0,a.createElement)("button",{type:"button",onClick:c,className:"tr-mt-2 tr-inline-flex tr-items-center tr-gap-1.5 tr-text-sm tr-font-medium tr-text-brand hover:tr-text-brand tr-transition-colors"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})),(0,n.__)("Add More","thinkrank")))}},18536:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}))},18955:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,a.createElement)(n.Path,{d:"m4.5 16.5v-9h1.5v9z"}))},19474:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,a.createElement)(n.Path,{d:"m18 16.5v-9h1.5v9z"}))},19533:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"}))},19676:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,a.createElement)(n.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,a.createElement)(n.Path,{d:"m7.5 19.5h9v-1.5h-9z"}))},19781:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z"}))},20074:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 16.5h6V15H7v1.5zm4-4h6V11h-6v1.5zM9 11H7v1.5h2V11zm6 5.5h2V15h-2v1.5z"}))},20285:(e,t,r)=>{"use strict";r.d(t,{Bd3:()=>g.A,M_e:()=>k.A,NxZ:()=>m.A,QR3:()=>a.A,SeW:()=>D.A,Slp:()=>l.A,YAl:()=>d.A,ZSj:()=>h.A,aYu:()=>n.A,c05:()=>M.A,gi5:()=>i.A,iRW:()=>s.A,nfo:()=>o.A,thc:()=>N.A,tkm:()=>y.A,uMJ:()=>p.A,uzy:()=>c.A,y_k:()=>u.A,yoy:()=>x.A}),r(831),r(92053),r(88274),r(7065),r(76044),r(38653),r(73156),r(1311),r(51039),r(30239),r(98977),r(95872),r(23331),r(24704),r(2353),r(86931),r(54899),r(60163),r(18536),r(66120),r(53437),r(48943),r(66124),r(19781),r(37055),r(76997),r(20656),r(20427),r(48157),r(12355),r(72058),r(99749),r(4829);var a=r(26225),n=(r(92213),r(49083),r(61053),r(69730),r(24008),r(22213),r(73227),r(26302),r(30307),r(55873),r(96585),r(48719),r(79312),r(9292),r(43188)),i=(r(80842),r(79926),r(40055),r(65346),r(56964),r(60734),r(98212),r(82030),r(37844),r(98180),r(16418),r(41554),r(67353),r(16762),r(43705),r(76859),r(82189),r(31198),r(66521),r(84242),r(81789),r(1447),r(13849),r(38422),r(85380),r(29151),r(19533),r(63969),r(26698),r(68963),r(23459),r(69851),r(54809),r(44164),r(15857),r(64893),r(24678),r(30443),r(62927),r(81628),r(73592),r(63087),r(53581),r(36358),r(57874),r(83053),r(95301),r(68516),r(66927),r(74555),r(84316),r(51533),r(80091),r(57476)),s=(r(47021),r(97318),r(48787),r(65130),r(65687),r(66912),r(67413),r(49174),r(68819),r(24411),r(1462),r(70887),r(56693),r(15911),r(93318)),l=(r(55732),r(78692)),o=(r(77541),r(60271),r(2694),r(20967),r(70579),r(56038),r(90663),r(15877),r(82434),r(20796),r(2965),r(1375),r(96543),r(66419),r(67293),r(69606),r(50637),r(71808),r(445),r(59613)),c=r(4493),d=(r(34249),r(50701),r(45891),r(37838),r(85657),r(89780),r(28668),r(24263),r(51050),r(26949),r(60733),r(4199),r(63110),r(88219),r(3480),r(65449),r(31600),r(50591)),g=(r(42848),r(10103),r(99637),r(56033),r(17968),r(52835),r(54818),r(6945)),M=(r(80751),r(9679),r(3056),r(23154),r(67114),r(55789),r(36876),r(11594)),u=r(62706),m=(r(98456),r(94517)),N=(r(92231),r(25302),r(89569),r(75483),r(42115),r(7052),r(23387),r(41534),r(63652),r(42793),r(7796),r(49639),r(49946),r(57032)),h=(r(33865),r(644),r(34372),r(81574),r(20074),r(3990),r(8641),r(79096),r(38790),r(85962),r(86529),r(48094),r(93281),r(77277),r(49301)),p=(r(57442),r(6329),r(89577),r(58438),r(16202),r(37940),r(497),r(87965),r(22726),r(53041),r(8593),r(32725),r(69058),r(14945),r(75222),r(27132),r(51589),r(41186)),k=(r(64996),r(98266),r(50016),r(48928),r(94389),r(75025),r(82898),r(56947),r(71080)),y=(r(97845),r(80747),r(18095),r(35410),r(95088),r(43769),r(86261),r(90639),r(52806),r(70390),r(84510),r(99995),r(88882),r(94226),r(90897),r(11365),r(31594),r(16544),r(35166),r(60072),r(32401),r(43767),r(37281),r(57017),r(21198),r(18955),r(19474),r(39439),r(19676),r(49792),r(1659),r(88793),r(16145),r(22307),r(59160),r(24227),r(85063),r(17645),r(64036)),x=(r(40928),r(38255),r(64695),r(30073),r(77344)),D=r(25828);r(92180),r(16250),r(17361),r(15905),r(59550)},20427:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"}))},20551:(e,t,r)=>{"use strict";r.d(t,{A:()=>M});var a=r(51609),n=r(86087),i=r(27723),s=r(49323);const l={blog_post:(0,i.__)("Blog Post","thinkrank"),page:(0,i.__)("Page","thinkrank"),category:(0,i.__)("Category","thinkrank"),product:(0,i.__)("Product","thinkrank")},o=()=>(0,a.createElement)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),(0,a.createElement)("polyline",{points:"9 22 9 12 15 12 15 22"})),c=({breadcrumbs:e,separator:t,prefix:r,showCurrent:n})=>{const i=n?e:e.filter(e=>!e.current);return(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-flex-wrap tr-gap-0.5 tr-text-sm"},r&&(0,a.createElement)("span",{className:"tr-text-tertiary tr-mr-1 tr-text-xs"},r),i.map((e,r)=>(0,a.createElement)("span",{key:r,className:"tr-flex tr-items-center tr-gap-0.5"},e.current?(0,a.createElement)("span",{className:"tr-text-tertiary tr-font-normal"},e.text):(0,a.createElement)("span",{className:"tr-font-medium tr-cursor-default",style:{color:"#1a0dab"}},0===r&&"/"===e.url?(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-gap-1"},(0,a.createElement)(o,null),e.text):e.text),r<i.length-1&&(0,a.createElement)("span",{className:"tr-text-tertiary tr-mx-1 tr-select-none tr-font-normal"},t))))},d=({pageType:e,breadcrumbs:t,settings:r})=>{const n=r.breadcrumb_separator||"›",s=r.breadcrumb_prefix||"",o=!1!==r.show_current_page,d=(o?t:t.filter(e=>!e.current)).length;return(0,a.createElement)("div",{className:"tr-border tr-border-secondary tr-rounded-lg tr-overflow-hidden"},(0,a.createElement)("div",{className:"tr-px-4 tr-py-2 tr-bg-white tr-border-b tr-border-secondary tr-flex tr-items-center tr-justify-between"},(0,a.createElement)("span",{className:"tr-text-xs tr-font-medium tr-text-secondary tr-bg-white tr-border tr-border-secondary tr-px-2 tr-py-0.5 tr-rounded-full"},l[e]||e),(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},d," ",1===d?(0,i.__)("level","thinkrank"):(0,i.__)("levels","thinkrank"))),(0,a.createElement)("div",{className:"tr-px-4 tr-py-3 tr-bg-white"},(0,a.createElement)(c,{breadcrumbs:t,separator:n,prefix:s,showCurrent:o})),(0,a.createElement)("div",{className:"tr-px-4 tr-py-1.5 tr-bg-white tr-border-t tr-border-secondary"},(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},"schema.org/BreadcrumbList · ",d," ",(0,i.__)("items","thinkrank"))))},g=({label:e,value:t})=>(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-1.5 tr-bg-white tr-border tr-border-secondary tr-rounded-full tr-px-3 tr-py-1"},(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},e),(0,a.createElement)("span",{className:"tr-text-xs tr-font-semibold tr-text-secondary"},t)),M=({breadcrumbSettings:e,disabled:t=!1})=>{const[r,l]=(0,n.useState)({});return(0,n.useEffect)(()=>{if(!e.breadcrumbs_enabled)return void l({});const t=e.breadcrumb_home_text||(0,i.__)("Home","thinkrank");l((e=>({blog_post:[{text:e,url:"/",current:!1},{text:"Blog",url:"/blog/",current:!1},{text:"Technology",url:"/category/technology/",current:!1},{text:"Sample Blog Post Title",url:"",current:!0}],page:[{text:e,url:"/",current:!1},{text:"About",url:"/about/",current:!1},{text:"Our Team",url:"",current:!0}],category:[{text:e,url:"/",current:!1},{text:"Blog",url:"/blog/",current:!1},{text:"Technology",url:"",current:!0}],product:[{text:e,url:"/",current:!1},{text:"Shop",url:"/shop/",current:!1},{text:"Electronics",url:"/category/electronics/",current:!1},{text:"Smartphones",url:"/category/smartphones/",current:!1},{text:"iPhone 15 Pro",url:"",current:!0}]}))(t))},[e]),(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,i.__)("Live Breadcrumb Preview","thinkrank")),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0 tr-mt-0.5"},t?(0,i.__)("Enable site identity to see live previews.","thinkrank"):e.breadcrumbs_enabled?(0,i.__)("How your breadcrumbs will appear on each page type","thinkrank"):(0,i.__)("Enable breadcrumbs above to see the preview.","thinkrank"))),(0,a.createElement)("div",{className:"tr-p-5 tr-flex tr-flex-col tr-gap-3"},t||!e.breadcrumbs_enabled?(0,a.createElement)("div",{className:"tr-bg-white tr-border tr-border-secondary tr-rounded-lg tr-p-6 tr-text-center"},(0,a.createElement)("p",{className:"tr-text-sm tr-text-tertiary tr-italic tr-m-0"},t?(0,i.__)("Breadcrumb preview is disabled.","thinkrank"):(0,i.__)("Breadcrumbs are currently disabled.","thinkrank"))):(0,a.createElement)(a.Fragment,null,Object.keys(r).map(t=>(0,a.createElement)(d,{key:t,pageType:t,breadcrumbs:r[t],settings:e})),(0,a.createElement)("div",{className:"tr-bg-brand-bg tr-border tr-border-brand tr-rounded-lg tr-p-4 tr-mt-1"},(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-brand tr-uppercase tr-tracking-wide tr-m-0 tr-mb-3"},(0,i.__)("Active Settings","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-flex-wrap tr-gap-2"},(0,a.createElement)(g,{label:(0,i.__)("Type","thinkrank"),value:e.breadcrumb_type||"hierarchical"}),(0,a.createElement)(g,{label:(0,i.__)("Separator","thinkrank"),value:`"${e.breadcrumb_separator||"›"}"`}),(0,a.createElement)(g,{label:(0,i.__)("Home","thinkrank"),value:`"${e.breadcrumb_home_text||(0,i.__)("Home","thinkrank")}"`}),e.breadcrumb_prefix&&(0,a.createElement)(g,{label:(0,i.__)("Prefix","thinkrank"),value:`"${e.breadcrumb_prefix}"`}),(0,a.createElement)(g,{label:(0,i.__)("Current Page","thinkrank"),value:!1!==e.show_current_page?(0,i.__)("Shown","thinkrank"):(0,i.__)("Hidden","thinkrank")}))))))}},20656:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M14.5 17.5H9.5V16H14.5V17.5Z M14.5 8H9.5V6.5H14.5V8Z M7 3.5H17C18.1046 3.5 19 4.39543 19 5.5V9C19 10.1046 18.1046 11 17 11H7C5.89543 11 5 10.1046 5 9V5.5C5 4.39543 5.89543 3.5 7 3.5ZM17 5H7C6.72386 5 6.5 5.22386 6.5 5.5V9C6.5 9.27614 6.72386 9.5 7 9.5H17C17.2761 9.5 17.5 9.27614 17.5 9V5.5C17.5 5.22386 17.2761 5 17 5Z M7 13H17C18.1046 13 19 13.8954 19 15V18.5C19 19.6046 18.1046 20.5 17 20.5H7C5.89543 20.5 5 19.6046 5 18.5V15C5 13.8954 5.89543 13 7 13ZM17 14.5H7C6.72386 14.5 6.5 14.7239 6.5 15V18.5C6.5 18.7761 6.72386 19 7 19H17C17.2761 19 17.5 18.7761 17.5 18.5V15C17.5 14.7239 17.2761 14.5 17 14.5Z"}))},20796:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m16 15.5h-8v-1.5h8zm-7.5-2.5h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm-9-3h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2z"}),(0,a.createElement)(n.Path,{d:"m18.5 6.5h-13a.5.5 0 0 0 -.5.5v9.5a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-9.5a.5.5 0 0 0 -.5-.5zm-13-1.5h13a2 2 0 0 1 2 2v9.5a2 2 0 0 1 -2 2h-13a2 2 0 0 1 -2-2v-9.5a2 2 0 0 1 2-2z"}))},20967:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"}))},21198:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,a.createElement)(n.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,a.createElement)(n.Path,{d:"m18 7.5v9h1.5v-9z"}))},21788:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});var a=r(47143),n=r(1455),i=r.n(n),s=r(27723);const l={config:null,sections:[],nextRun:null,readiness:null,isLoading:!1,isSaving:!1,isSendingTest:!1,lastSaved:null,lastTestResult:null},o="SET_PAYLOAD",c="UPDATE_FIELD",d="SET_LOADING",g="SET_SAVING",M="SET_SENDING_TEST",u="SET_LAST_SAVED",m="SET_LAST_TEST_RESULT",N={setPayload:e=>({type:o,payload:e}),updateField:(e,t)=>({type:c,key:e,value:t}),setLoading:e=>({type:d,value:e}),setSaving:e=>({type:g,value:e}),setSendingTest:e=>({type:M,value:e}),setLastSaved:e=>({type:u,timestamp:e}),setLastTestResult:e=>({type:m,result:e}),load:()=>async({dispatch:e})=>{e(N.setLoading(!0));try{const t=await i()({path:"/thinkrank/v1/email-report/config"});return e(N.setPayload(t||{})),t}catch(e){throw e}finally{e(N.setLoading(!1))}},save:(e={})=>async({dispatch:t})=>{t(N.setSaving(!0));try{const r=Object.fromEntries(Object.entries(e||{}).filter(([,e])=>void 0!==e)),a=await i()({path:"/thinkrank/v1/email-report/config",method:"POST",data:r});if(!a||!1===a.success)throw new Error(a?.message||(0,s.__)("Failed to save email report settings.","thinkrank"));return t(N.setPayload(a)),t(N.setLastSaved(Date.now())),a}finally{t(N.setSaving(!1))}},sendTest:()=>async({dispatch:e})=>{e(N.setSendingTest(!0)),e(N.setLastTestResult(null));try{const t=await i()({path:"/thinkrank/v1/email-report/test-send",method:"POST"});return e(N.setLastTestResult({...t?.result||{success:!1},not_connected:Boolean(t?.not_connected)})),t}catch(t){throw e(N.setLastTestResult({success:!1,error:t.message})),t}finally{e(N.setSendingTest(!1))}}},h={getConfig:e=>e.config||{},hasLoaded:e=>null!==e.config,getField(e,t,r=""){var a;return null!==(a=e.config?.[t])&&void 0!==a?a:r},getSections:e=>e.sections||[],getNextRun:e=>e.nextRun,getReadiness:e=>e.readiness,isLoading:e=>e.isLoading,isSaving:e=>e.isSaving,isSendingTest:e=>e.isSendingTest,getLastSaved:e=>e.lastSaved,getLastTestResult:e=>e.lastTestResult},p=(0,a.createReduxStore)("thinkrank/email-report",{reducer:(e=l,t)=>{var r,a,n,i,s;switch(t.type){case o:return{...e,config:null!==(r=t.payload.config)&&void 0!==r?r:e.config,sections:null!==(a=t.payload.sections)&&void 0!==a?a:e.sections,nextRun:null!==(n=null!==(i=t.payload.next_run)&&void 0!==i?i:t.payload.nextRun)&&void 0!==n?n:e.nextRun,readiness:null!==(s=t.payload.readiness)&&void 0!==s?s:e.readiness};case c:return{...e,config:{...e.config||{},[t.key]:t.value}};case d:return{...e,isLoading:t.value};case g:return{...e,isSaving:t.value};case M:return{...e,isSendingTest:t.value};case u:return{...e,lastSaved:t.timestamp};case m:return{...e,lastTestResult:t.result};default:return e}},actions:N,selectors:h})},22213:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}))},22307:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z"}))},22726:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z"}))},23154:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"}))},23331:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"}))},23387:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"}))},23459:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"}))},24008:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"}))},24143:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(51609),n=r(27723);const i={postmeta:(0,n.__)("Post Meta","thinkrank"),termmeta:(0,n.__)("Term Meta","thinkrank"),content_blocks:(0,n.__)("FAQ & HowTo Blocks","thinkrank"),settings:(0,n.__)("Settings","thinkrank")},s=({progress:e})=>{const{currentType:t,currentPage:r,totalPages:s,percentage:l,processed:o,skipped:c,failed:d,keywordsTruncated:g}=e,M=[`${(0,n.__)("Processed","thinkrank")}: ${o.toLocaleString()}`];return c>0&&M.push(`${(0,n.__)("Skipped","thinkrank")}: ${c.toLocaleString()}`),d>0&&M.push(`${(0,n.__)("Left unchanged","thinkrank")}: ${d.toLocaleString()}`),g>0&&M.push(`${(0,n.__)("Pro-only keywords","thinkrank")}: ${g.toLocaleString()}`),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-2"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-gap-2"},(0,a.createElement)("span",{className:"tr-text-sm tr-text-secondary"},(0,n.__)("Restoring","thinkrank"),t?(0,a.createElement)("strong",{className:"tr-text-primary"}," ",i[t]||t):"…"),r>0&&s>0&&(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary tr-shrink-0"},(0,n.__)("Chunk","thinkrank")," ",r," ",(0,n.__)("of","thinkrank")," ",s)),(0,a.createElement)("div",{className:"tr-h-2 tr-rounded-full tr-bg-line-2 tr-overflow-hidden"},(0,a.createElement)("div",{className:"tr-h-full tr-rounded-full tr-bg-success",style:{width:`${l}%`,transition:"width 0.3s ease"}})),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-gap-2"},(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},M.join(" · ")),(0,a.createElement)("span",{className:"tr-text-xs tr-font-medium tr-text-tertiary"},l,"%")))}},24227:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M14.103 7.128l2.26-2.26a4 4 0 00-5.207 4.804L5.828 15a2 2 0 102.828 2.828l5.329-5.328a4 4 0 004.804-5.208l-2.261 2.26-1.912-.512-.513-1.912zm-7.214 9.64a.5.5 0 11.707-.707.5.5 0 01-.707.707z"}))},24263:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M18.1823 11.6392C18.1823 13.0804 17.0139 14.2487 15.5727 14.2487C14.3579 14.2487 13.335 13.4179 13.0453 12.2922L13.0377 12.2625L13.0278 12.2335L12.3985 10.377L12.3942 10.3785C11.8571 8.64997 10.246 7.39405 8.33961 7.39405C5.99509 7.39405 4.09448 9.29465 4.09448 11.6392C4.09448 13.9837 5.99509 15.8843 8.33961 15.8843C8.88499 15.8843 9.40822 15.781 9.88943 15.5923L9.29212 14.0697C8.99812 14.185 8.67729 14.2487 8.33961 14.2487C6.89838 14.2487 5.73003 13.0804 5.73003 11.6392C5.73003 10.1979 6.89838 9.02959 8.33961 9.02959C9.55444 9.02959 10.5773 9.86046 10.867 10.9862L10.8772 10.9836L11.4695 12.7311C11.9515 14.546 13.6048 15.8843 15.5727 15.8843C17.9172 15.8843 19.8178 13.9837 19.8178 11.6392C19.8178 9.29465 17.9172 7.39404 15.5727 7.39404C15.0287 7.39404 14.5066 7.4968 14.0264 7.6847L14.6223 9.20781C14.9158 9.093 15.2358 9.02959 15.5727 9.02959C17.0139 9.02959 18.1823 10.1979 18.1823 11.6392Z"}))},24411:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M6 5V18.5911L12 13.8473L18 18.5911V5H6Z"}))},24414:(e,t,r)=>{"use strict";r.d(t,{JP:()=>l,MM:()=>c,Re:()=>s,dT:()=>d,he:()=>o});var a=r(27723),n=r(1455),i=r.n(n);const s=async e=>{try{e.setIsLoading(!0),e.setNotice(null);const t=await i()({path:`/thinkrank/v1/performance/monitor?device_type=${e.deviceType}`,method:"GET"});if(!t.success)throw new Error(t.error||"Failed to load performance data");e.setPerformanceData(t.data),e.setLastUpdated((new Date).toLocaleString())}catch(t){t.message.includes("API key is required")||t.message.includes("not configured")||t.message.includes("not connected")||(t.message.includes("rate limit exceeded")?e.setNotice({status:"warning",message:(0,a.__)("Google API rate limit exceeded. Please try again later.","thinkrank")}):t.message.includes("invalid API key")||t.message.includes("unauthorized")?e.setNotice({status:"error",message:(0,a.__)("Google account token is expired or invalid. Please reconnect your Google account in Integrations > Google Services.","thinkrank")}):e.setNotice({status:"error",message:(0,a.__)("Failed to load performance data. Please check your API configuration in Integrations > Google Services.","thinkrank")})),e.setPerformanceData(null)}finally{e.setIsLoading(!1)}},l=async e=>{try{const t=await i()({path:"/thinkrank/v1/performance/recommendations",method:"GET"});t.success&&e.setRecommendations(t.data)}catch(e){}},o=async(e,t)=>{e.setIsLoadingHistoricalData(!0),e.setHistoricalDataError(null);try{const r=null!=t?t:e.historicalPeriod,n=await i()({path:`/thinkrank/v1/performance/history?days=${r}`,method:"GET"});if(n.success){const t=n.data;if(!t||"object"!=typeof t||Array.isArray(t))return void e.setHistoricalData(null);const r={};["lcp","cls","inp","performance_score"].forEach(e=>{r[e]=Object.entries(t).map(([t,r])=>{var a;return{date:t,value:null!==(a=r[e])&&void 0!==a?a:null}}).filter(e=>null!==e.value)}),e.setHistoricalData(r)}else e.setHistoricalDataError((0,a.__)("Failed to load historical data.","thinkrank"))}catch(t){e.setHistoricalDataError((0,a.__)("Unable to connect to the performance API.","thinkrank"))}finally{e.setIsLoadingHistoricalData(!1)}},c=async e=>{e.setIsLoadingOpportunities(!0),e.setOpportunitiesError(null);try{const t=await i()({path:`/thinkrank/v1/performance/opportunities?device_type=${e.deviceType}`,method:"GET"});t.success?e.setOpportunities(t.data||[]):e.setOpportunitiesError({message:t.message||(0,a.__)("Failed to load opportunities data","thinkrank"),code:t.error_code||""})}catch(t){e.setOpportunitiesError({message:(0,a.__)("Unable to connect to performance API","thinkrank"),code:""})}finally{e.setIsLoadingOpportunities(!1)}},d=async e=>{e.setIsLoadingDiagnostics(!0),e.setDiagnosticsError(null);try{const t=await i()({path:`/thinkrank/v1/performance/diagnostics?device_type=${e.deviceType}`,method:"GET"});t.success?e.setDiagnostics(t.data||[]):e.setDiagnosticsError({message:t.message||(0,a.__)("Failed to load diagnostics data","thinkrank"),code:t.error_code||""})}catch(t){e.setDiagnosticsError({message:(0,a.__)("Unable to connect to performance API","thinkrank"),code:""})}finally{e.setIsLoadingDiagnostics(!1)}}},24678:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM20.0303 9.03033L17.0607 12L20.0303 14.9697L18.9697 16.0303L15.4697 12.5303L14.9393 12L15.4697 11.4697L18.9697 7.96967L20.0303 9.03033Z"}))},24704:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"}))},25021:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(51609),n=r(97500),i=r.n(n),s=r(69839);function l({icon:e,illustration:t=!0,title:r,description:n,action:l,size:o="md",className:c}){const d={sm:{wrapper:"tr-p-6",illo:100},md:{wrapper:"tr-p-10",illo:150},lg:{wrapper:"tr-p-16",illo:180}},g=!e&&t;return(0,a.createElement)("div",{className:i()("tr-flex tr-flex-col tr-items-center tr-justify-center tr-text-center",d[o].wrapper,c)},e&&(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-center tr-w-16 tr-h-16 tr-rounded-full tr-bg-brand-bg tr-mb-4"},(0,a.createElement)(e,{className:"tr-w-7 tr-h-7 tr-text-brand"})),g&&(0,a.createElement)(s.A,{width:d[o].illo,height:d[o].illo}),r&&(0,a.createElement)("h3",{className:"tr-text-base tr-font-semibold tr-text-primary tr-m-0 tr-mt-4"},r),n&&(0,a.createElement)("p",{className:"tr-text-sm tr-text-tertiary tr-mt-1.5 tr-mb-0 tr-max-w-sm"},n),l&&(0,a.createElement)("div",{className:"tr-mt-5"},l))}},25081:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var a=r(51609),n=r(27723),i=r(86087),s=r(1455),l=r.n(s),o=r(49323),c=r(99714),d=r(60775);const g=({records:e,isLoading:t})=>t?(0,a.createElement)(o.u4,{lines:6}):e&&0!==e.length?(0,a.createElement)("div",{className:"tr-overflow-x-auto"},(0,a.createElement)("table",{className:"tr-w-full tr-text-sm"},(0,a.createElement)("thead",null,(0,a.createElement)("tr",{className:"tr-border-b tr-border-secondary"},(0,a.createElement)("th",{className:"tr-text-left tr-py-3 tr-px-4 tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide"},(0,n.__)("Date & Time","thinkrank")),(0,a.createElement)("th",{className:"tr-text-left tr-py-3 tr-px-4 tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide"},(0,n.__)("Action","thinkrank")),(0,a.createElement)("th",{className:"tr-text-left tr-py-3 tr-px-4 tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide"},(0,n.__)("AI Model","thinkrank")),(0,a.createElement)("th",{className:"tr-text-right tr-py-3 tr-px-4 tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide"},(0,n.__)("Tokens","thinkrank")),(0,a.createElement)("th",{className:"tr-text-right tr-py-3 tr-px-4 tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide"},(0,n.__)("Est. Cost","thinkrank")))),(0,a.createElement)("tbody",null,e.map(e=>(0,a.createElement)("tr",{key:e.id,className:"tr-border-b tr-border-secondary hover:tr-bg-white tr-transition-colors"},(0,a.createElement)("td",{className:"tr-py-3 tr-px-4"},(0,a.createElement)("span",{className:"tr-font-medium tr-text-primary"},e.formatted_date)),(0,a.createElement)("td",{className:"tr-py-3 tr-px-4 tr-text-secondary"},e.action.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()).replace(/\bSeo\b/g,"SEO")),(0,a.createElement)("td",{className:"tr-py-3 tr-px-4"},(0,a.createElement)(c.A,{provider:e.provider,model:e.model})),(0,a.createElement)("td",{className:"tr-py-3 tr-px-4 tr-text-right tr-font-mono tr-text-secondary"},e.tokens_used.toLocaleString()),(0,a.createElement)("td",{className:"tr-py-3 tr-px-4 tr-text-right tr-font-mono tr-text-secondary"},"openai_compatible"!==e.provider||e.estimated_cost?`$${e.estimated_cost.toFixed(4)}`:"—")))))):(0,a.createElement)(o.pp,{size:"sm",title:(0,n.__)("No Usage Data Yet","thinkrank"),description:(0,n.__)("No usage records found for the selected period. Start using AI features to see your activity here.","thinkrank")}),M=({currentPage:e,totalPages:t,onPageChange:r,isLoading:i})=>{if(t<=1)return null;let s=Math.max(1,e-Math.floor(2.5));const l=Math.min(t,s+5-1);l-s+1<5&&(s=Math.max(1,l-5+1));const c=Array.from({length:l-s+1},(e,t)=>s+t);return(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-mt-6 tr-pt-4 tr-border-t tr-border-secondary"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-1"},(0,a.createElement)(o.$n,{variant:"secondary",size:"sm",disabled:1===e||i,onClick:()=>r(e-1)},(0,n.__)("Previous","thinkrank")),c.map(t=>(0,a.createElement)(o.$n,{key:t,variant:t===e?"primary":"secondary",size:"sm",disabled:i,onClick:()=>r(t)},t)),(0,a.createElement)(o.$n,{variant:"secondary",size:"sm",disabled:e===t||i,onClick:()=>r(e+1)},(0,n.__)("Next","thinkrank"))),(0,a.createElement)("span",{className:"tr-text-sm tr-text-tertiary"},(0,n.__)("Page","thinkrank")," ",e," ",(0,n.__)("of","thinkrank")," ",t))},u=({period:e="30d",isActive:t=!0})=>{const[r,s]=(0,i.useState)(1),[c]=(0,i.useState)(20),[u,m]=(0,i.useState)(null),[N,h]=(0,i.useState)(!1),[p,k]=(0,i.useState)(null),y=async(t=e,a=r)=>{h(!0),k(null);try{const e=await l()({path:`/thinkrank/v1/analytics/usage?period=${t}&page=${a}&per_page=${c}`,method:"GET"});e.success?m(e.data):k((0,n.__)("Failed to load usage breakdown data.","thinkrank"))}catch(e){d.A.error("Usage breakdown fetch error:",e),k((0,n.__)("Failed to load usage breakdown data.","thinkrank"))}finally{h(!1)}};return(0,i.useEffect)(()=>{t&&(s(1),y(e,1))},[t,e]),(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"tr-flex tr-justify-between tr-items-center tr-mb-6"},(0,a.createElement)("h2",{className:"tr-text-lg tr-font-semibold tr-text-primary tr-m-0"},(0,n.__)("AI Usage Breakdown","thinkrank"))),p&&(0,a.createElement)(o.Fc,{variant:"error",className:"tr-mb-4"},p),(0,a.createElement)(g,{records:u?.usage_records||[],isLoading:N}),u?.pagination&&(0,a.createElement)(M,{currentPage:u.pagination.page,totalPages:u.pagination.total_pages,onPageChange:t=>{s(t),y(e,t)},isLoading:N}),u?.pagination&&(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-text-center tr-mt-3 tr-m-0"},(0,n.sprintf)(/* translators: 1: first row shown, 2: last row shown, 3: total number of records. */ /* translators: 1: first row shown, 2: last row shown, 3: total number of records. */ |
| 45 | 45 | (0,n._n)("Showing %1$d–%2$d of %3$d record","Showing %1$d–%2$d of %3$d records",u.pagination.total_records,"thinkrank"),0===u.pagination.total_records?0:(u.pagination.page-1)*u.pagination.per_page+1,Math.min(u.pagination.page*u.pagination.per_page,u.pagination.total_records),u.pagination.total_records)))}},25302:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,a.createElement)(n.Path,{d:"M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"}))},25353:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var a=r(51609),n=r(27723),i=r(56427),s=r(49323),l=r(93056),o=r(69880);const c=(e,t,r,s)=>(0,a.createElement)(i.Card,{className:"thinkrank-mb-4"},(0,a.createElement)(i.CardBody,null,(0,a.createElement)(l.A,{title:e,data:t,unit:r,thresholds:s,height:320,showArea:!0,color:(()=>{if(!t||0===t.length)return"#0073aa";const e=t[t.length-1]?.value||0;return s?.good&&e<=s.good?"#34a853":s?.needs_improvement&&e<=s.needs_improvement?"#fbbc04":"#921C13"})()}),(0,a.createElement)("div",{className:"thinkrank-chart-stats"},(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"thinkrank-current-value"},t[t.length-1]?.value?.toFixed("score"===r?3:"s"===r?2:0),r),(0,a.createElement)("div",{className:"thinkrank-current-label"},(0,n.__)("Current","thinkrank"))),(0,a.createElement)("div",{className:"thinkrank-trend"},(0,a.createElement)("div",{className:"thinkrank-trend-value "+(t.length>1&&t[t.length-1]?.value<t[t.length-2]?.value?"status-good":"status-poor")},t.length>1?t[t.length-1]?.value<t[t.length-2]?.value?"↓ Better":"↑ Worse":"—"),(0,a.createElement)("div",{className:"thinkrank-trend-label"},(0,n.__)("vs. Previous","thinkrank")))))),d=({historicalData:e,isLoadingHistoricalData:t,historicalDataError:r,historicalPeriod:l,setHistoricalPeriod:d,performanceData:g,onNavigate:M,onRetry:u})=>{if(t)return(0,a.createElement)("div",{className:"tr-empty-state"},(0,a.createElement)(s.u4,{lines:3}));if(r)return(0,a.createElement)(o.A,{error:r,onNavigate:M,onRetry:u,isRetrying:t});const m=e&&(e.lcp?.length>0||e.inp?.length>0||e.cls?.length>0),N=g?.core_web_vitals?.error||g?.core_web_vitals?.message?.includes("not connected");return!m&&N?(0,a.createElement)("div",{className:"thinkrank-cwv-wrapper"},(0,a.createElement)(s.pp,{size:"md",title:(0,n.__)("No Historical Data Available","thinkrank"),description:(0,n.__)("Add a PageSpeed API key or connect your Google account to start collecting historical performance data.","thinkrank"),action:(0,a.createElement)("div",{className:"tr-flex tr-justify-center tr-gap-3"},(0,a.createElement)(i.Button,{variant:"primary",onClick:()=>M&&M("integrations","google-services")},(0,n.__)("Add PageSpeed API Key","thinkrank")),(0,a.createElement)(i.Button,{variant:"secondary",onClick:u,disabled:t},t?(0,n.__)("Retrying…","thinkrank"):(0,n.__)("Retry","thinkrank")))})):m?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(i.Flex,{justify:"space-between",align:"center",style:{marginBottom:"20px"}},(0,a.createElement)("div",null,(0,a.createElement)(i.__experimentalHeading,{level:3,style:{margin:"0 0 4px"}},(0,n.__)("Historical Performance Data","thinkrank")),(0,a.createElement)(i.__experimentalText,{variant:"muted"},(0,n.__)("Showing data for the last","thinkrank")," ",l," ",(0,n.__)("days","thinkrank"))),(0,a.createElement)("div",{className:"thinkrank-cwv-device-tabs"},[28,90].map(e=>(0,a.createElement)("button",{key:e,className:l===e?"active":"",onClick:()=>d(e)},e," ",(0,n.__)("Days","thinkrank"))))),(0,a.createElement)("div",{className:"thinkrank-hist-grid"},e.lcp?.length>0&&c((0,n.__)("Largest Contentful Paint (LCP)","thinkrank"),e.lcp,"s",{good:2.5,needs_improvement:4}),e.inp?.length>0&&c((0,n.__)("Interaction to Next Paint (INP)","thinkrank"),e.inp,"ms",{good:200,needs_improvement:500}),e.cls?.length>0&&c((0,n.__)("Cumulative Layout Shift (CLS)","thinkrank"),e.cls,"score",{good:.1,needs_improvement:.25}))):(0,a.createElement)("div",{className:"thinkrank-cwv-wrapper"},(0,a.createElement)(s.pp,{size:"md",title:(0,n.__)("Collecting Historical Data","thinkrank"),description:(0,n.__)("Historical performance data will appear here as it's collected over time. Data collection runs daily. Check back in a few days to see your performance trends.","thinkrank"),action:(0,a.createElement)(i.Button,{variant:"secondary",onClick:u,disabled:t},t?(0,n.__)("Refreshing…","thinkrank"):(0,n.__)("Refresh Data","thinkrank"))}))}},25828:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(51609),n=r(5573);const i=(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}))},26127:(e,t,r)=>{"use strict";r.d(t,{A:()=>D});var a=r(51609),n=r(86087),i=r(27723),s=r(52619),l=r(1455),o=r.n(l),c=r(49323),d=r(65875),g=r(18342),M=r(82509),u=r(7001),m=r(47388),N=r(58020),h=r(99714),p=r(94288),k=r(60775),y=r(94240),x=r(43526);const D=()=>{const[e,t]=(0,n.useState)({target_keywords:[""],content_type:"blog_post",target_audience:"general",content_length:"medium",tone:"professional",competitor_urls:[""],additional_context:""}),[r,l]=(0,n.useState)(!1),[D,j]=(0,n.useState)(null),[I,E]=(0,n.useState)(null),[z,T]=(0,n.useState)([]),[f,_]=(0,n.useState)(!1),[A,w]=(0,n.useState)(null),b=Boolean(window.thinkrankAdmin?.aiConfigured),O=[{label:(0,i.__)("Blog Post","thinkrank"),value:"blog_post"},{label:(0,i.__)("Product Page","thinkrank"),value:"product_page"},{label:(0,i.__)("Landing Page","thinkrank"),value:"landing_page"},{label:(0,i.__)("Tutorial","thinkrank"),value:"tutorial"}],v=[{label:(0,i.__)("General Audience","thinkrank"),value:"general"},{label:(0,i.__)("Beginners","thinkrank"),value:"beginners"},{label:(0,i.__)("Professionals","thinkrank"),value:"professionals"},{label:(0,i.__)("Experts","thinkrank"),value:"experts"}],L=[{label:(0,i.__)("Short (500-800 words)","thinkrank"),value:"short"},{label:(0,i.__)("Medium (1000-1500 words)","thinkrank"),value:"medium"},{label:(0,i.__)("Long (2000+ words)","thinkrank"),value:"long"}],S=[{label:(0,i.__)("Professional","thinkrank"),value:"professional"},{label:(0,i.__)("Casual","thinkrank"),value:"casual"},{label:(0,i.__)("Technical","thinkrank"),value:"technical"},{label:(0,i.__)("Friendly","thinkrank"),value:"friendly"}];(0,n.useEffect)(()=>{C()},[]);const C=async()=>{try{const e=await o()({path:"/thinkrank/v1/content-brief/list",method:"GET"});e.success&&T(e.data)}catch(e){k.A.error("Failed to load saved briefs:",e)}},Q=(e,r)=>{t(t=>({...t,[e]:r}))},U=e=>{let t="";if(e.title&&Array.isArray(e.title)&&e.title[0]?(t+=`Content Brief: "${e.title[0]}"\n`,t+="=".repeat(60)+"\n\n"):e.title&&"string"==typeof e.title&&(t+=`Content Brief: "${e.title}"\n`,t+="=".repeat(60)+"\n\n"),e.generation_params){const r=e.generation_params;t+="BRIEF CONFIGURATION\n",t+="-".repeat(30)+"\n",t+=`Target Keywords: ${r.target_keywords?.join(", ")||"N/A"}\n`,t+=`Content Type: ${r.content_type||"N/A"}\n`,t+=`Target Audience: ${r.target_audience||"N/A"}\n`,t+=`Content Length: ${r.content_length||"N/A"}\n`,t+=`Tone: ${r.tone||"N/A"}\n`,r.competitor_urls&&r.competitor_urls.length>0&&(t+=`Competitor URLs: ${r.competitor_urls.join(", ")}\n`),r.additional_context&&(t+=`Additional Context: ${r.additional_context}\n`),t+="\n"}if(e.title&&Array.isArray(e.title)&&e.title.length>1&&(t+="TITLE SUGGESTIONS\n",t+="-".repeat(30)+"\n",e.title.forEach((e,r)=>{t+=`${r+1}. ${e}\n`}),t+="\n"),e.outline&&Array.isArray(e.outline)&&e.outline.length>0&&(t+="CONTENT OUTLINE\n",t+="-".repeat(30)+"\n",e.outline.forEach((e,r)=>{const a=" ".repeat((e.level||1)-1);t+=`${a}${r+1}. ${e.heading||e}`,e.word_count&&e.word_count>0&&(t+=` (${e.word_count} words)`),t+="\n",e.key_points&&Array.isArray(e.key_points)&&e.key_points.length>0&&e.key_points.forEach(e=>{t+=`${a} • ${e}\n`}),t+="\n"})),e.seo_recommendations){t+="SEO RECOMMENDATIONS\n",t+="-".repeat(30)+"\n";const r=e.seo_recommendations;r.related_keywords&&r.related_keywords.length>0&&(t+=`Related Keywords: ${r.related_keywords.join(", ")}\n`),r.internal_links&&r.internal_links.length>0&&(t+="Internal Linking Opportunities:\n",r.internal_links.forEach(e=>{t+=` • ${e}\n`})),t+="\n"}return e.call_to_actions&&e.call_to_actions.length>0&&(t+="CALL-TO-ACTION SUGGESTIONS\n",t+="-".repeat(30)+"\n",e.call_to_actions.forEach((e,r)=>{t+=`${r+1}. ${e}\n`}),t+="\n"),t+="=".repeat(60)+"\n",e.created_at&&(t+=`Generated on: ${e.created_at}\n`),t+="Powered by ThinkRank\n",t};return(0,a.createElement)("div",null,I&&(0,a.createElement)(c.Fc,{variant:"error",className:"tr-mb-6",onDismiss:()=>E(null)},(0,x.A)(I)),(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-1 lg:tr-grid-cols-5 tr-gap-6 tr-mb-8"},(0,a.createElement)("div",{className:"lg:tr-col-span-3"},(0,a.createElement)("div",{className:"tr-bg-white tr-rounded-xl tr-shadow-sm tr-overflow-hidden"},(0,a.createElement)("div",{className:"tr-relative tr-overflow-hidden tr-bg-[linear-gradient(90deg,#4c4cff_58%,#3535b0_118%)] tr-px-6 tr-py-5 tr-flex tr-items-center tr-gap-3.5"},(0,a.createElement)("span",{"aria-hidden":"true",className:"tr-pointer-events-none tr-absolute tr-top-[-2.5rem] tr-right-[-2rem] tr-w-40 tr-h-40 tr-rounded-full tr-bg-white/10 tr-blur-2xl"}),(0,a.createElement)("span",{"aria-hidden":"true",className:"tr-pointer-events-none tr-absolute tr-bottom-[-3rem] tr-left-[6rem] tr-w-32 tr-h-32 tr-rounded-full tr-bg-white/5 tr-blur-2xl"}),(0,a.createElement)("span",{className:"tr-relative tr-flex tr-items-center tr-justify-center tr-w-11 tr-h-11 tr-rounded-xl tr-bg-white/15 tr-ring-1 tr-ring-white/25 tr-text-white tr-shrink-0 tr-shadow-sm"},(0,a.createElement)("svg",{className:"tr-w-5 tr-h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},(0,a.createElement)("path",{d:"M12 3l1.9 4.6L18.5 9.5l-4.6 1.9L12 16l-1.9-4.6L5.5 9.5l4.6-1.9L12 3z"}),(0,a.createElement)("path",{d:"M19 15l.7 1.8L21.5 17.5l-1.8.7L19 20l-.7-1.8L16.5 17.5l1.8-.7L19 15z"}))),(0,a.createElement)("div",{className:"tr-relative"},(0,a.createElement)("h3",{className:"tr-text-white tr-font-semibold tr-text-base tr-m-0 tr-leading-tight"},(0,i.__)("Create Content Brief","thinkrank")),(0,a.createElement)("p",{className:"tr-text-white/70 tr-text-xs tr-m-0 tr-mt-0.5"},(0,i.__)("AI-powered content strategy and optimization","thinkrank")))),(0,a.createElement)("div",{className:"tr-p-6 tr-flex tr-flex-col tr-gap-6"},(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-5"},(0,a.createElement)(g.A,{keywords:e.target_keywords,onChange:e=>{t(t=>({...t,target_keywords:e}))},label:(0,i.__)("Target Keywords","thinkrank"),help:(0,i.__)("Enter your primary and secondary keywords","thinkrank")}),(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-1 sm:tr-grid-cols-2 tr-gap-4"},(0,a.createElement)(c.l6,{label:(0,i.__)("Content Type","thinkrank"),value:e.content_type,options:O,onChange:e=>Q("content_type",e.target.value)}),(0,a.createElement)(c.l6,{label:(0,i.__)("Target Audience","thinkrank"),value:e.target_audience,options:v,onChange:e=>Q("target_audience",e.target.value)}),(0,a.createElement)(c.l6,{label:(0,i.__)("Content Length","thinkrank"),value:e.content_length,options:L,onChange:e=>Q("content_length",e.target.value)}),(0,a.createElement)(c.l6,{label:(0,i.__)("Tone","thinkrank"),value:e.tone,options:S,onChange:e=>Q("tone",e.target.value)}))),(0,a.createElement)("div",{className:"tr-border-t tr-border-secondary tr-pt-6 tr-flex tr-flex-col tr-gap-4"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2"},(0,a.createElement)("span",{className:"tr-text-[11px] tr-font-semibold tr-uppercase tr-tracking-wide tr-text-tertiary"},(0,i.__)("Advanced Options","thinkrank")),(0,a.createElement)("span",{className:"tr-flex-1 tr-h-px tr-bg-secondary","aria-hidden":"true"})),(0,a.createElement)(g.A,{keywords:e.competitor_urls,onChange:e=>{t(t=>({...t,competitor_urls:e}))},label:(0,i.__)("Competitor URLs (Optional)","thinkrank"),help:(0,i.__)("Add competitor URLs for comprehensive analysis. Analysis may take 30-60 seconds.","thinkrank"),placeholder:(0,i.__)("https://example.com/competitor-article","thinkrank")}),(0,a.createElement)(d.T,{label:(0,i.__)("Additional Context","thinkrank"),value:e.additional_context,onChange:e=>Q("additional_context",e.target.value),placeholder:(0,i.__)("Any specific requirements, brand guidelines, or context…","thinkrank"),rows:3}))),(0,a.createElement)("div",{className:"tr-px-6 tr-py-4 tr-bg-white tr-border-t tr-border-secondary"},(0,a.createElement)(c.$n,{variant:"primary",size:"lg",className:"tr-w-full tr-justify-center tr-bg-brand tr-border-0 hover:tr-bg-[#3641D9]",onClick:async()=>{E(null);const t=(()=>{const t=[];0===e.target_keywords.filter(e=>""!==e.trim()).length&&t.push((0,i.__)("At least one target keyword is required.","thinkrank"));const r=e.competitor_urls.filter(e=>""!==e.trim());for(const e of r)try{new URL(e)}catch{t.push((0,i.__)(`Invalid URL: ${e}`,"thinkrank"))}return t})();if(t.length>0)E(t.join(" "));else{l(!0);try{const t={...e,target_keywords:e.target_keywords.filter(e=>""!==e.trim()),competitor_urls:e.competitor_urls.filter(e=>""!==e.trim())},r=await o()({path:"/thinkrank/v1/content-brief/generate",method:"POST",data:t});r.success?(j(r.data),C(),setTimeout(()=>{const e=document.getElementById("generated-content-section");e&&e.scrollIntoView({behavior:"smooth",block:"start"})},200)):E(r.message||(0,i.__)("Failed to generate content brief.","thinkrank"))}catch(e){e.message&&e.message.includes("Please configure your AI provider")?E(e.message):(k.A.error("Brief generation error:",e),E(e.message||(0,i.__)("An error occurred while generating the content brief.","thinkrank")))}finally{l(!1)}}},loading:r,disabled:r||!b,title:b?void 0:(0,i.__)("Configure an AI provider in Settings to enable AI generation","thinkrank")},!r&&(0,a.createElement)("svg",{"aria-hidden":"true",width:"14",height:"17",viewBox:"0 0 15 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"tr-mr-1.5 tr-text-white"},(0,a.createElement)("path",{d:"M5.58072 3.39707L6.0826 4.79082C6.35798 5.55489 6.79852 6.2488 7.37282 6.8231C7.94712 7.3974 8.64103 7.83794 9.4051 8.11332L10.7988 8.6152C10.8264 8.62529 10.8501 8.64359 10.8669 8.66762C10.8837 8.69165 10.8927 8.72026 10.8927 8.74957C10.8927 8.77888 10.8837 8.80749 10.8669 8.83152C10.8501 8.85556 10.8264 8.87385 10.7988 8.88395L9.4051 9.38582C8.64103 9.6612 7.94712 10.1017 7.37282 10.676C6.79852 11.2503 6.35798 11.9443 6.0826 12.7083L5.58072 14.1021C5.57063 14.1296 5.55233 14.1534 5.5283 14.1701C5.50427 14.1869 5.47566 14.1959 5.44635 14.1959C5.41704 14.1959 5.38843 14.1869 5.3644 14.1701C5.34036 14.1534 5.32207 14.1296 5.31197 14.1021L4.8101 12.7083C4.53472 11.9443 4.09418 11.2503 3.51988 10.676C2.94558 10.1017 2.25167 9.6612 1.4876 9.38582L0.093849 8.88395C0.0663279 8.87385 0.0425693 8.85556 0.025785 8.83152C0.00900062 8.80749 0 8.77888 0 8.74957C0 8.72026 0.00900062 8.69165 0.025785 8.66762C0.0425693 8.64359 0.0663279 8.62529 0.093849 8.6152L1.4876 8.11332C2.25167 7.83794 2.94558 7.3974 3.51988 6.8231C4.09418 6.2488 4.53472 5.55489 4.8101 4.79082L5.31197 3.39707C5.32179 3.36927 5.33998 3.3452 5.36405 3.32817C5.38811 3.31115 5.41687 3.302 5.44635 3.302C5.47583 3.302 5.50459 3.31115 5.52865 3.32817C5.55272 3.3452 5.57091 3.36927 5.58072 3.39707ZM11.8545 0.0476961L12.1088 0.753321C12.2484 1.14018 12.4715 1.49151 12.7624 1.78232C13.0532 2.07313 13.4045 2.29625 13.7913 2.43582L14.497 2.6902C14.511 2.69529 14.523 2.70455 14.5316 2.71674C14.5401 2.72893 14.5447 2.74344 14.5447 2.75832C14.5447 2.7732 14.5401 2.78772 14.5316 2.7999C14.523 2.81209 14.511 2.82136 14.497 2.82645L13.7913 3.08082C13.4045 3.22039 13.0532 3.44352 12.7624 3.73432C12.4715 4.02513 12.2484 4.37646 12.1088 4.76332L11.8545 5.46895C11.8494 5.48293 11.8401 5.495 11.8279 5.50353C11.8157 5.51207 11.8012 5.51664 11.7863 5.51664C11.7715 5.51664 11.757 5.51207 11.7448 5.50353C11.7326 5.495 11.7233 5.48293 11.7182 5.46895L11.4639 4.76332C11.3243 4.37646 11.1012 4.02513 10.8103 3.73432C10.5195 3.44352 10.1682 3.22039 9.78135 3.08082L9.07572 2.82645C9.06174 2.82136 9.04967 2.81209 9.04114 2.7999C9.03261 2.78772 9.02803 2.7732 9.02803 2.75832C9.02803 2.74344 9.03261 2.72893 9.04114 2.71674C9.04967 2.70455 9.06174 2.69529 9.07572 2.6902L9.78135 2.43582C10.1682 2.29625 10.5195 2.07313 10.8103 1.78232C11.1012 1.49151 11.3243 1.14018 11.4639 0.753321L11.7182 0.0476961C11.7233 0.0337168 11.7326 0.0216418 11.7448 0.0131093C11.757 0.00457683 11.7715 0 11.7863 0C11.8012 0 11.8157 0.00457683 11.8279 0.0131093C11.8401 0.0216418 11.8494 0.0337168 11.8545 0.0476961ZM11.8545 12.0308L12.1088 12.7364C12.2484 13.1233 12.4715 13.4746 12.7624 13.7654C13.0532 14.0563 13.4045 14.2794 13.7913 14.4189L14.497 14.6733C14.511 14.6784 14.523 14.6877 14.5316 14.6999C14.5401 14.7121 14.5447 14.7266 14.5447 14.7414C14.5447 14.7563 14.5401 14.7708 14.5316 14.783C14.523 14.7952 14.511 14.8045 14.497 14.8096L13.7913 15.0639C13.4045 15.2035 13.0532 15.4266 12.7624 15.7174C12.4715 16.0083 12.2484 16.3596 12.1088 16.7464L11.8545 17.4521C11.8494 17.4661 11.8401 17.4781 11.8279 17.4867C11.8157 17.4952 11.8012 17.4998 11.7863 17.4998C11.7715 17.4998 11.757 17.4952 11.7448 17.4867C11.7326 17.4781 11.7233 17.4661 11.7182 17.4521L11.4639 16.7464C11.3243 16.3596 11.1012 16.0083 10.8103 15.7174C10.5195 15.4266 10.1682 15.2035 9.78135 15.0639L9.07572 14.8096C9.06174 14.8045 9.04967 14.7952 9.04114 14.783C9.03261 14.7708 9.02803 14.7563 9.02803 14.7414C9.02803 14.7266 9.03261 14.7121 9.04114 14.6999C9.04967 14.6877 9.06174 14.6784 9.07572 14.6733L9.78135 14.4189C10.1682 14.2794 10.5195 14.0563 10.8103 13.7654C11.1012 13.4746 11.3243 13.1233 11.4639 12.7364L11.7182 12.0308C11.7413 11.9671 11.832 11.9671 11.8545 12.0308Z",fill:"currentColor"})),r?e.competitor_urls.filter(e=>e.trim()).length>0?(0,i.__)("Analyzing competitors & generating…","thinkrank"):(0,i.__)("Generating Brief…","thinkrank"):(0,i.__)("Generate Content Brief","thinkrank")),!b&&(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-text-center tr-m-0 tr-mt-2"},(0,i.__)("Add an AI provider API key in ThinkRank → Settings to enable content brief generation.","thinkrank"))))),(0,a.createElement)("div",{className:"lg:tr-col-span-2 tr-relative"},(0,a.createElement)("div",{className:"tr-bg-white tr-rounded-xl tr-shadow-sm tr-overflow-hidden tr-flex tr-flex-col lg:tr-absolute lg:tr-inset-0"},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary tr-flex tr-items-center tr-gap-2"},(0,a.createElement)("svg",{"aria-hidden":"true",width:"14",height:"17",viewBox:"0 0 15 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"tr-text-brand"},(0,a.createElement)("path",{d:"M5.58072 3.39707L6.0826 4.79082C6.35798 5.55489 6.79852 6.2488 7.37282 6.8231C7.94712 7.3974 8.64103 7.83794 9.4051 8.11332L10.7988 8.6152C10.8264 8.62529 10.8501 8.64359 10.8669 8.66762C10.8837 8.69165 10.8927 8.72026 10.8927 8.74957C10.8927 8.77888 10.8837 8.80749 10.8669 8.83152C10.8501 8.85556 10.8264 8.87385 10.7988 8.88395L9.4051 9.38582C8.64103 9.6612 7.94712 10.1017 7.37282 10.676C6.79852 11.2503 6.35798 11.9443 6.0826 12.7083L5.58072 14.1021C5.57063 14.1296 5.55233 14.1534 5.5283 14.1701C5.50427 14.1869 5.47566 14.1959 5.44635 14.1959C5.41704 14.1959 5.38843 14.1869 5.3644 14.1701C5.34036 14.1534 5.32207 14.1296 5.31197 14.1021L4.8101 12.7083C4.53472 11.9443 4.09418 11.2503 3.51988 10.676C2.94558 10.1017 2.25167 9.6612 1.4876 9.38582L0.093849 8.88395C0.0663279 8.87385 0.0425693 8.85556 0.025785 8.83152C0.00900062 8.80749 0 8.77888 0 8.74957C0 8.72026 0.00900062 8.69165 0.025785 8.66762C0.0425693 8.64359 0.0663279 8.62529 0.093849 8.6152L1.4876 8.11332C2.25167 7.83794 2.94558 7.3974 3.51988 6.8231C4.09418 6.2488 4.53472 5.55489 4.8101 4.79082L5.31197 3.39707C5.32179 3.36927 5.33998 3.3452 5.36405 3.32817C5.38811 3.31115 5.41687 3.302 5.44635 3.302C5.47583 3.302 5.50459 3.31115 5.52865 3.32817C5.55272 3.3452 5.57091 3.36927 5.58072 3.39707ZM11.8545 0.0476961L12.1088 0.753321C12.2484 1.14018 12.4715 1.49151 12.7624 1.78232C13.0532 2.07313 13.4045 2.29625 13.7913 2.43582L14.497 2.6902C14.511 2.69529 14.523 2.70455 14.5316 2.71674C14.5401 2.72893 14.5447 2.74344 14.5447 2.75832C14.5447 2.7732 14.5401 2.78772 14.5316 2.7999C14.523 2.81209 14.511 2.82136 14.497 2.82645L13.7913 3.08082C13.4045 3.22039 13.0532 3.44352 12.7624 3.73432C12.4715 4.02513 12.2484 4.37646 12.1088 4.76332L11.8545 5.46895C11.8494 5.48293 11.8401 5.495 11.8279 5.50353C11.8157 5.51207 11.8012 5.51664 11.7863 5.51664C11.7715 5.51664 11.757 5.51207 11.7448 5.50353C11.7326 5.495 11.7233 5.48293 11.7182 5.46895L11.4639 4.76332C11.3243 4.37646 11.1012 4.02513 10.8103 3.73432C10.5195 3.44352 10.1682 3.22039 9.78135 3.08082L9.07572 2.82645C9.06174 2.82136 9.04967 2.81209 9.04114 2.7999C9.03261 2.78772 9.02803 2.7732 9.02803 2.75832C9.02803 2.74344 9.03261 2.72893 9.04114 2.71674C9.04967 2.70455 9.06174 2.69529 9.07572 2.6902L9.78135 2.43582C10.1682 2.29625 10.5195 2.07313 10.8103 1.78232C11.1012 1.49151 11.3243 1.14018 11.4639 0.753321L11.7182 0.0476961C11.7233 0.0337168 11.7326 0.0216418 11.7448 0.0131093C11.757 0.00457683 11.7715 0 11.7863 0C11.8012 0 11.8157 0.00457683 11.8279 0.0131093C11.8401 0.0216418 11.8494 0.0337168 11.8545 0.0476961ZM11.8545 12.0308L12.1088 12.7364C12.2484 13.1233 12.4715 13.4746 12.7624 13.7654C13.0532 14.0563 13.4045 14.2794 13.7913 14.4189L14.497 14.6733C14.511 14.6784 14.523 14.6877 14.5316 14.6999C14.5401 14.7121 14.5447 14.7266 14.5447 14.7414C14.5447 14.7563 14.5401 14.7708 14.5316 14.783C14.523 14.7952 14.511 14.8045 14.497 14.8096L13.7913 15.0639C13.4045 15.2035 13.0532 15.4266 12.7624 15.7174C12.4715 16.0083 12.2484 16.3596 12.1088 16.7464L11.8545 17.4521C11.8494 17.4661 11.8401 17.4781 11.8279 17.4867C11.8157 17.4952 11.8012 17.4998 11.7863 17.4998C11.7715 17.4998 11.757 17.4952 11.7448 17.4867C11.7326 17.4781 11.7233 17.4661 11.7182 17.4521L11.4639 16.7464C11.3243 16.3596 11.1012 16.0083 10.8103 15.7174C10.5195 15.4266 10.1682 15.2035 9.78135 15.0639L9.07572 14.8096C9.06174 14.8045 9.04967 14.7952 9.04114 14.783C9.03261 14.7708 9.02803 14.7563 9.02803 14.7414C9.02803 14.7266 9.03261 14.7121 9.04114 14.6999C9.04967 14.6877 9.06174 14.6784 9.07572 14.6733L9.78135 14.4189C10.1682 14.2794 10.5195 14.0563 10.8103 13.7654C11.1012 13.4746 11.3243 13.1233 11.4639 12.7364L11.7182 12.0308C11.7413 11.9671 11.832 11.9671 11.8545 12.0308Z",fill:"currentColor"})),(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,i.__)("Saved Briefs","thinkrank")),z.length>0&&(0,a.createElement)("span",{className:"tr-ml-auto tr-inline-flex tr-items-center tr-justify-center tr-min-w-[20px] tr-h-5 tr-px-1.5 tr-rounded-full tr-bg-brand-bg tr-text-brand tr-text-xs tr-font-semibold"},z.length)),(0,a.createElement)("div",{className:"tr-flex-1 tr-overflow-y-auto tr-p-4",style:{minHeight:0}},z.length>0?(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1"},z.map(e=>(0,a.createElement)("div",{key:e.id,className:"tr-bg-white tr-border tr-border-transparent tr-border-b tr-border-b-[#E5E7EB] tr-p-4 tr-transition-all tr-duration-150"},(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-3"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-9 tr-h-9 tr-rounded-md tr-bg-brand-bg tr-text-brand tr-shrink-0"},(0,a.createElement)("svg",{className:"tr-w-[18px] tr-h-[18px]",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":"true"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14 3v4a1 1 0 0 0 1 1h4M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"}),(0,a.createElement)("path",{strokeLinecap:"round",d:"M9 13h6M9 17h4"}))),(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-0"},(0,a.createElement)("h4",{title:e.title||void 0,className:"tr-text-sm tr-font-semibold tr-text-primary tr-truncate tr-m-0"},e.title||(0,i.__)("Untitled Brief","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2 tr-mt-1"},(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0"},new Date(e.created_at).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})),e.brief_data?.generation_meta&&(0,a.createElement)(h.A,{provider:e.brief_data.generation_meta.provider,model:e.brief_data.generation_meta.model})))),e.target_keywords&&e.target_keywords.length>0&&(0,a.createElement)("div",{className:"tr-flex tr-flex-wrap tr-gap-1 tr-mt-3"},e.target_keywords.slice(0,3).map((e,t)=>(0,a.createElement)("span",{key:t,className:"tr-inline-flex tr-items-center tr-px-2 tr-py-0.5 tr-rounded-full tr-text-xs tr-bg-brand-bg tr-text-brand"},e)),e.target_keywords.length>3&&(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-px-2 tr-py-0.5 tr-rounded-full tr-text-xs tr-bg-line-2 tr-text-secondary"},"+",e.target_keywords.length-3)),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2 tr-mt-4"},(0,a.createElement)(c.$n,{variant:"secondary",size:"sm",className:"tr-justify-center",onClick:()=>(e=>{e.brief_data&&t({target_keywords:e.brief_data.target_keywords||[""],content_type:e.brief_data.content_type||"blog_post",target_audience:e.brief_data.target_audience||"general",content_length:e.brief_data.content_length||"medium",tone:e.brief_data.tone||"professional",competitor_urls:e.brief_data.competitor_urls||[""],additional_context:e.brief_data.additional_context||""}),j(e.brief_data),E(null),setTimeout(()=>{const e=document.getElementById("generated-content-section");e&&e.scrollIntoView({behavior:"smooth",block:"start"})},100)})(e)},(0,a.createElement)("svg",{className:"tr-w-3.5 tr-h-3.5 tr-mr-1",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})),(0,i.__)("View Brief","thinkrank")),(0,a.createElement)("button",{className:"tr-flex tr-items-center tr-justify-center tr-w-8 tr-h-8 tr-rounded tr-border tr-border-secondary tr-bg-white tr-text-tertiary hover:tr-border-danger hover:tr-text-white hover:tr-bg-danger tr-transition-colors tr-shrink-0",onClick:()=>w(e),title:(0,i.__)("Delete brief","thinkrank")},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))))))):(0,a.createElement)(c.pp,{size:"sm",title:(0,i.__)("No Saved Briefs Yet","thinkrank"),description:(0,i.__)("Generate your first content brief to start building your library.","thinkrank")}))))),D&&(0,a.createElement)("div",{id:"generated-content-section",className:"tr-bg-white tr-rounded-lg tr-border tr-border-secondary tr-shadow-sm"},(0,a.createElement)("div",{className:"tr-h-1 tr-bg-brand",style:{borderTopLeftRadius:"12px",borderTopRightRadius:"12px"}}),(0,a.createElement)("div",{className:"tr-px-6 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-flex-wrap tr-gap-3"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-3"},(0,a.createElement)("div",{className:"tr-w-8 tr-h-8 tr-rounded-lg tr-bg-brand tr-text-white tr-flex tr-items-center tr-justify-center tr-shrink-0"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M5 13l4 4L19 7"}))),(0,a.createElement)("div",null,(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,i.__)("Generated Content Brief","thinkrank")),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0"},(0,i.__)("AI-powered content strategy","thinkrank"))),(0,a.createElement)(h.A,{provider:D.ai_provider,model:D.ai_model})),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2 tr-flex-wrap"},window.thinkrankAdmin?.isPro?(0,s.applyFilters)("thinkrank.contentBrief.resultActions",(0,a.createElement)(u.A,null),{briefData:D,formData:e}):(0,N.yP)()?(0,a.createElement)(m.A,{feature:(0,i.__)("Insert Brief into a Post","thinkrank")}):(0,a.createElement)(u.A,null),(0,a.createElement)(c.$n,{variant:"secondary",size:"sm",onClick:()=>{const e=U(D),t=new Blob([e],{type:"text/plain"}),r=URL.createObjectURL(t),a=document.createElement("a");a.href=r,a.download=`content-brief-${Date.now()}.txt`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r)}},(0,a.createElement)("svg",{className:"tr-w-3.5 tr-h-3.5 tr-mr-1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})),(0,i.__)("Save as Text","thinkrank")),(0,a.createElement)(c.$n,{variant:"secondary",size:"sm",onClick:()=>{const e=U(D),t=window.open("","_blank");t?(t.document.write(`<html><head><title>Content Brief</title><style>body{font-family:Arial,sans-serif;margin:40px;line-height:1.6;color:#333}pre{white-space:pre-wrap;font-family:Arial,sans-serif;font-size:12px}@media print{body{margin:20px}@page{margin:1in}}</style></head><body><pre>${e.replace(/</g,"<").replace(/>/g,">")}</pre></body></html>`),t.document.close(),t.print()):y.A.error((0,i.__)("Allow pop-ups for this site to print the brief.","thinkrank"))}},(0,a.createElement)("svg",{className:"tr-w-3.5 tr-h-3.5 tr-mr-1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z"})),(0,i.__)("Print / PDF","thinkrank")),(0,a.createElement)(c.$n,{variant:"secondary",size:"sm",onClick:()=>(async e=>{const t=()=>{_(!0),setTimeout(()=>_(!1),2e3)};try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(e),void t();const r=document.createElement("textarea");r.value=e,r.style.position="fixed",r.style.left="-999999px",r.style.top="-999999px",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy"),t()}catch(e){k.A.error("Failed to copy text: ",e)}document.body.removeChild(r)}catch(e){k.A.error("Copy to clipboard failed: ",e)}})(U(D)),title:f?(0,i.__)("Copied!","thinkrank"):(0,i.__)("Copy to clipboard","thinkrank")},f?(0,a.createElement)("svg",{className:"tr-w-3.5 tr-h-3.5 tr-mr-1.5 tr-text-success",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M5 13l4 4L19 7"})):(0,a.createElement)("svg",{className:"tr-w-3.5 tr-h-3.5 tr-mr-1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})),f?(0,i.__)("Copied!","thinkrank"):(0,i.__)("Copy","thinkrank")),(0,a.createElement)(c.$n,{variant:"ghost",size:"sm",onClick:()=>{j(null),E(null)}},(0,a.createElement)("svg",{className:"tr-w-3.5 tr-h-3.5 tr-mr-1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})),(0,i.__)("Close","thinkrank"))))),(0,a.createElement)("div",{className:"tr-p-6"},(0,a.createElement)(M.A,{briefData:D,formData:e}))),A&&(0,a.createElement)(p.Ay,{title:(0,i.__)("Delete this brief?","thinkrank"),message:(0,i.sprintf)(/* translators: %s: saved brief title */ /* translators: %s: saved brief title */ |
| 46 | -(0,i.__)('"%s" will be permanently deleted. This action cannot be undone.',"thinkrank"),A.title||(0,i.__)("Untitled Brief","thinkrank")),confirmLabel:(0,i.__)("Delete Brief","thinkrank"),isDestructive:!0,onConfirm:()=>(async e=>{w(null);try{(await o()({path:`/thinkrank/v1/content-brief/${e}`,method:"DELETE"})).success&&(T(z.filter(t=>t.id!==e)),D&&D.id===e&&j(null))}catch(e){k.A.error("Failed to delete brief:",e),E((0,i.__)("Failed to delete brief. Please try again.","thinkrank"))}})(A.id),onCancel:()=>w(null)}))}},26225:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(51609),n=r(5573);const i=(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",d:"M11.25 5h1.5v15h-1.5V5zM6 10h1.5v10H6V10zm12 4h-1.5v6H18v-6z",clipRule:"evenodd"}))},26302:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}))},26698:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"}))},26949:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,a.createElement)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"}))},27132:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,a.createElement)(n.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"}))},27209:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var a=r(51609),n=r(86087),i=r(27723),s=r(49323),l=r(5127),o=r(4025),c=r(13863),d=r(32905),g=r(65403),M=r(80095),u=r(30422);const m=({activeSubSection:e="robots-management",onNavigate:t})=>{const[r,m]=(0,n.useState)(!0);return(0,n.useEffect)(()=>{m(!1)},[]),r?(0,a.createElement)("div",{className:"thinkrank-loading-container"},(0,a.createElement)(s.u4,{lines:3})):(0,a.createElement)("div",{className:"thinkrank-crawling-ai-indexing-tab"},(()=>{switch(e){case"robots-management":return(0,a.createElement)(l.A,{onNavigate:t});case"xml-sitemap":return(0,a.createElement)(o.A,{onNavigate:t});case"llms-ai-indexing":return(0,a.createElement)(c.A,{onNavigate:t});case"global-robot-meta":return(0,a.createElement)(d.A,{onNavigate:t});case"publisher-sitemaps":return(0,a.createElement)(g.A,{filter:"thinkrank.sitemap.publisherSitemapsTab",teaser:(0,a.createElement)(M.A,{illustration:(0,a.createElement)(u.DX,null),title:(0,i.__)("Publisher Sitemaps","thinkrank"),description:(0,i.__)("Publish news or video content? Dedicated News and Video sitemaps help Google surface your content in Google News and video search results.","thinkrank"),features:[(0,i.__)("Generate a Google News sitemap for your latest articles","thinkrank"),(0,i.__)("Generate a Video sitemap so your videos get indexed","thinkrank"),(0,i.__)("Keep both updated automatically as you publish","thinkrank")]})});case"markdown-for-ai":return(0,a.createElement)(g.A,{filter:"thinkrank.crawling.markdownForAiTab",teaser:(0,a.createElement)(M.A,{illustration:(0,a.createElement)(u.tD,null),title:(0,i.__)("Markdown for AI","thinkrank"),description:(0,i.__)("AI agents that fetch your pages have to dig your content out of a full HTML document. Serve them a clean Markdown copy of the same URL instead, while visitors keep the normal page.","thinkrank"),features:[(0,i.__)("Answer the same URL with Markdown when an agent asks for it","thinkrank"),(0,i.__)("Choose which post types serve Markdown","thinkrank"),(0,i.__)("Your HTML page stays canonical, so nothing about your SEO changes","thinkrank")]})});case"ai-usage-policy":return(0,a.createElement)(g.A,{filter:"thinkrank.crawling.aiUsagePolicyTab",teaser:(0,a.createElement)(M.A,{illustration:(0,a.createElement)(u.qR,null),title:(0,i.__)("AI Usage Policy","thinkrank"),description:(0,i.__)("Your llms.txt describes what your site is about, but says nothing about what AI companies may do with it. Publish a usage policy alongside it so crawlers read your terms before they train on your work.","thinkrank"),features:[(0,i.__)("Allow or disallow model training on your content","thinkrank"),(0,i.__)("Decide separately about summarization and embedding","thinkrank"),(0,i.__)("Require attribution when an assistant quotes you","thinkrank"),(0,i.__)("Published at the top of llms.txt, where crawlers look first","thinkrank")]})});case"llms-full":return(0,a.createElement)(g.A,{filter:"thinkrank.crawling.llmsFullTab",teaser:(0,a.createElement)(M.A,{illustration:(0,a.createElement)(u.tD,null),title:(0,i.__)("llms-full.txt","thinkrank"),description:(0,i.__)("llms.txt tells AI agents what your site is. llms-full.txt gives them the content itself: every published entry as clean Markdown in one file, so an agent can read your whole site in a single request.","thinkrank"),features:[(0,i.__)("Your published posts and pages as one Markdown document","thinkrank"),(0,i.__)("Rebuilt in the background daily and after you publish","thinkrank"),(0,i.__)("Carries your AI Usage Policy at the top","thinkrank")]})});default:return(0,a.createElement)("div",null,(0,a.createElement)("p",null,(0,i.__)("Please select a sub-section from the navigation.","thinkrank")))}})())}},27531:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(51609),n=r(97500),i=r.n(n);const s={primary:"tr-bg-brand tr-text-white hover:tr-bg-brand tr-border-transparent",secondary:"tr-bg-white tr-text-secondary tr-border-primary hover:tr-bg-white",ghost:"tr-bg-transparent tr-text-brand tr-border-transparent hover:tr-bg-brand-bg",danger:"tr-bg-danger tr-text-white hover:tr-bg-danger tr-border-transparent",ai:"tr-bg-brand tr-text-white hover:tr-bg-brand tr-border-transparent"},l={sm:"tr-h-8 tr-px-3 tr-text-xs",md:"tr-h-10 tr-px-4 tr-text-sm",lg:"tr-h-11 tr-px-5 tr-text-base"};function o({variant:e="primary",size:t="md",disabled:r=!1,loading:n=!1,icon:o,iconPosition:c="left",className:d,children:g,...M}){return(0,a.createElement)("button",{className:i()("tr-inline-flex tr-items-center tr-justify-center tr-gap-2","tr-rounded-md tr-border tr-font-medium","tr-transition-colors tr-duration-150","focus:tr-outline-none focus:tr-ring-2 focus:tr-ring-brand focus:tr-ring-offset-1","disabled:tr-opacity-50 disabled:tr-cursor-not-allowed",s[e],l[t],d),disabled:r||n,"aria-busy":n||void 0,"aria-disabled":r||n||void 0,...M},n&&(0,a.createElement)("span",{className:"tr-w-4 tr-h-4 tr-shrink-0 tr-rounded-full tr-border-2 tr-animate-spin",style:{borderColor:"currentColor",borderTopColor:"transparent"},"aria-hidden":"true"}),!n&&o&&"left"===c&&(0,a.createElement)(o,{className:"tr-w-4 tr-h-4 tr-shrink-0"}),g,!n&&o&&"right"===c&&(0,a.createElement)(o,{className:"tr-w-4 tr-h-4 tr-shrink-0"}))}},27723:e=>{"use strict";e.exports=window.wp.i18n},28094:(e,t,r)=>{"use strict";r.d(t,{g:()=>a});const a=(e,t={})=>{const r=`${window.thinkrankAdmin?.apiUrl||""}${e}`,a=new URLSearchParams;Object.entries(t).forEach(([e,t])=>{null!=t&&a.set(e,t)});const n=a.toString();return n?`${r}${r.includes("?")?"&":"?"}${n}`:r}},28668:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M11 14.5l1.1 1.1 3-3 .5-.5-.6-.6-3-3-1 1 1.7 1.7H5v1.5h7.7L11 14.5zM16.8 5h-7c-1.1 0-2 .9-2 2v1.5h1.5V7c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v10c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5v-1.5H7.8V17c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2z"}))},29151:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"}))},29475:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var a=r(51609),n=r(27723),i=r(49323),s=r(85770),l=r(17098),o=r(99658);const c=({settings:e,handleSettingChange:t})=>{const r=!e.enabled;return(0,a.createElement)(i.mc,{direction:"column",gap:4},(0,a.createElement)(i.Zp,{padding:!1},(0,a.createElement)(s.A,{title:(0,n.__)("Hero Section Optimization","thinkrank"),description:(0,n.__)("Configure the headline, supporting copy, and call-to-action for your hero.","thinkrank")}),(0,a.createElement)(i.mc,{direction:"column",gap:6,className:"tr-px-6 tr-py-6 tr-divide-y tr-divide-line-2"},(0,a.createElement)(l.A,{id:"tr-hero-title",label:(0,n.__)("Hero Title","thinkrank"),description:(0,n.__)("Main headline for your homepage hero section","thinkrank"),disabled:r},(0,a.createElement)(i.pd,{id:"tr-hero-title",value:e.hero_title||"",onChange:e=>t("hero_title",e.target.value),placeholder:(0,n.__)("e.g., Grow your traffic with smarter SEO","thinkrank"),disabled:r})),(0,a.createElement)(l.A,{id:"tr-hero-subtitle",label:(0,n.__)("Hero Subtitle","thinkrank"),description:(0,n.__)("Supporting text for your hero section","thinkrank"),disabled:r,className:"tr-pt-6"},(0,a.createElement)(i.TM,{id:"tr-hero-subtitle",value:e.hero_subtitle||"",onChange:e=>t("hero_subtitle",e.target.value),placeholder:(0,n.__)("e.g., Practical tools and insights to help your content rank.","thinkrank"),rows:2,disabled:r})),(0,a.createElement)(l.A,{id:"tr-hero-cta-text",label:(0,n.__)("Call-to-Action Text","thinkrank"),description:(0,n.__)("Text for your primary CTA button","thinkrank"),disabled:r,className:"tr-pt-6"},(0,a.createElement)(i.pd,{id:"tr-hero-cta-text",value:e.hero_cta_text||"",onChange:e=>t("hero_cta_text",e.target.value),placeholder:(0,n.__)("e.g., Get started free","thinkrank"),disabled:r})),(0,a.createElement)(l.A,{id:"tr-hero-cta-url",label:(0,n.__)("Call-to-Action URL","thinkrank"),description:(0,n.__)("Enter a valid URL for your CTA button (e.g., /contact, /get-started, https://example.com)","thinkrank"),disabled:r,className:"tr-pt-6"},(0,a.createElement)(i.pd,{id:"tr-hero-cta-url",value:e.hero_cta_url||"",onChange:e=>t("hero_cta_url",e.target.value),placeholder:(0,n.__)("e.g., /contact or /get-started","thinkrank"),disabled:r})),(0,a.createElement)("div",{className:"tr-pt-6"},(0,a.createElement)(o.A,{label:(0,n.__)("Hero Background Image","thinkrank"),value:e.hero_background_image,onChange:e=>t("hero_background_image",e),help:(0,n.__)("Recommended: 1920x1080px or larger","thinkrank"),allowedTypes:["image"],disabled:r})))),(0,a.createElement)(i.Zp,{padding:!1},(0,a.createElement)(s.A,{title:(0,n.__)("Site Assets","thinkrank"),description:(0,n.__)("Upload and manage your site's visual assets for branding and SEO optimization.","thinkrank")}),(0,a.createElement)("div",{className:"tr-px-6 tr-py-6 tr-grid tr-grid-cols-1 md:tr-grid-cols-2 tr-gap-x-6 tr-gap-y-5"},(0,a.createElement)(o.A,{label:(0,n.__)("Site Logo","thinkrank"),value:e.logo_url,onChange:e=>t("logo_url",e),help:(0,n.__)("Recommended: 600x60px","thinkrank"),allowedTypes:["image"],disabled:r}),(0,a.createElement)(o.A,{label:(0,n.__)("Favicon","thinkrank"),value:e.favicon_url,onChange:e=>t("favicon_url",e),help:(0,n.__)("Recommended: 32x32px, ICO or PNG","thinkrank"),allowedTypes:["image"],disabled:r}),(0,a.createElement)(o.A,{label:(0,n.__)("Apple Touch Icon","thinkrank"),value:e.apple_touch_icon_url,onChange:e=>t("apple_touch_icon_url",e),help:(0,n.__)("Recommended: 180x180px, PNG","thinkrank"),allowedTypes:["image"],disabled:r}))))}},30012:(e,t,r)=>{"use strict";r.d(t,{B1:()=>g,D3:()=>c,Zf:()=>o,ah:()=>p,bH:()=>N,oo:()=>h,pO:()=>d});var a=r(7098);const n=[{page:"dashboard",slug:"thinkrank",cap:null},{page:"essential-seo",slug:"thinkrank-essential-seo",cap:null},{page:"ai-tools",slug:"thinkrank-ai-tools",cap:"thinkrank_content_tools"},{page:"analytics",slug:"thinkrank-usages",cap:"thinkrank_analytics"},{page:"settings",slug:"thinkrank-settings",cap:"thinkrank_settings"},{page:"import-export",slug:"thinkrank-import-export",cap:"manage_options"},{page:"migration",slug:"thinkrank-migration",cap:"manage_options"}],i=new Set,s=e=>n.find(t=>t.page===e),l=e=>n.find(t=>t.slug===e),o=e=>{const t=s(e);if(!t)return!1;if(!t.cap)return!0;const r=window.thinkrankAdmin||{};if("manage_options"===t.cap)return!!r.isAdmin;const a=Array.isArray(r.caps)?r.caps:null;return!a||a.includes(t.cap)},c=()=>{try{const e=new URLSearchParams(window.location.search).get("page");return l(e)?.page||null}catch(e){return null}},d=(e,t={})=>{const r=s(e);if(!r)return null;const a=new URLSearchParams({page:r.slug});return Object.entries(t).forEach(([e,t])=>{null!=t&&a.set(e,t)}),`${window.location.pathname}?${a.toString()}`},g=e=>(i.add(e),()=>i.delete(e)),M=e=>{i.forEach(t=>{try{t(e)}catch(e){}})},u=(e,t)=>{(e=>{const t=document.querySelector("#toplevel_page_thinkrank .wp-submenu");t&&(t.querySelectorAll("li, a").forEach(e=>{e.classList.remove("current"),e.removeAttribute("aria-current")}),t.querySelectorAll("a[href]").forEach(t=>{let r;try{r=new URL(t.href,window.location.origin).searchParams.get("page")}catch(e){return}r===e&&(t.classList.add("current"),t.setAttribute("aria-current","page"),t.closest("li")?.classList.add("current"))}))})(e.slug),t&&(e=>{const t=document.title.indexOf(" ‹ ");document.title=-1===t?e:e+document.title.slice(t)})(t),window.scrollTo({top:0})};let m=null;const N=e=>{m=e},h=(e,t={})=>{const r=s(e),a=d(e,t);r&&a&&(o(e)?c()!==e?(window.history.pushState({},"",a),u(r,m?.(e)),M(e)):Object.keys(t).length&&window.history.replaceState({},"",a):window.location.assign(a))};window.addEventListener("popstate",()=>{const e=c(),t=e&&s(e);t&&(u(t,m?.(e)),M(e))});const p=e=>!(e.defaultPrevented||0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey),k=e=>{const t=e.closest("a[href]");if(!t||"_blank"===t.target)return null;let r;try{r=new URL(t.href,window.location.origin)}catch(e){return null}if(r.origin!==window.location.origin||r.pathname!==window.location.pathname)return null;const a=l(r.searchParams.get("page"));return a&&o(a.page)?a:null};(()=>{const e=document.getElementById("adminmenu");e&&(e.addEventListener("click",e=>{if(!p(e))return;const t=k(e.target);t&&(e.preventDefault(),h(t.page))}),e.addEventListener("mouseover",e=>{const t=k(e.target);t&&t.page!==c()&&(0,a.n)(t.page)}))})(),(()=>{const e=document.getElementById("adminmenu");e&&window.matchMedia("(min-width: 783px)").matches&&(e.addEventListener("mouseover",t=>{const r=t.target.closest("li.menu-top");r&&(t=>{var r;if(!t.classList.contains("wp-not-current-submenu"))return;const a=t.querySelector(":scope > .wp-submenu");if(!a)return;const n=t.getBoundingClientRect(),i=null!==(r=document.getElementById("wpadminbar")?.offsetHeight)&&void 0!==r?r:32,s=window.innerHeight-a.offsetHeight-6,l=Math.max(i+6,Math.min(n.top,s));a.style.top=`${Math.round(l)}px`,a.style.left=`${Math.round(n.right)}px`,e.querySelectorAll("li.opensub").forEach(e=>{e!==t&&e.classList.remove("opensub")}),t.classList.add("opensub")})(r)}),e.addEventListener("mouseout",e=>{const t=e.target.closest("li.menu-top");t&&!t.contains(e.relatedTarget)&&(e=>{e.classList.remove("opensub");const t=e.querySelector(":scope > .wp-submenu");t&&(t.style.top="",t.style.left="")})(t)}))})()},30073:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"}))},30239:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"}))},30307:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m12 20-4.5-3.6-.9 1.2L12 22l5.5-4.4-.9-1.2L12 20zm0-16 4.5 3.6.9-1.2L12 2 6.5 6.4l.9 1.2L12 4z"}))},30422:(e,t,r)=>{"use strict";r.d(t,{$S:()=>E,DX:()=>u,D_:()=>y,Hs:()=>g,JU:()=>M,JV:()=>d,Jj:()=>D,Ku:()=>x,Lq:()=>k,_1:()=>h,eW:()=>c,l3:()=>p,qR:()=>N,rs:()=>I,tD:()=>m,v0:()=>T,vD:()=>z,vV:()=>j});var a=r(51609);const n="#4451ff",i="#7b82ff",s="#c3c8ff",l="#ffffff",o={width:"100%",height:"100%",maxWidth:"150px",maxHeight:"150px",display:"block"},c=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("rect",{x:"10",y:"20",width:"52",height:"42",rx:"6",fill:l,stroke:s,strokeWidth:"2.5"}),(0,a.createElement)("path",{d:"M10 30h52",stroke:s,strokeWidth:"2.5"}),(0,a.createElement)("circle",{cx:"17",cy:"25",r:"1.6",fill:s}),(0,a.createElement)("circle",{cx:"23",cy:"25",r:"1.6",fill:s}),(0,a.createElement)("rect",{x:"18",y:"38",width:"36",height:"16",rx:"3",fill:"#eef0fd"}),(0,a.createElement)("text",{x:"36",y:"49.5",fontSize:"8",fontWeight:"700",fill:i,textAnchor:"middle",fontFamily:"system-ui, sans-serif"},"OLD"),(0,a.createElement)("rect",{x:"58",y:"58",width:"52",height:"42",rx:"6",fill:l,stroke:n,strokeWidth:"2.5"}),(0,a.createElement)("path",{d:"M58 68h52",stroke:n,strokeWidth:"2.5"}),(0,a.createElement)("circle",{cx:"65",cy:"63",r:"1.6",fill:n}),(0,a.createElement)("circle",{cx:"71",cy:"63",r:"1.6",fill:n}),(0,a.createElement)("rect",{x:"66",y:"76",width:"36",height:"16",rx:"3",fill:n}),(0,a.createElement)("text",{x:"84",y:"87.5",fontSize:"8",fontWeight:"700",fill:l,textAnchor:"middle",fontFamily:"system-ui, sans-serif"},"NEW"),(0,a.createElement)("path",{d:"M66 40c14 2 22 10 22 22",stroke:n,strokeWidth:"2.5",strokeLinecap:"round"}),(0,a.createElement)("path",{d:"M83 56l5 6 6-4",stroke:n,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})),d=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("path",{d:"M50 44l-9 9a13 13 0 0 0 0 18 13 13 0 0 0 8 3.8",stroke:n,strokeWidth:"4",strokeLinecap:"round"}),(0,a.createElement)("path",{d:"M70 76l9-9a13 13 0 0 0 0-18 13 13 0 0 0-8-3.8",stroke:n,strokeWidth:"4",strokeLinecap:"round"}),(0,a.createElement)("path",{d:"M54 60h5M61 60h5",stroke:i,strokeWidth:"4",strokeLinecap:"round"}),(0,a.createElement)("path",{d:"M60 30v8M76 36l-5 6M44 36l5 6",stroke:s,strokeWidth:"3",strokeLinecap:"round"})),g=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("path",{d:"M36 42l24 18M60 60l26-22M60 60l-18 30M60 60l26 24",stroke:s,strokeWidth:"2.5"}),(0,a.createElement)("circle",{cx:"36",cy:"42",r:"8",fill:l,stroke:n,strokeWidth:"3"}),(0,a.createElement)("circle",{cx:"86",cy:"38",r:"7",fill:l,stroke:i,strokeWidth:"3"}),(0,a.createElement)("circle",{cx:"42",cy:"90",r:"7",fill:l,stroke:i,strokeWidth:"3"}),(0,a.createElement)("circle",{cx:"86",cy:"84",r:"7",fill:l,stroke:i,strokeWidth:"3"}),(0,a.createElement)("circle",{cx:"60",cy:"60",r:"11",fill:n}),(0,a.createElement)("path",{d:"M60 53l1.6 4L66 58l-3.4 2.4L64 65l-4-2.6L56 65l1.4-4.6L54 58l4.4-1z",fill:l})),M=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("path",{d:"M40 34h20l30 30-26 26-30-30V34z",fill:l,stroke:n,strokeWidth:"3",strokeLinejoin:"round"}),(0,a.createElement)("circle",{cx:"50",cy:"46",r:"4.5",fill:n}),(0,a.createElement)("path",{d:"M69 66l3 6 6.6.8-4.8 4.6L75 84l-6-3.2L63 84l1.2-6.6-4.8-4.6 6.6-.8 3-6z",fill:i})),u=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("rect",{x:"20",y:"28",width:"58",height:"64",rx:"6",fill:l,stroke:n,strokeWidth:"3"}),(0,a.createElement)("path",{d:"M30 42h24M30 52h38M30 62h38M30 72h26",stroke:s,strokeWidth:"3",strokeLinecap:"round"}),(0,a.createElement)("rect",{x:"30",y:"40",width:"16",height:"16",rx:"2",fill:"#eef0fd"}),(0,a.createElement)("circle",{cx:"82",cy:"78",r:"18",fill:n}),(0,a.createElement)("path",{d:"M78 71l10 7-10 7V71z",fill:l})),m=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("rect",{x:"24",y:"20",width:"62",height:"76",rx:"6",fill:l,stroke:n,strokeWidth:"3"}),(0,a.createElement)("path",{d:"M34 36h16M34 60h30M34 70h24M34 80h30",stroke:s,strokeWidth:"3",strokeLinecap:"round"}),(0,a.createElement)("path",{d:"M34 46h42",stroke:i,strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"4 5"}),(0,a.createElement)("rect",{x:"66",y:"60",width:"42",height:"30",rx:"5",fill:n}),(0,a.createElement)("path",{d:"M73 82V68l7 8 7-8v14M95 68v10m0 0l-4-4m4 4l4-4",stroke:l,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})),N=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("rect",{x:"20",y:"18",width:"60",height:"80",rx:"6",fill:l,stroke:n,strokeWidth:"3"}),(0,a.createElement)("path",{d:"M30 34h34M30 46h40M30 58h26",stroke:s,strokeWidth:"3",strokeLinecap:"round"}),(0,a.createElement)("path",{d:"M30 70h20",stroke:i,strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"4 5"}),(0,a.createElement)("path",{d:"M84 50l18 7v14c0 11-8 18-18 22-10-4-18-11-18-22V57l18-7z",fill:n}),(0,a.createElement)("path",{d:"M77 71l5 5 11-11",stroke:l,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})),h=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("rect",{x:"14",y:"66",width:"42",height:"34",rx:"5",fill:l,stroke:s,strokeWidth:"3"}),(0,a.createElement)("rect",{x:"64",y:"66",width:"42",height:"34",rx:"5",fill:l,stroke:n,strokeWidth:"3"}),(0,a.createElement)("path",{d:"M22 78h26M22 88h18M72 78h26M72 88h18",stroke:s,strokeWidth:"3",strokeLinecap:"round"}),(0,a.createElement)("path",{d:"M18 52l20-14 16 12 24-28",stroke:n,strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.createElement)("circle",{cx:"78",cy:"22",r:"6",fill:n}),(0,a.createElement)("circle",{cx:"38",cy:"38",r:"4.5",fill:i}),(0,a.createElement)("circle",{cx:"54",cy:"50",r:"4.5",fill:i})),p=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("rect",{x:"16",y:"20",width:"50",height:"80",rx:"6",fill:l,stroke:n,strokeWidth:"3"}),(0,a.createElement)("path",{d:"M26 36h30M26 48h22M26 60h30M26 72h18",stroke:s,strokeWidth:"3",strokeLinecap:"round"}),(0,a.createElement)("circle",{cx:"86",cy:"34",r:"7",fill:n}),(0,a.createElement)("circle",{cx:"86",cy:"58",r:"7",fill:i}),(0,a.createElement)("circle",{cx:"86",cy:"82",r:"7",fill:s}),(0,a.createElement)("path",{d:"M96 34h10M96 58h10M96 82h10",stroke:s,strokeWidth:"3",strokeLinecap:"round"}),(0,a.createElement)("path",{d:"M83 34l2.5 2.5L90 32",stroke:l,strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})),k=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("rect",{x:"34",y:"66",width:"10",height:"20",rx:"2",fill:s}),(0,a.createElement)("rect",{x:"50",y:"54",width:"10",height:"32",rx:"2",fill:i}),(0,a.createElement)("rect",{x:"66",y:"42",width:"10",height:"44",rx:"2",fill:n}),(0,a.createElement)("path",{d:"M34 60l16-10 16-8 18-14",stroke:n,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.createElement)("path",{d:"M84 22l6 1-1 6",stroke:n,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})),y=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("rect",{x:"36",y:"30",width:"40",height:"52",rx:"5",fill:l,stroke:i,strokeWidth:"3",transform:"rotate(-8 56 56)"}),(0,a.createElement)("rect",{x:"44",y:"38",width:"40",height:"52",rx:"5",fill:l,stroke:n,strokeWidth:"3"}),(0,a.createElement)("path",{d:"M52 50h24M52 60h24M52 70h14",stroke:s,strokeWidth:"3",strokeLinecap:"round"}),(0,a.createElement)("circle",{cx:"82",cy:"82",r:"13",fill:n}),(0,a.createElement)("path",{d:"M76 82l4 4 8-8",stroke:l,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})),x=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("circle",{cx:"50",cy:"56",r:"18",fill:l,stroke:s,strokeWidth:"6"}),(0,a.createElement)("path",{d:"M50 38a18 18 0 0 1 15 27",fill:"none",stroke:n,strokeWidth:"6",strokeLinecap:"round"}),(0,a.createElement)("circle",{cx:"50",cy:"56",r:"5",fill:i}),(0,a.createElement)("rect",{x:"72",y:"62",width:"7",height:"16",rx:"2",fill:s}),(0,a.createElement)("rect",{x:"82",y:"52",width:"7",height:"26",rx:"2",fill:n})),D=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("path",{d:"M32 78 L44 66 L56 72 L68 54 L80 60 L88 46 L88 82 L32 82 Z",fill:s,opacity:"0.55"}),(0,a.createElement)("path",{d:"M32 78 L44 66 L56 72 L68 54 L80 60 L88 46",fill:"none",stroke:n,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.createElement)("circle",{cx:"88",cy:"46",r:"4",fill:l,stroke:n,strokeWidth:"3"}),(0,a.createElement)("path",{d:"M30 82h60",stroke:i,strokeWidth:"3",strokeLinecap:"round"})),j=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("rect",{x:"30",y:"40",width:"46",height:"16",rx:"8",fill:l,stroke:i,strokeWidth:"3"}),(0,a.createElement)("circle",{cx:"45",cy:"48",r:"4",fill:s}),(0,a.createElement)("rect",{x:"30",y:"66",width:"42",height:"6",rx:"3",fill:s}),(0,a.createElement)("rect",{x:"30",y:"78",width:"30",height:"6",rx:"3",fill:s}),(0,a.createElement)("circle",{cx:"80",cy:"74",r:"12",fill:l,stroke:n,strokeWidth:"4"}),(0,a.createElement)("path",{d:"M89 83l5 5",stroke:n,strokeWidth:"4",strokeLinecap:"round"})),I=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("rect",{x:"38",y:"32",width:"44",height:"54",rx:"5",fill:l,stroke:i,strokeWidth:"3"}),(0,a.createElement)("path",{d:"M48 46h24M48 56h24M48 66h14",stroke:s,strokeWidth:"3",strokeLinecap:"round"}),(0,a.createElement)("circle",{cx:"80",cy:"80",r:"13",fill:n}),(0,a.createElement)("path",{d:"M74 83l4-5 3 3 5-7",stroke:l,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})),E=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("path",{d:"M44 38c-8 0-8 16-14 22 6 6 6 22 14 22",stroke:n,strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.createElement)("path",{d:"M76 38c8 0 8 16 14 22-6 6-6 22-14 22",stroke:n,strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.createElement)("circle",{cx:"60",cy:"48",r:"5",fill:i}),(0,a.createElement)("circle",{cx:"52",cy:"62",r:"5",fill:n}),(0,a.createElement)("circle",{cx:"68",cy:"62",r:"5",fill:n}),(0,a.createElement)("circle",{cx:"60",cy:"76",r:"5",fill:i}),(0,a.createElement)("path",{d:"M60 53v18M56 59l8 6M64 59l-8 6",stroke:s,strokeWidth:"2.5"})),z=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("rect",{x:"22",y:"36",width:"34",height:"48",rx:"4",fill:l,stroke:s,strokeWidth:"2.5"}),(0,a.createElement)("path",{d:"M28 46h22M28 56h22M28 66h22M28 76h14",stroke:i,strokeWidth:"2.5",strokeLinecap:"round"}),(0,a.createElement)("path",{d:"M58 48h14a6 6 0 0 1 6 6v6M58 72h14a6 6 0 0 0 6-6v-6",stroke:n,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.createElement)("circle",{cx:"78",cy:"60",r:"9",fill:n}),(0,a.createElement)("circle",{cx:"94",cy:"40",r:"6",fill:i}),(0,a.createElement)("circle",{cx:"94",cy:"80",r:"6",fill:i}),(0,a.createElement)("path",{d:"M85 55l5-10M85 65l5 10",stroke:s,strokeWidth:"2.5",strokeLinecap:"round"})),T=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("path",{d:"M30 40l20-8 20 8 20-8v40l-20 8-20-8-20 8V40z",fill:l,stroke:s,strokeWidth:"2.5",strokeLinejoin:"round"}),(0,a.createElement)("path",{d:"M50 32v40M70 40v40",stroke:s,strokeWidth:"2.5"}),(0,a.createElement)("path",{d:"M52 46a10 10 0 0 0-20 0c0 7 10 16 10 16s10-9 10-16z",fill:i}),(0,a.createElement)("circle",{cx:"42",cy:"46",r:"4",fill:l}),(0,a.createElement)("path",{d:"M84 58a9 9 0 0 0-18 0c0 6.5 9 14.5 9 14.5S84 64.5 84 58z",fill:n}),(0,a.createElement)("circle",{cx:"75",cy:"58",r:"3.5",fill:l}))},30443:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M12.5 5L10 19h1.9l2.5-14z"}))},31198:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M12 3.25a8.75 8.75 0 100 17.5 8.75 8.75 0 000-17.5zM4.75 12a7.25 7.25 0 1114.5 0 7.25 7.25 0 01-14.5 0zm9.195 1.944a2.75 2.75 0 01-4.066-.194h.621a.75.75 0 000-1.5H9.262a2.767 2.767 0 010-.5H11.5a.75.75 0 000-1.5H9.88a2.75 2.75 0 014.066-.194.75.75 0 001.06-1.061 4.25 4.25 0 00-6.88 1.255H7.5a.75.75 0 000 1.5h.258c-.01.166-.01.334 0 .5H7.5a.75.75 0 000 1.5h.626a4.25 4.25 0 006.88 1.255.75.75 0 00-1.06-1.06z"}))},31471:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var a=r(51609),n=r(86087),i=r(27723),s=r(49323),l=r(99658),o=r(94168);const c=()=>(0,a.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),(0,a.createElement)("circle",{cx:"12",cy:"7",r:"4"})),d=()=>(0,a.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"}),(0,a.createElement)("polyline",{points:"22,6 12,13 2,6"})),g=()=>(0,a.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("rect",{x:"2",y:"7",width:"20",height:"14",rx:"2"}),(0,a.createElement)("path",{d:"M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"})),M=()=>(0,a.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),(0,a.createElement)("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})),u=e=>Array.isArray(e)?e.join("\n"):e||"",m=({settings:e,onSettingChange:t,isLoading:r,onNavigate:m})=>{const N=!e.enabled,[h,p]=(0,n.useState)(()=>u(e.person_same_as));return(0,n.useEffect)(()=>{p(u(e.person_same_as))},[e.person_same_as]),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-4"},N&&(0,a.createElement)(o.A,{onNavigate:m}),(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2"},(0,a.createElement)("span",{className:"tr-text-tertiary"},(0,a.createElement)(c,null)),(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,i.__)("Personal Information","thinkrank"))),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0 tr-mt-0.5"},(0,i.__)("Core details for Person schema markup","thinkrank"))),(0,a.createElement)("div",{className:"tr-p-5 tr-flex tr-flex-col tr-gap-4"},(0,a.createElement)(s.pd,{label:(0,i.__)("Full Name","thinkrank"),value:e.person_name||"",onChange:e=>t("person_name",e.target.value),description:(0,i.__)("Full name of the person","thinkrank"),disabled:N}),(0,a.createElement)(l.A,{label:(0,i.__)("Profile Image","thinkrank"),value:e.person_image,onChange:e=>t("person_image",e),help:(0,i.__)("Professional headshot or profile photo","thinkrank"),allowedTypes:["image"],disabled:N}),(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-2 tr-gap-4"},(0,a.createElement)(s.pd,{label:(0,i.__)("Job Title","thinkrank"),value:e.person_job_title||"",onChange:e=>t("person_job_title",e.target.value),description:(0,i.__)("Professional title or position","thinkrank"),disabled:N}),(0,a.createElement)(s.pd,{label:(0,i.__)("Nationality","thinkrank"),value:e.person_nationality||"",onChange:e=>t("person_nationality",e.target.value),description:(0,i.__)("Country of citizenship","thinkrank"),disabled:N})),(0,a.createElement)(s.TM,{label:(0,i.__)("Biography","thinkrank"),value:e.person_description||"",onChange:e=>t("person_description",e.target.value),description:(0,i.__)("Brief professional biography or description","thinkrank"),rows:3,disabled:N}))),(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2"},(0,a.createElement)("span",{className:"tr-text-tertiary"},(0,a.createElement)(d,null)),(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,i.__)("Contact Details","thinkrank")))),(0,a.createElement)("div",{className:"tr-p-5 tr-flex tr-flex-col tr-gap-4"},(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-2 tr-gap-4"},(0,a.createElement)(s.pd,{label:(0,i.__)("Website URL","thinkrank"),type:"url",value:e.person_url||"",onChange:e=>t("person_url",e.target.value),description:(0,i.__)("Personal or professional website","thinkrank"),placeholder:"https://example.com",disabled:N}),(0,a.createElement)(s.pd,{label:(0,i.__)("Email Address","thinkrank"),type:"email",value:e.person_email||"",onChange:e=>t("person_email",e.target.value),description:(0,i.__)("Professional contact email","thinkrank"),disabled:N})),(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-2 tr-gap-4"},(0,a.createElement)(s.pd,{label:(0,i.__)("Phone Number","thinkrank"),type:"tel",value:e.person_telephone||"",onChange:e=>t("person_telephone",e.target.value),description:(0,i.__)("Professional contact number","thinkrank"),disabled:N}),(0,a.createElement)(s.pd,{label:(0,i.__)("Birth Date","thinkrank"),type:"date",value:e.person_birth_date||"",onChange:e=>t("person_birth_date",e.target.value),description:(0,i.__)("Date of birth (optional)","thinkrank"),disabled:N})))),(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2"},(0,a.createElement)("span",{className:"tr-text-tertiary"},(0,a.createElement)(g,null)),(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,i.__)("Professional Details","thinkrank")))),(0,a.createElement)("div",{className:"tr-p-5 tr-flex tr-flex-col tr-gap-4"},(0,a.createElement)(s.TM,{label:(0,i.__)("Address","thinkrank"),value:e.person_address||"",onChange:e=>t("person_address",e.target.value),description:(0,i.__)("Professional address (optional)","thinkrank"),rows:2,disabled:N}),(0,a.createElement)(s.pd,{label:(0,i.__)("Works For (Organization)","thinkrank"),value:e.person_works_for||"",onChange:e=>t("person_works_for",e.target.value),description:(0,i.__)("Organization or company name (optional)","thinkrank"),disabled:N}))),(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2"},(0,a.createElement)("span",{className:"tr-text-tertiary"},(0,a.createElement)(M,null)),(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,i.__)("Social Media Profiles","thinkrank"))),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0 tr-mt-0.5"},(0,i.__)("Used as sameAs properties, one URL per line","thinkrank"))),(0,a.createElement)("div",{className:"tr-p-5"},(0,a.createElement)(s.TM,{label:(0,i.__)("Profile URLs","thinkrank"),value:h,onChange:e=>p(e.target.value),onBlur:()=>{const r=h.split("\n").map(e=>e.trim()).filter(Boolean);r.join("\n")!==u(e.person_same_as)&&t("person_same_as",r)},description:(0,i.__)("Enter social media profile URLs one per line e.g., LinkedIn, Twitter, Wikipedia","thinkrank"),placeholder:"https://linkedin.com/in/yourname\nhttps://twitter.com/yourhandle",rows:4,disabled:N}))))}},31594:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}))},31600:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M7.5 12C7.5 11.1716 6.82843 10.5 6 10.5C5.17157 10.5 4.5 11.1716 4.5 12C4.5 12.8284 5.17157 13.5 6 13.5C6.82843 13.5 7.5 12.8284 7.5 12Z"}),(0,a.createElement)(n.Path,{d:"M13.5 12C13.5 11.1716 12.8284 10.5 12 10.5C11.1716 10.5 10.5 11.1716 10.5 12C10.5 12.8284 11.1716 13.5 12 13.5C12.8284 13.5 13.5 12.8284 13.5 12Z"}),(0,a.createElement)(n.Path,{d:"M19.5 12C19.5 11.1716 18.8284 10.5 18 10.5C17.1716 10.5 16.5 11.1716 16.5 12C16.5 12.8284 17.1716 13.5 18 13.5C18.8284 13.5 19.5 12.8284 19.5 12Z"}))},31759:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});var a=r(51609),n=r(86087),i=r(47143),s=r(27723),l=r(49323),o=r(65403),c=r(80095),d=r(30422),g=r(94240);const M="thinkrank/email-report",u=()=>(0,a.createElement)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,a.createElement)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2",stroke:"currentColor",strokeWidth:"1.6"}),(0,a.createElement)("path",{d:"M3 7l9 6 9-6",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"})),m=e=>{if(!e)return null;try{const t=new Date(e);return Number.isNaN(t.getTime())?e:new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(t)}catch(t){return e}},N=e=>{switch(e){case"search_console_not_connected":return(0,s.__)("Google Search Console was not connected.","thinkrank");case"no_data":return(0,s.__)("Search Console returned no data for the period.","thinkrank");default:return(0,s.__)("the report had nothing to send.","thinkrank")}},h=({label:e,value:t,hint:r})=>(0,a.createElement)("div",{className:"tr-flex tr-flex-wrap tr-gap-x-6 tr-gap-y-1 tr-py-3 tr-border-b tr-border-secondary last:tr-border-b-0"},(0,a.createElement)("dt",{className:"tr-text-sm tr-font-medium tr-text-secondary tr-m-0 tr-w-40 tr-shrink-0"},e),(0,a.createElement)("dd",{className:"tr-text-sm tr-text-primary tr-m-0 tr-min-w-0 tr-flex-1"},t,r&&(0,a.createElement)("div",{className:"tr-text-xs tr-text-tertiary tr-mt-1"},r))),p=({onNavigate:e})=>{const{config:t,sections:r,nextRun:p,readiness:k,hasLoaded:y,isLoading:x,isSendingTest:D}=(0,i.useSelect)(e=>{const t=e(M);return{config:t.getConfig(),sections:t.getSections(),nextRun:t.getNextRun(),readiness:t.getReadiness(),hasLoaded:t.hasLoaded(),isLoading:t.isLoading(),isSendingTest:t.isSendingTest()}},[]),{load:j,save:I,sendTest:E,updateField:z}=(0,i.useDispatch)(M),[T,f]=(0,n.useState)(null),[_,A]=(0,n.useState)(!1);(0,n.useEffect)(()=>{j().catch(e=>{f({type:"error",message:e?.message||(0,s.__)("Failed to load email report settings.","thinkrank")})})},[]);const w=t||{},b=Boolean(w.enabled),O=Number(w.frequency_days)||30,v=Array.isArray(w.recipients)?w.recipients:[],L=w.last_skip&&"object"==typeof w.last_skip?w.last_skip:null,S=(Array.isArray(w.sections_enabled)?w.sections_enabled:[]).map(e=>r.find(t=>t.key===e)?.label).filter(Boolean),C=!k||Boolean(k.search_console),Q=!k||Boolean(k.analytics),U=b&&!C;let Y={variant:"neutral",label:(0,s.__)("Off","thinkrank")};if(U?Y={variant:"warning",label:(0,s.__)("Paused","thinkrank")}:b&&(Y={variant:"good",label:(0,s.__)("Active","thinkrank")}),x&&!y)return(0,a.createElement)(l.u4,{lines:4,label:(0,s.__)("Loading email report settings…","thinkrank")});const P=L&&(R=L.at)?m(String(R).replace(" ","T")):null;var R;return(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-4"},T&&(0,a.createElement)(l.Fc,{variant:T.type,onDismiss:()=>f(null)},T.message),(0,a.createElement)(l.Zp,{padding:!1,className:"tr-overflow-hidden"},(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-4 tr-p-6"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-11 tr-h-11 tr-rounded-xl tr-bg-brand-bg tr-text-brand tr-shrink-0"},(0,a.createElement)(u,null)),(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-0"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2.5 tr-flex-wrap"},(0,a.createElement)("h2",{className:"tr-m-0 tr-text-base tr-font-semibold tr-text-primary"},(0,s.__)("Email Reporting","thinkrank")),(0,a.createElement)(l.Ex,{variant:Y.variant},Y.label)),(0,a.createElement)("p",{className:"tr-mt-1 tr-mb-0 tr-text-sm tr-text-secondary tr-max-w-2xl"},(0,s.__)("A Search Console-style summary by email: clicks, impressions, CTR and position with the change vs the previous period, the pages and queries that grew or fell, where your keywords rank, and, when connected, site traffic and visits from AI assistants.","thinkrank"))),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-items-end tr-gap-1 tr-shrink-0"},(0,a.createElement)(l.lM,{label:b?(0,s.__)("On","thinkrank"):(0,s.__)("Off","thinkrank"),checked:b,onChange:async e=>{f(null),z("enabled",e),A(!0);try{await I({enabled:e}),g.A.success(e?(0,s.__)("Email reporting is on.","thinkrank"):(0,s.__)("Email reporting is off.","thinkrank"))}catch(t){z("enabled",!e),g.A.error(t?.message||(0,s.__)("Couldn’t save that change.","thinkrank"))}finally{A(!1)}},disabled:_}),_&&(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},(0,s.__)("Saving…","thinkrank")))),U&&(0,a.createElement)("div",{className:"tr-px-6 tr-pb-6"},(0,a.createElement)(l.Fc,{variant:"warning",title:(0,s.__)("Reports are paused: Google Search Console isn’t connected","thinkrank")},(0,a.createElement)("p",{className:"tr-m-0"},(0,s.__)("The report is built from Search Console data, so nothing is sent until it is connected. The schedule stays as it is: the first report goes out on the next hourly check after you connect.","thinkrank")),L&&P&&(0,a.createElement)("p",{className:"tr-mt-2 tr-mb-0"},(0,s.sprintf)(/* translators: 1: date and time, 2: reason sentence. */ /* translators: 1: date and time, 2: reason sentence. */ | |
| 47 | -(0,s.__)("Last scheduled run on %1$s sent nothing: %2$s","thinkrank"),P,N(L.reason))),(0,a.createElement)("div",{className:"tr-mt-3"},(0,a.createElement)(l.$n,{variant:"primary",size:"sm",onClick:()=>{if("function"!=typeof e)try{const e=new URL(window.location.href);e.searchParams.set("page","thinkrank-essential-seo"),e.searchParams.set("nav_section","integrations"),e.searchParams.set("nav_item","google-services"),window.location.assign(e.toString())}catch(e){}else e("integrations","google-services")}},(0,s.__)("Connect Search Console","thinkrank"))))),b&&!U&&L&&P&&(0,a.createElement)("div",{className:"tr-px-6 tr-pb-6"},(0,a.createElement)(l.Fc,{variant:"info"},(0,s.sprintf)(/* translators: 1: date and time, 2: reason sentence. */ /* translators: 1: date and time, 2: reason sentence. */ | |
| 48 | -(0,s.__)("Last scheduled run on %1$s sent nothing: %2$s","thinkrank"),P,N(L.reason)))),b&&(0,a.createElement)("div",{className:"tr-border-t tr-border-secondary"},(0,a.createElement)("dl",{className:"tr-px-6 tr-py-2 tr-m-0"},(0,a.createElement)(h,{label:(0,s.__)("Frequency","thinkrank"),value:(0,s.sprintf)(/* translators: %d: number of days between reports. */ /* translators: %d: number of days between reports. */ | |
| 46 | +(0,i.__)('"%s" will be permanently deleted. This action cannot be undone.',"thinkrank"),A.title||(0,i.__)("Untitled Brief","thinkrank")),confirmLabel:(0,i.__)("Delete Brief","thinkrank"),isDestructive:!0,onConfirm:()=>(async e=>{w(null);try{(await o()({path:`/thinkrank/v1/content-brief/${e}`,method:"DELETE"})).success&&(T(z.filter(t=>t.id!==e)),D&&D.id===e&&j(null))}catch(e){k.A.error("Failed to delete brief:",e),E((0,i.__)("Failed to delete brief. Please try again.","thinkrank"))}})(A.id),onCancel:()=>w(null)}))}},26225:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(51609),n=r(5573);const i=(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",d:"M11.25 5h1.5v15h-1.5V5zM6 10h1.5v10H6V10zm12 4h-1.5v6H18v-6z",clipRule:"evenodd"}))},26302:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"}))},26698:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"}))},26949:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,a.createElement)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"}))},27132:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,a.createElement)(n.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"}))},27209:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var a=r(51609),n=r(86087),i=r(27723),s=r(49323),l=r(5127),o=r(4025),c=r(13863),d=r(32905),g=r(65403),M=r(80095),u=r(30422);const m=({activeSubSection:e="robots-management",onNavigate:t})=>{const[r,m]=(0,n.useState)(!0);return(0,n.useEffect)(()=>{m(!1)},[]),r?(0,a.createElement)("div",{className:"thinkrank-loading-container"},(0,a.createElement)(s.u4,{lines:3})):(0,a.createElement)("div",{className:"thinkrank-crawling-ai-indexing-tab"},(()=>{switch(e){case"robots-management":return(0,a.createElement)(l.A,{onNavigate:t});case"xml-sitemap":return(0,a.createElement)(o.A,{onNavigate:t});case"llms-ai-indexing":return(0,a.createElement)(c.A,{onNavigate:t});case"global-robot-meta":return(0,a.createElement)(d.A,{onNavigate:t});case"publisher-sitemaps":return(0,a.createElement)(g.A,{filter:"thinkrank.sitemap.publisherSitemapsTab",teaser:(0,a.createElement)(M.A,{illustration:(0,a.createElement)(u.DX,null),title:(0,i.__)("Publisher Sitemaps","thinkrank"),description:(0,i.__)("Publish news or video content? Dedicated News and Video sitemaps help Google surface your content in Google News and video search results.","thinkrank"),features:[(0,i.__)("Generate a Google News sitemap for your latest articles","thinkrank"),(0,i.__)("Generate a Video sitemap so your videos get indexed","thinkrank"),(0,i.__)("Keep both updated automatically as you publish","thinkrank")]})});case"markdown-for-ai":return(0,a.createElement)(g.A,{filter:"thinkrank.crawling.markdownForAiTab",teaser:(0,a.createElement)(M.A,{illustration:(0,a.createElement)(u.tD,null),title:(0,i.__)("Markdown for AI","thinkrank"),description:(0,i.__)("AI agents that fetch your pages have to dig your content out of a full HTML document. Serve them a clean Markdown copy of the same URL instead, while visitors keep the normal page.","thinkrank"),features:[(0,i.__)("Answer the same URL with Markdown when an agent asks for it","thinkrank"),(0,i.__)("Choose which post types serve Markdown","thinkrank"),(0,i.__)("Your HTML page stays canonical, so nothing about your SEO changes","thinkrank")]})});case"ai-usage-policy":return(0,a.createElement)(g.A,{filter:"thinkrank.crawling.aiUsagePolicyTab",teaser:(0,a.createElement)(M.A,{illustration:(0,a.createElement)(u.qR,null),title:(0,i.__)("AI Usage Policy","thinkrank"),description:(0,i.__)("Your llms.txt describes what your site is about, but says nothing about what AI companies may do with it. Publish a usage policy alongside it so crawlers read your terms before they train on your work.","thinkrank"),features:[(0,i.__)("Allow or disallow model training on your content","thinkrank"),(0,i.__)("Decide separately about summarization and embedding","thinkrank"),(0,i.__)("Require attribution when an assistant quotes you","thinkrank"),(0,i.__)("Published at the top of llms.txt, where crawlers look first","thinkrank")]})});case"llms-full":return(0,a.createElement)(g.A,{filter:"thinkrank.crawling.llmsFullTab",teaser:(0,a.createElement)(M.A,{illustration:(0,a.createElement)(u.tD,null),title:(0,i.__)("llms-full.txt","thinkrank"),description:(0,i.__)("llms.txt tells AI agents what your site is. llms-full.txt gives them the content itself: every published entry as clean Markdown in one file, so an agent can read your whole site in a single request.","thinkrank"),features:[(0,i.__)("Your published posts and pages as one Markdown document","thinkrank"),(0,i.__)("Rebuilt in the background daily and after you publish","thinkrank"),(0,i.__)("Carries your AI Usage Policy at the top","thinkrank")]})});default:return(0,a.createElement)("div",null,(0,a.createElement)("p",null,(0,i.__)("Please select a sub-section from the navigation.","thinkrank")))}})())}},27531:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(51609),n=r(97500),i=r.n(n);const s={primary:"tr-bg-brand tr-text-white hover:tr-bg-brand tr-border-transparent",secondary:"tr-bg-white tr-text-secondary tr-border-primary hover:tr-bg-white",ghost:"tr-bg-transparent tr-text-brand tr-border-transparent hover:tr-bg-brand-bg",danger:"tr-bg-danger tr-text-white hover:tr-bg-danger tr-border-transparent",ai:"tr-bg-brand tr-text-white hover:tr-bg-brand tr-border-transparent"},l={sm:"tr-h-8 tr-px-3 tr-text-xs",md:"tr-h-10 tr-px-4 tr-text-sm",lg:"tr-h-11 tr-px-5 tr-text-base"};function o({variant:e="primary",size:t="md",disabled:r=!1,loading:n=!1,icon:o,iconPosition:c="left",className:d,children:g,...M}){return(0,a.createElement)("button",{className:i()("tr-inline-flex tr-items-center tr-justify-center tr-gap-2","tr-rounded-md tr-border tr-font-medium","tr-transition-colors tr-duration-150","focus:tr-outline-none focus:tr-ring-2 focus:tr-ring-brand focus:tr-ring-offset-1","disabled:tr-opacity-50 disabled:tr-cursor-not-allowed",s[e],l[t],d),disabled:r||n,"aria-busy":n||void 0,"aria-disabled":r||n||void 0,...M},n&&(0,a.createElement)("span",{className:"tr-w-4 tr-h-4 tr-shrink-0 tr-rounded-full tr-border-2 tr-animate-spin",style:{borderColor:"currentColor",borderTopColor:"transparent"},"aria-hidden":"true"}),!n&&o&&"left"===c&&(0,a.createElement)(o,{className:"tr-w-4 tr-h-4 tr-shrink-0"}),g,!n&&o&&"right"===c&&(0,a.createElement)(o,{className:"tr-w-4 tr-h-4 tr-shrink-0"}))}},27723:e=>{"use strict";e.exports=window.wp.i18n},28094:(e,t,r)=>{"use strict";r.d(t,{g:()=>a});const a=(e,t={})=>{const r=`${window.thinkrankAdmin?.apiUrl||""}${e}`,a=new URLSearchParams;Object.entries(t).forEach(([e,t])=>{null!=t&&a.set(e,t)});const n=a.toString();return n?`${r}${r.includes("?")?"&":"?"}${n}`:r}},28668:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M11 14.5l1.1 1.1 3-3 .5-.5-.6-.6-3-3-1 1 1.7 1.7H5v1.5h7.7L11 14.5zM16.8 5h-7c-1.1 0-2 .9-2 2v1.5h1.5V7c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v10c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5v-1.5H7.8V17c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2z"}))},29151:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"}))},29475:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var a=r(51609),n=r(27723),i=r(49323),s=r(85770),l=r(17098),o=r(99658);const c=({settings:e,handleSettingChange:t})=>{const r=!e.enabled;return(0,a.createElement)(i.mc,{direction:"column",gap:4},(0,a.createElement)(i.Zp,{padding:!1},(0,a.createElement)(s.A,{title:(0,n.__)("Hero Section Optimization","thinkrank"),description:(0,n.__)("Configure the headline, supporting copy, and call-to-action for your hero.","thinkrank")}),(0,a.createElement)(i.mc,{direction:"column",gap:6,className:"tr-px-6 tr-py-6 tr-divide-y tr-divide-line-2"},(0,a.createElement)(l.A,{id:"tr-hero-title",label:(0,n.__)("Hero Title","thinkrank"),description:(0,n.__)("Main headline for your homepage hero section","thinkrank"),disabled:r},(0,a.createElement)(i.pd,{id:"tr-hero-title",value:e.hero_title||"",onChange:e=>t("hero_title",e.target.value),placeholder:(0,n.__)("e.g., Grow your traffic with smarter SEO","thinkrank"),disabled:r})),(0,a.createElement)(l.A,{id:"tr-hero-subtitle",label:(0,n.__)("Hero Subtitle","thinkrank"),description:(0,n.__)("Supporting text for your hero section","thinkrank"),disabled:r,className:"tr-pt-6"},(0,a.createElement)(i.TM,{id:"tr-hero-subtitle",value:e.hero_subtitle||"",onChange:e=>t("hero_subtitle",e.target.value),placeholder:(0,n.__)("e.g., Practical tools and insights to help your content rank.","thinkrank"),rows:2,disabled:r})),(0,a.createElement)(l.A,{id:"tr-hero-cta-text",label:(0,n.__)("Call-to-Action Text","thinkrank"),description:(0,n.__)("Text for your primary CTA button","thinkrank"),disabled:r,className:"tr-pt-6"},(0,a.createElement)(i.pd,{id:"tr-hero-cta-text",value:e.hero_cta_text||"",onChange:e=>t("hero_cta_text",e.target.value),placeholder:(0,n.__)("e.g., Get started free","thinkrank"),disabled:r})),(0,a.createElement)(l.A,{id:"tr-hero-cta-url",label:(0,n.__)("Call-to-Action URL","thinkrank"),description:(0,n.__)("Enter a valid URL for your CTA button (e.g., /contact, /get-started, https://example.com)","thinkrank"),disabled:r,className:"tr-pt-6"},(0,a.createElement)(i.pd,{id:"tr-hero-cta-url",value:e.hero_cta_url||"",onChange:e=>t("hero_cta_url",e.target.value),placeholder:(0,n.__)("e.g., /contact or /get-started","thinkrank"),disabled:r})),(0,a.createElement)("div",{className:"tr-pt-6"},(0,a.createElement)(o.A,{label:(0,n.__)("Hero Background Image","thinkrank"),value:e.hero_background_image,onChange:e=>t("hero_background_image",e),help:(0,n.__)("Recommended: 1920x1080px or larger","thinkrank"),allowedTypes:["image"],disabled:r})))),(0,a.createElement)(i.Zp,{padding:!1},(0,a.createElement)(s.A,{title:(0,n.__)("Site Assets","thinkrank"),description:(0,n.__)("Upload and manage your site's visual assets for branding and SEO optimization.","thinkrank")}),(0,a.createElement)("div",{className:"tr-px-6 tr-py-6 tr-grid tr-grid-cols-1 md:tr-grid-cols-2 tr-gap-x-6 tr-gap-y-5"},(0,a.createElement)(o.A,{label:(0,n.__)("Site Logo","thinkrank"),value:e.logo_url,onChange:e=>t("logo_url",e),help:(0,n.__)("Recommended: 600x60px","thinkrank"),allowedTypes:["image"],disabled:r}),(0,a.createElement)(o.A,{label:(0,n.__)("Favicon","thinkrank"),value:e.favicon_url,onChange:e=>t("favicon_url",e),help:(0,n.__)("Recommended: 32x32px, ICO or PNG","thinkrank"),allowedTypes:["image"],disabled:r}),(0,a.createElement)(o.A,{label:(0,n.__)("Apple Touch Icon","thinkrank"),value:e.apple_touch_icon_url,onChange:e=>t("apple_touch_icon_url",e),help:(0,n.__)("Recommended: 180x180px, PNG","thinkrank"),allowedTypes:["image"],disabled:r}))))}},30012:(e,t,r)=>{"use strict";r.d(t,{B1:()=>g,D3:()=>c,Zf:()=>o,ah:()=>p,bH:()=>N,oo:()=>h,pO:()=>d});var a=r(7098);const n=[{page:"dashboard",slug:"thinkrank",cap:null},{page:"essential-seo",slug:"thinkrank-essential-seo",cap:null},{page:"ai-tools",slug:"thinkrank-ai-tools",cap:"thinkrank_content_tools"},{page:"analytics",slug:"thinkrank-usages",cap:"thinkrank_analytics"},{page:"settings",slug:"thinkrank-settings",cap:"thinkrank_settings"},{page:"import-export",slug:"thinkrank-import-export",cap:"manage_options"},{page:"migration",slug:"thinkrank-migration",cap:"manage_options"}],i=new Set,s=e=>n.find(t=>t.page===e),l=e=>n.find(t=>t.slug===e),o=e=>{const t=s(e);if(!t)return!1;if(!t.cap)return!0;const r=window.thinkrankAdmin||{};if("manage_options"===t.cap)return!!r.isAdmin;const a=Array.isArray(r.caps)?r.caps:null;return!a||a.includes(t.cap)},c=()=>{try{const e=new URLSearchParams(window.location.search).get("page");return l(e)?.page||null}catch(e){return null}},d=(e,t={})=>{const r=s(e);if(!r)return null;const a=new URLSearchParams({page:r.slug});return Object.entries(t).forEach(([e,t])=>{null!=t&&a.set(e,t)}),`${window.location.pathname}?${a.toString()}`},g=e=>(i.add(e),()=>i.delete(e)),M=e=>{i.forEach(t=>{try{t(e)}catch(e){}})},u=(e,t)=>{(e=>{const t=document.querySelector("#toplevel_page_thinkrank .wp-submenu");t&&(t.querySelectorAll("li, a").forEach(e=>{e.classList.remove("current"),e.removeAttribute("aria-current")}),t.querySelectorAll("a[href]").forEach(t=>{let r;try{r=new URL(t.href,window.location.origin).searchParams.get("page")}catch(e){return}r===e&&(t.classList.add("current"),t.setAttribute("aria-current","page"),t.closest("li")?.classList.add("current"))}))})(e.slug),t&&(e=>{const t=document.title.indexOf(" ‹ ");document.title=-1===t?e:e+document.title.slice(t)})(t),window.scrollTo({top:0})};let m=null;const N=e=>{m=e},h=(e,t={})=>{const r=s(e),a=d(e,t);r&&a&&(o(e)?c()!==e?(window.history.pushState({},"",a),u(r,m?.(e)),M(e)):Object.keys(t).length&&window.history.replaceState({},"",a):window.location.assign(a))};window.addEventListener("popstate",()=>{const e=c(),t=e&&s(e);t&&(u(t,m?.(e)),M(e))});const p=e=>!(e.defaultPrevented||0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey),k=e=>{const t=e.closest("a[href]");if(!t||"_blank"===t.target)return null;let r;try{r=new URL(t.href,window.location.origin)}catch(e){return null}if(r.origin!==window.location.origin||r.pathname!==window.location.pathname)return null;const a=l(r.searchParams.get("page"));return a&&o(a.page)?a:null};(()=>{const e=document.getElementById("adminmenu");e&&(e.addEventListener("click",e=>{if(!p(e))return;const t=k(e.target);t&&(e.preventDefault(),h(t.page))}),e.addEventListener("mouseover",e=>{const t=k(e.target);t&&t.page!==c()&&(0,a.n)(t.page)}))})(),(()=>{const e=document.getElementById("adminmenu");e&&window.matchMedia("(min-width: 783px)").matches&&(e.addEventListener("mouseover",t=>{const r=t.target.closest("li.menu-top");r&&(t=>{var r;if(!t.classList.contains("wp-not-current-submenu"))return;const a=t.querySelector(":scope > .wp-submenu");if(!a)return;const n=t.getBoundingClientRect(),i=null!==(r=document.getElementById("wpadminbar")?.offsetHeight)&&void 0!==r?r:32,s=window.innerHeight-a.offsetHeight-6,l=Math.max(i+6,Math.min(n.top,s));a.style.top=`${Math.round(l)}px`,a.style.left=`${Math.round(n.right)}px`,e.querySelectorAll("li.opensub").forEach(e=>{e!==t&&e.classList.remove("opensub")}),t.classList.add("opensub")})(r)}),e.addEventListener("mouseout",e=>{const t=e.target.closest("li.menu-top");t&&!t.contains(e.relatedTarget)&&(e=>{e.classList.remove("opensub");const t=e.querySelector(":scope > .wp-submenu");t&&(t.style.top="",t.style.left="")})(t)}))})()},30073:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"}))},30239:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"}))},30307:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m12 20-4.5-3.6-.9 1.2L12 22l5.5-4.4-.9-1.2L12 20zm0-16 4.5 3.6.9-1.2L12 2 6.5 6.4l.9 1.2L12 4z"}))},30422:(e,t,r)=>{"use strict";r.d(t,{$S:()=>E,DX:()=>u,D_:()=>y,Hs:()=>g,JU:()=>M,JV:()=>d,Jj:()=>D,Ku:()=>x,Lq:()=>k,_1:()=>h,eW:()=>c,l3:()=>p,qR:()=>N,rs:()=>I,tD:()=>m,v0:()=>T,vD:()=>z,vV:()=>j});var a=r(51609);const n="#4451ff",i="#7b82ff",s="#c3c8ff",l="#ffffff",o={width:"100%",height:"100%",maxWidth:"150px",maxHeight:"150px",display:"block"},c=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("rect",{x:"10",y:"20",width:"52",height:"42",rx:"6",fill:l,stroke:s,strokeWidth:"2.5"}),(0,a.createElement)("path",{d:"M10 30h52",stroke:s,strokeWidth:"2.5"}),(0,a.createElement)("circle",{cx:"17",cy:"25",r:"1.6",fill:s}),(0,a.createElement)("circle",{cx:"23",cy:"25",r:"1.6",fill:s}),(0,a.createElement)("rect",{x:"18",y:"38",width:"36",height:"16",rx:"3",fill:"#eef0fd"}),(0,a.createElement)("text",{x:"36",y:"49.5",fontSize:"8",fontWeight:"700",fill:i,textAnchor:"middle",fontFamily:"system-ui, sans-serif"},"OLD"),(0,a.createElement)("rect",{x:"58",y:"58",width:"52",height:"42",rx:"6",fill:l,stroke:n,strokeWidth:"2.5"}),(0,a.createElement)("path",{d:"M58 68h52",stroke:n,strokeWidth:"2.5"}),(0,a.createElement)("circle",{cx:"65",cy:"63",r:"1.6",fill:n}),(0,a.createElement)("circle",{cx:"71",cy:"63",r:"1.6",fill:n}),(0,a.createElement)("rect",{x:"66",y:"76",width:"36",height:"16",rx:"3",fill:n}),(0,a.createElement)("text",{x:"84",y:"87.5",fontSize:"8",fontWeight:"700",fill:l,textAnchor:"middle",fontFamily:"system-ui, sans-serif"},"NEW"),(0,a.createElement)("path",{d:"M66 40c14 2 22 10 22 22",stroke:n,strokeWidth:"2.5",strokeLinecap:"round"}),(0,a.createElement)("path",{d:"M83 56l5 6 6-4",stroke:n,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})),d=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("path",{d:"M50 44l-9 9a13 13 0 0 0 0 18 13 13 0 0 0 8 3.8",stroke:n,strokeWidth:"4",strokeLinecap:"round"}),(0,a.createElement)("path",{d:"M70 76l9-9a13 13 0 0 0 0-18 13 13 0 0 0-8-3.8",stroke:n,strokeWidth:"4",strokeLinecap:"round"}),(0,a.createElement)("path",{d:"M54 60h5M61 60h5",stroke:i,strokeWidth:"4",strokeLinecap:"round"}),(0,a.createElement)("path",{d:"M60 30v8M76 36l-5 6M44 36l5 6",stroke:s,strokeWidth:"3",strokeLinecap:"round"})),g=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("path",{d:"M36 42l24 18M60 60l26-22M60 60l-18 30M60 60l26 24",stroke:s,strokeWidth:"2.5"}),(0,a.createElement)("circle",{cx:"36",cy:"42",r:"8",fill:l,stroke:n,strokeWidth:"3"}),(0,a.createElement)("circle",{cx:"86",cy:"38",r:"7",fill:l,stroke:i,strokeWidth:"3"}),(0,a.createElement)("circle",{cx:"42",cy:"90",r:"7",fill:l,stroke:i,strokeWidth:"3"}),(0,a.createElement)("circle",{cx:"86",cy:"84",r:"7",fill:l,stroke:i,strokeWidth:"3"}),(0,a.createElement)("circle",{cx:"60",cy:"60",r:"11",fill:n}),(0,a.createElement)("path",{d:"M60 53l1.6 4L66 58l-3.4 2.4L64 65l-4-2.6L56 65l1.4-4.6L54 58l4.4-1z",fill:l})),M=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("path",{d:"M40 34h20l30 30-26 26-30-30V34z",fill:l,stroke:n,strokeWidth:"3",strokeLinejoin:"round"}),(0,a.createElement)("circle",{cx:"50",cy:"46",r:"4.5",fill:n}),(0,a.createElement)("path",{d:"M69 66l3 6 6.6.8-4.8 4.6L75 84l-6-3.2L63 84l1.2-6.6-4.8-4.6 6.6-.8 3-6z",fill:i})),u=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("rect",{x:"20",y:"28",width:"58",height:"64",rx:"6",fill:l,stroke:n,strokeWidth:"3"}),(0,a.createElement)("path",{d:"M30 42h24M30 52h38M30 62h38M30 72h26",stroke:s,strokeWidth:"3",strokeLinecap:"round"}),(0,a.createElement)("rect",{x:"30",y:"40",width:"16",height:"16",rx:"2",fill:"#eef0fd"}),(0,a.createElement)("circle",{cx:"82",cy:"78",r:"18",fill:n}),(0,a.createElement)("path",{d:"M78 71l10 7-10 7V71z",fill:l})),m=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("rect",{x:"24",y:"20",width:"62",height:"76",rx:"6",fill:l,stroke:n,strokeWidth:"3"}),(0,a.createElement)("path",{d:"M34 36h16M34 60h30M34 70h24M34 80h30",stroke:s,strokeWidth:"3",strokeLinecap:"round"}),(0,a.createElement)("path",{d:"M34 46h42",stroke:i,strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"4 5"}),(0,a.createElement)("rect",{x:"66",y:"60",width:"42",height:"30",rx:"5",fill:n}),(0,a.createElement)("path",{d:"M73 82V68l7 8 7-8v14M95 68v10m0 0l-4-4m4 4l4-4",stroke:l,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})),N=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("rect",{x:"20",y:"18",width:"60",height:"80",rx:"6",fill:l,stroke:n,strokeWidth:"3"}),(0,a.createElement)("path",{d:"M30 34h34M30 46h40M30 58h26",stroke:s,strokeWidth:"3",strokeLinecap:"round"}),(0,a.createElement)("path",{d:"M30 70h20",stroke:i,strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"4 5"}),(0,a.createElement)("path",{d:"M84 50l18 7v14c0 11-8 18-18 22-10-4-18-11-18-22V57l18-7z",fill:n}),(0,a.createElement)("path",{d:"M77 71l5 5 11-11",stroke:l,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})),h=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("rect",{x:"14",y:"66",width:"42",height:"34",rx:"5",fill:l,stroke:s,strokeWidth:"3"}),(0,a.createElement)("rect",{x:"64",y:"66",width:"42",height:"34",rx:"5",fill:l,stroke:n,strokeWidth:"3"}),(0,a.createElement)("path",{d:"M22 78h26M22 88h18M72 78h26M72 88h18",stroke:s,strokeWidth:"3",strokeLinecap:"round"}),(0,a.createElement)("path",{d:"M18 52l20-14 16 12 24-28",stroke:n,strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.createElement)("circle",{cx:"78",cy:"22",r:"6",fill:n}),(0,a.createElement)("circle",{cx:"38",cy:"38",r:"4.5",fill:i}),(0,a.createElement)("circle",{cx:"54",cy:"50",r:"4.5",fill:i})),p=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("rect",{x:"16",y:"20",width:"50",height:"80",rx:"6",fill:l,stroke:n,strokeWidth:"3"}),(0,a.createElement)("path",{d:"M26 36h30M26 48h22M26 60h30M26 72h18",stroke:s,strokeWidth:"3",strokeLinecap:"round"}),(0,a.createElement)("circle",{cx:"86",cy:"34",r:"7",fill:n}),(0,a.createElement)("circle",{cx:"86",cy:"58",r:"7",fill:i}),(0,a.createElement)("circle",{cx:"86",cy:"82",r:"7",fill:s}),(0,a.createElement)("path",{d:"M96 34h10M96 58h10M96 82h10",stroke:s,strokeWidth:"3",strokeLinecap:"round"}),(0,a.createElement)("path",{d:"M83 34l2.5 2.5L90 32",stroke:l,strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})),k=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("rect",{x:"34",y:"66",width:"10",height:"20",rx:"2",fill:s}),(0,a.createElement)("rect",{x:"50",y:"54",width:"10",height:"32",rx:"2",fill:i}),(0,a.createElement)("rect",{x:"66",y:"42",width:"10",height:"44",rx:"2",fill:n}),(0,a.createElement)("path",{d:"M34 60l16-10 16-8 18-14",stroke:n,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.createElement)("path",{d:"M84 22l6 1-1 6",stroke:n,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})),y=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("rect",{x:"36",y:"30",width:"40",height:"52",rx:"5",fill:l,stroke:i,strokeWidth:"3",transform:"rotate(-8 56 56)"}),(0,a.createElement)("rect",{x:"44",y:"38",width:"40",height:"52",rx:"5",fill:l,stroke:n,strokeWidth:"3"}),(0,a.createElement)("path",{d:"M52 50h24M52 60h24M52 70h14",stroke:s,strokeWidth:"3",strokeLinecap:"round"}),(0,a.createElement)("circle",{cx:"82",cy:"82",r:"13",fill:n}),(0,a.createElement)("path",{d:"M76 82l4 4 8-8",stroke:l,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})),x=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("circle",{cx:"50",cy:"56",r:"18",fill:l,stroke:s,strokeWidth:"6"}),(0,a.createElement)("path",{d:"M50 38a18 18 0 0 1 15 27",fill:"none",stroke:n,strokeWidth:"6",strokeLinecap:"round"}),(0,a.createElement)("circle",{cx:"50",cy:"56",r:"5",fill:i}),(0,a.createElement)("rect",{x:"72",y:"62",width:"7",height:"16",rx:"2",fill:s}),(0,a.createElement)("rect",{x:"82",y:"52",width:"7",height:"26",rx:"2",fill:n})),D=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("path",{d:"M32 78 L44 66 L56 72 L68 54 L80 60 L88 46 L88 82 L32 82 Z",fill:s,opacity:"0.55"}),(0,a.createElement)("path",{d:"M32 78 L44 66 L56 72 L68 54 L80 60 L88 46",fill:"none",stroke:n,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.createElement)("circle",{cx:"88",cy:"46",r:"4",fill:l,stroke:n,strokeWidth:"3"}),(0,a.createElement)("path",{d:"M30 82h60",stroke:i,strokeWidth:"3",strokeLinecap:"round"})),j=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("rect",{x:"30",y:"40",width:"46",height:"16",rx:"8",fill:l,stroke:i,strokeWidth:"3"}),(0,a.createElement)("circle",{cx:"45",cy:"48",r:"4",fill:s}),(0,a.createElement)("rect",{x:"30",y:"66",width:"42",height:"6",rx:"3",fill:s}),(0,a.createElement)("rect",{x:"30",y:"78",width:"30",height:"6",rx:"3",fill:s}),(0,a.createElement)("circle",{cx:"80",cy:"74",r:"12",fill:l,stroke:n,strokeWidth:"4"}),(0,a.createElement)("path",{d:"M89 83l5 5",stroke:n,strokeWidth:"4",strokeLinecap:"round"})),I=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("rect",{x:"38",y:"32",width:"44",height:"54",rx:"5",fill:l,stroke:i,strokeWidth:"3"}),(0,a.createElement)("path",{d:"M48 46h24M48 56h24M48 66h14",stroke:s,strokeWidth:"3",strokeLinecap:"round"}),(0,a.createElement)("circle",{cx:"80",cy:"80",r:"13",fill:n}),(0,a.createElement)("path",{d:"M74 83l4-5 3 3 5-7",stroke:l,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})),E=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("path",{d:"M44 38c-8 0-8 16-14 22 6 6 6 22 14 22",stroke:n,strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.createElement)("path",{d:"M76 38c8 0 8 16 14 22-6 6-6 22-14 22",stroke:n,strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.createElement)("circle",{cx:"60",cy:"48",r:"5",fill:i}),(0,a.createElement)("circle",{cx:"52",cy:"62",r:"5",fill:n}),(0,a.createElement)("circle",{cx:"68",cy:"62",r:"5",fill:n}),(0,a.createElement)("circle",{cx:"60",cy:"76",r:"5",fill:i}),(0,a.createElement)("path",{d:"M60 53v18M56 59l8 6M64 59l-8 6",stroke:s,strokeWidth:"2.5"})),z=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("rect",{x:"22",y:"36",width:"34",height:"48",rx:"4",fill:l,stroke:s,strokeWidth:"2.5"}),(0,a.createElement)("path",{d:"M28 46h22M28 56h22M28 66h22M28 76h14",stroke:i,strokeWidth:"2.5",strokeLinecap:"round"}),(0,a.createElement)("path",{d:"M58 48h14a6 6 0 0 1 6 6v6M58 72h14a6 6 0 0 0 6-6v-6",stroke:n,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.createElement)("circle",{cx:"78",cy:"60",r:"9",fill:n}),(0,a.createElement)("circle",{cx:"94",cy:"40",r:"6",fill:i}),(0,a.createElement)("circle",{cx:"94",cy:"80",r:"6",fill:i}),(0,a.createElement)("path",{d:"M85 55l5-10M85 65l5 10",stroke:s,strokeWidth:"2.5",strokeLinecap:"round"})),T=()=>(0,a.createElement)("svg",{viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:o,"aria-hidden":"true"},(0,a.createElement)("circle",{cx:"60",cy:"60",r:"46",fill:"#eef0fd"}),(0,a.createElement)("path",{d:"M30 40l20-8 20 8 20-8v40l-20 8-20-8-20 8V40z",fill:l,stroke:s,strokeWidth:"2.5",strokeLinejoin:"round"}),(0,a.createElement)("path",{d:"M50 32v40M70 40v40",stroke:s,strokeWidth:"2.5"}),(0,a.createElement)("path",{d:"M52 46a10 10 0 0 0-20 0c0 7 10 16 10 16s10-9 10-16z",fill:i}),(0,a.createElement)("circle",{cx:"42",cy:"46",r:"4",fill:l}),(0,a.createElement)("path",{d:"M84 58a9 9 0 0 0-18 0c0 6.5 9 14.5 9 14.5S84 64.5 84 58z",fill:n}),(0,a.createElement)("circle",{cx:"75",cy:"58",r:"3.5",fill:l}))},30443:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M12.5 5L10 19h1.9l2.5-14z"}))},31198:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M12 3.25a8.75 8.75 0 100 17.5 8.75 8.75 0 000-17.5zM4.75 12a7.25 7.25 0 1114.5 0 7.25 7.25 0 01-14.5 0zm9.195 1.944a2.75 2.75 0 01-4.066-.194h.621a.75.75 0 000-1.5H9.262a2.767 2.767 0 010-.5H11.5a.75.75 0 000-1.5H9.88a2.75 2.75 0 014.066-.194.75.75 0 001.06-1.061 4.25 4.25 0 00-6.88 1.255H7.5a.75.75 0 000 1.5h.258c-.01.166-.01.334 0 .5H7.5a.75.75 0 000 1.5h.626a4.25 4.25 0 006.88 1.255.75.75 0 00-1.06-1.06z"}))},31471:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var a=r(51609),n=r(86087),i=r(27723),s=r(49323),l=r(99658),o=r(94168);const c=()=>(0,a.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),(0,a.createElement)("circle",{cx:"12",cy:"7",r:"4"})),d=()=>(0,a.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"}),(0,a.createElement)("polyline",{points:"22,6 12,13 2,6"})),g=()=>(0,a.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("rect",{x:"2",y:"7",width:"20",height:"14",rx:"2"}),(0,a.createElement)("path",{d:"M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"})),M=()=>(0,a.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),(0,a.createElement)("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})),u=e=>Array.isArray(e)?e.join("\n"):e||"",m=({settings:e,onSettingChange:t,isLoading:r,onNavigate:m})=>{const N=!e.enabled,[h,p]=(0,n.useState)(()=>u(e.person_same_as));return(0,n.useEffect)(()=>{p(u(e.person_same_as))},[e.person_same_as]),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-4"},N&&(0,a.createElement)(o.A,{onNavigate:m}),(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2"},(0,a.createElement)("span",{className:"tr-text-tertiary"},(0,a.createElement)(c,null)),(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,i.__)("Personal Information","thinkrank"))),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0 tr-mt-0.5"},(0,i.__)("Core details for Person schema markup","thinkrank"))),(0,a.createElement)("div",{className:"tr-p-5 tr-flex tr-flex-col tr-gap-4"},(0,a.createElement)(s.pd,{label:(0,i.__)("Full Name","thinkrank"),value:e.person_name||"",onChange:e=>t("person_name",e.target.value),description:(0,i.__)("Full name of the person","thinkrank"),disabled:N}),(0,a.createElement)(l.A,{label:(0,i.__)("Profile Image","thinkrank"),value:e.person_image,onChange:e=>t("person_image",e),help:(0,i.__)("Professional headshot or profile photo","thinkrank"),allowedTypes:["image"],disabled:N}),(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-2 tr-gap-4"},(0,a.createElement)(s.pd,{label:(0,i.__)("Job Title","thinkrank"),value:e.person_job_title||"",onChange:e=>t("person_job_title",e.target.value),description:(0,i.__)("Professional title or position","thinkrank"),disabled:N}),(0,a.createElement)(s.pd,{label:(0,i.__)("Nationality","thinkrank"),value:e.person_nationality||"",onChange:e=>t("person_nationality",e.target.value),description:(0,i.__)("Country of citizenship","thinkrank"),disabled:N})),(0,a.createElement)(s.TM,{label:(0,i.__)("Biography","thinkrank"),value:e.person_description||"",onChange:e=>t("person_description",e.target.value),description:(0,i.__)("Brief professional biography or description","thinkrank"),rows:3,disabled:N}))),(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2"},(0,a.createElement)("span",{className:"tr-text-tertiary"},(0,a.createElement)(d,null)),(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,i.__)("Contact Details","thinkrank")))),(0,a.createElement)("div",{className:"tr-p-5 tr-flex tr-flex-col tr-gap-4"},(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-2 tr-gap-4"},(0,a.createElement)(s.pd,{label:(0,i.__)("Website URL","thinkrank"),type:"url",value:e.person_url||"",onChange:e=>t("person_url",e.target.value),description:(0,i.__)("Personal or professional website","thinkrank"),placeholder:"https://example.com",disabled:N}),(0,a.createElement)(s.pd,{label:(0,i.__)("Email Address","thinkrank"),type:"email",value:e.person_email||"",onChange:e=>t("person_email",e.target.value),description:(0,i.__)("Professional contact email","thinkrank"),disabled:N})),(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-2 tr-gap-4"},(0,a.createElement)(s.pd,{label:(0,i.__)("Phone Number","thinkrank"),type:"tel",value:e.person_telephone||"",onChange:e=>t("person_telephone",e.target.value),description:(0,i.__)("Professional contact number","thinkrank"),disabled:N}),(0,a.createElement)(s.pd,{label:(0,i.__)("Birth Date","thinkrank"),type:"date",value:e.person_birth_date||"",onChange:e=>t("person_birth_date",e.target.value),description:(0,i.__)("Date of birth (optional)","thinkrank"),disabled:N})))),(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2"},(0,a.createElement)("span",{className:"tr-text-tertiary"},(0,a.createElement)(g,null)),(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,i.__)("Professional Details","thinkrank")))),(0,a.createElement)("div",{className:"tr-p-5 tr-flex tr-flex-col tr-gap-4"},(0,a.createElement)(s.TM,{label:(0,i.__)("Address","thinkrank"),value:e.person_address||"",onChange:e=>t("person_address",e.target.value),description:(0,i.__)("Professional address (optional)","thinkrank"),rows:2,disabled:N}),(0,a.createElement)(s.pd,{label:(0,i.__)("Works For (Organization)","thinkrank"),value:e.person_works_for||"",onChange:e=>t("person_works_for",e.target.value),description:(0,i.__)("Organization or company name (optional)","thinkrank"),disabled:N}))),(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2"},(0,a.createElement)("span",{className:"tr-text-tertiary"},(0,a.createElement)(M,null)),(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,i.__)("Social Media Profiles","thinkrank"))),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0 tr-mt-0.5"},(0,i.__)("Used as sameAs properties, one URL per line","thinkrank"))),(0,a.createElement)("div",{className:"tr-p-5"},(0,a.createElement)(s.TM,{label:(0,i.__)("Profile URLs","thinkrank"),value:h,onChange:e=>p(e.target.value),onBlur:()=>{const r=h.split("\n").map(e=>e.trim()).filter(Boolean);r.join("\n")!==u(e.person_same_as)&&t("person_same_as",r)},description:(0,i.__)("Enter social media profile URLs one per line e.g., LinkedIn, Twitter, Wikipedia","thinkrank"),placeholder:"https://linkedin.com/in/yourname\nhttps://twitter.com/yourhandle",rows:4,disabled:N}))))}},31594:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}))},31600:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M7.5 12C7.5 11.1716 6.82843 10.5 6 10.5C5.17157 10.5 4.5 11.1716 4.5 12C4.5 12.8284 5.17157 13.5 6 13.5C6.82843 13.5 7.5 12.8284 7.5 12Z"}),(0,a.createElement)(n.Path,{d:"M13.5 12C13.5 11.1716 12.8284 10.5 12 10.5C11.1716 10.5 10.5 11.1716 10.5 12C10.5 12.8284 11.1716 13.5 12 13.5C12.8284 13.5 13.5 12.8284 13.5 12Z"}),(0,a.createElement)(n.Path,{d:"M19.5 12C19.5 11.1716 18.8284 10.5 18 10.5C17.1716 10.5 16.5 11.1716 16.5 12C16.5 12.8284 17.1716 13.5 18 13.5C18.8284 13.5 19.5 12.8284 19.5 12Z"}))},31759:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});var a=r(51609),n=r(86087),i=r(47143),s=r(27723),l=r(49323),o=r(65403),c=r(80095),d=r(30422),g=r(94240);const M="thinkrank/email-report",u=()=>(0,a.createElement)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,a.createElement)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2",stroke:"currentColor",strokeWidth:"1.6"}),(0,a.createElement)("path",{d:"M3 7l9 6 9-6",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"})),m=e=>{if(!e)return null;try{const t=new Date(e);return Number.isNaN(t.getTime())?e:new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(t)}catch(t){return e}},N=(e,t)=>{switch(e){case"search_console_not_connected":return(0,s.__)("Google Search Console was not connected.","thinkrank");case"no_data":return(0,s.__)("Search Console returned no data for the period.","thinkrank");case"fetch_failed":return t?(0,s.sprintf)(/* translators: %s: the error Search Console returned. */ /* translators: %s: the error Search Console returned. */ | |
| 47 | +(0,s.__)("Search Console could not be reached or refused the request (%s).","thinkrank"),t):(0,s.__)("Search Console could not be reached or refused the request.","thinkrank");default:return(0,s.__)("the report had nothing to send.","thinkrank")}},h=({label:e,value:t,hint:r})=>(0,a.createElement)("div",{className:"tr-flex tr-flex-wrap tr-gap-x-6 tr-gap-y-1 tr-py-3 tr-border-b tr-border-secondary last:tr-border-b-0"},(0,a.createElement)("dt",{className:"tr-text-sm tr-font-medium tr-text-secondary tr-m-0 tr-w-40 tr-shrink-0"},e),(0,a.createElement)("dd",{className:"tr-text-sm tr-text-primary tr-m-0 tr-min-w-0 tr-flex-1"},t,r&&(0,a.createElement)("div",{className:"tr-text-xs tr-text-tertiary tr-mt-1"},r))),p=({onNavigate:e})=>{const{config:t,sections:r,nextRun:p,readiness:k,hasLoaded:y,isLoading:x,isSendingTest:D}=(0,i.useSelect)(e=>{const t=e(M);return{config:t.getConfig(),sections:t.getSections(),nextRun:t.getNextRun(),readiness:t.getReadiness(),hasLoaded:t.hasLoaded(),isLoading:t.isLoading(),isSendingTest:t.isSendingTest()}},[]),{load:j,save:I,sendTest:E,updateField:z}=(0,i.useDispatch)(M),[T,f]=(0,n.useState)(null),[_,A]=(0,n.useState)(!1);(0,n.useEffect)(()=>{j().catch(e=>{f({type:"error",message:e?.message||(0,s.__)("Failed to load email report settings.","thinkrank")})})},[]);const w=t||{},b=Boolean(w.enabled),O=Number(w.frequency_days)||30,v=Array.isArray(w.recipients)?w.recipients:[],L=w.last_skip&&"object"==typeof w.last_skip?w.last_skip:null,S=(Array.isArray(w.sections_enabled)?w.sections_enabled:[]).map(e=>r.find(t=>t.key===e)?.label).filter(Boolean),C=!k||Boolean(k.search_console),Q=!k||Boolean(k.analytics),U=b&&!C;let Y={variant:"neutral",label:(0,s.__)("Off","thinkrank")};if(U?Y={variant:"warning",label:(0,s.__)("Paused","thinkrank")}:b&&(Y={variant:"good",label:(0,s.__)("Active","thinkrank")}),x&&!y)return(0,a.createElement)(l.u4,{lines:4,label:(0,s.__)("Loading email report settings…","thinkrank")});const P=L&&(R=L.at)?m(String(R).replace(" ","T")):null;var R;return(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-4"},T&&(0,a.createElement)(l.Fc,{variant:T.type,onDismiss:()=>f(null)},T.message),(0,a.createElement)(l.Zp,{padding:!1,className:"tr-overflow-hidden"},(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-4 tr-p-6"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-11 tr-h-11 tr-rounded-xl tr-bg-brand-bg tr-text-brand tr-shrink-0"},(0,a.createElement)(u,null)),(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-0"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2.5 tr-flex-wrap"},(0,a.createElement)("h2",{className:"tr-m-0 tr-text-base tr-font-semibold tr-text-primary"},(0,s.__)("Email Reporting","thinkrank")),(0,a.createElement)(l.Ex,{variant:Y.variant},Y.label)),(0,a.createElement)("p",{className:"tr-mt-1 tr-mb-0 tr-text-sm tr-text-secondary tr-max-w-2xl"},(0,s.__)("A Search Console-style summary by email: clicks, impressions, CTR and position with the change vs the previous period, the pages and queries that grew or fell, where your keywords rank, and, when connected, site traffic and visits from AI assistants.","thinkrank"))),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-items-end tr-gap-1 tr-shrink-0"},(0,a.createElement)(l.lM,{label:b?(0,s.__)("On","thinkrank"):(0,s.__)("Off","thinkrank"),checked:b,onChange:async e=>{f(null),z("enabled",e),A(!0);try{await I({enabled:e}),g.A.success(e?(0,s.__)("Email reporting is on.","thinkrank"):(0,s.__)("Email reporting is off.","thinkrank"))}catch(t){z("enabled",!e),g.A.error(t?.message||(0,s.__)("Couldn’t save that change.","thinkrank"))}finally{A(!1)}},disabled:_}),_&&(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},(0,s.__)("Saving…","thinkrank")))),U&&(0,a.createElement)("div",{className:"tr-px-6 tr-pb-6"},(0,a.createElement)(l.Fc,{variant:"warning",title:(0,s.__)("Reports are paused: Google Search Console isn’t connected","thinkrank")},(0,a.createElement)("p",{className:"tr-m-0"},(0,s.__)("The report is built from Search Console data, so nothing is sent until it is connected. The schedule stays as it is: the first report goes out on the next hourly check after you connect.","thinkrank")),L&&P&&(0,a.createElement)("p",{className:"tr-mt-2 tr-mb-0"},(0,s.sprintf)(/* translators: 1: date and time, 2: reason sentence. */ /* translators: 1: date and time, 2: reason sentence. */ | |
| 48 | +(0,s.__)("Last scheduled run on %1$s sent nothing: %2$s","thinkrank"),P,N(L.reason,L.message))),(0,a.createElement)("div",{className:"tr-mt-3"},(0,a.createElement)(l.$n,{variant:"primary",size:"sm",onClick:()=>{if("function"!=typeof e)try{const e=new URL(window.location.href);e.searchParams.set("page","thinkrank-essential-seo"),e.searchParams.set("nav_section","integrations"),e.searchParams.set("nav_item","google-services"),window.location.assign(e.toString())}catch(e){}else e("integrations","google-services")}},(0,s.__)("Connect Search Console","thinkrank"))))),b&&!U&&L&&P&&(0,a.createElement)("div",{className:"tr-px-6 tr-pb-6"},(0,a.createElement)(l.Fc,{variant:"info"},(0,s.sprintf)(/* translators: 1: date and time, 2: reason sentence. */ /* translators: 1: date and time, 2: reason sentence. */ | |
| 49 | +(0,s.__)("Last scheduled run on %1$s sent nothing: %2$s","thinkrank"),P,N(L.reason,L.message)))),b&&(0,a.createElement)("div",{className:"tr-border-t tr-border-secondary"},(0,a.createElement)("dl",{className:"tr-px-6 tr-py-2 tr-m-0"},(0,a.createElement)(h,{label:(0,s.__)("Frequency","thinkrank"),value:(0,s.sprintf)(/* translators: %d: number of days between reports. */ /* translators: %d: number of days between reports. */ | |
| 49 | 50 | (0,s._n)("Every %d day","Every %d days",O,"thinkrank"),O),hint:(0,s.__)("Each report covers the period since the last one and compares it with the period before.","thinkrank")}),(0,a.createElement)(h,{label:(0,s.__)("Recipients","thinkrank"),value:v.length>0?v.join(", "):(0,s.__)("No recipients","thinkrank")}),(0,a.createElement)(h,{label:(0,s.__)("Sections","thinkrank"),value:S.length>0?S.join(", "):(0,s.__)("No sections","thinkrank"),hint:!Q&&C?(0,s.__)("Site traffic needs Google Analytics 4. Connect it to add that card. The AI assistants card appears once AI Insights has recorded visits.","thinkrank"):(0,s.__)("Sections with nothing to show for the period are left out rather than sent empty.","thinkrank")}),(0,a.createElement)(h,{label:(0,s.__)("Next report","thinkrank"),value:U?(0,s.__)("Paused until Search Console is connected","thinkrank"):m(p)||(0,s.__)("Not scheduled yet","thinkrank")}))),b&&(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-3 tr-flex-wrap tr-px-6 tr-py-4 tr-border-t tr-border-secondary"},(0,a.createElement)(l.$n,{variant:"secondary",loading:D,onClick:async()=>{f(null);try{const e=await E();f(e?.success?{type:e?.not_connected?"warning":"success",message:e?.not_connected?(0,s.__)("Test email sent. Search Console isn’t connected, so the email explains how to connect it instead of showing a report.","thinkrank"):(0,s.__)("Test email sent. Check your inbox in a moment.","thinkrank")}:{type:"error",message:e?.result?.error||(0,s.__)("Test email could not be sent.","thinkrank")})}catch(e){f({type:"error",message:e?.message||(0,s.__)("Test email failed.","thinkrank")})}}},(0,s.__)("Send Test Email","thinkrank")),(0,a.createElement)("span",{className:"tr-text-sm tr-text-secondary"},U?(0,s.__)("Sends the “connect Search Console” email your recipients would get.","thinkrank"):(0,s.__)("Sends the report as it stands today to every recipient.","thinkrank")))),b&&(0,a.createElement)(o.A,{filter:"thinkrank.emailReport.proSettings",teaser:(0,a.createElement)(c.A,{illustration:(0,a.createElement)(d.Jj,null),title:(0,s.__)("Branded email reports","thinkrank"),description:(0,s.__)("Send the report on your schedule, to your whole team or your clients, looking like it came from you.","thinkrank"),features:[(0,s.__)("Every 7, 15 or 30 days","thinkrank"),(0,s.__)("Up to 50 recipients","thinkrank"),(0,s.__)("Your logo, header colour, subject line, intro and footer","thinkrank"),(0,s.__)("Pick the sections to include","thinkrank")]})}))}},32319:(e,t,r)=>{"use strict";r.d(t,{A:()=>y});var a=r(51609),n=r(86087),i=r(27723),s=r(49323),l=r(1455),o=r.n(l),c=r(99658),d=r(85161),g=r(85770),M=r(17098),u=r(52495),m=r(78856),N=r(10628),h=r(60775),p=r(43534);const k={facebook:"tr-aspect-[1.91/1]",twitter:"tr-aspect-[2/1]",linkedin:"tr-aspect-[1.91/1]",pinterest:"tr-aspect-[2/3]"},y=({activeSubSection:e="open-graph"})=>{const[t,r]=(0,n.useState)(!0),[l,y]=(0,n.useState)(!1),[x,D]=(0,n.useState)(!1),[j,I]=(0,n.useState)(!1),[E,z]=(0,n.useState)(!1),[T,f]=(0,n.useState)(!1),[_,A]=(0,n.useState)(!1),[w,b]=(0,n.useState)({}),[O,v]=(0,n.useState)(!1),[L,S]=(0,n.useState)(null),[C,Q]=(0,n.useState)(null),[U,Y]=(0,n.useState)("facebook"),[P,R]=(0,n.useState)(null);(0,n.useEffect)(()=>{Z()},[]),(0,n.useEffect)(()=>{R(null),S(null)},[e]);const Z=async()=>{try{r(!0);const e=await o()({path:"/thinkrank/v1/social-media/settings",method:"GET"});if(!e.success)throw new Error(e.error||"Failed to load social media settings");b({...V(),...e.data.settings}),y(!1)}catch(e){h.A.error("Social Media settings load error:",e),y(!0),S({status:"error",message:(0,i.__)("Could not load your social media settings. Nothing has been changed. Retry before editing.","thinkrank")})}finally{r(!1)}},V=()=>{const e=window.thinkrankAdmin?.siteName||"",t=window.thinkrankAdmin?.siteDescription||"";return window.thinkrankAdmin?.siteUrl||window.location.origin,{enable_open_graph:!0,oembed_use_seo_title:!1,oembed_use_social_image:!1,oembed_remove_author:!1,og_site_name:e,og_description:t,og_type:"website",og_locale:"",default_og_image:"",og_multiple_images:!1,og_image_width:1200,og_image_height:630,enable_twitter_cards:!0,twitter_username:"",twitter_creator:"",twitter_card_type:"summary_large_image",default_twitter_image:"",facebook_app_id:"",facebook_admins:"",enable_linkedin:!1,enable_pinterest:!1,pinterest_site_verification:"",enable_instagram:!1,instagram_verification:"",enable_tiktok:!1,tiktok_verification:"",enable_youtube:!1,youtube_channel_id:"",enable_whatsapp:!1,whatsapp_business_id:"",auto_generate_descriptions:!0,fallback_to_excerpt:!0,strip_html_tags:!0,max_description_length:160}},B=(e,t)=>{b(r=>({...r,[e]:t})),v(!0)},{update:G,isSaving:W}=(0,N.A)({settings:w,setSettings:b,save:async t=>{const r=await o()({path:"/thinkrank/v1/social-media/settings",method:"POST",data:{settings:t,context_type:"site",validation_context:e}});if(!r.success)throw new Error(r.error||(0,i.__)("Failed to save settings.","thinkrank"))},logLabel:"Social Media"}),H=async()=>{try{I(!0);const e=window.thinkrankAdmin?.siteName||"",t=window.thinkrankAdmin?.siteDescription||"",r=window.thinkrankAdmin?.siteUrl||window.location.origin,a={title:w.og_site_name||e||"Your Site Name",description:w.og_description||t||"Your site description",url:r,image:w.default_og_image||"",type:w.og_type||"website"},n=await o()({path:"/thinkrank/v1/social-media/preview",method:"POST",data:{data:a,platform:U}});if(n.success){const e={...n.data,platform:U,character_counts:{title:n.data.title?.length||0,description:n.data.description?.length||0}};Q(e),S({status:"success",message:(0,i.__)("Social media preview generated successfully!","thinkrank")})}}catch(e){h.A.error("Social media preview error:",e),S({status:"error",message:(0,i.__)("Failed to generate social media preview. Please try again.","thinkrank")})}finally{I(!1)}},F=async()=>{try{z(!0);const t=await o()({path:"/thinkrank/v1/social-media/validate",method:"POST",data:{settings:w,context_type:"site",validation_context:e}});t.success?(R(t.data),S({status:"success",message:(0,i.__)("Social media settings validated successfully!","thinkrank")})):S({status:"error",message:t.data?.message||(0,i.__)("Validation failed. Please check your settings.","thinkrank")})}catch(e){h.A.error("Social media validation error:",e),S({status:"error",message:(0,i.__)("Failed to validate social media settings. Please try again.","thinkrank")})}finally{z(!1)}};return t?(0,a.createElement)("div",{className:"thinkrank-loading"},(0,a.createElement)(s.u4,{lines:3})):l?(0,a.createElement)(s.oK,{onRetry:Z,isRetrying:t,message:(0,i.__)("Your social media settings could not be read, so this screen has nothing to edit yet. Nothing has changed. Retry to load them.","thinkrank")}):(0,a.createElement)("div",{className:"thinkrank-social-media-tab"},(0,a.createElement)(d.A,{title:(0,i.__)("Social Media & Open Graph","thinkrank"),optimizationButtons:(()=>{const t={disabled:!1,size:"default"};switch(e){case"open-graph":return[(0,a.createElement)(u.A,{key:"validate-social",type:"validate",label:(0,i.__)("Validate Social Media","thinkrank"),loadingLabel:(0,i.__)("Validating…","thinkrank"),onClick:F,isBusy:E,...t}),(0,a.createElement)(u.A,{key:"sync-og",type:"generate",label:(0,i.__)("Sync from Site Identity","thinkrank"),loadingLabel:(0,i.__)("Syncing…","thinkrank"),onClick:()=>(async(e=[])=>{try{f(!0);const t=await o()({path:"/thinkrank/v1/site-identity/settings",method:"GET"});if(!t.success)throw new Error(t.message||"API response indicated failure");{const r=t.data.settings,a={...w},n={og_site_name:r.site_name||"",og_description:r.site_description||r.tagline||"",default_og_image:r.logo_url||"",twitter_username:"",default_twitter_image:r.logo_url||""},s=[];let l=!1;e.forEach(e=>{if(n.hasOwnProperty(e)){const t=a[e]||"",r=n[e]||"";t!==r&&(a[e]=r,s.push(e),l=!0)}}),l?(b(a),v(!0),S({status:"success",message:(0,i.__)("Successfully synced data from Site Identity settings!","thinkrank")+` (${s.length} fields updated)`})):S({status:"info",message:(0,i.__)("No changes needed - Social Media fields are already up to date with Site Identity settings.","thinkrank")})}}catch(e){h.A.error("Sync error:",e),S({status:"error",message:(0,i.__)("Failed to sync from Site Identity. Please try again.","thinkrank")})}finally{f(!1)}})(["og_site_name","og_description","default_og_image"]),isBusy:T,...t})];case"twitter-cards":return[(0,a.createElement)(u.A,{key:"validate-social",type:"validate",label:(0,i.__)("Validate Social Media","thinkrank"),loadingLabel:(0,i.__)("Validating…","thinkrank"),onClick:F,isBusy:E,...t})];case"preview":return[(0,a.createElement)(u.A,{key:"generate-preview",type:"generate",label:(0,i.__)("Generate Preview","thinkrank"),loadingLabel:(0,i.__)("Generating…","thinkrank"),onClick:H,isBusy:j,...t})];default:return[]}})(),notice:L,onNoticeRemove:()=>S(null)},(()=>{switch({"open-graph":"open-graph","twitter-cards":"twitter",preview:"preview"}[e]||"open-graph"){case"open-graph":return(()=>{const e=w.og_description?.length||0,t=e>=120&&e<=160,r=t?(0,i.__)("Good length","thinkrank"):e<120?(0,i.__)("Too short","thinkrank"):(0,i.__)("Too long","thinkrank");return(0,a.createElement)(s.mc,{direction:"column",gap:4},(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)(g.A,{title:(0,i.__)("Open Graph Settings","thinkrank"),description:(0,i.__)("Add Open Graph meta tags for social media sharing.","thinkrank"),trailing:(0,a.createElement)(s.lM,{checked:w.enable_open_graph,onChange:e=>G({enable_open_graph:e},e?(0,i.__)("Open Graph is on.","thinkrank"):(0,i.__)("Open Graph is off.","thinkrank")),label:(0,i.__)("Enable Open Graph","thinkrank"),disabled:W})}),w.enable_open_graph&&(0,a.createElement)(s.mc,{direction:"column",gap:6,className:"tr-px-6 tr-py-6 tr-divide-y tr-divide-line-2"},(0,a.createElement)(M.A,{id:"tr-og-site-name",label:(0,i.__)("Site Name","thinkrank"),description:(0,i.__)("The name of your website","thinkrank")},(0,a.createElement)(s.pd,{id:"tr-og-site-name",value:w.og_site_name,onChange:e=>B("og_site_name",e.target.value),placeholder:window.thinkrankAdmin?.siteName||(0,i.__)("Your Site Name","thinkrank")})),(0,a.createElement)(M.A,{id:"tr-og-desc",label:(0,i.__)("Default Description","thinkrank"),description:(0,i.__)("Default description for social media sharing (120-160 characters recommended)","thinkrank"),counter:(0,a.createElement)("span",{className:"tr-text-xs tr-font-medium "+(t?"tr-text-success":"tr-text-warning")},r," (",e,"/160)"),className:"tr-pt-6"},(0,a.createElement)(s.TM,{id:"tr-og-desc",value:w.og_description,onChange:e=>B("og_description",e.target.value),placeholder:window.thinkrankAdmin?.siteDescription||(0,i.__)("Your site description for social media sharing","thinkrank"),rows:3})),(0,a.createElement)(M.A,{id:"tr-og-type",label:(0,i.__)("Content Type","thinkrank"),description:(0,i.__)("The type of content your site represents","thinkrank"),className:"tr-pt-6"},(0,a.createElement)(s.l6,{id:"tr-og-type",value:w.og_type,options:[{label:(0,i.__)("Website","thinkrank"),value:"website"},{label:(0,i.__)("Article","thinkrank"),value:"article"},{label:(0,i.__)("Blog","thinkrank"),value:"blog"},{label:(0,i.__)("Business","thinkrank"),value:"business"}],onChange:e=>B("og_type",e.target.value)})),(0,a.createElement)("div",{className:"tr-pt-6"},(0,a.createElement)(c.A,{label:(0,i.__)("Default Open Graph Image","thinkrank"),value:w.default_og_image,onChange:e=>B("default_og_image",e),help:(0,i.__)("Default image for social media sharing (1200x630px recommended)","thinkrank"),allowedTypes:["image"]})),(0,a.createElement)("div",{className:"tr-pt-6"},(0,a.createElement)(s.lM,{id:"og-multiple-images",label:(0,i.__)("Offer Alternative Images","thinkrank"),description:(0,i.__)("Publish the featured image and images from the post body as alternatives after the main one, so a sharer can choose and a platform has a fallback if the main image fails validation. Twitter Cards and schema keep using the main image only.","thinkrank"),checked:!!w.og_multiple_images,onChange:e=>G({og_multiple_images:e},e?(0,i.__)("Alternative social images are on.","thinkrank"):(0,i.__)("Alternative social images are off.","thinkrank")),disabled:W})))),(0,a.createElement)(p.A,{label:(0,i.__)("Embed cards","thinkrank")},(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)(g.A,{title:(0,i.__)("Embed Cards","thinkrank"),description:(0,i.__)("What other sites show when someone pastes a link to your content. Each switch saves as you flip it.","thinkrank")}),(0,a.createElement)(s.mc,{direction:"column",gap:6,className:"tr-px-6 tr-py-6 tr-divide-y tr-divide-line-2"},(0,a.createElement)(s.lM,{id:"oembed-use-seo-title",label:(0,i.__)("Use SEO Title In Embeds","thinkrank"),description:(0,i.__)("Show the SEO title you wrote instead of the raw post title. Posts without an SEO title keep their own.","thinkrank"),checked:!!w.oembed_use_seo_title,onChange:e=>G({oembed_use_seo_title:e},e?(0,i.__)("Embeds now use the SEO title.","thinkrank"):(0,i.__)("Embeds now use the post title.","thinkrank")),disabled:W}),(0,a.createElement)("div",{className:"tr-pt-6"},(0,a.createElement)(s.lM,{id:"oembed-use-social-image",label:(0,i.__)("Use Social Image In Embeds","thinkrank"),description:(0,i.__)("Put the social image on the embed card. A featured image still wins over the site-wide default.","thinkrank"),checked:!!w.oembed_use_social_image,onChange:e=>G({oembed_use_social_image:e},e?(0,i.__)("Embeds now use the social image.","thinkrank"):(0,i.__)("Embeds no longer use the social image.","thinkrank")),disabled:W})),(0,a.createElement)("div",{className:"tr-pt-6"},(0,a.createElement)(s.lM,{id:"oembed-remove-author",label:(0,i.__)("Remove Author From Embeds","thinkrank"),description:(0,i.__)("Drop the author name and link from the embed data. Useful for brands and multi-author sites that do not want personal names travelling with every embed.","thinkrank"),checked:!!w.oembed_remove_author,onChange:e=>G({oembed_remove_author:e},e?(0,i.__)("Embeds no longer name the author.","thinkrank"):(0,i.__)("Embeds name the author again.","thinkrank")),disabled:W}))))))})();case"twitter":return(0,a.createElement)(s.mc,{direction:"column",gap:4},(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)(g.A,{title:(0,i.__)("Twitter Cards Settings","thinkrank"),description:(0,i.__)("Add Twitter Card meta tags for Twitter sharing.","thinkrank"),trailing:(0,a.createElement)(s.lM,{checked:w.enable_twitter_cards,onChange:e=>G({enable_twitter_cards:e},e?(0,i.__)("Twitter Cards are on.","thinkrank"):(0,i.__)("Twitter Cards are off.","thinkrank")),label:(0,i.__)("Enable Twitter Cards","thinkrank"),disabled:W})}),w.enable_twitter_cards&&(0,a.createElement)(s.mc,{direction:"column",gap:6,className:"tr-px-6 tr-py-6 tr-divide-y tr-divide-line-2"},(0,a.createElement)(M.A,{id:"tr-tw-user",label:(0,i.__)("Twitter Username","thinkrank"),description:(0,i.__)("Your Twitter username (without @)","thinkrank")},(0,a.createElement)(s.pd,{id:"tr-tw-user",value:w.twitter_username,onChange:e=>B("twitter_username",e.target.value),placeholder:"username"})),(0,a.createElement)(M.A,{id:"tr-tw-creator",label:(0,i.__)("Twitter Creator","thinkrank"),description:(0,i.__)("Content creator Twitter username (without @)","thinkrank"),className:"tr-pt-6"},(0,a.createElement)(s.pd,{id:"tr-tw-creator",value:w.twitter_creator,onChange:e=>B("twitter_creator",e.target.value),placeholder:"creator_username"})),(0,a.createElement)(M.A,{id:"tr-tw-card-type",label:(0,i.__)("Card Type","thinkrank"),description:(0,i.__)("The type of Twitter Card to use","thinkrank"),className:"tr-pt-6"},(0,a.createElement)(s.l6,{id:"tr-tw-card-type",value:w.twitter_card_type,options:[{label:(0,i.__)("Summary Large Image","thinkrank"),value:"summary_large_image"},{label:(0,i.__)("Summary","thinkrank"),value:"summary"},{label:(0,i.__)("App","thinkrank"),value:"app"},{label:(0,i.__)("Player","thinkrank"),value:"player"}],onChange:e=>B("twitter_card_type",e.target.value)})),(0,a.createElement)("div",{className:"tr-pt-6"},(0,a.createElement)(c.A,{label:(0,i.__)("Default Twitter Card Image","thinkrank"),value:w.default_twitter_image,onChange:e=>B("default_twitter_image",e),help:(0,i.__)("Default image for Twitter sharing (1200x600px recommended)","thinkrank"),allowedTypes:["image"]})))));case"preview":return(()=>{const e=U.charAt(0).toUpperCase()+U.slice(1),t=k[U]||"tr-aspect-video";return(0,a.createElement)(s.Zp,{padding:!1,className:"tr-mb-4"},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary tr-flex tr-items-center tr-justify-between tr-gap-3 tr-flex-wrap"},(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,i.__)("Social Media Preview","thinkrank")),(0,a.createElement)("div",{className:"tr-w-40"},(0,a.createElement)(s.l6,{value:U,options:[{label:(0,i.__)("Facebook","thinkrank"),value:"facebook"},{label:(0,i.__)("Twitter","thinkrank"),value:"twitter"},{label:(0,i.__)("LinkedIn","thinkrank"),value:"linkedin"},{label:(0,i.__)("Pinterest","thinkrank"),value:"pinterest"}],onChange:e=>Y(e.target.value)}))),(0,a.createElement)("div",{className:"tr-p-6"},C?(0,a.createElement)("div",{className:"tr-max-w-[480px] tr-mx-auto"},(0,a.createElement)("div",{className:"tr-rounded-xl tr-border tr-border-secondary tr-overflow-hidden tr-bg-white tr-shadow-sm"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-gap-2 tr-px-3 tr-py-2 tr-border-b tr-border-secondary"},(0,a.createElement)("span",{className:"tr-text-xs tr-font-semibold tr-text-secondary"},e," ",(0,i.__)("Preview","thinkrank")),C.valid?(0,a.createElement)(s.Ex,{variant:"good"},"✓ ",(0,i.__)("Valid","thinkrank")):(0,a.createElement)(s.Ex,{variant:"warning"},"⚠ ",(0,i.__)("Issues Found","thinkrank"))),C.image?(0,a.createElement)("div",{className:`${t} tr-relative tr-bg-[#F6F7FB] tr-overflow-hidden`},(0,a.createElement)("img",{src:C.image,alt:C.title,className:"tr-w-full tr-h-full tr-object-cover",onError:e=>{e.target.style.display="none"}}),"pinterest"===U&&(0,a.createElement)("div",{className:"tr-absolute tr-top-2 tr-right-2 tr-flex tr-items-center tr-justify-center tr-w-8 tr-h-8 tr-rounded-full tr-bg-black/70 tr-text-white tr-text-sm"},"📌")):(0,a.createElement)("div",{className:`${t} tr-flex tr-flex-col tr-items-center tr-justify-center tr-gap-1 tr-bg-[#F6F7FB] tr-text-tertiary`},(0,a.createElement)("span",{className:"tr-text-2xl"},"🖼️"),(0,a.createElement)("span",{className:"tr-text-[11px]"},(0,i.__)("No share image set","thinkrank"))),(0,a.createElement)("div",{className:"tr-bg-[#F2F3F5] tr-px-3 tr-py-2.5"},(0,a.createElement)("p",{className:"tr-text-[11px] tr-uppercase tr-tracking-wide tr-text-tertiary tr-m-0 tr-truncate"},(e=>{if(!e)return"";try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e}})(C.preview_url)),(0,a.createElement)("p",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0 tr-mt-0.5 tr-leading-snug"},C.title),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0 tr-mt-0.5 tr-leading-relaxed"},C.description),("twitter"===U||"pinterest"===U)&&(0,a.createElement)("p",{className:"tr-text-[11px] tr-text-tertiary tr-m-0 tr-mt-1.5"},"twitter"===U?`${C.title?.length||0}/70 ${(0,i.__)("chars","thinkrank")}`:(0,i.__)("Pin it • Save","thinkrank")))),C.warnings&&C.warnings.length>0&&(0,a.createElement)("div",{className:"tr-mt-4 tr-rounded-lg tr-bg-warning-bg tr-border tr-border-warning/20 tr-p-3"},(0,a.createElement)("h5",{className:"tr-text-xs tr-font-semibold tr-text-warning tr-m-0 tr-mb-2"},(0,i.__)("Warnings:","thinkrank")),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-5 tr-list-disc"},C.warnings.map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-text-xs tr-text-warning tr-leading-relaxed"},e)))),C.suggestions&&C.suggestions.length>0&&(0,a.createElement)("div",{className:"tr-mt-4 tr-rounded-lg tr-bg-success-bg tr-border tr-border-success/20 tr-p-3"},(0,a.createElement)("h5",{className:"tr-text-xs tr-font-semibold tr-text-success tr-m-0 tr-mb-2"},(0,i.__)("Suggestions:","thinkrank")),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-5 tr-list-disc"},C.suggestions.map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-text-xs tr-text-secondary tr-leading-relaxed"},e))))):(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-items-center tr-justify-center tr-text-center tr-py-10 tr-px-4 tr-rounded-xl tr-border tr-border-dashed tr-border-secondary tr-bg-[#F6F7FB]"},(0,a.createElement)("span",{className:"tr-text-2xl tr-mb-2"},"🔗"),(0,a.createElement)("p",{className:"tr-text-sm tr-font-medium tr-text-secondary tr-m-0"},(0,i.__)("Social preview","thinkrank")),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0 tr-mt-1 tr-max-w-[280px]"},(0,i.__)('Click "Generate Preview" to see how your content will appear on social media.',"thinkrank")))))})();default:return null}})(),"preview"!==e&&(0,a.createElement)(m.A,{validationResults:P}),(0,a.createElement)("div",{className:"tr-flex tr-justify-end tr-mt-6"},(0,a.createElement)(s.$n,{variant:"primary",size:"md",onClick:async()=>{if(!l)try{D(!0),S(null);const t=await o()({path:"/thinkrank/v1/social-media/settings",method:"POST",data:{settings:w,context_type:"site",validation_context:e}});if(!t.success)throw new Error(t.error||"Failed to save settings");v(!1),S({status:"success",message:(0,i.__)("Social media settings saved successfully!","thinkrank")})}catch(e){h.A.error("Social Media settings save error:",e);let t=(0,i.__)("Failed to save social media settings. Please try again.","thinkrank");e.data&&e.data.validation_errors&&e.data.validation_errors.length>0?(h.A.error("Validation errors:",e.data.validation_errors),t=(0,i.__)("Validation failed: ","thinkrank")+e.data.validation_errors.join(", ")):e.validation&&e.validation.errors&&e.validation.errors.length>0?(h.A.error("Validation errors:",e.validation.errors),t=(0,i.__)("Validation failed: ","thinkrank")+e.validation.errors.join(", ")):e.message&&(t=e.message),S({status:"error",message:t})}finally{D(!1)}},disabled:!O||x},x?(0,i.__)("Saving…","thinkrank"):(0,i.__)("Save Settings","thinkrank")))))}},32401:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}))},32633:()=>{},32725:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"}))},32905:(e,t,r)=>{"use strict";r.d(t,{A:()=>M});var a=r(51609),n=r(86087),i=r(27723),s=r(56427),l=r(85161),o=r(49323),c=r(1455),d=r.n(c),g=r(60775);const M=()=>{const[e,t]=(0,n.useState)(!0),[r,c]=(0,n.useState)(!1),[M,u]=(0,n.useState)(!1),[m,N]=(0,n.useState)(null),[h,p]=(0,n.useState)({index:!0,noindex:!1,nofollow:!1,noarchive:!1,noimageindex:!1,nosnippet:!1});(0,n.useEffect)(()=>{k()},[]);const k=async()=>{t(!0);try{const e=await d()({path:"/thinkrank/v1/global-robot-meta/settings",method:"GET"});e&&e.settings&&p(t=>({...t,...e.settings}))}catch(e){g.A.error("Failed to load global robot meta settings:",e),N({status:"error",message:(0,i.__)("Failed to load settings. Using defaults.","thinkrank")})}finally{t(!1)}},y=(e,t)=>{p(r=>{const a={...r,[e]:t};return"index"===e?a.noindex=!t:"noindex"===e&&(a.index=!t),a}),u(!0)},x=({text:e})=>(0,a.createElement)(s.Tooltip,{text:e},(0,a.createElement)("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:"50%",background:"#ddd",color:"var(--tr-text-secondary)",fontSize:"10px",fontWeight:"bold",marginLeft:"4px",cursor:"help"}},"?"));return e?(0,a.createElement)("div",{className:"thinkrank-global-robot-meta"},(0,a.createElement)(o.u4,{lines:4,label:(0,i.__)("Loading settings…","thinkrank")})):(0,a.createElement)("div",{className:"thinkrank-global-robot-meta"},(0,a.createElement)(l.A,{title:(0,i.__)("Global Robot Meta","thinkrank"),enabled:!0,showDisabledWarning:!1,notice:m,onNoticeRemove:()=>N(null)},(0,a.createElement)("div",{style:{display:"flex",flexDirection:"row",alignItems:"flex-start",padding:"10px 0"}},(0,a.createElement)("div",{style:{width:"200px",flexShrink:0,fontWeight:"600",fontSize:"14px",marginTop:"8px"}},(0,i.__)("Robots Meta","thinkrank")),(0,a.createElement)("div",{style:{flex:1}},(0,a.createElement)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"10px"}},(0,a.createElement)("div",null,(0,a.createElement)(s.Flex,{justify:"initial",align:"center",className:"thinkrank-mb-sm"},(0,a.createElement)(s.CheckboxControl,{label:(0,i.__)("Index","thinkrank"),checked:h.index,onChange:e=>y("index",e),__nextHasNoMarginBottom:!0}),(0,a.createElement)(x,{text:(0,i.__)("Allow search engines to index this content.","thinkrank")})),(0,a.createElement)(s.Flex,{justify:"initial",align:"center",className:"thinkrank-mb-sm"},(0,a.createElement)(s.CheckboxControl,{label:(0,i.__)("No Follow","thinkrank"),checked:h.nofollow,onChange:e=>y("nofollow",e),__nextHasNoMarginBottom:!0}),(0,a.createElement)(x,{text:(0,i.__)("Do not follow links on this page.","thinkrank")})),(0,a.createElement)(s.Flex,{justify:"initial",align:"center",className:"thinkrank-mb-sm"},(0,a.createElement)(s.CheckboxControl,{label:(0,i.__)("No Image Index","thinkrank"),checked:h.noimageindex,onChange:e=>y("noimageindex",e),__nextHasNoMarginBottom:!0}),(0,a.createElement)(x,{text:(0,i.__)("Do not index images on this page.","thinkrank")}))),(0,a.createElement)("div",null,(0,a.createElement)(s.Flex,{justify:"initial",align:"center",className:"thinkrank-mb-sm"},(0,a.createElement)(s.CheckboxControl,{label:(0,i.__)("No Index","thinkrank"),checked:h.noindex,onChange:e=>y("noindex",e),__nextHasNoMarginBottom:!0}),(0,a.createElement)(x,{text:(0,i.__)("Do not allow search engines to index this content.","thinkrank")})),(0,a.createElement)(s.Flex,{justify:"initial",align:"center",className:"thinkrank-mb-sm"},(0,a.createElement)(s.CheckboxControl,{label:(0,i.__)("No Archive","thinkrank"),checked:h.noarchive,onChange:e=>y("noarchive",e),__nextHasNoMarginBottom:!0}),(0,a.createElement)(x,{text:(0,i.__)("Do not show a cached link in search results.","thinkrank")})),(0,a.createElement)(s.Flex,{justify:"initial",align:"center",className:"thinkrank-mb-sm"},(0,a.createElement)(s.CheckboxControl,{label:(0,i.__)("No Snippet","thinkrank"),checked:h.nosnippet,onChange:e=>y("nosnippet",e),__nextHasNoMarginBottom:!0}),(0,a.createElement)(x,{text:(0,i.__)("Do not show a snippet in search results.","thinkrank")})))),(0,a.createElement)("p",{className:"description",style:{marginTop:"15px",color:"var(--tr-text-secondary)",fontSize:"13px"}},(0,i.__)("Default values for robots meta tag. These can be changed for individual posts, taxonomies, etc.","thinkrank")))),(0,a.createElement)(s.Flex,{justify:"flex-end",className:"thinkrank-mt-lg"},(0,a.createElement)(s.Button,{variant:"primary",onClick:async()=>{c(!0),N(null);try{await d()({path:"/thinkrank/v1/global-robot-meta/settings",method:"POST",data:{settings:h}}),N({status:"success",message:(0,i.__)("Global Robot Meta settings saved successfully!","thinkrank")}),u(!1)}catch(e){g.A.error("Failed to save global robot meta settings:",e),N({status:"error",message:e.message||(0,i.__)("Failed to save settings.","thinkrank")})}finally{c(!1)}},isBusy:r,disabled:!M||r},r?(0,i.__)("Saving…","thinkrank"):(0,i.__)("Save Changes","thinkrank")))))}},33806:(e,t,r)=>{"use strict";r.d(t,{A:()=>M});var a=r(51609),n=r(56427),i=r(86087),s=r(27723),l=r(60775),o=r(74395);const c=()=>(0,a.createElement)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,a.createElement)("path",{fill:"#4285F4",d:"M17.64 9.2c0-.637-.057-1.251-.164-1.84H9v3.481h4.844a4.14 4.14 0 0 1-1.796 2.716v2.258h2.908c1.702-1.567 2.684-3.875 2.684-6.615z"}),(0,a.createElement)("path",{fill:"#34A853",d:"M9 18c2.43 0 4.467-.806 5.956-2.184l-2.908-2.259c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332A8.997 8.997 0 0 0 9 18z"}),(0,a.createElement)("path",{fill:"#FBBC05",d:"M3.964 10.707A5.41 5.41 0 0 1 3.682 9c0-.593.102-1.17.282-1.707V4.961H.957A8.996 8.996 0 0 0 0 9c0 1.452.348 2.827.957 4.04l3.007-2.333z"}),(0,a.createElement)("path",{fill:"#EA4335",d:"M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0A8.997 8.997 0 0 0 .957 4.962L3.964 7.29C4.672 5.166 6.656 3.58 9 3.58z"})),d=()=>(0,a.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",className:"tr-animate-spin","aria-hidden":"true"},(0,a.createElement)("circle",{cx:"8",cy:"8",r:"6.5",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeOpacity:"0.25"}),(0,a.createElement)("path",{d:"M14.5 8a6.5 6.5 0 0 0-6.5-6.5",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})),g={access_denied:(0,s.__)("Google connection was cancelled.","thinkrank"),invalid_state:(0,s.__)("The connection link expired. Please try connecting again.","thinkrank"),forbidden:(0,s.__)("You do not have permission to connect a Google account.","thinkrank")},M=({onConnect:e,redirectTo:t,label:r,variant:M,icon:u,className:m=""})=>{const[N,h]=(0,i.useState)(!1),[p,k]=(0,i.useState)(null);(0,i.useEffect)(()=>{const{connected:r,error:a}=(0,o.VQ)();if(a)return l.A.error("Google OAuth error:",a),void k(g[a]||(0,s.__)("Google connection failed. Please try again.","thinkrank"));r&&(e&&e(),t&&(window.location.href=t))},[]);const y=()=>{k(null);const e=(0,o.Vf)(t);if(!e)return l.A.error("Google connect URL is not available."),void k((0,s.__)("Google connection is unavailable. Please reload the page.","thinkrank"));h(!0),window.location.href=e};return M?(0,a.createElement)(n.Button,{variant:M,onClick:y,className:m,isBusy:N,disabled:N},u&&!N&&(0,a.createElement)("img",{src:u,alt:"",className:"thinkrank-google-icon","aria-hidden":"true"}),N?(0,s.__)("Connecting…","thinkrank"):r||(0,s.__)("Connect with Google","thinkrank")):(0,a.createElement)(a.Fragment,null,p&&(0,a.createElement)("p",{className:"tr-text-xs tr-text-danger tr-m-0 tr-mb-2",role:"alert"},p),(0,a.createElement)("button",{type:"button",onClick:y,disabled:N,className:"tr-inline-flex tr-items-center tr-gap-3 tr-h-11 tr-px-5 tr-rounded-md tr-bg-white tr-border-[1.5px] tr-border-primary tr-text-sm tr-font-semibold tr-text-secondary tr-cursor-pointer tr-transition-colors tr-duration-150 hover:tr-border-primary hover:tr-bg-white focus:tr-outline-none focus-visible:tr-border-brand focus-visible:tr-ring-2 focus-visible:tr-ring-brand disabled:tr-cursor-not-allowed disabled:tr-opacity-70"+(m?" "+m:"")},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center","aria-hidden":"true"},N?(0,a.createElement)(d,null):u?(0,a.createElement)("img",{src:u,alt:"",className:"thinkrank-google-icon"}):(0,a.createElement)(c,null)),(0,a.createElement)("span",null,N?(0,s.__)("Connecting…","thinkrank"):r||(0,s.__)("Connect with Google","thinkrank"))))}},33865:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M8.1 12.3c.1.1.3.3.5.3.2.1.4.1.6.1.2 0 .4 0 .6-.1.2-.1.4-.2.5-.3l3-3c.3-.3.5-.7.5-1.1 0-.4-.2-.8-.5-1.1L9.7 3.5c-.1-.2-.3-.3-.5-.3H5c-.4 0-.8.4-.8.8v4.2c0 .2.1.4.2.5l3.7 3.6zM5.8 4.8h3.1l3.4 3.4v.1l-3 3 .5.5-.7-.5-3.3-3.4V4.8zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"}))},34011:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(51609),n=r(27723),i=r(56427),s=r(49323),l=r(69880);const o=({diagnostics:e,isLoadingDiagnostics:t,diagnosticsError:r,onNavigate:o,onRetry:c})=>{if(t)return(0,a.createElement)("div",{className:"tr-empty-state"},(0,a.createElement)(s.u4,{lines:3}));if(r)return(0,a.createElement)(l.A,{error:r,onNavigate:o,onRetry:c,isRetrying:t});if(0===e.length)return(0,a.createElement)("div",{className:"thinkrank-cwv-wrapper"},(0,a.createElement)(s.pp,{size:"md",title:(0,n.__)("No Diagnostic Data Available","thinkrank"),description:(0,n.__)("Add a PageSpeed API key or connect your Google account to view detailed performance diagnostics.","thinkrank"),action:(0,a.createElement)("div",{className:"tr-flex tr-justify-center tr-gap-3"},(0,a.createElement)(i.Button,{variant:"primary",onClick:()=>o&&o("integrations","google-services")},(0,n.__)("Add PageSpeed API Key","thinkrank")),(0,a.createElement)(i.Button,{variant:"secondary",onClick:c,disabled:t},t?(0,n.__)("Retrying…","thinkrank"):(0,n.__)("Retry","thinkrank")))}));const d=e.filter(e=>"passed"===e.status).length,g=e.filter(e=>"warning"===e.status).length,M=e.filter(e=>"failed"===e.status).length;return(0,a.createElement)("div",{className:"thinkrank-cwv-wrapper"},(0,a.createElement)("div",{className:"thinkrank-diag-wrap"},(0,a.createElement)("div",{className:"thinkrank-diag-stats"},(0,a.createElement)("div",{className:"thinkrank-diag-stat-card"},(0,a.createElement)("div",{className:"thinkrank-diag-stat-top"},(0,a.createElement)("span",{className:"thinkrank-diag-stat-label"},(0,n.__)("Passed","thinkrank")),(0,a.createElement)("span",{className:"thinkrank-diag-stat-icon"},(0,a.createElement)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none"},(0,a.createElement)("circle",{cx:"11",cy:"11",r:"9",stroke:"#4353cc",strokeWidth:"1.8"}),(0,a.createElement)("path",{d:"M7 11.5l3 3 5-6",stroke:"#4353cc",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})))),(0,a.createElement)("span",{className:"thinkrank-diag-stat-count"},d)),(0,a.createElement)("div",{className:"thinkrank-diag-stat-card"},(0,a.createElement)("div",{className:"thinkrank-diag-stat-top"},(0,a.createElement)("span",{className:"thinkrank-diag-stat-label"},(0,n.__)("Warnings","thinkrank")),(0,a.createElement)("span",{className:"thinkrank-diag-stat-icon"},(0,a.createElement)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none"},(0,a.createElement)("path",{d:"M11 3L2 19h18L11 3z",stroke:"#4353cc",strokeWidth:"1.8",strokeLinejoin:"round"}),(0,a.createElement)("path",{d:"M11 9v5",stroke:"#4353cc",strokeWidth:"1.8",strokeLinecap:"round"}),(0,a.createElement)("circle",{cx:"11",cy:"16",r:"1",fill:"#4353cc"})))),(0,a.createElement)("span",{className:"thinkrank-diag-stat-count"},g)),(0,a.createElement)("div",{className:"thinkrank-diag-stat-card"},(0,a.createElement)("div",{className:"thinkrank-diag-stat-top"},(0,a.createElement)("span",{className:"thinkrank-diag-stat-label"},(0,n.__)("Failed","thinkrank")),(0,a.createElement)("span",{className:"thinkrank-diag-stat-icon"},(0,a.createElement)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none"},(0,a.createElement)("circle",{cx:"11",cy:"11",r:"9",stroke:"#4353cc",strokeWidth:"1.8"}),(0,a.createElement)("path",{d:"M8 8l6 6M14 8l-6 6",stroke:"#4353cc",strokeWidth:"1.8",strokeLinecap:"round"})))),(0,a.createElement)("span",{className:"thinkrank-diag-stat-count"},M))),(0,a.createElement)("div",{className:"thinkrank-diag-grid"},e.map(e=>(e=>{const t={passed:{label:(0,n.__)("Passed","thinkrank"),color:"#027A48",bg:"#dcfce7"},warning:{label:(0,n.__)("Warnings","thinkrank"),color:"#ea580c",bg:"#fff7ed"},failed:{label:(0,n.__)("Failed","thinkrank"),color:"#921C13",bg:"#fee2e2"}},r=t[e.status]||t.warning,i=!!e.details,s=i&&"object"==typeof e.details?e.details.items?`${e.details.items.length} items to review.`:null:e.details||null;return(0,a.createElement)("div",{key:e.id,className:"thinkrank-diag-card"},(0,a.createElement)("div",{className:"thinkrank-diag-card-header"},(0,a.createElement)("div",{className:"thinkrank-diag-card-title-row"},(0,a.createElement)("span",{className:"thinkrank-diag-card-title"},e.title),(0,a.createElement)("span",{className:"thinkrank-diag-badge",style:{color:r.color,background:r.bg}},r.label)),(e.category||e.impact)&&(0,a.createElement)("span",{className:"thinkrank-diag-category"},e.category||e.impact)),(0,a.createElement)("p",{className:"thinkrank-diag-desc"},e.description,s&&(0,a.createElement)(a.Fragment,null," ",s),i&&(0,a.createElement)("strong",null,(0,n.__)(" Check page speed report for detailed data.","thinkrank"))))})(e)))))}},34236:(e,t,r)=>{"use strict";r.d(t,{A:()=>a.A});var a=r(99121)},34249:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"}))},34372:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"}))},35166:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}))},35358:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var a=r(51609),n=r(86087),i=r(27723),s=r(73131),l=r(60563),o=r(89212),c=r(40799);const d=[{id:"content-planner",label:(0,i.__)("Content Planner","thinkrank")},{id:"metadata-generator",label:(0,i.__)("Metadata Generator","thinkrank")},{id:"mcp",label:(0,i.__)("MCP","thinkrank")}],g=d.map(e=>e.id),M="content-planner",u=e=>{try{const t=new URL(window.location.href);t.searchParams.set("tab",e),window.history.replaceState({},"",t.toString())}catch(e){}},m=()=>{const[e,t]=(0,n.useState)(M);(0,n.useEffect)(()=>{try{const e=new URLSearchParams(window.location.search).get("tab"),r=g.includes(e)?e:M;t(r),u(r)}catch(e){}},[]);const r=(0,n.useCallback)(e=>{t(e),u(e)},[]);return(0,a.createElement)("div",null,(0,a.createElement)(s.A,{tabs:d,activeTab:e,onTabChange:r,className:"tr-mb-6"}),(0,a.createElement)(s.K,{tabId:"content-planner",activeTab:e},(0,a.createElement)(l.A,null)),(0,a.createElement)(s.K,{tabId:"metadata-generator",activeTab:e},(0,a.createElement)(o.A,null)),(0,a.createElement)(s.K,{tabId:"mcp",activeTab:e},(0,a.createElement)(c.A,null)))}},35410:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"}))},35980:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var a=r(51609),n=r(86087),i=r(27723),s=r(49323),l=r(99658),o=r(85161),c=r(85770),d=r(17098),g=r(52495),M=r(73788),u=r(48426),m=r(54273),N=r(78881),h=r(10628),p=r(43534);const k=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,a.createElement)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})),y=()=>(0,a.createElement)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("polyline",{points:"3 6 5 6 21 6"}),(0,a.createElement)("path",{d:"M19 6l-1 14H6L5 6"}),(0,a.createElement)("path",{d:"M10 11v6"}),(0,a.createElement)("path",{d:"M14 11v6"}),(0,a.createElement)("path",{d:"M9 6V4h6v2"})),x=()=>(0,a.createElement)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),(0,a.createElement)("polyline",{points:"15 3 21 3 21 9"}),(0,a.createElement)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})),D=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("circle",{cx:"18",cy:"5",r:"3"}),(0,a.createElement)("circle",{cx:"6",cy:"12",r:"3"}),(0,a.createElement)("circle",{cx:"18",cy:"19",r:"3"}),(0,a.createElement)("line",{x1:"8.59",y1:"13.51",x2:"15.42",y2:"17.49"}),(0,a.createElement)("line",{x1:"15.41",y1:"6.51",x2:"8.59",y2:"10.49"})),j=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("polyline",{points:"1 4 1 10 7 10"}),(0,a.createElement)("path",{d:"M3.51 15a9 9 0 1 0 .49-4.86"})),I=()=>(0,a.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("circle",{cx:"12",cy:"12",r:"10"}),(0,a.createElement)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,a.createElement)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})),E=[{value:"basic",label:(0,i.__)("Basic (Single sitemap)","thinkrank")},{value:"wordpress-core",label:(0,i.__)("WordPress Core","thinkrank")},{value:"segmented",label:(0,i.__)("Segmented (Posts, Pages, Categories)","thinkrank")},{value:"ecommerce",label:(0,i.__)("E-commerce (Products, Categories)","thinkrank")},{value:"complete",label:(0,i.__)("Complete (All content + Custom post types)","thinkrank")},{value:"custom",label:(0,i.__)("Custom (User-modified configuration)","thinkrank")}],z=[{value:"index",label:(0,i.__)("Index","thinkrank")},{value:"general",label:(0,i.__)("General","thinkrank")},{value:"posts",label:(0,i.__)("Posts","thinkrank")},{value:"pages",label:(0,i.__)("Pages","thinkrank")},{value:"categories",label:(0,i.__)("Categories","thinkrank")}],T=e=>null==e||!1!==e&&""!==e&&"0"!==e&&0!==e,f=()=>{const[e,t]=(0,n.useState)(!0),[r,f]=(0,n.useState)(!1),[_,A]=(0,n.useState)(!1),[w,b]=(0,n.useState)({}),[O,v]=(0,n.useState)(!1),[L,S]=(0,n.useState)(null),[C,Q]=(0,n.useState)("basic"),[U,Y]=(0,n.useState)(!1),[P,R]=(0,n.useState)(null),[Z,V]=(0,n.useState)(!1),[B,G]=(0,n.useState)(null),[W,H]=(0,n.useState)(null),F=Boolean(w.last_generated)||"dynamic"===W,{update:J,isSaving:X}=(0,h.A)({settings:w,setSettings:b,save:N.k2,logLabel:"ThinkRank"}),$=(e,t)=>{try{const r=(0,u.TT)(e,t);b(a=>{const n={...a,[e]:r};if("custom_url_pattern"===e&&t&&n.sitemap_urls)if("basic"===C){Q("custom"),n.selected_preset="custom";const e=t.replace("{type}","general");n.sitemap_urls=[{url:e.startsWith("/")?e:"/"+e,type:"general",enabled:!0,last_checked:null,status:"unknown"}]}else n.sitemap_urls=n.sitemap_urls.map(e=>{if("index"===e.type||"wordpress"===e.type)return e;const r=t.replace("{type}",e.type);return{...e,url:r.startsWith("/")?r:"/"+r}});if("use_sitemap_index"===e)if(t){const e=n.custom_url_pattern||"sitemap-{type}.xml",t=t=>{let r=e.replace("{type}",t);return r.startsWith("/")||(r="/"+r),{url:r,type:t,enabled:!0,last_checked:null,status:"unknown"}},r=[{url:"/sitemap_index.xml",type:"index",enabled:!0,last_checked:null,status:"unknown"}];T(n.include_posts)&&r.push(t("posts")),T(n.include_pages)&&r.push(t("pages")),T(n.include_categories)&&r.push(t("categories")),T(n.include_tags)&&r.push(t("tags")),n.sitemap_urls=r}else n.sitemap_urls=[{url:"/sitemap.xml",type:"general",enabled:!0,last_checked:null,status:"unknown"}];return n}),v(!0)}catch(e){S({status:"error",message:e.message||(0,i.__)("Invalid input provided. Please check your settings.","thinkrank")})}},K=(e,t,r={})=>{const{validateUrl:a=!1,markDirty:n=!0}=r;try{let r=t;a&&r.url&&(r={...r,url:(0,u.$W)(r.url)}),b(t=>({...t,sitemap_urls:t.sitemap_urls.map((t,a)=>a===e?r:t),...n?{selected_preset:"custom"}:{}})),n&&(Q("custom"),v(!0))}catch(e){S({status:"error",message:e.message||(0,i.__)("Invalid sitemap URL provided","thinkrank")})}},q=()=>({settings:w,setSettings:b,setIsLoading:t,setIsSaving:f,setIsGenerating:A,setHasChanges:v,setNotice:S,setSelectedPreset:Q,setIsValidatingAll:Y,setValidatingIndex:R,setIsPinging:V,setHealth:G,setResolvedDeliveryMode:H,getDefaultSettings:m.lA,updateSitemap:K});if((0,n.useEffect)(()=>{(0,N.M5)(q())},[]),e)return(0,a.createElement)("div",{className:"thinkrank-loading"},(0,a.createElement)(s.u4,{lines:3}));const ee=window.location.origin,te=q();return(0,a.createElement)("div",{className:"thinkrank-sitemap-tab"},(0,a.createElement)(M.A,{health:B}),(0,a.createElement)(o.A,{title:(0,i.__)("XML Sitemap Management","thinkrank"),enabled:w.enabled,onToggle:e=>J({enabled:e},e?(0,i.__)("XML sitemap is on.","thinkrank"):(0,i.__)("XML sitemap is off.","thinkrank")),toggleLabel:(0,i.__)("Enable Sitemap","thinkrank"),toggleBusy:X,optimizationButtons:[(0,a.createElement)(g.A,{key:"generate",type:"generate",label:(0,i.__)("Generate Sitemap","thinkrank"),loadingLabel:(0,i.__)("Generating…","thinkrank"),onClick:()=>(0,N.vB)(q()),isBusy:_,disabled:!w.enabled||_})],notice:L,onNoticeRemove:()=>S(null),showDisabledWarning:!0,disabledWarningMessage:(0,i.__)("XML sitemap generation is disabled. Enable to configure multiple sitemaps, content inclusion, and search engine notifications.","thinkrank")},(0,a.createElement)(s.mc,{direction:"column",gap:4},(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)(c.A,{title:(0,i.__)("Sitemap URLs","thinkrank"),description:(0,i.__)("Configure which sitemaps are generated for your site","thinkrank")}),(0,a.createElement)("div",{className:"tr-p-5 tr-flex tr-flex-col tr-gap-4"},w.use_sitemap_index&&(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-2 tr-bg-brand-bg tr-border tr-border-brand tr-rounded-lg tr-p-3"},(0,a.createElement)("span",{className:"tr-text-brand tr-shrink-0 tr-mt-0.5"},(0,a.createElement)(I,null)),(0,a.createElement)("p",{className:"tr-text-xs tr-text-brand tr-m-0"},(0,i.__)("Sitemap index: ","thinkrank"),(0,a.createElement)("a",{href:`${ee}/sitemap_index.xml`,target:"_blank",rel:"noopener noreferrer",className:"tr-text-brand tr-underline tr-inline-flex tr-items-center tr-gap-0.5"},`${ee}/sitemap_index.xml`," ",(0,a.createElement)(x,null)))),(0,a.createElement)(s.lM,{id:"use-sitemap-index",label:(0,i.__)("Use Sitemap Index","thinkrank"),description:(0,i.__)("Generate a sitemap index referencing multiple individual sitemaps (recommended for large sites)","thinkrank"),checked:!!w.use_sitemap_index,onChange:e=>$("use_sitemap_index",e),disabled:!w.enabled}),(0,a.createElement)(s.l6,{label:(0,i.__)("Sitemap Delivery","thinkrank"),value:w.delivery_mode||"auto",options:[{value:"auto",label:(0,i.__)("Automatic (recommended)","thinkrank")},{value:"static",label:(0,i.__)("Static files in the site root","thinkrank")},{value:"dynamic",label:(0,i.__)("Served by WordPress, no files written","thinkrank")}],onChange:e=>$("delivery_mode",e.target.value),description:(0,i.__)("Automatic writes sitemap files when your WordPress folder is writable, and serves the sitemap directly when it is not. Choose Served by WordPress if your host keeps the WordPress folder read only.","thinkrank"),disabled:!w.enabled}),(0,a.createElement)(s.l6,{label:(0,i.__)("Quick Setup Templates","thinkrank"),value:C,options:E,onChange:e=>(0,m.Ur)(e.target.value,te),disabled:!w.enabled}),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-2"},(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide tr-m-0"},(0,i.__)("Sitemap URLs","thinkrank")),w.sitemap_urls?.map((e,t)=>{var r;return(0,a.createElement)("div",{key:t,className:"tr-flex tr-items-end tr-gap-2 tr-border tr-border-secondary tr-rounded-lg tr-p-3"},(0,a.createElement)("div",{className:"tr-flex-1"},(0,a.createElement)(s.pd,{label:(0,i.__)("URL","thinkrank"),value:e.url,onChange:r=>K(t,{...e,url:r.target.value}),onBlur:r=>K(t,{...e,url:r.target.value},{validateUrl:!0}),placeholder:"/sitemap.xml",disabled:!w.enabled})),(0,a.createElement)("div",{className:"tr-w-36"},(0,a.createElement)(s.l6,{label:(0,i.__)("Type","thinkrank"),value:e.type,options:z,onChange:r=>K(t,{...e,type:r.target.value}),disabled:!w.enabled})),(0,a.createElement)("button",{onClick:()=>(e=>{b(t=>({...t,sitemap_urls:t.sitemap_urls.filter((t,r)=>r!==e)})),Q("custom"),b(e=>({...e,selected_preset:"custom"})),v(!0)})(t),disabled:!w.enabled||(null!==(r=w.sitemap_urls?.length)&&void 0!==r?r:0)<=1,className:"tr-flex tr-items-center tr-justify-center tr-w-10 tr-h-10 tr-rounded tr-border tr-border-danger tr-text-danger tr-bg-danger-bg hover:tr-bg-danger-bg tr-transition-colors tr-duration-150 tr-cursor-pointer disabled:tr-opacity-40 disabled:tr-cursor-not-allowed tr-shrink-0"},(0,a.createElement)(y,null)))})),(0,a.createElement)("button",{onClick:()=>{b(e=>({...e,sitemap_urls:[...e.sitemap_urls||[],{url:(0,m.ST)("general",w),type:"general",enabled:!0,last_checked:null,status:"unknown"}],use_sitemap_index:!0})),Q("custom"),b(e=>({...e,selected_preset:"custom"})),v(!0)},disabled:!w.enabled,className:"tr-flex tr-items-center tr-gap-1.5 tr-text-xs tr-font-medium tr-text-brand tr-bg-brand-bg tr-border tr-border-brand tr-rounded tr-px-3 tr-py-2 hover:tr-bg-brand-bg tr-transition-colors tr-duration-150 tr-cursor-pointer disabled:tr-opacity-50 disabled:tr-cursor-not-allowed tr-self-start"},(0,a.createElement)(k,null)," ",(0,i.__)("Add Sitemap URL","thinkrank")),w.sitemap_urls?.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide tr-m-0 tr-mb-2"},(0,i.__)("View Generated Sitemaps","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1"},w.sitemap_urls.map((e,t)=>F?(0,a.createElement)("a",{key:t,href:`${ee}${e.url}`,target:"_blank",rel:"noopener noreferrer",className:"tr-inline-flex tr-items-center tr-gap-1 tr-text-sm tr-text-brand hover:tr-underline"},e.url," ",(0,a.createElement)("span",{className:"tr-text-tertiary"},"(",e.type,")")," ",(0,a.createElement)(x,null)):(0,a.createElement)("span",{key:t,title:(0,i.__)("Generate the sitemap to enable this link","thinkrank"),className:"tr-inline-flex tr-items-center tr-gap-1 tr-text-sm tr-text-tertiary tr-cursor-not-allowed"},e.url," ",(0,a.createElement)("span",{className:"tr-text-tertiary"},"(",e.type,")")))),!F&&(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0 tr-mt-1"},(0,i.__)("Click “Generate Sitemap” to create these files before viewing them.","thinkrank"))))),(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)(c.A,{title:(0,i.__)("General Settings","thinkrank"),description:(0,i.__)("Core options that apply to all generated sitemaps.","thinkrank")}),(0,a.createElement)(s.mc,{direction:"column",gap:6,className:"tr-px-6 tr-py-6 tr-divide-y tr-divide-line-2"},(0,a.createElement)(d.A,{id:"tr-sm-links-per",label:(0,i.__)("Links Per Sitemap","thinkrank"),description:(0,i.__)("Max links per sitemap page. Google recommends max 50,000 URLs","thinkrank"),disabled:!w.enabled},(0,a.createElement)(s.pd,{id:"tr-sm-links-per",type:"number",value:w.links_per_sitemap||1e3,onChange:e=>$("links_per_sitemap",parseInt(e.target.value)),min:100,max:5e4,disabled:!w.enabled})),(0,a.createElement)("div",{className:"tr-pt-6"},(0,a.createElement)(s.lM,{id:"include-images",label:(0,i.__)("Images in Sitemaps","thinkrank"),description:(0,i.__)("Include references to images from post content. Helps search engines index important images","thinkrank"),checked:!!w.include_images,onChange:e=>$("include_images",e),disabled:!w.enabled})),(0,a.createElement)("div",{className:"tr-pt-6"},(0,a.createElement)(s.lM,{id:"include-featured-images",label:(0,i.__)("Include Featured Images","thinkrank"),description:(0,i.__)("Include the featured image even if it does not appear directly in post content","thinkrank"),checked:!!w.include_featured_images,onChange:e=>$("include_featured_images",e),disabled:!w.enabled||!w.include_images})),(0,a.createElement)("div",{className:"tr-pt-6"},(0,a.createElement)(s.lM,{id:"auto-generate",label:(0,i.__)("Auto-Generate Sitemaps","thinkrank"),description:(0,i.__)("Automatically regenerate sitemaps when content is published, updated, or deleted","thinkrank"),checked:!!w.auto_generate,onChange:e=>$("auto_generate",e),disabled:!w.enabled})),(0,a.createElement)("div",{className:"tr-pt-6"},(0,a.createElement)(s.lM,{id:"ping-search-engines",label:(0,i.__)("Ping Search Engines","thinkrank"),description:(0,i.__)("Automatically notify Google and Bing when sitemaps are updated","thinkrank"),checked:!!w.ping_search_engines,onChange:e=>$("ping_search_engines",e),disabled:!w.enabled})))),(0,a.createElement)(p.A,{label:(0,i.__)("Content filtering","thinkrank")},(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)(c.A,{title:(0,i.__)("Content Filtering","thinkrank"),description:(0,i.__)("Exclude specific content from your sitemaps","thinkrank")}),(0,a.createElement)(s.mc,{direction:"column",gap:6,className:"tr-px-6 tr-py-6 tr-divide-y tr-divide-line-2"},(0,a.createElement)(d.A,{id:"tr-sm-exclude-posts",label:(0,i.__)("Exclude Posts","thinkrank"),description:(0,i.__)("Comma-separated post IDs to exclude, e.g., 123, 456, 789","thinkrank"),disabled:!w.enabled},(0,a.createElement)(s.pd,{id:"tr-sm-exclude-posts",value:w.exclude_posts||"",onChange:e=>$("exclude_posts",e.target.value),placeholder:"123, 456, 789",disabled:!w.enabled})),(0,a.createElement)(d.A,{id:"tr-sm-exclude-terms",label:(0,i.__)("Exclude Terms","thinkrank"),description:(0,i.__)("Comma-separated term IDs to exclude. Applies to all taxonomies","thinkrank"),disabled:!w.enabled,className:"tr-pt-6"},(0,a.createElement)(s.pd,{id:"tr-sm-exclude-terms",value:w.exclude_terms||"",onChange:e=>$("exclude_terms",e.target.value),placeholder:"12, 34, 56",disabled:!w.enabled})),(0,a.createElement)("div",{className:"tr-pt-6"},(0,a.createElement)(s.lM,{id:"exclude-password-protected",label:(0,i.__)("Exclude Password Protected Posts","thinkrank"),description:(0,i.__)("When enabled, password-protected posts will be excluded from sitemaps","thinkrank"),checked:!!w.exclude_password_protected,onChange:e=>$("exclude_password_protected",e),disabled:!w.enabled})),(0,a.createElement)("div",{className:"tr-pt-6"},(0,a.createElement)(s.lM,{id:"exclude-private-posts",label:(0,i.__)("Exclude Private Posts","thinkrank"),description:(0,i.__)("When enabled, private posts will be excluded from sitemaps","thinkrank"),checked:!!w.exclude_private_posts,onChange:e=>$("exclude_private_posts",e),disabled:!w.enabled})),(0,a.createElement)("div",{className:"tr-pt-6"},(0,a.createElement)("div",{className:"tr-bg-brand-bg tr-border tr-border-brand tr-rounded-lg tr-p-4"},(0,a.createElement)("p",{className:"tr-text-sm tr-font-semibold tr-text-brand tr-m-0 tr-mb-2"},(0,i.__)("What Gets Included","thinkrank")),(0,a.createElement)("ol",{className:"tr-m-0 tr-pl-5 tr-flex tr-flex-col tr-gap-1"},[(0,i.__)("Published, publicly viewable content of the enabled post types and taxonomies","thinkrank"),(0,i.__)("Excludes items set to noindex or excluded from search","thinkrank"),(0,i.__)("Password-protected and private content only when those toggles are enabled above","thinkrank")].map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-text-xs tr-text-brand"},e)))))))),(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)(c.A,{title:(0,i.__)("Health & Validation","thinkrank"),description:(0,i.__)("Check the status of your generated sitemaps","thinkrank")}),(0,a.createElement)("div",{className:"tr-p-5 tr-flex tr-flex-col tr-gap-3"},w.sitemap_urls?.map((e,t)=>{return(0,a.createElement)("div",{key:t,className:"tr-border tr-border-secondary tr-rounded-lg tr-p-4 tr-flex tr-items-start tr-justify-between tr-gap-3"},(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-0"},(0,a.createElement)("code",{className:"tr-text-xs tr-font-medium tr-text-secondary tr-bg-white tr-px-2 tr-py-0.5 tr-rounded"},e.url),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2 tr-mt-2 tr-flex-wrap"},(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-text-xs tr-font-medium tr-px-2 tr-py-0.5 tr-rounded-full tr-border "+(r=e.status,"active"===r?"tr-bg-success-bg tr-text-success tr-border-success":"not_found"===r?"tr-bg-danger-bg tr-text-danger tr-border-danger":"error"===r?"tr-bg-warning-bg tr-text-warning tr-border-warning":"tr-bg-white tr-text-tertiary tr-border-secondary")},(e=>"active"===e?(0,i.__)("Active","thinkrank"):"not_found"===e?(0,i.__)("Not Found","thinkrank"):"error"===e?(0,i.__)("Error","thinkrank"):(0,i.__)("Unknown","thinkrank"))(e.status)),e.last_checked&&(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},(0,i.__)("Checked:","thinkrank")," ",new Date(e.last_checked).toLocaleString(),e.response_code&&(0,a.createElement)("span",{className:"tr-ml-1 tr-font-medium"},"(",e.response_code,")")))),(0,a.createElement)(s.$n,{variant:"secondary",size:"sm",onClick:()=>(0,N.go)(te,t),loading:P===t,disabled:!w.enabled},P===t?(0,i.__)("Checking…","thinkrank"):(0,i.__)("Check","thinkrank")));var r}),(0,a.createElement)("div",{className:"tr-border tr-border-secondary tr-rounded-lg tr-p-4"},(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide tr-m-0 tr-mb-3"},(0,i.__)("Bulk Actions","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-gap-2 tr-flex-wrap"},(0,a.createElement)(s.$n,{variant:"primary",size:"sm",onClick:()=>(0,N.ez)(te),loading:U,disabled:!w.enabled},(0,a.createElement)(j,null)," ",U?(0,i.__)("Validating…","thinkrank"):(0,i.__)("Validate All Sitemaps","thinkrank")),(0,a.createElement)(s.$n,{variant:"secondary",size:"sm",onClick:()=>(0,N.q0)(te),loading:Z,disabled:!w.enabled},(0,a.createElement)(D,null)," ",Z?(0,i.__)("Pinging…","thinkrank"):(0,i.__)("Ping Search Engines","thinkrank")))))),(0,a.createElement)(p.A,{label:(0,i.__)("Sitemap styling and filenames","thinkrank")},(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)(c.A,{title:(0,i.__)("Advanced Options","thinkrank"),description:(0,i.__)("Customize sitemap styling and filename patterns.","thinkrank")}),(0,a.createElement)(s.mc,{direction:"column",gap:6,className:"tr-px-6 tr-py-6 tr-divide-y tr-divide-line-2"},(0,a.createElement)(s.lM,{id:"enable-styling",label:(0,i.__)("Enable Sitemap Styling","thinkrank"),description:(0,i.__)("Apply custom CSS styling to make XML sitemaps more readable in browsers","thinkrank"),checked:!!w.enable_styling,onChange:e=>J({enable_styling:e},e?(0,i.__)("Sitemap styling is on.","thinkrank"):(0,i.__)("Sitemap styling is off.","thinkrank")),disabled:!w.enabled||X}),!!w.enable_styling&&(0,a.createElement)(s.mc,{direction:"column",gap:5,className:"tr-pt-6"},(0,a.createElement)(s.lM,{id:"styling-logo",label:(0,i.__)("Show Logo On Sitemap","thinkrank"),description:(0,i.__)("Place a logo above the sitemap heading. Leave the image empty to use your site icon.","thinkrank"),checked:!!w.styling_logo,onChange:e=>J({styling_logo:e},e?(0,i.__)("Sitemap logo is on.","thinkrank"):(0,i.__)("Sitemap logo is off.","thinkrank")),disabled:!w.enabled||X}),!!w.styling_logo&&(0,a.createElement)(l.A,{label:(0,i.__)("Sitemap Logo","thinkrank"),value:w.styling_logo_url||"",onChange:e=>$("styling_logo_url",e||""),help:(0,i.__)("Shown at up to 64px tall. Empty falls back to your site icon.","thinkrank"),allowedTypes:["image"]}),(0,a.createElement)(s.mc,{direction:"row",gap:6,className:"tr-flex-wrap"},(0,a.createElement)(s.sk,{id:"tr-sm-color-main",label:(0,i.__)("Main Color","thinkrank"),description:(0,i.__)("Header, table heading and links.","thinkrank"),value:w.styling_color_main||"",fallback:"#667eea",onChange:e=>$("styling_color_main",e),disabled:!w.enabled}),(0,a.createElement)(s.sk,{id:"tr-sm-color-accent",label:(0,i.__)("Accent Color","thinkrank"),description:(0,i.__)("Second half of the header gradient.","thinkrank"),value:w.styling_color_accent||"",fallback:"#764ba2",onChange:e=>$("styling_color_accent",e),disabled:!w.enabled})),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0"},(0,i.__)("Text colours are worked out from what you pick, so the sitemap stays readable whichever colours you choose. Leave a colour empty to keep the default.","thinkrank"))),(0,a.createElement)(d.A,{id:"tr-sm-url-pattern",label:(0,i.__)("Custom Sitemap Filename Pattern","thinkrank"),description:(0,i.__)("Use {type} as placeholder for content type, e.g., seo-{type}.xml. Applies to Segmented, E-commerce, and Complete templates.","thinkrank"),disabled:!w.enabled,className:"tr-pt-6"},(0,a.createElement)(s.pd,{id:"tr-sm-url-pattern",value:(w.custom_url_pattern||"sitemap-{type}.xml").replace(/^\/+/,""),onChange:e=>$("custom_url_pattern",e.target.value.replace(/^\/+/,"")),placeholder:"sitemap-{type}.xml",disabled:!w.enabled}))))),(0,a.createElement)("div",{className:"tr-flex tr-justify-end"},(0,a.createElement)(s.$n,{variant:"primary",onClick:()=>(0,N.DZ)(te),loading:r,disabled:!O||r},r?(0,i.__)("Saving…","thinkrank"):(0,i.__)("Save Settings","thinkrank"))))))}},36358:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"}))},36876:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"}))},37055:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M6.13 5.5l1.926 1.927A4.975 4.975 0 007.025 10H5v1.5h2V13H5v1.5h2.1a5.002 5.002 0 009.8 0H19V13h-2v-1.5h2V10h-2.025a4.979 4.979 0 00-1.167-2.74l1.76-1.76-1.061-1.06-1.834 1.834A4.977 4.977 0 0012 5.5c-1.062 0-2.046.33-2.855.895L7.19 4.44 6.13 5.5zm2.37 5v3a3.5 3.5 0 107 0v-3a3.5 3.5 0 10-7 0z",fillRule:"evenodd",clipRule:"evenodd"}))},37281:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M8.2 5.3h8V3.8h-8v1.5zm0 14.5h8v-1.5h-8v1.5zm3.5-6.5h1v-1h-1v1zm1-6.5h-1v.5h1v-.5zm-1 4.5h1v-1h-1v1zm0-2h1v-1h-1v1zm0 7.5h1v-.5h-1v.5zm1-2.5h-1v1h1v-1zm-8.5 1.5h1.5v-8H4.2v8zm14.5-8v8h1.5v-8h-1.5zm-5 4.5v-1h-1v1h1zm-6.5 0h.5v-1h-.5v1zm3.5-1v1h1v-1h-1zm6 1h.5v-1h-.5v1zm-8-1v1h1v-1h-1zm6 0v1h1v-1h-1z",style:{fill:"#1e1e1e",fillRule:"evenodd",clipRule:"evenodd"}}))},37838:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"}))},37844:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z",fillRule:"evenodd",clipRule:"evenodd"}),(0,a.createElement)(n.Path,{d:"M15 15V15C15 13.8954 14.1046 13 13 13L11 13C9.89543 13 9 13.8954 9 15V15",fillRule:"evenodd",clipRule:"evenodd"}),(0,a.createElement)(n.Circle,{cx:"12",cy:"9",r:"2",fillRule:"evenodd",clipRule:"evenodd"}))},37940:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M7 7.2h8.2L13.5 9l1.1 1.1 3.6-3.6-3.5-4-1.1 1 1.9 2.3H7c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.2-.5zm13.8 4V11h-1.5v.3c0 1.1 0 3.5-1 4.5-.3.3-.7.5-1.3.5H8.8l1.7-1.7-1.1-1.1L5.9 17l3.5 4 1.1-1-1.9-2.3H17c.9 0 1.7-.3 2.3-.9 1.5-1.4 1.5-4.2 1.5-5.6z"}))},38255:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"}))},38422:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"}))},38653:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"}))},38790:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M4 13.5h6v-3H4v3zm8 0h3v-3h-3v3zm5-3v3h3v-3h-3z"}))},39094:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(51609),n=r(27723),i=r(65403),s=r(80095),l=r(30422);const o=()=>(0,a.createElement)(i.A,{filter:"thinkrank.internalLinks.tab",teaser:(0,a.createElement)(s.A,{illustration:(0,a.createElement)(l.Hs,null),title:(0,n.__)("AI Internal Links","thinkrank"),description:(0,n.__)("Strong internal linking helps readers and search engines find your best content. Let AI suggest the right links so your pages support each other.","thinkrank"),features:[(0,n.__)("Get AI-powered internal link suggestions based on your content","thinkrank"),(0,n.__)("Insert relevant links with the perfect anchor text in one click","thinkrank"),(0,n.__)("Spread link equity and keep visitors exploring your site longer","thinkrank")]})})},39439:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,a.createElement)(n.Path,{d:"m16.5 6h-9v-1.5h9z"}))},39694:(e,t,r)=>{"use strict";r.d(t,{Bo:()=>l,Sj:()=>i,mk:()=>s});var a=r(27723),n=r(17104);const i=e=>{const t=[];e.deployment_method&&!["json_ld","microdata","rdfa"].includes(e.deployment_method)&&t.push((0,a.__)("Invalid deployment method selected","thinkrank")),e.organization_url&&!(0,n.AY)(e.organization_url)&&t.push((0,a.__)("Organization URL must be a valid URL format","thinkrank")),e.website_url&&!(0,n.AY)(e.website_url)&&t.push((0,a.__)("Website URL must be a valid URL format","thinkrank"));const r="object"==typeof e.organization_logo?e.organization_logo?.url:e.organization_logo;return r&&!(0,n.AY)(r)&&t.push((0,a.__)("Organization Logo URL must be a valid URL format","thinkrank")),t},s=(e,t)=>({website:{website_name:e.site_name||"",website_url:e.site_url||window.location.origin,website_description:e.site_description||e.default_meta_description||"",website_author:e.site_author||""},organization:{organization_name:e.site_name||"",organization_url:e.site_url||window.location.origin,organization_description:e.site_description||e.default_meta_description||"",organization_logo:e.logo_url||""}}[t]||{}),l=e=>({website:(0,a.__)("Website","thinkrank"),organization:(0,a.__)("Organization","thinkrank")}[e]||e)},39905:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(51609),n=r(97500),i=r.n(n);const s={info:{wrapper:"tr-bg-brand-bg tr-border-brand/30",icon:"tr-text-brand",title:"tr-text-brand",body:"tr-text-brand/80"},success:{wrapper:"tr-bg-success-bg tr-border-success/30",icon:"tr-text-success",title:"tr-text-success",body:"tr-text-success/80"},warning:{wrapper:"tr-bg-warning-bg tr-border-warning/30",icon:"tr-text-warning",title:"tr-text-warning",body:"tr-text-warning/80"},error:{wrapper:"tr-bg-danger-bg tr-border-danger/30",icon:"tr-text-danger",title:"tr-text-danger",body:"tr-text-danger/80"}},l={info:(0,a.createElement)("svg",{viewBox:"0 0 20 20",fill:"currentColor"},(0,a.createElement)("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"})),success:(0,a.createElement)("svg",{viewBox:"0 0 20 20",fill:"currentColor"},(0,a.createElement)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"})),warning:(0,a.createElement)("svg",{viewBox:"0 0 20 20",fill:"currentColor"},(0,a.createElement)("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"})),error:(0,a.createElement)("svg",{viewBox:"0 0 20 20",fill:"currentColor"},(0,a.createElement)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM8.28 7.22a.75.75 0 0 0-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 1 0 1.06 1.06L10 11.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L11.06 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L10 8.94 8.28 7.22Z",clipRule:"evenodd"}))};function o({variant:e="info",title:t,children:r,onDismiss:n,className:o}){const c=s[e];return(0,a.createElement)("div",{role:"alert",className:i()("tr-flex tr-gap-3 tr-p-4 tr-rounded-lg tr-border",c.wrapper,o)},(0,a.createElement)("span",{className:i()("tr-shrink-0 tr-w-5 tr-h-5 tr-mt-0.5",c.icon)},l[e]),(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-0"},t&&(0,a.createElement)("p",{className:i()("tr-text-sm tr-font-semibold tr-m-0",c.title)},t),r&&(0,a.createElement)("div",{className:i()("tr-text-sm tr-mt-0.5",c.body)},r)),n&&(0,a.createElement)("button",{onClick:n,"aria-label":"Dismiss",className:i()("tr-shrink-0 tr-p-0.5 tr-rounded tr-transition-opacity hover:tr-opacity-70","focus:tr-outline-none focus:tr-ring-2 focus:tr-ring-current",c.icon)},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4",viewBox:"0 0 16 16",fill:"currentColor"},(0,a.createElement)("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"}))))}},40055:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z"}))},40424:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(51609),n=r(97500),i=r.n(n);const s={good:"tr-bg-success-bg tr-text-success",warning:"tr-bg-warning-bg tr-text-warning",poor:"tr-bg-danger-bg tr-text-danger",pro:"tr-bg-brand-bg tr-text-brand",info:"tr-bg-brand-bg tr-text-brand",neutral:"tr-bg-white tr-text-secondary"};function l({variant:e="neutral",className:t,children:r}){return(0,a.createElement)("span",{className:i()("tr-inline-flex tr-items-center tr-px-2 tr-py-0.5","tr-rounded-full tr-text-xs tr-font-medium",s[e],t)},r)}},40740:(e,t,r)=>{"use strict";r(51609),r(97500),r(56427),r(20285),r(90520)},40799:(e,t,r)=>{"use strict";r.d(t,{A:()=>k});var a=r(51609),n=r(27723),i=r(86087),s=r(1455),l=r.n(s),o=r(49323),c=r(60775),d=r(93497),g=r(96600),M=r(73545);const u=[(0,n.__)("Content SEO: titles, descriptions & canonicals","thinkrank"),(0,n.__)("Global SEO defaults per post type","thinkrank"),(0,n.__)("Schema & structured data","thinkrank"),(0,n.__)("Open Graph & Twitter previews","thinkrank"),(0,n.__)("Robots meta rules & robots.txt","thinkrank"),(0,n.__)("XML sitemaps","thinkrank"),(0,n.__)("Instant indexing (IndexNow) & history","thinkrank"),(0,n.__)("LLMs.txt generation & status","thinkrank"),(0,n.__)("Image SEO","thinkrank"),(0,n.__)("Author archives","thinkrank"),(0,n.__)("Site identity","thinkrank"),(0,n.__)("SEO scoring, checks, insights & analytics","thinkrank")],m=()=>(0,a.createElement)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"tr-shrink-0"},(0,a.createElement)("polyline",{points:"20 6 9 17 4 12"})),N=()=>(0,a.createElement)("svg",{width:"22",height:"22",viewBox:"0 0 195 195",fill:"none",stroke:"currentColor",strokeWidth:"12",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},(0,a.createElement)("path",{d:"M25 97.85 92.88 29.97c9.37-9.37 24.57-9.37 33.94 0 9.38 9.37 9.38 24.57 0 33.94L75.56 115.18"}),(0,a.createElement)("path",{d:"M76.27 114.47l50.55-50.56c9.37-9.37 24.57-9.37 33.95 0 9.37 9.38 9.37 24.58 0 33.95l-61.78 61.78c-2.34 2.34-2.34 6.13 0 8.47l19.34 19.35"}),(0,a.createElement)("path",{d:"M109.85 46.94 59.29 97.5c-9.37 9.37-9.37 24.57 0 33.94 9.38 9.38 24.58 9.38 33.95 0l51.25-51.26"})),h=({open:e})=>(0,a.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",style:{transition:"transform 150ms ease",transform:e?"rotate(180deg)":"none"}},(0,a.createElement)("polyline",{points:"6 9 12 15 18 9"})),p=()=>(0,a.createElement)(o.Fc,{variant:"warning",title:(0,n.__)("MCP runtime not loaded","thinkrank")},(0,a.createElement)("p",{className:"tr-m-0"},(0,n.__)('The bundled Abilities API could not be loaded, so no SEO tools can be served to AI clients. This usually means the plugin build is incomplete (dependencies/vendor is missing). Reinstall ThinkRank from an official package, or run "composer install" inside the plugin’s dependencies/ directory.',"thinkrank"))),k=()=>{const[e,t]=(0,i.useState)(!1),[r,s]=(0,i.useState)(!1),[k,y]=(0,i.useState)(!0),[x,D]=(0,i.useState)(!1),[j,I]=(0,i.useState)(null),[E,z]=(0,i.useState)(!1),T=!!("undefined"!=typeof window&&window.thinkrankAdmin?.mcp||{}).abilities_api_available;(0,i.useEffect)(()=>{f()},[]);const f=async()=>{y(!0);try{const e=await l()({path:"/thinkrank/v1/settings"});t(!!e?.enable_mcp),s(!!e?.enable_mcp)}catch(e){c.A.error("ThinkRank: Failed to load MCP settings",e),I({type:"error",message:(0,n.__)("Couldn’t load your MCP settings.","thinkrank")})}finally{y(!1)}};if(k)return(0,a.createElement)(o.u4,null);let _={variant:"neutral",label:(0,n.__)("Off","thinkrank")};return e&&T?_={variant:"good",label:(0,n.__)("Active","thinkrank")}:e&&!T&&(_={variant:"warning",label:(0,n.__)("Setup needed","thinkrank")}),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-6"},j&&(0,a.createElement)(o.Fc,{variant:j.type,onDismiss:()=>I(null)},j.message),(0,a.createElement)(o.Zp,{padding:!1,className:"tr-overflow-hidden"},(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-4 tr-p-6"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-11 tr-h-11 tr-rounded-xl tr-bg-brand-bg tr-text-brand tr-shrink-0"},(0,a.createElement)(N,null)),(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-0"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2.5 tr-flex-wrap"},(0,a.createElement)("h2",{className:"tr-m-0 tr-text-base tr-font-semibold tr-text-primary"},(0,n.__)("AI agent access","thinkrank")),(0,a.createElement)(o.Ex,{variant:_.variant},_.label)),(0,a.createElement)("p",{className:"tr-mt-1 tr-mb-0 tr-text-sm tr-text-secondary tr-max-w-2xl"},(0,n.__)("Open a secure, permission-scoped bridge so assistants like Claude, ChatGPT, and Cursor can review and improve your SEO for you. Access runs through a revocable connection token or a one-time OAuth approval, always tied to an administrator account. Turn it off and ThinkRank registers no tools every AI connection is refused.","thinkrank"))),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-items-end tr-gap-1 tr-shrink-0"},(0,a.createElement)(o.lM,{id:"thinkrank-enable-mcp",checked:e,onChange:async e=>{t(e),D(!0),I(null);try{await l()({path:"/thinkrank/v1/settings",method:"POST",data:{enable_mcp:e}}),s(e),I({type:"success",message:e?(0,n.__)("MCP is on. Connect an AI client below.","thinkrank"):(0,n.__)("MCP is off. AI clients can no longer connect.","thinkrank")})}catch(e){c.A.error("ThinkRank: Failed to save MCP settings",e),t(r),I({type:"error",message:(0,n.__)("Couldn’t save your MCP settings.","thinkrank")})}finally{D(!1)}},disabled:x,label:(0,n.__)("Enable MCP access","thinkrank")}),x&&(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},(0,n.__)("Saving…","thinkrank")))),(0,a.createElement)("div",{className:"tr-border-t tr-border-secondary"},(0,a.createElement)("button",{type:"button",onClick:()=>z(e=>!e),"aria-expanded":E,"aria-controls":"tr-mcp-capabilities",className:"tr-flex tr-items-start tr-justify-between tr-gap-3 tr-w-full tr-p-6 tr-bg-transparent tr-border-0 tr-cursor-pointer tr-text-left"},(0,a.createElement)("span",{className:"tr-min-w-0"},(0,a.createElement)("span",{className:"tr-block tr-text-sm tr-font-semibold tr-text-primary"},(0,n.__)("What a connected agent can do","thinkrank")),(0,a.createElement)("span",{className:"tr-block tr-mt-1 tr-text-sm tr-text-secondary"},(0,n.__)("Every action honours the signed-in user’s capabilities and can be reviewed or reverted in ThinkRank.","thinkrank"))),(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-6 tr-h-6 tr-mt-0.5 tr-text-tertiary tr-shrink-0"},(0,a.createElement)(h,{open:E}))),E&&(0,a.createElement)("ul",{id:"tr-mcp-capabilities",className:"tr-grid tr-grid-cols-1 sm:tr-grid-cols-2 lg:tr-grid-cols-3 tr-gap-2.5 tr-list-none tr-m-0 tr-pt-0 tr-px-6 tr-pb-6"},u.map(e=>(0,a.createElement)("li",{key:e,className:"tr-flex tr-items-center tr-gap-2.5 tr-m-0 tr-px-3 tr-py-2.5 tr-rounded-lg tr-border tr-border-secondary tr-bg-white tr-text-sm tr-text-secondary"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-5 tr-h-5 tr-rounded-full tr-bg-success-bg tr-text-success tr-shrink-0"},(0,a.createElement)(m,null)),(0,a.createElement)("span",{className:"tr-flex-1 tr-min-w-0"},e)))))),r&&(0,a.createElement)(o.Zp,null,(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-6"},!T&&(0,a.createElement)(p,null),(0,a.createElement)(d.A,null))),r&&T&&(0,a.createElement)(o.Zp,null,(0,a.createElement)(g.A,null)),r&&(0,a.createElement)(o.Zp,null,(0,a.createElement)(M.A,null)))}},40928:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M6.9 7L3 17.8h1.7l1-2.8h4.1l1 2.8h1.7L8.6 7H6.9zm-.7 6.6l1.5-4.3 1.5 4.3h-3zM21.6 17c-.1.1-.2.2-.3.2-.1.1-.2.1-.4.1s-.3-.1-.4-.2c-.1-.1-.1-.3-.1-.6V12c0-.5 0-1-.1-1.4-.1-.4-.3-.7-.5-1-.2-.2-.5-.4-.9-.5-.4 0-.8-.1-1.3-.1s-1 .1-1.4.2c-.4.1-.7.3-1 .4-.2.2-.4.3-.6.5-.1.2-.2.4-.2.7 0 .3.1.5.2.8.2.2.4.3.8.3.3 0 .6-.1.8-.3.2-.2.3-.4.3-.7 0-.3-.1-.5-.2-.7-.2-.2-.4-.3-.6-.4.2-.2.4-.3.7-.4.3-.1.6-.1.8-.1.3 0 .6 0 .8.1.2.1.4.3.5.5.1.2.2.5.2.9v1.1c0 .3-.1.5-.3.6-.2.2-.5.3-.9.4-.3.1-.7.3-1.1.4-.4.1-.8.3-1.1.5-.3.2-.6.4-.8.7-.2.3-.3.7-.3 1.2 0 .6.2 1.1.5 1.4.3.4.9.5 1.6.5.5 0 1-.1 1.4-.3.4-.2.8-.6 1.1-1.1 0 .4.1.7.3 1 .2.3.6.4 1.2.4.4 0 .7-.1.9-.2.2-.1.5-.3.7-.4h-.3zm-3-.9c-.2.4-.5.7-.8.8-.3.2-.6.2-.8.2-.4 0-.6-.1-.9-.3-.2-.2-.3-.6-.3-1.1 0-.5.1-.9.3-1.2s.5-.5.8-.7c.3-.2.7-.3 1-.5.3-.1.6-.3.7-.6v3.4z"}))},41077:(e,t,r)=>{"use strict";r.d(t,{A:()=>a.A});var a=r(74127)},41186:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(51609),n=r(5573);const i=(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M9 11.8l6.1-4.5c.1.4.4.7.9.7h2c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1h-2c-.6 0-1 .4-1 1v.4l-6.4 4.8c-.2-.1-.4-.2-.6-.2H6c-.6 0-1 .4-1 1v2c0 .6.4 1 1 1h2c.2 0 .4-.1.6-.2l6.4 4.8v.4c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-2c0-.6-.4-1-1-1h-2c-.5 0-.8.3-.9.7L9 12.2v-.4z"}))},41534:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M14 10.1V4c0-.6-.4-1-1-1H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1zm-1.5-.5H6.7l-1.2 1.2V4.5h7v5.1zM19 12h-8c-.6 0-1 .4-1 1v6.1c0 .6.4 1 1 1h5.7l1.8 1.8c.1.2.4.3.6.3.1 0 .2 0 .3-.1.4-.1.6-.5.6-.8V13c0-.6-.4-1-1-1zm-.5 7.8l-1.2-1.2h-5.8v-5.1h7v6.3z"}))},41554:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"m6.249 11.065.44-.44h3.186l-1.5 1.5H7.31l-1.957 1.96A.792.792 0 0 1 4 13.524V5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1.5L12.5 8V5.5h-7v6.315l.749-.75ZM20 19.75H7v-1.5h13v1.5Zm0-12.653-8.967 9.064L8 17l.867-2.935L17.833 5 20 7.097Z"}))},41893:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(51609),n=r(27723),i=r(69457);const s=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,a.createElement)("path",{d:"M3 7h8M8 4l3 3-3 3",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})),l=()=>{const e=window.thinkrankAdmin?.displayName||"";return(0,a.createElement)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"24px",padding:"28px 32px",borderRadius:"16px",background:"#fff",border:"1px solid var(--tr-border)",flexWrap:"wrap"}},(0,a.createElement)("div",{style:{flex:1,minWidth:"280px"}},(0,a.createElement)("h2",{style:{fontSize:"22px",fontWeight:700,color:"#1e1e1e",margin:0,lineHeight:1.25}},e?`${(0,n.__)("Welcome back,","thinkrank")} ${e}!`:(0,n.__)("Welcome to ThinkRank!","thinkrank")),(0,a.createElement)("p",{style:{fontSize:"14px",color:"#6b7280",margin:"8px 0 20px",lineHeight:1.55,maxWidth:"560px"}},(0,n.__)("ThinkRank is your AI-native SEO co-pilot. Generate metadata, draft content briefs, deploy structured data, and watch what's working all from one place.","thinkrank")),(0,a.createElement)("a",{href:"https://thinkrank.ai/docs",target:"_blank",rel:"noreferrer",style:{display:"inline-flex",alignItems:"center",gap:"8px",padding:"10px 18px",borderRadius:"8px",background:"#1e1e1e",color:"#fff",fontSize:"13px",fontWeight:600,textDecoration:"none"}},(0,n.__)("Learn More","thinkrank"),(0,a.createElement)(s,null))),(0,a.createElement)("img",{src:i.A,alt:"",style:{width:"180px",height:"120px",objectFit:"cover",borderRadius:"12px",border:"1px solid #e0e7ff",flexShrink:0,display:"block"}}))}},42115:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z",fillRule:"evenodd",clipRule:"evenodd"}))},42793:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-.5 6.6H6.7l-1.2 1.2v-6.3h7v5.1z"}))},42848:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M19.75 9c0-1.257-.565-2.197-1.39-2.858-.797-.64-1.827-1.017-2.815-1.247-1.802-.42-3.703-.403-4.383-.396L11 4.5V6l.177-.001c.696-.006 2.416-.02 4.028.356.887.207 1.67.518 2.216.957.52.416.829.945.829 1.688 0 .592-.167.966-.407 1.23-.255.281-.656.508-1.236.674-1.19.34-2.82.346-4.607.346h-.077c-1.692 0-3.527 0-4.942.404-.732.209-1.424.545-1.935 1.108-.526.579-.796 1.33-.796 2.238 0 1.257.565 2.197 1.39 2.858.797.64 1.827 1.017 2.815 1.247 1.802.42 3.703.403 4.383.396L13 19.5h.714V22L18 18.5 13.714 15v3H13l-.177.001c-.696.006-2.416.02-4.028-.356-.887-.207-1.67-.518-2.216-.957-.52-.416-.829-.945-.829-1.688 0-.592.167-.966.407-1.23.255-.281.656-.508 1.237-.674 1.189-.34 2.819-.346 4.606-.346h.077c1.692 0 3.527 0 4.941-.404.732-.209 1.425-.545 1.936-1.108.526-.579.796-1.33.796-2.238z"}))},43188:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(51609),n=r(5573);const i=(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"}))},43263:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(51609),n=r(97500),i=r.n(n);function s({title:e,description:t,actions:r,className:n}){return(0,a.createElement)("header",{className:i()("tr-shrink-0 tr-border-b tr-border-secondary tr-bg-white",n),style:{boxShadow:"0 1px 0 0 rgba(0,0,0,0.04)"}},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-gap-6 tr-px-6 md:tr-px-8 tr-py-5"},(0,a.createElement)("div",{className:"tr-min-w-0"},e&&(0,a.createElement)("h1",{className:"tr-m-0 tr-text-xl tr-font-bold tr-text-primary tr-leading-snug"},e),t&&(0,a.createElement)("p",{className:"tr-m-0 tr-mt-0.5 tr-text-sm tr-text-tertiary tr-leading-relaxed"},t)),r&&(0,a.createElement)("div",{className:"tr-flex tr-shrink-0 tr-items-center tr-gap-2"},r)))}},43273:(e,t,r)=>{"use strict";r(51609),r(56427),r(27723)},43526:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(51609);const n=/<a\s+href="([^"]*)"[^>]*>([^<]*)<\/a>/gi,i=e=>e.replace(/�?38;/g,"&").replace(/&/g,"&").replace(/�?39;/g,"'"),s=e=>/^https?:\/\//i.test(e)||e.startsWith("/");function l(e){if("string"!=typeof e||!e.includes("<a "))return e;const t=[];let r,l=0;for(n.lastIndex=0;null!==(r=n.exec(e));){const[n,o,c]=r,d=i(o);r.index>l&&t.push(e.slice(l,r.index)),s(d)?t.push((0,a.createElement)("a",{key:`link-${r.index}`,href:d,target:"_blank",rel:"noopener noreferrer"},c)):t.push(c),l=r.index+n.length}return l<e.length&&t.push(e.slice(l)),t}},43534:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(51609),n=r(86087),i=r(27723),s=r(69432);const l=({label:e,className:t="",children:r})=>{const{mode:l}=(0,s.Pr)(),[o,c]=(0,n.useState)(!1);return s.RB!==l||o?r:(0,a.createElement)("button",{type:"button",onClick:()=>c(!0),className:`tr-self-start tr-inline-flex tr-items-center tr-gap-1 tr-bg-transparent tr-border-0 tr-p-0 tr-text-sm tr-font-medium tr-text-brand tr-cursor-pointer hover:tr-underline ${t}`},e?(0,i.sprintf)(/* translators: %s: what the advanced settings cover, e.g. "Embed cards". */ /* translators: %s: what the advanced settings cover, e.g. "Embed cards". */ |
| 50 | 51 | (0,i.__)("Show advanced settings: %s","thinkrank"),e):(0,i.__)("Show advanced settings","thinkrank"))}},43679:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(51609),n=r(97500),i=r.n(n);const s=(e,t)=>[t,e].filter(Boolean).join(" ")||void 0;function l({label:e,description:t,error:r,options:n=[],className:l,id:o,hideLabelFromVision:c=!1,...d}){const g=o||e?.toLowerCase().replace(/\s+/g,"-"),M=r?"tr-border-danger":"tr-border-primary",u=g?`${g}-description`:void 0,m=Boolean(t&&!r||r);return(0,a.createElement)("div",{className:i()("tr-flex tr-flex-col tr-gap-1.5",l)},e&&(0,a.createElement)("label",{htmlFor:g,className:c?"screen-reader-text":"tr-text-sm tr-font-medium tr-text-secondary"},e),(0,a.createElement)("div",{className:"tr-relative"},(0,a.createElement)("select",{id:g,style:{backgroundImage:"none",paddingRight:void 0},className:i()("tr-w-full tr-h-10 tr-rounded-md tr-bg-white tr-text-sm tr-text-primary","tr-border-[1.5px] tr-pl-3 tr-pr-9 tr-appearance-none","tr-transition-colors tr-duration-150","hover:tr-border-[#A9AEC0]","focus:tr-outline-none focus-visible:tr-border-brand","disabled:tr-bg-white disabled:tr-text-tertiary disabled:tr-border-secondary disabled:tr-cursor-not-allowed",M),...d,"aria-describedby":m?s(u,d["aria-describedby"]):d["aria-describedby"]},n.map(e=>(0,a.createElement)("option",{key:e.value,value:e.value},e.label))),(0,a.createElement)("span",{className:"tr-pointer-events-none tr-absolute tr-inset-y-0 tr-right-3 tr-flex tr-items-center tr-text-tertiary"},(0,a.createElement)("svg",{className:"tr-h-4 tr-w-4",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true"},(0,a.createElement)("path",{fillRule:"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})))),t&&!r&&(0,a.createElement)("p",{id:u,className:"tr-text-xs tr-text-tertiary tr-m-0"},t),r&&(0,a.createElement)("p",{id:u,className:"tr-text-xs tr-text-danger tr-m-0"},r))}},43705:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M16 11.2h-3.2V8h-1.6v3.2H8v1.6h3.2V16h1.6v-3.2H16z"}))},43767:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"}))},43769:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M16.9 10.3l.8-1.3c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.2-.2-.4-.4-.7-.6-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.1 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3l-1.8 2.8h4.3v-1.2h-2.2zm-2.8-3.1h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"}))},44164:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M14.7 11.3c1-.6 1.5-1.6 1.5-3 0-2.3-1.3-3.4-4-3.4H7v14h5.8c1.4 0 2.5-.3 3.3-1 .8-.7 1.2-1.7 1.2-2.9.1-1.9-.8-3.1-2.6-3.7zm-5.1-4h2.3c.6 0 1.1.1 1.4.4.3.3.5.7.5 1.2s-.2 1-.5 1.2c-.3.3-.8.4-1.4.4H9.6V7.3zm4.6 9c-.4.3-1 .4-1.7.4H9.6v-3.9h2.9c.7 0 1.3.2 1.7.5.4.3.6.8.6 1.5s-.2 1.2-.6 1.5z"}))},44594:(e,t,r)=>{"use strict";function a(e){return e+.5|0}r.d(t,{Q1:()=>O});const n=(e,t,r)=>Math.max(Math.min(e,r),t);function i(e){return n(a(2.55*e),0,255)}function s(e){return n(a(255*e),0,255)}function l(e){return n(a(e/2.55)/100,0,1)}function o(e){return n(a(100*e),0,100)}const c={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},d=[..."0123456789ABCDEF"],g=e=>d[15&e],M=e=>d[(240&e)>>4]+d[15&e],u=e=>(240&e)>>4==(15&e);const m=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function N(e,t,r){const a=t*Math.min(r,1-r),n=(t,n=(t+e/30)%12)=>r-a*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function h(e,t,r){const a=(a,n=(a+e/60)%6)=>r-r*t*Math.max(Math.min(n,4-n,1),0);return[a(5),a(3),a(1)]}function p(e,t,r){const a=N(e,1,.5);let n;for(t+r>1&&(n=1/(t+r),t*=n,r*=n),n=0;n<3;n++)a[n]*=1-t-r,a[n]+=t;return a}function k(e){const t=e.r/255,r=e.g/255,a=e.b/255,n=Math.max(t,r,a),i=Math.min(t,r,a),s=(n+i)/2;let l,o,c;return n!==i&&(c=n-i,o=s>.5?c/(2-n-i):c/(n+i),l=function(e,t,r,a,n){return e===n?(t-r)/a+(t<r?6:0):t===n?(r-e)/a+2:(e-t)/a+4}(t,r,a,c,n),l=60*l+.5),[0|l,o||0,s]}function y(e,t,r,a){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,r,a)).map(s)}function x(e,t,r){return y(N,e,t,r)}function D(e){return(e%360+360)%360}const j={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},I={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let E;const z=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,T=e=>e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,f=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function _(e,t,r){if(e){let a=k(e);a[t]=Math.max(0,Math.min(a[t]+a[t]*r,0===t?360:1)),a=x(a),e.r=a[0],e.g=a[1],e.b=a[2]}}function A(e,t){return e?Object.assign(t||{},e):e}function w(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=s(e[3]))):(t=A(e,{r:0,g:0,b:0,a:1})).a=s(t.a),t}function b(e){return"r"===e.charAt(0)?function(e){const t=z.exec(e);let r,a,s,l=255;if(t){if(t[7]!==r){const e=+t[7];l=t[8]?i(e):n(255*e,0,255)}return r=+t[1],a=+t[3],s=+t[5],r=255&(t[2]?i(r):n(r,0,255)),a=255&(t[4]?i(a):n(a,0,255)),s=255&(t[6]?i(s):n(s,0,255)),{r,g:a,b:s,a:l}}}(e):function(e){const t=m.exec(e);let r,a=255;if(!t)return;t[5]!==r&&(a=t[6]?i(+t[5]):s(+t[5]));const n=D(+t[2]),l=+t[3]/100,o=+t[4]/100;return r="hwb"===t[1]?function(e,t,r){return y(p,e,t,r)}(n,l,o):"hsv"===t[1]?function(e,t,r){return y(h,e,t,r)}(n,l,o):x(n,l,o),{r:r[0],g:r[1],b:r[2],a}}(e)}class O{constructor(e){if(e instanceof O)return e;const t=typeof e;let r;var a,n,i;"object"===t?r=w(e):"string"===t&&(i=(a=e).length,"#"===a[0]&&(4===i||5===i?n={r:255&17*c[a[1]],g:255&17*c[a[2]],b:255&17*c[a[3]],a:5===i?17*c[a[4]]:255}:7!==i&&9!==i||(n={r:c[a[1]]<<4|c[a[2]],g:c[a[3]]<<4|c[a[4]],b:c[a[5]]<<4|c[a[6]],a:9===i?c[a[7]]<<4|c[a[8]]:255})),r=n||function(e){E||(E=function(){const e={},t=Object.keys(I),r=Object.keys(j);let a,n,i,s,l;for(a=0;a<t.length;a++){for(s=l=t[a],n=0;n<r.length;n++)i=r[n],l=l.replace(i,j[i]);i=parseInt(I[s],16),e[l]=[i>>16&255,i>>8&255,255&i]}return e}(),E.transparent=[0,0,0,0]);const t=E[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:4===t.length?t[3]:255}}(e)||b(e)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=A(this._rgb);return e&&(e.a=l(e.a)),e}set rgb(e){this._rgb=w(e)}rgbString(){return this._valid?(e=this._rgb)&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${l(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`):void 0;var e}hexString(){return this._valid?(e=this._rgb,t=(e=>u(e.r)&&u(e.g)&&u(e.b)&&u(e.a))(e)?g:M,e?"#"+t(e.r)+t(e.g)+t(e.b)+((e,t)=>e<255?t(e):"")(e.a,t):void 0):void 0;var e,t}hslString(){return this._valid?function(e){if(!e)return;const t=k(e),r=t[0],a=o(t[1]),n=o(t[2]);return e.a<255?`hsla(${r}, ${a}%, ${n}%, ${l(e.a)})`:`hsl(${r}, ${a}%, ${n}%)`}(this._rgb):void 0}mix(e,t){if(e){const r=this.rgb,a=e.rgb;let n;const i=t===n?.5:t,s=2*i-1,l=r.a-a.a,o=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;n=1-o,r.r=255&o*r.r+n*a.r+.5,r.g=255&o*r.g+n*a.g+.5,r.b=255&o*r.b+n*a.b+.5,r.a=i*r.a+(1-i)*a.a,this.rgb=r}return this}interpolate(e,t){return e&&(this._rgb=function(e,t,r){const a=f(l(e.r)),n=f(l(e.g)),i=f(l(e.b));return{r:s(T(a+r*(f(l(t.r))-a))),g:s(T(n+r*(f(l(t.g))-n))),b:s(T(i+r*(f(l(t.b))-i))),a:e.a+r*(t.a-e.a)}}(this._rgb,e._rgb,t)),this}clone(){return new O(this.rgb)}alpha(e){return this._rgb.a=s(e),this}clearer(e){return this._rgb.a*=1-e,this}greyscale(){const e=this._rgb,t=a(.3*e.r+.59*e.g+.11*e.b);return e.r=e.g=e.b=t,this}opaquer(e){return this._rgb.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return _(this._rgb,2,e),this}darken(e){return _(this._rgb,2,-e),this}saturate(e){return _(this._rgb,1,e),this}desaturate(e){return _(this._rgb,1,-e),this}rotate(e){return function(e,t){var r=k(e);r[0]=D(r[0]+t),r=x(r),e.r=r[0],e.g=r[1],e.b=r[2]}(this._rgb,e),this}}},44656:(e,t,r)=>{"use strict";r.d(t,{A6:()=>w,Bs:()=>at,E8:()=>yt,FN:()=>ut,No:()=>gt,PP:()=>ir,ZT:()=>O,dN:()=>Ct,hE:()=>Zt,ju:()=>b,kc:()=>or,m_:()=>ar,s$:()=>Pt,t1:()=>qe});var a=r(99284);r(44594);class n{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,r,a){const n=t.listeners[a],i=t.duration;n.forEach(a=>a({chart:e,initial:t.initial,numSteps:i,currentStep:Math.min(r-t.start,i)}))}_refresh(){this._request||(this._running=!0,this._request=a.r.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((r,a)=>{if(!r.running||!r.items.length)return;const n=r.items;let i,s=n.length-1,l=!1;for(;s>=0;--s)i=n[s],i._active?(i._total>r.duration&&(r.duration=i._total),i.tick(e),l=!0):(n[s]=n[n.length-1],n.pop());l&&(a.draw(),this._notify(a,r,e,"progress")),n.length||(r.running=!1,this._notify(a,r,e,"complete"),r.initial=!1),t+=n.length}),this._lastDate=e,0===t&&(this._running=!1)}_getAnims(e){const t=this._charts;let r=t.get(e);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,r)),r}listen(e,t,r){this._getAnims(e).listeners[t].push(r)}add(e,t){t&&t.length&&this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((e,t)=>Math.max(e,t._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const r=t.items;let a=r.length-1;for(;a>=0;--a)r[a].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var i=new n;const s="transparent",l={boolean:(e,t,r)=>r>.5?t:e,color(e,t,r){const n=(0,a.c)(e||s),i=n.valid&&(0,a.c)(t||s);return i&&i.valid?i.mix(n,r).hexString():t},number:(e,t,r)=>e+(t-e)*r};class o{constructor(e,t,r,n){const i=t[r];n=(0,a.a)([e.to,n,i,e.from]);const s=(0,a.a)([e.from,i,n]);this._active=!0,this._fn=e.fn||l[e.type||typeof s],this._easing=a.e[e.easing]||a.e.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=r,this._from=s,this._to=n,this._promises=void 0}active(){return this._active}update(e,t,r){if(this._active){this._notify(!1);const n=this._target[this._prop],i=r-this._start,s=this._duration-i;this._start=r,this._duration=Math.floor(Math.max(s,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=(0,a.a)([e.to,t,n,e.from]),this._from=(0,a.a)([e.from,n,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,r=this._duration,a=this._prop,n=this._from,i=this._loop,s=this._to;let l;if(this._active=n!==s&&(i||t<r),!this._active)return this._target[a]=s,void this._notify(!0);t<0?this._target[a]=n:(l=t/r%2,l=i&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[a]=this._fn(n,s,l))}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,r)=>{e.push({res:t,rej:r})})}_notify(e){const t=e?"res":"rej",r=this._promises||[];for(let e=0;e<r.length;e++)r[e][t]()}}class c{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!(0,a.i)(e))return;const t=Object.keys(a.d.animation),r=this._properties;Object.getOwnPropertyNames(e).forEach(n=>{const i=e[n];if(!(0,a.i)(i))return;const s={};for(const e of t)s[e]=i[e];((0,a.b)(i.properties)&&i.properties||[n]).forEach(e=>{e!==n&&r.has(e)||r.set(e,s)})})}_animateOptions(e,t){const r=t.options,a=function(e,t){if(!t)return;let r=e.options;if(r)return r.$shared&&(e.options=r=Object.assign({},r,{$shared:!1,$animations:{}})),r;e.options=t}(e,r);if(!a)return[];const n=this._createAnimations(a,r);return r.$shared&&function(e,t){const r=[],a=Object.keys(t);for(let t=0;t<a.length;t++){const n=e[a[t]];n&&n.active()&&r.push(n.wait())}return Promise.all(r)}(e.options.$animations,r).then(()=>{e.options=r},()=>{}),n}_createAnimations(e,t){const r=this._properties,a=[],n=e.$animations||(e.$animations={}),i=Object.keys(t),s=Date.now();let l;for(l=i.length-1;l>=0;--l){const c=i[l];if("$"===c.charAt(0))continue;if("options"===c){a.push(...this._animateOptions(e,t));continue}const d=t[c];let g=n[c];const M=r.get(c);if(g){if(M&&g.active()){g.update(M,d,s);continue}g.cancel()}M&&M.duration?(n[c]=g=new o(M,e,c,d),a.push(g)):e[c]=d}return a}update(e,t){if(0===this._properties.size)return void Object.assign(e,t);const r=this._createAnimations(e,t);return r.length?(i.add(this._chart,r),!0):void 0}}function d(e,t){const r=e&&e.options||{},a=r.reverse,n=void 0===r.min?t:0,i=void 0===r.max?t:0;return{start:a?i:n,end:a?n:i}}function g(e,t){const r=[],a=e._getSortedDatasetMetas(t);let n,i;for(n=0,i=a.length;n<i;++n)r.push(a[n].index);return r}function M(e,t,r,n={}){const i=e.keys,s="single"===n.mode;let l,o,c,d;if(null===t)return;let g=!1;for(l=0,o=i.length;l<o;++l){if(c=+i[l],c===r){if(g=!0,n.all)continue;break}d=e.values[c],(0,a.g)(d)&&(s||0===t||(0,a.s)(t)===(0,a.s)(d))&&(t+=d)}return g||n.all?t:0}function u(e,t){const r=e&&e.options.stacked;return r||void 0===r&&void 0!==t.stack}function m(e,t,r){const a=e[t]||(e[t]={});return a[r]||(a[r]={})}function N(e,t,r,a){for(const n of t.getMatchingVisibleMetas(a).reverse()){const t=e[n.index];if(r&&t>0||!r&&t<0)return n.index}return null}function h(e,t){const{chart:r,_cachedMeta:a}=e,n=r._stacks||(r._stacks={}),{iScale:i,vScale:s,index:l}=a,o=i.axis,c=s.axis,d=function(e,t,r){return`${e.id}.${t.id}.${r.stack||r.type}`}(i,s,a),g=t.length;let M;for(let e=0;e<g;++e){const r=t[e],{[o]:i,[c]:g}=r;M=(r._stacks||(r._stacks={}))[c]=m(n,d,i),M[l]=g,M._top=N(M,s,!0,a.type),M._bottom=N(M,s,!1,a.type),(M._visualValues||(M._visualValues={}))[l]=g}}function p(e,t){const r=e.scales;return Object.keys(r).filter(e=>r[e].axis===t).shift()}function k(e,t){const r=e.controller.index,a=e.vScale&&e.vScale.axis;if(a){t=t||e._parsed;for(const e of t){const t=e._stacks;if(!t||void 0===t[a]||void 0===t[a][r])return;delete t[a][r],void 0!==t[a]._visualValues&&void 0!==t[a]._visualValues[r]&&delete t[a]._visualValues[r]}}}const y=e=>"reset"===e||"none"===e,x=(e,t)=>t?e:Object.assign({},e);class D{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=u(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&k(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,r=this.getDataset(),n=(e,t,r,a)=>"x"===e?t:"r"===e?a:r,i=t.xAxisID=(0,a.v)(r.xAxisID,p(e,"x")),s=t.yAxisID=(0,a.v)(r.yAxisID,p(e,"y")),l=t.rAxisID=(0,a.v)(r.rAxisID,p(e,"r")),o=t.indexAxis,c=t.iAxisID=n(o,i,s,l),d=t.vAxisID=n(o,s,i,l);t.xScale=this.getScaleForId(i),t.yScale=this.getScaleForId(s),t.rScale=this.getScaleForId(l),t.iScale=this.getScaleForId(c),t.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&(0,a.u)(this._data,this),e._stacked&&k(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),r=this._data;if((0,a.i)(t)){const e=this._cachedMeta;this._data=function(e,t){const{iScale:r,vScale:a}=t,n="x"===r.axis?"x":"y",i="x"===a.axis?"x":"y",s=Object.keys(e),l=new Array(s.length);let o,c,d;for(o=0,c=s.length;o<c;++o)d=s[o],l[o]={[n]:d,[i]:e[d]};return l}(t,e)}else if(r!==t){if(r){(0,a.u)(r,this);const e=this._cachedMeta;k(e),e._parsed=[]}t&&Object.isExtensible(t)&&(0,a.l)(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,r=this.getDataset();let a=!1;this._dataCheck();const n=t._stacked;t._stacked=u(t.vScale,t),t.stack!==r.stack&&(a=!0,k(t),t.stack=r.stack),this._resyncElements(e),(a||n!==t._stacked)&&(h(this,t._parsed),t._stacked=u(t.vScale,t))}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),r=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:r,_data:n}=this,{iScale:i,_stacked:s}=r,l=i.axis;let o,c,d,g=0===e&&t===n.length||r._sorted,M=e>0&&r._parsed[e-1];if(!1===this._parsing)r._parsed=n,r._sorted=!0,d=n;else{d=(0,a.b)(n[e])?this.parseArrayData(r,n,e,t):(0,a.i)(n[e])?this.parseObjectData(r,n,e,t):this.parsePrimitiveData(r,n,e,t);const i=()=>null===c[l]||M&&c[l]<M[l];for(o=0;o<t;++o)r._parsed[o+e]=c=d[o],g&&(i()&&(g=!1),M=c);r._sorted=g}s&&h(this,d)}parsePrimitiveData(e,t,r,a){const{iScale:n,vScale:i}=e,s=n.axis,l=i.axis,o=n.getLabels(),c=n===i,d=new Array(a);let g,M,u;for(g=0,M=a;g<M;++g)u=g+r,d[g]={[s]:c||n.parse(o[u],u),[l]:i.parse(t[u],u)};return d}parseArrayData(e,t,r,a){const{xScale:n,yScale:i}=e,s=new Array(a);let l,o,c,d;for(l=0,o=a;l<o;++l)c=l+r,d=t[c],s[l]={x:n.parse(d[0],c),y:i.parse(d[1],c)};return s}parseObjectData(e,t,r,n){const{xScale:i,yScale:s}=e,{xAxisKey:l="x",yAxisKey:o="y"}=this._parsing,c=new Array(n);let d,g,M,u;for(d=0,g=n;d<g;++d)M=d+r,u=t[M],c[d]={x:i.parse((0,a.f)(u,l),M),y:s.parse((0,a.f)(u,o),M)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,r){const a=this.chart,n=this._cachedMeta,i=t[e.axis];return M({keys:g(a,!0),values:t._stacks[e.axis]._visualValues},i,n.index,{mode:r})}updateRangeFromParsed(e,t,r,a){const n=r[t.axis];let i=null===n?NaN:n;const s=a&&r._stacks[t.axis];a&&s&&(a.values=s,i=M(a,n,this._cachedMeta.index)),e.min=Math.min(e.min,i),e.max=Math.max(e.max,i)}getMinMax(e,t){const r=this._cachedMeta,n=r._parsed,i=r._sorted&&e===r.iScale,s=n.length,l=this._getOtherScale(e),o=((e,t,r)=>e&&!t.hidden&&t._stacked&&{keys:g(r,!0),values:null})(t,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:M}=function(e){const{min:t,max:r,minDefined:a,maxDefined:n}=e.getUserBounds();return{min:a?t:Number.NEGATIVE_INFINITY,max:n?r:Number.POSITIVE_INFINITY}}(l);let u,m;function N(){m=n[u];const t=m[l.axis];return!(0,a.g)(m[e.axis])||d>t||M<t}for(u=0;u<s&&(N()||(this.updateRangeFromParsed(c,e,m,o),!i));++u);if(i)for(u=s-1;u>=0;--u)if(!N()){this.updateRangeFromParsed(c,e,m,o);break}return c}getAllParsedValues(e){const t=this._cachedMeta._parsed,r=[];let n,i,s;for(n=0,i=t.length;n<i;++n)s=t[n][e.axis],(0,a.g)(s)&&r.push(s);return r}getMaxOverflow(){return!1}getLabelAndValue(e){const t=this._cachedMeta,r=t.iScale,a=t.vScale,n=this.getParsed(e);return{label:r?""+r.getLabelForValue(n[r.axis]):"",value:a?""+a.getLabelForValue(n[a.axis]):""}}_update(e){const t=this._cachedMeta;this.update(e||"default"),t._clip=function(e){let t,r,n,i;return(0,a.i)(e)?(t=e.top,r=e.right,n=e.bottom,i=e.left):t=r=n=i=e,{top:t,right:r,bottom:n,left:i,disabled:!1===e}}((0,a.v)(this.options.clip,function(e,t,r){if(!1===r)return!1;const a=d(e,r),n=d(t,r);return{top:n.end,right:a.end,bottom:n.start,left:a.start}}(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,t=this.chart,r=this._cachedMeta,a=r.data||[],n=t.chartArea,i=[],s=this._drawStart||0,l=this._drawCount||a.length-s,o=this.options.drawActiveElementsOnTop;let c;for(r.dataset&&r.dataset.draw(e,n,s,l),c=s;c<s+l;++c){const t=a[c];t.hidden||(t.active&&o?i.push(t):t.draw(e,n))}for(c=0;c<i.length;++c)i[c].draw(e,n)}getStyle(e,t){const r=t?"active":"default";return void 0===e&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(e||0,r)}getContext(e,t,r){const n=this.getDataset();let i;if(e>=0&&e<this._cachedMeta.data.length){const t=this._cachedMeta.data[e];i=t.$context||(t.$context=function(e,t,r){return(0,a.j)(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:r,index:t,mode:"default",type:"data"})}(this.getContext(),e,t)),i.parsed=this.getParsed(e),i.raw=n.data[e],i.index=i.dataIndex=e}else i=this.$context||(this.$context=function(e,t){return(0,a.j)(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),i.dataset=n,i.index=i.datasetIndex=this.index;return i.active=!!t,i.mode=r,i}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t="default",r){const n="active"===t,i=this._cachedDataOpts,s=e+"-"+t,l=i[s],o=this.enableOptionSharing&&(0,a.h)(r);if(l)return x(l,o);const c=this.chart.config,d=c.datasetElementScopeKeys(this._type,e),g=n?[`${e}Hover`,"hover",e,""]:[e,""],M=c.getOptionScopes(this.getDataset(),d),u=Object.keys(a.d.elements[e]),m=c.resolveNamedOptions(M,u,()=>this.getContext(r,n,t),g);return m.$shared&&(m.$shared=o,i[s]=Object.freeze(x(m,o))),m}_resolveAnimations(e,t,r){const a=this.chart,n=this._cachedDataOpts,i=`animation-${t}`,s=n[i];if(s)return s;let l;if(!1!==a.options.animation){const a=this.chart.config,n=a.datasetAnimationScopeKeys(this._type,t),i=a.getOptionScopes(this.getDataset(),n);l=a.createResolver(i,this.getContext(e,r,t))}const o=new c(a,l&&l.animations);return l&&l._cacheable&&(n[i]=Object.freeze(o)),o}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||y(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const r=this.resolveDataElementOptions(e,t),a=this._sharedOptions,n=this.getSharedOptions(r),i=this.includeOptions(t,n)||n!==a;return this.updateSharedOptions(n,t,r),{sharedOptions:n,includeOptions:i}}updateElement(e,t,r,a){y(a)?Object.assign(e,r):this._resolveAnimations(t,a).update(e,r)}updateSharedOptions(e,t,r){e&&!y(t)&&this._resolveAnimations(void 0,t).update(e,r)}_setStyle(e,t,r,a){e.active=a;const n=this.getStyle(t,a);this._resolveAnimations(t,r,a).update(e,{options:!a&&this.getSharedOptions(n)||n})}removeHoverStyle(e,t,r){this._setStyle(e,r,"active",!1)}setHoverStyle(e,t,r){this._setStyle(e,r,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,r=this._cachedMeta.data;for(const[e,t,r]of this._syncList)this[e](t,r);this._syncList=[];const a=r.length,n=t.length,i=Math.min(n,a);i&&this.parse(0,i),n>a?this._insertElements(a,n-a,e):n<a&&this._removeElements(n,a-n)}_insertElements(e,t,r=!0){const a=this._cachedMeta,n=a.data,i=e+t;let s;const l=e=>{for(e.length+=t,s=e.length-1;s>=i;s--)e[s]=e[s-t]};for(l(n),s=e;s<i;++s)n[s]=new this.dataElementType;this._parsing&&l(a._parsed),this.parse(e,t),r&&this.updateElements(n,e,t,"reset")}updateElements(e,t,r,a){}_removeElements(e,t){const r=this._cachedMeta;if(this._parsing){const a=r._parsed.splice(e,t);r._stacked&&k(r,a)}r.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[t,r,a]=e;this[t](r,a)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,t){t&&this._sync(["_removeElements",e,t]);const r=arguments.length-2;r&&this._sync(["_insertElements",e,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function j(e){const t=e.iScale,r=function(e,t){if(!e._cache.$bar){const r=e.getMatchingVisibleMetas(t);let n=[];for(let t=0,a=r.length;t<a;t++)n=n.concat(r[t].controller.getAllParsedValues(e));e._cache.$bar=(0,a._)(n.sort((e,t)=>e-t))}return e._cache.$bar}(t,e.type);let n,i,s,l,o=t._length;const c=()=>{32767!==s&&-32768!==s&&((0,a.h)(l)&&(o=Math.min(o,Math.abs(s-l)||o)),l=s)};for(n=0,i=r.length;n<i;++n)s=t.getPixelForValue(r[n]),c();for(l=void 0,n=0,i=t.ticks.length;n<i;++n)s=t.getPixelForTick(n),c();return o}function I(e,t,r,n){return(0,a.b)(e)?function(e,t,r,a){const n=r.parse(e[0],a),i=r.parse(e[1],a),s=Math.min(n,i),l=Math.max(n,i);let o=s,c=l;Math.abs(s)>Math.abs(l)&&(o=l,c=s),t[r.axis]=c,t._custom={barStart:o,barEnd:c,start:n,end:i,min:s,max:l}}(e,t,r,n):t[r.axis]=r.parse(e,n),t}function E(e,t,r,a){const n=e.iScale,i=e.vScale,s=n.getLabels(),l=n===i,o=[];let c,d,g,M;for(c=r,d=r+a;c<d;++c)M=t[c],g={},g[n.axis]=l||n.parse(s[c],c),o.push(I(M,g,i,c));return o}function z(e){return e&&void 0!==e.barStart&&void 0!==e.barEnd}function T(e,t,r,a){let n=t.borderSkipped;const i={};if(!n)return void(e.borderSkipped=i);if(!0===n)return void(e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:s,end:l,reverse:o,top:c,bottom:d}=function(e){let t,r,a,n,i;return e.horizontal?(t=e.base>e.x,r="left",a="right"):(t=e.base<e.y,r="bottom",a="top"),t?(n="end",i="start"):(n="start",i="end"),{start:r,end:a,reverse:t,top:n,bottom:i}}(e);"middle"===n&&r&&(e.enableBorderRadius=!0,(r._top||0)===a?n=c:(r._bottom||0)===a?n=d:(i[f(d,s,l,o)]=!0,n=c)),i[f(n,s,l,o)]=!0,e.borderSkipped=i}function f(e,t,r,a){var n,i,s;return a?(s=r,e=_(e=(n=e)===(i=t)?s:n===s?i:n,r,t)):e=_(e,t,r),e}function _(e,t,r){return"start"===e?t:"end"===e?r:e}function A(e,{inflateAmount:t},r){e.inflateAmount="auto"===t?1===r?.33:0:t}class w extends D{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,t,r,a){return E(e,t,r,a)}parseArrayData(e,t,r,a){return E(e,t,r,a)}parseObjectData(e,t,r,n){const{iScale:i,vScale:s}=e,{xAxisKey:l="x",yAxisKey:o="y"}=this._parsing,c="x"===i.axis?l:o,d="x"===s.axis?l:o,g=[];let M,u,m,N;for(M=r,u=r+n;M<u;++M)N=t[M],m={},m[i.axis]=i.parse((0,a.f)(N,c),M),g.push(I((0,a.f)(N,d),m,s,M));return g}updateRangeFromParsed(e,t,r,a){super.updateRangeFromParsed(e,t,r,a);const n=r._custom;n&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,n.min),e.max=Math.max(e.max,n.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const t=this._cachedMeta,{iScale:r,vScale:a}=t,n=this.getParsed(e),i=n._custom,s=z(i)?"["+i.start+", "+i.end+"]":""+a.getLabelForValue(n[a.axis]);return{label:""+r.getLabelForValue(n[r.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(e){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}updateElements(e,t,r,n){const i="reset"===n,{index:s,_cachedMeta:{vScale:l}}=this,o=l.getBasePixel(),c=l.isHorizontal(),d=this._getRuler(),{sharedOptions:g,includeOptions:M}=this._getSharedOptions(t,n);for(let u=t;u<t+r;u++){const t=this.getParsed(u),r=i||(0,a.k)(t[l.axis])?{base:o,head:o}:this._calculateBarValuePixels(u),m=this._calculateBarIndexPixels(u,d),N=(t._stacks||{})[l.axis],h={horizontal:c,base:r.base,enableBorderRadius:!N||z(t._custom)||s===N._top||s===N._bottom,x:c?r.head:m.center,y:c?m.center:r.head,height:c?m.size:Math.abs(r.size),width:c?Math.abs(r.size):m.size};M&&(h.options=g||this.resolveDataElementOptions(u,e[u].active?"active":n));const p=h.options||e[u].options;T(h,p,N,s),A(h,p,d.ratio),this.updateElement(e[u],u,h,n)}}_getStacks(e,t){const{iScale:r}=this._cachedMeta,n=r.getMatchingVisibleMetas(this._type).filter(e=>e.controller.options.grouped),i=r.options.stacked,s=[],l=this._cachedMeta.controller.getParsed(t),o=l&&l[r.axis],c=e=>{const t=e._parsed.find(e=>e[r.axis]===o),n=t&&t[e.vScale.axis];if((0,a.k)(n)||isNaN(n))return!0};for(const r of n)if((void 0===t||!c(r))&&((!1===i||-1===s.indexOf(r.stack)||void 0===i&&void 0===r.stack)&&s.push(r.stack),r.index===e))break;return s.length||s.push(void 0),s}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,t=this.chart.options.indexAxis;return Object.keys(e).filter(r=>e[r].axis===t).shift()}_getAxis(){const e={},t=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)e[(0,a.v)("x"===this.chart.options.indexAxis?r.xAxisID:r.yAxisID,t)]=!0;return Object.keys(e)}_getStackIndex(e,t,r){const a=this._getStacks(e,r),n=void 0!==t?a.indexOf(t):-1;return-1===n?a.length-1:n}_getRuler(){const e=this.options,t=this._cachedMeta,r=t.iScale,a=[];let n,i;for(n=0,i=t.data.length;n<i;++n)a.push(r.getPixelForValue(this.getParsed(n)[r.axis],n));const s=e.barThickness;return{min:s||j(t),pixels:a,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:e.grouped,ratio:s?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:t,_stacked:r,index:n},options:{base:i,minBarLength:s}}=this,l=i||0,o=this.getParsed(e),c=o._custom,d=z(c);let g,M,u=o[t.axis],m=0,N=r?this.applyStack(t,o,r):u;N!==u&&(m=N-u,N=u),d&&(u=c.barStart,N=c.barEnd-c.barStart,0!==u&&(0,a.s)(u)!==(0,a.s)(c.barEnd)&&(m=0),m+=u);const h=(0,a.k)(i)||d?m:i;let p=t.getPixelForValue(h);if(g=this.chart.getDataVisibility(e)?t.getPixelForValue(m+N):p,M=g-p,Math.abs(M)<s){M=function(e,t,r){return 0!==e?(0,a.s)(e):(t.isHorizontal()?1:-1)*(t.min>=r?1:-1)}(M,t,l)*s,u===l&&(p-=M/2);const e=t.getPixelForDecimal(0),i=t.getPixelForDecimal(1),c=Math.min(e,i),m=Math.max(e,i);p=Math.max(Math.min(p,m),c),g=p+M,r&&!d&&(o._stacks[t.axis]._visualValues[n]=t.getValueForPixel(g)-t.getValueForPixel(p))}if(p===t.getPixelForValue(l)){const e=(0,a.s)(M)*t.getLineWidthForValue(l)/2;p+=e,M-=e}return{size:M,base:p,head:g,center:g+M/2}}_calculateBarIndexPixels(e,t){const r=t.scale,n=this.options,i=n.skipNull,s=(0,a.v)(n.maxBarThickness,1/0);let l,o;const c=this._getAxisCount();if(t.grouped){const r=i?this._getStackCount(e):t.stackCount,d="flex"===n.barThickness?function(e,t,r,a){const n=t.pixels,i=n[e];let s=e>0?n[e-1]:null,l=e<n.length-1?n[e+1]:null;const o=r.categoryPercentage;null===s&&(s=i-(null===l?t.end-t.start:l-i)),null===l&&(l=i+i-s);const c=i-(i-Math.min(s,l))/2*o;return{chunk:Math.abs(l-s)/2*o/a,ratio:r.barPercentage,start:c}}(e,t,n,r*c):function(e,t,r,n){const i=r.barThickness;let s,l;return(0,a.k)(i)?(s=t.min*r.categoryPercentage,l=r.barPercentage):(s=i*n,l=1),{chunk:s/n,ratio:l,start:t.pixels[e]-s/2}}(e,t,n,r*c),g="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,M=this._getAxis().indexOf((0,a.v)(g,this.getFirstScaleIdForIndexAxis())),u=this._getStackIndex(this.index,this._cachedMeta.stack,i?e:void 0)+M;l=d.start+d.chunk*u+d.chunk/2,o=Math.min(s,d.chunk*d.ratio)}else l=r.getPixelForValue(this.getParsed(e)[r.axis],e),o=Math.min(s,t.min*t.ratio);return{base:l-o/2,head:l+o/2,center:l,size:o}}draw(){const e=this._cachedMeta,t=e.vScale,r=e.data,a=r.length;let n=0;for(;n<a;++n)null===this.getParsed(n)[t.axis]||r[n].hidden||r[n].draw(this._ctx)}}class b extends D{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>"spacing"!==e,_indexable:e=>"spacing"!==e&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:r,color:a}}=e.legend.options;return t.labels.map((t,n)=>{const i=e.getDatasetMeta(0).controller.getStyle(n);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,fontColor:a,lineWidth:i.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(n),index:n}})}return[]}},onClick(e,t,r){r.chart.toggleDataVisibility(t.index),r.chart.update()}}}};constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const r=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=r;else{let i,s,l=e=>+r[e];if((0,a.i)(r[e])){const{key:e="value"}=this._parsing;l=t=>+(0,a.f)(r[t],e)}for(i=e,s=e+t;i<s;++i)n._parsed[i]=l(i)}}_getRotation(){return(0,a.t)(this.options.rotation-90)}_getCircumference(){return(0,a.t)(this.options.circumference)}_getRotationExtents(){let e=a.T,t=-a.T;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const a=this.chart.getDatasetMeta(r).controller,n=a._getRotation(),i=a._getCircumference();e=Math.min(e,n),t=Math.max(t,n+i)}return{rotation:e,circumference:t-e}}update(e){const t=this.chart,{chartArea:r}=t,n=this._cachedMeta,i=n.data,s=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,l=Math.max((Math.min(r.width,r.height)-s)/2,0),o=Math.min((0,a.m)(this.options.cutout,l),1),c=this._getRingWeight(this.index),{circumference:d,rotation:g}=this._getRotationExtents(),{ratioX:M,ratioY:u,offsetX:m,offsetY:N}=function(e,t,r){let n=1,i=1,s=0,l=0;if(t<a.T){const o=e,c=o+t,d=Math.cos(o),g=Math.sin(o),M=Math.cos(c),u=Math.sin(c),m=(e,t,n)=>(0,a.p)(e,o,c,!0)?1:Math.max(t,t*r,n,n*r),N=(e,t,n)=>(0,a.p)(e,o,c,!0)?-1:Math.min(t,t*r,n,n*r),h=m(0,d,M),p=m(a.H,g,u),k=N(a.P,d,M),y=N(a.P+a.H,g,u);n=(h-k)/2,i=(p-y)/2,s=-(h+k)/2,l=-(p+y)/2}return{ratioX:n,ratioY:i,offsetX:s,offsetY:l}}(g,d,o),h=(r.width-s)/M,p=(r.height-s)/u,k=Math.max(Math.min(h,p)/2,0),y=(0,a.n)(this.options.radius,k),x=(y-Math.max(y*o,0))/this._getVisibleDatasetWeightTotal();this.offsetX=m*y,this.offsetY=N*y,n.total=this.calculateTotal(),this.outerRadius=y-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(i,0,i.length,e)}_circumference(e,t){const r=this.options,n=this._cachedMeta,i=this._getCircumference();return t&&r.animation.animateRotate||!this.chart.getDataVisibility(e)||null===n._parsed[e]||n.data[e].hidden?0:this.calculateCircumference(n._parsed[e]*i/a.T)}updateElements(e,t,r,a){const n="reset"===a,i=this.chart,s=i.chartArea,l=i.options.animation,o=(s.left+s.right)/2,c=(s.top+s.bottom)/2,d=n&&l.animateScale,g=d?0:this.innerRadius,M=d?0:this.outerRadius,{sharedOptions:u,includeOptions:m}=this._getSharedOptions(t,a);let N,h=this._getRotation();for(N=0;N<t;++N)h+=this._circumference(N,n);for(N=t;N<t+r;++N){const t=this._circumference(N,n),r=e[N],i={x:o+this.offsetX,y:c+this.offsetY,startAngle:h,endAngle:h+t,circumference:t,outerRadius:M,innerRadius:g};m&&(i.options=u||this.resolveDataElementOptions(N,r.active?"active":a)),h+=t,this.updateElement(r,N,i,a)}}calculateTotal(){const e=this._cachedMeta,t=e.data;let r,a=0;for(r=0;r<t.length;r++){const n=e._parsed[r];null===n||isNaN(n)||!this.chart.getDataVisibility(r)||t[r].hidden||(a+=Math.abs(n))}return a}calculateCircumference(e){const t=this._cachedMeta.total;return t>0&&!isNaN(e)?a.T*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,r=this.chart,n=r.data.labels||[],i=(0,a.o)(t._parsed[e],r.options.locale);return{label:n[e]||"",value:i}}getMaxBorderWidth(e){let t=0;const r=this.chart;let a,n,i,s,l;if(!e)for(a=0,n=r.data.datasets.length;a<n;++a)if(r.isDatasetVisible(a)){i=r.getDatasetMeta(a),e=i.data,s=i.controller;break}if(!e)return 0;for(a=0,n=e.length;a<n;++a)l=s.resolveDataElementOptions(a),"inner"!==l.borderAlign&&(t=Math.max(t,l.borderWidth||0,l.hoverBorderWidth||0));return t}getMaxOffset(e){let t=0;for(let r=0,a=e.length;r<a;++r){const e=this.resolveDataElementOptions(r);t=Math.max(t,e.offset||0,e.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let r=0;r<e;++r)this.chart.isDatasetVisible(r)&&(t+=this._getRingWeight(r));return t}_getRingWeight(e){return Math.max((0,a.v)(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class O extends D{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:r,data:n=[],_dataset:i}=t,s=this.chart._animationsDisabled;let{start:l,count:o}=(0,a.q)(t,n,s);this._drawStart=l,this._drawCount=o,(0,a.w)(t)&&(l=0,o=n.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!i._decimated,r.points=n;const c=this.resolveDatasetElementOptions(e);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:c},e),this.updateElements(n,l,o,e)}updateElements(e,t,r,n){const i="reset"===n,{iScale:s,vScale:l,_stacked:o,_dataset:c}=this._cachedMeta,{sharedOptions:d,includeOptions:g}=this._getSharedOptions(t,n),M=s.axis,u=l.axis,{spanGaps:m,segment:N}=this.options,h=(0,a.x)(m)?m:Number.POSITIVE_INFINITY,p=this.chart._animationsDisabled||i||"none"===n,k=t+r,y=e.length;let x=t>0&&this.getParsed(t-1);for(let r=0;r<y;++r){const m=e[r],y=p?m:{};if(r<t||r>=k){y.skip=!0;continue}const D=this.getParsed(r),j=(0,a.k)(D[u]),I=y[M]=s.getPixelForValue(D[M],r),E=y[u]=i||j?l.getBasePixel():l.getPixelForValue(o?this.applyStack(l,D,o):D[u],r);y.skip=isNaN(I)||isNaN(E)||j,y.stop=r>0&&Math.abs(D[M]-x[M])>h,N&&(y.parsed=D,y.raw=c.data[r]),g&&(y.options=d||this.resolveDataElementOptions(r,m.active?"active":n)),p||this.updateElement(m,r,y,n),x=D}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,r=t.options&&t.options.borderWidth||0,a=e.data||[];if(!a.length)return r;const n=a[0].size(this.resolveDataElementOptions(0)),i=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(r,n,i)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}function v(e,t,r,n){const{controller:i,data:s,_sorted:l}=e,o=i._cachedMeta.iScale,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(o&&t===o.axis&&"r"!==t&&l&&s.length){const l=o._reversePixels?a.A:a.B;if(!n){const n=l(s,t,r);if(c){const{vScale:t}=i._cachedMeta,{_parsed:r}=e,s=r.slice(0,n.lo+1).reverse().findIndex(e=>!(0,a.k)(e[t.axis]));n.lo-=Math.max(0,s);const l=r.slice(n.hi).findIndex(e=>!(0,a.k)(e[t.axis]));n.hi+=Math.max(0,l)}return n}if(i._sharedOptions){const e=s[0],a="function"==typeof e.getRange&&e.getRange(t);if(a){const e=l(s,t,r-a),n=l(s,t,r+a);return{lo:e.lo,hi:n.hi}}}}return{lo:0,hi:s.length-1}}function L(e,t,r,a,n){const i=e.getSortedVisibleDatasetMetas(),s=r[t];for(let e=0,r=i.length;e<r;++e){const{index:r,data:l}=i[e],{lo:o,hi:c}=v(i[e],t,s,n);for(let e=o;e<=c;++e){const t=l[e];t.skip||a(t,r,e)}}}function S(e,t,r,n,i){const s=[];return i||e.isPointInArea(t)?(L(e,r,t,function(r,l,o){(i||(0,a.C)(r,e.chartArea,0))&&r.inRange(t.x,t.y,n)&&s.push({element:r,datasetIndex:l,index:o})},!0),s):s}function C(e,t,r,n,i,s){return s||e.isPointInArea(t)?"r"!==r||n?function(e,t,r,a,n,i){let s=[];const l=function(e){const t=-1!==e.indexOf("x"),r=-1!==e.indexOf("y");return function(e,a){const n=t?Math.abs(e.x-a.x):0,i=r?Math.abs(e.y-a.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(i,2))}}(r);let o=Number.POSITIVE_INFINITY;return L(e,r,t,function(r,c,d){const g=r.inRange(t.x,t.y,n);if(a&&!g)return;const M=r.getCenterPoint(n);if(!i&&!e.isPointInArea(M)&&!g)return;const u=l(t,M);u<o?(s=[{element:r,datasetIndex:c,index:d}],o=u):u===o&&s.push({element:r,datasetIndex:c,index:d})}),s}(e,t,r,n,i,s):function(e,t,r,n){let i=[];return L(e,r,t,function(e,r,s){const{startAngle:l,endAngle:o}=e.getProps(["startAngle","endAngle"],n),{angle:c}=(0,a.D)(e,{x:t.x,y:t.y});(0,a.p)(c,l,o)&&i.push({element:e,datasetIndex:r,index:s})}),i}(e,t,r,i):[]}function Q(e,t,r,a,n){const i=[],s="x"===r?"inXRange":"inYRange";let l=!1;return L(e,r,t,(e,a,o)=>{e[s]&&e[s](t[r],n)&&(i.push({element:e,datasetIndex:a,index:o}),l=l||e.inRange(t.x,t.y,n))}),a&&!l?[]:i}var U={evaluateInteractionItems:L,modes:{index(e,t,r,n){const i=(0,a.z)(t,e),s=r.axis||"x",l=r.includeInvisible||!1,o=r.intersect?S(e,i,s,n,l):C(e,i,s,!1,n,l),c=[];return o.length?(e.getSortedVisibleDatasetMetas().forEach(e=>{const t=o[0].index,r=e.data[t];r&&!r.skip&&c.push({element:r,datasetIndex:e.index,index:t})}),c):[]},dataset(e,t,r,n){const i=(0,a.z)(t,e),s=r.axis||"xy",l=r.includeInvisible||!1;let o=r.intersect?S(e,i,s,n,l):C(e,i,s,!1,n,l);if(o.length>0){const t=o[0].datasetIndex,r=e.getDatasetMeta(t).data;o=[];for(let e=0;e<r.length;++e)o.push({element:r[e],datasetIndex:t,index:e})}return o},point:(e,t,r,n)=>S(e,(0,a.z)(t,e),r.axis||"xy",n,r.includeInvisible||!1),nearest(e,t,r,n){const i=(0,a.z)(t,e),s=r.axis||"xy",l=r.includeInvisible||!1;return C(e,i,s,r.intersect,n,l)},x:(e,t,r,n)=>Q(e,(0,a.z)(t,e),"x",r.intersect,n),y:(e,t,r,n)=>Q(e,(0,a.z)(t,e),"y",r.intersect,n)}};const Y=["left","top","right","bottom"];function P(e,t){return e.filter(e=>e.pos===t)}function R(e,t){return e.filter(e=>-1===Y.indexOf(e.pos)&&e.box.axis===t)}function Z(e,t){return e.sort((e,r)=>{const a=t?r:e,n=t?e:r;return a.weight===n.weight?a.index-n.index:a.weight-n.weight})}function V(e,t,r,a){return Math.max(e[r],t[r])+Math.max(e[a],t[a])}function B(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function G(e,t,r,n){const{pos:i,box:s}=r,l=e.maxPadding;if(!(0,a.i)(i)){r.size&&(e[i]-=r.size);const t=n[r.stack]||{size:0,count:1};t.size=Math.max(t.size,r.horizontal?s.height:s.width),r.size=t.size/t.count,e[i]+=r.size}s.getPadding&&B(l,s.getPadding());const o=Math.max(0,t.outerWidth-V(l,e,"left","right")),c=Math.max(0,t.outerHeight-V(l,e,"top","bottom")),d=o!==e.w,g=c!==e.h;return e.w=o,e.h=c,r.horizontal?{same:d,other:g}:{same:g,other:d}}function W(e,t){const r=t.maxPadding;return function(e){const a={left:0,top:0,right:0,bottom:0};return e.forEach(e=>{a[e]=Math.max(t[e],r[e])}),a}(e?["left","right"]:["top","bottom"])}function H(e,t,r,a){const n=[];let i,s,l,o,c,d;for(i=0,s=e.length,c=0;i<s;++i){l=e[i],o=l.box,o.update(l.width||t.w,l.height||t.h,W(l.horizontal,t));const{same:s,other:g}=G(t,r,l,a);c|=s&&n.length,d=d||g,o.fullSize||n.push(l)}return c&&H(n,t,r,a)||d}function F(e,t,r,a,n){e.top=r,e.left=t,e.right=t+a,e.bottom=r+n,e.width=a,e.height=n}function J(e,t,r,n){const i=r.padding;let{x:s,y:l}=t;for(const o of e){const e=o.box,c=n[o.stack]||{count:1,placed:0,weight:1},d=o.stackWeight/c.weight||1;if(o.horizontal){const n=t.w*d,s=c.size||e.height;(0,a.h)(c.start)&&(l=c.start),e.fullSize?F(e,i.left,l,r.outerWidth-i.right-i.left,s):F(e,t.left+c.placed,l,n,s),c.start=l,c.placed+=n,l=e.bottom}else{const n=t.h*d,l=c.size||e.width;(0,a.h)(c.start)&&(s=c.start),e.fullSize?F(e,s,i.top,l,r.outerHeight-i.bottom-i.top):F(e,s,t.top+c.placed,l,n),c.start=s,c.placed+=n,s=e.right}}t.x=s,t.y=l}var X={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},e.boxes.push(t)},removeBox(e,t){const r=e.boxes?e.boxes.indexOf(t):-1;-1!==r&&e.boxes.splice(r,1)},configure(e,t,r){t.fullSize=r.fullSize,t.position=r.position,t.weight=r.weight},update(e,t,r,n){if(!e)return;const i=(0,a.E)(e.options.layout.padding),s=Math.max(t-i.width,0),l=Math.max(r-i.height,0),o=function(e){const t=function(e){const t=[];let r,a,n,i,s,l;for(r=0,a=(e||[]).length;r<a;++r)n=e[r],({position:i,options:{stack:s,stackWeight:l=1}}=n),t.push({index:r,box:n,pos:i,horizontal:n.isHorizontal(),weight:n.weight,stack:s&&i+s,stackWeight:l});return t}(e),r=Z(t.filter(e=>e.box.fullSize),!0),a=Z(P(t,"left"),!0),n=Z(P(t,"right")),i=Z(P(t,"top"),!0),s=Z(P(t,"bottom")),l=R(t,"x"),o=R(t,"y");return{fullSize:r,leftAndTop:a.concat(i),rightAndBottom:n.concat(o).concat(s).concat(l),chartArea:P(t,"chartArea"),vertical:a.concat(n).concat(o),horizontal:i.concat(s).concat(l)}}(e.boxes),c=o.vertical,d=o.horizontal;(0,a.F)(e.boxes,e=>{"function"==typeof e.beforeLayout&&e.beforeLayout()});const g=c.reduce((e,t)=>t.box.options&&!1===t.box.options.display?e:e+1,0)||1,M=Object.freeze({outerWidth:t,outerHeight:r,padding:i,availableWidth:s,availableHeight:l,vBoxMaxWidth:s/2/g,hBoxMaxHeight:l/2}),u=Object.assign({},i);B(u,(0,a.E)(n));const m=Object.assign({maxPadding:u,w:s,h:l,x:i.left,y:i.top},i),N=function(e,t){const r=function(e){const t={};for(const r of e){const{stack:e,pos:a,stackWeight:n}=r;if(!e||!Y.includes(a))continue;const i=t[e]||(t[e]={count:0,placed:0,weight:0,size:0});i.count++,i.weight+=n}return t}(e),{vBoxMaxWidth:a,hBoxMaxHeight:n}=t;let i,s,l;for(i=0,s=e.length;i<s;++i){l=e[i];const{fullSize:s}=l.box,o=r[l.stack],c=o&&l.stackWeight/o.weight;l.horizontal?(l.width=c?c*a:s&&t.availableWidth,l.height=n):(l.width=a,l.height=c?c*n:s&&t.availableHeight)}return r}(c.concat(d),M);H(o.fullSize,m,M,N),H(c,m,M,N),H(d,m,M,N)&&H(c,m,M,N),function(e){const t=e.maxPadding;function r(r){const a=Math.max(t[r]-e[r],0);return e[r]+=a,a}e.y+=r("top"),e.x+=r("left"),r("right"),r("bottom")}(m),J(o.leftAndTop,m,M,N),m.x+=m.w,m.y+=m.h,J(o.rightAndBottom,m,M,N),e.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},(0,a.F)(o.chartArea,t=>{const r=t.box;Object.assign(r,e.chartArea),r.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class ${acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,r){}removeEventListener(e,t,r){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,r,a){return t=Math.max(0,t||e.width),r=r||e.height,{width:t,height:Math.max(0,a?Math.floor(t/a):r)}}isAttached(e){return!0}updateConfig(e){}}class K extends ${acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const q="$chartjs",ee={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},te=e=>null===e||""===e,re=!!a.K&&{passive:!0};function ae(e,t,r){e&&e.canvas&&e.canvas.removeEventListener(t,r,re)}function ne(e,t){for(const r of e)if(r===t||r.contains(t))return!0}function ie(e,t,r){const a=e.canvas,n=new MutationObserver(e=>{let t=!1;for(const r of e)t=t||ne(r.addedNodes,a),t=t&&!ne(r.removedNodes,a);t&&r()});return n.observe(document,{childList:!0,subtree:!0}),n}function se(e,t,r){const a=e.canvas,n=new MutationObserver(e=>{let t=!1;for(const r of e)t=t||ne(r.removedNodes,a),t=t&&!ne(r.addedNodes,a);t&&r()});return n.observe(document,{childList:!0,subtree:!0}),n}const le=new Map;let oe=0;function ce(){const e=window.devicePixelRatio;e!==oe&&(oe=e,le.forEach((t,r)=>{r.currentDevicePixelRatio!==e&&t()}))}function de(e,t,r){const n=e.canvas,i=n&&(0,a.I)(n);if(!i)return;const s=(0,a.L)((e,t)=>{const a=i.clientWidth;r(e,t),a<i.clientWidth&&r()},window),l=new ResizeObserver(e=>{const t=e[0],r=t.contentRect.width,a=t.contentRect.height;0===r&&0===a||s(r,a)});return l.observe(i),function(e,t){le.size||window.addEventListener("resize",ce),le.set(e,t)}(e,s),l}function ge(e,t,r){r&&r.disconnect(),"resize"===t&&function(e){le.delete(e),le.size||window.removeEventListener("resize",ce)}(e)}function Me(e,t,r){const n=e.canvas,i=(0,a.L)(t=>{null!==e.ctx&&r(function(e,t){const r=ee[e.type]||e.type,{x:n,y:i}=(0,a.z)(e,t);return{type:r,chart:t,native:e,x:void 0!==n?n:null,y:void 0!==i?i:null}}(t,e))},e);return function(e,t,r){e&&e.addEventListener(t,r,re)}(n,t,i),i}class ue extends ${acquireContext(e,t){const r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(function(e,t){const r=e.style,n=e.getAttribute("height"),i=e.getAttribute("width");if(e[q]={initial:{height:n,width:i,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",r.boxSizing=r.boxSizing||"border-box",te(i)){const t=(0,a.J)(e,"width");void 0!==t&&(e.width=t)}if(te(n))if(""===e.style.height)e.height=e.width/(t||2);else{const t=(0,a.J)(e,"height");void 0!==t&&(e.height=t)}}(e,t),r):null}releaseContext(e){const t=e.canvas;if(!t[q])return!1;const r=t[q].initial;["height","width"].forEach(e=>{const n=r[e];(0,a.k)(n)?t.removeAttribute(e):t.setAttribute(e,n)});const n=r.style||{};return Object.keys(n).forEach(e=>{t.style[e]=n[e]}),t.width=t.width,delete t[q],!0}addEventListener(e,t,r){this.removeEventListener(e,t);const a=e.$proxies||(e.$proxies={}),n={attach:ie,detach:se,resize:de}[t]||Me;a[t]=n(e,t,r)}removeEventListener(e,t){const r=e.$proxies||(e.$proxies={}),a=r[t];a&&(({attach:ge,detach:ge,resize:ge}[t]||ae)(e,t,a),r[t]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,r,n){return(0,a.G)(e,t,r,n)}isAttached(e){const t=e&&(0,a.I)(e);return!(!t||!t.isConnected)}}class me{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:t,y:r}=this.getProps(["x","y"],e);return{x:t,y:r}}hasValue(){return(0,a.x)(this.x)&&(0,a.x)(this.y)}getProps(e,t){const r=this.$animations;if(!t||!r)return this;const a={};return e.forEach(e=>{a[e]=r[e]&&r[e].active()?r[e]._to:this[e]}),a}}function Ne(e,t,r,n,i){const s=(0,a.v)(n,0),l=Math.min((0,a.v)(i,e.length),e.length);let o,c,d,g=0;for(r=Math.ceil(r),i&&(o=i-n,r=o/Math.floor(o/r)),d=s;d<0;)g++,d=Math.round(s+g*r);for(c=Math.max(s,0);c<l;c++)c===d&&(t.push(e[c]),g++,d=Math.round(s+g*r))}const he=(e,t,r)=>"top"===t||"left"===t?e[t]+r:e[t]-r,pe=(e,t)=>Math.min(t||e,e);function ke(e,t){const r=[],a=e.length/t,n=e.length;let i=0;for(;i<n;i+=a)r.push(e[Math.floor(i)]);return r}function ye(e,t,r){const a=e.ticks.length,n=Math.min(t,a-1),i=e._startPixel,s=e._endPixel,l=1e-6;let o,c=e.getPixelForTick(n);if(!(r&&(o=1===a?Math.max(c-i,s-c):0===t?(e.getPixelForTick(1)-c)/2:(c-e.getPixelForTick(n-1))/2,c+=n<t?o:-o,c<i-l||c>s+l)))return c}function xe(e){return e.drawTicks?e.tickLength:0}function De(e,t){if(!e.display)return 0;const r=(0,a.a0)(e.font,t),n=(0,a.E)(e.padding);return((0,a.b)(e.text)?e.text.length:1)*r.lineHeight+n.height}function je(e,t,r){let n=(0,a.a1)(e);return(r&&"right"!==t||!r&&"right"===t)&&(n=(e=>"left"===e?"right":"right"===e?"left":e)(n)),n}class Ie extends me{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:r,_suggestedMax:n}=this;return e=(0,a.O)(e,Number.POSITIVE_INFINITY),t=(0,a.O)(t,Number.NEGATIVE_INFINITY),r=(0,a.O)(r,Number.POSITIVE_INFINITY),n=(0,a.O)(n,Number.NEGATIVE_INFINITY),{min:(0,a.O)(e,r),max:(0,a.O)(t,n),minDefined:(0,a.g)(e),maxDefined:(0,a.g)(t)}}getMinMax(e){let t,{min:r,max:n,minDefined:i,maxDefined:s}=this.getUserBounds();if(i&&s)return{min:r,max:n};const l=this.getMatchingVisibleMetas();for(let a=0,o=l.length;a<o;++a)t=l[a].controller.getMinMax(this,e),i||(r=Math.min(r,t.min)),s||(n=Math.max(n,t.max));return r=s&&r>n?n:r,n=i&&r>n?r:n,{min:(0,a.O)(r,(0,a.O)(n,r)),max:(0,a.O)(n,(0,a.O)(r,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){(0,a.Q)(this.options.beforeUpdate,[this])}update(e,t,r){const{beginAtZero:n,grace:i,ticks:s}=this.options,l=s.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=(0,a.R)(this,i,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const o=l<this.ticks.length;this._convertTicksToLabels(o?ke(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||"auto"===s.source)&&(this.ticks=function(e,t){const r=e.options.ticks,n=function(e){const t=e.options.offset,r=e._tickSize(),a=e._length/r+(t?0:1),n=e._maxLength/r;return Math.floor(Math.min(a,n))}(e),i=Math.min(r.maxTicksLimit||n,n),s=r.major.enabled?function(e){const t=[];let r,a;for(r=0,a=e.length;r<a;r++)e[r].major&&t.push(r);return t}(t):[],l=s.length,o=s[0],c=s[l-1],d=[];if(l>i)return function(e,t,r,a){let n,i=0,s=r[0];for(a=Math.ceil(a),n=0;n<e.length;n++)n===s&&(t.push(e[n]),i++,s=r[i*a])}(t,d,s,l/i),d;const g=function(e,t,r){const n=function(e){const t=e.length;let r,a;if(t<2)return!1;for(a=e[0],r=1;r<t;++r)if(e[r]-e[r-1]!==a)return!1;return a}(e),i=t.length/r;if(!n)return Math.max(i,1);const s=(0,a.N)(n);for(let e=0,t=s.length-1;e<t;e++){const t=s[e];if(t>i)return t}return Math.max(i,1)}(s,t,i);if(l>0){let e,r;const n=l>1?Math.round((c-o)/(l-1)):null;for(Ne(t,d,g,(0,a.k)(n)?0:o-n,o),e=0,r=l-1;e<r;e++)Ne(t,d,g,s[e],s[e+1]);return Ne(t,d,g,c,(0,a.k)(n)?t.length:c+n),d}return Ne(t,d,g),d}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),o&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e,t,r=this.options.reverse;this.isHorizontal()?(e=this.left,t=this.right):(e=this.top,t=this.bottom,r=!r),this._startPixel=e,this._endPixel=t,this._reversePixels=r,this._length=t-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){(0,a.Q)(this.options.afterUpdate,[this])}beforeSetDimensions(){(0,a.Q)(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){(0,a.Q)(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),(0,a.Q)(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){(0,a.Q)(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let r,n,i;for(r=0,n=e.length;r<n;r++)i=e[r],i.label=(0,a.Q)(t.callback,[i.value,r,e],this)}afterTickToLabelConversion(){(0,a.Q)(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){(0,a.Q)(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,r=pe(this.ticks.length,e.ticks.maxTicksLimit),n=t.minRotation||0,i=t.maxRotation;let s,l,o,c=n;if(!this._isVisible()||!t.display||n>=i||r<=1||!this.isHorizontal())return void(this.labelRotation=n);const d=this._getLabelSizes(),g=d.widest.width,M=d.highest.height,u=(0,a.S)(this.chart.width-g,0,this.maxWidth);s=e.offset?this.maxWidth/r:u/(r-1),g+6>s&&(s=u/(r-(e.offset?.5:1)),l=this.maxHeight-xe(e.grid)-t.padding-De(e.title,this.chart.options.font),o=Math.sqrt(g*g+M*M),c=(0,a.U)(Math.min(Math.asin((0,a.S)((d.highest.height+6)/s,-1,1)),Math.asin((0,a.S)(l/o,-1,1))-Math.asin((0,a.S)(M/o,-1,1)))),c=Math.max(n,Math.min(i,c))),this.labelRotation=c}afterCalculateLabelRotation(){(0,a.Q)(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){(0,a.Q)(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:r,title:n,grid:i}}=this,s=this._isVisible(),l=this.isHorizontal();if(s){const s=De(n,t.options.font);if(l?(e.width=this.maxWidth,e.height=xe(i)+s):(e.height=this.maxHeight,e.width=xe(i)+s),r.display&&this.ticks.length){const{first:t,last:n,widest:i,highest:s}=this._getLabelSizes(),o=2*r.padding,c=(0,a.t)(this.labelRotation),d=Math.cos(c),g=Math.sin(c);if(l){const t=r.mirror?0:g*i.width+d*s.height;e.height=Math.min(this.maxHeight,e.height+t+o)}else{const t=r.mirror?0:d*i.width+g*s.height;e.width=Math.min(this.maxWidth,e.width+t+o)}this._calculatePadding(t,n,g,d)}}this._handleMargins(),l?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,r,a){const{ticks:{align:n,padding:i},position:s}=this.options,l=0!==this.labelRotation,o="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,g=0;l?o?(d=a*e.width,g=r*t.height):(d=r*e.height,g=a*t.width):"start"===n?g=t.width:"end"===n?d=e.width:"inner"!==n&&(d=e.width/2,g=t.width/2),this.paddingLeft=Math.max((d-s+i)*this.width/(this.width-s),0),this.paddingRight=Math.max((g-c+i)*this.width/(this.width-c),0)}else{let r=t.height/2,a=e.height/2;"start"===n?(r=0,a=e.height):"end"===n&&(r=t.height,a=0),this.paddingTop=r+i,this.paddingBottom=a+i}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){(0,a.Q)(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return"top"===t||"bottom"===t||"x"===e}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){let t,r;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,r=e.length;t<r;t++)(0,a.k)(e[t].label)&&(e.splice(t,1),r--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let r=this.ticks;t<r.length&&(r=ke(r,t)),this._labelSizes=e=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,r){const{ctx:n,_longestTextCache:i}=this,s=[],l=[],o=Math.floor(t/pe(t,r));let c,d,g,M,u,m,N,h,p,k,y,x=0,D=0;for(c=0;c<t;c+=o){if(M=e[c].label,u=this._resolveTickFontOptions(c),n.font=m=u.string,N=i[m]=i[m]||{data:{},gc:[]},h=u.lineHeight,p=k=0,(0,a.k)(M)||(0,a.b)(M)){if((0,a.b)(M))for(d=0,g=M.length;d<g;++d)y=M[d],(0,a.k)(y)||(0,a.b)(y)||(p=(0,a.V)(n,N.data,N.gc,p,y),k+=h)}else p=(0,a.V)(n,N.data,N.gc,p,M),k=h;s.push(p),l.push(k),x=Math.max(p,x),D=Math.max(k,D)}!function(e,t){(0,a.F)(e,e=>{const r=e.gc,a=r.length/2;let n;if(a>t){for(n=0;n<a;++n)delete e.data[r[n]];r.splice(0,a)}})}(i,t);const j=s.indexOf(x),I=l.indexOf(D),E=e=>({width:s[e]||0,height:l[e]||0});return{first:E(0),last:E(t-1),widest:E(j),highest:E(I),widths:s,heights:l}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return(0,a.W)(this._alignToPixels?(0,a.X)(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&e<t.length){const r=t[e];return r.$context||(r.$context=function(e,t,r){return(0,a.j)(e,{tick:r,index:t,type:"tick"})}(this.getContext(),e,r))}return this.$context||(this.$context=(r=this.chart.getContext(),(0,a.j)(r,{scale:this,type:"scale"})));var r}_tickSize(){const e=this.options.ticks,t=(0,a.t)(this.labelRotation),r=Math.abs(Math.cos(t)),n=Math.abs(Math.sin(t)),i=this._getLabelSizes(),s=e.autoSkipPadding||0,l=i?i.widest.width+s:0,o=i?i.highest.height+s:0;return this.isHorizontal()?o*r>l*n?l/r:o/n:o*n<l*r?o/r:l/n}_isVisible(){const e=this.options.display;return"auto"!==e?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,r=this.chart,n=this.options,{grid:i,position:s,border:l}=n,o=i.offset,c=this.isHorizontal(),d=this.ticks.length+(o?1:0),g=xe(i),M=[],u=l.setContext(this.getContext()),m=u.display?u.width:0,N=m/2,h=function(e){return(0,a.X)(r,e,m)};let p,k,y,x,D,j,I,E,z,T,f,_;if("top"===s)p=h(this.bottom),j=this.bottom-g,E=p-N,T=h(e.top)+N,_=e.bottom;else if("bottom"===s)p=h(this.top),T=e.top,_=h(e.bottom)-N,j=p+N,E=this.top+g;else if("left"===s)p=h(this.right),D=this.right-g,I=p-N,z=h(e.left)+N,f=e.right;else if("right"===s)p=h(this.left),z=e.left,f=h(e.right)-N,D=p+N,I=this.left+g;else if("x"===t){if("center"===s)p=h((e.top+e.bottom)/2+.5);else if((0,a.i)(s)){const e=Object.keys(s)[0],t=s[e];p=h(this.chart.scales[e].getPixelForValue(t))}T=e.top,_=e.bottom,j=p+N,E=j+g}else if("y"===t){if("center"===s)p=h((e.left+e.right)/2);else if((0,a.i)(s)){const e=Object.keys(s)[0],t=s[e];p=h(this.chart.scales[e].getPixelForValue(t))}D=p-N,I=D-g,z=e.left,f=e.right}const A=(0,a.v)(n.ticks.maxTicksLimit,d),w=Math.max(1,Math.ceil(d/A));for(k=0;k<d;k+=w){const e=this.getContext(k),t=i.setContext(e),n=l.setContext(e),s=t.lineWidth,d=t.color,g=n.dash||[],u=n.dashOffset,m=t.tickWidth,N=t.tickColor,h=t.tickBorderDash||[],p=t.tickBorderDashOffset;y=ye(this,k,o),void 0!==y&&(x=(0,a.X)(r,y,s),c?D=I=z=f=x:j=E=T=_=x,M.push({tx1:D,ty1:j,tx2:I,ty2:E,x1:z,y1:T,x2:f,y2:_,width:s,color:d,borderDash:g,borderDashOffset:u,tickWidth:m,tickColor:N,tickBorderDash:h,tickBorderDashOffset:p}))}return this._ticksLength=d,this._borderValue=p,M}_computeLabelItems(e){const t=this.axis,r=this.options,{position:n,ticks:i}=r,s=this.isHorizontal(),l=this.ticks,{align:o,crossAlign:c,padding:d,mirror:g}=i,M=xe(r.grid),u=M+d,m=g?-d:u,N=-(0,a.t)(this.labelRotation),h=[];let p,k,y,x,D,j,I,E,z,T,f,_,A="middle";if("top"===n)j=this.bottom-m,I=this._getXAxisLabelAlignment();else if("bottom"===n)j=this.top+m,I=this._getXAxisLabelAlignment();else if("left"===n){const e=this._getYAxisLabelAlignment(M);I=e.textAlign,D=e.x}else if("right"===n){const e=this._getYAxisLabelAlignment(M);I=e.textAlign,D=e.x}else if("x"===t){if("center"===n)j=(e.top+e.bottom)/2+u;else if((0,a.i)(n)){const e=Object.keys(n)[0],t=n[e];j=this.chart.scales[e].getPixelForValue(t)+u}I=this._getXAxisLabelAlignment()}else if("y"===t){if("center"===n)D=(e.left+e.right)/2-u;else if((0,a.i)(n)){const e=Object.keys(n)[0],t=n[e];D=this.chart.scales[e].getPixelForValue(t)}I=this._getYAxisLabelAlignment(M).textAlign}"y"===t&&("start"===o?A="top":"end"===o&&(A="bottom"));const w=this._getLabelSizes();for(p=0,k=l.length;p<k;++p){y=l[p],x=y.label;const e=i.setContext(this.getContext(p));E=this.getPixelForTick(p)+i.labelOffset,z=this._resolveTickFontOptions(p),T=z.lineHeight,f=(0,a.b)(x)?x.length:1;const t=f/2,r=e.color,o=e.textStrokeColor,d=e.textStrokeWidth;let M,u=I;if(s?(D=E,"inner"===I&&(u=p===k-1?this.options.reverse?"left":"right":0===p?this.options.reverse?"right":"left":"center"),_="top"===n?"near"===c||0!==N?-f*T+T/2:"center"===c?-w.highest.height/2-t*T+T:-w.highest.height+T/2:"near"===c||0!==N?T/2:"center"===c?w.highest.height/2-t*T:w.highest.height-f*T,g&&(_*=-1),0===N||e.showLabelBackdrop||(D+=T/2*Math.sin(N))):(j=E,_=(1-f)*T/2),e.showLabelBackdrop){const t=(0,a.E)(e.backdropPadding),r=w.heights[p],n=w.widths[p];let i=_-t.top,s=0-t.left;switch(A){case"middle":i-=r/2;break;case"bottom":i-=r}switch(I){case"center":s-=n/2;break;case"right":s-=n;break;case"inner":p===k-1?s-=n:p>0&&(s-=n/2)}M={left:s,top:i,width:n+t.width,height:r+t.height,color:e.backdropColor}}h.push({label:x,font:z,textOffset:_,options:{rotation:N,color:r,strokeColor:o,strokeWidth:d,textAlign:u,textBaseline:A,translation:[D,j],backdrop:M}})}return h}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-(0,a.t)(this.labelRotation))return"top"===e?"left":"right";let r="center";return"start"===t.align?r="left":"end"===t.align?r="right":"inner"===t.align&&(r="inner"),r}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:r,mirror:a,padding:n}}=this.options,i=e+n,s=this._getLabelSizes().widest.width;let l,o;return"left"===t?a?(o=this.right+n,"near"===r?l="left":"center"===r?(l="center",o+=s/2):(l="right",o+=s)):(o=this.right-i,"near"===r?l="right":"center"===r?(l="center",o-=s/2):(l="left",o=this.left)):"right"===t?a?(o=this.left+n,"near"===r?l="right":"center"===r?(l="center",o-=s/2):(l="left",o-=s)):(o=this.left+i,"near"===r?l="left":"center"===r?(l="center",o+=s/2):(l="right",o=this.right)):l="right",{textAlign:l,x:o}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:e.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:e.width}:void 0}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:r,top:a,width:n,height:i}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(r,a,n,i),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const r=this.ticks.findIndex(t=>t.value===e);return r>=0?t.setContext(this.getContext(r)).lineWidth:0}drawGrid(e){const t=this.options.grid,r=this.ctx,a=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let n,i;const s=(e,t,a)=>{a.width&&a.color&&(r.save(),r.lineWidth=a.width,r.strokeStyle=a.color,r.setLineDash(a.borderDash||[]),r.lineDashOffset=a.borderDashOffset,r.beginPath(),r.moveTo(e.x,e.y),r.lineTo(t.x,t.y),r.stroke(),r.restore())};if(t.display)for(n=0,i=a.length;n<i;++n){const e=a[n];t.drawOnChartArea&&s({x:e.x1,y:e.y1},{x:e.x2,y:e.y2},e),t.drawTicks&&s({x:e.tx1,y:e.ty1},{x:e.tx2,y:e.ty2},{color:e.tickColor,width:e.tickWidth,borderDash:e.tickBorderDash,borderDashOffset:e.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{border:r,grid:n}}=this,i=r.setContext(this.getContext()),s=r.display?i.width:0;if(!s)return;const l=n.setContext(this.getContext(0)).lineWidth,o=this._borderValue;let c,d,g,M;this.isHorizontal()?(c=(0,a.X)(e,this.left,s)-s/2,d=(0,a.X)(e,this.right,l)+l/2,g=M=o):(g=(0,a.X)(e,this.top,s)-s/2,M=(0,a.X)(e,this.bottom,l)+l/2,c=d=o),t.save(),t.lineWidth=i.width,t.strokeStyle=i.color,t.beginPath(),t.moveTo(c,g),t.lineTo(d,M),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;const t=this.ctx,r=this._computeLabelArea();r&&(0,a.Y)(t,r);const n=this.getLabelItems(e);for(const e of n){const r=e.options,n=e.font,i=e.label,s=e.textOffset;(0,a.Z)(t,i,0,s,n,r)}r&&(0,a.$)(t)}drawTitle(){const{ctx:e,options:{position:t,title:r,reverse:n}}=this;if(!r.display)return;const i=(0,a.a0)(r.font),s=(0,a.E)(r.padding),l=r.align;let o=i.lineHeight/2;"bottom"===t||"center"===t||(0,a.i)(t)?(o+=s.bottom,(0,a.b)(r.text)&&(o+=i.lineHeight*(r.text.length-1))):o+=s.top;const{titleX:c,titleY:d,maxWidth:g,rotation:M}=function(e,t,r,n){const{top:i,left:s,bottom:l,right:o,chart:c}=e,{chartArea:d,scales:g}=c;let M,u,m,N=0;const h=l-i,p=o-s;if(e.isHorizontal()){if(u=(0,a.a2)(n,s,o),(0,a.i)(r)){const e=Object.keys(r)[0],a=r[e];m=g[e].getPixelForValue(a)+h-t}else m="center"===r?(d.bottom+d.top)/2+h-t:he(e,r,t);M=o-s}else{if((0,a.i)(r)){const e=Object.keys(r)[0],a=r[e];u=g[e].getPixelForValue(a)-p+t}else u="center"===r?(d.left+d.right)/2-p+t:he(e,r,t);m=(0,a.a2)(n,l,i),N="left"===r?-a.H:a.H}return{titleX:u,titleY:m,maxWidth:M,rotation:N}}(this,o,t,l);(0,a.Z)(e,r.text,0,0,i,{color:r.color,maxWidth:g,rotation:M,textAlign:je(l,t,n),textBaseline:"middle",translation:[c,d]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,r=(0,a.v)(e.grid&&e.grid.z,-1),n=(0,a.v)(e.border&&e.border.z,0);return this._isVisible()&&this.draw===Ie.prototype.draw?[{z:r,draw:e=>{this.drawBackground(),this.drawGrid(e),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:t,draw:e=>{this.drawLabels(e)}}]:[{z:t,draw:e=>{this.draw(e)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",a=[];let n,i;for(n=0,i=t.length;n<i;++n){const i=t[n];i[r]!==this.id||e&&i.type!==e||a.push(i)}return a}_resolveTickFontOptions(e){const t=this.options.ticks.setContext(this.getContext(e));return(0,a.a0)(t.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Ee{constructor(e,t,r){this.type=e,this.scope=t,this.override=r,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let r;(function(e){return"id"in e&&"defaults"in e})(t)&&(r=this.register(t));const n=this.items,i=e.id,s=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+e);return i in n||(n[i]=e,function(e,t,r){const n=(0,a.a4)(Object.create(null),[r?a.d.get(r):{},a.d.get(t),e.defaults]);a.d.set(t,n),e.defaultRoutes&&function(e,t){Object.keys(t).forEach(r=>{const n=r.split("."),i=n.pop(),s=[e].concat(n).join("."),l=t[r].split("."),o=l.pop(),c=l.join(".");a.d.route(s,i,c,o)})}(t,e.defaultRoutes),e.descriptors&&a.d.describe(t,e.descriptors)}(e,s,r),this.override&&a.d.override(e.id,e.overrides)),s}get(e){return this.items[e]}unregister(e){const t=this.items,r=e.id,n=this.scope;r in t&&delete t[r],n&&r in a.d[n]&&(delete a.d[n][r],this.override&&delete a.a3[r])}}class ze{constructor(){this.controllers=new Ee(D,"datasets",!0),this.elements=new Ee(me,"elements"),this.plugins=new Ee(Object,"plugins"),this.scales=new Ee(Ie,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,r){[...t].forEach(t=>{const n=r||this._getRegistryForType(t);r||n.isForType(t)||n===this.plugins&&t.id?this._exec(e,n,t):(0,a.F)(t,t=>{const a=r||this._getRegistryForType(t);this._exec(e,a,t)})})}_exec(e,t,r){const n=(0,a.a5)(e);(0,a.Q)(r["before"+n],[],r),t[e](r),(0,a.Q)(r["after"+n],[],r)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const r=this._typedRegistries[t];if(r.isForType(e))return r}return this.plugins}_get(e,t,r){const a=t.get(e);if(void 0===a)throw new Error('"'+e+'" is not a registered '+r+".");return a}}var Te=new ze;class fe{constructor(){this._init=[]}notify(e,t,r,a){"beforeInit"===t&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const n=a?this._descriptors(e).filter(a):this._descriptors(e),i=this._notify(n,e,t,r);return"afterDestroy"===t&&(this._notify(n,e,"stop"),this._notify(this._init,e,"uninstall")),i}_notify(e,t,r,n){n=n||{};for(const i of e){const e=i.plugin,s=e[r],l=[t,n,i.options];if(!1===(0,a.Q)(s,l,e)&&n.cancelable)return!1}return!0}invalidate(){(0,a.k)(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const r=e&&e.config,n=(0,a.v)(r.options&&r.options.plugins,{}),i=function(e){const t={},r=[],a=Object.keys(Te.plugins.items);for(let e=0;e<a.length;e++)r.push(Te.getPlugin(a[e]));const n=e.plugins||[];for(let e=0;e<n.length;e++){const a=n[e];-1===r.indexOf(a)&&(r.push(a),t[a.id]=!0)}return{plugins:r,localIds:t}}(r);return!1!==n||t?function(e,{plugins:t,localIds:r},a,n){const i=[],s=e.getContext();for(const l of t){const t=l.id,o=_e(a[t],n);null!==o&&i.push({plugin:l,options:Ae(e.config,{plugin:l,local:r[t]},o,s)})}return i}(e,i,n,t):[]}_notifyStateChanges(e){const t=this._oldCache||[],r=this._cache,a=(e,t)=>e.filter(e=>!t.some(t=>e.plugin.id===t.plugin.id));this._notify(a(t,r),e,"stop"),this._notify(a(r,t),e,"start")}}function _e(e,t){return t||!1!==e?!0===e?{}:e:null}function Ae(e,{plugin:t,local:r},a,n){const i=e.pluginScopeKeys(t),s=e.getOptionScopes(a,i);return r&&t.defaults&&s.push(t.defaults),e.createResolver(s,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function we(e,t){const r=a.d.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||r.indexAxis||"x"}function be(e){if("x"===e||"y"===e||"r"===e)return e}function Oe(e){return"top"===e||"bottom"===e?"x":"left"===e||"right"===e?"y":void 0}function ve(e,...t){if(be(e))return e;for(const r of t){const t=r.axis||Oe(r.position)||e.length>1&&be(e[0].toLowerCase());if(t)return t}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Le(e,t,r){if(r[t+"AxisID"]===e)return{axis:t}}function Se(e){const t=e.options||(e.options={});t.plugins=(0,a.v)(t.plugins,{}),t.scales=function(e,t){const r=a.a3[e.type]||{scales:{}},n=t.scales||{},i=we(e.type,t),s=Object.create(null);return Object.keys(n).forEach(t=>{const l=n[t];if(!(0,a.i)(l))return console.error(`Invalid scale configuration for scale: ${t}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const o=ve(t,l,function(e,t){if(t.data&&t.data.datasets){const r=t.data.datasets.filter(t=>t.xAxisID===e||t.yAxisID===e);if(r.length)return Le(e,"x",r[0])||Le(e,"y",r[0])}return{}}(t,e),a.d.scales[l.type]),c=function(e,t){return e===t?"_index_":"_value_"}(o,i),d=r.scales||{};s[t]=(0,a.ab)(Object.create(null),[{axis:o},l,d[o],d[c]])}),e.data.datasets.forEach(r=>{const i=r.type||e.type,l=r.indexAxis||we(i,t),o=(a.a3[i]||{}).scales||{};Object.keys(o).forEach(e=>{const t=function(e,t){let r=e;return"_index_"===e?r=t:"_value_"===e&&(r="x"===t?"y":"x"),r}(e,l),i=r[t+"AxisID"]||t;s[i]=s[i]||Object.create(null),(0,a.ab)(s[i],[{axis:t},n[i],o[e]])})}),Object.keys(s).forEach(e=>{const t=s[e];(0,a.ab)(t,[a.d.scales[t.type],a.d.scale])}),s}(e,t)}function Ce(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}const Qe=new Map,Ue=new Set;function Ye(e,t){let r=Qe.get(e);return r||(r=t(),Qe.set(e,r),Ue.add(r)),r}const Pe=(e,t,r)=>{const n=(0,a.f)(t,r);void 0!==n&&e.add(n)};class Re{constructor(e){this._config=function(e){return(e=e||{}).data=Ce(e.data),Se(e),e}(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Ce(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Se(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Ye(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return Ye(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return Ye(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id;return Ye(`${this.type}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const r=this._scopeCache;let a=r.get(e);return a&&!t||(a=new Map,r.set(e,a)),a}getOptionScopes(e,t,r){const{options:n,type:i}=this,s=this._cachedScopes(e,r),l=s.get(t);if(l)return l;const o=new Set;t.forEach(t=>{e&&(o.add(e),t.forEach(t=>Pe(o,e,t))),t.forEach(e=>Pe(o,n,e)),t.forEach(e=>Pe(o,a.a3[i]||{},e)),t.forEach(e=>Pe(o,a.d,e)),t.forEach(e=>Pe(o,a.a6,e))});const c=Array.from(o);return 0===c.length&&c.push(Object.create(null)),Ue.has(t)&&s.set(t,c),c}chartOptionScopes(){const{options:e,type:t}=this;return[e,a.a3[t]||{},a.d.datasets[t]||{},{type:t},a.d,a.a6]}resolveNamedOptions(e,t,r,n=[""]){const i={$shared:!0},{resolver:s,subPrefixes:l}=Ze(this._resolverCache,e,n);let o=s;if(function(e,t){const{isScriptable:r,isIndexable:n}=(0,a.aa)(e);for(const i of t){const t=r(i),s=n(i),l=(s||t)&&e[i];if(t&&((0,a.a7)(l)||Ve(l))||s&&(0,a.b)(l))return!0}return!1}(s,t)){i.$shared=!1,r=(0,a.a7)(r)?r():r;const t=this.createResolver(e,r,l);o=(0,a.a8)(s,r,t)}for(const e of t)i[e]=o[e];return i}createResolver(e,t,r=[""],n){const{resolver:i}=Ze(this._resolverCache,e,r);return(0,a.i)(t)?(0,a.a8)(i,t,void 0,n):i}}function Ze(e,t,r){let n=e.get(t);n||(n=new Map,e.set(t,n));const i=r.join();let s=n.get(i);return s||(s={resolver:(0,a.a9)(t,r),subPrefixes:r.filter(e=>!e.toLowerCase().includes("hover"))},n.set(i,s)),s}const Ve=e=>(0,a.i)(e)&&Object.getOwnPropertyNames(e).some(t=>(0,a.a7)(e[t])),Be=["top","bottom","left","right","chartArea"];function Ge(e,t){return"top"===e||"bottom"===e||-1===Be.indexOf(e)&&"x"===t}function We(e,t){return function(r,a){return r[e]===a[e]?r[t]-a[t]:r[e]-a[e]}}function He(e){const t=e.chart,r=t.options.animation;t.notifyPlugins("afterRender"),(0,a.Q)(r&&r.onComplete,[e],t)}function Fe(e){const t=e.chart,r=t.options.animation;(0,a.Q)(r&&r.onProgress,[e],t)}function Je(e){return(0,a.M)()&&"string"==typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Xe={},$e=e=>{const t=Je(e);return Object.values(Xe).filter(e=>e.canvas===t).pop()};function Ke(e,t,r){const a=Object.keys(e);for(const n of a){const a=+n;if(a>=t){const i=e[n];delete e[n],(r>0||a>t)&&(e[a+r]=i)}}}class qe{static defaults=a.d;static instances=Xe;static overrides=a.a3;static registry=Te;static version="4.5.0";static getChart=$e;static register(...e){Te.add(...e),et()}static unregister(...e){Te.remove(...e),et()}constructor(e,t){const r=this.config=new Re(t),n=Je(e),s=$e(n);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const l=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||function(e){return!(0,a.M)()||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?K:ue}(n)),this.platform.updateConfig(r);const o=this.platform.acquireContext(n,l.aspectRatio),c=o&&o.canvas,d=c&&c.height,g=c&&c.width;this.id=(0,a.ac)(),this.ctx=o,this.canvas=c,this.width=g,this.height=d,this._options=l,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new fe,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(0,a.ad)(e=>this.update(e),l.resizeDelay||0),this._dataChanges=[],Xe[this.id]=this,o&&c?(i.listen(this,"complete",He),i.listen(this,"progress",Fe),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:r,height:n,_aspectRatio:i}=this;return(0,a.k)(e)?t&&i?i:n?r/n:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Te}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():(0,a.ae)(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return(0,a.af)(this.canvas,this.ctx),this}stop(){return i.stop(this),this}resize(e,t){i.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const r=this.options,n=this.canvas,i=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(n,e,t,i),l=r.devicePixelRatio||this.platform.getDevicePixelRatio(),o=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,(0,a.ae)(this,l,!0)&&(this.notifyPlugins("resize",{size:s}),(0,a.Q)(r.onResize,[this,s],this),this.attached&&this._doResize(o)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};(0,a.F)(e,(e,t)=>{e.id=t})}buildOrUpdateScales(){const e=this.options,t=e.scales,r=this.scales,n=Object.keys(r).reduce((e,t)=>(e[t]=!1,e),{});let i=[];t&&(i=i.concat(Object.keys(t).map(e=>{const r=t[e],a=ve(e,r),n="r"===a,i="x"===a;return{options:r,dposition:n?"chartArea":i?"bottom":"left",dtype:n?"radialLinear":i?"category":"linear"}}))),(0,a.F)(i,t=>{const i=t.options,s=i.id,l=ve(s,i),o=(0,a.v)(i.type,t.dtype);void 0!==i.position&&Ge(i.position,l)===Ge(t.dposition)||(i.position=t.dposition),n[s]=!0;let c=null;s in r&&r[s].type===o?c=r[s]:(c=new(Te.getScale(o))({id:s,type:o,ctx:this.ctx,chart:this}),r[c.id]=c),c.init(i,e)}),(0,a.F)(n,(e,t)=>{e||delete r[t]}),(0,a.F)(r,e=>{X.configure(this,e,e.options),X.addBox(this,e)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,r=e.length;if(e.sort((e,t)=>e.index-t.index),r>t){for(let e=t;e<r;++e)this._destroyDatasetMeta(e);e.splice(t,r-t)}this._sortedMetasets=e.slice(0).sort(We("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach((e,r)=>{0===t.filter(t=>t===e._dataset).length&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let r,n;for(this._removeUnreferencedMetasets(),r=0,n=t.length;r<n;r++){const n=t[r];let i=this.getDatasetMeta(r);const s=n.type||this.config.type;if(i.type&&i.type!==s&&(this._destroyDatasetMeta(r),i=this.getDatasetMeta(r)),i.type=s,i.indexAxis=n.indexAxis||we(s,this.options),i.order=n.order||0,i.index=r,i.label=""+n.label,i.visible=this.isDatasetVisible(r),i.controller)i.controller.updateIndex(r),i.controller.linkScales();else{const t=Te.getController(s),{datasetElementType:n,dataElementType:l}=a.d.datasets[s];Object.assign(t,{dataElementType:Te.getElement(l),datasetElementType:n&&Te.getElement(n)}),i.controller=new t(this,r),e.push(i.controller)}}return this._updateMetasets(),e}_resetElements(){(0,a.F)(this.data.datasets,(e,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const r=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0}))return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let e=0,t=this.data.datasets.length;e<t;e++){const{controller:t}=this.getDatasetMeta(e),r=!n&&-1===i.indexOf(t);t.buildOrUpdateElements(r),s=Math.max(+t.getMaxOverflow(),s)}s=this._minPadding=r.layout.autoPadding?s:0,this._updateLayout(s),n||(0,a.F)(i,e=>{e.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(We("z","_idx"));const{_active:l,_lastEvent:o}=this;o?this._eventHandler(o,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){(0,a.F)(this.scales,e=>{X.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),r=new Set(e.events);(0,a.ag)(t,r)&&!!this._responsiveListeners===e.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:r,start:a,count:n}of t)Ke(e,a,"_removeElements"===r?-n:n)}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,r=t=>new Set(e.filter(e=>e[0]===t).map((e,t)=>t+","+e.splice(1).join(","))),n=r(0);for(let e=1;e<t;e++)if(!(0,a.ag)(n,r(e)))return;return Array.from(n).map(e=>e.split(",")).map(e=>({method:e[1],start:+e[2],count:+e[3]}))}_updateLayout(e){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;X.update(this,this.width,this.height,e);const t=this.chartArea,r=t.width<=0||t.height<=0;this._layers=[],(0,a.F)(this.boxes,e=>{r&&"chartArea"===e.position||(e.configure&&e.configure(),this._layers.push(...e._layers()))},this),this._layers.forEach((e,t)=>{e._idx=t}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(let e=0,t=this.data.datasets.length;e<t;++e)this.getDatasetMeta(e).controller.configure();for(let t=0,r=this.data.datasets.length;t<r;++t)this._updateDataset(t,(0,a.a7)(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const r=this.getDatasetMeta(e),a={meta:r,index:e,mode:t,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",a)&&(r.controller._update(t),a.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",a))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(i.has(this)?this.attached&&!i.running(this)&&i.start(this):(this.draw(),He({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:e,height:t}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(e,t)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,r=[];let a,n;for(a=0,n=t.length;a<n;++a){const n=t[a];e&&!n.visible||r.push(n)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,r={meta:e,index:e.index,cancelable:!0},n=(0,a.ah)(this,e);!1!==this.notifyPlugins("beforeDatasetDraw",r)&&(n&&(0,a.Y)(t,n),e.controller.draw(),n&&(0,a.$)(t),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(e){return(0,a.C)(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,r,a){const n=U.modes[t];return"function"==typeof n?n(this,e,r,a):[]}getDatasetMeta(e){const t=this.data.datasets[e],r=this._metasets;let a=r.filter(e=>e&&e._dataset===t).pop();return a||(a={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},r.push(a)),a}getContext(){return this.$context||(this.$context=(0,a.j)(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const r=this.getDatasetMeta(e);return"boolean"==typeof r.hidden?!r.hidden:!t.hidden}setDatasetVisibility(e,t){this.getDatasetMeta(e).hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,r){const n=r?"show":"hide",i=this.getDatasetMeta(e),s=i.controller._resolveAnimations(void 0,n);(0,a.h)(t)?(i.data[t].hidden=!r,this.update()):(this.setDatasetVisibility(e,r),s.update(i,{visible:r}),this.update(t=>t.datasetIndex===e?n:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),i.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),(0,a.af)(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete Xe[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,r=(r,a)=>{t.addEventListener(this,r,a),e[r]=a},n=(e,t,r)=>{e.offsetX=t,e.offsetY=r,this._eventHandler(e)};(0,a.F)(this.options.events,e=>r(e,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,r=(r,a)=>{t.addEventListener(this,r,a),e[r]=a},a=(r,a)=>{e[r]&&(t.removeEventListener(this,r,a),delete e[r])},n=(e,t)=>{this.canvas&&this.resize(e,t)};let i;const s=()=>{a("attach",s),this.attached=!0,this.resize(),r("resize",n),r("detach",i)};i=()=>{this.attached=!1,a("resize",n),this._stop(),this._resize(0,0),r("attach",s)},t.isAttached(this.canvas)?s():i()}unbindEvents(){(0,a.F)(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},(0,a.F)(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,r){const a=r?"set":"remove";let n,i,s,l;for("dataset"===t&&(n=this.getDatasetMeta(e[0].datasetIndex),n.controller["_"+a+"DatasetHoverStyle"]()),s=0,l=e.length;s<l;++s){i=e[s];const t=i&&this.getDatasetMeta(i.datasetIndex).controller;t&&t[a+"HoverStyle"](i.element,i.datasetIndex,i.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],r=e.map(({datasetIndex:e,index:t})=>{const r=this.getDatasetMeta(e);if(!r)throw new Error("No dataset found at index "+e);return{datasetIndex:e,element:r.data[t],index:t}});!(0,a.ai)(r,t)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,t))}notifyPlugins(e,t,r){return this._plugins.notify(this,e,t,r)}isPluginEnabled(e){return 1===this._plugins._cache.filter(t=>t.plugin.id===e).length}_updateHoverStyles(e,t,r){const a=this.options.hover,n=(e,t)=>e.filter(e=>!t.some(t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)),i=n(t,e),s=r?e:n(e,t);i.length&&this.updateHoverStyle(i,a.mode,!1),s.length&&a.mode&&this.updateHoverStyle(s,a.mode,!0)}_eventHandler(e,t){const r={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},a=t=>(t.options.events||this.options.events).includes(e.native.type);if(!1===this.notifyPlugins("beforeEvent",r,a))return;const n=this._handleEvent(e,t,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,a),(n||r.changed)&&this.render(),this}_handleEvent(e,t,r){const{_active:n=[],options:i}=this,s=t,l=this._getActiveElements(e,n,r,s),o=(0,a.aj)(e),c=function(e,t,r,a){return r&&"mouseout"!==e.type?a?t:e:null}(e,this._lastEvent,r,o);r&&(this._lastEvent=null,(0,a.Q)(i.onHover,[e,l,this],this),o&&(0,a.Q)(i.onClick,[e,l,this],this));const d=!(0,a.ai)(l,n);return(d||t)&&(this._active=l,this._updateHoverStyles(l,n,t)),this._lastEvent=c,d}_getActiveElements(e,t,r,a){if("mouseout"===e.type)return[];if(!r)return t;const n=this.options.hover;return this.getElementsAtEventForMode(e,n.mode,n,a)}}function et(){return(0,a.F)(qe.instances,e=>e._plugins.invalidate())}function tt(e,t,r,a){return{x:r+e*Math.cos(t),y:a+e*Math.sin(t)}}function rt(e,t,r,n,i,s){const{x:l,y:o,startAngle:c,pixelMargin:d,innerRadius:g}=t,M=Math.max(t.outerRadius+n+r-d,0),u=g>0?g+n+r+d:0;let m=0;const N=i-c;if(n){const e=((g>0?g-n:0)+(M>0?M-n:0))/2;m=(N-(0!==e?N*e/(e+n):N))/2}const h=(N-Math.max(.001,N*M-r/a.P)/M)/2,p=c+h+m,k=i-h-m,{outerStart:y,outerEnd:x,innerStart:D,innerEnd:j}=function(e,t,r,n){const i=(s=e.options.borderRadius,(0,a.am)(s,["outerStart","outerEnd","innerStart","innerEnd"]));var s;const l=(r-t)/2,o=Math.min(l,n*t/2),c=e=>{const t=(r-Math.min(l,e))*n/2;return(0,a.S)(e,0,Math.min(l,t))};return{outerStart:c(i.outerStart),outerEnd:c(i.outerEnd),innerStart:(0,a.S)(i.innerStart,0,o),innerEnd:(0,a.S)(i.innerEnd,0,o)}}(t,u,M,k-p),I=M-y,E=M-x,z=p+y/I,T=k-x/E,f=u+D,_=u+j,A=p+D/f,w=k-j/_;if(e.beginPath(),s){const t=(z+T)/2;if(e.arc(l,o,M,z,t),e.arc(l,o,M,t,T),x>0){const t=tt(E,T,l,o);e.arc(t.x,t.y,x,T,k+a.H)}const r=tt(_,k,l,o);if(e.lineTo(r.x,r.y),j>0){const t=tt(_,w,l,o);e.arc(t.x,t.y,j,k+a.H,w+Math.PI)}const n=(k-j/u+(p+D/u))/2;if(e.arc(l,o,u,k-j/u,n,!0),e.arc(l,o,u,n,p+D/u,!0),D>0){const t=tt(f,A,l,o);e.arc(t.x,t.y,D,A+Math.PI,p-a.H)}const i=tt(I,p,l,o);if(e.lineTo(i.x,i.y),y>0){const t=tt(I,z,l,o);e.arc(t.x,t.y,y,p-a.H,z)}}else{e.moveTo(l,o);const t=Math.cos(z)*M+l,r=Math.sin(z)*M+o;e.lineTo(t,r);const a=Math.cos(T)*M+l,n=Math.sin(T)*M+o;e.lineTo(a,n)}e.closePath()}class at extends me{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,r){const n=this.getProps(["x","y"],r),{angle:i,distance:s}=(0,a.D)(n,{x:e,y:t}),{startAngle:l,endAngle:o,innerRadius:c,outerRadius:d,circumference:g}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),M=(this.options.spacing+this.options.borderWidth)/2,u=(0,a.v)(g,o-l),m=(0,a.p)(i,l,o)&&l!==o,N=u>=a.T||m,h=(0,a.ak)(s,c+M,d+M);return N&&h}getCenterPoint(e){const{x:t,y:r,startAngle:a,endAngle:n,innerRadius:i,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:l,spacing:o}=this.options,c=(a+n)/2,d=(i+s+o+l)/2;return{x:t+Math.cos(c)*d,y:r+Math.sin(c)*d}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:r}=this,n=(t.offset||0)/4,i=(t.spacing||0)/2,s=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=r>a.T?Math.floor(r/a.T):0,0===r||this.innerRadius<0||this.outerRadius<0)return;e.save();const l=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(l)*n,Math.sin(l)*n);const o=n*(1-Math.sin(Math.min(a.P,r||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,function(e,t,r,n,i){const{fullCircles:s,startAngle:l,circumference:o}=t;let c=t.endAngle;if(s){rt(e,t,r,n,c,i);for(let t=0;t<s;++t)e.fill();isNaN(o)||(c=l+(o%a.T||a.T))}rt(e,t,r,n,c,i),e.fill()}(e,this,o,i,s),function(e,t,r,n,i){const{fullCircles:s,startAngle:l,circumference:o,options:c}=t,{borderWidth:d,borderJoinStyle:g,borderDash:M,borderDashOffset:u,borderRadius:m}=c,N="inner"===c.borderAlign;if(!d)return;e.setLineDash(M||[]),e.lineDashOffset=u,N?(e.lineWidth=2*d,e.lineJoin=g||"round"):(e.lineWidth=d,e.lineJoin=g||"bevel");let h=t.endAngle;if(s){rt(e,t,r,n,h,i);for(let t=0;t<s;++t)e.stroke();isNaN(o)||(h=l+(o%a.T||a.T))}N&&function(e,t,r){const{startAngle:n,pixelMargin:i,x:s,y:l,outerRadius:o,innerRadius:c}=t;let d=i/o;e.beginPath(),e.arc(s,l,o,n-d,r+d),c>i?(d=i/c,e.arc(s,l,c,r+d,n-d,!0)):e.arc(s,l,i,r+a.H,n-a.H),e.closePath(),e.clip()}(e,t,h),c.selfJoin&&h-l>=a.P&&0===m&&"miter"!==g&&function(e,t,r){const{startAngle:n,x:i,y:s,outerRadius:l,innerRadius:o,options:c}=t,{borderWidth:d,borderJoinStyle:g}=c,M=Math.min(d/l,(0,a.al)(n-r));if(e.beginPath(),e.arc(i,s,l-d/2,n+M/2,r-M/2),o>0){const t=Math.min(d/o,(0,a.al)(n-r));e.arc(i,s,o+d/2,r-t/2,n+t/2,!0)}else{const t=Math.min(d/2,l*(0,a.al)(n-r));if("round"===g)e.arc(i,s,t,r-a.P/2,n+a.P/2,!0);else if("bevel"===g){const l=2*t*t,o=-l*Math.cos(r+a.P/2)+i,c=-l*Math.sin(r+a.P/2)+s,d=l*Math.cos(n+a.P/2)+i,g=l*Math.sin(n+a.P/2)+s;e.lineTo(o,c),e.lineTo(d,g)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}(e,t,h),s||(rt(e,t,r,n,h,i),e.stroke())}(e,this,o,i,s),e.restore()}}function nt(e,t,r=t){e.lineCap=(0,a.v)(r.borderCapStyle,t.borderCapStyle),e.setLineDash((0,a.v)(r.borderDash,t.borderDash)),e.lineDashOffset=(0,a.v)(r.borderDashOffset,t.borderDashOffset),e.lineJoin=(0,a.v)(r.borderJoinStyle,t.borderJoinStyle),e.lineWidth=(0,a.v)(r.borderWidth,t.borderWidth),e.strokeStyle=(0,a.v)(r.borderColor,t.borderColor)}function it(e,t,r){e.lineTo(r.x,r.y)}function st(e,t,r={}){const a=e.length,{start:n=0,end:i=a-1}=r,{start:s,end:l}=t,o=Math.max(n,s),c=Math.min(i,l),d=n<s&&i<s||n>l&&i>l;return{count:a,start:o,loop:t.loop,ilen:c<o&&!d?a+c-o:c-o}}function lt(e,t,r,n){const{points:i,options:s}=t,{count:l,start:o,loop:c,ilen:d}=st(i,r,n),g=function(e){return e.stepped?a.at:e.tension||"monotone"===e.cubicInterpolationMode?a.au:it}(s);let M,u,m,{move:N=!0,reverse:h}=n||{};for(M=0;M<=d;++M)u=i[(o+(h?d-M:M))%l],u.skip||(N?(e.moveTo(u.x,u.y),N=!1):g(e,m,u,h,s.stepped),m=u);return c&&(u=i[(o+(h?d:0))%l],g(e,m,u,h,s.stepped)),!!c}function ot(e,t,r,a){const n=t.points,{count:i,start:s,ilen:l}=st(n,r,a),{move:o=!0,reverse:c}=a||{};let d,g,M,u,m,N,h=0,p=0;const k=e=>(s+(c?l-e:e))%i,y=()=>{u!==m&&(e.lineTo(h,m),e.lineTo(h,u),e.lineTo(h,N))};for(o&&(g=n[k(0)],e.moveTo(g.x,g.y)),d=0;d<=l;++d){if(g=n[k(d)],g.skip)continue;const t=g.x,r=g.y,a=0|t;a===M?(r<u?u=r:r>m&&(m=r),h=(p*h+t)/++p):(y(),e.lineTo(t,r),M=a,p=0,u=m=r),N=r}y()}function ct(e){const t=e.options,r=t.borderDash&&t.borderDash.length;return e._decimated||e._loop||t.tension||"monotone"===t.cubicInterpolationMode||t.stepped||r?lt:ot}const dt="function"==typeof Path2D;class gt extends me{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e&&"fill"!==e};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const r=this.options;if((r.tension||"monotone"===r.cubicInterpolationMode)&&!r.stepped&&!this._pointsUpdated){const n=r.spanGaps?this._loop:this._fullLoop;(0,a.an)(this._points,r,e,n,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=(0,a.ao)(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,r=e.length;return r&&t[e[r-1].end]}interpolate(e,t){const r=this.options,n=e[t],i=this.points,s=(0,a.ap)(this,{property:t,start:n,end:n});if(!s.length)return;const l=[],o=function(e){return e.stepped?a.aq:e.tension||"monotone"===e.cubicInterpolationMode?a.ar:a.as}(r);let c,d;for(c=0,d=s.length;c<d;++c){const{start:a,end:d}=s[c],g=i[a],M=i[d];if(g===M){l.push(g);continue}const u=o(g,M,Math.abs((n-g[t])/(M[t]-g[t])),r.stepped);u[t]=e[t],l.push(u)}return 1===l.length?l[0]:l}pathSegment(e,t,r){return ct(this)(e,this,t,r)}path(e,t,r){const a=this.segments,n=ct(this);let i=this._loop;t=t||0,r=r||this.points.length-t;for(const s of a)i&=n(e,this,s,{start:t,end:t+r-1});return!!i}draw(e,t,r,a){const n=this.options||{};(this.points||[]).length&&n.borderWidth&&(e.save(),function(e,t,r,a){dt&&!t.options.segment?function(e,t,r,a){let n=t._path;n||(n=t._path=new Path2D,t.path(n,r,a)&&n.closePath()),nt(e,t.options),e.stroke(n)}(e,t,r,a):function(e,t,r,a){const{segments:n,options:i}=t,s=ct(t);for(const l of n)nt(e,i,l.style),e.beginPath(),s(e,t,l,{start:r,end:r+a-1})&&e.closePath(),e.stroke()}(e,t,r,a)}(e,this,r,a),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Mt(e,t,r,a){const n=e.options,{[r]:i}=e.getProps([r],a);return Math.abs(t-i)<n.radius+n.hitRadius}class ut extends me{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,t,r){const a=this.options,{x:n,y:i}=this.getProps(["x","y"],r);return Math.pow(e-n,2)+Math.pow(t-i,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(e,t){return Mt(this,e,"x",t)}inYRange(e,t){return Mt(this,e,"y",t)}getCenterPoint(e){const{x:t,y:r}=this.getProps(["x","y"],e);return{x:t,y:r}}size(e){let t=(e=e||this.options||{}).radius||0;return t=Math.max(t,t&&e.hoverRadius||0),2*(t+(t&&e.borderWidth||0))}draw(e,t){const r=this.options;this.skip||r.radius<.1||!(0,a.C)(this,t,this.size(r)/2)||(e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.fillStyle=r.backgroundColor,(0,a.av)(e,r,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function mt(e,t){const{x:r,y:a,base:n,width:i,height:s}=e.getProps(["x","y","base","width","height"],t);let l,o,c,d,g;return e.horizontal?(g=s/2,l=Math.min(r,n),o=Math.max(r,n),c=a-g,d=a+g):(g=i/2,l=r-g,o=r+g,c=Math.min(a,n),d=Math.max(a,n)),{left:l,top:c,right:o,bottom:d}}function Nt(e,t,r,n){return e?0:(0,a.S)(t,r,n)}function ht(e,t,r,n){const i=null===t,s=null===r,l=e&&!(i&&s)&&mt(e,n);return l&&(i||(0,a.ak)(t,l.left,l.right))&&(s||(0,a.ak)(r,l.top,l.bottom))}function pt(e,t){e.rect(t.x,t.y,t.w,t.h)}function kt(e,t,r={}){const a=e.x!==r.x?-t:0,n=e.y!==r.y?-t:0,i=(e.x+e.w!==r.x+r.w?t:0)-a,s=(e.y+e.h!==r.y+r.h?t:0)-n;return{x:e.x+a,y:e.y+n,w:e.w+i,h:e.h+s,radius:e.radius}}class yt extends me{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:t,options:{borderColor:r,backgroundColor:n}}=this,{inner:i,outer:s}=function(e){const t=mt(e),r=t.right-t.left,n=t.bottom-t.top,i=function(e,t,r){const n=e.options.borderWidth,i=e.borderSkipped,s=(0,a.ax)(n);return{t:Nt(i.top,s.top,0,r),r:Nt(i.right,s.right,0,t),b:Nt(i.bottom,s.bottom,0,r),l:Nt(i.left,s.left,0,t)}}(e,r/2,n/2),s=function(e,t,r){const{enableBorderRadius:n}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,s=(0,a.ay)(i),l=Math.min(t,r),o=e.borderSkipped,c=n||(0,a.i)(i);return{topLeft:Nt(!c||o.top||o.left,s.topLeft,0,l),topRight:Nt(!c||o.top||o.right,s.topRight,0,l),bottomLeft:Nt(!c||o.bottom||o.left,s.bottomLeft,0,l),bottomRight:Nt(!c||o.bottom||o.right,s.bottomRight,0,l)}}(e,r/2,n/2);return{outer:{x:t.left,y:t.top,w:r,h:n,radius:s},inner:{x:t.left+i.l,y:t.top+i.t,w:r-i.l-i.r,h:n-i.t-i.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,s.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(i.b,i.r))}}}}(this),l=(o=s.radius).topLeft||o.topRight||o.bottomLeft||o.bottomRight?a.aw:pt;var o;e.save(),s.w===i.w&&s.h===i.h||(e.beginPath(),l(e,kt(s,t,i)),e.clip(),l(e,kt(i,-t,s)),e.fillStyle=r,e.fill("evenodd")),e.beginPath(),l(e,kt(i,t)),e.fillStyle=n,e.fill(),e.restore()}inRange(e,t,r){return ht(this,e,t,r)}inXRange(e,t){return ht(this,e,null,t)}inYRange(e,t){return ht(this,null,e,t)}getCenterPoint(e){const{x:t,y:r,base:a,horizontal:n}=this.getProps(["x","y","base","horizontal"],e);return{x:n?(t+a)/2:t,y:n?r:(r+a)/2}}getRange(e){return"x"===e?this.width/2:this.height/2}}function xt(e,t,r,n){if(n)return;let i=t[e],s=r[e];return"angle"===e&&(i=(0,a.al)(i),s=(0,a.al)(s)),{property:e,start:i,end:s}}function Dt(e,t,r){for(;t>e;t--){const e=r[t];if(!isNaN(e.x)&&!isNaN(e.y))break}return t}function jt(e,t,r,a){return e&&t?a(e[r],t[r]):e?e[r]:t?t[r]:0}function It(e,t){let r=[],n=!1;return(0,a.b)(e)?(n=!0,r=e):r=function(e,t){const{x:r=null,y:a=null}=e||{},n=t.points,i=[];return t.segments.forEach(({start:e,end:t})=>{t=Dt(e,t,n);const s=n[e],l=n[t];null!==a?(i.push({x:s.x,y:a}),i.push({x:l.x,y:a})):null!==r&&(i.push({x:r,y:s.y}),i.push({x:r,y:l.y}))}),i}(e,t),r.length?new gt({points:r,options:{tension:0},_loop:n,_fullLoop:n}):null}function Et(e){return e&&!1!==e.fill}function zt(e,t,r){let n=e[t].fill;const i=[t];let s;if(!r)return n;for(;!1!==n&&-1===i.indexOf(n);){if(!(0,a.g)(n))return n;if(s=e[n],!s)return!1;if(s.visible)return n;i.push(n),n=s.fill}return!1}function Tt(e,t,r){const n=function(e){const t=e.options,r=t.fill;let n=(0,a.v)(r&&r.target,r);return void 0===n&&(n=!!t.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(e);if((0,a.i)(n))return!isNaN(n.value)&&n;let i=parseFloat(n);return(0,a.g)(i)&&Math.floor(i)===i?function(e,t,r,a){return"-"!==e&&"+"!==e||(r=t+r),!(r===t||r<0||r>=a)&&r}(n[0],t,i,r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function ft(e,t,r){const a=[];for(let n=0;n<r.length;n++){const i=r[n],{first:s,last:l,point:o}=_t(i,t,"x");if(!(!o||s&&l))if(s)a.unshift(o);else if(e.push(o),!l)break}e.push(...a)}function _t(e,t,r){const n=e.interpolate(t,r);if(!n)return{};const i=n[r],s=e.segments,l=e.points;let o=!1,c=!1;for(let e=0;e<s.length;e++){const t=s[e],n=l[t.start][r],d=l[t.end][r];if((0,a.ak)(i,n,d)){o=i===n,c=i===d;break}}return{first:o,last:c,point:n}}class At{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,r){const{x:n,y:i,radius:s}=this;return t=t||{start:0,end:a.T},e.arc(n,i,s,t.end,t.start,!0),!r.bounds}interpolate(e){const{x:t,y:r,radius:a}=this,n=e.angle;return{x:t+Math.cos(n)*a,y:r+Math.sin(n)*a,angle:n}}}function wt(e,t,r){const n=function(e){const{chart:t,fill:r,line:n}=e;if((0,a.g)(r))return function(e,t){const r=e.getDatasetMeta(t);return r&&e.isDatasetVisible(t)?r.dataset:null}(t,r);if("stack"===r)return function(e){const{scale:t,index:r,line:a}=e,n=[],i=a.segments,s=a.points,l=function(e,t){const r=[],a=e.getMatchingVisibleMetas("line");for(let e=0;e<a.length;e++){const n=a[e];if(n.index===t)break;n.hidden||r.unshift(n.dataset)}return r}(t,r);l.push(It({x:null,y:t.bottom},a));for(let e=0;e<i.length;e++){const t=i[e];for(let e=t.start;e<=t.end;e++)ft(n,s[e],l)}return new gt({points:n,options:{}})}(e);if("shape"===r)return!0;const i=function(e){return(e.scale||{}).getPointPositionForValue?function(e){const{scale:t,fill:r}=e,n=t.options,i=t.getLabels().length,s=n.reverse?t.max:t.min,l=function(e,t,r){let n;return n="start"===e?r:"end"===e?t.options.reverse?t.min:t.max:(0,a.i)(e)?e.value:t.getBaseValue(),n}(r,t,s),o=[];if(n.grid.circular){const e=t.getPointPositionForValue(0,s);return new At({x:e.x,y:e.y,radius:t.getDistanceFromCenterForValue(l)})}for(let e=0;e<i;++e)o.push(t.getPointPositionForValue(e,l));return o}(e):function(e){const{scale:t={},fill:r}=e,n=function(e,t){let r=null;return"start"===e?r=t.bottom:"end"===e?r=t.top:(0,a.i)(e)?r=t.getPixelForValue(e.value):t.getBasePixel&&(r=t.getBasePixel()),r}(r,t);if((0,a.g)(n)){const e=t.isHorizontal();return{x:e?n:null,y:e?null:n}}return null}(e)}(e);return i instanceof At?i:It(i,n)}(t),{chart:i,index:s,line:l,scale:o,axis:c}=t,d=l.options,g=d.fill,M=d.backgroundColor,{above:u=M,below:m=M}=g||{},N=i.getDatasetMeta(s),h=(0,a.ah)(i,N);n&&l.points.length&&((0,a.Y)(e,r),function(e,t){const{line:r,target:a,above:n,below:i,area:s,scale:l,clip:o}=t,c=r._loop?"angle":t.axis;e.save();let d=i;i!==n&&("x"===c?(bt(e,a,s.top),vt(e,{line:r,target:a,color:n,scale:l,property:c,clip:o}),e.restore(),e.save(),bt(e,a,s.bottom)):"y"===c&&(Ot(e,a,s.left),vt(e,{line:r,target:a,color:i,scale:l,property:c,clip:o}),e.restore(),e.save(),Ot(e,a,s.right),d=n)),vt(e,{line:r,target:a,color:d,scale:l,property:c,clip:o}),e.restore()}(e,{line:l,target:n,above:u,below:m,area:r,scale:o,axis:c,clip:h}),(0,a.$)(e))}function bt(e,t,r){const{segments:a,points:n}=t;let i=!0,s=!1;e.beginPath();for(const l of a){const{start:a,end:o}=l,c=n[a],d=n[Dt(a,o,n)];i?(e.moveTo(c.x,c.y),i=!1):(e.lineTo(c.x,r),e.lineTo(c.x,c.y)),s=!!t.pathSegment(e,l,{move:s}),s?e.closePath():e.lineTo(d.x,r)}e.lineTo(t.first().x,r),e.closePath(),e.clip()}function Ot(e,t,r){const{segments:a,points:n}=t;let i=!0,s=!1;e.beginPath();for(const l of a){const{start:a,end:o}=l,c=n[a],d=n[Dt(a,o,n)];i?(e.moveTo(c.x,c.y),i=!1):(e.lineTo(r,c.y),e.lineTo(c.x,c.y)),s=!!t.pathSegment(e,l,{move:s}),s?e.closePath():e.lineTo(r,d.y)}e.lineTo(r,t.first().y),e.closePath(),e.clip()}function vt(e,t){const{line:r,target:n,property:i,color:s,scale:l,clip:o}=t,c=function(e,t,r){const n=e.segments,i=e.points,s=t.points,l=[];for(const e of n){let{start:n,end:o}=e;o=Dt(n,o,i);const c=xt(r,i[n],i[o],e.loop);if(!t.segments){l.push({source:e,target:c,start:i[n],end:i[o]});continue}const d=(0,a.ap)(t,c);for(const t of d){const n=xt(r,s[t.start],s[t.end],t.loop),o=(0,a.az)(e,i,n);for(const e of o)l.push({source:e,target:t,start:{[r]:jt(c,n,"start",Math.max)},end:{[r]:jt(c,n,"end",Math.min)}})}}return l}(r,n,i);for(const{source:t,target:a,start:d,end:g}of c){const{style:{backgroundColor:c=s}={}}=t,M=!0!==n;e.save(),e.fillStyle=c,Lt(e,l,o,M&&xt(i,d,g)),e.beginPath();const u=!!r.pathSegment(e,t);let m;if(M){u?e.closePath():St(e,n,g,i);const t=!!n.pathSegment(e,a,{move:u,reverse:!0});m=u&&t,m||St(e,n,d,i)}e.closePath(),e.fill(m?"evenodd":"nonzero"),e.restore()}}function Lt(e,t,r,a){const n=t.chart.chartArea,{property:i,start:s,end:l}=a||{};if("x"===i||"y"===i){let t,a,o,c;"x"===i?(t=s,a=n.top,o=l,c=n.bottom):(t=n.left,a=s,o=n.right,c=l),e.beginPath(),r&&(t=Math.max(t,r.left),o=Math.min(o,r.right),a=Math.max(a,r.top),c=Math.min(c,r.bottom)),e.rect(t,a,o-t,c-a),e.clip()}}function St(e,t,r,a){const n=t.interpolate(r,a);n&&e.lineTo(n.x,n.y)}var Ct={id:"filler",afterDatasetsUpdate(e,t,r){const a=(e.data.datasets||[]).length,n=[];let i,s,l,o;for(s=0;s<a;++s)i=e.getDatasetMeta(s),l=i.dataset,o=null,l&&l.options&&l instanceof gt&&(o={visible:e.isDatasetVisible(s),index:s,fill:Tt(l,s,a),chart:e,axis:i.controller.options.indexAxis,scale:i.vScale,line:l}),i.$filler=o,n.push(o);for(s=0;s<a;++s)o=n[s],o&&!1!==o.fill&&(o.fill=zt(n,s,r.propagate))},beforeDraw(e,t,r){const a="beforeDraw"===r.drawTime,n=e.getSortedVisibleDatasetMetas(),i=e.chartArea;for(let t=n.length-1;t>=0;--t){const r=n[t].$filler;r&&(r.line.updateControlPoints(i,r.axis),a&&r.fill&&wt(e.ctx,r,i))}},beforeDatasetsDraw(e,t,r){if("beforeDatasetsDraw"!==r.drawTime)return;const a=e.getSortedVisibleDatasetMetas();for(let t=a.length-1;t>=0;--t){const r=a[t].$filler;Et(r)&&wt(e.ctx,r,e.chartArea)}},beforeDatasetDraw(e,t,r){const a=t.meta.$filler;Et(a)&&"beforeDatasetDraw"===r.drawTime&&wt(e.ctx,a,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Qt=(e,t)=>{let{boxHeight:r=t,boxWidth:a=t}=e;return e.usePointStyle&&(r=Math.min(r,t),a=e.pointStyleWidth||Math.min(a,t)),{boxWidth:a,boxHeight:r,itemHeight:Math.max(t,r)}};class Ut extends me{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t,r){this.maxWidth=e,this.maxHeight=t,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let t=(0,a.Q)(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(t=>e.filter(t,this.chart.data))),e.sort&&(t=t.sort((t,r)=>e.sort(t,r,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:e,ctx:t}=this;if(!e.display)return void(this.width=this.height=0);const r=e.labels,n=(0,a.a0)(r.font),i=n.size,s=this._computeTitleHeight(),{boxWidth:l,itemHeight:o}=Qt(r,i);let c,d;t.font=n.string,this.isHorizontal()?(c=this.maxWidth,d=this._fitRows(s,i,l,o)+10):(d=this.maxHeight,c=this._fitCols(s,n,l,o)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(d,e.maxHeight||this.maxHeight)}_fitRows(e,t,r,a){const{ctx:n,maxWidth:i,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],o=this.lineWidths=[0],c=a+s;let d=e;n.textAlign="left",n.textBaseline="middle";let g=-1,M=-c;return this.legendItems.forEach((e,u)=>{const m=r+t/2+n.measureText(e.text).width;(0===u||o[o.length-1]+m+2*s>i)&&(d+=c,o[o.length-(u>0?0:1)]=0,M+=c,g++),l[u]={left:0,top:M,row:g,width:m,height:a},o[o.length-1]+=m+s}),d}_fitCols(e,t,r,a){const{ctx:n,maxHeight:i,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],o=this.columnSizes=[],c=i-e;let d=s,g=0,M=0,u=0,m=0;return this.legendItems.forEach((e,i)=>{const{itemWidth:N,itemHeight:h}=function(e,t,r,a,n){const i=function(e,t,r,a){let n=e.text;return n&&"string"!=typeof n&&(n=n.reduce((e,t)=>e.length>t.length?e:t)),t+r.size/2+a.measureText(n).width}(a,e,t,r),s=function(e,t,r){let a=e;return"string"!=typeof t.text&&(a=Yt(t,r)),a}(n,a,t.lineHeight);return{itemWidth:i,itemHeight:s}}(r,t,n,e,a);i>0&&M+h+2*s>c&&(d+=g+s,o.push({width:g,height:M}),u+=g+s,m++,g=M=0),l[i]={left:u,top:M,col:m,width:N,height:h},g=Math.max(g,N),M+=h+s}),d+=g,o.push({width:g,height:M}),d}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:r,labels:{padding:n},rtl:i}}=this,s=(0,a.aA)(i,this.left,this.width);if(this.isHorizontal()){let i=0,l=(0,a.a2)(r,this.left+n,this.right-this.lineWidths[i]);for(const o of t)i!==o.row&&(i=o.row,l=(0,a.a2)(r,this.left+n,this.right-this.lineWidths[i])),o.top+=this.top+e+n,o.left=s.leftForLtr(s.x(l),o.width),l+=o.width+n}else{let i=0,l=(0,a.a2)(r,this.top+e+n,this.bottom-this.columnSizes[i].height);for(const o of t)o.col!==i&&(i=o.col,l=(0,a.a2)(r,this.top+e+n,this.bottom-this.columnSizes[i].height)),o.top=l,o.left+=this.left+n,o.left=s.leftForLtr(s.x(o.left),o.width),l+=o.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const e=this.ctx;(0,a.Y)(e,this),this._draw(),(0,a.$)(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:r,ctx:n}=this,{align:i,labels:s}=e,l=a.d.color,o=(0,a.aA)(e.rtl,this.left,this.width),c=(0,a.a0)(s.font),{padding:d}=s,g=c.size,M=g/2;let u;this.drawTitle(),n.textAlign=o.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:m,boxHeight:N,itemHeight:h}=Qt(s,g),p=this.isHorizontal(),k=this._computeTitleHeight();u=p?{x:(0,a.a2)(i,this.left+d,this.right-r[0]),y:this.top+d+k,line:0}:{x:this.left+d,y:(0,a.a2)(i,this.top+k+d,this.bottom-t[0].height),line:0},(0,a.aB)(this.ctx,e.textDirection);const y=h+d;this.legendItems.forEach((x,D)=>{n.strokeStyle=x.fontColor,n.fillStyle=x.fontColor;const j=n.measureText(x.text).width,I=o.textAlign(x.textAlign||(x.textAlign=s.textAlign)),E=m+M+j;let z=u.x,T=u.y;if(o.setWidth(this.width),p?D>0&&z+E+d>this.right&&(T=u.y+=y,u.line++,z=u.x=(0,a.a2)(i,this.left+d,this.right-r[u.line])):D>0&&T+y>this.bottom&&(z=u.x=z+t[u.line].width+d,u.line++,T=u.y=(0,a.a2)(i,this.top+k+d,this.bottom-t[u.line].height)),function(e,t,r){if(isNaN(m)||m<=0||isNaN(N)||N<0)return;n.save();const i=(0,a.v)(r.lineWidth,1);if(n.fillStyle=(0,a.v)(r.fillStyle,l),n.lineCap=(0,a.v)(r.lineCap,"butt"),n.lineDashOffset=(0,a.v)(r.lineDashOffset,0),n.lineJoin=(0,a.v)(r.lineJoin,"miter"),n.lineWidth=i,n.strokeStyle=(0,a.v)(r.strokeStyle,l),n.setLineDash((0,a.v)(r.lineDash,[])),s.usePointStyle){const l={radius:N*Math.SQRT2/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:i},c=o.xPlus(e,m/2),d=t+M;(0,a.aE)(n,l,c,d,s.pointStyleWidth&&m)}else{const s=t+Math.max((g-N)/2,0),l=o.leftForLtr(e,m),c=(0,a.ay)(r.borderRadius);n.beginPath(),Object.values(c).some(e=>0!==e)?(0,a.aw)(n,{x:l,y:s,w:m,h:N,radius:c}):n.rect(l,s,m,N),n.fill(),0!==i&&n.stroke()}n.restore()}(o.x(z),T,x),z=(0,a.aC)(I,z+m+M,p?z+E:this.right,e.rtl),function(e,t,r){(0,a.Z)(n,r.text,e,t+h/2,c,{strikethrough:r.hidden,textAlign:o.textAlign(r.textAlign)})}(o.x(z),T,x),p)u.x+=E+d;else if("string"!=typeof x.text){const e=c.lineHeight;u.y+=Yt(x,e)+d}else u.y+=y}),(0,a.aD)(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,r=(0,a.a0)(t.font),n=(0,a.E)(t.padding);if(!t.display)return;const i=(0,a.aA)(e.rtl,this.left,this.width),s=this.ctx,l=t.position,o=r.size/2,c=n.top+o;let d,g=this.left,M=this.width;if(this.isHorizontal())M=Math.max(...this.lineWidths),d=this.top+c,g=(0,a.a2)(e.align,g,this.right-M);else{const t=this.columnSizes.reduce((e,t)=>Math.max(e,t.height),0);d=c+(0,a.a2)(e.align,this.top,this.bottom-t-e.labels.padding-this._computeTitleHeight())}const u=(0,a.a2)(l,g,g+M);s.textAlign=i.textAlign((0,a.a1)(l)),s.textBaseline="middle",s.strokeStyle=t.color,s.fillStyle=t.color,s.font=r.string,(0,a.Z)(s,t.text,u,d,r)}_computeTitleHeight(){const e=this.options.title,t=(0,a.a0)(e.font),r=(0,a.E)(e.padding);return e.display?t.lineHeight+r.height:0}_getLegendItemAt(e,t){let r,n,i;if((0,a.ak)(e,this.left,this.right)&&(0,a.ak)(t,this.top,this.bottom))for(i=this.legendHitBoxes,r=0;r<i.length;++r)if(n=i[r],(0,a.ak)(e,n.left,n.left+n.width)&&(0,a.ak)(t,n.top,n.top+n.height))return this.legendItems[r];return null}handleEvent(e){const t=this.options;if(!function(e,t){return!("mousemove"!==e&&"mouseout"!==e||!t.onHover&&!t.onLeave)||!(!t.onClick||"click"!==e&&"mouseup"!==e)}(e.type,t))return;const r=this._getLegendItemAt(e.x,e.y);if("mousemove"===e.type||"mouseout"===e.type){const s=this._hoveredItem,l=(i=r,null!==(n=s)&&null!==i&&n.datasetIndex===i.datasetIndex&&n.index===i.index);s&&!l&&(0,a.Q)(t.onLeave,[e,s,this],this),this._hoveredItem=r,r&&!l&&(0,a.Q)(t.onHover,[e,r,this],this)}else r&&(0,a.Q)(t.onClick,[e,r,this],this);var n,i}}function Yt(e,t){return t*(e.text?e.text.length:0)}var Pt={id:"legend",_element:Ut,start(e,t,r){const a=e.legend=new Ut({ctx:e.ctx,options:r,chart:e});X.configure(e,a,r),X.addBox(e,a)},stop(e){X.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,r){const a=e.legend;X.configure(e,a,r),a.options=r},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,r){const a=t.datasetIndex,n=r.chart;n.isDatasetVisible(a)?(n.hide(a),t.hidden=!0):(n.show(a),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:r,pointStyle:n,textAlign:i,color:s,useBorderRadius:l,borderRadius:o}}=e.legend.options;return e._getSortedDatasetMetas().map(e=>{const c=e.controller.getStyle(r?0:void 0),d=(0,a.E)(c.borderWidth);return{text:t[e.index].label,fillStyle:c.backgroundColor,fontColor:s,hidden:!e.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:l&&(o||c.borderRadius),datasetIndex:e.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Rt extends me{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,t){const r=this.options;if(this.left=0,this.top=0,!r.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=e,this.height=this.bottom=t;const n=(0,a.b)(r.text)?r.text.length:1;this._padding=(0,a.E)(r.padding);const i=n*(0,a.a0)(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){const e=this.options.position;return"top"===e||"bottom"===e}_drawArgs(e){const{top:t,left:r,bottom:n,right:i,options:s}=this,l=s.align;let o,c,d,g=0;return this.isHorizontal()?(c=(0,a.a2)(l,r,i),d=t+e,o=i-r):("left"===s.position?(c=r+e,d=(0,a.a2)(l,n,t),g=-.5*a.P):(c=i-e,d=(0,a.a2)(l,t,n),g=.5*a.P),o=n-t),{titleX:c,titleY:d,maxWidth:o,rotation:g}}draw(){const e=this.ctx,t=this.options;if(!t.display)return;const r=(0,a.a0)(t.font),n=r.lineHeight/2+this._padding.top,{titleX:i,titleY:s,maxWidth:l,rotation:o}=this._drawArgs(n);(0,a.Z)(e,t.text,0,0,r,{color:t.color,maxWidth:l,rotation:o,textAlign:(0,a.a1)(t.align),textBaseline:"middle",translation:[i,s]})}}var Zt={id:"title",_element:Rt,start(e,t,r){!function(e,t){const r=new Rt({ctx:e.ctx,options:t,chart:e});X.configure(e,r,t),X.addBox(e,r),e.titleBlock=r}(e,r)},stop(e){const t=e.titleBlock;X.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,r){const a=e.titleBlock;X.configure(e,a,r),a.options=r},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};new WeakMap;const Vt={average(e){if(!e.length)return!1;let t,r,a=new Set,n=0,i=0;for(t=0,r=e.length;t<r;++t){const r=e[t].element;if(r&&r.hasValue()){const e=r.tooltipPosition();a.add(e.x),n+=e.y,++i}}return 0!==i&&0!==a.size&&{x:[...a].reduce((e,t)=>e+t)/a.size,y:n/i}},nearest(e,t){if(!e.length)return!1;let r,n,i,s=t.x,l=t.y,o=Number.POSITIVE_INFINITY;for(r=0,n=e.length;r<n;++r){const n=e[r].element;if(n&&n.hasValue()){const e=n.getCenterPoint(),r=(0,a.aF)(t,e);r<o&&(o=r,i=n)}}if(i){const e=i.tooltipPosition();s=e.x,l=e.y}return{x:s,y:l}}};function Bt(e,t){return t&&((0,a.b)(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Gt(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function Wt(e,t){const{element:r,datasetIndex:a,index:n}=t,i=e.getDatasetMeta(a).controller,{label:s,value:l}=i.getLabelAndValue(n);return{chart:e,label:s,parsed:i.getParsed(n),raw:e.data.datasets[a].data[n],formattedValue:l,dataset:i.getDataset(),dataIndex:n,datasetIndex:a,element:r}}function Ht(e,t){const r=e.chart.ctx,{body:n,footer:i,title:s}=e,{boxWidth:l,boxHeight:o}=t,c=(0,a.a0)(t.bodyFont),d=(0,a.a0)(t.titleFont),g=(0,a.a0)(t.footerFont),M=s.length,u=i.length,m=n.length,N=(0,a.E)(t.padding);let h=N.height,p=0,k=n.reduce((e,t)=>e+t.before.length+t.lines.length+t.after.length,0);k+=e.beforeBody.length+e.afterBody.length,M&&(h+=M*d.lineHeight+(M-1)*t.titleSpacing+t.titleMarginBottom),k&&(h+=m*(t.displayColors?Math.max(o,c.lineHeight):c.lineHeight)+(k-m)*c.lineHeight+(k-1)*t.bodySpacing),u&&(h+=t.footerMarginTop+u*g.lineHeight+(u-1)*t.footerSpacing);let y=0;const x=function(e){p=Math.max(p,r.measureText(e).width+y)};return r.save(),r.font=d.string,(0,a.F)(e.title,x),r.font=c.string,(0,a.F)(e.beforeBody.concat(e.afterBody),x),y=t.displayColors?l+2+t.boxPadding:0,(0,a.F)(n,e=>{(0,a.F)(e.before,x),(0,a.F)(e.lines,x),(0,a.F)(e.after,x)}),y=0,r.font=g.string,(0,a.F)(e.footer,x),r.restore(),p+=N.width,{width:p,height:h}}function Ft(e,t,r,a){const{x:n,width:i}=r,{width:s,chartArea:{left:l,right:o}}=e;let c="center";return"center"===a?c=n<=(l+o)/2?"left":"right":n<=i/2?c="left":n>=s-i/2&&(c="right"),function(e,t,r,a){const{x:n,width:i}=a,s=r.caretSize+r.caretPadding;return"left"===e&&n+i+s>t.width||"right"===e&&n-i-s<0||void 0}(c,e,t,r)&&(c="center"),c}function Jt(e,t,r){const a=r.yAlign||t.yAlign||function(e,t){const{y:r,height:a}=t;return r<a/2?"top":r>e.height-a/2?"bottom":"center"}(e,r);return{xAlign:r.xAlign||t.xAlign||Ft(e,t,r,a),yAlign:a}}function Xt(e,t,r,n){const{caretSize:i,caretPadding:s,cornerRadius:l}=e,{xAlign:o,yAlign:c}=r,d=i+s,{topLeft:g,topRight:M,bottomLeft:u,bottomRight:m}=(0,a.ay)(l);let N=function(e,t){let{x:r,width:a}=e;return"right"===t?r-=a:"center"===t&&(r-=a/2),r}(t,o);const h=function(e,t,r){let{y:a,height:n}=e;return"top"===t?a+=r:a-="bottom"===t?n+r:n/2,a}(t,c,d);return"center"===c?"left"===o?N+=d:"right"===o&&(N-=d):"left"===o?N-=Math.max(g,u)+i:"right"===o&&(N+=Math.max(M,m)+i),{x:(0,a.S)(N,0,n.width-t.width),y:(0,a.S)(h,0,n.height-t.height)}}function $t(e,t,r){const n=(0,a.E)(r.padding);return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-n.right:e.x+n.left}function Kt(e){return Bt([],Gt(e))}function qt(e,t){const r=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return r?e.override(r):e}const er={beforeTitle:a.aG,title(e){if(e.length>0){const t=e[0],r=t.chart.data.labels,a=r?r.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(a>0&&t.dataIndex<a)return r[t.dataIndex]}return""},afterTitle:a.aG,beforeBody:a.aG,beforeLabel:a.aG,label(e){if(this&&this.options&&"dataset"===this.options.mode)return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const r=e.formattedValue;return(0,a.k)(r)||(t+=r),t},labelColor(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:a.aG,afterBody:a.aG,beforeFooter:a.aG,footer:a.aG,afterFooter:a.aG};function tr(e,t,r,a){const n=e[t].call(r,a);return void 0===n?er[t].call(r,a):n}class rr extends me{static positioners=Vt;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,r=this.options.setContext(this.getContext()),a=r.enabled&&t.options.animation&&r.animations,n=new c(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=(e=this.chart.getContext(),t=this._tooltipItems,(0,a.j)(e,{tooltip:this,tooltipItems:t,type:"tooltip"})));var e,t}getTitle(e,t){const{callbacks:r}=t,a=tr(r,"beforeTitle",this,e),n=tr(r,"title",this,e),i=tr(r,"afterTitle",this,e);let s=[];return s=Bt(s,Gt(a)),s=Bt(s,Gt(n)),s=Bt(s,Gt(i)),s}getBeforeBody(e,t){return Kt(tr(t.callbacks,"beforeBody",this,e))}getBody(e,t){const{callbacks:r}=t,n=[];return(0,a.F)(e,e=>{const t={before:[],lines:[],after:[]},a=qt(r,e);Bt(t.before,Gt(tr(a,"beforeLabel",this,e))),Bt(t.lines,tr(a,"label",this,e)),Bt(t.after,Gt(tr(a,"afterLabel",this,e))),n.push(t)}),n}getAfterBody(e,t){return Kt(tr(t.callbacks,"afterBody",this,e))}getFooter(e,t){const{callbacks:r}=t,a=tr(r,"beforeFooter",this,e),n=tr(r,"footer",this,e),i=tr(r,"afterFooter",this,e);let s=[];return s=Bt(s,Gt(a)),s=Bt(s,Gt(n)),s=Bt(s,Gt(i)),s}_createItems(e){const t=this._active,r=this.chart.data,n=[],i=[],s=[];let l,o,c=[];for(l=0,o=t.length;l<o;++l)c.push(Wt(this.chart,t[l]));return e.filter&&(c=c.filter((t,a,n)=>e.filter(t,a,n,r))),e.itemSort&&(c=c.sort((t,a)=>e.itemSort(t,a,r))),(0,a.F)(c,t=>{const r=qt(e.callbacks,t);n.push(tr(r,"labelColor",this,t)),i.push(tr(r,"labelPointStyle",this,t)),s.push(tr(r,"labelTextColor",this,t))}),this.labelColors=n,this.labelPointStyles=i,this.labelTextColors=s,this.dataPoints=c,c}update(e,t){const r=this.options.setContext(this.getContext()),a=this._active;let n,i=[];if(a.length){const e=Vt[r.position].call(this,a,this._eventPosition);i=this._createItems(r),this.title=this.getTitle(i,r),this.beforeBody=this.getBeforeBody(i,r),this.body=this.getBody(i,r),this.afterBody=this.getAfterBody(i,r),this.footer=this.getFooter(i,r);const t=this._size=Ht(this,r),s=Object.assign({},e,t),l=Jt(this.chart,r,s),o=Xt(r,s,l,this.chart);this.xAlign=l.xAlign,this.yAlign=l.yAlign,n={opacity:1,x:o.x,y:o.y,width:t.width,height:t.height,caretX:e.x,caretY:e.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=i,this.$context=void 0,n&&this._resolveAnimations().update(this,n),e&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,r,a){const n=this.getCaretPosition(e,r,a);t.lineTo(n.x1,n.y1),t.lineTo(n.x2,n.y2),t.lineTo(n.x3,n.y3)}getCaretPosition(e,t,r){const{xAlign:n,yAlign:i}=this,{caretSize:s,cornerRadius:l}=r,{topLeft:o,topRight:c,bottomLeft:d,bottomRight:g}=(0,a.ay)(l),{x:M,y:u}=e,{width:m,height:N}=t;let h,p,k,y,x,D;return"center"===i?(x=u+N/2,"left"===n?(h=M,p=h-s,y=x+s,D=x-s):(h=M+m,p=h+s,y=x-s,D=x+s),k=h):(p="left"===n?M+Math.max(o,d)+s:"right"===n?M+m-Math.max(c,g)-s:this.caretX,"top"===i?(y=u,x=y-s,h=p-s,k=p+s):(y=u+N,x=y+s,h=p+s,k=p-s),D=y),{x1:h,x2:p,x3:k,y1:y,y2:x,y3:D}}drawTitle(e,t,r){const n=this.title,i=n.length;let s,l,o;if(i){const c=(0,a.aA)(r.rtl,this.x,this.width);for(e.x=$t(this,r.titleAlign,r),t.textAlign=c.textAlign(r.titleAlign),t.textBaseline="middle",s=(0,a.a0)(r.titleFont),l=r.titleSpacing,t.fillStyle=r.titleColor,t.font=s.string,o=0;o<i;++o)t.fillText(n[o],c.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+l,o+1===i&&(e.y+=r.titleMarginBottom-l)}}_drawColorBox(e,t,r,n,i){const s=this.labelColors[r],l=this.labelPointStyles[r],{boxHeight:o,boxWidth:c}=i,d=(0,a.a0)(i.bodyFont),g=$t(this,"left",i),M=n.x(g),u=o<d.lineHeight?(d.lineHeight-o)/2:0,m=t.y+u;if(i.usePointStyle){const t={radius:Math.min(c,o)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},r=n.leftForLtr(M,c)+c/2,d=m+o/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,(0,a.av)(e,t,r,d),e.strokeStyle=s.borderColor,e.fillStyle=s.backgroundColor,(0,a.av)(e,t,r,d)}else{e.lineWidth=(0,a.i)(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,e.strokeStyle=s.borderColor,e.setLineDash(s.borderDash||[]),e.lineDashOffset=s.borderDashOffset||0;const t=n.leftForLtr(M,c),r=n.leftForLtr(n.xPlus(M,1),c-2),l=(0,a.ay)(s.borderRadius);Object.values(l).some(e=>0!==e)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,(0,a.aw)(e,{x:t,y:m,w:c,h:o,radius:l}),e.fill(),e.stroke(),e.fillStyle=s.backgroundColor,e.beginPath(),(0,a.aw)(e,{x:r,y:m+1,w:c-2,h:o-2,radius:l}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(t,m,c,o),e.strokeRect(t,m,c,o),e.fillStyle=s.backgroundColor,e.fillRect(r,m+1,c-2,o-2))}e.fillStyle=this.labelTextColors[r]}drawBody(e,t,r){const{body:n}=this,{bodySpacing:i,bodyAlign:s,displayColors:l,boxHeight:o,boxWidth:c,boxPadding:d}=r,g=(0,a.a0)(r.bodyFont);let M=g.lineHeight,u=0;const m=(0,a.aA)(r.rtl,this.x,this.width),N=function(r){t.fillText(r,m.x(e.x+u),e.y+M/2),e.y+=M+i},h=m.textAlign(s);let p,k,y,x,D,j,I;for(t.textAlign=s,t.textBaseline="middle",t.font=g.string,e.x=$t(this,h,r),t.fillStyle=r.bodyColor,(0,a.F)(this.beforeBody,N),u=l&&"right"!==h?"center"===s?c/2+d:c+2+d:0,x=0,j=n.length;x<j;++x){for(p=n[x],k=this.labelTextColors[x],t.fillStyle=k,(0,a.F)(p.before,N),y=p.lines,l&&y.length&&(this._drawColorBox(t,e,x,m,r),M=Math.max(g.lineHeight,o)),D=0,I=y.length;D<I;++D)N(y[D]),M=g.lineHeight;(0,a.F)(p.after,N)}u=0,M=g.lineHeight,(0,a.F)(this.afterBody,N),e.y-=i}drawFooter(e,t,r){const n=this.footer,i=n.length;let s,l;if(i){const o=(0,a.aA)(r.rtl,this.x,this.width);for(e.x=$t(this,r.footerAlign,r),e.y+=r.footerMarginTop,t.textAlign=o.textAlign(r.footerAlign),t.textBaseline="middle",s=(0,a.a0)(r.footerFont),t.fillStyle=r.footerColor,t.font=s.string,l=0;l<i;++l)t.fillText(n[l],o.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+r.footerSpacing}}drawBackground(e,t,r,n){const{xAlign:i,yAlign:s}=this,{x:l,y:o}=e,{width:c,height:d}=r,{topLeft:g,topRight:M,bottomLeft:u,bottomRight:m}=(0,a.ay)(n.cornerRadius);t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.beginPath(),t.moveTo(l+g,o),"top"===s&&this.drawCaret(e,t,r,n),t.lineTo(l+c-M,o),t.quadraticCurveTo(l+c,o,l+c,o+M),"center"===s&&"right"===i&&this.drawCaret(e,t,r,n),t.lineTo(l+c,o+d-m),t.quadraticCurveTo(l+c,o+d,l+c-m,o+d),"bottom"===s&&this.drawCaret(e,t,r,n),t.lineTo(l+u,o+d),t.quadraticCurveTo(l,o+d,l,o+d-u),"center"===s&&"left"===i&&this.drawCaret(e,t,r,n),t.lineTo(l,o+g),t.quadraticCurveTo(l,o,l+g,o),t.closePath(),t.fill(),n.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,r=this.$animations,a=r&&r.x,n=r&&r.y;if(a||n){const r=Vt[e.position].call(this,this._active,this._eventPosition);if(!r)return;const i=this._size=Ht(this,e),s=Object.assign({},r,this._size),l=Jt(t,e,s),o=Xt(e,s,l,t);a._to===o.x&&n._to===o.y||(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=i.width,this.height=i.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,o))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(t);const n={width:this.width,height:this.height},i={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=(0,a.E)(t.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&l&&(e.save(),e.globalAlpha=r,this.drawBackground(i,e,n,t),(0,a.aB)(e,t.textDirection),i.y+=s.top,this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),(0,a.aD)(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const r=this._active,n=e.map(({datasetIndex:e,index:t})=>{const r=this.chart.getDatasetMeta(e);if(!r)throw new Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:r.data[t],index:t}}),i=!(0,a.ai)(r,n),s=this._positionChanged(n,t);(i||s)&&(this._active=n,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,r=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,i=this._active||[],s=this._getActiveElements(e,i,t,r),l=this._positionChanged(s,e),o=t||!(0,a.ai)(s,i)||l;return o&&(this._active=s,(n.enabled||n.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),o}_getActiveElements(e,t,r,a){const n=this.options;if("mouseout"===e.type)return[];if(!a)return t.filter(e=>this.chart.data.datasets[e.datasetIndex]&&void 0!==this.chart.getDatasetMeta(e.datasetIndex).controller.getParsed(e.index));const i=this.chart.getElementsAtEventForMode(e,n.mode,n,r);return n.reverse&&i.reverse(),i}_positionChanged(e,t){const{caretX:r,caretY:a,options:n}=this,i=Vt[n.position].call(this,e,t);return!1!==i&&(r!==i.x||a!==i.y)}}var ar={id:"tooltip",_element:rr,positioners:Vt,afterInit(e,t,r){r&&(e.tooltip=new rr({chart:e,options:r}))},beforeUpdate(e,t,r){e.tooltip&&e.tooltip.initialize(r)},reset(e,t,r){e.tooltip&&e.tooltip.initialize(r)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const r={tooltip:t};if(!1===e.notifyPlugins("beforeTooltipDraw",{...r,cancelable:!0}))return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",r)}},afterEvent(e,t){if(e.tooltip){const r=t.replay;e.tooltip.handleEvent(t.event,r,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:er},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function nr(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class ir extends Ie{static id="category";static defaults={ticks:{callback:nr}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const e=this.getLabels();for(const{index:r,label:a}of t)e[r]===a&&e.splice(r,1);this._addedLabels=[]}super.init(e)}parse(e,t){if((0,a.k)(e))return null;const r=this.getLabels();return((e,t)=>null===e?null:(0,a.S)(Math.round(e),0,t))(t=isFinite(t)&&r[t]===e?t:function(e,t,r,a){const n=e.indexOf(t);return-1===n?((e,t,r,a)=>("string"==typeof t?(r=e.push(t)-1,a.unshift({index:r,label:t})):isNaN(t)&&(r=null),r))(e,t,r,a):n!==e.lastIndexOf(t)?r:n}(r,e,(0,a.v)(t,e),this._addedLabels),r.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:r,max:a}=this.getMinMax(!0);"ticks"===this.options.bounds&&(e||(r=0),t||(a=this.getLabels().length-1)),this.min=r,this.max=a}buildTicks(){const e=this.min,t=this.max,r=this.options.offset,a=[];let n=this.getLabels();n=0===e&&t===n.length-1?n:n.slice(e,t+1),this._valueRange=Math.max(n.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let r=e;r<=t;r++)a.push({value:r});return a}getLabelForValue(e){return nr.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return"number"!=typeof e&&(e=this.parse(e)),null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function sr(e,t,{horizontal:r,minRotation:n}){const i=(0,a.t)(n),s=(r?Math.sin(i):Math.cos(i))||.001,l=.75*t*(""+e).length;return Math.min(t/s,l)}class lr extends Ie{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return(0,a.k)(e)||("number"==typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:r}=this.getUserBounds();let{min:n,max:i}=this;const s=e=>n=t?n:e,l=e=>i=r?i:e;if(e){const e=(0,a.s)(n),t=(0,a.s)(i);e<0&&t<0?l(0):e>0&&t>0&&s(0)}if(n===i){let t=0===i?1:Math.abs(.05*i);l(i+t),e||s(n-t)}this.min=n,this.max=i}getTickLimit(){const e=this.options.ticks;let t,{maxTicksLimit:r,stepSize:a}=e;return a?(t=Math.ceil(this.max/a)-Math.floor(this.min/a)+1,t>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${a} would result generating up to ${t} ticks. Limiting to 1000.`),t=1e3)):(t=this.computeTickLimit(),r=r||11),r&&(t=Math.min(r,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let r=this.getTickLimit();r=Math.max(2,r);const n=function(e,t){const r=[],{bounds:n,step:i,min:s,max:l,precision:o,count:c,maxTicks:d,maxDigits:g,includeBounds:M}=e,u=i||1,m=d-1,{min:N,max:h}=t,p=!(0,a.k)(s),k=!(0,a.k)(l),y=!(0,a.k)(c),x=(h-N)/(g+1);let D,j,I,E,z=(0,a.aI)((h-N)/m/u)*u;if(z<1e-14&&!p&&!k)return[{value:N},{value:h}];E=Math.ceil(h/z)-Math.floor(N/z),E>m&&(z=(0,a.aI)(E*z/m/u)*u),(0,a.k)(o)||(D=Math.pow(10,o),z=Math.ceil(z*D)/D),"ticks"===n?(j=Math.floor(N/z)*z,I=Math.ceil(h/z)*z):(j=N,I=h),p&&k&&i&&(0,a.aJ)((l-s)/i,z/1e3)?(E=Math.round(Math.min((l-s)/z,d)),z=(l-s)/E,j=s,I=l):y?(j=p?s:j,I=k?l:I,E=c-1,z=(I-j)/E):(E=(I-j)/z,E=(0,a.aK)(E,Math.round(E),z/1e3)?Math.round(E):Math.ceil(E));const T=Math.max((0,a.aL)(z),(0,a.aL)(j));D=Math.pow(10,(0,a.k)(o)?T:o),j=Math.round(j*D)/D,I=Math.round(I*D)/D;let f=0;for(p&&(M&&j!==s?(r.push({value:s}),j<s&&f++,(0,a.aK)(Math.round((j+f*z)*D)/D,s,sr(s,x,e))&&f++):j<s&&f++);f<E;++f){const e=Math.round((j+f*z)*D)/D;if(k&&e>l)break;r.push({value:e})}return k&&M&&I!==l?r.length&&(0,a.aK)(r[r.length-1].value,l,sr(l,x,e))?r[r.length-1].value=l:r.push({value:l}):k&&I!==l||r.push({value:I}),r}({maxTicks:r,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===e.bounds&&(0,a.aH)(n,this,"value"),e.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const e=this.ticks;let t=this.min,r=this.max;if(super.configure(),this.options.offset&&e.length){const a=(r-t)/Math.max(e.length-1,1)/2;t-=a,r+=a}this._startValue=t,this._endValue=r,this._valueRange=r-t}getLabelForValue(e){return(0,a.o)(e,this.chart.options.locale,this.options.ticks.format)}}class or extends lr{static id="linear";static defaults={ticks:{callback:a.aM.formatters.numeric}};determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=(0,a.g)(e)?e:0,this.max=(0,a.g)(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,r=(0,a.t)(this.options.ticks.minRotation),n=(e?Math.sin(r):Math.cos(r))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,i.lineHeight/n))}getPixelForValue(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}a.aM.formatters.logarithmic,a.aM.formatters.numeric},44707:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(51609),n=r(97500),i=r.n(n),s=r(86087),l=r(27723);function o({label:e,description:t,error:r,options:n=[],value:o="",onChange:c,disabled:d=!1,placeholder:g="",clearable:M=!0,className:u,id:m}){const N=m||e?.toLowerCase().replace(/\s+/g,"-"),h=r?"tr-border-danger":"tr-border-primary",p=M&&!d&&!!o,[k,y]=(0,s.useState)(!1),[x,D]=(0,s.useState)(""),[j,I]=(0,s.useState)(-1),E=(0,s.useRef)(null),z=n.find(e=>e.value===o)?.label||"",T=(0,s.useMemo)(()=>{const e=x.trim().toLowerCase();return e?n.filter(t=>String(t.label).toLowerCase().includes(e)):n},[n,x]);(0,s.useEffect)(()=>{if(!k)return;const e=e=>{E.current?.contains(e.target)||(y(!1),D(""))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[k]);const f=()=>{d||(y(!0),I(-1))},_=e=>{c?.(e.value),D(""),y(!1),I(-1)};return(0,a.createElement)("div",{className:i()("tr-flex tr-flex-col tr-gap-1.5",u),ref:E},e&&(0,a.createElement)("label",{htmlFor:N,className:"tr-text-sm tr-font-medium tr-text-secondary"},e),(0,a.createElement)("div",{className:"tr-relative"},(0,a.createElement)("input",{id:N,type:"text",role:"combobox","aria-expanded":k,"aria-autocomplete":"list",className:i()("tr-w-full tr-h-10 tr-rounded-md tr-bg-white tr-text-sm tr-text-primary","tr-border-[1.5px] tr-pl-3",p?"tr-pr-16":"tr-pr-9","tr-transition-colors tr-duration-150","hover:tr-border-[#A9AEC0]","focus:tr-outline-none focus-visible:tr-border-brand","disabled:tr-bg-white disabled:tr-text-tertiary disabled:tr-border-secondary disabled:tr-cursor-not-allowed",h),value:k?x:z,placeholder:z||g,disabled:d,onFocus:f,onClick:f,onChange:e=>{D(e.target.value),y(!0),I(-1)},onKeyDown:e=>{if("ArrowDown"===e.key||"ArrowUp"===e.key){if(e.preventDefault(),!k)return void f();const t="ArrowDown"===e.key?1:-1;I(e=>{if(!T.length)return-1;const r=e+t;return r<0?T.length-1:r>=T.length?0:r})}else"Enter"===e.key?k&&T[j]&&(e.preventDefault(),_(T[j])):"Escape"===e.key&&(y(!1),D(""))}}),p&&(0,a.createElement)("button",{type:"button",onMouseDown:e=>e.preventDefault(),onClick:()=>{c?.(""),D(""),y(!1),I(-1)},"aria-label":(0,l.__)("Clear selection","thinkrank"),className:"tr-absolute tr-inset-y-0 tr-right-8 tr-flex tr-items-center tr-text-tertiary hover:tr-text-primary",style:{background:"none",border:0,padding:"0 4px",cursor:"pointer"}},(0,a.createElement)("svg",{className:"tr-h-4 tr-w-4",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true"},(0,a.createElement)("path",{d:"M4.28 3.22a.75.75 0 0 0-1.06 1.06L6.94 8l-3.72 3.72a.75.75 0 1 0 1.06 1.06L8 9.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L9.06 8l3.72-3.72a.75.75 0 0 0-1.06-1.06L8 6.94 4.28 3.22Z"}))),(0,a.createElement)("span",{className:"tr-pointer-events-none tr-absolute tr-inset-y-0 tr-right-3 tr-flex tr-items-center tr-text-tertiary"},(0,a.createElement)("svg",{className:"tr-h-4 tr-w-4",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true"},(0,a.createElement)("path",{fillRule:"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))),k&&(0,a.createElement)("ul",{role:"listbox",style:{position:"absolute",zIndex:20,top:"calc(100% + 4px)",left:0,right:0,maxHeight:"240px",overflowY:"auto",margin:0,padding:"4px",listStyle:"none",background:"#fff",border:"1px solid var(--tr-border-card)",borderRadius:"8px",boxShadow:"0 8px 20px rgba(0,0,0,.10)"}},0===T.length&&(0,a.createElement)("li",{style:{padding:"8px 10px",fontSize:"13px",color:"var(--tr-text-subtle)"}},(0,l.__)("No matches found","thinkrank")),T.map((e,t)=>{const r=t===j,n=e.value===o;return(0,a.createElement)("li",{key:e.value,role:"option","aria-selected":n,onMouseEnter:()=>I(t),onMouseDown:e=>e.preventDefault(),onClick:()=>_(e),style:{padding:"8px 10px",margin:0,fontSize:"13px",borderRadius:"6px",cursor:"pointer",color:"var(--tr-text-heading)",fontWeight:n?600:400,background:r?"var(--tr-accent-bg)":"transparent"}},e.label)}))),t&&!r&&(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0"},t),r&&(0,a.createElement)("p",{className:"tr-text-xs tr-text-danger tr-m-0"},r))}},44729:(e,t,r)=>{"use strict";r.d(t,{A:()=>h,O:()=>N});var a=r(51609),n=r(86087),i=r(27723),s=r(52619),l=r(1455),o=r.n(l),c=r(49323),d=r(43526);const g=({value:e,label:t})=>{const[r,s]=(0,n.useState)(!1);return(0,a.createElement)("button",{type:"button",onClick:async()=>{if(e)try{await navigator.clipboard.writeText(e),s(!0),setTimeout(()=>s(!1),1500)}catch(e){}},disabled:!e,"aria-label":t,className:"tr-inline-flex tr-items-center tr-gap-1 tr-text-xs tr-font-semibold tr-bg-transparent tr-border-0 tr-p-0 tr-cursor-pointer tr-transition-colors disabled:tr-opacity-40 disabled:tr-cursor-not-allowed tr-text-brand hover:tr-text-[#3641D9]"},r?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("svg",{className:"tr-w-3.5 tr-h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},(0,a.createElement)("path",{d:"M20 6L9 17l-5-5"})),(0,i.__)("Copied","thinkrank")):(0,a.createElement)(a.Fragment,null,(0,a.createElement)("svg",{className:"tr-w-3.5 tr-h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},(0,a.createElement)("rect",{x:"9",y:"9",width:"11",height:"11",rx:"2"}),(0,a.createElement)("path",{d:"M5 15V5a2 2 0 0 1 2-2h10"})),(0,i.__)("Copy","thinkrank")))},M=()=>(0,a.createElement)("div",{className:"tr-mt-5 tr-pt-5 tr-border-t tr-border-secondary"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2 tr-mb-2"},(0,a.createElement)("span",{className:"tr-block tr-text-sm tr-font-medium tr-text-primary"},(0,i.__)("Apply to a post","thinkrank")),(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-gap-1 tr-px-2 tr-py-0.5 tr-rounded-full tr-text-[11px] tr-font-semibold tr-uppercase tr-tracking-wide",style:{color:"#9a3412",background:"#ffedd5",border:"1px solid #fed7aa"}},(0,a.createElement)("span",{"aria-hidden":"true"},"✦"),(0,i.__)("Pro","thinkrank"))),(0,a.createElement)("div",{className:"tr-flex tr-flex-col sm:tr-flex-row tr-gap-2"},(0,a.createElement)("input",{type:"text",disabled:!0,placeholder:(0,i.__)("Search for a post or page…","thinkrank"),className:"tr-w-full sm:tr-flex-1 tr-rounded-lg tr-border-[1.5px] tr-border-slate-300 tr-px-3 tr-py-2 tr-text-sm tr-bg-[#F7F8FB] tr-text-tertiary tr-cursor-not-allowed"}),(0,a.createElement)("a",{href:"https://thinkrank.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"tr-inline-flex tr-items-center tr-justify-center tr-gap-2 tr-h-10 tr-px-4 tr-rounded-md tr-border tr-border-transparent tr-text-sm tr-font-medium tr-no-underline tr-bg-brand tr-text-white hover:tr-bg-[#3641D9] tr-transition-colors tr-shrink-0"},(0,i.__)("Upgrade to apply","thinkrank"))),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0 tr-mt-2"},(0,i.__)("Push the generated title, description, and focus keyword straight to any post with ThinkRank Pro.","thinkrank"))),u=({metadata:e})=>(0,s.applyFilters)("thinkrank.metadata.applyTab",null,{metadata:e})||(window.thinkrankAdmin?.isPro?null:(0,a.createElement)(M,null)),m=(e,t)=>0===e?{label:(0,i.__)("Empty","thinkrank"),text:"tr-text-tertiary",bg:"tr-bg-[#f2f4f7]"}:e>t?{label:(0,i.__)("Too long","thinkrank"),text:"tr-text-danger",bg:"tr-bg-[#fef3f2]"}:e<.5*t?{label:(0,i.__)("Too short","thinkrank"),text:"tr-text-warning",bg:"tr-bg-[#fffaeb]"}:{label:(0,i.__)("Good","thinkrank"),text:"tr-text-success",bg:"tr-bg-[#ecfdf3]"},N=({metadata:e,isVariation:t=!1,onSelect:r=null,allowApply:n=!1})=>{const s=[...e.title||""].length,l=[...e.description||""].length,o=m(s,60),c=m(l,160);return(0,a.createElement)("div",{className:"tr-bg-white tr-rounded-xl tr-border tr-border-secondary tr-p-5"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2 tr-mb-4"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-8 tr-h-8 tr-rounded-lg tr-bg-brand-bg tr-text-brand tr-shrink-0"},(0,a.createElement)("svg",{className:"tr-w-[18px] tr-h-[18px]",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},(0,a.createElement)("path",{d:"M9 12l2 2 4-4"}),(0,a.createElement)("circle",{cx:"12",cy:"12",r:"9"}))),(0,a.createElement)("h4",{className:"tr-text-base tr-font-semibold tr-text-primary tr-m-0"},(0,i.__)("Generated SEO Metadata","thinkrank"))),(0,a.createElement)("div",{className:"tr-mb-3 tr-rounded-lg tr-border tr-border-secondary tr-bg-[#F7F8FB] tr-p-3"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-mb-1.5"},(0,a.createElement)("span",{className:"tr-text-[11px] tr-font-semibold tr-uppercase tr-tracking-wide tr-text-tertiary"},(0,i.__)("SEO Title","thinkrank")),(0,a.createElement)(g,{value:e.title,label:(0,i.__)("Copy SEO title","thinkrank")})),(0,a.createElement)("p",{className:"tr-text-sm tr-font-medium tr-text-primary tr-m-0 tr-mb-2"},e.title),(0,a.createElement)("span",{className:`tr-inline-flex tr-items-center tr-px-2 tr-py-0.5 tr-rounded-full tr-text-[11px] tr-font-semibold ${o.text} ${o.bg}`},s,"/",60," · ",o.label)),(0,a.createElement)("div",{className:"tr-mb-3 tr-rounded-lg tr-border tr-border-secondary tr-bg-[#F7F8FB] tr-p-3"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-mb-1.5"},(0,a.createElement)("span",{className:"tr-text-[11px] tr-font-semibold tr-uppercase tr-tracking-wide tr-text-tertiary"},(0,i.__)("Meta Description","thinkrank")),(0,a.createElement)(g,{value:e.description,label:(0,i.__)("Copy meta description","thinkrank")})),(0,a.createElement)("p",{className:"tr-text-sm tr-text-secondary tr-leading-relaxed tr-m-0 tr-mb-2"},e.description),(0,a.createElement)("span",{className:`tr-inline-flex tr-items-center tr-px-2 tr-py-0.5 tr-rounded-full tr-text-[11px] tr-font-semibold ${c.text} ${c.bg}`},l,"/",160," · ",c.label)),e.focus_keyword&&(0,a.createElement)("div",{className:"tr-mb-3 tr-rounded-lg tr-border tr-border-secondary tr-bg-[#F7F8FB] tr-p-3"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-mb-1.5"},(0,a.createElement)("span",{className:"tr-text-[11px] tr-font-semibold tr-uppercase tr-tracking-wide tr-text-tertiary"},(0,i.__)("Focus Keyword","thinkrank")),(0,a.createElement)(g,{value:e.focus_keyword,label:(0,i.__)("Copy focus keyword","thinkrank")})),(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-px-2.5 tr-py-1 tr-rounded-full tr-bg-brand-bg tr-text-brand tr-text-sm tr-font-medium"},e.focus_keyword)),e.suggestions&&e.suggestions.length>0&&(0,a.createElement)("div",{className:"tr-mt-4 tr-rounded-lg tr-border tr-border-secondary tr-bg-[#F7F8FB] tr-p-3"},(0,a.createElement)("span",{className:"tr-block tr-text-[11px] tr-font-semibold tr-uppercase tr-tracking-wide tr-text-tertiary tr-mb-2"},(0,i.__)("AI Suggestions","thinkrank")),(0,a.createElement)("ul",{className:"tr-list-none tr-m-0 tr-p-0 tr-flex tr-flex-col tr-gap-2"},e.suggestions.map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-flex tr-items-start tr-gap-2 tr-text-sm tr-text-secondary"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-mt-0.5 tr-shrink-0 tr-text-brand",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},(0,a.createElement)("path",{d:"M12 3l1.9 4.6L18.5 9.5l-4.6 1.9L12 16l-1.9-4.6L5.5 9.5l4.6-1.9L12 3z"})),(0,a.createElement)("span",null,e))))),t&&r&&(0,a.createElement)("div",{className:"tr-mt-4"},(0,a.createElement)("button",{type:"button",className:"tr-inline-flex tr-items-center tr-justify-center tr-h-9 tr-px-3 tr-rounded-md tr-border tr-border-primary tr-bg-white tr-text-secondary tr-text-sm tr-font-medium tr-cursor-pointer hover:tr-bg-[#F7F8FB] tr-transition-colors",onClick:r},(0,i.__)("Use This Variation","thinkrank"))),n&&(0,a.createElement)(u,{metadata:e}))},h=({onMetadataGenerated:e,initialContent:t=""})=>{const[r,s]=(0,n.useState)(t),[l,g]=(0,n.useState)(""),[M,u]=(0,n.useState)("blog_post"),[m,h]=(0,n.useState)("professional"),[p,k]=(0,n.useState)(!1),[y,x]=(0,n.useState)(null),[D,j]=(0,n.useState)(null),[I,E]=(0,n.useState)([]),z=Boolean(window.thinkrankAdmin?.aiConfigured),T=[{label:(0,i.__)("Blog Post","thinkrank"),value:"blog_post"},{label:(0,i.__)("Product Page","thinkrank"),value:"product"},{label:(0,i.__)("Landing Page","thinkrank"),value:"landing_page"},{label:(0,i.__)("About Page","thinkrank"),value:"about_page"},{label:(0,i.__)("Service Page","thinkrank"),value:"service_page"}],f=[{label:(0,i.__)("Professional","thinkrank"),value:"professional"},{label:(0,i.__)("Friendly","thinkrank"),value:"friendly"},{label:(0,i.__)("Authoritative","thinkrank"),value:"authoritative"},{label:(0,i.__)("Conversational","thinkrank"),value:"conversational"},{label:(0,i.__)("Technical","thinkrank"),value:"technical"}],_=async()=>{if(r.trim()){k(!0),j(null);try{const t=await o()({path:"/thinkrank/v1/ai/generate-metadata",method:"POST",data:{content:r.trim(),target_keyword:l,content_type:M,tone:m}});t.success?(x(t.data),e&&e(t.data)):j(t.message||(0,i.__)("Failed to generate metadata","thinkrank"))}catch(e){j(e.message||(0,i.__)("An error occurred while generating metadata","thinkrank"))}finally{k(!1)}}else j((0,i.__)("Please enter some content to analyze.","thinkrank"))};return(0,a.createElement)("div",{className:"tr-bg-white tr-rounded-xl tr-shadow-sm tr-overflow-hidden"},(0,a.createElement)("div",{className:"tr-relative tr-overflow-hidden tr-bg-[linear-gradient(90deg,#4c4cff_58%,#3535b0_118%)] tr-px-6 tr-py-5 tr-flex tr-items-center tr-gap-3.5"},(0,a.createElement)("span",{"aria-hidden":"true",className:"tr-pointer-events-none tr-absolute tr-top-[-2.5rem] tr-right-[-2rem] tr-w-40 tr-h-40 tr-rounded-full tr-bg-white/10 tr-blur-2xl"}),(0,a.createElement)("span",{"aria-hidden":"true",className:"tr-pointer-events-none tr-absolute tr-bottom-[-3rem] tr-left-[6rem] tr-w-32 tr-h-32 tr-rounded-full tr-bg-white/5 tr-blur-2xl"}),(0,a.createElement)("span",{className:"tr-relative tr-flex tr-items-center tr-justify-center tr-w-11 tr-h-11 tr-rounded-xl tr-bg-white/15 tr-ring-1 tr-ring-white/25 tr-text-white tr-shrink-0 tr-shadow-sm"},(0,a.createElement)("svg",{className:"tr-w-5 tr-h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},(0,a.createElement)("path",{d:"M9.568 3H5.25A2.25 2.25 0 003 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 005.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 009.568 3z"}),(0,a.createElement)("path",{d:"M6 6h.008v.008H6V6z"}))),(0,a.createElement)("div",{className:"tr-relative"},(0,a.createElement)("h3",{className:"tr-text-white tr-font-semibold tr-text-base tr-m-0 tr-leading-tight"},(0,i.__)("AI Metadata Generator","thinkrank")),(0,a.createElement)("p",{className:"tr-text-white/70 tr-text-xs tr-m-0 tr-mt-0.5"},(0,i.__)("Generate SEO-ready titles, descriptions, and keywords from your content","thinkrank")))),(0,a.createElement)("div",{className:"tr-p-6 tr-flex tr-flex-col tr-gap-6"},D&&(0,a.createElement)(c.Fc,{variant:"error",onDismiss:()=>j(null)},(0,d.A)(D)),(0,a.createElement)(c.TM,{label:(0,i.__)("Content to Analyze","thinkrank"),value:r,onChange:e=>s(e.target.value),rows:6,placeholder:(0,i.__)("Enter your blog post, page content, or product description…","thinkrank"),help:(0,i.__)("Paste your content here for AI analysis and metadata generation.","thinkrank")}),(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-1 md:tr-grid-cols-3 tr-gap-4"},(0,a.createElement)(c.pd,{label:(0,i.__)("Target Keyword","thinkrank"),value:l,onChange:e=>g(e.target.value),placeholder:(0,i.__)('e.g., "WordPress SEO"',"thinkrank"),help:(0,i.__)("Main keyword you want to optimize for","thinkrank")}),(0,a.createElement)(c.l6,{label:(0,i.__)("Content Type","thinkrank"),value:M,options:T,onChange:e=>u(e.target.value)}),(0,a.createElement)(c.l6,{label:(0,i.__)("Tone","thinkrank"),value:m,options:f,onChange:e=>h(e.target.value)}))),(0,a.createElement)("div",{className:"tr-px-6 tr-py-4 tr-bg-white tr-border-t tr-border-secondary tr-flex tr-flex-col sm:tr-flex-row tr-gap-3"},(0,a.createElement)(c.$n,{variant:"primary",size:"lg",className:"tr-flex-1 tr-justify-center tr-bg-brand tr-border-0 hover:tr-bg-[#3641D9]",onClick:_,loading:p,disabled:p||!r.trim()||!z,title:z?void 0:(0,i.__)("Configure an AI provider in Settings to enable AI generation","thinkrank")},!p&&(0,a.createElement)("svg",{"aria-hidden":"true",width:"14",height:"17",viewBox:"0 0 15 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"tr-mr-1.5 tr-text-white"},(0,a.createElement)("path",{d:"M5.58072 3.39707L6.0826 4.79082C6.35798 5.55489 6.79852 6.2488 7.37282 6.8231C7.94712 7.3974 8.64103 7.83794 9.4051 8.11332L10.7988 8.6152C10.8264 8.62529 10.8501 8.64359 10.8669 8.66762C10.8837 8.69165 10.8927 8.72026 10.8927 8.74957C10.8927 8.77888 10.8837 8.80749 10.8669 8.83152C10.8501 8.85556 10.8264 8.87385 10.7988 8.88395L9.4051 9.38582C8.64103 9.6612 7.94712 10.1017 7.37282 10.676C6.79852 11.2503 6.35798 11.9443 6.0826 12.7083L5.58072 14.1021C5.57063 14.1296 5.55233 14.1534 5.5283 14.1701C5.50427 14.1869 5.47566 14.1959 5.44635 14.1959C5.41704 14.1959 5.38843 14.1869 5.3644 14.1701C5.34036 14.1534 5.32207 14.1296 5.31197 14.1021L4.8101 12.7083C4.53472 11.9443 4.09418 11.2503 3.51988 10.676C2.94558 10.1017 2.25167 9.6612 1.4876 9.38582L0.093849 8.88395C0.0663279 8.87385 0.0425693 8.85556 0.025785 8.83152C0.00900062 8.80749 0 8.77888 0 8.74957C0 8.72026 0.00900062 8.69165 0.025785 8.66762C0.0425693 8.64359 0.0663279 8.62529 0.093849 8.6152L1.4876 8.11332C2.25167 7.83794 2.94558 7.3974 3.51988 6.8231C4.09418 6.2488 4.53472 5.55489 4.8101 4.79082L5.31197 3.39707C5.32179 3.36927 5.33998 3.3452 5.36405 3.32817C5.38811 3.31115 5.41687 3.302 5.44635 3.302C5.47583 3.302 5.50459 3.31115 5.52865 3.32817C5.55272 3.3452 5.57091 3.36927 5.58072 3.39707ZM11.8545 0.0476961L12.1088 0.753321C12.2484 1.14018 12.4715 1.49151 12.7624 1.78232C13.0532 2.07313 13.4045 2.29625 13.7913 2.43582L14.497 2.6902C14.511 2.69529 14.523 2.70455 14.5316 2.71674C14.5401 2.72893 14.5447 2.74344 14.5447 2.75832C14.5447 2.7732 14.5401 2.78772 14.5316 2.7999C14.523 2.81209 14.511 2.82136 14.497 2.82645L13.7913 3.08082C13.4045 3.22039 13.0532 3.44352 12.7624 3.73432C12.4715 4.02513 12.2484 4.37646 12.1088 4.76332L11.8545 5.46895C11.8494 5.48293 11.8401 5.495 11.8279 5.50353C11.8157 5.51207 11.8012 5.51664 11.7863 5.51664C11.7715 5.51664 11.757 5.51207 11.7448 5.50353C11.7326 5.495 11.7233 5.48293 11.7182 5.46895L11.4639 4.76332C11.3243 4.37646 11.1012 4.02513 10.8103 3.73432C10.5195 3.44352 10.1682 3.22039 9.78135 3.08082L9.07572 2.82645C9.06174 2.82136 9.04967 2.81209 9.04114 2.7999C9.03261 2.78772 9.02803 2.7732 9.02803 2.75832C9.02803 2.74344 9.03261 2.72893 9.04114 2.71674C9.04967 2.70455 9.06174 2.69529 9.07572 2.6902L9.78135 2.43582C10.1682 2.29625 10.5195 2.07313 10.8103 1.78232C11.1012 1.49151 11.3243 1.14018 11.4639 0.753321L11.7182 0.0476961C11.7233 0.0337168 11.7326 0.0216418 11.7448 0.0131093C11.757 0.00457683 11.7715 0 11.7863 0C11.8012 0 11.8157 0.00457683 11.8279 0.0131093C11.8401 0.0216418 11.8494 0.0337168 11.8545 0.0476961ZM11.8545 12.0308L12.1088 12.7364C12.2484 13.1233 12.4715 13.4746 12.7624 13.7654C13.0532 14.0563 13.4045 14.2794 13.7913 14.4189L14.497 14.6733C14.511 14.6784 14.523 14.6877 14.5316 14.6999C14.5401 14.7121 14.5447 14.7266 14.5447 14.7414C14.5447 14.7563 14.5401 14.7708 14.5316 14.783C14.523 14.7952 14.511 14.8045 14.497 14.8096L13.7913 15.0639C13.4045 15.2035 13.0532 15.4266 12.7624 15.7174C12.4715 16.0083 12.2484 16.3596 12.1088 16.7464L11.8545 17.4521C11.8494 17.4661 11.8401 17.4781 11.8279 17.4867C11.8157 17.4952 11.8012 17.4998 11.7863 17.4998C11.7715 17.4998 11.757 17.4952 11.7448 17.4867C11.7326 17.4781 11.7233 17.4661 11.7182 17.4521L11.4639 16.7464C11.3243 16.3596 11.1012 16.0083 10.8103 15.7174C10.5195 15.4266 10.1682 15.2035 9.78135 15.0639L9.07572 14.8096C9.06174 14.8045 9.04967 14.7952 9.04114 14.783C9.03261 14.7708 9.02803 14.7563 9.02803 14.7414C9.02803 14.7266 9.03261 14.7121 9.04114 14.6999C9.04967 14.6877 9.06174 14.6784 9.07572 14.6733L9.78135 14.4189C10.1682 14.2794 10.5195 14.0563 10.8103 13.7654C11.1012 13.4746 11.3243 13.1233 11.4639 12.7364L11.7182 12.0308C11.7413 11.9671 11.832 11.9671 11.8545 12.0308Z",fill:"currentColor"})),p?(0,i.__)("Generating…","thinkrank"):(0,i.__)("Generate SEO Metadata","thinkrank")),y&&(0,a.createElement)(c.$n,{variant:"secondary",size:"lg",className:"tr-justify-center",onClick:async()=>{if(y){k(!0),j(null);try{const e=[];for(let t=0;t<3;t++)e.push(o()({path:"/thinkrank/v1/ai/generate-metadata",method:"POST",data:{content:r.trim(),target_keyword:l,content_type:M,tone:m,variation:t+1}}));const t=(await Promise.all(e)).filter(e=>e.success).map(e=>e.data);E(t)}catch(e){j(e.message||(0,i.__)("Failed to generate variations","thinkrank"))}finally{k(!1)}}else await _()},disabled:p||!z},(0,i.__)("Generate Variations","thinkrank"))),I.length>0&&(0,a.createElement)("div",{className:"tr-px-6 tr-pb-6"},(0,a.createElement)("h4",{className:"tr-text-base tr-font-semibold tr-text-primary tr-mb-4 tr-mt-0"},(0,i.__)("Alternative Variations","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-4"},I.map((t,r)=>(0,a.createElement)("div",{key:r,className:"tr-border-l-4 tr-border-brand tr-bg-white tr-rounded-lg"},(0,a.createElement)(N,{metadata:t,isVariation:!0,onSelect:()=>(t=>{x(t),e&&e(t)})(t)}))))))}},45891:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"}))},47021:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"}))},47143:e=>{"use strict";e.exports=window.wp.data},47388:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(51609),n=r(27723),i=r(58020);const s=()=>(0,a.createElement)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,a.createElement)("path",{d:"M12.5 7.5a2.5 2.5 0 1 1 5 0 2.5 2.5 0 0 1-5 0Zm0 0L8.25 11.75m0 0L10 13.5l-1.75 1.75L6.5 13.5m1.75-1.75L6.5 10 2.75 13.75 4.5 15.5l.75-.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),l=({feature:e})=>(0,a.createElement)("div",{className:"tr-pro-license-notice"},(0,a.createElement)("div",{className:"tr-pro-license-notice__icon"},(0,a.createElement)(s,null)),(0,a.createElement)("div",{className:"tr-pro-license-notice__content"},(0,a.createElement)("div",{className:"tr-pro-license-notice__heading"},(0,a.createElement)("h3",{className:"tr-pro-license-notice__title"},e?(0,n.sprintf)(/* translators: %s: name of the Pro feature, e.g. "Google Analytics". */ /* translators: %s: name of the Pro feature, e.g. "Google Analytics". */ |
| 51 | 52 | (0,n.__)("%s needs an activated license","thinkrank"),e):(0,n.__)("This feature needs an activated license","thinkrank")),(0,a.createElement)("span",{className:"tr-pro-license-notice__badge"},(0,a.createElement)("span",{"aria-hidden":"true",className:"tr-pro-license-notice__dot"}),(0,n.__)("Not activated","thinkrank"))),(0,a.createElement)("p",{className:"tr-pro-license-notice__description"},(0,n.__)("ThinkRank Pro is installed on this site, but its license has not been activated yet. Add your license key to unlock this feature.","thinkrank")),(0,a.createElement)("a",{href:(0,i.EN)(),className:"tr-pro-license-notice__cta"},(0,n.__)("Activate license","thinkrank"))))},48094:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M16 10.5v3h3v-3h-3zm-5 3h3v-3h-3v3zM7 9l-3 3 3 3 1-1-2-2 2-2-1-1z"}))},48124:(e,t,r)=>{"use strict";r.d(t,{A:()=>D});var a=r(51609),n=r(86087),i=r(27723),s=r(49323),l=r(52352),o=r(85770),c=r(17098),d=r(52459),g=r(57463),M=r(16443),u=r(61180),m=r(97384),N=r(94240),h=r(28094),p=r(60775);const k=(0,i.__)("This is a sample excerpt showing how your description will appear in search results.","thinkrank"),y=(e,t)=>e?e.length<=t?e:e.slice(0,t-1).trimEnd()+"…":"",x=(e,t)=>(e||"").replace(/%([a-z_]+)%/gi,(e,r)=>Object.prototype.hasOwnProperty.call(t,r)?t[r]:e),D=({activeSubSection:e})=>{const t="content-type-matrix"===e,r="auto-ai"===e,D="bulk-snippets"===e,j="thin-content"===e,[I,E]=(0,n.useState)({}),[z,T]=(0,n.useState)(!1),[f,_]=(0,n.useState)(!1),[A,w]=(0,n.useState)(!0),[b,O]=(0,n.useState)(!1),[v,L]=(0,n.useState)(!1),[S,C]=(0,n.useState)(null),Q=e?e.replace("-seo",""):"post",U=(0,n.useRef)(Q);(0,n.useEffect)(()=>{U.current=Q},[Q]);const Y=window.thinkrankAdmin?.postTypes||[],P=Y.find(e=>e.slug===Q)||{},R=[{label:(0,i.__)("Article","thinkrank"),value:"Article"},{label:(0,i.__)("WebPage","thinkrank"),value:"WebPage"},{label:(0,i.__)("Media","thinkrank"),value:"Media"},{label:(0,i.__)("Product","thinkrank"),value:"Product"}],Z=[{label:(0,i.__)("Article","thinkrank"),value:"Article"},{label:(0,i.__)("NewsArticle","thinkrank"),value:"NewsArticle"},{label:(0,i.__)("BlogPosting","thinkrank"),value:"BlogPosting"}],V=[{label:(0,i.__)("ImageObject","thinkrank"),value:"ImageObject"},{label:(0,i.__)("VideoObject","thinkrank"),value:"VideoObject"}];(0,n.useEffect)(()=>{let e=!1;if(!(t||r||D||j))return L(!1),B(Q,()=>e),()=>{e=!0}},[Q,t,r,D,j]);const B=async(e=Q,t=()=>!1)=>{w(!0);try{const r=await fetch((0,h.g)("global-seo/settings",{post_type:e}),{headers:{"X-WP-Nonce":window.thinkrankAdmin.restNonce}});if(t())return;if(!r.ok)throw new Error(`Settings request failed: ${r.status}`);const a=await r.json();if(t())return;if(!a.success||!a.data)throw new Error("Settings response carried no settings");E(a.data),O(!1)}catch(e){if(t())return;p.A.error("Error loading bulk SEO optimization settings:",e),O(!0),C({status:"error",message:(0,i.__)("Could not load your Global SEO settings. Nothing has been changed. Retry before editing.","thinkrank")})}finally{t()||w(!1)}},G=async(e,t)=>{if(!(await fetch((0,h.g)("global-seo/settings"),{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":window.thinkrankAdmin.restNonce},body:JSON.stringify({post_type:e,settings:t})})).ok)throw new Error("Failed to save settings")},W=(e,t)=>{E(r=>({...r,[e]:t})),L(!0)},H=P.singular_name||P.label||Q,F=P.plural_name||P.label||Q,J=F.toLowerCase(),X=(e,t)=>(0,a.createElement)(s.EY,{as:"div",size:12,color:"help",className:"tr-mt-1"},(0,i.__)("Use variables:","thinkrank")," ",t.map((t,r)=>(0,a.createElement)("button",{type:"button",key:r,onClick:()=>((e,t)=>{let r=I[e]||"";r.length>0&&!r.endsWith(" ")&&(r+=" "),W(e,r+t)})(e,t.value),className:"thinkrank-variable-tag",title:(0,i.__)("Click to insert","thinkrank")},t.label))),$=[{label:(0,i.__)("+ Title","thinkrank"),value:"%title%"},{label:(0,i.__)("+ Site Title","thinkrank"),value:"%sitename%"},{label:(0,i.__)("+ Separator","thinkrank"),value:"%sep%"}],K=[{label:(0,i.__)("+ Excerpt","thinkrank"),value:"%excerpt%"},{label:(0,i.__)("+ Site Title","thinkrank"),value:"%sitename%"},{label:(0,i.__)("+ Title","thinkrank"),value:"%title%"},{label:(0,i.__)("+ Separator","thinkrank"),value:"%sep%"}],q=window.thinkrankAdmin?.siteName||"",ee=window.thinkrankAdmin?.siteUrl||("undefined"!=typeof window?window.location.origin:""),te=window.thinkrankAdmin?.faviconUrl||"",re={title:(0,i.sprintf)(/* translators: %s: singular content type name, e.g. Page, Media. */ /* translators: %s: singular content type name, e.g. Page, Media. */ |
| 52 | 53 | (0,i.__)("Sample %s Title","thinkrank"),H),sitename:q,sep:"-",excerpt:k},ae=I.title||"",ne=I.description||"",ie=({checkedKey:e,label:t,inputKey:r,options:n=null,description:l})=>{var o;const c=I.advanced_robots_meta||{},d=null===(o=c[e])||void 0===o||o,g=`tr-advrobots-${e}`,M=`tr-advrobots-${r}`,u=n?(0,i.sprintf)(/* translators: %s: robots directive, e.g. Image Preview. */ /* translators: %s: robots directive, e.g. Image Preview. */ |
| @@ -51,12 +52,12 @@ | ||
| 51 | 52 | (0,n.__)("%s needs an activated license","thinkrank"),e):(0,n.__)("This feature needs an activated license","thinkrank")),(0,a.createElement)("span",{className:"tr-pro-license-notice__badge"},(0,a.createElement)("span",{"aria-hidden":"true",className:"tr-pro-license-notice__dot"}),(0,n.__)("Not activated","thinkrank"))),(0,a.createElement)("p",{className:"tr-pro-license-notice__description"},(0,n.__)("ThinkRank Pro is installed on this site, but its license has not been activated yet. Add your license key to unlock this feature.","thinkrank")),(0,a.createElement)("a",{href:(0,i.EN)(),className:"tr-pro-license-notice__cta"},(0,n.__)("Activate license","thinkrank"))))},48094:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M16 10.5v3h3v-3h-3zm-5 3h3v-3h-3v3zM7 9l-3 3 3 3 1-1-2-2 2-2-1-1z"}))},48124:(e,t,r)=>{"use strict";r.d(t,{A:()=>D});var a=r(51609),n=r(86087),i=r(27723),s=r(49323),l=r(52352),o=r(85770),c=r(17098),d=r(52459),g=r(57463),M=r(16443),u=r(61180),m=r(97384),N=r(94240),h=r(28094),p=r(60775);const k=(0,i.__)("This is a sample excerpt showing how your description will appear in search results.","thinkrank"),y=(e,t)=>e?e.length<=t?e:e.slice(0,t-1).trimEnd()+"…":"",x=(e,t)=>(e||"").replace(/%([a-z_]+)%/gi,(e,r)=>Object.prototype.hasOwnProperty.call(t,r)?t[r]:e),D=({activeSubSection:e})=>{const t="content-type-matrix"===e,r="auto-ai"===e,D="bulk-snippets"===e,j="thin-content"===e,[I,E]=(0,n.useState)({}),[z,T]=(0,n.useState)(!1),[f,_]=(0,n.useState)(!1),[A,w]=(0,n.useState)(!0),[b,O]=(0,n.useState)(!1),[v,L]=(0,n.useState)(!1),[S,C]=(0,n.useState)(null),Q=e?e.replace("-seo",""):"post",U=(0,n.useRef)(Q);(0,n.useEffect)(()=>{U.current=Q},[Q]);const Y=window.thinkrankAdmin?.postTypes||[],P=Y.find(e=>e.slug===Q)||{},R=[{label:(0,i.__)("Article","thinkrank"),value:"Article"},{label:(0,i.__)("WebPage","thinkrank"),value:"WebPage"},{label:(0,i.__)("Media","thinkrank"),value:"Media"},{label:(0,i.__)("Product","thinkrank"),value:"Product"}],Z=[{label:(0,i.__)("Article","thinkrank"),value:"Article"},{label:(0,i.__)("NewsArticle","thinkrank"),value:"NewsArticle"},{label:(0,i.__)("BlogPosting","thinkrank"),value:"BlogPosting"}],V=[{label:(0,i.__)("ImageObject","thinkrank"),value:"ImageObject"},{label:(0,i.__)("VideoObject","thinkrank"),value:"VideoObject"}];(0,n.useEffect)(()=>{let e=!1;if(!(t||r||D||j))return L(!1),B(Q,()=>e),()=>{e=!0}},[Q,t,r,D,j]);const B=async(e=Q,t=()=>!1)=>{w(!0);try{const r=await fetch((0,h.g)("global-seo/settings",{post_type:e}),{headers:{"X-WP-Nonce":window.thinkrankAdmin.restNonce}});if(t())return;if(!r.ok)throw new Error(`Settings request failed: ${r.status}`);const a=await r.json();if(t())return;if(!a.success||!a.data)throw new Error("Settings response carried no settings");E(a.data),O(!1)}catch(e){if(t())return;p.A.error("Error loading bulk SEO optimization settings:",e),O(!0),C({status:"error",message:(0,i.__)("Could not load your Global SEO settings. Nothing has been changed. Retry before editing.","thinkrank")})}finally{t()||w(!1)}},G=async(e,t)=>{if(!(await fetch((0,h.g)("global-seo/settings"),{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":window.thinkrankAdmin.restNonce},body:JSON.stringify({post_type:e,settings:t})})).ok)throw new Error("Failed to save settings")},W=(e,t)=>{E(r=>({...r,[e]:t})),L(!0)},H=P.singular_name||P.label||Q,F=P.plural_name||P.label||Q,J=F.toLowerCase(),X=(e,t)=>(0,a.createElement)(s.EY,{as:"div",size:12,color:"help",className:"tr-mt-1"},(0,i.__)("Use variables:","thinkrank")," ",t.map((t,r)=>(0,a.createElement)("button",{type:"button",key:r,onClick:()=>((e,t)=>{let r=I[e]||"";r.length>0&&!r.endsWith(" ")&&(r+=" "),W(e,r+t)})(e,t.value),className:"thinkrank-variable-tag",title:(0,i.__)("Click to insert","thinkrank")},t.label))),$=[{label:(0,i.__)("+ Title","thinkrank"),value:"%title%"},{label:(0,i.__)("+ Site Title","thinkrank"),value:"%sitename%"},{label:(0,i.__)("+ Separator","thinkrank"),value:"%sep%"}],K=[{label:(0,i.__)("+ Excerpt","thinkrank"),value:"%excerpt%"},{label:(0,i.__)("+ Site Title","thinkrank"),value:"%sitename%"},{label:(0,i.__)("+ Title","thinkrank"),value:"%title%"},{label:(0,i.__)("+ Separator","thinkrank"),value:"%sep%"}],q=window.thinkrankAdmin?.siteName||"",ee=window.thinkrankAdmin?.siteUrl||("undefined"!=typeof window?window.location.origin:""),te=window.thinkrankAdmin?.faviconUrl||"",re={title:(0,i.sprintf)(/* translators: %s: singular content type name, e.g. Page, Media. */ /* translators: %s: singular content type name, e.g. Page, Media. */ |
| 52 | 53 | (0,i.__)("Sample %s Title","thinkrank"),H),sitename:q,sep:"-",excerpt:k},ae=I.title||"",ne=I.description||"",ie=({checkedKey:e,label:t,inputKey:r,options:n=null,description:l})=>{var o;const c=I.advanced_robots_meta||{},d=null===(o=c[e])||void 0===o||o,g=`tr-advrobots-${e}`,M=`tr-advrobots-${r}`,u=n?(0,i.sprintf)(/* translators: %s: robots directive, e.g. Image Preview. */ /* translators: %s: robots directive, e.g. Image Preview. */ |
| 53 | 54 | (0,i.__)("%s size","thinkrank"),t):(0,i.sprintf)(/* translators: %s: robots directive, e.g. Snippet. */ /* translators: %s: robots directive, e.g. Snippet. */ |
| 54 | 55 | (0,i.__)("%s limit","thinkrank"),t);return(0,a.createElement)(s.mc,{direction:"column",gap:2},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2"},(0,a.createElement)("input",{id:g,type:"checkbox",checked:d,onChange:t=>W("advanced_robots_meta",{...c,[e]:t.target.checked})}),(0,a.createElement)("label",{htmlFor:g,className:"tr-text-sm tr-text-secondary tr-m-0 tr-cursor-pointer"},t)),n?(0,a.createElement)(s.l6,{id:M,label:u,hideLabelFromVision:!0,value:c[r]||n[0]&&n[0].value,options:n,onChange:e=>W("advanced_robots_meta",{...c,[r]:e.target.value}),disabled:!d,description:l}):(0,a.createElement)(s.pd,{id:M,label:u,hideLabelFromVision:!0,type:"number",min:-1,value:String(Number.isFinite(c[r])?c[r]:-1),onChange:e=>{const t=parseInt(e.target.value,10);W("advanced_robots_meta",{...c,[r]:Number.isNaN(t)?-1:t})},placeholder:"-1",disabled:!d,description:l}))};return t?(0,a.createElement)(g.Ay,null):D?(0,a.createElement)(u.A,null):j?(0,a.createElement)(m.Ay,null):r?(0,a.createElement)(M.A,null):A?(0,a.createElement)(s.u4,{lines:5,label:(0,i.__)("Loading settings…","thinkrank")}):Y.length>0&&!P.slug?(0,a.createElement)(s.Fc,{variant:"info"},(0,i.__)("This content type has no Global SEO settings on this site, because WordPress does not render a page for it. Media is the usual case: attachment URLs redirect straight to the file unless attachment pages are enabled, so a title, robots meta or schema set here would never be served. Alt text and image metadata are handled under Image SEO instead.","thinkrank")):b?(0,a.createElement)(s.oK,{onRetry:()=>B(),isRetrying:A,message:(0,i.__)("Your Global SEO settings could not be read, so this screen has nothing to edit yet. Nothing has changed. Retry to load them.","thinkrank")}):(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-6"},S&&(0,a.createElement)(s.Fc,{variant:"success"===S.status?"success":"error",onDismiss:()=>C(null)},S.message),(0,a.createElement)(s.mc,{direction:"column",gap:6},(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)(o.A,{title:`${F} ${(0,i.__)("SEO Settings","thinkrank")}`,description:`${(0,i.__)("Configure default SEO settings for all","thinkrank")} ${J}.`}),(0,a.createElement)(s.mc,{direction:"column",gap:6,className:"tr-px-6 tr-py-6 tr-divide-y tr-divide-line-2"},(0,a.createElement)(c.A,{id:"tr-gseo-title",label:(0,i.__)("Title Format","thinkrank"),description:(0,i.__)("Default title template for this post type.","thinkrank"),counter:(0,a.createElement)(s.cp,{value:x(ae,re),max:60})},(0,a.createElement)(s.pd,{id:"tr-gseo-title",value:ae,onChange:e=>W("title",e.target.value),placeholder:"%title% %sep% %sitename%"}),X("title",$)),(0,a.createElement)(c.A,{id:"tr-gseo-description",label:(0,i.__)("Description Format","thinkrank"),description:(0,i.__)("Default meta description template for this post type.","thinkrank"),counter:(0,a.createElement)(s.cp,{value:x(ne,re),max:160}),className:"tr-pt-6"},(0,a.createElement)(s.pd,{id:"tr-gseo-description",value:ne,onChange:e=>W("description",e.target.value),placeholder:"%excerpt%"}),X("description",K)),(0,a.createElement)(c.A,{id:"tr-gseo-schema-type",label:(0,i.__)("Default Schema Type","thinkrank"),description:(0,i.__)("Structured-data type assigned to each item by default.","thinkrank"),className:"tr-pt-6"},(0,a.createElement)(s.l6,{id:"tr-gseo-schema-type",value:I.schema_type||"WebPage",options:R,onChange:e=>W("schema_type",e.target.value)})),"Article"===I.schema_type&&(0,a.createElement)(c.A,{id:"tr-gseo-article-type",label:(0,i.__)("Default Article Type","thinkrank"),description:(0,i.__)("Sub-type used when the schema type is Article.","thinkrank"),className:"tr-pt-6"},(0,a.createElement)(s.l6,{id:"tr-gseo-article-type",value:I.article_type||"",options:Z,onChange:e=>W("article_type",e.target.value)})),"Media"===I.schema_type&&(0,a.createElement)(c.A,{id:"tr-gseo-media-type",label:(0,i.__)("Default Media Type","thinkrank"),description:(0,i.__)("Media sub-type used when the schema type is Media.","thinkrank"),className:"tr-pt-6"},(0,a.createElement)(s.l6,{id:"tr-gseo-media-type",value:I.media_type||"",options:V,onChange:e=>W("media_type",e.target.value)})),(0,a.createElement)("div",{className:"tr-pt-6"},(0,a.createElement)(s.mc,{direction:"column",gap:2.5},(0,a.createElement)(s.JU,null,(0,i.__)("Search Engine Preview","thinkrank")),(0,a.createElement)(l.A,{siteTitle:q,permalink:ee,faviconURL:te,title:y(x(ae,re),60),description:y(x(ne,re),160)}))))),(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)(o.A,{title:`${H} ${(0,i.__)("Robots Meta","thinkrank")}`,description:`${(0,i.__)("Select custom robots meta, such as `nofollow`, `noarchive`, etc. for single","thinkrank")} ${H} ${(0,i.__)("pages. Otherwise the default meta will be used, as set in the Global Meta tab.","thinkrank")}`,withBorder:!!I.robots_meta_enabled,trailing:(0,a.createElement)(s.lM,{checked:I.robots_meta_enabled||!1,onChange:e=>W("robots_meta_enabled",e)})}),I.robots_meta_enabled&&(0,a.createElement)(s.mc,{direction:"column",gap:4,className:"tr-p-6"},(0,a.createElement)(d.A,{values:I.robots_meta||{},onChange:e=>W("robots_meta",e)}),(0,a.createElement)(s.mc,{direction:"column",gap:5,className:"tr-mt-2 tr-pt-5 tr-border-t tr-border-secondary"},(0,a.createElement)(s.hE,{tag:"h4",size:"xs"},`${H} ${(0,i.__)("Advanced Robots Meta","thinkrank")}`),(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-3 tr-gap-5"},ie({checkedKey:"snippet_enabled",label:(0,i.__)("Snippet","thinkrank"),inputKey:"max_snippet",description:(0,i.__)("Snippet length (-1 for none)","thinkrank")}),ie({checkedKey:"video_preview_enabled",label:(0,i.__)("Video Preview","thinkrank"),inputKey:"max_video_preview",description:(0,i.__)("Set the max video preview duration. Use -1 for unlimited.","thinkrank")}),ie({checkedKey:"image_preview_enabled",label:(0,i.__)("Image Preview","thinkrank"),inputKey:"max_image_preview",options:[{label:(0,i.__)("None","thinkrank"),value:"none"},{label:(0,i.__)("Standard","thinkrank"),value:"standard"},{label:(0,i.__)("Large","thinkrank"),value:"large"}],description:(0,i.__)("Set the max image preview size.","thinkrank")}))))),(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)(o.A,{withBorder:!1,title:(0,i.__)("Link Suggestions","thinkrank"),description:(0,i.__)("Enable link suggestions and pillar content feature for this post type.","thinkrank"),trailing:(0,a.createElement)(s.lM,{label:f?(0,i.__)("Saving…","thinkrank"):(0,i.__)("Enable link suggestions","thinkrank"),checked:!1!==I.link_suggestions,onChange:async e=>{const t=Q,r=I.link_suggestions;E(t=>({...t,link_suggestions:e})),_(!0);try{await G(t,{...I,link_suggestions:e}),N.A.success(e?(0,i.__)("Link suggestions are on.","thinkrank"):(0,i.__)("Link suggestions are off.","thinkrank"))}catch(e){p.A.error("ThinkRank: autosave failed",e),U.current===t&&E(e=>({...e,link_suggestions:r})),N.A.error((0,i.__)("Couldn’t save that change.","thinkrank"))}finally{_(!1)}},disabled:f})}))),(0,a.createElement)("div",{className:"tr-flex tr-justify-end"},(0,a.createElement)(s.$n,{variant:"primary",size:"sm",loading:z,disabled:!v||z,onClick:async()=>{if(!b){T(!0),C(null);try{await G(Q,I),C({status:"success",message:(0,i.__)("Bulk SEO Optimization settings saved successfully!","thinkrank")}),L(!1)}catch(e){C({status:"error",message:(0,i.__)("Failed to save settings. Please try again.","thinkrank")})}finally{T(!1)}}}},(0,i.__)("Save Settings","thinkrank"))))}},48157:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21ZM15.5303 8.46967C15.8232 8.76256 15.8232 9.23744 15.5303 9.53033L13.0607 12L15.5303 14.4697C15.8232 14.7626 15.8232 15.2374 15.5303 15.5303C15.2374 15.8232 14.7626 15.8232 14.4697 15.5303L12 13.0607L9.53033 15.5303C9.23744 15.8232 8.76256 15.8232 8.46967 15.5303C8.17678 15.2374 8.17678 14.7626 8.46967 14.4697L10.9393 12L8.46967 9.53033C8.17678 9.23744 8.17678 8.76256 8.46967 8.46967C8.76256 8.17678 9.23744 8.17678 9.53033 8.46967L12 10.9393L14.4697 8.46967C14.7626 8.17678 15.2374 8.17678 15.5303 8.46967Z"}))},48426:(e,t,r)=>{"use strict";r.d(t,{$W:()=>o,TT:()=>n});var a=r(27723);const n=(e,t)=>{switch(e){case"exclude_posts":case"exclude_terms":return i(t);case"custom_url_pattern":return s(t);case"links_per_sitemap":return l(t);default:return t}},i=e=>{if(!e||"string"!=typeof e)return"";if(e.length>1e3)throw new Error((0,a.__)("Exclude list too long (max 1000 characters)","thinkrank"));if(!/^[\d,\s]*$/.test(e))throw new Error((0,a.__)("Exclude list must contain only numbers and commas","thinkrank"));if(e.split(",").filter(e=>e.trim()).length>100)throw new Error((0,a.__)("Too many items to exclude (max 100)","thinkrank"));return e.trim()},s=e=>{if(!e||"string"!=typeof e)return"sitemap-{type}.xml";const t=e.replace(/<[^>]*>/g,"");if(t.length>100)throw new Error((0,a.__)("URL pattern too long (max 100 characters)","thinkrank"));if(!/^[a-zA-Z0-9\-_{}.]+$/.test(t))throw new Error((0,a.__)("URL pattern contains invalid characters. Only letters, numbers, hyphens, underscores, dots, and {type} are allowed","thinkrank"));if(!t.includes("{type}"))throw new Error((0,a.__)("URL pattern must contain {type} placeholder","thinkrank"));return t.endsWith(".xml")?t:t+".xml"},l=e=>{const t=parseInt(e,10);if(isNaN(t)||t<1)throw new Error((0,a.__)("Links per sitemap must be at least 1","thinkrank"));if(t>5e4)throw new Error((0,a.__)("Links per sitemap cannot exceed 50,000","thinkrank"));return t},o=e=>{if(!e||"string"!=typeof e)throw new Error((0,a.__)("Sitemap URL cannot be empty","thinkrank"));const t=e.trim();if(t.length>200)throw new Error((0,a.__)("Sitemap URL too long (max 200 characters)","thinkrank"));const r=t.startsWith("/")?t:"/"+t;if(!/^\/[a-zA-Z0-9\-_/.]+\.xml$/.test(r))throw new Error((0,a.__)("Invalid sitemap URL format. Must be a valid path ending with .xml","thinkrank"));if(r.includes(".."))throw new Error((0,a.__)("Directory traversal not allowed in sitemap URL","thinkrank"));return r.replace(/\/+/g,"/")}},48719:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}))},48787:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M7 16.5h10V15H7v1.5zm0-9V9h10V7.5H7z"}))},48928:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 1.5c4.1 0 7.5 3.4 7.5 7.5v.1c-1.4-.8-3.3-1.7-3.4-1.8-.2-.1-.5-.1-.8.1l-2.9 2.1L9 11.3c-.2-.1-.4 0-.6.1l-3.7 2.2c-.1-.5-.2-1-.2-1.5 0-4.2 3.4-7.6 7.5-7.6zm0 15c-3.1 0-5.7-1.9-6.9-4.5l3.7-2.2 3.5 1.2c.2.1.5 0 .7-.1l2.9-2.1c.8.4 2.5 1.2 3.5 1.9-.9 3.3-3.9 5.8-7.4 5.8z"}))},48943:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"m6.6 15.6-1.2.8c.6.9 1.3 1.6 2.2 2.2l.8-1.2c-.7-.5-1.3-1.1-1.8-1.8zM5.5 12c0-.4 0-.9.1-1.3l-1.5-.3c0 .5-.1 1.1-.1 1.6s.1 1.1.2 1.6l1.5-.3c-.2-.4-.2-.9-.2-1.3zm11.9-3.6 1.2-.8c-.6-.9-1.3-1.6-2.2-2.2l-.8 1.2c.7.5 1.3 1.1 1.8 1.8zM5.3 7.6l1.2.8c.5-.7 1.1-1.3 1.8-1.8l-.7-1.3c-.9.6-1.7 1.4-2.3 2.3zm14.5 2.8-1.5.3c.1.4.1.8.1 1.3s0 .9-.1 1.3l1.5.3c.1-.5.2-1 .2-1.6s-.1-1.1-.2-1.6zM12 18.5c-.4 0-.9 0-1.3-.1l-.3 1.5c.5.1 1 .2 1.6.2s1.1-.1 1.6-.2l-.3-1.5c-.4.1-.9.1-1.3.1zm3.6-1.1.8 1.2c.9-.6 1.6-1.3 2.2-2.2l-1.2-.8c-.5.7-1.1 1.3-1.8 1.8zM10.4 4.2l.3 1.5c.4-.1.8-.1 1.3-.1s.9 0 1.3.1l.3-1.5c-.5-.1-1.1-.2-1.6-.2s-1.1.1-1.6.2z"}))},49083:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}))},49174:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.7 1.2c-.2-.3-.5-.7-.8-.9-.3-.3-.7-.5-1.1-.6-.5-.1-.9-.2-1.4-.2-.2 0-.5.1-.7.1-.2.1-.5.1-.7.2l.1-1.9h4.3V7H14l-.3 5 1 .6.5-.2.4-.1c.1-.1.3-.1.4-.1h.5c.5 0 1 .1 1.4.4.4.2.6.7.6 1.1 0 .4-.2.8-.6 1.1-.4.3-.9.4-1.4.4-.4 0-.9-.1-1.3-.3-.4-.2-.7-.4-1.1-.7 0 0-1.1 1.4-1 1.5.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.5 0 1-.1 1.5-.3s.9-.4 1.3-.7c.4-.3.7-.7.9-1.1s.3-.9.3-1.4-.1-1-.3-1.4z"}))},49301:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(51609),n=r(5573);const i=(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"}))},49323:(e,t,r)=>{"use strict";r.d(t,{$n:()=>a.A,EA:()=>M.Ay,EY:()=>k.A,Ex:()=>n.A,Fc:()=>m.A,JU:()=>p.A,Kp:()=>d.K,TM:()=>s.T,Zi:()=>c.A,Zp:()=>i.Ay,aF:()=>g.A,aR:()=>i.aR,cp:()=>x.A,hE:()=>y.A,l6:()=>o.A,lM:()=>l.A,mc:()=>h.A,oK:()=>N.A,pd:()=>s.A,pp:()=>u.A,rr:()=>M.rr,sk:()=>D.A,tU:()=>d.A,u4:()=>M.u4}),r(43273);var a=r(27531),n=r(40424),i=r(75417),s=r(65875),l=r(58459),o=r(43679),c=r(44707),d=r(73131),g=r(75986),M=(r(90520),r(6060)),u=r(25021),m=(r(69839),r(39905)),N=r(56070),h=(r(2407),r(99164)),p=r(65089),k=r(65092),y=r(8241),x=(r(40740),r(54890)),D=r(55230)},49639:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z"}))},49694:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var a=r(51609),n=r(27723),i=r(49323),s=r(94240);const l=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),(0,a.createElement)("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),(0,a.createElement)("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})),o=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("circle",{cx:"12",cy:"12",r:"10"}),(0,a.createElement)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,a.createElement)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})),c=({optimizationResults:e,activeSubSection:t,settings:r,handleSettingChange:c,setOptimizationResults:d})=>{const g={"basic-info":"all","title-formats":"title_formats",breadcrumbs:"breadcrumbs","hero-section":"hero_section","local-seo":"local_seo"}[t]||"all",M=e[g];if(!M)return null;const u=e=>e>=80?{cardBg:"tr-bg-success-bg tr-border tr-border-success",scoreText:"tr-text-success"}:e>=60?{cardBg:"tr-bg-warning-bg tr-border tr-border-warning",scoreText:"tr-text-warning"}:{cardBg:"tr-bg-danger-bg tr-border tr-border-danger",scoreText:"tr-text-danger"},m=void 0!==M.score?u(M.score):null;return(0,a.createElement)(i.Zp,{padding:!1,className:"tr-mt-4"},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary tr-flex tr-items-center tr-justify-between"},(0,a.createElement)("div",null,(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},"basic-info"===t?(0,n.__)("Rule-Based Optimization Results","thinkrank"):(0,n.__)("Section Optimization Results","thinkrank")),M.ai_model&&(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0 tr-mt-0.5"},(0,n.__)("Generated by:","thinkrank")," ",M.ai_model)),void 0!==M.score&&(0,a.createElement)("span",{className:`tr-inline-flex tr-items-center tr-gap-1.5 tr-text-xs tr-font-medium tr-px-2.5 tr-py-1 tr-rounded-full tr-border ${m.cardBg} ${m.scoreText}`},(0,n.__)("Score:","thinkrank")," ",M.score,"/100")),(0,a.createElement)("div",{className:"tr-p-5 tr-flex tr-flex-col tr-gap-5"},M.section_scores&&Object.keys(M.section_scores).length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide tr-m-0 tr-mb-2"},(0,n.__)("Section Scores","thinkrank")),(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-2 tr-gap-2"},Object.entries(M.section_scores).filter(([e])=>"basic-info"===t||e==={"title-formats":"title_formats",breadcrumbs:"breadcrumbs","hero-section":"hero_section","local-seo":"local_seo"}[t]).map(([e,t])=>{const r=u(t);return(0,a.createElement)("div",{key:e,className:`tr-px-3 tr-py-2 tr-rounded tr-text-xs ${r.cardBg}`},(0,a.createElement)("span",{className:"tr-font-semibold tr-text-secondary tr-block tr-mb-0.5"},e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())),(0,a.createElement)("span",{className:`tr-font-bold ${r.scoreText}`},t,"/100"))}))),M.warnings&&M.warnings.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide tr-m-0 tr-mb-2"},(0,n.__)("Warnings","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1.5"},M.warnings.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-bg-warning-bg tr-text-warning tr-flex tr-items-start tr-gap-2 tr-px-3 tr-py-2 tr-rounded tr-text-xs"},(0,a.createElement)("span",{className:"tr-shrink-0 tr-mt-0.5"},(0,a.createElement)(l,null)),(0,a.createElement)("span",null,e))))),M.suggestions&&M.suggestions.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide tr-m-0 tr-mb-2"},(0,n.__)("Optimization Suggestions","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1.5"},M.suggestions.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-bg-brand-bg tr-text-brand tr-flex tr-items-start tr-gap-2 tr-px-3 tr-py-2 tr-rounded tr-text-xs"},(0,a.createElement)("span",{className:"tr-shrink-0 tr-mt-0.5"},(0,a.createElement)(o,null)),(0,a.createElement)("span",null,e))))),M.optimized_data&&Object.keys(M.optimized_data).length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide tr-m-0 tr-mb-2"},(0,n.__)("Suggested Changes","thinkrank")),(0,a.createElement)("div",{className:"tr-bg-white tr-rounded tr-px-3 tr-py-3 tr-flex tr-flex-col tr-gap-2"},Object.keys(M.optimized_data).map(e=>(0,a.createElement)("div",{key:e,className:"tr-text-xs"},(0,a.createElement)("span",{className:"tr-font-semibold tr-text-secondary"},e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()),":"),(0,a.createElement)("span",{className:"tr-text-tertiary tr-ml-1"},M.optimized_data[e]))))),M.optimized_data&&Object.keys(M.optimized_data).length>0&&(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2"},(0,a.createElement)(i.$n,{variant:"primary",size:"md",onClick:()=>{Object.keys(M.optimized_data).forEach(e=>{r.hasOwnProperty(e)&&c(e,M.optimized_data[e])}),s.A.success("basic-info"===t?(0,n.__)("AI optimization suggestions applied successfully!","thinkrank"):(0,n.__)(`${(e=>({"basic-info":(0,n.__)("Basic Info","thinkrank"),"title-formats":(0,n.__)("Title Formats","thinkrank"),breadcrumbs:(0,n.__)("Breadcrumbs","thinkrank"),"robots-txt":(0,n.__)("Robots.txt","thinkrank"),"site-assets":(0,n.__)("Site Assets","thinkrank")}[e]||(0,n.__)("Site Identity","thinkrank")))(t)} optimization suggestions applied successfully!`,"thinkrank")),d(e=>{const t={...e};return delete t[g],t})}},"basic-info"===t?(0,n.__)("Apply AI Suggestions","thinkrank"):(0,n.__)("Apply Optimization Results","thinkrank")),(0,a.createElement)(i.$n,{variant:"secondary",size:"md",onClick:()=>{d(e=>{const t={...e};return delete t[g],t})}},(0,n.__)("Dismiss","thinkrank")))))}},49792:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z"}))},49946:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"}))},50016:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/SVG"},(0,a.createElement)(n.Path,{d:"M17.192 6.75L15.47 5.03l1.06-1.06 3.537 3.53-3.537 3.53-1.06-1.06 1.723-1.72h-3.19c-.602 0-.993.202-1.28.498-.309.319-.538.792-.695 1.383-.13.488-.222 1.023-.296 1.508-.034.664-.116 1.413-.303 2.117-.193.721-.513 1.467-1.068 2.04-.575.594-1.359.954-2.357.954H4v-1.5h4.003c.601 0 .993-.202 1.28-.498.308-.319.538-.792.695-1.383.149-.557.216-1.093.288-1.662l.039-.31a9.653 9.653 0 0 1 .272-1.653c.193-.722.513-1.467 1.067-2.04.576-.594 1.36-.954 2.358-.954h3.19zM8.004 6.75c.8 0 1.46.23 1.988.628a6.24 6.24 0 0 0-.684 1.396 1.725 1.725 0 0 0-.024-.026c-.287-.296-.679-.498-1.28-.498H4v-1.5h4.003zM12.699 14.726c-.161.459-.38.94-.684 1.396.527.397 1.188.628 1.988.628h3.19l-1.722 1.72 1.06 1.06L20.067 16l-3.537-3.53-1.06 1.06 1.723 1.72h-3.19c-.602 0-.993-.202-1.28-.498a1.96 1.96 0 0 1-.024-.026z"}))},50150:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var a=r(51609),n=r(27723),i=r(49323),s=r(85770),l=r(17098),o=r(20551);const c=({settings:e,handleSettingChange:t,onPersistSetting:r,isPersistingSetting:c=!1})=>{const d=!e.enabled;return(0,a.createElement)(i.mc,{direction:"column",gap:4},(0,a.createElement)(i.Zp,{padding:!1},(0,a.createElement)(s.A,{title:(0,n.__)("Breadcrumb Settings","thinkrank"),description:(0,n.__)("Configure how breadcrumb navigation appears on your site.","thinkrank"),withBorder:e.breadcrumbs_enabled,trailing:(0,a.createElement)(i.lM,{label:c?(0,n.__)("Saving…","thinkrank"):(0,n.__)("Enable breadcrumbs","thinkrank"),checked:e.breadcrumbs_enabled,onChange:e=>{r?r("breadcrumbs_enabled",e,e?(0,n.__)("Breadcrumbs are on.","thinkrank"):(0,n.__)("Breadcrumbs are off.","thinkrank")):t("breadcrumbs_enabled",e)},disabled:d||c})}),e.breadcrumbs_enabled&&(0,a.createElement)(i.mc,{direction:"column",gap:6,className:"tr-px-6 tr-py-6 tr-divide-y tr-divide-line-2"},(0,a.createElement)(l.A,{id:"tr-bc-type",label:(0,n.__)("Breadcrumb Type","thinkrank"),disabled:d},(0,a.createElement)(i.l6,{id:"tr-bc-type",value:e.breadcrumb_type,options:[{label:(0,n.__)("Hierarchical","thinkrank"),value:"hierarchical"},{label:(0,n.__)("Taxonomy-based","thinkrank"),value:"taxonomy"},{label:(0,n.__)("URL Path","thinkrank"),value:"path"},{label:(0,n.__)("Custom","thinkrank"),value:"custom"}],onChange:e=>t("breadcrumb_type",e.target.value),disabled:d})),(0,a.createElement)(l.A,{id:"tr-bc-home-text",label:(0,n.__)("Home Text","thinkrank"),description:(0,n.__)("Text for the home breadcrumb link","thinkrank"),disabled:d,className:"tr-pt-6"},(0,a.createElement)(i.pd,{id:"tr-bc-home-text",value:e.breadcrumb_home_text,onChange:e=>t("breadcrumb_home_text",e.target.value),placeholder:(0,n.__)("e.g., Home","thinkrank"),disabled:d})),(0,a.createElement)(l.A,{id:"tr-bc-separator",label:(0,n.__)("Breadcrumb Separator","thinkrank"),description:(0,n.__)("Character used to separate breadcrumb items","thinkrank"),disabled:d,className:"tr-pt-6"},(0,a.createElement)(i.pd,{id:"tr-bc-separator",value:e.breadcrumb_separator,onChange:e=>t("breadcrumb_separator",e.target.value),placeholder:"/",disabled:d})),(0,a.createElement)(l.A,{id:"tr-bc-prefix",label:(0,n.__)("Breadcrumb Prefix","thinkrank"),description:(0,n.__)('Text to show before breadcrumbs (e.g., "You are here:")',"thinkrank"),disabled:d,className:"tr-pt-6"},(0,a.createElement)(i.pd,{id:"tr-bc-prefix",value:e.breadcrumb_prefix,onChange:e=>t("breadcrumb_prefix",e.target.value),placeholder:(0,n.__)("e.g., You are here:","thinkrank"),disabled:d})),(0,a.createElement)("div",{className:"tr-pt-6"},(0,a.createElement)(i.lM,{label:(0,n.__)("Show Current Page","thinkrank"),checked:e.show_current_page,onChange:e=>t("show_current_page",e),description:(0,n.__)("Include the current page in breadcrumbs","thinkrank"),disabled:d})),(0,a.createElement)("div",{className:"tr-pt-6"},(0,a.createElement)(i.lM,{label:(0,n.__)("Use SEO Titles in Breadcrumbs","thinkrank"),checked:!!e.breadcrumb_use_seo_title,onChange:e=>t("breadcrumb_use_seo_title",e),description:(0,n.__)("Label each crumb with the SEO title of the post or term when one is set, so the trail matches the search snippet. Falls back to the normal title.","thinkrank"),disabled:d})))),e.breadcrumbs_enabled&&(0,a.createElement)(o.A,{className:"thinkrank-mt-sm",breadcrumbSettings:{breadcrumbs_enabled:e.breadcrumbs_enabled,breadcrumb_type:e.breadcrumb_type,breadcrumb_home_text:e.breadcrumb_home_text,breadcrumb_separator:e.breadcrumb_separator,breadcrumb_prefix:e.breadcrumb_prefix,show_current_page:e.show_current_page},disabled:!e.enabled}))}},50591:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(51609),n=r(5573);const i=(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}))},50637:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",d:"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z",clipRule:"evenodd"}))},50701:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M12 11v1.5h8V11h-8zm-6-1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}))},50861:(e,t,r)=>{"use strict";r(51609)},51039:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"}))},51050:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M12 9c-.8 0-1.5.7-1.5 1.5S11.2 12 12 12s1.5-.7 1.5-1.5S12.8 9 12 9zm0-5c-3.6 0-6.5 2.8-6.5 6.2 0 .8.3 1.8.9 3.1.5 1.1 1.2 2.3 2 3.6.7 1 3 3.8 3.2 3.9l.4.5.4-.5c.2-.2 2.6-2.9 3.2-3.9.8-1.2 1.5-2.5 2-3.6.6-1.3.9-2.3.9-3.1C18.5 6.8 15.6 4 12 4zm4.3 8.7c-.5 1-1.1 2.2-1.9 3.4-.5.7-1.7 2.2-2.4 3-.7-.8-1.9-2.3-2.4-3-.8-1.2-1.4-2.3-1.9-3.3-.6-1.4-.7-2.2-.7-2.5 0-2.6 2.2-4.7 5-4.7s5 2.1 5 4.7c0 .2-.1 1-.7 2.4z"}))},51529:(e,t,r)=>{"use strict";r.d(t,{N1:()=>u,nu:()=>N,yP:()=>m});var a=r(51609),n=r(44656);const i="label";function s(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function l(e,t){e.labels=t}function o(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i;const a=[];e.datasets=t.map(t=>{const n=e.datasets.find(e=>e[r]===t[r]);return n&&t.data&&!a.includes(n)?(a.push(n),Object.assign(n,t),n):{...t}})}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;const r={labels:[],datasets:[]};return l(r,e.labels),o(r,e.datasets,t),r}function d(e,t){const{height:r=150,width:i=300,redraw:d=!1,datasetIdKey:g,type:M,data:u,options:m,plugins:N=[],fallbackContent:h,updateMode:p,...k}=e,y=(0,a.useRef)(null),x=(0,a.useRef)(null),D=()=>{y.current&&(x.current=new n.t1(y.current,{type:M,data:c(u,g),options:m&&{...m},plugins:N}),s(t,x.current))},j=()=>{s(t,null),x.current&&(x.current.destroy(),x.current=null)};return(0,a.useEffect)(()=>{!d&&x.current&&m&&function(e,t){const r=e.options;r&&t&&Object.assign(r,t)}(x.current,m)},[d,m]),(0,a.useEffect)(()=>{!d&&x.current&&l(x.current.config.data,u.labels)},[d,u.labels]),(0,a.useEffect)(()=>{!d&&x.current&&u.datasets&&o(x.current.config.data,u.datasets,g)},[d,u.datasets]),(0,a.useEffect)(()=>{x.current&&(d?(j(),setTimeout(D)):x.current.update(p))},[d,m,u.labels,u.datasets,p]),(0,a.useEffect)(()=>{x.current&&(j(),setTimeout(D))},[M]),(0,a.useEffect)(()=>(D(),()=>j()),[]),a.createElement("canvas",{ref:y,role:"img",height:r,width:i,...k},h)}const g=(0,a.forwardRef)(d);function M(e,t){return n.t1.register(t),(0,a.forwardRef)((t,r)=>a.createElement(g,{...t,ref:r,type:e}))}const u=M("line",n.ZT),m=M("bar",n.A6),N=M("doughnut",n.ju)},51533:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"}))},51589:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z"}))},51609:e=>{"use strict";e.exports=window.React},51725:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>k,CB:()=>M,DT:()=>u,Fz:()=>h});var a=r(51609),n=r(86087),i=r(27723),s=r(56427),l=r(20285),o=r(97500),c=r.n(o),d=r(69432);l.thc,l.y_k,l.iRW,l.c05,l.NxZ,l.QR3,l.yoy,l.Bd3,l.tkm,l.Slp,l.aYu,l.uMJ,l.gi5,l.SeW,l.nfo,l.c05,l.ZSj,l.uzy,l.M_e;const g={"focus-pages":!0,performance:!0,"author-archives":!0,woocommerce:!0,"role-manager":!0,"internal-links":!0,"external-links":!0,analytics:["email-reporting","rank-tracker","traffic-recovery","index-status"],"global-seo":e=>e.map(e=>e.id).filter(e=>!["bulk-snippets","auto-ai"].includes(e)),schema:["organization","local-business","person","website","custom-schema","field-mapping","deployment"],"crawling-ai-indexing":["global-robot-meta","robots-management","publisher-sitemaps","llms-ai-indexing","markdown-for-ai","ai-usage-policy","llms-full"],"instant-indexing":["instant-indexing-submit-urls","instant-indexing-history"]},M=()=>[{id:"site-identity",title:(0,i.__)("Site Identity","thinkrank"),items:[{id:"basic-info",title:(0,i.__)("Basic Info","thinkrank")},{id:"title-formats",title:(0,i.__)("Title Formats","thinkrank")},{id:"breadcrumbs",title:(0,i.__)("Breadcrumbs","thinkrank")},{id:"hero-section",title:(0,i.__)("Hero & Branding","thinkrank")},{id:"local-seo",title:(0,i.__)("Business Info","thinkrank")}]},{id:"seo-analyzer",title:(0,i.__)("SEO Analyzer","thinkrank"),items:[{id:"site-audit",title:(0,i.__)("Site Audit","thinkrank")}]},{id:"author-archives",title:(0,i.__)("Author Archives","thinkrank"),items:[{id:"settings",title:(0,i.__)("Settings","thinkrank")}]},{id:"integrations",title:(0,i.__)("Integrations","thinkrank"),items:[{id:"google-services",title:(0,i.__)("Google Services","thinkrank")},{id:"social-platforms",title:(0,i.__)("Social Platforms","thinkrank")}]},{id:"analytics",title:(0,i.__)("Analytics","thinkrank"),items:[{id:"dashboard",title:(0,i.__)("Dashboard","thinkrank")},{id:"keywords",title:(0,i.__)("Keywords","thinkrank")},{id:"email-reporting",title:(0,i.__)("Email Reporting","thinkrank")},{id:"rank-tracker",title:(0,i.__)("Rank Tracker","thinkrank"),pro:!0},{id:"traffic-recovery",title:(0,i.__)("Traffic Recovery","thinkrank"),pro:!0},{id:"index-status",title:(0,i.__)("Index Status","thinkrank"),pro:!0}]},{id:"performance",title:(0,i.__)("Performance","thinkrank"),items:[{id:"core-web-vitals",title:(0,i.__)("Core Web Vitals","thinkrank")},{id:"seo-performance",title:(0,i.__)("Opportunities","thinkrank")},{id:"monitoring",title:(0,i.__)("Historical Data","thinkrank")},{id:"recommendations",title:(0,i.__)("Diagnostics","thinkrank")}]},{id:"ai-insights",title:(0,i.__)("AI Insights","thinkrank"),items:[{id:"ai-insights-overview",title:(0,i.__)("AI Traffic","thinkrank")}]},{id:"global-seo",title:(0,i.__)("Bulk SEO Optimization","thinkrank"),items:[...(window.thinkrankAdmin?.postTypes||[]).map(e=>({id:`${e.slug}-seo`,title:e.plural_name||e.label})),{id:"bulk-snippets",title:(0,i.__)("Bulk Snippets","thinkrank")},{id:"thin-content",title:(0,i.__)("Thin Content","thinkrank")},{id:"auto-ai",title:(0,i.__)("Auto AI","thinkrank"),pro:!0},{id:"content-type-matrix",title:(0,i.__)("Content Type Matrix","thinkrank")}]},{id:"image-seo",title:(0,i.__)("Image SEO","thinkrank"),items:[{id:"image-seo-settings",title:(0,i.__)("Image SEO Settings","thinkrank")}]},{id:"schema",title:(0,i.__)("Schema Manager","thinkrank"),items:[{id:"schema-settings",title:(0,i.__)("Schema Settings","thinkrank")},{id:"schema-types",title:(0,i.__)("Schema Types","thinkrank")},{id:"organization",title:(0,i.__)("Organization","thinkrank")},{id:"local-business",title:(0,i.__)("LocalBusiness","thinkrank")},{id:"person",title:(0,i.__)("Person","thinkrank")},{id:"website",title:(0,i.__)("Website","thinkrank")},{id:"custom-schema",title:(0,i.__)("Custom Schema","thinkrank"),pro:!0},{id:"field-mapping",title:(0,i.__)("Custom Fields","thinkrank"),pro:!0},{id:"deployment",title:(0,i.__)("Deployment","thinkrank")}]},{id:"internal-links",title:(0,i.__)("Internal Links","thinkrank"),items:[{id:"link-suggestions",title:(0,i.__)("AI Suggestions","thinkrank"),pro:!0}]},{id:"external-links",title:(0,i.__)("External Links","thinkrank"),items:[{id:"external-links-settings",title:(0,i.__)("Link Attributes","thinkrank")}]},{id:"redirections",title:(0,i.__)("Redirections","thinkrank"),items:[{id:"redirections-manager",title:(0,i.__)("Redirects & 404s","thinkrank"),pro:!0}]},{id:"broken-links",title:(0,i.__)("Broken Links","thinkrank"),items:[{id:"broken-links-report",title:(0,i.__)("Link Report","thinkrank"),pro:!0}]},{id:"woocommerce",title:(0,i.__)("WooCommerce","thinkrank"),items:[{id:"woocommerce-settings",title:(0,i.__)("Product SEO","thinkrank"),pro:!0}]},{id:"social-media",title:(0,i.__)("Social Media","thinkrank"),items:[{id:"open-graph",title:(0,i.__)("Open Graph","thinkrank")},{id:"twitter-cards",title:(0,i.__)("Twitter Cards","thinkrank")},{id:"preview",title:(0,i.__)("Preview","thinkrank")}]},{id:"focus-pages",title:(0,i.__)("Focus Pages","thinkrank"),items:[{id:"focus-pages-board",title:(0,i.__)("Diagnosis","thinkrank"),pro:!0}]},{id:"crawling-ai-indexing",title:(0,i.__)("Crawling & AI Indexing","thinkrank"),items:[{id:"global-robot-meta",title:(0,i.__)("Global Robots Meta","thinkrank")},{id:"robots-management",title:(0,i.__)("Robots.txt","thinkrank")},{id:"xml-sitemap",title:(0,i.__)("XML Sitemap","thinkrank")},{id:"publisher-sitemaps",title:(0,i.__)("Publisher Sitemaps","thinkrank"),pro:!0},{id:"llms-ai-indexing",title:(0,i.__)("LLMs.txt for AI","thinkrank")},{id:"markdown-for-ai",title:(0,i.__)("Markdown for AI","thinkrank"),pro:!0},{id:"ai-usage-policy",title:(0,i.__)("AI Usage Policy","thinkrank"),pro:!0},{id:"llms-full",title:(0,i.__)("llms-full.txt","thinkrank"),pro:!0}]},{id:"instant-indexing",title:(0,i.__)("Instant Indexing","thinkrank"),items:[{id:"instant-indexing-settings",title:(0,i.__)("Settings","thinkrank")},{id:"instant-indexing-submit-urls",title:(0,i.__)("Submit URLs","thinkrank")},{id:"instant-indexing-history",title:(0,i.__)("History","thinkrank")}]},{id:"role-manager",title:(0,i.__)("Role Manager","thinkrank"),items:[{id:"role-manager-settings",title:(0,i.__)("Access Control","thinkrank")}]}].map(e=>{const t=g[e.id];if(!t)return e;let r=t;return"function"==typeof t&&(r=t(e.items)),{...e,items:e.items.map(e=>!0===r||r.includes(e.id)?{...e,advanced:!0}:e)}}),u=()=>[{id:"site-identity",title:(0,i.__)("Site Identity","thinkrank"),sections:["site-identity"]},{id:"seo-analyzer",title:(0,i.__)("SEO Analyzer","thinkrank"),sections:["seo-analyzer"]},{id:"focus-pages",title:(0,i.__)("Focus Pages","thinkrank"),sections:["focus-pages"]},{id:"integrations",title:(0,i.__)("Integrations","thinkrank"),sections:["integrations"]},{id:"analytics",title:(0,i.__)("Analytics","thinkrank"),sections:["analytics"]},{id:"performance",title:(0,i.__)("Performance","thinkrank"),sections:["performance"]},{id:"ai-insights",title:(0,i.__)("AI Insights","thinkrank"),sections:["ai-insights"]},{id:"content-seo",title:(0,i.__)("Bulk SEO Optimization","thinkrank"),sections:["global-seo"]},{id:"author-archives",title:(0,i.__)("Author Archives","thinkrank"),sections:["author-archives"]},{id:"image-seo",title:(0,i.__)("Image SEO","thinkrank"),sections:["image-seo"]},{id:"links",title:(0,i.__)("Link Manager","thinkrank"),sections:["internal-links","external-links","redirections","broken-links"]},{id:"schema",title:(0,i.__)("Schema Manager","thinkrank"),sections:["schema"]},{id:"social-media",title:(0,i.__)("Social Media","thinkrank"),sections:["social-media"]},{id:"crawling",title:(0,i.__)("Crawling","thinkrank"),sections:["crawling-ai-indexing"]},{id:"indexing",title:(0,i.__)("Indexing","thinkrank"),sections:["instant-indexing"]},{id:"woocommerce",title:(0,i.__)("WooCommerce","thinkrank"),sections:["woocommerce"]},{id:"role-manager",title:(0,i.__)("Role Manager","thinkrank"),sections:["role-manager"]}],m={"seo-analyzer":l.thc,"focus-pages":l.y_k,"ai-insights":l.tkm,"site-identity":l.iRW,analytics:l.QR3,performance:l.yoy,"content-seo":l.Bd3,"author-archives":l.c05,"image-seo":l.Slp,links:l.nfo,schema:l.aYu,"social-media":l.uMJ,integrations:l.NxZ,crawling:l.gi5,indexing:l.SeW,woocommerce:l.M_e,"role-manager":l.c05},N=["seo-analyzer"],h=e=>{if(N.includes(e))return Boolean(window.thinkrankAdmin?.isAdmin);const t=window.thinkrankAdmin?.caps||[],r=(window.thinkrankAdmin?.sectionCaps||{})[e];return!r||t.includes(r)},p=({open:e})=>(0,a.createElement)("svg",{viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:c()("tr-w-3.5 tr-h-3.5 tr-shrink-0 tr-transition-transform tr-duration-150",e?"tr-rotate-90":"")},(0,a.createElement)("path",{fillRule:"evenodd",d:"M6.22 4.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06l-3.25 3.25a.75.75 0 0 1-1.06-1.06L8.94 8 6.22 5.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})),k=(0,n.memo)(({activeSection:e,activeItem:t,onNavigate:r})=>{const l=window.thinkrankAdmin?.isPro,{mode:o}=(0,d.Pr)(),g=(0,n.useMemo)(()=>M(),[]),N=(0,n.useMemo)(()=>u(),[]),k=(0,n.useMemo)(()=>(()=>{const e={};return u().forEach(t=>{t.sections.forEach(r=>{e[r]=t.id})}),e})(),[]),y=(0,n.useMemo)(()=>{const e={};return g.forEach(t=>{e[t.id]=t}),e},[g]),x=(0,n.useCallback)(e=>{const t=[];return e.sections.forEach(e=>{if(!h(e))return;const r=y[e];r&&r.items.forEach(r=>{(0,d.HF)(r,o)&&t.push({sectionId:e,item:r})})}),t},[y,o]),[D,j]=(0,n.useState)(()=>k[e]||null);(0,n.useEffect)(()=>{const t=k[e];t&&j(t)},[e,k]);const I=(0,n.useCallback)(e=>{j(t=>t===e?null:e)},[]),E=(0,n.useCallback)((e,t)=>r(e,t),[r]);return(0,a.createElement)("nav",{className:"tr-bg-white tr-rounded-lg tr-border tr-border-secondary tr-shadow-sm tr-overflow-hidden","aria-label":(0,i.__)("Settings navigation","thinkrank")},N.map((r,n)=>{const i=x(r);if(0===i.length)return null;const o=D===r.id,d=k[e]===r.id,g=m[r.id];if(1===i.length){const{sectionId:e,item:t}=i[0],o=t.pro&&!l;let M="tr-text-secondary hover:tr-bg-white hover:tr-text-primary";return d&&(M="tr-text-brand tr-bg-brand-bg"),(0,a.createElement)("div",{key:r.id,className:c()(n>0&&"tr-border-t tr-border-secondary")},(0,a.createElement)("button",{type:"button",onClick:()=>E(e,t.id),className:c()("tr-relative tr-flex tr-items-center tr-w-full tr-gap-2.5","tr-pl-4 tr-pr-3 tr-py-2.5 tr-text-left","tr-text-sm tr-font-semibold tr-transition-colors tr-duration-150","focus:tr-outline-none focus-visible:tr-ring-2 focus-visible:tr-ring-brand focus-visible:tr-ring-inset",M)},d&&(0,a.createElement)("span",{"aria-hidden":"true",className:"tr-absolute tr-left-0 tr-top-1.5 tr-bottom-1.5 tr-w-0.5 tr-rounded-r tr-bg-brand"}),g&&(0,a.createElement)("span",{className:c()("tr-shrink-0 tr-flex tr-items-center tr-justify-center",d?"tr-text-brand":"tr-text-tertiary"),"aria-hidden":"true"},(0,a.createElement)(s.Icon,{icon:g,size:18})),(0,a.createElement)("span",{className:"tr-flex-1 tr-truncate"},r.title),o&&(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-px-1.5 tr-py-px tr-rounded tr-text-[10px] tr-font-semibold tr-bg-brand-bg tr-text-brand tr-shrink-0"},"PRO")))}return(0,a.createElement)("div",{key:r.id,className:c()(n>0&&"tr-border-t tr-border-secondary")},(0,a.createElement)("button",{type:"button",onClick:()=>I(r.id),className:c()("tr-relative tr-flex tr-items-center tr-w-full tr-gap-2.5","tr-pl-4 tr-pr-3 tr-py-2.5 tr-text-left","tr-text-sm tr-font-semibold tr-transition-colors tr-duration-150","focus:tr-outline-none focus-visible:tr-ring-2 focus-visible:tr-ring-brand focus-visible:tr-ring-inset",d?"tr-text-brand tr-bg-brand-bg":"tr-text-secondary hover:tr-bg-white hover:tr-text-primary"),"aria-expanded":o},d&&(0,a.createElement)("span",{"aria-hidden":"true",className:"tr-absolute tr-left-0 tr-top-1.5 tr-bottom-1.5 tr-w-0.5 tr-rounded-r tr-bg-brand"}),g&&(0,a.createElement)("span",{className:c()("tr-shrink-0 tr-flex tr-items-center tr-justify-center",d?"tr-text-brand":"tr-text-tertiary"),"aria-hidden":"true"},(0,a.createElement)(s.Icon,{icon:g,size:18})),(0,a.createElement)("span",{className:"tr-flex-1 tr-truncate"},r.title),(0,a.createElement)("span",{className:c()("tr-shrink-0",d?"tr-text-brand":"tr-text-tertiary")},(0,a.createElement)(p,{open:o}))),(0,a.createElement)("div",{className:c()("tr-grid tr-transition-[grid-template-rows] tr-duration-200 tr-ease-out",o?"tr-grid-rows-[1fr]":"tr-grid-rows-[0fr]"),...!o&&{inert:""}},(0,a.createElement)("div",{className:"tr-overflow-hidden"},(0,a.createElement)("ul",{className:c()("tr-list-none tr-m-0 tr-py-1 tr-pl-7 tr-pr-2","tr-relative",'before:tr-content-[""] before:tr-absolute before:tr-top-1 before:tr-bottom-1',"before:tr-left-[1.5rem] before:tr-w-px before:tr-bg-line-2")},i.map(({sectionId:r,item:n})=>{const i=e===r&&t===n.id,s=n.pro&&!l;let o="tr-text-secondary hover:tr-text-primary";return i&&(o="tr-text-brand tr-font-medium"),(0,a.createElement)("li",{key:`${r}-${n.id}`,className:"tr-m-0"},(0,a.createElement)("button",{type:"button",onClick:()=>E(r,n.id),className:c()("tr-relative tr-flex tr-items-center tr-justify-between tr-w-full tr-gap-2","tr-px-2.5 tr-py-1.5 tr-rounded-md tr-text-sm tr-text-left","tr-transition-colors tr-duration-150","focus:tr-outline-none focus-visible:tr-ring-2 focus-visible:tr-ring-brand",o)},i&&(0,a.createElement)("span",{"aria-hidden":"true",className:"tr-absolute tr--left-[5px] tr-top-1.5 tr-bottom-1.5 tr-w-0.5 tr-rounded-r tr-bg-brand"}),(0,a.createElement)("span",{className:"tr-truncate"},n.title),s&&(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-px-1.5 tr-py-px tr-rounded tr-text-[10px] tr-font-semibold tr-bg-brand-bg tr-text-brand tr-shrink-0"},"PRO")))})))))}))})},52352:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var a=r(51609),n=r(97500),i=r.n(n),s=r(56427),l=r(20285);const o=e=>{if("string"!=typeof e||""===e)return"";const t=document.createElement("textarea");return t.innerHTML=e,t.value};function c({siteTitle:e="",title:t="",description:r="",permalink:n="",faviconURL:c="",deviceType:d="desktop",className:g}){const M=o(t),u=o(r);return(0,a.createElement)("div",{className:i()("tr-p-2 tr-rounded-lg tr-bg-white",g)},(0,a.createElement)("div",{className:"tr-rounded-md tr-border tr-border-solid tr-border-secondary tr-bg-white tr-p-4 tr-shadow-sm tr-flex tr-flex-col tr-gap-1.5"},(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-[1.75rem_1fr] tr-items-center tr-gap-3"},c?(0,a.createElement)("div",{className:"tr-relative tr-w-7 tr-h-7 tr-rounded-full tr-overflow-hidden tr-border tr-border-secondary tr-bg-white"},(0,a.createElement)("img",{className:"tr-w-full tr-h-full tr-object-cover tr-m-0",src:c,alt:""})):(0,a.createElement)("div",{className:"tr-w-7 tr-h-7 tr-rounded-full tr-border tr-border-secondary tr-bg-white tr-flex tr-items-center tr-justify-center tr-text-tertiary"},(0,a.createElement)(s.Icon,{icon:l.gi5,size:16})),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-0.5 tr-min-w-0"},(0,a.createElement)("span",{className:"tr-text-primary tr-font-semibold tr-text-sm tr-leading-tight tr-truncate"},e),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-start tr-gap-2 tr-min-w-0"},(0,a.createElement)("span",{className:"tr-text-secondary tr-text-xs tr-leading-tight tr-truncate tr-break-all"},n),(0,a.createElement)(s.Icon,{icon:l.YAl,size:14,className:"tr-text-tertiary tr-shrink-0"})))),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1"},(0,a.createElement)("p",{className:"tr-text-xl tr-leading-7 tr-font-normal tr-text-[#1a0dab] tr-m-0 tr-p-0 tr-line-clamp-1 tr-break-all"},M),(0,a.createElement)("p",{className:i()("tr-text-sm tr-leading-5 tr-font-normal tr-text-secondary tr-m-0 tr-break-words","mobile"===d&&"tr-text-base tr-leading-6 tr-line-clamp-2")},u))))}},52459:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(51609),n=r(27723),i=r(56427);const s=({values:e,onChange:t})=>{const r={index:!0,noindex:!1,nofollow:!1,noarchive:!1,noimageindex:!1,nosnippet:!1,...e},s=(e,a)=>{const n={...r,[e]:a};"index"===e&&a?n.noindex=!1:"noindex"===e&&a&&(n.index=!1),t(n)};return(0,a.createElement)("div",{className:"thinkrank-robot-meta-settings"},(0,a.createElement)("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"20px"}},(0,a.createElement)("div",{style:{display:"flex",flexDirection:"column",gap:"15px"}},(0,a.createElement)(i.CheckboxControl,{label:(0,n.__)("Index","thinkrank"),help:(0,n.__)("Allow search engines to index this content.","thinkrank"),checked:r.index,onChange:e=>s("index",e),__nextHasNoMarginBottom:!0}),(0,a.createElement)(i.CheckboxControl,{label:(0,n.__)("No Follow","thinkrank"),help:(0,n.__)("Do not follow links on this page.","thinkrank"),checked:r.nofollow,onChange:e=>s("nofollow",e),__nextHasNoMarginBottom:!0})),(0,a.createElement)("div",{style:{display:"flex",flexDirection:"column",gap:"15px"}},(0,a.createElement)(i.CheckboxControl,{label:(0,n.__)("No Index","thinkrank"),help:(0,n.__)("Do not allow search engines to index this content.","thinkrank"),checked:r.noindex,onChange:e=>s("noindex",e),__nextHasNoMarginBottom:!0}),(0,a.createElement)(i.CheckboxControl,{label:(0,n.__)("No Archive","thinkrank"),help:(0,n.__)("Do not show a cached link in search results.","thinkrank"),checked:r.noarchive,onChange:e=>s("noarchive",e),__nextHasNoMarginBottom:!0})),(0,a.createElement)("div",{style:{display:"flex",flexDirection:"column",gap:"15px"}},(0,a.createElement)(i.CheckboxControl,{label:(0,n.__)("No Snippet","thinkrank"),help:(0,n.__)("Do not show a snippet in search results.","thinkrank"),checked:r.nosnippet,onChange:e=>s("nosnippet",e),__nextHasNoMarginBottom:!0}),(0,a.createElement)(i.CheckboxControl,{label:(0,n.__)("No Image Index","thinkrank"),help:(0,n.__)("Do not index images on this page.","thinkrank"),checked:r.noimageindex,onChange:e=>s("noimageindex",e),__nextHasNoMarginBottom:!0}))))}},52495:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(51609),n=r(27723),i=r(97500),s=r.n(i);const l={ai:{defaultLabel:(0,n.__)("AI Optimize","thinkrank"),defaultLoadingLabel:(0,n.__)("Optimizing…","thinkrank"),ai:!0},rule:{defaultLabel:(0,n.__)("Optimize","thinkrank"),defaultLoadingLabel:(0,n.__)("Optimizing…","thinkrank"),ai:!1},validate:{defaultLabel:(0,n.__)("Validate","thinkrank"),defaultLoadingLabel:(0,n.__)("Validating…","thinkrank"),ai:!1},test:{defaultLabel:(0,n.__)("Test Connection","thinkrank"),defaultLoadingLabel:(0,n.__)("Testing…","thinkrank"),ai:!1},generate:{defaultLabel:(0,n.__)("Generate","thinkrank"),defaultLoadingLabel:(0,n.__)("Generating…","thinkrank"),ai:!1},refresh:{defaultLabel:(0,n.__)("Refresh Data","thinkrank"),defaultLoadingLabel:(0,n.__)("Refreshing…","thinkrank"),ai:!1}},o=({type:e="rule",onClick:t,isBusy:r=!1,disabled:n=!1,label:i,loadingLabel:o,className:c="",...d})=>{const g=l[e]||l.rule,M=n||r,u=r?o||g.defaultLoadingLabel:i||g.defaultLabel;return(0,a.createElement)("button",{type:"button",disabled:M,"aria-busy":r||void 0,onClick:M?void 0:t,className:s()("tr-inline-flex tr-items-center tr-gap-1.5","tr-h-8 tr-px-3 tr-rounded tr-border","tr-text-xs tr-font-medium tr-whitespace-nowrap","tr-transition-colors tr-duration-150","focus:tr-outline-none","disabled:tr-opacity-50 disabled:tr-cursor-not-allowed",g.ai?"tr-bg-brand tr-text-white tr-border-transparent hover:tr-bg-brand":"tr-bg-white tr-text-secondary tr-border-primary hover:tr-bg-white hover:tr-text-primary",c),...d},g.ai&&!r&&(0,a.createElement)("svg",{"aria-hidden":"true",width:"12",height:"14",viewBox:"0 0 15 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)("path",{d:"M5.58072 3.39707L6.0826 4.79082C6.35798 5.55489 6.79852 6.2488 7.37282 6.8231C7.94712 7.3974 8.64103 7.83794 9.4051 8.11332L10.7988 8.6152C10.8264 8.62529 10.8501 8.64359 10.8669 8.66762C10.8837 8.69165 10.8927 8.72026 10.8927 8.74957C10.8927 8.77888 10.8837 8.80749 10.8669 8.83152C10.8501 8.85556 10.8264 8.87385 10.7988 8.88395L9.4051 9.38582C8.64103 9.6612 7.94712 10.1017 7.37282 10.676C6.79852 11.2503 6.35798 11.9443 6.0826 12.7083L5.58072 14.1021C5.57063 14.1296 5.55233 14.1534 5.5283 14.1701C5.50427 14.1869 5.47566 14.1959 5.44635 14.1959C5.41704 14.1959 5.38843 14.1869 5.3644 14.1701C5.34036 14.1534 5.32207 14.1296 5.31197 14.1021L4.8101 12.7083C4.53472 11.9443 4.09418 11.2503 3.51988 10.676C2.94558 10.1017 2.25167 9.6612 1.4876 9.38582L0.093849 8.88395C0.0663279 8.87385 0.0425693 8.85556 0.025785 8.83152C0.00900062 8.80749 0 8.77888 0 8.74957C0 8.72026 0.00900062 8.69165 0.025785 8.66762C0.0425693 8.64359 0.0663279 8.62529 0.093849 8.6152L1.4876 8.11332C2.25167 7.83794 2.94558 7.3974 3.51988 6.8231C4.09418 6.2488 4.53472 5.55489 4.8101 4.79082L5.31197 3.39707C5.32179 3.36927 5.33998 3.3452 5.36405 3.32817C5.38811 3.31115 5.41687 3.302 5.44635 3.302C5.47583 3.302 5.50459 3.31115 5.52865 3.32817C5.55272 3.3452 5.57091 3.36927 5.58072 3.39707ZM11.8545 0.0476961L12.1088 0.753321C12.2484 1.14018 12.4715 1.49151 12.7624 1.78232C13.0532 2.07313 13.4045 2.29625 13.7913 2.43582L14.497 2.6902C14.511 2.69529 14.523 2.70455 14.5316 2.71674C14.5401 2.72893 14.5447 2.74344 14.5447 2.75832C14.5447 2.7732 14.5401 2.78772 14.5316 2.7999C14.523 2.81209 14.511 2.82136 14.497 2.82645L13.7913 3.08082C13.4045 3.22039 13.0532 3.44352 12.7624 3.73432C12.4715 4.02513 12.2484 4.37646 12.1088 4.76332L11.8545 5.46895C11.8494 5.48293 11.8401 5.495 11.8279 5.50353C11.8157 5.51207 11.8012 5.51664 11.7863 5.51664C11.7715 5.51664 11.757 5.51207 11.7448 5.50353C11.7326 5.495 11.7233 5.48293 11.7182 5.46895L11.4639 4.76332C11.3243 4.37646 11.1012 4.02513 10.8103 3.73432C10.5195 3.44352 10.1682 3.22039 9.78135 3.08082L9.07572 2.82645C9.06174 2.82136 9.04967 2.81209 9.04114 2.7999C9.03261 2.78772 9.02803 2.7732 9.02803 2.75832C9.02803 2.74344 9.03261 2.72893 9.04114 2.71674C9.04967 2.70455 9.06174 2.69529 9.07572 2.6902L9.78135 2.43582C10.1682 2.29625 10.5195 2.07313 10.8103 1.78232C11.1012 1.49151 11.3243 1.14018 11.4639 0.753321L11.7182 0.0476961C11.7233 0.0337168 11.7326 0.0216418 11.7448 0.0131093C11.757 0.00457683 11.7715 0 11.7863 0C11.8012 0 11.8157 0.00457683 11.8279 0.0131093C11.8401 0.0216418 11.8494 0.0337168 11.8545 0.0476961ZM11.8545 12.0308L12.1088 12.7364C12.2484 13.1233 12.4715 13.4746 12.7624 13.7654C13.0532 14.0563 13.4045 14.2794 13.7913 14.4189L14.497 14.6733C14.511 14.6784 14.523 14.6877 14.5316 14.6999C14.5401 14.7121 14.5447 14.7266 14.5447 14.7414C14.5447 14.7563 14.5401 14.7708 14.5316 14.783C14.523 14.7952 14.511 14.8045 14.497 14.8096L13.7913 15.0639C13.4045 15.2035 13.0532 15.4266 12.7624 15.7174C12.4715 16.0083 12.2484 16.3596 12.1088 16.7464L11.8545 17.4521C11.8494 17.4661 11.8401 17.4781 11.8279 17.4867C11.8157 17.4952 11.8012 17.4998 11.7863 17.4998C11.7715 17.4998 11.757 17.4952 11.7448 17.4867C11.7326 17.4781 11.7233 17.4661 11.7182 17.4521L11.4639 16.7464C11.3243 16.3596 11.1012 16.0083 10.8103 15.7174C10.5195 15.4266 10.1682 15.2035 9.78135 15.0639L9.07572 14.8096C9.06174 14.8045 9.04967 14.7952 9.04114 14.783C9.03261 14.7708 9.02803 14.7563 9.02803 14.7414C9.02803 14.7266 9.03261 14.7121 9.04114 14.6999C9.04967 14.6877 9.06174 14.6784 9.07572 14.6733L9.78135 14.4189C10.1682 14.2794 10.5195 14.0563 10.8103 13.7654C11.1012 13.4746 11.3243 13.1233 11.4639 12.7364L11.7182 12.0308C11.7413 11.9671 11.832 11.9671 11.8545 12.0308Z",fill:"currentColor"})),u)}},52619:e=>{"use strict";e.exports=window.wp.hooks},52806:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,a.createElement)(n.Path,{d:"M6.4 3.776v3.648H2.752v1.792H6.4v3.648h1.728V9.216h3.712V7.424H8.128V3.776zM0 17.92V0h20.48v17.92H0zM12.8 1.28H1.28v14.08H12.8V1.28zm6.4 0h-5.12v3.84h5.12V1.28zm0 5.12h-5.12v3.84h5.12V6.4zm0 5.12h-5.12v3.84h5.12v-3.84z"}))},52835:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M12.5 14.5h-1V16h1c2.2 0 4-1.8 4-4s-1.8-4-4-4h-1v1.5h1c1.4 0 2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5zm-4 1.5v-1.5h-1C6.1 14.5 5 13.4 5 12s1.1-2.5 2.5-2.5h1V8h-1c-2.2 0-4 1.8-4 4s1.8 4 4 4h1zm-1-3.2h5v-1.5h-5v1.5zM18 4H9c-1.1 0-2 .9-2 2v.5h1.5V6c0-.3.2-.5.5-.5h9c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5v-.5H7v.5c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2z"}))},53041:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"}))},53437:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"}))},53581:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,a.createElement)(n.Path,{d:"M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z"}))},54273:(e,t,r)=>{"use strict";r.d(t,{ST:()=>l,Ur:()=>o,lA:()=>s});var a=r(27723),n=r(1455),i=r.n(n);const s=()=>({enabled:!0,selected_preset:"basic",sitemap_urls:[{url:"/sitemap.xml",type:"general",enabled:!0,last_checked:null,status:"unknown"}],use_sitemap_index:!1,delivery_mode:"auto",links_per_sitemap:1e3,include_images:!0,include_featured_images:!1,auto_generate:!0,ping_search_engines:!0,exclude_posts:"",exclude_terms:"",exclude_password_protected:!0,exclude_private_posts:!0,enable_styling:!0,custom_url_pattern:"sitemap-{type}.xml",styling_logo:!1,styling_logo_url:"",styling_color_main:"",styling_color_accent:""}),l=(e,t)=>{const r=(t.custom_url_pattern||"sitemap-{type}.xml").replace("{type}",e);return r.startsWith("/")?r:"/"+r},o=async(e,t)=>{if(!e)return;t.setSelectedPreset(e),t.setSettings(t=>({...t,selected_preset:e}));let r=[],n=!1,s=!1;const o=e=>l(e,t.settings);switch(e){case"basic":r=[{url:"/sitemap.xml",type:"general",enabled:!0,last_checked:null,status:"unknown"}],n=!1;break;case"wordpress-core":r=[{url:"/wp-sitemap.xml",type:"wordpress",enabled:!0,last_checked:null,status:"unknown"}],n=!1;break;case"segmented":r=[{url:"/sitemap_index.xml",type:"index",enabled:!0,last_checked:null,status:"unknown"},{url:o("posts"),type:"posts",enabled:!0,last_checked:null,status:"unknown"},{url:o("pages"),type:"pages",enabled:!0,last_checked:null,status:"unknown"},{url:o("categories"),type:"categories",enabled:!0,last_checked:null,status:"unknown"}],n=!0;break;case"ecommerce":try{const e=await i()({path:"/thinkrank/v1/sitemap/woocommerce-status"});e.success&&e.data.is_active?(r=[{url:"/sitemap_index.xml",type:"index",enabled:!0,last_checked:null,status:"unknown"},{url:o("products"),type:"products",enabled:!0,last_checked:null,status:"unknown"},{url:o("product_categories"),type:"product_categories",enabled:!0,last_checked:null,status:"unknown"}],n=!0):(r=[{url:"/sitemap.xml",type:"general",enabled:!0,last_checked:null,status:"unknown"}],n=!1,t.setNotice({status:"warning",message:(0,a.__)("WooCommerce is not active. E-commerce template has been changed to Basic template.","thinkrank")}),s=!0,setTimeout(()=>t.setNotice(null),5e3),t.setSelectedPreset("basic"),t.setSettings(e=>({...e,selected_preset:"basic"})))}catch(e){r=[{url:"/sitemap.xml",type:"general",enabled:!0,last_checked:null,status:"unknown"}],n=!1,t.setNotice({status:"error",message:(0,a.__)("Failed to check WooCommerce status. E-commerce template has been changed to Basic template.","thinkrank")}),s=!0,setTimeout(()=>t.setNotice(null),5e3),t.setSelectedPreset("basic"),t.setSettings(e=>({...e,selected_preset:"basic"}))}break;case"complete":r=[{url:"/sitemap_index.xml",type:"index",enabled:!0,last_checked:null,status:"unknown"},{url:o("posts"),type:"posts",enabled:!0,last_checked:null,status:"unknown"},{url:o("pages"),type:"pages",enabled:!0,last_checked:null,status:"unknown"},{url:o("categories"),type:"categories",enabled:!0,last_checked:null,status:"unknown"}];try{const e=await i()({path:"/thinkrank/v1/sitemap/woocommerce-status"});e.success&&e.data.is_active&&r.push({url:o("products"),type:"products",enabled:!0,last_checked:null,status:"unknown"},{url:o("product_categories"),type:"product_categories",enabled:!0,last_checked:null,status:"unknown"})}catch(e){}try{const e=await i()({path:"/thinkrank/v1/sitemap/custom-post-types"});e.success&&e.data&&e.data.forEach(e=>{r.push({url:o(e.name),type:e.name,enabled:!0,last_checked:null,status:"unknown"})})}catch(e){t.setNotice({status:"warning",message:(0,a.__)("Failed to fetch custom post types. Complete template may not include all content types.","thinkrank")}),s=!0,setTimeout(()=>t.setNotice(null),5e3)}n=!0;break;default:return}t.setSettings(e=>({...e,sitemap_urls:r,use_sitemap_index:n,last_generated:""})),t.setHasChanges(!0),s||t.setNotice({status:"info",message:(0,a.__)('Template applied. Click "Generate Sitemap" to create the sitemap files.',"thinkrank")})}},54288:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var a=r(51609),n=r(86087),i=r(27723),s=r(49323);const l={homepage_title:(0,i.__)("Homepage","thinkrank"),post_title:(0,i.__)("Blog Post","thinkrank"),page_title:(0,i.__)("Page","thinkrank"),category_title:(0,i.__)("Category","thinkrank"),tag_title:(0,i.__)("Tag","thinkrank"),author_title:(0,i.__)("Author","thinkrank"),search_title:(0,i.__)("Search Results","thinkrank"),archive_title:(0,i.__)("Archive","thinkrank")},o={homepage_title:"yoursite.com",post_title:"yoursite.com › blog › sample-post",page_title:"yoursite.com › sample-page",category_title:"yoursite.com › category › sample",tag_title:"yoursite.com › tag › sample",author_title:"yoursite.com › author › john-doe",search_title:"yoursite.com › ?s=sample+search",archive_title:"yoursite.com › archive"},c=()=>(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-center tr-w-4 tr-h-4 tr-rounded-full tr-bg-line-2 tr-shrink-0"},(0,a.createElement)("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"#94a3b8",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("circle",{cx:"12",cy:"12",r:"10"}),(0,a.createElement)("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),(0,a.createElement)("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"}))),d=({pageType:e,preview:t,label:r,url:n})=>{const s=t.length,{status:l,msg:o}=(e=>0===e?{status:"empty",msg:""}:e<30?{status:"short",msg:(0,i.__)("Too short","thinkrank")}:e>60?{status:"long",msg:(0,i.__)("Too long, may be truncated","thinkrank")}:{status:"good",msg:(0,i.__)("Good length","thinkrank")})(s),d=Math.min(s/60*100,100),g="good"===l?"tr-bg-success":"empty"===l?"tr-bg-line-2":"tr-bg-warning",M="good"===l?"tr-text-success":"empty"===l?"tr-text-tertiary":"tr-text-warning",u="good"===l?"tr-bg-success-bg tr-text-success tr-border-success":"empty"===l?"tr-bg-white tr-text-tertiary tr-border-secondary":"tr-bg-warning-bg tr-text-warning tr-border-warning";return(0,a.createElement)("div",{className:"tr-border tr-border-secondary tr-rounded-lg tr-overflow-hidden"},(0,a.createElement)("div",{className:"tr-px-4 tr-py-2 tr-bg-white tr-border-b tr-border-secondary tr-flex tr-items-center tr-justify-between"},(0,a.createElement)("span",{className:`tr-text-xs tr-font-medium tr-px-2 tr-py-0.5 tr-rounded-full tr-border ${u}`},r),s>0&&(0,a.createElement)("span",{className:`tr-text-xs tr-font-medium ${M}`},s,"/60")),(0,a.createElement)("div",{className:"tr-p-4 tr-bg-white"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-1.5 tr-mb-1"},(0,a.createElement)(c,null),(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary tr-truncate"},n)),(0,a.createElement)("div",{className:"tr-text-base tr-font-normal tr-leading-snug tr-truncate",style:{color:t?"#1a0dab":"#94a3b8"},title:t||void 0},t||(0,i.__)("No title format set","thinkrank")),(0,a.createElement)("div",{className:"tr-mt-1 tr-text-xs tr-text-tertiary tr-leading-relaxed"},(0,i.__)("Your meta description will appear here in search results…","thinkrank"))),s>0&&(0,a.createElement)("div",{className:"tr-px-4 tr-py-2 tr-bg-white tr-border-t tr-border-secondary tr-flex tr-items-center tr-gap-3"},(0,a.createElement)("div",{className:"tr-flex-1 tr-bg-line-2 tr-rounded-full tr-h-1.5"},(0,a.createElement)("div",{className:`tr-h-1.5 tr-rounded-full tr-transition-all ${g}`,style:{width:`${d}%`}})),o&&(0,a.createElement)("span",{className:`tr-text-xs tr-shrink-0 ${M}`},o)))},g=({titleFormats:e,separator:t,siteInfo:r,disabled:c=!1})=>{const[g,M]=(0,n.useState)({});return(0,n.useEffect)(()=>{const a=` ${n=t,{pipe:"|",dash:"-",bullet:"•",colon:":",greater:">",tilde:"~"}[n]||"|"} `;var n;const i={};Object.keys(e).forEach(t=>{const n=e[t];if(!n)return void(i[t]="");let s=((e,t)=>{const r={"%site_title%":t.site_name||"Your Site Name","%site_name%":t.site_name||"Your Site Name","%site_description%":t.site_description||"Your site description","%tagline%":t.tagline||"Your site tagline","%post_title%":"Sample Blog Post Title","%page_title%":"Sample Page Title","%category_title%":"Sample Category","%tag_title%":"Sample Tag","%author_name%":"John Doe","%search_term%":"sample search","%archive_title%":"Sample Archive"};return Object.entries(r).reduce((e,[t,r])=>e.replace(new RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),r),e)})(n,r);s=s.replace(/\s*%sep%\s*/g,a),s=s.replace(/\s*\|\s*/g,a),i[t]=s}),M(i)},[e,t,r]),(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,i.__)("Live Title Preview","thinkrank")),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0 tr-mt-0.5"},c?(0,i.__)("Enable site identity to see live previews.","thinkrank"):(0,i.__)("How your titles will appear in Google search results","thinkrank"))),(0,a.createElement)("div",{className:"tr-p-5 tr-flex tr-flex-col tr-gap-3"},c?(0,a.createElement)("p",{className:"tr-text-sm tr-text-tertiary tr-italic tr-m-0"},(0,i.__)("Title preview is disabled.","thinkrank")):(0,a.createElement)(a.Fragment,null,Object.keys(g).map(e=>(0,a.createElement)(d,{key:e,pageType:e,preview:g[e],label:l[e]||e,url:o[e]||"yoursite.com"})),(0,a.createElement)("div",{className:"tr-bg-brand-bg tr-border tr-border-brand tr-rounded-lg tr-p-4 tr-mt-1"},(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-brand tr-uppercase tr-tracking-wide tr-m-0 tr-mb-2"},(0,i.__)("SEO Tips","thinkrank")),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-4 tr-flex tr-flex-col tr-gap-1",style:{listStyleType:"disc"}},[(0,i.__)("Keep titles between 30–60 characters for optimal SEO","thinkrank"),(0,i.__)("Include your target keyword near the beginning","thinkrank"),(0,i.__)("Make titles descriptive and compelling for users","thinkrank"),(0,i.__)("Use consistent separators across your site","thinkrank")].map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-text-xs tr-text-brand"},e)))))))}},54583:(e,t,r)=>{"use strict";r.d(t,{A:()=>b});var a=r(51609),n=r(27723),i=r(86087),s=r(51725),l=r(69432),o=r(7903),c=r(88518),d=r(34236),g=r(72313),M=r(48124),u=r(57810),m=r(41077),N=r(32319),h=r(27209),p=r(88242),k=r(92590),y=r(78560),x=r(96925),D=r(39094),j=r(1168),I=r(72549),E=r(4426),z=r(1376),T=r(91717),f=r(71224);const _=(0,i.memo)(({section:e,item:t})=>{const r=(0,i.useMemo)(()=>(0,s.CB)(),[]),n=(0,i.useMemo)(()=>(0,s.DT)(),[]),l=r.find(t=>t.id===e),o=l?.items.find(e=>e.id===t),c=n.find(t=>t.sections.includes(e)),d=c?.title||l?.title;return(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-1.5 tr-text-sm tr-min-h-[2.5rem] tr-mb-2"},(0,a.createElement)("span",{className:"tr-font-semibold tr-text-primary"},d),o&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("span",{className:"tr-text-tertiary"},"›"),(0,a.createElement)("span",{className:"tr-text-tertiary"},o.title)))}),A=({section:e,item:t})=>{const{mode:r,setMode:o,isSaving:c}=(0,l.Pr)(),d=(0,i.useMemo)(()=>(0,s.CB)().find(t=>t.id===e)?.items.find(e=>e.id===t),[e,t]);return!d||(0,l.HF)(d,r)?null:(0,a.createElement)("div",{className:"tr-flex tr-flex-wrap tr-items-center tr-justify-between tr-gap-2 tr-mb-3 tr-px-4 tr-py-2.5 tr-rounded-lg tr-border tr-border-secondary tr-bg-brand-bg tr-text-sm tr-text-secondary"},(0,a.createElement)("span",null,(0,n.__)("This is an advanced screen. Switch to Advanced to see it in the menu.","thinkrank")),(0,a.createElement)("button",{type:"button",className:"tr-bg-transparent tr-border-0 tr-p-0 tr-text-brand tr-font-semibold tr-cursor-pointer disabled:tr-opacity-50",disabled:c,onClick:()=>o(l.lj)},(0,n.__)("Switch to Advanced","thinkrank")))},w=({section:e,item:t,onNavigate:r})=>{const i=e=>(0,a.createElement)(e,{activeSubSection:t,onNavigate:r});switch(e){case"seo-analyzer":return i(T.A);case"focus-pages":return i(f.A);case"site-identity":return i(o.A);case"performance":return i(c.A);case"analytics":return i(d.A);case"integrations":return i(g.A);case"global-seo":return i(M.A);case"ai-insights":return i(u.Ay);case"schema":return i(m.A);case"social-media":return i(N.A);case"crawling-ai-indexing":return i(h.A);case"image-seo":return i(p.A);case"instant-indexing":return i(k.A);case"author-archives":return i(y.A);case"internal-links":return i(D.A);case"external-links":return i(j.A);case"role-manager":return i(x.A);case"redirections":return i(I.A);case"broken-links":return i(E.A);case"woocommerce":return i(z.A);default:return(0,a.createElement)("div",{className:"tr-bg-white tr-border tr-border-secondary tr-rounded-lg tr-p-8 tr-text-center"},(0,a.createElement)("p",{className:"tr-text-tertiary tr-m-0"},(0,n.__)("Select a section from the sidebar to get started.","thinkrank")))}},b=(0,i.memo)(({activeSection:e,activeItem:t,onNavigate:r})=>e?(0,s.Fz)(e)?(0,a.createElement)("div",null,(0,a.createElement)(_,{section:e,item:t}),(0,a.createElement)(A,{section:e,item:t}),(0,a.createElement)(w,{section:e,item:t,onNavigate:r})):(0,a.createElement)("div",{className:"tr-bg-white tr-border tr-border-secondary tr-rounded-lg tr-p-8 tr-text-center"},(0,a.createElement)("p",{className:"tr-text-tertiary tr-m-0"},(0,n.__)("You do not have permission to access this section.","thinkrank"))):(0,a.createElement)("div",{className:"tr-bg-white tr-border tr-border-secondary tr-rounded-lg tr-p-8 tr-text-center"},(0,a.createElement)("p",{className:"tr-text-tertiary tr-m-0"},(0,n.__)("Select a section from the sidebar to get started.","thinkrank"))))},54809:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M2 11.2v1.5h20v-1.5H2zM5.5 6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v3H20V6c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v3h1.5V6zm2 14h2v-1.5h-2V20zm3.5 0h2v-1.5h-2V20zm7-1.5V20c1.1 0 2-.9 2-2h-1.5c0 .3-.2.5-.5.5zm.5-2H20V15h-1.5v1.5zM5.5 18H4c0 1.1.9 2 2 2v-1.5c-.3 0-.5-.2-.5-.5zm0-3H4v1.5h1.5V15zm9 5h2v-1.5h-2V20z"}))},54818:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,a.createElement)(n.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"}))},54890:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(51609),n=r(97500),i=r.n(n);function s({value:e="",max:t,className:r}){const n="string"==typeof e?e.length:0,s=t&&n>t;return(0,a.createElement)("span",{className:i()("tr-text-xs tr-leading-4 tr-font-normal tr-text-tertiary",r),"aria-live":"polite"},(0,a.createElement)("span",{className:i()({"tr-text-danger":s})},n),t?`/${t}`:null)}},54899:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M17.7 4.3c-1.2 0-2.8 0-3.8 1-.6.6-.9 1.5-.9 2.6V14c-.6-.6-1.5-1-2.5-1C8.6 13 7 14.6 7 16.5S8.6 20 10.5 20c1.5 0 2.8-1 3.3-2.3.5-.8.7-1.8.7-2.5V7.9c0-.7.2-1.2.5-1.6.6-.6 1.8-.6 2.8-.6h.3V4.3h-.4z"}))},55045:(e,t,r)=>{"use strict";r.d(t,{A:()=>y});var a=r(47143),n=r(1455),i=r.n(n),s=r(27723),l=r(60775);const o={metrics:{},reports:{},costs:{},usage:{},isLoading:!1,error:null,lastUpdated:null},c="SET_METRICS",d="SET_REPORTS",g="SET_COSTS",M="SET_USAGE",u="SET_LOADING",m="SET_ERROR",N="SET_LAST_UPDATED",h="CLEAR_ERROR",p={setMetrics:e=>({type:c,metrics:e}),setReports:e=>({type:d,reports:e}),setCosts:e=>({type:g,costs:e}),setUsage:e=>({type:M,usage:e}),setLoading:e=>({type:u,loading:e}),setError:e=>({type:m,error:e}),clearError:()=>({type:h}),setLastUpdated:e=>({type:N,timestamp:e}),fetchMetrics:(e="30d",t=0)=>async({dispatch:r})=>{r(p.setLoading(!0)),r(p.clearError());try{const a=await i()({path:`/thinkrank/v1/analytics/overview?period=${e}&user_id=${t}`});if(!(a&&a.success&&a.data))throw new Error(a?.message||"Failed to fetch analytics data");r(p.setMetrics(a.data)),r(p.setLastUpdated(Date.now()))}catch(e){l.A.error("Failed to fetch analytics metrics:",e);let t="Failed to load analytics data";e.message&&(t=e.message.includes("404")?"Analytics API endpoint not found.":e.message.includes("403")?"You do not have permission to view analytics data.":e.message.includes("500")?"Server error while loading analytics data.":e.message),r(p.setError({message:t,code:e.code||"fetch_error",type:"metrics"}))}finally{r(p.setLoading(!1))}},fetchCostAnalysis:(e="30d",t="all",r=0)=>async({dispatch:a})=>{a(p.setLoading(!0)),a(p.clearError());try{const n=await i()({path:`/thinkrank/v1/analytics/costs?period=${e}&provider=${t}&user_id=${r}`});if(!(n&&n.success&&n.data))throw new Error(n?.message||"Failed to fetch cost data");a(p.setCosts(n.data))}catch(e){l.A.error("Failed to fetch cost analysis:",e),a(p.setError({message:e.message||"Failed to load cost data",code:e.code||"fetch_error",type:"costs"}))}finally{a(p.setLoading(!1))}},fetchReports:(e="overview")=>async({dispatch:t})=>{t(p.setLoading(!0)),t(p.clearError());try{const r={type:e,message:"Reports feature coming in Phase 4"};t(p.setReports(r))}catch(e){l.A.error("Failed to fetch reports:",e),t(p.setError({message:e.message||"Failed to load reports",code:e.code||"fetch_error",type:"reports"}))}finally{t(p.setLoading(!1))}}},k={getMetrics:e=>e.metrics,getReports:e=>e.reports,getCosts:e=>e.costs,getUsage:e=>e.usage,getIsLoading:e=>e.isLoading,getError:e=>e.error,getLastUpdated:e=>e.lastUpdated,getContentOptimized:e=>e.metrics.content_optimized||0,getAverageSeoScore:e=>e.metrics.average_seo_score||0,getCreditsUsed:e=>e.metrics.credits_used||0,getTimeSaved:e=>e.metrics.time_saved||0,getAiActions:e=>e.metrics.ai_actions||0,getContentBriefs:e=>e.metrics.content_briefs||0,getFeaturesUsedCount:e=>e.metrics.features_used_count||0,getMostUsedFeature:e=>e.metrics.most_used_feature||"",getMostUsedCount:e=>e.metrics.most_used_count||0,getFeatureBreakdown:e=>e.metrics.feature_breakdown||{},getProviderBreakdown:e=>e.metrics.provider_breakdown||{},getTotalCosts:e=>e.metrics.total_cost||0,getCostsByProvider(e){const t=e.metrics.provider_breakdown||{};return{openai:t.openai?.cost||0,claude:t.claude?.cost||0}},getEstimatedMonthlyCost(e){const t=e.metrics.total_cost||0;switch(e.metrics.period||"30d"){case"7d":return t*(30/7);case"30d":default:return t;case"90d":return t/3}},getCostEfficiency(e){const t=e.metrics.total_cost||0,r=e.metrics.content_optimized||0,a=e.metrics.average_seo_score||0;return{costPerOptimizedPost:r>0?t/r:0,costPerSeoPoint:a>0?t/a:0,timeSavedValue:.5*(e.metrics.time_saved||0)}},getUsageTrend:e=>e.usage.usage_records||[],getFeatureUsageBreakdown:e=>(e.usage.usage_records||[]).reduce((e,t)=>{const r=t.feature||t.feature_type||"unknown";return e[r]=(e[r]||0)+1,e},{}),hasError:e=>!!e.error,getErrorMessage:e=>e.error?.message||"",getErrorType:e=>e.error?.type||"",hasData(e){const t=e.metrics;return!!(t.content_optimized||t.ai_actions||t.total_cost)},isDataStale:e=>!e.lastUpdated||Date.now()-e.lastUpdated>3e5,getDashboardMetrics(e){var t,r,a,n;const i=e.metrics.most_used_feature||"",l=e.metrics.most_used_count||0,o=i?i.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()).replace(/\bSeo\b/g,"SEO"):"None",c=(g=l,(d=i)&&0!==g?`${g} ${{content_brief:"Generated",seo_metadata:"Optimized",content_analysis:"Analyzed",site_identity_optimization:"Optimized",homepage_meta_optimization:"Optimized",homepage_hero_optimization:"Optimized",llms_txt_optimization:"Generated"}[d]||"Used"}`:"");var d,g;return{postsAnalyzed:{value:e.metrics.content_optimized||0,change:null!==(t=e.metrics.content_optimized_change)&&void 0!==t?t:null,label:(0,s.__)("Posts Analyzed","thinkrank")},aiOptimizations:{value:e.metrics.ai_actions||0,change:0,label:(0,s.__)("AI Optimizations","thinkrank")},averageSeoScore:{value:e.metrics.average_seo_score||0,change:null!==(r=e.metrics.seo_score_change)&&void 0!==r?r:null,label:(0,s.__)("Average SEO Score","thinkrank"),suffix:"/100"},totalCost:{value:e.metrics.total_cost||0,change:null!==(a=e.metrics.cost_change)&&void 0!==a?a:null,label:(0,s.__)("Estimated AI Cost","thinkrank"),prefix:"$",subtitle:`${e.metrics.total_tokens||0} tokens`},featuresUsed:{value:e.metrics.features_used_count||0,change:0,label:(0,s.__)("Features Used","thinkrank")},timeSaved:{value:Math.round((e.metrics.time_saved||0)/60),change:null!==(n=e.metrics.time_saved_change)&&void 0!==n?n:null,label:(0,s.__)("Time Saved","thinkrank"),suffix:"h",subtitle:`${e.metrics.ai_actions||0} AI actions`},mostUsedFeature:{value:o,change:0,label:(0,s.__)("Most Used Feature","thinkrank"),subtitle:c,isText:!0}}}},y=(0,a.createReduxStore)("thinkrank/analytics",{reducer:(e=o,t)=>{switch(t.type){case c:return{...e,metrics:t.metrics,error:null};case d:return{...e,reports:t.reports,error:null};case g:return{...e,costs:t.costs,error:null};case M:return{...e,usage:t.usage,error:null};case u:return{...e,isLoading:t.loading};case m:return{...e,error:t.error,isLoading:!1};case h:return{...e,error:null};case N:return{...e,lastUpdated:t.timestamp};default:return e}},actions:p,selectors:k})},55230:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var a=r(51609),n=r(86087),i=r(27723),s=r(97500),l=r.n(s);const o=e=>/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(e),c=e=>{const t=String(e||"").trim();if(""===t)return"";const r=t.startsWith("#")?t:`#${t}`;if(!o(r))return null;const a=r.slice(1).toLowerCase();return 3===a.length?`#${a[0]}${a[0]}${a[1]}${a[1]}${a[2]}${a[2]}`:`#${a}`};function d({value:e="",onChange:t,label:r,description:s,fallback:d="#000000",disabled:g=!1,id:M}){const u=M||`tr-color-${r?.toLowerCase().replace(/\s+/g,"-")}`,[m,N]=(0,n.useState)(e);(0,n.useEffect)(()=>{N(e)},[e]);const h=null===c(m),p=o(e)?e:d,k=r=>{N(r);const a=c(r);null!==a&&a!==e&&t(a)};return(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1.5"},r&&(0,a.createElement)("label",{htmlFor:u,className:"tr-text-sm tr-font-medium tr-text-secondary"},r),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2"},(0,a.createElement)("input",{type:"color",value:p,disabled:g,onChange:e=>k(e.target.value),className:l()("tr-h-10 tr-w-12 tr-shrink-0 tr-cursor-pointer tr-rounded-md tr-bg-white tr-p-1","tr-border-[1.5px] tr-border-primary tr-transition-colors tr-duration-150","hover:tr-border-[#A9AEC0] focus:tr-outline-none focus-visible:tr-border-brand","disabled:tr-cursor-not-allowed disabled:tr-border-secondary"),"aria-label":(0,i.sprintf)(/* translators: %s: field label, e.g. "Main Color". */ /* translators: %s: field label, e.g. "Main Color". */ |
| 55 | -(0,i.__)("Pick a colour for %s","thinkrank"),r||(0,i.__)("this field","thinkrank"))}),(0,a.createElement)("input",{id:u,type:"text",value:m,disabled:g,spellCheck:"false",placeholder:d,onChange:e=>k(e.target.value),onBlur:()=>N(e),className:l()("tr-h-10 tr-w-32 tr-rounded-md tr-bg-white tr-px-3 tr-text-sm tr-text-primary","tr-border-[1.5px] tr-transition-colors tr-duration-150","placeholder:tr-text-tertiary","focus:tr-outline-none focus-visible:tr-border-brand","disabled:tr-bg-white disabled:tr-text-tertiary disabled:tr-border-secondary disabled:tr-cursor-not-allowed",h?"tr-border-danger":"tr-border-primary hover:tr-border-[#A9AEC0]")}),""!==e&&!g&&(0,a.createElement)("button",{type:"button",onClick:()=>t(""),className:"tr-text-xs tr-text-brand tr-bg-transparent tr-border-0 tr-cursor-pointer tr-p-0 hover:tr-underline"},(0,i.__)("Reset","thinkrank"))),h?(0,a.createElement)("p",{className:"tr-text-xs tr-text-danger tr-m-0"},(0,i.__)("Enter a hex colour such as #1565c0, or clear the field to keep the default.","thinkrank")):s&&(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0"},s))}},55462:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var a=r(51609),n=r(86087),i=r(27723),s=r(51725),l=r(30012),o=r(69432);const c=()=>(0,a.createElement)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("circle",{cx:"11",cy:"11",r:"8"}),(0,a.createElement)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})),d=()=>(0,a.createElement)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("polyline",{points:"9 18 15 12 9 6"})),g=({text:e,query:t})=>{if(!t.trim())return e;const r=e.toLowerCase().indexOf(t.toLowerCase());return-1===r?e:(0,a.createElement)(a.Fragment,null,e.slice(0,r),(0,a.createElement)("mark",{style:{background:"rgba(251,191,36,0.35)",borderRadius:"2px",padding:"0 1px",fontWeight:600,color:"inherit"}},e.slice(r,r+t.length)),e.slice(r+t.length))},M=({children:e})=>(0,a.createElement)("kbd",{style:{fontSize:"10px",fontFamily:"sans-serif",color:"#94a3b8",background:"#f1f5f9",border:"1px solid #e2e8f0",borderRadius:"3px",padding:"1px 5px",lineHeight:1}},e),u=()=>{try{return navigator.platform.toUpperCase().includes("MAC")}catch{return!1}};function m({currentPage:e}){const[t,r]=(0,n.useState)(""),[m,N]=(0,n.useState)([]),[h,p]=(0,n.useState)(!1),[k,y]=(0,n.useState)(-1),x=(0,n.useRef)(null),D=(0,n.useRef)(null),{mode:j}=(0,o.Pr)(),I=(0,n.useMemo)(()=>{const e=[];return(0,s.CB)().forEach(t=>{t.items.forEach(r=>{(0,o.HF)(r,j)&&e.push({section:t.id,sectionTitle:t.title,item:r.id,itemTitle:r.title,pro:r.pro||!1})})}),e},[j]);(0,n.useEffect)(()=>{const e=t.trim().toLowerCase();if(!e)return N([]),void p(!1);const r=I.filter(t=>t.sectionTitle.toLowerCase().includes(e)||t.itemTitle.toLowerCase().includes(e));N(r.slice(0,8)),p(r.length>0),y(-1)},[t,I]),(0,n.useEffect)(()=>{const e=e=>{D.current&&!D.current.contains(e.target)&&E()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,n.useEffect)(()=>{const e=e=>{(e.metaKey||e.ctrlKey)&&"/"===e.key&&(e.preventDefault(),x.current?.focus(),x.current?.select())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]);const E=()=>{r(""),p(!1),y(-1)},z=t=>{E(),"essential-seo"===e?window.dispatchEvent(new CustomEvent("thinkrank:nav-search",{detail:{section:t.section,item:t.item}})):(0,l.oo)("essential-seo",{nav_section:t.section,nav_item:t.item})},T=window.thinkrankAdmin?.isPro;return(0,a.createElement)("div",{ref:D,className:"tr-relative tr-hidden sm:tr-block tr-shrink-0"},(0,a.createElement)("div",{className:"tr-relative"},(0,a.createElement)("span",{className:"tr-absolute tr-left-2.5 tr-top-1/2 -tr-translate-y-1/2 tr-pointer-events-none tr-text-tertiary","aria-hidden":"true"},(0,a.createElement)(c,null)),(0,a.createElement)("input",{ref:x,type:"text",role:"combobox","aria-expanded":h,"aria-autocomplete":"list","aria-label":(0,i.__)("Search settings","thinkrank"),value:t,onChange:e=>r(e.target.value),onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),y(e=>Math.min(e+1,m.length-1))):"ArrowUp"===e.key?(e.preventDefault(),y(e=>Math.max(e-1,0))):"Enter"===e.key&&k>=0&&m[k]?(e.preventDefault(),z(m[k])):"Escape"===e.key&&(E(),x.current?.blur())},onFocus:()=>{t.trim()&&p(m.length>0)},placeholder:(0,i.__)("Search settings…","thinkrank"),className:"tr-w-44 lg:tr-w-56 tr-h-7 tr-pl-8 tr-pr-14 tr-text-xs tr-rounded-md tr-bg-white tr-text-secondary placeholder:tr-text-tertiary focus:tr-bg-white tr-transition-all tr-duration-150",style:{margin:0,border:"1px solid #e2e8f0",outline:"none",boxShadow:"none"}}),!t&&(0,a.createElement)("span",{className:"tr-absolute tr-right-2 tr-top-1/2 -tr-translate-y-1/2 tr-pointer-events-none tr-hidden lg:tr-flex tr-items-center tr-gap-0.5"},(0,a.createElement)(M,null,u()?"⌘":"Ctrl"),(0,a.createElement)(M,null,"/"))),h&&m.length>0&&(0,a.createElement)("div",{role:"listbox","aria-label":(0,i.__)("Search results","thinkrank"),className:"tr-absolute tr-top-full tr-left-0 tr-mt-1.5 tr-w-72 tr-bg-white tr-border tr-border-secondary tr-rounded-lg tr-shadow-lg tr-overflow-hidden",style:{zIndex:99999}},(0,a.createElement)("ul",{className:"tr-list-none tr-m-0 tr-p-1 tr-flex tr-flex-col tr-gap-px"},m.map((e,r)=>{const n=r===k;return(0,a.createElement)("li",{key:`${e.section}-${e.item}`,role:"option","aria-selected":n},(0,a.createElement)("button",{onMouseDown:t=>{t.preventDefault(),z(e)},onMouseEnter:()=>y(r),className:"tr-w-full tr-text-left tr-px-3 tr-py-2 tr-flex tr-items-center tr-gap-2.5 tr-rounded-md tr-border-0 tr-cursor-pointer tr-transition-colors tr-duration-100",style:{background:n?"#ECFDF3":"transparent",outline:"none"}},(0,a.createElement)("span",{className:"tr-text-tertiary tr-shrink-0"},(0,a.createElement)(d,null)),(0,a.createElement)("div",{className:"tr-min-w-0 tr-flex-1"},(0,a.createElement)("p",{className:"tr-m-0 tr-text-[11px] tr-text-tertiary tr-truncate tr-leading-none tr-mb-0.5"},(0,a.createElement)(g,{text:e.sectionTitle,query:t})),(0,a.createElement)("p",{className:"tr-m-0 tr-text-sm tr-font-medium tr-text-secondary tr-truncate tr-leading-snug"},(0,a.createElement)(g,{text:e.itemTitle,query:t}))),e.pro&&!T&&(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-px-1.5 tr-py-0.5 tr-rounded tr-text-[10px] tr-font-semibold tr-bg-brand-bg tr-text-brand tr-shrink-0"},"PRO")))})),(0,a.createElement)("div",{className:"tr-px-3 tr-py-2 tr-border-t tr-border-secondary tr-flex tr-items-center tr-gap-3"},(0,a.createElement)("span",{className:"tr-text-[10px] tr-text-tertiary tr-flex tr-items-center tr-gap-1"},(0,a.createElement)(M,null,"↑↓")," ",(0,i.__)("navigate","thinkrank")),(0,a.createElement)("span",{className:"tr-text-[10px] tr-text-tertiary tr-flex tr-items-center tr-gap-1"},(0,a.createElement)(M,null,"↵")," ",(0,i.__)("go","thinkrank")),(0,a.createElement)("span",{className:"tr-text-[10px] tr-text-tertiary tr-flex tr-items-center tr-gap-1"},(0,a.createElement)(M,null,"Esc")," ",(0,i.__)("close","thinkrank")))))}},55732:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M4.8 11.4H2.1V9H1v6h1.1v-2.6h2.7V15h1.1V9H4.8v2.4zm1.9-1.3h1.7V15h1.1v-4.9h1.7V9H6.7v1.1zM16.2 9l-1.5 2.7L13.3 9h-.9l-.8 6h1.1l.5-4 1.5 2.8 1.5-2.8.5 4h1.1L17 9h-.8zm3.8 5V9h-1.1v6h3.6v-1H20z"}))},55789:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"}))},55873:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M20 6H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h16c.3 0 .5.2.5.5v9zM10 10H8v2h2v-2zm-5 2h2v-2H5v2zm8-2h-2v2h2v-2zm-5 6h8v-2H8v2zm6-4h2v-2h-2v2zm3 0h2v-2h-2v2zm0 4h2v-2h-2v2zM5 16h2v-2H5v2z"}))},56033:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z"}))},56038:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"}))},56070:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(51609),n=r(27723),i=r(39905),s=r(27531);function l({title:e,message:t,onRetry:r,isRetrying:l=!1}){return(0,a.createElement)(i.A,{variant:"error",title:e||(0,n.__)("Couldn’t load your settings","thinkrank")},(0,a.createElement)("p",{className:"tr-m-0"},t||(0,n.__)("Your saved settings could not be read, so this screen has nothing to edit yet. Nothing has changed. Retry to load them.","thinkrank")),(0,a.createElement)(s.A,{variant:"secondary",size:"sm",className:"tr-mt-3",onClick:r,loading:l},(0,n.__)("Retry","thinkrank")))}},56427:e=>{"use strict";e.exports=window.wp.components},56693:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",d:"M6 5.5h12a.5.5 0 01.5.5v7H14a2 2 0 11-4 0H5.5V6a.5.5 0 01.5-.5zm-.5 9V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5v-3.5h-3.337a3.5 3.5 0 01-6.326 0H5.5zM4 13V6a2 2 0 012-2h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2v-5z",clipRule:"evenodd"}))},56947:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z"}))},56964:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"}))},57017:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,a.createElement)(n.Path,{d:"m16.5 19.5h-9v-1.5h9z",style:{fill:"#1e1e1e"}}))},57032:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(51609),n=r(5573);const i=(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"}))},57105:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(51609),n=r(97500),i=r.n(n);function s({children:e,className:t,noPadding:r=!1}){return(0,a.createElement)("main",{className:i()("tr-flex-1 tr-overflow-y-auto",!r&&"tr-p-4 md:tr-p-6 lg:tr-p-8",t)},e)}},57442:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M8.45474 21.2069L16.4547 3.7069L15.5453 3.29114L14.2837 6.05081C13.5991 5.69873 12.8228 5.49999 12 5.49999C10.9385 5.49999 9.95431 5.83076 9.1448 6.39485L7.18994 4.44L6.12928 5.50066L8.05556 7.42694C7.49044 8.15127 7.12047 9.0353 7.02469 9.99999H5V11.5H7V13H5V14.5H7.10002C7.35089 15.7359 8.0576 16.8062 9.03703 17.5279L7.54526 20.7911L8.45474 21.2069ZM9.68024 16.1209C8.95633 15.4796 8.5 14.5431 8.5 13.5V10.5C8.5 8.567 10.067 6.99999 12 6.99999C12.6003 6.99999 13.1653 7.15111 13.659 7.41738L9.68024 16.1209ZM15.3555 9.50155L16.1645 7.73191C16.6053 8.39383 16.8926 9.16683 16.9753 9.99999H19V11.5H17V13H19V14.5H16.9C16.4367 16.7822 14.419 18.5 12 18.5C11.7508 18.5 11.5058 18.4818 11.2664 18.4466L11.928 16.9993C11.9519 16.9998 11.9759 17 12 17C13.933 17 15.5 15.433 15.5 13.5V10.5C15.5 10.1531 15.4495 9.81794 15.3555 9.50155Z"}))},57463:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>j});var a=r(51609),n=r(86087),i=r(27723),s=r(52619),l=r(49323),o=r(85770),c=r(94240),d=r(28094),g=r(60775);const M="inherit",u=[{label:(0,i.__)("Inherit","thinkrank"),value:M},{label:(0,i.__)("On","thinkrank"),value:"on"},{label:(0,i.__)("Off","thinkrank"),value:"off"}],m=[{key:"meta_enabled",label:(0,i.__)("Metas","thinkrank")},{key:"schema_enabled",label:(0,i.__)("Schema","thinkrank")},{key:"open_graph_enabled",label:(0,i.__)("Open Graph","thinkrank")},{key:"twitter_card_enabled",label:(0,i.__)("Twitter card","thinkrank")}],N={post_type:(0,i.__)("Post types","thinkrank"),taxonomy:(0,i.__)("Taxonomies","thinkrank"),archive:(0,i.__)("Archives","thinkrank"),special:(0,i.__)("Special pages","thinkrank")},h=["post_type","taxonomy","archive","special"],p=[{label:(0,i.__)("All content types","thinkrank"),value:"all"},{label:(0,i.__)("Pinned only","thinkrank"),value:"pinned"},{label:(0,i.__)("Untouched only","thinkrank"),value:"untouched"}],k=e=>[{label:e.default_noindex?(0,i.__)("Inherit (on)","thinkrank"):(0,i.__)("Inherit (off)","thinkrank"),value:M},{label:(0,i.__)("On","thinkrank"),value:"on"},{label:(0,i.__)("Off","thinkrank"),value:"off"}],y=e=>e.robots_meta_enabled?e.robots_meta?.noindex?"on":"off":M,x=e=>(e.features||[]).filter(t=>(e.values?.[t]||M)!==M).length+(e.robots_meta_enabled?1:0),D=()=>(0,a.createElement)("span",{className:"tr-text-slate-300",title:(0,i.__)("Not available for this content type","thinkrank")},(0,a.createElement)("span",{"aria-hidden":"true"},"–"),(0,a.createElement)("span",{className:"screen-reader-text"},(0,i.__)("Not available for this content type","thinkrank"))),j=()=>{const[e,t]=(0,n.useState)([]),[r,j]=(0,n.useState)({}),I=(0,n.useMemo)(()=>(0,s.applyFilters)("thinkrank.contentTypeMatrix.featureColumns",m),[]),[E,z]=(0,n.useState)(!0),[T,f]=(0,n.useState)(!1),[_,A]=(0,n.useState)(null),[w,b]=(0,n.useState)(""),[O,v]=(0,n.useState)("all"),L=(0,n.useCallback)(async()=>{z(!0);try{const e=await fetch((0,d.g)("global-seo/matrix"),{headers:{"X-WP-Nonce":window.thinkrankAdmin.restNonce}});if(!e.ok)throw new Error(`Matrix request failed: ${e.status}`);const r=await e.json();if(!r.success||!r.data)throw new Error("Matrix response carried no data");t(r.data.entities||[]),j(r.data.globals||{}),f(!1)}catch(e){g.A.error("Error loading content type matrix:",e),f(!0)}finally{z(!1)}},[]);(0,n.useEffect)(()=>{L()},[L]);const S=async(r,a,n)=>{const s=e.find(e=>e.key===r);t(e=>e.map(e=>e.key===r?{...e,...a}:e)),A(r);try{const e=await fetch((0,d.g)("global-seo/matrix"),{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":window.thinkrankAdmin.restNonce},body:JSON.stringify({entity:r,settings:n})});if(!e.ok)throw new Error(`Save failed: ${e.status}`);const a=await e.json();a?.success&&a?.data&&t(e=>e.map(e=>e.key===r?{...e,...a.data}:e))}catch(e){g.A.error("Error saving content type matrix row:",e),t(e=>e.map(e=>e.key===r&&s?s:e)),c.A.error((0,i.__)("Could not save that change. Nothing was applied.","thinkrank"))}finally{A(null)}},C=(0,n.useMemo)(()=>e.reduce((e,t)=>e+x(t),0),[e]),Q=(0,n.useMemo)(()=>{const t=w.trim().toLowerCase();return e.filter(e=>!(t&&!e.label?.toLowerCase().includes(t))&&("pinned"===O?x(e)>0:"untouched"!==O||0===x(e)))},[e,w,O]),U=(0,n.useMemo)(()=>h.map(e=>({group:e,rows:Q.filter(t=>t.group===e)})).filter(({rows:e})=>e.length>0),[Q]);if(E)return(0,a.createElement)(l.u4,null);if(T)return(0,a.createElement)(l.oK,{message:(0,i.__)("Could not load the content type matrix. Nothing has been changed, retry before editing.","thinkrank"),onRetry:L});const Y=I.length+3;return(0,a.createElement)(l.Zp,{padding:!1},(0,a.createElement)(o.A,{title:(0,i.__)("Content Type Matrix","thinkrank"),description:(0,i.__)("Switch each SEO feature per content type. Inherit follows the site-wide setting, so a matrix you never touch changes nothing.","thinkrank"),trailing:(0,a.createElement)(l.Ex,{variant:C>0?"info":"neutral"},C>0?(0,i.sprintf)(/* translators: %d: how many feature cells are pinned on or off rather than inherited. */ /* translators: %d: how many feature cells are pinned on or off rather than inherited. */ | |
| 56 | -(0,i._n)("%d cell pinned","%d cells pinned",C,"thinkrank"),C):(0,i.__)("All inherited","thinkrank"))}),(0,a.createElement)("div",{className:"tr-flex tr-flex-wrap tr-items-end tr-gap-3 tr-px-6 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)(l.pd,{id:"tr-ctm-search",label:(0,i.__)("Search content types","thinkrank"),hideLabelFromVision:!0,type:"search",value:w,placeholder:(0,i.__)("Search content types…","thinkrank"),onChange:e=>b(e.target.value),className:"tr-w-56"}),(0,a.createElement)(l.l6,{id:"tr-ctm-view",label:(0,i.__)("View","thinkrank"),hideLabelFromVision:!0,value:O,options:p,onChange:e=>v(e.target.value),className:"tr-w-52"}),(0,a.createElement)("p",{className:"tr-m-0 tr-ml-auto tr-text-xs tr-text-tertiary tr-max-w-md tr-leading-relaxed"},(0,i.__)("Inherit follows the site-wide value named under each column. On and Off pin the feature for that content type only.","thinkrank"))),0===Q.length?(0,a.createElement)(l.pp,{size:"sm",illustration:!1,title:(0,i.__)("No content types match","thinkrank"),description:(0,i.__)("Nothing here matches your search and filter.","thinkrank"),action:(0,a.createElement)(l.$n,{variant:"secondary",size:"sm",onClick:()=>{b(""),v("all")}},(0,i.__)("Clear filters","thinkrank"))}):(0,a.createElement)("div",{className:"tr-overflow-x-auto tr-max-h-[70vh] tr-overflow-y-auto"},(0,a.createElement)("table",{className:"tr-w-full tr-border-collapse tr-text-sm"},(0,a.createElement)("thead",{className:"tr-sticky tr-top-0 tr-z-10 tr-bg-white"},(0,a.createElement)("tr",{className:"tr-border-b tr-border-slate-200"},(0,a.createElement)("th",{className:"tr-text-left tr-px-4 tr-py-3 tr-font-semibold tr-text-slate-500"},(0,i.__)("Content type","thinkrank")),I.map(e=>{return(0,a.createElement)("th",{key:e.key,className:"tr-text-left tr-px-2 tr-py-3 tr-font-semibold tr-text-slate-500"},e.label,(0,a.createElement)("span",{className:"tr-block tr-text-[11px] tr-font-normal tr-text-slate-400 tr-mt-0.5"},(t=e.key,r[t]?(0,i.__)("inherit = on","thinkrank"):(0,i.__)("inherit = off","thinkrank"))));var t}),(0,a.createElement)("th",{className:"tr-text-left tr-px-2 tr-py-3 tr-font-semibold tr-text-slate-500"},(0,i.__)("No-index","thinkrank"),(0,a.createElement)("span",{className:"tr-block tr-text-[11px] tr-font-normal tr-text-slate-400 tr-mt-0.5"},(0,i.__)("inherit varies by type","thinkrank"))),(0,a.createElement)("th",{className:"tr-text-left tr-px-2 tr-py-3 tr-font-semibold tr-text-slate-500"},(0,i.__)("Sitemap","thinkrank")))),(0,a.createElement)("tbody",null,U.map(({group:e,rows:t})=>(0,a.createElement)(n.Fragment,{key:e},(0,a.createElement)("tr",{className:"tr-bg-slate-50"},(0,a.createElement)("th",{scope:"colgroup",colSpan:Y,className:"tr-text-left tr-px-4 tr-py-2 tr-text-xs tr-uppercase tr-tracking-wide tr-font-semibold tr-text-slate-500"},N[e]||e)),t.map(e=>{const t=x(e),r=_===e.key;return(0,a.createElement)("tr",{key:e.key,className:"tr-border-b tr-border-slate-100 "+(t>0?"tr-bg-brand-bg/30":"")},(0,a.createElement)("td",{className:"tr-px-4 tr-py-2.5 tr-text-slate-700"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2"},(0,a.createElement)("span",{className:"tr-font-medium"},e.label),t>0&&(0,a.createElement)(l.Ex,{variant:"info"},t)),t>0&&(0,a.createElement)("button",{type:"button",className:"tr-mt-1 tr-bg-transparent tr-border-0 tr-p-0 tr-text-xs tr-text-brand tr-cursor-pointer hover:tr-underline disabled:tr-opacity-50 disabled:tr-cursor-not-allowed",disabled:r,onClick:()=>(e=>{const t=Object.fromEntries((e.features||[]).map(e=>[e,M]));return S(e.key,{values:t,robots_meta_enabled:!1},{...t,robots_meta_enabled:!1})})(e)},(0,i.__)("Reset to inherit","thinkrank"))),I.map(t=>(0,a.createElement)("td",{key:t.key,className:"tr-px-2 tr-py-2.5"},e.features.includes(t.key)?(0,a.createElement)(l.l6,{id:`${t.key}-${e.key}`,label:(0,i.sprintf)(/* translators: 1: content type label, 2: feature name. */ /* translators: 1: content type label, 2: feature name. */ | |
| 57 | -(0,i.__)("%1$s, %2$s","thinkrank"),e.label,t.label),hideLabelFromVision:!0,value:e.values?.[t.key]||M,options:u,disabled:r,onChange:r=>((e,t,r)=>S(e.key,{values:{...e.values,[t]:r}},{[t]:r}))(e,t.key,r.target.value)}):(0,a.createElement)(D,null))),(0,a.createElement)("td",{className:"tr-px-2 tr-py-2.5"},(0,a.createElement)(l.l6,{id:`noindex-${e.key}`,label:(0,i.sprintf)(/* translators: %s: content type label. */ /* translators: %s: content type label. */ | |
| 58 | -(0,i.__)("%s, No-index","thinkrank"),e.label),hideLabelFromVision:!0,value:y(e),options:k(e),disabled:r,onChange:t=>((e,t)=>{if(t===M)return S(e.key,{robots_meta_enabled:!1},{robots_meta_enabled:!1});const r="on"===t,a={...e.robots_meta,noindex:r,index:!r};return S(e.key,{robots_meta_enabled:!0,robots_meta:a},{robots_meta_enabled:!0,robots_meta:a})})(e,t.target.value)})),(0,a.createElement)("td",{className:"tr-px-2 tr-py-2.5"},e.supports_sitemap?(0,a.createElement)(l.lM,{id:`sitemap-${e.key}`,checked:!!e.sitemap_include,disabled:r,onChange:t=>((e,t)=>S(e.key,{sitemap_include:t},{sitemap_include:t}))(e,t)}):(0,a.createElement)(D,null)))})))))))}},57476:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(51609),n=r(5573);const i=(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"}))},57810:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>O});var a=r(51609),n=r(86087),i=r(27723),s=r(1455),l=r.n(s),o=r(97500),c=r.n(o),d=r(49323),g=r(85770),M=r(80095),u=r(65403),m=r(30422),N=r(60775);const h=e=>(0,a.createElement)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e}),p=e=>(0,a.createElement)(h,{...e},(0,a.createElement)("path",{d:"M13 2 4 14h7l-1 8 9-12h-7l1-8Z"})),k=e=>(0,a.createElement)(h,{...e},(0,a.createElement)("path",{d:"M3 17l6-6 4 4 7-7"}),(0,a.createElement)("path",{d:"M17 7h4v4"})),y=e=>(0,a.createElement)(h,{...e},(0,a.createElement)("path",{d:"M12 3l2.6 5.5 6 .8-4.3 4.2 1 6-5.3-2.8L6.7 19.5l1-6L3.4 9.3l6-.8L12 3Z"})),x=e=>(0,a.createElement)(h,{...e},(0,a.createElement)("circle",{cx:"12",cy:"12",r:"9"}),(0,a.createElement)("path",{d:"M3 12h18M12 3c2.5 3 2.5 15 0 18M12 3c-2.5 3-2.5 15 0 18"})),D={chatgpt:"ChatGPT",perplexity:"Perplexity",gemini:"Gemini",claude:"Claude",copilot:"Copilot","meta-ai":"Meta AI",you:"You.com",poe:"Poe",grok:"Grok",mistral:"Le Chat (Mistral)",deepseek:"DeepSeek",kimi:"Kimi",gptbot:"GPTBot (OpenAI)","oai-searchbot":"OAI-SearchBot (OpenAI)","chatgpt-user":"ChatGPT-User (OpenAI)",perplexitybot:"PerplexityBot","perplexity-user":"Perplexity-User",claudebot:"ClaudeBot (Anthropic)","claude-user":"Claude-User (Anthropic)","claude-searchbot":"Claude-SearchBot (Anthropic)","anthropic-ai":"Anthropic-AI","google-extended":"Google-Extended","applebot-extended":"Applebot-Extended","meta-externalagent":"Meta External Agent","meta-externalfetcher":"Meta External Fetcher",bytespider:"Bytespider (ByteDance)",amazonbot:"Amazonbot",ccbot:"CCBot (Common Crawl)","cohere-ai":"Cohere","mistral-user":"MistralAI-User"},j=e=>D[e]||e,I={chatgpt:"#10a37f",gptbot:"#10a37f","oai-searchbot":"#10a37f","chatgpt-user":"#10a37f",perplexity:"#20808d",perplexitybot:"#20808d","perplexity-user":"#20808d",gemini:"#4285f4","google-extended":"#4285f4",claude:"#d97757",claudebot:"#d97757","claude-user":"#d97757","claude-searchbot":"#d97757","anthropic-ai":"#d97757",copilot:"#0a6cd6","meta-ai":"#0064e0","meta-externalagent":"#0064e0","meta-externalfetcher":"#0064e0",grok:"#6b7280",mistral:"#fa520f","mistral-user":"#fa520f",deepseek:"#4d6bfe",kimi:"#6d28d9",you:"#5850ec",poe:"#5b2fd6",bytespider:"#325ab4",amazonbot:"#ff9900",ccbot:"#4b5563","cohere-ai":"#39a0a5","applebot-extended":"#6b7280"},E=e=>{const[t,r,a]=String(e).split("-").map(Number);return t&&r&&a?new Date(Date.UTC(t,r-1,a)).toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"}):String(e)},z=({points:e,height:t=72})=>{const[r,s]=(0,n.useState)(null);if(!e||e.length<2)return null;const l=Math.max(1,...e.map(e=>e.value)),o=100/(e.length-1),c=e.map((e,r)=>[r*o,t-5-e.value/l*(t-10)]),d=c.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" "),g=`${d} L100,${t} L0,${t} Z`,M=e[0],u=e[e.length-1],m=e.reduce((t,r,a)=>r.value>e[t].value?a:t,0),N=e[m],h=e.reduce((e,t)=>e+t.value,0),p=(0,i.sprintf)(/* translators: 1: start date, 2: end date, 3: total referrals, 4: peak referrals, 5: peak date. */ /* translators: 1: start date, 2: end date, 3: total referrals, 4: peak referrals, 5: peak date. */ | |
| 56 | +(0,i.__)("Pick a colour for %s","thinkrank"),r||(0,i.__)("this field","thinkrank"))}),(0,a.createElement)("input",{id:u,type:"text",value:m,disabled:g,spellCheck:"false",placeholder:d,onChange:e=>k(e.target.value),onBlur:()=>N(e),className:l()("tr-h-10 tr-w-32 tr-rounded-md tr-bg-white tr-px-3 tr-text-sm tr-text-primary","tr-border-[1.5px] tr-transition-colors tr-duration-150","placeholder:tr-text-tertiary","focus:tr-outline-none focus-visible:tr-border-brand","disabled:tr-bg-white disabled:tr-text-tertiary disabled:tr-border-secondary disabled:tr-cursor-not-allowed",h?"tr-border-danger":"tr-border-primary hover:tr-border-[#A9AEC0]")}),""!==e&&!g&&(0,a.createElement)("button",{type:"button",onClick:()=>t(""),className:"tr-text-xs tr-text-brand tr-bg-transparent tr-border-0 tr-cursor-pointer tr-p-0 hover:tr-underline"},(0,i.__)("Reset","thinkrank"))),h?(0,a.createElement)("p",{className:"tr-text-xs tr-text-danger tr-m-0"},(0,i.__)("Enter a hex colour such as #1565c0, or clear the field to keep the default.","thinkrank")):s&&(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0"},s))}},55462:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var a=r(51609),n=r(86087),i=r(27723),s=r(51725),l=r(30012),o=r(69432);const c=()=>(0,a.createElement)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("circle",{cx:"11",cy:"11",r:"8"}),(0,a.createElement)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})),d=()=>(0,a.createElement)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("polyline",{points:"9 18 15 12 9 6"})),g=({text:e,query:t})=>{if(!t.trim())return e;const r=e.toLowerCase().indexOf(t.toLowerCase());return-1===r?e:(0,a.createElement)(a.Fragment,null,e.slice(0,r),(0,a.createElement)("mark",{style:{background:"rgba(251,191,36,0.35)",borderRadius:"2px",padding:"0 1px",fontWeight:600,color:"inherit"}},e.slice(r,r+t.length)),e.slice(r+t.length))},M=({children:e})=>(0,a.createElement)("kbd",{style:{fontSize:"10px",fontFamily:"sans-serif",color:"#94a3b8",background:"#f1f5f9",border:"1px solid #e2e8f0",borderRadius:"3px",padding:"1px 5px",lineHeight:1}},e),u=()=>{try{return navigator.platform.toUpperCase().includes("MAC")}catch{return!1}};function m({currentPage:e}){const[t,r]=(0,n.useState)(""),[m,N]=(0,n.useState)([]),[h,p]=(0,n.useState)(!1),[k,y]=(0,n.useState)(-1),x=(0,n.useRef)(null),D=(0,n.useRef)(null),{mode:j}=(0,o.Pr)(),I=(0,n.useMemo)(()=>{const e=[];return(0,s.CB)().forEach(t=>{t.items.forEach(r=>{(0,o.HF)(r,j)&&e.push({section:t.id,sectionTitle:t.title,item:r.id,itemTitle:r.title,pro:r.pro||!1})})}),e},[j]);(0,n.useEffect)(()=>{const e=t.trim().toLowerCase();if(!e)return N([]),void p(!1);const r=I.filter(t=>t.sectionTitle.toLowerCase().includes(e)||t.itemTitle.toLowerCase().includes(e));N(r.slice(0,8)),p(r.length>0),y(-1)},[t,I]),(0,n.useEffect)(()=>{const e=e=>{D.current&&!D.current.contains(e.target)&&E()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,n.useEffect)(()=>{const e=e=>{(e.metaKey||e.ctrlKey)&&"/"===e.key&&(e.preventDefault(),x.current?.focus(),x.current?.select())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]);const E=()=>{r(""),p(!1),y(-1)},z=t=>{E(),"essential-seo"===e?window.dispatchEvent(new CustomEvent("thinkrank:nav-search",{detail:{section:t.section,item:t.item}})):(0,l.oo)("essential-seo",{nav_section:t.section,nav_item:t.item})},T=window.thinkrankAdmin?.isPro;return(0,a.createElement)("div",{ref:D,className:"tr-relative tr-hidden sm:tr-block tr-shrink-0"},(0,a.createElement)("div",{className:"tr-relative"},(0,a.createElement)("span",{className:"tr-absolute tr-left-2.5 tr-top-1/2 -tr-translate-y-1/2 tr-pointer-events-none tr-text-tertiary","aria-hidden":"true"},(0,a.createElement)(c,null)),(0,a.createElement)("input",{ref:x,type:"text",role:"combobox","aria-expanded":h,"aria-autocomplete":"list","aria-label":(0,i.__)("Search settings","thinkrank"),value:t,onChange:e=>r(e.target.value),onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),y(e=>Math.min(e+1,m.length-1))):"ArrowUp"===e.key?(e.preventDefault(),y(e=>Math.max(e-1,0))):"Enter"===e.key&&k>=0&&m[k]?(e.preventDefault(),z(m[k])):"Escape"===e.key&&(E(),x.current?.blur())},onFocus:()=>{t.trim()&&p(m.length>0)},placeholder:(0,i.__)("Search settings…","thinkrank"),className:"tr-w-44 lg:tr-w-56 tr-h-7 tr-pl-8 tr-pr-14 tr-text-xs tr-rounded-md tr-bg-white tr-text-secondary placeholder:tr-text-tertiary focus:tr-bg-white tr-transition-all tr-duration-150",style:{margin:0,border:"1px solid #e2e8f0",outline:"none",boxShadow:"none"}}),!t&&(0,a.createElement)("span",{className:"tr-absolute tr-right-2 tr-top-1/2 -tr-translate-y-1/2 tr-pointer-events-none tr-hidden lg:tr-flex tr-items-center tr-gap-0.5"},(0,a.createElement)(M,null,u()?"⌘":"Ctrl"),(0,a.createElement)(M,null,"/"))),h&&m.length>0&&(0,a.createElement)("div",{role:"listbox","aria-label":(0,i.__)("Search results","thinkrank"),className:"tr-absolute tr-top-full tr-left-0 tr-mt-1.5 tr-w-72 tr-bg-white tr-border tr-border-secondary tr-rounded-lg tr-shadow-lg tr-overflow-hidden",style:{zIndex:99999}},(0,a.createElement)("ul",{className:"tr-list-none tr-m-0 tr-p-1 tr-flex tr-flex-col tr-gap-px"},m.map((e,r)=>{const n=r===k;return(0,a.createElement)("li",{key:`${e.section}-${e.item}`,role:"option","aria-selected":n},(0,a.createElement)("button",{onMouseDown:t=>{t.preventDefault(),z(e)},onMouseEnter:()=>y(r),className:"tr-w-full tr-text-left tr-px-3 tr-py-2 tr-flex tr-items-center tr-gap-2.5 tr-rounded-md tr-border-0 tr-cursor-pointer tr-transition-colors tr-duration-100",style:{background:n?"#ECFDF3":"transparent",outline:"none"}},(0,a.createElement)("span",{className:"tr-text-tertiary tr-shrink-0"},(0,a.createElement)(d,null)),(0,a.createElement)("div",{className:"tr-min-w-0 tr-flex-1"},(0,a.createElement)("p",{className:"tr-m-0 tr-text-[11px] tr-text-tertiary tr-truncate tr-leading-none tr-mb-0.5"},(0,a.createElement)(g,{text:e.sectionTitle,query:t})),(0,a.createElement)("p",{className:"tr-m-0 tr-text-sm tr-font-medium tr-text-secondary tr-truncate tr-leading-snug"},(0,a.createElement)(g,{text:e.itemTitle,query:t}))),e.pro&&!T&&(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-px-1.5 tr-py-0.5 tr-rounded tr-text-[10px] tr-font-semibold tr-bg-brand-bg tr-text-brand tr-shrink-0"},"PRO")))})),(0,a.createElement)("div",{className:"tr-px-3 tr-py-2 tr-border-t tr-border-secondary tr-flex tr-items-center tr-gap-3"},(0,a.createElement)("span",{className:"tr-text-[10px] tr-text-tertiary tr-flex tr-items-center tr-gap-1"},(0,a.createElement)(M,null,"↑↓")," ",(0,i.__)("navigate","thinkrank")),(0,a.createElement)("span",{className:"tr-text-[10px] tr-text-tertiary tr-flex tr-items-center tr-gap-1"},(0,a.createElement)(M,null,"↵")," ",(0,i.__)("go","thinkrank")),(0,a.createElement)("span",{className:"tr-text-[10px] tr-text-tertiary tr-flex tr-items-center tr-gap-1"},(0,a.createElement)(M,null,"Esc")," ",(0,i.__)("close","thinkrank")))))}},55732:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M4.8 11.4H2.1V9H1v6h1.1v-2.6h2.7V15h1.1V9H4.8v2.4zm1.9-1.3h1.7V15h1.1v-4.9h1.7V9H6.7v1.1zM16.2 9l-1.5 2.7L13.3 9h-.9l-.8 6h1.1l.5-4 1.5 2.8 1.5-2.8.5 4h1.1L17 9h-.8zm3.8 5V9h-1.1v6h3.6v-1H20z"}))},55789:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"}))},55873:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M20 6H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H4c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h16c.3 0 .5.2.5.5v9zM10 10H8v2h2v-2zm-5 2h2v-2H5v2zm8-2h-2v2h2v-2zm-5 6h8v-2H8v2zm6-4h2v-2h-2v2zm3 0h2v-2h-2v2zm0 4h2v-2h-2v2zM5 16h2v-2H5v2z"}))},56033:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z"}))},56038:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"}))},56070:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(51609),n=r(27723),i=r(39905),s=r(27531);function l({title:e,message:t,onRetry:r,isRetrying:l=!1}){return(0,a.createElement)(i.A,{variant:"error",title:e||(0,n.__)("Couldn’t load your settings","thinkrank")},(0,a.createElement)("p",{className:"tr-m-0"},t||(0,n.__)("Your saved settings could not be read, so this screen has nothing to edit yet. Nothing has changed. Retry to load them.","thinkrank")),(0,a.createElement)(s.A,{variant:"secondary",size:"sm",className:"tr-mt-3",onClick:r,loading:l},(0,n.__)("Retry","thinkrank")))}},56427:e=>{"use strict";e.exports=window.wp.components},56693:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",d:"M6 5.5h12a.5.5 0 01.5.5v7H14a2 2 0 11-4 0H5.5V6a.5.5 0 01.5-.5zm-.5 9V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5v-3.5h-3.337a3.5 3.5 0 01-6.326 0H5.5zM4 13V6a2 2 0 012-2h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2v-5z",clipRule:"evenodd"}))},56947:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z"}))},56964:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"}))},57017:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,a.createElement)(n.Path,{d:"m16.5 19.5h-9v-1.5h9z",style:{fill:"#1e1e1e"}}))},57032:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(51609),n=r(5573);const i=(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"}))},57105:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(51609),n=r(97500),i=r.n(n);function s({children:e,className:t,noPadding:r=!1}){return(0,a.createElement)("main",{className:i()("tr-flex-1 tr-overflow-y-auto",!r&&"tr-p-4 md:tr-p-6 lg:tr-p-8",t)},e)}},57442:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M8.45474 21.2069L16.4547 3.7069L15.5453 3.29114L14.2837 6.05081C13.5991 5.69873 12.8228 5.49999 12 5.49999C10.9385 5.49999 9.95431 5.83076 9.1448 6.39485L7.18994 4.44L6.12928 5.50066L8.05556 7.42694C7.49044 8.15127 7.12047 9.0353 7.02469 9.99999H5V11.5H7V13H5V14.5H7.10002C7.35089 15.7359 8.0576 16.8062 9.03703 17.5279L7.54526 20.7911L8.45474 21.2069ZM9.68024 16.1209C8.95633 15.4796 8.5 14.5431 8.5 13.5V10.5C8.5 8.567 10.067 6.99999 12 6.99999C12.6003 6.99999 13.1653 7.15111 13.659 7.41738L9.68024 16.1209ZM15.3555 9.50155L16.1645 7.73191C16.6053 8.39383 16.8926 9.16683 16.9753 9.99999H19V11.5H17V13H19V14.5H16.9C16.4367 16.7822 14.419 18.5 12 18.5C11.7508 18.5 11.5058 18.4818 11.2664 18.4466L11.928 16.9993C11.9519 16.9998 11.9759 17 12 17C13.933 17 15.5 15.433 15.5 13.5V10.5C15.5 10.1531 15.4495 9.81794 15.3555 9.50155Z"}))},57463:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>I});var a=r(51609),n=r(86087),i=r(27723),s=r(52619),l=r(49323),o=r(85770),c=r(94240),d=r(28094),g=r(60775);const M="inherit",u=[{label:(0,i.__)("Inherit","thinkrank"),value:M},{label:(0,i.__)("On","thinkrank"),value:"on"},{label:(0,i.__)("Off","thinkrank"),value:"off"}],m=[{key:"meta_enabled",label:(0,i.__)("Metas","thinkrank")},{key:"schema_enabled",label:(0,i.__)("Schema","thinkrank")},{key:"open_graph_enabled",label:(0,i.__)("Open Graph","thinkrank")},{key:"twitter_card_enabled",label:(0,i.__)("Twitter card","thinkrank")}],N={post_type:(0,i.__)("Post types","thinkrank"),taxonomy:(0,i.__)("Taxonomies","thinkrank"),archive:(0,i.__)("Archives","thinkrank"),special:(0,i.__)("Special pages","thinkrank")},h=["post_type","taxonomy","archive","special"],p=[{label:(0,i.__)("All content types","thinkrank"),value:"all"},{label:(0,i.__)("Pinned only","thinkrank"),value:"pinned"},{label:(0,i.__)("Untouched only","thinkrank"),value:"untouched"}],k=e=>[{label:e.default_noindex?(0,i.__)("Inherit (on)","thinkrank"):(0,i.__)("Inherit (off)","thinkrank"),value:M},{label:(0,i.__)("On","thinkrank"),value:"on"},{label:(0,i.__)("Off","thinkrank"),value:"off"}],y=e=>e.robots_meta_enabled?e.robots_meta?.noindex?"on":"off":M,x=e=>e.robots_meta_enabled?!!e.robots_meta?.noindex:!!e.default_noindex,D=e=>(e.features||[]).filter(t=>(e.values?.[t]||M)!==M).length+(e.robots_meta_enabled?1:0),j=()=>(0,a.createElement)("span",{className:"tr-text-slate-300",title:(0,i.__)("Not available for this content type","thinkrank")},(0,a.createElement)("span",{"aria-hidden":"true"},"–"),(0,a.createElement)("span",{className:"screen-reader-text"},(0,i.__)("Not available for this content type","thinkrank"))),I=()=>{const[e,t]=(0,n.useState)([]),[r,I]=(0,n.useState)({}),E=(0,n.useMemo)(()=>(0,s.applyFilters)("thinkrank.contentTypeMatrix.featureColumns",m),[]),[z,T]=(0,n.useState)(!0),[f,_]=(0,n.useState)(!1),[A,w]=(0,n.useState)(null),[b,O]=(0,n.useState)(""),[v,L]=(0,n.useState)("all"),S=(0,n.useCallback)(async()=>{T(!0);try{const e=await fetch((0,d.g)("global-seo/matrix"),{headers:{"X-WP-Nonce":window.thinkrankAdmin.restNonce}});if(!e.ok)throw new Error(`Matrix request failed: ${e.status}`);const r=await e.json();if(!r.success||!r.data)throw new Error("Matrix response carried no data");t(r.data.entities||[]),I(r.data.globals||{}),_(!1)}catch(e){g.A.error("Error loading content type matrix:",e),_(!0)}finally{T(!1)}},[]);(0,n.useEffect)(()=>{S()},[S]);const C=async(r,a,n)=>{const s=e.find(e=>e.key===r);t(e=>e.map(e=>e.key===r?{...e,...a}:e)),w(r);try{const e=await fetch((0,d.g)("global-seo/matrix"),{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":window.thinkrankAdmin.restNonce},body:JSON.stringify({entity:r,settings:n})});if(!e.ok)throw new Error(`Save failed: ${e.status}`);const a=await e.json();a?.success&&a?.data&&t(e=>e.map(e=>e.key===r?{...e,...a.data}:e))}catch(e){g.A.error("Error saving content type matrix row:",e),t(e=>e.map(e=>e.key===r&&s?s:e)),c.A.error((0,i.__)("Could not save that change. Nothing was applied.","thinkrank"))}finally{w(null)}},Q=(0,n.useMemo)(()=>e.reduce((e,t)=>e+D(t),0),[e]),U=(0,n.useMemo)(()=>{const t=b.trim().toLowerCase();return e.filter(e=>!(t&&!e.label?.toLowerCase().includes(t))&&("pinned"===v?D(e)>0:"untouched"!==v||0===D(e)))},[e,b,v]),Y=(0,n.useMemo)(()=>h.map(e=>({group:e,rows:U.filter(t=>t.group===e)})).filter(({rows:e})=>e.length>0),[U]);if(z)return(0,a.createElement)(l.u4,null);if(f)return(0,a.createElement)(l.oK,{message:(0,i.__)("Could not load the content type matrix. Nothing has been changed, retry before editing.","thinkrank"),onRetry:S});const P=E.length+3;return(0,a.createElement)(l.Zp,{padding:!1},(0,a.createElement)(o.A,{title:(0,i.__)("Content Type Matrix","thinkrank"),description:(0,i.__)("Switch each SEO feature per content type. Inherit follows the site-wide setting, so a matrix you never touch changes nothing.","thinkrank"),trailing:(0,a.createElement)(l.Ex,{variant:Q>0?"info":"neutral"},Q>0?(0,i.sprintf)(/* translators: %d: how many feature cells are pinned on or off rather than inherited. */ /* translators: %d: how many feature cells are pinned on or off rather than inherited. */ | |
| 57 | +(0,i._n)("%d cell pinned","%d cells pinned",Q,"thinkrank"),Q):(0,i.__)("All inherited","thinkrank"))}),(0,a.createElement)("div",{className:"tr-flex tr-flex-wrap tr-items-end tr-gap-3 tr-px-6 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)(l.pd,{id:"tr-ctm-search",label:(0,i.__)("Search content types","thinkrank"),hideLabelFromVision:!0,type:"search",value:b,placeholder:(0,i.__)("Search content types…","thinkrank"),onChange:e=>O(e.target.value),className:"tr-w-56"}),(0,a.createElement)(l.l6,{id:"tr-ctm-view",label:(0,i.__)("View","thinkrank"),hideLabelFromVision:!0,value:v,options:p,onChange:e=>L(e.target.value),className:"tr-w-52"}),(0,a.createElement)("p",{className:"tr-m-0 tr-ml-auto tr-text-xs tr-text-tertiary tr-max-w-md tr-leading-relaxed"},(0,i.__)("Inherit follows the site-wide value named under each column. On and Off pin the feature for that content type only.","thinkrank"))),0===U.length?(0,a.createElement)(l.pp,{size:"sm",illustration:!1,title:(0,i.__)("No content types match","thinkrank"),description:(0,i.__)("Nothing here matches your search and filter.","thinkrank"),action:(0,a.createElement)(l.$n,{variant:"secondary",size:"sm",onClick:()=>{O(""),L("all")}},(0,i.__)("Clear filters","thinkrank"))}):(0,a.createElement)("div",{className:"tr-overflow-x-auto tr-max-h-[70vh] tr-overflow-y-auto"},(0,a.createElement)("table",{className:"tr-w-full tr-border-collapse tr-text-sm"},(0,a.createElement)("thead",{className:"tr-sticky tr-top-0 tr-z-10 tr-bg-white"},(0,a.createElement)("tr",{className:"tr-border-b tr-border-slate-200"},(0,a.createElement)("th",{className:"tr-text-left tr-px-4 tr-py-3 tr-font-semibold tr-text-slate-500"},(0,i.__)("Content type","thinkrank")),E.map(e=>{return(0,a.createElement)("th",{key:e.key,className:"tr-text-left tr-px-2 tr-py-3 tr-font-semibold tr-text-slate-500"},e.label,(0,a.createElement)("span",{className:"tr-block tr-text-[11px] tr-font-normal tr-text-slate-400 tr-mt-0.5"},(t=e.key,r[t]?(0,i.__)("inherit = on","thinkrank"):(0,i.__)("inherit = off","thinkrank"))));var t}),(0,a.createElement)("th",{className:"tr-text-left tr-px-2 tr-py-3 tr-font-semibold tr-text-slate-500"},(0,i.__)("No-index","thinkrank"),(0,a.createElement)("span",{className:"tr-block tr-text-[11px] tr-font-normal tr-text-slate-400 tr-mt-0.5"},(0,i.__)("inherit varies by type","thinkrank"))),(0,a.createElement)("th",{className:"tr-text-left tr-px-2 tr-py-3 tr-font-semibold tr-text-slate-500"},(0,i.__)("Sitemap","thinkrank")))),(0,a.createElement)("tbody",null,Y.map(({group:e,rows:t})=>(0,a.createElement)(n.Fragment,{key:e},(0,a.createElement)("tr",{className:"tr-bg-slate-50"},(0,a.createElement)("th",{scope:"colgroup",colSpan:P,className:"tr-text-left tr-px-4 tr-py-2 tr-text-xs tr-uppercase tr-tracking-wide tr-font-semibold tr-text-slate-500"},N[e]||e)),t.map(e=>{const t=D(e),r=A===e.key;return(0,a.createElement)("tr",{key:e.key,className:"tr-border-b tr-border-slate-100 "+(t>0?"tr-bg-brand-bg/30":"")},(0,a.createElement)("td",{className:"tr-px-4 tr-py-2.5 tr-text-slate-700"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2"},(0,a.createElement)("span",{className:"tr-font-medium"},e.label),t>0&&(0,a.createElement)(l.Ex,{variant:"info"},t)),t>0&&(0,a.createElement)("button",{type:"button",className:"tr-mt-1 tr-bg-transparent tr-border-0 tr-p-0 tr-text-xs tr-text-brand tr-cursor-pointer hover:tr-underline disabled:tr-opacity-50 disabled:tr-cursor-not-allowed",disabled:r,onClick:()=>(e=>{const t=Object.fromEntries((e.features||[]).map(e=>[e,M]));return C(e.key,{values:t,robots_meta_enabled:!1},{...t,robots_meta_enabled:!1})})(e)},(0,i.__)("Reset to inherit","thinkrank"))),E.map(t=>(0,a.createElement)("td",{key:t.key,className:"tr-px-2 tr-py-2.5"},e.features.includes(t.key)?(0,a.createElement)(l.l6,{id:`${t.key}-${e.key}`,label:(0,i.sprintf)(/* translators: 1: content type label, 2: feature name. */ /* translators: 1: content type label, 2: feature name. */ | |
| 58 | +(0,i.__)("%1$s, %2$s","thinkrank"),e.label,t.label),hideLabelFromVision:!0,value:e.values?.[t.key]||M,options:u,disabled:r,onChange:r=>((e,t,r)=>C(e.key,{values:{...e.values,[t]:r}},{[t]:r}))(e,t.key,r.target.value)}):(0,a.createElement)(j,null))),(0,a.createElement)("td",{className:"tr-px-2 tr-py-2.5"},(0,a.createElement)(l.l6,{id:`noindex-${e.key}`,label:(0,i.sprintf)(/* translators: %s: content type label. */ /* translators: %s: content type label. */ | |
| 59 | +(0,i.__)("%s, No-index","thinkrank"),e.label),hideLabelFromVision:!0,value:y(e),options:k(e),disabled:r,onChange:t=>((e,t)=>{if(t===M)return C(e.key,{robots_meta_enabled:!1},{robots_meta_enabled:!1});const r="on"===t,a={...e.robots_meta,noindex:r,index:!r};return C(e.key,{robots_meta_enabled:!0,robots_meta:a},{robots_meta_enabled:!0,robots_meta:a})})(e,t.target.value)})),(0,a.createElement)("td",{className:"tr-px-2 tr-py-2.5"},e.supports_sitemap?(0,a.createElement)(l.lM,{id:`sitemap-${e.key}`,checked:!!e.sitemap_include&&!x(e),disabled:r||x(e),onChange:t=>((e,t)=>C(e.key,{sitemap_include:t},{sitemap_include:t}))(e,t)}):(0,a.createElement)(j,null)))})))))))}},57476:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(51609),n=r(5573);const i=(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"}))},57810:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>O});var a=r(51609),n=r(86087),i=r(27723),s=r(1455),l=r.n(s),o=r(97500),c=r.n(o),d=r(49323),g=r(85770),M=r(80095),u=r(65403),m=r(30422),N=r(60775);const h=e=>(0,a.createElement)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e}),p=e=>(0,a.createElement)(h,{...e},(0,a.createElement)("path",{d:"M13 2 4 14h7l-1 8 9-12h-7l1-8Z"})),k=e=>(0,a.createElement)(h,{...e},(0,a.createElement)("path",{d:"M3 17l6-6 4 4 7-7"}),(0,a.createElement)("path",{d:"M17 7h4v4"})),y=e=>(0,a.createElement)(h,{...e},(0,a.createElement)("path",{d:"M12 3l2.6 5.5 6 .8-4.3 4.2 1 6-5.3-2.8L6.7 19.5l1-6L3.4 9.3l6-.8L12 3Z"})),x=e=>(0,a.createElement)(h,{...e},(0,a.createElement)("circle",{cx:"12",cy:"12",r:"9"}),(0,a.createElement)("path",{d:"M3 12h18M12 3c2.5 3 2.5 15 0 18M12 3c-2.5 3-2.5 15 0 18"})),D={chatgpt:"ChatGPT",perplexity:"Perplexity",gemini:"Gemini",claude:"Claude",copilot:"Copilot","meta-ai":"Meta AI",you:"You.com",poe:"Poe",grok:"Grok",mistral:"Le Chat (Mistral)",deepseek:"DeepSeek",kimi:"Kimi",gptbot:"GPTBot (OpenAI)","oai-searchbot":"OAI-SearchBot (OpenAI)","chatgpt-user":"ChatGPT-User (OpenAI)",perplexitybot:"PerplexityBot","perplexity-user":"Perplexity-User",claudebot:"ClaudeBot (Anthropic)","claude-user":"Claude-User (Anthropic)","claude-searchbot":"Claude-SearchBot (Anthropic)","anthropic-ai":"Anthropic-AI","google-extended":"Google-Extended","applebot-extended":"Applebot-Extended","meta-externalagent":"Meta External Agent","meta-externalfetcher":"Meta External Fetcher",bytespider:"Bytespider (ByteDance)",amazonbot:"Amazonbot",ccbot:"CCBot (Common Crawl)","cohere-ai":"Cohere","mistral-user":"MistralAI-User"},j=e=>D[e]||e,I={chatgpt:"#10a37f",gptbot:"#10a37f","oai-searchbot":"#10a37f","chatgpt-user":"#10a37f",perplexity:"#20808d",perplexitybot:"#20808d","perplexity-user":"#20808d",gemini:"#4285f4","google-extended":"#4285f4",claude:"#d97757",claudebot:"#d97757","claude-user":"#d97757","claude-searchbot":"#d97757","anthropic-ai":"#d97757",copilot:"#0a6cd6","meta-ai":"#0064e0","meta-externalagent":"#0064e0","meta-externalfetcher":"#0064e0",grok:"#6b7280",mistral:"#fa520f","mistral-user":"#fa520f",deepseek:"#4d6bfe",kimi:"#6d28d9",you:"#5850ec",poe:"#5b2fd6",bytespider:"#325ab4",amazonbot:"#ff9900",ccbot:"#4b5563","cohere-ai":"#39a0a5","applebot-extended":"#6b7280"},E=e=>{const[t,r,a]=String(e).split("-").map(Number);return t&&r&&a?new Date(Date.UTC(t,r-1,a)).toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"}):String(e)},z=({points:e,height:t=72})=>{const[r,s]=(0,n.useState)(null);if(!e||e.length<2)return null;const l=Math.max(1,...e.map(e=>e.value)),o=100/(e.length-1),c=e.map((e,r)=>[r*o,t-5-e.value/l*(t-10)]),d=c.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" "),g=`${d} L100,${t} L0,${t} Z`,M=e[0],u=e[e.length-1],m=e.reduce((t,r,a)=>r.value>e[t].value?a:t,0),N=e[m],h=e.reduce((e,t)=>e+t.value,0),p=(0,i.sprintf)(/* translators: 1: start date, 2: end date, 3: total referrals, 4: peak referrals, 5: peak date. */ /* translators: 1: start date, 2: end date, 3: total referrals, 4: peak referrals, 5: peak date. */ | |
| 59 | 60 | (0,i.__)("AI referrals from %1$s to %2$s. %3$d referrals in total, peaking at %4$d on %5$s.","thinkrank"),E(M.label),E(u.label),h,N.value,E(N.label)),k=null===r?null:e[r],y=null===r?0:c[r][0]/100*100;let x="-50%";return y>70?x="-100%":y<30&&(x="0"),(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"tr-flex tr-items-baseline tr-justify-between tr-gap-3 tr-mb-1"},(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},(0,i.sprintf)(/* translators: 1: peak referral count, 2: date of the peak. */ /* translators: 1: peak referral count, 2: date of the peak. */ |
| 60 | 61 | (0,i.__)("Peak %1$d on %2$s","thinkrank"),N.value,E(N.label)))),(0,a.createElement)("div",{className:"tr-relative",style:{height:t},onPointerMove:t=>{const r=t.currentTarget.getBoundingClientRect();if(!r.width)return;const a=(t.clientX-r.left)/r.width;s(Math.max(0,Math.min(e.length-1,Math.round(a*(e.length-1)))))},onPointerLeave:()=>s(null)},(0,a.createElement)("svg",{viewBox:`0 0 100 ${t}`,preserveAspectRatio:"none",className:"tr-w-full tr-text-brand",style:{height:t},role:"img","aria-label":p},(0,a.createElement)("defs",null,(0,a.createElement)("linearGradient",{id:"tr-trend-fill",x1:"0",y1:"0",x2:"0",y2:"1"},(0,a.createElement)("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"0.22"}),(0,a.createElement)("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0"}))),(0,a.createElement)("path",{d:g,fill:"url(#tr-trend-fill)"}),(0,a.createElement)("path",{d,fill:"none",stroke:"currentColor",strokeWidth:"2",vectorEffect:"non-scaling-stroke"})),null!==k&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("span",{"aria-hidden":"true",className:"tr-absolute tr-bg-line",style:{left:`${y}%`,top:0,width:1,height:t,pointerEvents:"none"}}),(0,a.createElement)("span",{"aria-hidden":"true",className:"tr-absolute tr-bg-brand",style:{left:`${y}%`,top:c[r][1],width:8,height:8,marginLeft:-4,marginTop:-4,borderRadius:"50%",boxShadow:"0 0 0 2px #fff",pointerEvents:"none"}}),(0,a.createElement)("span",{"aria-hidden":"true","data-tr-trend-tooltip":"",className:"tr-absolute tr-text-xs tr-text-primary tr-bg-white tr-border tr-border-secondary tr-rounded-lg",style:{left:`${y}%`,top:-8,transform:`translate(${x}, -100%)`,padding:"4px 8px",whiteSpace:"nowrap",pointerEvents:"none",boxShadow:"0 2px 8px rgba(0,0,0,.08)"}},(0,i.sprintf)(/* translators: 1: date, 2: referral count. */ /* translators: 1: date, 2: referral count. */ |
| 61 | 62 | (0,i._n)("%1$s: %2$d referral","%1$s: %2$d referrals",k.value,"thinkrank"),E(k.label),k.value)))),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-mt-1"},(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},E(M.label)),(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},E(u.label))),(0,a.createElement)("table",{className:"screen-reader-text"},(0,a.createElement)("caption",null,(0,i.__)("AI referrals by day","thinkrank")),(0,a.createElement)("thead",null,(0,a.createElement)("tr",null,(0,a.createElement)("th",{scope:"col"},(0,i.__)("Date","thinkrank")),(0,a.createElement)("th",{scope:"col"},(0,i.__)("AI referrals","thinkrank")))),(0,a.createElement)("tbody",null,e.map(e=>(0,a.createElement)("tr",{key:e.label},(0,a.createElement)("th",{scope:"row"},E(e.label)),(0,a.createElement)("td",null,e.value))))))},T=({icon:e,label:t,value:r,hint:n})=>(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-[170px] tr-rounded-xl tr-border tr-border-secondary tr-bg-white tr-p-4"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2 tr-mb-2.5"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-8 tr-h-8 tr-rounded-lg tr-bg-brand-bg tr-text-brand"},(0,a.createElement)(e,{className:"tr-w-[18px] tr-h-[18px]"})),(0,a.createElement)("span",{className:"tr-text-xs tr-font-medium tr-text-tertiary"},t)),(0,a.createElement)("div",{className:"tr-text-2xl tr-font-semibold tr-text-primary tr-leading-tight tr-truncate"},r),n&&(0,a.createElement)("div",{className:"tr-text-xs tr-text-secondary tr-mt-1"},n)),f=({entries:e,max:t})=>(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-2.5"},e.map(([e,r])=>{const n=(e=>I[e]||"var(--tr-brand-500, #6366f1)")(e),i=Math.max(3,Math.round(r/t*100));return(0,a.createElement)("div",{key:e,className:"tr-flex tr-items-center tr-gap-3"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-gap-2 tr-w-48 tr-shrink-0 tr-min-w-0"},(0,a.createElement)("span",{className:"tr-w-2.5 tr-h-2.5 tr-rounded-full tr-shrink-0",style:{backgroundColor:n}}),(0,a.createElement)("span",{className:"tr-text-sm tr-text-secondary tr-truncate"},j(e))),(0,a.createElement)("span",{className:"tr-flex-1 tr-h-2.5 tr-rounded-full tr-bg-line-2 tr-overflow-hidden"},(0,a.createElement)("span",{className:"tr-block tr-h-full tr-rounded-full",style:{width:`${i}%`,backgroundColor:n}})),(0,a.createElement)("span",{className:"tr-w-12 tr-text-right tr-text-sm tr-font-semibold tr-text-primary tr-tabular-nums"},r))})),_=({children:e,trailing:t})=>(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-gap-3 tr-mb-3"},(0,a.createElement)("h4",{className:"tr-m-0 tr-text-sm tr-font-semibold tr-text-primary"},e),t),A=[7,30,90],w=()=>{const[e,t]=(0,n.useState)(30),[r,s]=(0,n.useState)("platforms"),[o,g]=(0,n.useState)(null),[M,u]=(0,n.useState)(!0),[m,h]=(0,n.useState)("");(0,n.useEffect)(()=>{let t=!0;return u(!0),l()({path:`/thinkrank/v1/ai-insights/traffic?days=${e}`}).then(e=>{t&&(g(e.data),h(""))}).catch(e=>{t&&(N.A.error("ThinkRank: AI traffic load failed",e),h((0,i.__)("Couldn’t load AI traffic data. Reload the page and try again.","thinkrank")))}).finally(()=>t&&u(!1)),()=>{t=!1}},[e]);const D=(0,a.createElement)("div",{className:"tr-inline-flex tr-rounded-lg tr-border tr-border-secondary tr-bg-white tr-p-0.5"},A.map(r=>(0,a.createElement)("button",{key:r,type:"button",onClick:()=>t(r),className:c()("tr-px-2.5 tr-py-1 tr-rounded-md tr-text-xs tr-font-medium tr-border-0 tr-cursor-pointer tr-transition-colors",e===r?"tr-bg-brand tr-text-white":"tr-bg-transparent tr-text-tertiary hover:tr-text-secondary")},(0,i.sprintf)(/* translators: %d: number of days. */ /* translators: %d: number of days. */ |
| 62 | 63 | (0,i.__)("%dd","thinkrank"),r))));if(m)return(0,a.createElement)(d.Fc,{variant:"error"},m);if(M&&!o)return(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-5"},(0,a.createElement)("div",{className:"tr-flex tr-flex-wrap tr-gap-3"},[0,1,2].map(e=>(0,a.createElement)("div",{key:e,className:"tr-flex-1 tr-min-w-[170px] tr-rounded-xl tr-border tr-border-secondary tr-p-4"},(0,a.createElement)(d.EA,{className:"tr-h-4 tr-w-24 tr-mb-3"}),(0,a.createElement)(d.EA,{className:"tr-h-7 tr-w-16"})))),(0,a.createElement)(d.EA,{className:"tr-h-[72px] tr-w-full tr-rounded-lg"}),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-2.5"},[0,1,2,3].map(e=>(0,a.createElement)(d.EA,{key:e,className:"tr-h-3 tr-w-full"}))));const I=Object.entries(o.platforms||{}),E=Object.entries(o.crawlers||{}),w=Object.entries(o.top_pages||{}),b=Object.entries(o.trend||{}).map(([e,t])=>({label:e,value:t})),O=b.filter(e=>e.value>0).length,v=Math.max(1,...I.map(([,e])=>e)),L=Math.max(1,...E.map(([,e])=>e)),S=I.length?j(I[0][0]):"—",C=0===I.length&&0===E.length&&!(o.markdown_served>0);return(0,a.createElement)("div",{className:c()("tr-flex tr-flex-col tr-gap-5",M&&"tr-opacity-60")},!C&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-gap-3"},(0,a.createElement)("h4",{className:"tr-m-0 tr-text-sm tr-font-semibold tr-text-primary"},(0,i.__)("Overview","thinkrank")),D),(0,a.createElement)("div",{className:"tr-flex tr-flex-wrap tr-gap-3"},(0,a.createElement)(T,{icon:p,label:(0,i.sprintf)(/* translators: %d: number of days. */ /* translators: %d: number of days. */ |
| @@ -61,9 +62,10 @@ | ||
| 61 | 62 | (0,i._n)("%1$s: %2$d referral","%1$s: %2$d referrals",k.value,"thinkrank"),E(k.label),k.value)))),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-mt-1"},(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},E(M.label)),(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},E(u.label))),(0,a.createElement)("table",{className:"screen-reader-text"},(0,a.createElement)("caption",null,(0,i.__)("AI referrals by day","thinkrank")),(0,a.createElement)("thead",null,(0,a.createElement)("tr",null,(0,a.createElement)("th",{scope:"col"},(0,i.__)("Date","thinkrank")),(0,a.createElement)("th",{scope:"col"},(0,i.__)("AI referrals","thinkrank")))),(0,a.createElement)("tbody",null,e.map(e=>(0,a.createElement)("tr",{key:e.label},(0,a.createElement)("th",{scope:"row"},E(e.label)),(0,a.createElement)("td",null,e.value))))))},T=({icon:e,label:t,value:r,hint:n})=>(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-[170px] tr-rounded-xl tr-border tr-border-secondary tr-bg-white tr-p-4"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2 tr-mb-2.5"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-8 tr-h-8 tr-rounded-lg tr-bg-brand-bg tr-text-brand"},(0,a.createElement)(e,{className:"tr-w-[18px] tr-h-[18px]"})),(0,a.createElement)("span",{className:"tr-text-xs tr-font-medium tr-text-tertiary"},t)),(0,a.createElement)("div",{className:"tr-text-2xl tr-font-semibold tr-text-primary tr-leading-tight tr-truncate"},r),n&&(0,a.createElement)("div",{className:"tr-text-xs tr-text-secondary tr-mt-1"},n)),f=({entries:e,max:t})=>(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-2.5"},e.map(([e,r])=>{const n=(e=>I[e]||"var(--tr-brand-500, #6366f1)")(e),i=Math.max(3,Math.round(r/t*100));return(0,a.createElement)("div",{key:e,className:"tr-flex tr-items-center tr-gap-3"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-gap-2 tr-w-48 tr-shrink-0 tr-min-w-0"},(0,a.createElement)("span",{className:"tr-w-2.5 tr-h-2.5 tr-rounded-full tr-shrink-0",style:{backgroundColor:n}}),(0,a.createElement)("span",{className:"tr-text-sm tr-text-secondary tr-truncate"},j(e))),(0,a.createElement)("span",{className:"tr-flex-1 tr-h-2.5 tr-rounded-full tr-bg-line-2 tr-overflow-hidden"},(0,a.createElement)("span",{className:"tr-block tr-h-full tr-rounded-full",style:{width:`${i}%`,backgroundColor:n}})),(0,a.createElement)("span",{className:"tr-w-12 tr-text-right tr-text-sm tr-font-semibold tr-text-primary tr-tabular-nums"},r))})),_=({children:e,trailing:t})=>(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-gap-3 tr-mb-3"},(0,a.createElement)("h4",{className:"tr-m-0 tr-text-sm tr-font-semibold tr-text-primary"},e),t),A=[7,30,90],w=()=>{const[e,t]=(0,n.useState)(30),[r,s]=(0,n.useState)("platforms"),[o,g]=(0,n.useState)(null),[M,u]=(0,n.useState)(!0),[m,h]=(0,n.useState)("");(0,n.useEffect)(()=>{let t=!0;return u(!0),l()({path:`/thinkrank/v1/ai-insights/traffic?days=${e}`}).then(e=>{t&&(g(e.data),h(""))}).catch(e=>{t&&(N.A.error("ThinkRank: AI traffic load failed",e),h((0,i.__)("Couldn’t load AI traffic data. Reload the page and try again.","thinkrank")))}).finally(()=>t&&u(!1)),()=>{t=!1}},[e]);const D=(0,a.createElement)("div",{className:"tr-inline-flex tr-rounded-lg tr-border tr-border-secondary tr-bg-white tr-p-0.5"},A.map(r=>(0,a.createElement)("button",{key:r,type:"button",onClick:()=>t(r),className:c()("tr-px-2.5 tr-py-1 tr-rounded-md tr-text-xs tr-font-medium tr-border-0 tr-cursor-pointer tr-transition-colors",e===r?"tr-bg-brand tr-text-white":"tr-bg-transparent tr-text-tertiary hover:tr-text-secondary")},(0,i.sprintf)(/* translators: %d: number of days. */ /* translators: %d: number of days. */ |
| 62 | 63 | (0,i.__)("%dd","thinkrank"),r))));if(m)return(0,a.createElement)(d.Fc,{variant:"error"},m);if(M&&!o)return(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-5"},(0,a.createElement)("div",{className:"tr-flex tr-flex-wrap tr-gap-3"},[0,1,2].map(e=>(0,a.createElement)("div",{key:e,className:"tr-flex-1 tr-min-w-[170px] tr-rounded-xl tr-border tr-border-secondary tr-p-4"},(0,a.createElement)(d.EA,{className:"tr-h-4 tr-w-24 tr-mb-3"}),(0,a.createElement)(d.EA,{className:"tr-h-7 tr-w-16"})))),(0,a.createElement)(d.EA,{className:"tr-h-[72px] tr-w-full tr-rounded-lg"}),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-2.5"},[0,1,2,3].map(e=>(0,a.createElement)(d.EA,{key:e,className:"tr-h-3 tr-w-full"}))));const I=Object.entries(o.platforms||{}),E=Object.entries(o.crawlers||{}),w=Object.entries(o.top_pages||{}),b=Object.entries(o.trend||{}).map(([e,t])=>({label:e,value:t})),O=b.filter(e=>e.value>0).length,v=Math.max(1,...I.map(([,e])=>e)),L=Math.max(1,...E.map(([,e])=>e)),S=I.length?j(I[0][0]):"—",C=0===I.length&&0===E.length&&!(o.markdown_served>0);return(0,a.createElement)("div",{className:c()("tr-flex tr-flex-col tr-gap-5",M&&"tr-opacity-60")},!C&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-gap-3"},(0,a.createElement)("h4",{className:"tr-m-0 tr-text-sm tr-font-semibold tr-text-primary"},(0,i.__)("Overview","thinkrank")),D),(0,a.createElement)("div",{className:"tr-flex tr-flex-wrap tr-gap-3"},(0,a.createElement)(T,{icon:p,label:(0,i.sprintf)(/* translators: %d: number of days. */ /* translators: %d: number of days. */ |
| 63 | 64 | (0,i.__)("AI referral visits (%dd)","thinkrank"),o.days),value:Number(o.ai_sessions).toLocaleString()}),(0,a.createElement)(T,{icon:k,label:(0,i.__)("Share of all visits","thinkrank"),value:`${o.ai_share}%`,hint:(0,i.sprintf)(/* translators: %s: total tracked pageviews. */ /* translators: %s: total tracked pageviews. */ |
| 64 | 65 | (0,i.__)("of %s tracked pageviews","thinkrank"),Number(o.baseline).toLocaleString())}),(0,a.createElement)(T,{icon:y,label:(0,i.__)("Top AI platform","thinkrank"),value:S}))),C?(0,a.createElement)(d.pp,{icon:x,illustration:!1,title:(0,i.__)("No AI traffic recorded yet","thinkrank"),description:(0,i.__)("Tracking started with this update. As AI platforms send visitors and AI crawlers fetch your pages, they’ll appear here no setup needed.","thinkrank")}):(0,a.createElement)(a.Fragment,null,O>1&&(0,a.createElement)("div",{className:"tr-rounded-xl tr-border tr-border-secondary tr-bg-white tr-p-4"},(0,a.createElement)(_,null,(0,i.__)("AI referrals over time","thinkrank")),(0,a.createElement)(z,{points:b})),(0,a.createElement)("div",null,(0,a.createElement)(d.tU,{tabs:[{id:"platforms",label:(0,i.__)("Platforms","thinkrank"),badge:I.length},{id:"pages",label:(0,i.__)("Top Pages","thinkrank"),badge:w.length},{id:"crawlers",label:(0,i.__)("Crawlers","thinkrank"),badge:E.length}],activeTab:r,onTabChange:s}),(0,a.createElement)("div",{className:"tr-pt-4"},"platforms"===r&&(I.length>0?(0,a.createElement)(f,{entries:I,max:v}):(0,a.createElement)("p",{className:"tr-m-0 tr-text-sm tr-text-secondary"},(0,i.__)("No AI platform referrals recorded yet.","thinkrank"))),"pages"===r&&(w.length>0?(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1"},w.map(([e,t])=>(0,a.createElement)("div",{key:e,className:"tr-flex tr-items-center tr-justify-between tr-gap-4 tr-rounded-lg tr-px-3 tr-py-2 tr-text-sm hover:tr-bg-line-2 tr-transition-colors"},(0,a.createElement)("code",{className:"tr-truncate tr-text-secondary tr-bg-transparent tr-p-0"},e),(0,a.createElement)("span",{className:"tr-font-semibold tr-text-primary tr-tabular-nums"},t)))):(0,a.createElement)("p",{className:"tr-m-0 tr-text-sm tr-text-secondary"},(0,i.__)("No landing pages recorded yet.","thinkrank"))),"crawlers"===r&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"tr-flex tr-justify-end tr-gap-2 tr-flex-wrap tr-mb-3"},(o.markdown_served||0)>0&&(0,a.createElement)(d.Ex,{variant:"good"},(0,i.sprintf)(/* translators: %d: number of Markdown responses served to AI agents. */ /* translators: %d: number of Markdown responses served to AI agents. */ |
| 65 | -(0,i._n)("%d Markdown page served to AI","%d Markdown pages served to AI",o.markdown_served,"thinkrank"),o.markdown_served)),(0,a.createElement)(d.Ex,{variant:o.llms_txt?"good":"warning"},o.llms_txt?(0,i.__)("llms.txt is live","thinkrank"):(0,i.__)("No llms.txt","thinkrank"))),E.length>0?(0,a.createElement)(f,{entries:E,max:L}):(0,a.createElement)("p",{className:"tr-m-0 tr-text-sm tr-text-secondary"},(0,i.__)("No AI crawler hits recorded yet.","thinkrank")))))))},b=[{id:"traffic",label:(0,i.__)("AI Traffic","thinkrank"),icon:p},{id:"revenue",label:(0,i.__)("AI Revenue","thinkrank"),icon:k}],O=()=>{const[e,t]=(0,n.useState)("traffic");return(0,a.createElement)(d.Zp,{padding:!1},(0,a.createElement)(g.A,{title:(0,i.__)("AI Insights","thinkrank"),description:(0,i.__)("How AI platforms send you visitors, and which AI crawlers read your site.","thinkrank")}),(0,a.createElement)("div",{className:"tr-px-6 tr-pt-4"},(0,a.createElement)(d.tU,{tabs:b,activeTab:e,onTabChange:t})),(0,a.createElement)("div",{className:"tr-p-6"},(0,a.createElement)(d.Kp,{tabId:"traffic",activeTab:e},"traffic"===e&&(0,a.createElement)(w,null)),(0,a.createElement)(d.Kp,{tabId:"revenue",activeTab:e},"revenue"===e&&(0,a.createElement)(u.A,{filter:"thinkrank.aiInsights.revenueTab",teaser:(0,a.createElement)(M.A,{illustration:(0,a.createElement)(m.Hs,null),title:(0,i.__)("AI referral revenue","thinkrank"),description:(0,i.__)("AI Traffic shows how many people ChatGPT, Perplexity and other assistants send you. ThinkRank Pro shows what they spend: WooCommerce orders and revenue credited to the AI platform that brought the customer.","thinkrank"),features:[(0,i.__)("Revenue, orders and average order value per AI platform","thinkrank"),(0,i.__)("The landing pages that earn the most from AI visitors","thinkrank"),(0,i.__)("A configurable attribution window, stated plainly","thinkrank")]})}))))}},57874:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-4-4.6l-4 4 4 4 1-1-3-3 3-3-1-1z"}))},58020:(e,t,r)=>{"use strict";r.d(t,{EN:()=>i,wS:()=>a,yP:()=>n});const a=()=>!!window.thinkrankAdmin?.isPro||!!window.thinkrankProLicense,n=()=>a()&&!window.thinkrankAdmin?.isPro,i=()=>`${window.location.pathname}?page=thinkrank-license`},58438:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M7 11.5h10V13H7z"}))},58459:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(51609),n=r(97500),i=r.n(n);function s({checked:e,onChange:t,label:r,description:n,disabled:s=!1,id:l}){const o=l||("string"==typeof r?r.toLowerCase().replace(/\s+/g,"-"):void 0);return(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-3"},(0,a.createElement)("button",{id:o,role:"switch","aria-checked":e,onClick:()=>!s&&t(!e),disabled:s,className:i()("tr-relative tr-inline-flex tr-h-6 tr-w-11 tr-shrink-0 tr-items-center","tr-rounded-full tr-border-2 tr-border-transparent","tr-transition-colors tr-duration-200","focus:tr-outline-none focus:tr-ring-2 focus:tr-ring-brand focus:tr-ring-offset-2","disabled:tr-opacity-50 disabled:tr-cursor-not-allowed",e?"tr-bg-brand":"tr-bg-line-2")},(0,a.createElement)("span",{className:i()("tr-inline-block tr-h-4 tr-w-4 tr-rounded-full tr-bg-white tr-shadow","tr-transition-transform tr-duration-200",e?"tr-translate-x-5":"tr-translate-x-0")})),(r||n)&&(0,a.createElement)("label",{htmlFor:o,className:"tr-flex tr-flex-col tr-cursor-pointer"},r&&(0,a.createElement)("span",{className:"tr-text-sm tr-font-medium tr-text-secondary"},r),n&&(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary tr-mt-0.5"},n)))}},59160:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M12 15.8c-3.7 0-6.8-3-6.8-6.8s3-6.8 6.8-6.8c3.7 0 6.8 3 6.8 6.8s-3.1 6.8-6.8 6.8zm0-12C9.1 3.8 6.8 6.1 6.8 9s2.4 5.2 5.2 5.2c2.9 0 5.2-2.4 5.2-5.2S14.9 3.8 12 3.8zM8 17.5h8V19H8zM10 20.5h4V22h-4z"}))},59550:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,a.createElement)(n.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"}))},59613:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(51609),n=r(5573);const i=(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"}))},59621:(e,t,r)=>{"use strict";r.d(t,{B6:()=>h,DZ:()=>M,Jk:()=>m,M5:()=>g,V$:()=>y,uT:()=>N,yJ:()=>k,z0:()=>u,zR:()=>p});var a=r(51609),n=r(27723),i=r(1455),s=r.n(i),l=r(60775),o=(r(79993),r(94240)),c=r(17104),d=r(39694);const g=async e=>{try{e.abortControllerRef.current=new AbortController,e.updateLoadingState("isLoading",!0);const t=await s()({path:"/thinkrank/v1/schema/settings?context_type=site",method:"GET",signal:e.abortControllerRef.current.signal});if(t.success){const r={...(0,c.lA)(),...t.data.settings},a=(0,c.AW)(r);e.safeSetState(e.setSettings,a)}else e.safeSetState(e.setSettings,(0,c.lA)())}catch(t){"AbortError"!==t.name&&(l.A.error("Schema settings load error:",t),e.safeSetState(e.setSettings,(0,c.lA)()),o.A.error((0,n.__)("Failed to load schema settings. Using defaults.","thinkrank")))}finally{e.updateLoadingState("isLoading",!1)}},M=async e=>{try{e.abortControllerRef.current=new AbortController,e.updateLoadingState("isSaving",!0),e.safeSetState(e.setNotice,null);const t=(0,d.Sj)(e.settings);if(t.length>0)return void e.safeSetState(e.setNotice,{status:"error",message:(0,a.createElement)("div",null,(0,a.createElement)("strong",null,(0,n.__)("Please fix the following errors:","thinkrank")),(0,a.createElement)("ul",{className:"thinkrank-mt-xs",style:{paddingLeft:"20px"}},t.map((e,t)=>(0,a.createElement)("li",{key:t},e))))});const r=(0,c.AW)(e.settings),i=await s()({path:"/thinkrank/v1/schema/settings",method:"POST",data:{settings:r,context_type:"site"},signal:e.abortControllerRef.current.signal});if(!i.success)throw new Error(i.error||"Failed to save settings");e.safeSetState(e.setHasChanges,!1),o.A.success((0,n.__)("Schema settings saved successfully!","thinkrank"))}catch(t){"AbortError"!==t.name&&(l.A.error("Schema settings save error:",t),"validation_failed"===t.code&&t.data?.validation_errors?e.safeSetState(e.setNotice,{status:"error",message:(0,a.createElement)("div",null,(0,a.createElement)("strong",null,(0,n.__)("Settings validation failed:","thinkrank")),(0,a.createElement)("ul",{className:"thinkrank-mt-xs",style:{paddingLeft:"20px"}},t.data.validation_errors.map((e,t)=>(0,a.createElement)("li",{key:t},e))),t.data.validation_warnings&&t.data.validation_warnings.length>0&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("strong",null,(0,n.__)("Warnings:","thinkrank")),(0,a.createElement)("ul",{className:"thinkrank-mt-xs",style:{paddingLeft:"20px"}},t.data.validation_warnings.map((e,t)=>(0,a.createElement)("li",{key:t},e)))))}):o.A.error(t.message||(0,n.__)("Failed to save schema settings. Please try again.","thinkrank")))}finally{e.updateLoadingState("isSaving",!1)}},u=async e=>{try{const t=await s()({path:"/thinkrank/v1/schema/types?context=site",method:"GET"});t.success&&e.updateSchemaData("schemaTypes",t.data.types||[])}catch(t){l.A.error("Schema types load error:",t),e.updateSchemaData("schemaTypes",[{name:"Organization",description:"Companies and organizations"},{name:"LocalBusiness",description:"Local businesses with physical locations"},{name:"Person",description:"Individual person or author information"},{name:"WebSite",description:"Website-level information and search functionality"}])}},m=async e=>{try{const t=await s()({path:"/thinkrank/v1/schema/deployed?context_type=site"});t.success&&e.updateSchemaData("deployedSchemas",t.data)}catch(e){l.A.error("Failed to load deployed schemas:",e)}},N=async e=>{try{e.updateLoadingState("isValidating",!0),e.safeSetState(e.setNotice,null);const t=window.location.origin,r=`https://search.google.com/test/rich-results?url=${encodeURIComponent(t)}`;window.open(r,"_blank"),o.A.info((0,n.__)("Google Rich Results Test opened in new tab. Test your schema markup there.","thinkrank"))}catch(e){l.A.error("Rich Results test error:",e),o.A.error((0,n.__)("Failed to open Rich Results Test. Please try again.","thinkrank"))}finally{e.updateLoadingState("isValidating",!1)}},h=async e=>{try{var t,r,a;e.updateLoadingState("isGenerating",!0);const i=["Organization","LocalBusiness","Person","WebSite"];let l=e.settings.enabled_schema_types||[];Array.isArray(l)&&(l=l.filter(e=>i.includes(e))),l.length||(l=["Organization"]);const c={context_type:"site",schema_types:l,options:{validation_level:e.settings.validation_level||"moderate",rich_snippets_optimization:null===(t=e.settings.rich_snippets_optimization)||void 0===t||t,knowledge_graph:null===(r=e.settings.knowledge_graph)||void 0===r||r,auto_generate_schema:null===(a=e.settings.auto_generate_schema)||void 0===a||a,enable_breadcrumbs_schema:e.settings.enable_breadcrumbs_schema||!1,enable_accordion_faq_schema:e.settings.enable_accordion_faq_schema||!1,enable_local_business:e.settings.enable_local_business||!1}},d=await s()({path:"/thinkrank/v1/schema/generate",method:"POST",data:c});d.success&&(e.updateSchemaData("generatedSchemas",d.data),o.A.success((0,n.__)("Schema markup generated successfully!","thinkrank")))}catch(e){l.A.error("Schema generation error:",e),o.A.error((0,n.__)("Schema generation failed. Please try again.","thinkrank"))}finally{e.updateLoadingState("isGenerating",!1)}},p=async e=>{try{e.updateLoadingState("isDeploying",!0);const t=e.generatedSchemas?.generated_schemas||e.deployedSchemas;if(!t)return void o.A.error((0,n.__)("No schema markup to deploy. Please generate schema first.","thinkrank"));const r={context_type:"site",schema_data:t,options:{deployment_method:e.settings.deployment_method||"json_ld"}};(await s()({path:"/thinkrank/v1/schema/deploy",method:"POST",data:r})).success&&(o.A.success((0,n.__)("Schema markup deployed successfully!","thinkrank")),m(e))}catch(e){l.A.error("Schema deployment error:",e),o.A.error((0,n.__)("Schema deployment failed. Please try again.","thinkrank"))}finally{e.updateLoadingState("isDeploying",!1)}},k=async e=>{try{if(!e.generatedSchemas?.generated_schemas)return void o.A.error((0,n.__)("No schema markup to preview. Please generate schema first.","thinkrank"));e.updateLoadingState("isPreviewing",!0);const t={},r=e.generatedSchemas.generated_schemas,a=[];for(const[e,n]of Object.entries(r))try{const r=await s()({path:"/thinkrank/v1/schema/preview",method:"POST",data:{schema_data:n,schema_type:e}});r.success&&r.data.rich_snippets?t[e]=r.data.rich_snippets:a.push(e)}catch(t){l.A.error(`Schema preview error for ${e}:`,t),a.push(e)}e.updateSchemaData("schemaPreview",{rich_snippets:t}),a.length>0&&o.A.error((0,n.sprintf)(/* translators: %s: comma-separated schema type names. */ /* translators: %s: comma-separated schema type names. */ | |
| 66 | +(0,i._n)("%d Markdown page served to AI","%d Markdown pages served to AI",o.markdown_served,"thinkrank"),o.markdown_served)),(0,a.createElement)(d.Ex,{variant:o.llms_txt?"good":"warning"},o.llms_txt?(0,i.__)("llms.txt is live","thinkrank"):(0,i.__)("No llms.txt","thinkrank"))),E.length>0?(0,a.createElement)(f,{entries:E,max:L}):(0,a.createElement)("p",{className:"tr-m-0 tr-text-sm tr-text-secondary"},(0,i.__)("No AI crawler hits recorded yet.","thinkrank")))))))},b=[{id:"traffic",label:(0,i.__)("AI Traffic","thinkrank"),icon:p},{id:"revenue",label:(0,i.__)("AI Revenue","thinkrank"),icon:k}],O=()=>{const[e,t]=(0,n.useState)("traffic");return(0,a.createElement)(d.Zp,{padding:!1},(0,a.createElement)(g.A,{title:(0,i.__)("AI Insights","thinkrank"),description:(0,i.__)("How AI platforms send you visitors, and which AI crawlers read your site.","thinkrank")}),(0,a.createElement)("div",{className:"tr-px-6 tr-pt-4"},(0,a.createElement)(d.tU,{tabs:b,activeTab:e,onTabChange:t})),(0,a.createElement)("div",{className:"tr-p-6"},(0,a.createElement)(d.Kp,{tabId:"traffic",activeTab:e},"traffic"===e&&(0,a.createElement)(w,null)),(0,a.createElement)(d.Kp,{tabId:"revenue",activeTab:e},"revenue"===e&&(0,a.createElement)(u.A,{filter:"thinkrank.aiInsights.revenueTab",teaser:(0,a.createElement)(M.A,{illustration:(0,a.createElement)(m.Hs,null),title:(0,i.__)("AI referral revenue","thinkrank"),description:(0,i.__)("AI Traffic shows how many people ChatGPT, Perplexity and other assistants send you. ThinkRank Pro shows what they spend: WooCommerce orders and revenue credited to the AI platform that brought the customer.","thinkrank"),features:[(0,i.__)("Revenue, orders and average order value per AI platform","thinkrank"),(0,i.__)("The landing pages that earn the most from AI visitors","thinkrank"),(0,i.__)("A configurable attribution window, stated plainly","thinkrank")]})}))))}},57874:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-4-4.6l-4 4 4 4 1-1-3-3 3-3-1-1z"}))},58020:(e,t,r)=>{"use strict";r.d(t,{EN:()=>i,wS:()=>a,yP:()=>n});const a=()=>!!window.thinkrankAdmin?.isPro||!!window.thinkrankProLicense,n=()=>a()&&!window.thinkrankAdmin?.isPro,i=()=>`${window.location.pathname}?page=thinkrank-license`},58438:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M7 11.5h10V13H7z"}))},58459:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(51609),n=r(97500),i=r.n(n);function s({checked:e,onChange:t,label:r,description:n,disabled:s=!1,id:l}){const o=l||("string"==typeof r?r.toLowerCase().replace(/\s+/g,"-"):void 0);return(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-3"},(0,a.createElement)("button",{id:o,role:"switch","aria-checked":e,onClick:()=>!s&&t(!e),disabled:s,className:i()("tr-relative tr-inline-flex tr-h-6 tr-w-11 tr-shrink-0 tr-items-center","tr-rounded-full tr-border-2 tr-border-transparent","tr-transition-colors tr-duration-200","focus:tr-outline-none focus:tr-ring-2 focus:tr-ring-brand focus:tr-ring-offset-2","disabled:tr-opacity-50 disabled:tr-cursor-not-allowed",e?"tr-bg-brand":"tr-bg-line-2")},(0,a.createElement)("span",{className:i()("tr-inline-block tr-h-4 tr-w-4 tr-rounded-full tr-bg-white tr-shadow","tr-transition-transform tr-duration-200",e?"tr-translate-x-5":"tr-translate-x-0")})),(r||n)&&(0,a.createElement)("label",{htmlFor:o,className:"tr-flex tr-flex-col tr-cursor-pointer"},r&&(0,a.createElement)("span",{className:"tr-text-sm tr-font-medium tr-text-secondary"},r),n&&(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary tr-mt-0.5"},n)))}},59160:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M12 15.8c-3.7 0-6.8-3-6.8-6.8s3-6.8 6.8-6.8c3.7 0 6.8 3 6.8 6.8s-3.1 6.8-6.8 6.8zm0-12C9.1 3.8 6.8 6.1 6.8 9s2.4 5.2 5.2 5.2c2.9 0 5.2-2.4 5.2-5.2S14.9 3.8 12 3.8zM8 17.5h8V19H8zM10 20.5h4V22h-4z"}))},59550:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,a.createElement)(n.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"}))},59613:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(51609),n=r(5573);const i=(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"}))},59621:(e,t,r)=>{"use strict";r.d(t,{B6:()=>h,DZ:()=>M,Jk:()=>m,M5:()=>g,V$:()=>y,uT:()=>N,yJ:()=>k,z0:()=>u,zR:()=>p});var a=r(51609),n=r(27723),i=r(1455),s=r.n(i),l=r(60775),o=(r(79993),r(94240)),c=r(17104),d=r(39694);const g=async e=>{try{e.abortControllerRef.current=new AbortController,e.updateLoadingState("isLoading",!0);const t=await s()({path:"/thinkrank/v1/schema/settings?context_type=site",method:"GET",signal:e.abortControllerRef.current.signal});if(t.success){const r={...(0,c.lA)(),...t.data.settings},a=(0,c.AW)(r);e.safeSetState(e.setSettings,a)}else e.safeSetState(e.setSettings,(0,c.lA)())}catch(t){"AbortError"!==t.name&&(l.A.error("Schema settings load error:",t),e.safeSetState(e.setSettings,(0,c.lA)()),o.A.error((0,n.__)("Failed to load schema settings. Using defaults.","thinkrank")))}finally{e.updateLoadingState("isLoading",!1)}},M=async e=>{try{e.abortControllerRef.current=new AbortController,e.updateLoadingState("isSaving",!0),e.safeSetState(e.setNotice,null);const t=(0,d.Sj)(e.settings);if(t.length>0)return void e.safeSetState(e.setNotice,{status:"error",message:(0,a.createElement)("div",null,(0,a.createElement)("strong",null,(0,n.__)("Please fix the following errors:","thinkrank")),(0,a.createElement)("ul",{className:"thinkrank-mt-xs",style:{paddingLeft:"20px"}},t.map((e,t)=>(0,a.createElement)("li",{key:t},e))))});const r=(0,c.AW)(e.settings),i=await s()({path:"/thinkrank/v1/schema/settings",method:"POST",data:{settings:r,context_type:"site"},signal:e.abortControllerRef.current.signal});if(!i.success)throw new Error(i.error||"Failed to save settings");e.safeSetState(e.setHasChanges,!1),o.A.success((0,n.__)("Schema settings saved successfully!","thinkrank"))}catch(t){"AbortError"!==t.name&&(l.A.error("Schema settings save error:",t),"validation_failed"===t.code&&t.data?.validation_errors?e.safeSetState(e.setNotice,{status:"error",message:(0,a.createElement)("div",null,(0,a.createElement)("strong",null,(0,n.__)("Settings validation failed:","thinkrank")),(0,a.createElement)("ul",{className:"thinkrank-mt-xs",style:{paddingLeft:"20px"}},t.data.validation_errors.map((e,t)=>(0,a.createElement)("li",{key:t},e))),t.data.validation_warnings&&t.data.validation_warnings.length>0&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("strong",null,(0,n.__)("Warnings:","thinkrank")),(0,a.createElement)("ul",{className:"thinkrank-mt-xs",style:{paddingLeft:"20px"}},t.data.validation_warnings.map((e,t)=>(0,a.createElement)("li",{key:t},e)))))}):o.A.error(t.message||(0,n.__)("Failed to save schema settings. Please try again.","thinkrank")))}finally{e.updateLoadingState("isSaving",!1)}},u=async e=>{try{const t=await s()({path:"/thinkrank/v1/schema/types?context=site",method:"GET"});t.success&&e.updateSchemaData("schemaTypes",t.data.types||[])}catch(t){l.A.error("Schema types load error:",t),e.updateSchemaData("schemaTypes",[{name:"Organization",description:"Companies and organizations"},{name:"LocalBusiness",description:"Local businesses with physical locations"},{name:"Person",description:"Individual person or author information"},{name:"WebSite",description:"Website-level information and search functionality"}])}},m=async e=>{try{const t=await s()({path:"/thinkrank/v1/schema/deployed?context_type=site"});t.success&&e.updateSchemaData("deployedSchemas",t.data)}catch(e){l.A.error("Failed to load deployed schemas:",e)}},N=async e=>{try{e.updateLoadingState("isValidating",!0),e.safeSetState(e.setNotice,null);const t=window.location.origin,r=`https://search.google.com/test/rich-results?url=${encodeURIComponent(t)}`;window.open(r,"_blank"),o.A.info((0,n.__)("Google Rich Results Test opened in new tab. Test your schema markup there.","thinkrank"))}catch(e){l.A.error("Rich Results test error:",e),o.A.error((0,n.__)("Failed to open Rich Results Test. Please try again.","thinkrank"))}finally{e.updateLoadingState("isValidating",!1)}},h=async e=>{try{var t,r,a;e.updateLoadingState("isGenerating",!0);const i=["Organization","LocalBusiness","Person","WebSite"];let l=e.settings.enabled_schema_types||[];Array.isArray(l)&&(l=l.filter(e=>i.includes(e))),l.length||(l=["Organization"]);const c={context_type:"site",schema_types:l,options:{validation_level:e.settings.validation_level||"moderate",rich_snippets_optimization:null===(t=e.settings.rich_snippets_optimization)||void 0===t||t,knowledge_graph:null===(r=e.settings.knowledge_graph)||void 0===r||r,auto_generate_schema:null===(a=e.settings.auto_generate_schema)||void 0===a||a,enable_breadcrumbs_schema:e.settings.enable_breadcrumbs_schema||!1,enable_accordion_faq_schema:e.settings.enable_accordion_faq_schema||!1,enable_local_business:e.settings.enable_local_business||!1}},d=await s()({path:"/thinkrank/v1/schema/generate",method:"POST",data:c});d.success&&(e.updateSchemaData("generatedSchemas",d.data),o.A.success((0,n.__)("Schema markup generated successfully!","thinkrank")))}catch(e){l.A.error("Schema generation error:",e),o.A.error((0,n.__)("Schema generation failed. Please try again.","thinkrank"))}finally{e.updateLoadingState("isGenerating",!1)}},p=async e=>{try{e.updateLoadingState("isDeploying",!0);const t=e.generatedSchemas?.generated_schemas||e.deployedSchemas;if(!t)return void o.A.error((0,n.__)("No schema markup to deploy. Please generate schema first.","thinkrank"));const r={context_type:"site",schema_data:t,options:{deployment_method:e.settings.deployment_method||"json_ld"}},a=await s()({path:"/thinkrank/v1/schema/deploy",method:"POST",data:r});if(a.success){const t=Array.isArray(a.skipped)?a.skipped:[];t.length?o.A.warning((0,n.sprintf)(/* translators: 1: comma-separated schema types, 2: first validation error. */ /* translators: 1: comma-separated schema types, 2: first validation error. */ | |
| 67 | +(0,n.__)("Some schema was not deployed: %1$s. %2$s","thinkrank"),t.map(e=>e.type).join(", "),t[0]?.errors?.[0]||"")):o.A.success((0,n.__)("Schema markup deployed successfully!","thinkrank")),m(e)}}catch(e){l.A.error("Schema deployment error:",e),o.A.error((0,n.__)("Schema deployment failed. Please try again.","thinkrank"))}finally{e.updateLoadingState("isDeploying",!1)}},k=async e=>{try{if(!e.generatedSchemas?.generated_schemas)return void o.A.error((0,n.__)("No schema markup to preview. Please generate schema first.","thinkrank"));e.updateLoadingState("isPreviewing",!0);const t={},r=e.generatedSchemas.generated_schemas,a=[];for(const[e,n]of Object.entries(r))try{const r=await s()({path:"/thinkrank/v1/schema/preview",method:"POST",data:{schema_data:n,schema_type:e}});r.success&&r.data.rich_snippets?t[e]=r.data.rich_snippets:a.push(e)}catch(t){l.A.error(`Schema preview error for ${e}:`,t),a.push(e)}e.updateSchemaData("schemaPreview",{rich_snippets:t}),a.length>0&&o.A.error((0,n.sprintf)(/* translators: %s: comma-separated schema type names. */ /* translators: %s: comma-separated schema type names. */ | |
| 66 | 68 | (0,n.__)("Could not build a preview for: %s","thinkrank"),a.join(", ")))}catch(e){l.A.error("Schema preview error:",e),o.A.error((0,n.__)("Could not generate the preview. Please try again.","thinkrank"))}finally{e.updateLoadingState("isPreviewing",!1)}},y=async(e,t)=>{try{e.updateLoadingState("isSyncing",!0),e.safeSetState(e.setNotice,null);const r=await s()({path:"/thinkrank/v1/site-identity/settings",method:"GET"});if(!r.success)throw new Error("Failed to fetch Site Identity data");{const a=r.data.settings,i=(0,d.mk)(a,t),s={...e.settings,...i};e.setSettings(s),e.setHasChanges(!0),o.A.success((0,n.sprintf)(/* translators: %s: the kind of data synced, e.g. "Website". */ /* translators: %s: the kind of data synced, e.g. "Website". */ |
| 67 | 69 | (0,n.__)("%s data synced from Site Identity. Save to apply.","thinkrank"),(0,d.Bo)(t)))}}catch(e){l.A.error("Sync error:",e),o.A.error((0,n.sprintf)(/* translators: %s: the kind of data synced, e.g. "Website". */ /* translators: %s: the kind of data synced, e.g. "Website". */ |
| 68 | 70 | (0,n.__)("Failed to sync %s data. Please try again.","thinkrank"),(0,d.Bo)(t)))}finally{e.updateLoadingState("isSyncing",!1)}}},60072:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}))},60163:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"}))},60271:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,a.createElement)(n.Path,{d:"M9 12h2v-2h2V8h-2V6H9v2H7v2h2v2zm1 4c3.9 0 7-3.1 7-7s-3.1-7-7-7-7 3.1-7 7 3.1 7 7 7zm0-12c2.8 0 5 2.2 5 5s-2.2 5-5 5-5-2.2-5-5 2.2-5 5-5zM3 19h14v-2H3v2z"}))},60563:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(51609),n=r(26127);const i=()=>(0,a.createElement)(n.A,null)},60733:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z"}))},60734:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"}))},60775:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});const a=()=>!0===window.thinkrankDebug||!0===window.thinkrankAdmin?.debug,n={error:(...e)=>{a()&&console.error("[ThinkRank]",...e)},warn:(...e)=>{a()&&console.warn("[ThinkRank]",...e)},info:(...e)=>{a()&&console.info("[ThinkRank]",...e)}}},60906:(e,t,r)=>{"use strict";r.d(t,{A:()=>M});var a=r(51609),n=r(86087),i=r(51725),s=r(54583),l=r(49323);const o="site-identity",c="basic-info",d=(e,t)=>{if((0,i.Fz)(e))return[e,t];const r=(0,i.CB)().find(e=>(0,i.Fz)(e.id));if(r){const e=r.items?.[0]?.id||null;return[r.id,e]}return[e,t]},g=(e,t)=>{try{const r=new URL(window.location.href);r.searchParams.set("nav_section",e),r.searchParams.set("nav_item",t),r.searchParams.delete("type"),window.history.replaceState({},"",r.toString())}catch(e){}},M=()=>{const[e,t]=d(o,c),[r,M]=(0,n.useState)(e),[u,m]=(0,n.useState)(t),[N,h]=(0,n.useState)(null);(0,n.useEffect)(()=>{try{const e=new URLSearchParams(window.location.search);let t=o,r=c;"google_analytics"===e.get("type")?(t="integrations",r="google-services"):e.get("nav_section")&&e.get("nav_item")&&(t=e.get("nav_section"),r=e.get("nav_item")),[t,r]=d(t,r),M(t),m(r),g(t,r)}catch(e){h(e.message)}},[]);const p=(0,n.useCallback)((e,t)=>{M(e),m(t),g(e,t)},[]);return(0,n.useEffect)(()=>{const e=e=>{const{section:t,item:r}=e.detail||{};t&&r&&p(t,r)};return window.addEventListener("thinkrank:nav-search",e),()=>window.removeEventListener("thinkrank:nav-search",e)},[p]),(0,a.createElement)("div",{className:"tr-flex tr-flex-col md:tr-flex-row tr-gap-4 lg:tr-gap-6 tr-items-start"},(0,a.createElement)("div",{className:"tr-w-full md:tr-w-44 lg:tr-w-56 md:tr-shrink-0 md:tr-self-stretch"},(0,a.createElement)("div",{className:"md:tr-sticky md:tr-top-0"},(0,a.createElement)(i.Ay,{activeSection:r,activeItem:u,onNavigate:p}))),(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-0 tr-w-full"},N&&(0,a.createElement)(l.Fc,{variant:"error",className:"tr-mb-4"},N),(0,a.createElement)(s.A,{activeSection:r,activeItem:u,onNavigate:p})))}},61053:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"m15.99 10.889-3.988 3.418-3.988-3.418.976-1.14 3.012 2.582 3.012-2.581.976 1.139Z"}))},61180:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var a=r(51609),n=r(86087),i=r(27723),s=r(1455),l=r.n(s),o=r(93832),c=r(97500),d=r.n(c),g=r(49323),M=r(85770),u=r(65549),m=r(52352),N=r(94240),h=r(30012),p=r(60775),k=r(63992);const y="/thinkrank/v1/global-seo/snippets",x={empty_title:(0,i.__)("No custom title","thinkrank"),empty_description:(0,i.__)("No custom description","thinkrank"),title_too_short:(0,i.__)("Title too short","thinkrank"),title_too_long:(0,i.__)("Title too long","thinkrank"),description_too_short:(0,i.__)("Description too short","thinkrank"),description_too_long:(0,i.__)("Description too long","thinkrank"),no_focus_keyword:(0,i.__)("No focus keyword","thinkrank"),noindex:(0,i.__)("Noindex","thinkrank"),duplicate_title:(0,i.__)("Duplicate title","thinkrank"),duplicate_description:(0,i.__)("Duplicate description","thinkrank")},D={noindex:"poor",duplicate_title:"poor",duplicate_description:"poor",title_too_long:"warning",description_too_long:"warning",title_too_short:"warning",description_too_short:"warning",empty_title:"neutral",empty_description:"neutral",no_focus_keyword:"neutral"},j=[{value:"publish",label:(0,i.__)("Published","thinkrank")},{value:"draft",label:(0,i.__)("Drafts & scheduled","thinkrank")},{value:"any",label:(0,i.__)("All statuses","thinkrank")}],I=({className:e})=>(0,a.createElement)("svg",{viewBox:"0 0 16 16",fill:"currentColor",className:e,"aria-hidden":"true"},(0,a.createElement)("path",{d:"M9.2 1.6a.4.4 0 0 0-.76 0l-.84 2.52a2.4 2.4 0 0 1-1.52 1.52L3.56 6.5a.4.4 0 0 0 0 .76l2.52.84a2.4 2.4 0 0 1 1.52 1.52l.84 2.52a.4.4 0 0 0 .76 0l.84-2.52a2.4 2.4 0 0 1 1.52-1.52l2.52-.84a.4.4 0 0 0 0-.76l-2.52-.84a2.4 2.4 0 0 1-1.52-1.52L9.2 1.6Z"}),(0,a.createElement)("path",{d:"M4 10.2a.3.3 0 0 0-.57 0l-.4 1.2a1.2 1.2 0 0 1-.76.76l-1.2.4a.3.3 0 0 0 0 .57l1.2.4a1.2 1.2 0 0 1 .76.76l.4 1.2a.3.3 0 0 0 .57 0l.4-1.2a1.2 1.2 0 0 1 .76-.76l1.2-.4a.3.3 0 0 0 0-.57l-1.2-.4a1.2 1.2 0 0 1-.76-.76l-.4-1.2Z"})),E=({count:e,cap:t,aiConfigured:r,run:n,onGenerate:s,onStop:l,onClear:o})=>{const c=t>0&&e>t;if(n){const e=Math.min(n.done,n.total);return(0,a.createElement)("div",{className:"tr-flex tr-flex-wrap tr-items-center tr-gap-x-4 tr-gap-y-2 tr-px-4 tr-py-3 tr-rounded-lg tr-border tr-border-brand/30 tr-bg-brand-bg"},(0,a.createElement)("span",{className:"tr-text-sm tr-font-medium tr-text-primary"},(0,i.sprintf)(/* translators: 1: rows finished, 2: rows in this run. */ /* translators: 1: rows finished, 2: rows in this run. */ |
| 69 | 71 | (0,i.__)("Generating %1$d of %2$d","thinkrank"),Math.min(e+1,n.total),n.total)),(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-[8rem] tr-h-1.5 tr-rounded-full tr-bg-white tr-overflow-hidden",role:"progressbar","aria-valuemin":0,"aria-valuemax":n.total,"aria-valuenow":e,"aria-label":(0,i.__)("AI generation progress","thinkrank")},(0,a.createElement)("div",{className:"tr-h-full tr-rounded-full tr-bg-brand tr-transition-all tr-duration-200",style:{width:`${Math.round(e/Math.max(1,n.total)*100)}%`}})),(0,a.createElement)(g.$n,{variant:"secondary",size:"sm",onClick:l},(0,i.__)("Stop","thinkrank")))}return(0,a.createElement)("div",{className:"tr-flex tr-flex-wrap tr-items-center tr-gap-x-4 tr-gap-y-2 tr-px-4 tr-py-3 tr-rounded-lg tr-border tr-border-brand/30 tr-bg-brand-bg"},(0,a.createElement)("div",{className:"tr-flex tr-items-baseline tr-gap-2"},(0,a.createElement)("span",{className:"tr-text-sm tr-font-medium tr-text-primary"},(0,i.sprintf)(/* translators: %d: number of selected rows. */ /* translators: %d: number of selected rows. */ |
| @@ -132,17 +134,17 @@ | ||
| 132 | 134 | (0,i.__)("Reconciliation complete: %1$d URLs checked, %2$d resubmitted.","thinkrank"),e.data.examined,e.data.retried)):c.oR.info(e.data?.reason||(0,i.__)("Nothing to reconcile.","thinkrank")),await p()}catch(e){d.A.error("Reconciliation failed:",e),c.oR.error((0,i.__)("Reconciliation failed.","thinkrank"))}finally{M(!1)}},loading:l,disabled:t||l},(0,i.__)("Reconcile Now","thinkrank")))),t&&(0,a.createElement)("div",{className:"tr-p-5"},(0,a.createElement)(s.u4,{lines:2})),!t&&!u&&(0,a.createElement)("div",{className:"tr-p-5 tr-text-sm tr-text-tertiary"},(0,i.__)("Coverage data is unavailable.","thinkrank")),!t&&u&&(0,a.createElement)("div",{className:"tr-p-5 tr-flex tr-flex-col tr-gap-4"},!u.enabled&&(0,a.createElement)("div",{className:"tr-text-xs tr-text-amber-700 tr-bg-amber-50 tr-rounded tr-px-3 tr-py-2"},(0,i.__)("Instant Indexing is turned off, so nothing is being submitted automatically. The figures below show what would need sending once it is enabled.","thinkrank")),(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-2 md:tr-grid-cols-4 tr-gap-3"},g.map(e=>{const t=k[e.key]||0,r=u.urls?.[e.key]||[],n=N===e.key;return(0,a.createElement)("button",{key:e.key,type:"button",title:e.help,onClick:()=>h(n?null:e.key),className:`tr-text-left tr-rounded tr-border tr-border-secondary tr-px-4 tr-py-3 tr-bg-white ${n?"tr-ring-1 tr-ring-brand-500":""} ${r.length?"tr-cursor-pointer":"tr-cursor-default"}`},(0,a.createElement)("div",{className:`tr-text-xl tr-font-semibold ${e.tone}`},t),(0,a.createElement)("div",{className:"tr-text-xs tr-text-secondary tr-mt-1"},e.label))})),0===y&&(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0"},(0,i.__)("Every checked URL has been announced since its last edit.","thinkrank")),N&&(u.urls?.[N]||[]).length>0&&(0,a.createElement)("div",{className:"tr-border tr-border-secondary tr-rounded tr-divide-y tr-divide-secondary"},(u.urls[N]||[]).map(e=>(0,a.createElement)("div",{key:e.post_id,className:"tr-px-4 tr-py-2 tr-flex tr-items-center tr-justify-between tr-gap-3 tr-flex-wrap"},(0,a.createElement)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"tr-text-xs tr-text-brand-600 tr-break-all"},e.url),(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary tr-whitespace-nowrap"},e.last_success?(0,i.sprintf)(/* translators: %s: date of the last successful submission. */ /* translators: %s: date of the last successful submission. */ |
| 133 | 135 | (0,i.__)("last sent %s","thinkrank"),e.last_success):(0,i.__)("never sent","thinkrank"))))),u.truncated&&(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0"},(0,i.sprintf)(/* translators: 1: URLs checked, 2: total published URLs. */ /* translators: 1: URLs checked, 2: total published URLs. */ |
| 134 | 136 | (0,i.__)("Showing the first %1$d of %2$d published URLs. The scheduled run works through the rest in batches.","thinkrank"),u.examined,u.total))))}},78856:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var a=r(51609),n=r(27723),i=r(49323);const s=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("polyline",{points:"20 6 9 17 4 12"})),l=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,a.createElement)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),o=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),(0,a.createElement)("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),(0,a.createElement)("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})),c=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("circle",{cx:"12",cy:"12",r:"10"}),(0,a.createElement)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,a.createElement)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})),d=({validationResults:e})=>{if(!e)return null;const t=(()=>{if(!e.field_details||0===e.field_details.length)return{configured:0,total:0,percentage:0};const t=e.field_details.length,r=e.field_details.filter(e=>"valid"===e.status).length;return{configured:r,total:t,percentage:t>0?Math.round(r/t*100):0}})(),r=e.errors,d=e.warnings,g=e.suggestions,M=!r||0===r.length,u=d?.length>0,m=g?.length>0,N=M&&!u?{label:(0,n.__)("Validation Passed","thinkrank"),bg:"tr-bg-success-bg",border:"tr-border-success",text:"tr-text-success",icon:(0,a.createElement)(s,null),iconBg:"tr-bg-success-bg tr-text-success",bar:"tr-bg-success"}:u&&M?{label:(0,n.__)("Passed with Warnings","thinkrank"),bg:"tr-bg-warning-bg",border:"tr-border-warning",text:"tr-text-warning",icon:(0,a.createElement)(o,null),iconBg:"tr-bg-warning-bg tr-text-warning",bar:"tr-bg-warning"}:{label:(0,n.__)("Validation Failed","thinkrank"),bg:"tr-bg-danger-bg",border:"tr-border-danger",text:"tr-text-danger",icon:(0,a.createElement)(l,null),iconBg:"tr-bg-danger-bg tr-text-danger",bar:"tr-bg-danger"};return(0,a.createElement)(i.Zp,{padding:!1,className:"tr-mt-4"},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary tr-flex tr-items-center tr-justify-between"},(0,a.createElement)("div",null,(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,n.__)("Form Data Validation","thinkrank")),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0 tr-mt-0.5"},(0,n.__)("Validate social media settings before deployment.","thinkrank"))),(0,a.createElement)("span",{className:`tr-inline-flex tr-items-center tr-gap-1.5 tr-text-xs tr-font-medium tr-px-2.5 tr-py-1 tr-rounded-full tr-border ${N.bg} ${N.border} ${N.text}`},(0,a.createElement)("span",{className:`tr-inline-flex tr-items-center tr-justify-center tr-w-4 tr-h-4 tr-rounded-full ${N.iconBg}`},N.icon),N.label)),(0,a.createElement)("div",{className:"tr-p-5 tr-flex tr-flex-col tr-gap-5"},t.total>0&&(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-mb-1.5"},(0,a.createElement)("span",{className:"tr-text-xs tr-font-medium tr-text-secondary"},(0,n.__)("Completion","thinkrank")),(0,a.createElement)("span",{className:"tr-text-xs tr-font-semibold tr-text-primary"},t.configured,"/",t.total," ",(0,n.__)("fields","thinkrank"),":"," ",t.percentage,"%")),(0,a.createElement)("div",{className:"tr-w-full tr-bg-white tr-rounded-full tr-h-2"},(0,a.createElement)("div",{className:`tr-h-2 tr-rounded-full tr-transition-all ${N.bar}`,style:{width:`${t.percentage}%`}}))),e.field_details&&e.field_details.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide tr-m-0 tr-mb-2"},(0,n.__)("Field Details","thinkrank")),(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-2 tr-gap-1.5"},e.field_details.map((e,t)=>{const r="valid"===e.status,n="error"===e.status;return(0,a.createElement)("div",{key:t,className:"tr-flex tr-items-center tr-gap-2 tr-px-3 tr-py-2 tr-rounded tr-text-xs "+(r?"tr-bg-success-bg tr-text-success":n?"tr-bg-danger-bg tr-text-danger":"tr-bg-warning-bg tr-text-warning")},(0,a.createElement)("span",{className:"tr-shrink-0"},r?(0,a.createElement)(s,null):n?(0,a.createElement)(l,null):(0,a.createElement)(o,null)),(0,a.createElement)("span",{className:"tr-font-medium"},e.label))}))),(!e.field_details||0===e.field_details.length)&&(0,a.createElement)(a.Fragment,null,M&&!u&&(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1.5"},[(0,n.__)("All social media settings are properly configured.","thinkrank"),(0,n.__)("Social media fields are valid and complete.","thinkrank"),(0,n.__)("Ready for deployment and social sharing.","thinkrank")].map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-flex tr-items-center tr-gap-2 tr-text-xs tr-text-success"},(0,a.createElement)(s,null),(0,a.createElement)("span",null,e)))),!M&&r&&(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1.5"},r.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-flex tr-items-start tr-gap-2 tr-text-xs tr-text-danger"},(0,a.createElement)("span",{className:"tr-shrink-0 tr-mt-0.5"},(0,a.createElement)(l,null)),(0,a.createElement)("span",null,e))))),u&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide tr-m-0 tr-mb-2"},(0,n.__)("Warnings","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1.5"},d.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-bg-warning-bg tr-text-warning tr-flex tr-items-start tr-gap-2 tr-px-3 tr-py-2 tr-rounded tr-text-xs"},(0,a.createElement)("span",{className:"tr-shrink-0 tr-mt-0.5"},(0,a.createElement)(o,null)),(0,a.createElement)("span",null,e))))),m&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide tr-m-0 tr-mb-2"},(0,n.__)("Recommendations","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1.5"},g.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-bg-brand-bg tr-text-brand tr-flex tr-items-start tr-gap-2 tr-px-3 tr-py-2 tr-rounded tr-text-xs"},(0,a.createElement)("span",{className:"tr-shrink-0 tr-mt-0.5"},(0,a.createElement)(c,null)),(0,a.createElement)("span",null,e)))))))}},78881:(e,t,r)=>{"use strict";r.d(t,{DZ:()=>o,M5:()=>s,ez:()=>g,go:()=>d,k2:()=>l,q0:()=>M,vB:()=>c});var a=r(27723),n=r(1455),i=r.n(n);const s=async e=>{try{e.setIsLoading(!0);const t=await i()({path:"/thinkrank/v1/sitemap/settings?context_type=site",method:"GET"});if(t.success){const r={...e.getDefaultSettings(),...t.data.settings};e.setSettings(r),e.setSelectedPreset(r.selected_preset||"basic"),e.setHealth(t.data.health||null),e.setResolvedDeliveryMode(t.data.resolved_delivery_mode||null)}else{const t=e.getDefaultSettings();e.setSettings(t),e.setSelectedPreset(t.selected_preset||"basic")}}catch(t){e.setSettings(e.getDefaultSettings()),e.setNotice({status:"error",message:(0,a.__)("Failed to load sitemap settings. Using defaults.","thinkrank")})}finally{e.setIsLoading(!1)}},l=async e=>{const t=await i()({path:"/thinkrank/v1/sitemap/settings",method:"POST",data:{settings:e,context_type:"site"}});if(!t.success)throw new Error(t.error||"Failed to save settings")},o=async e=>{try{e.setIsSaving(!0),e.setNotice(null),await l(e.settings),e.setHasChanges(!1),e.setNotice({status:"success",message:(0,a.__)("Sitemap settings saved successfully!","thinkrank")})}catch(t){e.setNotice({status:"error",message:(0,a.__)("Failed to save sitemap settings. Please try again.","thinkrank")})}finally{e.setIsSaving(!1)}},c=async e=>{let t=!1;try{e.setIsGenerating(!0),e.setNotice(null);const r=await(async()=>{try{const e=await i()({path:"/thinkrank/v1/sitemap/cleanup",method:"POST",data:{}});return e.success&&e.data.total_cleaned>0?e.data.total_cleaned:0}catch(e){return{error:!0,message:e.message||(0,a.__)("Failed to clean up previous sitemap files","thinkrank")}}})(),n=r.error?0:r,s=r.error?r.message:null;n>0&&(t=!0,e.setSettings(e=>({...e,last_generated:""})));const l=await i()({path:"/thinkrank/v1/sitemap/generate",method:"POST",data:{options:e.settings,save_to_file:!0}});if(!l.success)throw new Error(l.error||"Failed to generate sitemap");{let t="";if(l.data.sitemaps_generated){const e=l.data.sitemaps_generated.length;t=(0,a.__)("Successfully generated {sitemap_count} sitemap files with {url_count} total URLs.","thinkrank").replace("{sitemap_count}",e).replace("{url_count}",l.data.url_count)}else t=(0,a.__)("Successfully generated 1 sitemap file with {url_count} URLs.","thinkrank").replace("{url_count}",l.data.url_count);s?t+=" "+(0,a.__)("Warning: Could not clean up previous sitemap files.","thinkrank"):n>0&&(t+=" "+(0,a.__)("Cleaned up {count} previous sitemap file(s).","thinkrank").replace("{count}",n)),e.setNotice({status:"success",message:t}),"dynamic"===l.data.delivery_mode?(e.setResolvedDeliveryMode("dynamic"),e.setSettings(e=>({...e,last_generated:""}))):e.setSettings(e=>({...e,last_generated:l.data.last_generated||(new Date).toISOString()})),e.setHealth(e=>e?{...e,stale:!1,pending_since:null,pending_seconds:0,last_error:null}:e)}}catch(r){let n=(0,a.__)("Failed to generate sitemap. Please try again.","thinkrank"),i="error";if(r.code)switch(r.code){case"rate_limit_exceeded":n=(0,a.__)("Too many sitemap generation requests. Please wait a few minutes before trying again.","thinkrank"),i="warning";break;case"generation_in_progress":n=(0,a.__)("Sitemap generation is already in progress. Please wait for it to complete.","thinkrank"),i="info";break;default:n=r.message||n}else r.message&&(n=r.message);t&&(n+=" "+(0,a.__)("The previously published sitemap files were removed before this attempt, so no sitemap is being served right now. A rebuild has been queued. Retry if it does not reappear shortly.","thinkrank")),e.setNotice({status:i,message:n})}finally{e.setIsGenerating(!1)}},d=async(e,t)=>{const r=e.settings.sitemap_urls?.[t];if(r){e.setValidatingIndex(t);try{const a=window.location.origin,n=r.url.startsWith("http")?r.url:`${a}${r.url}`,i=await fetch(n,{method:"HEAD"}),s=i.ok?"active":"not_found";e.updateSitemap(t,{...r,status:s,last_checked:(new Date).toISOString(),response_code:i.status},{validateUrl:!1,markDirty:!1})}catch(n){e.updateSitemap(t,{...r,status:"error",last_checked:(new Date).toISOString()},{validateUrl:!1,markDirty:!1}),e.setNotice({status:"error",message:(0,a.__)("Failed to validate sitemap. Please check the URL and try again.","thinkrank")})}finally{e.setValidatingIndex(null)}}},g=async e=>{e.setIsValidatingAll(!0);try{const t=e.settings.sitemap_urls||[];for(let r=0;r<t.length;r++)await d(e,r)}finally{e.setIsValidatingAll(!1)}},M=async e=>{e.setIsPinging(!0);try{(await i()({path:"/thinkrank/v1/sitemap/ping",method:"POST",data:{sitemap_urls:e.settings.sitemap_urls}})).success&&e.setNotice({status:"success",message:(0,a.__)("Search engines notified successfully!","thinkrank")})}catch(t){let r=(0,a.__)("Failed to ping search engines.","thinkrank"),n="error";t.code?"ping_rate_limit_exceeded"===t.code?(r=(0,a.__)("Too many ping requests. Please wait an hour before trying again.","thinkrank"),n="warning"):r=t.message||r:t.message&&(r=t.message),e.setNotice({status:n,message:r})}finally{e.setIsPinging(!1)}}},79096:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M18 8H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v4zM4 4v1.5h16V4H4zm0 16h16v-1.5H4V20z"}))},79287:(e,t,r)=>{"use strict";r.d(t,{A:()=>E});var a=r(51609),n=r(86087),i=r(27723),s=r(9279),l=r(60906),o=r(35358),c=r(87298),d=r(40799),g=r(97130),M=r(78532),u=r(99983),m=r(1609),N=r(96623),h=r(43263),p=r(981),k=r(57105),y=r(30012),x=r(62008),D=r(49323),j=r(80028);function I(e){switch(e){case"dashboard":return{title:(0,i.__)("Dashboard","thinkrank"),description:(0,i.__)("Overview of your SEO optimization progress","thinkrank")};case"essential-seo":return{title:(0,i.__)("Essential SEO","thinkrank"),description:(0,i.__)("Configure your site-wide SEO settings","thinkrank")};case"ai-tools":return{title:(0,i.__)("AI Tools","thinkrank"),description:(0,i.__)("AI-powered content and metadata tools","thinkrank")};case"settings":return{title:(0,i.__)("Settings","thinkrank"),description:(0,i.__)("Configure AI API keys and plugin preferences","thinkrank")};case"mcp":return{title:(0,i.__)("MCP","thinkrank"),description:(0,i.__)("Configure AI client access to ThinkRank through the Model Context Protocol","thinkrank")};case"analytics":return{title:(0,i.__)("Usages","thinkrank"),description:(0,i.__)("Track AI usage, costs, and performance","thinkrank")};case"import-export":return{title:(0,i.__)("Import / Export","thinkrank"),description:(0,i.__)("Download your ThinkRank data as a file, or restore it from one","thinkrank")};case"migration":return{title:(0,i.__)("Migration","thinkrank"),description:(0,i.__)("Import SEO data from Yoast, Rank Math, SEOPress, All in One SEO, Squirrly SEO or Slim SEO","thinkrank")};default:return{title:(0,i.__)("ThinkRank","thinkrank"),description:""}}}r(32633),r(97423);const E=({page:e="dashboard"})=>{const[t,r]=(0,n.useState)(()=>(0,y.D3)()||e);(0,n.useEffect)(()=>((0,y.bH)(e=>I(e).title),(0,y.B1)(r)),[]);const E=I(t);return(0,a.createElement)(x.A,null,(0,a.createElement)(m.A,{topNav:(0,a.createElement)(N.A,{currentPage:t})},(0,a.createElement)(h.A,{title:E.title,description:E.description,page:t,actions:"essential-seo"===t?(0,a.createElement)(p.A,null):null}),(0,a.createElement)(k.A,null,function(e){switch(e){case"dashboard":return(0,a.createElement)(s.A,null);case"essential-seo":return(0,a.createElement)(l.A,null);case"ai-tools":return(0,a.createElement)(o.A,null);case"settings":return(0,a.createElement)(c.A,null);case"mcp":return(0,a.createElement)(d.A,null);case"analytics":return(0,a.createElement)(g.A,null);case"import-export":return(0,a.createElement)(M.A,null);case"migration":return(0,a.createElement)(u.A,null);default:return(0,a.createElement)(D.Fc,{variant:"warning"},(0,i.__)("Page not found. Redirecting to dashboard…","thinkrank"))}}(t))),(0,a.createElement)(j.N9,{position:"bottom-right",autoClose:4e3,limit:3,newestOnTop:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,transition:j.q7,theme:"light",icon:!0}))}},79312:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-4v-2.4L14 14l1-1-3-3-3 3 1 1 1.2-1.2v2.4H7.7c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4H9l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8 0 1-.8 1.8-1.7 1.8z"}))},79487:(e,t,r)=>{"use strict";r.d(t,{K:()=>N});var a=r(1455),n=r.n(a);const i=`thinkrank_api_${window.thinkrankAdmin?.version||"0"}_u${window.thinkrankAdmin?.currentUser||0}::`,s=[["/thinkrank-pro/v1/url-inspection/",0],["/thinkrank/v1/mcp/",0],["/thinkrank/v1/email-report/",0],["/thinkrank/v1/integrations/search-console/",18e5],["/thinkrank/v1/site-identity/robots",0],["/thinkrank/v1/site-identity/",3e5],["/thinkrank/v1/sitemap/settings",0],["/thinkrank/v1/global-seo/snippets",0],["/thinkrank/v1/global-seo/thin-content",0],["/thinkrank/v1/seo-analytics/",36e5],["/thinkrank/v1/performance/history",18e5],["/thinkrank/v1/performance/",6e5],["/thinkrank/v1/performance/monitor",864e5],["/thinkrank-pro/v1/keywords/",18e5],["/thinkrank-pro/v1/top-content",18e5],["/thinkrank-pro/v1/google-analytics/",18e5],["/thinkrank-pro/v1/rank-tracker/suggestions",9e5],["/thinkrank-pro/v1/rank-tracker/",3e5]],l=[["/thinkrank-pro/v1/google-analytics/run-report",18e5]],o=e=>Array.isArray(e)?"["+e.map(o).join(",")+"]":e&&"object"==typeof e?"{"+Object.keys(e).sort().map(t=>JSON.stringify(t)+":"+o(e[t])).join(",")+"}":JSON.stringify(e),c=(e,t)=>!(!t||"object"!=typeof t||!1===t.success||e.startsWith("/thinkrank/v1/performance/monitor")&&"collecting"===t.data?.status),d=(()=>{try{const e="__thinkrank_probe__";return window.sessionStorage.setItem(e,"1"),window.sessionStorage.removeItem(e),window.sessionStorage}catch(e){return null}})(),g=e=>{if(d)try{const t=d.getItem(i+e);if(!t)return;const r=JSON.parse(t);return!r||Date.now()-r.t>=r.ttl?void d.removeItem(i+e):r.v}catch(e){return}},M=(e,t,r)=>{if(d&&!(r<=0))try{d.setItem(i+e,JSON.stringify({t:Date.now(),ttl:r,v:t}))}catch(e){u()}},u=()=>{if(d)try{const e=[];for(let t=0;t<d.length;t++){const r=d.key(t);r&&r.startsWith("thinkrank_api_")&&e.push(r)}e.forEach(e=>d.removeItem(e))}catch(e){}},m=new Map,N=u;n().use((e,t)=>{const{path:r,method:a="GET"}=e;if(!(e=>"string"==typeof e&&(e.startsWith("/thinkrank/v1/")||e.startsWith("/thinkrank-pro/v1/")))(r))return t(e);if("GET"!==a.toUpperCase()){const a=l.find(([e])=>r.startsWith(e));if(a){var n;const i=r+"::"+(e=>{let t=5381;for(let r=0;r<e.length;r++)t=(t<<5)+t+e.charCodeAt(r)|0;return(t>>>0).toString(36)})(o(null!==(n=e.data)&&void 0!==n?n:null)),s=g(i);if(void 0!==s)return Promise.resolve(s);if(m.has(i))return m.get(i);const l=t(e).then(e=>(c(r,e)&&M(i,e,a[1]),e)).finally(()=>m.delete(i));return m.set(i,l),l}return r.startsWith("/thinkrank-pro/v1/url-inspection/")?t(e):t(e).finally(u)}if(!1===e.parse)return t(e);const i=(e=>{let t=null;for(const[r,a]of s)e.startsWith(r)&&(null===t||r.length>t.prefixLength)&&(t={ttl:a,prefixLength:r.length});return t?t.ttl:3e5})(r);if(i<=0)return t(e);const d=g(r);if(void 0!==d)return Promise.resolve(d);if(m.has(r))return m.get(r);const N=t(e).then(e=>(c(r,e)&&M(r,e,i),e)).finally(()=>{m.delete(r)});return m.set(r,N),N}),"undefined"!=typeof window&&window.thinkrankApiPreload&&n().use(n().createPreloadingMiddleware(window.thinkrankApiPreload)),"undefined"!=typeof window&&(window.thinkrankApiCache={purge:u})},79926:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"}))},79993:(e,t,r)=>{"use strict";r(27723)},80028:(e,t,r)=>{"use strict";r.d(t,{N9:()=>V,oR:()=>w,q7:()=>Q});var a=r(51609),n=r(13526),i=e=>"number"==typeof e&&!isNaN(e),s=e=>"string"==typeof e,l=e=>"function"==typeof e,o=e=>s(e)||l(e)?e:null,c=(e,t)=>!1===e||i(e)&&e>0?e:t,d=e=>(0,a.isValidElement)(e)||s(e)||l(e)||i(e);function g({enter:e,exit:t,appendPosition:r=!1,collapse:n=!0,collapseDuration:i=300}){return function({children:s,position:l,preventExitTransition:o,done:c,nodeRef:d,isIn:g,playToast:M}){let u=r?`${e}--${l}`:e,m=r?`${t}--${l}`:t,N=(0,a.useRef)(0);return(0,a.useLayoutEffect)(()=>{let e=d.current,t=u.split(" "),r=a=>{a.target===d.current&&(M(),e.removeEventListener("animationend",r),e.removeEventListener("animationcancel",r),0===N.current&&"animationcancel"!==a.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",r),e.addEventListener("animationcancel",r)},[]),(0,a.useEffect)(()=>{let e=d.current,t=()=>{e.removeEventListener("animationend",t),n?function(e,t,r=300){let{scrollHeight:a,style:n}=e;requestAnimationFrame(()=>{n.minHeight="initial",n.height=a+"px",n.transition=`all ${r}ms`,requestAnimationFrame(()=>{n.height="0",n.padding="0",n.margin="0",setTimeout(t,r)})})}(e,c,i):c()};g||(o?t():(N.current=1,e.className+=` ${m}`,e.addEventListener("animationend",t)))},[g]),a.createElement(a.Fragment,null,s)}}function M(e,t){return{content:u(e.content,e.props),containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,reason:e.removalReason,status:t}}function u(e,t,r=!1){return(0,a.isValidElement)(e)&&!s(e.type)?(0,a.cloneElement)(e,{closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:r}):l(e)?e({closeToast:t.closeToast,toastProps:t,data:t.data,isPaused:r}):e}function m({delay:e,isRunning:t,closeToast:r,type:i="default",hide:s,className:o,controlledProgress:c,progress:d,rtl:g,isIn:M,theme:u}){let m=s||c&&0===d,N={animationDuration:`${e}ms`,animationPlayState:t?"running":"paused"};c&&(N.transform=`scaleX(${d})`);let h=(0,n.A)("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${u}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":g}),p=l(o)?o({rtl:g,type:i,defaultClassName:h}):(0,n.A)(h,o),k={[c&&d>=1?"onTransitionEnd":"onAnimationEnd"]:c&&d<1?null:()=>{M&&r()}};return a.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":m},a.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${u} Toastify__progress-bar--${i}`}),a.createElement("div",{role:"progressbar","aria-hidden":m?"true":"false","aria-label":"notification timer","aria-valuenow":c?Math.round(100*d):void 0,"aria-valuemin":0,"aria-valuemax":100,className:p,style:N,...k}))}var N=1,h=()=>""+N++;var p=new Map,k=[],y=new Set,x=e=>y.forEach(t=>t(e)),D=()=>p.size>0;function j(e,t){var r;if(t)return!(null==(r=p.get(t))||!r.isToastActive(e));let a=!1;return p.forEach(t=>{t.isToastActive(e)&&(a=!0)}),a}function I(e,t){d(e)&&(D()||k.push({content:e,options:t}),p.forEach(r=>{r.buildToast(e,t)}))}function E(e,t){p.forEach(r=>{(null==t||null==t||!t.containerId||(null==t?void 0:t.containerId)===r.id)&&r.toggle(e,null==t?void 0:t.id)})}function z(e){let t=e.containerId||1;return{subscribe(r){let a=function(e,t,r){let a=1,n=0,s=[],l=[],g=t,u=new Map,m=new Set,N=()=>{l=Array.from(u.values()),m.forEach(e=>e())},h=e=>{var t,a;e.isActive&&(null==(a=null==(t=e.props)?void 0:t.onClose)||a.call(t,e.removalReason),e.isActive=!1,r(M(e,"removed")))},p=e=>{if(null==e)u.forEach(h);else{let t=u.get(e);t&&h(t)}N()},k=e=>{var t,a;let{toastId:n,updateId:i}=e.props,s=null==i;e.staleId&&u.delete(e.staleId),e.isActive=!0,u.set(n,e),N(),r(M(e,s?"added":"updated")),s&&(null==(a=(t=e.props).onOpen)||a.call(t))};return{id:e,props:g,observe:e=>(m.add(e),()=>m.delete(e)),toggle:(e,t)=>{u.forEach(r=>{var a;(null==t||t===r.props.toastId)&&(null==(a=r.toggle)||a.call(r,e))})},removeToast:p,toasts:u,clearQueue:()=>{n-=s.length,s=[]},buildToast:(t,r)=>{if((({containerId:t,toastId:r,updateId:a})=>{let n=t?t!==e:1!==e,i=u.has(r)&&null==a;return n||i})(r))return;let{toastId:l,updateId:M,data:m,staleId:h,delay:y}=r,x=null==M;x&&n++;let D={...g,style:g.toastStyle,key:a++,...Object.fromEntries(Object.entries(r).filter(([e,t])=>null!=t)),toastId:l,updateId:M,data:m,isIn:!1,className:o(r.className||g.toastClassName),progressClassName:o(r.progressClassName||g.progressClassName),autoClose:!r.isLoading&&c(r.autoClose,g.autoClose),closeToast(e){let t=u.get(l);t&&(t.removalReason=e,p(l))},deleteToast(){if(null!=u.get(l)){if(u.delete(l),n--,n<0&&(n=0),s.length>0)return void k(s.shift());N()}}};D.closeButton=g.closeButton,!1===r.closeButton||d(r.closeButton)?D.closeButton=r.closeButton:!0===r.closeButton&&(D.closeButton=!d(g.closeButton)||g.closeButton);let j={content:t,props:D,staleId:h};g.limit&&g.limit>0&&n>g.limit&&x?s.push(j):i(y)?setTimeout(()=>{k(j)},y):k(j)},setProps(e){g=e},setToggle:(e,t)=>{let r=u.get(e);r&&(r.toggle=t)},isToastActive:e=>{var t;return null==(t=u.get(e))?void 0:t.isActive},getSnapshot:()=>l}}(t,e,x);p.set(t,a);let n=a.observe(r);return k.forEach(e=>I(e.content,e.options)),k=[],()=>{n(),p.delete(t)}},setProps(e){var r;null==(r=p.get(t))||r.setProps(e)},getSnapshot(){var e;return null==(e=p.get(t))?void 0:e.getSnapshot()}}}function T(e){return e&&(s(e.toastId)||i(e.toastId))?e.toastId:h()}function f(e,t){return I(e,t),t.toastId}function _(e,t){return{...t,type:t&&t.type||e,toastId:T(t)}}function A(e){return(t,r)=>f(t,_(e,r))}function w(e,t){return f(e,_("default",t))}w.loading=(e,t)=>f(e,_("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),w.promise=function(e,{pending:t,error:r,success:a},n){let i;t&&(i=s(t)?w.loading(t,n):w.loading(t.render,{...n,...t}));let o={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(e,t,r)=>{if(null==t)return void w.dismiss(i);let a={type:e,...o,...n,data:r},l=s(t)?{render:t}:t;return i?w.update(i,{...a,...l}):w(l.render,{...a,...l}),r},d=l(e)?e():e;return d.then(e=>c("success",a,e)).catch(e=>c("error",r,e)),d},w.success=A("success"),w.info=A("info"),w.error=A("error"),w.warning=A("warning"),w.warn=w.warning,w.dark=(e,t)=>f(e,_("default",{theme:"dark",...t})),w.dismiss=function(e){!function(e){if(D()){if(null==e||(e=>s(e)||i(e))(e))p.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=p.get(e.containerId);t?t.removeToast(e.id):p.forEach(t=>{t.removeToast(e.id)})}}else k=k.filter(t=>null!=e&&t.options.toastId!==e)}(e)},w.clearWaitingQueue=(e={})=>{p.forEach(t=>{t.props.limit&&(!e.containerId||t.id===e.containerId)&&t.clearQueue()})},w.isActive=j,w.update=(e,t={})=>{let r=((e,{containerId:t})=>{var r;return null==(r=p.get(t||1))?void 0:r.toasts.get(e)})(e,t);if(r){let{props:a,content:n}=r,i={delay:100,...a,...t,toastId:t.toastId||e,updateId:h()};i.toastId!==e&&(i.staleId=e);let s=i.render||n;delete i.render,f(s,i)}},w.done=e=>{w.update(e,{progress:1})},w.onChange=function(e){return y.add(e),()=>{y.delete(e)}},w.play=e=>E(!0,e),w.pause=e=>E(!1,e);var b="undefined"!=typeof window?a.useLayoutEffect:a.useEffect,O=({theme:e,type:t,isLoading:r,...n})=>a.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===e?"currentColor":`var(--toastify-icon-color-${t})`,...n}),v={info:function(e){return a.createElement(O,{...e},a.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return a.createElement(O,{...e},a.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return a.createElement(O,{...e},a.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return a.createElement(O,{...e},a.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return a.createElement("div",{className:"Toastify__spinner"})}};var L=e=>{let{isRunning:t,preventExitTransition:r,toastRef:i,eventHandlers:s,playToast:o}=function(e){let[t,r]=(0,a.useState)(!1),[n,i]=(0,a.useState)(!1),s=(0,a.useRef)(null),l=(0,a.useRef)({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:o,pauseOnHover:c,closeToast:d,onClick:g,closeOnClick:M}=e;function u(){r(!0)}function m(){r(!1)}function N(r){let a=s.current;if(l.canDrag&&a){l.didMove=!0,t&&m(),"x"===e.draggableDirection?l.delta=r.clientX-l.start:l.delta=r.clientY-l.start,l.start!==r.clientX&&(l.canCloseOnClick=!1);let n="x"===e.draggableDirection?`${l.delta}px, var(--y)`:`0, calc(${l.delta}px + var(--y))`;a.style.transform=`translate3d(${n},0)`,a.style.opacity=""+(1-Math.abs(l.delta/l.removalDistance))}}function h(){document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",h);let t=s.current;if(l.canDrag&&l.didMove&&t){if(l.canDrag=!1,Math.abs(l.delta)>l.removalDistance)return i(!0),e.closeToast(!0),void e.collapseAll();t.style.transition="transform 0.2s, opacity 0.2s",t.style.removeProperty("transform"),t.style.removeProperty("opacity")}}(function(e){var t;null==(t=p.get(e.containerId||1))||t.setToggle(e.id,e.fn)})({id:e.toastId,containerId:e.containerId,fn:r}),(0,a.useEffect)(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||m(),window.addEventListener("focus",u),window.addEventListener("blur",m),()=>{window.removeEventListener("focus",u),window.removeEventListener("blur",m)}},[e.pauseOnFocusLoss]);let k={onPointerDown:function(t){if(!0===e.draggable||e.draggable===t.pointerType){l.didMove=!1,document.addEventListener("pointermove",N),document.addEventListener("pointerup",h);let r=s.current;l.canCloseOnClick=!0,l.canDrag=!0,r.style.transition="none","x"===e.draggableDirection?(l.start=t.clientX,l.removalDistance=r.offsetWidth*(e.draggablePercent/100)):(l.start=t.clientY,l.removalDistance=r.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(t){let{top:r,bottom:a,left:n,right:i}=s.current.getBoundingClientRect();"mouse"===t.pointerType&&e.pauseOnHover&&t.clientX>=n&&t.clientX<=i&&t.clientY>=r&&t.clientY<=a?m():u()}};return o&&c&&(k.onMouseEnter=m,e.stacked||(k.onMouseLeave=u)),M&&(k.onClick=e=>{g&&g(e),l.canCloseOnClick&&d(!0)}),{playToast:u,pauseToast:m,isRunning:t,preventExitTransition:n,toastRef:s,eventHandlers:k}}(e),{closeButton:c,children:d,autoClose:g,onClick:M,type:N,hideProgressBar:h,closeToast:k,transition:y,position:x,className:D,style:j,progressClassName:I,updateId:E,role:z,progress:T,rtl:f,toastId:_,deleteToast:A,isIn:w,isLoading:b,closeOnClick:O,theme:L,ariaLabel:S}=e,C=(0,n.A)("Toastify__toast",`Toastify__toast-theme--${L}`,`Toastify__toast--${N}`,{"Toastify__toast--rtl":f},{"Toastify__toast--close-on-click":O}),Q=l(D)?D({rtl:f,position:x,type:N,defaultClassName:C}):(0,n.A)(C,D),U=function({theme:e,type:t,isLoading:r,icon:n}){let i=null,s={theme:e,type:t};return!1===n||(l(n)?i=n({...s,isLoading:r}):(0,a.isValidElement)(n)?i=(0,a.cloneElement)(n,s):r?i=v.spinner():(e=>e in v)(t)&&(i=v[t](s))),i}(e),Y=!!T||!g,P={closeToast:k,type:N,theme:L},R=null;return!1===c||(R=l(c)?c(P):(0,a.isValidElement)(c)?(0,a.cloneElement)(c,P):function({closeToast:e,theme:t,ariaLabel:r="close"}){return a.createElement("button",{className:`Toastify__close-button Toastify__close-button--${t}`,type:"button",onClick:t=>{t.stopPropagation(),e(!0)},"aria-label":r},a.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(P)),a.createElement(y,{isIn:w,done:A,position:x,preventExitTransition:r,nodeRef:i,playToast:o},a.createElement("div",{id:_,tabIndex:0,onClick:M,"data-in":w,className:Q,...s,style:j,ref:i,...w&&{role:z,"aria-label":S}},null!=U&&a.createElement("div",{className:(0,n.A)("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!b})},U),u(d,e,!t),R,!e.customProgressBar&&a.createElement(m,{...E&&!Y?{key:`p-${E}`}:{},rtl:f,theme:L,delay:g,isRunning:t,isIn:w,closeToast:k,hide:h,type:N,className:I,controlledProgress:Y,progress:T||0})))},S=(e,t=!1)=>({enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}),C=g(S("bounce",!0)),Q=g(S("slide",!0)),U=(g(S("zoom")),g(S("flip")),{position:"top-right",transition:C,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:e=>e.altKey&&"KeyT"===e.code});function Y(e){let t={...U,...e},r=e.stacked,[i,s]=(0,a.useState)(!0),c=(0,a.useRef)(null),{getToastToRender:d,isToastActive:g,count:M}=function(e){var t;let{subscribe:r,getSnapshot:n,setProps:i}=(0,a.useRef)(z(e)).current;i(e);let s=null==(t=(0,a.useSyncExternalStore)(r,n,n))?void 0:t.slice();return{getToastToRender:function(t){if(!s)return[];let r=new Map;return e.newestOnTop&&s.reverse(),s.forEach(e=>{let{position:t}=e.props;r.has(t)||r.set(t,[]),r.get(t).push(e)}),Array.from(r,e=>t(e[0],e[1]))},isToastActive:j,count:null==s?void 0:s.length}}(t),{className:u,style:m,rtl:N,containerId:h,hotKeys:p}=t;function k(e){let t=(0,n.A)("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":N});return l(u)?u({position:e,rtl:N,defaultClassName:t}):(0,n.A)(t,o(u))}function y(){r&&(s(!0),w.play())}return b(()=>{var e;if(r){let r=c.current.querySelectorAll('[data-in="true"]'),a=12,n=null==(e=t.position)?void 0:e.includes("top"),s=0,l=0;Array.from(r).reverse().forEach((e,t)=>{let r=e;r.classList.add("Toastify__toast--stacked"),t>0&&(r.dataset.collapsed=`${i}`),r.dataset.pos||(r.dataset.pos=n?"top":"bot");let o=s*(i?.2:1)+(i?0:a*t),c=Math.max(.5,1-(i?l:0));r.style.setProperty("--y",`${n?o:-1*o}px`),r.style.setProperty("--g",`${a}`),r.style.setProperty("--s",`${c}`),s+=r.offsetHeight,l+=.025})}},[i,M,r]),(0,a.useEffect)(()=>{function e(e){var t;let r=c.current;p(e)&&(null==(t=null==r?void 0:r.querySelector('[tabIndex="0"]'))||t.focus(),s(!1),w.pause()),"Escape"===e.key&&(document.activeElement===r||null!=r&&r.contains(document.activeElement))&&(s(!0),w.play())}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[p]),a.createElement("section",{ref:c,className:"Toastify",id:h,onMouseEnter:()=>{r&&(s(!1),w.pause())},onMouseLeave:y,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":t["aria-label"]},d((e,t)=>{let n=t.length?{...m}:{...m,pointerEvents:"none"};return a.createElement("div",{tabIndex:-1,className:k(e),"data-stacked":r,style:n,key:`c-${e}`},t.map(({content:e,props:t})=>a.createElement(L,{...t,stacked:r,collapseAll:y,isIn:g(t.toastId,t.containerId),key:`t-${t.key}`},e)))}))}var P=":root {\n --toastify-color-light: #fff;\n --toastify-color-dark: #121212;\n --toastify-color-info: #3498db;\n --toastify-color-success: #07bc0c;\n --toastify-color-warning: #f1c40f;\n --toastify-color-error: hsl(6, 78%, 57%);\n --toastify-color-transparent: rgba(255, 255, 255, 0.7);\n\n --toastify-icon-color-info: var(--toastify-color-info);\n --toastify-icon-color-success: var(--toastify-color-success);\n --toastify-icon-color-warning: var(--toastify-color-warning);\n --toastify-icon-color-error: var(--toastify-color-error);\n\n --toastify-container-width: fit-content;\n --toastify-toast-width: 320px;\n --toastify-toast-offset: 16px;\n --toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));\n --toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));\n --toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));\n --toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));\n --toastify-toast-background: #fff;\n --toastify-toast-padding: 14px;\n --toastify-toast-min-height: 64px;\n --toastify-toast-max-height: 800px;\n --toastify-toast-bd-radius: 6px;\n --toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);\n --toastify-font-family: sans-serif;\n --toastify-z-index: 9999;\n --toastify-text-color-light: #757575;\n --toastify-text-color-dark: #fff;\n\n /* Used only for colored theme */\n --toastify-text-color-info: #fff;\n --toastify-text-color-success: #fff;\n --toastify-text-color-warning: #fff;\n --toastify-text-color-error: #fff;\n\n --toastify-spinner-color: #616161;\n --toastify-spinner-color-empty-area: #e0e0e0;\n --toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);\n --toastify-color-progress-dark: #bb86fc;\n --toastify-color-progress-info: var(--toastify-color-info);\n --toastify-color-progress-success: var(--toastify-color-success);\n --toastify-color-progress-warning: var(--toastify-color-warning);\n --toastify-color-progress-error: var(--toastify-color-error);\n /* used to control the opacity of the progress trail */\n --toastify-color-progress-bgo: 0.2;\n}\n\n.Toastify__toast-container {\n z-index: var(--toastify-z-index);\n -webkit-transform: translate3d(0, 0, var(--toastify-z-index));\n position: fixed;\n width: var(--toastify-container-width);\n box-sizing: border-box;\n color: #fff;\n display: flex;\n flex-direction: column;\n}\n\n.Toastify__toast-container--top-left {\n top: var(--toastify-toast-top);\n left: var(--toastify-toast-left);\n}\n.Toastify__toast-container--top-center {\n top: var(--toastify-toast-top);\n left: 50%;\n transform: translateX(-50%);\n align-items: center;\n}\n.Toastify__toast-container--top-right {\n top: var(--toastify-toast-top);\n right: var(--toastify-toast-right);\n align-items: end;\n}\n.Toastify__toast-container--bottom-left {\n bottom: var(--toastify-toast-bottom);\n left: var(--toastify-toast-left);\n}\n.Toastify__toast-container--bottom-center {\n bottom: var(--toastify-toast-bottom);\n left: 50%;\n transform: translateX(-50%);\n align-items: center;\n}\n.Toastify__toast-container--bottom-right {\n bottom: var(--toastify-toast-bottom);\n right: var(--toastify-toast-right);\n align-items: end;\n}\n\n.Toastify__toast {\n --y: 0px;\n position: relative;\n touch-action: none;\n width: var(--toastify-toast-width);\n min-height: var(--toastify-toast-min-height);\n box-sizing: border-box;\n margin-bottom: 1rem;\n padding: var(--toastify-toast-padding);\n border-radius: var(--toastify-toast-bd-radius);\n box-shadow: var(--toastify-toast-shadow);\n max-height: var(--toastify-toast-max-height);\n font-family: var(--toastify-font-family);\n /* webkit only issue #791 */\n z-index: 0;\n /* inner swag */\n display: flex;\n flex: 1 auto;\n align-items: center;\n word-break: break-word;\n}\n\n@media only screen and (max-width: 480px) {\n .Toastify__toast-container {\n width: 100vw;\n left: env(safe-area-inset-left);\n margin: 0;\n }\n .Toastify__toast-container--top-left,\n .Toastify__toast-container--top-center,\n .Toastify__toast-container--top-right {\n top: env(safe-area-inset-top);\n transform: translateX(0);\n }\n .Toastify__toast-container--bottom-left,\n .Toastify__toast-container--bottom-center,\n .Toastify__toast-container--bottom-right {\n bottom: env(safe-area-inset-bottom);\n transform: translateX(0);\n }\n .Toastify__toast-container--rtl {\n right: env(safe-area-inset-right);\n left: initial;\n }\n .Toastify__toast {\n --toastify-toast-width: 100%;\n margin-bottom: 0;\n border-radius: 0;\n }\n}\n\n.Toastify__toast-container[data-stacked='true'] {\n width: var(--toastify-toast-width);\n}\n\n@media only screen and (max-width: 480px) {\n .Toastify__toast-container[data-stacked='true'] {\n width: 100vw;\n }\n}\n\n.Toastify__toast--stacked {\n position: absolute;\n width: 100%;\n transform: translate3d(0, var(--y), 0) scale(var(--s));\n transition: transform 0.3s;\n}\n\n.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,\n.Toastify__toast--stacked[data-collapsed] .Toastify__close-button {\n transition: opacity 0.1s;\n}\n\n.Toastify__toast--stacked[data-collapsed='false'] {\n overflow: visible;\n}\n\n.Toastify__toast--stacked[data-collapsed='true']:not(:last-child) > * {\n opacity: 0;\n}\n\n.Toastify__toast--stacked:after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n height: calc(var(--g) * 1px);\n bottom: 100%;\n}\n\n.Toastify__toast--stacked[data-pos='top'] {\n top: 0;\n}\n\n.Toastify__toast--stacked[data-pos='bot'] {\n bottom: 0;\n}\n\n.Toastify__toast--stacked[data-pos='bot'].Toastify__toast--stacked:before {\n transform-origin: top;\n}\n\n.Toastify__toast--stacked[data-pos='top'].Toastify__toast--stacked:before {\n transform-origin: bottom;\n}\n\n.Toastify__toast--stacked:before {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n transform: scaleY(3);\n z-index: -1;\n}\n\n.Toastify__toast--rtl {\n direction: rtl;\n}\n\n.Toastify__toast--close-on-click {\n cursor: pointer;\n}\n\n.Toastify__toast-icon {\n margin-inline-end: 10px;\n width: 22px;\n flex-shrink: 0;\n display: flex;\n}\n\n.Toastify--animate {\n animation-fill-mode: both;\n animation-duration: 0.5s;\n}\n\n.Toastify--animate-icon {\n animation-fill-mode: both;\n animation-duration: 0.3s;\n}\n\n.Toastify__toast-theme--dark {\n background: var(--toastify-color-dark);\n color: var(--toastify-text-color-dark);\n}\n\n.Toastify__toast-theme--light {\n background: var(--toastify-color-light);\n color: var(--toastify-text-color-light);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--default {\n background: var(--toastify-color-light);\n color: var(--toastify-text-color-light);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--info {\n color: var(--toastify-text-color-info);\n background: var(--toastify-color-info);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--success {\n color: var(--toastify-text-color-success);\n background: var(--toastify-color-success);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--warning {\n color: var(--toastify-text-color-warning);\n background: var(--toastify-color-warning);\n}\n\n.Toastify__toast-theme--colored.Toastify__toast--error {\n color: var(--toastify-text-color-error);\n background: var(--toastify-color-error);\n}\n\n.Toastify__progress-bar-theme--light {\n background: var(--toastify-color-progress-light);\n}\n\n.Toastify__progress-bar-theme--dark {\n background: var(--toastify-color-progress-dark);\n}\n\n.Toastify__progress-bar--info {\n background: var(--toastify-color-progress-info);\n}\n\n.Toastify__progress-bar--success {\n background: var(--toastify-color-progress-success);\n}\n\n.Toastify__progress-bar--warning {\n background: var(--toastify-color-progress-warning);\n}\n\n.Toastify__progress-bar--error {\n background: var(--toastify-color-progress-error);\n}\n\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,\n.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error {\n background: var(--toastify-color-transparent);\n}\n\n.Toastify__close-button {\n color: #fff;\n position: absolute;\n top: 6px;\n right: 6px;\n background: transparent;\n outline: none;\n border: none;\n padding: 0;\n cursor: pointer;\n opacity: 0.7;\n transition: 0.3s ease;\n z-index: 1;\n}\n\n.Toastify__toast--rtl .Toastify__close-button {\n left: 6px;\n right: unset;\n}\n\n.Toastify__close-button--light {\n color: #000;\n opacity: 0.3;\n}\n\n.Toastify__close-button > svg {\n fill: currentColor;\n height: 16px;\n width: 14px;\n}\n\n.Toastify__close-button:hover,\n.Toastify__close-button:focus {\n opacity: 1;\n}\n\n@keyframes Toastify__trackProgress {\n 0% {\n transform: scaleX(1);\n }\n 100% {\n transform: scaleX(0);\n }\n}\n\n.Toastify__progress-bar {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n opacity: 0.7;\n transform-origin: left;\n}\n\n.Toastify__progress-bar--animated {\n animation: Toastify__trackProgress linear 1 forwards;\n}\n\n.Toastify__progress-bar--controlled {\n transition: transform 0.2s;\n}\n\n.Toastify__progress-bar--rtl {\n right: 0;\n left: initial;\n transform-origin: right;\n border-bottom-left-radius: initial;\n}\n\n.Toastify__progress-bar--wrp {\n position: absolute;\n overflow: hidden;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 5px;\n border-bottom-left-radius: var(--toastify-toast-bd-radius);\n border-bottom-right-radius: var(--toastify-toast-bd-radius);\n}\n\n.Toastify__progress-bar--wrp[data-hidden='true'] {\n opacity: 0;\n}\n\n.Toastify__progress-bar--bg {\n opacity: var(--toastify-color-progress-bgo);\n width: 100%;\n height: 100%;\n}\n\n.Toastify__spinner {\n width: 20px;\n height: 20px;\n box-sizing: border-box;\n border: 2px solid;\n border-radius: 100%;\n border-color: var(--toastify-spinner-color-empty-area);\n border-right-color: var(--toastify-spinner-color);\n animation: Toastify__spin 0.65s linear infinite;\n}\n\n@keyframes Toastify__bounceInRight {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n from {\n opacity: 0;\n transform: translate3d(3000px, 0, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(-25px, 0, 0);\n }\n 75% {\n transform: translate3d(10px, 0, 0);\n }\n 90% {\n transform: translate3d(-5px, 0, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutRight {\n 20% {\n opacity: 1;\n transform: translate3d(-20px, var(--y), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(2000px, var(--y), 0);\n }\n}\n\n@keyframes Toastify__bounceInLeft {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n 0% {\n opacity: 0;\n transform: translate3d(-3000px, 0, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(25px, 0, 0);\n }\n 75% {\n transform: translate3d(-10px, 0, 0);\n }\n 90% {\n transform: translate3d(5px, 0, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutLeft {\n 20% {\n opacity: 1;\n transform: translate3d(20px, var(--y), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(-2000px, var(--y), 0);\n }\n}\n\n@keyframes Toastify__bounceInUp {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n from {\n opacity: 0;\n transform: translate3d(0, 3000px, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(0, -20px, 0);\n }\n 75% {\n transform: translate3d(0, 10px, 0);\n }\n 90% {\n transform: translate3d(0, -5px, 0);\n }\n to {\n transform: translate3d(0, 0, 0);\n }\n}\n\n@keyframes Toastify__bounceOutUp {\n 20% {\n transform: translate3d(0, calc(var(--y) - 10px), 0);\n }\n 40%,\n 45% {\n opacity: 1;\n transform: translate3d(0, calc(var(--y) + 20px), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(0, -2000px, 0);\n }\n}\n\n@keyframes Toastify__bounceInDown {\n from,\n 60%,\n 75%,\n 90%,\n to {\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n 0% {\n opacity: 0;\n transform: translate3d(0, -3000px, 0);\n }\n 60% {\n opacity: 1;\n transform: translate3d(0, 25px, 0);\n }\n 75% {\n transform: translate3d(0, -10px, 0);\n }\n 90% {\n transform: translate3d(0, 5px, 0);\n }\n to {\n transform: none;\n }\n}\n\n@keyframes Toastify__bounceOutDown {\n 20% {\n transform: translate3d(0, calc(var(--y) - 10px), 0);\n }\n 40%,\n 45% {\n opacity: 1;\n transform: translate3d(0, calc(var(--y) + 20px), 0);\n }\n to {\n opacity: 0;\n transform: translate3d(0, 2000px, 0);\n }\n}\n\n.Toastify__bounce-enter--top-left,\n.Toastify__bounce-enter--bottom-left {\n animation-name: Toastify__bounceInLeft;\n}\n\n.Toastify__bounce-enter--top-right,\n.Toastify__bounce-enter--bottom-right {\n animation-name: Toastify__bounceInRight;\n}\n\n.Toastify__bounce-enter--top-center {\n animation-name: Toastify__bounceInDown;\n}\n\n.Toastify__bounce-enter--bottom-center {\n animation-name: Toastify__bounceInUp;\n}\n\n.Toastify__bounce-exit--top-left,\n.Toastify__bounce-exit--bottom-left {\n animation-name: Toastify__bounceOutLeft;\n}\n\n.Toastify__bounce-exit--top-right,\n.Toastify__bounce-exit--bottom-right {\n animation-name: Toastify__bounceOutRight;\n}\n\n.Toastify__bounce-exit--top-center {\n animation-name: Toastify__bounceOutUp;\n}\n\n.Toastify__bounce-exit--bottom-center {\n animation-name: Toastify__bounceOutDown;\n}\n\n@keyframes Toastify__zoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n 50% {\n opacity: 1;\n }\n}\n\n@keyframes Toastify__zoomOut {\n from {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n transform: translate3d(0, var(--y), 0) scale3d(0.3, 0.3, 0.3);\n }\n to {\n opacity: 0;\n }\n}\n\n.Toastify__zoom-enter {\n animation-name: Toastify__zoomIn;\n}\n\n.Toastify__zoom-exit {\n animation-name: Toastify__zoomOut;\n}\n\n@keyframes Toastify__flipIn {\n from {\n transform: perspective(400px) rotate3d(1, 0, 0, 90deg);\n animation-timing-function: ease-in;\n opacity: 0;\n }\n 40% {\n transform: perspective(400px) rotate3d(1, 0, 0, -20deg);\n animation-timing-function: ease-in;\n }\n 60% {\n transform: perspective(400px) rotate3d(1, 0, 0, 10deg);\n opacity: 1;\n }\n 80% {\n transform: perspective(400px) rotate3d(1, 0, 0, -5deg);\n }\n to {\n transform: perspective(400px);\n }\n}\n\n@keyframes Toastify__flipOut {\n from {\n transform: translate3d(0, var(--y), 0) perspective(400px);\n }\n 30% {\n transform: translate3d(0, var(--y), 0) perspective(400px) rotate3d(1, 0, 0, -20deg);\n opacity: 1;\n }\n to {\n transform: translate3d(0, var(--y), 0) perspective(400px) rotate3d(1, 0, 0, 90deg);\n opacity: 0;\n }\n}\n\n.Toastify__flip-enter {\n animation-name: Toastify__flipIn;\n}\n\n.Toastify__flip-exit {\n animation-name: Toastify__flipOut;\n}\n\n@keyframes Toastify__slideInRight {\n from {\n transform: translate3d(110%, 0, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInLeft {\n from {\n transform: translate3d(-110%, 0, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInUp {\n from {\n transform: translate3d(0, 110%, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideInDown {\n from {\n transform: translate3d(0, -110%, 0);\n visibility: visible;\n }\n to {\n transform: translate3d(0, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutRight {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(110%, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutLeft {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(-110%, var(--y), 0);\n }\n}\n\n@keyframes Toastify__slideOutDown {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(0, 500px, 0);\n }\n}\n\n@keyframes Toastify__slideOutUp {\n from {\n transform: translate3d(0, var(--y), 0);\n }\n to {\n visibility: hidden;\n transform: translate3d(0, -500px, 0);\n }\n}\n\n.Toastify__slide-enter--top-left,\n.Toastify__slide-enter--bottom-left {\n animation-name: Toastify__slideInLeft;\n}\n\n.Toastify__slide-enter--top-right,\n.Toastify__slide-enter--bottom-right {\n animation-name: Toastify__slideInRight;\n}\n\n.Toastify__slide-enter--top-center {\n animation-name: Toastify__slideInDown;\n}\n\n.Toastify__slide-enter--bottom-center {\n animation-name: Toastify__slideInUp;\n}\n\n.Toastify__slide-exit--top-left,\n.Toastify__slide-exit--bottom-left {\n animation-name: Toastify__slideOutLeft;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--top-right,\n.Toastify__slide-exit--bottom-right {\n animation-name: Toastify__slideOutRight;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--top-center {\n animation-name: Toastify__slideOutUp;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n.Toastify__slide-exit--bottom-center {\n animation-name: Toastify__slideOutDown;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n\n@keyframes Toastify__spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n",R=new Map,Z=(e,t)=>{b(()=>{if(!e||"undefined"==typeof document)return;let r=document,a=R.get(r);if(a)return void(t&&a.setAttribute("nonce",t));let n=r.createElement("style");n.textContent=e,t&&n.setAttribute("nonce",t),r.head.appendChild(n),R.set(r,n)},[t])};function V(e){return Z(P,e.nonce),a.createElement(Y,{...e})}},80091:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M16.375 4.5H4.625a.125.125 0 0 0-.125.125v8.254l2.859-1.54a.75.75 0 0 1 .68-.016l2.384 1.142 2.89-2.074a.75.75 0 0 1 .874 0l2.313 1.66V4.625a.125.125 0 0 0-.125-.125Zm.125 9.398-2.75-1.975-2.813 2.02a.75.75 0 0 1-.76.067l-2.444-1.17L4.5 14.583v1.792c0 .069.056.125.125.125h11.75a.125.125 0 0 0 .125-.125v-2.477ZM4.625 3C3.728 3 3 3.728 3 4.625v11.75C3 17.273 3.728 18 4.625 18h11.75c.898 0 1.625-.727 1.625-1.625V4.625C18 3.728 17.273 3 16.375 3H4.625ZM20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z",fillRule:"evenodd",clipRule:"evenodd"}))},80095:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(51609),n=r(27723);const i=({illustration:e,title:t,description:r,features:i=[],ctaLabel:s,ctaUrl:l="https://thinkrank.ai/#pricing",ctaExternal:o=!0})=>(0,a.createElement)("div",{className:"tr-pro-teaser"},(0,a.createElement)("div",{className:"tr-pro-teaser__illustration"},e),(0,a.createElement)("div",{className:"tr-pro-teaser__content"},(0,a.createElement)("div",{className:"tr-pro-teaser__heading"},(0,a.createElement)("h3",{className:"tr-pro-teaser__title"},t),(0,a.createElement)("span",{className:"tr-pro-teaser__badge"},(0,n.__)("Pro","thinkrank"))),(0,a.createElement)("p",{className:"tr-pro-teaser__description"},r),i.length>0&&(0,a.createElement)("ul",{className:"tr-pro-teaser__features"},i.map(e=>(0,a.createElement)("li",{key:e,className:"tr-pro-teaser__feature"},(0,a.createElement)("span",{"aria-hidden":"true",className:"tr-pro-teaser__bullet"}),(0,a.createElement)("span",null,e)))),(0,a.createElement)("a",{href:l,target:o?"_blank":void 0,rel:o?"noreferrer":void 0,className:"tr-pro-teaser__cta"},s||(0,n.__)("Upgrade Now","thinkrank"))))},80747:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"}))},80751:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"}))},80842:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",d:"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",clipRule:"evenodd"}))},81290:(e,t,r)=>{"use strict";r.d(t,{A:()=>M});var a=r(51609),n=r.n(a),i=r(27723),s=r(64984);const l={Organization:(0,a.createElement)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,a.createElement)("path",{d:"M3 21V7l9-4 9 4v14",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),(0,a.createElement)("path",{d:"M3 21h18M9 12h2m2 0h2M9 16h2m2 0h2",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})),LocalBusiness:(0,a.createElement)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,a.createElement)("path",{d:"M12 21s-7-6.5-7-12a7 7 0 1 1 14 0c0 5.5-7 12-7 12Z",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),(0,a.createElement)("circle",{cx:"12",cy:"9",r:"2.5",stroke:"currentColor",strokeWidth:"1.6"})),Person:(0,a.createElement)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,a.createElement)("circle",{cx:"12",cy:"8",r:"4",stroke:"currentColor",strokeWidth:"1.6"}),(0,a.createElement)("path",{d:"M4 21c0-4.4 3.6-8 8-8s8 3.6 8 8",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})),WebSite:(0,a.createElement)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,a.createElement)("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"1.6"}),(0,a.createElement)("path",{d:"M3 12h18M12 3c2.5 3 4 6 4 9s-1.5 6-4 9c-2.5-3-4-6-4-9s1.5-6 4-9Z",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}))},o=({size:e=14})=>(0,a.createElement)("svg",{width:e,height:e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,a.createElement)("path",{d:"M3 7.5L6 10.5L11 4.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),c=()=>(0,a.createElement)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,a.createElement)("path",{d:"M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8L12 3Z",fill:"currentColor"}),(0,a.createElement)("path",{d:"M19 14l.8 2 2 .8-2 .8L19 19.5l-.8-1.9-2-.8 2-.8.8-2Z",fill:"currentColor",opacity:"0.7"})),d={Organization:(0,i.__)("Brand, contact, logo and social profiles applied across the entire site.","thinkrank"),LocalBusiness:(0,i.__)("Business with a physical address, hours and service area ideal for storefronts.","thinkrank"),Person:(0,i.__)("A featured individual or author identity used across the site.","thinkrank"),WebSite:(0,i.__)("Site name, alternate names, and sitelinks search box for branded queries.","thinkrank")},g=({type:e,checked:t,onToggle:r})=>{const n=d[e]||(0,i.__)("Schema markup for "+e,"thinkrank"),s=l[e]||l.WebSite;return(0,a.createElement)("button",{type:"button",onClick:()=>r(e,!t),"aria-pressed":t,style:{position:"relative",display:"flex",gap:"14px",alignItems:"flex-start",textAlign:"left",padding:"18px",border:t?"1.5px solid #4f46e5":"1.5px solid var(--tr-border)",borderRadius:"12px",background:t?"#f7f6ff":"#fff",cursor:"pointer",transition:"border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease",boxShadow:t?"0 1px 2px rgba(79, 70, 229, 0.08)":"none",width:"100%",font:"inherit",color:"inherit"}},(0,a.createElement)("div",{style:{width:"40px",height:"40px",borderRadius:"10px",background:t?"#eceaff":"#f5f6fa",color:t?"#4f46e5":"var(--tr-text-body)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,transition:"background-color 120ms ease, color 120ms ease"}},s),(0,a.createElement)("div",{style:{flex:1,minWidth:0}},(0,a.createElement)("div",{style:{fontSize:"14px",fontWeight:600,color:"var(--tr-text-heading)",marginBottom:"4px"}},e),(0,a.createElement)("div",{style:{fontSize:"12.5px",color:"var(--tr-text-body)",lineHeight:1.45}},n)),(0,a.createElement)("div",{style:{width:"20px",height:"20px",borderRadius:"6px",background:t?"#4f46e5":"#fff",border:t?"1.5px solid #4f46e5":"1.5px solid #d4d8e0",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,transition:"background-color 120ms ease, border-color 120ms ease"},"aria-hidden":"true"},t&&(0,a.createElement)(o,null)))},M=({settings:e,onSettingChange:t})=>{const r=(0,s.Zw)("site");n().useEffect(()=>{const a=e.enabled_schema_types||[],n=a.filter(e=>r.includes(e));n.length!==a.length&&t("enabled_schema_types",n)},[]);const l=(r,a)=>{const n=e.enabled_schema_types||[],i=a?[...n,r]:n.filter(e=>e!==r);t("enabled_schema_types",i)},o=(e.enabled_schema_types||[]).filter(e=>r.includes(e));return(0,a.createElement)("div",{className:"tab-content"},(0,a.createElement)("div",{style:{border:"1px solid var(--tr-border)",borderRadius:"12px",background:"#fff",overflow:"hidden",marginBottom:"20px"}},(0,a.createElement)("div",{style:{display:"flex",alignItems:"flex-start",gap:"16px",padding:"20px 24px",borderBottom:"1px solid var(--tr-border)"}},(0,a.createElement)("div",{style:{width:"44px",height:"44px",borderRadius:"10px",background:"#eef0fd",color:"#4f46e5",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},(0,a.createElement)(c,null)),(0,a.createElement)("div",{style:{flex:1,minWidth:0}},(0,a.createElement)("h2",{style:{margin:0,fontSize:"16px",fontWeight:600,color:"var(--tr-text-heading)"}},(0,i.__)("Site-Level Schema Types","thinkrank")),(0,a.createElement)("p",{style:{margin:"4px 0 0",fontSize:"13px",color:"var(--tr-text-body)",lineHeight:1.5}},(0,i.__)("Pick the structured-data entities that describe your site as a whole. Article, BlogPosting, HowTo and FAQ schemas are managed per-post in the ThinkRank metabox.","thinkrank"))),(0,a.createElement)("span",{style:{fontSize:"12px",fontWeight:600,padding:"4px 10px",borderRadius:"999px",whiteSpace:"nowrap",flexShrink:0,background:o.length>0?"#eceaff":"#f3f4f6",color:o.length>0?"#4f46e5":"var(--tr-text-body)"}},o.length>0?(0,i.__)(`${o.length} selected`,"thinkrank"):(0,i.__)("None selected","thinkrank"))),(0,a.createElement)("div",{className:"thinkrank-schema-types-grid",style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(260px, 1fr))",gap:"14px",padding:"20px 24px"}},r.map(e=>(0,a.createElement)(g,{key:e,type:e,checked:o.includes(e),onToggle:l})))),0===o.length&&(0,a.createElement)("div",{style:{display:"flex",alignItems:"flex-start",gap:"12px",padding:"14px 16px",borderRadius:"10px",background:"#fff8e5",border:"1px solid #fde68a",marginBottom:"24px"}},(0,a.createElement)("div",{style:{fontSize:"16px",lineHeight:1,color:"#b45309"}},"!"),(0,a.createElement)("div",{style:{fontSize:"13px",color:"#8a6d3b",lineHeight:1.5}},(0,i.__)("No schema types selected yet. Pick at least one above so ThinkRank has something to generate.","thinkrank"))),(0,a.createElement)("div",{style:{display:"flex",gap:"14px",alignItems:"flex-start",padding:"16px 20px",border:"1px solid var(--tr-border)",borderRadius:"12px",background:"#fafbfc"}},(0,a.createElement)("div",{style:{width:"36px",height:"36px",borderRadius:"10px",background:"#fff",color:"#4f46e5",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,border:"1px solid var(--tr-border)"},"aria-hidden":"true"},(0,a.createElement)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)("path",{d:"M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6Z",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),(0,a.createElement)("path",{d:"M14 3v6h6M8 13h8M8 17h5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}))),(0,a.createElement)("div",{style:{flex:1,minWidth:0}},(0,a.createElement)("div",{style:{fontSize:"13px",fontWeight:600,color:"var(--tr-text-heading)",marginBottom:"4px"}},(0,i.__)("Need Article, BlogPosting, HowTo or FAQ?","thinkrank")),(0,a.createElement)("div",{style:{fontSize:"13px",color:"var(--tr-text-body)",lineHeight:1.5}},(0,i.__)("Content-specific schemas use the actual post data plus AI optimization, so they live in the ThinkRank metabox when editing individual posts and pages.","thinkrank")))))}},81567:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(51609),n=r(27723),i=r(56427),s=r(69960),l=r(2325);const o=({dateRange:e,setDateRange:t,dashboardData:r})=>(0,a.createElement)("div",{className:"thinkrank-space-y-6"},(0,a.createElement)(i.Flex,{justify:"space-between",align:"center"},(0,a.createElement)("div",null,(0,a.createElement)(i.__experimentalText,{variant:"muted"},(0,n.__)("Detailed keyword performance data from Google Search Console.","thinkrank"))),(0,a.createElement)("div",{style:{position:"relative",display:"inline-flex",alignItems:"center"}},(0,a.createElement)("select",{value:e,onChange:e=>t(e.target.value),style:{appearance:"none",WebkitAppearance:"none",MozAppearance:"none",background:"#fff",border:"1px solid #4451ff",borderRadius:"6px",padding:"8px 36px 8px 14px",fontSize:"14px",fontWeight:"600",color:"var(--tr-accent)",cursor:"pointer",outline:"none",lineHeight:"1.4",boxShadow:"none"}},l.wl.map(e=>(0,a.createElement)("option",{key:e.value,value:e.value},e.label))),(0,a.createElement)("span",{style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",display:"flex",alignItems:"center"}},(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)("path",{d:"M3 5L7 9L11 5",stroke:"#4451ff",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))))),r&&r.search_performance&&(0,a.createElement)(s.A,{data:r.search_performance}))},81574:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.36605 2.81332L2.30144 1.87332L13.5592 13.1867L12.6239 14.1267L7.92702 9.40666C6.74618 9.41999 5.57861 9.87999 4.68302 10.78L3.35623 9.44665C4.19874 8.60665 5.2071 8.03999 6.2818 7.75332L4.7958 6.25999C3.78744 6.67332 2.84542 7.29332 2.02944 8.11332L0.702656 6.77999C1.512 5.97332 2.42085 5.33332 3.3894 4.84665L1.36605 2.81332ZM15.2973 6.77999L13.9705 8.11332C12.3054 6.43999 10.1096 5.61332 7.92039 5.62666L6.20883 3.90665C9.41303 3.34665 12.8229 4.29332 15.2973 6.77999ZM10.1759 7.89332C11.0781 8.21332 11.9273 8.72665 12.6438 9.44665L12.1794 9.90665L10.1759 7.89332ZM6.00981 12.1133L8 14.1133L9.99018 12.1133C8.89558 11.0067 7.11105 11.0067 6.00981 12.1133Z"}))},81628:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"}))},81789:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"}))},82030:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",clipRule:"evenodd"}))},82189:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zm-1.338 4.877c-.314.22-.412.452-.412.623 0 .171.098.403.412.623.312.218.783.377 1.338.377.825 0 1.605.233 2.198.648.59.414 1.052 1.057 1.052 1.852 0 .795-.461 1.438-1.052 1.852-.41.286-.907.486-1.448.582v.316a.75.75 0 01-1.5 0v-.316a3.64 3.64 0 01-1.448-.582c-.59-.414-1.052-1.057-1.052-1.852a.75.75 0 011.5 0c0 .171.098.403.412.623.312.218.783.377 1.338.377s1.026-.159 1.338-.377c.314-.22.412-.452.412-.623 0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377-.825 0-1.605-.233-2.198-.648-.59-.414-1.052-1.057-1.052-1.852 0-.795.461-1.438 1.052-1.852a3.64 3.64 0 011.448-.582V7.5a.75.75 0 011.5 0v.316c.54.096 1.039.296 1.448.582.59.414 1.052 1.057 1.052 1.852a.75.75 0 01-1.5 0c0-.171-.098-.403-.412-.623-.312-.218-.783-.377-1.338-.377s-1.026.159-1.338.377z"}))},82434:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M9 13.5a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM9 16a4.002 4.002 0 003.8-2.75H15V16h2.5v-2.75H19v-2.5h-6.2A4.002 4.002 0 005 12a4 4 0 004 4z",fillRule:"evenodd",clipRule:"evenodd"}))},82509:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var a=r(51609),n=r(86087),i=r(27723),s=r(49323),l=r(99714),o=r(60775);const c=/(\*\*[\s\S]+?\*\*|\*[\s\S]+?\*)/g,d=({children:e,className:t=""})=>{if(!e)return null;const r=String(e).split(c);return(0,a.createElement)("span",{className:t},r.map((e,t)=>e.length>4&&e.startsWith("**")&&e.endsWith("**")?(0,a.createElement)("strong",{key:t},e.slice(2,-2)):e.length>2&&e.startsWith("*")&&e.endsWith("*")?(0,a.createElement)("em",{key:t},e.slice(1,-1)):e))},g=({className:e="tr-w-3.5 tr-h-3.5"})=>(0,a.createElement)("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})),M={1:{badge:"tr-bg-brand-bg tr-text-brand",border:"#4451FF"},2:{badge:"tr-bg-brand-bg tr-text-brand",border:"#06B6D4"},3:{badge:"tr-bg-white tr-text-secondary",border:"#CBD5E1"}},u=({len:e,max:t})=>(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-px-1.5 tr-py-0.5 tr-rounded tr-text-xs tr-font-medium "+(e<=t?"tr-bg-success-bg tr-text-success":"tr-bg-warning-bg tr-text-warning")},e,"/",t),m=({title:e,icon:t,children:r,count:n,headerAction:i})=>(0,a.createElement)("div",{className:"tr-bg-white tr-rounded-lg tr-border tr-border-secondary tr-shadow-sm tr-overflow-hidden"},(0,a.createElement)("div",{className:"tr-px-5 tr-py-3.5 tr-flex tr-items-center tr-gap-2.5 tr-border-b tr-border-secondary"},t&&(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-7 tr-h-7 tr-rounded-md tr-bg-brand tr-shrink-0"},t),(0,a.createElement)("span",{className:"tr-text-sm tr-font-semibold tr-text-primary"},e),void 0!==n&&n>0&&(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-px-2 tr-py-0.5 tr-rounded-full tr-text-xs tr-font-medium tr-bg-brand-bg tr-text-brand"},n),i&&(0,a.createElement)("div",{className:"tr-ml-auto tr-shrink-0"},i)),(0,a.createElement)("div",{className:"tr-px-5 tr-pt-4 tr-pb-5"},r)),N=(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h12M4 14h8"})),h=(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})),p=(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})),k=(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z"})),y=(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"})),x=(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})),D=(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})),j=(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})),I=(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5.882V19.24a1.76 1.76 0 01-3.417.592l-2.147-6.15M18 13a3 3 0 100-6M5.436 13.683A4.001 4.001 0 017 6h1.832c4.1 0 7.625-1.234 9.168-3v14c-1.543-1.766-5.067-3-9.168-3H7a3.988 3.988 0 01-1.564-.317z"})),E=(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"})),z={content_type:{blog_post:(0,i.__)("Blog Post","thinkrank"),article:(0,i.__)("Article","thinkrank"),landing_page:(0,i.__)("Landing Page","thinkrank"),product_page:(0,i.__)("Product Page","thinkrank"),product_description:(0,i.__)("Product Description","thinkrank"),tutorial:(0,i.__)("Tutorial","thinkrank")},target_audience:{general:(0,i.__)("General Audience","thinkrank"),beginners:(0,i.__)("Beginners","thinkrank"),professionals:(0,i.__)("Professionals","thinkrank"),experts:(0,i.__)("Experts","thinkrank"),students:(0,i.__)("Students","thinkrank"),business_owners:(0,i.__)("Business Owners","thinkrank")},content_length:{short:(0,i.__)("Short (500–800 words)","thinkrank"),medium:(0,i.__)("Medium (1,000–1,500 words)","thinkrank"),long:(0,i.__)("Long (2,000+ words)","thinkrank")},tone:{professional:(0,i.__)("Professional","thinkrank"),casual:(0,i.__)("Casual","thinkrank"),friendly:(0,i.__)("Friendly","thinkrank"),authoritative:(0,i.__)("Authoritative","thinkrank"),conversational:(0,i.__)("Conversational","thinkrank"),technical:(0,i.__)("Technical","thinkrank")}},T=(e,t)=>z[e]?.[t]||t,f=({briefData:e,formData:t})=>{const[r,c]=(0,n.useState)("overview");if(!e)return null;const z=async e=>{try{if(navigator.clipboard?.writeText)return void await navigator.clipboard.writeText(e);const t=document.createElement("textarea");t.value=e,t.style.cssText="position:fixed;left:-999999px;top:-999999px",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}catch(e){o.A.error("Copy fallback failed",e)}document.body.removeChild(t)}catch(e){o.A.error("Copy to clipboard failed:",e)}},f=[{id:"overview",label:(0,i.__)("Overview","thinkrank"),node:(()=>{const r=e.generation_params||t;if(!r)return null;const n=[{label:(0,i.__)("Content Type","thinkrank"),value:T("content_type",r.content_type)},{label:(0,i.__)("Target Audience","thinkrank"),value:T("target_audience",r.target_audience)},{label:(0,i.__)("Content Length","thinkrank"),value:T("content_length",r.content_length)},{label:(0,i.__)("Tone","thinkrank"),value:T("tone",r.tone)}],s=r.target_keywords?.filter(e=>e.trim())||[],o=r.competitor_urls?.filter(e=>e.trim())||[],c=[s.length>0&&{label:(0,i.__)("Target Keywords","thinkrank"),content:(0,a.createElement)("div",{className:"tr-flex tr-flex-wrap tr-gap-1.5"},s.map((e,t)=>(0,a.createElement)("span",{key:t,className:"tr-inline-flex tr-items-center tr-px-2.5 tr-py-1 tr-rounded-full tr-text-xs tr-font-medium tr-bg-brand-bg tr-text-brand"},e)))},...n.map(({label:e,value:t})=>({label:e,content:(0,a.createElement)("span",{className:"tr-text-sm tr-font-medium tr-text-secondary"},t||"—")})),o.length>0&&{label:(0,i.__)("Competitor URLs","thinkrank"),content:(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1"},o.map((e,t)=>(0,a.createElement)("a",{key:t,href:e,target:"_blank",rel:"noopener noreferrer",className:"tr-text-sm tr-text-brand hover:tr-text-brand tr-truncate"},e)))},r.additional_context&&{label:(0,i.__)("Additional Context","thinkrank"),content:(0,a.createElement)("p",{className:"tr-text-sm tr-text-secondary tr-m-0 tr-leading-relaxed"},r.additional_context)}].filter(Boolean);return(0,a.createElement)("div",{className:"tr-bg-white tr-rounded-lg tr-border tr-border-secondary tr-shadow-sm tr-overflow-hidden"},(0,a.createElement)("div",{className:"tr-px-5 tr-py-3.5 tr-border-b tr-border-secondary tr-flex tr-items-center tr-justify-between"},(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,i.__)("Brief Overview","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-3"},e.generation_meta&&(0,a.createElement)(l.A,{provider:e.generation_meta.provider,model:e.generation_meta.model}))),(0,a.createElement)("table",{className:"tr-w-full tr-border-collapse"},(0,a.createElement)("tbody",null,c.map(({label:e,content:t})=>(0,a.createElement)("tr",{key:e,className:"tr-border-b tr-border-secondary last:tr-border-b-0"},(0,a.createElement)("th",{scope:"row",className:"tr-align-top tr-text-left tr-w-1/3 tr-px-5 tr-py-3 tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide tr-whitespace-nowrap"},e),(0,a.createElement)("td",{className:"tr-align-top tr-px-5 tr-py-3"},t))))))})()},{id:"article",label:(0,i.__)("Article","thinkrank"),node:e.content_body?(0,a.createElement)(m,{title:(0,i.__)("Full Article Content","thinkrank"),defaultOpen:!0,icon:h,headerAction:(0,a.createElement)(s.$n,{variant:"secondary",size:"sm",onClick:()=>z(e.content_body)},(0,a.createElement)(g,{className:"tr-w-3.5 tr-h-3.5 tr-mr-1.5"}),(0,i.__)("Copy HTML","thinkrank"))},(0,a.createElement)("div",{className:"tr-content-brief-article",dangerouslySetInnerHTML:{__html:e.content_body}})):null},{id:"titles",label:(0,i.__)("Titles","thinkrank"),node:e.title&&Array.isArray(e.title)?(0,a.createElement)(m,{title:(0,i.__)("Title Suggestions","thinkrank"),count:e.title.length,defaultOpen:!0,icon:N},(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-2"},e.title.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-flex tr-items-center tr-gap-3 tr-p-3 tr-rounded-lg tr-bg-white tr-border tr-border-secondary"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-6 tr-h-6 tr-rounded-full tr-bg-brand-bg tr-text-brand tr-text-xs tr-font-bold tr-shrink-0"},t+1),(0,a.createElement)("span",{className:"tr-flex-1 tr-text-sm tr-text-primary tr-font-medium tr-leading-snug"},e),(0,a.createElement)("button",{type:"button",onClick:()=>z(e),title:(0,i.__)("Copy","thinkrank"),className:"tr-shrink-0 tr-flex tr-items-center tr-justify-center tr-w-7 tr-h-7 tr-rounded tr-text-tertiary hover:tr-text-brand hover:tr-bg-brand-bg tr-transition-colors"},(0,a.createElement)(g,null)))))):null},{id:"outline",label:(0,i.__)("Outline","thinkrank"),node:e.outline&&Array.isArray(e.outline)?(0,a.createElement)(m,{title:(0,i.__)("Content Outline","thinkrank"),count:e.outline.length,defaultOpen:!0,icon:h},(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-3"},e.outline.map((e,t)=>{const r=e.level||1,n=M[Math.min(r,3)]||M[3];return(0,a.createElement)("div",{key:t,className:"tr-border-l-2 tr-pl-4 tr-py-1",style:{marginLeft:16*(r-1)+"px",borderColor:n.border}},(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-2 tr-mb-1"},(0,a.createElement)("span",{className:`tr-inline-flex tr-items-center tr-px-1.5 tr-py-0.5 tr-rounded tr-text-xs tr-font-bold tr-shrink-0 ${n.badge}`},"H",r),(0,a.createElement)("span",{className:"tr-flex-1 tr-text-sm tr-font-semibold tr-text-primary tr-leading-snug"},(0,a.createElement)(d,null,e.heading)),e.word_count>0&&(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-px-1.5 tr-py-0.5 tr-rounded tr-text-xs tr-bg-white tr-text-tertiary tr-shrink-0"},e.word_count,"w")),e.key_points?.length>0&&(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-4 tr-flex tr-flex-col tr-gap-0.5 tr-mt-1"},e.key_points.map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-text-xs tr-text-tertiary tr-leading-relaxed"},(0,a.createElement)(d,null,e)))),e.keywords?.length>0&&(0,a.createElement)("div",{className:"tr-flex tr-flex-wrap tr-gap-1 tr-mt-2"},e.keywords.map((e,t)=>(0,a.createElement)("span",{key:t,className:"tr-inline-flex tr-items-center tr-px-1.5 tr-py-0.5 tr-rounded tr-text-xs tr-bg-brand-bg tr-text-brand"},e))))})),e.estimated_word_count&&(0,a.createElement)("div",{className:"tr-mt-4 tr-p-3 tr-rounded-lg tr-bg-brand-bg tr-border tr-border-brand tr-flex tr-items-center tr-justify-between"},(0,a.createElement)("span",{className:"tr-text-sm tr-text-brand tr-font-medium"},(0,i.__)("Estimated word count","thinkrank")),(0,a.createElement)("span",{className:"tr-text-sm tr-font-bold tr-text-brand"},e.estimated_word_count))):null},{id:"seo",label:(0,i.__)("SEO","thinkrank"),node:(()=>{if(!e.seo_recommendations)return null;const{title_suggestions:t,meta_descriptions:r,meta_description:n,url_slugs:s,focus_keyword_analysis:l,internal_links:o,related_keywords:c,long_tail_keywords:M}=e.seo_recommendations;return t?.length||r?.length||n||s?.length||o?.length||c?.length||M?.length||l?.primary_placement?.length?(0,a.createElement)(m,{title:(0,i.__)("SEO Recommendations","thinkrank"),defaultOpen:!1,icon:p},(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-6"},t?.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide tr-mb-2 tr-m-0"},(0,i.__)("Title Suggestions","thinkrank")),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-4 tr-flex tr-flex-col tr-gap-1"},t.map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-text-sm tr-text-secondary"},e)))),(n||r?.length>0)&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide tr-mb-3 tr-m-0"},(0,i.__)("Meta Descriptions","thinkrank")),n&&(0,a.createElement)("div",{className:"tr-p-3 tr-rounded-lg tr-bg-brand-bg tr-border tr-border-brand tr-mb-2"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-mb-1.5"},(0,a.createElement)("span",{className:"tr-text-xs tr-font-medium tr-text-brand"},(0,i.__)("Primary","thinkrank")),(0,a.createElement)(u,{len:n.length,max:160})),(0,a.createElement)("p",{className:"tr-text-sm tr-text-secondary tr-m-0 tr-leading-relaxed"},(0,a.createElement)(d,null,n))),r?.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-p-3 tr-rounded-lg tr-bg-white tr-border tr-border-secondary tr-mb-2"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-mb-1.5"},(0,a.createElement)("span",{className:"tr-text-xs tr-font-medium tr-text-tertiary"},(0,i.__)("Variation","thinkrank")," ",t+1),(0,a.createElement)(u,{len:e.length,max:160})),(0,a.createElement)("p",{className:"tr-text-sm tr-text-secondary tr-m-0 tr-leading-relaxed"},(0,a.createElement)(d,null,e))))),s?.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide tr-mb-2 tr-m-0"},(0,i.__)("URL Slug Suggestions","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-2"},s.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-flex tr-items-center tr-gap-2"},(0,a.createElement)("code",{className:"tr-flex-1 tr-px-3 tr-py-1.5 tr-rounded tr-bg-white tr-text-secondary tr-text-xs tr-font-mono"},e),(0,a.createElement)("button",{type:"button",onClick:()=>z(e),className:"tr-flex tr-items-center tr-justify-center tr-w-7 tr-h-7 tr-rounded tr-text-tertiary hover:tr-text-brand hover:tr-bg-brand-bg tr-transition-colors"},(0,a.createElement)(g,null)))))),c?.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide tr-mb-2 tr-m-0"},(0,i.__)("Related Keywords","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-flex-wrap tr-gap-1.5"},c.map((e,t)=>(0,a.createElement)("span",{key:t,className:"tr-inline-flex tr-items-center tr-px-2.5 tr-py-1 tr-rounded-full tr-text-xs tr-font-medium tr-bg-brand-bg tr-text-brand"},(0,a.createElement)(d,null,e))))),M?.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide tr-mb-2 tr-m-0"},(0,i.__)("Long-tail Variations","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-flex-wrap tr-gap-1.5"},M.map((e,t)=>(0,a.createElement)("span",{key:t,className:"tr-inline-flex tr-items-center tr-px-2.5 tr-py-1 tr-rounded-full tr-text-xs tr-font-medium tr-bg-success-bg tr-text-success"},e)))),o?.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide tr-mb-2 tr-m-0"},(0,i.__)("Internal Linking Opportunities","thinkrank")),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-4 tr-flex tr-flex-col tr-gap-1.5"},o.map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-text-sm tr-text-secondary tr-leading-relaxed"},(0,a.createElement)(d,null,e))))),(l?.primary_placement?.length||l?.secondary_integration?.length||l?.density_guidelines?.length)&&(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-4"},(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide tr-m-0"},(0,i.__)("Focus Keyword Analysis","thinkrank")),l.primary_placement?.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-secondary tr-mb-1.5 tr-m-0"},(0,i.__)("Primary Placement","thinkrank")),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-4 tr-flex tr-flex-col tr-gap-1"},l.primary_placement.map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-text-sm tr-text-secondary"},(0,a.createElement)(d,null,e))))),l.secondary_integration?.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-secondary tr-mb-1.5 tr-m-0"},(0,i.__)("Secondary Integration","thinkrank")),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-4 tr-flex tr-flex-col tr-gap-1"},l.secondary_integration.map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-text-sm tr-text-secondary"},(0,a.createElement)(d,null,e))))),l.density_guidelines?.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-secondary tr-mb-1.5 tr-m-0"},(0,i.__)("Density Guidelines","thinkrank")),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-4 tr-flex tr-flex-col tr-gap-1"},l.density_guidelines.map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-text-sm tr-text-secondary"},(0,a.createElement)(d,null,e)))))))):null})()},{id:"social",label:(0,i.__)("Social","thinkrank"),node:(()=>{if(!e.social_media)return null;const{open_graph:t,twitter_card:r}=e.social_media;return t?.title||t?.description||r?.title||r?.description?(0,a.createElement)(m,{title:(0,i.__)("Social Media Meta Tags","thinkrank"),defaultOpen:!1,icon:k},(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-6"},(t?.title||t?.description)&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide tr-mb-3 tr-m-0"},"Open Graph"),t.title&&(0,a.createElement)("div",{className:"tr-p-3 tr-rounded-lg tr-bg-brand-bg tr-border tr-border-brand tr-mb-2"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-mb-1"},(0,a.createElement)("span",{className:"tr-text-xs tr-font-medium tr-text-brand"},"og:title"),(0,a.createElement)(u,{len:t.title.length,max:55})),(0,a.createElement)("p",{className:"tr-text-sm tr-text-secondary tr-m-0"},(0,a.createElement)(d,null,t.title))),t.description&&(0,a.createElement)("div",{className:"tr-p-3 tr-rounded-lg tr-bg-brand-bg tr-border tr-border-brand"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-mb-1"},(0,a.createElement)("span",{className:"tr-text-xs tr-font-medium tr-text-brand"},"og:description"),(0,a.createElement)(u,{len:t.description.length,max:125})),(0,a.createElement)("p",{className:"tr-text-sm tr-text-secondary tr-m-0"},(0,a.createElement)(d,null,t.description)))),(r?.title||r?.description)&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide tr-mb-3 tr-m-0"},"Twitter Card"),r.title&&(0,a.createElement)("div",{className:"tr-p-3 tr-rounded-lg tr-bg-white tr-border tr-border-secondary tr-mb-2"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-mb-1"},(0,a.createElement)("span",{className:"tr-text-xs tr-font-medium tr-text-tertiary"},"twitter:title"),(0,a.createElement)(u,{len:r.title.length,max:70})),(0,a.createElement)("p",{className:"tr-text-sm tr-text-secondary tr-m-0"},(0,a.createElement)(d,null,r.title))),r.description&&(0,a.createElement)("div",{className:"tr-p-3 tr-rounded-lg tr-bg-white tr-border tr-border-secondary"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-mb-1"},(0,a.createElement)("span",{className:"tr-text-xs tr-font-medium tr-text-tertiary"},"twitter:description"),(0,a.createElement)(u,{len:r.description.length,max:125})),(0,a.createElement)("p",{className:"tr-text-sm tr-text-secondary tr-m-0"},(0,a.createElement)(d,null,r.description)))))):null})()},{id:"schema",label:(0,i.__)("Schema","thinkrank"),node:(()=>{if(!e.schema_markup)return null;const{recommended_types:t,key_properties:r,faq_questions:n}=e.schema_markup;return t?.length||r?.length||n?.length?(0,a.createElement)(m,{title:(0,i.__)("Schema Markup","thinkrank"),defaultOpen:!1,icon:y},(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-5"},t?.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide tr-mb-2 tr-m-0"},(0,i.__)("Recommended Types","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-flex-wrap tr-gap-1.5"},t.map((e,t)=>(0,a.createElement)("span",{key:t,className:"tr-inline-flex tr-items-center tr-px-2.5 tr-py-1 tr-rounded-full tr-text-xs tr-font-medium tr-bg-brand-bg tr-text-brand"},(0,a.createElement)(d,null,e))))),r?.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide tr-mb-2 tr-m-0"},(0,i.__)("Key Properties","thinkrank")),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-4 tr-flex tr-flex-col tr-gap-1"},r.map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-text-sm tr-text-secondary"},(0,a.createElement)(d,null,e))))),n?.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide tr-mb-2 tr-m-0"},(0,i.__)("FAQ Questions","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-2"},n.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-p-3 tr-rounded-lg tr-bg-warning-bg tr-border tr-border-warning tr-flex tr-items-start tr-gap-2"},(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-justify-center tr-w-5 tr-h-5 tr-rounded-full tr-bg-warning tr-text-white tr-text-xs tr-font-bold tr-shrink-0"},"Q"),(0,a.createElement)("p",{className:"tr-text-sm tr-text-secondary tr-m-0 tr-leading-relaxed"},(0,a.createElement)(d,null,e)))))))):null})()},{id:"visual",label:(0,i.__)("Visuals","thinkrank"),node:(()=>{if(!e.visual_content)return null;const{image_recommendations:t,alt_text_suggestions:r,infographic_opportunities:n}=e.visual_content;return t?.length||r?.length||n?.length?(0,a.createElement)(m,{title:(0,i.__)("Visual Content Strategy","thinkrank"),defaultOpen:!1,icon:x},(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-5"},t?.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide tr-mb-2 tr-m-0"},(0,i.__)("Image Recommendations","thinkrank")),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-4 tr-flex tr-flex-col tr-gap-1"},t.map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-text-sm tr-text-secondary tr-leading-relaxed"},(0,a.createElement)(d,null,e))))),r?.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide tr-mb-2 tr-m-0"},(0,i.__)("Alt Text Suggestions","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-2"},r.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-p-2.5 tr-rounded-lg tr-bg-success-bg tr-border tr-border-success"},(0,a.createElement)("p",{className:"tr-text-xs tr-text-secondary tr-m-0 tr-leading-relaxed tr-font-mono"},(0,a.createElement)(d,null,e)))))),n?.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-tertiary tr-uppercase tr-tracking-wide tr-mb-2 tr-m-0"},(0,i.__)("Infographic Opportunities","thinkrank")),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-4 tr-flex tr-flex-col tr-gap-1"},n.map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-text-sm tr-text-secondary tr-leading-relaxed"},(0,a.createElement)(d,null,e))))))):null})()},{id:"competitors",label:(0,i.__)("Competitors","thinkrank"),node:(()=>{const t=e.generation_params?.competitor_urls?.filter(e=>e?.trim());if(!t?.length)return null;const r=[{icon:"📊",title:(0,i.__)("Content Analysis","thinkrank"),desc:(0,i.__)("Word count, readability & structure","thinkrank")},{icon:"🎯",title:(0,i.__)("SEO Evaluation","thinkrank"),desc:(0,i.__)("Title tags, meta & schema markup","thinkrank")},{icon:"🔗",title:(0,i.__)("Link Analysis","thinkrank"),desc:(0,i.__)("Internal & external linking strategies","thinkrank")},{icon:"🖼️",title:(0,i.__)("Media Usage","thinkrank"),desc:(0,i.__)("Image optimization & alt text","thinkrank")}];return(0,a.createElement)(m,{title:(0,i.__)("Competitor Analysis","thinkrank"),count:t.length,defaultOpen:!1,icon:D},(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-4"},(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-2"},t.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-flex tr-items-center tr-justify-between tr-p-3 tr-rounded-lg tr-bg-white tr-border tr-border-secondary"},(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-0"},(0,a.createElement)("p",{className:"tr-text-xs tr-font-medium tr-text-tertiary tr-m-0 tr-mb-0.5"},(0,i.__)("Competitor","thinkrank")," ",t+1),(0,a.createElement)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"tr-text-sm tr-text-brand hover:tr-text-brand tr-truncate tr-block"},e.length>60?e.substring(0,60)+"…":e)),(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-gap-1 tr-px-2 tr-py-0.5 tr-rounded-full tr-text-xs tr-font-medium tr-bg-success-bg tr-text-success tr-shrink-0 tr-ml-3"},"✓ ",(0,i.__)("Analyzed","thinkrank"))))),(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-2 tr-gap-3"},r.map(({icon:e,title:t,desc:r})=>(0,a.createElement)("div",{key:t,className:"tr-p-3 tr-rounded-lg tr-bg-white tr-border tr-border-secondary tr-flex tr-items-start tr-gap-2"},(0,a.createElement)("span",{className:"tr-text-base tr-shrink-0"},e),(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-secondary tr-m-0 tr-mb-0.5"},t),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0 tr-leading-snug"},r))))),(0,a.createElement)("div",{className:"tr-p-3 tr-rounded-lg tr-bg-brand-bg tr-border tr-border-brand"},(0,a.createElement)("p",{className:"tr-text-xs tr-text-brand tr-m-0 tr-leading-relaxed"},(0,a.createElement)("strong",null,(0,i.__)("Note:","thinkrank"))," ",(0,i.__)("This analysis shaped the content gaps and recommendations below. The AI identified opportunities to outperform these competitors.","thinkrank")))))})()},{id:"gaps",label:(0,i.__)("Gaps","thinkrank"),node:e.competitor_gaps?.length?(0,a.createElement)(m,{title:(0,i.__)("Content Gaps & Opportunities","thinkrank"),count:e.competitor_gaps.length,defaultOpen:!1,icon:j},(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-3"},(0,a.createElement)("p",{className:"tr-text-sm tr-text-tertiary tr-m-0 tr-leading-relaxed"},(0,i.__)("Opportunities to outperform competitors based on analysis:","thinkrank")),e.competitor_gaps.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-p-3 tr-rounded-lg tr-border tr-border-warning tr-bg-warning-bg tr-flex tr-items-start tr-gap-3"},(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-px-2 tr-py-0.5 tr-rounded tr-text-xs tr-font-bold tr-bg-warning tr-text-white tr-shrink-0"},(0,i.__)("GAP","thinkrank")),(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-sm tr-text-secondary tr-m-0 tr-leading-relaxed tr-mb-1"},(0,a.createElement)(d,null,e)),(0,a.createElement)("p",{className:"tr-text-xs tr-text-warning tr-m-0 tr-font-medium"},"→"," ",(0,i.__)("Include this in your content strategy","thinkrank"))))),(0,a.createElement)("div",{className:"tr-p-3 tr-rounded-lg tr-bg-success-bg tr-border tr-border-success"},(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-success tr-mb-2 tr-m-0"},"🚀 ",(0,i.__)("Your Competitive Advantage","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1"},[(0,i.__)("Address gaps competitors miss","thinkrank"),(0,i.__)("Provide more comprehensive coverage","thinkrank"),(0,i.__)("Better user experience and engagement","thinkrank"),(0,i.__)("Higher search engine rankings potential","thinkrank")].map((e,t)=>(0,a.createElement)("p",{key:t,className:"tr-text-xs tr-text-success tr-m-0"},"✓ ",e)))))):null},{id:"cta",label:(0,i.__)("CTAs","thinkrank"),node:e.call_to_actions?.length?(0,a.createElement)(m,{title:(0,i.__)("Call-to-Action Suggestions","thinkrank"),count:e.call_to_actions.length,defaultOpen:!1,icon:I},(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-2"},e.call_to_actions.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-flex tr-items-center tr-gap-3 tr-p-3 tr-rounded-lg tr-bg-white tr-border tr-border-secondary"},(0,a.createElement)("span",{className:"tr-text-xs tr-font-bold tr-text-tertiary tr-w-5 tr-shrink-0"},t+1),(0,a.createElement)("span",{className:"tr-flex-1 tr-text-sm tr-text-secondary tr-leading-snug"},(0,a.createElement)(d,null,e)),(0,a.createElement)("button",{type:"button",onClick:()=>z(e),title:(0,i.__)("Copy CTA","thinkrank"),className:"tr-shrink-0 tr-flex tr-items-center tr-justify-center tr-w-7 tr-h-7 tr-rounded tr-text-tertiary hover:tr-text-brand hover:tr-bg-brand-bg tr-transition-colors"},(0,a.createElement)(g,null)))))):null},{id:"raw",label:(0,i.__)("Raw","thinkrank"),node:e.raw_response?(0,a.createElement)(m,{title:(0,i.__)("AI Raw Response","thinkrank"),defaultOpen:!1,icon:E},(0,a.createElement)("div",null,(0,a.createElement)("pre",{className:"tr-bg-ink-1 tr-text-surface tr-p-4 tr-rounded-lg tr-text-xs tr-overflow-x-auto tr-whitespace-pre-wrap tr-leading-relaxed"},e.raw_response),(0,a.createElement)("div",{className:"tr-mt-3 tr-flex tr-justify-end"},(0,a.createElement)(s.$n,{variant:"secondary",size:"sm",onClick:()=>z(e.raw_response)},(0,a.createElement)(g,{className:"tr-w-3.5 tr-h-3.5 tr-mr-1.5"}),(0,i.__)("Copy","thinkrank"))))):null}].filter(e=>e.node);if(0===f.length)return null;const _=f.find(e=>e.id===r)||f[0];return(0,a.createElement)("div",{className:"tr-flex tr-flex-col md:tr-flex-row tr-gap-5 tr-items-start"},(0,a.createElement)("nav",{className:"tr-flex md:tr-flex-col tr-gap-1 tr-w-full md:tr-w-52 tr-shrink-0 tr-overflow-x-auto md:tr-overflow-visible md:tr-sticky md:tr-top-4","aria-label":(0,i.__)("Content brief sections","thinkrank")},f.map(e=>{const t=_.id===e.id;return(0,a.createElement)("button",{key:e.id,type:"button",onClick:()=>c(e.id),"aria-current":t?"page":void 0,className:"tr-flex tr-items-center tr-gap-2 tr-whitespace-nowrap tr-px-3 tr-py-2 tr-rounded-lg tr-text-sm tr-font-medium tr-text-left tr-transition-colors md:tr-w-full "+(t?"tr-bg-brand-bg tr-text-brand":"tr-text-secondary hover:tr-text-primary")},(0,a.createElement)("span",{className:"tr-w-1.5 tr-h-1.5 tr-rounded-full tr-shrink-0",style:{backgroundColor:t?"#4451FF":"#CBD5E1"}}),e.label)})),(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-0 tr-w-full"},_.node))}},82645:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var a=r(51609),n=r(27723),i=r(49323),s=r(86087),l=r(56427),o=r(62603),c=r(67640),d=r(25353),g=r(34011),M=r(24414),u=r(79487);const m=({activeSubSection:e="core-web-vitals",onNavigate:t})=>{const[r,m]=(0,s.useState)(null),[N,h]=(0,s.useState)(!1),[p,k]=(0,s.useState)(null),[y,x]=(0,s.useState)(null),[D,j]=(0,s.useState)(null),[I,E]=(0,s.useState)(null),[z,T]=(0,s.useState)(!1),[f,_]=(0,s.useState)(null),[A,w]=(0,s.useState)("mobile"),[b,O]=(0,s.useState)(28),[v,L]=(0,s.useState)([]),[S,C]=(0,s.useState)(!1),[Q,U]=(0,s.useState)(null),[Y,P]=(0,s.useState)([]),[R,Z]=(0,s.useState)(!1),[V,B]=(0,s.useState)(null),G=()=>({deviceType:A,historicalPeriod:b,setPerformanceData:m,setIsLoading:h,setNotice:k,setLastUpdated:x,setRecommendations:j,setHistoricalData:E,setIsLoadingHistoricalData:T,setHistoricalDataError:_,setOpportunities:L,setIsLoadingOpportunities:C,setOpportunitiesError:U,setDiagnostics:P,setIsLoadingDiagnostics:Z,setDiagnosticsError:B}),W=()=>(0,M.Re)(G()),H=()=>((0,u.K)(),W()),F=e=>(0,M.he)(G(),e),J=()=>(0,M.MM)(G()),X=()=>(0,M.dT)(G());(0,s.useEffect)(()=>{W()},[A]);const $=(0,s.useRef)(0);return(0,s.useEffect)(()=>{if("collecting"!==r?.status)return void($.current=0);if($.current>=8)return;$.current++;const e=setTimeout(()=>W(),15e3);return()=>clearTimeout(e)},[r]),(0,s.useEffect)(()=>{"recommendations"!==e||D||(0,M.JP)(G()),"monitoring"===e&&F(b),"seo-performance"!==e||0!==v.length||S||J(),"recommendations"!==e||0!==Y.length||R||X()},[e,b]),(0,a.createElement)("div",{className:"thinkrank-performance-tab"},(0,a.createElement)("div",{className:"thinkrank-perf-header tr-flex tr-justify-end tr-mb-4"},(0,a.createElement)(l.Button,{variant:"secondary",onClick:H,disabled:N,className:"thinkrank-perf-refresh-btn"},N?(0,n.__)("Refreshing…","thinkrank"):(0,n.__)("Refresh Data","thinkrank"))),p&&(0,a.createElement)(l.Notice,{status:p.status,onRemove:()=>k(null),style:{marginBottom:"16px"}},p.message),(()=>{const s="core-web-vitals"===e||!["seo-performance","monitoring","recommendations"].includes(e);if(N&&!r&&s)return(0,a.createElement)("div",{style:{textAlign:"center",padding:"48px"}},(0,a.createElement)(i.u4,{lines:3}));if("collecting"===r?.status&&s){const e=r?.collection_error,i=e&&/quota|rate limit|429/i.test(e);return(0,a.createElement)(l.Card,null,(0,a.createElement)(l.CardBody,null,(0,a.createElement)("div",{style:{textAlign:"center",padding:"48px 24px"}},(0,a.createElement)("div",{style:{fontSize:"48px",marginBottom:"24px"}},e?"⚠️":"⏱️"),(0,a.createElement)(l.__experimentalHeading,{level:3,style:{marginBottom:"12px"}},e?(0,n.__)("Measurement failed, will retry","thinkrank"):(0,n.__)("Measuring your site…","thinkrank")),(0,a.createElement)(l.__experimentalText,{variant:"muted",style:{display:"block"}},e||(0,n.__)("Google is running a Lighthouse audit of your homepage. This usually takes under a minute. The results will appear automatically.","thinkrank")),i&&(0,a.createElement)("div",{style:{marginTop:"24px"}},(0,a.createElement)(l.__experimentalText,{variant:"muted",style:{display:"block",marginBottom:"12px"}},(0,n.__)("Tip: add your own (free) PageSpeed Insights API key to get a dedicated 25,000/day quota for this site.","thinkrank")),(0,a.createElement)(l.Button,{variant:"primary",onClick:()=>t&&t("integrations","google-services")},(0,n.__)("Add PageSpeed API Key","thinkrank"))))))}if(!r&&s)return(0,a.createElement)(l.Card,null,(0,a.createElement)(l.CardHeader,null,(0,a.createElement)(l.__experimentalHeading,{level:3},(0,n.__)("Performance Data Not Available","thinkrank"))),(0,a.createElement)(l.CardBody,null,(0,a.createElement)("div",{style:{textAlign:"center",padding:"48px 24px"}},(0,a.createElement)("div",{style:{fontSize:"48px",marginBottom:"24px"}},"⚡"),(0,a.createElement)("div",{style:{marginBottom:"32px"}},(0,a.createElement)(l.__experimentalText,{style:{fontSize:"16px",marginBottom:"12px",display:"block"}},(0,n.__)("No performance data available. This could be due to missing API configuration.","thinkrank")),(0,a.createElement)(l.__experimentalText,{variant:"muted",style:{display:"block"}},(0,n.__)("Add a PageSpeed API key or connect your Google account in Integrations > Google Services to view real performance metrics.","thinkrank"))),(0,a.createElement)("div",{style:{display:"flex",justifyContent:"center",gap:"12px",flexWrap:"wrap"}},(0,a.createElement)(l.Button,{variant:"primary",onClick:()=>t&&t("integrations","google-services")},(0,n.__)("Add PageSpeed API Key","thinkrank")),(0,a.createElement)(l.Button,{variant:"secondary",onClick:H,disabled:N},N?(0,a.createElement)(i.u4,{lines:2}):(0,n.__)("Refresh Data","thinkrank"))))));switch(e){case"core-web-vitals":default:return(0,a.createElement)(o.Ay,{performanceData:r,deviceType:A,setDeviceType:w,isLoading:N,onNavigate:t,onRefresh:H});case"seo-performance":return(0,a.createElement)(c.A,{opportunities:v,isLoadingOpportunities:S,opportunitiesError:Q,performanceData:r,onNavigate:t,onRetry:J});case"monitoring":return(0,a.createElement)(d.A,{historicalData:I,isLoadingHistoricalData:z,historicalDataError:f,historicalPeriod:b,setHistoricalPeriod:O,performanceData:r,onNavigate:t,onRetry:()=>F()});case"recommendations":return(0,a.createElement)(g.A,{diagnostics:Y,isLoadingDiagnostics:R,diagnosticsError:V,onNavigate:t,onRetry:X})}})())}},82898:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"}))},82945:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>s});var a=r(51609),n=(r(86087),r(27723));const i=({label:e,length:t,max:r})=>{const i=((e,t)=>0===e?{tone:"tertiary",label:(0,n.__)("Empty","thinkrank")}:e>t?{tone:"danger",label:(0,n.__)("Too long","thinkrank")}:e<.5*t?{tone:"warning",label:(0,n.__)("Too short","thinkrank")}:{tone:"success",label:(0,n.__)("Good","thinkrank")})(t,r),s=Math.min(t/r*100,110),l={success:"tr-bg-success",warning:"tr-bg-warning",danger:"tr-bg-danger",tertiary:"tr-bg-line-2"}[i.tone],o={success:"tr-text-success",warning:"tr-text-warning",danger:"tr-text-danger",tertiary:"tr-text-tertiary"}[i.tone];return(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-mb-1.5"},(0,a.createElement)("span",{className:"tr-text-xs tr-font-medium tr-text-secondary"},e),(0,a.createElement)("span",{className:`tr-text-xs tr-font-semibold ${o}`},t,"/",r," · ",i.label)),(0,a.createElement)("div",{className:"tr-h-1.5 tr-w-full tr-rounded-full tr-bg-line-2 tr-overflow-hidden"},(0,a.createElement)("div",{className:`tr-h-full tr-rounded-full tr-transition-all tr-duration-200 ${l}`,style:{width:`${s}%`}})))},s=({title:e="",description:t="",url:r="",siteName:s="",favicon:l=null,className:o=""})=>{const c=r||window.location.origin,d=s||window.thinkrankAdmin?.siteName||"Your Website",g=c.replace(/^https?:\/\//,"").replace(/\/$/,""),M=d.trim().charAt(0).toUpperCase()||"W",u=e.length>60?e.substring(0,57)+"…":e,m=t.length>160?t.substring(0,157)+"…":t,N=(new Date).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});return(0,a.createElement)("div",{className:`tr-bg-white tr-rounded-xl tr-shadow-sm tr-overflow-hidden ${o}`},(0,a.createElement)("div",{className:"tr-px-6 tr-py-4 tr-border-b tr-border-secondary tr-flex tr-items-center tr-gap-3"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-9 tr-h-9 tr-rounded-lg tr-bg-brand-bg tr-text-brand tr-shrink-0"},(0,a.createElement)("svg",{className:"tr-w-[18px] tr-h-[18px]",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},(0,a.createElement)("circle",{cx:"11",cy:"11",r:"7"}),(0,a.createElement)("path",{d:"M21 21l-4.3-4.3"}))),(0,a.createElement)("div",{className:"tr-min-w-0"},(0,a.createElement)("h4",{className:"tr-text-base tr-font-semibold tr-text-primary tr-m-0"},(0,n.__)("Search Engine Preview","thinkrank")),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0 tr-mt-0.5"},(0,n.__)("How your page will appear on Google search results","thinkrank")))),(0,a.createElement)("div",{className:"tr-p-6"},(0,a.createElement)("div",{className:"tr-bg-white tr-border tr-border-secondary tr-rounded-xl tr-p-5 tr-shadow-sm hover:tr-shadow-md tr-transition-shadow tr-duration-200"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2 tr-mb-2"},l?(0,a.createElement)("img",{src:l,alt:"",width:"22",height:"22",className:"tr-w-[22px] tr-h-[22px] tr-rounded-full tr-shrink-0 tr-bg-line-2 tr-p-0.5"}):(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-[22px] tr-h-[22px] tr-rounded-full tr-shrink-0 tr-bg-brand tr-text-white tr-text-[10px] tr-font-semibold","aria-hidden":"true"},M),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-leading-tight tr-min-w-0"},(0,a.createElement)("span",{className:"tr-text-xs tr-font-medium tr-text-primary tr-truncate"},d),(0,a.createElement)("span",{className:"tr-text-[11px] tr-text-tertiary tr-truncate"},g))),(0,a.createElement)("span",{className:"tr-block tr-text-lg tr-leading-snug tr-font-normal hover:tr-underline tr-no-underline tr-mb-1",style:{color:"#1A0DAB"}},u||(0,n.__)("Your SEO Title Will Appear Here","thinkrank")),(0,a.createElement)("p",{className:"tr-text-sm tr-text-secondary tr-leading-relaxed tr-m-0"},(0,a.createElement)("span",{className:"tr-text-tertiary tr-mr-1"},N),m||(0,n.__)("Your meta description will appear here. Make it compelling to encourage clicks from search results.","thinkrank"))),(0,a.createElement)("div",{className:"tr-mt-5 tr-p-4 tr-rounded-xl tr-bg-[#F7F8FB] tr-border tr-border-secondary tr-grid tr-grid-cols-1 tr-gap-4"},(0,a.createElement)(i,{label:(0,n.__)("Title Length","thinkrank"),length:e.length,max:60}),(0,a.createElement)(i,{label:(0,n.__)("Description Length","thinkrank"),length:t.length,max:160}))))}},83053:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM15.4697 14.9697L18.4393 12L15.4697 9.03033L16.5303 7.96967L20.0303 11.4697L20.5607 12L20.0303 12.5303L16.5303 16.0303L15.4697 14.9697Z"}))},83177:(e,t,r)=>{"use strict";r.d(t,{A:()=>N});var a=r(47143),n=r(1455),i=r.n(n),s=r(60775);const l={metadata:{},isGenerating:{},generationHistory:{},isLoading:!1},o="SET_METADATA",c="SET_GENERATING",d="SET_LOADING",g="ADD_TO_HISTORY",M="CLEAR_METADATA",u={setMetadata:(e,t)=>({type:o,postId:e,metadata:t}),setGenerating:(e,t)=>({type:c,postId:e,generating:t}),setLoading:e=>({type:d,loading:e}),addToHistory:(e,t)=>({type:g,postId:e,entry:t}),clearMetadata:e=>({type:M,postId:e}),*generateMetadata(e,t={}){yield u.setGenerating(e,!0);try{const t={title:"AI Generated Title",description:"AI Generated Description",generated_at:(new Date).toISOString()};return yield u.setMetadata(e,t),yield u.addToHistory(e,{timestamp:Date.now(),action:"generated",metadata:t}),t}catch(e){throw s.A.error("Failed to generate metadata:",e),e}finally{yield u.setGenerating(e,!1)}},*loadMetadata(e){yield u.setLoading(!0);try{const t=yield i()({path:`/thinkrank/v1/metadata/${e}`});return yield u.setMetadata(e,t),t}catch(e){s.A.error("Failed to load metadata:",e)}finally{yield u.setLoading(!1)}}},m={getMetadata:(e,t)=>e.metadata[t]||null,getIsGenerating:(e,t)=>e.isGenerating[t]||!1,getIsLoading:e=>e.isLoading,getGenerationHistory:(e,t)=>e.generationHistory[t]||[],hasMetadata:(e,t)=>!!e.metadata[t],getMetadataTitle(e,t){const r=e.metadata[t];return r?.title||""},getMetadataDescription(e,t){const r=e.metadata[t];return r?.description||""}},N=(0,a.createReduxStore)("thinkrank/metadata",{reducer:(e=l,t)=>{switch(t.type){case o:return{...e,metadata:{...e.metadata,[t.postId]:t.metadata}};case c:return{...e,isGenerating:{...e.isGenerating,[t.postId]:t.generating}};case d:return{...e,isLoading:t.loading};case g:return{...e,generationHistory:{...e.generationHistory,[t.postId]:[...e.generationHistory[t.postId]||[],t.entry]}};case M:return{...e,metadata:{...e.metadata,[t.postId]:null}};default:return e}},actions:u,selectors:m})},83520:(e,t,r)=>{"use strict";r.d(t,{A:()=>x});var a=r(51609),n=r(86087),i=r(27723),s=r(49323),l=r(85161),o=r(1455),c=r.n(o),d=r(80028),g=r(60775),M=r(79487),u=r(78836);const m=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("polyline",{points:"6 9 12 15 18 9"})),N=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("polyline",{points:"18 15 12 9 6 15"})),h=({className:e})=>(0,a.createElement)("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},(0,a.createElement)("polyline",{points:"23 4 23 10 17 10"}),(0,a.createElement)("polyline",{points:"1 20 1 14 7 14"}),(0,a.createElement)("path",{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"})),p=({className:e})=>(0,a.createElement)("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},(0,a.createElement)("polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}),(0,a.createElement)("path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"})),k=[{code:200,message:"OK",reason:(0,i.__)("The URL was successfully submitted to the IndexNow API.","thinkrank")},{code:202,message:"Accepted",reason:(0,i.__)("The URL was successfully submitted to the IndexNow API, but the API key will be checked later.","thinkrank")},{code:400,message:"Bad Request",reason:(0,i.__)("The request was invalid.","thinkrank")},{code:403,message:"Forbidden",reason:(0,i.__)("The key was invalid (e.g. key not found, file found but key not in the file).","thinkrank")},{code:422,message:"Unprocessable Entity",reason:(0,i.__)("The URLs don't belong to the host or the key is not matching the schema in the protocol.","thinkrank")},{code:429,message:"Too Many Requests",reason:(0,i.__)("Too Many Requests (potential Spam).","thinkrank")}],y=k.reduce((e,t)=>(e[t.code]=t.reason,e),{}),x=({onNavigate:e})=>{const[t,r]=(0,n.useState)([]),[o,x]=(0,n.useState)(!0),[D,j]=(0,n.useState)(!1),[I,E]=(0,n.useState)(1),[z,T]=(0,n.useState)(!1),[f,_]=(0,n.useState)(0),A=(e=I,t=!1)=>{x(!0),c()({path:`/thinkrank/v1/instant-indexing/history?page=${e}&per_page=10`}).then(e=>{var a;e.success&&Array.isArray(e.data)?(r(e.data),_(null!==(a=e.pagination?.total)&&void 0!==a?a:e.data.length)):(r([]),_(0)),x(!1),t&&d.oR.success((0,i.__)("Submission history refreshed.","thinkrank"))}).catch(e=>{g.A.error("Error fetching history:",e),x(!1),t&&d.oR.error((0,i.__)("Failed to refresh history.","thinkrank"))})};(0,n.useEffect)(()=>{A(I)},[I]);const w=Math.max(1,Math.ceil(f/10)),b=t,O=!o&&0===b.length;return(0,a.createElement)("div",{className:"thinkrank-instant-indexing-history"},(0,a.createElement)(l.A,{title:(0,i.__)("Submission History","thinkrank"),description:(0,i.__)("View the history of URLs submitted to IndexNow.","thinkrank"),enabled:!0,showToggle:!1},(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-4"},(0,a.createElement)(u.A,null),(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-gap-3 tr-flex-wrap"},(0,a.createElement)("div",null,(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,i.__)("URL Submissions","thinkrank")),f>0&&(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-mt-1 tr-mb-0"},(0,i.sprintf)(/* translators: %d: total number of submissions */ /* translators: %d: total number of submissions */ |
| 135 | 137 | (0,i._n)("%d submission logged","%d submissions logged",f,"thinkrank"),f))),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2"},(0,a.createElement)(s.$n,{variant:"secondary",size:"sm",icon:h,onClick:()=>{(0,M.K)(),A(I,!0)},loading:o,disabled:o||D},(0,i.__)("Refresh","thinkrank")),(0,a.createElement)(s.$n,{variant:"secondary",size:"sm",onClick:()=>{window.confirm((0,i.__)("Are you sure you want to clear all history? This action cannot be undone.","thinkrank"))&&(j(!0),c()({path:"/thinkrank/v1/instant-indexing/history",method:"DELETE"}).then(()=>{E(1),A(1),j(!1)}).catch(e=>{g.A.error("Error clearing history:",e),d.oR.error((0,i.__)("Failed to clear history. Please try again.","thinkrank")),j(!1)}))},loading:D,disabled:o||D||0===t.length},(0,i.__)("Clean History","thinkrank"))))),o&&(0,a.createElement)("div",{className:"tr-p-5"},(0,a.createElement)(s.u4,{lines:3})),!o&&O&&(0,a.createElement)(s.pp,{icon:p,title:(0,i.__)("No submissions yet","thinkrank"),description:(0,i.__)("URLs you send to IndexNow, manually or automatically on publish, will appear here.","thinkrank"),action:(0,a.createElement)(s.$n,{variant:"primary",onClick:()=>{"function"==typeof e&&e("instant-indexing","instant-indexing-submit-urls")}},(0,i.__)("Submit URLs","thinkrank"))}),!o&&!O&&(0,a.createElement)("div",{className:"tr-overflow-x-auto"},(0,a.createElement)("table",{className:"tr-w-full tr-text-sm tr-border-collapse"},(0,a.createElement)("thead",null,(0,a.createElement)("tr",{className:"tr-bg-[#FAFBFC] tr-border-b tr-border-secondary"},(0,a.createElement)("th",{className:"tr-text-left tr-px-4 tr-py-3 tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide"},(0,i.__)("URL","thinkrank")),(0,a.createElement)("th",{className:"tr-text-left tr-px-4 tr-py-3 tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide"},(0,i.__)("Status","thinkrank")),(0,a.createElement)("th",{className:"tr-text-left tr-px-4 tr-py-3 tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide"},(0,i.__)("Response","thinkrank")),(0,a.createElement)("th",{className:"tr-text-left tr-px-4 tr-py-3 tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide"},(0,i.__)("Time","thinkrank")))),(0,a.createElement)("tbody",null,b.map(e=>{return(0,a.createElement)("tr",{key:e.id,className:"tr-border-b tr-border-secondary last:tr-border-b-0 hover:tr-bg-[#FAFBFC]"},(0,a.createElement)("td",{className:"tr-px-4 tr-py-3 tr-max-w-xs tr-truncate"},(0,a.createElement)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",title:e.url,className:"tr-text-brand-600 hover:tr-text-brand-700 tr-no-underline"},e.url)),(0,a.createElement)("td",{className:"tr-px-4 tr-py-3"},(0,a.createElement)(s.Ex,{variant:(t=e.status,"success"===t?"good":"failed"===t||"error"===t?"poor":"neutral")},String(e.status).toUpperCase())),(0,a.createElement)("td",{className:"tr-px-4 tr-py-3 tr-text-secondary",title:y[e.response_code]||void 0},(0,a.createElement)("span",{className:"tr-font-mono tr-font-semibold"},e.response_code),e.response_message&&`: ${e.response_message}`),(0,a.createElement)("td",{className:"tr-px-4 tr-py-3 tr-text-tertiary tr-whitespace-nowrap"},e.created_at));var t})))),!O&&w>1&&(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-center tr-gap-3 tr-px-5 tr-py-4 tr-border-t tr-border-secondary"},(0,a.createElement)(s.$n,{variant:"secondary",size:"sm",onClick:()=>E(e=>Math.max(e-1,1)),disabled:1===I},(0,i.__)("Previous","thinkrank")),(0,a.createElement)("span",{className:"tr-text-sm tr-text-secondary"},(0,i.sprintf)(/* translators: 1: Current page number, 2: Total pages */ /* translators: 1: Current page number, 2: Total pages */ |
| 136 | -(0,i.__)("Page %1$s of %2$s","thinkrank"),I,w)),(0,a.createElement)(s.$n,{variant:"secondary",size:"sm",onClick:()=>E(e=>Math.min(e+1,w)),disabled:I===w},(0,i.__)("Next","thinkrank")))),(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 "+(z?"tr-border-b tr-border-secondary":"")},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between"},(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,i.__)("Response Code Help","thinkrank")),(0,a.createElement)("button",{onClick:()=>T(!z),className:"tr-flex tr-items-center tr-gap-1 tr-text-sm tr-text-tertiary tr-bg-transparent tr-border-0 tr-cursor-pointer tr-p-1",style:{background:"none"},"aria-label":z?(0,i.__)("Collapse Help","thinkrank"):(0,i.__)("Expand Help","thinkrank")},z?(0,a.createElement)(N,null):(0,a.createElement)(m,null)))),z&&(0,a.createElement)("div",{className:"tr-overflow-x-auto"},(0,a.createElement)("table",{className:"tr-w-full tr-text-sm tr-border-collapse"},(0,a.createElement)("thead",null,(0,a.createElement)("tr",{className:"tr-bg-[#FAFBFC] tr-border-b tr-border-secondary"},(0,a.createElement)("th",{className:"tr-text-left tr-px-4 tr-py-3 tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide"},(0,i.__)("Response Code","thinkrank")),(0,a.createElement)("th",{className:"tr-text-left tr-px-4 tr-py-3 tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide"},(0,i.__)("Response Message","thinkrank")),(0,a.createElement)("th",{className:"tr-text-left tr-px-4 tr-py-3 tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide"},(0,i.__)("Reasons","thinkrank")))),(0,a.createElement)("tbody",null,k.map(e=>(0,a.createElement)("tr",{key:e.code,className:"tr-border-b tr-border-secondary last:tr-border-b-0"},(0,a.createElement)("td",{className:"tr-px-4 tr-py-3 tr-font-mono tr-font-semibold tr-text-secondary"},e.code),(0,a.createElement)("td",{className:"tr-px-4 tr-py-3 tr-text-secondary"},e.message),(0,a.createElement)("td",{className:"tr-px-4 tr-py-3 tr-text-tertiary"},e.reason))))))))))}},84242:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z"}))},84316:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"}))},84510:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 9.484h-8.889v-1.5H20v1.5Zm0 7h-4.889v-1.5H20v1.5Zm-14 .032a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"}),(0,a.createElement)(n.Path,{d:"M13 15.516a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 8.484a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"}))},85063:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"}))},85161:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(51609),n=r(27723),i=r(97500),s=r.n(i),l=r(49323);const o=({title:e,enabled:t=!0,onToggle:r,toggleLabel:i,toggleBusy:o=!1,optimizationButtons:c=[],notice:d,onNoticeRemove:g,children:M,className:u="",showDisabledWarning:m=!0,disabledWarningMessage:N,size:h,...p})=>(0,a.createElement)("div",{className:s()("tr-bg-white tr-rounded-lg tr-border tr-border-secondary tr-overflow-hidden",u),...p},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-gap-4 tr-px-6 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("div",{className:"tr-min-w-0 tr-flex-1"},"string"==typeof e?(0,a.createElement)("h2",{className:"tr-m-0 tr-text-sm tr-font-semibold tr-text-primary tr-leading-snug"},e):e),(r||c.length>0)&&(0,a.createElement)("div",{className:"tr-flex tr-shrink-0 tr-items-center tr-gap-3"},r&&(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2"},o&&(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},(0,n.__)("Saving…","thinkrank")),(0,a.createElement)(l.lM,{checked:t,onChange:r,disabled:o,label:i||(0,n.__)("Enable","thinkrank")})),c.map((e,t)=>(0,a.createElement)("div",{key:t},e)))),(0,a.createElement)("div",{className:"tr-p-6 tr-flex tr-flex-col tr-gap-4"},!t&&m&&(0,a.createElement)(l.Fc,{variant:"warning"},N||(0,n.__)("This feature is disabled. Enable it to access configuration options.","thinkrank")),d&&(0,a.createElement)(l.Fc,{variant:"error"===d.status?"error":"success"===d.status?"success":"warning"===d.status?"warning":"info",onDismiss:g},d.message),M))},85380:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z"}))},85657:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"}))},85770:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(51609),n=r(97500),i=r.n(n),s=r(49323);function l({title:e,description:t,trailing:r,withBorder:n=!0,className:l}){return(0,a.createElement)("div",{className:i()("tr-px-6 tr-pt-5 tr-pb-4",n&&"tr-border-b tr-border-secondary",l)},(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-justify-between tr-gap-4"},(0,a.createElement)(s.mc,{direction:"column",gap:1,className:"tr-min-w-0 tr-flex-1"},e&&(0,a.createElement)(s.hE,{tag:"h3",size:"sm"},e),t&&(0,a.createElement)(s.EY,{size:14,color:"secondary"},t)),r&&(0,a.createElement)("div",{className:"tr-flex tr-shrink-0 tr-items-center tr-pt-0.5"},r)))}},85874:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var a=r(51609),n=r(27723),i=r(49323);const s=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("polyline",{points:"20 6 9 17 4 12"})),l=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,a.createElement)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),o=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),(0,a.createElement)("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),(0,a.createElement)("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})),c=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("circle",{cx:"12",cy:"12",r:"10"}),(0,a.createElement)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,a.createElement)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})),d=({validationResults:e,isValidating:t,onValidate:r,settings:d,fileStatus:g})=>{const M=({label:e,detail:t})=>(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-2 tr-px-3 tr-py-2 tr-rounded tr-text-xs tr-bg-success-bg tr-text-success"},(0,a.createElement)("span",{className:"tr-shrink-0 tr-mt-px"},(0,a.createElement)(s,null)),(0,a.createElement)("span",null,(0,a.createElement)("strong",null,e),t?`: ${t}`:"")),u=({label:e,detail:t})=>(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-2 tr-px-3 tr-py-2 tr-rounded tr-text-xs tr-bg-warning-bg tr-text-warning"},(0,a.createElement)("span",{className:"tr-shrink-0 tr-mt-px"},(0,a.createElement)(o,null)),(0,a.createElement)("span",null,(0,a.createElement)("strong",null,e),t?`: ${t}`:"")),m=({label:e,detail:t})=>(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-2 tr-px-3 tr-py-2 tr-rounded tr-text-xs tr-bg-danger-bg tr-text-danger"},(0,a.createElement)("span",{className:"tr-shrink-0 tr-mt-px"},(0,a.createElement)(l,null)),(0,a.createElement)("span",null,(0,a.createElement)("strong",null,e),t?`: ${t}`:""));return(0,a.createElement)(i.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary tr-flex tr-items-center tr-justify-between"},(0,a.createElement)("h3",{className:"tr-text-base tr-font-semibold tr-text-primary tr-m-0"},(0,n.__)("LLMs.txt Validation","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-3"},e&&(e.valid?(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-gap-1.5 tr-text-xs tr-font-medium tr-px-2.5 tr-py-1 tr-rounded-full tr-border tr-bg-success-bg tr-border-success tr-text-success"},(0,a.createElement)(s,null),(0,n.__)("Valid","thinkrank")):(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-gap-1.5 tr-text-xs tr-font-medium tr-px-2.5 tr-py-1 tr-rounded-full tr-border tr-bg-danger-bg tr-border-danger tr-text-danger"},(0,a.createElement)(l,null),(0,n.__)("Invalid","thinkrank"))),e&&void 0!==e.score&&(e=>{let t="tr-bg-success",r=(0,n.__)("Excellent","thinkrank");return e<60?(t="tr-bg-danger",r=(0,n.__)("Poor","thinkrank")):e<80&&(t="tr-bg-warning",r=(0,n.__)("Good","thinkrank")),(0,a.createElement)("span",{className:`tr-text-xs tr-font-bold tr-px-2 tr-py-1 tr-rounded tr-text-white ${t}`},e,"/100 · ",r)})(e.score),(0,a.createElement)(i.$n,{variant:"secondary",size:"sm",onClick:r,disabled:t||!d.enabled,loading:t},t?(0,n.__)("Validating…","thinkrank"):(0,n.__)("Validate Configuration","thinkrank")))),(0,a.createElement)("div",{className:"tr-p-5 tr-flex tr-flex-col tr-gap-5"},!d.enabled&&(0,a.createElement)(i.Fc,{variant:"warning"},(0,n.__)("LLMs.txt is disabled. Enable it to run validation.","thinkrank")),e?(e=>{const t=e.errors&&e.errors.length>0,r=e.warnings&&e.warnings.length>0,i=(e.suggestions||[]).filter(e=>e.startsWith("✓")),d=(e.suggestions||[]).filter(e=>!e.startsWith("✓"));return(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-3"},t?(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1"},(0,a.createElement)(m,{label:(0,n.__)("Required Fields","thinkrank"),detail:`${e.errors.length} ${(0,n.__)("missing","thinkrank")}`}),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1 tr-pl-4"},e.errors.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-flex tr-items-start tr-gap-2 tr-px-3 tr-py-2 tr-rounded tr-text-xs tr-bg-danger-bg tr-text-danger"},(0,a.createElement)("span",{className:"tr-shrink-0 tr-mt-px"},(0,a.createElement)(l,null)),(0,a.createElement)("span",null,e))))):(0,a.createElement)(M,{label:(0,n.__)("Required Fields","thinkrank"),detail:(0,n.__)("Complete","thinkrank")}),r?(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1"},(0,a.createElement)(u,{label:(0,n.__)("Content Quality","thinkrank"),detail:`${e.warnings.length} ${(0,n.__)("improvements","thinkrank")}`}),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1 tr-pl-4"},e.warnings.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-flex tr-items-start tr-gap-2 tr-px-3 tr-py-2 tr-rounded tr-text-xs tr-bg-warning-bg tr-text-warning"},(0,a.createElement)("span",{className:"tr-shrink-0 tr-mt-px"},(0,a.createElement)(o,null)),(0,a.createElement)("span",null,e))))):(0,a.createElement)(M,{label:(0,n.__)("Content Quality","thinkrank"),detail:(0,n.__)("Optimized","thinkrank")}),g?.writable?(0,a.createElement)(M,{label:(0,n.__)("File Permissions","thinkrank"),detail:(0,n.__)("Writable","thinkrank")}):(0,a.createElement)(m,{label:(0,n.__)("File Permissions","thinkrank"),detail:(0,n.__)("Not writable","thinkrank")}),(0,a.createElement)(M,{label:(0,n.__)("LLMs.txt Standards","thinkrank"),detail:(0,n.__)("Compliant","thinkrank")}),i.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide tr-m-0 tr-mb-2"},(0,n.__)("Configuration Status","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1"},i.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-flex tr-items-start tr-gap-2 tr-px-3 tr-py-2 tr-rounded tr-text-xs tr-bg-success-bg tr-text-success"},(0,a.createElement)("span",{className:"tr-shrink-0 tr-mt-px"},(0,a.createElement)(s,null)),(0,a.createElement)("span",null,e))))),d.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide tr-m-0 tr-mb-2"},(0,n.__)("Suggestions for Improvement","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1"},d.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-flex tr-items-start tr-gap-2 tr-px-3 tr-py-2 tr-rounded tr-text-xs tr-bg-brand-bg tr-text-brand"},(0,a.createElement)("span",{className:"tr-shrink-0 tr-mt-px"},(0,a.createElement)(c,null)),(0,a.createElement)("span",null,e))))))})(e):(0,a.createElement)("div",{className:"tr-bg-white tr-border tr-border-secondary tr-rounded tr-p-4 tr-text-sm tr-text-tertiary"},(0,n.__)('Click "Validate Configuration" to check your LLMs.txt setup for errors and optimization opportunities.',"thinkrank"))))}},85962:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M5 13.5h3v-3H5v3zm5 0h3v-3h-3v3zM17 9l-1 1 2 2-2 2 1 1 3-3-3-3z"}))},86087:e=>{"use strict";e.exports=window.wp.element},86261:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M5 17.7c.4.5.8.9 1.2 1.2l1.1-1.4c-.4-.3-.7-.6-1-1L5 17.7zM5 6.3l1.4 1.1c.3-.4.6-.7 1-1L6.3 5c-.5.4-.9.8-1.3 1.3zm.1 7.8l-1.7.5c.2.6.4 1.1.7 1.6l1.5-.8c-.2-.4-.4-.8-.5-1.3zM4.8 12v-.7L3 11.1v1.8l1.7-.2c.1-.2.1-.5.1-.7zm3 7.9c.5.3 1.1.5 1.6.7l.5-1.7c-.5-.1-.9-.3-1.3-.5l-.8 1.5zM19 6.3c-.4-.5-.8-.9-1.2-1.2l-1.1 1.4c.4.3.7.6 1 1L19 6.3zm-.1 3.6l1.7-.5c-.2-.6-.4-1.1-.7-1.6l-1.5.8c.2.4.4.8.5 1.3zM5.6 8.6l-1.5-.8c-.3.5-.5 1-.7 1.6l1.7.5c.1-.5.3-.9.5-1.3zm2.2-4.5l.8 1.5c.4-.2.8-.4 1.3-.5l-.5-1.7c-.6.2-1.1.4-1.6.7zm8.8 13.5l1.1 1.4c.5-.4.9-.8 1.2-1.2l-1.4-1.1c-.2.3-.5.6-.9.9zm1.8-2.2l1.5.8c.3-.5.5-1.1.7-1.6l-1.7-.5c-.1.5-.3.9-.5 1.3zm2.6-4.3l-1.7.2v1.4l1.7.2V12v-.9zM11.1 3l.2 1.7h1.4l.2-1.7h-1.8zm3 2.1c.5.1.9.3 1.3.5l.8-1.5c-.5-.3-1.1-.5-1.6-.7l-.5 1.7zM12 19.2h-.7l-.2 1.8h1.8l-.2-1.7c-.2-.1-.5-.1-.7-.1zm2.1-.3l.5 1.7c.6-.2 1.1-.4 1.6-.7l-.8-1.5c-.4.2-.8.4-1.3.5z"}))},86529:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M4 13.5h6v-3H4v3zm8.2-2.5.8-.3V14h1V9.3l-2.2.7.4 1zm7.1-1.2c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3-.1-.8-.3-1.1z"}))},86931:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"}))},87298:(e,t,r)=>{"use strict";r.d(t,{A:()=>K});var a=r(51609),n=r(27723),i=r(86087),s=r(1455),l=r.n(s),o=r(97500),c=r.n(o),d=r(99714),g=r(60775),M=r(43526),u=r(94240),m=r(73131),N=r(49323),h=r(78216),p=r(76418),k=r(63426),y=r(9447),x=r(3800),D=r(90751),j=r(30012);const I="gpt-5-nano",E="claude-sonnet-5",z="gemini-3.5-flash",T="openai/gpt-4o-mini",f=[{slug:"yoast",name:"Yoast SEO",logo:h,detail:(0,n.__)("Titles, meta, canonicals, social & redirects","thinkrank")},{slug:"rankmath",name:"Rank Math",logo:p,detail:(0,n.__)("Titles, meta, schema, redirects & 404 logs","thinkrank")},{slug:"seopress",name:"SEOPress",logo:y.A,detail:(0,n.__)("Titles, meta, social & redirects","thinkrank")},{slug:"aioseo",name:"All in One SEO",logo:k,detail:(0,n.__)("Titles, meta, settings & redirects","thinkrank")},{slug:"squirrly",name:"Squirrly SEO",logo:x.A,detail:(0,n.__)("Titles, meta, social, patterns & redirects","thinkrank")},{slug:"slimseo",name:"Slim SEO",logo:D.A,detail:(0,n.__)("Titles, meta, social, redirects & 404 logs","thinkrank")}],_=[{type:"postmeta",name:(0,n.__)("Post SEO data","thinkrank"),detail:(0,n.__)("Titles, descriptions, keywords, robots, social","thinkrank")},{type:"termmeta",name:(0,n.__)("Category & tag SEO data","thinkrank"),detail:(0,n.__)("Titles and descriptions for terms","thinkrank")},{type:"usermeta",name:(0,n.__)("Author SEO data","thinkrank"),detail:(0,n.__)("Author archive titles and descriptions","thinkrank")},{type:"settings",name:(0,n.__)("Settings","thinkrank"),detail:(0,n.__)("Every ThinkRank setting except API keys","thinkrank"),countless:!0}],A=()=>(0,a.createElement)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},(0,a.createElement)("polyline",{points:"17 1 21 5 17 9"}),(0,a.createElement)("path",{d:"M3 11V9a4 4 0 0 1 4-4h14"}),(0,a.createElement)("polyline",{points:"7 23 3 19 7 15"}),(0,a.createElement)("path",{d:"M21 13v2a4 4 0 0 1-4 4H3"})),w=()=>(0,a.createElement)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},(0,a.createElement)("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),(0,a.createElement)("path",{d:"M3 5v6a9 3 0 0 0 18 0V5"}),(0,a.createElement)("path",{d:"M3 11v6a9 3 0 0 0 18 0v-6"})),b=()=>(0,a.createElement)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},(0,a.createElement)("path",{d:"M12 14 15.5 9"}),(0,a.createElement)("path",{d:"M3.5 18a9 9 0 1 1 17 0"}),(0,a.createElement)("circle",{cx:"12",cy:"18",r:"1.5"})),O=()=>(0,a.createElement)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},(0,a.createElement)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,a.createElement)("polyline",{points:"17 8 12 3 7 8"}),(0,a.createElement)("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),v=()=>(0,a.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"tr-shrink-0"},(0,a.createElement)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,a.createElement)("polyline",{points:"12 5 19 12 12 19"})),L=()=>(0,a.createElement)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"tr-shrink-0"},(0,a.createElement)("polyline",{points:"20 6 9 17 4 12"})),S=()=>(0,a.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},(0,a.createElement)("path",{d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})),C=()=>(0,a.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},(0,a.createElement)("path",{d:"M13.827 3.52h3.603L24 20.48h-3.603l-6.57-16.96zm-7.258 0h3.767l6.57 16.96H13.24l-1.343-3.484H5.017l-1.344 3.484H0l6.57-16.96zm4.132 10.226L8.492 7.717l-2.21 6.03h4.42z",fillRule:"nonzero"})),Q=()=>(0,a.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)("title",null,"OpenRouter"),(0,a.createElement)("path",{d:"M3 7h6l3 5 3-5h6"}),(0,a.createElement)("path",{d:"M3 17h6l3-5"}),(0,a.createElement)("polyline",{points:"18 4 21 7 18 10"}),(0,a.createElement)("polyline",{points:"18 14 21 17 18 20"})),U=()=>(0,a.createElement)("svg",{height:"1em",width:"1em",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",style:{flex:"none",lineHeight:1},xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)("title",null,(0,n.__)("OpenAI-compatible endpoint","thinkrank")),(0,a.createElement)("rect",{x:"3",y:"4",width:"18",height:"6",rx:"1.5"}),(0,a.createElement)("rect",{x:"3",y:"14",width:"18",height:"6",rx:"1.5"}),(0,a.createElement)("path",{d:"M7 7h.01M7 17h.01"})),Y={openai:"OpenAI",claude:"Anthropic",gemini:"Gemini",openrouter:"OpenRouter",openai_compatible:"OpenAI-compatible endpoint"},P="__custom__",R=()=>(0,a.createElement)("svg",{height:"1em",style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)("title",null,"Gemini"),(0,a.createElement)("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"#3186FF"}),(0,a.createElement)("defs",null,(0,a.createElement)("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-0",x1:"7",x2:"11",y1:"15.5",y2:"12"},(0,a.createElement)("stop",{stopColor:"#08B962"}),(0,a.createElement)("stop",{offset:"1",stopColor:"#08B962",stopOpacity:"0"})),(0,a.createElement)("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-1",x1:"8",x2:"11.5",y1:"5.5",y2:"11"},(0,a.createElement)("stop",{stopColor:"#F94543"}),(0,a.createElement)("stop",{offset:"1",stopColor:"#F94543",stopOpacity:"0"})),(0,a.createElement)("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-2",x1:"3.5",x2:"17.5",y1:"13.5",y2:"12"},(0,a.createElement)("stop",{stopColor:"#FABC12"}),(0,a.createElement)("stop",{offset:".46",stopColor:"#FABC12",stopOpacity:"0"})))),Z=[{id:"ai-provider",label:(0,n.__)("AI Provider","thinkrank")},{id:"data-management",label:(0,n.__)("Data Management","thinkrank")},{id:"import-export",label:(0,n.__)("Import / Export","thinkrank")},{id:"migration-tools",label:(0,n.__)("Migration Tools","thinkrank")}],V=Z.map(e=>e.id),B=["openai","claude","gemini","openrouter","openai_compatible"],G="openai_compatible",W="ai-provider",H=[(0,n.__)("Encrypted at rest and stored only on your site.","thinkrank"),(0,n.__)("Sent directly to your chosen AI provider.","thinkrank"),(0,n.__)("Never routed through or seen by ThinkRank's servers.","thinkrank"),(0,n.__)("Remove or swap your key anytime, no lock-in.","thinkrank")],F=[{title:(0,n.__)("Choose a provider","thinkrank"),desc:(0,n.__)("Pick OpenAI, Anthropic, Gemini, OpenRouter, or your own OpenAI-compatible endpoint.","thinkrank")},{title:(0,n.__)("Add your API key","thinkrank"),desc:(0,n.__)("Paste a key from your provider dashboard. A custom endpoint takes its base URL instead, and often no key at all.","thinkrank")},{title:(0,n.__)("Test & save","thinkrank"),desc:(0,n.__)("Verify the connection, then save settings.","thinkrank")}],J=[{label:(0,n.__)("Documentation","thinkrank"),desc:(0,n.__)("Setup guides and provider walkthroughs.","thinkrank"),href:"https://thinkrank.ai/docs/getting-started/connect-ai-provider/"},{label:(0,n.__)("Open a support ticket","thinkrank"),desc:(0,n.__)("Stuck connecting? Our team can help.","thinkrank"),href:"https://wpdeveloper.com/support/new-ticket/"}],X=e=>{try{const t=new URL(window.location.href);t.searchParams.set("tab",e),window.history.replaceState({},"",t.toString())}catch(e){}},$=({activeProvider:e,activeProviderId:t,activeModelState:r,activeHasKey:i,providers:s,providerKeyDocs:l})=>(0,a.createElement)("aside",{className:"tr-flex tr-flex-col tr-gap-5"},Boolean(t&&i)&&(0,a.createElement)(N.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,n.__)("Active configuration","thinkrank"))),(0,a.createElement)("div",{className:"tr-p-5 tr-flex tr-flex-col tr-gap-4"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-3"},(0,a.createElement)("span",{className:"tr-w-10 tr-h-10 tr-rounded-lg tr-bg-brand-bg tr-flex tr-items-center tr-justify-center tr-shrink-0"},e?.icon),(0,a.createElement)("div",{className:"tr-min-w-0"},(0,a.createElement)("p",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0 tr-truncate"},e?.label),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-mt-0.5 tr-mb-0 tr-truncate"},e?.sub))),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-text-sm tr-pt-1"},(0,a.createElement)("span",{className:"tr-text-tertiary"},(0,n.__)("Model","thinkrank")),(0,a.createElement)(d.A,{provider:t,model:r})),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-text-sm"},(0,a.createElement)("span",{className:"tr-text-tertiary"},(0,n.__)("API key","thinkrank")),(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-gap-1.5 tr-text-xs tr-font-medium tr-px-2 tr-py-1 tr-rounded-full tr-bg-success-bg tr-text-success"},(0,a.createElement)("span",{className:"tr-w-1.5 tr-h-1.5 tr-rounded-full tr-bg-success"}),(0,n.__)("Configured","thinkrank"))))),(0,a.createElement)(N.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,n.__)("Get an API key","thinkrank")),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-mt-1 tr-mb-0"},(0,n.__)("Sign in to your provider and create a key.","thinkrank"))),(0,a.createElement)("ul",{className:"tr-m-0 tr-p-0 tr-list-none"},s.map(e=>(0,a.createElement)("li",{key:e.id,className:"tr-border-b tr-border-secondary last:tr-border-b-0"},(0,a.createElement)("a",{href:l[e.id].url,target:"_blank",rel:"noopener noreferrer",className:"tr-flex tr-items-center tr-gap-3 tr-px-5 tr-py-3 tr-no-underline hover:tr-bg-white tr-text-secondary"},(0,a.createElement)("span",{className:"tr-w-8 tr-h-8 tr-rounded-md tr-bg-brand-bg tr-flex tr-items-center tr-justify-center tr-shrink-0"},e.icon),(0,a.createElement)("span",{className:"tr-min-w-0 tr-flex-1"},(0,a.createElement)("span",{className:"tr-block tr-text-sm tr-font-medium tr-text-primary"},e.label),(0,a.createElement)("span",{className:"tr-block tr-text-xs tr-text-tertiary tr-truncate"},l[e.id].label)),(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-tertiary tr-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14 5l7 7m0 0l-7 7m7-7H3"}))))))),(0,a.createElement)(N.Zp,null,(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2 tr-mb-3"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-7 tr-h-7 tr-rounded-md tr-bg-brand-bg tr-text-brand tr-shrink-0"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"}))),(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,n.__)("Why your own key?","thinkrank"))),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-0 tr-list-none tr-flex tr-flex-col tr-gap-2.5"},[(0,n.__)("Pay your AI provider directly, with no markup.","thinkrank"),(0,n.__)("Unlimited generations at provider rates.","thinkrank"),(0,n.__)("Encrypted at rest and stored only on your site.","thinkrank"),(0,n.__)("Switch providers anytime without losing data.","thinkrank")].map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-flex tr-items-start tr-gap-2 tr-text-sm tr-text-secondary tr-leading-snug"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-success tr-shrink-0 tr-mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M5 13l4 4L19 7"})),(0,a.createElement)("span",null,e))))),(0,a.createElement)(N.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,n.__)("Need help?","thinkrank"))),(0,a.createElement)("ul",{className:"tr-m-0 tr-p-0 tr-list-none"},J.map(e=>(0,a.createElement)("li",{key:e.href,className:"tr-border-b tr-border-secondary last:tr-border-b-0"},(0,a.createElement)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"tr-flex tr-items-center tr-gap-3 tr-px-5 tr-py-3 tr-no-underline hover:tr-bg-white tr-text-secondary"},(0,a.createElement)("span",{className:"tr-min-w-0 tr-flex-1"},(0,a.createElement)("span",{className:"tr-block tr-text-sm tr-font-medium tr-text-primary"},e.label),(0,a.createElement)("span",{className:"tr-block tr-text-xs tr-text-tertiary tr-truncate"},e.desc)),(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-tertiary tr-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14 5l7 7m0 0l-7 7m7-7H3"})))))))),K=()=>{const[e,t]=(0,i.useState)(""),[r,s]=(0,i.useState)(""),[o,d]=(0,i.useState)(""),[h,p]=(0,i.useState)(I),[k,y]=(0,i.useState)(E),[x,D]=(0,i.useState)(z),[J,K]=(0,i.useState)(T),[q,ee]=(0,i.useState)(""),[te,re]=(0,i.useState)(""),[ae,ne]=(0,i.useState)(120),[ie,se]=(0,i.useState)(!1),[le,oe]=(0,i.useState)(!1),[ce,de]=(0,i.useState)(""),[ge,Me]=(0,i.useState)([]),ue=(0,i.useRef)(""),[me,Ne]=(0,i.useState)(!1),[he,pe]=(0,i.useState)(!1),[ke,ye]=(0,i.useState)(!1),[xe,De]=(0,i.useState)(!0),[je,Ie]=(0,i.useState)(!1),[Ee,ze]=(0,i.useState)(null),[Te,fe]=(0,i.useState)(!1),[_e,Ae]=(0,i.useState)(""),[we,be]=(0,i.useState)(!1),[Oe,ve]=(0,i.useState)(""),[Le,Se]=(0,i.useState)({}),[Ce,Qe]=(0,i.useState)(!1),[Ue,Ye]=(0,i.useState)(!1),[Pe,Re]=(0,i.useState)(!1),[Ze,Ve]=(0,i.useState)(!1),[Be,Ge]=(0,i.useState)(!1),[We,He]=(0,i.useState)(!1),[Fe,Je]=(0,i.useState)(!1),[Xe,$e]=(0,i.useState)(!1),[Ke,qe]=(0,i.useState)(!1),[et,tt]=(0,i.useState)(0),[rt,at]=(0,i.useState)(0),[nt,it]=(0,i.useState)(!1),[st,lt]=(0,i.useState)(!1),[ot,ct]=(0,i.useState)(null),[dt,gt]=(0,i.useState)(null),[Mt,ut]=(0,i.useState)(!1),[mt,Nt]=(0,i.useState)(!1),ht=(0,i.useRef)(!1),pt=(0,i.useRef)(!0);(0,i.useEffect)(()=>()=>{pt.current=!1},[]);const[kt,yt]=(0,i.useState)(W);(0,i.useEffect)(()=>{try{const e=new URLSearchParams(window.location.search).get("tab"),t=V.includes(e)?e:W;yt(t),X(t)}catch(e){}},[]);const xt=(0,i.useCallback)(e=>{yt(e),X(e)},[]);(0,i.useEffect)(()=>{"import-export"!==kt||ht.current||(ht.current=!0,ut(!0),Nt(!1),l()({path:"/thinkrank/v1/import/detect"}).then(e=>{pt.current&>(e?.native||{counts:{},total:0})}).catch(e=>{pt.current&&(g.A.error("Failed to load export data counts",e),Nt(!0),ht.current=!1)}).finally(()=>{pt.current&&ut(!1)}))},[kt]);const Dt={openai:[{value:"gpt-5-nano",label:"GPT‑5‑nano (Default – fastest, lowest cost)"},{value:"gpt-5-mini",label:"GPT‑5‑mini (Balanced quality/cost)"},{value:"gpt-5",label:"GPT‑5 (Highest quality)"},{value:"gpt-4o",label:"GPT‑4o (Legacy)"}],claude:[{value:"claude-sonnet-5",label:"Claude Sonnet 5 (Recommended)"},{value:"claude-opus-5",label:"Claude Opus 5 (Most Capable)"},{value:"claude-opus-4-8",label:"Claude Opus 4.8"},{value:"claude-haiku-4-5",label:"Claude Haiku 4.5 (Fast)"}],gemini:[{value:"gemini-3.5-flash",label:"Gemini 3.5 Flash (Recommended)"},{value:"gemini-3.1-flash-lite",label:"Gemini 3.1 Flash Lite (Fastest)"},{value:"gemini-3.1-pro-preview",label:"Gemini 3.1 Pro (Preview)"}],openrouter:[{value:"openai/gpt-4o-mini",label:"GPT‑4o mini (Default – fast, low cost)"},{value:"anthropic/claude-sonnet-5",label:"Claude Sonnet 5"},{value:"google/gemini-3.5-flash",label:"Gemini 3.5 Flash"},{value:"meta-llama/llama-3.3-70b-instruct",label:"Llama 3.3 70B Instruct"},{value:"deepseek/deepseek-chat",label:"DeepSeek Chat"}]},jt=(e,t)=>(Dt[e]||[]).some(e=>e.value===t),[It,Et]=(0,i.useState)(!1);(0,i.useEffect)(()=>{_t(),At()},[]);const[zt,Tt]=(0,i.useState)(null);(0,i.useEffect)(()=>{if(It&&r&&null!==zt){if(zt!==r){t(""),Qe(!1),fe(Boolean(Le[r])),ve(Le[r]||""),"openai"===r?d(h):"claude"===r?d(k):"gemini"===r?d(x):"openrouter"===r?d(J):r===G&&d(q);const e="claude"===r?k:"gemini"===r?x:"openrouter"===r?J:r===G?q:h;pe(r!==G&&!!e&&!jt(r,e)),ze(null),Tt(r)}}else Tt(r)},[r,Le,It,zt,h,k,x,J,q]);const ft=(e,t)=>{if(!e||!e.trim())return{valid:!0,message:""};if(t===G)return{valid:!0,message:""};if("openai"===t){if(!e.startsWith("sk-"))return{valid:!1,message:(0,n.__)('OpenAI API keys should start with "sk-"',"thinkrank")};if(e.length<20)return{valid:!1,message:(0,n.__)("OpenAI API key appears too short","thinkrank")}}else if("claude"===t){if(!e.startsWith("sk-ant-"))return{valid:!1,message:(0,n.__)('Claude API keys should start with "sk-ant-"',"thinkrank")};if(e.length<30)return{valid:!1,message:(0,n.__)("Claude API key appears too short","thinkrank")}}else if("gemini"===t){if(!e.startsWith("AIza")&&!e.startsWith("AQ."))return{valid:!1,message:(0,n.__)('Gemini API keys should start with "AIza" or "AQ."',"thinkrank")};if(e.length<30)return{valid:!1,message:(0,n.__)("Gemini API key appears too short","thinkrank")}}else if("openrouter"===t){if(!e.startsWith("sk-or-"))return{valid:!1,message:(0,n.__)('OpenRouter API keys should start with "sk-or-"',"thinkrank")};if(e.length<20)return{valid:!1,message:(0,n.__)("OpenRouter API key appears too short","thinkrank")}}return{valid:!0,message:""}},_t=async()=>{De(!0);try{const e=await l()({path:"/thinkrank/v1/settings"}),r=e.success?e.data:e;if(r){const e=r.ai_provider||"",a={};B.forEach(e=>{const t=r[`${e}_api_key`]||"";a[e]=t.includes("••••")?t:""}),Se(a);const i=r[`${e}_api_key`]||"",l=i&&i.includes("••••");fe(l),Ae(e),be(l),ve(l?i:""),Qe(!1),t(l?"":i),s(e),Tt(e);const o=r.openai_model||I,c=r.claude_model||E,g=r.gemini_model||z,M=r.openrouter_model||T,u=r.openai_compatible_model||"";ee(u),re(r.openai_compatible_base_url||""),ne(Number(r.openai_compatible_timeout)||120),se(!!r.openai_compatible_supports_images),oe(!!r.openai_compatible_json_mode),de(Number(r.openai_compatible_price_per_million)>0?String(r.openai_compatible_price_per_million):""),p(o),y(c),D(g),K(M),d("claude"===e?c:"gemini"===e?g:"openrouter"===e?M:e===G?u:o);const m="claude"===e?c:"gemini"===e?g:"openrouter"===e?M:e===G?u:o;if(pe(e!==G&&!!m&&!jt(e,m)),Re(!r.keep_data_on_uninstall),Ve(!!r.enable_migration_tools),Ge(!!r.enable_import_export),qe(!!r.ai_paused),tt(Number(r.ai_daily_request_limit)||0),at(Number(r.max_requests_per_minute)||0),e)if(e===G){const e=!r.openai_compatible_base_url||!r.openai_compatible_model;ze(e?{type:"warning",message:(0,n.__)("Add the base URL and model id of your OpenAI-compatible endpoint to enable AI features.","thinkrank")}:null)}else if(l)ze(null);else{const t=Y[e]||e;ze({type:"warning",message:(0,n.sprintf)(/* translators: %s: AI provider name (e.g. OpenAI, Claude). */ /* translators: %s: AI provider name (e.g. OpenAI, Claude). */ | |
| 137 | -(0,n.__)("No %s API key found. Please enter your API key to use this provider.","thinkrank"),t)})}else ze(null)}}catch(e){g.A.error("Failed to load settings:",e),ze({type:"error",message:(0,n.__)("Failed to load settings.","thinkrank")})}finally{De(!1),Et(!0)}},At=async()=>{try{const e=await l()({path:"/thinkrank/v1/ai/status"});pt.current&&ct(e?.budget||null)}catch(e){g.A.error("Failed to load AI budget status:",e)}},wt=Y[r]||r,bt=r===G?(0,n.__)("API key (optional)","thinkrank"):`${wt} ${(0,n.__)("API Key","thinkrank")}`,Ot=Te?(0,n.__)("Enter new API key to update…","thinkrank"):{openai:"sk-…",claude:"sk-ant-…",gemini:"AQ.… or AIza…",openrouter:"sk-or-…"}[r]||"",vt=[{id:"openai",label:"OpenAI",sub:"OpenAI API",icon:(0,a.createElement)(S,null)},{id:"claude",label:"Anthropic",sub:"Claude models",icon:(0,a.createElement)(C,null)},{id:"gemini",label:"Gemini",sub:"Google AI",icon:(0,a.createElement)(R,null)},{id:"openrouter",label:"OpenRouter",sub:"Unified API",icon:(0,a.createElement)(Q,null)},{id:G,label:(0,n.__)("Custom endpoint","thinkrank"),sub:(0,n.__)("Ollama, LM Studio, Azure…","thinkrank"),icon:(0,a.createElement)(U,null)}],Lt=[...Dt[r]||[],{value:P,label:(0,n.__)("Custom model…","thinkrank")}],St="claude"===r?k:"gemini"===r?x:"openrouter"===r?J:r===G?q:h,Ct=e=>{"claude"===r?y(e):"gemini"===r?D(e):"openrouter"===r?K(e):r===G?ee(e):p(e),d(e)};if(xe)return(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-1 xl:tr-grid-cols-3 tr-gap-6"},(0,a.createElement)("div",{className:"xl:tr-col-span-2 tr-flex tr-flex-col tr-gap-5"},(0,a.createElement)(N.u4,{lines:3}),(0,a.createElement)(N.u4,{lines:2})),(0,a.createElement)("aside",{className:"tr-flex tr-flex-col tr-gap-5"},(0,a.createElement)(N.u4,{lines:4})));const Qt=vt.find(e=>e.id===_e),Ut="claude"===_e?k:"gemini"===_e?x:"openrouter"===_e?J:_e===G?q:h,Yt={openai:{url:"https://platform.openai.com/api-keys",label:"platform.openai.com"},claude:{url:"https://console.anthropic.com/settings/keys",label:"console.anthropic.com"},gemini:{url:"https://aistudio.google.com/app/apikey",label:"aistudio.google.com"},openrouter:{url:"https://openrouter.ai/keys",label:"openrouter.ai"},[G]:{url:"https://ollama.com/download",label:(0,n.__)("ollama.com: run a model locally","thinkrank")}};return(0,a.createElement)("div",null,Ee&&(0,a.createElement)("div",{className:"tr-mb-5"},(0,a.createElement)(N.Fc,{variant:"error"===Ee.type?"error":"success"===Ee.type?"success":"warning"===Ee.type?"warning":"info",onDismiss:()=>ze(null)},(0,M.A)(Ee.message))),(0,a.createElement)(m.A,{tabs:Z,activeTab:kt,onTabChange:xt,className:"tr-mb-6"}),(0,a.createElement)(m.K,{tabId:"ai-provider",activeTab:kt},(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-1 xl:tr-grid-cols-3 tr-gap-6"},(0,a.createElement)("div",{className:"xl:tr-col-span-2 tr-flex tr-flex-col tr-gap-5"},(0,a.createElement)(N.Zp,null,(0,a.createElement)("div",{className:"tr-mb-6"},(0,a.createElement)("p",{className:"tr-text-sm tr-font-medium tr-text-secondary tr-mt-0 tr-mb-2.5"},(0,n.__)("Choose provider","thinkrank")),(0,a.createElement)("div",{role:"radiogroup","aria-label":(0,n.__)("AI provider","thinkrank"),className:"tr-grid tr-grid-cols-2 sm:tr-grid-cols-4 tr-gap-3"},vt.map(e=>{const t=r===e.id,i=_e===e.id&&(we||e.id===G);return(0,a.createElement)("button",{key:e.id,type:"button",role:"radio","aria-checked":t,onClick:()=>{s(e.id),Ye(!1)},style:{WebkitTapHighlightColor:"transparent"},className:c()("tr-relative tr-flex tr-flex-col tr-items-center tr-justify-center tr-gap-2 tr-px-3 tr-py-4 tr-rounded-lg tr-border-[1.5px] tr-cursor-pointer tr-transition-colors tr-duration-200 focus:tr-outline-none",t?"tr-border-brand tr-bg-brand-bg":"tr-border-secondary tr-bg-white hover:tr-border-tertiary hover:tr-bg-line-2")},(0,a.createElement)("span",{className:c()("tr-absolute tr-top-2 tr-right-2 tr-flex tr-items-center tr-justify-center tr-w-4 tr-h-4 tr-rounded-full tr-bg-brand tr-text-white tr-transition-opacity tr-duration-200",t?"tr-opacity-100":"tr-opacity-0"),"aria-hidden":"true"},(0,a.createElement)("svg",{className:"tr-w-2.5 tr-h-2.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"}))),(0,a.createElement)("span",{className:c()("tr-h-7 tr-flex tr-items-center tr-justify-center tr-text-2xl tr-transition-colors tr-duration-200",t?"tr-text-brand":"tr-text-secondary")},e.icon),(0,a.createElement)("span",{className:c()("tr-text-sm tr-font-semibold tr-transition-colors tr-duration-200",t?"tr-text-brand":"tr-text-primary")},e.label),i&&(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-gap-1 tr-text-[10px] tr-font-semibold tr-uppercase tr-tracking-wide tr-leading-none tr-text-success"},(0,a.createElement)("span",{className:"tr-w-1.5 tr-h-1.5 tr-rounded-full tr-bg-success"}),(0,n.__)("Active","thinkrank")))}))),r?(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-4"},r===G&&(0,a.createElement)(N.pd,{label:(0,n.__)("Endpoint base URL","thinkrank"),value:te,onChange:e=>{re(e.target.value),ue.current&&ue.current!==e.target.value.trim()&&(ue.current="",Me([]))},placeholder:"http://localhost:11434/v1",description:(0,n.__)("The OpenAI-compatible base URL, ending in /v1. Plain http:// is accepted for localhost and private addresses; anything public must use https:// so your key is never sent in the clear.","thinkrank")}),Te&&!Ce?(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1.5"},(0,a.createElement)("span",{className:"tr-text-sm tr-font-medium tr-text-secondary"},bt),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2"},(0,a.createElement)("div",{className:"tr-flex tr-flex-1 tr-items-center tr-gap-2 tr-h-10 tr-px-3 tr-rounded-md tr-border-[1.5px] tr-border-secondary tr-bg-white tr-min-w-0"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-tertiary tr-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})),(0,a.createElement)("code",{className:"tr-bg-transparent tr-p-0 tr-text-sm tr-text-primary tr-font-mono tr-tracking-wide tr-truncate"},Oe),(0,a.createElement)("span",{className:"tr-ml-auto tr-inline-flex tr-items-center tr-gap-1 tr-text-xs tr-font-medium tr-text-success tr-shrink-0"},(0,a.createElement)("span",{className:"tr-w-1.5 tr-h-1.5 tr-rounded-full tr-bg-success"}),(0,n.__)("Connected","thinkrank"))),(0,a.createElement)(N.$n,{variant:"secondary",onClick:()=>{Qe(!0),t(""),Ye(!1)},disabled:ke||je},(0,n.__)("Replace","thinkrank"))),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0"},(0,n.__)("Masked preview of your saved key. Choose Replace to enter a new one.","thinkrank"))):(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1.5"},(0,a.createElement)("label",{htmlFor:"tr-provider-api-key",className:"tr-text-sm tr-font-medium tr-text-secondary"},bt),(0,a.createElement)("div",{className:"tr-relative tr-flex tr-items-center"},(0,a.createElement)("input",{id:"tr-provider-api-key",type:"text",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,"data-lpignore":"true","data-1p-ignore":"true",value:e,onChange:e=>t(e.target.value),placeholder:Ot,className:"tr-w-full tr-h-10 tr-rounded-md tr-bg-white tr-text-sm tr-text-primary tr-border-[1.5px] tr-border-primary tr-transition-colors tr-duration-150 placeholder:tr-text-tertiary hover:tr-border-[#A9AEC0] focus:tr-outline-none focus-visible:tr-border-brand tr-pl-3 tr-pr-10",style:Ue?void 0:{WebkitTextSecurity:"disc"}}),(0,a.createElement)("button",{type:"button",onClick:()=>Ye(e=>!e),className:"tr-absolute tr-right-2 tr-flex tr-items-center tr-justify-center tr-w-7 tr-h-7 tr-p-0 tr-bg-transparent tr-border-0 tr-cursor-pointer tr-text-tertiary hover:tr-text-secondary","aria-label":Ue?(0,n.__)("Hide API key","thinkrank"):(0,n.__)("Show API key","thinkrank"),"aria-pressed":Ue},Ue?(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.542-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.542 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})):(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})))),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0"},Te?(0,n.__)("Enter a new key to replace the saved one.","thinkrank"):r===G?(0,n.__)("Leave empty for a local server that needs no key. Anything you enter is encrypted and sent only to the URL above.","thinkrank"):(0,n.__)("Encrypted and stored securely. You pay the provider directly.","thinkrank")),Te&&Ce&&(0,a.createElement)("button",{type:"button",onClick:()=>{Qe(!1),t(""),Ye(!1)},className:"tr-self-start tr-text-xs tr-text-brand tr-bg-transparent tr-border-0 tr-p-0 tr-cursor-pointer hover:tr-underline"},(0,n.__)("Cancel and keep current key","thinkrank"))),r===G?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-2"},(0,a.createElement)(N.pd,{label:(0,n.__)("Model id","thinkrank"),value:q,onChange:e=>ee(e.target.value),placeholder:"llama3.1",list:"thinkrank-endpoint-models",description:(0,n.__)("The exact model id this server serves, as it appears in its own model list.","thinkrank")}),ge.length>0&&(0,a.createElement)("datalist",{id:"thinkrank-endpoint-models"},ge.map(e=>(0,a.createElement)("option",{key:e,value:e}))),(0,a.createElement)(N.$n,{variant:"secondary",size:"sm",onClick:async()=>{const t=te.trim();if(t){Ne(!0);try{const r=await l()({path:"/thinkrank/v1/ai/models",method:"POST",data:{base_url:t,...e.trim()?{api_key:e.trim()}:{}}});if(te.trim()!==t)return;const a=r?.models||[];ue.current=t,Me(a),u.A.success(r?.truncated?(0,n.sprintf)(/* translators: %d: number of models listed, after the plugin's cap. */ /* translators: %d: number of models listed, after the plugin's cap. */ | |
| 138 | +(0,i.__)("Page %1$s of %2$s","thinkrank"),I,w)),(0,a.createElement)(s.$n,{variant:"secondary",size:"sm",onClick:()=>E(e=>Math.min(e+1,w)),disabled:I===w},(0,i.__)("Next","thinkrank")))),(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 "+(z?"tr-border-b tr-border-secondary":"")},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between"},(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,i.__)("Response Code Help","thinkrank")),(0,a.createElement)("button",{onClick:()=>T(!z),className:"tr-flex tr-items-center tr-gap-1 tr-text-sm tr-text-tertiary tr-bg-transparent tr-border-0 tr-cursor-pointer tr-p-1",style:{background:"none"},"aria-label":z?(0,i.__)("Collapse Help","thinkrank"):(0,i.__)("Expand Help","thinkrank")},z?(0,a.createElement)(N,null):(0,a.createElement)(m,null)))),z&&(0,a.createElement)("div",{className:"tr-overflow-x-auto"},(0,a.createElement)("table",{className:"tr-w-full tr-text-sm tr-border-collapse"},(0,a.createElement)("thead",null,(0,a.createElement)("tr",{className:"tr-bg-[#FAFBFC] tr-border-b tr-border-secondary"},(0,a.createElement)("th",{className:"tr-text-left tr-px-4 tr-py-3 tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide"},(0,i.__)("Response Code","thinkrank")),(0,a.createElement)("th",{className:"tr-text-left tr-px-4 tr-py-3 tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide"},(0,i.__)("Response Message","thinkrank")),(0,a.createElement)("th",{className:"tr-text-left tr-px-4 tr-py-3 tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide"},(0,i.__)("Reasons","thinkrank")))),(0,a.createElement)("tbody",null,k.map(e=>(0,a.createElement)("tr",{key:e.code,className:"tr-border-b tr-border-secondary last:tr-border-b-0"},(0,a.createElement)("td",{className:"tr-px-4 tr-py-3 tr-font-mono tr-font-semibold tr-text-secondary"},e.code),(0,a.createElement)("td",{className:"tr-px-4 tr-py-3 tr-text-secondary"},e.message),(0,a.createElement)("td",{className:"tr-px-4 tr-py-3 tr-text-tertiary"},e.reason))))))))))}},84242:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z"}))},84316:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"}))},84510:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 9.484h-8.889v-1.5H20v1.5Zm0 7h-4.889v-1.5H20v1.5Zm-14 .032a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"}),(0,a.createElement)(n.Path,{d:"M13 15.516a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 8.484a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"}))},85063:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"}))},85161:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(51609),n=r(27723),i=r(97500),s=r.n(i),l=r(49323);const o=({title:e,enabled:t=!0,onToggle:r,toggleLabel:i,toggleBusy:o=!1,optimizationButtons:c=[],notice:d,onNoticeRemove:g,children:M,className:u="",showDisabledWarning:m=!0,disabledWarningMessage:N,size:h,...p})=>(0,a.createElement)("div",{className:s()("tr-bg-white tr-rounded-lg tr-border tr-border-secondary tr-overflow-hidden",u),...p},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-gap-4 tr-px-6 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("div",{className:"tr-min-w-0 tr-flex-1"},"string"==typeof e?(0,a.createElement)("h2",{className:"tr-m-0 tr-text-sm tr-font-semibold tr-text-primary tr-leading-snug"},e):e),(r||c.length>0)&&(0,a.createElement)("div",{className:"tr-flex tr-shrink-0 tr-items-center tr-gap-3"},r&&(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2"},o&&(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},(0,n.__)("Saving…","thinkrank")),(0,a.createElement)(l.lM,{checked:t,onChange:r,disabled:o,label:i||(0,n.__)("Enable","thinkrank")})),c.map((e,t)=>(0,a.createElement)("div",{key:t},e)))),(0,a.createElement)("div",{className:"tr-p-6 tr-flex tr-flex-col tr-gap-4"},!t&&m&&(0,a.createElement)(l.Fc,{variant:"warning"},N||(0,n.__)("This feature is disabled. Enable it to access configuration options.","thinkrank")),d&&(0,a.createElement)(l.Fc,{variant:"error"===d.status?"error":"success"===d.status?"success":"warning"===d.status?"warning":"info",onDismiss:g},d.message),M))},85380:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z"}))},85657:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(n.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"}))},85770:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(51609),n=r(97500),i=r.n(n),s=r(49323);function l({title:e,description:t,trailing:r,withBorder:n=!0,className:l}){return(0,a.createElement)("div",{className:i()("tr-px-6 tr-pt-5 tr-pb-4",n&&"tr-border-b tr-border-secondary",l)},(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-justify-between tr-gap-4"},(0,a.createElement)(s.mc,{direction:"column",gap:1,className:"tr-min-w-0 tr-flex-1"},e&&(0,a.createElement)(s.hE,{tag:"h3",size:"sm"},e),t&&(0,a.createElement)(s.EY,{size:14,color:"secondary"},t)),r&&(0,a.createElement)("div",{className:"tr-flex tr-shrink-0 tr-items-center tr-pt-0.5"},r)))}},85874:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var a=r(51609),n=r(27723),i=r(49323);const s=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("polyline",{points:"20 6 9 17 4 12"})),l=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,a.createElement)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),o=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),(0,a.createElement)("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),(0,a.createElement)("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})),c=()=>(0,a.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"},(0,a.createElement)("circle",{cx:"12",cy:"12",r:"10"}),(0,a.createElement)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,a.createElement)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})),d=({validationResults:e,isValidating:t,onValidate:r,settings:d,fileStatus:g})=>{const M=({label:e,detail:t})=>(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-2 tr-px-3 tr-py-2 tr-rounded tr-text-xs tr-bg-success-bg tr-text-success"},(0,a.createElement)("span",{className:"tr-shrink-0 tr-mt-px"},(0,a.createElement)(s,null)),(0,a.createElement)("span",null,(0,a.createElement)("strong",null,e),t?`: ${t}`:"")),u=({label:e,detail:t})=>(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-2 tr-px-3 tr-py-2 tr-rounded tr-text-xs tr-bg-warning-bg tr-text-warning"},(0,a.createElement)("span",{className:"tr-shrink-0 tr-mt-px"},(0,a.createElement)(o,null)),(0,a.createElement)("span",null,(0,a.createElement)("strong",null,e),t?`: ${t}`:"")),m=({label:e,detail:t})=>(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-2 tr-px-3 tr-py-2 tr-rounded tr-text-xs tr-bg-danger-bg tr-text-danger"},(0,a.createElement)("span",{className:"tr-shrink-0 tr-mt-px"},(0,a.createElement)(l,null)),(0,a.createElement)("span",null,(0,a.createElement)("strong",null,e),t?`: ${t}`:""));return(0,a.createElement)(i.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary tr-flex tr-items-center tr-justify-between"},(0,a.createElement)("h3",{className:"tr-text-base tr-font-semibold tr-text-primary tr-m-0"},(0,n.__)("LLMs.txt Validation","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-3"},e&&(e.valid?(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-gap-1.5 tr-text-xs tr-font-medium tr-px-2.5 tr-py-1 tr-rounded-full tr-border tr-bg-success-bg tr-border-success tr-text-success"},(0,a.createElement)(s,null),(0,n.__)("Valid","thinkrank")):(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-gap-1.5 tr-text-xs tr-font-medium tr-px-2.5 tr-py-1 tr-rounded-full tr-border tr-bg-danger-bg tr-border-danger tr-text-danger"},(0,a.createElement)(l,null),(0,n.__)("Invalid","thinkrank"))),e&&void 0!==e.score&&(e=>{let t="tr-bg-success",r=(0,n.__)("Excellent","thinkrank");return e<60?(t="tr-bg-danger",r=(0,n.__)("Poor","thinkrank")):e<80&&(t="tr-bg-warning",r=(0,n.__)("Good","thinkrank")),(0,a.createElement)("span",{className:`tr-text-xs tr-font-bold tr-px-2 tr-py-1 tr-rounded tr-text-white ${t}`},e,"/100 · ",r)})(e.score),(0,a.createElement)(i.$n,{variant:"secondary",size:"sm",onClick:r,disabled:t||!d.enabled,loading:t},t?(0,n.__)("Validating…","thinkrank"):(0,n.__)("Validate Configuration","thinkrank")))),(0,a.createElement)("div",{className:"tr-p-5 tr-flex tr-flex-col tr-gap-5"},!d.enabled&&(0,a.createElement)(i.Fc,{variant:"warning"},(0,n.__)("LLMs.txt is disabled. Enable it to run validation.","thinkrank")),e?(e=>{const t=e.errors&&e.errors.length>0,r=e.warnings&&e.warnings.length>0,i=(e.suggestions||[]).filter(e=>e.startsWith("✓")),d=(e.suggestions||[]).filter(e=>!e.startsWith("✓"));return(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-3"},t?(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1"},(0,a.createElement)(m,{label:(0,n.__)("Required Fields","thinkrank"),detail:`${e.errors.length} ${(0,n.__)("missing","thinkrank")}`}),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1 tr-pl-4"},e.errors.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-flex tr-items-start tr-gap-2 tr-px-3 tr-py-2 tr-rounded tr-text-xs tr-bg-danger-bg tr-text-danger"},(0,a.createElement)("span",{className:"tr-shrink-0 tr-mt-px"},(0,a.createElement)(l,null)),(0,a.createElement)("span",null,e))))):(0,a.createElement)(M,{label:(0,n.__)("Required Fields","thinkrank"),detail:(0,n.__)("Complete","thinkrank")}),r?(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1"},(0,a.createElement)(u,{label:(0,n.__)("Content Quality","thinkrank"),detail:`${e.warnings.length} ${(0,n.__)("improvements","thinkrank")}`}),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1 tr-pl-4"},e.warnings.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-flex tr-items-start tr-gap-2 tr-px-3 tr-py-2 tr-rounded tr-text-xs tr-bg-warning-bg tr-text-warning"},(0,a.createElement)("span",{className:"tr-shrink-0 tr-mt-px"},(0,a.createElement)(o,null)),(0,a.createElement)("span",null,e))))):(0,a.createElement)(M,{label:(0,n.__)("Content Quality","thinkrank"),detail:(0,n.__)("Optimized","thinkrank")}),g?.writable?(0,a.createElement)(M,{label:(0,n.__)("File Permissions","thinkrank"),detail:(0,n.__)("Writable","thinkrank")}):(0,a.createElement)(m,{label:(0,n.__)("File Permissions","thinkrank"),detail:(0,n.__)("Not writable","thinkrank")}),(0,a.createElement)(M,{label:(0,n.__)("LLMs.txt Standards","thinkrank"),detail:(0,n.__)("Compliant","thinkrank")}),i.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide tr-m-0 tr-mb-2"},(0,n.__)("Configuration Status","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1"},i.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-flex tr-items-start tr-gap-2 tr-px-3 tr-py-2 tr-rounded tr-text-xs tr-bg-success-bg tr-text-success"},(0,a.createElement)("span",{className:"tr-shrink-0 tr-mt-px"},(0,a.createElement)(s,null)),(0,a.createElement)("span",null,e))))),d.length>0&&(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"tr-text-xs tr-font-semibold tr-text-secondary tr-uppercase tr-tracking-wide tr-m-0 tr-mb-2"},(0,n.__)("Suggestions for Improvement","thinkrank")),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1"},d.map((e,t)=>(0,a.createElement)("div",{key:t,className:"tr-flex tr-items-start tr-gap-2 tr-px-3 tr-py-2 tr-rounded tr-text-xs tr-bg-brand-bg tr-text-brand"},(0,a.createElement)("span",{className:"tr-shrink-0 tr-mt-px"},(0,a.createElement)(c,null)),(0,a.createElement)("span",null,e))))))})(e):(0,a.createElement)("div",{className:"tr-bg-white tr-border tr-border-secondary tr-rounded tr-p-4 tr-text-sm tr-text-tertiary"},(0,n.__)('Click "Validate Configuration" to check your LLMs.txt setup for errors and optimization opportunities.',"thinkrank"))))}},85962:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M5 13.5h3v-3H5v3zm5 0h3v-3h-3v3zM17 9l-1 1 2 2-2 2 1 1 3-3-3-3z"}))},86087:e=>{"use strict";e.exports=window.wp.element},86261:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M5 17.7c.4.5.8.9 1.2 1.2l1.1-1.4c-.4-.3-.7-.6-1-1L5 17.7zM5 6.3l1.4 1.1c.3-.4.6-.7 1-1L6.3 5c-.5.4-.9.8-1.3 1.3zm.1 7.8l-1.7.5c.2.6.4 1.1.7 1.6l1.5-.8c-.2-.4-.4-.8-.5-1.3zM4.8 12v-.7L3 11.1v1.8l1.7-.2c.1-.2.1-.5.1-.7zm3 7.9c.5.3 1.1.5 1.6.7l.5-1.7c-.5-.1-.9-.3-1.3-.5l-.8 1.5zM19 6.3c-.4-.5-.8-.9-1.2-1.2l-1.1 1.4c.4.3.7.6 1 1L19 6.3zm-.1 3.6l1.7-.5c-.2-.6-.4-1.1-.7-1.6l-1.5.8c.2.4.4.8.5 1.3zM5.6 8.6l-1.5-.8c-.3.5-.5 1-.7 1.6l1.7.5c.1-.5.3-.9.5-1.3zm2.2-4.5l.8 1.5c.4-.2.8-.4 1.3-.5l-.5-1.7c-.6.2-1.1.4-1.6.7zm8.8 13.5l1.1 1.4c.5-.4.9-.8 1.2-1.2l-1.4-1.1c-.2.3-.5.6-.9.9zm1.8-2.2l1.5.8c.3-.5.5-1.1.7-1.6l-1.7-.5c-.1.5-.3.9-.5 1.3zm2.6-4.3l-1.7.2v1.4l1.7.2V12v-.9zM11.1 3l.2 1.7h1.4l.2-1.7h-1.8zm3 2.1c.5.1.9.3 1.3.5l.8-1.5c-.5-.3-1.1-.5-1.6-.7l-.5 1.7zM12 19.2h-.7l-.2 1.8h1.8l-.2-1.7c-.2-.1-.5-.1-.7-.1zm2.1-.3l.5 1.7c.6-.2 1.1-.4 1.6-.7l-.8-1.5c-.4.2-.8.4-1.3.5z"}))},86529:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M4 13.5h6v-3H4v3zm8.2-2.5.8-.3V14h1V9.3l-2.2.7.4 1zm7.1-1.2c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3-.1-.8-.3-1.1z"}))},86931:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"}))},87298:(e,t,r)=>{"use strict";r.d(t,{A:()=>X});var a=r(51609),n=r(27723),i=r(86087),s=r(1455),l=r.n(s),o=r(97500),c=r.n(o),d=r(99714),g=r(60775),M=r(43526),u=r(94240),m=r(73131),N=r(49323),h=r(78216),p=r(76418),k=r(63426),y=r(9447),x=r(3800),D=r(90751),j=r(30012);const I="gpt-5-nano",E="claude-sonnet-5",z="gemini-3.5-flash",T="openai/gpt-4o-mini",f=[{slug:"yoast",name:"Yoast SEO",logo:h,detail:(0,n.__)("Titles, meta, canonicals, social & redirects","thinkrank")},{slug:"rankmath",name:"Rank Math",logo:p,detail:(0,n.__)("Titles, meta, schema, redirects & 404 logs","thinkrank")},{slug:"seopress",name:"SEOPress",logo:y.A,detail:(0,n.__)("Titles, meta, social & redirects","thinkrank")},{slug:"aioseo",name:"All in One SEO",logo:k,detail:(0,n.__)("Titles, meta, settings & redirects","thinkrank")},{slug:"squirrly",name:"Squirrly SEO",logo:x.A,detail:(0,n.__)("Titles, meta, social, patterns & redirects","thinkrank")},{slug:"slimseo",name:"Slim SEO",logo:D.A,detail:(0,n.__)("Titles, meta, social, redirects & 404 logs","thinkrank")}],_=[{type:"postmeta",name:(0,n.__)("Post SEO data","thinkrank"),detail:(0,n.__)("Titles, descriptions, keywords, robots, social","thinkrank")},{type:"termmeta",name:(0,n.__)("Category & tag SEO data","thinkrank"),detail:(0,n.__)("Titles and descriptions for terms","thinkrank")},{type:"usermeta",name:(0,n.__)("Author SEO data","thinkrank"),detail:(0,n.__)("Author archive titles and descriptions","thinkrank")},{type:"settings",name:(0,n.__)("Settings","thinkrank"),detail:(0,n.__)("Every ThinkRank setting except API keys","thinkrank"),countless:!0}],A=()=>(0,a.createElement)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},(0,a.createElement)("polyline",{points:"17 1 21 5 17 9"}),(0,a.createElement)("path",{d:"M3 11V9a4 4 0 0 1 4-4h14"}),(0,a.createElement)("polyline",{points:"7 23 3 19 7 15"}),(0,a.createElement)("path",{d:"M21 13v2a4 4 0 0 1-4 4H3"})),w=()=>(0,a.createElement)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},(0,a.createElement)("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),(0,a.createElement)("path",{d:"M3 5v6a9 3 0 0 0 18 0V5"}),(0,a.createElement)("path",{d:"M3 11v6a9 3 0 0 0 18 0v-6"})),b=()=>(0,a.createElement)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},(0,a.createElement)("path",{d:"M12 14 15.5 9"}),(0,a.createElement)("path",{d:"M3.5 18a9 9 0 1 1 17 0"}),(0,a.createElement)("circle",{cx:"12",cy:"18",r:"1.5"})),O=()=>(0,a.createElement)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},(0,a.createElement)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,a.createElement)("polyline",{points:"17 8 12 3 7 8"}),(0,a.createElement)("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),v=()=>(0,a.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"tr-shrink-0"},(0,a.createElement)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,a.createElement)("polyline",{points:"12 5 19 12 12 19"})),L=()=>(0,a.createElement)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"tr-shrink-0"},(0,a.createElement)("polyline",{points:"20 6 9 17 4 12"})),S=()=>(0,a.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},(0,a.createElement)("path",{d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})),C=()=>(0,a.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},(0,a.createElement)("path",{d:"M13.827 3.52h3.603L24 20.48h-3.603l-6.57-16.96zm-7.258 0h3.767l6.57 16.96H13.24l-1.343-3.484H5.017l-1.344 3.484H0l6.57-16.96zm4.132 10.226L8.492 7.717l-2.21 6.03h4.42z",fillRule:"nonzero"})),Q=()=>(0,a.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)("title",null,"OpenRouter"),(0,a.createElement)("path",{d:"M3 7h6l3 5 3-5h6"}),(0,a.createElement)("path",{d:"M3 17h6l3-5"}),(0,a.createElement)("polyline",{points:"18 4 21 7 18 10"}),(0,a.createElement)("polyline",{points:"18 14 21 17 18 20"})),U=()=>(0,a.createElement)("svg",{height:"1em",width:"1em",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",style:{flex:"none",lineHeight:1},xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)("title",null,(0,n.__)("OpenAI-compatible endpoint","thinkrank")),(0,a.createElement)("rect",{x:"3",y:"4",width:"18",height:"6",rx:"1.5"}),(0,a.createElement)("rect",{x:"3",y:"14",width:"18",height:"6",rx:"1.5"}),(0,a.createElement)("path",{d:"M7 7h.01M7 17h.01"})),Y={openai:"OpenAI",claude:"Anthropic",gemini:"Gemini",openrouter:"OpenRouter",openai_compatible:"OpenAI-compatible endpoint"},P="__custom__",R=()=>(0,a.createElement)("svg",{height:"1em",style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)("title",null,"Gemini"),(0,a.createElement)("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"#3186FF"}),(0,a.createElement)("defs",null,(0,a.createElement)("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-0",x1:"7",x2:"11",y1:"15.5",y2:"12"},(0,a.createElement)("stop",{stopColor:"#08B962"}),(0,a.createElement)("stop",{offset:"1",stopColor:"#08B962",stopOpacity:"0"})),(0,a.createElement)("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-1",x1:"8",x2:"11.5",y1:"5.5",y2:"11"},(0,a.createElement)("stop",{stopColor:"#F94543"}),(0,a.createElement)("stop",{offset:"1",stopColor:"#F94543",stopOpacity:"0"})),(0,a.createElement)("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-2",x1:"3.5",x2:"17.5",y1:"13.5",y2:"12"},(0,a.createElement)("stop",{stopColor:"#FABC12"}),(0,a.createElement)("stop",{offset:".46",stopColor:"#FABC12",stopOpacity:"0"})))),Z=[{id:"ai-provider",label:(0,n.__)("AI Provider","thinkrank")},{id:"data-management",label:(0,n.__)("Data Management","thinkrank")},{id:"import-export",label:(0,n.__)("Import / Export","thinkrank")},{id:"migration-tools",label:(0,n.__)("Migration Tools","thinkrank")}],V=Z.map(e=>e.id),B=["openai","claude","gemini","openrouter","openai_compatible"],G="openai_compatible",W="ai-provider",H=[{label:(0,n.__)("Documentation","thinkrank"),desc:(0,n.__)("Setup guides and provider walkthroughs.","thinkrank"),href:"https://thinkrank.ai/docs/getting-started/connect-ai-provider/"},{label:(0,n.__)("Open a support ticket","thinkrank"),desc:(0,n.__)("Stuck connecting? Our team can help.","thinkrank"),href:"https://wpdeveloper.com/support/new-ticket/"}],F=e=>{try{const t=new URL(window.location.href);t.searchParams.set("tab",e),window.history.replaceState({},"",t.toString())}catch(e){}},J=({activeProvider:e,activeProviderId:t,activeModelState:r,activeHasKey:i,providers:s,providerKeyDocs:l})=>(0,a.createElement)("aside",{className:"tr-flex tr-flex-col tr-gap-5"},Boolean(t&&i)&&(0,a.createElement)(N.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,n.__)("Active configuration","thinkrank"))),(0,a.createElement)("div",{className:"tr-p-5 tr-flex tr-flex-col tr-gap-4"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-3"},(0,a.createElement)("span",{className:"tr-w-10 tr-h-10 tr-rounded-lg tr-bg-brand-bg tr-flex tr-items-center tr-justify-center tr-shrink-0"},e?.icon),(0,a.createElement)("div",{className:"tr-min-w-0"},(0,a.createElement)("p",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0 tr-truncate"},e?.label),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-mt-0.5 tr-mb-0 tr-truncate"},e?.sub))),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-text-sm tr-pt-1"},(0,a.createElement)("span",{className:"tr-text-tertiary"},(0,n.__)("Model","thinkrank")),(0,a.createElement)(d.A,{provider:t,model:r})),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-justify-between tr-text-sm"},(0,a.createElement)("span",{className:"tr-text-tertiary"},(0,n.__)("API key","thinkrank")),(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-gap-1.5 tr-text-xs tr-font-medium tr-px-2 tr-py-1 tr-rounded-full tr-bg-success-bg tr-text-success"},(0,a.createElement)("span",{className:"tr-w-1.5 tr-h-1.5 tr-rounded-full tr-bg-success"}),(0,n.__)("Configured","thinkrank"))))),(0,a.createElement)(N.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,n.__)("Get an API key","thinkrank")),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-mt-1 tr-mb-0"},(0,n.__)("Sign in to your provider and create a key.","thinkrank"))),(0,a.createElement)("ul",{className:"tr-m-0 tr-p-0 tr-list-none"},s.map(e=>(0,a.createElement)("li",{key:e.id,className:"tr-border-b tr-border-secondary last:tr-border-b-0"},(0,a.createElement)("a",{href:l[e.id].url,target:"_blank",rel:"noopener noreferrer",className:"tr-flex tr-items-center tr-gap-3 tr-px-5 tr-py-3 tr-no-underline hover:tr-bg-white tr-text-secondary"},(0,a.createElement)("span",{className:"tr-w-8 tr-h-8 tr-rounded-md tr-bg-brand-bg tr-flex tr-items-center tr-justify-center tr-shrink-0"},e.icon),(0,a.createElement)("span",{className:"tr-min-w-0 tr-flex-1"},(0,a.createElement)("span",{className:"tr-block tr-text-sm tr-font-medium tr-text-primary"},e.label),(0,a.createElement)("span",{className:"tr-block tr-text-xs tr-text-tertiary tr-truncate"},l[e.id].label)),(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-tertiary tr-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14 5l7 7m0 0l-7 7m7-7H3"}))))))),(0,a.createElement)(N.Zp,null,(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2 tr-mb-3"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-7 tr-h-7 tr-rounded-md tr-bg-brand-bg tr-text-brand tr-shrink-0"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"}))),(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,n.__)("Why your own key?","thinkrank"))),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-0 tr-list-none tr-flex tr-flex-col tr-gap-2.5"},[(0,n.__)("Pay your AI provider directly, with no markup.","thinkrank"),(0,n.__)("Unlimited generations at provider rates.","thinkrank"),(0,n.__)("Encrypted at rest and stored only on your site.","thinkrank"),(0,n.__)("Switch providers anytime without losing data.","thinkrank")].map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-flex tr-items-start tr-gap-2 tr-text-sm tr-text-secondary tr-leading-snug"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-success tr-shrink-0 tr-mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M5 13l4 4L19 7"})),(0,a.createElement)("span",null,e))))),(0,a.createElement)(N.Zp,{padding:!1},(0,a.createElement)("div",{className:"tr-px-5 tr-py-4 tr-border-b tr-border-secondary"},(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,n.__)("Need help?","thinkrank"))),(0,a.createElement)("ul",{className:"tr-m-0 tr-p-0 tr-list-none"},H.map(e=>(0,a.createElement)("li",{key:e.href,className:"tr-border-b tr-border-secondary last:tr-border-b-0"},(0,a.createElement)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"tr-flex tr-items-center tr-gap-3 tr-px-5 tr-py-3 tr-no-underline hover:tr-bg-white tr-text-secondary"},(0,a.createElement)("span",{className:"tr-min-w-0 tr-flex-1"},(0,a.createElement)("span",{className:"tr-block tr-text-sm tr-font-medium tr-text-primary"},e.label),(0,a.createElement)("span",{className:"tr-block tr-text-xs tr-text-tertiary tr-truncate"},e.desc)),(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-tertiary tr-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14 5l7 7m0 0l-7 7m7-7H3"})))))))),X=()=>{const[e,t]=(0,i.useState)(""),[r,s]=(0,i.useState)(""),[o,d]=(0,i.useState)(""),[h,p]=(0,i.useState)(I),[k,y]=(0,i.useState)(E),[x,D]=(0,i.useState)(z),[H,X]=(0,i.useState)(T),[$,K]=(0,i.useState)(""),[q,ee]=(0,i.useState)(""),[te,re]=(0,i.useState)(120),[ae,ne]=(0,i.useState)(!1),[ie,se]=(0,i.useState)(!1),[le,oe]=(0,i.useState)(""),[ce,de]=(0,i.useState)([]),ge=(0,i.useRef)(""),[Me,ue]=(0,i.useState)(!1),[me,Ne]=(0,i.useState)(!1),[he,pe]=(0,i.useState)(!1),[ke,ye]=(0,i.useState)(!0),[xe,De]=(0,i.useState)(!1),[je,Ie]=(0,i.useState)(null),[Ee,ze]=(0,i.useState)(!1),[Te,fe]=(0,i.useState)(""),[_e,Ae]=(0,i.useState)(!1),[we,be]=(0,i.useState)(""),[Oe,ve]=(0,i.useState)({}),[Le,Se]=(0,i.useState)(!1),[Ce,Qe]=(0,i.useState)(!1),[Ue,Ye]=(0,i.useState)(!1),[Pe,Re]=(0,i.useState)(!1),[Ze,Ve]=(0,i.useState)(!1),[Be,Ge]=(0,i.useState)(!1),[We,He]=(0,i.useState)(!1),[Fe,Je]=(0,i.useState)(!1),[Xe,$e]=(0,i.useState)(!1),[Ke,qe]=(0,i.useState)(0),[et,tt]=(0,i.useState)(0),[rt,at]=(0,i.useState)(!1),[nt,it]=(0,i.useState)(!1),[st,lt]=(0,i.useState)(null),[ot,ct]=(0,i.useState)(null),[dt,gt]=(0,i.useState)(!1),[Mt,ut]=(0,i.useState)(!1),mt=(0,i.useRef)(!1),Nt=(0,i.useRef)(!0);(0,i.useEffect)(()=>()=>{Nt.current=!1},[]);const[ht,pt]=(0,i.useState)(W);(0,i.useEffect)(()=>{try{const e=new URLSearchParams(window.location.search).get("tab"),t=V.includes(e)?e:W;pt(t),F(t)}catch(e){}},[]);const kt=(0,i.useCallback)(e=>{pt(e),F(e)},[]);(0,i.useEffect)(()=>{"import-export"!==ht||mt.current||(mt.current=!0,gt(!0),ut(!1),l()({path:"/thinkrank/v1/import/detect"}).then(e=>{Nt.current&&ct(e?.native||{counts:{},total:0})}).catch(e=>{Nt.current&&(g.A.error("Failed to load export data counts",e),ut(!0),mt.current=!1)}).finally(()=>{Nt.current&>(!1)}))},[ht]);const yt={openai:[{value:"gpt-5-nano",label:"GPT‑5‑nano (Default – fastest, lowest cost)"},{value:"gpt-5-mini",label:"GPT‑5‑mini (Balanced quality/cost)"},{value:"gpt-5",label:"GPT‑5 (Highest quality)"},{value:"gpt-4o",label:"GPT‑4o (Legacy)"}],claude:[{value:"claude-sonnet-5",label:"Claude Sonnet 5 (Recommended)"},{value:"claude-opus-5",label:"Claude Opus 5 (Most Capable)"},{value:"claude-opus-4-8",label:"Claude Opus 4.8"},{value:"claude-haiku-4-5",label:"Claude Haiku 4.5 (Fast)"}],gemini:[{value:"gemini-3.5-flash",label:"Gemini 3.5 Flash (Recommended)"},{value:"gemini-3.1-flash-lite",label:"Gemini 3.1 Flash Lite (Fastest)"},{value:"gemini-3.1-pro-preview",label:"Gemini 3.1 Pro (Preview)"}],openrouter:[{value:"openai/gpt-4o-mini",label:"GPT‑4o mini (Default – fast, low cost)"},{value:"anthropic/claude-sonnet-5",label:"Claude Sonnet 5"},{value:"google/gemini-3.5-flash",label:"Gemini 3.5 Flash"},{value:"meta-llama/llama-3.3-70b-instruct",label:"Llama 3.3 70B Instruct"},{value:"deepseek/deepseek-chat",label:"DeepSeek Chat"}]},xt=(e,t)=>(yt[e]||[]).some(e=>e.value===t),[Dt,jt]=(0,i.useState)(!1);(0,i.useEffect)(()=>{Tt(),ft()},[]);const[It,Et]=(0,i.useState)(null);(0,i.useEffect)(()=>{if(Dt&&r&&null!==It){if(It!==r){t(""),Se(!1),ze(Boolean(Oe[r])),be(Oe[r]||""),"openai"===r?d(h):"claude"===r?d(k):"gemini"===r?d(x):"openrouter"===r?d(H):r===G&&d($);const e="claude"===r?k:"gemini"===r?x:"openrouter"===r?H:r===G?$:h;Ne(r!==G&&!!e&&!xt(r,e)),Ie(null),Et(r)}}else Et(r)},[r,Oe,Dt,It,h,k,x,H,$]);const zt=(e,t)=>{if(!e||!e.trim())return{valid:!0,message:""};if(t===G)return{valid:!0,message:""};if("openai"===t){if(!e.startsWith("sk-"))return{valid:!1,message:(0,n.__)('OpenAI API keys should start with "sk-"',"thinkrank")};if(e.length<20)return{valid:!1,message:(0,n.__)("OpenAI API key appears too short","thinkrank")}}else if("claude"===t){if(!e.startsWith("sk-ant-"))return{valid:!1,message:(0,n.__)('Claude API keys should start with "sk-ant-"',"thinkrank")};if(e.length<30)return{valid:!1,message:(0,n.__)("Claude API key appears too short","thinkrank")}}else if("gemini"===t){if(!e.startsWith("AIza")&&!e.startsWith("AQ."))return{valid:!1,message:(0,n.__)('Gemini API keys should start with "AIza" or "AQ."',"thinkrank")};if(e.length<30)return{valid:!1,message:(0,n.__)("Gemini API key appears too short","thinkrank")}}else if("openrouter"===t){if(!e.startsWith("sk-or-"))return{valid:!1,message:(0,n.__)('OpenRouter API keys should start with "sk-or-"',"thinkrank")};if(e.length<20)return{valid:!1,message:(0,n.__)("OpenRouter API key appears too short","thinkrank")}}return{valid:!0,message:""}},Tt=async()=>{ye(!0);try{const e=await l()({path:"/thinkrank/v1/settings"}),r=e.success?e.data:e;if(r){const e=r.ai_provider||"",a={};B.forEach(e=>{const t=r[`${e}_api_key`]||"";a[e]=t.includes("••••")?t:""}),ve(a);const i=r[`${e}_api_key`]||"",l=i&&i.includes("••••");ze(l),fe(e),Ae(l),be(l?i:""),Se(!1),t(l?"":i),s(e),Et(e);const o=r.openai_model||I,c=r.claude_model||E,g=r.gemini_model||z,M=r.openrouter_model||T,u=r.openai_compatible_model||"";K(u),ee(r.openai_compatible_base_url||""),re(Number(r.openai_compatible_timeout)||120),ne(!!r.openai_compatible_supports_images),se(!!r.openai_compatible_json_mode),oe(Number(r.openai_compatible_price_per_million)>0?String(r.openai_compatible_price_per_million):""),p(o),y(c),D(g),X(M),d("claude"===e?c:"gemini"===e?g:"openrouter"===e?M:e===G?u:o);const m="claude"===e?c:"gemini"===e?g:"openrouter"===e?M:e===G?u:o;if(Ne(e!==G&&!!m&&!xt(e,m)),Ye(!r.keep_data_on_uninstall),Re(!!r.enable_migration_tools),Ve(!!r.enable_import_export),$e(!!r.ai_paused),qe(Number(r.ai_daily_request_limit)||0),tt(Number(r.max_requests_per_minute)||0),e)if(e===G){const e=!r.openai_compatible_base_url||!r.openai_compatible_model;Ie(e?{type:"warning",message:(0,n.__)("Add the base URL and model id of your OpenAI-compatible endpoint to enable AI features.","thinkrank")}:null)}else if(l)Ie(null);else{const t=Y[e]||e;Ie({type:"warning",message:(0,n.sprintf)(/* translators: %s: AI provider name (e.g. OpenAI, Claude). */ /* translators: %s: AI provider name (e.g. OpenAI, Claude). */ | |
| 139 | +(0,n.__)("No %s API key found. Please enter your API key to use this provider.","thinkrank"),t)})}else Ie(null)}}catch(e){g.A.error("Failed to load settings:",e),Ie({type:"error",message:(0,n.__)("Failed to load settings.","thinkrank")})}finally{ye(!1),jt(!0)}},ft=async()=>{try{const e=await l()({path:"/thinkrank/v1/ai/status"});Nt.current&<(e?.budget||null)}catch(e){g.A.error("Failed to load AI budget status:",e)}},_t=Y[r]||r,At=r===G?(0,n.__)("API key (optional)","thinkrank"):`${_t} ${(0,n.__)("API Key","thinkrank")}`,wt=Ee?(0,n.__)("Enter new API key to update…","thinkrank"):{openai:"sk-…",claude:"sk-ant-…",gemini:"AQ.… or AIza…",openrouter:"sk-or-…"}[r]||"",bt=[{id:"openai",label:"OpenAI",sub:"OpenAI API",icon:(0,a.createElement)(S,null)},{id:"claude",label:"Anthropic",sub:"Claude models",icon:(0,a.createElement)(C,null)},{id:"gemini",label:"Gemini",sub:"Google AI",icon:(0,a.createElement)(R,null)},{id:"openrouter",label:"OpenRouter",sub:"Unified API",icon:(0,a.createElement)(Q,null)},{id:G,label:(0,n.__)("Custom endpoint","thinkrank"),sub:(0,n.__)("Ollama, LM Studio, Azure…","thinkrank"),icon:(0,a.createElement)(U,null)}],Ot=[...yt[r]||[],{value:P,label:(0,n.__)("Custom model…","thinkrank")}],vt="claude"===r?k:"gemini"===r?x:"openrouter"===r?H:r===G?$:h,Lt=e=>{"claude"===r?y(e):"gemini"===r?D(e):"openrouter"===r?X(e):r===G?K(e):p(e),d(e)};if(ke)return(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-1 xl:tr-grid-cols-3 tr-gap-6"},(0,a.createElement)("div",{className:"xl:tr-col-span-2 tr-flex tr-flex-col tr-gap-5"},(0,a.createElement)(N.u4,{lines:3}),(0,a.createElement)(N.u4,{lines:2})),(0,a.createElement)("aside",{className:"tr-flex tr-flex-col tr-gap-5"},(0,a.createElement)(N.u4,{lines:4})));const St=bt.find(e=>e.id===Te),Ct="claude"===Te?k:"gemini"===Te?x:"openrouter"===Te?H:Te===G?$:h,Qt={openai:{url:"https://platform.openai.com/api-keys",label:"platform.openai.com"},claude:{url:"https://console.anthropic.com/settings/keys",label:"console.anthropic.com"},gemini:{url:"https://aistudio.google.com/app/apikey",label:"aistudio.google.com"},openrouter:{url:"https://openrouter.ai/keys",label:"openrouter.ai"},[G]:{url:"https://ollama.com/download",label:(0,n.__)("ollama.com: run a model locally","thinkrank")}};return(0,a.createElement)("div",null,je&&(0,a.createElement)("div",{className:"tr-mb-5"},(0,a.createElement)(N.Fc,{variant:"error"===je.type?"error":"success"===je.type?"success":"warning"===je.type?"warning":"info",onDismiss:()=>Ie(null)},(0,M.A)(je.message))),(0,a.createElement)(m.A,{tabs:Z,activeTab:ht,onTabChange:kt,className:"tr-mb-6"}),(0,a.createElement)(m.K,{tabId:"ai-provider",activeTab:ht},(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-1 xl:tr-grid-cols-3 tr-gap-6"},(0,a.createElement)("div",{className:"xl:tr-col-span-2 tr-flex tr-flex-col tr-gap-5"},(0,a.createElement)(N.Zp,null,(0,a.createElement)("div",{className:"tr-mb-6"},(0,a.createElement)("p",{className:"tr-text-sm tr-font-medium tr-text-secondary tr-mt-0 tr-mb-2.5"},(0,n.__)("Choose provider","thinkrank")),(0,a.createElement)("div",{role:"radiogroup","aria-label":(0,n.__)("AI provider","thinkrank"),className:"tr-grid tr-grid-cols-2 sm:tr-grid-cols-4 tr-gap-3"},bt.map(e=>{const t=r===e.id,i=Te===e.id&&(_e||e.id===G);return(0,a.createElement)("button",{key:e.id,type:"button",role:"radio","aria-checked":t,onClick:()=>{s(e.id),Qe(!1)},style:{WebkitTapHighlightColor:"transparent"},className:c()("tr-relative tr-flex tr-flex-col tr-items-center tr-justify-center tr-gap-2 tr-px-3 tr-py-4 tr-rounded-lg tr-border-[1.5px] tr-cursor-pointer tr-transition-colors tr-duration-200 focus:tr-outline-none",t?"tr-border-brand tr-bg-brand-bg":"tr-border-secondary tr-bg-white hover:tr-border-tertiary hover:tr-bg-line-2")},(0,a.createElement)("span",{className:c()("tr-absolute tr-top-2 tr-right-2 tr-flex tr-items-center tr-justify-center tr-w-4 tr-h-4 tr-rounded-full tr-bg-brand tr-text-white tr-transition-opacity tr-duration-200",t?"tr-opacity-100":"tr-opacity-0"),"aria-hidden":"true"},(0,a.createElement)("svg",{className:"tr-w-2.5 tr-h-2.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"}))),(0,a.createElement)("span",{className:c()("tr-h-7 tr-flex tr-items-center tr-justify-center tr-text-2xl tr-transition-colors tr-duration-200",t?"tr-text-brand":"tr-text-secondary")},e.icon),(0,a.createElement)("span",{className:c()("tr-text-sm tr-font-semibold tr-transition-colors tr-duration-200",t?"tr-text-brand":"tr-text-primary")},e.label),i&&(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-gap-1 tr-text-[10px] tr-font-semibold tr-uppercase tr-tracking-wide tr-leading-none tr-text-success"},(0,a.createElement)("span",{className:"tr-w-1.5 tr-h-1.5 tr-rounded-full tr-bg-success"}),(0,n.__)("Active","thinkrank")))}))),r?(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-4"},r===G&&(0,a.createElement)(N.pd,{label:(0,n.__)("Endpoint base URL","thinkrank"),value:q,onChange:e=>{ee(e.target.value),ge.current&&ge.current!==e.target.value.trim()&&(ge.current="",de([]))},placeholder:"http://localhost:11434/v1",description:(0,n.__)("The OpenAI-compatible base URL, ending in /v1. Plain http:// is accepted for localhost and private addresses; anything public must use https:// so your key is never sent in the clear.","thinkrank")}),Ee&&!Le?(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1.5"},(0,a.createElement)("span",{className:"tr-text-sm tr-font-medium tr-text-secondary"},At),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2"},(0,a.createElement)("div",{className:"tr-flex tr-flex-1 tr-items-center tr-gap-2 tr-h-10 tr-px-3 tr-rounded-md tr-border-[1.5px] tr-border-secondary tr-bg-white tr-min-w-0"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-tertiary tr-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})),(0,a.createElement)("code",{className:"tr-bg-transparent tr-p-0 tr-text-sm tr-text-primary tr-font-mono tr-tracking-wide tr-truncate"},we),(0,a.createElement)("span",{className:"tr-ml-auto tr-inline-flex tr-items-center tr-gap-1 tr-text-xs tr-font-medium tr-text-success tr-shrink-0"},(0,a.createElement)("span",{className:"tr-w-1.5 tr-h-1.5 tr-rounded-full tr-bg-success"}),(0,n.__)("Connected","thinkrank"))),(0,a.createElement)(N.$n,{variant:"secondary",onClick:()=>{Se(!0),t(""),Qe(!1)},disabled:he||xe},(0,n.__)("Replace","thinkrank"))),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0"},(0,n.__)("Masked preview of your saved key. Choose Replace to enter a new one.","thinkrank"))):(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-1.5"},(0,a.createElement)("label",{htmlFor:"tr-provider-api-key",className:"tr-text-sm tr-font-medium tr-text-secondary"},At),(0,a.createElement)("div",{className:"tr-relative tr-flex tr-items-center"},(0,a.createElement)("input",{id:"tr-provider-api-key",type:"text",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,"data-lpignore":"true","data-1p-ignore":"true",value:e,onChange:e=>t(e.target.value),placeholder:wt,className:"tr-w-full tr-h-10 tr-rounded-md tr-bg-white tr-text-sm tr-text-primary tr-border-[1.5px] tr-border-primary tr-transition-colors tr-duration-150 placeholder:tr-text-tertiary hover:tr-border-[#A9AEC0] focus:tr-outline-none focus-visible:tr-border-brand tr-pl-3 tr-pr-10",style:Ce?void 0:{WebkitTextSecurity:"disc"}}),(0,a.createElement)("button",{type:"button",onClick:()=>Qe(e=>!e),className:"tr-absolute tr-right-2 tr-flex tr-items-center tr-justify-center tr-w-7 tr-h-7 tr-p-0 tr-bg-transparent tr-border-0 tr-cursor-pointer tr-text-tertiary hover:tr-text-secondary","aria-label":Ce?(0,n.__)("Hide API key","thinkrank"):(0,n.__)("Show API key","thinkrank"),"aria-pressed":Ce},Ce?(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.542-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.542 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})):(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})))),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0"},Ee?(0,n.__)("Enter a new key to replace the saved one.","thinkrank"):r===G?(0,n.__)("Leave empty for a local server that needs no key. Anything you enter is encrypted and sent only to the URL above.","thinkrank"):(0,n.__)("Encrypted and stored securely. You pay the provider directly.","thinkrank")),Ee&&Le&&(0,a.createElement)("button",{type:"button",onClick:()=>{Se(!1),t(""),Qe(!1)},className:"tr-self-start tr-text-xs tr-text-brand tr-bg-transparent tr-border-0 tr-p-0 tr-cursor-pointer hover:tr-underline"},(0,n.__)("Cancel and keep current key","thinkrank"))),r===G?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-2"},(0,a.createElement)(N.pd,{label:(0,n.__)("Model id","thinkrank"),value:$,onChange:e=>K(e.target.value),placeholder:"llama3.1",list:"thinkrank-endpoint-models",description:(0,n.__)("The exact model id this server serves, as it appears in its own model list.","thinkrank")}),ce.length>0&&(0,a.createElement)("datalist",{id:"thinkrank-endpoint-models"},ce.map(e=>(0,a.createElement)("option",{key:e,value:e}))),(0,a.createElement)(N.$n,{variant:"secondary",size:"sm",onClick:async()=>{const t=q.trim();if(t){ue(!0);try{const r=await l()({path:"/thinkrank/v1/ai/models",method:"POST",data:{base_url:t,...e.trim()?{api_key:e.trim()}:{}}});if(q.trim()!==t)return;const a=r?.models||[];ge.current=t,de(a),u.A.success(r?.truncated?(0,n.sprintf)(/* translators: %d: number of models listed, after the plugin's cap. */ /* translators: %d: number of models listed, after the plugin's cap. */ | |
| 138 | 140 | (0,n.__)("Showing the first %d models this endpoint lists.","thinkrank"),a.length):(0,n.sprintf)(/* translators: %d: number of models the endpoint listed. */ /* translators: %d: number of models the endpoint listed. */ |
| 139 | -(0,n.__)("%d models available on this endpoint.","thinkrank"),a.length)),!q.trim()&&a.length>0&&(ee(a[0]),d(a[0]))}catch(e){g.A.error("Failed to list endpoint models:",e),te.trim()===t&&(ue.current="",Me([]),u.A.error(e?.message||(0,n.__)("Could not list models. Type the model id by hand instead.","thinkrank")))}finally{Ne(!1)}}else u.A.error((0,n.__)("Enter your endpoint base URL first.","thinkrank"))},loading:me,disabled:!te.trim(),className:"tr-self-start"},(0,n.__)("Load models","thinkrank")),ge.length>0&&(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0"},(0,n.sprintf)(/* translators: %s: comma-separated model ids. */ /* translators: %s: comma-separated model ids. */ | |
| 140 | -(0,n.__)("Available: %s","thinkrank"),ge.slice(0,8).join(", ")))),(0,a.createElement)(N.pd,{type:"number",label:(0,n.__)("Request timeout (seconds)","thinkrank"),value:ae,min:10,max:600,onChange:e=>ne(e.target.value),description:(0,n.__)("A local model on CPU can take minutes for a content brief. Raise this if generation times out.","thinkrank")}),(0,a.createElement)(N.lM,{id:"thinkrank-endpoint-supports-images",checked:ie,onChange:se,label:(0,n.__)("This model can describe images","thinkrank"),description:(0,n.__)("Turn on only for a vision model (llava, gpt-4o, a Gemini deployment). AI alt text stays hidden while this is off, because a text-only model answers a vision request with an error.","thinkrank")}),(0,a.createElement)(N.lM,{id:"thinkrank-endpoint-json-mode",checked:le,onChange:oe,label:(0,n.__)("Force valid JSON answers","thinkrank"),description:(0,n.__)("Sends response_format json_object, which Ollama, vLLM and llama.cpp use to stop a small model breaking the JSON of a content brief or metadata. Leave off for a server that rejects it (LM Studio accepts only json_schema).","thinkrank")}),(0,a.createElement)(N.pd,{type:"number",label:(0,n.__)("Price per 1M tokens (optional)","thinkrank"),value:ce,min:0,step:"0.01",onChange:e=>de(e.target.value),placeholder:"0.00",description:(0,n.__)("Only for cost estimates. Leave empty when the model is free or you do not want estimates. Usage is then reported without a cost rather than as zero.","thinkrank")})):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(N.l6,{label:`${wt} ${(0,n.__)("Model","thinkrank")}`,value:he?P:St,options:Lt,onChange:e=>{var t;(t=e.target.value)!==P?(pe(!1),Ct(t)):pe(!0)},description:(0,n.__)("Model used for all AI content generation.","thinkrank")}),he&&(0,a.createElement)(N.pd,{label:(0,n.__)("Custom model","thinkrank"),value:St,onChange:e=>Ct(e.target.value),placeholder:"openrouter"===r?"vendor/model-name":"model-name",description:(0,n.__)("Enter the exact model id from your provider. Use this to run a newly released or unlisted model.","thinkrank")})))):(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-items-center tr-gap-1.5 tr-py-8 tr-px-4 tr-rounded-lg tr-border tr-border-dashed tr-border-secondary tr-text-center"},(0,a.createElement)("p",{className:"tr-text-sm tr-font-medium tr-text-primary tr-m-0"},(0,n.__)("Choose an AI provider to get started","thinkrank")),(0,a.createElement)("p",{className:"tr-text-sm tr-text-tertiary tr-m-0"},(0,n.__)("Select a provider above, then add its API key to enable AI features.","thinkrank"))),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-3 tr-mt-5"},(0,a.createElement)(N.$n,{variant:"primary",onClick:async()=>{if(r){if(r===G){if(!te.trim())return void u.A.error((0,n.__)("Enter the base URL of your endpoint, for example http://localhost:11434/v1","thinkrank"));if(!q.trim())return void u.A.error((0,n.__)("Enter the model id your endpoint should use, for example llama3.1","thinkrank"))}else if(!e.trim()&&!Te){const e=Y[r]||r;return void u.A.error((0,n.sprintf)(/* translators: %s: AI provider name (e.g. OpenAI, Claude). */ /* translators: %s: AI provider name (e.g. OpenAI, Claude). */ | |
| 141 | -(0,n.__)("Enter your %s API key for the selected provider.","thinkrank"),e))}if(e.trim()){const t=ft(e,r);if(!t.valid)return void u.A.error(t.message)}ye(!0),ze(null);try{const a={ai_provider:r,keep_data_on_uninstall:!Pe,enable_migration_tools:Ze};e.trim()&&(a[`${r}_api_key`]=e),"claude"===r?a.claude_model=k:"gemini"===r?a.gemini_model=x:"openrouter"===r?a.openrouter_model=J:r===G?(a.openai_compatible_base_url=te.trim(),a.openai_compatible_model=q.trim(),a.openai_compatible_timeout=Number(ae),a.openai_compatible_supports_images=ie,a.openai_compatible_json_mode=le,a.openai_compatible_price_per_million=""===ce?0:Number(ce)):a.openai_model=h;const i=await l()({path:"/thinkrank/v1/settings",method:"POST",data:a});i.success?(u.A.success((0,n.__)("Settings saved successfully!","thinkrank")),e.trim()&&(fe(!0),t(""),window.thinkrankAdmin&&(window.thinkrankAdmin.aiConfigured=!0)),r===G&&window.thinkrankAdmin&&(window.thinkrankAdmin.aiConfigured=!0),await _t()):u.A.error(i.message||(0,n.__)("Failed to save settings.","thinkrank"))}catch(e){g.A.error("Failed to save settings:",e),u.A.error(e?.message||(0,n.__)("Failed to save settings. Please try again.","thinkrank"))}finally{ye(!1)}}else u.A.error((0,n.__)("Choose an AI provider first.","thinkrank"))},loading:ke,disabled:je||!r},(0,n.__)("Save Settings","thinkrank")),(0,a.createElement)(N.$n,{variant:"secondary",onClick:async()=>{const t=e.trim();if(r===G&&!te.trim())return void u.A.error((0,n.__)("Enter your endpoint base URL first.","thinkrank"));if(r!==G&&!t&&!Te)return void u.A.error((0,n.__)("Please enter an API key first.","thinkrank"));if(t){const t=ft(e,r);if(!t.valid)return void u.A.error(t.message)}Ie(!0),ze(null);const a=("claude"===r?k:"gemini"===r?x:"openrouter"===r?J:r===G?q:h)?.trim();try{const i=await l()({path:"/thinkrank/v1/ai/test-connection",method:"POST",data:{provider:r,...t?{api_key:e}:{},...a?{model:a}:{},...r===G?{base_url:te.trim(),json_mode:le}:{}}});if(i?.success&&!1===i.json_mode_supported)u.A.warning(i.message);else if(i&&i.success)u.A.success(i.message||(0,n.__)("API connection successful!","thinkrank"));else{const e=i?.message||(0,n.__)("API connection failed. Please check your API key and try again.","thinkrank");u.A.error(e)}}catch(e){g.A.error("Failed to test connection:",e);let t=(0,n.__)("Failed to test API connection.","thinkrank");e.message&&(t=e.message.includes("fetch")?(0,n.__)("Network error. Please check your internet connection.","thinkrank"):e.message.includes("401")||e.message.includes("403")?(0,n.__)("Invalid API key. Please check your credentials.","thinkrank"):e.message.includes("429")?(0,n.__)("Rate limit exceeded. Please try again later.","thinkrank"):`${(0,n.__)("Connection failed:","thinkrank")} ${e.message}`),u.A.error(t)}finally{Ie(!1)}},loading:je,disabled:ke||!r||(r===G?!te.trim():!e.trim()&&!Te)},(0,n.__)("Test Connection","thinkrank")),Te&&(0,a.createElement)(N.$n,{variant:"danger",onClick:async()=>{if(Te){if(confirm((0,n.__)("Are you sure you want to clear the saved API key? This action cannot be undone.","thinkrank"))){ye(!0),ze(null);try{const e=await l()({path:"/thinkrank/v1/settings",method:"POST",data:{[`${r}_api_key`]:""}});e.success?(u.A.success((0,n.__)("API key cleared successfully.","thinkrank")),fe(!1),t(""),await _t()):u.A.error(e.message||(0,n.__)("Failed to clear API key.","thinkrank"))}catch(e){g.A.error("Failed to clear API key:",e),u.A.error((0,n.__)("Failed to clear API key. Please try again.","thinkrank"))}finally{ye(!1)}}}else u.A.warning((0,n.__)("No API key is currently saved.","thinkrank"))},disabled:ke||je},(0,n.__)("Clear API Key","thinkrank")))),(0,a.createElement)(N.Zp,{padding:!1,className:"tr-overflow-hidden"},(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-4 tr-p-6"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-11 tr-h-11 tr-rounded-xl tr-bg-brand-bg tr-text-brand tr-shrink-0"},(0,a.createElement)(b,null)),(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-0"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2.5 tr-flex-wrap"},(0,a.createElement)("h2",{className:"tr-m-0 tr-text-base tr-font-semibold tr-text-primary"},(0,n.__)("AI usage limits","thinkrank")),(0,a.createElement)(N.Ex,{variant:Ke?"warning":"good"},Ke?(0,n.__)("Paused","thinkrank"):(0,n.__)("Active","thinkrank"))),(0,a.createElement)("p",{className:"tr-mt-1 tr-mb-0 tr-text-sm tr-text-secondary tr-max-w-2xl"},(0,n.__)("Cap what ThinkRank may spend on your AI provider key, or stop it outright. Both limits apply to every AI feature, including the ones that run on a schedule.","thinkrank"))),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-items-end tr-gap-1 tr-shrink-0"},(0,a.createElement)(N.lM,{id:"thinkrank-ai-paused",checked:Ke,onChange:async e=>{const t=Ke;qe(e),it(!0),ze(null);try{const t=await l()({path:"/thinkrank/v1/settings",method:"POST",data:{ai_paused:e}});if(!t?.success)throw new Error((0,n.__)("Failed to save the AI pause setting.","thinkrank"));u.A.success(e?(0,n.__)("AI paused. ThinkRank will not send any requests to your AI provider until you turn this back off.","thinkrank"):(0,n.__)("AI resumed.","thinkrank")),At()}catch(e){qe(t),u.A.error(e?.message||(0,n.__)("Failed to save the AI pause setting.","thinkrank"))}finally{it(!1)}},disabled:nt,label:(0,n.__)("Pause all AI","thinkrank")}),nt&&(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},(0,n.__)("Saving…","thinkrank")))),(0,a.createElement)("div",{className:"tr-border-t tr-border-secondary tr-p-6 tr-flex tr-flex-col tr-gap-5"},Ke&&(0,a.createElement)(N.Fc,{variant:"warning"},(0,n.__)("AI is paused. No requests are being sent to your provider, so AI features will report that they are unavailable until you turn this back off. Your API key is untouched.","thinkrank")),ot&&(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"tr-flex tr-items-baseline tr-justify-between tr-gap-3 tr-flex-wrap"},(0,a.createElement)("span",{className:"tr-text-sm tr-font-semibold tr-text-primary"},(0,n.__)("Used today","thinkrank")),(0,a.createElement)("span",{className:"tr-text-sm tr-text-secondary"},ot.daily_limit>0?(0,n.sprintf)(/* translators: 1: requests used today, 2: daily request limit. */ /* translators: 1: requests used today, 2: daily request limit. */ | |
| 142 | -(0,n.__)("%1$s of %2$s requests","thinkrank"),ot.used_today,ot.daily_limit):(0,n.sprintf)(/* translators: %s: requests used today. */ /* translators: %s: requests used today. */ | |
| 143 | -(0,n.__)("%s requests, no daily limit set","thinkrank"),ot.used_today))),ot.daily_limit>0&&(0,a.createElement)("div",{className:"tr-mt-2 tr-h-2 tr-w-full tr-rounded-full tr-bg-secondary tr-overflow-hidden",role:"progressbar","aria-valuenow":ot.used_today,"aria-valuemin":0,"aria-valuemax":ot.daily_limit},(0,a.createElement)("div",{className:c()("tr-h-full tr-rounded-full",ot.used_today>=ot.daily_limit?"tr-bg-danger":"tr-bg-brand"),style:{width:`${Math.min(100,Math.round(ot.used_today/ot.daily_limit*100))}%`}})),(0,a.createElement)("p",{className:"tr-mt-2 tr-mb-0 tr-text-xs tr-text-tertiary"},(0,n.__)("The count covers every AI request this site sends and resets at midnight, site time.","thinkrank"))),(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-1 md:tr-grid-cols-2 tr-gap-4"},(0,a.createElement)(N.pd,{id:"thinkrank-ai-daily-limit",type:"number",min:0,value:et,onChange:e=>tt(parseInt(e.target.value,10)||0),label:(0,n.__)("Daily request limit","thinkrank"),description:(0,n.__)("Most AI requests this site may send in a day. 0 means no daily limit.","thinkrank")}),(0,a.createElement)(N.pd,{id:"thinkrank-ai-per-minute",type:"number",min:0,value:rt,onChange:e=>at(parseInt(e.target.value,10)||0),label:(0,n.__)("Requests per minute","thinkrank"),description:(0,n.__)("Most AI requests one user may send in a minute. 0 means no per-minute limit.","thinkrank")})),(0,a.createElement)("div",null,(0,a.createElement)(N.$n,{variant:"primary",onClick:async()=>{lt(!0),ze(null);try{const e=await l()({path:"/thinkrank/v1/settings",method:"POST",data:{ai_daily_request_limit:Math.max(0,Number(et)||0),max_requests_per_minute:Math.max(0,Number(rt)||0)}});if(!e?.success)throw new Error(e?.message||(0,n.__)("Failed to save the AI limits.","thinkrank"));u.A.success((0,n.__)("AI limits saved.","thinkrank")),At()}catch(e){g.A.error("Failed to save AI limits:",e),u.A.error(e?.message||(0,n.__)("Failed to save the AI limits.","thinkrank"))}finally{lt(!1)}},loading:st},(0,n.__)("Save limits","thinkrank"))))),(0,a.createElement)(N.Zp,null,(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-mt-0 tr-mb-4"},(0,n.__)("Getting started","thinkrank")),(0,a.createElement)("ol",{className:"tr-m-0 tr-pl-0 tr-list-none tr-flex tr-flex-col tr-gap-3"},F.map((e,t)=>(0,a.createElement)("li",{key:e.title,className:"tr-flex tr-items-start tr-gap-3"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-6 tr-h-6 tr-rounded-full tr-bg-brand-bg tr-text-brand tr-text-xs tr-font-semibold tr-shrink-0"},t+1),(0,a.createElement)("span",{className:"tr-min-w-0"},(0,a.createElement)("span",{className:"tr-block tr-text-sm tr-font-semibold tr-text-primary tr-leading-tight"},e.title),(0,a.createElement)("span",{className:"tr-block tr-text-xs tr-text-tertiary tr-mt-0.5 tr-leading-snug"},e.desc)))))),(0,a.createElement)(N.Zp,null,(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2.5 tr-mb-3"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-8 tr-h-8 tr-rounded-lg tr-bg-brand-bg tr-text-brand tr-shrink-0"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"}))),(0,a.createElement)("div",{className:"tr-min-w-0"},(0,a.createElement)("h3",{className:"tr-text-sm tr-font-semibold tr-text-primary tr-m-0"},(0,n.__)("Your key stays private","thinkrank")),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0 tr-mt-0.5"},(0,n.__)("You bring your own key, so you stay in control.","thinkrank")))),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-0 tr-list-none tr-flex tr-flex-col tr-gap-2.5"},H.map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-flex tr-items-start tr-gap-2 tr-text-sm tr-text-secondary tr-leading-snug"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-success tr-shrink-0 tr-mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M5 13l4 4L19 7"})),(0,a.createElement)("span",null,e)))))),(0,a.createElement)($,{activeProvider:Qt,activeProviderId:_e,activeModelState:Ut,activeHasKey:we,providers:vt,providerKeyDocs:Yt}))),(0,a.createElement)(m.K,{tabId:"data-management",activeTab:kt},(0,a.createElement)(N.Zp,{padding:!1,className:"tr-overflow-hidden"},(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-4 tr-p-6"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-11 tr-h-11 tr-rounded-xl tr-bg-brand-bg tr-text-brand tr-shrink-0"},(0,a.createElement)(w,null)),(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-0"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2.5 tr-flex-wrap"},(0,a.createElement)("h2",{className:"tr-m-0 tr-text-base tr-font-semibold tr-text-primary"},(0,n.__)("Data Management","thinkrank")),(0,a.createElement)(N.Ex,{variant:Pe?"warning":"neutral"},Pe?(0,n.__)("On","thinkrank"):(0,n.__)("Off","thinkrank"))),(0,a.createElement)("p",{className:"tr-mt-1 tr-mb-0 tr-text-sm tr-text-secondary tr-max-w-2xl"},(0,n.__)("Control what happens to your data when the plugin is removed. When enabled, all plugin data including API keys, content briefs, and configuration will be permanently erased on uninstall.","thinkrank"))),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-items-end tr-gap-1 tr-shrink-0"},(0,a.createElement)(N.lM,{id:"thinkrank-delete-on-uninstall",checked:Pe,onChange:Re,label:(0,n.__)("Delete all data on uninstall","thinkrank")}))),(0,a.createElement)("div",{className:"tr-border-t tr-border-secondary tr-p-6 tr-flex tr-flex-col tr-gap-5"},Pe&&(0,a.createElement)(N.Fc,{variant:"warning"},(0,n.__)("Data deletion is enabled. Uninstalling ThinkRank will permanently erase all settings and content briefs. This cannot be undone.","thinkrank")),(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-1 sm:tr-grid-cols-2 tr-gap-4"},(0,a.createElement)("div",{className:"tr-rounded-xl tr-border tr-border-success/30 tr-bg-success-bg tr-p-4"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2.5 tr-mb-3 tr-pb-3 tr-border-b tr-border-success/20"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-8 tr-h-8 tr-rounded-lg tr-bg-success/10 tr-shrink-0"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-success",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M5 13l4 4L19 7"}))),(0,a.createElement)("div",{className:"tr-min-w-0"},(0,a.createElement)("p",{className:"tr-text-sm tr-font-semibold tr-text-success tr-m-0 tr-leading-tight"},(0,n.__)("Preserved by default","thinkrank")),(0,a.createElement)("p",{className:"tr-text-xs tr-text-success/70 tr-m-0 tr-mt-0.5"},(0,n.__)("Kept after uninstall","thinkrank")))),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-0 tr-list-none tr-flex tr-flex-col tr-gap-2"},[(0,n.__)("API keys & provider settings","thinkrank"),(0,n.__)("Generated content briefs","thinkrank"),(0,n.__)("Plugin configuration","thinkrank")].map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-flex tr-items-center tr-gap-2 tr-text-sm tr-text-secondary"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-success tr-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M5 13l4 4L19 7"})),e)))),(0,a.createElement)("div",{className:"tr-rounded-xl tr-border tr-border-secondary tr-bg-white tr-p-4"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2.5 tr-mb-3 tr-pb-3 tr-border-b tr-border-secondary"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-8 tr-h-8 tr-rounded-lg tr-bg-line-2 tr-shrink-0"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-tertiary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))),(0,a.createElement)("div",{className:"tr-min-w-0"},(0,a.createElement)("p",{className:"tr-text-sm tr-font-semibold tr-text-secondary tr-m-0 tr-leading-tight"},(0,n.__)("Always cleaned up","thinkrank")),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0 tr-mt-0.5"},(0,n.__)("Removed on uninstall","thinkrank")))),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-0 tr-list-none tr-flex tr-flex-col tr-gap-2"},[(0,n.__)("Temporary cache data","thinkrank"),(0,n.__)("Usage analytics","thinkrank"),(0,n.__)("Plugin activation flags","thinkrank")].map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-flex tr-items-center tr-gap-2 tr-text-sm tr-text-secondary"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-tertiary tr-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M6 12h12"})),e))))),(0,a.createElement)("div",{className:"tr-flex tr-justify-end"},(0,a.createElement)(N.$n,{variant:"primary",onClick:async()=>{$e(!0),ze(null);try{const e=await l()({path:"/thinkrank/v1/settings",method:"POST",data:{keep_data_on_uninstall:!Pe}});if(!e?.success)throw new Error(e?.message||(0,n.__)("Failed to save settings.","thinkrank"));u.A.success((0,n.__)("Settings saved successfully!","thinkrank"))}catch(e){g.A.error("Failed to save data management settings:",e),u.A.error(e?.message||(0,n.__)("Failed to save settings. Please try again.","thinkrank"))}finally{$e(!1)}},loading:Xe},(0,n.__)("Save Settings","thinkrank")))))),(0,a.createElement)(m.K,{tabId:"import-export",activeTab:kt},(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-6"},(0,a.createElement)(N.Zp,{padding:!1,className:"tr-overflow-hidden"},(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-4 tr-p-6"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-11 tr-h-11 tr-rounded-xl tr-bg-brand-bg tr-text-brand tr-shrink-0"},(0,a.createElement)(O,null)),(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-0"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2.5 tr-flex-wrap"},(0,a.createElement)("h2",{className:"tr-m-0 tr-text-base tr-font-semibold tr-text-primary"},(0,n.__)("Import / Export","thinkrank")),(0,a.createElement)(N.Ex,{variant:Be?"good":"neutral"},Be?(0,n.__)("On","thinkrank"):(0,n.__)("Off","thinkrank")),Be&&dt?.total>0&&(0,a.createElement)(N.Ex,{variant:"neutral"},(0,n.sprintf)(/* translators: %s: formatted record count. */ /* translators: %s: formatted record count. */ | |
| 144 | -(0,n.__)("%s records","thinkrank"),Number(dt.total).toLocaleString()))),(0,a.createElement)("p",{className:"tr-mt-1 tr-mb-0 tr-text-sm tr-text-secondary tr-max-w-2xl"},(0,n.__)("Download everything ThinkRank stores as a single file, and load it back on this site or any other. Useful as a backup before big changes, for moving a site, or simply so your SEO data is never locked in here.","thinkrank"))),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-items-end tr-gap-1 tr-shrink-0"},(0,a.createElement)(N.lM,{id:"thinkrank-enable-import-export",checked:Be,onChange:async e=>{const t=Be;Ge(e),He(!0),ze(null);try{const t=await l()({path:"/thinkrank/v1/settings",method:"POST",data:{enable_import_export:e}});if(!t?.success)throw new Error((0,n.__)("Failed to save the Import / Export setting.","thinkrank"));u.A.success(e?(0,n.__)("Import / Export enabled. Reload the page to see the menu item.","thinkrank"):(0,n.__)("Import / Export disabled. Your data is untouched. Turn it back on any time to export it.","thinkrank"))}catch(e){Ge(t),u.A.error(e?.message||(0,n.__)("Failed to save the Import / Export setting.","thinkrank"))}finally{He(!1)}},disabled:We,label:(0,n.__)("Enable Import / Export","thinkrank")}),We&&(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},(0,n.__)("Saving…","thinkrank")))),(0,a.createElement)("div",{className:"tr-border-t tr-border-secondary tr-p-6"},(0,a.createElement)("span",{className:"tr-block tr-text-sm tr-font-semibold tr-text-primary"},(0,n.__)("What an export includes","thinkrank")),(0,a.createElement)("span",{className:"tr-block tr-mt-1 tr-text-sm tr-text-secondary"},(0,n.__)("Everything below travels in one JSON file. A CSV view of your post SEO data is available too, for spreadsheets or another plugin’s importer.","thinkrank")),Mt&&(0,a.createElement)("div",{className:"tr-mt-4"},(0,a.createElement)(N.u4,null)),mt&&!Mt&&(0,a.createElement)("div",{className:"tr-mt-4"},(0,a.createElement)(N.Fc,{variant:"warning"},(0,n.__)("Could not read your data counts just now. The export itself is unaffected. Open Import / Export to run one.","thinkrank"))),!Mt&&!mt&&(0,a.createElement)("ul",{className:"tr-grid tr-grid-cols-1 sm:tr-grid-cols-2 tr-gap-2.5 tr-list-none tr-m-0 tr-mt-4 tr-p-0"},_.map(e=>{const t=Number(dt?.counts?.[e.type]||0),r=e.countless||t>0;return(0,a.createElement)("li",{key:e.type,className:"tr-flex tr-items-center tr-gap-3 tr-m-0 tr-px-3 tr-py-2.5 tr-rounded-lg tr-border tr-border-secondary tr-bg-white"},(0,a.createElement)("span",{className:"tr-flex-1 tr-min-w-0"},(0,a.createElement)("span",{className:"tr-block tr-text-sm tr-font-medium tr-text-primary tr-truncate"},e.name,!e.countless&&t>0&&(0,a.createElement)("span",{className:"tr-ml-1 tr-font-normal tr-text-tertiary"},(0,n.sprintf)("(%s)",t.toLocaleString()))),(0,a.createElement)("span",{className:"tr-block tr-text-xs tr-text-tertiary tr-truncate"},e.detail)),r?(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-gap-1.5 tr-text-xs tr-font-medium tr-text-success tr-shrink-0"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-5 tr-h-5 tr-rounded-full tr-bg-success-bg tr-text-success"},(0,a.createElement)(L,null)),(0,n.__)("Included","thinkrank")):(0,a.createElement)("span",{className:"tr-text-xs tr-font-medium tr-text-tertiary tr-shrink-0"},(0,n.__)("Nothing yet","thinkrank")))})),Be?(0,a.createElement)("div",{className:"tr-mt-4 tr-pt-4 tr-border-t tr-border-secondary tr-flex tr-justify-end"},(0,a.createElement)("a",{href:(0,j.pO)("import-export"),className:"tr-inline-flex tr-items-center tr-justify-center tr-gap-2 tr-h-10 tr-px-4 tr-text-sm tr-font-medium tr-rounded-md tr-border tr-border-transparent tr-bg-brand tr-text-white hover:tr-bg-brand tr-no-underline tr-transition-colors tr-duration-150 focus:tr-outline-none focus:tr-ring-2 focus:tr-ring-brand focus:tr-ring-offset-1"},(0,n.__)("Open Import / Export","thinkrank"),(0,a.createElement)(v,null))):(0,a.createElement)("p",{className:"tr-mt-4 tr-pt-4 tr-border-t tr-border-secondary tr-mb-0 tr-text-sm tr-text-tertiary"},(0,n.__)("Turned off the Import / Export screen is hidden. Nothing has been deleted; switch this on whenever you want to export or restore.","thinkrank")))),Be&&(0,a.createElement)(N.Fc,{variant:"info",title:(0,n.__)("Your API keys stay here","thinkrank")},(0,n.__)("Provider API keys and verification tokens are excluded from every export, so a file is safe to hand to a teammate or keep as a backup. Re-enter them after restoring onto a new site.","thinkrank")))),(0,a.createElement)(m.K,{tabId:"migration-tools",activeTab:kt},(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-6"},(0,a.createElement)(N.Zp,{padding:!1,className:"tr-overflow-hidden"},(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-4 tr-p-6"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-11 tr-h-11 tr-rounded-xl tr-bg-brand-bg tr-text-brand tr-shrink-0"},(0,a.createElement)(A,null)),(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-0"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2.5 tr-flex-wrap"},(0,a.createElement)("h2",{className:"tr-m-0 tr-text-base tr-font-semibold tr-text-primary"},(0,n.__)("Migration Tools","thinkrank")),(0,a.createElement)(N.Ex,{variant:Ze?"good":"neutral"},Ze?(0,n.__)("On","thinkrank"):(0,n.__)("Off","thinkrank"))),(0,a.createElement)("p",{className:"tr-mt-1 tr-mb-0 tr-text-sm tr-text-secondary tr-max-w-2xl"},(0,n.__)('Bring your existing SEO data into ThinkRank. Turning this on adds a "Migration" menu item so you can import titles, descriptions, canonicals, robots rules, social meta, redirects, and settings from another SEO plugin handy if you skipped migration during setup or need to re-import updated data.',"thinkrank"))),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-items-end tr-gap-1 tr-shrink-0"},(0,a.createElement)(N.lM,{id:"thinkrank-enable-migration",checked:Ze,onChange:async e=>{const t=Ze;Ve(e),Je(!0),ze(null);try{const t=await l()({path:"/thinkrank/v1/settings",method:"POST",data:{enable_migration_tools:e}});if(!t?.success)throw new Error((0,n.__)("Failed to save the Migration Tools setting.","thinkrank"));u.A.success(e?(0,n.__)("Migration Tools enabled. Reload the page to see the Migration menu.","thinkrank"):(0,n.__)("Migration Tools disabled.","thinkrank"))}catch(e){Ve(t),u.A.error(e?.message||(0,n.__)("Failed to save the Migration Tools setting.","thinkrank"))}finally{Je(!1)}},disabled:Fe,label:(0,n.__)("Enable Migration Tools","thinkrank")}),Fe&&(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},(0,n.__)("Saving…","thinkrank")))),(0,a.createElement)("div",{className:"tr-border-t tr-border-secondary tr-p-6"},(0,a.createElement)("span",{className:"tr-block tr-text-sm tr-font-semibold tr-text-primary"},(0,n.__)("Platforms you can migrate from","thinkrank")),(0,a.createElement)("span",{className:"tr-block tr-mt-1 tr-text-sm tr-text-secondary"},(0,n.__)("ThinkRank imports SEO data directly from these plugins even after your initial setup.","thinkrank")),(0,a.createElement)("ul",{className:"tr-grid tr-grid-cols-1 sm:tr-grid-cols-2 tr-gap-2.5 tr-list-none tr-m-0 tr-mt-4 tr-p-0"},f.map(e=>(0,a.createElement)("li",{key:e.slug,className:"tr-flex tr-items-center tr-gap-3 tr-m-0 tr-px-3 tr-py-2.5 tr-rounded-lg tr-border tr-border-secondary tr-bg-white"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-9 tr-h-9 tr-rounded-lg tr-bg-gray-50 tr-border tr-border-secondary tr-shrink-0 tr-overflow-hidden"},(0,a.createElement)("img",{src:e.logo,alt:"",width:"24",height:"24",className:"tr-w-6 tr-h-6 tr-object-contain"})),(0,a.createElement)("span",{className:"tr-flex-1 tr-min-w-0"},(0,a.createElement)("span",{className:"tr-block tr-text-sm tr-font-medium tr-text-primary tr-truncate"},e.name),(0,a.createElement)("span",{className:"tr-block tr-text-xs tr-text-tertiary tr-truncate"},e.detail)),(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-gap-1.5 tr-text-xs tr-font-medium tr-text-success tr-shrink-0"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-5 tr-h-5 tr-rounded-full tr-bg-success-bg tr-text-success"},(0,a.createElement)(L,null)),(0,n.__)("Supported","thinkrank"))))),Ze&&(0,a.createElement)("div",{className:"tr-mt-4 tr-pt-4 tr-border-t tr-border-secondary tr-flex tr-justify-end"},(0,a.createElement)("a",{href:(0,j.pO)("migration"),className:"tr-inline-flex tr-items-center tr-justify-center tr-gap-2 tr-h-10 tr-px-4 tr-text-sm tr-font-medium tr-rounded-md tr-border tr-border-transparent tr-bg-brand tr-text-white hover:tr-bg-brand tr-no-underline tr-transition-colors tr-duration-150 focus:tr-outline-none focus:tr-ring-2 focus:tr-ring-brand focus:tr-ring-offset-1"},(0,n.__)("Open Migration","thinkrank"),(0,a.createElement)(v,null))))),Ze&&(0,a.createElement)(N.Fc,{variant:"warning",title:(0,n.__)("Before you re-import","thinkrank")},(0,n.__)("Running a migration again may overwrite existing ThinkRank settings and metadata where applicable. We recommend creating a database backup before re-importing.","thinkrank")))))}},87965:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}))},88219:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"}))},88242:(e,t,r)=>{"use strict";r.d(t,{A:()=>N});var a=r(51609),n=r(86087),i=r(27723),s=r(49323),l=r(1455),o=r.n(l),c=r(85161),d=r(85770),g=r(17098),M=r(10628),u=r(60775);const m={pipe:"|",dash:"-",bullet:"•",colon:":",greater:">",tilde:"~"},N=()=>{const[e,t]=(0,n.useState)(!0),[r,l]=(0,n.useState)(!1),[N,h]=(0,n.useState)({add_missing_alt:!1,alt_format:"%filename%",add_missing_title:!1,title_format:"%title% %separator% %sitename%",save_alt_to_media:!1,auto_fill_on_upload:!1,media_alt_overwrite:!1}),[p,k]=(0,n.useState)(!1),[y,x]=(0,n.useState)(null),[D,j]=(0,n.useState)("-"),[I,E]=(0,n.useState)(null),[z,T]=(0,n.useState)(!1),[f,_]=(0,n.useState)(0),A=[{label:(0,i.__)("+ Site Title","thinkrank"),value:"%sitename%"},{label:(0,i.__)("+ Post Title","thinkrank"),value:"%title%"},{label:(0,i.__)("+ Filename","thinkrank"),value:"%filename%"},{label:(0,i.__)("+ Image Title","thinkrank"),value:"%image_title%"},{label:(0,i.__)("+ Image Caption","thinkrank"),value:"%image_caption%"},{label:(0,i.__)("+ Separator","thinkrank"),value:"%separator%"},{label:(0,i.__)("+ Count","thinkrank"),value:"%count%"}],w={"%sitename%":"ThinkRank","%title%":"Advanced Image SEO","%filename%":"mountain landscape","%image_title%":"Mountain Landscape","%image_caption%":"A beautiful view of the mountains at sunset","%count%":"1"},b={...w,"%image_title%":"","%image_caption%":""},O=(e,t)=>{if(!e)return"";let r=e;return Object.keys(t).forEach(e=>{r=r.split(e).join(t[e])}),r.split(/%sep(?:arator)?%/).map(e=>e.trim()).filter(e=>""!==e).join(` ${D} `).replace(/\s+/g," ").trim()},v=e=>{const t=O(e,w),r=O(e,b);return r===t?"":r};(0,n.useEffect)(()=>{S(),C()},[]),(0,n.useEffect)(()=>{N.save_alt_to_media&&!I&&L()},[N.save_alt_to_media]);const L=async()=>{try{const e=await o()({path:"/thinkrank/v1/image-seo/media-alt/stats"});e&&E(e)}catch(e){u.A.error("Failed to load media alt stats:",e)}},S=async()=>{try{const e=await o()({path:"/thinkrank/v1/image-seo/settings"});e&&h(e)}catch(e){u.A.error("Failed to load image SEO settings:",e),x({status:"error",message:(0,i.__)("Failed to load settings. Please try again.","thinkrank")})}finally{t(!1)}},C=async()=>{try{const e=await o()({path:"/thinkrank/v1/site-identity/settings"});if(e.success&&e.data.settings.title_separator){const t=e.data.settings.title_separator;j(m[t]||"-")}}catch(e){u.A.error("Failed to load global settings:",e)}},Q=async(e=null)=>{l(!0);const t=e&&"function"==typeof e.preventDefault?N:e||N;try{const e=await o()({path:"/thinkrank/v1/image-seo/settings",method:"POST",data:t});e.success?(k(!1),x({status:"success",message:(0,i.__)("Image SEO settings saved successfully.","thinkrank")})):x({status:"error",message:e.message||(0,i.__)("Failed to save settings.","thinkrank")})}catch(e){u.A.error("Failed to save image SEO settings:",e),x({status:"error",message:(0,i.__)("An error occurred while saving settings.","thinkrank")})}finally{l(!1)}},{update:U,isSaving:Y}=(0,M.A)({settings:N,setSettings:h,save:async e=>{const t=await o()({path:"/thinkrank/v1/image-seo/settings",method:"POST",data:e});if(!t.success)throw new Error(t.message||(0,i.__)("Failed to save settings.","thinkrank"))},logLabel:"Image SEO"}),P=(e,t)=>{h(r=>({...r,[e]:t})),k(!0)},R=(e,t,r)=>(0,a.createElement)("span",{className:"thinkrank-image-seo-help",style:{display:"block"}},!r&&(0,a.createElement)("span",{className:"thinkrank-example-preview thinkrank-mb-sm",style:{display:"block",marginBottom:"8px"}},(0,a.createElement)("span",{className:"thinkrank-example-label",style:{fontSize:"10px",fontWeight:"700",textTransform:"uppercase",color:"#787c82",marginRight:"8px",letterSpacing:"1px"}},(0,i.__)("EXAMPLE","thinkrank")),(0,a.createElement)("span",{className:"thinkrank-example-value",style:{color:"#2271b1"}},(e=>O(e,w))(t))),Boolean(t)&&Boolean(v(t))&&(0,a.createElement)("span",{className:"thinkrank-example-preview",style:{display:"block",marginTop:"2px"}},(0,a.createElement)("span",{style:{fontSize:"11px",fontWeight:"600",textTransform:"uppercase",color:"#787c82",marginRight:"8px",letterSpacing:"1px"}},(0,i.__)("NO CAPTION","thinkrank")),(0,a.createElement)("span",{className:"thinkrank-example-value",style:{color:"#787c82"}},v(t))),(0,a.createElement)("span",{className:"thinkrank-help-text thinkrank-mb-xs",style:{display:"block",marginBottom:"4px"}},"alt_format"===e?(0,i.__)("Format used for the new alt attribute values.","thinkrank"):(0,i.__)("Format used for the new title attribute values.","thinkrank")),((e,t)=>(0,a.createElement)("span",{className:"thinkrank-variable-tags-container "+(t?"is-disabled":""),style:{display:"block"}},(0,i.__)("Use variables:","thinkrank")," ",A.map((r,n)=>(0,a.createElement)("button",{key:n,type:"button",disabled:t,onClick:t?void 0:()=>((e,t)=>{let r=N[e]||"";r.length>0&&!r.endsWith(" ")&&(r+=" "),P(e,r+t)})(e,r.value),className:"thinkrank-variable-tag "+(t?"is-disabled":""),title:t?void 0:(0,i.__)("Click to insert","thinkrank")},r.label))))(e,r));if(e)return(0,a.createElement)("div",{className:"tr-flex tr-justify-center tr-mt-8"},(0,a.createElement)(s.u4,{lines:3}));const Z=!!I&&(0===I.total||0===I.missing&&!N.media_alt_overwrite);return(0,a.createElement)("div",{className:"tab-content"},y&&(0,a.createElement)(s.Fc,{variant:"success"===y.status?"success":"error",onDismiss:()=>x(null),className:"tr-mb-4"},y.message),(0,a.createElement)(c.A,{title:(0,i.__)("Image SEO Settings","thinkrank"),notice:null,onNoticeRemove:()=>x(null)},(0,a.createElement)(s.mc,{direction:"column",gap:4},(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)(d.A,{title:(0,i.__)("Alt Attribute Settings","thinkrank"),description:(0,i.__)("Automatically generate missing alt attributes for images.","thinkrank"),trailing:(0,a.createElement)(s.lM,{checked:N.add_missing_alt,onChange:e=>U({add_missing_alt:e},e?(0,i.__)("Image alt text is on.","thinkrank"):(0,i.__)("Image alt text is off.","thinkrank")),label:(0,i.__)("Enable alt attributes","thinkrank"),disabled:Y})}),(0,a.createElement)(s.mc,{direction:"column",gap:6,className:"tr-px-6 tr-py-6 tr-divide-y tr-divide-line-2"},!N.add_missing_alt&&(0,a.createElement)(s.Fc,{variant:"warning"},(0,i.__)("This feature is disabled. Enable it to access configuration options.","thinkrank")),N.add_missing_alt&&!N.alt_format?.trim()&&(0,a.createElement)(s.Fc,{variant:"warning"},/* translators: %filename% is a literal token variable and must not be translated */ /* translators: %filename% is a literal token variable and must not be translated */ | |
| 141 | +(0,n.__)("%d models available on this endpoint.","thinkrank"),a.length)),!$.trim()&&a.length>0&&(K(a[0]),d(a[0]))}catch(e){g.A.error("Failed to list endpoint models:",e),q.trim()===t&&(ge.current="",de([]),u.A.error(e?.message||(0,n.__)("Could not list models. Type the model id by hand instead.","thinkrank")))}finally{ue(!1)}}else u.A.error((0,n.__)("Enter your endpoint base URL first.","thinkrank"))},loading:Me,disabled:!q.trim(),className:"tr-self-start"},(0,n.__)("Load models","thinkrank")),ce.length>0&&(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0"},(0,n.sprintf)(/* translators: %s: comma-separated model ids. */ /* translators: %s: comma-separated model ids. */ | |
| 142 | +(0,n.__)("Available: %s","thinkrank"),ce.slice(0,8).join(", ")))),(0,a.createElement)(N.pd,{type:"number",label:(0,n.__)("Request timeout (seconds)","thinkrank"),value:te,min:10,max:600,onChange:e=>re(e.target.value),description:(0,n.__)("A local model on CPU can take minutes for a content brief. Raise this if generation times out.","thinkrank")}),(0,a.createElement)(N.lM,{id:"thinkrank-endpoint-supports-images",checked:ae,onChange:ne,label:(0,n.__)("This model can describe images","thinkrank"),description:(0,n.__)("Turn on only for a vision model (llava, gpt-4o, a Gemini deployment). AI alt text stays hidden while this is off, because a text-only model answers a vision request with an error.","thinkrank")}),(0,a.createElement)(N.lM,{id:"thinkrank-endpoint-json-mode",checked:ie,onChange:se,label:(0,n.__)("Force valid JSON answers","thinkrank"),description:(0,n.__)("Sends response_format json_object, which Ollama, vLLM and llama.cpp use to stop a small model breaking the JSON of a content brief or metadata. Leave off for a server that rejects it (LM Studio accepts only json_schema).","thinkrank")}),(0,a.createElement)(N.pd,{type:"number",label:(0,n.__)("Price per 1M tokens (optional)","thinkrank"),value:le,min:0,step:"0.01",onChange:e=>oe(e.target.value),placeholder:"0.00",description:(0,n.__)("Only for cost estimates. Leave empty when the model is free or you do not want estimates. Usage is then reported without a cost rather than as zero.","thinkrank")})):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(N.l6,{label:`${_t} ${(0,n.__)("Model","thinkrank")}`,value:me?P:vt,options:Ot,onChange:e=>{var t;(t=e.target.value)!==P?(Ne(!1),Lt(t)):Ne(!0)},description:(0,n.__)("Model used for all AI content generation.","thinkrank")}),me&&(0,a.createElement)(N.pd,{label:(0,n.__)("Custom model","thinkrank"),value:vt,onChange:e=>Lt(e.target.value),placeholder:"openrouter"===r?"vendor/model-name":"model-name",description:(0,n.__)("Enter the exact model id from your provider. Use this to run a newly released or unlisted model.","thinkrank")})))):(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-items-center tr-gap-1.5 tr-py-8 tr-px-4 tr-rounded-lg tr-border tr-border-dashed tr-border-secondary tr-text-center"},(0,a.createElement)("p",{className:"tr-text-sm tr-font-medium tr-text-primary tr-m-0"},(0,n.__)("Choose an AI provider to get started","thinkrank")),(0,a.createElement)("p",{className:"tr-text-sm tr-text-tertiary tr-m-0"},(0,n.__)("Select a provider above, then add its API key to enable AI features.","thinkrank"))),(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-3 tr-mt-5"},(0,a.createElement)(N.$n,{variant:"primary",onClick:async()=>{if(r){if(r===G){if(!q.trim())return void u.A.error((0,n.__)("Enter the base URL of your endpoint, for example http://localhost:11434/v1","thinkrank"));if(!$.trim())return void u.A.error((0,n.__)("Enter the model id your endpoint should use, for example llama3.1","thinkrank"))}else if(!e.trim()&&!Ee){const e=Y[r]||r;return void u.A.error((0,n.sprintf)(/* translators: %s: AI provider name (e.g. OpenAI, Claude). */ /* translators: %s: AI provider name (e.g. OpenAI, Claude). */ | |
| 143 | +(0,n.__)("Enter your %s API key for the selected provider.","thinkrank"),e))}if(e.trim()){const t=zt(e,r);if(!t.valid)return void u.A.error(t.message)}pe(!0),Ie(null);try{const a={ai_provider:r,keep_data_on_uninstall:!Ue,enable_migration_tools:Pe};e.trim()&&(a[`${r}_api_key`]=e),"claude"===r?a.claude_model=k:"gemini"===r?a.gemini_model=x:"openrouter"===r?a.openrouter_model=H:r===G?(a.openai_compatible_base_url=q.trim(),a.openai_compatible_model=$.trim(),a.openai_compatible_timeout=Number(te),a.openai_compatible_supports_images=ae,a.openai_compatible_json_mode=ie,a.openai_compatible_price_per_million=""===le?0:Number(le)):a.openai_model=h;const i=await l()({path:"/thinkrank/v1/settings",method:"POST",data:a});i.success?(u.A.success((0,n.__)("Settings saved successfully!","thinkrank")),e.trim()&&(ze(!0),t(""),window.thinkrankAdmin&&(window.thinkrankAdmin.aiConfigured=!0)),r===G&&window.thinkrankAdmin&&(window.thinkrankAdmin.aiConfigured=!0),await Tt()):u.A.error(i.message||(0,n.__)("Failed to save settings.","thinkrank"))}catch(e){g.A.error("Failed to save settings:",e),u.A.error(e?.message||(0,n.__)("Failed to save settings. Please try again.","thinkrank"))}finally{pe(!1)}}else u.A.error((0,n.__)("Choose an AI provider first.","thinkrank"))},loading:he,disabled:xe||!r},(0,n.__)("Save Settings","thinkrank")),(0,a.createElement)(N.$n,{variant:"secondary",onClick:async()=>{const t=e.trim();if(r===G&&!q.trim())return void u.A.error((0,n.__)("Enter your endpoint base URL first.","thinkrank"));if(r!==G&&!t&&!Ee)return void u.A.error((0,n.__)("Please enter an API key first.","thinkrank"));if(t){const t=zt(e,r);if(!t.valid)return void u.A.error(t.message)}De(!0),Ie(null);const a=("claude"===r?k:"gemini"===r?x:"openrouter"===r?H:r===G?$:h)?.trim();try{const i=await l()({path:"/thinkrank/v1/ai/test-connection",method:"POST",data:{provider:r,...t?{api_key:e}:{},...a?{model:a}:{},...r===G?{base_url:q.trim(),json_mode:ie}:{}}});if(i?.success&&!1===i.json_mode_supported)u.A.warning(i.message);else if(i&&i.success)u.A.success(i.message||(0,n.__)("API connection successful!","thinkrank"));else{const e=i?.message||(0,n.__)("API connection failed. Please check your API key and try again.","thinkrank");u.A.error(e)}}catch(e){g.A.error("Failed to test connection:",e);let t=(0,n.__)("Failed to test API connection.","thinkrank");e.message&&(t=e.message.includes("fetch")?(0,n.__)("Network error. Please check your internet connection.","thinkrank"):e.message.includes("401")||e.message.includes("403")?(0,n.__)("Invalid API key. Please check your credentials.","thinkrank"):e.message.includes("429")?(0,n.__)("Rate limit exceeded. Please try again later.","thinkrank"):`${(0,n.__)("Connection failed:","thinkrank")} ${e.message}`),u.A.error(t)}finally{De(!1)}},loading:xe,disabled:he||!r||(r===G?!q.trim():!e.trim()&&!Ee)},(0,n.__)("Test Connection","thinkrank")),Ee&&(0,a.createElement)(N.$n,{variant:"danger",onClick:async()=>{if(Ee){if(confirm((0,n.__)("Are you sure you want to clear the saved API key? This action cannot be undone.","thinkrank"))){pe(!0),Ie(null);try{const e=await l()({path:"/thinkrank/v1/settings",method:"POST",data:{[`${r}_api_key`]:""}});e.success?(u.A.success((0,n.__)("API key cleared successfully.","thinkrank")),ze(!1),t(""),await Tt()):u.A.error(e.message||(0,n.__)("Failed to clear API key.","thinkrank"))}catch(e){g.A.error("Failed to clear API key:",e),u.A.error((0,n.__)("Failed to clear API key. Please try again.","thinkrank"))}finally{pe(!1)}}}else u.A.warning((0,n.__)("No API key is currently saved.","thinkrank"))},disabled:he||xe},(0,n.__)("Clear API Key","thinkrank")))),(0,a.createElement)(N.Zp,{padding:!1,className:"tr-overflow-hidden"},(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-4 tr-p-6"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-11 tr-h-11 tr-rounded-xl tr-bg-brand-bg tr-text-brand tr-shrink-0"},(0,a.createElement)(b,null)),(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-0"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2.5 tr-flex-wrap"},(0,a.createElement)("h2",{className:"tr-m-0 tr-text-base tr-font-semibold tr-text-primary"},(0,n.__)("AI usage limits","thinkrank")),(0,a.createElement)(N.Ex,{variant:Xe?"warning":"good"},Xe?(0,n.__)("Paused","thinkrank"):(0,n.__)("Active","thinkrank"))),(0,a.createElement)("p",{className:"tr-mt-1 tr-mb-0 tr-text-sm tr-text-secondary tr-max-w-2xl"},(0,n.__)("Cap what ThinkRank may spend on your AI provider key, or stop it outright. Both limits apply to every AI feature, including the ones that run on a schedule.","thinkrank"))),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-items-end tr-gap-1 tr-shrink-0"},(0,a.createElement)(N.lM,{id:"thinkrank-ai-paused",checked:Xe,onChange:async e=>{const t=Xe;$e(e),at(!0),Ie(null);try{const t=await l()({path:"/thinkrank/v1/settings",method:"POST",data:{ai_paused:e}});if(!t?.success)throw new Error((0,n.__)("Failed to save the AI pause setting.","thinkrank"));u.A.success(e?(0,n.__)("AI paused. ThinkRank will not send any requests to your AI provider until you turn this back off.","thinkrank"):(0,n.__)("AI resumed.","thinkrank")),ft()}catch(e){$e(t),u.A.error(e?.message||(0,n.__)("Failed to save the AI pause setting.","thinkrank"))}finally{at(!1)}},disabled:rt,label:(0,n.__)("Pause all AI","thinkrank")}),rt&&(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},(0,n.__)("Saving…","thinkrank")))),(0,a.createElement)("div",{className:"tr-border-t tr-border-secondary tr-p-6 tr-flex tr-flex-col tr-gap-5"},Xe&&(0,a.createElement)(N.Fc,{variant:"warning"},(0,n.__)("AI is paused. No requests are being sent to your provider, so AI features will report that they are unavailable until you turn this back off. Your API key is untouched.","thinkrank")),st&&(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"tr-flex tr-items-baseline tr-justify-between tr-gap-3 tr-flex-wrap"},(0,a.createElement)("span",{className:"tr-text-sm tr-font-semibold tr-text-primary"},(0,n.__)("Used today","thinkrank")),(0,a.createElement)("span",{className:"tr-text-sm tr-text-secondary"},st.daily_limit>0?(0,n.sprintf)(/* translators: 1: requests used today, 2: daily request limit. */ /* translators: 1: requests used today, 2: daily request limit. */ | |
| 144 | +(0,n.__)("%1$s of %2$s requests","thinkrank"),st.used_today,st.daily_limit):(0,n.sprintf)(/* translators: %s: requests used today. */ /* translators: %s: requests used today. */ | |
| 145 | +(0,n.__)("%s requests, no daily limit set","thinkrank"),st.used_today))),st.daily_limit>0&&(0,a.createElement)("div",{className:"tr-mt-2 tr-h-2 tr-w-full tr-rounded-full tr-bg-secondary tr-overflow-hidden",role:"progressbar","aria-valuenow":st.used_today,"aria-valuemin":0,"aria-valuemax":st.daily_limit},(0,a.createElement)("div",{className:c()("tr-h-full tr-rounded-full",st.used_today>=st.daily_limit?"tr-bg-danger":"tr-bg-brand"),style:{width:`${Math.min(100,Math.round(st.used_today/st.daily_limit*100))}%`}})),(0,a.createElement)("p",{className:"tr-mt-2 tr-mb-0 tr-text-xs tr-text-tertiary"},(0,n.__)("The count covers every AI request this site sends and resets at midnight, site time.","thinkrank"))),(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-1 md:tr-grid-cols-2 tr-gap-4"},(0,a.createElement)(N.pd,{id:"thinkrank-ai-daily-limit",type:"number",min:0,value:Ke,onChange:e=>qe(parseInt(e.target.value,10)||0),label:(0,n.__)("Daily request limit","thinkrank"),description:(0,n.__)("Most AI requests this site may send in a day. 0 means no daily limit.","thinkrank")}),(0,a.createElement)(N.pd,{id:"thinkrank-ai-per-minute",type:"number",min:0,value:et,onChange:e=>tt(parseInt(e.target.value,10)||0),label:(0,n.__)("Requests per minute","thinkrank"),description:(0,n.__)("Most AI requests one user may send in a minute. 0 means no per-minute limit.","thinkrank")})),(0,a.createElement)("div",null,(0,a.createElement)(N.$n,{variant:"primary",onClick:async()=>{it(!0),Ie(null);try{const e=await l()({path:"/thinkrank/v1/settings",method:"POST",data:{ai_daily_request_limit:Math.max(0,Number(Ke)||0),max_requests_per_minute:Math.max(0,Number(et)||0)}});if(!e?.success)throw new Error(e?.message||(0,n.__)("Failed to save the AI limits.","thinkrank"));u.A.success((0,n.__)("AI limits saved.","thinkrank")),ft()}catch(e){g.A.error("Failed to save AI limits:",e),u.A.error(e?.message||(0,n.__)("Failed to save the AI limits.","thinkrank"))}finally{it(!1)}},loading:nt},(0,n.__)("Save limits","thinkrank")))))),(0,a.createElement)(J,{activeProvider:St,activeProviderId:Te,activeModelState:Ct,activeHasKey:_e,providers:bt,providerKeyDocs:Qt}))),(0,a.createElement)(m.K,{tabId:"data-management",activeTab:ht},(0,a.createElement)(N.Zp,{padding:!1,className:"tr-overflow-hidden"},(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-4 tr-p-6"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-11 tr-h-11 tr-rounded-xl tr-bg-brand-bg tr-text-brand tr-shrink-0"},(0,a.createElement)(w,null)),(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-0"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2.5 tr-flex-wrap"},(0,a.createElement)("h2",{className:"tr-m-0 tr-text-base tr-font-semibold tr-text-primary"},(0,n.__)("Data Management","thinkrank")),(0,a.createElement)(N.Ex,{variant:Ue?"warning":"neutral"},Ue?(0,n.__)("On","thinkrank"):(0,n.__)("Off","thinkrank"))),(0,a.createElement)("p",{className:"tr-mt-1 tr-mb-0 tr-text-sm tr-text-secondary tr-max-w-2xl"},(0,n.__)("Control what happens to your data when the plugin is removed. When enabled, all plugin data including API keys, content briefs, and configuration will be permanently erased on uninstall.","thinkrank"))),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-items-end tr-gap-1 tr-shrink-0"},(0,a.createElement)(N.lM,{id:"thinkrank-delete-on-uninstall",checked:Ue,onChange:Ye,label:(0,n.__)("Delete all data on uninstall","thinkrank")}))),(0,a.createElement)("div",{className:"tr-border-t tr-border-secondary tr-p-6 tr-flex tr-flex-col tr-gap-5"},Ue&&(0,a.createElement)(N.Fc,{variant:"warning"},(0,n.__)("Data deletion is enabled. Uninstalling ThinkRank will permanently erase all settings and content briefs. This cannot be undone.","thinkrank")),(0,a.createElement)("div",{className:"tr-grid tr-grid-cols-1 sm:tr-grid-cols-2 tr-gap-4"},(0,a.createElement)("div",{className:"tr-rounded-xl tr-border tr-border-success/30 tr-bg-success-bg tr-p-4"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2.5 tr-mb-3 tr-pb-3 tr-border-b tr-border-success/20"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-8 tr-h-8 tr-rounded-lg tr-bg-success/10 tr-shrink-0"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-success",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M5 13l4 4L19 7"}))),(0,a.createElement)("div",{className:"tr-min-w-0"},(0,a.createElement)("p",{className:"tr-text-sm tr-font-semibold tr-text-success tr-m-0 tr-leading-tight"},(0,n.__)("Preserved by default","thinkrank")),(0,a.createElement)("p",{className:"tr-text-xs tr-text-success/70 tr-m-0 tr-mt-0.5"},(0,n.__)("Kept after uninstall","thinkrank")))),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-0 tr-list-none tr-flex tr-flex-col tr-gap-2"},[(0,n.__)("API keys & provider settings","thinkrank"),(0,n.__)("Generated content briefs","thinkrank"),(0,n.__)("Plugin configuration","thinkrank")].map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-flex tr-items-center tr-gap-2 tr-text-sm tr-text-secondary"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-success tr-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M5 13l4 4L19 7"})),e)))),(0,a.createElement)("div",{className:"tr-rounded-xl tr-border tr-border-secondary tr-bg-white tr-p-4"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2.5 tr-mb-3 tr-pb-3 tr-border-b tr-border-secondary"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-8 tr-h-8 tr-rounded-lg tr-bg-line-2 tr-shrink-0"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-tertiary",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))),(0,a.createElement)("div",{className:"tr-min-w-0"},(0,a.createElement)("p",{className:"tr-text-sm tr-font-semibold tr-text-secondary tr-m-0 tr-leading-tight"},(0,n.__)("Always cleaned up","thinkrank")),(0,a.createElement)("p",{className:"tr-text-xs tr-text-tertiary tr-m-0 tr-mt-0.5"},(0,n.__)("Removed on uninstall","thinkrank")))),(0,a.createElement)("ul",{className:"tr-m-0 tr-pl-0 tr-list-none tr-flex tr-flex-col tr-gap-2"},[(0,n.__)("Temporary cache data","thinkrank"),(0,n.__)("Usage analytics","thinkrank"),(0,n.__)("Plugin activation flags","thinkrank")].map((e,t)=>(0,a.createElement)("li",{key:t,className:"tr-flex tr-items-center tr-gap-2 tr-text-sm tr-text-secondary"},(0,a.createElement)("svg",{className:"tr-w-4 tr-h-4 tr-text-tertiary tr-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M6 12h12"})),e))))),(0,a.createElement)("div",{className:"tr-flex tr-justify-end"},(0,a.createElement)(N.$n,{variant:"primary",onClick:async()=>{Je(!0),Ie(null);try{const e=await l()({path:"/thinkrank/v1/settings",method:"POST",data:{keep_data_on_uninstall:!Ue}});if(!e?.success)throw new Error(e?.message||(0,n.__)("Failed to save settings.","thinkrank"));u.A.success((0,n.__)("Settings saved successfully!","thinkrank"))}catch(e){g.A.error("Failed to save data management settings:",e),u.A.error(e?.message||(0,n.__)("Failed to save settings. Please try again.","thinkrank"))}finally{Je(!1)}},loading:Fe},(0,n.__)("Save Settings","thinkrank")))))),(0,a.createElement)(m.K,{tabId:"import-export",activeTab:ht},(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-6"},(0,a.createElement)(N.Zp,{padding:!1,className:"tr-overflow-hidden"},(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-4 tr-p-6"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-11 tr-h-11 tr-rounded-xl tr-bg-brand-bg tr-text-brand tr-shrink-0"},(0,a.createElement)(O,null)),(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-0"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2.5 tr-flex-wrap"},(0,a.createElement)("h2",{className:"tr-m-0 tr-text-base tr-font-semibold tr-text-primary"},(0,n.__)("Import / Export","thinkrank")),(0,a.createElement)(N.Ex,{variant:Ze?"good":"neutral"},Ze?(0,n.__)("On","thinkrank"):(0,n.__)("Off","thinkrank")),Ze&&ot?.total>0&&(0,a.createElement)(N.Ex,{variant:"neutral"},(0,n.sprintf)(/* translators: %s: formatted record count. */ /* translators: %s: formatted record count. */ | |
| 146 | +(0,n.__)("%s records","thinkrank"),Number(ot.total).toLocaleString()))),(0,a.createElement)("p",{className:"tr-mt-1 tr-mb-0 tr-text-sm tr-text-secondary tr-max-w-2xl"},(0,n.__)("Download everything ThinkRank stores as a single file, and load it back on this site or any other. Useful as a backup before big changes, for moving a site, or simply so your SEO data is never locked in here.","thinkrank"))),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-items-end tr-gap-1 tr-shrink-0"},(0,a.createElement)(N.lM,{id:"thinkrank-enable-import-export",checked:Ze,onChange:async e=>{const t=Ze;Ve(e),Ge(!0),Ie(null);try{const t=await l()({path:"/thinkrank/v1/settings",method:"POST",data:{enable_import_export:e}});if(!t?.success)throw new Error((0,n.__)("Failed to save the Import / Export setting.","thinkrank"));u.A.success(e?(0,n.__)("Import / Export enabled. Reload the page to see the menu item.","thinkrank"):(0,n.__)("Import / Export disabled. Your data is untouched. Turn it back on any time to export it.","thinkrank"))}catch(e){Ve(t),u.A.error(e?.message||(0,n.__)("Failed to save the Import / Export setting.","thinkrank"))}finally{Ge(!1)}},disabled:Be,label:(0,n.__)("Enable Import / Export","thinkrank")}),Be&&(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},(0,n.__)("Saving…","thinkrank")))),(0,a.createElement)("div",{className:"tr-border-t tr-border-secondary tr-p-6"},(0,a.createElement)("span",{className:"tr-block tr-text-sm tr-font-semibold tr-text-primary"},(0,n.__)("What an export includes","thinkrank")),(0,a.createElement)("span",{className:"tr-block tr-mt-1 tr-text-sm tr-text-secondary"},(0,n.__)("Everything below travels in one JSON file. A CSV view of your post SEO data is available too, for spreadsheets or another plugin’s importer.","thinkrank")),dt&&(0,a.createElement)("div",{className:"tr-mt-4"},(0,a.createElement)(N.u4,null)),Mt&&!dt&&(0,a.createElement)("div",{className:"tr-mt-4"},(0,a.createElement)(N.Fc,{variant:"warning"},(0,n.__)("Could not read your data counts just now. The export itself is unaffected. Open Import / Export to run one.","thinkrank"))),!dt&&!Mt&&(0,a.createElement)("ul",{className:"tr-grid tr-grid-cols-1 sm:tr-grid-cols-2 tr-gap-2.5 tr-list-none tr-m-0 tr-mt-4 tr-p-0"},_.map(e=>{const t=Number(ot?.counts?.[e.type]||0),r=e.countless||t>0;return(0,a.createElement)("li",{key:e.type,className:"tr-flex tr-items-center tr-gap-3 tr-m-0 tr-px-3 tr-py-2.5 tr-rounded-lg tr-border tr-border-secondary tr-bg-white"},(0,a.createElement)("span",{className:"tr-flex-1 tr-min-w-0"},(0,a.createElement)("span",{className:"tr-block tr-text-sm tr-font-medium tr-text-primary tr-truncate"},e.name,!e.countless&&t>0&&(0,a.createElement)("span",{className:"tr-ml-1 tr-font-normal tr-text-tertiary"},(0,n.sprintf)("(%s)",t.toLocaleString()))),(0,a.createElement)("span",{className:"tr-block tr-text-xs tr-text-tertiary tr-truncate"},e.detail)),r?(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-gap-1.5 tr-text-xs tr-font-medium tr-text-success tr-shrink-0"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-5 tr-h-5 tr-rounded-full tr-bg-success-bg tr-text-success"},(0,a.createElement)(L,null)),(0,n.__)("Included","thinkrank")):(0,a.createElement)("span",{className:"tr-text-xs tr-font-medium tr-text-tertiary tr-shrink-0"},(0,n.__)("Nothing yet","thinkrank")))})),Ze?(0,a.createElement)("div",{className:"tr-mt-4 tr-pt-4 tr-border-t tr-border-secondary tr-flex tr-justify-end"},(0,a.createElement)("a",{href:(0,j.pO)("import-export"),className:"tr-inline-flex tr-items-center tr-justify-center tr-gap-2 tr-h-10 tr-px-4 tr-text-sm tr-font-medium tr-rounded-md tr-border tr-border-transparent tr-bg-brand tr-text-white hover:tr-bg-brand tr-no-underline tr-transition-colors tr-duration-150 focus:tr-outline-none focus:tr-ring-2 focus:tr-ring-brand focus:tr-ring-offset-1"},(0,n.__)("Open Import / Export","thinkrank"),(0,a.createElement)(v,null))):(0,a.createElement)("p",{className:"tr-mt-4 tr-pt-4 tr-border-t tr-border-secondary tr-mb-0 tr-text-sm tr-text-tertiary"},(0,n.__)("Turned off the Import / Export screen is hidden. Nothing has been deleted; switch this on whenever you want to export or restore.","thinkrank")))),Ze&&(0,a.createElement)(N.Fc,{variant:"info",title:(0,n.__)("Your API keys stay here","thinkrank")},(0,n.__)("Provider API keys and verification tokens are excluded from every export, so a file is safe to hand to a teammate or keep as a backup. Re-enter them after restoring onto a new site.","thinkrank")))),(0,a.createElement)(m.K,{tabId:"migration-tools",activeTab:ht},(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-gap-6"},(0,a.createElement)(N.Zp,{padding:!1,className:"tr-overflow-hidden"},(0,a.createElement)("div",{className:"tr-flex tr-items-start tr-gap-4 tr-p-6"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-11 tr-h-11 tr-rounded-xl tr-bg-brand-bg tr-text-brand tr-shrink-0"},(0,a.createElement)(A,null)),(0,a.createElement)("div",{className:"tr-flex-1 tr-min-w-0"},(0,a.createElement)("div",{className:"tr-flex tr-items-center tr-gap-2.5 tr-flex-wrap"},(0,a.createElement)("h2",{className:"tr-m-0 tr-text-base tr-font-semibold tr-text-primary"},(0,n.__)("Migration Tools","thinkrank")),(0,a.createElement)(N.Ex,{variant:Pe?"good":"neutral"},Pe?(0,n.__)("On","thinkrank"):(0,n.__)("Off","thinkrank"))),(0,a.createElement)("p",{className:"tr-mt-1 tr-mb-0 tr-text-sm tr-text-secondary tr-max-w-2xl"},(0,n.__)('Bring your existing SEO data into ThinkRank. Turning this on adds a "Migration" menu item so you can import titles, descriptions, canonicals, robots rules, social meta, redirects, and settings from another SEO plugin handy if you skipped migration during setup or need to re-import updated data.',"thinkrank"))),(0,a.createElement)("div",{className:"tr-flex tr-flex-col tr-items-end tr-gap-1 tr-shrink-0"},(0,a.createElement)(N.lM,{id:"thinkrank-enable-migration",checked:Pe,onChange:async e=>{const t=Pe;Re(e),He(!0),Ie(null);try{const t=await l()({path:"/thinkrank/v1/settings",method:"POST",data:{enable_migration_tools:e}});if(!t?.success)throw new Error((0,n.__)("Failed to save the Migration Tools setting.","thinkrank"));u.A.success(e?(0,n.__)("Migration Tools enabled. Reload the page to see the Migration menu.","thinkrank"):(0,n.__)("Migration Tools disabled.","thinkrank"))}catch(e){Re(t),u.A.error(e?.message||(0,n.__)("Failed to save the Migration Tools setting.","thinkrank"))}finally{He(!1)}},disabled:We,label:(0,n.__)("Enable Migration Tools","thinkrank")}),We&&(0,a.createElement)("span",{className:"tr-text-xs tr-text-tertiary"},(0,n.__)("Saving…","thinkrank")))),(0,a.createElement)("div",{className:"tr-border-t tr-border-secondary tr-p-6"},(0,a.createElement)("span",{className:"tr-block tr-text-sm tr-font-semibold tr-text-primary"},(0,n.__)("Platforms you can migrate from","thinkrank")),(0,a.createElement)("span",{className:"tr-block tr-mt-1 tr-text-sm tr-text-secondary"},(0,n.__)("ThinkRank imports SEO data directly from these plugins even after your initial setup.","thinkrank")),(0,a.createElement)("ul",{className:"tr-grid tr-grid-cols-1 sm:tr-grid-cols-2 tr-gap-2.5 tr-list-none tr-m-0 tr-mt-4 tr-p-0"},f.map(e=>(0,a.createElement)("li",{key:e.slug,className:"tr-flex tr-items-center tr-gap-3 tr-m-0 tr-px-3 tr-py-2.5 tr-rounded-lg tr-border tr-border-secondary tr-bg-white"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-9 tr-h-9 tr-rounded-lg tr-bg-gray-50 tr-border tr-border-secondary tr-shrink-0 tr-overflow-hidden"},(0,a.createElement)("img",{src:e.logo,alt:"",width:"24",height:"24",className:"tr-w-6 tr-h-6 tr-object-contain"})),(0,a.createElement)("span",{className:"tr-flex-1 tr-min-w-0"},(0,a.createElement)("span",{className:"tr-block tr-text-sm tr-font-medium tr-text-primary tr-truncate"},e.name),(0,a.createElement)("span",{className:"tr-block tr-text-xs tr-text-tertiary tr-truncate"},e.detail)),(0,a.createElement)("span",{className:"tr-inline-flex tr-items-center tr-gap-1.5 tr-text-xs tr-font-medium tr-text-success tr-shrink-0"},(0,a.createElement)("span",{className:"tr-flex tr-items-center tr-justify-center tr-w-5 tr-h-5 tr-rounded-full tr-bg-success-bg tr-text-success"},(0,a.createElement)(L,null)),(0,n.__)("Supported","thinkrank"))))),Pe&&(0,a.createElement)("div",{className:"tr-mt-4 tr-pt-4 tr-border-t tr-border-secondary tr-flex tr-justify-end"},(0,a.createElement)("a",{href:(0,j.pO)("migration"),className:"tr-inline-flex tr-items-center tr-justify-center tr-gap-2 tr-h-10 tr-px-4 tr-text-sm tr-font-medium tr-rounded-md tr-border tr-border-transparent tr-bg-brand tr-text-white hover:tr-bg-brand tr-no-underline tr-transition-colors tr-duration-150 focus:tr-outline-none focus:tr-ring-2 focus:tr-ring-brand focus:tr-ring-offset-1"},(0,n.__)("Open Migration","thinkrank"),(0,a.createElement)(v,null))))),Pe&&(0,a.createElement)(N.Fc,{variant:"warning",title:(0,n.__)("Before you re-import","thinkrank")},(0,n.__)("Running a migration again may overwrite existing ThinkRank settings and metadata where applicable. We recommend creating a database backup before re-importing.","thinkrank")))))}},87965:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"}))},88219:(e,t,r)=>{"use strict";var a=r(51609),n=r(5573);(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"}))},88242:(e,t,r)=>{"use strict";r.d(t,{A:()=>N});var a=r(51609),n=r(86087),i=r(27723),s=r(49323),l=r(1455),o=r.n(l),c=r(85161),d=r(85770),g=r(17098),M=r(10628),u=r(60775);const m={pipe:"|",dash:"-",bullet:"•",colon:":",greater:">",tilde:"~"},N=()=>{const[e,t]=(0,n.useState)(!0),[r,l]=(0,n.useState)(!1),[N,h]=(0,n.useState)({add_missing_alt:!1,alt_format:"%filename%",add_missing_title:!1,title_format:"%title% %separator% %sitename%",save_alt_to_media:!1,auto_fill_on_upload:!1,media_alt_overwrite:!1}),[p,k]=(0,n.useState)(!1),[y,x]=(0,n.useState)(null),[D,j]=(0,n.useState)("-"),[I,E]=(0,n.useState)(null),[z,T]=(0,n.useState)(!1),[f,_]=(0,n.useState)(0),A=[{label:(0,i.__)("+ Site Title","thinkrank"),value:"%sitename%"},{label:(0,i.__)("+ Post Title","thinkrank"),value:"%title%"},{label:(0,i.__)("+ Filename","thinkrank"),value:"%filename%"},{label:(0,i.__)("+ Image Title","thinkrank"),value:"%image_title%"},{label:(0,i.__)("+ Image Caption","thinkrank"),value:"%image_caption%"},{label:(0,i.__)("+ Separator","thinkrank"),value:"%separator%"},{label:(0,i.__)("+ Count","thinkrank"),value:"%count%"}],w={"%sitename%":"ThinkRank","%title%":"Advanced Image SEO","%filename%":"mountain landscape","%image_title%":"Mountain Landscape","%image_caption%":"A beautiful view of the mountains at sunset","%count%":"1"},b={...w,"%image_title%":"","%image_caption%":""},O=(e,t)=>{if(!e)return"";let r=e;return Object.keys(t).forEach(e=>{r=r.split(e).join(t[e])}),r.split(/%sep(?:arator)?%/).map(e=>e.trim()).filter(e=>""!==e).join(` ${D} `).replace(/\s+/g," ").trim()},v=e=>{const t=O(e,w),r=O(e,b);return r===t?"":r};(0,n.useEffect)(()=>{S(),C()},[]),(0,n.useEffect)(()=>{N.save_alt_to_media&&!I&&L()},[N.save_alt_to_media]);const L=async()=>{try{const e=await o()({path:"/thinkrank/v1/image-seo/media-alt/stats"});e&&E(e)}catch(e){u.A.error("Failed to load media alt stats:",e)}},S=async()=>{try{const e=await o()({path:"/thinkrank/v1/image-seo/settings"});e&&h(e)}catch(e){u.A.error("Failed to load image SEO settings:",e),x({status:"error",message:(0,i.__)("Failed to load settings. Please try again.","thinkrank")})}finally{t(!1)}},C=async()=>{try{const e=await o()({path:"/thinkrank/v1/site-identity/settings"});if(e.success&&e.data.settings.title_separator){const t=e.data.settings.title_separator;j(m[t]||"-")}}catch(e){u.A.error("Failed to load global settings:",e)}},Q=async(e=null)=>{l(!0);const t=e&&"function"==typeof e.preventDefault?N:e||N;try{const e=await o()({path:"/thinkrank/v1/image-seo/settings",method:"POST",data:t});e.success?(k(!1),x({status:"success",message:(0,i.__)("Image SEO settings saved successfully.","thinkrank")})):x({status:"error",message:e.message||(0,i.__)("Failed to save settings.","thinkrank")})}catch(e){u.A.error("Failed to save image SEO settings:",e),x({status:"error",message:(0,i.__)("An error occurred while saving settings.","thinkrank")})}finally{l(!1)}},{update:U,isSaving:Y}=(0,M.A)({settings:N,setSettings:h,save:async e=>{const t=await o()({path:"/thinkrank/v1/image-seo/settings",method:"POST",data:e});if(!t.success)throw new Error(t.message||(0,i.__)("Failed to save settings.","thinkrank"))},logLabel:"Image SEO"}),P=(e,t)=>{h(r=>({...r,[e]:t})),k(!0)},R=(e,t,r)=>(0,a.createElement)("span",{className:"thinkrank-image-seo-help",style:{display:"block"}},!r&&(0,a.createElement)("span",{className:"thinkrank-example-preview thinkrank-mb-sm",style:{display:"block",marginBottom:"8px"}},(0,a.createElement)("span",{className:"thinkrank-example-label",style:{fontSize:"10px",fontWeight:"700",textTransform:"uppercase",color:"#787c82",marginRight:"8px",letterSpacing:"1px"}},(0,i.__)("EXAMPLE","thinkrank")),(0,a.createElement)("span",{className:"thinkrank-example-value",style:{color:"#2271b1"}},(e=>O(e,w))(t))),Boolean(t)&&Boolean(v(t))&&(0,a.createElement)("span",{className:"thinkrank-example-preview",style:{display:"block",marginTop:"2px"}},(0,a.createElement)("span",{style:{fontSize:"11px",fontWeight:"600",textTransform:"uppercase",color:"#787c82",marginRight:"8px",letterSpacing:"1px"}},(0,i.__)("NO CAPTION","thinkrank")),(0,a.createElement)("span",{className:"thinkrank-example-value",style:{color:"#787c82"}},v(t))),(0,a.createElement)("span",{className:"thinkrank-help-text thinkrank-mb-xs",style:{display:"block",marginBottom:"4px"}},"alt_format"===e?(0,i.__)("Format used for the new alt attribute values.","thinkrank"):(0,i.__)("Format used for the new title attribute values.","thinkrank")),((e,t)=>(0,a.createElement)("span",{className:"thinkrank-variable-tags-container "+(t?"is-disabled":""),style:{display:"block"}},(0,i.__)("Use variables:","thinkrank")," ",A.map((r,n)=>(0,a.createElement)("button",{key:n,type:"button",disabled:t,onClick:t?void 0:()=>((e,t)=>{let r=N[e]||"";r.length>0&&!r.endsWith(" ")&&(r+=" "),P(e,r+t)})(e,r.value),className:"thinkrank-variable-tag "+(t?"is-disabled":""),title:t?void 0:(0,i.__)("Click to insert","thinkrank")},r.label))))(e,r));if(e)return(0,a.createElement)("div",{className:"tr-flex tr-justify-center tr-mt-8"},(0,a.createElement)(s.u4,{lines:3}));const Z=!!I&&(0===I.total||0===I.missing&&!N.media_alt_overwrite);return(0,a.createElement)("div",{className:"tab-content"},y&&(0,a.createElement)(s.Fc,{variant:"success"===y.status?"success":"error",onDismiss:()=>x(null),className:"tr-mb-4"},y.message),(0,a.createElement)(c.A,{title:(0,i.__)("Image SEO Settings","thinkrank"),notice:null,onNoticeRemove:()=>x(null)},(0,a.createElement)(s.mc,{direction:"column",gap:4},(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)(d.A,{title:(0,i.__)("Alt Attribute Settings","thinkrank"),description:(0,i.__)("Automatically generate missing alt attributes for images.","thinkrank"),trailing:(0,a.createElement)(s.lM,{checked:N.add_missing_alt,onChange:e=>U({add_missing_alt:e},e?(0,i.__)("Image alt text is on.","thinkrank"):(0,i.__)("Image alt text is off.","thinkrank")),label:(0,i.__)("Enable alt attributes","thinkrank"),disabled:Y})}),(0,a.createElement)(s.mc,{direction:"column",gap:6,className:"tr-px-6 tr-py-6 tr-divide-y tr-divide-line-2"},!N.add_missing_alt&&(0,a.createElement)(s.Fc,{variant:"warning"},(0,i.__)("This feature is disabled. Enable it to access configuration options.","thinkrank")),N.add_missing_alt&&!N.alt_format?.trim()&&(0,a.createElement)(s.Fc,{variant:"warning"},/* translators: %filename% is a literal token variable and must not be translated */ /* translators: %filename% is a literal token variable and must not be translated */ | |
| 145 | 147 | (0,i.__)("Empty formats detected: Enable variables like %filename% to generate attributes automatically.","thinkrank")),(0,a.createElement)(g.A,{id:"tr-is-alt-format",label:(0,i.__)("Alt attribute format","thinkrank"),disabled:!N.add_missing_alt,className:!N.add_missing_alt||N.add_missing_alt&&!N.alt_format?.trim()?"tr-pt-6":""},(0,a.createElement)(s.pd,{id:"tr-is-alt-format",value:N.alt_format,onChange:e=>P("alt_format",e.target.value),placeholder:"%filename%",disabled:!N.add_missing_alt}),R("alt_format",N.alt_format,!N.add_missing_alt)))),(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)(d.A,{title:(0,i.__)("Title Attribute Settings","thinkrank"),description:(0,i.__)("Automatically generate missing title attributes for images.","thinkrank"),trailing:(0,a.createElement)(s.lM,{checked:N.add_missing_title,onChange:e=>U({add_missing_title:e},e?(0,i.__)("Image title text is on.","thinkrank"):(0,i.__)("Image title text is off.","thinkrank")),label:(0,i.__)("Enable title attributes","thinkrank"),disabled:Y})}),(0,a.createElement)(s.mc,{direction:"column",gap:6,className:"tr-px-6 tr-py-6 tr-divide-y tr-divide-line-2"},!N.add_missing_title&&(0,a.createElement)(s.Fc,{variant:"warning"},(0,i.__)("This feature is disabled. Enable it to access configuration options.","thinkrank")),N.add_missing_title&&!N.title_format?.trim()&&(0,a.createElement)(s.Fc,{variant:"warning"},/* translators: %filename% is a literal token variable and must not be translated */ /* translators: %filename% is a literal token variable and must not be translated */ |
| 146 | 148 | (0,i.__)("Empty formats detected: Enable variables like %filename% to generate attributes automatically.","thinkrank")),(0,a.createElement)(g.A,{id:"tr-is-title-format",label:(0,i.__)("Title attribute format","thinkrank"),disabled:!N.add_missing_title,className:!N.add_missing_title||N.add_missing_title&&!N.title_format?.trim()?"tr-pt-6":""},(0,a.createElement)(s.pd,{id:"tr-is-title-format",value:N.title_format,onChange:e=>P("title_format",e.target.value),placeholder:"%title% %separator% %sitename%",disabled:!N.add_missing_title}),R("title_format",N.title_format,!N.add_missing_title)))),(0,a.createElement)(s.Zp,{padding:!1},(0,a.createElement)(d.A,{title:(0,i.__)("Media Library alt text","thinkrank"),description:(0,i.__)("Save generated alt text onto the image record itself, so it works everywhere not just in rendered content.","thinkrank"),trailing:(0,a.createElement)(s.lM,{checked:N.save_alt_to_media,onChange:e=>P("save_alt_to_media",e)})}),(0,a.createElement)(s.mc,{direction:"column",gap:6,className:"tr-px-6 tr-py-6 tr-divide-y tr-divide-line-2"},!N.save_alt_to_media&&(0,a.createElement)(s.Fc,{variant:"warning"},(0,i.__)("This feature is disabled. Enable it to fill and manage Media Library alt text.","thinkrank")),N.save_alt_to_media&&(0,a.createElement)(a.Fragment,null,I&&(0===I.total?(0,a.createElement)(s.Fc,{variant:"info"},(0,i.__)("No images found in your Media Library.","thinkrank")):(0,a.createElement)(s.Fc,{variant:I.missing>0?"warning":"success"},I.missing>0?(0,i.sprintf)(/* translators: 1: images missing alt, 2: total images */ /* translators: 1: images missing alt, 2: total images */ |
| 147 | 149 | (0,i.__)("%1$d of %2$d images in your Media Library are missing alt text.","thinkrank"),I.missing,I.total):(0,i.sprintf)(/* translators: %d: total images */ /* translators: %d: total images */ |
| 148 | 150 | (0,i.__)("All %d images in your Media Library have alt text.","thinkrank"),I.total))),(0,a.createElement)(g.A,{id:"tr-is-auto-fill",label:(0,i.__)("Fill alt text on upload","thinkrank"),className:"tr-pt-6"},(0,a.createElement)(s.lM,{checked:N.auto_fill_on_upload,onChange:e=>P("auto_fill_on_upload",e),label:(0,i.__)("Automatically save alt text when a new image is uploaded.","thinkrank")})),(0,a.createElement)(g.A,{id:"tr-is-overwrite",label:(0,i.__)("Overwrite existing alt text","thinkrank"),className:"tr-pt-6"},(0,a.createElement)(s.lM,{checked:N.media_alt_overwrite,onChange:e=>P("media_alt_overwrite",e),label:(0,i.__)("Replace alt text that is already set, instead of only filling images missing it.","thinkrank")})),(0,a.createElement)(g.A,{id:"tr-is-fill-now",label:(0,i.__)("Fill missing alt text now","thinkrank"),className:"tr-pt-6"},(0,a.createElement)("div",{className:"tr-flex tr-items-center",style:{gap:"12px"}},(0,a.createElement)(s.$n,{variant:"primary",size:"md",className:"tr-shrink-0 tr-whitespace-nowrap",onClick:async()=>{if(N.media_alt_overwrite&&!confirm((0,i.__)("Overwrite is on. This will replace the alt text on every image in your Media Library, including any you wrote by hand, using the Alt attribute format above. This cannot be undone. Continue?","thinkrank")))return;T(!0),_(0);let e=0,t=0,r=!1;try{for(let a=0;a<2e3;a++){const a=await o()({path:"/thinkrank/v1/image-seo/media-alt/run",method:"POST",data:{offset:e,limit:100,overwrite:!!N.media_alt_overwrite}});if(t+=a.updated||0,e=a.next_offset,a.total>0&&_(Math.min(100,Math.round(e/a.total*100))),a.done){r=!0;break}}if(!r)return x({status:"error",message:(0,i.sprintf)(/* translators: %d: number of images updated before stopping */ /* translators: %d: number of images updated before stopping */ |