@yuktishaalaa/yuktai 5.3.7 → 5.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,15 +1,26 @@
1
- "use strict";var xc=Object.create;var on=Object.defineProperty;var wc=Object.getOwnPropertyDescriptor;var Cc=Object.getOwnPropertyNames;var kc=Object.getPrototypeOf,vc=Object.prototype.hasOwnProperty;var bt=(e,t)=>()=>(e&&(t=e(e=0)),t);var Lt=(e,t)=>{for(var n in t)on(e,n,{get:t[n],enumerable:!0})},rs=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Cc(t))!vc.call(e,r)&&r!==n&&on(e,r,{get:()=>t[r],enumerable:!(o=wc(t,r))||o.enumerable});return e};var Dn=(e,t,n)=>(n=e!=null?xc(kc(e)):{},rs(t||!e||!e.__esModule?on(n,"default",{value:e,enumerable:!0}):n,e)),Sc=e=>rs(on({},"__esModule",{value:!0}),e);var v=bt(()=>{});var Qs={};Lt(Qs,{askPage:()=>Vn});function Kc(){return new Promise(e=>{let t=setTimeout(e,1500),n=new MutationObserver(()=>{clearTimeout(t),t=setTimeout(()=>{n.disconnect(),e()},500)});n.observe(document.body,{childList:!0,subtree:!0})})}function jc(){let e=[],t=document.querySelectorAll("*");for(let n of t){if(n.closest("[data-yuktai-panel]"))continue;let o=n.innerText?.trim();o&&o.length>30&&e.push(o);let r=n.getAttribute("aria-label");if(r&&r.length>10&&e.push(r),(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&(n.placeholder&&e.push(n.placeholder),n.value&&e.push(n.value)),n instanceof HTMLButtonElement){let a=n.innerText||n.getAttribute("aria-label");a&&e.push(a)}}return e.join(" ").slice(0,3500)}async function Vn(e){if(!e.trim())return{success:!1,answer:"",error:"Please type a question."};try{let t=window,n=t.LanguageModel||t.ai?.languageModel;if(!n)return{success:!1,answer:"",error:"Gemini Nano not available."};await Kc();let o=jc();if(!o||o.length<100)return{success:!1,answer:"",error:"Page content not readable."};let r;try{r=await n.create({systemPrompt:`Answer ONLY using page content.
1
+ "use strict";var Rl=Object.create;var Qo=Object.defineProperty;var Tl=Object.getOwnPropertyDescriptor;var Fl=Object.getOwnPropertyNames;var Ll=Object.getPrototypeOf,Pl=Object.prototype.hasOwnProperty;var vt=(e,t)=>()=>(e&&(t=e(e=0)),t);var Xt=(e,t)=>{for(var o in t)Qo(e,o,{get:t[o],enumerable:!0})},hs=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let A of Fl(t))!Pl.call(e,A)&&A!==o&&Qo(e,A,{get:()=>t[A],enumerable:!(n=Tl(t,A))||n.enumerable});return e};var an=(e,t,o)=>(o=e!=null?Rl(Ll(e)):{},hs(t||!e||!e.__esModule?Qo(o,"default",{value:e,enumerable:!0}):o,e)),Yl=e=>hs(Qo({},"__esModule",{value:!0}),e);var x=vt(()=>{});var yn={};Xt(yn,{askPage:()=>hn,askWithContext:()=>cg});function lg(){return new Promise(e=>{let t=setTimeout(e,1500),o=new MutationObserver(()=>{clearTimeout(t),t=setTimeout(()=>{o.disconnect(),e()},500)});o.observe(document.body,{childList:!0,subtree:!0})})}function gg(){let e=[],t=document.querySelectorAll("*");for(let o of t){if(o.closest("[data-yuktai-panel]"))continue;let n=o.innerText?.trim();n&&n.length>30&&e.push(n);let A=o.getAttribute("aria-label");if(A&&A.length>10&&e.push(A),(o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement)&&(o.placeholder&&e.push(o.placeholder),o.value&&e.push(o.value)),o instanceof HTMLButtonElement){let i=o.innerText||o.getAttribute("aria-label");i&&e.push(i)}}return e.join(" ").slice(0,3500)}async function hn(e){if(!e.trim())return{success:!1,answer:"",error:"Please type a question."};try{let t=window,o=t.LanguageModel||t.ai?.languageModel;if(!o)return{success:!1,answer:"",error:"Gemini Nano not available."};await lg();let n=gg();if(!n||n.length<100)return{success:!1,answer:"",error:"Page content not readable."};let A;try{A=await o.create({systemPrompt:`Answer ONLY using page content.
2
2
  Keep answer short (2\u20133 sentences).
3
- If not found say: "I could not find that on this page."`,outputLanguage:"en"})}catch{r=await n.create()}let a=`Page:
4
- ${o}
3
+ If not found say: "I could not find that on this page."`,outputLanguage:"en"})}catch{A=await o.create()}let i=`Page:
4
+ ${n}
5
5
 
6
- Q: ${e}`,i=await r.prompt(a);return r?.destroy&&r.destroy(),{success:!0,answer:i?.trim()||"No answer found."}}catch(t){return{success:!1,answer:"",error:t instanceof Error?t.message:"Error occurred"}}}var Kn=bt(()=>{"use strict";v()});var Zn={};Lt(Zn,{askPageWithTransformers:()=>Xn,getModelLoadStatus:()=>Pt,isTransformersSupported:()=>Ft});function Ls(){return typeof navigator>"u"?!1:/Android|iPhone|iPad|iPod|Mobile|Tablet/i.test(navigator.userAgent)}function Xc(){if(Ls())return"wasm";try{if(typeof navigator<"u"&&"gpu"in navigator&&navigator.gpu!==void 0)return"webgpu"}catch{}return"wasm"}async function Zc(){if(!jn){if(wt){for(;wt;)await new Promise(e=>setTimeout(e,200));return}wt=!0;try{let{pipeline:e,env:t}=await import("@huggingface/transformers");t.allowRemoteModels=!0,t.allowLocalModels=!1,typeof window<"u"&&typeof caches<"u"&&(t.useWasmCache=!0);let n=Xc(),o=Ls();console.log(`yuktai: Transformers.js \u2014 device: ${n}, mobile: ${o}`),Ns=await e("feature-extraction","Xenova/all-MiniLM-L6-v2",{device:n,dtype:o?"q4":"fp32"}),Gs=await e("text2text-generation","Xenova/flan-t5-small",{device:n,dtype:o?"q4":"fp32"}),jn=!0,wt=!1,console.log("yuktai: Transformers.js models loaded \u2705")}catch(e){throw wt=!1,console.error("yuktai: Transformers.js model load failed",e),e}}}function ed(){return new Promise(e=>{let t=setTimeout(e,1500),n=new MutationObserver(()=>{clearTimeout(t),t=setTimeout(()=>{n.disconnect(),e()},500)});n.observe(document.body,{childList:!0,subtree:!0})})}function td(){let e=[],t=new Set,n=document.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li, td, th, label, figcaption, blockquote, span, a, button, div");for(let i of n){if(i.closest("[data-yuktai-panel]")||i.querySelector("p, h1, h2, h3, h4, li, td, div"))continue;let l=i.innerText?.trim();if(!l||l.length<15||t.has(l))continue;t.add(l),e.push(l);let c=i.getAttribute("aria-label")?.trim();c&&c.length>8&&!t.has(c)&&(t.add(c),e.push(c))}let o=document.title?.trim();o&&!t.has(o)&&e.unshift(o);let a=document.querySelector('meta[name="description"]')?.getAttribute("content")?.trim();return a&&!t.has(a)&&e.unshift(a),e.join(" ").slice(0,8e3)}function nd(e,t=150,n=30){if(typeof e!="string")try{e=String(e??"")}catch{return[]}let o=e.trim();if(!o)return[];let r=Math.min(n,Math.floor(t/2)),a=o.split(/\s+/),i=[],s=t-r;for(let l=0;l<a.length;l+=s){let c=a.slice(l,l+t).join(" ");c.trim().length>20&&i.push(c)}return i}function od(e,t){let n=0,o=0,r=0;for(let a=0;a<e.length;a++)n+=e[a]*t[a],o+=e[a]*e[a],r+=t[a]*t[a];return n/(Math.sqrt(o)*Math.sqrt(r)+1e-8)}async function Rs(e){let t=await Ns(e,{pooling:"mean",normalize:!0}),n=t?.data??t;return Array.from(n)}async function rd(e,t,n=3){let o=await Rs(e),r=await Promise.all(t.map(async a=>{let i=await Rs(a),s=od(o,i);return{chunk:a,score:s}}));return r.sort((a,i)=>i.score-a.score),r.slice(0,n).map(a=>a.chunk)}async function Xn(e){if(!e.trim())return{success:!1,answer:"",error:"Please type a question."};try{await Zc(),await ed();let t=td();if(!t||t.length<50)return{success:!1,answer:"",error:"Not enough content on this page."};let n=nd(t);if(n.length===0)return{success:!1,answer:"",error:"Could not process page content."};let a=`Answer the question based on the context. Give a complete answer in 2-3 sentences.
6
+ Q: ${e}`,r=await A.prompt(i);return A?.destroy&&A.destroy(),{success:!0,answer:r?.trim()||"No answer found."}}catch(t){return{success:!1,answer:"",error:t instanceof Error?t.message:"Error occurred"}}}async function cg(e,t){if(!e.trim()||!t.trim())return{success:!1,answer:"",error:"Nothing to answer from."};try{let o=window,n=o.LanguageModel||o.ai?.languageModel;if(!n)return{success:!1,answer:"",error:"Gemini Nano not available."};let A;try{A=await n.create({systemPrompt:`Answer ONLY using page content.
7
+ Keep answer short (2\u20133 sentences).
8
+ If not found say: "I could not find that on this page."`,outputLanguage:"en"})}catch{A=await n.create()}let i=await A.prompt(`Page:
9
+ ${t.slice(0,3500)}
10
+
11
+ Q: ${e}`);return A?.destroy&&A.destroy(),{success:!0,answer:i?.trim()||"No answer found."}}catch(o){return{success:!1,answer:"",error:o instanceof Error?o.message:"Error occurred"}}}var Go=vt(()=>{"use strict";x()});var No={};Xt(No,{answerFromContext:()=>fg,askPageWithTransformers:()=>Qn,getModelLoadStatus:()=>Rt,isTransformersSupported:()=>jt});function Os(){return typeof navigator>"u"?!1:/Android|iPhone|iPad|iPod|Mobile|Tablet/i.test(navigator.userAgent)}function dg(){if(Os())return"wasm";try{if(typeof navigator<"u"&&"gpu"in navigator&&navigator.gpu!==void 0)return"webgpu"}catch{}return"wasm"}async function Vs(){if(!bn){if(Nt){for(;Nt;)await new Promise(e=>setTimeout(e,200));return}Nt=!0;try{let{pipeline:e,env:t}=await import("@huggingface/transformers");t.allowRemoteModels=!0,t.allowLocalModels=!1,typeof window<"u"&&typeof caches<"u"&&(t.useWasmCache=!0);let o=dg(),n=Os();console.log(`yuktai: Transformers.js \u2014 device: ${o}, mobile: ${n}`),Ws=await e("feature-extraction","Xenova/all-MiniLM-L6-v2",{device:o,dtype:n?"q4":"fp32"}),Bn=await e("text2text-generation","Xenova/flan-t5-small",{device:o,dtype:n?"q4":"fp32"}),bn=!0,Nt=!1,console.log("yuktai: Transformers.js models loaded \u2705")}catch(e){throw Nt=!1,console.error("yuktai: Transformers.js model load failed",e),e}}}function ug(){return new Promise(e=>{let t=setTimeout(e,1500),o=new MutationObserver(()=>{clearTimeout(t),t=setTimeout(()=>{o.disconnect(),e()},500)});o.observe(document.body,{childList:!0,subtree:!0})})}function Ig(){let e=[],t=new Set,o=document.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li, td, th, label, figcaption, blockquote, span, a, button, div");for(let r of o){if(r.closest("[data-yuktai-panel]")||r.querySelector("p, h1, h2, h3, h4, li, td, div"))continue;let a=r.innerText?.trim();if(!a||a.length<15||t.has(a))continue;t.add(a),e.push(a);let l=r.getAttribute("aria-label")?.trim();l&&l.length>8&&!t.has(l)&&(t.add(l),e.push(l))}let n=document.title?.trim();n&&!t.has(n)&&e.unshift(n);let i=document.querySelector('meta[name="description"]')?.getAttribute("content")?.trim();return i&&!t.has(i)&&e.unshift(i),e.join(" ").slice(0,8e3)}function pg(e,t=150,o=30){if(typeof e!="string")try{e=String(e??"")}catch{return[]}let n=e.trim();if(!n)return[];let A=Math.min(o,Math.floor(t/2)),i=n.split(/\s+/),r=[],s=t-A;for(let a=0;a<i.length;a+=s){let l=i.slice(a,a+t).join(" ");l.trim().length>20&&r.push(l)}return r}function mg(e,t){let o=0,n=0,A=0;for(let i=0;i<e.length;i++)o+=e[i]*t[i],n+=e[i]*e[i],A+=t[i]*t[i];return o/(Math.sqrt(n)*Math.sqrt(A)+1e-8)}async function zs(e){let t=await Ws(e,{pooling:"mean",normalize:!0}),o=t?.data??t;return Array.from(o)}async function Cg(e,t,o=3){let n=await zs(e),A=await Promise.all(t.map(async i=>{let r=await zs(i),s=mg(n,r);return{chunk:i,score:s}}));return A.sort((i,r)=>r.score-i.score),A.slice(0,o).map(i=>i.chunk)}async function Qn(e){if(!e.trim())return{success:!1,answer:"",error:"Please type a question."};try{await Vs(),await ug();let t=Ig();if(!t||t.length<50)return{success:!1,answer:"",error:"Not enough content on this page."};let o=pg(t);if(o.length===0)return{success:!1,answer:"",error:"Could not process page content."};let i=`Answer the question based on the context. Give a complete answer in 2-3 sentences.
12
+
13
+ Context: ${(await Cg(e,o,3)).join(" ").slice(0,1200)}
14
+
15
+ Question: ${e}
16
+
17
+ Answer:`,s=(await Bn(i,{max_new_tokens:120,min_new_tokens:10}))?.[0]?.generated_text?.trim()||"";return s?{success:!0,answer:s}:{success:!0,answer:"I could not find a specific answer on this page."}}catch(t){console.error("yuktai: Transformers RAG error",t);let o=t instanceof Error?t.message:"";return o.includes("Out of memory")||o.includes("memory")?{success:!1,answer:"",error:"Not enough device memory. Try on a device with more RAM or use desktop Chrome with Gemini Nano."}:{success:!1,answer:"",error:o||"Transformers.js error."}}}async function fg(e,t){if(!e.trim()||!t.trim())return{success:!1,answer:"",error:"Nothing to answer from."};try{await Vs();let o=`Answer the question based on the context. Give a complete answer in 2-3 sentences.
7
18
 
8
- Context: ${(await rd(e,n,3)).join(" ").slice(0,1200)}
19
+ Context: ${t.slice(0,1200)}
9
20
 
10
21
  Question: ${e}
11
22
 
12
- Answer:`,s=(await Gs(a,{max_new_tokens:120,min_new_tokens:10}))?.[0]?.generated_text?.trim()||"";return s?{success:!0,answer:s}:{success:!0,answer:"I could not find a specific answer on this page."}}catch(t){console.error("yuktai: Transformers RAG error",t);let n=t instanceof Error?t.message:"";return n.includes("Out of memory")||n.includes("memory")?{success:!1,answer:"",error:"Not enough device memory. Try on a device with more RAM or use desktop Chrome with Gemini Nano."}:{success:!1,answer:"",error:n||"Transformers.js error."}}}function Ft(){try{return typeof WebAssembly<"u"&&typeof Worker<"u"}catch{return!1}}function Pt(){return jn?"ready":wt?"loading":"idle"}var Ns,Gs,wt,jn,Dt=bt(()=>{"use strict";v();Ns=null,Gs=null,wt=!1,jn=!1});function Ps(e,t){return e.replace(/\{\{SITE_NAME\}\}/g,t.SITE_NAME).replace(/\{\{THEME_COLOR\}\}/g,t.THEME_COLOR).replace(/\{\{TAGLINE\}\}/g,t.TAGLINE).replace(/\{\{YEAR\}\}/g,t.YEAR)}var no,Ds,$s,zs,Os,Hs,Ws,Us,Ys,qs,_s,Js,Vs,Ks,js,Xs,Zs,el,tl,nl,ol,rl,il,al,sl,ll=bt(()=>{"use strict";v();no={blue:"#1a73e8",green:"#0d9488",purple:"#7c3aed",red:"#dc2626",orange:"#ea580c",teal:"#0891b2",indigo:"#4f46e5",gray:"#374151"},Ds=e=>`{
23
+ Answer:`,A=(await Bn(o,{max_new_tokens:120,min_new_tokens:10}))?.[0]?.generated_text?.trim()||"";return A?{success:!0,answer:A}:{success:!1,answer:"",error:"No answer generated."}}catch(o){return{success:!1,answer:"",error:o instanceof Error?o.message:"Transformers.js error."}}}function jt(){try{return typeof WebAssembly<"u"&&typeof Worker<"u"}catch{return!1}}function Rt(){return bn?"ready":Nt?"loading":"idle"}var Ws,Bn,Nt,bn,Tt=vt(()=>{"use strict";x();Ws=null,Bn=null,Nt=!1,bn=!1});function Xs(e,t){return e.replace(/\{\{SITE_NAME\}\}/g,t.SITE_NAME).replace(/\{\{THEME_COLOR\}\}/g,t.THEME_COLOR).replace(/\{\{TAGLINE\}\}/g,t.TAGLINE).replace(/\{\{YEAR\}\}/g,t.YEAR)}var xn,js,Zs,ea,ta,oa,na,Aa,ra,ia,sa,aa,la,ga,ca,da,ua,Ia,pa,ma,Ca,fa,ha,ya,ba,Ba=vt(()=>{"use strict";x();xn={blue:"#1a73e8",green:"#0d9488",purple:"#7c3aed",red:"#dc2626",orange:"#ea580c",teal:"#0891b2",indigo:"#4f46e5",gray:"#374151"},js=e=>`{
13
24
  "name": "${e.toLowerCase().replace(/\s+/g,"-")}",
14
25
  "version": "0.1.0",
15
26
  "private": true,
@@ -34,14 +45,14 @@ Answer:`,s=(await Gs(a,{max_new_tokens:120,min_new_tokens:10}))?.[0]?.generated_
34
45
  "typescript": "^5.0.0"
35
46
  }
36
47
  }
37
- `,$s=`/** @type {import('next').NextConfig} */
48
+ `,Zs=`/** @type {import('next').NextConfig} */
38
49
  const nextConfig = {
39
50
  reactStrictMode: true,
40
51
  images: { unoptimized: true },
41
52
  }
42
53
 
43
54
  module.exports = nextConfig
44
- `,zs=e=>`/** @type {import('tailwindcss').Config} */
55
+ `,ea=e=>`/** @type {import('tailwindcss').Config} */
45
56
  module.exports = {
46
57
  content: [
47
58
  "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
@@ -57,7 +68,7 @@ module.exports = {
57
68
  },
58
69
  plugins: [],
59
70
  }
60
- `,Os=e=>`@tailwind base;
71
+ `,ta=e=>`@tailwind base;
61
72
  @tailwind components;
62
73
  @tailwind utilities;
63
74
 
@@ -86,7 +97,7 @@ a {
86
97
  color: inherit;
87
98
  text-decoration: none;
88
99
  }
89
- `,Hs=`import type { Metadata } from "next"
100
+ `,oa=`import type { Metadata } from "next"
90
101
  import "./globals.css"
91
102
  import Navbar from "@/components/Navbar"
92
103
  import Footer from "@/components/Footer"
@@ -111,7 +122,7 @@ export default function RootLayout({
111
122
  </html>
112
123
  )
113
124
  }
114
- `,Ws=`"use client"
125
+ `,na=`"use client"
115
126
  import Link from "next/link"
116
127
  import { useState } from "react"
117
128
  import styles from "./Navbar.module.css"
@@ -142,7 +153,7 @@ export default function Navbar() {
142
153
  </nav>
143
154
  )
144
155
  }
145
- `,Us=`.navbar {
156
+ `,Aa=`.navbar {
146
157
  background: var(--primary);
147
158
  color: white;
148
159
  padding: 0 1rem;
@@ -209,7 +220,7 @@ export default function Navbar() {
209
220
  }
210
221
  .links.open { display: flex; }
211
222
  }
212
- `,Ys=`import styles from "./Footer.module.css"
223
+ `,ra=`import styles from "./Footer.module.css"
213
224
 
214
225
  export default function Footer() {
215
226
  return (
@@ -222,7 +233,7 @@ export default function Footer() {
222
233
  </footer>
223
234
  )
224
235
  }
225
- `,qs=`.footer {
236
+ `,ia=`.footer {
226
237
  background: #0f172a;
227
238
  color: #94a3b8;
228
239
  padding: 3rem 1rem;
@@ -254,7 +265,7 @@ export default function Footer() {
254
265
  color: #475569;
255
266
  margin-top: 1rem;
256
267
  }
257
- `,_s=`import styles from "./page.module.css"
268
+ `,sa=`import styles from "./page.module.css"
258
269
  import Link from "next/link"
259
270
 
260
271
  export default function HomePage() {
@@ -305,7 +316,7 @@ export default function HomePage() {
305
316
  </div>
306
317
  )
307
318
  }
308
- `,Js=`.page { min-height: 100vh; }
319
+ `,aa=`.page { min-height: 100vh; }
309
320
 
310
321
  .hero {
311
322
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
@@ -398,7 +409,7 @@ export default function HomePage() {
398
409
 
399
410
  .cta h2 { font-size: 2rem; font-weight: 800; margin-bottom: 0.75rem; }
400
411
  .cta p { font-size: 1.1rem; opacity: 0.85; margin-bottom: 2rem; }
401
- `,Vs=`import styles from "./page.module.css"
412
+ `,la=`import styles from "./page.module.css"
402
413
 
403
414
  export default function AboutPage() {
404
415
  return (
@@ -444,7 +455,7 @@ export default function AboutPage() {
444
455
  </div>
445
456
  )
446
457
  }
447
- `,Ks=`.page { min-height: 100vh; }
458
+ `,ga=`.page { min-height: 100vh; }
448
459
 
449
460
  .hero {
450
461
  background: var(--primary);
@@ -492,7 +503,7 @@ export default function AboutPage() {
492
503
  }
493
504
 
494
505
  .label { font-size: 0.85rem; color: #64748b; }
495
- `,js=`"use client"
506
+ `,ca=`"use client"
496
507
  import { useState } from "react"
497
508
  import styles from "./page.module.css"
498
509
 
@@ -582,7 +593,7 @@ export default function ContactPage() {
582
593
  </div>
583
594
  )
584
595
  }
585
- `,Xs=`.page { min-height: 100vh; }
596
+ `,da=`.page { min-height: 100vh; }
586
597
 
587
598
  .hero {
588
599
  background: var(--primary);
@@ -660,7 +671,7 @@ export default function ContactPage() {
660
671
  font-size: 1.1rem;
661
672
  text-align: center;
662
673
  }
663
- `,Zs=`import styles from "./page.module.css"
674
+ `,ua=`import styles from "./page.module.css"
664
675
 
665
676
  const SERVICES = [
666
677
  { icon: "\u{1F680}", title: "Service One", desc: "Comprehensive solution designed to meet your business needs efficiently and effectively." },
@@ -694,7 +705,7 @@ export default function ServicesPage() {
694
705
  </div>
695
706
  )
696
707
  }
697
- `,el=`.page { min-height: 100vh; }
708
+ `,Ia=`.page { min-height: 100vh; }
698
709
 
699
710
  .hero {
700
711
  background: var(--primary);
@@ -738,7 +749,7 @@ export default function ServicesPage() {
738
749
  }
739
750
 
740
751
  .card p { color: #64748b; font-size: 0.9rem; line-height: 1.6; }
741
- `,tl=`import styles from "./page.module.css"
752
+ `,pa=`import styles from "./page.module.css"
742
753
  import Link from "next/link"
743
754
 
744
755
  const PLANS = [
@@ -801,7 +812,7 @@ export default function PricingPage() {
801
812
  </div>
802
813
  )
803
814
  }
804
- `,nl=`.page { min-height: 100vh; }
815
+ `,ma=`.page { min-height: 100vh; }
805
816
 
806
817
  .hero {
807
818
  background: var(--primary);
@@ -875,7 +886,7 @@ export default function PricingPage() {
875
886
  }
876
887
 
877
888
  .btn:hover { opacity: 0.9; }
878
- `,ol=`"use client"
889
+ `,Ca=`"use client"
879
890
  import { useState } from "react"
880
891
  import styles from "./page.module.css"
881
892
 
@@ -941,7 +952,7 @@ export default function AuthPage() {
941
952
  </div>
942
953
  )
943
954
  }
944
- `,rl=`.page {
955
+ `,fa=`.page {
945
956
  min-height: 100vh;
946
957
  display: flex;
947
958
  align-items: center;
@@ -1023,7 +1034,7 @@ export default function AuthPage() {
1023
1034
  }
1024
1035
 
1025
1036
  .btn:hover { opacity: 0.9; }
1026
- `,il=`import Link from "next/link"
1037
+ `,ha=`import Link from "next/link"
1027
1038
 
1028
1039
  export default function NotFound() {
1029
1040
  return (
@@ -1039,7 +1050,7 @@ export default function NotFound() {
1039
1050
  </div>
1040
1051
  )
1041
1052
  }
1042
- `,al=`{
1053
+ `,ya=`{
1043
1054
  "compilerOptions": {
1044
1055
  "target": "es5",
1045
1056
  "lib": ["dom", "dom.iterable", "esnext"],
@@ -1060,7 +1071,7 @@ export default function NotFound() {
1060
1071
  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
1061
1072
  "exclude": ["node_modules"]
1062
1073
  }
1063
- `,sl=e=>`# ${e}
1074
+ `,ba=e=>`# ${e}
1064
1075
 
1065
1076
  Generated by **yuktai Vibe Coder** \u2014 open source AI plugin for Next.js.
1066
1077
 
@@ -1088,53 +1099,53 @@ Edit any page to customise content.
1088
1099
  ---
1089
1100
 
1090
1101
  *Built with yuktai \u2014 aksharatantra.vercel.app*
1091
- `});var cl={};Lt(cl,{generateZip:()=>xd});function Id(e,t){return{hotel:`Experience luxury and comfort at ${e}`,ecommerce:`Shop the best products at ${e}`,restaurant:`Delicious food crafted with love at ${e}`,portfolio:`Creative work and professional services by ${e}`,blog:`Insights, stories, and ideas from ${e}`,saas:`Powerful tools to grow your business \u2014 ${e}`,government:`Official services and information \u2014 ${e}`,healthcare:`Quality healthcare you can trust \u2014 ${e}`,education:`Learn, grow, and succeed with ${e}`,realestate:`Find your perfect property with ${e}`,landing:`The smarter way to get things done \u2014 ${e}`,generic:`Welcome to ${e} \u2014 your trusted partner`}[t]||`Welcome to ${e}`}async function xd(e){let t=(await import("jszip")).default,n=new t,o=no[e.theme]||no.blue,r=Id(e.siteName,e.websiteType),a=new Date().getFullYear().toString(),i={SITE_NAME:e.siteName,THEME_COLOR:o,TAGLINE:r,YEAR:a},s=g=>Ps(g,i).replace(/\{\{SITE_NAME_LOWER\}\}/g,e.siteName.toLowerCase().replace(/\s+/g,""));n.file("package.json",Ds(e.siteName)),n.file("next.config.js",$s),n.file("tailwind.config.js",zs(o)),n.file("tsconfig.json",al),n.file("README.md",sl(e.siteName)),n.file("postcss.config.js","module.exports = { plugins: { tailwindcss: {}, autoprefixer: {} } }"),n.file(".gitignore",`node_modules
1102
+ `});var Qa={};Xt(Qa,{generateZip:()=>Tg});function Rg(e,t){return{hotel:`Experience luxury and comfort at ${e}`,ecommerce:`Shop the best products at ${e}`,restaurant:`Delicious food crafted with love at ${e}`,portfolio:`Creative work and professional services by ${e}`,blog:`Insights, stories, and ideas from ${e}`,saas:`Powerful tools to grow your business \u2014 ${e}`,government:`Official services and information \u2014 ${e}`,healthcare:`Quality healthcare you can trust \u2014 ${e}`,education:`Learn, grow, and succeed with ${e}`,realestate:`Find your perfect property with ${e}`,landing:`The smarter way to get things done \u2014 ${e}`,generic:`Welcome to ${e} \u2014 your trusted partner`}[t]||`Welcome to ${e}`}async function Tg(e){let t=(await import("jszip")).default,o=new t,n=xn[e.theme]||xn.blue,A=Rg(e.siteName,e.websiteType),i=new Date().getFullYear().toString(),r={SITE_NAME:e.siteName,THEME_COLOR:n,TAGLINE:A,YEAR:i},s=d=>Xs(d,r).replace(/\{\{SITE_NAME_LOWER\}\}/g,e.siteName.toLowerCase().replace(/\s+/g,""));o.file("package.json",js(e.siteName)),o.file("next.config.js",Zs),o.file("tailwind.config.js",ea(n)),o.file("tsconfig.json",ya),o.file("README.md",ba(e.siteName)),o.file("postcss.config.js","module.exports = { plugins: { tailwindcss: {}, autoprefixer: {} } }"),o.file(".gitignore",`node_modules
1092
1103
  .next
1093
1104
  .env.local
1094
- .DS_Store`),n.file("src/app/globals.css",Os(o)),n.file("src/app/layout.tsx",s(Hs)),n.file("src/app/not-found.tsx",il),n.file("src/components/Navbar.tsx",s(Ws)),n.file("src/components/Navbar.module.css",Us),n.file("src/components/Footer.tsx",s(Ys)),n.file("src/components/Footer.module.css",qs);for(let g of e.pages)switch(g){case"home":n.file("src/app/page.tsx",s(_s)),n.file("src/app/page.module.css",Js);break;case"about":n.file("src/app/about/page.tsx",s(Vs)),n.file("src/app/about/page.module.css",Ks);break;case"contact":n.file("src/app/contact/page.tsx",s(js)),n.file("src/app/contact/page.module.css",Xs);break;case"services":n.file("src/app/services/page.tsx",s(Zs)),n.file("src/app/services/page.module.css",el);break;case"pricing":n.file("src/app/pricing/page.tsx",s(tl)),n.file("src/app/pricing/page.module.css",nl);break;case"auth":n.file("src/app/auth/page.tsx",s(ol)),n.file("src/app/auth/page.module.css",rl);break;default:n.file(`src/app/${g}/page.tsx`,wd(g,e.siteName,o,i,s));break}let l=await n.generateAsync({type:"blob"}),c=URL.createObjectURL(l),d=document.createElement("a");d.href=c,d.download=`${e.siteName.toLowerCase().replace(/\s+/g,"-")}-nextjs.zip`,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(c)}function wd(e,t,n,o,r){let a=e.charAt(0).toUpperCase()+e.slice(1);return`import styles from "./page.module.css"
1105
+ .DS_Store`),o.file("src/app/globals.css",ta(n)),o.file("src/app/layout.tsx",s(oa)),o.file("src/app/not-found.tsx",ha),o.file("src/components/Navbar.tsx",s(na)),o.file("src/components/Navbar.module.css",Aa),o.file("src/components/Footer.tsx",s(ra)),o.file("src/components/Footer.module.css",ia);for(let d of e.pages)switch(d){case"home":o.file("src/app/page.tsx",s(sa)),o.file("src/app/page.module.css",aa);break;case"about":o.file("src/app/about/page.tsx",s(la)),o.file("src/app/about/page.module.css",ga);break;case"contact":o.file("src/app/contact/page.tsx",s(ca)),o.file("src/app/contact/page.module.css",da);break;case"services":o.file("src/app/services/page.tsx",s(ua)),o.file("src/app/services/page.module.css",Ia);break;case"pricing":o.file("src/app/pricing/page.tsx",s(pa)),o.file("src/app/pricing/page.module.css",ma);break;case"auth":o.file("src/app/auth/page.tsx",s(Ca)),o.file("src/app/auth/page.module.css",fa);break;default:o.file(`src/app/${d}/page.tsx`,Fg(d,e.siteName,n,r,s));break}let a=await o.generateAsync({type:"blob"}),l=URL.createObjectURL(a),g=document.createElement("a");g.href=l,g.download=`${e.siteName.toLowerCase().replace(/\s+/g,"-")}-nextjs.zip`,document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(l)}function Fg(e,t,o,n,A){let i=e.charAt(0).toUpperCase()+e.slice(1);return`import styles from "./page.module.css"
1095
1106
 
1096
- export default function ${a}Page() {
1107
+ export default function ${i}Page() {
1097
1108
  return (
1098
1109
  <div style={{ minHeight: "100vh" }}>
1099
1110
  <section style={{
1100
- background: "${n}",
1111
+ background: "${o}",
1101
1112
  color: "white",
1102
1113
  padding: "5rem 1rem",
1103
1114
  textAlign: "center"
1104
1115
  }}>
1105
1116
  <h1 style={{ fontSize: "2.5rem", fontWeight: 800, marginBottom: "1rem" }}>
1106
- ${a}
1117
+ ${i}
1107
1118
  </h1>
1108
1119
  <p style={{ fontSize: "1.1rem", opacity: 0.85 }}>
1109
- ${t} \u2014 ${a} page
1120
+ ${t} \u2014 ${i} page
1110
1121
  </p>
1111
1122
  </section>
1112
1123
  <section style={{ padding: "4rem 1rem", maxWidth: "1100px", margin: "0 auto" }}>
1113
1124
  <p style={{ color: "#64748b", fontSize: "1rem", textAlign: "center" }}>
1114
- This is the ${a} page. Edit this file to add your content.
1125
+ This is the ${i} page. Edit this file to add your content.
1115
1126
  </p>
1116
1127
  </section>
1117
1128
  </div>
1118
1129
  )
1119
1130
  }
1120
- `}var dl=bt(()=>{"use strict";v();ll()});var Al={};Lt(Al,{getPageText:()=>ul,highlightField:()=>pl,runAgent:()=>Bd,scanFormFields:()=>gl,scrollToSection:()=>ml});function ot(e){try{let t=window.getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden"||t.opacity==="0"||e.hidden)return!1;let n=e.getBoundingClientRect();return!(n.width===0&&n.height===0)}catch{return!0}}function ul(){let e=[],t=new Set,n=i=>{let s=i.trim();s&&s.length>10&&!t.has(s)&&(t.add(s),e.push(s))};document.title&&n(document.title);let o=['meta[name="description"]','meta[name="keywords"]','meta[property="og:title"]','meta[property="og:description"]','meta[name="twitter:title"]','meta[name="twitter:description"]'];for(let i of o){let s=document.querySelector(i)?.getAttribute("content");s&&n(s)}let r=["h1","h2","h3","h4","h5","h6","p","blockquote","q","pre","code","li","dt","dd","th","td","caption","a","b","strong","em","i","u","s","abbr","acronym","cite","dfn","mark","small","sub","sup","ins","del","bdi","bdo","article","section","aside","nav","header","footer","main","summary","details","figcaption","figure","address","time","output","label","legend","option","button","font","center","span","div","[role='heading']","[role='main']","[role='article']","[role='region']","[role='complementary']","[role='contentinfo']","[role='navigation']","[role='banner']","[role='listitem']","[role='cell']","[role='columnheader']","[role='rowheader']"],a=document.querySelectorAll(r.join(","));for(let i of a){if(i.closest("[data-yuktai-panel]")||!ot(i)||i.querySelector("p, h1, h2, h3, h4, h5, h6, li, td, th, div, article, section, blockquote, pre"))continue;let l=i.innerText?.trim();if(l&&l.length>10&&n(l),!l){let y=i.textContent?.trim();y&&y.length>10&&n(y)}let c=i.getAttribute("aria-label")?.trim();c&&c.length>5&&n(c);let d=i.getAttribute("aria-description")?.trim();d&&d.length>5&&n(d);let g=i.getAttribute("aria-valuetext")?.trim();g&&n(g);let p=i.getAttribute("title")?.trim();p&&p.length>5&&n(p);let m=i.getAttribute("data-label")?.trim();m&&n(m);let h=i.getAttribute("data-title")?.trim();h&&n(h),i.querySelectorAll("img").forEach(y=>{let u=y.getAttribute("alt")?.trim();u&&u.length>5&&n(u);let I=y.getAttribute("title")?.trim();I&&I.length>5&&n(I)})}document.querySelectorAll("img").forEach(i=>{if(i.closest("[data-yuktai-panel]")||!ot(i))return;let s=i.getAttribute("alt")?.trim(),l=i.getAttribute("title")?.trim();s&&s.length>5&&n(s),l&&l.length>5&&n(l)}),document.querySelectorAll("input:not([type=hidden]), textarea").forEach(i=>{if(i.closest("[data-yuktai-panel]")||!ot(i))return;i.placeholder&&n(i.placeholder),i.value&&i.value.length>3&&n(i.value);let s=i.getAttribute("aria-label")?.trim();s&&n(s)}),document.querySelectorAll("select").forEach(i=>{i.closest("[data-yuktai-panel]")||ot(i)&&Array.from(i.options).forEach(s=>{s.text?.trim().length>3&&n(s.text.trim())})}),document.querySelectorAll("td, th").forEach(i=>{if(i.closest("[data-yuktai-panel]")||!ot(i))return;let s=i.innerText?.trim();s&&s.length>3&&n(s)});try{document.querySelectorAll("iframe").forEach(i=>{try{let s=i.contentDocument;if(!s)return;let l=s.body?.innerText?.trim();l&&l.length>20&&n(l.slice(0,500))}catch{}})}catch{}return document.querySelectorAll("a").forEach(i=>{if(i.closest("[data-yuktai-panel]")||!ot(i))return;let s=i.innerText?.trim();s&&s.length>3&&s.length<100&&n(s)}),e.join(" ").slice(0,5e3)}function Sd(e){let t=e.getAttribute("aria-label")?.trim();if(t)return t;let n=e.getAttribute("aria-labelledby");if(n){let l=document.getElementById(n);if(l)return l.innerText?.trim()||""}if(e.id){let l=document.querySelector(`label[for="${e.id}"]`);if(l)return l.innerText?.trim()||""}let o=e.closest("label");if(o){let l=o.cloneNode(!0);return l.querySelectorAll("input, select, textarea").forEach(c=>c.remove()),l.innerText?.trim()||""}if((e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&e.placeholder)return e.placeholder;if(e.name)return e.name.replace(/[_-]/g," ");let r=e.previousSibling;if(r?.nodeType===Node.TEXT_NODE){let l=r.textContent?.trim();if(l&&l.length>1)return l}let a=e.previousElementSibling;if(a){let l=a.innerText?.trim();if(l&&l.length>1&&l.length<60)return l}let i=e.closest("td, th");if(i){let l=i.previousElementSibling;if(l){let c=l.innerText?.trim();if(c&&c.length>1)return c}}let s=e.getAttribute("title")?.trim();return s||(e instanceof HTMLInputElement?e.type:"field")}function gl(){let e=[],t=document.querySelectorAll(["input:not([type=hidden])","input:not([type=submit])","input:not([type=button])","input:not([type=reset])","input:not([type=image])","select","textarea","[contenteditable='true']","[role='textbox']","[role='combobox']","[role='spinbutton']","[role='searchbox']","[role='listbox']"].join(", "));for(let n of t){if(n.closest("[data-yuktai-panel]")||!ot(n))continue;if(n instanceof HTMLInputElement){let r=n.type.toLowerCase();if(["submit","button","reset","image"].includes(r))continue}let o=Sd(n);e.push({label:o,type:n instanceof HTMLInputElement?n.type:n.tagName.toLowerCase(),placeholder:(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&n.placeholder||"",required:n.required||n.getAttribute("aria-required")==="true"||n.getAttribute("data-required")==="true",element:n})}return e}function pl(e,t=3e3){e.scrollIntoView({behavior:"smooth",block:"center"}),e.style.outline="3px solid #0d9488",e.style.outlineOffset="3px";try{e.focus()}catch{}setTimeout(()=>{e.style.outline="",e.style.outlineOffset=""},t)}function ml(e){let t=e.toLowerCase(),n=document.querySelectorAll("h1, h2, h3, h4, h5, h6, section, article, [id], [aria-label], [role='heading'], [role='region']");for(let o of n){if(o.closest("[data-yuktai-panel]")||!ot(o))continue;if((o.innerText||o.getAttribute("id")||o.getAttribute("aria-label")||o.getAttribute("name")||"").toLowerCase().includes(t))return o.scrollIntoView({behavior:"smooth",block:"center"}),o.style.outline="2px solid #0d9488",o.style.outlineOffset="4px",setTimeout(()=>{o.style.outline="",o.style.outlineOffset=""},2500),!0}return!1}async function Ed(e,t,n){let o=window,r=o.LanguageModel||o.ai?.languageModel;if(!r)throw new Error("Gemini Nano not available");let a=await r.create({systemPrompt:`You are a helpful web accessibility agent.
1131
+ `}var Ea=vt(()=>{"use strict";x();Ba()});var Ha={};Xt(Ha,{getPageText:()=>La,highlightField:()=>Ya,runAgent:()=>jg,scanFormFields:()=>Pa,scrollToSection:()=>Ua});function lt(e){try{let t=window.getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden"||t.opacity==="0"||e.hidden)return!1;let o=e.getBoundingClientRect();return!(o.width===0&&o.height===0)}catch{return!0}}function La(){let e=[],t=new Set,o=r=>{let s=r.trim();s&&s.length>10&&!t.has(s)&&(t.add(s),e.push(s))};document.title&&o(document.title);let n=['meta[name="description"]','meta[name="keywords"]','meta[property="og:title"]','meta[property="og:description"]','meta[name="twitter:title"]','meta[name="twitter:description"]'];for(let r of n){let s=document.querySelector(r)?.getAttribute("content");s&&o(s)}let A=["h1","h2","h3","h4","h5","h6","p","blockquote","q","pre","code","li","dt","dd","th","td","caption","a","b","strong","em","i","u","s","abbr","acronym","cite","dfn","mark","small","sub","sup","ins","del","bdi","bdo","article","section","aside","nav","header","footer","main","summary","details","figcaption","figure","address","time","output","label","legend","option","button","font","center","span","div","[role='heading']","[role='main']","[role='article']","[role='region']","[role='complementary']","[role='contentinfo']","[role='navigation']","[role='banner']","[role='listitem']","[role='cell']","[role='columnheader']","[role='rowheader']"],i=document.querySelectorAll(A.join(","));for(let r of i){if(r.closest("[data-yuktai-panel]")||!lt(r)||r.querySelector("p, h1, h2, h3, h4, h5, h6, li, td, th, div, article, section, blockquote, pre"))continue;let a=r.innerText?.trim();if(a&&a.length>10&&o(a),!a){let f=r.textContent?.trim();f&&f.length>10&&o(f)}let l=r.getAttribute("aria-label")?.trim();l&&l.length>5&&o(l);let g=r.getAttribute("aria-description")?.trim();g&&g.length>5&&o(g);let d=r.getAttribute("aria-valuetext")?.trim();d&&o(d);let u=r.getAttribute("title")?.trim();u&&u.length>5&&o(u);let I=r.getAttribute("data-label")?.trim();I&&o(I);let y=r.getAttribute("data-title")?.trim();y&&o(y),r.querySelectorAll("img").forEach(f=>{let c=f.getAttribute("alt")?.trim();c&&c.length>5&&o(c);let p=f.getAttribute("title")?.trim();p&&p.length>5&&o(p)})}document.querySelectorAll("img").forEach(r=>{if(r.closest("[data-yuktai-panel]")||!lt(r))return;let s=r.getAttribute("alt")?.trim(),a=r.getAttribute("title")?.trim();s&&s.length>5&&o(s),a&&a.length>5&&o(a)}),document.querySelectorAll("input:not([type=hidden]), textarea").forEach(r=>{if(r.closest("[data-yuktai-panel]")||!lt(r))return;r.placeholder&&o(r.placeholder),r.value&&r.value.length>3&&o(r.value);let s=r.getAttribute("aria-label")?.trim();s&&o(s)}),document.querySelectorAll("select").forEach(r=>{r.closest("[data-yuktai-panel]")||lt(r)&&Array.from(r.options).forEach(s=>{s.text?.trim().length>3&&o(s.text.trim())})}),document.querySelectorAll("td, th").forEach(r=>{if(r.closest("[data-yuktai-panel]")||!lt(r))return;let s=r.innerText?.trim();s&&s.length>3&&o(s)});try{document.querySelectorAll("iframe").forEach(r=>{try{let s=r.contentDocument;if(!s)return;let a=s.body?.innerText?.trim();a&&a.length>20&&o(a.slice(0,500))}catch{}})}catch{}return document.querySelectorAll("a").forEach(r=>{if(r.closest("[data-yuktai-panel]")||!lt(r))return;let s=r.innerText?.trim();s&&s.length>3&&s.length<100&&o(s)}),e.join(" ").slice(0,5e3)}function Vg(e){let t=e.getAttribute("aria-label")?.trim();if(t)return t;let o=e.getAttribute("aria-labelledby");if(o){let a=document.getElementById(o);if(a)return a.innerText?.trim()||""}if(e.id){let a=document.querySelector(`label[for="${e.id}"]`);if(a)return a.innerText?.trim()||""}let n=e.closest("label");if(n){let a=n.cloneNode(!0);return a.querySelectorAll("input, select, textarea").forEach(l=>l.remove()),a.innerText?.trim()||""}if((e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&e.placeholder)return e.placeholder;if(e.name)return e.name.replace(/[_-]/g," ");let A=e.previousSibling;if(A?.nodeType===Node.TEXT_NODE){let a=A.textContent?.trim();if(a&&a.length>1)return a}let i=e.previousElementSibling;if(i){let a=i.innerText?.trim();if(a&&a.length>1&&a.length<60)return a}let r=e.closest("td, th");if(r){let a=r.previousElementSibling;if(a){let l=a.innerText?.trim();if(l&&l.length>1)return l}}let s=e.getAttribute("title")?.trim();return s||(e instanceof HTMLInputElement?e.type:"field")}function Pa(){let e=[],t=document.querySelectorAll(["input:not([type=hidden])","input:not([type=submit])","input:not([type=button])","input:not([type=reset])","input:not([type=image])","select","textarea","[contenteditable='true']","[role='textbox']","[role='combobox']","[role='spinbutton']","[role='searchbox']","[role='listbox']"].join(", "));for(let o of t){if(o.closest("[data-yuktai-panel]")||!lt(o))continue;if(o instanceof HTMLInputElement){let A=o.type.toLowerCase();if(["submit","button","reset","image"].includes(A))continue}let n=Vg(o);e.push({label:n,type:o instanceof HTMLInputElement?o.type:o.tagName.toLowerCase(),placeholder:(o instanceof HTMLInputElement||o instanceof HTMLTextAreaElement)&&o.placeholder||"",required:o.required||o.getAttribute("aria-required")==="true"||o.getAttribute("data-required")==="true",element:o})}return e}function Ya(e,t=3e3){e.scrollIntoView({behavior:"smooth",block:"center"}),e.style.outline="3px solid #0d9488",e.style.outlineOffset="3px";try{e.focus()}catch{}setTimeout(()=>{e.style.outline="",e.style.outlineOffset=""},t)}function Ua(e){let t=e.toLowerCase(),o=document.querySelectorAll("h1, h2, h3, h4, h5, h6, section, article, [id], [aria-label], [role='heading'], [role='region']");for(let n of o){if(n.closest("[data-yuktai-panel]")||!lt(n))continue;if((n.innerText||n.getAttribute("id")||n.getAttribute("aria-label")||n.getAttribute("name")||"").toLowerCase().includes(t))return n.scrollIntoView({behavior:"smooth",block:"center"}),n.style.outline="2px solid #0d9488",n.style.outlineOffset="4px",setTimeout(()=>{n.style.outline="",n.style.outlineOffset=""},2500),!0}return!1}async function _g(e,t,o){let n=window,A=n.LanguageModel||n.ai?.languageModel;if(!A)throw new Error("Gemini Nano not available");let i=await A.create({systemPrompt:`You are a helpful web accessibility agent.
1121
1132
  Create a simple action plan to help a user complete a task on a webpage.
1122
1133
  Rules:
1123
1134
  - Maximum 5 steps
1124
1135
  - Short and clear \u2014 no jargon
1125
1136
  - If filling a form \u2014 list each field and what to enter
1126
1137
  - No markdown \u2014 no asterisks, no bold, no headers
1127
- - Number each step: 1. 2. 3.`}),s=`Page content: ${e}${n?`
1138
+ - Number each step: 1. 2. 3.`}),s=`Page content: ${e}${o?`
1128
1139
  The page has form fields the user may need to fill.`:""}
1129
1140
 
1130
1141
  User task: ${t}
1131
1142
 
1132
- Action plan:`,l=await a.prompt(s);return a.destroy(),l?.trim()||""}async function Td(e,t){let{askPageWithTransformers:n}=await Promise.resolve().then(()=>(Dt(),Zn));return(await n(`How do I: ${t}`)).answer||"I could not create a plan for this task."}async function Bd(e,t,n){if(!e.trim())return{success:!1,steps:[],error:"Please tell me what you want to do."};if(!t)return{success:!1,steps:[],error:"No AI engine available on this device."};let o=[],r=(a,i="info")=>{let s={text:a,type:i};o.push(s),n(s)};try{r("\u{1F4D6} Reading page content...","info");let a=ul(),i=gl(),s=i.length>0;a.length<50&&r("\u26A0\uFE0F Page content is very limited. This may be a static image page.","error"),r(s?`\u{1F4CB} Found ${i.length} form field${i.length!==1?"s":""} on this page`:"\u{1F4C4} No form fields found \u2014 this appears to be a content page","info"),r("\u{1F916} Creating action plan...","info");let l="";try{t==="gemini"?l=await Ed(a,e,s):l=await Td(a,e)}catch{l=s?`1. Locate the form on this page
1143
+ Action plan:`,a=await i.prompt(s);return i.destroy(),a?.trim()||""}async function Xg(e,t){let{askPageWithTransformers:o}=await Promise.resolve().then(()=>(Tt(),No));return(await o(`How do I: ${t}`)).answer||"I could not create a plan for this task."}async function jg(e,t,o){if(!e.trim())return{success:!1,steps:[],error:"Please tell me what you want to do."};if(!t)return{success:!1,steps:[],error:"No AI engine available on this device."};let n=[],A=(i,r="info")=>{let s={text:i,type:r};n.push(s),o(s)};try{A("\u{1F4D6} Reading page content...","info");let i=La(),r=Pa(),s=r.length>0;i.length<50&&A("\u26A0\uFE0F Page content is very limited. This may be a static image page.","error"),A(s?`\u{1F4CB} Found ${r.length} form field${r.length!==1?"s":""} on this page`:"\u{1F4C4} No form fields found \u2014 this appears to be a content page","info"),A("\u{1F916} Creating action plan...","info");let a="";try{t==="gemini"?a=await _g(i,e,s):a=await Xg(i,e)}catch{a=s?`1. Locate the form on this page
1133
1144
  2. Fill each required field
1134
1145
  3. Review your answers
1135
1146
  4. Submit the form`:`1. Read the page carefully
1136
1147
  2. Find the section relevant to your task
1137
- 3. Follow the on-page instructions`}if(l&&(r("\u2705 Your action plan:","success"),l.split(/\n/).map(c=>c.replace(/\*\*/g,"").replace(/\*/g,"").trim()).filter(c=>c.length>5).slice(0,6).forEach(c=>r(` ${c}`,"action"))),s){let c=i[0];r(`\u{1F3AF} First field: "${c.label}"${c.required?" \u2605 required":""}`,"field"),pl(c.element),i.length>1&&r(`\u{1F4DD} All ${i.length} fields: ${i.map(d=>d.label).join(" \u2192 ")}`,"info")}else{let c=e.toLowerCase().split(/\s+/).filter(g=>g.length>3),d=!1;for(let g of c)if(ml(g)){r(`\u{1F3AF} Scrolled to relevant section: "${g}"`,"action"),d=!0;break}d||r("\u{1F4A1} Scroll through the page to find what you need.","info")}return r("\u2705 Ready. Follow the steps above. Ask me again if you need more help.","success"),{success:!0,steps:o}}catch(a){let i=a instanceof Error?a.message:"Agent error.";return r(`\u26A0\uFE0F ${i}`,"error"),{success:!1,steps:o,error:i}}}var fl=bt(()=>{"use strict";v()});var Xu={};Lt(Xu,{AUDIT_RULES:()=>Zt,AbcIcon:()=>pi,AccessibilityIcon:()=>Fo,AdminIcon:()=>fa,AgenticGridBar:()=>Hu,AgenticPanel:()=>Wu,AlertIcon:()=>sr,AlignCenterIcon:()=>ai,AlignJustifyIcon:()=>li,AlignLeftIcon:()=>ii,AlignRightIcon:()=>si,ApiIcon:()=>Gi,ArchitectureIcon:()=>qi,ArrowDownIcon:()=>Xi,ArrowLeftIcon:()=>Gr,ArrowRightIcon:()=>Lr,ArrowUpIcon:()=>Nr,BarChartIcon:()=>Aa,BoldIcon:()=>ni,BookIcon:()=>br,BookmarkIcon:()=>Wi,BrainIcon:()=>_i,BugReportIcon:()=>ha,BulbIcon:()=>_r,CakeIcon:()=>ma,CalendarIcon:()=>yr,CardsIcon:()=>jo,ChatIcon:()=>Xo,CheckIcon:()=>Go,ChevronLeftIcon:()=>Mo,ChevronRightIcon:()=>Ro,ChevronsIcon:()=>Vo,CleaningIcon:()=>oa,ClockIcon:()=>Ir,CloseIcon:()=>Lo,CloudIcon:()=>Di,CodeIcon:()=>ei,ComputerIcon:()=>Fi,ContrastIcon:()=>Po,CopyIcon:()=>nr,DEFAULT_A11Y_SETTINGS:()=>$a,DashboardIcon:()=>na,DataObjectIcon:()=>Li,DeleteIcon:()=>Vr,DocumentScannerIcon:()=>ta,DownloadIcon:()=>tr,DragHandleIcon:()=>ra,ExploreIcon:()=>la,ExternalIcon:()=>Rr,EyeIcon:()=>dr,EyeOffIcon:()=>Hi,FONT_MAX:()=>Zl,FONT_MIN:()=>Xl,FONT_STEP:()=>Da,FactCheckIcon:()=>Zi,FileIcon:()=>Qr,FilterIcon:()=>or,FirstIcon:()=>rr,FontIcon:()=>ui,FormIcon:()=>cr,FullscreenExitIcon:()=>ki,FullscreenIcon:()=>Ci,GavelIcon:()=>Yi,GiftIcon:()=>Br,GlobeIcon:()=>Cr,GridCore:()=>Tt,GridIcon:()=>Ko,HeadphonesIcon:()=>Fr,HeartFilledIcon:()=>Xr,HeartIcon:()=>jr,HelpIcon:()=>Wr,HomeIcon:()=>fr,HubIcon:()=>Zr,ICON_MIN_CONTRAST:()=>Cn,ICON_NAMES:()=>xo,ICON_PATHS:()=>Je,IconBase:()=>be,ImageIcon:()=>Mr,ImageSearchIcon:()=>ea,InfoIcon:()=>lr,InsightsIcon:()=>sa,InstallIcon:()=>Hr,IntegrationIcon:()=>ya,ItalicIcon:()=>oi,JoinIcon:()=>Si,KeyIcon:()=>yi,KeyboardIcon:()=>ua,LabelIcon:()=>da,LampIcon:()=>kr,LastIcon:()=>ir,LayoutIcon:()=>ur,LinkIcon:()=>Ai,LoaderIcon:()=>Ea,LockIcon:()=>hi,LoginIcon:()=>Ca,LogoutIcon:()=>ka,MapIcon:()=>$r,MeditateIcon:()=>Yr,MenuIcon:()=>hr,MergeIcon:()=>vi,MicIcon:()=>Zo,MinusIcon:()=>qo,MoonIcon:()=>Do,MotionIcon:()=>$o,MovieIcon:()=>Qi,MusicIcon:()=>Pr,MusicOffIcon:()=>Bi,MusicVideoIcon:()=>Mi,NamaskarIcon:()=>Ia,PageBreakIcon:()=>mi,PaletteIcon:()=>Wo,PauseIcon:()=>Sr,PenIcon:()=>zr,PersonIcon:()=>xr,PhoneIcon:()=>Pi,PinIcon:()=>Dr,PlayIcon:()=>vr,PlugIcon:()=>Ar,PlusIcon:()=>Yo,QuoteIcon:()=>ci,RUST_AUTO_MIN_ROWS:()=>fo,RadioCheckedIcon:()=>Ki,RadioIcon:()=>Vi,ReadingIcon:()=>zo,RedoIcon:()=>Ii,RepeatIcon:()=>Sa,ResetIcon:()=>_o,RobotIcon:()=>Kr,Runtime:()=>rt,SaveIcon:()=>ca,SchoolIcon:()=>Ui,SearchIcon:()=>So,SearchOffIcon:()=>Oi,SendIcon:()=>Er,SentimentSadIcon:()=>ba,ShareIcon:()=>Tr,ShieldCheckIcon:()=>Ba,ShuffleIcon:()=>wi,SkipIcon:()=>Uo,SlideshowIcon:()=>Ri,SortDownIcon:()=>To,SortIcon:()=>Jo,SortUpIcon:()=>Eo,SparkIcon:()=>ar,SpeakerIcon:()=>Ho,SpeedIcon:()=>va,SpellcheckIcon:()=>gi,StarIcon:()=>Ta,StopIcon:()=>er,StorageIcon:()=>Ni,StyleIcon:()=>fi,SunIcon:()=>Jr,SunriseIcon:()=>xa,SunsetIcon:()=>wa,SwapIcon:()=>xi,TargetIcon:()=>Oo,TempleIcon:()=>Ur,TextIcon:()=>ti,TitleIcon:()=>di,ToolsIcon:()=>mr,TouchIcon:()=>Ei,TrendingDownIcon:()=>pa,TrendingUpIcon:()=>ga,TrophyIcon:()=>qr,UnderlineIcon:()=>ri,UndoIcon:()=>pr,UnlockIcon:()=>bi,UploadIcon:()=>ji,UsersIcon:()=>wr,VolumeOffIcon:()=>Ti,VolunteerIcon:()=>Ji,WalletIcon:()=>Or,WandIcon:()=>gr,WifiIcon:()=>$i,WifiOffIcon:()=>zi,YuktAI:()=>ju,YuktAIWrapper:()=>pn,YuktaiGrid:()=>Fl,YuktaiGridAI:()=>An,YuktaiGridAgent:()=>El,YuktaiGridWebMCP:()=>Yt,YuktaiIcon:()=>f,ZoomInIcon:()=>ia,ZoomOutIcon:()=>aa,accessibleName:()=>De,addPeriods:()=>Qn,aggregate:()=>Nt,aiPlugin:()=>zt,analyzePage:()=>ql,answerGridQuestion:()=>Pa,applyGridFilters:()=>Ze,askAboutPage:()=>Na,askInsight:()=>Ya,auditToJSON:()=>Qa,auditToMarkdown:()=>Ma,clearFilters:()=>uo,clearSort:()=>po,comparePeriods:()=>cc,contrastRatio:()=>Qt,countGrid:()=>ao,createA11yCopilot:()=>Ra,createContextIndex:()=>Oa,createGridTools:()=>St,createVoiceA11yController:()=>za,default:()=>pn,detectAnomalies:()=>Tn,detectPageIntent:()=>_l,executeGridQuery:()=>tt,filterGrid:()=>co,findMentionedColumn:()=>$e,getColumns:()=>so,getRow:()=>lo,getRowId:()=>Ie,gridPassages:()=>oc,groupBy:()=>lc,highlightRows:()=>vt,iconContrast:()=>Rt,iconSvg:()=>vo,loadGridCore:()=>bn,moveGridRowFocus:()=>tc,openRow:()=>Wt,pagePassages:()=>nc,parseAmount:()=>En,parseColor:()=>ct,parseGridIntent:()=>mo,parseGridQuery:()=>At,parseVoiceA11yCommand:()=>ec,pickGlyphColor:()=>kn,planTasks:()=>Mn,readFormFields:()=>Ul,relativeLuminance:()=>xn,reviewDesign:()=>qa,reviewForm:()=>Yl,reviewForms:()=>en,runGridQuery:()=>jl,runQaAudit:()=>et,runTasks:()=>Ha,searchGrid:()=>io,selectRow:()=>Ht,sortGrid:()=>go,startOfPeriod:()=>Ua,summarizeRows:()=>Bn,toGridToolColumns:()=>it,tokenize:()=>tn,trend:()=>dc,useAgenticGrid:()=>Ou,useGrid:()=>Dl,useYuktaiGridAgent:()=>Ut,voicePlugin:()=>Ot,wantsRustEngine:()=>hn,wcag:()=>Se,wcagPlugin:()=>Se});module.exports=Sc(Xu);v();v();v();function is(){let e=window;return e.Rewriter||e.ai?.rewriter||null}async function $n(){try{let e=is();if(!e)return!1;if(typeof e.availability=="function"){let t=await e.availability();return t==="readily"||t==="available"||t==="downloadable"}return typeof e.capabilities=="function"?(await e.capabilities())?.available!=="no":typeof e.create=="function"}catch{return!1}}async function Ec(e){if(!e||e.trim().length<20)return{success:!1,original:e,rewritten:e,error:"Text too short"};try{let t=is();if(!t)throw new Error("Rewriter API not available");let n=await t.create({tone:"more-casual",format:"plain-text",length:"as-is",outputLanguage:"en"}),o=await n.rewrite(e,{context:"Rewrite this text in simple plain English. Use short sentences. Avoid jargon. Make it easy to understand for everyone."});return n.destroy(),{success:!0,original:e,rewritten:o.trim()}}catch(t){return{success:!1,original:e,rewritten:e,error:t instanceof Error?t.message:"Rewrite failed"}}}async function as(){if(!await $n())return{fixed:0,error:"Chrome Built-in AI Rewriter not available. Enable via chrome://flags."};let t=document.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li, blockquote, td, th, label, figcaption"),n=0;for(let o of t){let r=o.innerText?.trim();if(!r||r.length<20||o.closest("[data-yuktai-panel]"))continue;let a=await Ec(r);a.success&&a.rewritten!==r&&(o.dataset.yuktaiOriginal=r,o.innerText=a.rewritten,n++)}return{fixed:n}}function ss(){let e=document.querySelectorAll("[data-yuktai-original]");for(let t of e){let n=t.dataset.yuktaiOriginal;n&&(t.innerText=n,delete t.dataset.yuktaiOriginal)}}v();var ls="yuktai-summary-box";function cs(){let e=window;return e.Summarizer||e.ai?.summarizer||null}async function zn(){try{let e=cs();if(!e)return!1;if(typeof e.availability=="function"){let t=await e.availability();return t==="readily"||t==="available"||t==="downloadable"}return typeof e.capabilities=="function"?(await e.capabilities())?.available!=="no":typeof e.create=="function"}catch{return!1}}function Tc(){let e=document.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li, blockquote, article, section"),t=[];for(let n of e){if(n.closest("[data-yuktai-panel]"))continue;let o=window.getComputedStyle(n);if(o.display==="none"||o.visibility==="hidden")continue;let r=n.innerText?.trim();r&&r.length>10&&t.push(r)}return t.join(" ").slice(0,5e3)}async function ds(){if(!await zn())return{success:!1,summary:"",error:"Chrome Built-in AI Summarizer not available. Enable via chrome://flags."};let t=Tc();if(!t||t.length<100)return{success:!1,summary:"",error:"Not enough text on this page to summarise."};try{let n=cs();if(!n)throw new Error("Summarizer API not available");let o=await n.create({type:"tl;dr",format:"plain-text",length:"short",outputLanguage:"en"}),r=await o.summarize(t,{context:"Summarise this page in 2-3 simple sentences for a screen reader user who wants to know if this page is relevant to them."});return o.destroy(),Bc(r.trim()),{success:!0,summary:r.trim()}}catch(n){return{success:!1,summary:"",error:n instanceof Error?n.message:"Summary failed"}}}function Bc(e){rn();let t=document.createElement("div");t.id=ls,t.setAttribute("data-yuktai-panel","true"),t.setAttribute("role","region"),t.setAttribute("aria-label","Page summary by yuktai"),t.style.cssText=`
1148
+ 3. Follow the on-page instructions`}if(a&&(A("\u2705 Your action plan:","success"),a.split(/\n/).map(l=>l.replace(/\*\*/g,"").replace(/\*/g,"").trim()).filter(l=>l.length>5).slice(0,6).forEach(l=>A(` ${l}`,"action"))),s){let l=r[0];A(`\u{1F3AF} First field: "${l.label}"${l.required?" \u2605 required":""}`,"field"),Ya(l.element),r.length>1&&A(`\u{1F4DD} All ${r.length} fields: ${r.map(g=>g.label).join(" \u2192 ")}`,"info")}else{let l=e.toLowerCase().split(/\s+/).filter(d=>d.length>3),g=!1;for(let d of l)if(Ua(d)){A(`\u{1F3AF} Scrolled to relevant section: "${d}"`,"action"),g=!0;break}g||A("\u{1F4A1} Scroll through the page to find what you need.","info")}return A("\u2705 Ready. Follow the steps above. Ask me again if you need more help.","success"),{success:!0,steps:n}}catch(i){let r=i instanceof Error?i.message:"Agent error.";return A(`\u26A0\uFE0F ${r}`,"error"),{success:!1,steps:n,error:r}}}var Ja=vt(()=>{"use strict";x()});var ud={};Xt(ud,{AUDIT_RULES:()=>Co,AbcIcon:()=>Pr,AccessibilityIcon:()=>sA,AdminIcon:()=>Hi,AgenticGridBar:()=>nd,AgenticPanel:()=>Ad,AlertIcon:()=>GA,AlignCenterIcon:()=>Mr,AlignJustifyIcon:()=>Nr,AlignLeftIcon:()=>Dr,AlignRightIcon:()=>Gr,ApiIcon:()=>ri,ArchitectureIcon:()=>Ci,ArrowDownIcon:()=>Qi,ArrowLeftIcon:()=>rr,ArrowRightIcon:()=>ir,ArrowUpIcon:()=>Ar,BarChartIcon:()=>Ui,BoldIcon:()=>kr,BookIcon:()=>KA,BookmarkIcon:()=>Ii,BrainIcon:()=>fi,BugReportIcon:()=>Ji,BulbIcon:()=>fr,CakeIcon:()=>Yi,CalendarIcon:()=>qA,CardsIcon:()=>BA,ChatIcon:()=>QA,CheckIcon:()=>rA,ChevronLeftIcon:()=>tA,ChevronRightIcon:()=>nA,ChevronsIcon:()=>yA,CleaningIcon:()=>Si,ClockIcon:()=>$A,CloseIcon:()=>iA,CloudIcon:()=>li,CodeIcon:()=>wr,ComputerIcon:()=>si,ContrastIcon:()=>aA,CopyIcon:()=>kA,DEFAULT_A11Y_SETTINGS:()=>gs,DashboardIcon:()=>ki,DataObjectIcon:()=>ii,DeleteIcon:()=>yr,DocumentScannerIcon:()=>xi,DownloadIcon:()=>xA,DragHandleIcon:()=>vi,ExploreIcon:()=>Ni,ExternalIcon:()=>nr,EyeIcon:()=>TA,EyeOffIcon:()=>ui,FONT_MAX:()=>hl,FONT_MIN:()=>fl,FONT_STEP:()=>ls,FactCheckIcon:()=>Ei,FileIcon:()=>or,FilterIcon:()=>SA,FirstIcon:()=>vA,FontIcon:()=>Fr,FormIcon:()=>RA,FullscreenExitIcon:()=>Vr,FullscreenIcon:()=>Or,GavelIcon:()=>mi,GiftIcon:()=>er,GlobeIcon:()=>OA,GridCore:()=>Ut,GridIcon:()=>bA,HeadphonesIcon:()=>sr,HeartFilledIcon:()=>Qr,HeartIcon:()=>Br,HelpIcon:()=>Ir,HomeIcon:()=>HA,HubIcon:()=>Er,ICON_MIN_CONTRAST:()=>zo,ICON_NAMES:()=>zn,ICON_PATHS:()=>Ve,IconBase:()=>he,ImageIcon:()=>tr,ImageSearchIcon:()=>wi,InfoIcon:()=>NA,InsightsIcon:()=>Gi,InstallIcon:()=>ur,IntegrationIcon:()=>qi,ItalicIcon:()=>Sr,JoinIcon:()=>Xr,KeyIcon:()=>qr,KeyboardIcon:()=>Fi,LabelIcon:()=>Ti,LampIcon:()=>VA,LastIcon:()=>DA,LayoutIcon:()=>FA,LinkIcon:()=>Ur,LoaderIcon:()=>ji,LockIcon:()=>Jr,LoginIcon:()=>Oi,LogoutIcon:()=>Vi,MapIcon:()=>gr,MeditateIcon:()=>mr,MenuIcon:()=>JA,MergeIcon:()=>_r,MicIcon:()=>EA,MinusIcon:()=>CA,MoonIcon:()=>lA,MotionIcon:()=>gA,MovieIcon:()=>oi,MusicIcon:()=>ar,MusicOffIcon:()=>ei,MusicVideoIcon:()=>ti,NamaskarIcon:()=>$i,PageBreakIcon:()=>Yr,PaletteIcon:()=>IA,PauseIcon:()=>XA,PenIcon:()=>cr,PersonIcon:()=>zA,PhoneIcon:()=>ai,PinIcon:()=>lr,PlayIcon:()=>_A,PlugIcon:()=>UA,PlusIcon:()=>mA,QuoteIcon:()=>Rr,RUST_AUTO_MIN_ROWS:()=>Dn,RadioCheckedIcon:()=>bi,RadioIcon:()=>yi,ReadingIcon:()=>cA,RedoIcon:()=>$r,RepeatIcon:()=>Xi,ResetIcon:()=>fA,RobotIcon:()=>br,Runtime:()=>gt,SaveIcon:()=>Ri,SchoolIcon:()=>pi,SearchIcon:()=>Xn,SearchOffIcon:()=>di,SendIcon:()=>jA,SentimentSadIcon:()=>Ki,ShareIcon:()=>ZA,ShieldCheckIcon:()=>es,ShuffleIcon:()=>Wr,SkipIcon:()=>pA,SlideshowIcon:()=>ni,SortDownIcon:()=>Zn,SortIcon:()=>hA,SortUpIcon:()=>jn,SparkIcon:()=>MA,SpeakerIcon:()=>uA,SpeedIcon:()=>_i,SpellcheckIcon:()=>Lr,StarIcon:()=>Zi,StopIcon:()=>wA,StorageIcon:()=>Ai,StyleIcon:()=>Hr,SunIcon:()=>hr,SunriseIcon:()=>zi,SunsetIcon:()=>Wi,SwapIcon:()=>zr,TargetIcon:()=>dA,TempleIcon:()=>pr,TextIcon:()=>xr,TitleIcon:()=>Tr,ToolsIcon:()=>YA,TouchIcon:()=>jr,TrendingDownIcon:()=>Pi,TrendingUpIcon:()=>Li,TrophyIcon:()=>Cr,UnderlineIcon:()=>vr,UndoIcon:()=>PA,UnlockIcon:()=>Kr,UploadIcon:()=>Bi,UsersIcon:()=>WA,VolumeOffIcon:()=>Zr,VolunteerIcon:()=>hi,WalletIcon:()=>dr,WandIcon:()=>LA,WifiIcon:()=>gi,WifiOffIcon:()=>ci,YuktAI:()=>dd,YuktAIWrapper:()=>Uo,YuktaiGrid:()=>rl,YuktaiGridAI:()=>Jo,YuktaiGridAgent:()=>el,YuktaiGridWebMCP:()=>co,YuktaiIcon:()=>C,ZoomInIcon:()=>Di,ZoomOutIcon:()=>Mi,accessibleName:()=>Ye,addPeriods:()=>en,aggregate:()=>Wt,aiPlugin:()=>io,analyzePage:()=>dl,answerGridQuestion:()=>as,applyGridFilters:()=>ot,askAboutPage:()=>As,askInsight:()=>ps,auditToJSON:()=>os,auditToMarkdown:()=>ts,clearFilters:()=>Yn,clearSort:()=>Hn,comparePeriods:()=>kl,contrastRatio:()=>Pt,countGrid:()=>Tn,createA11yCopilot:()=>ns,createContextIndex:()=>ro,createGridTools:()=>qt,createVoiceA11yController:()=>cs,default:()=>Uo,detectAnomalies:()=>Xo,detectPageIntent:()=>ul,executeGridQuery:()=>At,filterGrid:()=>Pn,findMentionedColumn:()=>He,getColumns:()=>Fn,getRow:()=>Ln,getRowId:()=>Qe,gridPassages:()=>Fa,groupBy:()=>xl,highlightRows:()=>Kt,iconContrast:()=>zt,iconSvg:()=>_n,loadGridCore:()=>Lo,moveGridRowFocus:()=>bl,openRow:()=>lo,pagePassages:()=>Ta,parseAmount:()=>_o,parseColor:()=>at,parseGridIntent:()=>Jn,parseGridQuery:()=>wt,parseVoiceA11yCommand:()=>yl,pickGlyphColor:()=>Wo,planTasks:()=>Zo,readFormFields:()=>gl,relativeLuminance:()=>Ro,reviewDesign:()=>ms,reviewForm:()=>cl,reviewForms:()=>fo,runGridQuery:()=>Cl,runQaAudit:()=>nt,runTasks:()=>ds,searchGrid:()=>Rn,selectRow:()=>ao,sortGrid:()=>Un,startOfPeriod:()=>Is,summarizeRows:()=>jo,toGridToolColumns:()=>ct,tokenize:()=>Ao,trend:()=>Sl,useAgenticGrid:()=>od,useGrid:()=>sl,useYuktaiGridAgent:()=>go,voicePlugin:()=>so,wantsRustEngine:()=>Fo,wcag:()=>ve,wcagPlugin:()=>ve});module.exports=Yl(ud);x();x();x();function ys(){let e=window;return e.Rewriter||e.ai?.rewriter||null}async function ln(){try{let e=ys();if(!e)return!1;if(typeof e.availability=="function"){let t=await e.availability();return t==="readily"||t==="available"||t==="downloadable"}return typeof e.capabilities=="function"?(await e.capabilities())?.available!=="no":typeof e.create=="function"}catch{return!1}}async function Ul(e){if(!e||e.trim().length<20)return{success:!1,original:e,rewritten:e,error:"Text too short"};try{let t=ys();if(!t)throw new Error("Rewriter API not available");let o=await t.create({tone:"more-casual",format:"plain-text",length:"as-is",outputLanguage:"en"}),n=await o.rewrite(e,{context:"Rewrite this text in simple plain English. Use short sentences. Avoid jargon. Make it easy to understand for everyone."});return o.destroy(),{success:!0,original:e,rewritten:n.trim()}}catch(t){return{success:!1,original:e,rewritten:e,error:t instanceof Error?t.message:"Rewrite failed"}}}async function bs(){if(!await ln())return{fixed:0,error:"Chrome Built-in AI Rewriter not available. Enable via chrome://flags."};let t=document.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li, blockquote, td, th, label, figcaption"),o=0;for(let n of t){let A=n.innerText?.trim();if(!A||A.length<20||n.closest("[data-yuktai-panel]"))continue;let i=await Ul(A);i.success&&i.rewritten!==A&&(n.dataset.yuktaiOriginal=A,n.innerText=i.rewritten,o++)}return{fixed:o}}function Bs(){let e=document.querySelectorAll("[data-yuktai-original]");for(let t of e){let o=t.dataset.yuktaiOriginal;o&&(t.innerText=o,delete t.dataset.yuktaiOriginal)}}x();var Qs="yuktai-summary-box";function Es(){let e=window;return e.Summarizer||e.ai?.summarizer||null}async function gn(){try{let e=Es();if(!e)return!1;if(typeof e.availability=="function"){let t=await e.availability();return t==="readily"||t==="available"||t==="downloadable"}return typeof e.capabilities=="function"?(await e.capabilities())?.available!=="no":typeof e.create=="function"}catch{return!1}}function Hl(){let e=document.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li, blockquote, article, section"),t=[];for(let o of e){if(o.closest("[data-yuktai-panel]"))continue;let n=window.getComputedStyle(o);if(n.display==="none"||n.visibility==="hidden")continue;let A=o.innerText?.trim();A&&A.length>10&&t.push(A)}return t.join(" ").slice(0,5e3)}async function ws(){if(!await gn())return{success:!1,summary:"",error:"Chrome Built-in AI Summarizer not available. Enable via chrome://flags."};let t=Hl();if(!t||t.length<100)return{success:!1,summary:"",error:"Not enough text on this page to summarise."};try{let o=Es();if(!o)throw new Error("Summarizer API not available");let n=await o.create({type:"tl;dr",format:"plain-text",length:"short",outputLanguage:"en"}),A=await n.summarize(t,{context:"Summarise this page in 2-3 simple sentences for a screen reader user who wants to know if this page is relevant to them."});return n.destroy(),Jl(A.trim()),{success:!0,summary:A.trim()}}catch(o){return{success:!1,summary:"",error:o instanceof Error?o.message:"Summary failed"}}}function Jl(e){Eo();let t=document.createElement("div");t.id=Qs,t.setAttribute("data-yuktai-panel","true"),t.setAttribute("role","region"),t.setAttribute("aria-label","Page summary by yuktai"),t.style.cssText=`
1138
1149
  position: fixed;
1139
1150
  top: 0;
1140
1151
  left: 0;
@@ -1151,11 +1162,11 @@ Action plan:`,l=await a.prompt(s);return a.destroy(),l?.trim()||""}async functio
1151
1162
  justify-content: space-between;
1152
1163
  gap: 12px;
1153
1164
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
1154
- `;let n=document.createElement("p");n.style.cssText="margin: 0; flex: 1;",n.textContent=`\u{1F4CB} Page summary: ${e}`;let o=document.createElement("button");o.textContent="\xD7",o.setAttribute("aria-label","Close page summary"),o.style.cssText=`
1165
+ `;let o=document.createElement("p");o.style.cssText="margin: 0; flex: 1;",o.textContent=`\u{1F4CB} Page summary: ${e}`;let n=document.createElement("button");n.textContent="\xD7",n.setAttribute("aria-label","Close page summary"),n.style.cssText=`
1155
1166
  background: none; border: none; color: #ffffff;
1156
1167
  font-size: 20px; cursor: pointer; padding: 0 4px;
1157
1168
  line-height: 1; flex-shrink: 0;
1158
- `,o.addEventListener("click",rn),t.appendChild(n),t.appendChild(o),document.body.prepend(t)}function rn(){let e=document.getElementById(ls);e&&e.remove()}v();var sn=[{code:"en",label:"English"},{code:"hi",label:"Hindi"},{code:"es",label:"Spanish"},{code:"fr",label:"French"},{code:"de",label:"German"},{code:"it",label:"Italian"},{code:"pt",label:"Portuguese"},{code:"nl",label:"Dutch"},{code:"pl",label:"Polish"},{code:"ru",label:"Russian"},{code:"ja",label:"Japanese"},{code:"ko",label:"Korean"},{code:"zh",label:"Chinese"},{code:"ar",label:"Arabic"},{code:"tr",label:"Turkish"},{code:"vi",label:"Vietnamese"},{code:"bn",label:"Bengali"},{code:"id",label:"Indonesian"}],an="en";function Mc(){let e=window;return e.Translator||e.translation||null}async function Qc(e){try{let t=window;if(!Mc())return!1;if(t.Translator&&typeof t.Translator.availability=="function")try{let o=await t.Translator.availability({sourceLanguage:"en",targetLanguage:e});return o==="readily"||o==="available"||o==="downloadable"||o==="after-download"}catch{}return t.Translator&&typeof t.Translator.canTranslate=="function"?await t.Translator.canTranslate({sourceLanguage:"en",targetLanguage:e})!=="no":t.translation&&typeof t.translation.canTranslate=="function"?await t.translation.canTranslate({sourceLanguage:"en",targetLanguage:e})!=="no":!1}catch{return!1}}async function Rc(e){let t=window,n={sourceLanguage:"en",targetLanguage:e};if(t.Translator&&typeof t.Translator.create=="function")return await t.Translator.create(n);if(t.translation&&typeof t.translation.createTranslator=="function")return await t.translation.createTranslator(n);throw new Error("Translation API not available")}async function us(e){if(e===an)return{success:!0,language:e,fixed:0};if(e==="en")return On(),an="en",{success:!0,language:"en",fixed:0};if(!await Qc(e))return{success:!1,language:e,fixed:0,error:`Translation to ${e} not available. Enable via chrome://flags.`};try{let n=await Rc(e),o=document.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li, blockquote, td, th, label, figcaption, span, a"),r=0;for(let a of o){if(a.closest("[data-yuktai-panel]")||a.children.length>0)continue;let i=a.innerText?.trim();if(!i||i.length<2)continue;a.dataset.yuktaiTranslationOriginal||(a.dataset.yuktaiTranslationOriginal=i);let s=await n.translate(i);s&&s!==i&&(a.innerText=s,r++)}return typeof n.destroy=="function"&&n.destroy(),an=e,{success:!0,language:e,fixed:r}}catch(n){return{success:!1,language:e,fixed:0,error:n instanceof Error?n.message:"Translation failed"}}}function On(){let e=document.querySelectorAll("[data-yuktai-translation-original]");for(let t of e){let n=t.dataset.yuktaiTranslationOriginal;n&&(t.innerText=n,delete t.dataset.yuktaiTranslationOriginal)}an="en"}v();var Nc=[{phrases:["go to main","skip to main","main content"],action:"focus-main",label:"Jump to main content"},{phrases:["go to navigation","go to nav","open menu"],action:"focus-nav",label:"Jump to navigation"},{phrases:["go to search","search","find"],action:"focus-search",label:"Jump to search"},{phrases:["scroll down","page down","next"],action:"scroll-down",label:"Scroll down"},{phrases:["scroll up","page up","back up"],action:"scroll-up",label:"Scroll up"},{phrases:["go back","previous page"],action:"go-back",label:"Go back"},{phrases:["click","press","select"],action:"click-focused",label:"Click focused element"},{phrases:["next item","tab forward","tab"],action:"tab-forward",label:"Move to next element"},{phrases:["previous item","tab back","shift tab"],action:"tab-back",label:"Move to previous element"},{phrases:["stop listening","stop voice","quiet"],action:"stop-voice",label:"Stop voice control"}],Fe=null,ln=!1,yt=null;function Hn(){return!!(window.SpeechRecognition||window.webkitSpeechRecognition)}function Gc(e){let t=e.toLowerCase().trim();for(let n of Nc)for(let o of n.phrases)if(t.includes(o))return{action:n.action,label:n.label};return null}function Lc(e){switch(e){case"focus-main":{let t=document.querySelector("main, [role='main'], #main");t&&(t.focus(),t.scrollIntoView({behavior:"smooth"}));break}case"focus-nav":{let t=document.querySelector("nav, [role='navigation']");t&&(t.focus(),t.scrollIntoView({behavior:"smooth"}));break}case"focus-search":{let t=document.querySelector("input[type='search'], input[role='searchbox'], [aria-label*='search' i]");t&&(t.focus(),t.scrollIntoView({behavior:"smooth"}));break}case"scroll-down":{window.scrollBy({top:400,behavior:"smooth"});break}case"scroll-up":{window.scrollBy({top:-400,behavior:"smooth"});break}case"go-back":{window.history.back();break}case"click-focused":{let t=document.activeElement;t&&t!==document.body&&t.click();break}case"tab-forward":{let t=gs(),n=t.indexOf(document.activeElement),o=t[n+1]||t[0];o&&o.focus();break}case"tab-back":{let t=gs(),n=t.indexOf(document.activeElement),o=t[n-1]||t[t.length-1];o&&o.focus();break}case"stop-voice":{Wn();break}}}function gs(){return Array.from(document.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(e=>!e.closest("[data-yuktai-panel]"))}function ps(e){if(!Hn())return!1;if(ln)return!0;e&&(yt=e);let t=window.SpeechRecognition||window.webkitSpeechRecognition;return Fe=new t,Fe.continuous=!0,Fe.interimResults=!1,Fe.lang="en-US",Fe.onresult=n=>{let o=n.results[n.results.length-1][0].transcript,r=Gc(o);if(r){Lc(r.action);let a={success:!0,command:o,action:r.label};if(yt&&yt(a),r.action==="stop-voice")return}},Fe.onend=()=>{ln&&Fe?.start()},Fe.onerror=n=>{n.error!=="no-speech"&&yt&&yt({success:!1,command:"",action:"",error:`Voice error: ${n.error}`})},Fe.start(),ln=!0,Fc(),!0}function Wn(){ln=!1,Fe&&(Fe.stop(),Fe=null),yt=null,As()}var ms="yuktai-voice-indicator";function Fc(){As();let e=document.createElement("div");e.id=ms,e.setAttribute("data-yuktai-panel","true"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-label","yuktai voice control is listening"),e.style.cssText=`
1169
+ `,n.addEventListener("click",Eo),t.appendChild(o),t.appendChild(n),document.body.prepend(t)}function Eo(){let e=document.getElementById(Qs);e&&e.remove()}x();var xo=[{code:"en",label:"English"},{code:"hi",label:"Hindi"},{code:"es",label:"Spanish"},{code:"fr",label:"French"},{code:"de",label:"German"},{code:"it",label:"Italian"},{code:"pt",label:"Portuguese"},{code:"nl",label:"Dutch"},{code:"pl",label:"Polish"},{code:"ru",label:"Russian"},{code:"ja",label:"Japanese"},{code:"ko",label:"Korean"},{code:"zh",label:"Chinese"},{code:"ar",label:"Arabic"},{code:"tr",label:"Turkish"},{code:"vi",label:"Vietnamese"},{code:"bn",label:"Bengali"},{code:"id",label:"Indonesian"}],wo="en";function Kl(){let e=window;return e.Translator||e.translation||null}async function ql(e){try{let t=window;if(!Kl())return!1;if(t.Translator&&typeof t.Translator.availability=="function")try{let n=await t.Translator.availability({sourceLanguage:"en",targetLanguage:e});return n==="readily"||n==="available"||n==="downloadable"||n==="after-download"}catch{}return t.Translator&&typeof t.Translator.canTranslate=="function"?await t.Translator.canTranslate({sourceLanguage:"en",targetLanguage:e})!=="no":t.translation&&typeof t.translation.canTranslate=="function"?await t.translation.canTranslate({sourceLanguage:"en",targetLanguage:e})!=="no":!1}catch{return!1}}async function $l(e){let t=window,o={sourceLanguage:"en",targetLanguage:e};if(t.Translator&&typeof t.Translator.create=="function")return await t.Translator.create(o);if(t.translation&&typeof t.translation.createTranslator=="function")return await t.translation.createTranslator(o);throw new Error("Translation API not available")}async function xs(e){if(e===wo)return{success:!0,language:e,fixed:0};if(e==="en")return cn(),wo="en",{success:!0,language:"en",fixed:0};if(!await ql(e))return{success:!1,language:e,fixed:0,error:`Translation to ${e} not available. Enable via chrome://flags.`};try{let o=await $l(e),n=document.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li, blockquote, td, th, label, figcaption, span, a"),A=0;for(let i of n){if(i.closest("[data-yuktai-panel]")||i.children.length>0)continue;let r=i.innerText?.trim();if(!r||r.length<2)continue;i.dataset.yuktaiTranslationOriginal||(i.dataset.yuktaiTranslationOriginal=r);let s=await o.translate(r);s&&s!==r&&(i.innerText=s,A++)}return typeof o.destroy=="function"&&o.destroy(),wo=e,{success:!0,language:e,fixed:A}}catch(o){return{success:!1,language:e,fixed:0,error:o instanceof Error?o.message:"Translation failed"}}}function cn(){let e=document.querySelectorAll("[data-yuktai-translation-original]");for(let t of e){let o=t.dataset.yuktaiTranslationOriginal;o&&(t.innerText=o,delete t.dataset.yuktaiTranslationOriginal)}wo="en"}x();var zl=[{phrases:["go to main","skip to main","main content"],action:"focus-main",label:"Jump to main content"},{phrases:["go to navigation","go to nav","open menu"],action:"focus-nav",label:"Jump to navigation"},{phrases:["go to search","search","find"],action:"focus-search",label:"Jump to search"},{phrases:["scroll down","page down","next"],action:"scroll-down",label:"Scroll down"},{phrases:["scroll up","page up","back up"],action:"scroll-up",label:"Scroll up"},{phrases:["go back","previous page"],action:"go-back",label:"Go back"},{phrases:["click","press","select"],action:"click-focused",label:"Click focused element"},{phrases:["next item","tab forward","tab"],action:"tab-forward",label:"Move to next element"},{phrases:["previous item","tab back","shift tab"],action:"tab-back",label:"Move to previous element"},{phrases:["stop listening","stop voice","quiet"],action:"stop-voice",label:"Stop voice control"}],Pe=null,ko=!1,Dt=null;function dn(){return!!(window.SpeechRecognition||window.webkitSpeechRecognition)}function Wl(e){let t=e.toLowerCase().trim();for(let o of zl)for(let n of o.phrases)if(t.includes(n))return{action:o.action,label:o.label};return null}function Ol(e){switch(e){case"focus-main":{let t=document.querySelector("main, [role='main'], #main");t&&(t.focus(),t.scrollIntoView({behavior:"smooth"}));break}case"focus-nav":{let t=document.querySelector("nav, [role='navigation']");t&&(t.focus(),t.scrollIntoView({behavior:"smooth"}));break}case"focus-search":{let t=document.querySelector("input[type='search'], input[role='searchbox'], [aria-label*='search' i]");t&&(t.focus(),t.scrollIntoView({behavior:"smooth"}));break}case"scroll-down":{window.scrollBy({top:400,behavior:"smooth"});break}case"scroll-up":{window.scrollBy({top:-400,behavior:"smooth"});break}case"go-back":{window.history.back();break}case"click-focused":{let t=document.activeElement;t&&t!==document.body&&t.click();break}case"tab-forward":{let t=ks(),o=t.indexOf(document.activeElement),n=t[o+1]||t[0];n&&n.focus();break}case"tab-back":{let t=ks(),o=t.indexOf(document.activeElement),n=t[o-1]||t[t.length-1];n&&n.focus();break}case"stop-voice":{un();break}}}function ks(){return Array.from(document.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(e=>!e.closest("[data-yuktai-panel]"))}function Ss(e){if(!dn())return!1;if(ko)return!0;e&&(Dt=e);let t=window.SpeechRecognition||window.webkitSpeechRecognition;return Pe=new t,Pe.continuous=!0,Pe.interimResults=!1,Pe.lang="en-US",Pe.onresult=o=>{let n=o.results[o.results.length-1][0].transcript,A=Wl(n);if(A){Ol(A.action);let i={success:!0,command:n,action:A.label};if(Dt&&Dt(i),A.action==="stop-voice")return}},Pe.onend=()=>{ko&&Pe?.start()},Pe.onerror=o=>{o.error!=="no-speech"&&Dt&&Dt({success:!1,command:"",action:"",error:`Voice error: ${o.error}`})},Pe.start(),ko=!0,Vl(),!0}function un(){ko=!1,Pe&&(Pe.stop(),Pe=null),Dt=null,Ds()}var vs="yuktai-voice-indicator";function Vl(){Ds();let e=document.createElement("div");e.id=vs,e.setAttribute("data-yuktai-panel","true"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-label","yuktai voice control is listening"),e.style.cssText=`
1159
1170
  position: fixed;
1160
1171
  bottom: 80px;
1161
1172
  left: 50%;
@@ -1180,12 +1191,12 @@ Action plan:`,l=await a.prompt(s);return a.destroy(),l?.trim()||""}async functio
1180
1191
  background: #ffffff;
1181
1192
  animation: yuktai-pulse 1.2s infinite;
1182
1193
  flex-shrink: 0;
1183
- `,!document.getElementById("yuktai-pulse-style")){let o=document.createElement("style");o.id="yuktai-pulse-style",o.textContent=`
1194
+ `,!document.getElementById("yuktai-pulse-style")){let n=document.createElement("style");n.id="yuktai-pulse-style",n.textContent=`
1184
1195
  @keyframes yuktai-pulse {
1185
1196
  0%, 100% { opacity: 1; transform: scale(1); }
1186
1197
  50% { opacity: 0.4; transform: scale(0.7); }
1187
1198
  }
1188
- `,document.head.appendChild(o)}let n=document.createElement("span");n.textContent="Listening for commands...",e.appendChild(t),e.appendChild(n),document.body.appendChild(e)}function As(){let e=document.getElementById(ms);e&&e.remove()}v();var Pc=["button:not([aria-label]):not([aria-labelledby])","a:not([aria-label]):not([aria-labelledby])","input:not([aria-label]):not([aria-labelledby]):not([id])","select:not([aria-label]):not([aria-labelledby])","textarea:not([aria-label]):not([aria-labelledby])","[role='button']:not([aria-label])","[role='link']:not([aria-label])","[role='checkbox']:not([aria-label])","[role='tab']:not([aria-label])"].join(", ");function fs(){let e=window;return e.Writer||e.ai?.writer||null}async function Un(){try{let e=fs();if(!e)return!1;if(typeof e.availability=="function"){let t=await e.availability();return t==="readily"||t==="available"||t==="downloadable"}return typeof e.capabilities=="function"?(await e.capabilities())?.available!=="no":typeof e.create=="function"}catch{return!1}}function Dc(e){let t=[],n=e.innerText?.trim();n&&t.push(`element text: "${n}"`);let o=e.placeholder?.trim();o&&t.push(`placeholder: "${o}"`);let r=e.getAttribute("name")?.trim();r&&t.push(`name: "${r}"`);let a=e.getAttribute("type")?.trim();a&&t.push(`type: "${a}"`);let i=e.id;if(i){let c=document.querySelector(`label[for="${i}"]`);c&&t.push(`label: "${c.innerText?.trim()}"`)}let s=e.parentElement?.innerText?.trim().slice(0,60);s&&t.push(`parent context: "${s}"`),t.push(`tag: ${e.tagName.toLowerCase()}`);let l=e.getAttribute("role");return l&&t.push(`role: ${l}`),t.join(". ")}async function $c(e,t){let n=`
1199
+ `,document.head.appendChild(n)}let o=document.createElement("span");o.textContent="Listening for commands...",e.appendChild(t),e.appendChild(o),document.body.appendChild(e)}function Ds(){let e=document.getElementById(vs);e&&e.remove()}x();var _l=["button:not([aria-label]):not([aria-labelledby])","a:not([aria-label]):not([aria-labelledby])","input:not([aria-label]):not([aria-labelledby]):not([id])","select:not([aria-label]):not([aria-labelledby])","textarea:not([aria-label]):not([aria-labelledby])","[role='button']:not([aria-label])","[role='link']:not([aria-label])","[role='checkbox']:not([aria-label])","[role='tab']:not([aria-label])"].join(", ");function Ms(){let e=window;return e.Writer||e.ai?.writer||null}async function In(){try{let e=Ms();if(!e)return!1;if(typeof e.availability=="function"){let t=await e.availability();return t==="readily"||t==="available"||t==="downloadable"}return typeof e.capabilities=="function"?(await e.capabilities())?.available!=="no":typeof e.create=="function"}catch{return!1}}function Xl(e){let t=[],o=e.innerText?.trim();o&&t.push(`element text: "${o}"`);let n=e.placeholder?.trim();n&&t.push(`placeholder: "${n}"`);let A=e.getAttribute("name")?.trim();A&&t.push(`name: "${A}"`);let i=e.getAttribute("type")?.trim();i&&t.push(`type: "${i}"`);let r=e.id;if(r){let l=document.querySelector(`label[for="${r}"]`);l&&t.push(`label: "${l.innerText?.trim()}"`)}let s=e.parentElement?.innerText?.trim().slice(0,60);s&&t.push(`parent context: "${s}"`),t.push(`tag: ${e.tagName.toLowerCase()}`);let a=e.getAttribute("role");return a&&t.push(`role: ${a}`),t.join(". ")}async function jl(e,t){let o=`
1189
1200
  Generate a short, clear aria-label for an HTML element.
1190
1201
  The label must be 2-6 words maximum.
1191
1202
  The label must describe what the element does or what it is.
@@ -1196,7 +1207,7 @@ Action plan:`,l=await a.prompt(s);return a.destroy(),l?.trim()||""}async functio
1196
1207
  ${t}
1197
1208
 
1198
1209
  Output only the label. Nothing else.
1199
- `.trim();return(await e.write(n)).trim().replace(/^["']|["']$/g,"").replace(/\.$/,"").trim()}async function hs(){if(!await Un())return{success:!1,fixed:0,elements:[],error:"Chrome Built-in AI Writer not available. Enable via chrome://flags."};let t=document.querySelectorAll(Pc);if(t.length===0)return{success:!0,fixed:0,elements:[]};try{let n=fs();if(!n)throw new Error("Writer API not available");let o=await n.create({tone:"neutral",format:"plain-text",length:"short",outputLanguage:"en"}),r=0,a=[];for(let i of t){if(i.closest("[data-yuktai-panel]"))continue;let s=window.getComputedStyle(i);if(s.display==="none"||s.visibility==="hidden")continue;let l=Dc(i),c=await $c(o,l);c&&c.length>0&&(i.dataset.yuktaiLabelOriginal=i.getAttribute("aria-label")||"",i.setAttribute("aria-label",c),r++,a.push({tag:i.tagName.toLowerCase(),label:c}))}return o.destroy(),{success:!0,fixed:r,elements:a}}catch(n){return{success:!1,fixed:0,elements:[],error:n instanceof Error?n.message:"Label generation failed"}}}function bs(){let e=document.querySelectorAll("[data-yuktai-label-original]");for(let t of e){let n=t.dataset.yuktaiLabelOriginal;n?t.setAttribute("aria-label",n):t.removeAttribute("aria-label"),delete t.dataset.yuktaiLabelOriginal}}var un=null,ys=null;var Is=null,Yn=null,Ae=null,It=null,cn=null,qn=null,xt=null,dn={deuteranopia:"yuktai-cb-d",protanopia:"yuktai-cb-p",tritanopia:"yuktai-cb-t"};var xs=new Set(["input","select","textarea"]);var _n={nav:"navigation",header:"banner",footer:"contentinfo",main:"main",aside:"complementary"};function Jn(e,t="polite"){if(typeof window>"u"||!xt?.speechEnabled||!window.speechSynthesis)return;window.speechSynthesis.cancel();let n=new SpeechSynthesisUtterance(e);n.rate=1,n.pitch=1,n.volume=1;let o=window.speechSynthesis.getVoices();o.length>0&&(n.voice=o[0]),window.speechSynthesis.speak(n)}function Bs(e,t="info"){if(typeof document>"u")return;let o={success:{bg:"#0a7a44",border:"#075e34",icon:"\u2713"},error:{bg:"#b52a1c",border:"#8f2116",icon:"\u2715"},warning:{bg:"#a35f00",border:"#7a4700",icon:"\u26A0"},info:{bg:"#005A9C",border:"#003F6E",icon:"\u2139"}}[t];Ae||(Ae=document.createElement("div"),Ae.setAttribute("role","alert"),Ae.setAttribute("aria-live","assertive"),Ae.setAttribute("aria-atomic","true"),Ae.style.cssText=`
1210
+ `.trim();return(await e.write(o)).trim().replace(/^["']|["']$/g,"").replace(/\.$/,"").trim()}async function Gs(){if(!await In())return{success:!1,fixed:0,elements:[],error:"Chrome Built-in AI Writer not available. Enable via chrome://flags."};let t=document.querySelectorAll(_l);if(t.length===0)return{success:!0,fixed:0,elements:[]};try{let o=Ms();if(!o)throw new Error("Writer API not available");let n=await o.create({tone:"neutral",format:"plain-text",length:"short",outputLanguage:"en"}),A=0,i=[];for(let r of t){if(r.closest("[data-yuktai-panel]"))continue;let s=window.getComputedStyle(r);if(s.display==="none"||s.visibility==="hidden")continue;let a=Xl(r),l=await jl(n,a);l&&l.length>0&&(r.dataset.yuktaiLabelOriginal=r.getAttribute("aria-label")||"",r.setAttribute("aria-label",l),A++,i.push({tag:r.tagName.toLowerCase(),label:l}))}return n.destroy(),{success:!0,fixed:A,elements:i}}catch(o){return{success:!1,fixed:0,elements:[],error:o instanceof Error?o.message:"Label generation failed"}}}function Ns(){let e=document.querySelectorAll("[data-yuktai-label-original]");for(let t of e){let o=t.dataset.yuktaiLabelOriginal;o?t.setAttribute("aria-label",o):t.removeAttribute("aria-label"),delete t.dataset.yuktaiLabelOriginal}}var Do=null,Rs=null;var Ts=null,pn=null,pe=null,Mt=null,So=null,mn=null,Gt=null,vo={deuteranopia:"yuktai-cb-d",protanopia:"yuktai-cb-p",tritanopia:"yuktai-cb-t"};var Fs=new Set(["input","select","textarea"]);var Cn={nav:"navigation",header:"banner",footer:"contentinfo",main:"main",aside:"complementary"};function fn(e,t="polite"){if(typeof window>"u"||!Gt?.speechEnabled||!window.speechSynthesis)return;window.speechSynthesis.cancel();let o=new SpeechSynthesisUtterance(e);o.rate=1,o.pitch=1,o.volume=1;let n=window.speechSynthesis.getVoices();n.length>0&&(o.voice=n[0]),window.speechSynthesis.speak(o)}function qs(e,t="info"){if(typeof document>"u")return;let n={success:{bg:"#0a7a44",border:"#075e34",icon:"\u2713"},error:{bg:"#b52a1c",border:"#8f2116",icon:"\u2715"},warning:{bg:"#a35f00",border:"#7a4700",icon:"\u26A0"},info:{bg:"#005A9C",border:"#003F6E",icon:"\u2139"}}[t];pe||(pe=document.createElement("div"),pe.setAttribute("role","alert"),pe.setAttribute("aria-live","assertive"),pe.setAttribute("aria-atomic","true"),pe.style.cssText=`
1200
1211
  position: fixed;
1201
1212
  top: 80px;
1202
1213
  right: 16px;
@@ -1215,14 +1226,14 @@ Action plan:`,l=await a.prompt(s);return a.destroy(),l?.trim()||""}async functio
1215
1226
  transition: transform 0.3s, opacity 0.3s;
1216
1227
  transform: translateX(120%);
1217
1228
  opacity: 0;
1218
- `,document.body.appendChild(Ae)),Ae.style.background=o.bg,Ae.style.border=`1px solid ${o.border}`,Ae.style.color="#fff",Ae.innerHTML=`
1219
- <span style="font-size:18px;font-weight:700">${o.icon}</span>
1229
+ `,document.body.appendChild(pe)),pe.style.background=n.bg,pe.style.border=`1px solid ${n.border}`,pe.style.color="#fff",pe.innerHTML=`
1230
+ <span style="font-size:18px;font-weight:700">${n.icon}</span>
1220
1231
  <span style="flex:1;line-height:1.4">${e}</span>
1221
1232
  <button
1222
1233
  onclick="this.parentElement.style.transform='translateX(120%)';this.parentElement.style.opacity='0'"
1223
1234
  style="background:none;border:none;color:#fff;cursor:pointer;font-size:18px;padding:0;line-height:1"
1224
1235
  aria-label="Close notification">\xD7</button>
1225
- `,window.innerWidth<=480&&(Ae.style.right="8px",Ae.style.left="8px",Ae.style.maxWidth="none",Ae.style.width="auto"),requestAnimationFrame(()=>{Ae&&(Ae.style.transform="translateX(0)",Ae.style.opacity="1")}),setTimeout(()=>{Ae&&(Ae.style.transform="translateX(120%)",Ae.style.opacity="0")},5e3)}function ae(e,t="info",n=!0){un&&(un.textContent=e),Bs(e,t),n&&Jn(e,t==="error"?"assertive":"polite")}function zc(){if(typeof document>"u"||Is)return;let e=[{label:"Skip to main content",selector:"main,[role='main'],#main,#main-content"},{label:"Skip to navigation",selector:"nav,[role='navigation'],#nav,#navigation"},{label:"Skip to search",selector:"[role='search'],#search,input[type='search']"}],t=document.createElement("div");t.setAttribute("data-yuktai-skip-bar","true"),t.setAttribute("role","navigation"),t.setAttribute("aria-label","Skip links"),t.style.cssText=`
1236
+ `,window.innerWidth<=480&&(pe.style.right="8px",pe.style.left="8px",pe.style.maxWidth="none",pe.style.width="auto"),requestAnimationFrame(()=>{pe&&(pe.style.transform="translateX(0)",pe.style.opacity="1")}),setTimeout(()=>{pe&&(pe.style.transform="translateX(120%)",pe.style.opacity="0")},5e3)}function se(e,t="info",o=!0){Do&&(Do.textContent=e),qs(e,t),o&&fn(e,t==="error"?"assertive":"polite")}function Zl(){if(typeof document>"u"||Ts)return;let e=[{label:"Skip to main content",selector:"main,[role='main'],#main,#main-content"},{label:"Skip to navigation",selector:"nav,[role='navigation'],#nav,#navigation"},{label:"Skip to search",selector:"[role='search'],#search,input[type='search']"}],t=document.createElement("div");t.setAttribute("data-yuktai-skip-bar","true"),t.setAttribute("role","navigation"),t.setAttribute("aria-label","Skip links"),t.style.cssText=`
1226
1237
  position: fixed;
1227
1238
  top: 0;
1228
1239
  left: 0;
@@ -1236,7 +1247,7 @@ Action plan:`,l=await a.prompt(s);return a.destroy(),l?.trim()||""}async functio
1236
1247
  transform: translateY(-100%);
1237
1248
  transition: transform 0.2s ease;
1238
1249
  font-family: system-ui, sans-serif;
1239
- `;let n=!1;if(e.forEach(({label:r,selector:a})=>{let i=document.querySelector(a);if(!i)return;n=!0,i.getAttribute("tabindex")||i.setAttribute("tabindex","-1");let s=document.createElement("a");s.href="#",s.textContent=r,s.style.cssText=`
1250
+ `;let o=!1;if(e.forEach(({label:A,selector:i})=>{let r=document.querySelector(i);if(!r)return;o=!0,r.getAttribute("tabindex")||r.setAttribute("tabindex","-1");let s=document.createElement("a");s.href="#",s.textContent=A,s.style.cssText=`
1240
1251
  color: #fff;
1241
1252
  background: #005A9C;
1242
1253
  padding: 8px 14px;
@@ -1247,7 +1258,7 @@ Action plan:`,l=await a.prompt(s);return a.destroy(),l?.trim()||""}async functio
1247
1258
  white-space: nowrap;
1248
1259
  border: 2px solid transparent;
1249
1260
  transition: background 0.15s, border-color 0.15s;
1250
- `,s.addEventListener("focus",()=>{t.style.transform="translateY(0)"}),s.addEventListener("blur",()=>{setTimeout(()=>{t.matches(":focus-within")||(t.style.transform="translateY(-100%)")},2e3)}),s.addEventListener("click",l=>{l.preventDefault(),i.focus(),i.scrollIntoView({behavior:"smooth",block:"start"}),ae(`Jumped to ${r.replace("Skip to ","")}`,"info"),t.style.transform="translateY(-100%)"}),t.appendChild(s)}),!n)return;window.innerWidth<768&&(t.style.transform="translateY(0)",t.style.position="sticky"),window.addEventListener("resize",()=>{window.innerWidth<768&&(t.style.transform="translateY(0)")}),document.body.insertBefore(t,document.body.firstChild),Is=t}function Oc(){if(typeof document>"u"||document.querySelector("[data-yuktai-focus-style]"))return;let e=document.createElement("style");e.setAttribute("data-yuktai-focus-style","true"),e.textContent=`
1261
+ `,s.addEventListener("focus",()=>{t.style.transform="translateY(0)"}),s.addEventListener("blur",()=>{setTimeout(()=>{t.matches(":focus-within")||(t.style.transform="translateY(-100%)")},2e3)}),s.addEventListener("click",a=>{a.preventDefault(),r.focus(),r.scrollIntoView({behavior:"smooth",block:"start"}),se(`Jumped to ${A.replace("Skip to ","")}`,"info"),t.style.transform="translateY(-100%)"}),t.appendChild(s)}),!o)return;window.innerWidth<768&&(t.style.transform="translateY(0)",t.style.position="sticky"),window.addEventListener("resize",()=>{window.innerWidth<768&&(t.style.transform="translateY(0)")}),document.body.insertBefore(t,document.body.firstChild),Ts=t}function eg(){if(typeof document>"u"||document.querySelector("[data-yuktai-focus-style]"))return;let e=document.createElement("style");e.setAttribute("data-yuktai-focus-style","true"),e.textContent=`
1251
1262
 
1252
1263
  /* \u2500\u2500 Focus indicator \u2014 WCAG 2.4.11 minimum 2px solid \u2500\u2500 */
1253
1264
  [data-yuktai-a11y] *:focus-visible {
@@ -1393,7 +1404,7 @@ Action plan:`,l=await a.prompt(s);return a.destroy(),l?.trim()||""}async functio
1393
1404
  width: auto !important;
1394
1405
  }
1395
1406
  }
1396
- `,document.head.appendChild(e),document.documentElement.setAttribute("data-yuktai-a11y","true")}function Hc(){typeof document>"u"||document.querySelector("[data-yuktai-kb-init]")||(document.documentElement.setAttribute("data-yuktai-kb-init","true"),document.addEventListener("keydown",e=>{let t=document.activeElement;if(!t)return;let n=t.getAttribute("role")||"";if(e.key==="Escape"){let o=t.closest("[role='dialog'],[role='alertdialog']");if(o){o.style.display="none",ae("Dialog closed","info");return}let r=t.closest("[role='menu'],[role='menubar']");r&&(r.style.display="none",ae("Menu closed","info"))}if(n==="menuitem"||t.closest("[role='menu'],[role='menubar']")){let o=t.closest("[role='menu'],[role='menubar']");if(!o)return;let r=Array.from(o.querySelectorAll("[role='menuitem']:not([disabled])")),a=r.indexOf(t);e.key==="ArrowDown"||e.key==="ArrowRight"?(e.preventDefault(),r[(a+1)%r.length]?.focus()):e.key==="ArrowUp"||e.key==="ArrowLeft"?(e.preventDefault(),r[(a-1+r.length)%r.length]?.focus()):e.key==="Home"?(e.preventDefault(),r[0]?.focus()):e.key==="End"&&(e.preventDefault(),r[r.length-1]?.focus())}if(n==="tab"||t.closest("[role='tablist']")){let o=t.closest("[role='tablist']");if(!o)return;let r=Array.from(o.querySelectorAll("[role='tab']:not([disabled])")),a=r.indexOf(t);if(e.key==="ArrowRight"||e.key==="ArrowDown"){e.preventDefault();let i=r[(a+1)%r.length];i?.focus(),i?.click()}else if(e.key==="ArrowLeft"||e.key==="ArrowUp"){e.preventDefault();let i=r[(a-1+r.length)%r.length];i?.focus(),i?.click()}}if(n==="option"||t.closest("[role='listbox']")){let o=t.closest("[role='listbox']");if(!o)return;let r=Array.from(o.querySelectorAll("[role='option']:not([aria-disabled='true'])")),a=r.indexOf(t);e.key==="ArrowDown"?(e.preventDefault(),r[(a+1)%r.length]?.focus()):e.key==="ArrowUp"?(e.preventDefault(),r[(a-1+r.length)%r.length]?.focus()):(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),t.setAttribute("aria-selected","true"),r.forEach(i=>{i!==t&&i.setAttribute("aria-selected","false")}),ae(`Selected: ${t.textContent?.trim()}`,"success"))}e.altKey&&e.key==="a"&&(e.preventDefault(),Wc()),e.key==="Tab"&&xt?.speechEnabled&&setTimeout(()=>{let o=document.activeElement;if(!o)return;let r=o.getAttribute("aria-label")||o.getAttribute("title")||o.textContent?.trim()||o.tagName.toLowerCase(),a=o.getAttribute("role")||o.tagName.toLowerCase();Jn(`${r}, ${a}`)},100)}))}function gn(e){let t=e.querySelectorAll('button:not([disabled]),a[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"]),[role="button"]');if(t.length===0)return;let n=t[0],o=t[t.length-1];n.focus(),e.addEventListener("keydown",r=>{r.key==="Tab"&&(r.shiftKey?document.activeElement===n&&(r.preventDefault(),o.focus()):document.activeElement===o&&(r.preventDefault(),n.focus()))})}function Wc(){if(typeof document>"u")return;if(It){It.remove(),It=null;return}let e=document.createElement("div");e.setAttribute("role","dialog"),e.setAttribute("aria-label","Keyboard shortcuts"),e.setAttribute("aria-modal","true"),e.setAttribute("data-yuktai-cheatsheet","true"),e.style.cssText=`
1407
+ `,document.head.appendChild(e),document.documentElement.setAttribute("data-yuktai-a11y","true")}function tg(){typeof document>"u"||document.querySelector("[data-yuktai-kb-init]")||(document.documentElement.setAttribute("data-yuktai-kb-init","true"),document.addEventListener("keydown",e=>{let t=document.activeElement;if(!t)return;let o=t.getAttribute("role")||"";if(e.key==="Escape"){let n=t.closest("[role='dialog'],[role='alertdialog']");if(n){n.style.display="none",se("Dialog closed","info");return}let A=t.closest("[role='menu'],[role='menubar']");A&&(A.style.display="none",se("Menu closed","info"))}if(o==="menuitem"||t.closest("[role='menu'],[role='menubar']")){let n=t.closest("[role='menu'],[role='menubar']");if(!n)return;let A=Array.from(n.querySelectorAll("[role='menuitem']:not([disabled])")),i=A.indexOf(t);e.key==="ArrowDown"||e.key==="ArrowRight"?(e.preventDefault(),A[(i+1)%A.length]?.focus()):e.key==="ArrowUp"||e.key==="ArrowLeft"?(e.preventDefault(),A[(i-1+A.length)%A.length]?.focus()):e.key==="Home"?(e.preventDefault(),A[0]?.focus()):e.key==="End"&&(e.preventDefault(),A[A.length-1]?.focus())}if(o==="tab"||t.closest("[role='tablist']")){let n=t.closest("[role='tablist']");if(!n)return;let A=Array.from(n.querySelectorAll("[role='tab']:not([disabled])")),i=A.indexOf(t);if(e.key==="ArrowRight"||e.key==="ArrowDown"){e.preventDefault();let r=A[(i+1)%A.length];r?.focus(),r?.click()}else if(e.key==="ArrowLeft"||e.key==="ArrowUp"){e.preventDefault();let r=A[(i-1+A.length)%A.length];r?.focus(),r?.click()}}if(o==="option"||t.closest("[role='listbox']")){let n=t.closest("[role='listbox']");if(!n)return;let A=Array.from(n.querySelectorAll("[role='option']:not([aria-disabled='true'])")),i=A.indexOf(t);e.key==="ArrowDown"?(e.preventDefault(),A[(i+1)%A.length]?.focus()):e.key==="ArrowUp"?(e.preventDefault(),A[(i-1+A.length)%A.length]?.focus()):(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),t.setAttribute("aria-selected","true"),A.forEach(r=>{r!==t&&r.setAttribute("aria-selected","false")}),se(`Selected: ${t.textContent?.trim()}`,"success"))}e.altKey&&e.key==="a"&&(e.preventDefault(),og()),e.key==="Tab"&&Gt?.speechEnabled&&setTimeout(()=>{let n=document.activeElement;if(!n)return;let A=n.getAttribute("aria-label")||n.getAttribute("title")||n.textContent?.trim()||n.tagName.toLowerCase(),i=n.getAttribute("role")||n.tagName.toLowerCase();fn(`${A}, ${i}`)},100)}))}function Mo(e){let t=e.querySelectorAll('button:not([disabled]),a[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"]),[role="button"]');if(t.length===0)return;let o=t[0],n=t[t.length-1];o.focus(),e.addEventListener("keydown",A=>{A.key==="Tab"&&(A.shiftKey?document.activeElement===o&&(A.preventDefault(),n.focus()):document.activeElement===n&&(A.preventDefault(),o.focus()))})}function og(){if(typeof document>"u")return;if(Mt){Mt.remove(),Mt=null;return}let e=document.createElement("div");e.setAttribute("role","dialog"),e.setAttribute("aria-label","Keyboard shortcuts"),e.setAttribute("aria-modal","true"),e.setAttribute("data-yuktai-cheatsheet","true"),e.style.cssText=`
1397
1408
  position: fixed;
1398
1409
  top: 50%;
1399
1410
  left: 50%;
@@ -1417,18 +1428,18 @@ Action plan:`,l=await a.prompt(s);return a.destroy(),l?.trim()||""}async functio
1417
1428
  style="background:none;border:none;color:#aaa;cursor:pointer;font-size:20px;padding:0;line-height:1"
1418
1429
  aria-label="Close shortcuts">\xD7</button>
1419
1430
  </div>
1420
- ${t.map(([o,r])=>`
1431
+ ${t.map(([n,A])=>`
1421
1432
  <div style="display:flex;justify-content:space-between;align-items:center;padding:6px 0;border-bottom:1px solid #2a2a4a">
1422
- <kbd style="background:#2a2a4a;color:#74c0fc;padding:3px 8px;border-radius:4px;font-size:12px;font-family:monospace;border:1px solid #3a3a6a">${o}</kbd>
1423
- <span style="font-size:12px;color:#ccc;text-align:right;flex:1;margin-left:12px">${r}</span>
1433
+ <kbd style="background:#2a2a4a;color:#74c0fc;padding:3px 8px;border-radius:4px;font-size:12px;font-family:monospace;border:1px solid #3a3a6a">${n}</kbd>
1434
+ <span style="font-size:12px;color:#ccc;text-align:right;flex:1;margin-left:12px">${A}</span>
1424
1435
  </div>
1425
1436
  `).join("")}
1426
- `,e.querySelector("[data-yuktai-close]")?.addEventListener("click",()=>{e.remove(),It=null}),e.addEventListener("keydown",o=>{o.key==="Escape"&&(e.remove(),It=null)}),document.body.appendChild(e),It=e,gn(e),ae("Keyboard shortcuts opened. Press Escape to close.","info")}function Uc(e){if(typeof document>"u"||!xt?.showAuditBadge||typeof window<"u"&&!window.location.hostname.includes("localhost")&&!window.location.hostname.includes("127.0.0.1"))return;Yn&&Yn.remove();let t=e.score,n=t>=90?"#0f9d58":t>=70?"#f29900":"#d93025",o=t>=90?"\u267F":t>=70?"\u26A0":"\u2715",r=document.createElement("button");r.setAttribute("aria-label",`Accessibility score: ${t} out of 100`),r.setAttribute("data-yuktai-badge","true"),r.style.cssText=`
1437
+ `,e.querySelector("[data-yuktai-close]")?.addEventListener("click",()=>{e.remove(),Mt=null}),e.addEventListener("keydown",n=>{n.key==="Escape"&&(e.remove(),Mt=null)}),document.body.appendChild(e),Mt=e,Mo(e),se("Keyboard shortcuts opened. Press Escape to close.","info")}function ng(e){if(typeof document>"u"||!Gt?.showAuditBadge||typeof window<"u"&&!window.location.hostname.includes("localhost")&&!window.location.hostname.includes("127.0.0.1"))return;pn&&pn.remove();let t=e.score,o=t>=90?"#0f9d58":t>=70?"#f29900":"#d93025",n=t>=90?"\u267F":t>=70?"\u26A0":"\u2715",A=document.createElement("button");A.setAttribute("aria-label",`Accessibility score: ${t} out of 100`),A.setAttribute("data-yuktai-badge","true"),A.style.cssText=`
1427
1438
  position: fixed;
1428
1439
  bottom: 16px;
1429
1440
  left: 16px;
1430
1441
  z-index: 999998;
1431
- background: ${n};
1442
+ background: ${o};
1432
1443
  color: #fff;
1433
1444
  border: none;
1434
1445
  border-radius: 20px;
@@ -1442,7 +1453,7 @@ Action plan:`,l=await a.prompt(s);return a.destroy(),l?.trim()||""}async functio
1442
1453
  align-items: center;
1443
1454
  gap: 6px;
1444
1455
  transition: transform 0.15s;
1445
- `,r.innerHTML=`${o} ${t}/100 <span style="font-weight:400;opacity:0.85">${e.details.length} issues</span>`,r.addEventListener("click",()=>Yc(e)),document.body.appendChild(r),Yn=r}function Yc(e){let t=document.querySelector("[data-yuktai-audit-details]");if(t){t.remove();return}let n=document.createElement("div");n.setAttribute("data-yuktai-audit-details","true"),n.setAttribute("role","dialog"),n.setAttribute("aria-label","Accessibility audit details"),n.style.cssText=`
1456
+ `,A.innerHTML=`${n} ${t}/100 <span style="font-weight:400;opacity:0.85">${e.details.length} issues</span>`,A.addEventListener("click",()=>Ag(e)),document.body.appendChild(A),pn=A}function Ag(e){let t=document.querySelector("[data-yuktai-audit-details]");if(t){t.remove();return}let o=document.createElement("div");o.setAttribute("data-yuktai-audit-details","true"),o.setAttribute("role","dialog"),o.setAttribute("aria-label","Accessibility audit details"),o.style.cssText=`
1446
1457
  position: fixed;
1447
1458
  bottom: 56px;
1448
1459
  left: 16px;
@@ -1459,22 +1470,22 @@ Action plan:`,l=await a.prompt(s);return a.destroy(),l?.trim()||""}async functio
1459
1470
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
1460
1471
  font-family: system-ui, sans-serif;
1461
1472
  font-size: 12px;
1462
- `;let o={critical:"#d93025",serious:"#f29900",moderate:"#1a73e8",minor:"#0f9d58"};n.innerHTML=`
1473
+ `;let n={critical:"#d93025",serious:"#f29900",moderate:"#1a73e8",minor:"#0f9d58"};o.innerHTML=`
1463
1474
  <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:12px">
1464
1475
  <strong style="font-size:14px;color:#74c0fc">Audit report</strong>
1465
1476
  <span style="color:#aaa">${e.fixed} fixed \xB7 ${e.renderTime}ms</span>
1466
1477
  </div>
1467
- ${e.details.slice(0,20).map(r=>`
1478
+ ${e.details.slice(0,20).map(A=>`
1468
1479
  <div style="padding:6px 0;border-bottom:1px solid #2a2a4a">
1469
1480
  <div style="display:flex;gap:6px;align-items:center">
1470
- <span style="background:${o[r.severity]};color:#fff;padding:1px 6px;border-radius:4px;font-size:10px;font-weight:700;text-transform:uppercase">${r.severity}</span>
1471
- <code style="color:#74c0fc">&lt;${r.tag}&gt;</code>
1481
+ <span style="background:${n[A.severity]};color:#fff;padding:1px 6px;border-radius:4px;font-size:10px;font-weight:700;text-transform:uppercase">${A.severity}</span>
1482
+ <code style="color:#74c0fc">&lt;${A.tag}&gt;</code>
1472
1483
  </div>
1473
- <div style="color:#ccc;margin-top:3px">${r.fix}</div>
1484
+ <div style="color:#ccc;margin-top:3px">${A.fix}</div>
1474
1485
  </div>
1475
1486
  `).join("")}
1476
1487
  ${e.details.length>20?`<div style="color:#888;padding:8px 0;text-align:center">+${e.details.length-20} more issues</div>`:""}
1477
- `,n.addEventListener("keydown",r=>{r.key==="Escape"&&n.remove()}),document.body.appendChild(n),gn(n)}function Ms(e){typeof document>"u"||(qn&&clearTimeout(qn),qn=setTimeout(()=>{if(cn)return;let t=document.createElement("div");t.setAttribute("role","alertdialog"),t.setAttribute("aria-label","Session timeout warning"),t.setAttribute("aria-modal","true"),t.setAttribute("data-yuktai-timeout","true"),t.style.cssText=`
1488
+ `,o.addEventListener("keydown",A=>{A.key==="Escape"&&o.remove()}),document.body.appendChild(o),Mo(o)}function $s(e){typeof document>"u"||(mn&&clearTimeout(mn),mn=setTimeout(()=>{if(So)return;let t=document.createElement("div");t.setAttribute("role","alertdialog"),t.setAttribute("aria-label","Session timeout warning"),t.setAttribute("aria-modal","true"),t.setAttribute("data-yuktai-timeout","true"),t.style.cssText=`
1478
1489
  position: fixed;
1479
1490
  top: 50%;
1480
1491
  left: 50%;
@@ -1503,22 +1514,26 @@ Action plan:`,l=await a.prompt(s);return a.destroy(),l?.trim()||""}async functio
1503
1514
  No, sign out
1504
1515
  </button>
1505
1516
  </div>
1506
- `;let n=t.querySelector("[data-yuktai-extend]"),o=t.querySelector("[data-yuktai-dismiss]");n?.addEventListener("click",()=>{t.remove(),cn=null,ae("Session extended. You have more time.","success"),xt?.timeoutWarning&&Ms(xt.timeoutWarning)}),o?.addEventListener("click",()=>{t.remove(),cn=null}),document.body.appendChild(t),cn=t,gn(t),ae("Warning: Your session will expire soon. Do you need more time?","warning")},e*1e3))}function qc(e){if(typeof document>"u")return;let t=document.documentElement;if(t.toggleAttribute("data-yuktai-high-contrast",!!e.highContrast),t.toggleAttribute("data-yuktai-dark",!!e.darkMode),t.toggleAttribute("data-yuktai-reduce-motion",!!e.reduceMotion),t.toggleAttribute("data-yuktai-large-targets",!!e.largeTargets),t.toggleAttribute("data-yuktai-keyboard",!!e.keyboardHints),t.toggleAttribute("data-yuktai-dyslexia",!!e.dyslexiaFont),e.localFont?document.body.style.fontFamily=`"${e.localFont}", system-ui, sans-serif`:e.dyslexiaFont||(document.body.style.fontFamily=""),e.fontSizeMultiplier&&e.fontSizeMultiplier!==1?document.documentElement.style.fontSize=`${e.fontSizeMultiplier*100}%`:document.documentElement.style.fontSize="",e.colorBlindMode&&e.colorBlindMode!=="none"){let n=e.colorBlindMode==="achromatopsia"?"grayscale(100%)":`url(#${dn[e.colorBlindMode]})`;document.body.style.filter=n}else document.body.style.filter=""}function _c(e){try{let t=localStorage.getItem("yuktai-a11y-prefs");t&&Object.assign(e,JSON.parse(t))}catch{}}async function ws(e){if(e){if(!await $n()){ae("Plain English requires Chrome 127+","warning");return}ae("Rewriting page in plain English...","info",!1);let n=await as();ae(n.error?`Plain English failed: ${n.error}`:`${n.fixed} sections rewritten in plain English`,n.error?"error":"success",!1)}else ss(),ae("Original text restored","info",!1)}async function Cs(e){if(e){if(!await zn()){ae("Page summariser requires Chrome 127+","warning");return}ae("Generating page summary...","info",!1);let n=await ds();ae(n.error?`Summary failed: ${n.error}`:"Page summary added at top",n.error?"error":"success",!1)}else rn(),ae("Page summary removed","info",!1)}async function ks(e){if(e==="en"){On(),ae("Page restored to English","info",!1);return}ae(`Translating page to ${e}...`,"info",!1);let t=await us(e);ae(t.error?`Translation failed: ${t.error}`:`Page translated to ${e}`,t.error?"error":"success",!1)}async function vs(e){if(e){if(!Hn()){ae("Voice control not supported in this browser","warning");return}ps(t=>{t.success&&ae(`Voice: ${t.action}`,"info",!1)}),ae("Voice control started. Say a command.","success",!1)}else Wn(),ae("Voice control stopped","info",!1)}async function Ss(e){if(e){if(!await Un()){ae("Smart labels requires Chrome 127+","warning");return}ae("Generating smart labels...","info",!1);let n=await hs();ae(n.error?`Smart labels failed: ${n.error}`:`${n.fixed} elements labelled`,n.error?"error":"success",!1)}else bs(),ae("Smart labels removed","info",!1)}function Jc(){if(typeof document>"u"||un)return;let e=document.createElement("div");e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),e.setAttribute("aria-relevant","text"),e.style.cssText="position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);",document.body.appendChild(e),un=e}function Vc(){if(typeof document>"u"||ys)return;let e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("aria-hidden","true"),e.style.cssText="position:absolute;width:0;height:0;overflow:hidden;",e.innerHTML=`
1517
+ `;let o=t.querySelector("[data-yuktai-extend]"),n=t.querySelector("[data-yuktai-dismiss]");o?.addEventListener("click",()=>{t.remove(),So=null,se("Session extended. You have more time.","success"),Gt?.timeoutWarning&&$s(Gt.timeoutWarning)}),n?.addEventListener("click",()=>{t.remove(),So=null}),document.body.appendChild(t),So=t,Mo(t),se("Warning: Your session will expire soon. Do you need more time?","warning")},e*1e3))}function rg(e){if(typeof document>"u")return;let t=document.documentElement;if(t.toggleAttribute("data-yuktai-high-contrast",!!e.highContrast),t.toggleAttribute("data-yuktai-dark",!!e.darkMode),t.toggleAttribute("data-yuktai-reduce-motion",!!e.reduceMotion),t.toggleAttribute("data-yuktai-large-targets",!!e.largeTargets),t.toggleAttribute("data-yuktai-keyboard",!!e.keyboardHints),t.toggleAttribute("data-yuktai-dyslexia",!!e.dyslexiaFont),e.localFont?document.body.style.fontFamily=`"${e.localFont}", system-ui, sans-serif`:e.dyslexiaFont||(document.body.style.fontFamily=""),e.fontSizeMultiplier&&e.fontSizeMultiplier!==1?document.documentElement.style.fontSize=`${e.fontSizeMultiplier*100}%`:document.documentElement.style.fontSize="",e.colorBlindMode&&e.colorBlindMode!=="none"){let o=e.colorBlindMode==="achromatopsia"?"grayscale(100%)":`url(#${vo[e.colorBlindMode]})`;document.body.style.filter=o}else document.body.style.filter=""}function ig(e){try{let t=localStorage.getItem("yuktai-a11y-prefs");t&&Object.assign(e,JSON.parse(t))}catch{}}async function Ls(e){if(e){if(!await ln()){se("Plain English requires Chrome 127+","warning");return}se("Rewriting page in plain English...","info",!1);let o=await bs();se(o.error?`Plain English failed: ${o.error}`:`${o.fixed} sections rewritten in plain English`,o.error?"error":"success",!1)}else Bs(),se("Original text restored","info",!1)}async function Ps(e){if(e){if(!await gn()){se("Page summariser requires Chrome 127+","warning");return}se("Generating page summary...","info",!1);let o=await ws();se(o.error?`Summary failed: ${o.error}`:"Page summary added at top",o.error?"error":"success",!1)}else Eo(),se("Page summary removed","info",!1)}async function Ys(e){if(e==="en"){cn(),se("Page restored to English","info",!1);return}se(`Translating page to ${e}...`,"info",!1);let t=await xs(e);se(t.error?`Translation failed: ${t.error}`:`Page translated to ${e}`,t.error?"error":"success",!1)}async function Us(e){if(e){if(!dn()){se("Voice control not supported in this browser","warning");return}Ss(t=>{t.success&&se(`Voice: ${t.action}`,"info",!1)}),se("Voice control started. Say a command.","success",!1)}else un(),se("Voice control stopped","info",!1)}async function Hs(e){if(e){if(!await In()){se("Smart labels requires Chrome 127+","warning");return}se("Generating smart labels...","info",!1);let o=await Gs();se(o.error?`Smart labels failed: ${o.error}`:`${o.fixed} elements labelled`,o.error?"error":"success",!1)}else Ns(),se("Smart labels removed","info",!1)}function sg(){if(typeof document>"u"||Do)return;let e=document.createElement("div");e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),e.setAttribute("aria-relevant","text"),e.style.cssText="position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);",document.body.appendChild(e),Do=e}function ag(){if(typeof document>"u"||Rs)return;let e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("aria-hidden","true"),e.style.cssText="position:absolute;width:0;height:0;overflow:hidden;",e.innerHTML=`
1507
1518
  <defs>
1508
- <filter id="${dn.deuteranopia}">
1519
+ <filter id="${vo.deuteranopia}">
1509
1520
  <feColorMatrix type="matrix"
1510
1521
  values="0.625 0.375 0 0 0 0.7 0.3 0 0 0 0 0.3 0.7 0 0 0 0 0 1 0"/>
1511
1522
  </filter>
1512
- <filter id="${dn.protanopia}">
1523
+ <filter id="${vo.protanopia}">
1513
1524
  <feColorMatrix type="matrix"
1514
1525
  values="0.567 0.433 0 0 0 0.558 0.442 0 0 0 0 0.242 0.758 0 0 0 0 0 1 0"/>
1515
1526
  </filter>
1516
- <filter id="${dn.tritanopia}">
1527
+ <filter id="${vo.tritanopia}">
1517
1528
  <feColorMatrix type="matrix"
1518
1529
  values="0.95 0.05 0 0 0 0 0.433 0.567 0 0 0 0.475 0.525 0 0 0 0 0 1 0"/>
1519
1530
  </filter>
1520
1531
  </defs>
1521
- `,document.body.appendChild(e),ys=e}function Es(e){return e.getAttribute("aria-label")?.trim()||e.getAttribute("aria-labelledby")||e.getAttribute("title")?.trim()||e.textContent?.trim()?!0:!!e.querySelector("img[alt]:not([alt='']), svg[aria-label], svg title, [aria-label]")}function Ts(e){let t={critical:20,serious:10,moderate:5,minor:2},n=e.details.reduce((o,r)=>o+(t[r.severity]||0),0);return Math.max(0,Math.min(100,100-n))}var Se={name:"yuktai-a11y",version:"4.0.0",observer:null,async execute(e){if(!e.enabled)return this.stopObserver(),"yuktai: disabled.";xt=e,_c(e),Jc(),Vc(),Oc(),Hc(),e.showSkipLinks!==!1&&zc(),e.showPreferencePanel,qc(e);let t=this.applyFixes(e);t.score=Ts(t),e.showAuditBadge&&Uc(t),e.timeoutWarning&&Ms(e.timeoutWarning),e.autoFix&&this.startObserver(e),e.plainEnglish&&await ws(!0),e.summarisePage&&await Cs(!0),e.translateLanguage&&e.translateLanguage!=="en"&&await ks(e.translateLanguage),e.voiceControl&&await vs(!0),e.smartLabels&&await Ss(!0);let n=`${t.fixed} fixes applied. Score: ${t.score}/100.`;return ae(n,t.score>=90?"success":"info",!1),`yuktai v4.0.0: ${n} Scanned ${t.scanned} elements in ${t.renderTime}ms.`},applyFixes(e){let t={fixed:0,scanned:0,renderTime:0,score:100,details:[]};if(typeof document>"u")return t;let n=performance.now(),o=document.querySelectorAll("*");t.scanned=o.length;let r=(a,i,s,l)=>{t.details.push({tag:a,fix:i,severity:s,element:l.outerHTML.slice(0,100)}),t.fixed++};return o.forEach(a=>{let i=a,s=i.tagName.toLowerCase();if(s==="html"&&!i.getAttribute("lang")&&(i.setAttribute("lang","en"),r(s,'lang="en" added',"critical",i)),s==="meta"){let d=i.getAttribute("name"),g=i.getAttribute("content")||"";d==="viewport"&&g.includes("user-scalable=no")&&(i.setAttribute("content",g.replace("user-scalable=no","user-scalable=yes")),r(s,"user-scalable=yes restored","serious",i)),d==="viewport"&&/maximum-scale=1(?:[^0-9]|$)/.test(g)&&(i.setAttribute("content",g.replace(/maximum-scale=1(?=[^0-9]|$)/,"maximum-scale=5")),r(s,"maximum-scale=5 restored","serious",i))}if(s==="main"&&!i.getAttribute("tabindex")&&(i.setAttribute("tabindex","-1"),i.getAttribute("id")||i.setAttribute("id","main-content")),s==="img"&&(i.hasAttribute("alt")||(i.setAttribute("alt",""),i.setAttribute("aria-hidden","true"),r(s,'alt="" aria-hidden="true"',"serious",i))),s==="svg"&&(!i.getAttribute("aria-hidden")&&!i.getAttribute("aria-label")&&!a.querySelector("title")&&(i.setAttribute("aria-hidden","true"),r(s,'aria-hidden="true" (decorative svg)',"minor",i)),i.getAttribute("focusable")||i.setAttribute("focusable","false")),s==="iframe"&&!i.getAttribute("title")&&!i.getAttribute("aria-label")&&(i.setAttribute("title","embedded content"),i.setAttribute("aria-label","embedded content"),r(s,"title + aria-label added","serious",i)),s==="button"){if(!Es(i)){let d=i.getAttribute("title")||"button";i.setAttribute("aria-label",d),r(s,`aria-label="${d}" (empty button)`,"critical",i)}i.hasAttribute("disabled")&&!i.getAttribute("aria-disabled")&&(i.setAttribute("aria-disabled","true"),t.fixed++)}if(s==="a"){let d=i;Es(i)||(i.setAttribute("aria-label",i.getAttribute("title")||"link"),r(s,"aria-label added (empty link)","critical",i)),d.target==="_blank"&&!d.rel?.includes("noopener")&&(d.rel="noopener noreferrer",t.fixed++)}if(xs.has(s)){let d=i;if(!(!!(d.labels&&d.labels.length)||!!i.getAttribute("title")||d.type==="hidden"||d.type==="submit"||d.type==="button"||d.type==="reset")&&!i.getAttribute("aria-label")&&!i.getAttribute("aria-labelledby")){let p=i.getAttribute("placeholder")||i.getAttribute("name")||s;i.setAttribute("aria-label",p),r(s,`aria-label="${p}"`,"serious",i)}if(i.hasAttribute("required")&&!i.getAttribute("aria-required")&&(i.setAttribute("aria-required","true"),t.fixed++),s==="input"&&!d.autocomplete){let p=d.name||"",m=d.type==="email"||p.includes("email")?"email":d.type==="tel"||p.includes("tel")?"tel":d.type==="password"?"current-password":"";m&&(d.autocomplete=m,t.fixed++)}}s==="th"&&!i.getAttribute("scope")&&(i.setAttribute("scope",i.closest("thead")?"col":"row"),r(s,"scope added to <th>","moderate",i));let l=(s==="header"||s==="footer")&&!!i.parentElement?.closest("article,aside,main,nav,section,[role='dialog'],[role='region']");_n[s]&&!i.getAttribute("role")&&!l&&(i.setAttribute("role",_n[s]),r(s,`role="${_n[s]}"`,"minor",i));let c=i.getAttribute("role")||"";c==="tab"&&!i.getAttribute("aria-selected")&&(i.setAttribute("aria-selected","false"),t.fixed++),["alert","status","log"].includes(c)&&!i.getAttribute("aria-live")&&(i.setAttribute("aria-live",c==="alert"?"assertive":"polite"),r(s,`aria-live added on role=${c}`,"moderate",i)),c==="combobox"&&!i.getAttribute("aria-expanded")&&(i.setAttribute("aria-expanded","false"),r(s,'aria-expanded="false" on combobox',"serious",i)),(c==="checkbox"||c==="radio")&&!i.getAttribute("aria-checked")&&(i.setAttribute("aria-checked","false"),r(s,`aria-checked="false" on role=${c}`,"serious",i))}),t.renderTime=parseFloat((performance.now()-n).toFixed(2)),t},scan(){let e={fixed:0,scanned:0,renderTime:0,score:100,details:[]};if(typeof document>"u")return e;let t=performance.now(),n=document.querySelectorAll("*");e.scanned=n.length;let o=(r,a,i,s)=>e.details.push({tag:r,fix:a,severity:i,element:s.outerHTML.slice(0,100)});return n.forEach(r=>{let a=r,i=a.tagName.toLowerCase();(i==="a"||i==="button")&&!a.innerText?.trim()&&!a.getAttribute("aria-label")&&o(i,"needs aria-label (empty)","critical",a),i==="img"&&!a.hasAttribute("alt")&&o(i,"needs alt text","serious",a),xs.has(i)&&!a.getAttribute("aria-label")&&!a.getAttribute("aria-labelledby")&&o(i,"needs aria-label","serious",a),i==="iframe"&&!a.getAttribute("title")&&!a.getAttribute("aria-label")&&o(i,"iframe needs title","serious",a)}),e.fixed=e.details.length,e.score=Ts(e),e.renderTime=parseFloat((performance.now()-t).toFixed(2)),e},startObserver(e){this.observer||typeof document>"u"||(this.observer=new MutationObserver(()=>this.applyFixes(e)),this.observer.observe(document.body,{childList:!0,subtree:!0,attributes:!1}))},stopObserver(){this.observer?.disconnect(),this.observer=null},announce:ae,speak:Jn,showVisualAlert:Bs,trapFocus:gn,handlePlainEnglish:ws,handleSummarisePage:Cs,handleTranslate:ks,handleVoiceControl:vs,handleSmartLabels:Ss,SUPPORTED_LANGUAGES:sn};v();v();var X=Dn(require("react"));v();var Te=require("react");Kn();Dt();var w=require("react/jsx-runtime"),eo={highContrast:!1,reduceMotion:!1,autoFix:!0,dyslexiaFont:!1,fontScale:100,localFont:"",darkMode:!1,largeTargets:!1,speechEnabled:!1,colorBlindMode:"none",showAuditBadge:!1,timeoutWarning:void 0,plainEnglish:!1,summarisePage:!1,translateLanguage:"en",voiceControl:!1,smartLabels:!1},Ct=[80,90,100,110,120,130],id=[{value:"none",label:"None"},{value:"deuteranopia",label:"Deuteranopia"},{value:"protanopia",label:"Protanopia"},{value:"tritanopia",label:"Tritanopia"},{value:"achromatopsia",label:"Greyscale"}],ad=["Prompt API for Gemini Nano","Summarization API for Gemini Nano","Writer API for Gemini Nano","Rewriter API for Gemini Nano","Translation API"];function sd(){let[e,t]=(0,Te.useState)(typeof window<"u"?window.innerWidth:1024);return(0,Te.useEffect)(()=>{let n=()=>t(window.innerWidth);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),{isMobile:e<=480,isTablet:e>480&&e<=768}}function ld({checked:e,onChange:t,label:n,disabled:o=!1}){return(0,w.jsxs)("label",{"aria-label":n,style:{position:"relative",display:"inline-flex",width:"40px",height:"24px",cursor:o?"not-allowed":"pointer",flexShrink:0,opacity:o?.4:1},children:[(0,w.jsx)("input",{type:"checkbox",checked:e,disabled:o,onChange:r=>t(r.target.checked),style:{opacity:0,width:0,height:0,position:"absolute"}}),(0,w.jsx)("span",{style:{position:"absolute",inset:0,borderRadius:"99px",background:e?"#0d9488":"#cbd5e1",transition:"background 0.2s"}}),(0,w.jsx)("span",{style:{position:"absolute",top:"3px",left:e?"19px":"3px",width:"18px",height:"18px",background:"#fff",borderRadius:"50%",transition:"left 0.2s",boxShadow:"0 1px 3px rgba(0,0,0,0.2)",pointerEvents:"none"}})]})}function kt({label:e,color:t="#64748b",badge:n,concept:o}){return(0,w.jsxs)("div",{style:{margin:"10px 18px 4px"},children:[(0,w.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,w.jsx)("p",{style:{margin:0,fontSize:"10px",fontWeight:600,color:t,letterSpacing:"0.06em",textTransform:"uppercase"},children:e}),n&&(0,w.jsx)("span",{style:{fontSize:"9px",fontWeight:500,padding:"1px 7px",borderRadius:"99px",background:"#f5f3ff",color:"#7c3aed",border:"0.5px solid #c4b5fd",whiteSpace:"nowrap"},children:n})]}),o&&(0,w.jsx)("p",{style:{margin:"2px 0 0",fontSize:"9px",color:"#94a3b8",fontStyle:"italic"},children:o})]})}function ze({icon:e,label:t,desc:n,checked:o,onChange:r,disabled:a=!1,disabledReason:i,tip:s}){return(0,w.jsxs)("div",{title:a?i:s,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 18px",gap:"12px"},children:[(0,w.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"10px",flex:1,minWidth:0},children:[(0,w.jsx)("span",{"aria-hidden":"true",style:{width:"32px",height:"32px",borderRadius:"8px",background:a?"#f1f5f9":"#f0fdfa",color:a?"#94a3b8":"#0d9488",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"15px",flexShrink:0,fontWeight:700},children:e}),(0,w.jsxs)("div",{style:{minWidth:0},children:[(0,w.jsx)("p",{style:{margin:0,fontSize:"13px",fontWeight:500,color:a?"#94a3b8":"#0f172a",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),(0,w.jsx)("p",{style:{margin:0,fontSize:"10px",color:"#94a3b8"},children:a?i:n})]})]}),(0,w.jsx)(ld,{checked:o,onChange:r,label:`Toggle ${t}`,disabled:a})]})}function Ee(){return(0,w.jsx)("div",{style:{height:"1px",background:"#f1f5f9"}})}function $t({steps:e}){return(0,w.jsxs)("div",{style:{margin:"0 18px 8px",padding:"8px 10px",background:"#f8fafc",borderRadius:"8px",border:"0.5px solid #e2e8f0"},children:[(0,w.jsx)("p",{style:{margin:"0 0 4px",fontSize:"9px",fontWeight:600,color:"#64748b",textTransform:"uppercase",letterSpacing:"0.05em"},children:"How to use"}),e.map((t,n)=>(0,w.jsxs)("p",{style:{margin:"0 0 2px",fontSize:"10px",color:"#475569"},children:[n+1,". ",t]},n))]})}var to=(0,Te.forwardRef)(({position:e,settings:t,report:n,isActive:o,aiSupported:r,voiceSupported:a,set:i,onApply:s,onReset:l,onClose:c},d)=>{let{isMobile:g,isTablet:p}=sd(),[m,h]=(0,Te.useState)([]),[y,u]=(0,Te.useState)(""),[I,C]=(0,Te.useState)(""),[b,k]=(0,Te.useState)(!1),[x,B]=(0,Te.useState)(null),[M,L]=(0,Te.useState)("idle");(0,Te.useEffect)(()=>{let S=window;!!(S.LanguageModel||S.ai?.languageModel)&&r?B("gemini"):Ft()&&B("transformers")},[r]),(0,Te.useEffect)(()=>{if(x!=="transformers")return;let S=setInterval(()=>{L(Pt())},500);return()=>clearInterval(S)},[x]);let q=async()=>{if(!(!y.trim()||b)){if(!x){C("\u26A0\uFE0F No AI engine available on this device.");return}k(!0),C("");try{let S;x==="gemini"?S=await Vn(y):(L("loading"),S=await Xn(y),L("ready")),C(S.success&&S.answer?S.answer.replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/#+\s/g,"").trim():"\u26A0\uFE0F "+(S.error||"No answer found on this page"))}catch{C("\u26A0\uFE0F Failed to get answer. Please try again.")}k(!1)}};(0,Te.useEffect)(()=>{(async()=>{try{let j=window;if(!j.queryLocalFonts)return;let ee=await j.queryLocalFonts(),H=[...new Set(ee.map(ce=>ce.family))].sort();h(H.slice(0,50))}catch{}})()},[]);let O=x==="gemini"?"Gemini Nano":x==="transformers"?"Transformers.js \xB7 All devices":"Detecting...",G=x==="transformers"&&M==="loading"?"Loading AI model... (first time only)":"...",Q=g?{position:"fixed",bottom:0,left:0,right:0,zIndex:9999,background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px 16px 0 0",boxShadow:"0 -8px 32px rgba(0,0,0,0.12)",maxHeight:"90vh",overflowY:"auto",fontFamily:"system-ui,-apple-system,sans-serif",width:"100%"}:{position:"fixed",bottom:"84px",[e]:"24px",zIndex:9999,width:p?"300px":"320px",maxWidth:"calc(100vw - 48px)",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px",boxShadow:"0 8px 32px rgba(0,0,0,0.12)",maxHeight:"80vh",overflowY:"auto",fontFamily:"system-ui,-apple-system,sans-serif"};return(0,w.jsxs)("div",{ref:d,role:"dialog","aria-modal":"true","aria-label":"yuktai accessibility preferences","data-yuktai-panel":"true",style:Q,children:[(0,w.jsxs)("div",{style:{padding:"14px 18px 12px",borderBottom:"1px solid #f1f5f9",display:"flex",alignItems:"flex-start",justifyContent:"space-between",position:"sticky",top:0,background:"#fff",zIndex:1},children:[(0,w.jsxs)("div",{children:[(0,w.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"7px",marginBottom:"4px",flexWrap:"wrap"},children:[(0,w.jsx)("span",{style:{fontSize:"10px",fontWeight:700,padding:"2px 7px",borderRadius:"99px",background:"#f0fdfa",color:"#0d9488",letterSpacing:"0.05em",fontFamily:"monospace"},children:"@yuktishaalaa/yuktai"}),o&&(0,w.jsx)("span",{style:{fontSize:"10px",fontWeight:700,padding:"2px 7px",borderRadius:"99px",background:"#f0fdfa",color:"#0f766e",border:"1px solid #99f6e4"},children:"\u25CF ACTIVE"})]}),(0,w.jsx)("p",{style:{margin:"0 0 1px",fontSize:"15px",fontWeight:600,color:"#0f172a"},children:"Accessibility"}),(0,w.jsx)("p",{style:{margin:0,fontSize:"11px",color:"#64748b"},children:"WCAG 2.2 \xB7 Open source \xB7 Zero cost \xB7 All devices"})]}),(0,w.jsx)("button",{onClick:c,"aria-label":"Close accessibility panel",style:{background:"none",border:"none",cursor:"pointer",padding:"4px",color:"#94a3b8",fontSize:"20px",lineHeight:1,borderRadius:"6px",flexShrink:0,minWidth:g?"44px":"auto",minHeight:g?"44px":"auto",display:"flex",alignItems:"center",justifyContent:"center"},children:"\xD7"})]}),(0,w.jsx)(kt,{label:"\u267F Core Accessibility",concept:"Rule-based engine \u2014 works on all browsers and devices"}),(0,w.jsx)($t,{steps:["Toggle any feature on","Click Apply settings","Preferences saved automatically"]}),(0,w.jsx)(ze,{icon:"\u{1F527}",label:"Auto-fix ARIA",desc:"Injects missing labels and roles automatically",checked:t.autoFix,onChange:S=>i("autoFix",S),tip:"Fixes aria-label, alt text, roles on every element"}),(0,w.jsx)(Ee,{}),(0,w.jsx)(ze,{icon:"\u{1F50A}",label:"Speak on focus",desc:"Browser reads elements aloud as you tab",checked:t.speechEnabled,onChange:S=>i("speechEnabled",S),tip:"Uses browser SpeechSynthesis \u2014 no install needed"}),(0,w.jsx)(Ee,{}),(0,w.jsx)(ze,{icon:"\u{1F399}\uFE0F",label:"Voice control",desc:"Say commands to navigate the page",checked:t.voiceControl,onChange:S=>i("voiceControl",S),disabled:!a,disabledReason:"Not supported in this browser",tip:'Say "scroll down", "go to main", "click"'}),(0,w.jsx)(Ee,{}),(0,w.jsx)(kt,{label:"\u{1F916} AI Features",color:"#7c3aed",badge:"Gemini Nano",concept:"Large Language Model running privately on your device \u2014 Chrome 127+ only"}),(0,w.jsx)("div",{style:{margin:"4px 18px 6px",padding:"8px 10px",background:r?"#f0fdfa":"#f5f3ff",borderRadius:"8px",border:`0.5px solid ${r?"#99f6e4":"#c4b5fd"}`,fontSize:"10px",color:r?"#0f766e":"#7c3aed",lineHeight:1.5},children:r?"\u2705 Gemini Nano detected \u2014 AI features ready. Runs privately on your device.":"\u2699\uFE0F AI features need one-time setup \u2014 see guide below."}),!r&&(0,w.jsxs)("div",{style:{margin:"0 18px 8px",padding:"10px 12px",background:"#fafafa",borderRadius:"8px",border:"0.5px solid #e2e8f0",fontSize:"11px",color:"#475569",lineHeight:1.7},children:[(0,w.jsx)("p",{style:{margin:"0 0 6px",fontWeight:600,color:"#0f172a",fontSize:"11px"},children:"\u{1F6E0} One-time setup \u2014 5 steps:"}),(0,w.jsxs)("p",{style:{margin:"0 0 3px"},children:["1. Open Chrome \u2192 ",(0,w.jsx)("code",{style:{background:"#f1f5f9",padding:"1px 5px",borderRadius:"4px",fontSize:"10px",color:"#0d9488",fontFamily:"monospace"},children:"chrome://flags"})]}),(0,w.jsx)("p",{style:{margin:"0 0 3px"},children:"2. Enable each flag:"}),(0,w.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"2px",margin:"4px 0 6px 10px"},children:ad.map(S=>(0,w.jsxs)("span",{style:{fontSize:"10px",color:"#7c3aed",fontFamily:"monospace"},children:["\u2192 ",S]},S))}),(0,w.jsxs)("p",{style:{margin:"0 0 3px"},children:["3. Click ",(0,w.jsx)("strong",{style:{color:"#0f172a"},children:"Relaunch"})]}),(0,w.jsxs)("p",{style:{margin:"0 0 3px"},children:["4. ",(0,w.jsx)("code",{style:{background:"#f1f5f9",padding:"1px 5px",borderRadius:"4px",fontSize:"10px",color:"#0d9488",fontFamily:"monospace"},children:"chrome://components"})," \u2192 Optimization Guide On Device Model \u2192 Check for update"]}),(0,w.jsx)("p",{style:{margin:"0"},children:"5. Refresh \u2014 AI features unlock automatically \u2705"})]}),(0,w.jsx)(ze,{icon:"\u{1F4DD}",label:"Plain English mode",desc:"Rewrites complex text in simple language",checked:t.plainEnglish,onChange:S=>i("plainEnglish",S),disabled:!r,disabledReason:"Enable Gemini Nano \u2014 see setup above",tip:"AI concept: LLM text rewriting"}),(0,w.jsx)(Ee,{}),(0,w.jsx)(ze,{icon:"\u{1F4CB}",label:"Summarise page",desc:"3-sentence summary appears at top",checked:t.summarisePage,onChange:S=>i("summarisePage",S),disabled:!r,disabledReason:"Enable Gemini Nano \u2014 see setup above",tip:"AI concept: Abstractive summarisation"}),(0,w.jsx)(Ee,{}),(0,w.jsx)(ze,{icon:"\u{1F3F7}\uFE0F",label:"Smart aria-labels",desc:"AI generates meaningful labels for elements",checked:t.smartLabels,onChange:S=>i("smartLabels",S),disabled:!r,disabledReason:"Enable Gemini Nano \u2014 see setup above",tip:"AI concept: Context-aware label generation"}),(0,w.jsx)(Ee,{}),(0,w.jsx)(kt,{label:"\u{1F441}\uFE0F Visual",concept:"CSS filter-based \u2014 works on all browsers and devices"}),(0,w.jsx)($t,{steps:["Toggle any visual mode","Changes apply instantly","Works on mobile and desktop"]}),(0,w.jsx)(ze,{icon:"\u25D1",label:"High contrast",desc:"Boosts contrast for low vision users",checked:t.highContrast,onChange:S=>i("highContrast",S),tip:"CSS filter: contrast()"}),(0,w.jsx)(Ee,{}),(0,w.jsx)(ze,{icon:"\u{1F319}",label:"Dark mode",desc:"Inverts colours \u2014 easy on eyes at night",checked:t.darkMode,onChange:S=>i("darkMode",S),tip:"CSS filter: invert + hue-rotate"}),(0,w.jsx)(Ee,{}),(0,w.jsx)(ze,{icon:"\u23F8\uFE0F",label:"Reduce motion",desc:"Disables all animations",checked:t.reduceMotion,onChange:S=>i("reduceMotion",S),tip:"WCAG 2.3.3 \u2014 vestibular disorders"}),(0,w.jsx)(Ee,{}),(0,w.jsx)(ze,{icon:"\u{1F446}",label:"Large targets",desc:"44\xD744px minimum touch targets",checked:t.largeTargets,onChange:S=>i("largeTargets",S),tip:"WCAG 2.5.8 \u2014 motor impaired users"}),(0,w.jsx)(Ee,{}),(0,w.jsxs)("div",{style:{padding:"10px 18px"},children:[(0,w.jsx)("p",{style:{margin:"0 0 2px",fontSize:"12px",fontWeight:500,color:"#0f172a"},children:"\u{1F3A8} Colour blindness"}),(0,w.jsx)("p",{style:{margin:"0 0 8px",fontSize:"10px",color:"#94a3b8"},children:"SVG colour matrix filters \u2014 all devices"}),(0,w.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:id.map(S=>(0,w.jsx)("button",{onClick:()=>i("colorBlindMode",S.value),"aria-pressed":t.colorBlindMode===S.value,style:{padding:"4px 10px",borderRadius:"20px",fontSize:"11px",fontWeight:500,border:`1px solid ${t.colorBlindMode===S.value?"#0d9488":"#e2e8f0"}`,background:t.colorBlindMode===S.value?"#f0fdfa":"#fff",color:t.colorBlindMode===S.value?"#0d9488":"#64748b",cursor:"pointer",minHeight:g?"36px":"auto"},children:S.label},S.value))})]}),(0,w.jsx)(Ee,{}),(0,w.jsx)(kt,{label:"\u{1F524} Font",concept:"Browser Font API + CSS \u2014 Chrome 103+"}),(0,w.jsx)($t,{steps:["Toggle dyslexia font or pick from device","Adjust size with + / \u2212","Saved across visits"]}),(0,w.jsx)(ze,{icon:"Aa",label:"Dyslexia-friendly font",desc:"Atkinson Hyperlegible \u2014 research-backed",checked:t.dyslexiaFont,onChange:S=>i("dyslexiaFont",S),tip:"By Braille Institute \u2014 free and open source"}),(0,w.jsx)(Ee,{}),(0,w.jsxs)("div",{style:{padding:"10px 18px"},children:[(0,w.jsx)("p",{style:{margin:"0 0 2px",fontSize:"12px",fontWeight:500,color:"#0f172a"},children:"\u{1F5A5}\uFE0F Local font"}),(0,w.jsx)("p",{style:{margin:"0 0 8px",fontSize:"10px",color:"#94a3b8"},children:"window.queryLocalFonts() \u2014 Chrome 103+"}),m.length>0?(0,w.jsxs)("select",{value:t.localFont,onChange:S=>i("localFont",S.target.value),"aria-label":"Choose a font from your device",style:{width:"100%",padding:"8px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"13px",color:"#0f172a",background:"#fff",cursor:"pointer",height:g?"44px":"36px"},children:[(0,w.jsx)("option",{value:"",children:"System default"}),m.map(S=>(0,w.jsx)("option",{value:S,style:{fontFamily:S},children:S},S))]}):(0,w.jsx)("p",{style:{margin:0,fontSize:"11px",color:"#94a3b8"},children:"Allow font access when Chrome prompts you."})]}),(0,w.jsx)(Ee,{}),(0,w.jsxs)("div",{style:{padding:"10px 18px 14px"},children:[(0,w.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"10px"},children:[(0,w.jsxs)("div",{children:[(0,w.jsx)("p",{style:{margin:0,fontSize:"12px",fontWeight:500,color:"#0f172a"},children:"\u{1F4CF} Text size"}),(0,w.jsx)("p",{style:{margin:0,fontSize:"10px",color:"#94a3b8"},children:"Scales all text on the page"})]}),(0,w.jsxs)("span",{style:{fontSize:"12px",fontWeight:600,color:"#0d9488",background:"#f0fdfa",padding:"2px 8px",borderRadius:"99px"},children:[t.fontScale,"%"]})]}),(0,w.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,w.jsx)("button",{onClick:()=>{let S=Ct.indexOf(t.fontScale);S>0&&i("fontScale",Ct[S-1])},disabled:t.fontScale<=80,"aria-label":"Decrease text size",style:{width:g?"44px":"30px",height:g?"44px":"30px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#fff",cursor:t.fontScale<=80?"not-allowed":"pointer",fontSize:"16px",color:t.fontScale<=80?"#cbd5e1":"#0f172a",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:"\u2212"}),(0,w.jsx)("div",{style:{flex:1,display:"flex",gap:"3px"},children:Ct.map(S=>(0,w.jsx)("button",{onClick:()=>i("fontScale",S),"aria-label":`Set text size to ${S}%`,style:{flex:1,height:"6px",borderRadius:"99px",border:"none",cursor:"pointer",padding:0,background:S<=t.fontScale?"#0d9488":"#e2e8f0",transition:"background 0.15s"}},S))}),(0,w.jsx)("button",{onClick:()=>{let S=Ct.indexOf(t.fontScale);S<Ct.length-1&&i("fontScale",Ct[S+1])},disabled:t.fontScale>=130,"aria-label":"Increase text size",style:{width:g?"44px":"30px",height:g?"44px":"30px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#fff",cursor:t.fontScale>=130?"not-allowed":"pointer",fontSize:"16px",color:t.fontScale>=130?"#cbd5e1":"#0f172a",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:"+"})]})]}),(0,w.jsx)(Ee,{}),(0,w.jsx)(kt,{label:"\u{1F310} Translate",color:"#7c3aed",badge:"Gemini Nano",concept:"Chrome Translation API \u2014 on device, no internet after setup"}),(0,w.jsx)($t,{steps:["Enable Gemini Nano first","Pick your language","Full page translates instantly"]}),(0,w.jsxs)("div",{style:{padding:"6px 18px 12px"},children:[(0,w.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:sn.slice(0,g?8:18).map(S=>(0,w.jsx)("button",{onClick:()=>i("translateLanguage",S.code),"aria-pressed":t.translateLanguage===S.code,disabled:!r,style:{padding:"4px 10px",borderRadius:"20px",fontSize:"11px",fontWeight:500,border:`1px solid ${t.translateLanguage===S.code?"#7c3aed":"#e2e8f0"}`,background:t.translateLanguage===S.code?"#f5f3ff":"#fff",color:t.translateLanguage===S.code?"#7c3aed":"#64748b",cursor:r?"pointer":"not-allowed",opacity:r?1:.5,minHeight:g?"36px":"auto"},children:S.label},S.code))}),!r&&(0,w.jsx)("p",{style:{margin:"6px 0 0",fontSize:"10px",color:"#94a3b8"},children:"Enable Gemini Nano using the setup guide above."})]}),(0,w.jsx)(Ee,{}),(0,w.jsx)(kt,{label:"\u{1F4AC} Ask This Page",color:"#0d9488",badge:O,concept:"RAG \u2014 Retrieval Augmented Generation. Works on all devices including mobile."}),(0,w.jsx)($t,{steps:["Type any question about this page","Press Ask or hit Enter",x==="transformers"?"Transformers.js answers \u2014 works on mobile, offline":"Gemini Nano reads page and answers privately","Zero cost. No data leaves your device."]}),(0,w.jsxs)("div",{style:{margin:"0 18px 8px",padding:"6px 10px",background:x==="gemini"?"#f0fdfa":x==="transformers"?"#f5f3ff":"#f8fafc",borderRadius:"8px",border:`0.5px solid ${x==="gemini"?"#99f6e4":x==="transformers"?"#c4b5fd":"#e2e8f0"}`,fontSize:"10px",color:x==="gemini"?"#0f766e":x==="transformers"?"#7c3aed":"#94a3b8"},children:[x==="gemini"&&"\u2705 Using Gemini Nano \u2014 on device, private, instant",x==="transformers"&&"\u2705 Using Transformers.js \u2014 works on mobile and all browsers",!x&&"\u23F3 Detecting AI engine...",x==="transformers"&&M==="loading"&&" \xB7 Loading model...",x==="transformers"&&M==="ready"&&" \xB7 Model ready \u2705"]}),(0,w.jsxs)("div",{style:{padding:"0 18px 14px"},children:[(0,w.jsxs)("div",{style:{display:"flex",gap:"6px",marginBottom:"8px"},children:[(0,w.jsx)("input",{type:"text",value:y,onChange:S=>u(S.target.value),onKeyDown:S=>{S.key==="Enter"&&q()},placeholder:"e.g. What does this page do?",disabled:b||!x,"aria-label":"Ask a question about this page",style:{flex:1,padding:"8px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"12px",color:"#0f172a",background:x?"#fff":"#f8fafc",outline:"none",height:g?"44px":"36px"}}),(0,w.jsx)("button",{onClick:q,disabled:b||!y.trim()||!x,"aria-label":"Ask question",style:{padding:"8px 14px",borderRadius:"8px",border:"none",background:x&&y.trim()&&!b?"#0d9488":"#e2e8f0",color:x&&y.trim()&&!b?"#fff":"#94a3b8",fontSize:"12px",fontWeight:600,cursor:x&&y.trim()&&!b?"pointer":"not-allowed",flexShrink:0,height:g?"44px":"36px",minWidth:"52px",transition:"background 0.2s"},children:b?G:"Ask"})]}),I&&(0,w.jsxs)("div",{role:"status","aria-live":"polite",style:{padding:"10px 12px",background:"#f0fdfa",border:"1px solid #99f6e4",borderRadius:"8px",fontSize:"12px",color:"#0f766e",lineHeight:1.6,maxHeight:"180px",overflowY:"auto"},children:[(0,w.jsx)("strong",{style:{display:"block",marginBottom:"4px",fontSize:"11px",color:"#0d9488"},children:"\u{1F4AC} Answer"}),I,(0,w.jsx)("button",{onClick:()=>{C(""),u("")},style:{display:"block",marginTop:"6px",background:"none",border:"none",color:"#94a3b8",fontSize:"10px",cursor:"pointer",padding:0},children:"Clear"})]})]}),n&&(0,w.jsx)("div",{role:"status",style:{margin:"0 14px 10px",padding:"8px 12px",background:"#f0fdfa",border:"1px solid #99f6e4",borderRadius:"8px",fontSize:"12px",color:"#0f766e",fontWeight:500,fontFamily:"monospace"},children:n.fixed>0?`\u2713 ${n.fixed} fixes \xB7 ${n.scanned} nodes \xB7 ${n.renderTime}ms \xB7 Score: ${n.score}/100`:`\u2713 0 auto-fixes needed \xB7 ${n.scanned} nodes \xB7 ${n.renderTime}ms`}),(0,w.jsxs)("div",{style:{display:"flex",gap:"8px",padding:"12px 14px 14px",position:g?"sticky":"relative",bottom:g?0:"auto",background:"#fff",borderTop:"1px solid #f1f5f9"},children:[(0,w.jsx)("button",{onClick:l,style:{flex:1,padding:g?"12px 0":"8px 0",fontSize:"13px",fontWeight:500,borderRadius:"9px",border:"1px solid #e2e8f0",background:"#fff",color:"#64748b",cursor:"pointer"},children:"Reset"}),(0,w.jsx)("button",{onClick:s,style:{flex:2,padding:g?"12px 0":"8px 0",fontSize:"13px",fontWeight:600,borderRadius:"9px",border:"none",background:"#0d9488",color:"#fff",cursor:"pointer"},children:"Apply settings"})]})]})});to.displayName="WidgetPanel";Dt();v();var Xe=require("react");v();var cd={hotel:["hotel","resort","motel","inn","accommodation","lodge","stay","room","booking","hospitality"],ecommerce:["shop","store","ecommerce","e-commerce","sell","product","cart","buy","marketplace","retail"],restaurant:["restaurant","food","cafe","cafeteria","menu","dining","eat","cuisine","bistro","takeaway","delivery"],portfolio:["portfolio","freelance","personal","designer","developer","creative","showcase","work","hire me"],blog:["blog","article","post","write","news","magazine","journal","content"],saas:["saas","dashboard","app","software","platform","tool","analytics","admin","manage","crm"],government:["government","govt","portal","citizen","scheme","welfare","municipal","public","official"],healthcare:["hospital","clinic","doctor","health","medical","patient","appointment","pharmacy"],education:["school","college","university","course","learn","education","student","lms","training"],realestate:["real estate","property","house","flat","apartment","rent","buy property","listing"],landing:["landing","startup","launch","product launch","coming soon","waitlist"],generic:[]},dd={hotel:["home","rooms","booking","about","contact"],ecommerce:["home","products","cart","checkout","about","contact"],restaurant:["home","menu","reservations","about","contact"],portfolio:["home","portfolio","about","contact"],blog:["home","blog","about","contact"],saas:["home","pricing","dashboard","auth","about","contact"],government:["home","services","about","contact","faq"],healthcare:["home","services","booking","team","about","contact"],education:["home","services","pricing","about","contact"],realestate:["home","products","about","contact"],landing:["home","pricing","about","contact"],generic:["home","about","services","contact"]},ud={home:["home","homepage","main","landing"],about:["about","who we are","our story","company"],contact:["contact","reach us","get in touch","location"],services:["service","what we offer","solution","offering"],pricing:["pricing","price","plan","subscription","cost","fee"],blog:["blog","article","news","post"],auth:["login","register","signup","sign up","sign in","auth","account"],dashboard:["dashboard","admin","panel","manage","analytics"],gallery:["gallery","photo","image","portfolio"],products:["product","shop","store","item","catalogue"],cart:["cart","basket","shopping cart"],checkout:["checkout","payment","pay","order"],rooms:["room","suite","accommodation","stay"],booking:["booking","reserve","reservation","schedule","appointment"],menu:["menu","food","dish","cuisine"],reservations:["reservation","table booking","book table"],portfolio:["portfolio","work","project","case study"],team:["team","staff","member","people","who we are"],faq:["faq","question","answer","help","support"],terms:["terms","condition","legal"],privacy:["privacy","policy","gdpr","data"]},gd={Authentication:["login","register","auth","signup","sign in","account"],Payment:["payment","stripe","pay","checkout","billing"],Search:["search","filter","find"],"Dark mode":["dark mode","dark theme","night mode"],"Multi-language":["multilingual","multi language","translation","i18n"],SEO:["seo","search engine","meta","google"],Analytics:["analytics","tracking","stats","dashboard"],Email:["email","newsletter","contact form","notification"],Map:["map","location","address","google maps"],"Social media":["social","instagram","facebook","twitter","share"],"Image gallery":["gallery","photo","image","carousel"],"Booking system":["booking","reservation","appointment","schedule"],"Shopping cart":["cart","basket","shop","ecommerce"],"Blog/CMS":["blog","cms","content","article","post"]},pd={blue:["blue","navy","sky","ocean","corporate"],green:["green","nature","eco","environment","health","fresh"],purple:["purple","violet","luxury","creative","royal"],red:["red","bold","energy","passion","food"],orange:["orange","warm","friendly","fun"],teal:["teal","turquoise","modern","tech"],indigo:["indigo","professional","trust","finance","bank"],gray:["gray","minimal","clean","simple","neutral"]},md={hotel:"indigo",ecommerce:"blue",restaurant:"red",portfolio:"purple",blog:"gray",saas:"teal",government:"blue",healthcare:"green",education:"indigo",realestate:"orange",landing:"purple",generic:"blue"};function Ad(e){let t=[/(?:for|called|named|company|business|brand)\s+["']?([A-Z][a-zA-Z\s]{1,30})["']?/i,/["']([A-Z][a-zA-Z\s]{1,30})["']/,/^([A-Z][a-zA-Z]+(?:\s[A-Z][a-zA-Z]+)?)/m];for(let n of t){let o=e.match(n);if(o?.[1]){let r=o[1].trim();if(r.length>2&&r.length<40)return r}}return"My Business"}function fd(e){let t=e.toLowerCase(),n="generic",o=0;for(let[r,a]of Object.entries(cd)){let i=0;for(let s of a)t.includes(s)&&i++;i>o&&(o=i,n=r)}return n}function hd(e,t){let n=e.toLowerCase(),o=new Set(dd[t]);for(let[r,a]of Object.entries(ud))for(let i of a)if(n.includes(i)){o.add(r);break}return o.add("home"),o.add("contact"),Array.from(o)}function bd(e){let t=e.toLowerCase(),n=[];for(let[o,r]of Object.entries(gd))for(let a of r)if(t.includes(a)){n.push(o);break}return n}function yd(e,t){let n=e.toLowerCase();for(let[o,r]of Object.entries(pd))for(let a of r)if(n.includes(a))return o;return md[t]}function Fs(e){let t=fd(e),n=hd(e,t),o=bd(e),r=yd(e,t);return{siteName:Ad(e),websiteType:t,pages:n,features:o,theme:r,description:e.slice(0,200)}}var P=require("react/jsx-runtime"),Cd=["Hotel booking website for Grand Palace Hotels with rooms, booking and payment","E-commerce store for organic food products with cart and checkout","Restaurant website for Spice Garden with menu and table reservations","Portfolio website for a freelance designer with gallery and contact","SaaS dashboard for project management with pricing and auth","Government portal for citizen services with FAQ and contact"],kd={home:"\u{1F3E0}",about:"\u2139\uFE0F",contact:"\u{1F4EC}",services:"\u2699\uFE0F",pricing:"\u{1F4B0}",blog:"\u{1F4DD}",auth:"\u{1F510}",dashboard:"\u{1F4CA}",gallery:"\u{1F5BC}\uFE0F",products:"\u{1F6D2}",cart:"\u{1F6CD}\uFE0F",checkout:"\u{1F4B3}",rooms:"\u{1F6CF}\uFE0F",booking:"\u{1F4C5}",menu:"\u{1F37D}\uFE0F",reservations:"\u{1FA91}",portfolio:"\u{1F4BC}",team:"\u{1F465}",faq:"\u2753",terms:"\u{1F4C4}",privacy:"\u{1F512}"},vd={hotel:"\u{1F3E8}",ecommerce:"\u{1F6D2}",restaurant:"\u{1F37D}\uFE0F",portfolio:"\u{1F4BC}",blog:"\u{1F4DD}",saas:"\u26A1",government:"\u{1F3DB}\uFE0F",healthcare:"\u{1F3E5}",education:"\u{1F393}",realestate:"\u{1F3E0}",landing:"\u{1F680}",generic:"\u{1F310}"};function oo({position:e,onClose:t}){let[n,o]=(0,Xe.useState)("input"),[r,a]=(0,Xe.useState)(""),[i,s]=(0,Xe.useState)(null),[l,c]=(0,Xe.useState)(0),[d,g]=(0,Xe.useState)(""),p=(0,Xe.useCallback)(()=>{if(!r.trim())return;let u=Fs(r);s(u),o("preview")},[r]),m=(0,Xe.useCallback)(async()=>{if(i){o("generating"),c(0),g("");try{let u=[{msg:"Parsing requirement...",pct:15},{msg:"Loading templates...",pct:30},{msg:"Generating pages...",pct:55},{msg:"Building components...",pct:70},{msg:"Creating styles...",pct:85},{msg:"Packaging ZIP...",pct:95}];for(let C of u)c(C.pct),await new Promise(b=>setTimeout(b,200));let{generateZip:I}=await Promise.resolve().then(()=>(dl(),cl));await I(i),c(100),o("done")}catch(u){g(u instanceof Error?u.message:"Generation failed. Please try again."),o("preview")}}},[i]),h=()=>{o("input"),a(""),s(null),c(0),g("")},y={position:"fixed",bottom:"204px",[e]:"24px",zIndex:9999,width:"340px",maxWidth:"calc(100vw - 48px)",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px",boxShadow:"0 8px 32px rgba(0,0,0,0.14)",fontFamily:"system-ui,-apple-system,sans-serif",maxHeight:"75vh",overflowY:"auto"};return(0,P.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"yuktai Vibe Coder","data-yuktai-panel":"true",style:y,children:[(0,P.jsxs)("div",{style:{padding:"14px 16px 12px",borderBottom:"1px solid #f1f5f9",display:"flex",alignItems:"flex-start",justifyContent:"space-between",position:"sticky",top:0,background:"#fff",zIndex:1},children:[(0,P.jsxs)("div",{children:[(0,P.jsx)("p",{style:{margin:"0 0 2px",fontSize:"13px",fontWeight:700,color:"#0f172a"},children:"\u26A1 Vibe Coder"}),(0,P.jsx)("p",{style:{margin:0,fontSize:"10px",color:"#64748b"},children:"Describe your website \u2192 Download Next.js ZIP"})]}),(0,P.jsx)("button",{onClick:t,"aria-label":"Close vibe coder",style:{background:"none",border:"none",cursor:"pointer",color:"#94a3b8",fontSize:"18px",padding:"2px"},children:"\xD7"})]}),n==="input"&&(0,P.jsxs)("div",{style:{padding:"14px 16px"},children:[(0,P.jsx)("p",{style:{margin:"0 0 10px",fontSize:"11px",color:"#64748b"},children:"Describe your business website in plain English. The plugin will generate a complete Next.js project for you."}),(0,P.jsx)("p",{style:{margin:"0 0 6px",fontSize:"10px",fontWeight:600,color:"#94a3b8",textTransform:"uppercase"},children:"Examples"}),(0,P.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"4px",marginBottom:"12px"},children:Cd.slice(0,3).map(u=>(0,P.jsx)("button",{onClick:()=>a(u),style:{padding:"6px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#f8fafc",color:"#475569",fontSize:"10px",cursor:"pointer",textAlign:"left",lineHeight:1.4},children:u},u))}),(0,P.jsx)("textarea",{value:r,onChange:u=>a(u.target.value),placeholder:"e.g. I need a hotel booking website with rooms, search, and payment for Grand Palace Hotels",rows:4,"aria-label":"Describe your website",style:{width:"100%",padding:"10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"12px",color:"#0f172a",resize:"vertical",outline:"none",fontFamily:"inherit",lineHeight:1.5}}),(0,P.jsx)("button",{onClick:p,disabled:!r.trim(),style:{width:"100%",marginTop:"10px",padding:"10px",borderRadius:"8px",border:"none",background:r.trim()?"#f59e0b":"#e2e8f0",color:r.trim()?"#fff":"#94a3b8",fontSize:"13px",fontWeight:700,cursor:r.trim()?"pointer":"not-allowed",transition:"background 0.2s"},children:"Analyse Requirement \u2192"})]}),n==="preview"&&i&&(0,P.jsxs)("div",{style:{padding:"14px 16px"},children:[d&&(0,P.jsxs)("div",{style:{padding:"10px",background:"#fef2f2",border:"1px solid #fca5a5",borderRadius:"8px",marginBottom:"12px",fontSize:"11px",color:"#dc2626"},children:["\u26A0\uFE0F ",d]}),(0,P.jsxs)("div",{style:{background:"#f8fafc",borderRadius:"10px",padding:"12px",marginBottom:"12px"},children:[(0,P.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},children:[(0,P.jsx)("span",{style:{fontSize:"1.5rem"},children:vd[i.websiteType]||"\u{1F310}"}),(0,P.jsxs)("div",{children:[(0,P.jsx)("p",{style:{margin:0,fontSize:"13px",fontWeight:700,color:"#0f172a"},children:i.siteName}),(0,P.jsxs)("p",{style:{margin:0,fontSize:"10px",color:"#64748b",textTransform:"capitalize"},children:[i.websiteType," website \xB7 ",i.theme," theme"]})]})]}),(0,P.jsxs)("p",{style:{margin:"8px 0 6px",fontSize:"10px",fontWeight:600,color:"#94a3b8",textTransform:"uppercase"},children:["Pages to generate (",i.pages.length,")"]}),(0,P.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px"},children:i.pages.map(u=>(0,P.jsxs)("span",{style:{padding:"2px 8px",borderRadius:"99px",background:"#f0fdf4",border:"1px solid #86efac",fontSize:"10px",color:"#166534",fontWeight:500},children:[kd[u]||"\u{1F4C4}"," ",u]},u))}),i.features.length>0&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("p",{style:{margin:"10px 0 6px",fontSize:"10px",fontWeight:600,color:"#94a3b8",textTransform:"uppercase"},children:"Detected features"}),(0,P.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px"},children:i.features.map(u=>(0,P.jsx)("span",{style:{padding:"2px 8px",borderRadius:"99px",background:"#f5f3ff",border:"1px solid #c4b5fd",fontSize:"10px",color:"#7c3aed",fontWeight:500},children:u},u))})]})]}),(0,P.jsxs)("div",{style:{margin:"0 0 12px",padding:"10px 12px",background:"#f0fdf4",borderRadius:"8px",border:"1px solid #86efac"},children:[(0,P.jsx)("p",{style:{margin:"0 0 4px",fontSize:"10px",fontWeight:700,color:"#166534"},children:"\u{1F4E6} What you get:"}),(0,P.jsxs)("p",{style:{margin:0,fontSize:"10px",color:"#166534",lineHeight:1.6},children:["\u2705 Complete Next.js 16 project",(0,P.jsx)("br",{}),"\u2705 Tailwind CSS + CSS Modules",(0,P.jsx)("br",{}),"\u2705 TypeScript configured",(0,P.jsx)("br",{}),"\u2705 Navbar + Footer components",(0,P.jsx)("br",{}),"\u2705 All ",i.pages.length," pages ready",(0,P.jsx)("br",{}),"\u2705 Mobile responsive",(0,P.jsx)("br",{}),"\u2705 npm run dev \u2192 works immediately"]})]}),(0,P.jsxs)("div",{style:{display:"flex",gap:"8px"},children:[(0,P.jsx)("button",{onClick:h,style:{flex:1,padding:"9px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#fff",color:"#64748b",fontSize:"12px",fontWeight:600,cursor:"pointer"},children:"\u2190 Edit"}),(0,P.jsx)("button",{onClick:m,style:{flex:2,padding:"9px",borderRadius:"8px",border:"none",background:"#f59e0b",color:"#fff",fontSize:"13px",fontWeight:700,cursor:"pointer"},children:"\u2B07\uFE0F Generate & Download ZIP"})]})]}),n==="generating"&&(0,P.jsxs)("div",{style:{padding:"2rem 16px",textAlign:"center"},children:[(0,P.jsx)("p",{style:{fontSize:"2rem",marginBottom:"1rem"},children:"\u26A1"}),(0,P.jsx)("p",{style:{fontSize:"13px",fontWeight:700,color:"#0f172a",marginBottom:"0.5rem"},children:"Generating your project..."}),(0,P.jsx)("p",{style:{fontSize:"11px",color:"#64748b",marginBottom:"1.5rem"},children:l<30?"Parsing requirement...":l<55?"Loading templates...":l<70?"Generating pages...":l<85?"Building components...":l<95?"Creating styles...":"Packaging ZIP..."}),(0,P.jsx)("div",{style:{height:"8px",background:"#e2e8f0",borderRadius:"99px",overflow:"hidden"},children:(0,P.jsx)("div",{style:{height:"100%",width:`${l}%`,background:"#f59e0b",borderRadius:"99px",transition:"width 0.3s ease"}})}),(0,P.jsxs)("p",{style:{marginTop:"0.5rem",fontSize:"10px",color:"#94a3b8"},children:[l,"%"]})]}),n==="done"&&i&&(0,P.jsxs)("div",{style:{padding:"2rem 16px",textAlign:"center"},children:[(0,P.jsx)("p",{style:{fontSize:"3rem",marginBottom:"0.75rem"},children:"\u2705"}),(0,P.jsxs)("p",{style:{fontSize:"14px",fontWeight:700,color:"#0f172a",marginBottom:"0.5rem"},children:[i.siteName," downloaded!"]}),(0,P.jsx)("p",{style:{fontSize:"11px",color:"#64748b",marginBottom:"1.5rem",lineHeight:1.6},children:"Your ZIP is downloading. Unzip it and run:"}),["npm install","npm run dev"].map(u=>(0,P.jsx)("div",{style:{background:"#0f172a",borderRadius:"8px",padding:"8px 12px",marginBottom:"6px",textAlign:"left"},children:(0,P.jsxs)("code",{style:{fontSize:"12px",color:"#a7f3d0",fontFamily:"monospace"},children:["$ ",u]})},u)),(0,P.jsx)("p",{style:{fontSize:"11px",color:"#10b981",margin:"1rem 0",fontWeight:600},children:"Then open http://localhost:3000 \u{1F680}"}),(0,P.jsxs)("div",{style:{display:"flex",gap:"8px"},children:[(0,P.jsx)("button",{onClick:h,style:{flex:1,padding:"9px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#fff",color:"#64748b",fontSize:"12px",fontWeight:600,cursor:"pointer"},children:"New Project"}),(0,P.jsx)("button",{onClick:m,style:{flex:1,padding:"9px",borderRadius:"8px",border:"none",background:"#f59e0b",color:"#fff",fontSize:"12px",fontWeight:700,cursor:"pointer"},children:"\u2B07\uFE0F Download Again"})]})]})]})}var J=require("react/jsx-runtime");async function Md(){try{if(typeof window>"u")return!1;let e=window;if(e.LanguageModel)try{if(typeof e.LanguageModel.availability=="function"){let n=await e.LanguageModel.availability();if(n==="readily"||n==="available"||n==="downloadable")return!0}else return!0}catch{}if(e.Summarizer)try{let n=await e.Summarizer.availability?.();if(!n||n==="readily"||n==="available")return!0}catch{}if(e.Rewriter)try{let n=await e.Rewriter.availability?.();if(!n||n==="readily"||n==="available")return!0}catch{}if(e.Writer)try{let n=await e.Writer.availability?.();if(!n||n==="readily"||n==="available")return!0}catch{}let t=e.ai||globalThis.ai;if(t){if(t.languageModel?.availability)try{let n=await t.languageModel.availability();if(n==="readily"||n==="available")return!0}catch{}if(t.languageModel&&typeof t.languageModel.create=="function"||t.summarizer||t.rewriter||t.writer||t.languageModel)return!0}return!!(e.Translator||e.translation?.canTranslate)}catch{return!1}}function pn({position:e="left",children:t,config:n={},showRag:o=!1,showAgent:r=!1}){let[a,i]=(0,X.useState)(!1),[s,l]=(0,X.useState)(eo),[c,d]=(0,X.useState)(null),[g,p]=(0,X.useState)(!1),[m,h]=(0,X.useState)(!1),[y,u]=(0,X.useState)(!1),I=X.default.useRef(null),[C,b]=(0,X.useState)(!1),[k,x]=(0,X.useState)(""),[B,M]=(0,X.useState)(""),[L,q]=(0,X.useState)(!1),[O,G]=(0,X.useState)(null),[Q,S]=(0,X.useState)("idle"),[j,ee]=(0,X.useState)(!1),[H,ce]=(0,X.useState)(""),[pe,z]=(0,X.useState)(""),[Z,$]=(0,X.useState)(!1),[_,oe]=(0,X.useState)([]),[W,ue]=(0,X.useState)(null),Me=24,Le=84,Y=o?144:84,me=204,[we,Qe]=(0,X.useState)(!1);(0,X.useEffect)(()=>{if(typeof window>"u")return;let N=window;!!(N.LanguageModel||N.ai?.languageModel)&&m?(G("gemini"),ue("gemini")):Ft()&&(G("transformers"),ue("transformers"))},[m]),(0,X.useEffect)(()=>{if(O!=="transformers")return;let N=setInterval(()=>S(Pt()),500);return()=>clearInterval(N)},[O]);let Re=(0,X.useCallback)(async()=>{if(!(!k.trim()||L)){if(!O){M("\u26A0\uFE0F No AI engine available.");return}q(!0),M("");try{let N;if(O==="gemini"){let{askPage:se}=await Promise.resolve().then(()=>(Kn(),Qs));N=await se(k)}else{S("loading");let{askPageWithTransformers:se}=await Promise.resolve().then(()=>(Dt(),Zn));N=await se(k),S("ready")}M(N.success&&N.answer?N.answer.replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/#+\s/g,"").trim():"\u26A0\uFE0F "+(N.error||"No answer found."))}catch{M("\u26A0\uFE0F Something went wrong.")}q(!1)}},[k,L,O]),he=(0,X.useCallback)(async()=>{if(!H.trim()||Z)return;if(!W){z("\u26A0\uFE0F No AI engine available.");return}$(!0),oe([]),z("");let{runAgent:N}=await Promise.resolve().then(()=>(fl(),Al));await N(H,W,se=>{oe(qe=>[...qe,se.text])}),$(!1),z("done")},[H,Z,W]);(0,X.useEffect)(()=>{if(typeof window>"u")return;let se=setTimeout(async()=>{let qe=window,Gt=await Md();h(Gt),u(!!(qe.SpeechRecognition||qe.webkitSpeechRecognition))},800);return()=>clearTimeout(se)},[]),(0,X.useEffect)(()=>{if(!(typeof window>"u"))try{let N=localStorage.getItem("yuktai-a11y-prefs");N&&l(se=>({...se,...JSON.parse(N)}))}catch{}},[]);let nt=(0,X.useCallback)(async N=>{let se={enabled:!0,highContrast:N.highContrast,darkMode:N.darkMode,reduceMotion:N.reduceMotion,largeTargets:N.largeTargets,speechEnabled:N.speechEnabled,autoFix:N.autoFix,dyslexiaFont:N.dyslexiaFont,localFont:N.localFont,fontSizeMultiplier:N.fontScale/100,colorBlindMode:N.colorBlindMode,showAuditBadge:N.showAuditBadge,showSkipLinks:!0,showPreferencePanel:!1,plainEnglish:N.plainEnglish,summarisePage:N.summarisePage,translateLanguage:N.translateLanguage,voiceControl:N.voiceControl,smartLabels:N.smartLabels,...n};await Se.execute(se),d(Se.applyFixes(se)),p(!0)},[n]),ut=(0,X.useCallback)(async()=>{try{localStorage.setItem("yuktai-a11y-prefs",JSON.stringify(s))}catch{}await nt(s),i(!1)},[s,nt]),ft=(0,X.useCallback)(()=>{l(eo);try{localStorage.removeItem("yuktai-a11y-prefs")}catch{}let N=document.documentElement;["data-yuktai-high-contrast","data-yuktai-dark","data-yuktai-reduce-motion","data-yuktai-large-targets","data-yuktai-keyboard","data-yuktai-dyslexia"].forEach(se=>N.removeAttribute(se)),document.body.style.filter="",document.body.style.fontFamily="",document.documentElement.style.fontSize="",d(null),p(!1)},[]),Ue=(0,X.useCallback)((N,se)=>{l(qe=>({...qe,[N]:se}))},[]);(0,X.useEffect)(()=>{let N=se=>{se.key==="Escape"&&(a&&i(!1),C&&b(!1),j&&ee(!1),we&&Qe(!1))};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[a,C,j]),(0,X.useEffect)(()=>{a&&I.current&&Se.trapFocus(I.current)},[a]);let Ye=(N,se,qe)=>({position:"fixed",bottom:`${N}px`,[e]:"24px",zIndex:9998,width:"52px",height:"52px",borderRadius:"50%",background:se,color:"#fff",border:"none",cursor:"pointer",fontSize:"22px",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 4px 16px rgba(0,0,0,0.25)",transition:"transform 0.15s, background 0.2s"}),gt=N=>{N.currentTarget.style.transform="scale(1.08)"},ke=N=>{N.currentTarget.style.transform="scale(1)"},ve=O==="gemini"?"Gemini Nano \xB7 On device":O==="transformers"?"Transformers.js \xB7 All devices":"Detecting...",je=O==="transformers"&&Q==="loading"?"Loading model...":"...";return(0,J.jsxs)(J.Fragment,{children:[t,r&&(0,J.jsx)("button",{style:Ye(204,we?"#d97706":"#f59e0b",we),"aria-label":"Open Vibe Coder",title:"\u26A1 Vibe Coder \u2014 Generate Next.js project",onClick:()=>{Qe(N=>!N),ee(!1),b(!1),i(!1)},onMouseEnter:gt,onMouseLeave:ke,children:"\u26A1"}),r&&we&&(0,J.jsx)(oo,{position:e,onClose:()=>Qe(!1)}),r&&(0,J.jsx)("button",{style:Ye(Y,j?"#059669":"#10b981",j),"aria-label":"Open AI agent","aria-haspopup":"dialog","aria-expanded":j,title:"\u{1F916} AI Agent \u2014 guide me through this page",onClick:()=>{ee(N=>!N),b(!1),i(!1)},onMouseEnter:gt,onMouseLeave:ke,children:"\u{1F916}"}),r&&j&&(0,J.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"yuktai AI Agent","data-yuktai-panel":"true",style:{position:"fixed",bottom:`${Y+64}px`,[e]:"24px",zIndex:9999,width:"300px",maxWidth:"calc(100vw - 48px)",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px",boxShadow:"0 8px 32px rgba(0,0,0,0.12)",fontFamily:"system-ui,-apple-system,sans-serif",padding:"14px",maxHeight:"70vh",overflowY:"auto"},children:[(0,J.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"10px"},children:[(0,J.jsxs)("div",{children:[(0,J.jsx)("p",{style:{margin:"0 0 2px",fontSize:"13px",fontWeight:600,color:"#0f172a"},children:"\u{1F916} AI Agent"}),(0,J.jsx)("p",{style:{margin:0,fontSize:"10px",color:"#10b981"},children:W==="gemini"?"Gemini Nano \xB7 On device":W==="transformers"?"Transformers.js \xB7 All devices":"Detecting..."})]}),(0,J.jsx)("button",{onClick:()=>ee(!1),"aria-label":"Close agent panel",style:{background:"none",border:"none",cursor:"pointer",color:"#94a3b8",fontSize:"18px",lineHeight:1,padding:"2px"},children:"\xD7"})]}),(0,J.jsx)("p",{style:{margin:"0 0 8px",fontSize:"11px",color:"#64748b"},children:"Tell me what you want to do on this page. I will guide you step by step."}),(0,J.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",marginBottom:"8px"},children:["Fill this form","Find contact info","What is this page?","Guide me to apply"].map(N=>(0,J.jsx)("button",{onClick:()=>ce(N),style:{padding:"3px 8px",borderRadius:"20px",fontSize:"10px",border:"1px solid #e2e8f0",background:"#f8fafc",color:"#64748b",cursor:"pointer"},children:N},N))}),(0,J.jsxs)("div",{style:{display:"flex",gap:"6px",marginBottom:"8px"},children:[(0,J.jsx)("input",{type:"text",value:H,onChange:N=>ce(N.target.value),onKeyDown:N=>{N.key==="Enter"&&he()},placeholder:"e.g. Help me fill this form",disabled:Z||!W,"aria-label":"Tell the agent what to do",style:{flex:1,padding:"8px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"12px",color:"#0f172a",background:W?"#fff":"#f8fafc",outline:"none",height:"36px"}}),(0,J.jsx)("button",{onClick:he,disabled:Z||!H.trim()||!W,"aria-label":"Run agent",style:{padding:"8px 12px",borderRadius:"8px",border:"none",background:W&&H.trim()&&!Z?"#10b981":"#e2e8f0",color:W&&H.trim()&&!Z?"#fff":"#94a3b8",fontSize:"12px",fontWeight:600,cursor:W&&H.trim()&&!Z?"pointer":"not-allowed",height:"36px",minWidth:"52px",transition:"background 0.2s"},children:Z?"...":"Go"})]}),_.length>0&&(0,J.jsxs)("div",{style:{padding:"10px 12px",background:"#f0fdf4",border:"1px solid #86efac",borderRadius:"8px",fontSize:"11px",color:"#166534",lineHeight:1.7},children:[_.map((N,se)=>(0,J.jsx)("p",{style:{margin:"0 0 2px"},children:N},se)),pe==="done"&&(0,J.jsx)("button",{onClick:()=>{oe([]),ce(""),z("")},style:{display:"block",marginTop:"6px",background:"none",border:"none",color:"#94a3b8",fontSize:"10px",cursor:"pointer",padding:0},children:"Clear"})]}),!W&&(0,J.jsx)("p",{style:{margin:"4px 0 0",fontSize:"10px",color:"#94a3b8"},children:"Enable Gemini Nano via chrome://flags for best results."})]}),o&&(0,J.jsx)("button",{style:Ye(Le,C?"#7c3aed":"#6d28d9",C),"aria-label":"Ask a question about this page","aria-haspopup":"dialog","aria-expanded":C,title:`\u{1F4AC} Ask this page \xB7 ${ve}`,onClick:()=>{b(N=>!N),i(!1),ee(!1)},onMouseEnter:gt,onMouseLeave:ke,children:"\u{1F4AC}"}),o&&C&&(0,J.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Ask this page","data-yuktai-panel":"true",style:{position:"fixed",bottom:`${Le+64}px`,[e]:"24px",zIndex:9999,width:"300px",maxWidth:"calc(100vw - 48px)",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px",boxShadow:"0 8px 32px rgba(0,0,0,0.12)",fontFamily:"system-ui,-apple-system,sans-serif",padding:"14px"},children:[(0,J.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"10px"},children:[(0,J.jsxs)("div",{children:[(0,J.jsx)("p",{style:{margin:"0 0 2px",fontSize:"13px",fontWeight:600,color:"#0f172a"},children:"\u{1F4AC} Ask this page"}),(0,J.jsx)("p",{style:{margin:0,fontSize:"10px",color:"#7c3aed"},children:ve}),O==="transformers"&&Q==="loading"&&(0,J.jsx)("p",{style:{margin:"2px 0 0",fontSize:"9px",color:"#94a3b8"},children:"Downloading model \u2014 first time only"}),O==="transformers"&&Q==="ready"&&(0,J.jsx)("p",{style:{margin:"2px 0 0",fontSize:"9px",color:"#10b981"},children:"Model ready \u2705 \u2014 works offline"})]}),(0,J.jsx)("button",{onClick:()=>b(!1),"aria-label":"Close ask panel",style:{background:"none",border:"none",cursor:"pointer",color:"#94a3b8",fontSize:"18px",lineHeight:1,padding:"2px"},children:"\xD7"})]}),(0,J.jsxs)("div",{style:{display:"flex",gap:"6px",marginBottom:"8px"},children:[(0,J.jsx)("input",{type:"text",value:k,onChange:N=>x(N.target.value),onKeyDown:N=>{N.key==="Enter"&&Re()},placeholder:"e.g. What does this page do?",disabled:L||!O,"aria-label":"Ask a question about this page",style:{flex:1,padding:"8px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"12px",color:"#0f172a",background:O?"#fff":"#f8fafc",outline:"none",height:"36px"}}),(0,J.jsx)("button",{onClick:Re,disabled:L||!k.trim()||!O,"aria-label":"Submit question",style:{padding:"8px 12px",borderRadius:"8px",border:"none",background:O&&k.trim()&&!L?"#7c3aed":"#e2e8f0",color:O&&k.trim()&&!L?"#fff":"#94a3b8",fontSize:"12px",fontWeight:600,cursor:O&&k.trim()&&!L?"pointer":"not-allowed",height:"36px",minWidth:"48px",transition:"background 0.2s"},children:L?je:"Ask"})]}),B&&(0,J.jsxs)("div",{style:{padding:"10px",background:"#f5f3ff",borderRadius:"8px",fontSize:"12px",color:"#4c1d95",lineHeight:1.6,maxHeight:"180px",overflowY:"auto"},children:[(0,J.jsx)("strong",{style:{display:"block",marginBottom:"4px",fontSize:"11px",color:"#7c3aed"},children:"\u{1F4AC} Answer"}),B,(0,J.jsx)("button",{onClick:()=>{M(""),x("")},style:{display:"block",marginTop:"6px",background:"none",border:"none",color:"#94a3b8",fontSize:"10px",cursor:"pointer",padding:0},children:"Clear"})]}),!O&&(0,J.jsx)("p",{style:{margin:"4px 0 0",fontSize:"10px",color:"#94a3b8"},children:"Detecting AI engine..."})]}),(0,J.jsx)("button",{style:Ye(Me,g?"#0d9488":"#1a73e8",a),"aria-label":"Open accessibility preferences","aria-haspopup":"dialog","aria-expanded":a,"data-yuktai-pref-toggle":"true",title:"\u267F Accessibility settings",onClick:()=>{i(N=>!N),b(!1),ee(!1)},onMouseEnter:gt,onMouseLeave:ke,children:"\u267F"}),a&&(0,J.jsx)(to,{ref:I,position:e,settings:s,report:c,isActive:g,aiSupported:m,voiceSupported:y,set:Ue,onApply:ut,onReset:ft,onClose:()=>i(!1)})]})}v();var zt={name:"ai.text",async execute(e){return`\u{1F916} YuktAI says: ${e}`}};v();var Ot={name:"voice.text",async execute(e){return!e||e.trim()===""?"\u{1F3A4} No speech detected":`\u{1F3A4} You said: ${e}`}};v();var rt=class{plugins=new Map;register(t,n){if(!n||typeof n.execute!="function")throw new Error(`Invalid plugin: ${t}`);this.plugins.set(t,n)}use(t){return this.plugins.get(t)}async run(t,n){try{let o=this.use(t);if(!o)throw new Error(`Plugin not found: ${t}`);return await o.execute(n)}catch(o){throw console.error(`[YuktAI Runtime Error in ${t}]:`,o),o}}getPlugins(){return Array.from(this.plugins.keys())}};v();var le=require("react");v();var de=require("react"),R=require("react/jsx-runtime"),hl={"en-US":{title:"Grid AI Assistant",subtitle:"Ask about your data",ask:"Ask",placeholder:"Ask or type a command...",listening:"Listening...",send:"Send",close:"Close",open:"Open AI assistant",inputLanguage:"Input language",speakNow:"Speak your question",working:"Working on it\u2026",english:"English",telugu:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41",searchStarted:e=>`Searching for "${e}".`,sortedAscending:e=>`Sorted by ${e} in ascending order.`,sortedDescending:e=>`Sorted by ${e} in descending order.`,count:e=>`There are ${e} rows in the grid.`,highest:(e,t,n)=>`The highest ${e} is ${t}, held by ${n}.`,lowest:(e,t,n)=>`The lowest ${e} is ${t}, held by ${n}.`,average:(e,t)=>`The average ${e} is ${t}.`,total:(e,t)=>`The total ${e} is ${t}.`,noData:"There is no data to analyze.",noColumn:"I could not find a column to analyze.",noNumericData:e=>`There is no numeric data in ${e}.`,notFound:e=>`I could not find anything matching "${e}".`,needName:"Please provide a value to look up.",fallback:"I can search, sort, count, and analyze the grid data.",unsupportedVoice:"Voice input is not supported in this browser."},"te-IN":{title:"\u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D AI \u0C38\u0C39\u0C3E\u0C2F\u0C15\u0C41\u0C21\u0C41",subtitle:"\u0C2E\u0C40 \u0C21\u0C47\u0C1F\u0C3E \u0C17\u0C41\u0C30\u0C3F\u0C02\u0C1A\u0C3F \u0C05\u0C21\u0C17\u0C02\u0C21\u0C3F",ask:"\u0C05\u0C21\u0C17\u0C02\u0C21\u0C3F",placeholder:"\u0C2A\u0C4D\u0C30\u0C36\u0C4D\u0C28 \u0C32\u0C47\u0C26\u0C3E \u0C06\u0C26\u0C47\u0C36\u0C02 \u0C1F\u0C48\u0C2A\u0C4D \u0C1A\u0C47\u0C2F\u0C02\u0C21\u0C3F...",listening:"\u0C35\u0C3F\u0C02\u0C1F\u0C41\u0C28\u0C4D\u0C28\u0C3E\u0C28\u0C41...",send:"\u0C2A\u0C02\u0C2A\u0C02\u0C21\u0C3F",close:"\u0C2E\u0C42\u0C38\u0C3F\u0C35\u0C47\u0C2F\u0C02\u0C21\u0C3F",open:"AI \u0C38\u0C39\u0C3E\u0C2F\u0C15\u0C41\u0C21\u0C3F\u0C28\u0C3F \u0C24\u0C46\u0C30\u0C35\u0C02\u0C21\u0C3F",inputLanguage:"\u0C07\u0C28\u0C4D\u200C\u0C2A\u0C41\u0C1F\u0C4D \u0C2D\u0C3E\u0C37",speakNow:"\u0C2E\u0C40 \u0C2A\u0C4D\u0C30\u0C36\u0C4D\u0C28 \u0C1A\u0C46\u0C2A\u0C4D\u0C2A\u0C02\u0C21\u0C3F",working:"\u0C1A\u0C47\u0C38\u0C4D\u0C24\u0C41\u0C28\u0C4D\u0C28\u0C3E\u0C28\u0C41\u2026",english:"English",telugu:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41",searchStarted:e=>`\u201C${e}\u201D \u0C15\u0C4B\u0C38\u0C02 \u0C36\u0C4B\u0C27\u0C3F\u0C38\u0C4D\u0C24\u0C41\u0C28\u0C4D\u0C28\u0C3E\u0C28\u0C41.`,sortedAscending:e=>`${e}\u0C28\u0C41 \u0C06\u0C30\u0C4B\u0C39\u0C23 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u0C32\u0C4B \u0C05\u0C2E\u0C30\u0C4D\u0C1A\u0C3E\u0C28\u0C41.`,sortedDescending:e=>`${e}\u0C28\u0C41 \u0C05\u0C35\u0C30\u0C4B\u0C39\u0C23 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u0C32\u0C4B \u0C05\u0C2E\u0C30\u0C4D\u0C1A\u0C3E\u0C28\u0C41.`,count:e=>`\u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D\u200C\u0C32\u0C4B \u0C2E\u0C4A\u0C24\u0C4D\u0C24\u0C02 ${e} \u0C35\u0C30\u0C41\u0C38\u0C32\u0C41 \u0C09\u0C28\u0C4D\u0C28\u0C3E\u0C2F\u0C3F.`,highest:(e,t,n)=>`\u0C05\u0C24\u0C4D\u0C2F\u0C27\u0C3F\u0C15 ${e} \u0C35\u0C3F\u0C32\u0C41\u0C35 ${t}. \u0C07\u0C26\u0C3F ${n}\u0C15\u0C41 \u0C38\u0C02\u0C2C\u0C02\u0C27\u0C3F\u0C02\u0C1A\u0C3F\u0C28\u0C26\u0C3F.`,lowest:(e,t,n)=>`\u0C05\u0C24\u0C4D\u0C2F\u0C32\u0C4D\u0C2A ${e} \u0C35\u0C3F\u0C32\u0C41\u0C35 ${t}. \u0C07\u0C26\u0C3F ${n}\u0C15\u0C41 \u0C38\u0C02\u0C2C\u0C02\u0C27\u0C3F\u0C02\u0C1A\u0C3F\u0C28\u0C26\u0C3F.`,average:(e,t)=>`${e} \u0C38\u0C17\u0C1F\u0C41 \u0C35\u0C3F\u0C32\u0C41\u0C35 ${t}.`,total:(e,t)=>`${e} \u0C2E\u0C4A\u0C24\u0C4D\u0C24\u0C02 \u0C35\u0C3F\u0C32\u0C41\u0C35 ${t}.`,noData:"\u0C35\u0C3F\u0C36\u0C4D\u0C32\u0C47\u0C37\u0C3F\u0C02\u0C1A\u0C21\u0C3E\u0C28\u0C3F\u0C15\u0C3F \u0C21\u0C47\u0C1F\u0C3E \u0C32\u0C47\u0C26\u0C41.",noColumn:"\u0C35\u0C3F\u0C36\u0C4D\u0C32\u0C47\u0C37\u0C3F\u0C02\u0C1A\u0C21\u0C3E\u0C28\u0C3F\u0C15\u0C3F \u0C24\u0C17\u0C3F\u0C28 \u0C15\u0C3E\u0C32\u0C2E\u0C4D \u0C15\u0C28\u0C2C\u0C21\u0C32\u0C47\u0C26\u0C41.",noNumericData:e=>`${e}\u0C32\u0C4B \u0C38\u0C02\u0C16\u0C4D\u0C2F\u0C3E \u0C38\u0C2E\u0C3E\u0C1A\u0C3E\u0C30\u0C02 \u0C32\u0C47\u0C26\u0C41.`,notFound:e=>`\u201C${e}\u201D\u0C15\u0C41 \u0C38\u0C30\u0C3F\u0C2A\u0C4B\u0C32\u0C47 \u0C38\u0C2E\u0C3E\u0C1A\u0C3E\u0C30\u0C02 \u0C15\u0C28\u0C2C\u0C21\u0C32\u0C47\u0C26\u0C41.`,needName:"\u0C36\u0C4B\u0C27\u0C3F\u0C02\u0C1A\u0C21\u0C3E\u0C28\u0C3F\u0C15\u0C3F \u0C12\u0C15 \u0C35\u0C3F\u0C32\u0C41\u0C35 \u0C07\u0C35\u0C4D\u0C35\u0C02\u0C21\u0C3F.",fallback:"\u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D\u200C\u0C32\u0C4B \u0C36\u0C4B\u0C27\u0C28, \u0C15\u0C4D\u0C30\u0C2E\u0C2C\u0C26\u0C4D\u0C27\u0C40\u0C15\u0C30\u0C23, \u0C32\u0C46\u0C15\u0C4D\u0C15\u0C3F\u0C02\u0C2A\u0C41 \u0C2E\u0C30\u0C3F\u0C2F\u0C41 \u0C21\u0C47\u0C1F\u0C3E \u0C35\u0C3F\u0C36\u0C4D\u0C32\u0C47\u0C37\u0C23 \u0C1A\u0C47\u0C2F\u0C17\u0C32\u0C28\u0C41.",unsupportedVoice:"\u0C08 \u0C2C\u0C4D\u0C30\u0C4C\u0C1C\u0C30\u0C4D\u200C\u0C32\u0C4B \u0C35\u0C3E\u0C2F\u0C3F\u0C38\u0C4D \u0C07\u0C28\u0C4D\u200C\u0C2A\u0C41\u0C1F\u0C4D\u200C\u0C15\u0C41 \u0C2E\u0C26\u0C4D\u0C26\u0C24\u0C41 \u0C32\u0C47\u0C26\u0C41."}};function Oe(e){return e.toLowerCase().trim().replace(/\s+/g," ")}function Qd(e,t){let n=Oe(e);if(t==="te-IN")return/^(శోధించు|శోధించండి|వెతుకు|వెతకండి|చూపించు|చూపించండి|ఫిల్టర్)/.test(n)?{type:"search",payload:n.replace(/^(శోధించు|శోధించండి|వెతుకు|వెతకండి|చూపించు|చూపించండి|ఫిల్టర్)\s*/u,"").trim()||e}:/క్రమబద్ధీకర|అమర్చ|సార్ట్/.test(n)?{type:"sort",payload:{key:void 0,dir:/అవరోహణ|పెద్ద|అధిక|చివర/.test(n)?"desc":"asc"}}:/ఎన్ని|ఎంతమంది|లెక్క|మొత్తం వరుస|వరుసలు/.test(n)?{type:"question",payload:e}:/అత్యధిక|గరిష్ఠ|పెద్ద|ఎక్కువ/.test(n)?{type:"question",payload:e}:/అత్యల్ప|కనిష్ఠ|చిన్న|తక్కువ/.test(n)?{type:"question",payload:e}:/సగటు|సగటు విలువ/.test(n)?{type:"question",payload:e}:/మొత్తం|కలిపి/.test(n)?{type:"question",payload:e}:{type:"search",payload:e};if(/^(search|find|show|filter)/.test(n))return{type:"search",payload:n.replace(/^(search|find|show|filter)\s+(for\s+|by\s+)?/,"").trim()||e};if(/sort/.test(n)){let o=/desc|descending|high|higher|large|largest|top/.test(n);return{type:"sort",payload:{key:n.match(/(?:by|on)\s+([a-z0-9_-]+)/)?.[1],dir:o?"desc":"asc"}}}return/how many|count|highest|maximum|max|top|largest|lowest|minimum|min|smallest|bottom|average|avg|mean|sum|total|who|which|where|whose/.test(n)?{type:"question",payload:e}:{type:"search",payload:e}}function bl(e,t){let n=Oe(e);return t.find(o=>{let r=Oe(o.key),a=Oe(o.label);return n.includes(r)||n.includes(a)})}function mn(e,t){return e.toLocaleString(t==="te-IN"?"te-IN":"en-IN")}function Rd(e,t,n,o){let r=hl[o];if(t.length===0)return r.noData;let a=Oe(e),i=n.filter(C=>C.type==="number"),s=bl(e,n),l=s?.type==="number"?s:i[0],c=/how many|count|rows|ఎన్ని|ఎంతమంది|లెక్క|వరుసలు/.test(a);if(c)return r.count(t.length);if(/highest|maximum|max|top|largest|అత్యధిక|గరిష్ఠ|పెద్ద|ఎక్కువ/.test(a)){let C=s??l;if(!C)return r.noColumn;let b=t.map(M=>({row:M,value:Number(M[C.key])})).filter(M=>!Number.isNaN(M.value)).sort((M,L)=>L.value-M.value);if(b.length===0)return r.noNumericData(C.label);let k=b[0],x=n.find(M=>M.key==="name"||Oe(M.label)==="name"),B=x?String(k.row[x.key]??""):o==="te-IN"?"\u0C08 \u0C35\u0C30\u0C41\u0C38":"this row";return r.highest(C.label,mn(k.value,o),B)}if(/lowest|minimum|min|smallest|bottom|అత్యల్ప|కనిష్ఠ|చిన్న|తక్కువ/.test(a)){let C=s??l;if(!C)return r.noColumn;let b=t.map(M=>({row:M,value:Number(M[C.key])})).filter(M=>!Number.isNaN(M.value)).sort((M,L)=>M.value-L.value);if(b.length===0)return r.noNumericData(C.label);let k=b[0],x=n.find(M=>M.key==="name"||Oe(M.label)==="name"),B=x?String(k.row[x.key]??""):o==="te-IN"?"\u0C08 \u0C35\u0C30\u0C41\u0C38":"this row";return r.lowest(C.label,mn(k.value,o),B)}if(/average|avg|mean|సగటు/.test(a)){let C=s??l;if(!C)return r.noColumn;let b=t.map(x=>Number(x[C.key])).filter(x=>!Number.isNaN(x));if(b.length===0)return r.noNumericData(C.label);let k=b.reduce((x,B)=>x+B,0)/b.length;return r.average(C.label,mn(Math.round(k*100)/100,o))}if(/sum|total|మొత్తం|కలిపి/.test(a)&&!c){let C=s??l;if(!C)return r.noColumn;let b=t.map(x=>Number(x[C.key])).filter(x=>!Number.isNaN(x));if(b.length===0)return r.noNumericData(C.label);let k=b.reduce((x,B)=>x+B,0);return r.total(C.label,mn(k,o))}let h=a.match(/[\p{L}\p{N}_-]+/gu)??[],y=new Set(["who","what","which","where","whose","is","the","has","have","show","find","search","for","by","about"]),I=h.filter(C=>!y.has(C)).join(" ").trim();if(I){let C=t.find(b=>Object.values(b).some(k=>String(k??"").toLowerCase().includes(I.toLowerCase())));return C?n.map(b=>`${b.label}: ${String(C[b.key]??"")}`).join(o==="te-IN"?" \xB7 ":", "):r.notFound(I)}return r.fallback}function Nd(e,t){if(typeof window>"u"||!window.speechSynthesis)return;window.speechSynthesis.cancel();let n=new SpeechSynthesisUtterance(e);n.lang=t,n.rate=1,n.pitch=1,window.speechSynthesis.speak(n)}function Gd(e){let[t,n]=(0,de.useState)(!1),[o,r]=(0,de.useState)(""),[a,i]=(0,de.useState)(!0),s=(0,de.useRef)(null);(0,de.useEffect)(()=>{if(typeof window>"u")return;let d=window.SpeechRecognition||window.webkitSpeechRecognition;if(!d){i(!1),s.current=null;return}let g=new d;return g.continuous=!1,g.interimResults=!1,g.lang=e,g.onresult=p=>{let m=p?.results?.[0]?.[0]?.transcript??"";r(m),n(!1)},g.onerror=()=>{n(!1)},g.onend=()=>{n(!1)},s.current=g,()=>{try{g.stop()}catch{}s.current=null}},[e]);let l=(0,de.useCallback)(()=>{if(s.current){r(""),n(!0);try{s.current.start()}catch{n(!1)}}},[]),c=(0,de.useCallback)(()=>{try{s.current?.stop()}catch{}n(!1)},[]);return{listening:t,transcript:o,supported:a,start:l,stop:c}}function Ld(){return(0,R.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,R.jsx)("circle",{cx:"11",cy:"11",r:"6.5"}),(0,R.jsx)("path",{d:"m16 16 5 5"})]})}function Fd(){return(0,R.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.3",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,R.jsx)("rect",{x:"8",y:"3",width:"8",height:"12",rx:"4"}),(0,R.jsx)("path",{d:"M5 11a7 7 0 0 0 14 0"}),(0,R.jsx)("path",{d:"M12 18v3"}),(0,R.jsx)("path",{d:"M8 21h8"})]})}function Pd(){return(0,R.jsxs)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.3",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,R.jsx)("path",{d:"m4 4 16 8-16 8 4-8-4-8Z"}),(0,R.jsx)("path",{d:"M8 12h12"})]})}function Dd(){return(0,R.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,R.jsx)("path",{d:"m6 6 12 12"}),(0,R.jsx)("path",{d:"m18 6-12 12"})]})}function $d({data:e,columns:t,onSearch:n,onSort:o,theme:r="light",language:a="en-US",inputLanguage:i="en-US",embedded:s=!1,agent:l,onInputLanguageChange:c}){let d=hl[a],[g,p]=(0,de.useState)(i);(0,de.useEffect)(()=>{p(i)},[i]);let[m,h]=(0,de.useState)(!1),y=r==="dark",[u,I]=(0,de.useState)(s),[C,b]=(0,de.useState)(""),[k,x]=(0,de.useState)([]),B=(0,de.useRef)(null),{listening:M,transcript:L,supported:q,start:O,stop:G}=Gd(g),Q=(0,de.useMemo)(()=>({bg:y?"#0F172A":"#FFFFFF",surface:y?"#1E293B":"#F8FAFC",border:y?"#334155":"#E2E8F0",text:y?"#F1F5F9":"#0F172A",muted:y?"#94A3B8":"#64748B",accent:"#10B981",userMsg:y?"#334155":"#DBEAFE",aiMsg:y?"#1E293B":"#F0FDF4"}),[y]),S=(0,de.useMemo)(()=>({role:"ai",text:a==="te-IN"?"\u0C2E\u0C40 \u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D \u0C21\u0C47\u0C1F\u0C3E \u0C17\u0C41\u0C30\u0C3F\u0C02\u0C1A\u0C3F \u0C2A\u0C4D\u0C30\u0C36\u0C4D\u0C28 \u0C05\u0C21\u0C17\u0C02\u0C21\u0C3F.":"Ask me about your grid data.",time:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),[a]);(0,de.useEffect)(()=>{x(z=>z.length>0?z:[S])},[S]),(0,de.useEffect)(()=>{B.current?.scrollIntoView({behavior:"smooth"})},[k]);let j=()=>new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),ee=(0,de.useCallback)(async z=>{let Z=z.trim();if(!Z)return;x(_=>[..._,{role:"user",text:Z,time:j()}]),b("");let $="";if(l){h(!0);try{$=(await l.ask(Z)).message}catch{$=d.fallback}finally{h(!1)}}else{let _=Qd(Z,a);if(_.type==="question")$=Rd(_.payload??Z,e,t,a);else if(_.type==="search"){let oe=String(_.payload??Z);n?.(oe),$=d.searchStarted(oe)}else if(_.type==="sort"){let oe=_.payload?.key,W=oe?t.find(ue=>Oe(ue.key)===Oe(oe)||Oe(ue.label)===Oe(oe)):void 0;if(W||(W=bl(Z,t)),W&&o){let ue=_.payload?.dir==="desc"?"desc":"asc";o(String(W.key),ue),$=ue==="asc"?d.sortedAscending(W.label):d.sortedDescending(W.label)}else $=d.noColumn}}$||($=d.fallback),x(_=>[..._,{role:"ai",text:$,time:j()}]),Nd($,a)},[l,t,e,a,n,o,d]);(0,de.useEffect)(()=>{L&&ee(L)},[L,ee]);let H=()=>{ee(C)},ce=a==="te-IN"?["\u0C0E\u0C28\u0C4D\u0C28\u0C3F \u0C35\u0C30\u0C41\u0C38\u0C32\u0C41","\u0C36\u0C4B\u0C27\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F","\u0C15\u0C4D\u0C30\u0C2E\u0C02"]:["how many rows","search","sort"],pe=(0,R.jsxs)("div",{style:{width:s?"100%":360,maxWidth:s?"100%":"calc(100vw - 48px)",height:s?390:480,maxHeight:"70vh",background:Q.bg,border:`1px solid ${Q.border}`,borderRadius:s?12:16,boxShadow:s?"none":"0 20px 40px rgba(0,0,0,0.15)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,R.jsxs)("div",{style:{padding:"12px 14px",background:Q.accent,color:"#FFFFFF",display:"flex",alignItems:"center",gap:10},children:[(0,R.jsx)("div",{style:{width:34,height:34,borderRadius:10,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255,255,255,0.18)",fontSize:17},children:"AI"}),(0,R.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,R.jsx)("div",{style:{fontWeight:700,fontSize:14},children:d.title}),(0,R.jsx)("div",{style:{fontSize:11,opacity:.9},children:d.subtitle})]}),!s&&(0,R.jsx)("button",{type:"button",onClick:()=>I(!1),"aria-label":d.close,title:d.close,style:{width:32,height:32,border:"none",borderRadius:8,background:"rgba(255,255,255,0.12)",color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},children:(0,R.jsx)(Dd,{})})]}),(0,R.jsxs)("div",{style:{padding:"8px 10px",borderBottom:`1px solid ${Q.border}`,display:"flex",alignItems:"center",gap:8,background:Q.surface},children:[(0,R.jsx)("span",{style:{fontSize:11,color:Q.muted},children:d.inputLanguage}),(0,R.jsxs)("select",{value:g,onChange:z=>{let Z=z.target.value;p(Z),c?.(Z)},disabled:M,"aria-label":d.inputLanguage,style:{padding:"5px 8px",borderRadius:7,border:`1px solid ${Q.border}`,background:Q.bg,color:Q.text,fontSize:11},children:[(0,R.jsx)("option",{value:"en-US",children:"English (US)"}),(0,R.jsx)("option",{value:"en-IN",children:"English (India)"}),(0,R.jsx)("option",{value:"as-IN",children:"Assamese"}),(0,R.jsx)("option",{value:"bn-IN",children:"Bengali"}),(0,R.jsx)("option",{value:"brx-IN",children:"Bodo"}),(0,R.jsx)("option",{value:"doi-IN",children:"Dogri"}),(0,R.jsx)("option",{value:"gu-IN",children:"Gujarati"}),(0,R.jsx)("option",{value:"hi-IN",children:"Hindi"}),(0,R.jsx)("option",{value:"kn-IN",children:"Kannada"}),(0,R.jsx)("option",{value:"ks-IN",children:"Kashmiri"}),(0,R.jsx)("option",{value:"kok-IN",children:"Konkani"}),(0,R.jsx)("option",{value:"mai-IN",children:"Maithili"}),(0,R.jsx)("option",{value:"ml-IN",children:"Malayalam"}),(0,R.jsx)("option",{value:"mni-IN",children:"Manipuri"}),(0,R.jsx)("option",{value:"mr-IN",children:"Marathi"}),(0,R.jsx)("option",{value:"ne-IN",children:"Nepali"}),(0,R.jsx)("option",{value:"or-IN",children:"Odia"}),(0,R.jsx)("option",{value:"pa-IN",children:"Punjabi"}),(0,R.jsx)("option",{value:"sa-IN",children:"Sanskrit"}),(0,R.jsx)("option",{value:"sat-IN",children:"Santali"}),(0,R.jsx)("option",{value:"sd-IN",children:"Sindhi"}),(0,R.jsx)("option",{value:"ta-IN",children:"Tamil"}),(0,R.jsx)("option",{value:"te-IN",children:"Telugu"}),(0,R.jsx)("option",{value:"ur-IN",children:"Urdu"})]})]}),(0,R.jsxs)("div",{style:{flex:1,overflowY:"auto",padding:10,display:"flex",flexDirection:"column",gap:8},children:[k.map((z,Z)=>(0,R.jsxs)("div",{style:{alignSelf:z.role==="user"?"flex-end":"flex-start",maxWidth:"88%",padding:"8px 11px",borderRadius:11,background:z.role==="user"?Q.userMsg:Q.aiMsg,color:Q.text,fontSize:13,lineHeight:1.5},children:[(0,R.jsx)("div",{children:z.text}),(0,R.jsx)("div",{style:{marginTop:3,fontSize:10,opacity:.55,textAlign:"right"},children:z.time})]},`${z.time}-${Z}`)),M&&(0,R.jsx)("div",{style:{alignSelf:"flex-end",padding:"8px 11px",borderRadius:11,background:y?"#3F1D2E":"#FEE2E2",color:y?"#FCA5A5":"#991B1B",fontSize:13},children:d.listening}),(m||l?.loading)&&(0,R.jsx)("div",{role:"status","aria-live":"polite",style:{alignSelf:"flex-start",padding:"8px 11px",borderRadius:11,background:Q.aiMsg,color:Q.muted,fontSize:13},children:d.working}),(0,R.jsx)("div",{ref:B})]}),(0,R.jsx)("div",{style:{padding:"7px 10px",borderTop:`1px solid ${Q.border}`,display:"flex",gap:6,overflowX:"auto",flexShrink:0},children:ce.map(z=>(0,R.jsx)("button",{type:"button",onClick:()=>ee(z),style:{padding:"5px 9px",borderRadius:12,border:`1px solid ${Q.border}`,background:Q.surface,color:Q.text,fontSize:10.5,cursor:"pointer",whiteSpace:"nowrap"},children:z},z))}),(0,R.jsxs)("div",{style:{padding:9,display:"flex",gap:6,borderTop:`1px solid ${Q.border}`,background:Q.surface},children:[(0,R.jsxs)("div",{style:{position:"relative",flex:1},children:[(0,R.jsx)(Ld,{}),(0,R.jsx)("input",{type:"text",value:C,onChange:z=>b(z.target.value),onKeyDown:z=>{z.key==="Enter"&&H()},placeholder:d.placeholder,"aria-label":d.ask,style:{width:"100%",boxSizing:"border-box",padding:"9px 10px 9px 34px",borderRadius:8,border:`1px solid ${Q.border}`,background:Q.bg,color:Q.text,fontSize:12,outline:"none"}})]}),q?(0,R.jsx)("button",{type:"button",onClick:M?G:O,"aria-label":M?d.listening:d.speakNow,title:M?d.listening:d.speakNow,style:{width:38,height:38,border:"none",borderRadius:8,background:M?"#EF4444":Q.accent,color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",flexShrink:0},children:(0,R.jsx)(Fd,{})}):null,(0,R.jsx)("button",{type:"button",onClick:H,disabled:!C.trim(),"aria-label":d.send,title:d.send,style:{width:38,height:38,border:"none",borderRadius:8,background:C.trim()?Q.accent:Q.muted,color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",cursor:C.trim()?"pointer":"not-allowed",opacity:C.trim()?1:.6,flexShrink:0},children:(0,R.jsx)(Pd,{})})]})]});return s?(0,R.jsx)("div",{style:{width:"100%",minWidth:0},children:u?pe:(0,R.jsxs)("button",{type:"button",onClick:()=>I(!0),"aria-label":d.open,style:{minHeight:40,padding:"8px 13px",borderRadius:9,border:"1px solid #10B981",background:y?"#064E3B":"#ECFDF5",color:y?"#A7F3D0":"#047857",display:"inline-flex",alignItems:"center",gap:8,cursor:"pointer",fontSize:12,fontWeight:600},children:[(0,R.jsx)("span",{"aria-hidden":"true",children:"AI"}),d.ask]})}):(0,R.jsxs)(R.Fragment,{children:[!u&&(0,R.jsx)("button",{type:"button",onClick:()=>I(!0),"aria-label":d.open,title:d.title,style:{position:"fixed",bottom:24,right:24,zIndex:9998,width:56,height:56,borderRadius:28,background:Q.accent,color:"#FFFFFF",border:"none",cursor:"pointer",boxShadow:"0 8px 20px rgba(16,185,129,0.3)",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700,fontSize:14},children:"AI"}),u&&(0,R.jsx)("div",{style:{position:"fixed",bottom:90,right:24,zIndex:9997},children:pe}),(0,R.jsx)("style",{children:`
1532
+ `,document.body.appendChild(e),Rs=e}function Js(e){return e.getAttribute("aria-label")?.trim()||e.getAttribute("aria-labelledby")||e.getAttribute("title")?.trim()||e.textContent?.trim()?!0:!!e.querySelector("img[alt]:not([alt='']), svg[aria-label], svg title, [aria-label]")}function Ks(e){let t={critical:20,serious:10,moderate:5,minor:2},o=e.details.reduce((n,A)=>n+(t[A.severity]||0),0);return Math.max(0,Math.min(100,100-o))}var ve={name:"yuktai-a11y",version:"4.0.0",observer:null,async execute(e){if(!e.enabled)return this.stopObserver(),"yuktai: disabled.";Gt=e,ig(e),sg(),ag(),eg(),tg(),e.showSkipLinks!==!1&&Zl(),e.showPreferencePanel,rg(e);let t=this.applyFixes(e);t.score=Ks(t),e.showAuditBadge&&ng(t),e.timeoutWarning&&$s(e.timeoutWarning),e.autoFix&&this.startObserver(e),e.plainEnglish&&await Ls(!0),e.summarisePage&&await Ps(!0),e.translateLanguage&&e.translateLanguage!=="en"&&await Ys(e.translateLanguage),e.voiceControl&&await Us(!0),e.smartLabels&&await Hs(!0);let o=`${t.fixed} fixes applied. Score: ${t.score}/100.`;return se(o,t.score>=90?"success":"info",!1),`yuktai v4.0.0: ${o} Scanned ${t.scanned} elements in ${t.renderTime}ms.`},applyFixes(e){let t={fixed:0,scanned:0,renderTime:0,score:100,details:[]};if(typeof document>"u")return t;let o=performance.now(),n=document.querySelectorAll("*");t.scanned=n.length;let A=(i,r,s,a)=>{t.details.push({tag:i,fix:r,severity:s,element:a.outerHTML.slice(0,100)}),t.fixed++};return n.forEach(i=>{let r=i,s=r.tagName.toLowerCase();if(s==="html"&&!r.getAttribute("lang")&&(r.setAttribute("lang","en"),A(s,'lang="en" added',"critical",r)),s==="meta"){let g=r.getAttribute("name"),d=r.getAttribute("content")||"";g==="viewport"&&d.includes("user-scalable=no")&&(r.setAttribute("content",d.replace("user-scalable=no","user-scalable=yes")),A(s,"user-scalable=yes restored","serious",r)),g==="viewport"&&/maximum-scale=1(?:[^0-9]|$)/.test(d)&&(r.setAttribute("content",d.replace(/maximum-scale=1(?=[^0-9]|$)/,"maximum-scale=5")),A(s,"maximum-scale=5 restored","serious",r))}if(s==="main"&&!r.getAttribute("tabindex")&&(r.setAttribute("tabindex","-1"),r.getAttribute("id")||r.setAttribute("id","main-content")),s==="img"&&(r.hasAttribute("alt")||(r.setAttribute("alt",""),r.setAttribute("aria-hidden","true"),A(s,'alt="" aria-hidden="true"',"serious",r))),s==="svg"&&(!r.getAttribute("aria-hidden")&&!r.getAttribute("aria-label")&&!i.querySelector("title")&&(r.setAttribute("aria-hidden","true"),A(s,'aria-hidden="true" (decorative svg)',"minor",r)),r.getAttribute("focusable")||r.setAttribute("focusable","false")),s==="iframe"&&!r.getAttribute("title")&&!r.getAttribute("aria-label")&&(r.setAttribute("title","embedded content"),r.setAttribute("aria-label","embedded content"),A(s,"title + aria-label added","serious",r)),s==="button"){if(!Js(r)){let g=r.getAttribute("title")||"button";r.setAttribute("aria-label",g),A(s,`aria-label="${g}" (empty button)`,"critical",r)}r.hasAttribute("disabled")&&!r.getAttribute("aria-disabled")&&(r.setAttribute("aria-disabled","true"),t.fixed++)}if(s==="a"){let g=r;Js(r)||(r.setAttribute("aria-label",r.getAttribute("title")||"link"),A(s,"aria-label added (empty link)","critical",r)),g.target==="_blank"&&!g.rel?.includes("noopener")&&(g.rel="noopener noreferrer",t.fixed++)}if(Fs.has(s)){let g=r;if(!(!!(g.labels&&g.labels.length)||!!r.getAttribute("title")||g.type==="hidden"||g.type==="submit"||g.type==="button"||g.type==="reset")&&!r.getAttribute("aria-label")&&!r.getAttribute("aria-labelledby")){let u=r.getAttribute("placeholder")||r.getAttribute("name")||s;r.setAttribute("aria-label",u),A(s,`aria-label="${u}"`,"serious",r)}if(r.hasAttribute("required")&&!r.getAttribute("aria-required")&&(r.setAttribute("aria-required","true"),t.fixed++),s==="input"&&!g.autocomplete){let u=g.name||"",I=g.type==="email"||u.includes("email")?"email":g.type==="tel"||u.includes("tel")?"tel":g.type==="password"?"current-password":"";I&&(g.autocomplete=I,t.fixed++)}}s==="th"&&!r.getAttribute("scope")&&(r.setAttribute("scope",r.closest("thead")?"col":"row"),A(s,"scope added to <th>","moderate",r));let a=(s==="header"||s==="footer")&&!!r.parentElement?.closest("article,aside,main,nav,section,[role='dialog'],[role='region']");Cn[s]&&!r.getAttribute("role")&&!a&&(r.setAttribute("role",Cn[s]),A(s,`role="${Cn[s]}"`,"minor",r));let l=r.getAttribute("role")||"";l==="tab"&&!r.getAttribute("aria-selected")&&(r.setAttribute("aria-selected","false"),t.fixed++),["alert","status","log"].includes(l)&&!r.getAttribute("aria-live")&&(r.setAttribute("aria-live",l==="alert"?"assertive":"polite"),A(s,`aria-live added on role=${l}`,"moderate",r)),l==="combobox"&&!r.getAttribute("aria-expanded")&&(r.setAttribute("aria-expanded","false"),A(s,'aria-expanded="false" on combobox',"serious",r)),(l==="checkbox"||l==="radio")&&!r.getAttribute("aria-checked")&&(r.setAttribute("aria-checked","false"),A(s,`aria-checked="false" on role=${l}`,"serious",r))}),t.renderTime=parseFloat((performance.now()-o).toFixed(2)),t},scan(){let e={fixed:0,scanned:0,renderTime:0,score:100,details:[]};if(typeof document>"u")return e;let t=performance.now(),o=document.querySelectorAll("*");e.scanned=o.length;let n=(A,i,r,s)=>e.details.push({tag:A,fix:i,severity:r,element:s.outerHTML.slice(0,100)});return o.forEach(A=>{let i=A,r=i.tagName.toLowerCase();(r==="a"||r==="button")&&!i.innerText?.trim()&&!i.getAttribute("aria-label")&&n(r,"needs aria-label (empty)","critical",i),r==="img"&&!i.hasAttribute("alt")&&n(r,"needs alt text","serious",i),Fs.has(r)&&!i.getAttribute("aria-label")&&!i.getAttribute("aria-labelledby")&&n(r,"needs aria-label","serious",i),r==="iframe"&&!i.getAttribute("title")&&!i.getAttribute("aria-label")&&n(r,"iframe needs title","serious",i)}),e.fixed=e.details.length,e.score=Ks(e),e.renderTime=parseFloat((performance.now()-t).toFixed(2)),e},startObserver(e){this.observer||typeof document>"u"||(this.observer=new MutationObserver(()=>this.applyFixes(e)),this.observer.observe(document.body,{childList:!0,subtree:!0,attributes:!1}))},stopObserver(){this.observer?.disconnect(),this.observer=null},announce:se,speak:fn,showVisualAlert:qs,trapFocus:Mo,handlePlainEnglish:Ls,handleSummarisePage:Ps,handleTranslate:Ys,handleVoiceControl:Us,handleSmartLabels:Hs,SUPPORTED_LANGUAGES:xo};x();x();var W=an(require("react"));x();var Me=require("react");Go();Tt();var Q=require("react/jsx-runtime"),En={highContrast:!1,reduceMotion:!1,autoFix:!0,dyslexiaFont:!1,fontScale:100,localFont:"",darkMode:!1,largeTargets:!1,speechEnabled:!1,colorBlindMode:"none",showAuditBadge:!1,timeoutWarning:void 0,plainEnglish:!1,summarisePage:!1,translateLanguage:"en",voiceControl:!1,smartLabels:!1},Ft=[80,90,100,110,120,130],hg=[{value:"none",label:"None"},{value:"deuteranopia",label:"Deuteranopia"},{value:"protanopia",label:"Protanopia"},{value:"tritanopia",label:"Tritanopia"},{value:"achromatopsia",label:"Greyscale"}],yg=["Prompt API for Gemini Nano","Summarization API for Gemini Nano","Writer API for Gemini Nano","Rewriter API for Gemini Nano","Translation API"];function bg(){let[e,t]=(0,Me.useState)(typeof window<"u"?window.innerWidth:1024);return(0,Me.useEffect)(()=>{let o=()=>t(window.innerWidth);return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),{isMobile:e<=480,isTablet:e>480&&e<=768}}function Bg({checked:e,onChange:t,label:o,disabled:n=!1}){return(0,Q.jsxs)("label",{"aria-label":o,style:{position:"relative",display:"inline-flex",width:"40px",height:"24px",cursor:n?"not-allowed":"pointer",flexShrink:0,opacity:n?.4:1},children:[(0,Q.jsx)("input",{type:"checkbox",checked:e,disabled:n,onChange:A=>t(A.target.checked),style:{opacity:0,width:0,height:0,position:"absolute"}}),(0,Q.jsx)("span",{style:{position:"absolute",inset:0,borderRadius:"99px",background:e?"#0d9488":"#cbd5e1",transition:"background 0.2s"}}),(0,Q.jsx)("span",{style:{position:"absolute",top:"3px",left:e?"19px":"3px",width:"18px",height:"18px",background:"#fff",borderRadius:"50%",transition:"left 0.2s",boxShadow:"0 1px 3px rgba(0,0,0,0.2)",pointerEvents:"none"}})]})}function Lt({label:e,color:t="#64748b",badge:o,concept:n}){return(0,Q.jsxs)("div",{style:{margin:"10px 18px 4px"},children:[(0,Q.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,Q.jsx)("p",{style:{margin:0,fontSize:"10px",fontWeight:600,color:t,letterSpacing:"0.06em",textTransform:"uppercase"},children:e}),o&&(0,Q.jsx)("span",{style:{fontSize:"9px",fontWeight:500,padding:"1px 7px",borderRadius:"99px",background:"#f5f3ff",color:"#7c3aed",border:"0.5px solid #c4b5fd",whiteSpace:"nowrap"},children:o})]}),n&&(0,Q.jsx)("p",{style:{margin:"2px 0 0",fontSize:"9px",color:"#94a3b8",fontStyle:"italic"},children:n})]})}function Ke({icon:e,label:t,desc:o,checked:n,onChange:A,disabled:i=!1,disabledReason:r,tip:s}){return(0,Q.jsxs)("div",{title:i?r:s,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 18px",gap:"12px"},children:[(0,Q.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"10px",flex:1,minWidth:0},children:[(0,Q.jsx)("span",{"aria-hidden":"true",style:{width:"32px",height:"32px",borderRadius:"8px",background:i?"#f1f5f9":"#f0fdfa",color:i?"#94a3b8":"#0d9488",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"15px",flexShrink:0,fontWeight:700},children:e}),(0,Q.jsxs)("div",{style:{minWidth:0},children:[(0,Q.jsx)("p",{style:{margin:0,fontSize:"13px",fontWeight:500,color:i?"#94a3b8":"#0f172a",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),(0,Q.jsx)("p",{style:{margin:0,fontSize:"10px",color:"#94a3b8"},children:i?r:o})]})]}),(0,Q.jsx)(Bg,{checked:n,onChange:A,label:`Toggle ${t}`,disabled:i})]})}function De(){return(0,Q.jsx)("div",{style:{height:"1px",background:"#f1f5f9"}})}function Zt({steps:e}){return(0,Q.jsxs)("div",{style:{margin:"0 18px 8px",padding:"8px 10px",background:"#f8fafc",borderRadius:"8px",border:"0.5px solid #e2e8f0"},children:[(0,Q.jsx)("p",{style:{margin:"0 0 4px",fontSize:"9px",fontWeight:600,color:"#64748b",textTransform:"uppercase",letterSpacing:"0.05em"},children:"How to use"}),e.map((t,o)=>(0,Q.jsxs)("p",{style:{margin:"0 0 2px",fontSize:"10px",color:"#475569"},children:[o+1,". ",t]},o))]})}var wn=(0,Me.forwardRef)(({position:e,settings:t,report:o,isActive:n,aiSupported:A,voiceSupported:i,set:r,onApply:s,onReset:a,onClose:l},g)=>{let{isMobile:d,isTablet:u}=bg(),[I,y]=(0,Me.useState)([]),[f,c]=(0,Me.useState)(""),[p,B]=(0,Me.useState)(""),[h,w]=(0,Me.useState)(!1),[b,S]=(0,Me.useState)(null),[D,T]=(0,Me.useState)("idle");(0,Me.useEffect)(()=>{let k=window;!!(k.LanguageModel||k.ai?.languageModel)&&A?S("gemini"):jt()&&S("transformers")},[A]),(0,Me.useEffect)(()=>{if(b!=="transformers")return;let k=setInterval(()=>{T(Rt())},500);return()=>clearInterval(k)},[b]);let z=async()=>{if(!(!f.trim()||h)){if(!b){B("\u26A0\uFE0F No AI engine available on this device.");return}w(!0),B("");try{let k;b==="gemini"?k=await hn(f):(T("loading"),k=await Qn(f),T("ready")),B(k.success&&k.answer?k.answer.replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/#+\s/g,"").trim():"\u26A0\uFE0F "+(k.error||"No answer found on this page"))}catch{B("\u26A0\uFE0F Failed to get answer. Please try again.")}w(!1)}};(0,Me.useEffect)(()=>{(async()=>{try{let ee=window;if(!ee.queryLocalFonts)return;let te=await ee.queryLocalFonts(),$=[...new Set(te.map(ce=>ce.family))].sort();y($.slice(0,50))}catch{}})()},[]);let Z=b==="gemini"?"Gemini Nano":b==="transformers"?"Transformers.js \xB7 All devices":"Detecting...",R=b==="transformers"&&D==="loading"?"Loading AI model... (first time only)":"...",G=d?{position:"fixed",bottom:0,left:0,right:0,zIndex:9999,background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px 16px 0 0",boxShadow:"0 -8px 32px rgba(0,0,0,0.12)",maxHeight:"90vh",overflowY:"auto",fontFamily:"system-ui,-apple-system,sans-serif",width:"100%"}:{position:"fixed",bottom:"84px",[e]:"24px",zIndex:9999,width:u?"300px":"320px",maxWidth:"calc(100vw - 48px)",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px",boxShadow:"0 8px 32px rgba(0,0,0,0.12)",maxHeight:"80vh",overflowY:"auto",fontFamily:"system-ui,-apple-system,sans-serif"};return(0,Q.jsxs)("div",{ref:g,role:"dialog","aria-modal":"true","aria-label":"yuktai accessibility preferences","data-yuktai-panel":"true",style:G,children:[(0,Q.jsxs)("div",{style:{padding:"14px 18px 12px",borderBottom:"1px solid #f1f5f9",display:"flex",alignItems:"flex-start",justifyContent:"space-between",position:"sticky",top:0,background:"#fff",zIndex:1},children:[(0,Q.jsxs)("div",{children:[(0,Q.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"7px",marginBottom:"4px",flexWrap:"wrap"},children:[(0,Q.jsx)("span",{style:{fontSize:"10px",fontWeight:700,padding:"2px 7px",borderRadius:"99px",background:"#f0fdfa",color:"#0d9488",letterSpacing:"0.05em",fontFamily:"monospace"},children:"@yuktishaalaa/yuktai"}),n&&(0,Q.jsx)("span",{style:{fontSize:"10px",fontWeight:700,padding:"2px 7px",borderRadius:"99px",background:"#f0fdfa",color:"#0f766e",border:"1px solid #99f6e4"},children:"\u25CF ACTIVE"})]}),(0,Q.jsx)("p",{style:{margin:"0 0 1px",fontSize:"15px",fontWeight:600,color:"#0f172a"},children:"Accessibility"}),(0,Q.jsx)("p",{style:{margin:0,fontSize:"11px",color:"#64748b"},children:"WCAG 2.2 \xB7 Open source \xB7 Zero cost \xB7 All devices"})]}),(0,Q.jsx)("button",{onClick:l,"aria-label":"Close accessibility panel",style:{background:"none",border:"none",cursor:"pointer",padding:"4px",color:"#94a3b8",fontSize:"20px",lineHeight:1,borderRadius:"6px",flexShrink:0,minWidth:d?"44px":"auto",minHeight:d?"44px":"auto",display:"flex",alignItems:"center",justifyContent:"center"},children:"\xD7"})]}),(0,Q.jsx)(Lt,{label:"\u267F Core Accessibility",concept:"Rule-based engine \u2014 works on all browsers and devices"}),(0,Q.jsx)(Zt,{steps:["Toggle any feature on","Click Apply settings","Preferences saved automatically"]}),(0,Q.jsx)(Ke,{icon:"\u{1F527}",label:"Auto-fix ARIA",desc:"Injects missing labels and roles automatically",checked:t.autoFix,onChange:k=>r("autoFix",k),tip:"Fixes aria-label, alt text, roles on every element"}),(0,Q.jsx)(De,{}),(0,Q.jsx)(Ke,{icon:"\u{1F50A}",label:"Speak on focus",desc:"Browser reads elements aloud as you tab",checked:t.speechEnabled,onChange:k=>r("speechEnabled",k),tip:"Uses browser SpeechSynthesis \u2014 no install needed"}),(0,Q.jsx)(De,{}),(0,Q.jsx)(Ke,{icon:"\u{1F399}\uFE0F",label:"Voice control",desc:"Say commands to navigate the page",checked:t.voiceControl,onChange:k=>r("voiceControl",k),disabled:!i,disabledReason:"Not supported in this browser",tip:'Say "scroll down", "go to main", "click"'}),(0,Q.jsx)(De,{}),(0,Q.jsx)(Lt,{label:"\u{1F916} AI Features",color:"#7c3aed",badge:"Gemini Nano",concept:"Large Language Model running privately on your device \u2014 Chrome 127+ only"}),(0,Q.jsx)("div",{style:{margin:"4px 18px 6px",padding:"8px 10px",background:A?"#f0fdfa":"#f5f3ff",borderRadius:"8px",border:`0.5px solid ${A?"#99f6e4":"#c4b5fd"}`,fontSize:"10px",color:A?"#0f766e":"#7c3aed",lineHeight:1.5},children:A?"\u2705 Gemini Nano detected \u2014 AI features ready. Runs privately on your device.":"\u2699\uFE0F AI features need one-time setup \u2014 see guide below."}),!A&&(0,Q.jsxs)("div",{style:{margin:"0 18px 8px",padding:"10px 12px",background:"#fafafa",borderRadius:"8px",border:"0.5px solid #e2e8f0",fontSize:"11px",color:"#475569",lineHeight:1.7},children:[(0,Q.jsx)("p",{style:{margin:"0 0 6px",fontWeight:600,color:"#0f172a",fontSize:"11px"},children:"\u{1F6E0} One-time setup \u2014 5 steps:"}),(0,Q.jsxs)("p",{style:{margin:"0 0 3px"},children:["1. Open Chrome \u2192 ",(0,Q.jsx)("code",{style:{background:"#f1f5f9",padding:"1px 5px",borderRadius:"4px",fontSize:"10px",color:"#0d9488",fontFamily:"monospace"},children:"chrome://flags"})]}),(0,Q.jsx)("p",{style:{margin:"0 0 3px"},children:"2. Enable each flag:"}),(0,Q.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"2px",margin:"4px 0 6px 10px"},children:yg.map(k=>(0,Q.jsxs)("span",{style:{fontSize:"10px",color:"#7c3aed",fontFamily:"monospace"},children:["\u2192 ",k]},k))}),(0,Q.jsxs)("p",{style:{margin:"0 0 3px"},children:["3. Click ",(0,Q.jsx)("strong",{style:{color:"#0f172a"},children:"Relaunch"})]}),(0,Q.jsxs)("p",{style:{margin:"0 0 3px"},children:["4. ",(0,Q.jsx)("code",{style:{background:"#f1f5f9",padding:"1px 5px",borderRadius:"4px",fontSize:"10px",color:"#0d9488",fontFamily:"monospace"},children:"chrome://components"})," \u2192 Optimization Guide On Device Model \u2192 Check for update"]}),(0,Q.jsx)("p",{style:{margin:"0"},children:"5. Refresh \u2014 AI features unlock automatically \u2705"})]}),(0,Q.jsx)(Ke,{icon:"\u{1F4DD}",label:"Plain English mode",desc:"Rewrites complex text in simple language",checked:t.plainEnglish,onChange:k=>r("plainEnglish",k),disabled:!A,disabledReason:"Enable Gemini Nano \u2014 see setup above",tip:"AI concept: LLM text rewriting"}),(0,Q.jsx)(De,{}),(0,Q.jsx)(Ke,{icon:"\u{1F4CB}",label:"Summarise page",desc:"3-sentence summary appears at top",checked:t.summarisePage,onChange:k=>r("summarisePage",k),disabled:!A,disabledReason:"Enable Gemini Nano \u2014 see setup above",tip:"AI concept: Abstractive summarisation"}),(0,Q.jsx)(De,{}),(0,Q.jsx)(Ke,{icon:"\u{1F3F7}\uFE0F",label:"Smart aria-labels",desc:"AI generates meaningful labels for elements",checked:t.smartLabels,onChange:k=>r("smartLabels",k),disabled:!A,disabledReason:"Enable Gemini Nano \u2014 see setup above",tip:"AI concept: Context-aware label generation"}),(0,Q.jsx)(De,{}),(0,Q.jsx)(Lt,{label:"\u{1F441}\uFE0F Visual",concept:"CSS filter-based \u2014 works on all browsers and devices"}),(0,Q.jsx)(Zt,{steps:["Toggle any visual mode","Changes apply instantly","Works on mobile and desktop"]}),(0,Q.jsx)(Ke,{icon:"\u25D1",label:"High contrast",desc:"Boosts contrast for low vision users",checked:t.highContrast,onChange:k=>r("highContrast",k),tip:"CSS filter: contrast()"}),(0,Q.jsx)(De,{}),(0,Q.jsx)(Ke,{icon:"\u{1F319}",label:"Dark mode",desc:"Inverts colours \u2014 easy on eyes at night",checked:t.darkMode,onChange:k=>r("darkMode",k),tip:"CSS filter: invert + hue-rotate"}),(0,Q.jsx)(De,{}),(0,Q.jsx)(Ke,{icon:"\u23F8\uFE0F",label:"Reduce motion",desc:"Disables all animations",checked:t.reduceMotion,onChange:k=>r("reduceMotion",k),tip:"WCAG 2.3.3 \u2014 vestibular disorders"}),(0,Q.jsx)(De,{}),(0,Q.jsx)(Ke,{icon:"\u{1F446}",label:"Large targets",desc:"44\xD744px minimum touch targets",checked:t.largeTargets,onChange:k=>r("largeTargets",k),tip:"WCAG 2.5.8 \u2014 motor impaired users"}),(0,Q.jsx)(De,{}),(0,Q.jsxs)("div",{style:{padding:"10px 18px"},children:[(0,Q.jsx)("p",{style:{margin:"0 0 2px",fontSize:"12px",fontWeight:500,color:"#0f172a"},children:"\u{1F3A8} Colour blindness"}),(0,Q.jsx)("p",{style:{margin:"0 0 8px",fontSize:"10px",color:"#94a3b8"},children:"SVG colour matrix filters \u2014 all devices"}),(0,Q.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:hg.map(k=>(0,Q.jsx)("button",{onClick:()=>r("colorBlindMode",k.value),"aria-pressed":t.colorBlindMode===k.value,style:{padding:"4px 10px",borderRadius:"20px",fontSize:"11px",fontWeight:500,border:`1px solid ${t.colorBlindMode===k.value?"#0d9488":"#e2e8f0"}`,background:t.colorBlindMode===k.value?"#f0fdfa":"#fff",color:t.colorBlindMode===k.value?"#0d9488":"#64748b",cursor:"pointer",minHeight:d?"36px":"auto"},children:k.label},k.value))})]}),(0,Q.jsx)(De,{}),(0,Q.jsx)(Lt,{label:"\u{1F524} Font",concept:"Browser Font API + CSS \u2014 Chrome 103+"}),(0,Q.jsx)(Zt,{steps:["Toggle dyslexia font or pick from device","Adjust size with + / \u2212","Saved across visits"]}),(0,Q.jsx)(Ke,{icon:"Aa",label:"Dyslexia-friendly font",desc:"Atkinson Hyperlegible \u2014 research-backed",checked:t.dyslexiaFont,onChange:k=>r("dyslexiaFont",k),tip:"By Braille Institute \u2014 free and open source"}),(0,Q.jsx)(De,{}),(0,Q.jsxs)("div",{style:{padding:"10px 18px"},children:[(0,Q.jsx)("p",{style:{margin:"0 0 2px",fontSize:"12px",fontWeight:500,color:"#0f172a"},children:"\u{1F5A5}\uFE0F Local font"}),(0,Q.jsx)("p",{style:{margin:"0 0 8px",fontSize:"10px",color:"#94a3b8"},children:"window.queryLocalFonts() \u2014 Chrome 103+"}),I.length>0?(0,Q.jsxs)("select",{value:t.localFont,onChange:k=>r("localFont",k.target.value),"aria-label":"Choose a font from your device",style:{width:"100%",padding:"8px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"13px",color:"#0f172a",background:"#fff",cursor:"pointer",height:d?"44px":"36px"},children:[(0,Q.jsx)("option",{value:"",children:"System default"}),I.map(k=>(0,Q.jsx)("option",{value:k,style:{fontFamily:k},children:k},k))]}):(0,Q.jsx)("p",{style:{margin:0,fontSize:"11px",color:"#94a3b8"},children:"Allow font access when Chrome prompts you."})]}),(0,Q.jsx)(De,{}),(0,Q.jsxs)("div",{style:{padding:"10px 18px 14px"},children:[(0,Q.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"10px"},children:[(0,Q.jsxs)("div",{children:[(0,Q.jsx)("p",{style:{margin:0,fontSize:"12px",fontWeight:500,color:"#0f172a"},children:"\u{1F4CF} Text size"}),(0,Q.jsx)("p",{style:{margin:0,fontSize:"10px",color:"#94a3b8"},children:"Scales all text on the page"})]}),(0,Q.jsxs)("span",{style:{fontSize:"12px",fontWeight:600,color:"#0d9488",background:"#f0fdfa",padding:"2px 8px",borderRadius:"99px"},children:[t.fontScale,"%"]})]}),(0,Q.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,Q.jsx)("button",{onClick:()=>{let k=Ft.indexOf(t.fontScale);k>0&&r("fontScale",Ft[k-1])},disabled:t.fontScale<=80,"aria-label":"Decrease text size",style:{width:d?"44px":"30px",height:d?"44px":"30px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#fff",cursor:t.fontScale<=80?"not-allowed":"pointer",fontSize:"16px",color:t.fontScale<=80?"#cbd5e1":"#0f172a",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:"\u2212"}),(0,Q.jsx)("div",{style:{flex:1,display:"flex",gap:"3px"},children:Ft.map(k=>(0,Q.jsx)("button",{onClick:()=>r("fontScale",k),"aria-label":`Set text size to ${k}%`,style:{flex:1,height:"6px",borderRadius:"99px",border:"none",cursor:"pointer",padding:0,background:k<=t.fontScale?"#0d9488":"#e2e8f0",transition:"background 0.15s"}},k))}),(0,Q.jsx)("button",{onClick:()=>{let k=Ft.indexOf(t.fontScale);k<Ft.length-1&&r("fontScale",Ft[k+1])},disabled:t.fontScale>=130,"aria-label":"Increase text size",style:{width:d?"44px":"30px",height:d?"44px":"30px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#fff",cursor:t.fontScale>=130?"not-allowed":"pointer",fontSize:"16px",color:t.fontScale>=130?"#cbd5e1":"#0f172a",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:"+"})]})]}),(0,Q.jsx)(De,{}),(0,Q.jsx)(Lt,{label:"\u{1F310} Translate",color:"#7c3aed",badge:"Gemini Nano",concept:"Chrome Translation API \u2014 on device, no internet after setup"}),(0,Q.jsx)(Zt,{steps:["Enable Gemini Nano first","Pick your language","Full page translates instantly"]}),(0,Q.jsxs)("div",{style:{padding:"6px 18px 12px"},children:[(0,Q.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:xo.slice(0,d?8:18).map(k=>(0,Q.jsx)("button",{onClick:()=>r("translateLanguage",k.code),"aria-pressed":t.translateLanguage===k.code,disabled:!A,style:{padding:"4px 10px",borderRadius:"20px",fontSize:"11px",fontWeight:500,border:`1px solid ${t.translateLanguage===k.code?"#7c3aed":"#e2e8f0"}`,background:t.translateLanguage===k.code?"#f5f3ff":"#fff",color:t.translateLanguage===k.code?"#7c3aed":"#64748b",cursor:A?"pointer":"not-allowed",opacity:A?1:.5,minHeight:d?"36px":"auto"},children:k.label},k.code))}),!A&&(0,Q.jsx)("p",{style:{margin:"6px 0 0",fontSize:"10px",color:"#94a3b8"},children:"Enable Gemini Nano using the setup guide above."})]}),(0,Q.jsx)(De,{}),(0,Q.jsx)(Lt,{label:"\u{1F4AC} Ask This Page",color:"#0d9488",badge:Z,concept:"RAG \u2014 Retrieval Augmented Generation. Works on all devices including mobile."}),(0,Q.jsx)(Zt,{steps:["Type any question about this page","Press Ask or hit Enter",b==="transformers"?"Transformers.js answers \u2014 works on mobile, offline":"Gemini Nano reads page and answers privately","Zero cost. No data leaves your device."]}),(0,Q.jsxs)("div",{style:{margin:"0 18px 8px",padding:"6px 10px",background:b==="gemini"?"#f0fdfa":b==="transformers"?"#f5f3ff":"#f8fafc",borderRadius:"8px",border:`0.5px solid ${b==="gemini"?"#99f6e4":b==="transformers"?"#c4b5fd":"#e2e8f0"}`,fontSize:"10px",color:b==="gemini"?"#0f766e":b==="transformers"?"#7c3aed":"#94a3b8"},children:[b==="gemini"&&"\u2705 Using Gemini Nano \u2014 on device, private, instant",b==="transformers"&&"\u2705 Using Transformers.js \u2014 works on mobile and all browsers",!b&&"\u23F3 Detecting AI engine...",b==="transformers"&&D==="loading"&&" \xB7 Loading model...",b==="transformers"&&D==="ready"&&" \xB7 Model ready \u2705"]}),(0,Q.jsxs)("div",{style:{padding:"0 18px 14px"},children:[(0,Q.jsxs)("div",{style:{display:"flex",gap:"6px",marginBottom:"8px"},children:[(0,Q.jsx)("input",{type:"text",value:f,onChange:k=>c(k.target.value),onKeyDown:k=>{k.key==="Enter"&&z()},placeholder:"e.g. What does this page do?",disabled:h||!b,"aria-label":"Ask a question about this page",style:{flex:1,padding:"8px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"12px",color:"#0f172a",background:b?"#fff":"#f8fafc",outline:"none",height:d?"44px":"36px"}}),(0,Q.jsx)("button",{onClick:z,disabled:h||!f.trim()||!b,"aria-label":"Ask question",style:{padding:"8px 14px",borderRadius:"8px",border:"none",background:b&&f.trim()&&!h?"#0d9488":"#e2e8f0",color:b&&f.trim()&&!h?"#fff":"#94a3b8",fontSize:"12px",fontWeight:600,cursor:b&&f.trim()&&!h?"pointer":"not-allowed",flexShrink:0,height:d?"44px":"36px",minWidth:"52px",transition:"background 0.2s"},children:h?R:"Ask"})]}),p&&(0,Q.jsxs)("div",{role:"status","aria-live":"polite",style:{padding:"10px 12px",background:"#f0fdfa",border:"1px solid #99f6e4",borderRadius:"8px",fontSize:"12px",color:"#0f766e",lineHeight:1.6,maxHeight:"180px",overflowY:"auto"},children:[(0,Q.jsx)("strong",{style:{display:"block",marginBottom:"4px",fontSize:"11px",color:"#0d9488"},children:"\u{1F4AC} Answer"}),p,(0,Q.jsx)("button",{onClick:()=>{B(""),c("")},style:{display:"block",marginTop:"6px",background:"none",border:"none",color:"#94a3b8",fontSize:"10px",cursor:"pointer",padding:0},children:"Clear"})]})]}),o&&(0,Q.jsx)("div",{role:"status",style:{margin:"0 14px 10px",padding:"8px 12px",background:"#f0fdfa",border:"1px solid #99f6e4",borderRadius:"8px",fontSize:"12px",color:"#0f766e",fontWeight:500,fontFamily:"monospace"},children:o.fixed>0?`\u2713 ${o.fixed} fixes \xB7 ${o.scanned} nodes \xB7 ${o.renderTime}ms \xB7 Score: ${o.score}/100`:`\u2713 0 auto-fixes needed \xB7 ${o.scanned} nodes \xB7 ${o.renderTime}ms`}),(0,Q.jsxs)("div",{style:{display:"flex",gap:"8px",padding:"12px 14px 14px",position:d?"sticky":"relative",bottom:d?0:"auto",background:"#fff",borderTop:"1px solid #f1f5f9"},children:[(0,Q.jsx)("button",{onClick:a,style:{flex:1,padding:d?"12px 0":"8px 0",fontSize:"13px",fontWeight:500,borderRadius:"9px",border:"1px solid #e2e8f0",background:"#fff",color:"#64748b",cursor:"pointer"},children:"Reset"}),(0,Q.jsx)("button",{onClick:s,style:{flex:2,padding:d?"12px 0":"8px 0",fontSize:"13px",fontWeight:600,borderRadius:"9px",border:"none",background:"#0d9488",color:"#fff",cursor:"pointer"},children:"Apply settings"})]})]})});wn.displayName="WidgetPanel";Tt();x();var tt=require("react");x();var Qg={hotel:["hotel","resort","motel","inn","accommodation","lodge","stay","room","booking","hospitality"],ecommerce:["shop","store","ecommerce","e-commerce","sell","product","cart","buy","marketplace","retail"],restaurant:["restaurant","food","cafe","cafeteria","menu","dining","eat","cuisine","bistro","takeaway","delivery"],portfolio:["portfolio","freelance","personal","designer","developer","creative","showcase","work","hire me"],blog:["blog","article","post","write","news","magazine","journal","content"],saas:["saas","dashboard","app","software","platform","tool","analytics","admin","manage","crm"],government:["government","govt","portal","citizen","scheme","welfare","municipal","public","official"],healthcare:["hospital","clinic","doctor","health","medical","patient","appointment","pharmacy"],education:["school","college","university","course","learn","education","student","lms","training"],realestate:["real estate","property","house","flat","apartment","rent","buy property","listing"],landing:["landing","startup","launch","product launch","coming soon","waitlist"],generic:[]},Eg={hotel:["home","rooms","booking","about","contact"],ecommerce:["home","products","cart","checkout","about","contact"],restaurant:["home","menu","reservations","about","contact"],portfolio:["home","portfolio","about","contact"],blog:["home","blog","about","contact"],saas:["home","pricing","dashboard","auth","about","contact"],government:["home","services","about","contact","faq"],healthcare:["home","services","booking","team","about","contact"],education:["home","services","pricing","about","contact"],realestate:["home","products","about","contact"],landing:["home","pricing","about","contact"],generic:["home","about","services","contact"]},wg={home:["home","homepage","main","landing"],about:["about","who we are","our story","company"],contact:["contact","reach us","get in touch","location"],services:["service","what we offer","solution","offering"],pricing:["pricing","price","plan","subscription","cost","fee"],blog:["blog","article","news","post"],auth:["login","register","signup","sign up","sign in","auth","account"],dashboard:["dashboard","admin","panel","manage","analytics"],gallery:["gallery","photo","image","portfolio"],products:["product","shop","store","item","catalogue"],cart:["cart","basket","shopping cart"],checkout:["checkout","payment","pay","order"],rooms:["room","suite","accommodation","stay"],booking:["booking","reserve","reservation","schedule","appointment"],menu:["menu","food","dish","cuisine"],reservations:["reservation","table booking","book table"],portfolio:["portfolio","work","project","case study"],team:["team","staff","member","people","who we are"],faq:["faq","question","answer","help","support"],terms:["terms","condition","legal"],privacy:["privacy","policy","gdpr","data"]},xg={Authentication:["login","register","auth","signup","sign in","account"],Payment:["payment","stripe","pay","checkout","billing"],Search:["search","filter","find"],"Dark mode":["dark mode","dark theme","night mode"],"Multi-language":["multilingual","multi language","translation","i18n"],SEO:["seo","search engine","meta","google"],Analytics:["analytics","tracking","stats","dashboard"],Email:["email","newsletter","contact form","notification"],Map:["map","location","address","google maps"],"Social media":["social","instagram","facebook","twitter","share"],"Image gallery":["gallery","photo","image","carousel"],"Booking system":["booking","reservation","appointment","schedule"],"Shopping cart":["cart","basket","shop","ecommerce"],"Blog/CMS":["blog","cms","content","article","post"]},kg={blue:["blue","navy","sky","ocean","corporate"],green:["green","nature","eco","environment","health","fresh"],purple:["purple","violet","luxury","creative","royal"],red:["red","bold","energy","passion","food"],orange:["orange","warm","friendly","fun"],teal:["teal","turquoise","modern","tech"],indigo:["indigo","professional","trust","finance","bank"],gray:["gray","minimal","clean","simple","neutral"]},Sg={hotel:"indigo",ecommerce:"blue",restaurant:"red",portfolio:"purple",blog:"gray",saas:"teal",government:"blue",healthcare:"green",education:"indigo",realestate:"orange",landing:"purple",generic:"blue"};function vg(e){let t=[/(?:for|called|named|company|business|brand)\s+["']?([A-Z][a-zA-Z\s]{1,30})["']?/i,/["']([A-Z][a-zA-Z\s]{1,30})["']/,/^([A-Z][a-zA-Z]+(?:\s[A-Z][a-zA-Z]+)?)/m];for(let o of t){let n=e.match(o);if(n?.[1]){let A=n[1].trim();if(A.length>2&&A.length<40)return A}}return"My Business"}function Dg(e){let t=e.toLowerCase(),o="generic",n=0;for(let[A,i]of Object.entries(Qg)){let r=0;for(let s of i)t.includes(s)&&r++;r>n&&(n=r,o=A)}return o}function Mg(e,t){let o=e.toLowerCase(),n=new Set(Eg[t]);for(let[A,i]of Object.entries(wg))for(let r of i)if(o.includes(r)){n.add(A);break}return n.add("home"),n.add("contact"),Array.from(n)}function Gg(e){let t=e.toLowerCase(),o=[];for(let[n,A]of Object.entries(xg))for(let i of A)if(t.includes(i)){o.push(n);break}return o}function Ng(e,t){let o=e.toLowerCase();for(let[n,A]of Object.entries(kg))for(let i of A)if(o.includes(i))return n;return Sg[t]}function _s(e){let t=Dg(e),o=Mg(e,t),n=Gg(e),A=Ng(e,t);return{siteName:vg(e),websiteType:t,pages:o,features:n,theme:A,description:e.slice(0,200)}}var L=require("react/jsx-runtime"),Lg=["Hotel booking website for Grand Palace Hotels with rooms, booking and payment","E-commerce store for organic food products with cart and checkout","Restaurant website for Spice Garden with menu and table reservations","Portfolio website for a freelance designer with gallery and contact","SaaS dashboard for project management with pricing and auth","Government portal for citizen services with FAQ and contact"],Pg={home:"\u{1F3E0}",about:"\u2139\uFE0F",contact:"\u{1F4EC}",services:"\u2699\uFE0F",pricing:"\u{1F4B0}",blog:"\u{1F4DD}",auth:"\u{1F510}",dashboard:"\u{1F4CA}",gallery:"\u{1F5BC}\uFE0F",products:"\u{1F6D2}",cart:"\u{1F6CD}\uFE0F",checkout:"\u{1F4B3}",rooms:"\u{1F6CF}\uFE0F",booking:"\u{1F4C5}",menu:"\u{1F37D}\uFE0F",reservations:"\u{1FA91}",portfolio:"\u{1F4BC}",team:"\u{1F465}",faq:"\u2753",terms:"\u{1F4C4}",privacy:"\u{1F512}"},Yg={hotel:"\u{1F3E8}",ecommerce:"\u{1F6D2}",restaurant:"\u{1F37D}\uFE0F",portfolio:"\u{1F4BC}",blog:"\u{1F4DD}",saas:"\u26A1",government:"\u{1F3DB}\uFE0F",healthcare:"\u{1F3E5}",education:"\u{1F393}",realestate:"\u{1F3E0}",landing:"\u{1F680}",generic:"\u{1F310}"};function kn({position:e,onClose:t}){let[o,n]=(0,tt.useState)("input"),[A,i]=(0,tt.useState)(""),[r,s]=(0,tt.useState)(null),[a,l]=(0,tt.useState)(0),[g,d]=(0,tt.useState)(""),u=(0,tt.useCallback)(()=>{if(!A.trim())return;let c=_s(A);s(c),n("preview")},[A]),I=(0,tt.useCallback)(async()=>{if(r){n("generating"),l(0),d("");try{let c=[{msg:"Parsing requirement...",pct:15},{msg:"Loading templates...",pct:30},{msg:"Generating pages...",pct:55},{msg:"Building components...",pct:70},{msg:"Creating styles...",pct:85},{msg:"Packaging ZIP...",pct:95}];for(let B of c)l(B.pct),await new Promise(h=>setTimeout(h,200));let{generateZip:p}=await Promise.resolve().then(()=>(Ea(),Qa));await p(r),l(100),n("done")}catch(c){d(c instanceof Error?c.message:"Generation failed. Please try again."),n("preview")}}},[r]),y=()=>{n("input"),i(""),s(null),l(0),d("")},f={position:"fixed",bottom:"204px",[e]:"24px",zIndex:9999,width:"340px",maxWidth:"calc(100vw - 48px)",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px",boxShadow:"0 8px 32px rgba(0,0,0,0.14)",fontFamily:"system-ui,-apple-system,sans-serif",maxHeight:"75vh",overflowY:"auto"};return(0,L.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"yuktai Vibe Coder","data-yuktai-panel":"true",style:f,children:[(0,L.jsxs)("div",{style:{padding:"14px 16px 12px",borderBottom:"1px solid #f1f5f9",display:"flex",alignItems:"flex-start",justifyContent:"space-between",position:"sticky",top:0,background:"#fff",zIndex:1},children:[(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{style:{margin:"0 0 2px",fontSize:"13px",fontWeight:700,color:"#0f172a"},children:"\u26A1 Vibe Coder"}),(0,L.jsx)("p",{style:{margin:0,fontSize:"10px",color:"#64748b"},children:"Describe your website \u2192 Download Next.js ZIP"})]}),(0,L.jsx)("button",{onClick:t,"aria-label":"Close vibe coder",style:{background:"none",border:"none",cursor:"pointer",color:"#94a3b8",fontSize:"18px",padding:"2px"},children:"\xD7"})]}),o==="input"&&(0,L.jsxs)("div",{style:{padding:"14px 16px"},children:[(0,L.jsx)("p",{style:{margin:"0 0 10px",fontSize:"11px",color:"#64748b"},children:"Describe your business website in plain English. The plugin will generate a complete Next.js project for you."}),(0,L.jsx)("p",{style:{margin:"0 0 6px",fontSize:"10px",fontWeight:600,color:"#94a3b8",textTransform:"uppercase"},children:"Examples"}),(0,L.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"4px",marginBottom:"12px"},children:Lg.slice(0,3).map(c=>(0,L.jsx)("button",{onClick:()=>i(c),style:{padding:"6px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#f8fafc",color:"#475569",fontSize:"10px",cursor:"pointer",textAlign:"left",lineHeight:1.4},children:c},c))}),(0,L.jsx)("textarea",{value:A,onChange:c=>i(c.target.value),placeholder:"e.g. I need a hotel booking website with rooms, search, and payment for Grand Palace Hotels",rows:4,"aria-label":"Describe your website",style:{width:"100%",padding:"10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"12px",color:"#0f172a",resize:"vertical",outline:"none",fontFamily:"inherit",lineHeight:1.5}}),(0,L.jsx)("button",{onClick:u,disabled:!A.trim(),style:{width:"100%",marginTop:"10px",padding:"10px",borderRadius:"8px",border:"none",background:A.trim()?"#f59e0b":"#e2e8f0",color:A.trim()?"#fff":"#94a3b8",fontSize:"13px",fontWeight:700,cursor:A.trim()?"pointer":"not-allowed",transition:"background 0.2s"},children:"Analyse Requirement \u2192"})]}),o==="preview"&&r&&(0,L.jsxs)("div",{style:{padding:"14px 16px"},children:[g&&(0,L.jsxs)("div",{style:{padding:"10px",background:"#fef2f2",border:"1px solid #fca5a5",borderRadius:"8px",marginBottom:"12px",fontSize:"11px",color:"#dc2626"},children:["\u26A0\uFE0F ",g]}),(0,L.jsxs)("div",{style:{background:"#f8fafc",borderRadius:"10px",padding:"12px",marginBottom:"12px"},children:[(0,L.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},children:[(0,L.jsx)("span",{style:{fontSize:"1.5rem"},children:Yg[r.websiteType]||"\u{1F310}"}),(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{style:{margin:0,fontSize:"13px",fontWeight:700,color:"#0f172a"},children:r.siteName}),(0,L.jsxs)("p",{style:{margin:0,fontSize:"10px",color:"#64748b",textTransform:"capitalize"},children:[r.websiteType," website \xB7 ",r.theme," theme"]})]})]}),(0,L.jsxs)("p",{style:{margin:"8px 0 6px",fontSize:"10px",fontWeight:600,color:"#94a3b8",textTransform:"uppercase"},children:["Pages to generate (",r.pages.length,")"]}),(0,L.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px"},children:r.pages.map(c=>(0,L.jsxs)("span",{style:{padding:"2px 8px",borderRadius:"99px",background:"#f0fdf4",border:"1px solid #86efac",fontSize:"10px",color:"#166534",fontWeight:500},children:[Pg[c]||"\u{1F4C4}"," ",c]},c))}),r.features.length>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("p",{style:{margin:"10px 0 6px",fontSize:"10px",fontWeight:600,color:"#94a3b8",textTransform:"uppercase"},children:"Detected features"}),(0,L.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px"},children:r.features.map(c=>(0,L.jsx)("span",{style:{padding:"2px 8px",borderRadius:"99px",background:"#f5f3ff",border:"1px solid #c4b5fd",fontSize:"10px",color:"#7c3aed",fontWeight:500},children:c},c))})]})]}),(0,L.jsxs)("div",{style:{margin:"0 0 12px",padding:"10px 12px",background:"#f0fdf4",borderRadius:"8px",border:"1px solid #86efac"},children:[(0,L.jsx)("p",{style:{margin:"0 0 4px",fontSize:"10px",fontWeight:700,color:"#166534"},children:"\u{1F4E6} What you get:"}),(0,L.jsxs)("p",{style:{margin:0,fontSize:"10px",color:"#166534",lineHeight:1.6},children:["\u2705 Complete Next.js 16 project",(0,L.jsx)("br",{}),"\u2705 Tailwind CSS + CSS Modules",(0,L.jsx)("br",{}),"\u2705 TypeScript configured",(0,L.jsx)("br",{}),"\u2705 Navbar + Footer components",(0,L.jsx)("br",{}),"\u2705 All ",r.pages.length," pages ready",(0,L.jsx)("br",{}),"\u2705 Mobile responsive",(0,L.jsx)("br",{}),"\u2705 npm run dev \u2192 works immediately"]})]}),(0,L.jsxs)("div",{style:{display:"flex",gap:"8px"},children:[(0,L.jsx)("button",{onClick:y,style:{flex:1,padding:"9px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#fff",color:"#64748b",fontSize:"12px",fontWeight:600,cursor:"pointer"},children:"\u2190 Edit"}),(0,L.jsx)("button",{onClick:I,style:{flex:2,padding:"9px",borderRadius:"8px",border:"none",background:"#f59e0b",color:"#fff",fontSize:"13px",fontWeight:700,cursor:"pointer"},children:"\u2B07\uFE0F Generate & Download ZIP"})]})]}),o==="generating"&&(0,L.jsxs)("div",{style:{padding:"2rem 16px",textAlign:"center"},children:[(0,L.jsx)("p",{style:{fontSize:"2rem",marginBottom:"1rem"},children:"\u26A1"}),(0,L.jsx)("p",{style:{fontSize:"13px",fontWeight:700,color:"#0f172a",marginBottom:"0.5rem"},children:"Generating your project..."}),(0,L.jsx)("p",{style:{fontSize:"11px",color:"#64748b",marginBottom:"1.5rem"},children:a<30?"Parsing requirement...":a<55?"Loading templates...":a<70?"Generating pages...":a<85?"Building components...":a<95?"Creating styles...":"Packaging ZIP..."}),(0,L.jsx)("div",{style:{height:"8px",background:"#e2e8f0",borderRadius:"99px",overflow:"hidden"},children:(0,L.jsx)("div",{style:{height:"100%",width:`${a}%`,background:"#f59e0b",borderRadius:"99px",transition:"width 0.3s ease"}})}),(0,L.jsxs)("p",{style:{marginTop:"0.5rem",fontSize:"10px",color:"#94a3b8"},children:[a,"%"]})]}),o==="done"&&r&&(0,L.jsxs)("div",{style:{padding:"2rem 16px",textAlign:"center"},children:[(0,L.jsx)("p",{style:{fontSize:"3rem",marginBottom:"0.75rem"},children:"\u2705"}),(0,L.jsxs)("p",{style:{fontSize:"14px",fontWeight:700,color:"#0f172a",marginBottom:"0.5rem"},children:[r.siteName," downloaded!"]}),(0,L.jsx)("p",{style:{fontSize:"11px",color:"#64748b",marginBottom:"1.5rem",lineHeight:1.6},children:"Your ZIP is downloading. Unzip it and run:"}),["npm install","npm run dev"].map(c=>(0,L.jsx)("div",{style:{background:"#0f172a",borderRadius:"8px",padding:"8px 12px",marginBottom:"6px",textAlign:"left"},children:(0,L.jsxs)("code",{style:{fontSize:"12px",color:"#a7f3d0",fontFamily:"monospace"},children:["$ ",c]})},c)),(0,L.jsx)("p",{style:{fontSize:"11px",color:"#10b981",margin:"1rem 0",fontWeight:600},children:"Then open http://localhost:3000 \u{1F680}"}),(0,L.jsxs)("div",{style:{display:"flex",gap:"8px"},children:[(0,L.jsx)("button",{onClick:y,style:{flex:1,padding:"9px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#fff",color:"#64748b",fontSize:"12px",fontWeight:600,cursor:"pointer"},children:"New Project"}),(0,L.jsx)("button",{onClick:I,style:{flex:1,padding:"9px",borderRadius:"8px",border:"none",background:"#f59e0b",color:"#fff",fontSize:"12px",fontWeight:700,cursor:"pointer"},children:"\u2B07\uFE0F Download Again"})]})]})]})}x();x();var Ug="[data-yuktai-panel]";function qe(){return typeof window<"u"&&typeof document<"u"}function Qt(e){return typeof e=="object"&&e!==null&&e.nodeType===9}function Le(e){return e||(qe()?document:null)}function j(e,t,o={}){return Array.from(e.querySelectorAll(t)).filter(n=>!n.closest(Ug)&&(o.includeHidden||Hg(n)))}function Hg(e){if(!qe()||e.closest("[hidden],[aria-hidden='true']"))return!1;let t=e;for(;t;){let o=window.getComputedStyle(t);if(o.display==="none"||o.visibility==="hidden")return!1;t=t.parentElement}return!0}function me(e){return(e??"").replace(/\s+/g," ").trim()}function Be(e,t=60){let o=me(e);return o.length>t?`${o.slice(0,t-1)}\u2026`:o}function Oe(e){let t=[],o=e;for(;o&&o.nodeType===1&&t.length<4;){let n=o.tagName.toLowerCase();if(o.id&&/^[A-Za-z][\w-]*$/.test(o.id)){t.unshift(`${n}#${o.id}`);break}let A=o.parentElement;if(!A){t.unshift(n);break}let i=Array.from(A.children).filter(r=>r.tagName===o.tagName);t.unshift(i.length>1?`${n}:nth-of-type(${i.indexOf(o)+1})`:n),o=A}return t.join(" > ")}function Jg(e,t){return e.split(/\s+/).map(o=>me(t.getElementById(o)?.textContent)).filter(Boolean).join(" ")}function Ye(e){let t=e.ownerDocument,o=e.getAttribute("aria-labelledby");if(o){let i=Jg(o,t);if(i)return i}let n=me(e.getAttribute("aria-label"));if(n)return n;let A=e.tagName.toLowerCase();if(A==="input"||A==="select"||A==="textarea"){let i=e.getAttribute("id");if(i){let a=t.querySelector(`label[for="${Kg(i)}"]`),l=me(a?.textContent);if(l)return l}let r=e.closest("label");if(r){let a=me(r.textContent);if(a)return a}let s=(e.getAttribute("type")??"").toLowerCase();if(s==="submit"||s==="button"||s==="reset")return me(e.getAttribute("value"))||(s==="submit"?"Submit":"");if(s==="image")return me(e.getAttribute("alt"))}if(A==="img")return me(e.getAttribute("alt"));if(A==="button"||A==="a"||e.getAttribute("role")){let i=me(e.textContent);if(i)return i;let r=Array.from(e.querySelectorAll("img[alt], svg[aria-label]")).map(s=>me(s.getAttribute("alt")??s.getAttribute("aria-label"))).filter(Boolean).join(" ");if(r)return r}return me(e.getAttribute("title"))}function Kg(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/["\\]/g,"\\$&")}function at(e){if(!e)return null;let t=e.trim().toLowerCase();if(t==="transparent")return{r:0,g:0,b:0,a:0};let o=t.match(/^rgba?\(([^)]+)\)$/);if(o){let A=o[1].split(/[\s,/]+/).filter(Boolean),[i,r,s]=A.slice(0,3).map(Number),a=A[3],l=a===void 0?1:a.endsWith("%")?Number(a.slice(0,-1))/100:Number(a);return[i,r,s,l].some(g=>!Number.isFinite(g))?null:{r:i,g:r,b:s,a:l}}let n=t.match(/^#([0-9a-f]{3,8})$/);if(n){let A=n[1];return(A.length===3||A.length===4)&&(A=A.split("").map(i=>i+i).join("")),A.length!==6&&A.length!==8?null:{r:parseInt(A.slice(0,2),16),g:parseInt(A.slice(2,4),16),b:parseInt(A.slice(4,6),16),a:A.length===8?parseInt(A.slice(6,8),16)/255:1}}return null}function Sn(e,t){let o=e.a+t.a*(1-e.a);if(o===0)return{r:0,g:0,b:0,a:0};let n=(A,i)=>(A*e.a+i*t.a*(1-e.a))/o;return{r:n(e.r,t.r),g:n(e.g,t.g),b:n(e.b,t.b),a:o}}function Ro(e){let t=o=>{let n=o/255;return n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)};return .2126*t(e.r)+.7152*t(e.g)+.0722*t(e.b)}function Pt(e,t){let o=t.a<1?Sn(t,{r:255,g:255,b:255,a:1}):t,n=e.a<1?Sn(e,o):e,A=Ro(n),i=Ro(o),[r,s]=A>i?[A,i]:[i,A];return Math.round((r+.05)/(s+.05)*100)/100}function wa(e){let t=[],o=e;for(;o;){let A=window.getComputedStyle(o);if(A.backgroundImage&&A.backgroundImage!=="none")return null;let i=at(A.backgroundColor);if(i&&i.a>0&&(t.push(i),i.a>=1))break;o=o.parentElement}let n={r:255,g:255,b:255,a:1};for(let A=t.length-1;A>=0;A--)n=Sn(t[A],n);return n}function xa(e){let t=window.getComputedStyle(e),o=parseFloat(t.fontSize)||16,n=parseInt(t.fontWeight,10)||400;return o>=24||o>=18.66&&n>=700}function eo(e){return Array.from(e.childNodes).some(t=>t.nodeType===3&&me(t.textContent).length>0)}var ka="a[href],button,input:not([type='hidden']),select,textarea,summary,[tabindex]:not([tabindex='-1']),[contenteditable='true']",To="a[href],button,input:not([type='hidden']),select,textarea,summary,[role='button'],[role='link'],[role='checkbox'],[role='tab'],[role='menuitem']";x();x();var Sa=["AGFzbQEAAAABggESYAN/f38Bf2ACf38Bf2ACf38AYAN/f38AYAN/fH8AYAN/f3wAYAV/f39/fwBgBX9/f39/AX9gBH9/f38AYAR/","f39/AX9gAX8AYAp/f39/f3x/f39/AX9gAABgAX8Bf2AIf39/f3x/f38Bf2AAAX9gBn9/f39/fwBgBn9/f39/fwF/A2xrAgMEBQMD","AwMGAwAGAwYHBwcDAwgICAgDAwMDAwMDAwMIAwMDCQkJCQkJCQkJCQkJAQEAAwkHCgELCAIDCggKAwMADA0ODwIMAgMGEAIDAgYK","AwYCAgwKCgMBCAEDEQgJAAEICAMDAwwJAwAEBQFwAQICBQMBABEGCQF/AUGAgMAACwdaBgZtZW1vcnkCAAx5a19yYWdfYnVpbGQA","QQx5a19yYWdfcmVzZXQAQg55a19yYWdfc2NyYXRjaABDDXlrX3JhZ19zZWFyY2gARA55a19yYWdfdmVyc2lvbgBFCQcBAEEBCwFh","CqTuAWuOAgEGfwJAAkACQCAAKAIIIgJFDQAgASgCACIDKAIIIQRBACEFIAAoAgQiBiEBA0AgASgCACIHIARPDQICQCADKAIEIAdB","A3RqKwMARAAAAAAAAAAAZA0AAkAgBUEBaiACTw0AIAFBBGohASAFQX9zIAJqIQIDQCABKAIAIgcgAygCCCIETw0GAkAgAygCBCAH","QQN0aisDAEQAAAAAAAAAAGRFDQAgBiAFQQJ0aiAHNgIAIAVBAWohBQsgAUEEaiEBIAJBf2oiAg0ACwsgACAFNgIIDwsgAUEEaiEB","IAIgBUEBaiIFRw0ACwsPCyAHIARB8IbAgAAQ3ICAgAAACyAHIARB8IbAgAAQ3ICAgAAAC4gBAQJ/AkBBACACIAFrIgMgAyACSxsi","BCAAKAIAIAAoAggiA2tNDQAgACADIARBBEEEEMqAgIAAIAAoAgghAwsCQCABIAJPDQAgAyACaiABayEEIAAoAgQgA0ECdGohAwNA","IAMgATYCACADQQRqIQMgAiABQQFqIgFHDQALIAQhAwsgACADNgIIC/ABAQN/I4CAgIAAQSBrIgMkgICAgAACQAJAAkACQCABvVAN","ACADQRRqIAJBAEEIQQgQz4CAgAAgAygCGCEEIAMoAhRBAUYNAiADQQA2AhAgAyADKAIcNgIMIAMgBDYCCCADQQhqIAIgARCDgICA","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","IAIgAiAFaiACIAZqIAMgBBCPgICAACECCwJAIAQgACABEIqAgIAAIgMgBCAAIAIQioCAgABHDQAgAiABIAMgBCABIAIQioCAgABz","GyEACyAAC5gBAgJ/A34CQCADQfj///8BcUUNACAAIAAgA0EDdiIDQQV0IgVqIAAgA0E4bCIGaiADIAQQkICAgAAhACABIAEgBWog","ASAGaiADIAQQkICAgAAhASACIAIgBWogAiAGaiADIAQQkICAgAAhAgsgACACIAEgACkDACIHIAEpAwAiCFQiAyAIIAIpAwAiCVRz","GyADIAcgCVRzGwvwAgQFfwF8AX8BfAJAAkACQAJAIAFBfGoiAygCACIEIAIoAgAiBSgCACIGKAIIIgdPDQAgASgCACICIAdPDQEC","QEEAQQBBfyAGKAIEIgEgBEEDdGorAwAiCCABIAJBA3QiCWorAwAiCmYiARtBAUF+IAEbIAggCmUbIAggCGIgCiAKYnIbIgFBf0Yg","AiAESSABG0EBRw0AAkADQCADIgFBBGogBDYCACABIABGDQEgAUF8aiIDKAIAIgQgBSgCACIGKAIIIgdPDQUgAiAHTw0GQQBBAEF/","IAYoAgQiByAEQQN0aisDACIIIAcgCWorAwAiCmYiBxtBAUF+IAcbIAggCmUbIAggCGIgCiAKYnIbIgdBf0YgAiAESSAHGw0ACwsg","ASACNgIACw8LIAQgB0HQhsCAABDcgICAAAALIAIgB0HghsCAABDcgICAAAALIAQgB0HQhsCAABDcgICAAAALIAIgB0HghsCAABDc","gICAAAALfAEDfyOAgICAAEEQayIDJICAgIAAAkAgAiABIAFBfGoiBBCKgICAAEUNACADIAEoAgAiBTYCDAJAA0AgBCIBQQRqIAEo","AgA2AgAgASAARg0BIAIgA0EMaiABQXxqIgQQioCAgAANAAsLIAEgBTYCAAsgA0EQaiSAgICAAAupBAMJfwJ8AX8gAiABQQJ0QXxq","IgRqIQUgACAEaiEGIAAgAUEBdiIHQQJ0aiIIQXxqIQkgAygCACEKAkACQAJAAkACQANAIAAoAgAiAyAKKAIAIgsoAggiDE8NASAI","KAIAIgQgDE8NAiACIAQgA0EAQQBBfyALKAIEIgwgA0EDdGorAwAiDSAMIARBA3RqKwMAIg5mIgwbQQFBfiAMGyANIA5lGyANIA1i","IA4gDmJyGyIMQX9GIAQgA0kgDBsiDBs2AgAgCSgCACIDIAooAgAiDygCCCILTw0DIAYoAgAiBCALTw0EIAggDEECdGohCCAAIAxB","AXNBAnRqIQAgAkEEaiECIAUgAyAEQQBBAEF/IA8oAgQiDCADQQN0aisDACINIAwgBEEDdGorAwAiDmYiDBtBAUF+IAwbIA0gDmUb","IA0gDWIgDiAOYnIbIgxBf0YgBCADSSAMGyIMGzYCACAJIAxBAnQiA2shCSADIAZqQXxqIQYgBUF8aiEFIAdBf2oiBw0ACyAGQQRq","IQQgCUEEaiEDAkAgAUEBcUUNACACIAAgCCAAIANJIgkbKAIANgIAIAggACADT0ECdGohCCAAIAlBAnRqIQALAkAgCCAERw0AIAAg","A0YNBQsQ54CAgAAACyADIAxB0IbAgAAQ3ICAgAAACyAEIAxB4IbAgAAQ3ICAgAAACyADIAtB0IbAgAAQ3ICAgAAACyAEIAtB4IbA","gAAQ3ICAgAAACwuIAgEHfyACIAFBAnRBfGoiBGohBSAAIARqIQYgACABQQF2IgdBAnRqIgRBfGohCANAIAIgBCAAIAMgBCAAEIqA","gIAAIgkbKAIANgIAIAUgCCAGIAMgBiAIEIqAgIAAIgobKAIANgIAIAQgCUECdGohBCAAIAlBAXNBAnRqIQAgCCAKQQJ0IglrIQgg","CSAGakF8aiEGIAVBfGohBSACQQRqIQIgB0F/aiIHDQALIAZBBGohBSAIQQRqIQYCQCABQQFxRQ0AIAIgACAEIAAgBkkiCBsoAgA2","AgAgBCAAIAZPQQJ0aiEEIAAgCEECdGohAAsCQCAEIAVHDQAgACAGRw0ADwsQ54CAgAAAC5QCBAV/An4BfwJ+IAIgAUEDdEF4aiIE","aiEFIAAgBGohBiAAIAFBAXYiB0EDdGoiBEF4aiEIA0AgAiAEKQMAIgkgACkDACIKIAkgClQiCxs3AwAgBSAGKQMAIgwgCCkDACIN","IAwgDVYbNwMAIAVBeGohBSACQQhqIQIgCEF4QQAgDCANVBtqIQggBkF4QQAgDCANWhtqIQYgACAJIApaQQN0aiEAIAQgC0EDdGoh","BCAHQX9qIgcNAAsgBkEIaiEFIAhBCGohBgJAIAFBAXFFDQAgAiAAIAQgACAGSSIIGykDADcDACAEIAAgBk9BA3RqIQQgACAIQQN0","aiEACwJAIAQgBUcNACAAIAZHDQAPCxDngICAAAALywECAn8CfAJAAkAgACABQQJ0aiIEKAIAIgEgAygCACgCACIFKAIIIgNPDQAg","ACACQQJ0aiICKAIAIgAgA08NASAEIAAgAUEAQQBBfyAFKAIEIgMgAUEDdGorAwAiBiADIABBA3RqKwMAIgdmIgMbQQFBfiADGyAG","IAdlGyAGIAZiIAcgB2JyGyIDQX9GIAAgAUkgAxsiAxs2AgAgAiABIAAgAxs2AgAPCyABIANB0IbAgAAQ3ICAgAAACyAAIANB4IbA","gAAQ3ICAgAAAC+wCAAJAIAFBCUkNACAAQQBBAyACEJaAgIAAIABBAUEHIAIQloCAgAAgAEECQQUgAhCWgICAACAAQQRBCCACEJaA","gIAAIABBAEEHIAIQloCAgAAgAEECQQQgAhCWgICAACAAQQNBCCACEJaAgIAAIABBBUEGIAIQloCAgAAgAEEAQQIgAhCWgICAACAA","QQFBAyACEJaAgIAAIABBBEEFIAIQloCAgAAgAEEHQQggAhCWgICAACAAQQFBBCACEJaAgIAAIABBA0EGIAIQloCAgAAgAEEFQQcg","AhCWgICAACAAQQBBASACEJaAgIAAIABBAkEEIAIQloCAgAAgAEEDQQUgAhCWgICAACAAQQZBCCACEJaAgIAAIABBAkEDIAIQloCA","gAAgAEEEQQUgAhCWgICAACAAQQZBByACEJaAgIAAIABBAUECIAIQloCAgAAgAEEDQQQgAhCWgICAACAAQQVBBiACEJaAgIAADwsA","C8wKAQl/AkAgAUEJSQ0AIABBDEEAIAIgAEEMaiIBIAAQioCAgAAiAxtqKAIAIQQgACAAQQBBDCADG2ooAgA2AgwgACAENgIAIABB","HEEEIAIgAEEcaiIFIABBBGoiBhCKgICAACIDG2ooAgAhBCAAIABBBEEcIAMbaigCADYCHCAAIAQ2AgQgAEEUQQggAiAAQRRqIgMg","AEEIaiIHEIqAgIAAIgQbaigCACEIIAAgAEEIQRQgBBtqKAIANgIUIAAgCDYCCCAAQSBBECACIABBIGoiCSAAQRBqIgQQioCAgAAi","CBtqKAIAIQogACAAQRBBICAIG2ooAgA2AiAgACAKNgIQIABBHEEAIAIgBSAAEIqAgIAAIggbaigCACEKIAAgAEEAQRwgCBtqKAIA","NgIcIAAgCjYCACAAQRBBCCACIAQgBxCKgICAACIIG2ooAgAhCiAAIABBCEEQIAgbaigCADYCECAAIAo2AgggAEEgQQwgAiAJIAEQ","ioCAgAAiCBtqKAIAIQogACAAQQxBICAIG2ooAgA2AiAgACAKNgIMIABBGEEUIAIgAEEYaiIIIAMQioCAgAAiChtqKAIAIQsgACAA","QRRBGCAKG2ooAgA2AhggACALNgIUIABBCEEAIAIgByAAEIqAgIAAIgobaigCACELIAAgAEEAQQggChtqKAIANgIIIAAgCzYCACAA","QQxBBCACIAEgBhCKgICAACIKG2ooAgAhCyAAIABBBEEMIAobaigCADYCDCAAIAs2AgQgAEEUQRAgAiADIAQQioCAgAAiChtqKAIA","IQsgACAAQRBBFCAKG2ooAgA2AhQgACALNgIQIABBIEEcIAIgCSAFEIqAgIAAIgobaigCACELIAAgAEEcQSAgChtqKAIANgIgIAAg","CzYCHCAAQRBBBCACIAQgBhCKgICAACIKG2ooAgAhCyAAIABBBEEQIAobaigCADYCECAAIAs2AgQgAEEYQQwgAiAIIAEQioCAgAAi","ChtqKAIAIQsgACAAQQxBGCAKG2ooAgA2AhggACALNgIMIABBHEEUIAIgBSADEIqAgIAAIgobaigCACELIAAgAEEUQRwgChtqKAIA","NgIcIAAgCzYCFCAAQQRBACACIAYgABCKgICAACIKG2ooAgAhCyAAIABBAEEEIAobaigCADYCBCAAIAs2AgAgAEEQQQggAiAEIAcQ","ioCAgAAiChtqKAIAIQsgACAAQQhBECAKG2ooAgA2AhAgACALNgIIIABBFEEMIAIgAyABEIqAgIAAIgobaigCACELIAAgAEEMQRQg","ChtqKAIANgIUIAAgCzYCDCAAQSBBGCACIAkgCBCKgICAACIJG2ooAgAhCiAAIABBGEEgIAkbaigCADYCICAAIAo2AhggAEEMQQgg","AiABIAcQioCAgAAiCRtqKAIAIQogACAAQQhBDCAJG2ooAgA2AgwgACAKNgIIIABBFEEQIAIgAyAEEIqAgIAAIgkbaigCACEKIAAg","AEEQQRQgCRtqKAIANgIUIAAgCjYCECAAQRxBGCACIAUgCBCKgICAACIFG2ooAgAhCSAAIABBGEEcIAUbaigCADYCHCAAIAk2Ahgg","AEEIQQQgAiAHIAYQioCAgAAiBxtqKAIAIQUgACAAQQRBCCAHG2ooAgA2AgggACAFNgIEIABBEEEMIAIgBCABEIqAgIAAIgEbaigC","ACEEIAAgAEEMQRAgARtqKAIANgIQIAAgBDYCDCAAQRhBFCACIAggAxCKgICAACICG2ooAgAhASAAIABBFEEYIAIbaigCADYCGCAA","IAE2AhQPCwAL3gQBEH4CQCABQQlJDQAgACAAKQNAIgMgACkDICIEIAMgBFYbIgUgACkDGCIGIAApAwAiByAGIAdWGyIIIAUgCFYb","IgkgACkDOCIKIAApAwgiCyAKIAtWGyIMIAYgByAGIAdUGyIGIAwgBlYbIgcgCSAHVhsiDSAAKQMwIg4gACkDKCIPIAApAxAiECAP","IBBWGyIRIA4gEVYbIhIgBSAIIAUgCFQbIgUgCiALIAogC1QbIgggBSAIVhsiCiASIApWGyILIA0gC1YbNwNAIAAgDiARIA4gEVQb","Ig4gAyAEIAMgBFQbIgMgDyAQIA8gEFQbIgQgAyAEVhsiDyAOIA9UGyIQIAUgCCAFIAhUGyIFIBAgBVQbIgggAyAEIAMgBFQbIgMg","DCAGIAwgBlQbIgQgAyAEVBsiBiAIIAZUGzcDACAAIAkgByAJIAdUGyIHIA4gDyAOIA9WGyIJIAcgCVYbIgwgDSALIA0gC1QbIgsg","DCALVhs3AzggACAMIAsgDCALVBsiCyAHIAkgByAJVBsiByASIAogEiAKVBsiCSAHIAlWGyIKIBAgBSAQIAVWGyIFIAMgBCADIARW","GyIDIAUgA1YbIgQgCiAEVhsiDCALIAxWGzcDMCAAIAsgDCALIAxUGzcDKCAAIAogBCAKIARUGyIEIAcgCSAHIAlUGyIHIAUgAyAF","IANUGyIDIAcgA1YbIgUgBCAFVhs3AyAgACAEIAUgBCAFVBs3AxggACAHIAMgByADVBsiAyAIIAYgCCAGVhsiBCADIARWGzcDECAA","IAMgBCADIARUGzcDCA8LAAuEBQACQCABQQ1JDQAgAEEAQQwgAhCWgICAACAAQQFBCiACEJaAgIAAIABBAkEJIAIQloCAgAAgAEED","QQcgAhCWgICAACAAQQVBCyACEJaAgIAAIABBBkEIIAIQloCAgAAgAEEBQQYgAhCWgICAACAAQQJBAyACEJaAgIAAIABBBEELIAIQ","loCAgAAgAEEHQQkgAhCWgICAACAAQQhBCiACEJaAgIAAIABBAEEEIAIQloCAgAAgAEEBQQIgAhCWgICAACAAQQNBBiACEJaAgIAA","IABBB0EIIAIQloCAgAAgAEEJQQogAhCWgICAACAAQQtBDCACEJaAgIAAIABBBEEGIAIQloCAgAAgAEEFQQkgAhCWgICAACAAQQhB","CyACEJaAgIAAIABBCkEMIAIQloCAgAAgAEEAQQUgAhCWgICAACAAQQNBCCACEJaAgIAAIABBBEEHIAIQloCAgAAgAEEGQQsgAhCW","gICAACAAQQlBCiACEJaAgIAAIABBAEEBIAIQloCAgAAgAEECQQUgAhCWgICAACAAQQZBCSACEJaAgIAAIABBB0EIIAIQloCAgAAg","AEEKQQsgAhCWgICAACAAQQFBAyACEJaAgIAAIABBAkEEIAIQloCAgAAgAEEFQQYgAhCWgICAACAAQQlBCiACEJaAgIAAIABBAUEC","IAIQloCAgAAgAEEDQQQgAhCWgICAACAAQQVBByACEJaAgIAAIABBBkEIIAIQloCAgAAgAEECQQMgAhCWgICAACAAQQRBBSACEJaA","gIAAIABBBkEHIAIQloCAgAAgAEEIQQkgAhCWgICAACAAQQNBBCACEJaAgIAAIABBBUEGIAIQloCAgAAPCwAL8BIBDX8CQCABQQ1J","DQAgAEEwQQAgAiAAQTBqIgMgABCKgICAACIBG2ooAgAhBCAAIABBAEEwIAEbaigCADYCMCAAIAQ2AgAgAEEoQQQgAiAAQShqIgUg","AEEEaiIGEIqAgIAAIgEbaigCACEEIAAgAEEEQSggARtqKAIANgIoIAAgBDYCBCAAQSRBCCACIABBJGoiBCAAQQhqIgcQioCAgAAi","ARtqKAIAIQggACAAQQhBJCABG2ooAgA2AiQgACAINgIIIABBHEEMIAIgAEEcaiIJIABBDGoiCBCKgICAACIBG2ooAgAhCiAAIABB","DEEcIAEbaigCADYCHCAAIAo2AgwgAEEsQRQgAiAAQSxqIgsgAEEUaiIKEIqAgIAAIgEbaigCACEMIAAgAEEUQSwgARtqKAIANgIs","IAAgDDYCFCAAQSBBGCACIABBIGoiDCAAQRhqIgEQioCAgAAiDRtqKAIAIQ4gACAAQRhBICANG2ooAgA2AiAgACAONgIYIABBGEEE","IAIgASAGEIqAgIAAIg0baigCACEOIAAgAEEEQRggDRtqKAIANgIYIAAgDjYCBCAAQQxBCCACIAggBxCKgICAACING2ooAgAhDiAA","IABBCEEMIA0baigCADYCDCAAIA42AgggAEEsQRAgAiALIABBEGoiDRCKgICAACIOG2ooAgAhDyAAIABBEEEsIA4baigCADYCLCAA","IA82AhAgAEEkQRwgAiAEIAkQioCAgAAiDhtqKAIAIQ8gACAAQRxBJCAOG2ooAgA2AiQgACAPNgIcIABBKEEgIAIgBSAMEIqAgIAA","Ig4baigCACEPIAAgAEEgQSggDhtqKAIANgIoIAAgDzYCICAAQRBBACACIA0gABCKgICAACIOG2ooAgAhDyAAIABBAEEQIA4baigC","ADYCECAAIA82AgAgAEEIQQQgAiAHIAYQioCAgAAiDhtqKAIAIQ8gACAAQQRBCCAOG2ooAgA2AgggACAPNgIEIABBGEEMIAIgASAI","EIqAgIAAIg4baigCACEPIAAgAEEMQRggDhtqKAIANgIYIAAgDzYCDCAAQSBBHCACIAwgCRCKgICAACIOG2ooAgAhDyAAIABBHEEg","IA4baigCADYCICAAIA82AhwgAEEoQSQgAiAFIAQQioCAgAAiDhtqKAIAIQ8gACAAQSRBKCAOG2ooAgA2AiggACAPNgIkIABBMEEs","IAIgAyALEIqAgIAAIg4baigCACEPIAAgAEEsQTAgDhtqKAIANgIwIAAgDzYCLCAAQRhBECACIAEgDRCKgICAACIOG2ooAgAhDyAA","IABBEEEYIA4baigCADYCGCAAIA82AhAgAEEkQRQgAiAEIAoQioCAgAAiDhtqKAIAIQ8gACAAQRRBJCAOG2ooAgA2AiQgACAPNgIU","IABBLEEgIAIgCyAMEIqAgIAAIg4baigCACEPIAAgAEEgQSwgDhtqKAIANgIsIAAgDzYCICAAQTBBKCACIAMgBRCKgICAACIDG2oo","AgAhDiAAIABBKEEwIAMbaigCADYCMCAAIA42AiggAEEUQQAgAiAKIAAQioCAgAAiAxtqKAIAIQ4gACAAQQBBFCADG2ooAgA2AhQg","ACAONgIAIABBIEEMIAIgDCAIEIqAgIAAIgMbaigCACEOIAAgAEEMQSAgAxtqKAIANgIgIAAgDjYCDCAAQRxBECACIAkgDRCKgICA","ACIDG2ooAgAhDiAAIABBEEEcIAMbaigCADYCHCAAIA42AhAgAEEsQRggAiALIAEQioCAgAAiAxtqKAIAIQ4gACAAQRhBLCADG2oo","AgA2AiwgACAONgIYIABBKEEkIAIgBSAEEIqAgIAAIgMbaigCACEOIAAgAEEkQSggAxtqKAIANgIoIAAgDjYCJCAAQQRBACACIAYg","ABCKgICAACIDG2ooAgAhDiAAIABBAEEEIAMbaigCADYCBCAAIA42AgAgAEEUQQggAiAKIAcQioCAgAAiAxtqKAIAIQ4gACAAQQhB","FCADG2ooAgA2AhQgACAONgIIIABBJEEYIAIgBCABEIqAgIAAIgMbaigCACEOIAAgAEEYQSQgAxtqKAIANgIkIAAgDjYCGCAAQSBB","HCACIAwgCRCKgICAACIDG2ooAgAhDiAAIABBHEEgIAMbaigCADYCICAAIA42AhwgAEEsQSggAiALIAUQioCAgAAiCxtqKAIAIQMg","ACAAQShBLCALG2ooAgA2AiwgACADNgIoIABBDEEEIAIgCCAGEIqAgIAAIgsbaigCACEDIAAgAEEEQQwgCxtqKAIANgIMIAAgAzYC","BCAAQRBBCCACIA0gBxCKgICAACILG2ooAgAhAyAAIABBCEEQIAsbaigCADYCECAAIAM2AgggAEEYQRQgAiABIAoQioCAgAAiCxtq","KAIAIQMgACAAQRRBGCALG2ooAgA2AhggACADNgIUIABBKEEkIAIgBSAEEIqAgIAAIgUbaigCACELIAAgAEEkQSggBRtqKAIANgIo","IAAgCzYCJCAAQQhBBCACIAcgBhCKgICAACIFG2ooAgAhBiAAIABBBEEIIAUbaigCADYCCCAAIAY2AgQgAEEQQQwgAiANIAgQioCA","gAAiBRtqKAIAIQYgACAAQQxBECAFG2ooAgA2AhAgACAGNgIMIABBHEEUIAIgCSAKEIqAgIAAIgUbaigCACEGIAAgAEEUQRwgBRtq","KAIANgIcIAAgBjYCFCAAQSBBGCACIAwgARCKgICAACIFG2ooAgAhBiAAIABBGEEgIAUbaigCADYCICAAIAY2AhggAEEMQQggAiAI","IAcQioCAgAAiBRtqKAIAIQcgACAAQQhBDCAFG2ooAgA2AgwgACAHNgIIIABBFEEQIAIgCiANEIqAgIAAIgUbaigCACEHIAAgAEEQ","QRQgBRtqKAIANgIUIAAgBzYCECAAQRxBGCACIAkgARCKgICAACIFG2ooAgAhByAAIABBGEEcIAUbaigCADYCHCAAIAc2AhggAEEk","QSAgAiAEIAwQioCAgAAiBBtqKAIAIQwgACAAQSBBJCAEG2ooAgA2AiQgACAMNgIgIABBEEEMIAIgDSAIEIqAgIAAIgQbaigCACEI","IAAgAEEMQRAgBBtqKAIANgIQIAAgCDYCDCAAQRhBFCACIAEgChCKgICAACICG2ooAgAhASAAIABBFEEYIAIbaigCADYCGCAAIAE2","AhQPCwALlggBGH4CQCABQQ1JDQAgACAAKQNgIgMgACkDACIEIAMgBFYbIgUgACkDWCIGIAApAygiByAGIAdWGyIIIAApAyAiCSAI","IAlWGyIKIAUgClYbIgsgACkDUCIMIAApAwgiDSAMIA1WGyIOIAApA0AiDyAAKQMwIhAgDyAQVhsiESAOIBFWGyISIAApA0giEyAA","KQMQIhQgEyAUVhsiFSAAKQM4IhYgACkDGCIXIBYgF1YbIhggFSAYVhsiGSASIBlWGyIaIAsgGlYbNwNgIAAgBSAKIAUgClQbIgUg","DiARIA4gEVQbIgogFSAYIBUgGFQbIg4gCiAOVhsiESAFIBFWGyIVIA8gECAPIBBUGyIPIAwgDSAMIA1UGyIMIA8gDFYbIg0gFiAX","IBYgF1QbIhAgEyAUIBMgFFQbIhMgECATVhsiFCANIBRWGyIWIAggCSAIIAlUGyIIIAMgBCADIARUGyIDIAggA1YbIgQgFiAEVhsi","CSAVIAlWGyIXIAsgGiALIBpUGyILIBIgGSASIBlUGyISIAYgByAGIAdUGyIGIBIgBlYbIgcgCyAHVhsiGCAXIBhWGzcDWCAAIBAg","EyAQIBNUGyIQIA8gDCAPIAxUGyIMIBAgDFQbIg8gEiAGIBIgBlQbIgYgCCADIAggA1QbIgMgBiADVBsiCCAPIAhUGzcDACAAIBcg","GCAXIBhUGyISIAsgByALIAdUGyIHIBUgCSAVIAlUGyIJIAcgCVYbIgsgEiALVhs3A1AgACAKIA4gCiAOVBsiCiAWIAQgFiAEVBsi","BCAKIARUGyIOIAYgAyAGIANWGyIDIBAgDCAQIAxWGyIGIAMgBlQbIgwgDiAMVBsiECAFIBEgBSARVBsiBSANIBQgDSAUVBsiDSAF","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","IAYgACACQQN0aiIHKQMANwMAIAcgBTcDACACIAUgBFRqC3cBAX8CQCABDQBBAA8LAkAgAiABTw0AIAAoAgAhBCAAIAAgAkECdGoi","AigCADYCACACIAQ2AgAgAEEEaiABQX9qIAAgAxCkgICAACICIAFPDQAgACgCACEBIAAgACACQQJ0aiIDKAIANgIAIAMgATYCACAC","DwsAC3cBAX8CQCABDQBBAA8LAkAgAiABTw0AIAAoAgAhBCAAIAAgAkECdGoiAigCADYCACACIAQ2AgAgAEEEaiABQX9qIAAgAxCl","gICAACICIAFPDQAgACgCACEBIAAgACACQQJ0aiIDKAIANgIAIAMgATYCACACDwsAC3cBAX8CQCABDQBBAA8LAkAgAiABTw0AIAAo","AgAhBCAAIAAgAkECdGoiAigCADYCACACIAQ2AgAgAEEEaiABQX9qIAAgAxCmgICAACICIAFPDQAgACgCACEBIAAgACACQQJ0aiID","KAIANgIAIAMgATYCACACDwsAC3cBAX8CQCABDQBBAA8LAkAgAiABTw0AIAAoAgAhBCAAIAAgAkECdGoiAigCADYCACACIAQ2AgAg","AEEEaiABQX9qIAAgAxCngICAACICIAFPDQAgACgCACEBIAAgACACQQJ0aiIDKAIANgIAIAMgATYCACACDwsAC3cBAX4CQCABDQBB","AA8LAkAgAiABTw0AIAApAwAhBCAAIAAgAkEDdGoiAikDADcDACACIAQ3AwAgAEEIaiABQX9qIAAgABCogICAACICIAFPDQAgACkD","ACEEIAAgACACQQN0aiIBKQMANwMAIAEgBDcDACACDwsAC3cBAX4CQCABDQBBAA8LAkAgAiABTw0AIAApAwAhBCAAIAAgAkEDdGoi","AikDADcDACACIAQ3AwAgAEEIaiABQX9qIAAgABCpgICAACICIAFPDQAgACkDACEEIAAgACACQQN0aiIBKQMANwMAIAEgBDcDACAC","DwsAC38BA38jgICAgABBEGsiAiSAgICAACACQQhqIAAgARDpgICAAAJAAkAgAigCCCIBIAIoAgwiA0cNAEEAIQAMAQtBACEAA0BB","AEECQQEgAS0AACIEQe8BSxsgBMBBQEgbIABqIQAgAUEBaiIBIANHDQALCyACQRBqJICAgIAAIAALDgAgACABIAAQsoCAgAALiQEB","An9BACEDAkBBACgC6I/AgAAiBA0AQfCPwIAAIQRBAEHwj8CAADYC6I/AgAALAkACQCABIARqQX9qQQAgAWtxIgEgAmoiBCABSQ0A","IAQ/AEEQdCICTQ0BQQAhAyAEIAJrQRB2IARB//8DcUEAR2pAAEF/Rw0BCyADDwtBACAENgLoj8CAACABCyEAAkAgASAAakEAKALo","j8CAAEcNAEEAIAA2AuiPwIAACwsSACADIAAgAiABIAMQtYCAgAALlAEBAX9BACEFAkACQCADIAFqQQAoAuiPwIAARg0AIAEgAiAE","ELKAgIAAIgJFDQECQCAEIAMgBCADSRsiA0UNACACIAEgA/wKAAALIAIhBQwBCwJAIAQgAWoiAz8AQRB0IgRNDQBBACEFIAMgBGtB","EHYgA0H//wNxQQBHakAAQX9GDQELQQAgAzYC6I/AgAAgAQ8LIAULAwAACyYAAkAgACABIAAQsoCAgAAiAUUNACAARQ0AIAFBACAA","/AsACyABC8AQAg5/AnwjgICAgABBMGsiCiSAgICAACAAQZwBaiELIABBkAFqIQxBACENAkADQCANIQ4gASEPIAJFDQFBACEQAkAC","QANAIA8gEGoiES0AACISQSBGDQEgAiAQQQFqIhBHDQALIAIhECAPIQEMAQsgEUEBaiEBIBBBf3MgAmohAgsgDiAETw0BIBBFDQEg","ACAAKALAAUEBaiIRNgLAAQJAIBENAAJAIAAoArABIhFFDQAgEUECdCIRRQ0AIAAoAqwBQQAgEfwLAAsgAEEBNgLAAQsgAEEANgK8","AQJAAkAgDyAQELCAgIAAQQNLDQAgCkEgaiAAIA8gEBC5gICAACAKKAIgQQFxRQ0BIAAgCigCJBC6gICAAAwBCyAAKAIsIhNFDQBB","ACEUAkADQCATIBRqQQF2IhEgACgCLCIVTw0BIApBGGogACAAKAIoIBFBAnRqKAIAELuAgIAAIBFBAWogFCAKKAIYIA8gCigCHCIV","IBAgFSAQSRsQ6oCAgAAiFiAVIBBrIBYbQQBIIhUbIhQgEyARIBUbIhNJDQALIBQgACgCLE8NASAUQQJ0IREDQCAKQRBqIAAgACgC","KCARaigCACITELuAgIAAIAooAhQgEEkNAiAPIAooAhAgEBDqgICAAA0CIAAgExC6gICAACARQQRqIREgFEEBaiIUIAAoAixPDQIM","AAsLIBEgFUGAiMCAABDcgICAAAALIA5BAWohDUEBIRECQAJAA0ACQAJAIBEgEEkiFEUNACAPIBFqLAAAQUBIDQELIA8gERCwgICA","AEEESQ0AIApBCGogACAPIBEQuYCAgAAgCigCCEEBRw0AIAooAgwiEyAAKAIgIhVPDQIgACgCHCATQQJ0aigCAEEDTQ0AIAAgExC6","gICAAAsCQCARIBBPDQAgESAUaiIRIBBNDQELCyAAQQA2ApgBIAAoArwBIhdFDQFBACEWA0ACQAJAAkACQAJAAkACQAJAIBYgACgC","vAEiEE8NACAAKAK4ASAWQQJ0aigCACIQIAAoAkQiEU8NASAQQQFqIg8gEU8NAiAAKAJAIhEgEEECdGooAgAiECARIA9BAnRqKAIA","IhVPDQcgEEECdCERA0AgECAAKAJQIg9PDQQgACgCTCARaigCACIPIAAoAnQiFE8NBQJAIAAoAnAgD0ECdCIUaigCAA0AAkAgACgC","mAEiEyAAKAKQAUcNACAMELyAgIAACyAAKAKUASATQQJ0aiAPNgIAIAAgE0EBajYCmAELIBAgACgCXCITTw0GIA8gACgCdCITTw0H","IAAoAnAgFGoiDyAPKAIAIAAoAlggEWooAgBqNgIAIBFBBGohESAVIBBBAWoiEEYNCAwACwsgFiAQQYCJwIAAENyAgIAAAAsgECAR","QZCJwIAAENyAgIAAAAsgDyARQaCJwIAAENyAgIAAAAsgECAPQbCJwIAAENyAgIAAAAsgDyAUQcCJwIAAENyAgIAAAAsgECATQdCJ","wIAAENyAgIAAAAsgDyATQeCJwIAAENyAgIAAAAsgFkEBaiIWIBdHDQALIAAoApgBIhZFDQEgAyAOQQN0aiEXQQAhEQJAAkACQAJA","AkACQAJAA0AgESAAKAKYASIQTw0BIAAoApQBIBFBAnRqKAIAIhAgACgCdCIPTw0CIBAgACgCaCIPTw0DIBAgACgCjAEiD08NBCAA","KAJwIBBBAnQiD2ooAgAhFCAAKAJkIA9qKAIAIRMgFysDACEYAkAgACgCiAEgEGoiFS0AAA0AIBVBAToAACAQIAAoAoABIhVPDQYg","ACgCfCAQQQN0akIANwMAAkAgACgCpAEiFSAAKAKcAUcNACALELyAgIAACyAAKAKgASAVQQJ0aiAQNgIAIAAgFUEBajYCpAELIBAg","ACgCgAEiFU8NBiAAKAJ8IBBBA3RqIhUgGCAUuCIZRJqZmZmZmQFAoiATuCAFo0QAAAAAAADoP6JEAAAAAAAA0D+gRDMzMzMzM/M/","oiAZoKOiIBUrAwCgOQMAIBAgACgCdCIUTw0HIAAoAnAgD2pBADYCACARQQFqIhEgFkYNCQwACwsgESAQQZCIwIAAENyAgIAAAAsg","ECAPQaCIwIAAENyAgIAAAAsgECAPQbCIwIAAENyAgIAAAAsgECAPQcCIwIAAENyAgIAAAAsgECAVQdCIwIAAENyAgIAAAAsgECAV","QeCIwIAAENyAgIAAAAsgECAUQfCIwIAAENyAgIAAAAsgEyAVQfCHwIAAENyAgIAAAAsgEkEgRg0ACwsCQAJAAkAgACgCpAEiEEUN","ACAQQQJ0IREgACgCoAEhEANAIBAoAgAiDyAAKAKMASIUTw0CIAAoAogBIA9qQQA6AAAgEEEEaiEQIBFBfGoiEQ0ACwsgCiAAQfgA","aiIPNgIsIAsgCkEsahCAgICAACAAKAKgASERIAAoAqQBIRAgCiAPNgIoIAogCkEoajYCLAJAIBBBAkkNAAJAIBBBFUkNACARIBAg","CkEsahCHgICAAAwBCyAQQQJ0IQ9BBCEQA0AgESARIBBqIApBLGoQkYCAgAAgDyAQQQRqIhBHDQALCwJAIAkgByAAKAKkASIQIAcg","EEkbIhAgCSAQSRsiFUUNACAAKAJ8IRMgACgCgAEhFCAAKAKgASEQIBUhDwNAIAYgECgCACIRNgIAIBEgFE8NAyAIIBMgEUEDdGor","AwA5AwAgBkEEaiEGIAhBCGohCCAQQQRqIRAgD0F/aiIPDQALCyAAQQA2AqQBIApBMGokgICAgAAgFQ8LIA8gFEGAisCAABDcgICA","AAALIBEgFEHwicCAABDcgICAAAALkwIBB38jgICAgABBEGsiBCSAgICAACABKAI4IQUgBEEIaiACIAMQ6YCAgAAgBUF/aiEGQaXG","iKF4IQcCQCAEKAIIIgggBCgCDCIJRg0AA0AgByAILQAAc0GzA2whByAIQQFqIgggCUcNAAsLIAcgBnEhCAJAAkACQCAFRQ0AQQAh","CiABKAI0IgUgCEECdGooAgAiBw0BDAILIAggBUGgi8CAABDcgICAAAALA0AgBCABIAdBf2oiCRC7gICAAAJAIAQoAgQgA0cNACAE","KAIAIAIgAxDqgICAAA0AQQEhCgwCCyAFIAhBAWogBnEiCEECdGooAgAiBw0ACwsgACAJNgIEIAAgCjYCACAEQRBqJICAgIAAC4gB","AQJ/AkAgASAAKAKwASICTw0AAkAgACgCrAEgAUECdGoiAigCACAAKALAASIDRg0AIAIgAzYCAAJAIAAoArwBIgIgACgCtAFHDQAg","AEG0AWoQvICAgAALIAAoArgBIAJBAnRqIAE2AgAgACACQQFqNgK8AQsPCyABIAJBkIrAgAAQ3ICAgAAAC6IBAQR/AkACQAJAIAIg","ASgCFCIDTw0AIAJBAWoiBCADTw0BIAEoAgghBSABKAIQIgYgBEECdGooAgAiAyAGIAJBAnRqKAIAIgJJDQIgAyAFSw0CIAAgAyAC","azYCBCAAIAEoAgQgAmo2AgAPCyACIANBoIrAgAAQ3ICAgAAACyAEIANBsIrAgAAQ3ICAgAAACyACIAMgBUHAisCAABDagICAAAAL","VQEBfyOAgICAAEEQayIBJICAgIAAIAFBCGogACAAKAIAQQFBBEEEEMuAgIAAAkAgASgCCCIAQX9GDQAgACABKAIMEMyAgIAAAAsg","AUEQaiSAgICAAAvUFgQHfwJ+E38BfiOAgICAAEHAAmsiBCSAgICAACAEQShqENCAgIAAIAQoAiwhBSAEKAIoIQYQx4CAgAACQAJA","IANBBEEEELKAgIAAIgdFDQAgB0EANgIAIARB9AFqQQBBgAgQhYCAgAAgBEGAAmpBACADEIWAgIAAIARBjAJqQQAgAxCFgICAACAE","QZgCakQAAAAAAAAAACADEIKAgIAAIARBpAJqQQAgAxCEgICAACAEQTBqIANBAEEEQQQQz4CAgAAgBCgCNCEIAkAgBCgCMEEBRg0A","IAQoAjghCSAEQbACaiADQQBBBEEEEM+AgIAAIAQoArQCIQoCQCAEKAKwAkEBRg0AIARBADYCXCAEQoCAgIDAADcCVCAEQgQ3Akwg","BEIBNwJEIAQgBzYCQCAEQoCAgIAQNwI4IAQgBTYCNCAEIAY2AjAgBCAEKQL0ATcCYCAEIAQoAvwBNgJoIARBADYCjAEgBEKAgICA","wAA3AmxCACELIARCADcCdCAEQgQ3AnwgBEKAgICAwAA3AoQBIAQoArgCIQcgBEIENwLcASAEQgA3AtQBIARBADYC8AEgBCAHNgLQ","ASAEIAo2AswBIARBADYCyAEgBCAJNgLEASAEIAg2AsABIAQgBCgCiAI2ApgBIAQgBCkCgAI3ApABIAQgBCgClAI2AqQBIAQgBCkC","jAI3ApwBIAQgBCgCoAI2ArABIAQgBCkCmAI3AqgBIAQgBCgCrAI2ArwBIAQgBCkCpAI3ArQBIARBADYC7AEgBEKAgICAwAA3AuQB","IARBADYCrAIgBEKAgICAgAE3AqQCIAOtIQwgBEHkAWohDSAEQdgBaiEOIARBhAFqIQ8gBEH4AGohECAEQewAaiERIARB4ABqIRIg","BEHUAGohEyAEQcgAaiEUIARBPGohFQNAIAEhFiACIQNBACEXQQEhGEEAIQICQCADRQ0AQQAhFwJAA0AgFiAXaiIHLQAAQQpGDQFB","ASEYIAMgF0EBaiIXRw0ACyADIRcgAyECIBYhAQwBCyAHQQFqIQEgF0F/cyADaiECQQAhGAsCQCALIAxRDQACQCAXRQ0AIBYgF2oh","AyALpyIZQQJ0IRoDQCAWIRtBACEJAkACQANAIBsgCWoiBy0AACIFQSBGIhwNASAbIAlBAWoiCWogA0cNAAsgFyEJIBshFgwBCyAH","QQFqIRYgCUF/cyAXaiEXCwJAAkACQAJAAkACQCAJRQ0AIARBIGogBEEwaiAbIAkQuYCAgAACQCAEKAIgQQFHDQAgBCgCJCEDDAQL","IAQoAkQhHSAEQTBqIBsgCRDRgICAACAEKAI4IQcCQCAEKAJEIgMgBCgCPEcNACAVELyAgIAACyAEKAJAIANBAnRqIAc2AgAgBCAD","QQFqNgJEIBsgCRCwgICAACEHAkAgBCgCUCIDIAQoAkhHDQAgFBC8gICAAAsgBCgCTCADQQJ0aiAHNgIAIAQgA0EBajYCUCAdQQF0","IAQoAmgiA00NAiAEQbACakEAIANBAXQiAxCFgICAACAEKAJEQX9qIh5FDQEgA0F/aiEGQQAhHyAEKAK0AiEIIAQoArgCIQUDQCAE","QRhqIARBMGogHxC7gICAACAEQRBqIAQoAhggBCgCHBDpgICAAEGlxoiheCEHAkAgBCgCECIDIAQoAhQiCkYNAANAIAcgAy0AAHNB","swNsIQcgA0EBaiIDIApHDQALCwJAIAcgBnEiAyAFTw0AIB9BAWohHwNAAkAgCCADQQJ0aiIHKAIADQAgByAfNgIAIB8gHkcNAwwF","CyADQQFqIAZxIgMgBUkNAAsLCyADIAVB4IfAgAAQ3ICAgAAACyAFQSBHDQYMAwsgEkEEQQQQyYCAgAAgEiAEKAK4AjYCCCASIAQp","ArACNwIAIAQoAmghAwsgBEEIaiAbIAkQ6YCAgAAgA0F/aiEFAkACQCAEKAIIIgMgBCgCDCIGRw0AQaXGiKF4IQcMAQtBpcaIoXgh","BwNAIAcgAy0AAHNBswNsIQcgA0EBaiIDIAZHDQALCwJAAkAgByAFcSIDIAQoAmgiCE8NACAEKAJkIQcDQCAHIANBAnRqIgYoAgBF","DQIgA0EBaiAFcSIDIAhJDQALCyADIAhBkIvAgAAQ3ICAgAAACyAGIB02AgAgHUF/aiEDCyADrUIghiALhCEgAkAgBCgCrAIiAyAE","KAKkAkcNACAEQaQCahC+gICAAAsgBCgCqAIgA0EDdGogIDcDACAEIANBAWo2AqwCIAsgBCgCmAEiA61aDQEgBCgClAEgGmoiAyAD","KAIAQQFqNgIAIBxFDQMLIBYgF2ohAyAXRQ0CDAELCyAZIANB0IrAgAAQ3ICAgAAACyALQgF8IQsgGEUNAQsLAkAgBCgCrAIiA0EC","SQ0AIAQoAqgCIQcCQCADQRVJDQAgByADIARBvwJqEIyAgIAADAELIAdBCGohBiAHIANBA3RqIQpBACEIA0ACQCAGKQMAIiAgBkF4","aikDACILWg0AIAghAwJAA0AgByADakEIaiALNwMAAkAgAw0AIAchAwwCCyAgIANBeGoiAyAHaiIFKQMAIgtUDQALIAVBCGohAwsg","AyAgNwMACyAIQQhqIQggBkEIaiIGIApHDQALC0EAIQYgBEGwAmpBACAEKAJEIgkQhYCAgAAgEUEEQQQQyYCAgAAgESAEKAK4AjYC","CCARIAQpArACNwIAIAQoAqwCIgdFDQNBACEDA0AgByAGQQFqIgUgByAFSxsiCkF/aiEFIAQoAqgCIAZBA3RqIghBCGohByAIKQMA","ISACQANAAkAgBSADRw0AIAohAwwCCyADQQFqIQMgBykDACELIAdBCGohByALICBRDQALCyAgpyEFAkAgBCgCgAEiByAEKAJ4Rw0A","IBAQvICAgAALIAQoAnwgB0ECdGogBTYCACAEIAdBAWo2AoABIAMgBmshBQJAIAQoAowBIgcgBCgChAFHDQAgDxC8gICAAAsgBCgC","iAEgB0ECdGogBTYCACAEIAdBAWo2AowBAkAgIEIgiKdBAWoiByAEKAJ0IgVPDQAgBCgCcCAHQQJ0aiIHIAcoAgBBAWo2AgAgAyEG","IAMgBCgCrAIiB0kNAQwFCwsgByAFQYCLwIAAENyAgIAAAAsgCiAEKAK4AhDMgICAAAALIAggBCgCOBDMgICAAAALQQRBBBDIgICA","AAALAkACQAJAAkAgCUF/aiIIRQ0AQQAhB0EBIQMDQCADQX9qIAQoAnQiBU8NAiADIAVPDQMgBCgCcCAHaiIFQQRqIgYgBigCACAF","KAIAajYCACAHQQRqIQcgCSADQQFqIgNHDQALCyAEQbACakEAIAgQv4CAgAAgE0EEQQQQyYCAgAAgEyAEKAK4AjYCCCATIAQpArAC","NwIAIAQoAlghByAEKAJcIQMgBCAVNgK0AiAEIARBMGo2ArACIAQgBEGwAmo2ApgCAkAgA0ECSQ0AAkAgA0EVSQ0AIAcgAyAEQZgC","ahCJgICAAAwBCyADQQJ0IQVBBCEDA0AgByAHIANqIARBmAJqEJKAgIAAIAUgA0EEaiIDRw0ACwsgBEGwAmpBACAIEIWAgIAAIA5B","BEEEEMmAgIAAIA4gBCgCuAI2AgggDiAEKQKwAjcCACAEQbACaiAIQQBBBEEEEM+AgIAAIAQoArQCIQMgBCgCsAJBAUYNAiAEKAK4","AiEHIA1BBEEEEMmAgIAAIARBADYC7AEgBCAHNgLoASAEIAM2AuQBIAAgBEEwakHEAfwKAAAgBEGkAmpBCEEIEMmAgIAAIARBwAJq","JICAgIAADwsgA0F/aiAFQeCKwIAAENyAgIAAAAsgAyAFQfCKwIAAENyAgIAAAAsgAyAEKAK4AhDMgICAAAALVQEBfyOAgICAAEEQ","ayIBJICAgIAAIAFBCGogACAAKAIAQQFBCEEIEMuAgIAAAkAgASgCCCIAQX9GDQAgACABKAIMEMyAgIAAAAsgAUEQaiSAgICAAAud","AQECfyOAgICAAEEgayIDJICAgIAAIANBFGpBACACIAFrIgQgBCACSxtBAEEEQQQQz4CAgAAgAygCGCEEAkAgAygCFEEBRw0AIAQg","AygCHBDMgICAAAALIANBADYCECADIAMoAhw2AgwgAyAENgIIIANBCGogASACEIGAgIAAIAAgAygCEDYCCCAAIAMpAgg3AgAgA0Eg","aiSAgICAAAttAQN/IAAgARDTgICAACAAKAIEIgMgACgCCCIEaiEFAkACQAJAIAFBAkkNAAJAIAFBf2oiAUUNACAFIAIgAfwLAAsg","AyABIARqIgRqIQUMAQsgAUUNAQsgBSACOgAAIARBAWohBAsgACAENgIIC/ICAQF/I4CAgIAAQdABayIDJICAgIAAIANBDGogACAB","IAIQvYCAgAAgAygCICECAkBBACgCpI7AgABBf0YNAEGkjsCAABDXgICAAEGkjsCAABDWgICAAEGwjsCAAEEEQQQQyYCAgABBvI7A","gABBBEEEEMmAgIAAQciOwIAAQQRBBBDJgICAAEHUjsCAAEEEQQQQyYCAgABB4I7AgABBBEEEEMmAgIAAQeyOwIAAQQRBBBDJgICA","AEH4jsCAAEEEQQQQyYCAgABBhI/AgABBBEEEEMmAgIAAQZCPwIAAQQRBBBDJgICAAEGcj8CAAEEIQQgQyYCAgABBqI/AgAAQ14CA","gABBqI/AgAAQ1oCAgABBtI/AgABBBEEEEMmAgIAAQcCPwIAAQQRBBBDJgICAAEHMj8CAAEEEQQQQyYCAgABB2I/AgABBBEEEEMmA","gIAAC0GkjsCAACADQQxqQcQB/AoAACADQdABaiSAgICAACACQX9qC14BAX8jgICAgABBEGsiACSAgICAAEEAQX82AqSOwIAAIABB","CGoQ0ICAgABBAEHwj8CAADYC6I/AgABBACAAKQMINwKYjsCAAEEAQQA2AqCOwIAAIABBEGokgICAgAALPgEBfwJAIABBCGoiAEEA","KAKgjsCAACIBTQ0AQZiOwIAAIAAgAWtBABDAgICAAAtBACgCnI7AgABBB2pBeHELOwEBf0EAIQgCQEEAKAKkjsCAAEF/Rg0AQaSO","wIAAIAAgASACIAMgBCAGIAUgByAFELiAgIAAIQgLIAgLBABBAQsNACAAIAEQzoCAgAAPCwMADwsNACAAIAEQ1ICAgAAAC4gBAQR/","I4CAgIAAQRBrIgMkgICAgABBACEEIANBDGohBQJAAkAgAkUNACAAKAIAIgZFDQAgAyABNgIMIAYgAmwhBCAAKAIEIQIgA0EIaiEF","DAELCyAFIAQ2AgACQCADKAIMIgRFDQAgAygCCCIFRQ0AIAIgBSAEELOAgIAACyADQRBqJICAgIAAC1IBAX8jgICAgABBEGsiBSSA","gICAACAFQQhqIAAgASACIAMgBBDLgICAAAJAIAUoAggiBEF/Rg0AIAQgBSgCDBDMgICAAAALIAVBEGokgICAgAALuQEBAn8jgICA","gABBEGsiBiSAgICAAEEAIQcCQAJAIAUNAAwBCyADIAJqIgIgA0kNACAGQQRqIAEgAiABKAIAQQF0IgMgAiADSxsiA0EIQQRBASAF","QYEISRsgBUEBRhsiAiADIAJLGyIDIAQgBRDSgICAACAGKAIIIQcCQCAGKAIERQ0AIAYoAgwhAgwBCyABIAM2AgAgASAHNgIEQX8h","BwsgACACNgIEIAAgBzYCACAGQRBqJICAgIAACxwAAkAgAEUNACAAIAEQyICAgAAACxDVgICAAAALYwECfwJAAkACQCACIAFrIgMg","ACgCACAAKAIIIgRrTQ0AIAAgBCADQQFBARDKgICAACAAKAIIIQQMAQsgAiABRg0BCyADRQ0AIAAoAgQgBGogASAD/AoAAAsgACAE","IANqNgIIC0sBAX8jgICAgABBEGsiAiSAgICAACACIAA2AgQgAkGBgICAADYCDCACIAJBBGo2AghBmobAgAAgAkEIakEAQbCLwIAA","EOKAgIAAAAuxAQEBfgJAAkACQCAErSABrX4iBUIgiKcNACAFpyIEIAMQ24CAgAANAQsgAEEANgIEQQEhAQwBCwJAIAQNACAAIAM2","AghBACEBIABBADYCBAwBCxDHgICAAAJAAkAgAg0AIAQgAxCxgICAACECDAELIAQgAxC3gICAACECCwJAIAINACAAIAQ2AgggACAD","NgIEQQEhAQwBCyAAIAI2AgggACABNgIEQQAhAQsgACABNgIACw0AIABCgICAgBA3AwALEQAgACABIAEgAmoQzYCAgAALoAIDAX8B","fgN/I4CAgIAAQRBrIgUkgICAgAAgBK0gAq1+IganIQICQAJAAkACQAJAIAZCIIinDQAgAiADENuAgIAADQELIABBADYCBAwBC0EA","IQcgBUEMaiEIAkACQCAERQ0AIAEoAgAiCUUNACAFIAM2AgwgCSAEbCEHIAEoAgQhBCAFQQhqIQgMAQsLIAggBzYCAAJAAkACQCAF","KAIMRQ0AAkAgBSgCCCIBDQAgAg0CIAMhBAwDCyAEIAEgAyACELSAgIAAIQQMAgsgAg0AIAMhBAwDCxDHgICAACACIAMQsYCAgAAh","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","gAAgA0EQaiACENiAgIAAAAthAQF/I4CAgIAAQSBrIgMkgICAgAAgAyABNgIMIAMgADYCCCADQYGAgIAANgIcIANBgYCAgAA2AhQg","AyADQQxqNgIYIAMgA0EIajYCEEGYgcCAACADQRBqIAIQ2ICAgAAACxgAQbyNwIAAQZkBQYiOwIAAENiAgIAAAAsrACAAIAIgASAD","IAEgA0kbEOqAgIAAIgIgASADayACGyIDQQBKIANBAEhrCxMAIAAgASACajYCBCAAIAE2AgALSgEDf0EAIQMCQCACRQ0AAkADQCAA","LQAAIgQgAS0AACIFRw0BIABBAWohACABQQFqIQEgAkF/aiICRQ0CDAALCyAEIAVrIQMLIAMLC/sPAgBBgIDAAAuYDhZzbGljZSBp","bmRleCBzdGFydHMgYXQgwA0gYnV0IGVuZHMgYXQgwAAgaW5kZXggb3V0IG9mIGJvdW5kczogdGhlIGxlbiBpcyDAEiBidXQgdGhl","IGluZGV4IGlzIMAAEnJhbmdlIHN0YXJ0IGluZGV4IMAiIG91dCBvZiByYW5nZSBmb3Igc2xpY2Ugb2YgbGVuZ3RoIMAAEHJhbmdl","IGVuZCBpbmRleCDAIiBvdXQgb2YgcmFuZ2UgZm9yIHNsaWNlIG9mIGxlbmd0aCDAAC9yb290Ly5ydXN0dXAvdG9vbGNoYWlucy9z","dGFibGUteDg2XzY0LXVua25vd24tbGludXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvY29yZS9zcmMvc2xpY2Uv","c29ydC9zaGFyZWQvc21hbGxzb3J0LnJzAC9yb290Ly5ydXN0dXAvdG9vbGNoYWlucy9zdGFibGUteDg2XzY0LXVua25vd24tbGlu","dXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvY29yZS9zcmMvc2xpY2Uvc29ydC91bnN0YWJsZS9xdWlja3NvcnQu","cnMAL3Jvb3QvLnJ1c3R1cC90b29sY2hhaW5zL3N0YWJsZS14ODZfNjQtdW5rbm93bi1saW51eC1nbnUvbGliL3J1c3RsaWIvc3Jj","L3J1c3QvbGlicmFyeS9jb3JlL3NyYy9mbXQvbnVtLnJzAC9yb290Ly5ydXN0dXAvdG9vbGNoYWlucy9zdGFibGUteDg2XzY0LXVu","a25vd24tbGludXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvYWxsb2Mvc3JjL3Jhd192ZWMvbW9kLnJzAC9yb290","Ly5ydXN0dXAvdG9vbGNoYWlucy9zdGFibGUteDg2XzY0LXVua25vd24tbGludXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xp","YnJhcnkvYWxsb2Mvc3JjL2FsbG9jLnJzAHNyYy9saWIucnMAFW1lbW9yeSBhbGxvY2F0aW9uIG9mIMANIGJ5dGVzIGZhaWxlZABN","ARAAfwAAADgAAAAbAAAADwMQAAoAAAAzAQAAEgAAAA8DEAAKAAAANAEAACQAAAAPAxAACgAAADEBAAAkAAAADwMQAAoAAACfAAAA","IwAAAA8DEAAKAAAAnwAAAEAAAAAPAxAACgAAAJ8AAAAcAAAADwMQAAoAAACgAAAAIwAAAA8DEAAKAAAAoAAAAEAAAAAPAxAACgAA","AKAAAAAcAAAADwMQAAoAAAC/AAAAGAAAAA8DEAAKAAAA/QAAACEAAAAPAxAACgAAAOEAAAApAAAADwMQAAoAAAAfAQAAJQAAAA8D","EAAKAAAAIAEAACEAAAAPAxAACgAAACEBAAAnAAAADwMQAAoAAAAjAQAAHwAAAA8DEAAKAAAAJQEAAB8AAAAPAxAACgAAACgBAAAb","AAAADwMQAAoAAAApAQAAGAAAAA8DEAAKAAAAEgEAACUAAAAPAxAACgAAABMBAAApAAAADwMQAAoAAAATAQAARgAAAA8DEAAKAAAA","FAEAACoAAAAPAxAACgAAABUBAAAfAAAADwMQAAoAAAAYAQAAMAAAAA8DEAAKAAAAGAEAABwAAAAPAxAACgAAADsBAAAhAAAADwMQ","AAoAAAAuAQAAGAAAAA8DEAAKAAAAzAAAABYAAAAPAxAACgAAAEwAAAAkAAAADwMQAAoAAABMAAAAQQAAAA8DEAAKAAAATAAAABQA","AAAPAxAACgAAAIQAAAAbAAAADwMQAAoAAACZAAAAMgAAAA8DEAAKAAAAmQAAABoAAAAPAxAACgAAAJUAAAAaAAAADwMQAAoAAACy","AAAAGQAAAA8DEAAKAAAAUwAAACIAAACmAhAAaAAAAD0CAAAJAAAAY2FwYWNpdHkgb3ZlcmZsb3cAAAA3AhAAbgAAABwAAAAFAAAA","zQEQAGkAAABYAgAABQAAADAwMDEwMjAzMDQwNTA2MDcwODA5MTAxMTEyMTMxNDE1MTYxNzE4MTkyMDIxMjIyMzI0MjUyNjI3Mjgy","OTMwMzEzMjMzMzQzNTM2MzczODM5NDA0MTQyNDM0NDQ1NDY0NzQ4NDk1MDUxNTI1MzU0NTU1NjU3NTg1OTYwNjE2MjYzNjQ2NTY2","Njc2ODY5NzA3MTcyNzM3NDc1NzY3Nzc4Nzk4MDgxODI4Mzg0ODU4Njg3ODg4OTkwOTE5MjkzOTQ5NTk2OTc5ODk5dXNlci1wcm92","aWRlZCBjb21wYXJpc29uIGZ1bmN0aW9uIGRvZXMgbm90IGNvcnJlY3RseSBpbXBsZW1lbnQgYSB0b3RhbCBvcmRlcs8AEAB9AAAA","VgMAAAUAAAAAQZiOwAAL0AEAAAAAAQAAAAAAAAD/////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"].join("");x();x();var va=["AGFzbQEAAAABYA1gA39/fwF/YAJ/fwF/YAN/f38AYAV/f39/fwBgBX9/f39/AX9gBH9/f38AYAR/f39/AX9gCH9/f39/f39/AX9g","AX8AYAABf2AHf39/f39/fwF/YAZ/f39/f38Bf2AAAAMkIwIDBAIFBQICAgIGBgYGAwcICQoFCQIBBQILBQYAAQICAgwABAUBcAEC","AgUDAQARBgkBfwFBgIDAAAsHPAUGbWVtb3J5AgAMeWtfaGVhcF9iYXNlABEJeWtfc2VhcmNoABIHeWtfc29ydAATCnlrX3ZlcnNp","b24AFAkHAQBBAQsBHQrEWiO8BgMFfwJ8BH8CQCABQQJJDQACQAJAAkACQAJAAkACQAJAAkAgACgCBCIDIAIoAgAiBCgCBCIFTw0A","IAAoAgAiBiAFTw0BIAQoAgAiByAGQQN0aisDACEIAkACQCAHIANBA3RqKwMAIgkgCWINACAIIAhiDQFBAEEAQX8gCSAIZiIKG0EB","QX4gChsgCSAIZRsiCmsgCiAEKAIILQAAG0H/AXEiCkH/AUYgAyAGSSAKGw0BDAYLIAMgBk8NBSAIIAhhDQULQQIhCkEBIQsgAUEC","Rg0GIABBCGohDEECIQoDQCADIQYgDCgCACIDIAVPDQMgBiAFTw0EIAcgBkEDdGorAwAhCAJAAkAgByADQQN0aisDACIJIAliDQAg","CCAIYg0BQQBBAEF/IAkgCGYiDRtBAUF+IA0bIAkgCGUbIg1rIA0gBCgCCC0AABtB/wFxIg1B/wFGIAMgBkkgDRtBAUYNAUEBIQsM","CQsgAyAGTw0IIAggCGENCAsgDEEEaiEMIAEgCkEBaiIKRw0AC0EBIQsMBQsgAyAFQdSEwIAAEJiAgIAAAAsgBiAFQeSEwIAAEJiA","gIAAAAsgAyAFQdSEwIAAEJiAgIAAAAsgBiAFQeSEwIAAEJiAgIAAAAtBAiEKQQAhCyABQQJGDQEgAEEIaiEMQQIhCgNAIAMhBiAM","KAIAIgMgBU8NAyAGIAVPDQQgByAGQQN0aisDACEIAkACQCAHIANBA3RqKwMAIgkgCWINACAIIAhiDQRBAEEAQX8gCSAIZiING0EB","QX4gDRsgCSAIZRsiDWsgDSAEKAIILQAAG0H/AXEiDUH/AUYgAyAGSSANG0UNAUEAIQsMBAsgAyAGTw0AIAggCGINAwsgDEEEaiEM","IAEgCkEBaiIKRw0ACwsgASEKCwJAIAogAUYNACAAIAFBACABQQFyZ0EBdEE+cyACEIGAgIAADAMLIAtFDQIgAUEBdiEGIAFBAnQg","AGpBfGohAwNAIAAoAgAhCiAAIAMoAgA2AgAgAyAKNgIAIANBfGohAyAAQQRqIQAgBkF/aiIGDQAMAwsLIAMgBUHUhMCAABCYgICA","AAALIAYgBUHkhMCAABCYgICAAAALC7YIBAh/AnwDfwF8I4CAgIAAQRBrIgUkgICAgAACQAJAIAFBIUkNACADQX9qIQMDQAJAIANB","f0cNACAAIAEgBBCJgICAAAwDCyAAIAFBA3YiBkEcbGohByAAIAZBBHRqIQgCQAJAIAFBwABJDQAgACAIIAcgBiAEEIKAgIAAIQYM","AQsCQAJAAkACQAJAAkAgACgCACIGIAQoAgAiCSgCBCIKTw0AIAgoAgAiCyAKTw0BIAkoAgAiDCALQQN0aisDACENAkACQAJAAkAg","DCAGQQN0aisDACIOIA5iIg8NACANIA1hDQFBASEQDAMLIA0gDWINAUEAIRAMAgtBAEEAQX8gDiANZiIRG0EBQX4gERsgDiANZRsi","EWsgESAJKAIILQAAG0H/AXEiEUH/AUYgBiALSSARGyEQDAELIAYgC0khEAsgBygCACIRIApPDQIgDCARQQN0aisDACESAkACQAJA","AkACQAJAAkAgDw0AIBIgEmENASAAIQYgEEUNDSANIA1iDQYMCwsgEiASYg0BIAAhBiAQDQwgDSANYQ0DDAkLQQBBAEF/IA4gEmYi","ChtBAUF+IAobIA4gEmUbIgprIAogCSgCCC0AABtB/wFxIgpB/wFGIAYgEUkgChshCgwBCyAGIBFJIQoLIAAhBiAQIApHDQkgDSAN","Yg0BIBIgEmINBwtBAEEAQX8gDSASZiIGG0EBQX4gBhsgDSASZRsiBmsgBiAJKAIILQAAG0H/AXEiBkH/AUYgCyARSSAGGyEGDAcL","IBIgEmENBAsgCyARSSEGDAULIAYgCkHUhMCAABCYgICAAAALIAsgCkHkhMCAABCYgICAAAALIBEgCkHkhMCAABCYgICAAAALQQAh","BgwBC0EBIQYLIAcgCCAQIAZzGyEGCyAGIABrIgdBAnYhBgJAAkAgAkUNAAJAAkACQCACKAIAIgggBCgCACIJKAIEIgtPDQAgACAH","aigCACIHIAtPDQEgCSgCACILIAdBA3RqKwMAIQ0CQAJAIAsgCEEDdGorAwAiEiASYg0AIA0gDWINBUEAQQBBfyASIA1mIgsbQQFB","fiALGyASIA1lGyILayALIAkoAggtAAAbQf8BcSIJQf8BRiAIIAdJIAkbDQUMAQsgCCAHTw0AIA0gDWINBAsgBSAENgIMIAAgASAG","IAVBDGoQjICAgAAiBkEBaiECIAYgAU8NAiABIAJrIQEgACACQQJ0aiEAQQAhAgwECyAIIAtB1ITAgAAQmICAgAAACyAHIAtB5ITA","gAAQmICAgAAACyACIAEgAUHEhMCAABCXgICAAAALIAAgACABIAYgBBCNgICAACIGIAIgAyAEEIGAgIAAIAEgBkF/c2ohASAAIAZB","AnRqIgJBBGohAAsgA0F/aiEDIAFBIU8NAAsLIAAgASAEEIiAgIAACyAFQRBqJICAgIAAC4kFBAR/AnwCfwF8AkAgA0H4////AXFF","DQAgACAAIANBA3YiA0EEdCIFaiAAIANBHGwiBmogAyAEEIKAgIAAIQAgASABIAVqIAEgBmogAyAEEIKAgIAAIQEgAiACIAVqIAIg","BmogAyAEEIKAgIAAIQILAkACQAJAAkACQAJAAkAgACgCACIDIAQoAgAiBCgCBCIHTw0AIAEoAgAiBSAHTw0BIAQoAgAiCCAFQQN0","aisDACEJAkACQAJAAkAgCCADQQN0aisDACIKIApiIgsNACAJIAlhDQFBASEMDAMLIAkgCWINAUEAIQwMAgtBAEEAQX8gCiAJZiIG","G0EBQX4gBhsgCiAJZRsiBmsgBiAEKAIILQAAG0H/AXEiBkH/AUYgAyAFSSAGGyEMDAELIAMgBUkhDAsgAigCACIGIAdPDQIgCCAG","QQN0aisDACENAkACQAJAAkACQAJAAkAgCw0AIA0gDWENASAMRQ0NIAkgCWINBgwLCyANIA1iDQEgDA0MIAkgCWENAwwJC0EAQQBB","fyAKIA1mIgcbQQFBfiAHGyAKIA1lGyIHayAHIAQoAggtAAAbQf8BcSIHQf8BRiADIAZJIAcbIQMMAQsgAyAGSSEDCyAMIANHDQkg","CSAJYg0BIA0gDWINBwtBAEEAQX8gCSANZiIAG0EBQX4gABsgCSANZRsiAGsgACAEKAIILQAAG0H/AXEiAEH/AUYgBSAGSSAAGyEA","DAcLIA0gDWENBAsgBSAGSSEADAULIAMgB0HUhMCAABCYgICAAAALIAUgB0HkhMCAABCYgICAAAALIAYgB0HkhMCAABCYgICAAAAL","QQAhAAwBC0EBIQALIAIgASAMIABzGyEACyAAC9wDAwR/AnwBfwJAAkAgASgCACIDIAIoAgAiAigCBCIETw0AAkAgAUF8aiIFKAIA","IgYgBE8NACACKAIAIgQgBkEDdGorAwAhBwJAAkAgBCADQQN0aisDACIIIAhiDQAgByAHYg0BQQBBAEF/IAggB2YiBBtBAUF+IAQb","IAggB2UbIgRrIAQgAigCCC0AABtB/wFxIgRB/wFGIAMgBkkgBBtBAUYNAQwECyADIAZPDQMgByAHYQ0DCyABIAY2AgACQCAFIABG","DQAgA0EDdCEJA0AgBSEGAkACQAJAIAMgAigCBCIETw0AIAZBfGoiBSgCACIBIARPDQEgAigCACIEIAFBA3RqKwMAIQcCQAJAIAQg","CWorAwAiCCAIYg0AIAcgB2INBEEAQQBBfyAIIAdmIgQbQQFBfiAEGyAIIAdlGyIEayAEIAIoAggtAAAbQf8BcSIEQf8BRiADIAFJ","IAQbQQFHDQEMBAsgAyABTw0AIAcgB2INAwsgBiEFDAQLIAMgBEHUhMCAABCYgICAAAALIAEgBEHkhMCAABCYgICAAAALIAYgATYC","ACAFIABHDQALCyAFIAM2AgAPCyAGIARB5ITAgAAQmICAgAAACyADIARB1ITAgAAQmICAgAAACwunBQMIfwJ8A38gAiABQQJ0QXxq","IgRqIQUgACAEaiEGIAAgAUEBdiIHQQJ0aiIIQXxqIQkgAygCACEDAkACQAJAAkACQANAIAgoAgAiCiADKAIEIgtPDQEgACgCACIE","IAtPDQIgAygCACILIARBA3RqKwMAIQwCQAJAAkAgCyAKQQN0aisDACINIA1iDQAgDCAMYg0BQQAhC0EAQQBBfyANIAxmIg4bQQFB","fiAOGyANIAxlGyIOayAOIAMoAggtAAAbQf8BcSIOQf8BRiAKIARJIA4bQQFGDQEMAgtBACELIAogBE8NASAMIAxhDQELQQEhCyAK","IQQLIAIgBDYCACAGKAIAIgQgAygCBCIOTw0DIAkoAgAiCiAOTw0EIAtBAnQhDiALQQFzQQJ0IQ8gAygCACILIApBA3RqKwMAIQwC","QAJAAkAgCyAEQQN0aisDACINIA1iDQAgDCAMYg0BQQAhC0EAQQBBfyANIAxmIhAbQQFBfiAQGyANIAxlGyIQayAQIAMoAggtAAAb","Qf8BcSIQQf8BRiAEIApJIBAbQQFGDQEMAgtBACELIAQgCk8NASAMIAxhDQELQQEhCyAKIQQLIAJBBGohAiAIIA5qIQggACAPaiEA","IAUgBDYCACAFQXxqIQUgCSALQQJ0IgRrIQkgBCAGakF8aiEGIAdBf2oiBw0ACyAGQQRqIQQgCUEEaiEDAkAgAUEBcUUNACACIAAg","CCAAIANJIgobKAIANgIAIAggACADT0ECdGohCCAAIApBAnRqIQALAkAgCCAERw0AIAAgA0YNBQsQoYCAgAAACyAKIAtB1ITAgAAQ","mICAgAAACyAEIAtB5ITAgAAQmICAgAAACyAEIA5B1ITAgAAQmICAgAAACyAKIA5B5ITAgAAQmICAgAAACwuDAgICfwJ8AkACQAJA","AkAgACACQQJ0aiIEKAIAIgIgAygCACIDKAIEIgVPDQAgACABQQJ0aiIBKAIAIgAgBU8NASADKAIAIgUgAEEDdGorAwAhBgJAAkAg","BSACQQN0aisDACIHIAdiDQAgBiAGYg0EQQBBAEF/IAcgBmYiBRtBAUF+IAUbIAcgBmUbIgVrIAUgAygCCC0AABtB/wFxIgNB/wFG","IAIgAEkgAxtBAUcNAQwECyACIABPDQAgBiAGYg0DCyAAIQMgAiEADAMLIAIgBUHUhMCAABCYgICAAAALIAAgBUHkhMCAABCYgICA","AAALIAIhAwsgASADNgIAIAQgADYCAAvsAgACQCABQQlJDQAgAEEAQQMgAhCFgICAACAAQQFBByACEIWAgIAAIABBAkEFIAIQhYCA","gAAgAEEEQQggAhCFgICAACAAQQBBByACEIWAgIAAIABBAkEEIAIQhYCAgAAgAEEDQQggAhCFgICAACAAQQVBBiACEIWAgIAAIABB","AEECIAIQhYCAgAAgAEEBQQMgAhCFgICAACAAQQRBBSACEIWAgIAAIABBB0EIIAIQhYCAgAAgAEEBQQQgAhCFgICAACAAQQNBBiAC","EIWAgIAAIABBBUEHIAIQhYCAgAAgAEEAQQEgAhCFgICAACAAQQJBBCACEIWAgIAAIABBA0EFIAIQhYCAgAAgAEEGQQggAhCFgICA","ACAAQQJBAyACEIWAgIAAIABBBEEFIAIQhYCAgAAgAEEGQQcgAhCFgICAACAAQQFBAiACEIWAgIAAIABBA0EEIAIQhYCAgAAgAEEF","QQYgAhCFgICAAA8LAAuEBQACQCABQQ1JDQAgAEEAQQwgAhCFgICAACAAQQFBCiACEIWAgIAAIABBAkEJIAIQhYCAgAAgAEEDQQcg","AhCFgICAACAAQQVBCyACEIWAgIAAIABBBkEIIAIQhYCAgAAgAEEBQQYgAhCFgICAACAAQQJBAyACEIWAgIAAIABBBEELIAIQhYCA","gAAgAEEHQQkgAhCFgICAACAAQQhBCiACEIWAgIAAIABBAEEEIAIQhYCAgAAgAEEBQQIgAhCFgICAACAAQQNBBiACEIWAgIAAIABB","B0EIIAIQhYCAgAAgAEEJQQogAhCFgICAACAAQQtBDCACEIWAgIAAIABBBEEGIAIQhYCAgAAgAEEFQQkgAhCFgICAACAAQQhBCyAC","EIWAgIAAIABBCkEMIAIQhYCAgAAgAEEAQQUgAhCFgICAACAAQQNBCCACEIWAgIAAIABBBEEHIAIQhYCAgAAgAEEGQQsgAhCFgICA","ACAAQQlBCiACEIWAgIAAIABBAEEBIAIQhYCAgAAgAEECQQUgAhCFgICAACAAQQZBCSACEIWAgIAAIABBB0EIIAIQhYCAgAAgAEEK","QQsgAhCFgICAACAAQQFBAyACEIWAgIAAIABBAkEEIAIQhYCAgAAgAEEFQQYgAhCFgICAACAAQQlBCiACEIWAgIAAIABBAUECIAIQ","hYCAgAAgAEEDQQQgAhCFgICAACAAQQVBByACEIWAgIAAIABBBkEIIAIQhYCAgAAgAEECQQMgAhCFgICAACAAQQRBBSACEIWAgIAA","IABBBkEHIAIQhYCAgAAgAEEIQQkgAhCFgICAACAAQQNBBCACEIWAgIAAIABBBUEGIAIQhYCAgAAPCwALlgIBB38jgICAgABBgAFr","IgMkgICAgAACQAJAIAFBAkkNACABQSBLDQEgASABQQF2IgQgAUESSSIFGyEGIAEgBGshByAAIARBAnRqIQggACEJA0ACQAJAIAZB","DEsNAEEBIQQgBkEITQ0BIAkgBiACEIaAgIAAQQkhBAwBCyAJIAYgAhCHgICAAEENIQQLIARBf2ogBk8NAgJAIAQgBkYNACAEQQJ0","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","EJiAgIAAAAsgByAKQeSEwIAAEJiAgIAAAAsgBCABQdSEwIAAEJiAgIAAAAsgBSABQeSEwIAAEJiAgIAAAAuwCAMJfwJ8An8CQCAB","DQBBAA8LIAIoAgAhBCAAKAIAIQVBACEGIAAhAgJAIABBBGoiByAAIAFBAnRqIghBfGoiCU8NACADKAIAIgooAgQhAUEAIQYgACEC","AkACQAJAAkADQCACQQRqIgsoAgAiByABTw0BIAQgAU8NAiAKKAIAIgwgBEEDdGorAwAhDQJAAkACQAJAIAwgB0EDdGorAwAiDiAO","Yg0AIA0gDWENAUEBIQ8MAwsgDSANYg0BQQAhDwwCC0EAQQBBfyAOIA1mIhAbQQFBfiAQGyAOIA1lGyIQayAQIAooAggtAAAbQf8B","cSIQQf8BRiAHIARJIBAbIQ8MAQsgByAESSEPCyACIAAgBkECdGoiECgCADYCACAQIAc2AgAgAkEIaiICKAIAIgcgAU8NAyAGIA9q","IQYCQAJAAkACQCAMIAdBA3RqKwMAIg4gDmINACANIA1hDQFBASEMDAMLIA0gDWINAUEAIQwMAgtBAEEAQX8gDiANZiIMG0EBQX4g","DBsgDiANZRsiDGsgDCAKKAIILQAAG0H/AXEiDEH/AUYgByAESSAMGyEMDAELIAcgBEkhDAsgCyAAIAZBAnRqIhAoAgA2AgAgECAH","NgIAIAYgDGohBiACQQRqIAlPDQQMAAsLIAcgAUHUhMCAABCYgICAAAALIAQgAUHkhMCAABCYgICAAAALIAcgAUHUhMCAABCYgICA","AAALIAJBBGohBwsCQAJAAkACQAJAIAcgCEYNACADKAIAIQEDQCACIQwgByICKAIAIgcgASgCBCIKTw0CIAQgCk8NAyABKAIAIgog","BEEDdGorAwAhDQJAAkACQAJAIAogB0EDdGorAwAiDiAOYg0AIA0gDWENAUEBIQoMAwsgDSANYg0BQQAhCgwCC0EAQQBBfyAOIA1m","IgobQQFBfiAKGyAOIA1lGyIKayAKIAEoAggtAAAbQf8BcSIKQf8BRiAHIARJIAobIQoMAQsgByAESSEKCyAMIAAgBkECdGoiCygC","ADYCACALIAc2AgAgBiAKaiEGIAJBBGoiByAIRw0ACyAHQXxqIQILIAUgAygCACIHKAIEIgFPDQIgBCABTw0DIAcoAgAiASAEQQN0","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","gYCAgAA2AhwgA0GBgICAADYCFCADIANBCGo2AhggAyADQQxqNgIQQaiAwIAAIANBEGogAhCVgICAAAALjwUCBn8BfiOAgICAAEEQ","ayIGJICAgIAAAkACQCABDQAgBUEBaiEHIAAoAgghCEEtIQkMAQtBK0F/IAAoAggiCEGAgIABcSIBGyEJIAFBFXYgBWohBwsCQAJA","IAhBgICABHENAEEAIQIMAQsCQAJAIANBEEkNACACIAMQloCAgAAhCgwBC0EAIQogA0UNACACIQEgAyELA0AgCiABLAAAQb9/Smoh","CiABQQFqIQEgC0F/aiILDQALCyAKIAdqIQcLAkACQAJAAkACQCAHIAAvAQwiCk8NACAIQYCAgAhxDQFBASEBIAYgACAKIAdrQQEQ","moCAgAAgBigCACIHQX9GDQQgBi8BBCELIAAgCSACIAMQm4CAgAANBCAAKAIAIgMgBCAFIAAoAgQiAigCDBGAgICAAICAgIAADQRB","ACEKIAtB//8DcSELA0AgCyAKQf//A3EiAEshASALIABNDQUgCkEBaiEKIAMgByACKAIQEYGAgIAAgICAgABFDQAMBQsLIAAgCSAC","IAMQm4CAgABFDQEMAgsgACAAKQIIIgynQYCAgP95cUGwgICAAnI2AgggACAJIAIgAxCbgICAAA0BQQEhASAGQQhqIAAgCiAHa0EB","EJqAgIAAIAYoAggiC0F/Rg0CIAYvAQwhAiAAKAIAIgcgBCAFIAAoAgQiAygCDBGAgICAAICAgIAADQJBACEKIAJB//8DcSECAkAD","QCACIApB//8DcU0NAUEBIQEgCkEBaiEKIAcgCyADKAIQEYGAgIAAgICAgABFDQAMBAsLIAAgDDcCCEEAIQEMAgsgACgCACAEIAUg","ACgCBCgCDBGAgICAAICAgIAAIQEMAQtBASEBCyAGQRBqJICAgIAAIAELuAEBA38gAiEEAkACQAJAAkAgASgCCCIFQR12QQNxDgQB","AwACAQsgAkH+/wNxQQF2IQQMAgtBACEEDAELIAJBACADQf8BcRshBAsgBUH///8AcSEFIAEoAgQhAyABKAIAIQZBACEBAkACQANA","IAFB//8DcSAEQf//A3FPDQEgAUEBaiEBIAYgBSADKAIQEYGAgIAAgICAgABFDQALQX8hBQwBCyACIARrIQELIAAgATsBBCAAIAU2","AgALUgACQCABQX9GDQAgACgCACABIAAoAgQoAhARgYCAgACAgICAAEUNAEEBDwsCQCACDQBBAA8LIAAoAgAgAiADIAAoAgQoAgwR","gICAgACAgICAAAvRAwEJfwJAAkAgAEHoB08NACAAIQMMAQsgAUF8aiEEQQAhBSAAIQYCQAJAAkACQAJAA0AgBiAGQZDOAG4iA0GQ","zgBsayIHQf//A3FB5ABuIQggAiAFaiIJQXxqIAJPDQEgBCACaiIKIAhBAXQiCy0ApIXAgAA6AAAgCUF9aiACTw0CIApBAWogC0Gl","hcCAAGotAAA6AAAgCUF+aiACTw0DIApBAmogByAIQeQAbGtBAXRB/v8HcSIILQCkhcCAADoAACAJQX9qIAJPDQQgCkEDaiAIQaWF","wIAAai0AADoAACAEQXxqIQQgBUF8aiEFIAZB/6ziBEshCSADIQYgCUUNBQwACwsgCUF8aiACQZSFwIAAEJiAgIAAAAsgCUF9aiAC","QZSFwIAAEJiAgIAAAAsgCUF+aiACQZSFwIAAEJiAgIAAAAsgCUF/aiACQZSFwIAAEJiAgIAAAAsgAiAFaiECCwJAAkAgA0EKTw0A","IAMhBgwBCyABIAJBfmoiAmogAyADQf//A3FB5ABuIgZB5ABsa0H//wNxQQF0LwCkhcCAADsAAAsCQAJAIABFDQAgBkUNAQsgASAC","QX9qIgJqIAZBAXRBHnEtAKWFwIAAOgAACyACC1EBAX8jgICAgABBEGsiAiSAgICAACABQQFBAUEAIAJBBmogACgCACACQQZqQQoQ","nICAgAAiAGpBCiAAaxCZgICAACEAIAJBEGokgICAgAAgAAthAQF/I4CAgIAAQSBrIgMkgICAgAAgAyABNgIMIAMgADYCCCADQYGA","gIAANgIcIANBgYCAgAA2AhQgAyADQQxqNgIYIAMgA0EIajYCEEGAgMCAACADQRBqIAIQlYCAgAAAC2EBAX8jgICAgABBIGsiAySA","gICAACADIAE2AgwgAyAANgIIIANBgYCAgAA2AhwgA0GBgICAADYCFCADIANBDGo2AhggAyADQQhqNgIQQd+AwIAAIANBEGogAhCV","gICAAAALYQEBfyOAgICAAEEgayIDJICAgIAAIAMgATYCDCADIAA2AgggA0GBgICAADYCHCADQYGAgIAANgIUIAMgA0EMajYCGCAD","IANBCGo2AhBBmIHAgAAgA0EQaiACEJWAgIAAAAsYAEHshsCAAEGZAUG4h8CAABCVgICAAAALSgEDf0EAIQMCQCACRQ0AAkADQCAA","LQAAIgQgAS0AACIFRw0BIABBAWohACABQQFqIQEgAkF/aiICRQ0CDAALCyAEIAVrIQMLIAMLC9IHAQBBgIDAAAvIBxZzbGljZSBp","bmRleCBzdGFydHMgYXQgwA0gYnV0IGVuZHMgYXQgwAAgaW5kZXggb3V0IG9mIGJvdW5kczogdGhlIGxlbiBpcyDAEiBidXQgdGhl","IGluZGV4IGlzIMAAEnJhbmdlIHN0YXJ0IGluZGV4IMAiIG91dCBvZiByYW5nZSBmb3Igc2xpY2Ugb2YgbGVuZ3RoIMAAEHJhbmdl","IGVuZCBpbmRleCDAIiBvdXQgb2YgcmFuZ2UgZm9yIHNsaWNlIG9mIGxlbmd0aCDAAC9yb290Ly5ydXN0dXAvdG9vbGNoYWlucy9z","dGFibGUteDg2XzY0LXVua25vd24tbGludXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvY29yZS9zcmMvc2xpY2Uv","c29ydC9zaGFyZWQvc21hbGxzb3J0LnJzAC9yb290Ly5ydXN0dXAvdG9vbGNoYWlucy9zdGFibGUteDg2XzY0LXVua25vd24tbGlu","dXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvY29yZS9zcmMvc2xpY2Uvc29ydC91bnN0YWJsZS9xdWlja3NvcnQu","cnMAL3Jvb3QvLnJ1c3R1cC90b29sY2hhaW5zL3N0YWJsZS14ODZfNjQtdW5rbm93bi1saW51eC1nbnUvbGliL3J1c3RsaWIvc3Jj","L3J1c3QvbGlicmFyeS9jb3JlL3NyYy9mbXQvbnVtLnJzAHNyYy9saWIucnMAAABNARAAfwAAADgAAAAbAAAANwIQAAoAAAAlAAAA","EgAAADcCEAAKAAAAJgAAABIAAAA3AhAACgAAAGAAAAAMAAAANwIQAAoAAABgAAAAIwAAAM0BEABpAAAAWAIAAAUAAAAwMDAxMDIw","MzA0MDUwNjA3MDgwOTEwMTExMjEzMTQxNTE2MTcxODE5MjAyMTIyMjMyNDI1MjYyNzI4MjkzMDMxMzIzMzM0MzUzNjM3MzgzOTQw","NDE0MjQzNDQ0NTQ2NDc0ODQ5NTA1MTUyNTM1NDU1NTY1NzU4NTk2MDYxNjI2MzY0NjU2NjY3Njg2OTcwNzE3MjczNzQ3NTc2Nzc3","ODc5ODA4MTgyODM4NDg1ODY4Nzg4ODk5MDkxOTI5Mzk0OTU5Njk3OTg5OXVzZXItcHJvdmlkZWQgY29tcGFyaXNvbiBmdW5jdGlv","biBkb2VzIG5vdCBjb3JyZWN0bHkgaW1wbGVtZW50IGEgdG90YWwgb3JkZXLPABAAfQAAAFYDAAAFAAAA"].join("");var Dn=1e4,oo="\0";function Fo(e,t){return e==="rust"||e==="auto"&&t>=Dn}var qg=1,$g=65536,Yt=null,vn=null;function Mn(e){if(typeof atob=="function"){let o=atob(e),n=new Uint8Array(o.length);for(let A=0;A<o.length;A++)n[A]=o.charCodeAt(A);return n}let t=globalThis.Buffer;if(t)return new Uint8Array(t.from(e,"base64"));throw new Error("No base64 decoder")}function Lo(){return Yt?Promise.resolve(Yt):(vn||(vn=(async()=>{try{return typeof WebAssembly>"u"?null:(Yt=await WebAssembly.compile(Mn(va)),Yt)}catch{return null}})()),vn)}function Ma(){return Yt}function Da(e){let t=e.isWellFormed;if(typeof t=="function")return t.call(e);for(let o=0;o<e.length;o++){let n=e.charCodeAt(o);if(n>=55296&&n<=56319){let A=e.charCodeAt(o+1);if(A>=56320&&A<=57343){o++;continue}return!1}if(n>=56320&&n<=57343)return!1}return!0}var to=e=>e+7&-8,Ut=class e{x;base;encoder=new TextEncoder;offsetsPtr=0;textPtr=0;textLen=0;rows=0;hasIndex=!1;freePtr;constructor(t){this.x=t,this.base=to(t.yk_heap_base()),this.freePtr=this.base}static create(t=Yt){if(!t)return null;try{let n=new WebAssembly.Instance(t,{}).exports;return n.yk_version()!==qg?null:new e(n)}catch{return null}}ensure(t){let o=t-this.x.memory.buffer.byteLength;o>0&&this.x.memory.grow(Math.ceil(o/$g))}setSearchTexts(t){this.hasIndex=!1,this.freePtr=this.base;try{let o=0;for(let g of t){if(!Da(g))return!1;o+=g.length*3}let n=t.length,A=this.base,i=to(A+(n+1)*4);this.ensure(i+o);let r=this.x.memory.buffer,s=new Uint32Array(r,A,n+1),a=new Uint8Array(r,i,o),l=0;for(let g=0;g<n;g++)s[g]=l,l+=this.encoder.encodeInto(t[g],a.subarray(l)).written??0;return s[n]=l,this.offsetsPtr=A,this.textPtr=i,this.textLen=l,this.rows=n,this.freePtr=to(i+l),this.hasIndex=!0,!0}catch{return!1}}search(t){if(!this.hasIndex||!t||t.includes(oo)||!Da(t))return null;try{let o=this.encoder.encode(t),n=this.freePtr,A=to(n+o.length);this.ensure(A+this.rows*4),new Uint8Array(this.x.memory.buffer,n,o.length).set(o);let i=this.x.yk_search(this.textPtr,this.textLen,this.offsetsPtr,this.rows,n,o.length,A);return new Uint32Array(this.x.memory.buffer,A,i).slice()}catch{return null}}sortByKeys(t,o){try{let n=t.length,A=this.freePtr,i=to(A+n*8);return this.ensure(i+n*4),new Float64Array(this.x.memory.buffer,A,n).set(t),this.x.yk_sort(A,n,o?1:0,i),new Uint32Array(this.x.memory.buffer,i,n).slice()}catch{return null}}};function Po(e){return e>=.1?`${e<10?e.toFixed(1):Math.round(e)} ms`:"<0.1 ms"}function Ht(e,t){let o=new Array(t.length);for(let n=0;n<t.length;n++)o[n]=e[t[n]];return o}var zg=1e3;function no(e,t){return e==="rust"||e==="auto"&&t>=zg}var Wg=1,Jt=null,Gn=null;function Na(){return Jt?Promise.resolve(Jt):(Gn||(Gn=(async()=>{try{return typeof WebAssembly>"u"?null:(Jt=await WebAssembly.compile(Mn(Sa)),Jt)}catch{return null}})()),Gn)}function Ra(){return Jt}var Ga=e=>e+7&-8,Yo=class e{x;encoder=new TextEncoder;docs=0;ready=!1;constructor(t){this.x=t}static create(t=Jt){if(!t)return null;try{let o=new WebAssembly.Instance(t,{}).exports;return o.yk_rag_version()!==Wg?null:new e(o)}catch{return null}}build(t){this.ready=!1;try{let o=this.encoder.encode(t.map(A=>A.join(" ")).join(`
1533
+ `));this.x.yk_rag_reset();let n=this.x.yk_rag_scratch(o.length);return new Uint8Array(this.x.memory.buffer,n,o.length).set(o),this.x.yk_rag_build(n,o.length,t.length),this.docs=t.length,this.ready=!0,!0}catch{return!1}}search(t,o,n,A){if(!this.ready||t.length!==o.length||t.some(i=>!i||/[ \n]/.test(i)))return null;try{let i=Math.max(0,Math.min(A,this.docs)),r=this.encoder.encode(t.join(" ")),s=Ga(r.length),a=s+o.length*8,l=Ga(a+i*4),g=l+i*8,d=this.x.yk_rag_scratch(g),u=this.x.memory.buffer;new Uint8Array(u,d,r.length).set(r),new Float64Array(u,d+s,o.length).set(o);let I=this.x.yk_rag_search(d,r.length,d+s,o.length,n,i,d+a,d+l),y=this.x.memory.buffer,f=new Uint32Array(y,d+a,I),c=new Float64Array(y,d+l,I),p=[];for(let B=0;B<I;B++)p.push({doc:f[B],score:c[B]});return p}catch{return null}}};var Og=new Set("a an the is are was were be to of and or in on at for with what which who whom how why when where does do did this that these those it its from by as about any all please tell me show give".split(" "));function Ao(e){return(e.normalize("NFC").toLowerCase().match(/[\p{L}\p{M}\p{N}]+/gu)??[]).filter(t=>t.length>1&&!Og.has(t))}function Ta(e,t=600){let o=Le(e);if(!o)return[];let n=[],A="",i="",r=()=>{i.trim()&&n.push({id:`page-${n.length+1}`,source:"page",text:i.trim(),ref:A||void 0}),i=""};for(let s of j(o,"h1,h2,h3,h4,p,li,td,th,dt,dd,blockquote,figcaption,label,summary")){if(s.querySelector("p,li,h1,h2,h3,h4"))continue;let a=me(s.textContent);if(a){if(/^H[1-4]$/.test(s.tagName)){r(),A=a,i=`${a}. `;continue}i.length+a.length>t&&r(),i+=`${a} `}}return r(),n}function Fa(e,t,o="id"){return e.map((n,A)=>{let i=n,r=String(i[o]??A+1);return{id:`grid-${r}`,source:"grid",ref:r,text:t.map(s=>`${s.label}: ${String(i[s.key]??"")}`).join(". ")}})}function ro(e={}){let t=[],o=[],n=new Map,A=0,i=null,r=null,s=null,a=!1,l=null;function g(){return no(e.engine,t.length)?r?Promise.resolve(!0):(l||(l=Na().then(f=>(r=f?Yo.create(f):null,!!r))),l):Promise.resolve(!1)}function d(){let f=[...e.includePage===!1?[]:Ta(e.root),...e.rows&&e.columns?Fa(e.rows,e.columns,e.rowKey):[],...(e.documents??[]).map(p=>({id:p.id,source:"custom",text:p.text}))],c=f.map(p=>`${p.source}${p.id}${p.ref??""}${p.text}`).join("");if(c!==i){i=c,t=f,o=t.map(p=>Ao(p.text)),n=new Map;for(let p of o)for(let B of new Set(p))n.set(B,(n.get(B)??0)+1);A=o.reduce((p,B)=>p+B.length,0)/Math.max(1,o.length)}}d(),no(e.engine,t.length)&&Ra()&&g();function u(f,c){if(!r||!no(e.engine,t.length)||!Number.isInteger(c)||c<=0||(s!==o&&(a=r.build(o),s=o),!a))return null;let p=o.length,B=f.map(w=>Math.log(1+(p-(n.get(w)??1)+.5)/((n.get(w)??1)+.5))),h=r.search(f,B,A||1,c);return h?h.map(w=>({...t[w.doc],score:w.score})):null}function I(f,c=5){let p=Ao(f);if(!p.length)return[];let B=u(p,c);if(B)return B;r||g();let h=o.length;return o.map((b,S)=>{let D=0;for(let T of p){let z=0;for(let R of b)(R===T||T.length>=4&&R.startsWith(T)||R.length>=4&&T.startsWith(R))&&z++;if(!z)continue;let Z=Math.log(1+(h-(n.get(T)??1)+.5)/((n.get(T)??1)+.5));D+=Z*(z*2.2/(z+1.2*(.25+.75*(b.length/(A||1)))))}return{...t[S],score:D}}).filter(b=>b.score>0).sort((b,S)=>S.score-b.score).slice(0,c)}async function y(f,c={}){await g();let p=I(f,c.k??4);if(!p.length)return{answer:"I couldn't find anything about that on this page or in the data.",hits:p,generated:!1};if(c.generate)try{let b=p.map((D,T)=>`[${T+1}] ${D.text}`).join(`
1534
+ `),S=await c.generate(f,b);if(S?.trim())return{answer:S.trim(),hits:p,generated:!0}}catch{}let B=new Set(Ao(f)),h=p.flatMap(b=>b.text.split(/(?<=[.!?।])\s+|\.\s+(?=\p{Lu})/u).map(S=>({s:S.trim(),h:b}))).map(({s:b,h:S})=>({s:b,h:S,overlap:Ao(b).filter(D=>B.has(D)).length})).filter(b=>b.s&&b.overlap>0).sort((b,S)=>S.overlap-b.overlap).slice(0,3);return{answer:h.length?h.map(b=>b.h.source==="grid"?`Row ${b.h.ref}: ${b.s}`:b.s).join(`
1535
+ `):p[0].text.slice(0,300),hits:p,generated:!1}}return{search:I,ask:y,rebuild:d,update(f){Object.assign(e,f),d()},size:()=>t.length,get engine(){return r&&no(e.engine,t.length)?"rust":"ts"},whenEngineReady:()=>g().then(f=>f?"rust":"ts")}}var q=require("react/jsx-runtime"),Ka="yuktai-tools-open";async function Zg(){try{if(typeof window>"u")return!1;let e=window;if(e.LanguageModel)try{if(typeof e.LanguageModel.availability=="function"){let o=await e.LanguageModel.availability();if(o==="readily"||o==="available"||o==="downloadable")return!0}else return!0}catch{}if(e.Summarizer)try{let o=await e.Summarizer.availability?.();if(!o||o==="readily"||o==="available")return!0}catch{}if(e.Rewriter)try{let o=await e.Rewriter.availability?.();if(!o||o==="readily"||o==="available")return!0}catch{}if(e.Writer)try{let o=await e.Writer.availability?.();if(!o||o==="readily"||o==="available")return!0}catch{}let t=e.ai||globalThis.ai;if(t){if(t.languageModel?.availability)try{let o=await t.languageModel.availability();if(o==="readily"||o==="available")return!0}catch{}if(t.languageModel&&typeof t.languageModel.create=="function"||t.summarizer||t.rewriter||t.writer||t.languageModel)return!0}return!!(e.Translator||e.translation?.canTranslate)}catch{return!1}}function Uo({position:e="left",children:t,config:o={},showRag:n=!1,showAgent:A=!1,showAccessibility:i,showVibeCoder:r,launcher:s,engine:a}){let l=i!==void 0||r!==void 0||s!==void 0,g=l?!!i:!0,d=l?!!r:A,u=n,I=A,[y,f]=(0,W.useState)(!1),c=!s||y,[p,B]=(0,W.useState)(!1),[h,w]=(0,W.useState)(En),[b,S]=(0,W.useState)(null),[D,T]=(0,W.useState)(!1),[z,Z]=(0,W.useState)(!1),[R,G]=(0,W.useState)(!1),k=W.default.useRef(null),[ee,te]=(0,W.useState)(!1),[$,ce]=(0,W.useState)(""),[ue,P]=(0,W.useState)(""),[_,H]=(0,W.useState)(!1),[Y,ie]=(0,W.useState)(null),[V,le]=(0,W.useState)("idle"),[be,Ee]=(0,W.useState)(!1),[K,de]=(0,W.useState)(""),[Ne,Re]=(0,W.useState)(""),[Ce,fe]=(0,W.useState)(!1),[rt,je]=(0,W.useState)([]),[we,Je]=(0,W.useState)(null),mt=M=>{let oe=[],E=s?84:24;for(let J of M)oe.push(E),J&&(E+=60);return oe},[ho,Te,Se,Ze]=l?mt([g,u,I,d]):[24,84,n?144:84,204],[et,Ct]=(0,W.useState)(!1),ft=a!==void 0,[xt,ht]=(0,W.useState)([]),[yt,bt]=(0,W.useState)(null),it=W.default.useRef(null);(0,W.useEffect)(()=>{if(typeof window>"u")return;let M=window;!!(M.LanguageModel||M.ai?.languageModel)&&z?(ie("gemini"),Je("gemini")):jt()&&(ie("transformers"),Je("transformers"))},[z]),(0,W.useEffect)(()=>{if(Y!=="transformers")return;let M=setInterval(()=>le(Rt()),500);return()=>clearInterval(M)},[Y]);let An=M=>M.replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/#+\s/g,"").trim(),yo=(0,W.useCallback)(async()=>{let M=$.trim();if(!(!M||_)){H(!0),P(""),ht([]),bt(null);try{it.current?it.current.rebuild():it.current=ro({engine:a}),await it.current.whenEngineReady();let oe=performance.now(),E=await it.current.ask(M,{k:4}),J=performance.now()-oe;if(P(E.answer),ht(E.hits.slice(0,3).map(X=>X.text.length>160?`${X.text.slice(0,157)}\u2026`:X.text)),bt({ms:J,engine:it.current.engine,ai:!1}),E.hits.length&&Y){let X=E.hits.map(ke=>ke.text).join(`
1536
+ `),ne;if(Y==="gemini"){let{askWithContext:ke}=await Promise.resolve().then(()=>(Go(),yn));ne=await ke(M,X)}else{le("loading");let{answerFromContext:ke}=await Promise.resolve().then(()=>(Tt(),No));ne=await ke(M,X),le(Rt())}ne.success&&ne.answer&&(P(An(ne.answer)),bt(ke=>ke&&{...ke,ai:!0}))}}catch{P(oe=>oe||"\u26A0\uFE0F Something went wrong.")}H(!1)}},[$,_,Y,a]),kt=(0,W.useCallback)(async()=>{if(ft)return yo();if(!(!$.trim()||_)){if(!Y){P("\u26A0\uFE0F No AI engine available.");return}H(!0),P("");try{let M;if(Y==="gemini"){let{askPage:oe}=await Promise.resolve().then(()=>(Go(),yn));M=await oe($)}else{le("loading");let{askPageWithTransformers:oe}=await Promise.resolve().then(()=>(Tt(),No));M=await oe($),le("ready")}P(M.success&&M.answer?M.answer.replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/#+\s/g,"").trim():"\u26A0\uFE0F "+(M.error||"No answer found."))}catch{P("\u26A0\uFE0F Something went wrong.")}H(!1)}},[$,_,Y,ft,yo]),Ot=(0,W.useCallback)(async()=>{if(!K.trim()||Ce)return;if(!we){Re("\u26A0\uFE0F No AI engine available.");return}fe(!0),je([]),Re("");let{runAgent:M}=await Promise.resolve().then(()=>(Ja(),Ha));await M(K,we,oe=>{je(E=>[...E,oe.text])}),fe(!1),Re("done")},[K,Ce,we]);(0,W.useEffect)(()=>{if(typeof window>"u")return;let oe=setTimeout(async()=>{let E=window,J=await Zg();Z(J),G(!!(E.SpeechRecognition||E.webkitSpeechRecognition))},800);return()=>clearTimeout(oe)},[]),(0,W.useEffect)(()=>{if(!(typeof window>"u"))try{let M=localStorage.getItem("yuktai-a11y-prefs");M&&w(oe=>({...oe,...JSON.parse(M)}))}catch{}},[]);let Vt=(0,W.useCallback)(async M=>{let oe={enabled:!0,highContrast:M.highContrast,darkMode:M.darkMode,reduceMotion:M.reduceMotion,largeTargets:M.largeTargets,speechEnabled:M.speechEnabled,autoFix:M.autoFix,dyslexiaFont:M.dyslexiaFont,localFont:M.localFont,fontSizeMultiplier:M.fontScale/100,colorBlindMode:M.colorBlindMode,showAuditBadge:M.showAuditBadge,showSkipLinks:!0,showPreferencePanel:!1,plainEnglish:M.plainEnglish,summarisePage:M.summarisePage,translateLanguage:M.translateLanguage,voiceControl:M.voiceControl,smartLabels:M.smartLabels,...o};await ve.execute(oe),S(ve.applyFixes(oe)),T(!0)},[o]),bo=(0,W.useCallback)(async()=>{try{localStorage.setItem("yuktai-a11y-prefs",JSON.stringify(h))}catch{}await Vt(h),B(!1)},[h,Vt]),_t=(0,W.useCallback)(()=>{w(En);try{localStorage.removeItem("yuktai-a11y-prefs")}catch{}let M=document.documentElement;["data-yuktai-high-contrast","data-yuktai-dark","data-yuktai-reduce-motion","data-yuktai-large-targets","data-yuktai-keyboard","data-yuktai-dyslexia"].forEach(oe=>M.removeAttribute(oe)),document.body.style.filter="",document.body.style.fontFamily="",document.documentElement.style.fontSize="",S(null),T(!1)},[]),St=(0,W.useCallback)((M,oe)=>{w(E=>({...E,[M]:oe}))},[]);(0,W.useEffect)(()=>{let M=oe=>{oe.key==="Escape"&&(p||ee||be||et?(B(!1),te(!1),Ee(!1),Ct(!1)):s&&y&&f(!1))};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[p,ee,be,et,s,y]),(0,W.useEffect)(()=>{if(s)try{localStorage.getItem(Ka)==="1"&&f(!0)}catch{}},[s]),(0,W.useEffect)(()=>{if(!(!s||typeof document>"u")){document.documentElement.setAttribute("data-yuktai-tools",y?"open":"closed");try{localStorage.setItem(Ka,y?"1":"0")}catch{}}},[s,y]);let Bo=(0,W.useCallback)(()=>{f(M=>(M&&(B(!1),te(!1),Ee(!1),Ct(!1)),!M))},[]);(0,W.useEffect)(()=>{p&&k.current&&ve.trapFocus(k.current)},[p]);let Bt=(M,oe,E)=>({position:"fixed",bottom:`${M}px`,[e]:"24px",zIndex:9998,width:"52px",height:"52px",borderRadius:"50%",background:oe,color:"#fff",border:"none",cursor:"pointer",fontSize:"22px",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 4px 16px rgba(0,0,0,0.25)",transition:"transform 0.15s, background 0.2s"}),st=M=>{M.currentTarget.style.transform="scale(1.08)"},Ae=M=>{M.currentTarget.style.transform="scale(1)"},rn=ft?`${a==="ts"?"Page search":"Rust page search"}${Y==="gemini"?" + Gemini Nano":Y==="transformers"?" + Transformers.js":" \xB7 On device"}`:Y==="gemini"?"Gemini Nano \xB7 On device":Y==="transformers"?"Transformers.js \xB7 All devices":"Detecting...",We=ft||!!Y,sn=Y==="transformers"&&V==="loading"?"Loading model...":"...";return(0,q.jsxs)(q.Fragment,{children:[t,s&&(0,q.jsx)("button",{type:"button",style:Bt(24,y?"#134e4a":"#0f766e",y),"aria-expanded":y,"aria-label":y?"Hide yuktai tools":"Show yuktai tools",title:y?"Hide yuktai tools":"yuktai tools","data-yuktai-launcher":"true",onClick:Bo,onMouseEnter:st,onMouseLeave:Ae,children:y?(0,q.jsx)("svg",{"aria-hidden":"true",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",children:(0,q.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})}):(0,q.jsxs)("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("path",{d:"M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8z"}),(0,q.jsx)("path",{d:"M19 15l.8 2.2L22 18l-2.2.8L19 21l-.8-2.2L16 18l2.2-.8z"})]})}),d&&c&&(0,q.jsx)("button",{style:Bt(Ze,et?"#d97706":"#f59e0b",et),"aria-label":"Open Vibe Coder",title:"\u26A1 Vibe Coder \u2014 Generate Next.js project",onClick:()=>{Ct(M=>!M),Ee(!1),te(!1),B(!1)},onMouseEnter:st,onMouseLeave:Ae,children:"\u26A1"}),d&&c&&et&&(0,q.jsx)(kn,{position:e,onClose:()=>Ct(!1)}),I&&c&&(0,q.jsx)("button",{style:Bt(Se,be?"#059669":"#10b981",be),"aria-label":"Open AI agent","aria-haspopup":"dialog","aria-expanded":be,title:"\u{1F916} AI Agent \u2014 guide me through this page",onClick:()=>{Ee(M=>!M),te(!1),B(!1)},onMouseEnter:st,onMouseLeave:Ae,children:"\u{1F916}"}),I&&c&&be&&(0,q.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"yuktai AI Agent","data-yuktai-panel":"true",style:{position:"fixed",bottom:`${Se+64}px`,[e]:"24px",zIndex:9999,width:"300px",maxWidth:"calc(100vw - 48px)",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px",boxShadow:"0 8px 32px rgba(0,0,0,0.12)",fontFamily:"system-ui,-apple-system,sans-serif",padding:"14px",maxHeight:"70vh",overflowY:"auto"},children:[(0,q.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"10px"},children:[(0,q.jsxs)("div",{children:[(0,q.jsx)("p",{style:{margin:"0 0 2px",fontSize:"13px",fontWeight:600,color:"#0f172a"},children:"\u{1F916} AI Agent"}),(0,q.jsx)("p",{style:{margin:0,fontSize:"10px",color:"#10b981"},children:we==="gemini"?"Gemini Nano \xB7 On device":we==="transformers"?"Transformers.js \xB7 All devices":"Detecting..."})]}),(0,q.jsx)("button",{onClick:()=>Ee(!1),"aria-label":"Close agent panel",style:{background:"none",border:"none",cursor:"pointer",color:"#94a3b8",fontSize:"18px",lineHeight:1,padding:"2px"},children:"\xD7"})]}),(0,q.jsx)("p",{style:{margin:"0 0 8px",fontSize:"11px",color:"#64748b"},children:"Tell me what you want to do on this page. I will guide you step by step."}),(0,q.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",marginBottom:"8px"},children:["Fill this form","Find contact info","What is this page?","Guide me to apply"].map(M=>(0,q.jsx)("button",{onClick:()=>de(M),style:{padding:"3px 8px",borderRadius:"20px",fontSize:"10px",border:"1px solid #e2e8f0",background:"#f8fafc",color:"#64748b",cursor:"pointer"},children:M},M))}),(0,q.jsxs)("div",{style:{display:"flex",gap:"6px",marginBottom:"8px"},children:[(0,q.jsx)("input",{type:"text",value:K,onChange:M=>de(M.target.value),onKeyDown:M=>{M.key==="Enter"&&Ot()},placeholder:"e.g. Help me fill this form",disabled:Ce||!we,"aria-label":"Tell the agent what to do",style:{flex:1,padding:"8px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"12px",color:"#0f172a",background:we?"#fff":"#f8fafc",outline:"none",height:"36px"}}),(0,q.jsx)("button",{onClick:Ot,disabled:Ce||!K.trim()||!we,"aria-label":"Run agent",style:{padding:"8px 12px",borderRadius:"8px",border:"none",background:we&&K.trim()&&!Ce?"#10b981":"#e2e8f0",color:we&&K.trim()&&!Ce?"#fff":"#94a3b8",fontSize:"12px",fontWeight:600,cursor:we&&K.trim()&&!Ce?"pointer":"not-allowed",height:"36px",minWidth:"52px",transition:"background 0.2s"},children:Ce?"...":"Go"})]}),rt.length>0&&(0,q.jsxs)("div",{style:{padding:"10px 12px",background:"#f0fdf4",border:"1px solid #86efac",borderRadius:"8px",fontSize:"11px",color:"#166534",lineHeight:1.7},children:[rt.map((M,oe)=>(0,q.jsx)("p",{style:{margin:"0 0 2px"},children:M},oe)),Ne==="done"&&(0,q.jsx)("button",{onClick:()=>{je([]),de(""),Re("")},style:{display:"block",marginTop:"6px",background:"none",border:"none",color:"#94a3b8",fontSize:"10px",cursor:"pointer",padding:0},children:"Clear"})]}),!we&&(0,q.jsx)("p",{style:{margin:"4px 0 0",fontSize:"10px",color:"#94a3b8"},children:"Enable Gemini Nano via chrome://flags for best results."})]}),u&&c&&(0,q.jsx)("button",{style:Bt(Te,ee?"#7c3aed":"#6d28d9",ee),"aria-label":"Ask a question about this page","aria-haspopup":"dialog","aria-expanded":ee,title:`\u{1F4AC} Ask this page \xB7 ${rn}`,onClick:()=>{te(M=>!M),B(!1),Ee(!1)},onMouseEnter:st,onMouseLeave:Ae,children:"\u{1F4AC}"}),u&&c&&ee&&(0,q.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Ask this page","data-yuktai-panel":"true",style:{position:"fixed",bottom:`${Te+64}px`,[e]:"24px",zIndex:9999,width:"300px",maxWidth:"calc(100vw - 48px)",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px",boxShadow:"0 8px 32px rgba(0,0,0,0.12)",fontFamily:"system-ui,-apple-system,sans-serif",padding:"14px"},children:[(0,q.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"10px"},children:[(0,q.jsxs)("div",{children:[(0,q.jsx)("p",{style:{margin:"0 0 2px",fontSize:"13px",fontWeight:600,color:"#0f172a"},children:"\u{1F4AC} Ask this page"}),(0,q.jsx)("p",{style:{margin:0,fontSize:"10px",color:"#7c3aed"},children:rn}),Y==="transformers"&&V==="loading"&&(0,q.jsx)("p",{style:{margin:"2px 0 0",fontSize:"9px",color:"#94a3b8"},children:"Downloading model \u2014 first time only"}),Y==="transformers"&&V==="ready"&&(0,q.jsx)("p",{style:{margin:"2px 0 0",fontSize:"9px",color:"#10b981"},children:"Model ready \u2705 \u2014 works offline"})]}),(0,q.jsx)("button",{onClick:()=>te(!1),"aria-label":"Close ask panel",style:{background:"none",border:"none",cursor:"pointer",color:"#94a3b8",fontSize:"18px",lineHeight:1,padding:"2px"},children:"\xD7"})]}),(0,q.jsxs)("div",{style:{display:"flex",gap:"6px",marginBottom:"8px"},children:[(0,q.jsx)("input",{type:"text",value:$,onChange:M=>ce(M.target.value),onKeyDown:M=>{M.key==="Enter"&&kt()},placeholder:"e.g. What does this page do?",disabled:_||!We,"aria-label":"Ask a question about this page",style:{flex:1,padding:"8px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"12px",color:"#0f172a",background:We?"#fff":"#f8fafc",outline:"none",height:"36px"}}),(0,q.jsx)("button",{onClick:kt,disabled:_||!$.trim()||!We,"aria-label":"Submit question",style:{padding:"8px 12px",borderRadius:"8px",border:"none",background:We&&$.trim()&&!_?"#7c3aed":"#e2e8f0",color:We&&$.trim()&&!_?"#fff":"#94a3b8",fontSize:"12px",fontWeight:600,cursor:We&&$.trim()&&!_?"pointer":"not-allowed",height:"36px",minWidth:"48px",transition:"background 0.2s"},children:_?sn:"Ask"})]}),ue&&(0,q.jsxs)("div",{"aria-live":"polite",style:{padding:"10px",background:"#f5f3ff",borderRadius:"8px",fontSize:"12px",color:"#4c1d95",lineHeight:1.6,maxHeight:ft?"260px":"180px",overflowY:"auto",whiteSpace:"pre-line"},children:[(0,q.jsx)("strong",{style:{display:"block",marginBottom:"4px",fontSize:"11px",color:"#7c3aed"},children:"\u{1F4AC} Answer"}),ue,xt.length>0&&(0,q.jsxs)("div",{style:{marginTop:"8px"},children:[(0,q.jsx)("strong",{style:{display:"block",fontSize:"10px",color:"#6d28d9"},children:"From this page"}),(0,q.jsx)("ul",{style:{margin:"4px 0 0",paddingLeft:"16px",fontSize:"11px",color:"#5b21b6"},children:xt.map((M,oe)=>(0,q.jsx)("li",{style:{marginBottom:"2px"},children:M},oe))})]}),yt&&(0,q.jsxs)("p",{style:{margin:"6px 0 0",fontSize:"10px",color:"#6d28d9"},children:["\u26A1 Found in ",Po(yt.ms)," \xB7 ",yt.engine==="rust"?"Rust":"TS"," \xB7 on device",yt.ai?" \xB7 answer written by AI":""]}),(0,q.jsx)("button",{onClick:()=>{P(""),ce(""),ht([]),bt(null)},style:{display:"block",marginTop:"6px",background:"none",border:"none",color:"#94a3b8",fontSize:"10px",cursor:"pointer",padding:0},children:"Clear"})]}),!We&&(0,q.jsx)("p",{style:{margin:"4px 0 0",fontSize:"10px",color:"#94a3b8"},children:"Detecting AI engine..."})]}),g&&c&&(0,q.jsx)("button",{style:Bt(ho,D?"#0d9488":"#1a73e8",p),"aria-label":"Open accessibility preferences","aria-haspopup":"dialog","aria-expanded":p,"data-yuktai-pref-toggle":"true",title:"\u267F Accessibility settings",onClick:()=>{B(M=>!M),te(!1),Ee(!1)},onMouseEnter:st,onMouseLeave:Ae,children:"\u267F"}),g&&c&&p&&(0,q.jsx)(wn,{ref:k,position:e,settings:h,report:b,isActive:D,aiSupported:z,voiceSupported:R,set:St,onApply:bo,onReset:_t,onClose:()=>B(!1)})]})}x();var io={name:"ai.text",async execute(e){return`\u{1F916} YuktAI says: ${e}`}};x();var so={name:"voice.text",async execute(e){return!e||e.trim()===""?"\u{1F3A4} No speech detected":`\u{1F3A4} You said: ${e}`}};x();var gt=class{plugins=new Map;register(t,o){if(!o||typeof o.execute!="function")throw new Error(`Invalid plugin: ${t}`);this.plugins.set(t,o)}use(t){return this.plugins.get(t)}async run(t,o){try{let n=this.use(t);if(!n)throw new Error(`Plugin not found: ${t}`);return await n.execute(o)}catch(n){throw console.error(`[YuktAI Runtime Error in ${t}]:`,n),n}}getPlugins(){return Array.from(this.plugins.keys())}};x();var ae=require("react");x();var ge=require("react"),N=require("react/jsx-runtime"),qa={"en-US":{title:"Grid AI Assistant",subtitle:"Ask about your data",ask:"Ask",placeholder:"Ask or type a command...",listening:"Listening...",send:"Send",close:"Close",open:"Open AI assistant",inputLanguage:"Input language",speakNow:"Speak your question",working:"Working on it\u2026",english:"English",telugu:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41",searchStarted:e=>`Searching for "${e}".`,sortedAscending:e=>`Sorted by ${e} in ascending order.`,sortedDescending:e=>`Sorted by ${e} in descending order.`,count:e=>`There are ${e} rows in the grid.`,highest:(e,t,o)=>`The highest ${e} is ${t}, held by ${o}.`,lowest:(e,t,o)=>`The lowest ${e} is ${t}, held by ${o}.`,average:(e,t)=>`The average ${e} is ${t}.`,total:(e,t)=>`The total ${e} is ${t}.`,noData:"There is no data to analyze.",noColumn:"I could not find a column to analyze.",noNumericData:e=>`There is no numeric data in ${e}.`,notFound:e=>`I could not find anything matching "${e}".`,needName:"Please provide a value to look up.",fallback:"I can search, sort, count, and analyze the grid data.",unsupportedVoice:"Voice input is not supported in this browser."},"te-IN":{title:"\u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D AI \u0C38\u0C39\u0C3E\u0C2F\u0C15\u0C41\u0C21\u0C41",subtitle:"\u0C2E\u0C40 \u0C21\u0C47\u0C1F\u0C3E \u0C17\u0C41\u0C30\u0C3F\u0C02\u0C1A\u0C3F \u0C05\u0C21\u0C17\u0C02\u0C21\u0C3F",ask:"\u0C05\u0C21\u0C17\u0C02\u0C21\u0C3F",placeholder:"\u0C2A\u0C4D\u0C30\u0C36\u0C4D\u0C28 \u0C32\u0C47\u0C26\u0C3E \u0C06\u0C26\u0C47\u0C36\u0C02 \u0C1F\u0C48\u0C2A\u0C4D \u0C1A\u0C47\u0C2F\u0C02\u0C21\u0C3F...",listening:"\u0C35\u0C3F\u0C02\u0C1F\u0C41\u0C28\u0C4D\u0C28\u0C3E\u0C28\u0C41...",send:"\u0C2A\u0C02\u0C2A\u0C02\u0C21\u0C3F",close:"\u0C2E\u0C42\u0C38\u0C3F\u0C35\u0C47\u0C2F\u0C02\u0C21\u0C3F",open:"AI \u0C38\u0C39\u0C3E\u0C2F\u0C15\u0C41\u0C21\u0C3F\u0C28\u0C3F \u0C24\u0C46\u0C30\u0C35\u0C02\u0C21\u0C3F",inputLanguage:"\u0C07\u0C28\u0C4D\u200C\u0C2A\u0C41\u0C1F\u0C4D \u0C2D\u0C3E\u0C37",speakNow:"\u0C2E\u0C40 \u0C2A\u0C4D\u0C30\u0C36\u0C4D\u0C28 \u0C1A\u0C46\u0C2A\u0C4D\u0C2A\u0C02\u0C21\u0C3F",working:"\u0C1A\u0C47\u0C38\u0C4D\u0C24\u0C41\u0C28\u0C4D\u0C28\u0C3E\u0C28\u0C41\u2026",english:"English",telugu:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41",searchStarted:e=>`\u201C${e}\u201D \u0C15\u0C4B\u0C38\u0C02 \u0C36\u0C4B\u0C27\u0C3F\u0C38\u0C4D\u0C24\u0C41\u0C28\u0C4D\u0C28\u0C3E\u0C28\u0C41.`,sortedAscending:e=>`${e}\u0C28\u0C41 \u0C06\u0C30\u0C4B\u0C39\u0C23 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u0C32\u0C4B \u0C05\u0C2E\u0C30\u0C4D\u0C1A\u0C3E\u0C28\u0C41.`,sortedDescending:e=>`${e}\u0C28\u0C41 \u0C05\u0C35\u0C30\u0C4B\u0C39\u0C23 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u0C32\u0C4B \u0C05\u0C2E\u0C30\u0C4D\u0C1A\u0C3E\u0C28\u0C41.`,count:e=>`\u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D\u200C\u0C32\u0C4B \u0C2E\u0C4A\u0C24\u0C4D\u0C24\u0C02 ${e} \u0C35\u0C30\u0C41\u0C38\u0C32\u0C41 \u0C09\u0C28\u0C4D\u0C28\u0C3E\u0C2F\u0C3F.`,highest:(e,t,o)=>`\u0C05\u0C24\u0C4D\u0C2F\u0C27\u0C3F\u0C15 ${e} \u0C35\u0C3F\u0C32\u0C41\u0C35 ${t}. \u0C07\u0C26\u0C3F ${o}\u0C15\u0C41 \u0C38\u0C02\u0C2C\u0C02\u0C27\u0C3F\u0C02\u0C1A\u0C3F\u0C28\u0C26\u0C3F.`,lowest:(e,t,o)=>`\u0C05\u0C24\u0C4D\u0C2F\u0C32\u0C4D\u0C2A ${e} \u0C35\u0C3F\u0C32\u0C41\u0C35 ${t}. \u0C07\u0C26\u0C3F ${o}\u0C15\u0C41 \u0C38\u0C02\u0C2C\u0C02\u0C27\u0C3F\u0C02\u0C1A\u0C3F\u0C28\u0C26\u0C3F.`,average:(e,t)=>`${e} \u0C38\u0C17\u0C1F\u0C41 \u0C35\u0C3F\u0C32\u0C41\u0C35 ${t}.`,total:(e,t)=>`${e} \u0C2E\u0C4A\u0C24\u0C4D\u0C24\u0C02 \u0C35\u0C3F\u0C32\u0C41\u0C35 ${t}.`,noData:"\u0C35\u0C3F\u0C36\u0C4D\u0C32\u0C47\u0C37\u0C3F\u0C02\u0C1A\u0C21\u0C3E\u0C28\u0C3F\u0C15\u0C3F \u0C21\u0C47\u0C1F\u0C3E \u0C32\u0C47\u0C26\u0C41.",noColumn:"\u0C35\u0C3F\u0C36\u0C4D\u0C32\u0C47\u0C37\u0C3F\u0C02\u0C1A\u0C21\u0C3E\u0C28\u0C3F\u0C15\u0C3F \u0C24\u0C17\u0C3F\u0C28 \u0C15\u0C3E\u0C32\u0C2E\u0C4D \u0C15\u0C28\u0C2C\u0C21\u0C32\u0C47\u0C26\u0C41.",noNumericData:e=>`${e}\u0C32\u0C4B \u0C38\u0C02\u0C16\u0C4D\u0C2F\u0C3E \u0C38\u0C2E\u0C3E\u0C1A\u0C3E\u0C30\u0C02 \u0C32\u0C47\u0C26\u0C41.`,notFound:e=>`\u201C${e}\u201D\u0C15\u0C41 \u0C38\u0C30\u0C3F\u0C2A\u0C4B\u0C32\u0C47 \u0C38\u0C2E\u0C3E\u0C1A\u0C3E\u0C30\u0C02 \u0C15\u0C28\u0C2C\u0C21\u0C32\u0C47\u0C26\u0C41.`,needName:"\u0C36\u0C4B\u0C27\u0C3F\u0C02\u0C1A\u0C21\u0C3E\u0C28\u0C3F\u0C15\u0C3F \u0C12\u0C15 \u0C35\u0C3F\u0C32\u0C41\u0C35 \u0C07\u0C35\u0C4D\u0C35\u0C02\u0C21\u0C3F.",fallback:"\u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D\u200C\u0C32\u0C4B \u0C36\u0C4B\u0C27\u0C28, \u0C15\u0C4D\u0C30\u0C2E\u0C2C\u0C26\u0C4D\u0C27\u0C40\u0C15\u0C30\u0C23, \u0C32\u0C46\u0C15\u0C4D\u0C15\u0C3F\u0C02\u0C2A\u0C41 \u0C2E\u0C30\u0C3F\u0C2F\u0C41 \u0C21\u0C47\u0C1F\u0C3E \u0C35\u0C3F\u0C36\u0C4D\u0C32\u0C47\u0C37\u0C23 \u0C1A\u0C47\u0C2F\u0C17\u0C32\u0C28\u0C41.",unsupportedVoice:"\u0C08 \u0C2C\u0C4D\u0C30\u0C4C\u0C1C\u0C30\u0C4D\u200C\u0C32\u0C4B \u0C35\u0C3E\u0C2F\u0C3F\u0C38\u0C4D \u0C07\u0C28\u0C4D\u200C\u0C2A\u0C41\u0C1F\u0C4D\u200C\u0C15\u0C41 \u0C2E\u0C26\u0C4D\u0C26\u0C24\u0C41 \u0C32\u0C47\u0C26\u0C41."}};function $e(e){return e.toLowerCase().trim().replace(/\s+/g," ")}function ec(e,t){let o=$e(e);if(t==="te-IN")return/^(శోధించు|శోధించండి|వెతుకు|వెతకండి|చూపించు|చూపించండి|ఫిల్టర్)/.test(o)?{type:"search",payload:o.replace(/^(శోధించు|శోధించండి|వెతుకు|వెతకండి|చూపించు|చూపించండి|ఫిల్టర్)\s*/u,"").trim()||e}:/క్రమబద్ధీకర|అమర్చ|సార్ట్/.test(o)?{type:"sort",payload:{key:void 0,dir:/అవరోహణ|పెద్ద|అధిక|చివర/.test(o)?"desc":"asc"}}:/ఎన్ని|ఎంతమంది|లెక్క|మొత్తం వరుస|వరుసలు/.test(o)?{type:"question",payload:e}:/అత్యధిక|గరిష్ఠ|పెద్ద|ఎక్కువ/.test(o)?{type:"question",payload:e}:/అత్యల్ప|కనిష్ఠ|చిన్న|తక్కువ/.test(o)?{type:"question",payload:e}:/సగటు|సగటు విలువ/.test(o)?{type:"question",payload:e}:/మొత్తం|కలిపి/.test(o)?{type:"question",payload:e}:{type:"search",payload:e};if(/^(search|find|show|filter)/.test(o))return{type:"search",payload:o.replace(/^(search|find|show|filter)\s+(for\s+|by\s+)?/,"").trim()||e};if(/sort/.test(o)){let n=/desc|descending|high|higher|large|largest|top/.test(o);return{type:"sort",payload:{key:o.match(/(?:by|on)\s+([a-z0-9_-]+)/)?.[1],dir:n?"desc":"asc"}}}return/how many|count|highest|maximum|max|top|largest|lowest|minimum|min|smallest|bottom|average|avg|mean|sum|total|who|which|where|whose/.test(o)?{type:"question",payload:e}:{type:"search",payload:e}}function $a(e,t){let o=$e(e);return t.find(n=>{let A=$e(n.key),i=$e(n.label);return o.includes(A)||o.includes(i)})}function Ho(e,t){return e.toLocaleString(t==="te-IN"?"te-IN":"en-IN")}function tc(e,t,o,n){let A=qa[n];if(t.length===0)return A.noData;let i=$e(e),r=o.filter(B=>B.type==="number"),s=$a(e,o),a=s?.type==="number"?s:r[0],l=/how many|count|rows|ఎన్ని|ఎంతమంది|లెక్క|వరుసలు/.test(i);if(l)return A.count(t.length);if(/highest|maximum|max|top|largest|అత్యధిక|గరిష్ఠ|పెద్ద|ఎక్కువ/.test(i)){let B=s??a;if(!B)return A.noColumn;let h=t.map(D=>({row:D,value:Number(D[B.key])})).filter(D=>!Number.isNaN(D.value)).sort((D,T)=>T.value-D.value);if(h.length===0)return A.noNumericData(B.label);let w=h[0],b=o.find(D=>D.key==="name"||$e(D.label)==="name"),S=b?String(w.row[b.key]??""):n==="te-IN"?"\u0C08 \u0C35\u0C30\u0C41\u0C38":"this row";return A.highest(B.label,Ho(w.value,n),S)}if(/lowest|minimum|min|smallest|bottom|అత్యల్ప|కనిష్ఠ|చిన్న|తక్కువ/.test(i)){let B=s??a;if(!B)return A.noColumn;let h=t.map(D=>({row:D,value:Number(D[B.key])})).filter(D=>!Number.isNaN(D.value)).sort((D,T)=>D.value-T.value);if(h.length===0)return A.noNumericData(B.label);let w=h[0],b=o.find(D=>D.key==="name"||$e(D.label)==="name"),S=b?String(w.row[b.key]??""):n==="te-IN"?"\u0C08 \u0C35\u0C30\u0C41\u0C38":"this row";return A.lowest(B.label,Ho(w.value,n),S)}if(/average|avg|mean|సగటు/.test(i)){let B=s??a;if(!B)return A.noColumn;let h=t.map(b=>Number(b[B.key])).filter(b=>!Number.isNaN(b));if(h.length===0)return A.noNumericData(B.label);let w=h.reduce((b,S)=>b+S,0)/h.length;return A.average(B.label,Ho(Math.round(w*100)/100,n))}if(/sum|total|మొత్తం|కలిపి/.test(i)&&!l){let B=s??a;if(!B)return A.noColumn;let h=t.map(b=>Number(b[B.key])).filter(b=>!Number.isNaN(b));if(h.length===0)return A.noNumericData(B.label);let w=h.reduce((b,S)=>b+S,0);return A.total(B.label,Ho(w,n))}let y=i.match(/[\p{L}\p{N}_-]+/gu)??[],f=new Set(["who","what","which","where","whose","is","the","has","have","show","find","search","for","by","about"]),p=y.filter(B=>!f.has(B)).join(" ").trim();if(p){let B=t.find(h=>Object.values(h).some(w=>String(w??"").toLowerCase().includes(p.toLowerCase())));return B?o.map(h=>`${h.label}: ${String(B[h.key]??"")}`).join(n==="te-IN"?" \xB7 ":", "):A.notFound(p)}return A.fallback}function oc(e,t){if(typeof window>"u"||!window.speechSynthesis)return;window.speechSynthesis.cancel();let o=new SpeechSynthesisUtterance(e);o.lang=t,o.rate=1,o.pitch=1,window.speechSynthesis.speak(o)}function nc(e){let[t,o]=(0,ge.useState)(!1),[n,A]=(0,ge.useState)(""),[i,r]=(0,ge.useState)(!0),s=(0,ge.useRef)(null);(0,ge.useEffect)(()=>{if(typeof window>"u")return;let g=window.SpeechRecognition||window.webkitSpeechRecognition;if(!g){r(!1),s.current=null;return}let d=new g;return d.continuous=!1,d.interimResults=!1,d.lang=e,d.onresult=u=>{let I=u?.results?.[0]?.[0]?.transcript??"";A(I),o(!1)},d.onerror=()=>{o(!1)},d.onend=()=>{o(!1)},s.current=d,()=>{try{d.stop()}catch{}s.current=null}},[e]);let a=(0,ge.useCallback)(()=>{if(s.current){A(""),o(!0);try{s.current.start()}catch{o(!1)}}},[]),l=(0,ge.useCallback)(()=>{try{s.current?.stop()}catch{}o(!1)},[]);return{listening:t,transcript:n,supported:i,start:a,stop:l}}function Ac(){return(0,N.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,N.jsx)("circle",{cx:"11",cy:"11",r:"6.5"}),(0,N.jsx)("path",{d:"m16 16 5 5"})]})}function rc(){return(0,N.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.3",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,N.jsx)("rect",{x:"8",y:"3",width:"8",height:"12",rx:"4"}),(0,N.jsx)("path",{d:"M5 11a7 7 0 0 0 14 0"}),(0,N.jsx)("path",{d:"M12 18v3"}),(0,N.jsx)("path",{d:"M8 21h8"})]})}function ic(){return(0,N.jsxs)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.3",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,N.jsx)("path",{d:"m4 4 16 8-16 8 4-8-4-8Z"}),(0,N.jsx)("path",{d:"M8 12h12"})]})}function sc(){return(0,N.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,N.jsx)("path",{d:"m6 6 12 12"}),(0,N.jsx)("path",{d:"m18 6-12 12"})]})}function ac({data:e,columns:t,onSearch:o,onSort:n,theme:A="light",language:i="en-US",inputLanguage:r="en-US",embedded:s=!1,agent:a,onInputLanguageChange:l}){let g=qa[i],[d,u]=(0,ge.useState)(r);(0,ge.useEffect)(()=>{u(r)},[r]);let[I,y]=(0,ge.useState)(!1),f=A==="dark",[c,p]=(0,ge.useState)(s),[B,h]=(0,ge.useState)(""),[w,b]=(0,ge.useState)([]),S=(0,ge.useRef)(null),{listening:D,transcript:T,supported:z,start:Z,stop:R}=nc(d),G=(0,ge.useMemo)(()=>({bg:f?"#0F172A":"#FFFFFF",surface:f?"#1E293B":"#F8FAFC",border:f?"#334155":"#E2E8F0",text:f?"#F1F5F9":"#0F172A",muted:f?"#94A3B8":"#64748B",accent:"#10B981",userMsg:f?"#334155":"#DBEAFE",aiMsg:f?"#1E293B":"#F0FDF4"}),[f]),k=(0,ge.useMemo)(()=>({role:"ai",text:i==="te-IN"?"\u0C2E\u0C40 \u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D \u0C21\u0C47\u0C1F\u0C3E \u0C17\u0C41\u0C30\u0C3F\u0C02\u0C1A\u0C3F \u0C2A\u0C4D\u0C30\u0C36\u0C4D\u0C28 \u0C05\u0C21\u0C17\u0C02\u0C21\u0C3F.":"Ask me about your grid data.",time:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),[i]);(0,ge.useEffect)(()=>{b(P=>P.length>0?P:[k])},[k]),(0,ge.useEffect)(()=>{S.current?.scrollIntoView({behavior:"smooth"})},[w]);let ee=()=>new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),te=(0,ge.useCallback)(async P=>{let _=P.trim();if(!_)return;b(Y=>[...Y,{role:"user",text:_,time:ee()}]),h("");let H="";if(a){y(!0);try{H=(await a.ask(_)).message}catch{H=g.fallback}finally{y(!1)}}else{let Y=ec(_,i);if(Y.type==="question")H=tc(Y.payload??_,e,t,i);else if(Y.type==="search"){let ie=String(Y.payload??_);o?.(ie),H=g.searchStarted(ie)}else if(Y.type==="sort"){let ie=Y.payload?.key,V=ie?t.find(le=>$e(le.key)===$e(ie)||$e(le.label)===$e(ie)):void 0;if(V||(V=$a(_,t)),V&&n){let le=Y.payload?.dir==="desc"?"desc":"asc";n(String(V.key),le),H=le==="asc"?g.sortedAscending(V.label):g.sortedDescending(V.label)}else H=g.noColumn}}H||(H=g.fallback),b(Y=>[...Y,{role:"ai",text:H,time:ee()}]),oc(H,i)},[a,t,e,i,o,n,g]);(0,ge.useEffect)(()=>{T&&te(T)},[T,te]);let $=()=>{te(B)},ce=i==="te-IN"?["\u0C0E\u0C28\u0C4D\u0C28\u0C3F \u0C35\u0C30\u0C41\u0C38\u0C32\u0C41","\u0C36\u0C4B\u0C27\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F","\u0C15\u0C4D\u0C30\u0C2E\u0C02"]:["how many rows","search","sort"],ue=(0,N.jsxs)("div",{style:{width:s?"100%":360,maxWidth:s?"100%":"calc(100vw - 48px)",height:s?390:480,maxHeight:"70vh",background:G.bg,border:`1px solid ${G.border}`,borderRadius:s?12:16,boxShadow:s?"none":"0 20px 40px rgba(0,0,0,0.15)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,N.jsxs)("div",{style:{padding:"12px 14px",background:G.accent,color:"#FFFFFF",display:"flex",alignItems:"center",gap:10},children:[(0,N.jsx)("div",{style:{width:34,height:34,borderRadius:10,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255,255,255,0.18)",fontSize:17},children:"AI"}),(0,N.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,N.jsx)("div",{style:{fontWeight:700,fontSize:14},children:g.title}),(0,N.jsx)("div",{style:{fontSize:11,opacity:.9},children:g.subtitle})]}),!s&&(0,N.jsx)("button",{type:"button",onClick:()=>p(!1),"aria-label":g.close,title:g.close,style:{width:32,height:32,border:"none",borderRadius:8,background:"rgba(255,255,255,0.12)",color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},children:(0,N.jsx)(sc,{})})]}),(0,N.jsxs)("div",{style:{padding:"8px 10px",borderBottom:`1px solid ${G.border}`,display:"flex",alignItems:"center",gap:8,background:G.surface},children:[(0,N.jsx)("span",{style:{fontSize:11,color:G.muted},children:g.inputLanguage}),(0,N.jsxs)("select",{value:d,onChange:P=>{let _=P.target.value;u(_),l?.(_)},disabled:D,"aria-label":g.inputLanguage,style:{padding:"5px 8px",borderRadius:7,border:`1px solid ${G.border}`,background:G.bg,color:G.text,fontSize:11},children:[(0,N.jsx)("option",{value:"en-US",children:"English (US)"}),(0,N.jsx)("option",{value:"en-IN",children:"English (India)"}),(0,N.jsx)("option",{value:"as-IN",children:"Assamese"}),(0,N.jsx)("option",{value:"bn-IN",children:"Bengali"}),(0,N.jsx)("option",{value:"brx-IN",children:"Bodo"}),(0,N.jsx)("option",{value:"doi-IN",children:"Dogri"}),(0,N.jsx)("option",{value:"gu-IN",children:"Gujarati"}),(0,N.jsx)("option",{value:"hi-IN",children:"Hindi"}),(0,N.jsx)("option",{value:"kn-IN",children:"Kannada"}),(0,N.jsx)("option",{value:"ks-IN",children:"Kashmiri"}),(0,N.jsx)("option",{value:"kok-IN",children:"Konkani"}),(0,N.jsx)("option",{value:"mai-IN",children:"Maithili"}),(0,N.jsx)("option",{value:"ml-IN",children:"Malayalam"}),(0,N.jsx)("option",{value:"mni-IN",children:"Manipuri"}),(0,N.jsx)("option",{value:"mr-IN",children:"Marathi"}),(0,N.jsx)("option",{value:"ne-IN",children:"Nepali"}),(0,N.jsx)("option",{value:"or-IN",children:"Odia"}),(0,N.jsx)("option",{value:"pa-IN",children:"Punjabi"}),(0,N.jsx)("option",{value:"sa-IN",children:"Sanskrit"}),(0,N.jsx)("option",{value:"sat-IN",children:"Santali"}),(0,N.jsx)("option",{value:"sd-IN",children:"Sindhi"}),(0,N.jsx)("option",{value:"ta-IN",children:"Tamil"}),(0,N.jsx)("option",{value:"te-IN",children:"Telugu"}),(0,N.jsx)("option",{value:"ur-IN",children:"Urdu"})]})]}),(0,N.jsxs)("div",{style:{flex:1,overflowY:"auto",padding:10,display:"flex",flexDirection:"column",gap:8},children:[w.map((P,_)=>(0,N.jsxs)("div",{style:{alignSelf:P.role==="user"?"flex-end":"flex-start",maxWidth:"88%",padding:"8px 11px",borderRadius:11,background:P.role==="user"?G.userMsg:G.aiMsg,color:G.text,fontSize:13,lineHeight:1.5},children:[(0,N.jsx)("div",{children:P.text}),(0,N.jsx)("div",{style:{marginTop:3,fontSize:10,opacity:.55,textAlign:"right"},children:P.time})]},`${P.time}-${_}`)),D&&(0,N.jsx)("div",{style:{alignSelf:"flex-end",padding:"8px 11px",borderRadius:11,background:f?"#3F1D2E":"#FEE2E2",color:f?"#FCA5A5":"#991B1B",fontSize:13},children:g.listening}),(I||a?.loading)&&(0,N.jsx)("div",{role:"status","aria-live":"polite",style:{alignSelf:"flex-start",padding:"8px 11px",borderRadius:11,background:G.aiMsg,color:G.muted,fontSize:13},children:g.working}),(0,N.jsx)("div",{ref:S})]}),(0,N.jsx)("div",{style:{padding:"7px 10px",borderTop:`1px solid ${G.border}`,display:"flex",gap:6,overflowX:"auto",flexShrink:0},children:ce.map(P=>(0,N.jsx)("button",{type:"button",onClick:()=>te(P),style:{padding:"5px 9px",borderRadius:12,border:`1px solid ${G.border}`,background:G.surface,color:G.text,fontSize:10.5,cursor:"pointer",whiteSpace:"nowrap"},children:P},P))}),(0,N.jsxs)("div",{style:{padding:9,display:"flex",gap:6,borderTop:`1px solid ${G.border}`,background:G.surface},children:[(0,N.jsxs)("div",{style:{position:"relative",flex:1},children:[(0,N.jsx)(Ac,{}),(0,N.jsx)("input",{type:"text",value:B,onChange:P=>h(P.target.value),onKeyDown:P=>{P.key==="Enter"&&$()},placeholder:g.placeholder,"aria-label":g.ask,style:{width:"100%",boxSizing:"border-box",padding:"9px 10px 9px 34px",borderRadius:8,border:`1px solid ${G.border}`,background:G.bg,color:G.text,fontSize:12,outline:"none"}})]}),z?(0,N.jsx)("button",{type:"button",onClick:D?R:Z,"aria-label":D?g.listening:g.speakNow,title:D?g.listening:g.speakNow,style:{width:38,height:38,border:"none",borderRadius:8,background:D?"#EF4444":G.accent,color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",flexShrink:0},children:(0,N.jsx)(rc,{})}):null,(0,N.jsx)("button",{type:"button",onClick:$,disabled:!B.trim(),"aria-label":g.send,title:g.send,style:{width:38,height:38,border:"none",borderRadius:8,background:B.trim()?G.accent:G.muted,color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",cursor:B.trim()?"pointer":"not-allowed",opacity:B.trim()?1:.6,flexShrink:0},children:(0,N.jsx)(ic,{})})]})]});return s?(0,N.jsx)("div",{style:{width:"100%",minWidth:0},children:c?ue:(0,N.jsxs)("button",{type:"button",onClick:()=>p(!0),"aria-label":g.open,style:{minHeight:40,padding:"8px 13px",borderRadius:9,border:"1px solid #10B981",background:f?"#064E3B":"#ECFDF5",color:f?"#A7F3D0":"#047857",display:"inline-flex",alignItems:"center",gap:8,cursor:"pointer",fontSize:12,fontWeight:600},children:[(0,N.jsx)("span",{"aria-hidden":"true",children:"AI"}),g.ask]})}):(0,N.jsxs)(N.Fragment,{children:[!c&&(0,N.jsx)("button",{type:"button",onClick:()=>p(!0),"aria-label":g.open,title:g.title,style:{position:"fixed",bottom:24,right:24,zIndex:9998,width:56,height:56,borderRadius:28,background:G.accent,color:"#FFFFFF",border:"none",cursor:"pointer",boxShadow:"0 8px 20px rgba(16,185,129,0.3)",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700,fontSize:14},children:"AI"}),c&&(0,N.jsx)("div",{style:{position:"fixed",bottom:90,right:24,zIndex:9997},children:ue}),(0,N.jsx)("style",{children:`
1522
1537
  @keyframes yuktai-ai-pulse {
1523
1538
  0%, 100% {
1524
1539
  transform: scale(1);
@@ -1528,16 +1543,14 @@ Action plan:`,l=await a.prompt(s);return a.destroy(),l?.trim()||""}async functio
1528
1543
  transform: scale(1.05);
1529
1544
  }
1530
1545
  }
1531
- `})]})}var An=$d;v();var Ce=require("react");v();var zd={en:{found:e=>`${e} row(s) found.`,count:e=>`${e} row(s).`,columns:"Grid columns retrieved.",rowFound:"Row found.",notFound:e=>`Row "${e}" not found.`,noneFound:"None of the given rows were found.",highlighted:e=>`${e} row(s) highlighted.`,selected:e=>`Row "${e}" selected.`,opened:e=>`Row "${e}" opened.`,notSupported:e=>`This grid does not support "${e}".`,emptyQuery:"Please enter something to search.",noIds:"No row IDs were given.",unknownColumn:e=>`Unknown column "${e}".`,badOperator:e=>`Unknown filter operator "${e}".`,badValue:"The filter value is not valid for this column.",filtered:e=>`Filter applied: ${e} row(s) match.`,filtersCleared:"All filters cleared.",sorted:(e,t)=>`Sorted by ${e} (${t==="asc"?"ascending":"descending"}).`,sortCleared:"Sorting cleared.",internal:"Something went wrong while running this action."},te:{found:e=>`${e} \u0C35\u0C30\u0C41\u0C38(\u0C32\u0C41) \u0C26\u0C4A\u0C30\u0C3F\u0C15\u0C3E\u0C2F\u0C3F.`,count:e=>`\u0C2E\u0C4A\u0C24\u0C4D\u0C24\u0C02 ${e} \u0C35\u0C30\u0C41\u0C38\u0C32\u0C41.`,columns:"\u0C15\u0C3E\u0C32\u0C2E\u0C4D\u200C\u0C32 \u0C35\u0C3F\u0C35\u0C30\u0C3E\u0C32\u0C41.",rowFound:"\u0C35\u0C30\u0C41\u0C38 \u0C26\u0C4A\u0C30\u0C3F\u0C15\u0C3F\u0C02\u0C26\u0C3F.",notFound:e=>`"${e}" \u0C35\u0C30\u0C41\u0C38 \u0C26\u0C4A\u0C30\u0C15\u0C32\u0C47\u0C26\u0C41.`,noneFound:"\u0C07\u0C1A\u0C4D\u0C1A\u0C3F\u0C28 \u0C35\u0C30\u0C41\u0C38\u0C32\u0C47\u0C35\u0C40 \u0C26\u0C4A\u0C30\u0C15\u0C32\u0C47\u0C26\u0C41.",highlighted:e=>`${e} \u0C35\u0C30\u0C41\u0C38(\u0C32\u0C41) \u0C39\u0C48\u0C32\u0C48\u0C1F\u0C4D \u0C1A\u0C47\u0C36\u0C3E\u0C28\u0C41.`,selected:e=>`"${e}" \u0C0E\u0C02\u0C1A\u0C41\u0C15\u0C41\u0C28\u0C4D\u0C28\u0C3E\u0C28\u0C41.`,opened:e=>`"${e}" \u0C24\u0C46\u0C30\u0C3F\u0C1A\u0C3E\u0C28\u0C41.`,notSupported:e=>`\u0C08 \u0C2A\u0C1F\u0C4D\u0C1F\u0C3F\u0C15\u0C32\u0C4B "${e}" \u0C38\u0C4C\u0C15\u0C30\u0C4D\u0C2F\u0C02 \u0C32\u0C47\u0C26\u0C41.`,emptyQuery:"\u0C35\u0C46\u0C24\u0C15\u0C21\u0C3E\u0C28\u0C3F\u0C15\u0C3F \u0C0F\u0C26\u0C48\u0C28\u0C3E \u0C30\u0C3E\u0C2F\u0C02\u0C21\u0C3F.",noIds:"\u0C35\u0C30\u0C41\u0C38 ID\u0C32\u0C41 \u0C07\u0C35\u0C4D\u0C35\u0C32\u0C47\u0C26\u0C41.",unknownColumn:e=>`"${e}" \u0C05\u0C28\u0C47 \u0C15\u0C3E\u0C32\u0C2E\u0C4D \u0C32\u0C47\u0C26\u0C41.`,badOperator:e=>`"${e}" \u0C05\u0C28\u0C47 \u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D \u0C35\u0C3F\u0C27\u0C3E\u0C28\u0C02 \u0C32\u0C47\u0C26\u0C41.`,badValue:"\u0C08 \u0C15\u0C3E\u0C32\u0C2E\u0C4D\u200C\u0C15\u0C3F \u0C08 \u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D \u0C35\u0C3F\u0C32\u0C41\u0C35 \u0C38\u0C30\u0C3F\u0C2A\u0C4B\u0C26\u0C41.",filtered:e=>`\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D \u0C35\u0C47\u0C36\u0C3E\u0C28\u0C41: ${e} \u0C35\u0C30\u0C41\u0C38\u0C32\u0C41 \u0C38\u0C30\u0C3F\u0C2A\u0C4B\u0C2F\u0C3E\u0C2F\u0C3F.`,filtersCleared:"\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D\u0C32\u0C28\u0C4D\u0C28\u0C40 \u0C24\u0C40\u0C38\u0C47\u0C36\u0C3E\u0C28\u0C41.",sorted:(e,t)=>`${e} \u0C2A\u0C4D\u0C30\u0C15\u0C3E\u0C30\u0C02 \u0C15\u0C4D\u0C30\u0C2E\u0C02 (${t==="asc"?"\u0C06\u0C30\u0C4B\u0C39\u0C23":"\u0C05\u0C35\u0C30\u0C4B\u0C39\u0C23"}).`,sortCleared:"\u0C15\u0C4D\u0C30\u0C2E\u0C02 \u0C24\u0C40\u0C38\u0C47\u0C36\u0C3E\u0C28\u0C41.",internal:"\u0C08 \u0C2A\u0C28\u0C3F \u0C1A\u0C47\u0C38\u0C4D\u0C24\u0C41\u0C02\u0C21\u0C17\u0C3E \u0C38\u0C2E\u0C38\u0C4D\u0C2F \u0C35\u0C1A\u0C4D\u0C1A\u0C3F\u0C02\u0C26\u0C3F."}};function Pe(e){return zd[e.locale??"en"]}function He(e,t){return{success:!0,message:e,data:t}}function ge(e,t){return{success:!1,message:t,error:{code:e}}}var Il=["contains","equals","startsWith","endsWith","greaterThan","lessThan","between"];function Ie(e,t="id"){let n=e?.[t];return n==null?"":String(n)}function pt(e){return String(e??"").normalize("NFC").toLowerCase().trim()}function xl(e){if(typeof e=="number")return Number.isFinite(e)?e:null;let t=String(e??"").trim();if(t==="")return null;let n=Number(t);return Number.isFinite(n)?n:null}function wl(e){if(e instanceof Date)return e.getTime();let t=new Date(String(e??"")).getTime();return Number.isFinite(t)?t:null}function Cl(e){return(Array.isArray(e)?e:typeof e=="string"?e.split(","):[]).map(n=>String(n).trim()).filter(Boolean)}function ro(e,t){let n=pt(t);return e.columns.find(o=>pt(o.key)===n||pt(o.label)===n)}function fn(e,t){return e.data.find(n=>Ie(n,e.rowKey)===t)}function Od(e,t){return e[t]}function Hd(e,t,n){let o=Od(e,n.key),r=n.type??"text";if(r==="number"||r==="date"){let s=r==="number"?xl:wl,l=s(o);if(l===null)return!1;if(t.operator==="between"){let[d,g]=t.value,p=s(d),m=s(g);return p!==null&&m!==null&&l>=Math.min(p,m)&&l<=Math.max(p,m)}let c=s(t.value);if(c===null)return!1;switch(t.operator){case"equals":return l===c;case"greaterThan":return l>c;case"lessThan":return l<c;default:break}}let a=pt(o),i=pt(t.value);switch(t.operator){case"equals":return a===i;case"startsWith":return a.startsWith(i);case"endsWith":return a.endsWith(i);case"contains":return a.includes(i);default:return!1}}function Wd(e,t){let n=t.type??"text",o=n==="date"?wl:xl;return e.operator==="between"?n==="text"||!Array.isArray(e.value)||e.value.length!==2?!1:o(e.value[0])!==null&&o(e.value[1])!==null:e.operator==="greaterThan"||e.operator==="lessThan"?n!=="text"&&o(e.value)!==null:!Array.isArray(e.value)&&String(e.value).trim()!==""}function Ze(e,t,n){return n.length?kl({data:e,columns:t},n):e}function it(e){return e.map(t=>({key:String(t.key),label:t.label,type:t.type==="number"?"number":t.type==="date"?"date":"text"}))}function kl(e,t){return e.data.filter(n=>t.every(o=>{let r=ro(e,o.key);return r?Hd(n,o,r):!0}))}function io(e,t){let n=Pe(e),o=pt(t);if(!o)return ge("INVALID_INPUT",n.emptyQuery);let r=e.data.filter(i=>e.columns.some(s=>pt(i[s.key]).includes(o))),a=r.map(i=>Ie(i,e.rowKey)).filter(Boolean);return e.onHighlightRows?.(a),He(n.found(r.length),r)}function ao(e){return He(Pe(e).count(e.data.length),e.data.length)}function so(e){return He(Pe(e).columns,e.columns)}function lo(e,t){let n=Pe(e),o=String(t??"").trim();if(!o)return ge("INVALID_INPUT",n.noIds);let r=fn(e,o);return r?He(n.rowFound,r):ge("NOT_FOUND",n.notFound(o))}function vt(e,t){let n=Pe(e),o=Cl(t);if(o.length===0)return ge("INVALID_INPUT",n.noIds);if(!e.onHighlightRows)return ge("NOT_SUPPORTED",n.notSupported("highlight"));let r=o.filter(a=>fn(e,a)!==void 0);return r.length===0?ge("NOT_FOUND",n.noneFound):(e.onHighlightRows(r),He(n.highlighted(r.length),r))}function Ht(e,t){let n=Pe(e),o=String(t??"").trim();return o?e.onSelectRow?fn(e,o)?(e.onSelectRow(o),He(n.selected(o),o)):ge("NOT_FOUND",n.notFound(o)):ge("NOT_SUPPORTED",n.notSupported("select")):ge("INVALID_INPUT",n.noIds)}function Wt(e,t){let n=Pe(e),o=String(t??"").trim();return o?e.onOpenRow?fn(e,o)?(e.onOpenRow(o),He(n.opened(o),o)):ge("NOT_FOUND",n.notFound(o)):ge("NOT_SUPPORTED",n.notSupported("open")):ge("INVALID_INPUT",n.noIds)}function co(e,t){let n=Pe(e),o=ro(e,t?.key??"");if(!o)return ge("INVALID_INPUT",n.unknownColumn(String(t?.key??"")));if(!Il.includes(t.operator))return ge("INVALID_INPUT",n.badOperator(String(t.operator)));let r={...t,key:o.key};if(!Wd(r,o))return ge("INVALID_INPUT",n.badValue);if(!e.onFiltersChange)return ge("NOT_SUPPORTED",n.notSupported("filter"));let a=[...(e.filters??[]).filter(s=>s.key!==o.key),r],i=kl(e,a).length;return e.onFiltersChange(a),He(n.filtered(i),{filters:a,count:i})}function uo(e){let t=Pe(e);return e.onFiltersChange?(e.onFiltersChange([]),He(t.filtersCleared,[])):ge("NOT_SUPPORTED",t.notSupported("clear filters"))}function go(e,t,n="asc"){let o=Pe(e),r=ro(e,t);if(!r)return ge("INVALID_INPUT",o.unknownColumn(String(t)));if(n!=="asc"&&n!=="desc")return ge("INVALID_INPUT",o.badValue);if(!e.onSortChange)return ge("NOT_SUPPORTED",o.notSupported("sort"));let a={key:r.key,direction:n};return e.onSortChange(a),He(o.sorted(r.label,n),a)}function po(e){let t=Pe(e);return e.onSortChange?(e.onSortChange(null),He(t.sortCleared,null)):ge("NOT_SUPPORTED",t.notSupported("clear sort"))}var Ud={search:"Search all columns for text. Matching rows are highlighted.",count:"Count the rows currently in the grid.",columns:"List the grid's columns with their keys, labels and types.",get_row:"Get one row by its ID.",highlight:"Highlight one or more rows by ID without filtering the grid.",select:"Select one row by ID.",open:"Open one row by ID to show its full details.",filter:"Filter the grid by one column. Replaces any existing filter on that column.",clear_filters:"Remove all filters.",sort:"Sort the grid by one column, ascending or descending.",clear_sort:"Remove sorting."},yl={en:{search:"Search",count:"Count",columns:"Columns",get_row:"Get row",highlight:"Highlight",select:"Select",open:"Open",filter:"Filter",clear_filters:"Clear filters",sort:"Sort",clear_sort:"Clear sort"},te:{search:"\u0C35\u0C46\u0C24\u0C41\u0C15\u0C41",count:"\u0C32\u0C46\u0C15\u0C4D\u0C15",columns:"\u0C15\u0C3E\u0C32\u0C2E\u0C4D\u200C\u0C32\u0C41",get_row:"\u0C35\u0C30\u0C41\u0C38 \u0C1A\u0C42\u0C2A\u0C41",highlight:"\u0C39\u0C48\u0C32\u0C48\u0C1F\u0C4D",select:"\u0C0E\u0C02\u0C1A\u0C41\u0C15\u0C4B",open:"\u0C24\u0C46\u0C30\u0C41\u0C35\u0C41",filter:"\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D",clear_filters:"\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D\u0C32\u0C41 \u0C24\u0C40\u0C38\u0C47\u0C2F\u0C3F",sort:"\u0C15\u0C4D\u0C30\u0C2E\u0C02",clear_sort:"\u0C15\u0C4D\u0C30\u0C2E\u0C02 \u0C24\u0C40\u0C38\u0C47\u0C2F\u0C3F"}};async function Yd(e,t){try{return t()}catch{return ge("INTERNAL",Pe(e).internal)}}function St(e,t={}){let n=t.name??"yuktai_grid",o=yl[e.locale??"en"],r=l=>t.descriptions?.[l]??Ud[l],a={id:{type:"string",description:"Row ID"}},i=e.columns.map(l=>l.key);return[{id:"search",available:!0,schema:{type:"object",properties:{query:{type:"string"}},required:["query"]},run:l=>io(e,String(l.query??""))},{id:"count",available:!0,schema:{type:"object",properties:{}},run:()=>ao(e)},{id:"columns",available:!0,schema:{type:"object",properties:{}},run:()=>so(e)},{id:"get_row",available:!0,schema:{type:"object",properties:a,required:["id"]},run:l=>lo(e,String(l.id??""))},{id:"highlight",available:!!e.onHighlightRows,schema:{type:"object",properties:{ids:{type:"array",items:{type:"string"},description:"Row IDs"}},required:["ids"]},run:l=>vt(e,Cl(l.ids))},{id:"select",available:!!e.onSelectRow,schema:{type:"object",properties:a,required:["id"]},run:l=>Ht(e,String(l.id??""))},{id:"open",available:!!e.onOpenRow,schema:{type:"object",properties:a,required:["id"]},run:l=>Wt(e,String(l.id??""))},{id:"filter",available:!!e.onFiltersChange,schema:{type:"object",properties:{key:{type:"string",enum:i},operator:{type:"string",enum:Il},value:{description:"Text or number; for 'between' an array of two numbers or dates"}},required:["key","operator","value"]},run:l=>co(e,{key:String(l.key??""),operator:String(l.operator??""),value:l.value})},{id:"clear_filters",available:!!e.onFiltersChange,schema:{type:"object",properties:{}},run:()=>uo(e)},{id:"sort",available:!!e.onSortChange,schema:{type:"object",properties:{key:{type:"string",enum:i},direction:{type:"string",enum:["asc","desc"]}},required:["key"]},run:l=>go(e,String(l.key??""),l.direction==="desc"?"desc":"asc")},{id:"clear_sort",available:!!e.onSortChange,schema:{type:"object",properties:{}},run:()=>po(e)}].filter(l=>l.available).map(l=>({name:`${n}_${l.id}`,title:yl.en[l.id],description:r(l.id),label:o[l.id],inputSchema:l.schema,execute:c=>Yd(e,()=>l.run(c??{}))}))}var qd={en:{done:"Done.",toolMissing:e=>`The action "${e}" is not available here.`,missingInput:e=>`Missing: ${e}.`,notUnderstood:"Sorry, I didn't understand. Try: a word to search, \u201Csort by <column>\u201D, or \u201Cclear filters\u201D.",noMatch:e=>`Nothing matched "${e}".`,failed:"Something went wrong while running this action."},te:{done:"\u0C2A\u0C42\u0C30\u0C4D\u0C24\u0C2F\u0C3F\u0C02\u0C26\u0C3F.",toolMissing:e=>`"${e}" \u0C38\u0C4C\u0C15\u0C30\u0C4D\u0C2F\u0C02 \u0C07\u0C15\u0C4D\u0C15\u0C21 \u0C05\u0C02\u0C26\u0C41\u0C2C\u0C3E\u0C1F\u0C41\u0C32\u0C4B \u0C32\u0C47\u0C26\u0C41.`,missingInput:e=>`\u0C07\u0C35\u0C3F \u0C15\u0C3E\u0C35\u0C3E\u0C32\u0C3F: ${e}.`,notUnderstood:"\u0C15\u0C4D\u0C37\u0C2E\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F, \u0C05\u0C30\u0C4D\u0C25\u0C02 \u0C15\u0C3E\u0C32\u0C47\u0C26\u0C41. \u0C07\u0C32\u0C3E \u0C2A\u0C4D\u0C30\u0C2F\u0C24\u0C4D\u0C28\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F: \u0C35\u0C46\u0C24\u0C15\u0C3E\u0C32\u0C4D\u0C38\u0C3F\u0C28 \u0C2A\u0C26\u0C02, \u201C<\u0C15\u0C3E\u0C32\u0C2E\u0C4D> \u0C2A\u0C4D\u0C30\u0C15\u0C3E\u0C30\u0C02 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u201D, \u0C32\u0C47\u0C26\u0C3E \u201C\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D\u0C32\u0C41 \u0C24\u0C40\u0C38\u0C47\u0C2F\u0C3F\u201D.",noMatch:e=>`"${e}" \u0C15\u0C3F \u0C0F\u0C2E\u0C40 \u0C38\u0C30\u0C3F\u0C2A\u0C4B\u0C32\u0C47\u0C26\u0C41.`,failed:"\u0C08 \u0C2A\u0C28\u0C3F \u0C1A\u0C47\u0C38\u0C4D\u0C24\u0C41\u0C02\u0C21\u0C17\u0C3E \u0C38\u0C2E\u0C38\u0C4D\u0C2F \u0C35\u0C1A\u0C4D\u0C1A\u0C3F\u0C02\u0C26\u0C3F."}},vl=e=>e.normalize("NFC").toLowerCase().trim(),at={clearFilters:/\b(clear|remove|reset)\b.*\bfilters?\b|ఫిల్టర్.*(తీసే|తొలగ)/i,clearSort:/\b(clear|remove|reset)\b.*\bsort(ing)?\b|క్రమం.*(తీసే|తొలగ)/i,count:/^\s*(how many|count)\b|ఎన్ని|లెక్క/i,sort:/\bsort\b|\border by\b|క్రమ|అమర్చ|సార్ట్/i,desc:/\b(desc|descending|z\s*-\s*a|highest|largest|most)\b|అవరోహణ|తగ్గే|పెద్ద|అధిక|చివర|ఎక్కువ నుండి/i,openEn:/^\s*open\s+(.+?)\s*$/i,openTe:/^\s*(.+?)\s*(తెరువు|తెరవండి|తెరవు)\s*$/,searchFiller:/^\s*(search(\s+for)?|find|show(\s+me)?|filter(\s+by)?|look\s+for|వెతుకు|వెతకండి|శోధించు|శోధించండి|చూపించు|చూపించండి)\s+|\s+(వెతుకు|వెతకండి|శోధించు|శోధించండి|చూపించు|చూపించండి)\s*$/gi};function _d(e,t){let n=vl(e),o=null;for(let r of t)for(let a of[r.label,r.key]){let i=vl(a);i&&n.includes(i)&&(!o||i.length>o.len)&&(o={key:r.key,len:i.length})}return o?.key??null}function mo(e,t){let n=(e??"").trim();if(!n)return null;if(at.clearFilters.test(n))return{kind:"tool",tool:"clear_filters",input:{}};if(at.clearSort.test(n))return{kind:"tool",tool:"clear_sort",input:{}};if(at.count.test(n))return{kind:"tool",tool:"count",input:{}};if(at.sort.test(n)){let a=_d(n,t.columns);return a?{kind:"tool",tool:"sort",input:{key:a,direction:at.desc.test(n)?"desc":"asc"}}:null}let o=n.match(at.openEn)??n.match(at.openTe);if(o?.[1])return{kind:"open",text:o[1].trim()};let r=n.replace(at.searchFiller,"").trim();return r?{kind:"tool",tool:"search",input:{query:r}}:null}function Jd(e){return!!e&&typeof e=="object"&&typeof e.success=="boolean"&&typeof e.message=="string"}function Vd(e,t){let n=e.inputSchema?.required;return Array.isArray(n)?n.map(String).filter(o=>t[o]===void 0||t[o]===null||String(t[o]).trim()===""):[]}function Kd(e,t){let n=e.find(r=>r.name===t);if(n)return n;let o=e.filter(r=>r.name.endsWith(`_${t}`)).sort((r,a)=>r.name.length-a.name.length);if(o.length!==0&&!(o.length>1&&o[0].name.length===o[1].name.length))return o[0]}function Sl(e){return e.normalize("NFC").trim().toLocaleLowerCase()}function jd(e,t){let n=Sl(e);return t.find(o=>o.phrases.some(r=>{let a=Sl(r);return a.length>0&&n.includes(a)}))}function Ut({tools:e,data:t=[],onResult:n,onError:o,locale:r="en",columns:a=[],rowKey:i="id",parseIntent:s,customRules:l=[],historyLimit:c=20}){let d=qd[r],[g,p]=(0,Ce.useState)(0),[m,h]=(0,Ce.useState)(null),[y,u]=(0,Ce.useState)(null),[I,C]=(0,Ce.useState)([]),b=(0,Ce.useRef)({tools:e,data:t,onResult:n,onError:o,columns:a,rowKey:i,parseIntent:s,customRules:l,historyLimit:c,m:d,locale:r});b.current={tools:e,data:t,onResult:n,onError:o,columns:a,rowKey:i,parseIntent:s,customRules:l,historyLimit:c,m:d,locale:r};let k=(0,Ce.useRef)(!0),x=(0,Ce.useRef)(0);(0,Ce.useEffect)(()=>(k.current=!0,()=>{k.current=!1}),[]);let B=(0,Ce.useCallback)((G,Q,S,j,ee)=>{k.current&&(ee===x.current&&h(S),C(H=>[...H,{id:ee,tool:G,input:Q,result:S,source:j,at:Date.now()}].slice(-b.current.historyLimit)))},[]),M=(0,Ce.useCallback)(async(G,Q,S)=>{let{tools:j,onResult:ee,onError:H,m:ce}=b.current,pe=++x.current,z=Kd(j,G);if(!z){let $={success:!1,message:ce.toolMissing(G),error:{code:"NOT_SUPPORTED"}},_=new Error($.message);return k.current&&u(_),H?.(_),B(G,Q,$,S,pe),$}let Z=Vd(z,Q);if(Z.length){let $={success:!1,message:ce.missingInput(Z.join(", ")),error:{code:"INVALID_INPUT"},tool:z.name};return B(z.name,Q,$,S,pe),ee?.($),$}k.current&&p($=>$+1);try{let $=await z.execute(Q),_=Jd($)?{...$,tool:z.name}:{success:!0,message:ce.done,data:$,tool:z.name};return k.current&&_.success&&u(null),B(z.name,Q,_,S,pe),ee?.(_),_}catch($){let _=$ instanceof Error?$:new Error(String($)),oe={success:!1,message:ce.failed,error:{code:"INTERNAL"},tool:z.name};return k.current&&u(_),H?.(_),B(z.name,Q,oe,S,pe),oe}finally{k.current&&p($=>Math.max(0,$-1))}},[B]),L=(0,Ce.useCallback)((G,Q={})=>M(G,Q??{},"tool"),[M]),q=(0,Ce.useCallback)(async G=>{let{columns:Q,locale:S,parseIntent:j,customRules:ee,data:H,m:ce,rowKey:pe}=b.current,z=jd(G,ee??[]);if(z){let W={input:G,data:H,columns:Q,executeTool:L};try{let Me={success:!0,message:await z.execute(W),tool:`rule:${z.name}`};return B(`rule:${z.name}`,{text:G},Me,"ask",++x.current),b.current.onResult?.(Me),Me}catch(ue){let Me=ue instanceof Error?ue:new Error(String(ue)),Le={success:!1,message:ce.failed,error:{code:"INTERNAL"},tool:`rule:${z.name}`};return k.current&&u(Me),b.current.onError?.(Me),B(`rule:${z.name}`,{text:G},Le,"ask",++x.current),Le}}let $=(j??mo)(G,{columns:Q,locale:S});if(!$){let W={success:!1,message:ce.notUnderstood,error:{code:"NOT_UNDERSTOOD"}};return B("ask",{text:G},W,"ask",++x.current),W}if($.kind==="tool")return M($.tool,$.input,"ask");let _=await M("search",{query:$.text},"ask"),oe=Array.isArray(_.data)?_.data:[];if(!_.success)return _;if(oe.length===0){let W={success:!1,message:ce.noMatch($.text),error:{code:"NOT_FOUND"},tool:_.tool};return B("open",{text:$.text},W,"ask",++x.current),W}return M("open",{id:Ie(oe[0],pe)},"ask")},[L,B,M]),O=(0,Ce.useCallback)(()=>{C([]),h(null),u(null)},[]);return{loading:g>0,tools:e,executeTool:L,ask:q,lastResult:m,lastError:y,history:I,clearHistory:O}}var El=Ut;v();var st=require("react");function Xd(e){return JSON.stringify(e.map(t=>[t.name,t.title,t.description,t.inputSchema]))}function Zd({tools:e,data:t=[],columns:n=[],rowKey:o,locale:r,onSelectRow:a,onHighlightRows:i,onOpenRow:s,name:l="yuktai_grid",descriptions:c,onStatusChange:d}){let g=(0,st.useMemo)(()=>e||St({data:t,columns:n,rowKey:o,locale:r,onSelectRow:a,onHighlightRows:i,onOpenRow:s},{name:l,descriptions:c}),[e,t,n,o,r,a,i,s,l,c]),p=(0,st.useRef)(g);p.current=g;let m=(0,st.useRef)(d);m.current=d;let h=(0,st.useRef)(Promise.resolve()),y=Xd(g);return(0,st.useEffect)(()=>{let u=x=>m.current?.(x),I=typeof document<"u"?document.modelContext:void 0;if(!I?.registerTool){u({state:"unsupported",registered:[],errors:[]});return}let C=new AbortController,b=p.current,k=h.current.then(async()=>{if(C.signal.aborted)return;u({state:"registering",registered:[],errors:[]});let x=[],B=[];for(let M of b){if(C.signal.aborted)return;try{await I.registerTool({name:M.name,title:M.title,description:M.description,inputSchema:M.inputSchema,execute:L=>{let q=p.current.find(O=>O.name===M.name);return q?q.execute(L??{}):{success:!1,message:`Tool "${M.name}" is no longer available.`,error:{code:"NOT_SUPPORTED"}}}},{signal:C.signal}),x.push(M.name)}catch(L){B.push({tool:M.name,message:L instanceof Error?L.message:String(L)})}}C.signal.aborted||u({state:B.length===0?"ready":x.length>0?"partial":"error",registered:x,errors:B})});return h.current=k.catch(()=>{}),()=>C.abort()},[y]),null}var Yt=Zd;v();var Mt=require("react");v();v();var Tl=["AGFzbQEAAAABYA1gA39/fwF/YAJ/fwF/YAN/f38AYAV/f39/fwBgBX9/f39/AX9gBH9/f38AYAR/f39/AX9gCH9/f39/f39/AX9g","AX8AYAABf2AHf39/f39/fwF/YAZ/f39/f38Bf2AAAAMkIwIDBAIFBQICAgIGBgYGAwcICQoFCQIBBQILBQYAAQICAgwABAUBcAEC","AgUDAQARBgkBfwFBgIDAAAsHPAUGbWVtb3J5AgAMeWtfaGVhcF9iYXNlABEJeWtfc2VhcmNoABIHeWtfc29ydAATCnlrX3ZlcnNp","b24AFAkHAQBBAQsBHQrEWiO8BgMFfwJ8BH8CQCABQQJJDQACQAJAAkACQAJAAkACQAJAAkAgACgCBCIDIAIoAgAiBCgCBCIFTw0A","IAAoAgAiBiAFTw0BIAQoAgAiByAGQQN0aisDACEIAkACQCAHIANBA3RqKwMAIgkgCWINACAIIAhiDQFBAEEAQX8gCSAIZiIKG0EB","QX4gChsgCSAIZRsiCmsgCiAEKAIILQAAG0H/AXEiCkH/AUYgAyAGSSAKGw0BDAYLIAMgBk8NBSAIIAhhDQULQQIhCkEBIQsgAUEC","Rg0GIABBCGohDEECIQoDQCADIQYgDCgCACIDIAVPDQMgBiAFTw0EIAcgBkEDdGorAwAhCAJAAkAgByADQQN0aisDACIJIAliDQAg","CCAIYg0BQQBBAEF/IAkgCGYiDRtBAUF+IA0bIAkgCGUbIg1rIA0gBCgCCC0AABtB/wFxIg1B/wFGIAMgBkkgDRtBAUYNAUEBIQsM","CQsgAyAGTw0IIAggCGENCAsgDEEEaiEMIAEgCkEBaiIKRw0AC0EBIQsMBQsgAyAFQdSEwIAAEJiAgIAAAAsgBiAFQeSEwIAAEJiA","gIAAAAsgAyAFQdSEwIAAEJiAgIAAAAsgBiAFQeSEwIAAEJiAgIAAAAtBAiEKQQAhCyABQQJGDQEgAEEIaiEMQQIhCgNAIAMhBiAM","KAIAIgMgBU8NAyAGIAVPDQQgByAGQQN0aisDACEIAkACQCAHIANBA3RqKwMAIgkgCWINACAIIAhiDQRBAEEAQX8gCSAIZiING0EB","QX4gDRsgCSAIZRsiDWsgDSAEKAIILQAAG0H/AXEiDUH/AUYgAyAGSSANG0UNAUEAIQsMBAsgAyAGTw0AIAggCGINAwsgDEEEaiEM","IAEgCkEBaiIKRw0ACwsgASEKCwJAIAogAUYNACAAIAFBACABQQFyZ0EBdEE+cyACEIGAgIAADAMLIAtFDQIgAUEBdiEGIAFBAnQg","AGpBfGohAwNAIAAoAgAhCiAAIAMoAgA2AgAgAyAKNgIAIANBfGohAyAAQQRqIQAgBkF/aiIGDQAMAwsLIAMgBUHUhMCAABCYgICA","AAALIAYgBUHkhMCAABCYgICAAAALC7YIBAh/AnwDfwF8I4CAgIAAQRBrIgUkgICAgAACQAJAIAFBIUkNACADQX9qIQMDQAJAIANB","f0cNACAAIAEgBBCJgICAAAwDCyAAIAFBA3YiBkEcbGohByAAIAZBBHRqIQgCQAJAIAFBwABJDQAgACAIIAcgBiAEEIKAgIAAIQYM","AQsCQAJAAkACQAJAAkAgACgCACIGIAQoAgAiCSgCBCIKTw0AIAgoAgAiCyAKTw0BIAkoAgAiDCALQQN0aisDACENAkACQAJAAkAg","DCAGQQN0aisDACIOIA5iIg8NACANIA1hDQFBASEQDAMLIA0gDWINAUEAIRAMAgtBAEEAQX8gDiANZiIRG0EBQX4gERsgDiANZRsi","EWsgESAJKAIILQAAG0H/AXEiEUH/AUYgBiALSSARGyEQDAELIAYgC0khEAsgBygCACIRIApPDQIgDCARQQN0aisDACESAkACQAJA","AkACQAJAAkAgDw0AIBIgEmENASAAIQYgEEUNDSANIA1iDQYMCwsgEiASYg0BIAAhBiAQDQwgDSANYQ0DDAkLQQBBAEF/IA4gEmYi","ChtBAUF+IAobIA4gEmUbIgprIAogCSgCCC0AABtB/wFxIgpB/wFGIAYgEUkgChshCgwBCyAGIBFJIQoLIAAhBiAQIApHDQkgDSAN","Yg0BIBIgEmINBwtBAEEAQX8gDSASZiIGG0EBQX4gBhsgDSASZRsiBmsgBiAJKAIILQAAG0H/AXEiBkH/AUYgCyARSSAGGyEGDAcL","IBIgEmENBAsgCyARSSEGDAULIAYgCkHUhMCAABCYgICAAAALIAsgCkHkhMCAABCYgICAAAALIBEgCkHkhMCAABCYgICAAAALQQAh","BgwBC0EBIQYLIAcgCCAQIAZzGyEGCyAGIABrIgdBAnYhBgJAAkAgAkUNAAJAAkACQCACKAIAIgggBCgCACIJKAIEIgtPDQAgACAH","aigCACIHIAtPDQEgCSgCACILIAdBA3RqKwMAIQ0CQAJAIAsgCEEDdGorAwAiEiASYg0AIA0gDWINBUEAQQBBfyASIA1mIgsbQQFB","fiALGyASIA1lGyILayALIAkoAggtAAAbQf8BcSIJQf8BRiAIIAdJIAkbDQUMAQsgCCAHTw0AIA0gDWINBAsgBSAENgIMIAAgASAG","IAVBDGoQjICAgAAiBkEBaiECIAYgAU8NAiABIAJrIQEgACACQQJ0aiEAQQAhAgwECyAIIAtB1ITAgAAQmICAgAAACyAHIAtB5ITA","gAAQmICAgAAACyACIAEgAUHEhMCAABCXgICAAAALIAAgACABIAYgBBCNgICAACIGIAIgAyAEEIGAgIAAIAEgBkF/c2ohASAAIAZB","AnRqIgJBBGohAAsgA0F/aiEDIAFBIU8NAAsLIAAgASAEEIiAgIAACyAFQRBqJICAgIAAC4kFBAR/AnwCfwF8AkAgA0H4////AXFF","DQAgACAAIANBA3YiA0EEdCIFaiAAIANBHGwiBmogAyAEEIKAgIAAIQAgASABIAVqIAEgBmogAyAEEIKAgIAAIQEgAiACIAVqIAIg","BmogAyAEEIKAgIAAIQILAkACQAJAAkACQAJAAkAgACgCACIDIAQoAgAiBCgCBCIHTw0AIAEoAgAiBSAHTw0BIAQoAgAiCCAFQQN0","aisDACEJAkACQAJAAkAgCCADQQN0aisDACIKIApiIgsNACAJIAlhDQFBASEMDAMLIAkgCWINAUEAIQwMAgtBAEEAQX8gCiAJZiIG","G0EBQX4gBhsgCiAJZRsiBmsgBiAEKAIILQAAG0H/AXEiBkH/AUYgAyAFSSAGGyEMDAELIAMgBUkhDAsgAigCACIGIAdPDQIgCCAG","QQN0aisDACENAkACQAJAAkACQAJAAkAgCw0AIA0gDWENASAMRQ0NIAkgCWINBgwLCyANIA1iDQEgDA0MIAkgCWENAwwJC0EAQQBB","fyAKIA1mIgcbQQFBfiAHGyAKIA1lGyIHayAHIAQoAggtAAAbQf8BcSIHQf8BRiADIAZJIAcbIQMMAQsgAyAGSSEDCyAMIANHDQkg","CSAJYg0BIA0gDWINBwtBAEEAQX8gCSANZiIAG0EBQX4gABsgCSANZRsiAGsgACAEKAIILQAAG0H/AXEiAEH/AUYgBSAGSSAAGyEA","DAcLIA0gDWENBAsgBSAGSSEADAULIAMgB0HUhMCAABCYgICAAAALIAUgB0HkhMCAABCYgICAAAALIAYgB0HkhMCAABCYgICAAAAL","QQAhAAwBC0EBIQALIAIgASAMIABzGyEACyAAC9wDAwR/AnwBfwJAAkAgASgCACIDIAIoAgAiAigCBCIETw0AAkAgAUF8aiIFKAIA","IgYgBE8NACACKAIAIgQgBkEDdGorAwAhBwJAAkAgBCADQQN0aisDACIIIAhiDQAgByAHYg0BQQBBAEF/IAggB2YiBBtBAUF+IAQb","IAggB2UbIgRrIAQgAigCCC0AABtB/wFxIgRB/wFGIAMgBkkgBBtBAUYNAQwECyADIAZPDQMgByAHYQ0DCyABIAY2AgACQCAFIABG","DQAgA0EDdCEJA0AgBSEGAkACQAJAIAMgAigCBCIETw0AIAZBfGoiBSgCACIBIARPDQEgAigCACIEIAFBA3RqKwMAIQcCQAJAIAQg","CWorAwAiCCAIYg0AIAcgB2INBEEAQQBBfyAIIAdmIgQbQQFBfiAEGyAIIAdlGyIEayAEIAIoAggtAAAbQf8BcSIEQf8BRiADIAFJ","IAQbQQFHDQEMBAsgAyABTw0AIAcgB2INAwsgBiEFDAQLIAMgBEHUhMCAABCYgICAAAALIAEgBEHkhMCAABCYgICAAAALIAYgATYC","ACAFIABHDQALCyAFIAM2AgAPCyAGIARB5ITAgAAQmICAgAAACyADIARB1ITAgAAQmICAgAAACwunBQMIfwJ8A38gAiABQQJ0QXxq","IgRqIQUgACAEaiEGIAAgAUEBdiIHQQJ0aiIIQXxqIQkgAygCACEDAkACQAJAAkACQANAIAgoAgAiCiADKAIEIgtPDQEgACgCACIE","IAtPDQIgAygCACILIARBA3RqKwMAIQwCQAJAAkAgCyAKQQN0aisDACINIA1iDQAgDCAMYg0BQQAhC0EAQQBBfyANIAxmIg4bQQFB","fiAOGyANIAxlGyIOayAOIAMoAggtAAAbQf8BcSIOQf8BRiAKIARJIA4bQQFGDQEMAgtBACELIAogBE8NASAMIAxhDQELQQEhCyAK","IQQLIAIgBDYCACAGKAIAIgQgAygCBCIOTw0DIAkoAgAiCiAOTw0EIAtBAnQhDiALQQFzQQJ0IQ8gAygCACILIApBA3RqKwMAIQwC","QAJAAkAgCyAEQQN0aisDACINIA1iDQAgDCAMYg0BQQAhC0EAQQBBfyANIAxmIhAbQQFBfiAQGyANIAxlGyIQayAQIAMoAggtAAAb","Qf8BcSIQQf8BRiAEIApJIBAbQQFGDQEMAgtBACELIAQgCk8NASAMIAxhDQELQQEhCyAKIQQLIAJBBGohAiAIIA5qIQggACAPaiEA","IAUgBDYCACAFQXxqIQUgCSALQQJ0IgRrIQkgBCAGakF8aiEGIAdBf2oiBw0ACyAGQQRqIQQgCUEEaiEDAkAgAUEBcUUNACACIAAg","CCAAIANJIgobKAIANgIAIAggACADT0ECdGohCCAAIApBAnRqIQALAkAgCCAERw0AIAAgA0YNBQsQoYCAgAAACyAKIAtB1ITAgAAQ","mICAgAAACyAEIAtB5ITAgAAQmICAgAAACyAEIA5B1ITAgAAQmICAgAAACyAKIA5B5ITAgAAQmICAgAAACwuDAgICfwJ8AkACQAJA","AkAgACACQQJ0aiIEKAIAIgIgAygCACIDKAIEIgVPDQAgACABQQJ0aiIBKAIAIgAgBU8NASADKAIAIgUgAEEDdGorAwAhBgJAAkAg","BSACQQN0aisDACIHIAdiDQAgBiAGYg0EQQBBAEF/IAcgBmYiBRtBAUF+IAUbIAcgBmUbIgVrIAUgAygCCC0AABtB/wFxIgNB/wFG","IAIgAEkgAxtBAUcNAQwECyACIABPDQAgBiAGYg0DCyAAIQMgAiEADAMLIAIgBUHUhMCAABCYgICAAAALIAAgBUHkhMCAABCYgICA","AAALIAIhAwsgASADNgIAIAQgADYCAAvsAgACQCABQQlJDQAgAEEAQQMgAhCFgICAACAAQQFBByACEIWAgIAAIABBAkEFIAIQhYCA","gAAgAEEEQQggAhCFgICAACAAQQBBByACEIWAgIAAIABBAkEEIAIQhYCAgAAgAEEDQQggAhCFgICAACAAQQVBBiACEIWAgIAAIABB","AEECIAIQhYCAgAAgAEEBQQMgAhCFgICAACAAQQRBBSACEIWAgIAAIABBB0EIIAIQhYCAgAAgAEEBQQQgAhCFgICAACAAQQNBBiAC","EIWAgIAAIABBBUEHIAIQhYCAgAAgAEEAQQEgAhCFgICAACAAQQJBBCACEIWAgIAAIABBA0EFIAIQhYCAgAAgAEEGQQggAhCFgICA","ACAAQQJBAyACEIWAgIAAIABBBEEFIAIQhYCAgAAgAEEGQQcgAhCFgICAACAAQQFBAiACEIWAgIAAIABBA0EEIAIQhYCAgAAgAEEF","QQYgAhCFgICAAA8LAAuEBQACQCABQQ1JDQAgAEEAQQwgAhCFgICAACAAQQFBCiACEIWAgIAAIABBAkEJIAIQhYCAgAAgAEEDQQcg","AhCFgICAACAAQQVBCyACEIWAgIAAIABBBkEIIAIQhYCAgAAgAEEBQQYgAhCFgICAACAAQQJBAyACEIWAgIAAIABBBEELIAIQhYCA","gAAgAEEHQQkgAhCFgICAACAAQQhBCiACEIWAgIAAIABBAEEEIAIQhYCAgAAgAEEBQQIgAhCFgICAACAAQQNBBiACEIWAgIAAIABB","B0EIIAIQhYCAgAAgAEEJQQogAhCFgICAACAAQQtBDCACEIWAgIAAIABBBEEGIAIQhYCAgAAgAEEFQQkgAhCFgICAACAAQQhBCyAC","EIWAgIAAIABBCkEMIAIQhYCAgAAgAEEAQQUgAhCFgICAACAAQQNBCCACEIWAgIAAIABBBEEHIAIQhYCAgAAgAEEGQQsgAhCFgICA","ACAAQQlBCiACEIWAgIAAIABBAEEBIAIQhYCAgAAgAEECQQUgAhCFgICAACAAQQZBCSACEIWAgIAAIABBB0EIIAIQhYCAgAAgAEEK","QQsgAhCFgICAACAAQQFBAyACEIWAgIAAIABBAkEEIAIQhYCAgAAgAEEFQQYgAhCFgICAACAAQQlBCiACEIWAgIAAIABBAUECIAIQ","hYCAgAAgAEEDQQQgAhCFgICAACAAQQVBByACEIWAgIAAIABBBkEIIAIQhYCAgAAgAEECQQMgAhCFgICAACAAQQRBBSACEIWAgIAA","IABBBkEHIAIQhYCAgAAgAEEIQQkgAhCFgICAACAAQQNBBCACEIWAgIAAIABBBUEGIAIQhYCAgAAPCwALlgIBB38jgICAgABBgAFr","IgMkgICAgAACQAJAIAFBAkkNACABQSBLDQEgASABQQF2IgQgAUESSSIFGyEGIAEgBGshByAAIARBAnRqIQggACEJA0ACQAJAIAZB","DEsNAEEBIQQgBkEITQ0BIAkgBiACEIaAgIAAQQkhBAwBCyAJIAYgAhCHgICAAEENIQQLIARBf2ogBk8NAgJAIAQgBkYNACAEQQJ0","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","EJiAgIAAAAsgByAKQeSEwIAAEJiAgIAAAAsgBCABQdSEwIAAEJiAgIAAAAsgBSABQeSEwIAAEJiAgIAAAAuwCAMJfwJ8An8CQCAB","DQBBAA8LIAIoAgAhBCAAKAIAIQVBACEGIAAhAgJAIABBBGoiByAAIAFBAnRqIghBfGoiCU8NACADKAIAIgooAgQhAUEAIQYgACEC","AkACQAJAAkADQCACQQRqIgsoAgAiByABTw0BIAQgAU8NAiAKKAIAIgwgBEEDdGorAwAhDQJAAkACQAJAIAwgB0EDdGorAwAiDiAO","Yg0AIA0gDWENAUEBIQ8MAwsgDSANYg0BQQAhDwwCC0EAQQBBfyAOIA1mIhAbQQFBfiAQGyAOIA1lGyIQayAQIAooAggtAAAbQf8B","cSIQQf8BRiAHIARJIBAbIQ8MAQsgByAESSEPCyACIAAgBkECdGoiECgCADYCACAQIAc2AgAgAkEIaiICKAIAIgcgAU8NAyAGIA9q","IQYCQAJAAkACQCAMIAdBA3RqKwMAIg4gDmINACANIA1hDQFBASEMDAMLIA0gDWINAUEAIQwMAgtBAEEAQX8gDiANZiIMG0EBQX4g","DBsgDiANZRsiDGsgDCAKKAIILQAAG0H/AXEiDEH/AUYgByAESSAMGyEMDAELIAcgBEkhDAsgCyAAIAZBAnRqIhAoAgA2AgAgECAH","NgIAIAYgDGohBiACQQRqIAlPDQQMAAsLIAcgAUHUhMCAABCYgICAAAALIAQgAUHkhMCAABCYgICAAAALIAcgAUHUhMCAABCYgICA","AAALIAJBBGohBwsCQAJAAkACQAJAIAcgCEYNACADKAIAIQEDQCACIQwgByICKAIAIgcgASgCBCIKTw0CIAQgCk8NAyABKAIAIgog","BEEDdGorAwAhDQJAAkACQAJAIAogB0EDdGorAwAiDiAOYg0AIA0gDWENAUEBIQoMAwsgDSANYg0BQQAhCgwCC0EAQQBBfyAOIA1m","IgobQQFBfiAKGyAOIA1lGyIKayAKIAEoAggtAAAbQf8BcSIKQf8BRiAHIARJIAobIQoMAQsgByAESSEKCyAMIAAgBkECdGoiCygC","ADYCACALIAc2AgAgBiAKaiEGIAJBBGoiByAIRw0ACyAHQXxqIQILIAUgAygCACIHKAIEIgFPDQIgBCABTw0DIAcoAgAiASAEQQN0","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","gYCAgAA2AhwgA0GBgICAADYCFCADIANBCGo2AhggAyADQQxqNgIQQaiAwIAAIANBEGogAhCVgICAAAALjwUCBn8BfiOAgICAAEEQ","ayIGJICAgIAAAkACQCABDQAgBUEBaiEHIAAoAgghCEEtIQkMAQtBK0F/IAAoAggiCEGAgIABcSIBGyEJIAFBFXYgBWohBwsCQAJA","IAhBgICABHENAEEAIQIMAQsCQAJAIANBEEkNACACIAMQloCAgAAhCgwBC0EAIQogA0UNACACIQEgAyELA0AgCiABLAAAQb9/Smoh","CiABQQFqIQEgC0F/aiILDQALCyAKIAdqIQcLAkACQAJAAkACQCAHIAAvAQwiCk8NACAIQYCAgAhxDQFBASEBIAYgACAKIAdrQQEQ","moCAgAAgBigCACIHQX9GDQQgBi8BBCELIAAgCSACIAMQm4CAgAANBCAAKAIAIgMgBCAFIAAoAgQiAigCDBGAgICAAICAgIAADQRB","ACEKIAtB//8DcSELA0AgCyAKQf//A3EiAEshASALIABNDQUgCkEBaiEKIAMgByACKAIQEYGAgIAAgICAgABFDQAMBQsLIAAgCSAC","IAMQm4CAgABFDQEMAgsgACAAKQIIIgynQYCAgP95cUGwgICAAnI2AgggACAJIAIgAxCbgICAAA0BQQEhASAGQQhqIAAgCiAHa0EB","EJqAgIAAIAYoAggiC0F/Rg0CIAYvAQwhAiAAKAIAIgcgBCAFIAAoAgQiAygCDBGAgICAAICAgIAADQJBACEKIAJB//8DcSECAkAD","QCACIApB//8DcU0NAUEBIQEgCkEBaiEKIAcgCyADKAIQEYGAgIAAgICAgABFDQAMBAsLIAAgDDcCCEEAIQEMAgsgACgCACAEIAUg","ACgCBCgCDBGAgICAAICAgIAAIQEMAQtBASEBCyAGQRBqJICAgIAAIAELuAEBA38gAiEEAkACQAJAAkAgASgCCCIFQR12QQNxDgQB","AwACAQsgAkH+/wNxQQF2IQQMAgtBACEEDAELIAJBACADQf8BcRshBAsgBUH///8AcSEFIAEoAgQhAyABKAIAIQZBACEBAkACQANA","IAFB//8DcSAEQf//A3FPDQEgAUEBaiEBIAYgBSADKAIQEYGAgIAAgICAgABFDQALQX8hBQwBCyACIARrIQELIAAgATsBBCAAIAU2","AgALUgACQCABQX9GDQAgACgCACABIAAoAgQoAhARgYCAgACAgICAAEUNAEEBDwsCQCACDQBBAA8LIAAoAgAgAiADIAAoAgQoAgwR","gICAgACAgICAAAvRAwEJfwJAAkAgAEHoB08NACAAIQMMAQsgAUF8aiEEQQAhBSAAIQYCQAJAAkACQAJAA0AgBiAGQZDOAG4iA0GQ","zgBsayIHQf//A3FB5ABuIQggAiAFaiIJQXxqIAJPDQEgBCACaiIKIAhBAXQiCy0ApIXAgAA6AAAgCUF9aiACTw0CIApBAWogC0Gl","hcCAAGotAAA6AAAgCUF+aiACTw0DIApBAmogByAIQeQAbGtBAXRB/v8HcSIILQCkhcCAADoAACAJQX9qIAJPDQQgCkEDaiAIQaWF","wIAAai0AADoAACAEQXxqIQQgBUF8aiEFIAZB/6ziBEshCSADIQYgCUUNBQwACwsgCUF8aiACQZSFwIAAEJiAgIAAAAsgCUF9aiAC","QZSFwIAAEJiAgIAAAAsgCUF+aiACQZSFwIAAEJiAgIAAAAsgCUF/aiACQZSFwIAAEJiAgIAAAAsgAiAFaiECCwJAAkAgA0EKTw0A","IAMhBgwBCyABIAJBfmoiAmogAyADQf//A3FB5ABuIgZB5ABsa0H//wNxQQF0LwCkhcCAADsAAAsCQAJAIABFDQAgBkUNAQsgASAC","QX9qIgJqIAZBAXRBHnEtAKWFwIAAOgAACyACC1EBAX8jgICAgABBEGsiAiSAgICAACABQQFBAUEAIAJBBmogACgCACACQQZqQQoQ","nICAgAAiAGpBCiAAaxCZgICAACEAIAJBEGokgICAgAAgAAthAQF/I4CAgIAAQSBrIgMkgICAgAAgAyABNgIMIAMgADYCCCADQYGA","gIAANgIcIANBgYCAgAA2AhQgAyADQQxqNgIYIAMgA0EIajYCEEGAgMCAACADQRBqIAIQlYCAgAAAC2EBAX8jgICAgABBIGsiAySA","gICAACADIAE2AgwgAyAANgIIIANBgYCAgAA2AhwgA0GBgICAADYCFCADIANBDGo2AhggAyADQQhqNgIQQd+AwIAAIANBEGogAhCV","gICAAAALYQEBfyOAgICAAEEgayIDJICAgIAAIAMgATYCDCADIAA2AgggA0GBgICAADYCHCADQYGAgIAANgIUIAMgA0EMajYCGCAD","IANBCGo2AhBBmIHAgAAgA0EQaiACEJWAgIAAAAsYAEHshsCAAEGZAUG4h8CAABCVgICAAAALSgEDf0EAIQMCQCACRQ0AAkADQCAA","LQAAIgQgAS0AACIFRw0BIABBAWohACABQQFqIQEgAkF/aiICRQ0CDAALCyAEIAVrIQMLIAMLC9IHAQBBgIDAAAvIBxZzbGljZSBp","bmRleCBzdGFydHMgYXQgwA0gYnV0IGVuZHMgYXQgwAAgaW5kZXggb3V0IG9mIGJvdW5kczogdGhlIGxlbiBpcyDAEiBidXQgdGhl","IGluZGV4IGlzIMAAEnJhbmdlIHN0YXJ0IGluZGV4IMAiIG91dCBvZiByYW5nZSBmb3Igc2xpY2Ugb2YgbGVuZ3RoIMAAEHJhbmdl","IGVuZCBpbmRleCDAIiBvdXQgb2YgcmFuZ2UgZm9yIHNsaWNlIG9mIGxlbmd0aCDAAC9yb290Ly5ydXN0dXAvdG9vbGNoYWlucy9z","dGFibGUteDg2XzY0LXVua25vd24tbGludXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvY29yZS9zcmMvc2xpY2Uv","c29ydC9zaGFyZWQvc21hbGxzb3J0LnJzAC9yb290Ly5ydXN0dXAvdG9vbGNoYWlucy9zdGFibGUteDg2XzY0LXVua25vd24tbGlu","dXgtZ251L2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvY29yZS9zcmMvc2xpY2Uvc29ydC91bnN0YWJsZS9xdWlja3NvcnQu","cnMAL3Jvb3QvLnJ1c3R1cC90b29sY2hhaW5zL3N0YWJsZS14ODZfNjQtdW5rbm93bi1saW51eC1nbnUvbGliL3J1c3RsaWIvc3Jj","L3J1c3QvbGlicmFyeS9jb3JlL3NyYy9mbXQvbnVtLnJzAHNyYy9saWIucnMAAABNARAAfwAAADgAAAAbAAAANwIQAAoAAAAlAAAA","EgAAADcCEAAKAAAAJgAAABIAAAA3AhAACgAAAGAAAAAMAAAANwIQAAoAAABgAAAAIwAAAM0BEABpAAAAWAIAAAUAAAAwMDAxMDIw","MzA0MDUwNjA3MDgwOTEwMTExMjEzMTQxNTE2MTcxODE5MjAyMTIyMjMyNDI1MjYyNzI4MjkzMDMxMzIzMzM0MzUzNjM3MzgzOTQw","NDE0MjQzNDQ0NTQ2NDc0ODQ5NTA1MTUyNTM1NDU1NTY1NzU4NTk2MDYxNjI2MzY0NjU2NjY3Njg2OTcwNzE3MjczNzQ3NTc2Nzc3","ODc5ODA4MTgyODM4NDg1ODY4Nzg4ODk5MDkxOTI5Mzk0OTU5Njk3OTg5OXVzZXItcHJvdmlkZWQgY29tcGFyaXNvbiBmdW5jdGlv","biBkb2VzIG5vdCBjb3JyZWN0bHkgaW1wbGVtZW50IGEgdG90YWwgb3JkZXLPABAAfQAAAFYDAAAFAAAA"].join("");var fo=1e4,_t="\0";function hn(e,t){return e==="rust"||e==="auto"&&t>=fo}var eu=1,tu=65536,Et=null,Ao=null;function nu(e){if(typeof atob=="function"){let n=atob(e),o=new Uint8Array(n.length);for(let r=0;r<n.length;r++)o[r]=n.charCodeAt(r);return o}let t=globalThis.Buffer;if(t)return new Uint8Array(t.from(e,"base64"));throw new Error("No base64 decoder")}function bn(){return Et?Promise.resolve(Et):(Ao||(Ao=(async()=>{try{return typeof WebAssembly>"u"?null:(Et=await WebAssembly.compile(nu(Tl)),Et)}catch{return null}})()),Ao)}function Ml(){return Et}function Bl(e){let t=e.isWellFormed;if(typeof t=="function")return t.call(e);for(let n=0;n<e.length;n++){let o=e.charCodeAt(n);if(o>=55296&&o<=56319){let r=e.charCodeAt(n+1);if(r>=56320&&r<=57343){n++;continue}return!1}if(o>=56320&&o<=57343)return!1}return!0}var qt=e=>e+7&-8,Tt=class e{x;base;encoder=new TextEncoder;offsetsPtr=0;textPtr=0;textLen=0;rows=0;hasIndex=!1;freePtr;constructor(t){this.x=t,this.base=qt(t.yk_heap_base()),this.freePtr=this.base}static create(t=Et){if(!t)return null;try{let o=new WebAssembly.Instance(t,{}).exports;return o.yk_version()!==eu?null:new e(o)}catch{return null}}ensure(t){let n=t-this.x.memory.buffer.byteLength;n>0&&this.x.memory.grow(Math.ceil(n/tu))}setSearchTexts(t){this.hasIndex=!1,this.freePtr=this.base;try{let n=0;for(let d of t){if(!Bl(d))return!1;n+=d.length*3}let o=t.length,r=this.base,a=qt(r+(o+1)*4);this.ensure(a+n);let i=this.x.memory.buffer,s=new Uint32Array(i,r,o+1),l=new Uint8Array(i,a,n),c=0;for(let d=0;d<o;d++)s[d]=c,c+=this.encoder.encodeInto(t[d],l.subarray(c)).written??0;return s[o]=c,this.offsetsPtr=r,this.textPtr=a,this.textLen=c,this.rows=o,this.freePtr=qt(a+c),this.hasIndex=!0,!0}catch{return!1}}search(t){if(!this.hasIndex||!t||t.includes(_t)||!Bl(t))return null;try{let n=this.encoder.encode(t),o=this.freePtr,r=qt(o+n.length);this.ensure(r+this.rows*4),new Uint8Array(this.x.memory.buffer,o,n.length).set(n);let a=this.x.yk_search(this.textPtr,this.textLen,this.offsetsPtr,this.rows,o,n.length,r);return new Uint32Array(this.x.memory.buffer,r,a).slice()}catch{return null}}sortByKeys(t,n){try{let o=t.length,r=this.freePtr,a=qt(r+o*8);return this.ensure(a+o*4),new Float64Array(this.x.memory.buffer,r,o).set(t),this.x.yk_sort(r,o,n?1:0,a),new Uint32Array(this.x.memory.buffer,a,o).slice()}catch{return null}}};function Ql(e){return e>=.1?`${e<10?e.toFixed(1):Math.round(e)} ms`:"<0.1 ms"}function Bt(e,t){let n=new Array(t.length);for(let o=0;o<t.length;o++)n[o]=e[t[o]];return n}function yn(e,t){let n=hn(e,t),[o,r]=(0,Mt.useState)(()=>n?Ml():null);return(0,Mt.useEffect)(()=>{if(!n||o)return;let a=!0;return bn().then(i=>{a&&i&&r(i)}),()=>{a=!1}},[n,o]),(0,Mt.useMemo)(()=>n&&o?Tt.create(o):null,[n,o])}v();function Rl(e,t){return e.map(n=>t.map(o=>String(n[o.key]??"").toLowerCase()).join(_t))}function ou(e,t){let n=new Float64Array(e.length),o=0;for(let r=0;r<e.length;r++){let a=e[r][t];if(a==null){n[r]=NaN;continue}if(typeof a!="number"||Number.isNaN(a))return null;n[r]=a,o++}return o?n:null}function Nl(e){return e.search==="rust"||e.sort==="rust"?"rust":e.search||e.sort?"ts":null}function Gl({data:e,columns:t,searchText:n,filters:o,toolColumns:r,sortKey:a,sortDirection:i,locale:s,core:l=null,searchReady:c=!1,stats:d}){let g=[...e];if(d&&(d.search=null,d.sort=null),n.trim()){let p=n.trim().toLowerCase(),m=l&&c?l.search(p):null;d&&(d.search=m?"rust":"ts"),m?g=Bt(e,m):g=g.filter(h=>t.some(y=>String(h[y.key]??"").toLowerCase().includes(p)))}if(o.length&&(g=Ze(g,r,o)),a){if(l){let p=ou(g,a),m=p&&l.sortByKeys(p,i!=="asc");if(m)return d&&(d.sort="rust"),Bt(g,m)}d&&(d.sort="ts"),g.sort((p,m)=>{let h=p[a],y=m[a];if(h==null&&y==null)return 0;if(h==null)return 1;if(y==null)return-1;if(typeof h=="number"&&typeof y=="number")return i==="asc"?h-y:y-h;let u=String(h).localeCompare(String(y),s,{numeric:!0,sensitivity:"base"});return i==="asc"?u:-u})}return g}var F=require("react/jsx-runtime"),ru={"en-US":{search:"Search...",searchAria:"Search grid",rows:"rows",row:"row",loading:"Loading...",noData:"No data found.",selectRow:"Select row",pageSize:"Page size",page:"Page",of:"of",previous:"Previous",next:"Next",yes:"Yes",no:"No",sortAscending:"Sort ascending",sortDescending:"Sort descending",filtersActive:e=>`${e} filter(s) applied`,clearFilters:"Clear filters"},"te-IN":{search:"\u0C36\u0C4B\u0C27\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F...",searchAria:"\u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D\u200C\u0C32\u0C4B \u0C36\u0C4B\u0C27\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F",rows:"\u0C35\u0C30\u0C41\u0C38\u0C32\u0C41",row:"\u0C35\u0C30\u0C41\u0C38",loading:"\u0C32\u0C4B\u0C21\u0C4D \u0C05\u0C35\u0C41\u0C24\u0C4B\u0C02\u0C26\u0C3F...",noData:"\u0C21\u0C47\u0C1F\u0C3E \u0C15\u0C28\u0C2C\u0C21\u0C32\u0C47\u0C26\u0C41.",selectRow:"\u0C35\u0C30\u0C41\u0C38\u0C28\u0C41 \u0C0E\u0C02\u0C1A\u0C41\u0C15\u0C4B\u0C02\u0C21\u0C3F",pageSize:"\u0C2A\u0C47\u0C1C\u0C40 \u0C2A\u0C30\u0C3F\u0C2E\u0C3E\u0C23\u0C02",page:"\u0C2A\u0C47\u0C1C\u0C40",of:"\u0C32\u0C4B",previous:"\u0C35\u0C46\u0C28\u0C41\u0C15\u0C15\u0C41",next:"\u0C2E\u0C41\u0C02\u0C26\u0C41\u0C15\u0C41",yes:"\u0C05\u0C35\u0C41\u0C28\u0C41",no:"\u0C15\u0C3E\u0C26\u0C41",sortAscending:"\u0C06\u0C30\u0C4B\u0C39\u0C23 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u0C32\u0C4B \u0C05\u0C2E\u0C30\u0C4D\u0C1A\u0C02\u0C21\u0C3F",sortDescending:"\u0C05\u0C35\u0C30\u0C4B\u0C39\u0C23 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u0C32\u0C4B \u0C05\u0C2E\u0C30\u0C4D\u0C1A\u0C02\u0C21\u0C3F",filtersActive:e=>`${e} \u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D(\u0C32\u0C41) \u0C35\u0C47\u0C36\u0C3E\u0C30\u0C41`,clearFilters:"\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D\u0C32\u0C41 \u0C24\u0C40\u0C38\u0C47\u0C2F\u0C02\u0C21\u0C3F"}};function iu({size:e=20,color:t="currentColor",strokeWidth:n=2.4}){return(0,F.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,F.jsx)("circle",{cx:"11",cy:"11",r:"6.5"}),(0,F.jsx)("path",{d:"m16 16 5 5"})]})}function au({size:e=18,color:t="currentColor",strokeWidth:n=2.4,label:o}){return(0,F.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":o?void 0:!0,"aria-label":o,role:o?"img":void 0,children:[o?(0,F.jsx)("title",{children:o}):null,(0,F.jsx)("path",{d:"m6 15 6-6 6 6"})]})}function su({size:e=18,color:t="currentColor",strokeWidth:n=2.4,label:o}){return(0,F.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":o?void 0:!0,"aria-label":o,role:o?"img":void 0,children:[o?(0,F.jsx)("title",{children:o}):null,(0,F.jsx)("path",{d:"m6 9 6 6 6-6"})]})}function lu({size:e=20,color:t="currentColor",strokeWidth:n=2.4}){return(0,F.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,F.jsx)("path",{d:"m15 18-6-6 6-6"})})}function cu({size:e=20,color:t="currentColor",strokeWidth:n=2.4}){return(0,F.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,F.jsx)("path",{d:"m9 18 6-6-6-6"})})}function Ll({size:e=18,color:t="currentColor",strokeWidth:n=2.4}){return(0,F.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,F.jsx)("path",{d:"m5 12 4 4L19 6"})})}function Fl({data:e,columns:t,rowKey:n="id",view:o="auto",mobileBreakpoint:r=768,theme:a="default",locale:i="en-US",ai:s=!1,search:l=!0,selectable:c=!1,selectedKeys:d=[],onSelectionChange:g,pagination:p,loading:m=!1,highlightIds:h=[],highlightColor:y="#fff3a3",autoScrollToHighlight:u=!1,onRowClick:I,onSortChange:C,empty:b,className:k="",inputLanguage:x,toolName:B="yuktai_grid",toolDescriptions:M,webmcp:L=!1,onWebMCPStatusChange:q,onAgentResult:O,customRules:G=[],engine:Q="ts",showSearchTime:S=!1,onSearchTime:j}){let ee=i==="te-IN"?"te-IN":"en-US",H=ru[ee],ce=s===!0||typeof s=="object"&&s!==null,pe=p!==!1&&p!==void 0,z=typeof p=="object"?p.pageSize??20:20,Z=typeof p=="object"&&p.sizeOptions&&p.sizeOptions.length>0?p.sizeOptions:[10,20,50,100],[$,_]=(0,le.useState)(""),[oe,W]=(0,le.useState)(1),[ue,Me]=(0,le.useState)(z),[Le,Y]=(0,le.useState)(),[me,we]=(0,le.useState)("asc"),[Qe,Re]=(0,le.useState)(!1),[he,nt]=(0,le.useState)([]),[ut,ft]=(0,le.useState)([]),Ue=(0,le.useMemo)(()=>it(t.map(E=>({key:String(E.key),label:E.label,type:E.type}))),[t]);(0,le.useEffect)(()=>{Me(z),W(1)},[z]),(0,le.useEffect)(()=>{let E=()=>{Re(window.innerWidth<=r)};return E(),window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)}},[r]);let Ye=yn(Q,e.length),gt=(0,le.useMemo)(()=>Ye?Ye.setSearchTexts(Rl(e,t)):!1,[Ye,e,t]),ke=(0,le.useMemo)(()=>{let E={search:null,sort:null},U=typeof performance<"u"?performance.now():Date.now(),ne=Gl({data:e,columns:t,searchText:$,filters:he,toolColumns:Ue,sortKey:Le,sortDirection:me,locale:i,core:Ye,searchReady:gt,stats:E}),re=(typeof performance<"u"?performance.now():Date.now())-U;return{rows:ne,ms:re,engine:Nl(E)}},[e,t,$,he,Ue,Le,me,i,Ye,gt]),ve=ke.rows;(0,le.useEffect)(()=>{!j||!ke.engine||j({query:$.trim(),ms:ke.ms,rows:ke.rows.length,engine:ke.engine})},[ke]);let je=pe?Math.max(1,Math.ceil(ve.length/ue)):1;(0,le.useEffect)(()=>{oe>je&&W(je)},[oe,je]);let N=(0,le.useMemo)(()=>{let E=[...h.map(String),...ut];return Array.from(new Set(E))},[h,ut]);(0,le.useEffect)(()=>{if(!u)return;let E=N[0];if(E==null)return;let U=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(String(E)):String(E).replace(/["\\]/g,"\\$&");document.querySelector(`[data-yuktai-row-id="${U}"]`)?.scrollIntoView({behavior:"smooth",block:"center"})},[N,u,oe]);let se=(0,le.useMemo)(()=>{if(!pe)return ve;let E=(oe-1)*ue;return ve.slice(E,E+ue)},[ve,pe,oe,ue]),qe=o==="card"||o==="auto"&&Qe,Gt=E=>String(E[n]??""),Ln=E=>d.some(U=>String(U)===E),Va=E=>N.some(U=>String(U)===E),Ka=E=>{if(!c)return;let U=Gt(E),ne=Ln(U)?d.filter(re=>String(re)!==U):[...d,U];g?.(ne)},Ac=E=>{if(E.sortable===!1)return;let U=String(E.key),ne=Le===U&&me==="asc"?"desc":"asc";Y(U),we(ne),W(1),C?.({key:U,direction:ne})},fc=E=>{_(E),W(1)},hc=(E,U)=>{let ne=t.find(re=>String(re.key)===E||re.label.toLowerCase()===E.toLowerCase());ne&&(Y(String(ne.key)),we(U),W(1),C?.({key:String(ne.key),direction:U}))},Fn=ee==="te-IN"?"te":"en",ja=(0,le.useCallback)(E=>{E?(Y(E.key),we(E.direction)):(Y(void 0),we("asc")),W(1),C?.(E)},[C]),Xa=(0,le.useCallback)(E=>{nt(E),W(1)},[]),Za=(0,le.useCallback)(E=>{if(ft(E),pe&&E.length){let U=ve.findIndex(ne=>String(ne[n]??"")===E[0]);U>=0&&W(Math.floor(U/ue)+1)}},[pe,ve,n,ue]),Pn=(0,le.useMemo)(()=>St({data:e,columns:Ue,rowKey:String(n),locale:Fn,filters:he,onHighlightRows:Za,onFiltersChange:Xa,onSortChange:ja,onOpenRow:I?E=>{let U=ve.findIndex(re=>String(re[n]??"")===E),ne=U>=0?ve[U]:e.find(re=>String(re[n]??"")===E);ne&&I(ne,Math.max(U,0))}:void 0,onSelectRow:c&&g?E=>{d.some(U=>String(U)===E)||g([...d.map(String),E])}:void 0},{name:B,descriptions:M}),[e,Ue,n,Fn,he,Za,Xa,ja,I,ve,c,g,d,B,M]),nn=Ut({tools:Pn,data:e,locale:Fn,columns:Ue,rowKey:String(n),customRules:G,onResult:O}),es=(0,le.useMemo)(()=>Pn.map(E=>({...E,execute:U=>nn.executeTool(E.name,U)})),[Pn,nn.executeTool]),bc=()=>{nt([]),W(1)},ts=(E,U,ne)=>{if(U.render)return U.render(E[U.key],E,ne);let re=E[U.key];if(re==null)return"";if(U.type==="date"){let ht=new Date(String(re));if(!Number.isNaN(ht.getTime()))return ht.toLocaleDateString(i)}return U.type==="boolean"?re?H.yes:H.no:String(re)},ie=a==="dark",ns={width:"100%",overflow:"hidden",border:a==="high-contrast"?"2px solid #000000":ie?"1px solid #334155":"1px solid #e2e8f0",borderRadius:12,background:ie?"#0f172a":"#ffffff",color:ie?"#f8fafc":"#0f172a",fontFamily:a==="dyslexia"?"Arial, sans-serif":void 0},yc={padding:12,display:"flex",alignItems:"center",gap:12,flexWrap:"wrap",borderBottom:ie?"1px solid #334155":"1px solid #e2e8f0"},os=E=>({width:40,height:40,minWidth:40,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,borderRadius:8,border:ie?"1px solid #475569":"1px solid #cbd5e1",background:E?ie?"#1e293b":"#f8fafc":ie?"#1e293b":"#ffffff",color:E?"#94a3b8":ie?"#f8fafc":"#0f172a",cursor:E?"not-allowed":"pointer",opacity:E?.55:1});if(m)return(0,F.jsxs)("div",{className:k,style:ns,children:[L&&(0,F.jsx)(Yt,{tools:es,onStatusChange:q}),(0,F.jsx)("div",{style:{padding:32,textAlign:"center"},children:H.loading})]});let Ic=t.map(E=>({key:String(E.key),label:E.label,type:E.type==="number"?"number":E.type==="date"?"date":"text"}));return(0,F.jsxs)("div",{className:k,style:ns,children:[L&&(0,F.jsx)(Yt,{tools:es,onStatusChange:q}),(l||ce||he.length>0)&&(0,F.jsxs)("div",{style:yc,children:[l&&(0,F.jsxs)("div",{style:{position:"relative",width:"100%",maxWidth:420},children:[(0,F.jsx)("div",{style:{position:"absolute",left:12,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",color:ie?"#cbd5e1":"#64748b",pointerEvents:"none"},children:(0,F.jsx)(iu,{size:19})}),(0,F.jsx)("input",{value:$,onChange:E=>{_(E.target.value),W(1)},placeholder:H.search,"aria-label":H.searchAria,style:{width:"100%",padding:"10px 12px 10px 40px",borderRadius:8,border:ie?"1px solid #475569":"1px solid #cbd5e1",background:ie?"#1e293b":"#ffffff",color:ie?"#ffffff":"#0f172a",outline:"none",boxSizing:"border-box"}})]}),he.length>0&&(0,F.jsxs)("button",{type:"button",onClick:bc,title:H.clearFilters,style:{padding:"6px 10px",borderRadius:999,border:ie?"1px solid #475569":"1px solid #cbd5e1",background:ie?"#1e293b":"#f1f5f9",color:"inherit",fontSize:12,cursor:"pointer"},children:[H.filtersActive(he.length)," \u2715"]}),(0,F.jsxs)("div",{style:{marginLeft:"auto",fontSize:13,opacity:.7,whiteSpace:"nowrap"},children:[ve.length," ",ve.length===1?H.row:H.rows,S&&ke.engine&&(0,F.jsxs)("span",{title:ke.engine==="rust"?"Rust (WebAssembly)":"TypeScript",children:[" \xB7 ",Ql(ke.ms)," \xB7 ",ke.engine==="rust"?"Rust":"TS"]})]}),ce&&(0,F.jsx)(An,{data:e,columns:Ic,onSearch:fc,onSort:hc,theme:ie?"dark":"light",language:ee,inputLanguage:x??ee,agent:{ask:nn.ask,loading:nn.loading},embedded:!0})]}),ve.length===0?(0,F.jsx)("div",{style:{padding:40,textAlign:"center",opacity:.7},children:b??H.noData}):qe?(0,F.jsx)("div",{style:{display:"grid",gap:12,padding:12},children:se.map((E,U)=>{let ne=Gt(E),re=Ln(ne),ht=Va(ne);return(0,F.jsxs)("div",{"data-yuktai-row-id":ne,onClick:()=>I?.(E,U),style:{padding:14,borderRadius:10,border:ie?"1px solid #334155":"1px solid #e2e8f0",background:ht?y:re?ie?"#1e3a5f":"#eff6ff":ie?"#1e293b":"#ffffff",cursor:I?"pointer":"default"},children:[c&&(0,F.jsx)("button",{type:"button",onClick:Ne=>{Ne.stopPropagation(),Ka(E)},"aria-label":`${H.selectRow} ${ne}`,"aria-pressed":re,style:{width:32,height:32,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,marginBottom:10,borderRadius:7,border:re?"1px solid #2563eb":"1px solid #cbd5e1",background:re?"#2563eb":"transparent",color:re?"#ffffff":"currentColor",cursor:"pointer"},children:re&&(0,F.jsx)(Ll,{size:17})}),t.map(Ne=>(0,F.jsxs)("div",{style:{display:"flex",gap:8,padding:"5px 0",alignItems:"flex-start"},children:[(0,F.jsx)("strong",{style:{minWidth:100,opacity:.7},children:Ne.label}),(0,F.jsx)("span",{children:ts(E,Ne,U)})]},String(Ne.key)))]},ne)})}):(0,F.jsx)("div",{style:{width:"100%",overflowX:"auto"},children:(0,F.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse"},children:[(0,F.jsx)("thead",{children:(0,F.jsxs)("tr",{children:[c&&(0,F.jsx)("th",{style:{padding:10,borderBottom:ie?"1px solid #334155":"1px solid #e2e8f0",width:52}}),t.filter(E=>!(Qe&&E.hiddenOnMobile)).map(E=>{let U=Le===String(E.key);return(0,F.jsx)("th",{onClick:()=>Ac(E),style:{padding:10,textAlign:E.align??"left",borderBottom:ie?"1px solid #334155":"1px solid #e2e8f0",whiteSpace:"nowrap",cursor:E.sortable===!1?"default":"pointer",width:E.width,userSelect:"none"},children:(0,F.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5},children:[E.label,U&&(me==="asc"?(0,F.jsx)(au,{size:17,label:H.sortAscending}):(0,F.jsx)(su,{size:17,label:H.sortDescending}))]})},String(E.key))})]})}),(0,F.jsx)("tbody",{children:se.map((E,U)=>{let ne=Gt(E),re=Ln(ne),ht=Va(ne);return(0,F.jsxs)("tr",{"data-yuktai-row-id":ne,onClick:()=>I?.(E,U),style:{background:ht?y:re?ie?"#1e3a5f":"#eff6ff":"transparent",cursor:I?"pointer":"default"},children:[c&&(0,F.jsx)("td",{style:{padding:10,borderBottom:ie?"1px solid #334155":"1px solid #e2e8f0"},children:(0,F.jsx)("button",{type:"button",onClick:Ne=>{Ne.stopPropagation(),Ka(E)},"aria-label":`${H.selectRow} ${ne}`,"aria-pressed":re,style:{width:28,height:28,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,borderRadius:6,border:re?"1px solid #2563eb":ie?"1px solid #64748b":"1px solid #cbd5e1",background:re?"#2563eb":"transparent",color:re?"#ffffff":"currentColor",cursor:"pointer"},children:re&&(0,F.jsx)(Ll,{size:16})})}),t.filter(Ne=>!(Qe&&Ne.hiddenOnMobile)).map(Ne=>(0,F.jsx)("td",{style:{padding:10,textAlign:Ne.align??"left",borderBottom:ie?"1px solid #334155":"1px solid #e2e8f0"},children:ts(E,Ne,U)},String(Ne.key)))]},ne)})})]})}),pe&&(0,F.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",padding:12,borderTop:ie?"1px solid #334155":"1px solid #e2e8f0"},children:[(0,F.jsxs)("span",{style:{fontSize:13,opacity:.7},children:[H.page," ",oe," ",H.of," ",je]}),(0,F.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[typeof p=="object"&&p.showSizeChanger&&(0,F.jsx)("select",{value:ue,onChange:E=>{let U=Number(E.target.value);!Number.isFinite(U)||U<=0||(Me(U),W(1))},"aria-label":H.pageSize,style:{minHeight:40,padding:"7px 10px",borderRadius:8,border:ie?"1px solid #475569":"1px solid #cbd5e1",background:ie?"#1e293b":"#ffffff",color:ie?"#ffffff":"#0f172a"},children:Z.map(E=>(0,F.jsx)("option",{value:E,children:E},E))}),(0,F.jsx)("button",{type:"button",disabled:oe<=1,onClick:()=>W(E=>Math.max(1,E-1)),"aria-label":H.previous,title:H.previous,style:os(oe<=1),children:(0,F.jsx)(lu,{size:20})}),(0,F.jsx)("button",{type:"button",disabled:oe>=je,onClick:()=>W(E=>Math.min(je,E+1)),"aria-label":H.next,title:H.next,style:os(oe>=je),children:(0,F.jsx)(cu,{size:20})})]})]})]})}v();var te=require("react");function Pl(e){return e===!1?Number.MAX_SAFE_INTEGER:e===!0||e===void 0?10:e.pageSize??10}function ho(e){return String(e??"").normalize("NFC").toLowerCase().trim()}function In(e){return e==null||typeof e=="string"&&e.trim()===""}function bo(e){if(typeof e=="number")return Number.isFinite(e)?e:null;let t=String(e??"").trim();if(t==="")return null;let n=Number(t);return Number.isFinite(n)?n:null}function yo(e){let t=e instanceof Date?e.getTime():new Date(String(e)).getTime();return Number.isFinite(t)?t:null}function du(e,t,n,o){if(n==="number"||typeof e=="number"&&typeof t=="number"){let r=bo(e),a=bo(t);if(r!==null&&a!==null)return r-a}if(n==="date"||e instanceof Date&&t instanceof Date){let r=yo(e),a=yo(t);if(r!==null&&a!==null)return r-a}return typeof e=="boolean"&&typeof t=="boolean"?e===t?0:e?1:-1:String(e).localeCompare(String(t),o,{sensitivity:"base",numeric:!0})}var lt=()=>typeof performance<"u"?performance.now():Date.now();function uu(e,t){return e.map(n=>t.map(o=>{let r=n[o.key];return r==null?"":ho(r)}).join(_t))}function gu(e,t,n){let o=!1,r=!0,a=!0,i=0;for(let c of e){let d=c[t];In(d)||(i++,typeof d=="number"?o=!0:r=!1,d instanceof Date||(a=!1))}if(i===0)return null;let s=null;if(n==="number"||r?s=bo:(n==="date"&&!o||a)&&(s=yo),!s)return null;let l=new Float64Array(e.length);for(let c=0;c<e.length;c++){let d=e[c][t];if(In(d)){l[c]=NaN;continue}let g=s(d);if(g===null)return null;l[c]=g}return l}function Dl(e){let{data:t,columns:n,pagination:o=!0,mobileBreakpoint:r=768,locale:a,initialFilters:i=[],engine:s="ts"}=e,l=yn(s,t.length),[c,d]=(0,te.useState)(null),[g,p]=(0,te.useState)(""),[m,h]=(0,te.useState)(i),[y,u]=(0,te.useState)(1),[I,C]=(0,te.useState)(Pl(o)),[b,k]=(0,te.useState)(!1),x=Pl(o);(0,te.useEffect)(()=>{C(x),u(1)},[x]),(0,te.useEffect)(()=>{if(typeof window>"u")return;let Y=()=>{k(window.innerWidth<=r)};return Y(),window.addEventListener("resize",Y),()=>window.removeEventListener("resize",Y)},[r]);let B=(0,te.useMemo)(()=>it(n.map(Y=>({key:String(Y.key),label:Y.label,type:Y.type}))),[n]),M=(0,te.useCallback)(Y=>{d(me=>!me||me.key!==Y?{key:Y,direction:"asc"}:me.direction==="asc"?{key:Y,direction:"desc"}:null),u(1)},[]),L=(0,te.useCallback)(Y=>{d(Y&&Y.direction?Y:null),u(1)},[]),q=(0,te.useCallback)(()=>{d(null),u(1)},[]),O=(0,te.useCallback)(Y=>{p(Y),u(1)},[]),G=(0,te.useCallback)(Y=>{h(Y),u(1)},[]),Q=(0,te.useCallback)(Y=>{h(me=>[...me.filter(we=>we.key!==Y.key),Y]),u(1)},[]),S=(0,te.useCallback)(Y=>{h(me=>me.filter(we=>we.key!==Y)),u(1)},[]),j=(0,te.useCallback)(()=>{h([]),u(1)},[]),ee=(0,te.useCallback)(Y=>{C(Math.max(1,Math.floor(Y)||1)),u(1)},[]),H=(0,te.useMemo)(()=>l?l.setSearchTexts(uu(t,n)):!1,[l,t,n]),ce=(0,te.useMemo)(()=>{let Y=lt(),me=ho(g);if(!me)return{rows:t,ms:0,engine:null};if(l&&H){let Qe=l.search(me);if(Qe)return{rows:Bt(t,Qe),ms:lt()-Y,engine:"rust"}}return{rows:t.filter(Qe=>n.some(Re=>{let he=Qe[Re.key];return he==null?!1:ho(he).includes(me)})),ms:lt()-Y,engine:"ts"}},[t,g,n,l,H]),pe=ce.rows,z=(0,te.useMemo)(()=>{let Y=lt();return{rows:Ze(pe,B,m),ms:lt()-Y}},[pe,B,m]),Z=z.rows,$=(0,te.useMemo)(()=>{if(!c||!c.direction)return{rows:Z,ms:0,engine:null};let Y=lt(),me=n.find(Re=>String(Re.key)===c.key),we=c.direction==="desc"?-1:1;if(l){let Re=gu(Z,c.key,me?.type),he=Re&&l.sortByKeys(Re,we===-1);if(he)return{rows:Bt(Z,he),ms:lt()-Y,engine:"rust"}}return{rows:[...Z].sort((Re,he)=>{let nt=Re[c.key],ut=he[c.key],ft=In(nt),Ue=In(ut);return ft&&Ue?0:ft?1:Ue?-1:we*du(nt,ut,me?.type,a)}),ms:lt()-Y,engine:"ts"}},[Z,c,n,a,l]),_=$.rows,oe=(0,te.useMemo)(()=>!ce.engine&&!$.engine?null:{query:g.trim(),ms:ce.ms+z.ms+$.ms,rows:Z.length,engine:ce.engine==="rust"||$.engine==="rust"?"rust":"ts"},[ce,z,$,g,Z.length]),W=Math.max(1,Math.ceil(_.length/I)),ue=(0,te.useMemo)(()=>{if(o===!1)return _;let Y=(y-1)*I;return _.slice(Y,Y+I)},[_,y,I,o]);(0,te.useEffect)(()=>{y>W&&u(W)},[y,W]);let Me=(0,te.useCallback)(Y=>u(Math.min(Math.max(1,Math.floor(Y)||1),W)),[W]),Le=(0,te.useCallback)(()=>{d(null),p(""),h([]),u(1)},[]);return{displayedData:ue,rows:_,searchTime:oe,totalCount:t.length,filteredCount:_.length,sort:c,toggleSort:M,setSort:L,clearSort:q,searchQuery:g,setSearchQuery:O,filters:m,setFilters:G,setFilter:Q,removeFilter:S,clearFilters:j,page:y,pageSize:I,totalPages:W,setPage:Me,setPageSize:ee,isMobile:b,reset:Le}}v();v();v();v();var pu="[data-yuktai-panel]";function We(){return typeof window<"u"&&typeof document<"u"}function mt(e){return typeof e=="object"&&e!==null&&e.nodeType===9}function Ge(e){return e||(We()?document:null)}function K(e,t,n={}){return Array.from(e.querySelectorAll(t)).filter(o=>!o.closest(pu)&&(n.includeHidden||mu(o)))}function mu(e){if(!We()||e.closest("[hidden],[aria-hidden='true']"))return!1;let t=e;for(;t;){let n=window.getComputedStyle(t);if(n.display==="none"||n.visibility==="hidden")return!1;t=t.parentElement}return!0}function fe(e){return(e??"").replace(/\s+/g," ").trim()}function xe(e,t=60){let n=fe(e);return n.length>t?`${n.slice(0,t-1)}\u2026`:n}function _e(e){let t=[],n=e;for(;n&&n.nodeType===1&&t.length<4;){let o=n.tagName.toLowerCase();if(n.id&&/^[A-Za-z][\w-]*$/.test(n.id)){t.unshift(`${o}#${n.id}`);break}let r=n.parentElement;if(!r){t.unshift(o);break}let a=Array.from(r.children).filter(i=>i.tagName===n.tagName);t.unshift(a.length>1?`${o}:nth-of-type(${a.indexOf(n)+1})`:o),n=r}return t.join(" > ")}function Au(e,t){return e.split(/\s+/).map(n=>fe(t.getElementById(n)?.textContent)).filter(Boolean).join(" ")}function De(e){let t=e.ownerDocument,n=e.getAttribute("aria-labelledby");if(n){let a=Au(n,t);if(a)return a}let o=fe(e.getAttribute("aria-label"));if(o)return o;let r=e.tagName.toLowerCase();if(r==="input"||r==="select"||r==="textarea"){let a=e.getAttribute("id");if(a){let l=t.querySelector(`label[for="${fu(a)}"]`),c=fe(l?.textContent);if(c)return c}let i=e.closest("label");if(i){let l=fe(i.textContent);if(l)return l}let s=(e.getAttribute("type")??"").toLowerCase();if(s==="submit"||s==="button"||s==="reset")return fe(e.getAttribute("value"))||(s==="submit"?"Submit":"");if(s==="image")return fe(e.getAttribute("alt"))}if(r==="img")return fe(e.getAttribute("alt"));if(r==="button"||r==="a"||e.getAttribute("role")){let a=fe(e.textContent);if(a)return a;let i=Array.from(e.querySelectorAll("img[alt], svg[aria-label]")).map(s=>fe(s.getAttribute("alt")??s.getAttribute("aria-label"))).filter(Boolean).join(" ");if(i)return i}return fe(e.getAttribute("title"))}function fu(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/["\\]/g,"\\$&")}function ct(e){if(!e)return null;let t=e.trim().toLowerCase();if(t==="transparent")return{r:0,g:0,b:0,a:0};let n=t.match(/^rgba?\(([^)]+)\)$/);if(n){let r=n[1].split(/[\s,/]+/).filter(Boolean),[a,i,s]=r.slice(0,3).map(Number),l=r[3],c=l===void 0?1:l.endsWith("%")?Number(l.slice(0,-1))/100:Number(l);return[a,i,s,c].some(d=>!Number.isFinite(d))?null:{r:a,g:i,b:s,a:c}}let o=t.match(/^#([0-9a-f]{3,8})$/);if(o){let r=o[1];return(r.length===3||r.length===4)&&(r=r.split("").map(a=>a+a).join("")),r.length!==6&&r.length!==8?null:{r:parseInt(r.slice(0,2),16),g:parseInt(r.slice(2,4),16),b:parseInt(r.slice(4,6),16),a:r.length===8?parseInt(r.slice(6,8),16)/255:1}}return null}function Io(e,t){let n=e.a+t.a*(1-e.a);if(n===0)return{r:0,g:0,b:0,a:0};let o=(r,a)=>(r*e.a+a*t.a*(1-e.a))/n;return{r:o(e.r,t.r),g:o(e.g,t.g),b:o(e.b,t.b),a:n}}function xn(e){let t=n=>{let o=n/255;return o<=.04045?o/12.92:Math.pow((o+.055)/1.055,2.4)};return .2126*t(e.r)+.7152*t(e.g)+.0722*t(e.b)}function Qt(e,t){let n=t.a<1?Io(t,{r:255,g:255,b:255,a:1}):t,o=e.a<1?Io(e,n):e,r=xn(o),a=xn(n),[i,s]=r>a?[r,a]:[a,r];return Math.round((i+.05)/(s+.05)*100)/100}function $l(e){let t=[],n=e;for(;n;){let r=window.getComputedStyle(n);if(r.backgroundImage&&r.backgroundImage!=="none")return null;let a=ct(r.backgroundColor);if(a&&a.a>0&&(t.push(a),a.a>=1))break;n=n.parentElement}let o={r:255,g:255,b:255,a:1};for(let r=t.length-1;r>=0;r--)o=Io(t[r],o);return o}function zl(e){let t=window.getComputedStyle(e),n=parseFloat(t.fontSize)||16,o=parseInt(t.fontWeight,10)||400;return n>=24||n>=18.66&&o>=700}function Jt(e){return Array.from(e.childNodes).some(t=>t.nodeType===3&&fe(t.textContent).length>0)}var Ol="a[href],button,input:not([type='hidden']),select,textarea,summary,[tabindex]:not([tabindex='-1']),[contenteditable='true']",wn="a[href],button,input:not([type='hidden']),select,textarea,summary,[role='button'],[role='link'],[role='checkbox'],[role='tab'],[role='menuitem']";v();var Je={accessibility:'<circle cx="12" cy="4" r="2"/><path d="M4 8l8-1 8 1M12 7v5m-5 9 5-8 5 8M7 12l-2 5m12-5 2 5"/>',contrast:'<circle cx="12" cy="12" r="9"/><path d="M12 3a9 9 0 0 0 0 18z"/>',moon:'<path d="M20 14.5A8.5 8.5 0 0 1 9.5 4 8.5 8.5 0 1 0 20 14.5z"/>',motion:'<path d="M4 12h12m-5-5 5 5-5 5M20 5v14"/>',reading:'<path d="M4 5h16M4 10h12M4 15h16M4 20h10"/>',target:'<circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="4"/>',speaker:'<path d="M4 9v6h4l5 4V5L8 9H4z"/><path d="M16 9a4 4 0 0 1 0 6M18.5 6.5a8 8 0 0 1 0 11"/>',palette:'<circle cx="12" cy="12" r="9"/><circle cx="8" cy="10" r="1.3"/><circle cx="12" cy="7.5" r="1.3"/><circle cx="16" cy="10" r="1.3"/><path d="M12 21a3 3 0 0 1 0-6h2"/>',skip:'<path d="M5 5l7 7-7 7M13 5l7 7-7 7"/>',close:'<path d="m18 6-12 12M6 6l12 12"/>',plus:'<path d="M12 5v14M5 12h14"/>',minus:'<path d="M5 12h14"/>',reset:'<path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/>',search:'<circle cx="11" cy="11" r="6.5"/><path d="m16 16 5 5"/>',sort:'<path d="m8 9 4-4 4 4m-8 6 4 4 4-4"/>',sortUp:'<path d="m6 15 6-6 6 6"/>',sortDown:'<path d="m6 9 6 6 6-6"/>',chevrons:'<path d="m8 9 4-4 4 4m-8 6 4 4 4-4"/>',grid:'<rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/>',cards:'<rect x="3" y="4" width="18" height="7" rx="1.5"/><rect x="3" y="13" width="18" height="7" rx="1.5"/>',chat:'<path d="M21 11.5a8.5 8.5 0 0 1-8.5 8.5 9 9 0 0 1-4-.9L3 21l1.9-5.5a9 9 0 0 1-.9-4A8.5 8.5 0 0 1 12.5 3H13a8.5 8.5 0 0 1 8 8z"/>',mic:'<rect x="9" y="2" width="6" height="12" rx="3"/><path d="M5 10a7 7 0 0 0 14 0M12 17v5m-4 0h8"/>',stop:'<rect x="6" y="6" width="12" height="12" rx="2"/>',download:'<path d="M12 3v12m-5-5 5 5 5-5M4 21h16"/>',copy:'<rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V5a2 2 0 0 1 2-2h10"/>',filter:'<path d="M4 5h16l-6 7v6l-4 2v-8z"/>',check:'<path d="m5 12 4 4L19 6"/>',left:'<path d="m15 18-6-6 6-6"/>',right:'<path d="m9 18 6-6-6-6"/>',first:'<path d="m11 18-6-6 6-6M19 18l-6-6 6-6"/>',last:'<path d="m13 18 6-6-6-6M5 18l6-6-6-6"/>',spark:'<path d="m12 3 1.9 5.8L20 11l-6.1 2.2L12 19l-1.9-5.8L4 11l6.1-2.2zM19 14l1.2 2.8L23 18l-2.8 1.2L19 22l-1.2-2.8L15 18l2.8-1.2z"/>',alert:'<path d="m12 3 10 18H2L12 3z"/><path d="M12 9v5m0 3h.01"/>',info:'<circle cx="12" cy="12" r="9"/><path d="M12 11v6m0-9h.01"/>',form:'<rect x="5" y="3" width="14" height="18" rx="2"/><path d="M9 8h6M9 12h6M9 16h3"/>',eye:'<path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/>',layout:'<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18M9 21V9"/>',wand:'<path d="m15 4 5 5L9 20H4v-5z"/><path d="m13 6 5 5"/>',undo:'<path d="M9 14 4 9l5-5"/><path d="M4 9h10a6 6 0 0 1 0 12h-3"/>',tools:'<path d="M14.7 6.3a4 4 0 0 0-5.4 5.4L3 18l3 3 6.3-6.3a4 4 0 0 0 5.4-5.4l-2.5 2.5-2.4-.6-.6-2.4z"/>',plug:'<path d="M9 2v6M15 2v6M6 8h12v4a6 6 0 0 1-12 0zM12 18v4"/>',home:'<path d="M3 11 12 4l9 7"/><path d="M5 10v10h5v-6h4v6h5V10"/>',menu:'<path d="M4 6h16M4 12h16M4 18h16"/>',book:'<path d="M12 6c-2-1.5-5-2-8-2v14c3 0 6 .5 8 2 2-1.5 5-2 8-2V4c-3 0-6 .5-8 2zM12 6v14"/>',calendar:'<rect x="3" y="5" width="18" height="16" rx="2"/><path d="M3 10h18M8 3v4M16 3v4M7.5 14h2M14.5 14h2M7.5 17.5h2"/>',clock:'<circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/>',person:'<circle cx="12" cy="8" r="4"/><path d="M4 21a8 8 0 0 1 16 0"/>',users:'<circle cx="9" cy="8" r="3.5"/><path d="M2 20a7 7 0 0 1 14 0"/><path d="M16 4.5a3.5 3.5 0 0 1 0 7M18 13.5a7 7 0 0 1 4 6.5"/>',globe:'<circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"/>',lamp:'<path d="M12 3c2 2.6 3 4.3 3 6a3 3 0 0 1-6 0c0-1.7 1-3.4 3-6z"/><path d="M3 14h18c0 3.5-4 6-9 6s-9-2.5-9-6z"/><path d="M12 12v2"/>',play:'<circle cx="12" cy="12" r="9"/><path d="M10 8.5v7l6-3.5z"/>',pause:'<circle cx="12" cy="12" r="9"/><path d="M10 9v6M14 9v6"/>',send:'<path d="M21 3 3 10.5l7 3 3 7.5z"/><path d="m10 13.5 4.5-4.5"/>',share:'<circle cx="18" cy="5" r="2.5"/><circle cx="6" cy="12" r="2.5"/><circle cx="18" cy="19" r="2.5"/><path d="m8.2 10.8 7.6-4.6M8.2 13.2l7.6 4.6"/>',gift:'<rect x="3" y="8" width="18" height="4" rx="1"/><path d="M5 12v9h14v-9M12 8v13M12 8C10.5 5 7 4 7 6.5S10 8 12 8zm0 0c1.5-3 5-4 5-1.5S14 8 12 8z"/>',image:'<rect x="3" y="4" width="18" height="16" rx="2"/><circle cx="8.5" cy="9.5" r="1.5"/><path d="m21 15-5-5-10 10"/>',file:'<path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"/><path d="M14 3v5h5M9 13h6M9 17h6"/>',external:'<path d="M14 4h6v6M20 4l-9 9"/><path d="M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5"/>',arrowUp:'<path d="M12 19V5m-6 6 6-6 6 6"/>',arrowLeft:'<path d="M19 12H5m6-6-6 6 6 6"/>',arrowRight:'<path d="M5 12h14m-6-6 6 6-6 6"/>',headphones:'<path d="M4 15v-3a8 8 0 0 1 16 0v3"/><rect x="3" y="14" width="4" height="7" rx="1.5"/><rect x="17" y="14" width="4" height="7" rx="1.5"/>',music:'<path d="M9 18V5l11-2v13"/><circle cx="6" cy="18" r="3"/><circle cx="17" cy="16" r="3"/>',pin:'<path d="M12 21s7-6.2 7-11.5a7 7 0 0 0-14 0C5 14.8 12 21 12 21z"/><circle cx="12" cy="9.5" r="2.5"/>',map:'<path d="M3 6l6-3 6 3 6-3v15l-6 3-6-3-6 3z"/><path d="M9 3v15M15 6v15"/>',pen:'<path d="M12 3 6 9l1.5 8h9L18 9z"/><path d="M12 3v7.5"/><circle cx="12" cy="12" r="1.5"/><path d="M8 21h8"/>',wallet:'<rect x="3" y="7" width="18" height="13" rx="2"/><path d="M16 13.5h2M6 7l9-4 2 4"/>',install:'<rect x="6" y="2" width="12" height="20" rx="2"/><path d="M12 6v8m-3-3 3 3 3-3M10 18h4"/>',help:'<circle cx="12" cy="12" r="9"/><path d="M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .9-1 1.6v.6M12 17h.01"/>',temple:'<path d="M12 2v2M10 4h4l1 3H9zM8 7h8l1.5 4h-11zM6.5 11h11L19 15H5zM4 15h16v6H4z"/><path d="M10 21v-3a2 2 0 0 1 4 0v3"/>',meditate:'<circle cx="12" cy="4.5" r="2.2"/><path d="M12 8c-2.2 0-3.3 1.3-3.7 3.2L7.5 16M12 8c2.2 0 3.3 1.3 3.7 3.2l.8 4.8"/><path d="M4 18c3 2 5.5 2.4 8 1.2 2.5 1.2 5 .8 8-1.2"/><path d="M7.5 16c1.4 1.4 3 2 4.5 2s3.1-.6 4.5-2"/>',trophy:'<path d="M8 4h8v5a4 4 0 0 1-8 0z"/><path d="M8 6H5a3 3 0 0 0 3 4M16 6h3a3 3 0 0 1-3 4M12 13v4M8 21h8M9 17h6"/>',bulb:'<path d="M9 18h6M10 21h4"/><path d="M12 3a6 6 0 0 0-4 10.5c.7.7 1 1.5 1 2.5h6c0-1 .3-1.8 1-2.5A6 6 0 0 0 12 3z"/>',sun:'<circle cx="12" cy="12" r="4"/><path d="M12 2v2.5M12 19.5V22M4.9 4.9l1.8 1.8M17.3 17.3l1.8 1.8M2 12h2.5M19.5 12H22M4.9 19.1l1.8-1.8M17.3 6.7l1.8-1.8"/>',delete:'<path d="M4 7h16M10 11v6M14 11v6M6 7l1 13a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1l1-13M9 7V4h6v3"/>',robot:'<rect x="4" y="8" width="16" height="12" rx="3"/><path d="M12 8V4M9.5 4h5M2 13v3M22 13v3"/><circle cx="9" cy="14" r="1.3"/><circle cx="15" cy="14" r="1.3"/>',heart:'<path d="M12 20s-7.5-4.6-9.2-9.3A4.9 4.9 0 0 1 12 6.6a4.9 4.9 0 0 1 9.2 4.1C19.5 15.4 12 20 12 20z"/>',heartFilled:'<path fill="currentColor" d="M12 20s-7.5-4.6-9.2-9.3A4.9 4.9 0 0 1 12 6.6a4.9 4.9 0 0 1 9.2 4.1C19.5 15.4 12 20 12 20z"/>',hub:'<circle cx="12" cy="12" r="3"/><circle cx="5" cy="5" r="2"/><circle cx="19" cy="5" r="2"/><circle cx="5" cy="19" r="2"/><circle cx="19" cy="19" r="2"/><path d="m6.5 6.5 3.4 3.4M17.5 6.5l-3.4 3.4M6.5 17.5l3.4-3.4M17.5 17.5l-3.4-3.4"/>',code:'<path d="m8 7-5 5 5 5M16 7l5 5-5 5M14 4l-4 16"/>',text:'<path d="M3 7V5h11v2M8.5 5v14M6.5 19h4M14 12v-1.5h7V12M17.5 10.5V19M16 19h3"/>',bold:'<path d="M7 4h6a4 4 0 0 1 0 8H7zM7 12h7a4 4 0 0 1 0 8H7z"/>',italic:'<path d="M10 4h9M5 20h9M15 4 9 20"/>',underline:'<path d="M7 4v7a5 5 0 0 0 10 0V4M5 21h14"/>',alignLeft:'<path d="M4 5h16M4 9.5h9M4 14h16M4 18.5h9"/>',alignCenter:'<path d="M4 5h16M7.5 9.5h9M4 14h16M7.5 18.5h9"/>',alignRight:'<path d="M4 5h16M11 9.5h9M4 14h16M11 18.5h9"/>',alignJustify:'<path d="M4 5h16M4 9.5h16M4 14h16M4 18.5h16"/>',quote:'<path d="M4 18v-6.5A6.5 6.5 0 0 1 10.5 5M4 12h5.5v6H4zM13.5 18v-6.5A6.5 6.5 0 0 1 20 5M13.5 12H19v6h-5.5z"/>',title:'<path d="M5 6V4h14v2M12 4v16M9 20h6"/>',font:'<rect x="3" y="3" width="18" height="18" rx="3"/><path d="m8 17 4-10 4 10M9.4 13.5h5.2"/>',spellcheck:'<path d="m3 14 4-10 4 10M4.6 10.5h4.8M11 17l3 3 7-7"/>',abc:'<path d="m2 16 2.5-8L7 16M3 13.5h3M9.5 8v8h2.5a2 2 0 0 0 0-4H9.5h2a2 2 0 0 0 0-4H9.5M21 9.4a3.1 3.1 0 1 0 0 5.2"/>',pageBreak:'<path d="M6 3v5h12V3M6 21v-5h12v5M3 12h3M9 12h6M18 12h3"/>',link:'<path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1"/><path d="M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1"/>',style:'<rect x="3" y="3" width="7" height="18" rx="2"/><path d="m10 7.5 4.4-2.6a2 2 0 0 1 2.7.7l3.2 5.6a2 2 0 0 1-.7 2.7L10 19"/><circle cx="6.5" cy="17" r="1"/>',lock:'<rect x="5" y="11" width="14" height="10" rx="2"/><path d="M8 11V8a4 4 0 0 1 8 0v3M12 15v2"/>',unlock:'<rect x="5" y="11" width="14" height="10" rx="2"/><path d="M8 11V8a4 4 0 0 1 7.6-1.8M12 15v2"/>',key:'<circle cx="8" cy="15" r="4"/><path d="m11 12 9-9M17 6l3 3M14.5 8.5l2 2"/>',redo:'<path d="m15 14 5-5-5-5"/><path d="M20 9H10a6 6 0 0 0 0 12h3"/>',swap:'<path d="M7 4 3 8l4 4M3 8h14M17 12l4 4-4 4M21 16H7"/>',shuffle:'<path d="M16 3h5v5M4 20 21 3M21 16v5h-5M15 15l6 6M4 4l5 5"/>',fullscreen:'<path d="M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5"/>',fullscreenExit:'<path d="M9 4v5H4M20 9h-5V4M15 20v-5h5M4 15h5v5"/>',merge:'<circle cx="6" cy="5" r="2"/><circle cx="6" cy="19" r="2"/><circle cx="18" cy="12" r="2"/><path d="M6 7v10M6 7c0 4 4 5 10 5"/>',join:'<circle cx="9" cy="12" r="6"/><circle cx="15" cy="12" r="6"/>',touch:'<path d="M9 11V5a1.5 1.5 0 0 1 3 0v6M12 10a1.5 1.5 0 0 1 3 0v1M15 11a1.5 1.5 0 0 1 3 0v3c0 4-2.5 7-6 7-2.5 0-4-1-5.5-3.5L4.6 14a1.5 1.5 0 0 1 2.5-1.6L9 15"/>',volumeOff:'<path d="M4 9v6h4l5 4V5L8 9H4z"/><path d="m16.5 9.5 5 5M21.5 9.5l-5 5"/>',musicOff:'<path d="M9 13v5M9 7V5l11-2v9"/><circle cx="6" cy="18" r="3"/><path d="M3 3l18 18"/>',musicVideo:'<rect x="3" y="4" width="18" height="16" rx="2"/><path d="M10.5 15V8.5l5-1V13"/><circle cx="9" cy="15" r="1.5"/><circle cx="14" cy="13" r="1.5"/>',movie:'<rect x="3" y="9" width="18" height="11" rx="2"/><path d="m3.5 9-.6-3 16.6-3.4.6 3L3.5 9zM8.5 4.8l1.8 2.9M13.8 3.7l1.8 2.9"/>',slideshow:'<rect x="3" y="4" width="18" height="13" rx="2"/><path d="M10 8v5l4-2.5zM8 21h8M12 17v4"/>',storage:'<ellipse cx="12" cy="5" rx="8" ry="3"/><path d="M4 5v14c0 1.7 3.6 3 8 3s8-1.3 8-3V5M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3"/>',api:'<path d="M3 17v-6a2.5 2.5 0 0 1 5 0v6M3 14h5M11 17V7h2.5a2.5 2.5 0 0 1 0 5H11M18 7h3M19.5 7v10M18 17h3"/>',dataObject:'<path d="M8 4H7a2 2 0 0 0-2 2v4l-2 2 2 2v4a2 2 0 0 0 2 2h1M16 4h1a2 2 0 0 1 2 2v4l2 2-2 2v4a2 2 0 0 1-2 2h-1"/>',computer:'<rect x="3" y="4" width="18" height="12" rx="2"/><path d="M8 20h8M12 16v4"/>',phone:'<rect x="6" y="2" width="12" height="20" rx="2"/><path d="M10.5 18.5h3"/>',cloud:'<path d="M7 19a5 5 0 0 1-.6-10A6.5 6.5 0 0 1 18.6 9.5 4.8 4.8 0 0 1 17.5 19z"/>',wifi:'<path d="M2 9a15 15 0 0 1 20 0M5 12.5a10 10 0 0 1 14 0M8.5 16a5 5 0 0 1 7 0M12 19.5h.01"/>',wifiOff:'<path d="M2 9a15 15 0 0 1 20 0M5 12.5a10 10 0 0 1 14 0M8.5 16a5 5 0 0 1 7 0M12 19.5h.01M3 3l18 18"/>',searchOff:'<circle cx="11" cy="11" r="6.5"/><path d="m16 16 5 5M8.7 8.7l4.6 4.6M13.3 8.7l-4.6 4.6"/>',eyeOff:'<path d="M10.6 5.1A10 10 0 0 1 12 5c6.5 0 10 7 10 7a17 17 0 0 1-2.2 3.2M6.6 6.6C3.8 8.4 2 12 2 12s3.5 7 10 7a9.7 9.7 0 0 0 5.4-1.6M9.9 9.9a3 3 0 0 0 4.2 4.2M3 3l18 18"/>',bookmark:'<path d="M6 3h12v18l-6-4-6 4z"/>',school:'<path d="m2 9 10-5 10 5-10 5z"/><path d="M6 11v5c0 1.5 2.7 3 6 3s6-1.5 6-3v-5M22 9v6"/>',gavel:'<path d="m13 3.5 7.5 7.5M10 6.5l7.5 7.5M11.5 5l7 7-3 3-7-7zM10 11.5 3.5 18a1.4 1.4 0 0 0 2 2L12 13.5M13 21h8"/>',architecture:'<circle cx="12" cy="5" r="2"/><path d="M12 3V2M11 7 5.5 21M13 7l5.5 14M8 15h8"/>',brain:'<path d="M11 5.5A3 3 0 0 0 5.6 7 3 3 0 0 0 4 12a3 3 0 0 0 1.6 5A3 3 0 0 0 11 18.5zM13 5.5A3 3 0 0 1 18.4 7 3 3 0 0 1 20 12a3 3 0 0 1-1.6 5 3 3 0 0 1-5.4 1.5z"/><path d="M8 10h3M13 14h3"/>',volunteer:'<path d="M12 11s-3.5-2.2-3.5-4.6a1.8 1.8 0 0 1 3.5-.7 1.8 1.8 0 0 1 3.5.7C15.5 8.8 12 11 12 11z"/><path d="M2 15h3l3.5 1.5H13a1.5 1.5 0 0 1 0 3H9.5M5 21l1.5-1.5H14l5.5-4a1.6 1.6 0 0 0-2-2.4L14 15.6"/>',radio:'<circle cx="12" cy="12" r="9"/>',radioChecked:'<circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="4" fill="currentColor"/>',upload:'<path d="M12 15V3m-5 5 5-5 5 5M4 21h16"/>',arrowDown:'<path d="M12 5v14m-6-6 6 6 6-6"/>',factCheck:'<rect x="3" y="4" width="18" height="16" rx="2"/><path d="M7 9h4M7 13h4M7 17h2M13.5 13l2 2 3.5-3.5"/>',imageSearch:'<path d="M13 4H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"/><path d="m3 17 5-5 4 4"/><circle cx="17" cy="7" r="3"/><path d="m19.2 9.2 2.3 2.3"/>',documentScanner:'<path d="M3 7V4a1 1 0 0 1 1-1h3M17 3h3a1 1 0 0 1 1 1v3M21 17v3a1 1 0 0 1-1 1h-3M7 21H4a1 1 0 0 1-1-1v-3"/><path d="M7 8h10M7 12h10M7 16h6"/>',dashboard:'<rect x="3" y="3" width="8" height="10" rx="1.5"/><rect x="13" y="3" width="8" height="6" rx="1.5"/><rect x="3" y="15" width="8" height="6" rx="1.5"/><path d="M17 13v8M13 17h8"/>',cleaning:'<path d="m20 3-7.5 7.5"/><path d="M12.5 10.5c-2.5-1.6-6-1-7.4 1.7L3 20.5c3.2 1 7.2.4 10.2-1.6l.7-5.3c-.1-1.3-.6-2.3-1.4-3.1z"/><path d="M7.5 15.5 6 20.5M10.5 15l-1 5"/>',dragHandle:'<path d="M5 9h14M5 15h14"/>',zoomIn:'<circle cx="11" cy="11" r="6.5"/><path d="m16 16 5 5M8 11h6M11 8v6"/>',zoomOut:'<circle cx="11" cy="11" r="6.5"/><path d="m16 16 5 5M8 11h6"/>',insights:'<path d="m3 18 5-5 4 3 6-7"/><path d="M15 9h3v3"/><path d="m19 2.5.7 1.8 1.8.7-1.8.7-.7 1.8-.7-1.8-1.8-.7 1.8-.7z"/>',explore:'<circle cx="12" cy="12" r="9"/><path d="m15.5 8.5-2 5-5 2 2-5z"/>',save:'<path d="M5 3h11l5 5v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"/><path d="M7 3v5h8V3M7 21v-7h10v7"/>',label:'<path d="M4 6h11l5 6-5 6H4z"/>',keyboard:'<rect x="2" y="6" width="20" height="12" rx="2"/><path d="M6 10h.01M10 10h.01M14 10h.01M18 10h.01M6 14h.01M18 14h.01M9 14h6"/>',trendingUp:'<path d="m3 17 6-6 4 4 8-8"/><path d="M15 7h6v6"/>',trendingDown:'<path d="m3 7 6 6 4-4 8 8"/><path d="M15 17h6v-6"/>',cake:'<path d="M4 21h16M5 21v-7a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v7M5 16.5c1.5 1 2.5 1 3.5 0s2.5-1 3.5 0 2.5 1 3.5 0 2.5-1 3.5 0M12 12V8.5M12 6c-.9-.9-.9-2 0-3.3.9 1.3.9 2.4 0 3.3z"/>',barChart:'<path d="M4 20h16M7 20v-6M12 20V5M17 20V10"/>',admin:'<path d="M12 3 4 6v6c0 4.5 3.4 8 8 9 4.6-1 8-4.5 8-9V6z"/><circle cx="12" cy="10" r="2.5"/><path d="M8 16.5c1-1.8 2.4-2.5 4-2.5s3 .7 4 2.5"/>',bugReport:'<rect x="7" y="8" width="10" height="12" rx="5"/><path d="M9 8.5a3 3 0 0 1 6 0M12 12v8M7 13H3M21 13h-4M7 17l-3 1.5M17 17l3 1.5M7.5 10 5 8M16.5 10 19 8"/>',sentimentSad:'<circle cx="12" cy="12" r="9"/><path d="M8 16.5c1-1.4 2.4-2 4-2s3 .6 4 2M9 9.5h.01M15 9.5h.01"/>',integration:'<rect x="5" y="4" width="14" height="17" rx="2"/><path d="M9 4V3h6v1M10 11l-2 2 2 2M14 11l2 2-2 2"/>',namaskar:'<path d="M12 5.5V15M12 5.5c-.6-1.7-2.4-2.2-3.1-.9L7.2 11.5 4.5 14.5l3 5H10l2-3.5M12 5.5c.6-1.7 2.4-2.2 3.1-.9l1.7 6.9 2.7 3-3 5H14l-2-3.5"/>',sunrise:'<path d="M3 19h18M7 19a5 5 0 0 1 10 0M12 3v6M9.5 5.5 12 3l2.5 2.5M4.9 11.9l1.4 1.4M19.1 11.9l-1.4 1.4M2 16h2M20 16h2"/>',sunset:'<path d="M3 19h18M7 19a5 5 0 0 1 10 0M12 3v6M9.5 6.5 12 9l2.5-2.5M4.9 11.9l1.4 1.4M19.1 11.9l-1.4 1.4M2 16h2M20 16h2"/>',login:'<path d="M14 4h4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4M10 16l4-4-4-4M14 12H3"/>',logout:'<path d="M10 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h4M16 16l4-4-4-4M20 12H9"/>',speed:'<path d="M4.5 18a9 9 0 1 1 15 0"/><path d="m12 14 4-5"/><circle cx="12" cy="14" r="1.2"/>',repeat:'<path d="m17 2 3 3-3 3M4 11V9a4 4 0 0 1 4-4h12M7 22l-3-3 3-3M20 13v2a4 4 0 0 1-4 4H4"/>',loader:'<path d="M12 3v3M12 18v3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M3 12h3M18 12h3M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1"/>',star:'<path d="m12 3 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2L12 17.3l-5.6 2.9 1.1-6.2L3 9.6l6.2-.9z"/>',shieldCheck:'<path d="M12 3 4 6v6c0 4.5 3.4 8 8 9 4.6-1 8-4.5 8-9V6z"/><path d="m8.5 12 2.5 2.5 4.5-4.5"/>'},xo=Object.keys(Je);var Cn=3,wo="#ffffff",Hl="#111827";function Rt(e,t){let n=ct(e),o=ct(t);return n&&o?Qt(n,o):null}function kn(e){let t=Rt(wo,e),n=Rt(Hl,e);return t===null||n===null||t>=n?wo:Hl}var Wl=new Set;function hu(e,t){Wl.has(e)||(Wl.add(e),typeof console<"u"&&console.warn(`[yuktai icons] ${t}`))}function vn(e={}){let t=e.variant==="filled"?"filled":"outline",n=e.color||"currentColor";if(t==="outline")return{variant:t,color:n,glyph:n,contrast:null};let o=e.glyphColor||kn(n),r=Rt(o,n);return r!==null&&r<Cn&&hu(`${o}|${n}`,`glyph ${o} on ${n} is ${r}:1. WCAG 1.4.11 needs at least 3:1 for icons.`),{variant:t,color:n,glyph:o,contrast:r}}var Co="translate(3.6 3.6) scale(0.7)",ko="@media (forced-colors: active){.yi-bg{fill:CanvasText}.yi-glyph{stroke:Canvas;color:Canvas}}",dt=e=>String(e).replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t]);function vo(e,t={}){let n=Je[e]??Je.spark,o=t.size??20,{variant:r,color:a,glyph:i}=vn(t),s=t.strokeWidth??(r==="filled"?2.4:1.9),c=`<svg xmlns="http://www.w3.org/2000/svg" ${t.label?`role="img" aria-label="${dt(t.label)}"`:'aria-hidden="true"'} focusable="false" width="${dt(o)}" height="${dt(o)}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round" data-variant="${r}">`;if(r==="outline")return`${c}<g stroke="${dt(a)}" stroke-width="${s}">${n}</g></svg>`;let d=t.shape==="circle"?`<circle class="yi-bg" cx="12" cy="12" r="12" fill="${dt(a)}"/>`:`<rect class="yi-bg" width="24" height="24" rx="6" fill="${dt(a)}"/>`;return`${c}<style>${ko}</style>${d}<g class="yi-glyph" color="${dt(i)}" stroke="${dt(i)}" stroke-width="${s}" transform="${Co}">${n}</g></svg>`}var Ve=require("react/jsx-runtime");function be({size:e=20,color:t,strokeWidth:n,label:o,variant:r,glyphColor:a,shape:i,children:s,...l}){let c=!o,d=vn({variant:r,color:t,glyphColor:a,shape:i}),g=d.variant==="filled",p=n??(g?2.6:2.5);return(0,Ve.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:g?void 0:d.color,strokeWidth:g?void 0:p,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":c?"true":void 0,"aria-label":o,role:o?"img":void 0,focusable:"false","data-variant":d.variant,...l,children:g?(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("style",{children:ko}),i==="circle"?(0,Ve.jsx)("circle",{className:"yi-bg",cx:"12",cy:"12",r:"12",fill:d.color}):(0,Ve.jsx)("rect",{className:"yi-bg",width:"24",height:"24",rx:"6",fill:d.color}),(0,Ve.jsx)("g",{className:"yi-glyph",color:d.glyph,stroke:d.glyph,strokeWidth:p,transform:Co,children:s})]}):s})}v();var Vt=require("react/jsx-runtime");function So(e){return(0,Vt.jsxs)(be,{...e,children:[(0,Vt.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,Vt.jsx)("path",{d:"m20 20-4-4"})]})}v();var Kt=require("react/jsx-runtime");function Eo(e){return(0,Kt.jsxs)(be,{...e,children:[(0,Kt.jsx)("path",{d:"M12 19V5"}),(0,Kt.jsx)("path",{d:"m5 12 7-7 7 7"})]})}v();var jt=require("react/jsx-runtime");function To(e){return(0,jt.jsxs)(be,{...e,children:[(0,jt.jsx)("path",{d:"M12 5v14"}),(0,jt.jsx)("path",{d:"m5 12 7 7 7-7"})]})}v();var Bo=require("react/jsx-runtime");function Mo(e){return(0,Bo.jsx)(be,{...e,children:(0,Bo.jsx)("path",{d:"m15 18-6-6 6-6"})})}v();var Qo=require("react/jsx-runtime");function Ro(e){return(0,Qo.jsx)(be,{...e,children:(0,Qo.jsx)("path",{d:"m9 18 6-6-6-6"})})}v();var No=require("react/jsx-runtime");function Go(e){return(0,No.jsx)(be,{...e,children:(0,No.jsx)("path",{d:"M5 12.5 10 17.5 19.5 7"})})}v();var Xt=require("react/jsx-runtime");function Lo(e){return(0,Xt.jsxs)(be,{...e,children:[(0,Xt.jsx)("path",{d:"M18 6 6 18"}),(0,Xt.jsx)("path",{d:"m6 6 12 12"})]})}v();var A=require("react/jsx-runtime");function f({name:e,...t}){let n=Je[e]??Je.spark;return(0,A.jsx)(be,{...t,children:(0,A.jsx)("g",{dangerouslySetInnerHTML:{__html:n}})})}var Fo=e=>(0,A.jsx)(f,{...e,name:"accessibility"}),Po=e=>(0,A.jsx)(f,{...e,name:"contrast"}),Do=e=>(0,A.jsx)(f,{...e,name:"moon"}),$o=e=>(0,A.jsx)(f,{...e,name:"motion"}),zo=e=>(0,A.jsx)(f,{...e,name:"reading"}),Oo=e=>(0,A.jsx)(f,{...e,name:"target"}),Ho=e=>(0,A.jsx)(f,{...e,name:"speaker"}),Wo=e=>(0,A.jsx)(f,{...e,name:"palette"}),Uo=e=>(0,A.jsx)(f,{...e,name:"skip"}),Yo=e=>(0,A.jsx)(f,{...e,name:"plus"}),qo=e=>(0,A.jsx)(f,{...e,name:"minus"}),_o=e=>(0,A.jsx)(f,{...e,name:"reset"}),Jo=e=>(0,A.jsx)(f,{...e,name:"sort"}),Vo=e=>(0,A.jsx)(f,{...e,name:"chevrons"}),Ko=e=>(0,A.jsx)(f,{...e,name:"grid"}),jo=e=>(0,A.jsx)(f,{...e,name:"cards"}),Xo=e=>(0,A.jsx)(f,{...e,name:"chat"}),Zo=e=>(0,A.jsx)(f,{...e,name:"mic"}),er=e=>(0,A.jsx)(f,{...e,name:"stop"}),tr=e=>(0,A.jsx)(f,{...e,name:"download"}),nr=e=>(0,A.jsx)(f,{...e,name:"copy"}),or=e=>(0,A.jsx)(f,{...e,name:"filter"}),rr=e=>(0,A.jsx)(f,{...e,name:"first"}),ir=e=>(0,A.jsx)(f,{...e,name:"last"}),ar=e=>(0,A.jsx)(f,{...e,name:"spark"}),sr=e=>(0,A.jsx)(f,{...e,name:"alert"}),lr=e=>(0,A.jsx)(f,{...e,name:"info"}),cr=e=>(0,A.jsx)(f,{...e,name:"form"}),dr=e=>(0,A.jsx)(f,{...e,name:"eye"}),ur=e=>(0,A.jsx)(f,{...e,name:"layout"}),gr=e=>(0,A.jsx)(f,{...e,name:"wand"}),pr=e=>(0,A.jsx)(f,{...e,name:"undo"}),mr=e=>(0,A.jsx)(f,{...e,name:"tools"}),Ar=e=>(0,A.jsx)(f,{...e,name:"plug"}),fr=e=>(0,A.jsx)(f,{...e,name:"home"}),hr=e=>(0,A.jsx)(f,{...e,name:"menu"}),br=e=>(0,A.jsx)(f,{...e,name:"book"}),yr=e=>(0,A.jsx)(f,{...e,name:"calendar"}),Ir=e=>(0,A.jsx)(f,{...e,name:"clock"}),xr=e=>(0,A.jsx)(f,{...e,name:"person"}),wr=e=>(0,A.jsx)(f,{...e,name:"users"}),Cr=e=>(0,A.jsx)(f,{...e,name:"globe"}),kr=e=>(0,A.jsx)(f,{...e,name:"lamp"}),vr=e=>(0,A.jsx)(f,{...e,name:"play"}),Sr=e=>(0,A.jsx)(f,{...e,name:"pause"}),Er=e=>(0,A.jsx)(f,{...e,name:"send"}),Tr=e=>(0,A.jsx)(f,{...e,name:"share"}),Br=e=>(0,A.jsx)(f,{...e,name:"gift"}),Mr=e=>(0,A.jsx)(f,{...e,name:"image"}),Qr=e=>(0,A.jsx)(f,{...e,name:"file"}),Rr=e=>(0,A.jsx)(f,{...e,name:"external"}),Nr=e=>(0,A.jsx)(f,{...e,name:"arrowUp"}),Gr=e=>(0,A.jsx)(f,{...e,name:"arrowLeft"}),Lr=e=>(0,A.jsx)(f,{...e,name:"arrowRight"}),Fr=e=>(0,A.jsx)(f,{...e,name:"headphones"}),Pr=e=>(0,A.jsx)(f,{...e,name:"music"}),Dr=e=>(0,A.jsx)(f,{...e,name:"pin"}),$r=e=>(0,A.jsx)(f,{...e,name:"map"}),zr=e=>(0,A.jsx)(f,{...e,name:"pen"}),Or=e=>(0,A.jsx)(f,{...e,name:"wallet"}),Hr=e=>(0,A.jsx)(f,{...e,name:"install"}),Wr=e=>(0,A.jsx)(f,{...e,name:"help"}),Ur=e=>(0,A.jsx)(f,{...e,name:"temple"}),Yr=e=>(0,A.jsx)(f,{...e,name:"meditate"}),qr=e=>(0,A.jsx)(f,{...e,name:"trophy"}),_r=e=>(0,A.jsx)(f,{...e,name:"bulb"}),Jr=e=>(0,A.jsx)(f,{...e,name:"sun"}),Vr=e=>(0,A.jsx)(f,{...e,name:"delete"}),Kr=e=>(0,A.jsx)(f,{...e,name:"robot"}),jr=e=>(0,A.jsx)(f,{...e,name:"heart"}),Xr=e=>(0,A.jsx)(f,{...e,name:"heartFilled"}),Zr=e=>(0,A.jsx)(f,{...e,name:"hub"}),ei=e=>(0,A.jsx)(f,{...e,name:"code"}),ti=e=>(0,A.jsx)(f,{...e,name:"text"}),ni=e=>(0,A.jsx)(f,{...e,name:"bold"}),oi=e=>(0,A.jsx)(f,{...e,name:"italic"}),ri=e=>(0,A.jsx)(f,{...e,name:"underline"}),ii=e=>(0,A.jsx)(f,{...e,name:"alignLeft"}),ai=e=>(0,A.jsx)(f,{...e,name:"alignCenter"}),si=e=>(0,A.jsx)(f,{...e,name:"alignRight"}),li=e=>(0,A.jsx)(f,{...e,name:"alignJustify"}),ci=e=>(0,A.jsx)(f,{...e,name:"quote"}),di=e=>(0,A.jsx)(f,{...e,name:"title"}),ui=e=>(0,A.jsx)(f,{...e,name:"font"}),gi=e=>(0,A.jsx)(f,{...e,name:"spellcheck"}),pi=e=>(0,A.jsx)(f,{...e,name:"abc"}),mi=e=>(0,A.jsx)(f,{...e,name:"pageBreak"}),Ai=e=>(0,A.jsx)(f,{...e,name:"link"}),fi=e=>(0,A.jsx)(f,{...e,name:"style"}),hi=e=>(0,A.jsx)(f,{...e,name:"lock"}),bi=e=>(0,A.jsx)(f,{...e,name:"unlock"}),yi=e=>(0,A.jsx)(f,{...e,name:"key"}),Ii=e=>(0,A.jsx)(f,{...e,name:"redo"}),xi=e=>(0,A.jsx)(f,{...e,name:"swap"}),wi=e=>(0,A.jsx)(f,{...e,name:"shuffle"}),Ci=e=>(0,A.jsx)(f,{...e,name:"fullscreen"}),ki=e=>(0,A.jsx)(f,{...e,name:"fullscreenExit"}),vi=e=>(0,A.jsx)(f,{...e,name:"merge"}),Si=e=>(0,A.jsx)(f,{...e,name:"join"}),Ei=e=>(0,A.jsx)(f,{...e,name:"touch"}),Ti=e=>(0,A.jsx)(f,{...e,name:"volumeOff"}),Bi=e=>(0,A.jsx)(f,{...e,name:"musicOff"}),Mi=e=>(0,A.jsx)(f,{...e,name:"musicVideo"}),Qi=e=>(0,A.jsx)(f,{...e,name:"movie"}),Ri=e=>(0,A.jsx)(f,{...e,name:"slideshow"}),Ni=e=>(0,A.jsx)(f,{...e,name:"storage"}),Gi=e=>(0,A.jsx)(f,{...e,name:"api"}),Li=e=>(0,A.jsx)(f,{...e,name:"dataObject"}),Fi=e=>(0,A.jsx)(f,{...e,name:"computer"}),Pi=e=>(0,A.jsx)(f,{...e,name:"phone"}),Di=e=>(0,A.jsx)(f,{...e,name:"cloud"}),$i=e=>(0,A.jsx)(f,{...e,name:"wifi"}),zi=e=>(0,A.jsx)(f,{...e,name:"wifiOff"}),Oi=e=>(0,A.jsx)(f,{...e,name:"searchOff"}),Hi=e=>(0,A.jsx)(f,{...e,name:"eyeOff"}),Wi=e=>(0,A.jsx)(f,{...e,name:"bookmark"}),Ui=e=>(0,A.jsx)(f,{...e,name:"school"}),Yi=e=>(0,A.jsx)(f,{...e,name:"gavel"}),qi=e=>(0,A.jsx)(f,{...e,name:"architecture"}),_i=e=>(0,A.jsx)(f,{...e,name:"brain"}),Ji=e=>(0,A.jsx)(f,{...e,name:"volunteer"}),Vi=e=>(0,A.jsx)(f,{...e,name:"radio"}),Ki=e=>(0,A.jsx)(f,{...e,name:"radioChecked"}),ji=e=>(0,A.jsx)(f,{...e,name:"upload"}),Xi=e=>(0,A.jsx)(f,{...e,name:"arrowDown"}),Zi=e=>(0,A.jsx)(f,{...e,name:"factCheck"}),ea=e=>(0,A.jsx)(f,{...e,name:"imageSearch"}),ta=e=>(0,A.jsx)(f,{...e,name:"documentScanner"}),na=e=>(0,A.jsx)(f,{...e,name:"dashboard"}),oa=e=>(0,A.jsx)(f,{...e,name:"cleaning"}),ra=e=>(0,A.jsx)(f,{...e,name:"dragHandle"}),ia=e=>(0,A.jsx)(f,{...e,name:"zoomIn"}),aa=e=>(0,A.jsx)(f,{...e,name:"zoomOut"}),sa=e=>(0,A.jsx)(f,{...e,name:"insights"}),la=e=>(0,A.jsx)(f,{...e,name:"explore"}),ca=e=>(0,A.jsx)(f,{...e,name:"save"}),da=e=>(0,A.jsx)(f,{...e,name:"label"}),ua=e=>(0,A.jsx)(f,{...e,name:"keyboard"}),ga=e=>(0,A.jsx)(f,{...e,name:"trendingUp"}),pa=e=>(0,A.jsx)(f,{...e,name:"trendingDown"}),ma=e=>(0,A.jsx)(f,{...e,name:"cake"}),Aa=e=>(0,A.jsx)(f,{...e,name:"barChart"}),fa=e=>(0,A.jsx)(f,{...e,name:"admin"}),ha=e=>(0,A.jsx)(f,{...e,name:"bugReport"}),ba=e=>(0,A.jsx)(f,{...e,name:"sentimentSad"}),ya=e=>(0,A.jsx)(f,{...e,name:"integration"}),Ia=e=>(0,A.jsx)(f,{...e,name:"namaskar"}),xa=e=>(0,A.jsx)(f,{...e,name:"sunrise"}),wa=e=>(0,A.jsx)(f,{...e,name:"sunset"}),Ca=e=>(0,A.jsx)(f,{...e,name:"login"}),ka=e=>(0,A.jsx)(f,{...e,name:"logout"}),va=e=>(0,A.jsx)(f,{...e,name:"speed"}),Sa=e=>(0,A.jsx)(f,{...e,name:"repeat"}),Ea=e=>(0,A.jsx)(f,{...e,name:"loader"}),Ta=e=>(0,A.jsx)(f,{...e,name:"star"}),Ba=e=>(0,A.jsx)(f,{...e,name:"shieldCheck"});v();v();v();var Zt={"html-lang":{title:"Page language is set",wcag:"3.1.1",severity:"serious",why:"Screen readers pick their voice and pronunciation from the page language. Without it, Telugu or Hindi text may be read with English rules."},"page-title":{title:"Page has a title",wcag:"2.4.2",severity:"serious",why:"The title is the first thing announced and the name shown on browser tabs and bookmarks."},"image-alt":{title:"Images have alternative text",wcag:"1.1.1",severity:"critical",why:'People who cannot see the image get no information from it unless alt text describes it (or alt="" marks it as decorative).'},"heading-order":{title:"Headings follow a logical order",wcag:"1.3.1",severity:"moderate",why:"Many screen-reader users jump between headings. Skipped levels make the page outline confusing."},"single-h1":{title:"Page has one main heading",wcag:"best practice",severity:"minor",why:"A single h1 tells everyone what the page is about."},"landmark-main":{title:"Main content landmark exists",wcag:"1.3.1 / 2.4.1",severity:"moderate",why:"A <main> region lets keyboard and screen-reader users skip straight past menus to the content."},"form-label":{title:"Form fields have labels",wcag:"1.3.1 / 4.1.2",severity:"critical",why:'Without a label, a screen reader just says "edit text" and the user has to guess what to type.'},"button-name":{title:"Buttons have names",wcag:"4.1.2",severity:"critical",why:'An icon-only button with no name is announced as just "button", so its purpose is unknown.'},"link-name":{title:"Links have names",wcag:"2.4.4",severity:"serious",why:"Links are often read out of context in a list. An empty link gives no clue where it goes."},"color-contrast":{title:"Text has enough contrast",wcag:"1.4.3",severity:"serious",why:"Low-contrast text is hard to read for older users, people with low vision, and anyone outdoors on a phone."},"positive-tabindex":{title:"No positive tabindex",wcag:"2.4.3",severity:"moderate",why:"tabindex greater than 0 forces a custom keyboard order that usually doesn't match the visual order."},"keyboard-access":{title:"Clickable things work with a keyboard",wcag:"2.1.1",severity:"critical",why:"A div or span with a click handler can't be reached or activated with Tab and Enter, locking out keyboard users."},"duplicate-id":{title:"IDs are unique",wcag:"best practice",severity:"minor",why:"Labels and ARIA references point at ids. Duplicates make them point at the wrong element."},"form-error":{title:"Errors are linked to their fields",wcag:"3.3.1",severity:"serious",why:"When a field is marked invalid, the error message must be connected to it so it's announced together with the field."},"target-size":{title:"Touch targets are large enough",wcag:"2.5.8",severity:"moderate",why:"Small targets are hard to tap for people with tremors, seniors and everyone on mobile."}},bu={critical:10,serious:5,moderate:2,minor:1};function et(e={}){let t=Ge(e.root),n=new Set(e.skip??[]),o=[],r={},a=t?mt(t)?t:t.ownerDocument:null,i=(s,l,c,d,g=!1)=>{if(n.has(s))return;let p=Zt[s],m=r[s]=(r[s]??0)+1;o.push({id:`${s}-${m}`,rule:s,severity:p.severity,wcag:p.wcag,message:c,why:p.why,fix:d,selector:l?_e(l):"document",snippet:l?xe(l.outerHTML,120):"",autoFixable:g,element:l??void 0})};if(t&&a){a.documentElement.getAttribute("lang")||i("html-lang",a.documentElement,"The <html> element has no lang attribute.",'Add lang to <html>, e.g. <html lang="te"> or "en".',!0),a.title.trim()||i("page-title",null,"The page has no <title>.","Add a short, descriptive <title> that names this page.");for(let u of K(t,"img"))if(!(u.getAttribute("role")==="presentation"||u.getAttribute("role")==="none")&&!u.hasAttribute("alt")&&!u.getAttribute("aria-label")&&!u.getAttribute("aria-labelledby")){let I=u.getAttribute("title");i("image-alt",u,`Image has no alt text${u.getAttribute("src")?` (${xe(u.getAttribute("src")??"",40)})`:""}.`,I?`Use the title as alt: alt="${xe(I,40)}".`:'Describe the image in alt, or use alt="" if it is purely decorative.',!!I)}let s=K(t,"h1,h2,h3,h4,h5,h6"),l=0;for(let u of s){let I=Number(u.tagName[1]);l>0&&I>l+1&&i("heading-order",u,`Heading jumps from h${l} to h${I}: "${xe(u.textContent??"",40)}".`,`Change it to h${l+1}, or add the missing level above it.`),l=I}let c=s.filter(u=>u.tagName==="H1");c.length===0?i("single-h1",null,"The page has no h1.","Add one h1 that names the page."):c.length>1&&i("single-h1",c[1],`The page has ${c.length} h1 headings.`,"Keep one h1; turn the others into h2."),t.querySelectorAll("main,[role='main']").length===0&&i("landmark-main",null,"No <main> landmark found.","Wrap the primary content in <main>.");let d=K(t,"input,select,textarea").filter(u=>{let I=(u.getAttribute("type")??"text").toLowerCase();return!["hidden","submit","button","reset","image"].includes(I)});for(let u of d){if(!De(u)){let I=u.getAttribute("placeholder")||u.getAttribute("name");i("form-label",u,`Form field has no label${I?` (placeholder/name: "${xe(I,30)}")`:""}.`,I?`Add a visible <label>. Quick fix: aria-label="${xe(I,30)}".`:"Add a visible <label for=\u2026> describing what to enter.",!!I)}u.getAttribute("aria-invalid")==="true"&&(u.getAttribute("aria-describedby")||u.getAttribute("aria-errormessage")||i("form-error",u,"Field is marked invalid but no error message is linked to it.","Put the error text in an element with an id and point aria-describedby at it."))}for(let u of K(t,"button,[role='button'],input[type='submit'],input[type='button']"))if(!De(u)){let I=u.getAttribute("title");i("button-name",u,"Button has no accessible name.",I?`Use the title as the name: aria-label="${I}".`:"Add visible text or an aria-label that says what the button does.",!!I)}for(let u of K(t,"a[href]"))if(!De(u)){let I=u.getAttribute("title");i("link-name",u,`Link has no text (${xe(u.getAttribute("href")??"",40)}).`,I?`Use the title as the name: aria-label="${I}".`:"Add link text that says where it goes.",!!I)}for(let u of K(t,"[tabindex]"))Number(u.getAttribute("tabindex"))>0&&i("positive-tabindex",u,`tabindex="${u.getAttribute("tabindex")}" overrides the natural tab order.`,'Use tabindex="0" and fix the order in the HTML instead.',!0);let g="a[href],button,input,select,textarea,summary";for(let u of K(t,"[onclick],[role='button'],[role='link']"))u.matches(g)||u.hasAttribute("tabindex")||i("keyboard-access",u,`<${u.tagName.toLowerCase()}> is clickable but can't be reached with the keyboard.`,'Use a real <button>, or add tabindex="0", a role and Enter/Space key handling.',!0);let p=new Map;for(let u of Array.from(t.querySelectorAll("[id]")))u.closest("[data-yuktai-panel]")||p.set(u.id,(p.get(u.id)??0)+1);for(let[u,I]of p)I>1&&i("duplicate-id",t.querySelector(`[id="${u.replace(/"/g,'\\"')}"]`),`id="${u}" is used ${I} times.`,"Give each element a unique id.");let m=e.maxContrastChecks??600,h=0;for(let u of K(t,"body *")){if(h>=m)break;if(!Jt(u)||["SCRIPT","STYLE","NOSCRIPT","OPTION"].includes(u.tagName))continue;h++;let I=ct(window.getComputedStyle(u).color),C=$l(u);if(!I||!C)continue;let b=Qt(I,C),k=zl(u)?3:4.5;b<k&&i("color-contrast",u,`Contrast ${b}:1 is below ${k}:1 for "${xe(u.textContent??"",30)}".`,`Darken the text or lighten the background until the ratio is at least ${k}:1.`)}let y=e.minTargetSize??24;for(let u of K(t,wn)){let I=u.getBoundingClientRect();I.width===0&&I.height===0||u.tagName==="A"&&u.closest("p,li,td")||(I.width<y||I.height<y)&&i("target-size",u,`Target is ${Math.round(I.width)}\xD7${Math.round(I.height)}px (minimum ${y}\xD7${y}).`,`Increase padding so it's at least ${y}\xD7${y}px (44\xD744 is better for seniors).`)}}return yu(o,a,n)}function yu(e,t,n){let o=Object.keys(Zt).filter(l=>!n.has(l)).map(l=>{let c=e.filter(d=>d.rule===l).length;return{rule:l,title:Zt[l].title,passed:c===0,issueCount:c}}),r=0;for(let l of o){let c=bu[Zt[l.rule].severity];r+=Math.min(25,l.issueCount*c)}let a=Math.max(0,100-r),i=o.filter(l=>!l.passed),s=e.filter(l=>l.severity==="critical").length;return{url:t?.location?.href??"",title:t?.title??"",generatedAt:new Date().toISOString(),score:a,passed:s===0&&a>=80,checks:o,issues:e,summary:e.length===0?`All ${o.length} checks passed.`:`${o.length-i.length} of ${o.length} checks passed. ${e.length} issue(s) found, ${s} critical. Score ${a}/100.`}}function Ma(e){let t=["# Accessibility QA report","",`- Page: ${e.title||"(untitled)"} ${e.url}`,`- Generated: ${e.generatedAt}`,`- Score: **${e.score}/100** \u2014 ${e.passed?"PASS":"FAIL"}`,"",e.summary,"","## Checks","","| Check | Result | Issues |","|---|---|---|",...e.checks.map(n=>`| ${n.title} | ${n.passed?"\u2705 Pass":"\u274C Fail"} | ${n.issueCount} |`)];if(e.issues.length){t.push("","## Issues","");for(let n of e.issues)t.push(`### ${n.id} \xB7 ${n.severity} \xB7 WCAG ${n.wcag}`,"",`- **Problem:** ${n.message}`,`- **Why it matters:** ${n.why}`,`- **Fix:** ${n.fix}`,`- **Where:** \`${n.selector}\``,"")}return t.join(`
1532
- `)}function Qa(e){return JSON.stringify({...e,issues:e.issues.map(({element:t,...n})=>n)},null,2)}function Ra(e={}){let t=null,n=null,o=null,r=!1,a=[],i=()=>({report:t,watching:n!==null,appliedFixes:a.length}),s=()=>e.onUpdate?.(i()),l=p=>t?.issues.find(m=>m.id===p),c=(p,m,h)=>{a.push({element:p,attribute:m,previous:p.getAttribute(m)}),p.setAttribute(m,h)};function d(p){let m=p.element,h=(y,u)=>({issueId:p.id,applied:y,message:u});if(!p.autoFixable||!m)return h(!1,"This needs a human decision \u2014 see the suggested fix.");switch(p.rule){case"html-lang":{let y=e.defaultLang||(We()?navigator.language:"")||"en";return c(m,"lang",y),h(!0,`Set lang="${y}" on <html>.`)}case"image-alt":{let y=m.getAttribute("title");if(!y)break;return c(m,"alt",y),h(!0,`Used the image title as alt text: "${y}".`)}case"form-label":{let y=m.getAttribute("placeholder")||m.getAttribute("name");if(!y)break;let u=y.replace(/[_-]+/g," ").trim();return c(m,"aria-label",u),h(!0,`Added aria-label="${u}". A visible <label> is still better.`)}case"button-name":case"link-name":{let y=m.getAttribute("title");if(!y)break;return c(m,"aria-label",y),h(!0,`Added aria-label="${y}".`)}case"positive-tabindex":return c(m,"tabindex","0"),h(!0,"Changed tabindex to 0 so the natural order applies.");case"keyboard-access":{c(m,"tabindex","0"),m.getAttribute("role")||c(m,"role","button");let y=u=>{let I=u.key;(I==="Enter"||I===" ")&&(u.preventDefault(),m.click())};return m.addEventListener("keydown",y),a.push({element:m,attribute:"",previous:null,listener:y}),h(!0,"Made it focusable and added Enter/Space support.")}default:break}return h(!1,"No safe automatic fix for this one \u2014 see the suggested fix.")}function g(){if(t=et(e),e.autoApply){r=!0;let p=t.issues.filter(m=>m.autoFixable).map(d);r=!1,p.some(m=>m.applied)&&(t=et(e))}return s(),t}return{start(){if(!We()||n)return;let p=Ge(e.root),m=mt(p)?p.body:p;m&&(n=new MutationObserver(h=>{r||!h.some(u=>!u.target.closest?.("[data-yuktai-panel]"))||(o&&clearTimeout(o),o=setTimeout(g,e.debounceMs??600))}),n.observe(m,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["alt","aria-label","aria-invalid","tabindex","lang","title"]}),g())},stop(){n?.disconnect(),n=null,o&&clearTimeout(o),o=null,s()},scan:g,explain(p){let m=l(p);return m?[`${m.message}`,`Why it matters: ${m.why}`,`How to fix: ${m.fix}`,`Standard: WCAG ${m.wcag} (${m.severity}).`,m.autoFixable?"I can apply a safe fix for this in the browser.":"This one needs a change in your code."].join(`
1533
- `):`No issue "${p}" in the current report. Run a scan first.`},applyFix(p){let m=l(p);if(!m)return{issueId:p,applied:!1,message:"Issue not found. Run a scan first."};r=!0;let h=d(m);return r=!1,h.applied&&g(),h},applyAllFixes(){t||g(),r=!0;let p=(t?.issues??[]).filter(m=>m.autoFixable).map(d);return r=!1,g(),p},undoAll(){let p=a.length;for(r=!0;a.length;){let m=a.pop();m.listener?m.element.removeEventListener("keydown",m.listener):m.previous===null?m.element.removeAttribute(m.attribute):m.element.setAttribute(m.attribute,m.previous)}return r=!1,g(),p},getState:i}}v();v();var Iu=/^(field|input|value|text|enter|details?|info|data|\*|:)$/i,xu=/^(go|ok|submit|send|click here|>|→|next)$/i,wu=[[/e-?mail/i,"email","email"],[/phone|mobile|tel/i,"tel","tel"],[/^(full)?name$|full.?name/i,"name"],[/first.?name|given/i,"given-name"],[/last.?name|surname|family/i,"family-name"],[/address|street/i,"street-address"],[/zip|postal|pin.?code|pincode/i,"postal-code"],[/city|town/i,"address-level2"],[/country/i,"country-name"],[/password/i,"current-password","password"],[/dob|birth/i,"bday"]];function Cu(e){let t=e.getAttribute("id");return t&&e.ownerDocument.querySelector(`label[for="${t.replace(/"/g,'\\"')}"]`)?!0:!!e.closest("label")}function Ul(e){return K(e,"input,select,textarea").filter(t=>!["hidden","submit","button","reset","image"].includes((t.getAttribute("type")??"text").toLowerCase())).map(t=>({label:De(t),type:t.tagName==="INPUT"?(t.getAttribute("type")??"text").toLowerCase():t.tagName.toLowerCase(),name:t.getAttribute("name")??t.getAttribute("id")??"",required:t.hasAttribute("required")||t.getAttribute("aria-required")==="true",hasVisibleLabel:Cu(t),selector:_e(t),element:t}))}function Yl(e,t={}){let n=t.seniorFriendly!==!1,o=t.maxFieldsPerStep??8,r=Ul(e),a=[],i=(p,m,h,y)=>a.push({level:p,message:m,suggestion:h,field:y?.label||y?.name,selector:y?.selector});for(let p of r){let m=p.element,h=p.label||p.name||p.type,y=m.getAttribute("placeholder");!p.label&&y?i("problem",`"${y}" uses only a placeholder as its label.`,"Placeholders disappear when typing starts and aren't read by every screen reader. Add a visible label above the field.",p):p.label?!p.hasVisibleLabel&&y&&!m.getAttribute("aria-label")?i("problem",`"${h}" uses only a placeholder as its label.`,"Placeholders disappear when typing starts. Add a visible label above the field.",p):Iu.test(p.label)&&i("improvement",`The label "${p.label}" is unclear.`,'Say exactly what is needed, e.g. "Mobile number (10 digits)".',p):i("problem",`A ${p.type} field${p.name?` ("${p.name}")`:""} has no label.`,"Add a visible <label> that says exactly what to enter.",p),p.required&&p.label&&!/\*|required|mandatory|తప్పనిసరి|आवश्यक/i.test(p.label)&&i("improvement",`"${h}" is required but the label doesn't say so.`,'Add "(required)" to the label so everyone knows before submitting.',p);let u=`${p.name} ${p.label}`;for(let[I,C,b]of wu)if(I.test(u)){m.getAttribute("autocomplete")||i("improvement",`"${h}" has no autocomplete hint.`,`Add autocomplete="${C}" so browsers can fill it in (WCAG 1.3.5).`,p),b&&p.type==="text"&&i("improvement",`"${h}" uses type="text".`,`Use type="${b}" for the right mobile keyboard and validation.`,p);break}if(m.getAttribute("aria-invalid")==="true"&&!m.getAttribute("aria-describedby")&&!m.getAttribute("aria-errormessage")&&i("problem",`"${h}" shows an error that isn't connected to the field.`,"Link the error text with aria-describedby and explain how to fix it.",p),n){let I=parseFloat(window.getComputedStyle(m).fontSize)||16;I<16&&i("improvement",`"${h}" text is ${I}px.`,"Use at least 16px in inputs; it is easier to read and stops mobile browsers from zooming.",p)}}r.length>o&&i("improvement",`This form has ${r.length} fields on one screen.`,`Split it into steps of about ${o} fields with a progress indicator.`);let s=K(e,"button,input[type='submit'],input[type='button']");if(s.length===0)i("problem","No submit button found.",'Add a clear <button type="submit"> so the form can be completed with the keyboard.');else if(n){let p=fe(De(s[s.length-1]));xu.test(p)&&i("improvement",`The button says "${p}".`,'Name the result, e.g. "Send message" or "Book appointment".')}!K(e,"[role='alert'],[aria-live]",{includeHidden:!0}).length&&r.some(p=>p.required)&&i("improvement","No live region for error messages.",'Add an element with role="alert" so errors are announced when the form is submitted.');let l=a.filter(p=>p.level==="problem").length,c=a.length-l,d=Math.max(0,100-l*15-c*4),g=e.getAttribute("aria-label")||fe(e.querySelector("legend,h1,h2,h3")?.textContent)||e.getAttribute("name")||e.getAttribute("id")||"Form";return{name:xe(g,50),selector:_e(e),fields:r,findings:a,score:d,summary:a.length===0?`"${xe(g,40)}" looks clear: ${r.length} labelled field(s), nothing to fix.`:`"${xe(g,40)}" has ${r.length} field(s): ${l} problem(s) and ${c} suggestion(s). Score ${d}/100.`}}function en(e={}){let t=Ge(e.root);return t?K(t,"form,[role='form']").map(n=>Yl(n,e)):[]}function ql(e){let t=Ge(e),n={title:"",description:"",language:"",headings:[],landmarks:{},counts:{links:0,buttons:0,images:0,forms:0,tables:0,fields:0},unlabeledFields:[],imagesWithoutAlt:[],purpose:""};if(!t)return n;let o=mt(t)?t:t.ownerDocument,r=K(t,"h1,h2,h3,h4,h5,h6").map(d=>({level:Number(d.tagName[1]),text:xe(d.textContent??"",80)})),a={};for(let[d,g]of Object.entries({header:"header,[role='banner']",navigation:"nav,[role='navigation']",main:"main,[role='main']",search:"search,[role='search']",footer:"footer,[role='contentinfo']"}))a[d]=K(t,g).length;let i=K(t,"input,select,textarea").filter(d=>!["hidden","submit","button","reset","image"].includes((d.getAttribute("type")??"text").toLowerCase())),s=i.filter(d=>!De(d)).map(d=>({type:d.tagName==="INPUT"?d.getAttribute("type")??"text":d.tagName.toLowerCase(),hint:d.getAttribute("placeholder")||d.getAttribute("name")||"",selector:_e(d)})),l=K(t,"img:not([alt])").map(d=>({src:d.getAttribute("src")??"",selector:_e(d)})),c={title:o.title,description:fe(o.querySelector('meta[name="description"]')?.getAttribute("content")),language:o.documentElement.getAttribute("lang")??"",headings:r,landmarks:a,counts:{links:K(t,"a[href]").length,buttons:K(t,"button,[role='button'],input[type='submit']").length,images:K(t,"img").length,forms:K(t,"form,[role='form']").length,tables:K(t,"table,[role='grid'],[role='table']").length,fields:i.length},unlabeledFields:s,imagesWithoutAlt:l,purpose:""};return c.purpose=ku(c,i),c}function ku(e,t){let n=e.headings.find(i=>i.level===1)?.text||e.title||"This page",o=t.map(i=>`${i.getAttribute("type")} ${i.getAttribute("name")} ${De(i)}`).join(" ").toLowerCase(),r=[];/password/.test(o)?r.push("sign in or create an account"):(/search|query|వెతుకు/.test(o)||e.landmarks.search)&&r.push("search"),/message|comment|feedback|contact|enquiry/.test(o)&&r.push("send a message"),/card|payment|upi|amount/.test(o)&&r.push("make a payment"),e.counts.tables&&r.push(`browse ${e.counts.tables} table(s) of data`),!r.length&&e.counts.forms&&r.push(`fill in ${e.counts.forms} form(s)`),r.length||r.push("read content");let a=e.headings.filter(i=>i.level===2).slice(0,5).map(i=>i.text);return[`"${n}" lets you ${r.join(", ")}.`,e.description?`It describes itself as: ${xe(e.description,140)}`:"",a.length?`Main sections: ${a.join(" \xB7 ")}.`:""].filter(Boolean).join(" ")}var vu=[["missing-labels",/label|unlabel|లేబుల్/i],["images",/image|alt text|picture|photo|చిత్ర/i],["structure",/heading|structure|outline|section|landmark|శీర్షిక/i],["forms",/form|field|input|ఫారం/i],["links",/link|లింక్/i],["counts",/how many|count|ఎన్ని/i],["purpose",/what (does|is)|purpose|about|summar|explain|ఏమి|గురించి/i]];function _l(e){for(let[t,n]of vu)if(n.test(e))return t;return"unknown"}async function Na(e,t={}){let n=ql(t.root),o=_l(e);switch(o){case"missing-labels":return n.unlabeledFields.length?{intent:o,answer:`${n.unlabeledFields.length} of ${n.counts.fields} field(s) have no label: ${n.unlabeledFields.map(r=>`${r.type}${r.hint?` ("${r.hint}")`:""}`).join(", ")}.`,targets:n.unlabeledFields.map(r=>r.selector),suggestions:["Add a visible <label for=\u2026> to each field.","Run the Accessibility Copilot to add aria-labels from placeholders as a quick fix."]}:{intent:o,answer:`All ${n.counts.fields} form field(s) have labels.`,targets:[],suggestions:[]};case"images":return{intent:o,answer:n.imagesWithoutAlt.length?`${n.imagesWithoutAlt.length} of ${n.counts.images} image(s) have no alt text.`:`All ${n.counts.images} image(s) have alt text.`,targets:n.imagesWithoutAlt.map(r=>r.selector),suggestions:n.imagesWithoutAlt.length?['Describe meaningful images in alt; use alt="" for decorative ones.']:[]};case"structure":{let r=n.headings.slice(0,15).map(i=>`${" ".repeat(i.level-1)}h${i.level} ${i.text}`).join(`
1534
- `),a=Object.entries(n.landmarks).filter(([,i])=>i===0).map(([i])=>i);return{intent:o,answer:`${n.headings.length} heading(s).
1535
- ${r}${a.length?`
1536
- Missing landmarks: ${a.join(", ")}.`:""}`,targets:[],suggestions:a.includes("main")?["Wrap the primary content in <main>."]:[]}}case"forms":{let r=en({root:t.root});return{intent:o,answer:r.length?r.map(a=>a.summary).join(`
1537
- `):"There are no forms on this page.",targets:r.flatMap(a=>a.findings.map(i=>i.selector).filter(i=>!!i)),suggestions:r.flatMap(a=>a.findings.slice(0,3).map(i=>i.suggestion))}}case"links":case"counts":{let r=n.counts;return{intent:o,answer:`${r.links} links, ${r.buttons} buttons, ${r.fields} form fields in ${r.forms} form(s), ${r.images} images, ${r.tables} tables.`,targets:[],suggestions:[]}}case"purpose":case"unknown":{let r=n.purpose;if(t.summarize)try{let i=Ge(t.root),s=fe((i&&mt(i)?i.body:i)?.textContent).slice(0,4e3);r=await t.summarize(s)||r}catch{}let a=[];return n.unlabeledFields.length&&a.push(`${n.unlabeledFields.length} form field(s) need labels.`),n.imagesWithoutAlt.length&&a.push(`${n.imagesWithoutAlt.length} image(s) need alt text.`),{intent:o,answer:r,targets:[],suggestions:a}}}}v();var Ke=e=>String(e??"").normalize("NFC").toLowerCase().replace(/\s+/g," ").trim(),Su=new Set("show me find list get give which who what all the a an rows row records record entries with where that are is have has having and or of for in on to please display only those whose any".split(" "));function En(e){let t=Ke(e).replace(/(₹|rs\.?|inr|\$|usd|€|£)/g," ").match(/(-?\d[\d,]*(?:\.\d+)?|-?\.\d+)\s*(k|thousand|lakhs?|lacs?|crores?|cr|mn|million|m|bn|billion)?(?![\p{L}])/u);if(!t)return null;let n=Number(t[1].replace(/,/g,""));if(!Number.isFinite(n))return null;let o=t[2]??"",r=/^k|thousand/.test(o)?1e3:/^la/.test(o)?1e5:/^(crore|cr)/.test(o)?1e7:/^(m|mn|million)$/.test(o)?1e6:/^(bn|billion)$/.test(o)?1e9:1;return n*r}function Kl(e){let t=new Set([Ke(e.label),Ke(e.key),Ke(e.key.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2"))]);for(let n of Array.from(t))n.endsWith("s")?t.add(n.slice(0,-1)):t.add(`${n}s`);return Array.from(t).filter(n=>n.length>1)}function $e(e,t,n){let o=` ${Ke(e)} `,r;for(let a of t)if(!(n&&(a.type??"text")!==n))for(let i of Kl(a)){let s=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");new RegExp(`(^|[^\\p{L}\\p{M}\\p{N}])${s}($|[^\\p{L}\\p{M}\\p{N}])`,"u").test(o)&&(!r||i.length>r.length)&&(r={column:a,length:i.length})}return r?.column}var Eu=/amount|balance|total|price|salary|value|due|revenue|cost|fee|sales|outstanding|paid/i;function Ga(e){let t=e.filter(n=>n.type==="number");return t.find(n=>Eu.test(`${n.key} ${n.label}`))??t[0]}var Sn=/(>=|=>|>|\bover\b|\babove\b|\bmore than\b|\bgreater than\b|\bexceeds?\b|\bexceeding\b|\bhigher than\b|\bat least\b|\bminimum\b|\bmin\b|కంటే ఎక్కువ)/,La=/(<=|=<|<|\bunder\b|\bbelow\b|\bless than\b|\blower than\b|\bat most\b|\bmaximum\b|\bmax\b|\bup to\b|కంటే తక్కువ)/,Jl=/\b(after|since|from)\b/,Tu=/\b(before|until|till)\b/,Bu="(?:\\s*(?:k|thousand|lakhs?|lacs?|crores?|cr|mn|million|m|bn|billion))?",Fa=`(?:\u20B9|rs\\.?\\s*|\\$)?\\s*-?\\d[\\d,]*(?:\\.\\d+)?${Bu}`;function At(e,t,n={}){let o={filters:[],search:[],sort:null,limit:null,notes:[],explanation:""},r=Ke(e).replace(/[?!]+/g," ").replace(/\.(?!\d)/g," ").trim(),a=[],i=r.match(/\b(top|first|bottom|last|lowest|highest)\s+(\d+)\b/);i&&(o.limit=Number(i[2]),r=r.replace(i[0],` ${i[1]} `));let s=r.match(/\b(?:sort(?:ed)?|order(?:ed)?)\s+by\s+([\p{L}\p{M}\p{N} _]+?)(?:\s+(asc|ascending|desc|descending))?(?=$|,|\band\b|\bthen\b)/u),l=r.match(/\b(top|highest|largest|biggest|most|bottom|lowest|smallest|least)\b(?:\s+\d+)?\s+(?:by\s+)?([\p{L}\p{M}\p{N} _]+)/u);if(s){let h=$e(s[1],t);h&&(o.sort={key:h.key,direction:/^desc/.test(s[2]??"")?"desc":"asc"},r=r.replace(s[0]," "))}else if(l){let h=$e(l[2],t,"number")??$e(l[2],t)??Ga(t);if(h){let y=/top|highest|largest|biggest|most/.test(l[1]);o.sort={key:h.key,direction:y?"desc":"asc"},r=r.replace(new RegExp(`\\b${l[1]}\\b`)," "),!i&&/top|bottom/.test(l[1])&&(o.limit=10)}}let c=new RegExp(`\\bbetween\\s+(${Fa}|\\d{4}-\\d{2}-\\d{2})\\s+(?:and|to|-)\\s+(${Fa}|\\d{4}-\\d{2}-\\d{2})`,"u"),d;for(;d=r.match(c);){let h=r.slice(Math.max(0,(d.index??0)-40),d.index??0),y=/\d{4}-\d{2}-\d{2}/.test(d[1]),u=y?$e(h,t,"date")??t.find(b=>b.type==="date"):$e(h,t,"number")??Ga(t),I=y?d[1]:En(d[1]),C=y?d[2]:En(d[2]);u&&I!==null&&C!==null&&(o.filters.push({key:u.key,operator:"between",value:[I,C]}),a.push(`${u.label} between ${d[1]} and ${d[2]}`)),r=r.replace(d[0]," ")}let g=r.split(/\s*(?:(?<!\d),|,(?!\d)|;|\band\b|(?<!(?:starts?|starting|ends?|ending|begins?|beginning)\s)\bwith\b|\bwhere\b|\bwho\b|\bthat\b|&|మరియు)\s*/u).map(h=>h.trim()).filter(Boolean),p=t.filter(h=>(h.type??"text")==="text"),m=new Map;for(let h of p){let y=new Set;for(let u of(n.data??[]).slice(0,5e3)){let I=Ke(u[h.key]);if(I&&I.length<=40&&y.add(I),y.size>300)break}y.size&&y.size<=300&&m.set(h.key,y)}for(let h of g){let y=o.filters.length,u=$e(h,t),I=h.match(new RegExp(Fa,"u")),C=h.match(/\d{4}-\d{2}-\d{2}/);if(C&&(Jl.test(h)||Tu.test(h)||Sn.test(h)||La.test(h))){let b=(u?.type==="date"?u:void 0)??t.find(k=>k.type==="date");if(b){let k=Jl.test(h)||Sn.test(h);o.filters.push({key:b.key,operator:k?"greaterThan":"lessThan",value:C[0]}),a.push(`${b.label} ${k?"after":"before"} ${C[0]}`)}}else if(I&&(Sn.test(h)||La.test(h)||u?.type==="number"&&/\b(is|equals?)\b|=/.test(h))){let b=u?.type==="number"?u:void 0;b||(b=Ga(t),b&&o.notes.push(`Assumed "${h}" refers to ${b.label}.`));let k=En(I[0]);if(b&&k!==null){let x=/at least|minimum|\bmin\b|>=|=>|at most|maximum|\bmax\b|up to|<=|=</.test(h);Sn.test(h)?(o.filters.push({key:b.key,operator:"greaterThan",value:x?k-1e-9:k}),a.push(`${b.label} ${x?"\u2265":">"} ${k.toLocaleString("en-IN")}`)):La.test(h)?(o.filters.push({key:b.key,operator:"lessThan",value:x?k+1e-9:k}),a.push(`${b.label} ${x?"\u2264":"<"} ${k.toLocaleString("en-IN")}`)):(o.filters.push({key:b.key,operator:"equals",value:k}),a.push(`${b.label} = ${k.toLocaleString("en-IN")}`))}}else{let b=h.match(/\b(?:starts?|starting|begins?|beginning)\s+with\s+(.+)$/),k=h.match(/\b(?:ends?|ending)\s+with\s+(.+)$/),x=h.match(/\b(?:contains?|containing|including|includes?|mentions?)\s+(.+)$/),B=h.match(/\b(?:is|equals?|=|:)\s+(.+)$/),M=b??k??x??B;if(M){let L=u??p[0],q=M[1].replace(/^["'“‘]|["'”’]$/g,"").trim();if(L&&q){let O=b?"startsWith":k?"endsWith":x?"contains":"equals";o.filters.push({key:L.key,operator:O,value:q}),a.push(`${L.label} ${O==="equals"?"is":O==="contains"?"contains":O==="startsWith"?"starts with":"ends with"} "${q}"`),u||o.notes.push(`Assumed "${h}" refers to ${L.label}.`)}}}if(o.filters.length===y)for(let[b,k]of m){let x="";for(let B of k){if(B.length<2||B.length<=x.length)continue;let M=B.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");new RegExp(`(^|[^\\p{L}\\p{M}\\p{N}])${M}($|[^\\p{L}\\p{M}\\p{N}])`,"u").test(h)&&(x=B)}if(x){let B=t.find(M=>M.key===b);o.filters.push({key:b,operator:"equals",value:x}),a.push(`${B.label} is "${x}"`)}}if(o.filters.length===y){let b=h.split(/\s+/).filter(x=>!Su.has(x)&&!/^(top|first|bottom|last|lowest|highest|by|desc|asc|sort(ed)?)$/.test(x)),k=b.length>0&&b.every(x=>t.some(B=>Kl(B).includes(x)));if(b.length&&!k&&!(u&&b.length===1)){let x=b.join(" ");/^(customers?|users?|people|items?|entries|poems?|orders?|products?|employees?|students?|members?)$/.test(x)||(o.search.push(x),a.push(`any column contains "${x}"`))}}}if(o.sort){let h=t.find(y=>y.key===o.sort.key)?.label??o.sort.key;a.push(`sorted by ${h} ${o.sort.direction==="desc"?"high \u2192 low":"low \u2192 high"}`)}return o.limit&&a.push(`first ${o.limit}`),o.explanation=a.length?`Showing rows where ${a.join(", ")}.`:"No conditions understood \u2014 showing all rows.",o}function Mu(e,t,n){return n==="number"?(Number(e)||0)-(Number(t)||0):n==="date"?(new Date(String(e)).getTime()||0)-(new Date(String(t)).getTime()||0):String(e??"").localeCompare(String(t??""),void 0,{numeric:!0})}function tt(e,t,n){let o=Ze(e,t,n.filters);for(let r of n.search)o=o.filter(a=>t.some(i=>Ke(a[i.key]).includes(r)));if(n.sort){let r=t.find(i=>i.key===n.sort.key),a=n.sort.direction==="desc"?-1:1;o=[...o].sort((i,s)=>a*Mu(i[n.sort.key],s[n.sort.key],r?.type))}return n.limit&&(o=o.slice(0,n.limit)),o}function jl(e,t,n={}){let o=At(e,t.columns,{data:t.data}),r=tt(t.data,t.columns,o),a=r.map(s=>Ie(s,t.rowKey)).filter(Boolean);n.apply!==!1&&(o.filters.length&&t.onFiltersChange?.(o.filters),o.sort&&t.onSortChange?.(o.sort),a.length&&t.onHighlightRows?.(a));let i=r.length?`${r.length} row(s) found. ${o.explanation}${o.notes.length?` (${o.notes.join(" ")})`:""}`:`No rows match. ${o.explanation}`;return{rows:r,ids:a,parsed:o,message:i}}function Vl(e,t){let n=(e.length-1)*t,o=Math.floor(n),r=n-o;return e[o+1]!==void 0?e[o]+r*(e[o+1]-e[o]):e[o]}function Tn(e,t,n={}){let o=n.factor??1.5,r=[],a=t.filter(c=>c.type==="number"&&(!n.columns||n.columns.includes(c.key))),i=c=>c.toLocaleString("en-IN",{maximumFractionDigits:2});for(let c of a){let d=e.map(I=>Number(I[c.key])).filter(I=>Number.isFinite(I));if(d.length<5)continue;let g=[...d].sort((I,C)=>I-C),p=Vl(g,.25),m=Vl(g,.75),h=m-p;if(h===0)continue;let y=p-o*h,u=m+o*h;for(let I of e){let C=Number(I[c.key]);!Number.isFinite(C)||C>=y&&C<=u||r.push({rowId:Ie(I,n.rowKey),column:c.key,label:c.label,value:C,kind:C>u?"high":"low",reason:`${c.label} ${i(C)} is far ${C>u?"above":"below"} the typical range (${i(p)}\u2013${i(m)}).`})}}let s=n.rowKey??"id",l=new Map;for(let c of e){let d=JSON.stringify(t.filter(m=>m.key!==s).map(m=>Ke(c[m.key]))),g=Ie(c,n.rowKey),p=l.get(d);p!==void 0?r.push({rowId:g,column:s,label:"Row",value:g,kind:"duplicate",reason:`Row ${g} has the same values as row ${p}.`}):l.set(d,g)}return r}function Bn(e,t){if(!e.length)return"No rows to summarise.";let n=[`${e.length} row(s).`],o=r=>r.toLocaleString("en-IN",{maximumFractionDigits:2});for(let r of t){let a=e.map(i=>i[r.key]);if(r.type==="number"){let i=a.map(Number).filter(Number.isFinite);if(!i.length)continue;let s=i.reduce((l,c)=>l+c,0);n.push(`${r.label}: total ${o(s)}, average ${o(s/i.length)}, range ${o(Math.min(...i))}\u2013${o(Math.max(...i))}.`)}else if(r.type==="date"){let i=a.map(l=>new Date(String(l)).getTime()).filter(Number.isFinite);if(!i.length)continue;let s=l=>new Date(l).toISOString().slice(0,10);n.push(`${r.label}: from ${s(Math.min(...i))} to ${s(Math.max(...i))}.`)}else{let i=new Map;for(let l of a){let c=String(l??"").trim();c&&i.set(c,(i.get(c)??0)+1)}if(i.size===0||i.size>Math.max(8,e.length/3))continue;let s=Array.from(i.entries()).sort((l,c)=>c[1]-l[1]).slice(0,4);n.push(`${r.label}: ${s.map(([l,c])=>`${l} (${c})`).join(", ")}.`)}}return n.join(`
1538
- `)}function Pa(e,t){let n=Ke(e);if(/unusual|anomal|outlier|odd|strange|suspicious|duplicate|అసాధారణ/.test(n)){let r=Tn(t.data,t.columns,{rowKey:t.rowKey}),a=Array.from(new Set(r.map(s=>s.rowId)));a.length&&t.onHighlightRows?.(a);let i=new Set(a);return{kind:"anomalies",message:r.length?`${a.length} unusual row(s):
1539
- ${r.slice(0,10).map(s=>`\u2022 ${s.reason}`).join(`
1540
- `)}`:"Nothing unusual found.",ids:a,rows:t.data.filter(s=>i.has(Ie(s,t.rowKey))),anomalies:r}}if(/summar|overview|describe|సారాంశం/.test(n)){let r=Ze(t.data,t.columns,t.filters??[]);return{kind:"summary",message:Bn(r,t.columns),ids:[],rows:r}}let o=jl(e,t);return{kind:"query",message:o.message,ids:o.ids,rows:o.rows}}v();var Qu=/\b(off|disable|stop|remove|no more|turn off|switch off|deactivate)\b|ఆఫ్|ఆపు|తీసివేయి|बंद/i,Ru=[{pattern:/high contrast|contrast|హై కాంట్రాస్ట్|కాంట్రాస్ట్/i,key:"highContrast",name:"High contrast"},{pattern:/dark mode|dark theme|night mode|డార్క్ మోడ్|చీకటి/i,key:"darkMode",name:"Dark mode"},{pattern:/reduce motion|less motion|stop animation|animations?|కదలికలు/i,key:"reduceMotion",name:"Reduced motion"},{pattern:/large targets?|bigger buttons?|big buttons?|larger buttons?|పెద్ద బటన్/i,key:"largeTargets",name:"Large targets"},{pattern:/dyslexia|readable font|easy font/i,key:"dyslexiaFont",name:"Dyslexia-friendly font"},{pattern:/speak on focus|read aloud|read out|screen reader|speech|చదివి వినిపించు/i,key:"speechEnabled",name:"Speak on focus"},{pattern:/skip links?/i,key:"showSkipLinks",name:"Skip links"}],Nu=[[/deuteranop|green.?blind/i,"deuteranopia"],[/protanop|red.?blind/i,"protanopia"],[/tritanop|blue.?blind/i,"tritanopia"],[/grey ?scale|gray ?scale|achromat|black and white/i,"achromatopsia"]],Da=.1,Xl=.8,Zl=1.3;function ec(e,t={}){let n=e.trim().toLowerCase();if(!n)return null;if(/\b(next|down)\s+(row|line|record|item)\b|తర్వాతి (వరుస|అంశం)/.test(n))return{type:"grid",action:"next-row",say:"Next row."};if(/\b(previous|prev|back|up)\s+(row|line|record|item)\b|ముందరి (వరుస|అంశం)|వెనుక (వరుస|అంశం)/.test(n))return{type:"grid",action:"previous-row",say:"Previous row."};if(/\bfirst\s+(row|record|item)\b|మొదటి (వరుస|అంశం)/.test(n))return{type:"grid",action:"first-row",say:"First row."};if(/\blast\s+(row|record|item)\b|చివరి (వరుస|అంశం)/.test(n))return{type:"grid",action:"last-row",say:"Last row."};if(/\b(open|expand|read)\s+(this\s+)?(row|record|item)\b|ఈ (వరుస|అంశం) తెరువు/.test(n))return{type:"grid",action:"open-row",say:"Opening row."};if(/\b(reset|default|restore)\b.*\b(settings?|accessibility|everything|all)\b|^reset$|రీసెట్/.test(n))return{type:"reset",say:"Accessibility settings reset."};let o=t.fontSizeMultiplier??1,r=i=>Math.round(Math.min(Zl,Math.max(Xl,i))*100)/100;if(/\b(bigger|larger|increase|zoom in)\b.*\b(text|font|letters?)\b|\b(text|font)\b.*\b(bigger|larger|up)\b|పెద్ద అక్షరాలు|అక్షరాలు పెద్ద/.test(n)){let i=r(o+Da);return{type:"setting",patch:{fontSizeMultiplier:i},say:`Text size ${Math.round(i*100)}%.`}}if(/\b(smaller|decrease|reduce|zoom out)\b.*\b(text|font|letters?)\b|\b(text|font)\b.*\b(smaller|down)\b|చిన్న అక్షరాలు|అక్షరాలు చిన్న/.test(n)){let i=r(o-Da);return{type:"setting",patch:{fontSizeMultiplier:i},say:`Text size ${Math.round(i*100)}%.`}}if(/\b(normal|default|reset)\b.*\b(text|font)\s*(size)?\b/.test(n))return{type:"setting",patch:{fontSizeMultiplier:1},say:"Text size 100%."};let a=Qu.test(n);for(let[i,s]of Nu)if(i.test(n))return a?{type:"setting",patch:{colorBlindMode:"none"},say:"Colour filter off."}:{type:"setting",patch:{colorBlindMode:s},say:`${s} filter on.`};if(/colou?r.?blind/.test(n)&&a)return{type:"setting",patch:{colorBlindMode:"none"},say:"Colour filter off."};for(let i of Ru){if(!i.pattern.test(n))continue;let s=/\btoggle\b/.test(n)?!t[i.key]:!a;return i.key==="reduceMotion"&&!/reduce motion|less motion|కదలికలు తగ్గించు/.test(n)&&/animations?/.test(n)&&(s=a||/\bno\b/.test(n)),{type:"setting",patch:{[i.key]:s},say:`${i.name} ${s?"on":"off"}.`}}return null}var $a={highContrast:!1,darkMode:!1,reduceMotion:!1,largeTargets:!1,dyslexiaFont:!1,speechEnabled:!1,colorBlindMode:"none",fontSizeMultiplier:1};function tc(e,t={}){if(!We())return null;let n=t.root??document,o=t.rowSelector??"[data-yuktai-row-id], [role='row']",r=Array.from(n.querySelectorAll(o)).filter(c=>!c.querySelector("th,[role='columnheader']"));if(!r.length)return null;let a=document.activeElement?.closest(o),i=a?r.indexOf(a):-1;if(e==="open-row"){let c=i>=0?r[i]:r[0];return c.click(),c}let s=e==="first-row"?0:e==="last-row"?r.length-1:e==="next-row"?Math.min(r.length-1,i+1):Math.max(0,i-1),l=r[s];return l.hasAttribute("tabindex")||l.setAttribute("tabindex","-1"),l.focus(),l.scrollIntoView?.({block:"nearest"}),l}function za(e={}){let t={enabled:!0,...$a,...e.initial},n=null,o=!1,r=async c=>e.apply?e.apply(c):Se.execute(c),a=c=>{if(e.speak===!1||!We()||!("speechSynthesis"in window))return;let d=new SpeechSynthesisUtterance(c);d.lang=e.lang??"en-IN",window.speechSynthesis.cancel(),window.speechSynthesis.speak(d)};async function i(c){let d=ec(c,t);if(e.onTranscript?.(c,d),!d)return null;if(d.type==="grid"){let g=tc(d.action,{root:e.gridRoot});return a(g?d.say:"No table rows found."),d}return t=d.type==="reset"?{...t,...$a}:{...t,...d.patch},await r(t),a(d.say),d}function s(){if(!We()||o)return o;let c=window,d=c.SpeechRecognition??c.webkitSpeechRecognition;return d?(n=new d,n.lang=e.lang??"en-IN",n.continuous=!0,n.interimResults=!1,n.onresult=g=>{let p=g.results,m=p[p.length-1];m?.[0]?.transcript&&i(m[0].transcript)},n.onend=()=>{o&&n?.start()},n.onerror=g=>{(g.error==="not-allowed"||g.error==="service-not-allowed")&&(o=!1)},o=!0,n.start(),!0):!1}function l(){o=!1,n?.stop(),n=null}return{start:s,stop:l,handle:i,isListening:()=>o,getConfig:()=>({...t})}}v();var Gu=new Set("a an the is are was were be to of and or in on at for with what which who whom how why when where does do did this that these those it its from by as about any all please tell me show give".split(" "));function tn(e){return(e.normalize("NFC").toLowerCase().match(/[\p{L}\p{M}\p{N}]+/gu)??[]).filter(t=>t.length>1&&!Gu.has(t))}function nc(e,t=600){let n=Ge(e);if(!n)return[];let o=[],r="",a="",i=()=>{a.trim()&&o.push({id:`page-${o.length+1}`,source:"page",text:a.trim(),ref:r||void 0}),a=""};for(let s of K(n,"h1,h2,h3,h4,p,li,td,th,dt,dd,blockquote,figcaption,label,summary")){if(s.querySelector("p,li,h1,h2,h3,h4"))continue;let l=fe(s.textContent);if(l){if(/^H[1-4]$/.test(s.tagName)){i(),r=l,a=`${l}. `;continue}a.length+l.length>t&&i(),a+=`${l} `}}return i(),o}function oc(e,t,n="id"){return e.map((o,r)=>{let a=o,i=String(a[n]??r+1);return{id:`grid-${i}`,source:"grid",ref:i,text:t.map(s=>`${s.label}: ${String(a[s.key]??"")}`).join(". ")}})}function Oa(e={}){let t=[],n=[],o=new Map,r=0;function a(){t=[...e.includePage===!1?[]:nc(e.root),...e.rows&&e.columns?oc(e.rows,e.columns,e.rowKey):[],...(e.documents??[]).map(l=>({id:l.id,source:"custom",text:l.text}))],n=t.map(l=>tn(l.text)),o=new Map;for(let l of n)for(let c of new Set(l))o.set(c,(o.get(c)??0)+1);r=n.reduce((l,c)=>l+c.length,0)/Math.max(1,n.length)}a();function i(l,c=5){let d=tn(l);if(!d.length)return[];let g=n.length;return n.map((m,h)=>{let y=0;for(let u of d){let I=0;for(let b of m)(b===u||u.length>=4&&b.startsWith(u)||b.length>=4&&u.startsWith(b))&&I++;if(!I)continue;let C=Math.log(1+(g-(o.get(u)??1)+.5)/((o.get(u)??1)+.5));y+=C*(I*2.2/(I+1.2*(.25+.75*(m.length/(r||1)))))}return{...t[h],score:y}}).filter(m=>m.score>0).sort((m,h)=>h.score-m.score).slice(0,c)}async function s(l,c={}){let d=i(l,c.k??4);if(!d.length)return{answer:"I couldn't find anything about that on this page or in the data.",hits:d,generated:!1};if(c.generate)try{let h=d.map((u,I)=>`[${I+1}] ${u.text}`).join(`
1541
- `),y=await c.generate(l,h);if(y?.trim())return{answer:y.trim(),hits:d,generated:!0}}catch{}let g=new Set(tn(l)),p=d.flatMap(h=>h.text.split(/(?<=[.!?।])\s+|\.\s+(?=\p{Lu})/u).map(y=>({s:y.trim(),h}))).map(({s:h,h:y})=>({s:h,h:y,overlap:tn(h).filter(u=>g.has(u)).length})).filter(h=>h.s&&h.overlap>0).sort((h,y)=>y.overlap-h.overlap).slice(0,3);return{answer:p.length?p.map(h=>h.h.source==="grid"?`Row ${h.h.ref}: ${h.s}`:h.s).join(`
1542
- `):d[0].text.slice(0,300),hits:d,generated:!1}}return{search:i,ask:s,rebuild:a,update(l){Object.assign(e,l),a()},size:()=>t.length}}v();var ac="highlight|mark|flag|sort|order|rank|arrange|summari[sz]e|summary|recap|count|how many|open|select|pick|show|filter|find|list|clear|reset|remove|detect|spot|tell";function Mn(e){return e.replace(/[?!]/g," ").split(/\s*(?:;|\.(?!\d)\s*|,?\s*\band then\b|,?\s*\bthen\b|,?\s*\bafter that\b|,?\s*\bfinally\b|,?\s*\bnext\b|ఆ తర్వాత)\s*/i).flatMap(o=>o.split(new RegExp(`\\s*(?:,|\\band\\b)\\s+(?=(?:${ac})\\b)`,"i"))).map(o=>o.trim()).filter(o=>o.length>1).map(o=>({action:Lu(o),text:o}))}function Lu(e){let t=e.toLowerCase();return/^(clear|reset|remove)\b/.test(t)?"clear":/unusual|anomal|outlier|suspicious|odd ones|duplicate/.test(t)?"anomalies":/summari[sz]e|summary|what changed|recap|overview/.test(t)?"summarize":/^(highlight|mark|flag)\b/.test(t)?"highlight":/^(sort|order|rank|arrange)\b/.test(t)?"sort":/^(count|how many)\b/.test(t)?"count":/^(open|go to)\b/.test(t)&&!/filtered|results?/.test(t)?"open":/^(select|pick)\b/.test(t)?"select":"filter"}function Fu(e){return e.replace(new RegExp(`^\\s*(?:${ac}|open|go to)\\b`,"i")," ").replace(/\b(the|filtered|results?|rows?|records?|entries|items?|ones|them|those|only|me|all)\b/gi," ").replace(/\s+/g," ").trim()}function rc(e,t){let n=t.find(a=>a.key===e.key)?.label??e.key,o=Array.isArray(e.value)?`${e.value[0]}\u2013${e.value[1]}`:typeof e.value=="number"?e.value.toLocaleString("en-IN",{maximumFractionDigits:2}):`"${e.value}"`,r={contains:"contains",equals:"is",startsWith:"starts with",endsWith:"ends with",greaterThan:">",lessThan:"<",between:"between"}[e.operator];return`${n} ${r} ${o}`}async function Ha(e,t,n={}){let o=Mn(e),{columns:r,data:a}=t,i=[...t.filters??[]],s=[],l=null,c=[],d=()=>tt(a,r,{filters:i,search:s,sort:l,limit:null,notes:[],explanation:""}),g={rows:d().length,filters:[...i]},p=[],m=()=>({...t,filters:i});for(let y=0;y<o.length;y++){let u=o[y],I=Fu(u.text),C;try{switch(u.action){case"clear":{i=[],s=[],l=null,c=[],t.onFiltersChange?.([]),t.onSortChange?.(null),t.onHighlightRows?.([]),C={...u,success:!0,message:`Cleared filters, sorting and highlights. ${a.length} row(s) shown.`};break}case"filter":{let b=At(I,r,{data:a});if(!b.filters.length&&!b.search.length&&!b.sort){C={...u,success:!0,message:`Showing ${d().length} row(s) with the current filters.`};break}for(let B of b.filters)i=[...i.filter(M=>M.key!==B.key),B];s=[...s,...b.search],b.sort&&(l=b.sort,t.onSortChange?.(l)),t.onFiltersChange?.(i);let k=d(),x=k.map(B=>Ie(B,t.rowKey)).filter(Boolean);b.search.length&&x.length&&(c=x,t.onHighlightRows?.(x)),C={...u,success:!0,message:`${k.length} row(s) now shown. ${b.explanation}`,ids:x};break}case"highlight":{let b=d(),k=At(I,r,{data:b}),B=(k.filters.length||k.search.length?tt(b,r,{...k,sort:null,limit:k.limit}):b).map(L=>Ie(L,t.rowKey)).filter(Boolean);if(!B.length){C={...u,success:!1,message:`Nothing to highlight for "${I||"all rows"}".`};break}let M=vt(m(),B);M.success&&(c=M.data??B),C={...u,success:M.success,message:M.success?`Highlighted ${c.length} row(s)${I?` matching "${I}"`:""}.`:M.message,ids:c};break}case"sort":{let k=At(u.text,r,{data:a}).sort;if(!k){let B=$e(I,r);B&&(k={key:B.key,direction:/desc|high|large|big|most|newest|latest|z.?to.?a/i.test(u.text)?"desc":"asc"})}if(!k){C={...u,success:!1,message:`Which column should I sort by? Columns: ${r.map(B=>B.label).join(", ")}.`};break}l=k,t.onSortChange?.(l);let x=r.find(B=>B.key===l.key)?.label??l.key;C={...u,success:!0,message:`Sorted by ${x} (${l.direction==="desc"?"high \u2192 low":"low \u2192 high"}).`};break}case"count":{C={...u,success:!0,message:`${d().length} row(s) shown${c.length?`, ${c.length} highlighted`:""}.`};break}case"anomalies":{let b=d(),k=Tn(b,r,{rowKey:t.rowKey}),x=Array.from(new Set(k.map(B=>B.rowId)));if(x.length){let B=vt(m(),x);B.success&&(c=B.data??x)}C={...u,success:!0,message:k.length?`${x.length} unusual row(s): ${k.slice(0,5).map(B=>B.reason).join(" ")}`:"Nothing unusual in the shown rows.",ids:x};break}case"open":case"select":{let b=d(),x=b.find(L=>I&&Ie(L,t.rowKey).toLowerCase()===I.toLowerCase())??tt(b,r,At(I,r,{data:b}))[0]??(I?void 0:b[0]);if(!x){C={...u,success:!1,message:`No row matches "${I}".`};break}let B=Ie(x,t.rowKey),M=u.action==="open"?Wt(m(),B):Ht(m(),B);C={...u,success:M.success,message:M.message,ids:[B]};break}case"summarize":{let b=d();C={...u,success:!0,message:`${ic(g,b.length,i,l,c,r)}
1543
- ${Bn(b,r)}`};break}}}catch(b){C={...u,success:!1,message:`This step failed: ${b instanceof Error?b.message:String(b)}`}}p.push(C),n.onStep?.(C,y,o.length)}let h=d().length;return{steps:p,before:g,after:{rows:h,filters:i,sort:l,highlighted:c},summary:ic(g,h,i,l,c,r)}}function ic(e,t,n,o,r,a){let i=[`Rows: ${e.rows} \u2192 ${t}.`],s=n.filter(c=>!e.filters.some(d=>JSON.stringify(d)===JSON.stringify(c))),l=e.filters.filter(c=>!n.some(d=>JSON.stringify(c)===JSON.stringify(d)));return s.length&&i.push(`Filters added: ${s.map(c=>rc(c,a)).join("; ")}.`),l.length&&i.push(`Filters removed: ${l.map(c=>rc(c,a)).join("; ")}.`),o&&i.push(`Sorted by ${a.find(c=>c.key===o.key)?.label??o.key} ${o.direction==="desc"?"high \u2192 low":"low \u2192 high"}.`),r.length&&i.push(`${r.length} row(s) highlighted.`),i.join(" ")}v();var Rn=e=>{let t=typeof e=="number"?e:Number(String(e??"").replace(/[,₹$%\s]/g,""));return Number.isFinite(t)?t:null},sc=e=>{let t=e instanceof Date?e.getTime():new Date(String(e??"")).getTime();return Number.isFinite(t)?t:null};function Nt(e,t){if(t==="count")return e.length;if(!e.length)return 0;switch(t){case"sum":return e.reduce((n,o)=>n+o,0);case"avg":return e.reduce((n,o)=>n+o,0)/e.length;case"min":return Math.min(...e);case"max":return Math.max(...e)}}function lc(e,t,n,o="sum"){let r=new Map;for(let a of e){let i=String(a[t]??"\u2014").trim()||"\u2014",s=r.get(i)??[];if(n===null||o==="count")s.push(1);else{let l=Rn(a[n]);l!==null&&s.push(l)}r.set(i,s)}return Array.from(r.entries()).map(([a,i])=>({group:a,value:Nt(i,o),count:i.length})).sort((a,i)=>i.value-a.value)}function Ua(e,t,n=1){let o=new Date(e);return o.setHours(0,0,0,0),t==="week"&&o.setDate(o.getDate()-(o.getDay()-n+7)%7),t==="month"&&o.setDate(1),t==="quarter"&&o.setMonth(Math.floor(o.getMonth()/3)*3,1),t==="year"&&o.setMonth(0,1),o}function Qn(e,t,n){let o=new Date(e);return t==="day"&&o.setDate(o.getDate()+n),t==="week"&&o.setDate(o.getDate()+7*n),t==="month"&&o.setMonth(o.getMonth()+n),t==="quarter"&&o.setMonth(o.getMonth()+3*n),t==="year"&&o.setFullYear(o.getFullYear()+n),o}function cc(e,t){let n=t.referenceDate?new Date(t.referenceDate):new Date,o=Ua(n,t.period,t.weekStartsOn),r=t.toDate===!1?Qn(o,t.period,1):new Date(Math.max(n.getTime()+1,o.getTime()+1)),a=Qn(o,t.period,-1),i=t.toDate===!1?o:new Date(a.getTime()+(r.getTime()-o.getTime())),s=t.agg??"sum",l=new Map,c=new Map;for(let p of e){let m=sc(p[t.dateKey]);if(m===null)continue;let h=m>=o.getTime()&&m<r.getTime()?l:m>=a.getTime()&&m<i.getTime()?c:null;if(!h)continue;let y=t.groupKey?String(p[t.groupKey]??"\u2014"):"All",u=s==="count"?1:Rn(p[t.metricKey]);u!==null&&h.set(y,[...h.get(y)??[],u])}let d=new Set([...l.keys(),...c.keys()]),g=Array.from(d).map(p=>{let m=Nt(l.get(p)??[],s),h=Nt(c.get(p)??[],s);return{group:p,current:m,previous:h,change:m-h,changePct:h===0?null:(m-h)/Math.abs(h)*100}});return{period:t.period,current:{from:o,to:r},previous:{from:a,to:i},rows:g}}function dc(e,t,n,o,r="sum"){let a=new Map;for(let i of e){let s=sc(i[t]),l=r==="count"?1:Rn(i[n]);if(s===null||l===null)continue;let c=Ua(new Date(s),o).getTime();a.set(c,[...a.get(c)??[],l])}return Array.from(a.entries()).sort((i,s)=>i[0]-s[0]).map(([i,s])=>({start:new Date(i),value:Nt(s,r)}))}var Pu=/rate|conversion|ratio|percent|%|score|rating|margin|ctr|avg|average/i;function Du(e){let t=e.match(/\b(today|yesterday|this|last|previous|past)\s*(day|week|month|quarter|year)?\b/);return t?t[1]==="today"?{period:"day",shift:0}:t[1]==="yesterday"?{period:"day",shift:-1}:t[2]?{period:t[2],shift:t[1]==="this"?0:-1}:null:null}var Be=e=>e.toLocaleString("en-IN",{maximumFractionDigits:2}),Wa=e=>e===null?"new":`${e>0?"+":""}${e.toFixed(1)}%`;function Ya(e,t,n,o={}){let r=e.toLowerCase(),a=n.filter(b=>b.type==="number"),i=$e(r,n,"number")??a.find(b=>/amount|revenue|sales|total|value/i.test(`${b.key} ${b.label}`))??a[0],s=n.find(b=>b.type==="date")??n.find(b=>/date|time|day|created|month/i.test(`${b.key} ${b.label}`)),l=r.match(/\b(?:which|by|per|each|across|every|top|for each)\s+([\p{L}\p{M}\p{N} _]+)/u)?.[1]??"",c=$e(l,n,"text"),d=/how many|number of|count/.test(r),g=d?"count":/average|avg|mean/.test(r)?"avg":/\btotal\b|\bsum\b/.test(r)?"sum":i&&Pu.test(`${i.key} ${i.label}`)?"avg":"sum",p=/drop|decline|decrease|fell|fall|down|worst|lost|shrink|reduc/.test(r),m=/increase|growth|grew|rise|rose|up\b|best|improv|gain/.test(r),h=/lowest|least|smallest|bottom|worst|minimum/.test(r),y=Du(r);if(!i&&!d)return{kind:"unknown",answer:"I couldn't find a numeric column to analyse.",table:[]};let u=d?"rows":i.label;if(y&&s&&(m||p||/change|compare|vs|versus/.test(r))){let b=o.referenceDate?new Date(o.referenceDate):new Date,k=y.shift?Qn(b,y.period,y.shift):b,B=[...cc(t,{dateKey:s.key,metricKey:i?.key??s.key,groupKey:c?.key,agg:g,period:y.period,referenceDate:k,toDate:y.shift===0}).rows].sort((j,ee)=>p?j.change-ee.change:ee.change-j.change),M=B.map(j=>({[c?.label??"Group"]:j.group,Current:Be(j.current),Previous:Be(j.previous),Change:Be(j.change),"Change %":Wa(j.changePct)}));if(!B.length)return{kind:"period-change",answer:`No ${u} data in this ${y.period} or the one before.`,table:M};let L=B[0],q=`${y.shift?"last":"this"} ${y.period} vs the ${y.period} before`,O=L.change===0?"did not change":L.change<0?`dropped ${Be(Math.abs(L.change))}`:`rose ${Be(L.change)}`,G=`${u} ${O} (${Be(L.previous)} \u2192 ${Be(L.current)}, ${Wa(L.changePct)}) \u2014 ${q}.`,Q=p&&L.change>=0||m&&L.change<=0;return{kind:"period-change",answer:c?Q?`No ${c.label.toLowerCase()} ${p?"dropped":"grew"}. Closest is ${L.group}: ${G}`:`${L.group}: ${G}`:G,table:M}}if(/trend|over time|month by month|week by week/.test(r)&&s&&i){let b=/week/.test(r)?"week":/day|daily/.test(r)?"day":/year/.test(r)?"year":"month",k=dc(t,s.key,i.key,b,g),x=k.map(q=>({Period:q.start.toISOString().slice(0,10),[i.label]:Be(q.value)}));if(k.length<2)return{kind:"trend",answer:`Not enough ${b}s of data for a trend.`,table:x};let B=k[0].value,M=k[k.length-1].value,L=k.reduce((q,O)=>O.value>q.value?O:q);return{kind:"trend",answer:`${i.label} went from ${Be(B)} to ${Be(M)} over ${k.length} ${b}s (${Wa(B?(M-B)/Math.abs(B)*100:null)}). Peak: ${Be(L.value)} in the ${b} of ${L.start.toISOString().slice(0,10)}.`,table:x}}if(c){let b=lc(t,c.key,i?.key??null,g),k=h?[...b].reverse():b,x=k.map(M=>({[c.label]:M.group,[`${g} of ${u}`]:Be(M.value),Rows:M.count}));if(!k.length)return{kind:"group",answer:"No data.",table:x};let B=k[0];return{kind:"group",answer:`${B.group} has the ${h?"lowest":"highest"} ${g==="sum"?"total":g==="avg"?"average":g} ${u}: ${Be(B.value)} (across ${k.length} ${c.label.toLowerCase()} groups).`,table:x}}let I=d?t.map(()=>1):t.map(b=>Rn(b[i.key])).filter(b=>b!==null),C=Nt(I,g);return{kind:"total",answer:`${g==="avg"?"Average":g==="count"?"Count of":g==="sum"?"Total":g} ${u}: ${Be(C)} across ${t.length} row(s).`,table:[{Metric:u,Aggregation:g,Value:Be(C)}]}}v();var uc={high:12,medium:6,low:2};function qa(e={}){let t=Ge(e.root),n=[],o=(s,l,c,d,g)=>n.push({category:s,severity:l,message:c,suggestion:d,selector:g?_e(g):void 0});if(t&&We()){let s=e.minFontSize??14,l=e.maxLineLength??90,c=G=>window.getComputedStyle(G),d=K(t,"h1");d.length===0&&o("hierarchy","medium","There is no h1, so the page has no clear main title.","Add one prominent h1 near the top."),d.length>1&&o("hierarchy","low",`${d.length} h1 headings compete for attention.`,"Keep one h1 and demote the rest.",d[1]);let g=G=>{let Q=K(t,G)[0];return Q&&parseFloat(c(Q).fontSize)||0},[p,m,h]=[g("h1"),g("h2"),g("h3")];p&&m&&m>=p&&o("hierarchy","medium",`h2 (${m}px) is as large as or larger than h1 (${p}px).`,"Make each heading level visibly smaller than the one above it."),m&&h&&h>m&&o("hierarchy","low",`h3 (${h}px) is larger than h2 (${m}px).`,"Keep heading sizes in descending order.");let y=et({root:e.root,skip:["color-contrast","target-size","duplicate-id","page-title","html-lang","form-error","positive-tabindex"]});for(let G of y.issues.filter(Q=>Q.rule==="heading-order").slice(0,3))o("hierarchy","low",G.message,G.fix,G.element);let u=0,I;for(let G of K(t,"p,li,td,span,a,label,small,div").slice(0,1500)){if(!Jt(G))continue;(parseFloat(c(G).fontSize)||16)<s&&(u++,I??=G)}u&&o("readability",u>10?"high":"medium",`${u} text element(s) are smaller than ${s}px, e.g. "${xe(I?.textContent??"",30)}".`,`Use at least ${s}px for body text (16px for senior-friendly pages).`,I);for(let G of K(t,"p").slice(0,200)){let Q=c(G),S=parseFloat(Q.fontSize)||16,j=G.getBoundingClientRect().width,ee=j/(S*.5);if(j>0&&ee>l&&(G.textContent??"").length>l){o("readability","low",`A paragraph is about ${Math.round(ee)} characters wide.`,`Limit text width to ~${l} characters (e.g. max-width: 70ch).`,G);break}let H=parseFloat(Q.lineHeight);if(Number.isFinite(H)&&H/S<1.3){o("readability","low",`Line height is ${(H/S).toFixed(2)}\xD7 the font size.`,"Use line-height of at least 1.5 for body text (WCAG 1.4.12).",G);break}}let C=et({root:e.root,skip:["html-lang","page-title","image-alt","heading-order","single-h1","landmark-main","form-label","button-name","link-name","positive-tabindex","keyboard-access","duplicate-id","form-error","target-size"]});C.issues.length&&o("readability",C.issues.length>5?"high":"medium",`${C.issues.length} text element(s) have weak contrast. ${C.issues[0].message}`,"Raise contrast to at least 4.5:1 for body text.",C.issues[0].element);let b=$u();b.length&&o("interaction","high",`Focus outlines are removed by CSS (${b.slice(0,2).join(", ")}) with no replacement.`,"Never remove outlines without a visible :focus-visible style (WCAG 2.4.7).");let k=K(t,wn).filter(G=>{let Q=G.getBoundingClientRect();return Q.width>0&&Q.height>0&&(Q.width<24||Q.height<24)&&!(G.tagName==="A"&&G.closest("p,li"))});k.length&&o("interaction",k.length>5?"high":"medium",`${k.length} control(s) are smaller than 24\xD724px.`,"Give controls at least 24\xD724px, ideally 44\xD744px for touch and seniors.",k[0]);let x=window.innerHeight||800,B=K(t,Ol).filter(G=>{let Q=G.getBoundingClientRect();return Q.height>0&&Q.top<x});B.length>40&&o("clutter","medium",`${B.length} interactive elements in the first screen.`,"Group secondary actions into menus and keep the first screen focused on one task.");let M=K(t,"button,a[href],[role='button']").filter(G=>{let Q=G.getBoundingClientRect();if(Q.height===0||Q.top>x)return!1;let S=c(G).backgroundColor;return!!S&&!/rgba\(0, 0, 0, 0\)|transparent/.test(S)&&!/rgb\(255, 255, 255\)/.test(S)});M.length>4&&o("clutter","medium",`${M.length} filled buttons compete in the first screen.`,"Keep one primary action per view; make the rest secondary (outline or text).",M[0]);let L=new Set,q=new Set;for(let G of K(t,"body *").slice(0,2e3)){if(!Jt(G))continue;let Q=c(G);L.add(Q.fontFamily.split(",")[0].replace(/["']/g,"").trim().toLowerCase()),q.add(Math.round(parseFloat(Q.fontSize)||0))}L.size>4&&o("consistency","low",`${L.size} different font families are used.`,"Stick to 1\u20132 font families (e.g. one Telugu + one Latin)."),q.size>10&&o("consistency","low",`${q.size} different font sizes are used.`,"Use a small type scale (5\u20137 sizes) for a calmer page.");let O=K(t,"img:not([width]):not([height])").filter(G=>!c(G).aspectRatio||c(G).aspectRatio==="auto");O.length>3&&o("consistency","low",`${O.length} images have no width/height, so the layout jumps while loading.`,"Set width and height (or aspect-ratio) on images.",O[0])}let r=["hierarchy","readability","interaction","clutter","consistency"].reduce((s,l)=>{let c=n.filter(d=>d.category===l);return s[l]={score:Math.max(0,100-c.reduce((d,g)=>d+uc[g.severity]*2,0)),findings:c.length},s},{}),a=Math.max(0,100-n.reduce((s,l)=>s+uc[l.severity],0)),i=Object.entries(r).sort((s,l)=>s[1].score-l[1].score)[0];return{score:a,categories:r,findings:n,summary:n.length?`Design score ${a}/100 with ${n.length} finding(s). Weakest area: ${i[0]}.`:"No design issues found by the automatic review."}}function $u(){let e=[],t=!1,n=o=>{for(let r of Array.from(o)){let a=r.cssRules;a&&n(a);let i=r;if(!i.selectorText||!/:focus/.test(i.selectorText))continue;let s=`${i.style.outline} ${i.style.outlineStyle} ${i.style.outlineWidth}`,l=/\bnone\b|\b0(px)?\b/.test(s),c=!!(i.style.boxShadow&&i.style.boxShadow!=="none")||!!i.style.borderColor||!!i.style.backgroundColor||!!i.style.textDecoration;/:focus-visible/.test(i.selectorText)&&(!l||c)&&(t=!0),l&&!c&&e.push(i.selectorText)}};for(let o of Array.from(document.styleSheets))try{n(o.cssRules)}catch{}return t?[]:e}v();var V=require("react");var T=require("react/jsx-runtime"),zu=/\b(trend|over time|this (week|month|quarter|year)|last (week|month|quarter|year)|compare|versus|vs)\b|\b(by|per|each|which)\b.*\b(total|average|avg|sum|drop|increase|growth|highest|lowest|most|least)\b|\b(total|average|avg|sum)\b.*\b(by|per|each)\b/i;function Ou(e){let{data:t,rowKey:n="id"}=e,o=(0,V.useMemo)(()=>it(e.columns),[e.columns]),[r,a]=(0,V.useState)([]),[i,s]=(0,V.useState)(null),[l,c]=(0,V.useState)([]),[d,g]=(0,V.useState)(""),[p,m]=(0,V.useState)(null),[h,y]=(0,V.useState)([]),[u,I]=(0,V.useState)([]),[C,b]=(0,V.useState)(!1),k=(0,V.useRef)(r);k.current=r;let x=(0,V.useCallback)(()=>({data:t,columns:o,rowKey:n,filters:k.current,onFiltersChange:q=>{k.current=q,a(q)},onSortChange:s,onHighlightRows:c,onOpenRow:e.onOpenRow,onSelectRow:q=>c([q])}),[t,o,n,e.onOpenRow]),B=(0,V.useCallback)(async q=>{let O=q.trim();if(O){b(!0),I([]),y([]);try{if(Mn(O).length>1){let G=[],Q=await Ha(O,x(),{onStep:S=>I((G.push(S),[...G]))});m("tasks"),g(Q.summary)}else if(zu.test(O)){let G=tt(t,o,{filters:k.current,search:[],sort:null,limit:null,notes:[],explanation:""}),Q=Ya(O,G,o,{referenceDate:e.referenceDate});m("insight"),g(Q.answer),y(Q.table)}else{let G=Pa(O,x());m(G.kind),g(G.message)}}finally{b(!1)}}},[x,t,o,e.referenceDate]),M=(0,V.useCallback)(()=>{k.current=[],a([]),s(null),c([]),g(""),m(null),y([]),I([])},[]),L=(0,V.useMemo)(()=>tt(t,o,{filters:r,search:[],sort:i,limit:null,notes:[],explanation:""}),[t,o,r,i]);return{gridData:L,highlightIds:l,filters:r,sort:i,ask:B,reset:M,answer:d,kind:p,table:h,steps:u,busy:C,visibleIds:L.map(q=>Ie(q,n))}}var pc={border:"1px solid color-mix(in srgb, CanvasText 20%, transparent)",borderRadius:12,padding:16,background:"Canvas",color:"CanvasText",font:"inherit"},ye={minHeight:44,padding:"8px 14px",borderRadius:8,border:"1px solid color-mix(in srgb, CanvasText 35%, transparent)",background:"ButtonFace",color:"ButtonText",font:"inherit",cursor:"pointer"},_a={...ye,flex:1,minWidth:0,background:"Field",color:"FieldText",cursor:"text"},Gn={opacity:.75,fontSize:"0.9em"};function Ja({rows:e}){if(!e.length)return null;let t=Object.keys(e[0]);return(0,T.jsx)("div",{style:{overflowX:"auto",marginTop:12},children:(0,T.jsxs)("table",{style:{borderCollapse:"collapse",width:"100%"},children:[(0,T.jsx)("thead",{children:(0,T.jsx)("tr",{children:t.map(n=>(0,T.jsx)("th",{scope:"col",style:{textAlign:"left",padding:"6px 8px",borderBottom:"1px solid currentColor"},children:n},n))})}),(0,T.jsx)("tbody",{children:e.slice(0,50).map((n,o)=>(0,T.jsx)("tr",{children:t.map(r=>(0,T.jsx)("td",{style:{padding:"6px 8px",borderBottom:"1px solid color-mix(in srgb, CanvasText 12%, transparent)"},children:n[r]},r))},o))})]})})}function gc(e,t,n){let o=URL.createObjectURL(new Blob([t],{type:n})),r=document.createElement("a");r.href=o,r.download=e,r.click(),setTimeout(()=>URL.revokeObjectURL(o),1e3)}function Hu({grid:e,placeholder:t="Ask about this data, e.g. \u201Coverdue and over \u20B910,000\u201D",examples:n=[],style:o}){let[r,a]=(0,V.useState)(""),i=s=>{s.preventDefault(),e.ask(r)};return(0,T.jsxs)("section",{"data-yuktai-panel":"","aria-label":"Data assistant",style:{...pc,...o},children:[(0,T.jsxs)("form",{onSubmit:i,style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,T.jsx)("label",{htmlFor:"yuktai-grid-ask",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:"Question about the data"}),(0,T.jsx)("input",{id:"yuktai-grid-ask",value:r,onChange:s=>a(s.target.value),placeholder:t,style:_a}),(0,T.jsx)("button",{type:"submit",style:ye,disabled:e.busy,children:e.busy?"Working\u2026":"Ask"}),(0,T.jsx)("button",{type:"button",style:ye,onClick:()=>{a(""),e.reset()},children:"Reset"})]}),n.length>0&&(0,T.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap",marginTop:8},children:n.map(s=>(0,T.jsx)("button",{type:"button",style:{...ye,minHeight:36,fontSize:"0.85em"},onClick:()=>{a(s),e.ask(s)},children:s},s))}),(0,T.jsx)("div",{"aria-live":"polite",style:{marginTop:12,whiteSpace:"pre-line"},children:e.answer}),e.steps.length>0&&(0,T.jsx)("ol",{style:{marginTop:8,paddingLeft:20},children:e.steps.map((s,l)=>(0,T.jsxs)("li",{style:{marginBottom:4},children:[(0,T.jsx)("span",{"aria-hidden":"true",children:s.success?"\u2705 ":"\u26A0\uFE0F "}),(0,T.jsx)("strong",{children:s.text})," \u2014 ",(0,T.jsx)("span",{style:{whiteSpace:"pre-line"},children:s.message})]},l))}),(0,T.jsx)(Ja,{rows:e.table})]})}var Nn=[["copilot","Copilot"],["qa","QA report"],["forms","Forms"],["design","Design"],["ask","Ask page"],["voice","Voice"]];function Wu({defaultTab:e="copilot",voiceLang:t="en-IN",generate:n,style:o}){let[r,a]=(0,V.useState)(e),i=(0,V.useRef)([]),s=(l,c)=>{let d=l.key==="ArrowRight"?1:l.key==="ArrowLeft"?-1:0;if(!d)return;l.preventDefault();let g=(c+d+Nn.length)%Nn.length;a(Nn[g][0]),i.current[g]?.focus()};return(0,T.jsxs)("section",{"data-yuktai-panel":"","aria-label":"yuktai agentic tools",style:{...pc,...o},children:[(0,T.jsx)("div",{role:"tablist","aria-label":"Tools",style:{display:"flex",gap:6,flexWrap:"wrap",marginBottom:12},children:Nn.map(([l,c],d)=>(0,T.jsx)("button",{ref:g=>{i.current[d]=g},role:"tab",id:`yuktai-tab-${l}`,"aria-selected":r===l,"aria-controls":`yuktai-tabpanel-${l}`,tabIndex:r===l?0:-1,onClick:()=>a(l),onKeyDown:g=>s(g,d),style:{...ye,fontWeight:r===l?700:400,outlineOffset:2,borderWidth:r===l?2:1},children:c},l))}),(0,T.jsxs)("div",{role:"tabpanel",id:`yuktai-tabpanel-${r}`,"aria-labelledby":`yuktai-tab-${r}`,children:[r==="copilot"&&(0,T.jsx)(Uu,{}),r==="qa"&&(0,T.jsx)(Yu,{}),r==="forms"&&(0,T.jsx)(qu,{}),r==="design"&&(0,T.jsx)(_u,{}),r==="ask"&&(0,T.jsx)(Ju,{generate:n}),r==="voice"&&(0,T.jsx)(Vu,{lang:t})]})]})}function Uu(){let e=(0,V.useRef)(null),[t,n]=(0,V.useState)(null),[o,r]=(0,V.useState)(null),[a,i]=(0,V.useState)("");(0,V.useEffect)(()=>(e.current=Ra({onUpdate:n}),e.current.scan(),()=>e.current?.stop()),[]);let s=e.current,l=t?.report?.issues??[];return(0,T.jsxs)("div",{children:[(0,T.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,T.jsx)("button",{type:"button",style:ye,onClick:()=>t?.watching?s?.stop():s?.start(),children:t?.watching?"Stop watching":"Watch page live"}),(0,T.jsx)("button",{type:"button",style:ye,onClick:()=>s?.scan(),children:"Scan now"}),(0,T.jsx)("button",{type:"button",style:ye,onClick:()=>i(`${s?.applyAllFixes().filter(c=>c.applied).length??0} fix(es) applied.`),children:"Apply safe fixes"}),(0,T.jsx)("button",{type:"button",style:ye,onClick:()=>i(`${s?.undoAll()??0} change(s) undone.`),children:"Undo all"})]}),(0,T.jsxs)("p",{"aria-live":"polite",style:{marginTop:12},children:[t?.report?.summary," ",a]}),(0,T.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0},children:l.slice(0,40).map(c=>(0,T.jsxs)("li",{style:{borderTop:"1px solid color-mix(in srgb, CanvasText 12%, transparent)",padding:"8px 0"},children:[(0,T.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[(0,T.jsx)("span",{style:{...Gn,minWidth:70},children:c.severity}),(0,T.jsx)("span",{style:{flex:1},children:c.message}),(0,T.jsx)("button",{type:"button",style:ye,"aria-expanded":o===c.id,onClick:()=>r(o===c.id?null:c.id),children:"Why?"}),c.autoFixable&&(0,T.jsx)("button",{type:"button",style:ye,onClick:()=>i(s?.applyFix(c.id).message??""),children:"Fix"})]}),o===c.id&&(0,T.jsx)("p",{style:{whiteSpace:"pre-line",margin:"8px 0 0"},children:s?.explain(c.id)})]},c.id))})]})}function Yu(){let[e,t]=(0,V.useState)(null);return(0,T.jsxs)("div",{children:[(0,T.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,T.jsx)("button",{type:"button",style:ye,onClick:()=>t(et()),children:"Run QA check"}),e&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("button",{type:"button",style:ye,onClick:()=>gc("accessibility-report.md",Ma(e),"text/markdown"),children:"Download .md"}),(0,T.jsx)("button",{type:"button",style:ye,onClick:()=>gc("accessibility-report.json",Qa(e),"application/json"),children:"Download .json"})]})]}),e&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)("p",{"aria-live":"polite",style:{marginTop:12},children:[(0,T.jsx)("strong",{children:e.passed?"PASS":"FAIL"})," \u2014 ",e.summary]}),(0,T.jsx)(Ja,{rows:e.checks.map(n=>({Check:n.title,Result:n.passed?"\u2705 Pass":"\u274C Fail",Issues:n.issueCount}))})]})]})}function qu(){let[e,t]=(0,V.useState)(null);return(0,T.jsxs)("div",{children:[(0,T.jsx)("button",{type:"button",style:ye,onClick:()=>t(en()),children:"Review forms"}),(0,T.jsxs)("div",{"aria-live":"polite",children:[e&&e.length===0&&(0,T.jsx)("p",{children:"No forms on this page."}),e?.map(n=>(0,T.jsxs)("div",{style:{marginTop:12},children:[(0,T.jsx)("p",{children:(0,T.jsx)("strong",{children:n.summary})}),(0,T.jsx)("ul",{children:n.findings.map((o,r)=>(0,T.jsxs)("li",{children:[o.level==="problem"?"Problem: ":"Suggestion: ",o.message," ",(0,T.jsx)("span",{style:Gn,children:o.suggestion})]},r))})]},n.selector))]})]})}function _u(){let[e,t]=(0,V.useState)(null);return(0,T.jsxs)("div",{children:[(0,T.jsx)("button",{type:"button",style:ye,onClick:()=>t(qa()),children:"Review design"}),e&&(0,T.jsxs)("div",{"aria-live":"polite",children:[(0,T.jsx)("p",{style:{marginTop:12},children:(0,T.jsx)("strong",{children:e.summary})}),(0,T.jsx)(Ja,{rows:Object.entries(e.categories).map(([n,o])=>({Area:n,Score:o.score,Findings:o.findings}))}),(0,T.jsx)("ul",{children:e.findings.map((n,o)=>(0,T.jsxs)("li",{children:["[",n.severity,"] ",n.message," ",(0,T.jsx)("span",{style:Gn,children:n.suggestion})]},o))})]})]})}function Ju({generate:e}){let[t,n]=(0,V.useState)(""),[o,r]=(0,V.useState)(""),[a,i]=(0,V.useState)([]);return(0,T.jsxs)("div",{children:[(0,T.jsxs)("form",{onSubmit:async l=>{if(l.preventDefault(),!t.trim())return;let c=await Na(t);if(c.intent!=="unknown"&&c.intent!=="purpose"){r(c.answer),i(c.suggestions);return}let d=await Oa().ask(t,{generate:e});r(c.intent==="purpose"&&!d.hits.length?c.answer:d.hits.length?d.answer:c.answer),i(c.suggestions)},style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,T.jsx)("label",{htmlFor:"yuktai-page-ask",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:"Question about this page"}),(0,T.jsx)("input",{id:"yuktai-page-ask",value:t,onChange:l=>n(l.target.value),placeholder:"What does this page do? Which fields are missing labels?",style:_a}),(0,T.jsx)("button",{type:"submit",style:ye,children:"Ask"})]}),(0,T.jsx)("p",{"aria-live":"polite",style:{whiteSpace:"pre-line",marginTop:12},children:o}),a.length>0&&(0,T.jsx)("ul",{children:a.map((l,c)=>(0,T.jsx)("li",{children:l},c))})]})}function Vu({lang:e}){let t=(0,V.useMemo)(()=>za({lang:e,onTranscript:(l,c)=>a(`\u201C${l}\u201D \u2192 ${c?c.say:"not a command"}`)}),[e]),[n,o]=(0,V.useState)(!1),[r,a]=(0,V.useState)(""),[i,s]=(0,V.useState)("");return(0,V.useEffect)(()=>()=>t.stop(),[t]),(0,T.jsxs)("div",{children:[(0,T.jsx)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:(0,T.jsx)("button",{type:"button",style:ye,"aria-pressed":n,onClick:()=>{n?(t.stop(),o(!1)):o(t.start())},children:n?"Stop listening":"Start voice commands"})}),(0,T.jsxs)("form",{onSubmit:l=>{l.preventDefault(),t.handle(i),s("")},style:{display:"flex",gap:8,marginTop:8,flexWrap:"wrap"},children:[(0,T.jsx)("label",{htmlFor:"yuktai-voice-typed",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:"Type a command"}),(0,T.jsx)("input",{id:"yuktai-voice-typed",value:i,onChange:l=>s(l.target.value),placeholder:"Or type: turn on high contrast",style:_a}),(0,T.jsx)("button",{type:"submit",style:ye,children:"Run"})]}),(0,T.jsx)("p",{"aria-live":"polite",style:{marginTop:12},children:r}),(0,T.jsx)("p",{style:Gn,children:"Try: \u201Cturn on high contrast\u201D, \u201Cbigger text\u201D, \u201Cdark mode off\u201D, \u201Cnext row\u201D, \u201C\u0C2A\u0C46\u0C26\u0C4D\u0C26 \u0C05\u0C15\u0C4D\u0C37\u0C30\u0C3E\u0C32\u0C41\u201D, \u201Creset settings\u201D."})]})}function Ku(){if(typeof globalThis>"u")return new rt;if(!globalThis.__yuktai_runtime__){let e=new rt;e.register(Se.name,Se),e.register(zt.name,zt),e.register(Ot.name,Ot),globalThis.__yuktai_runtime__=e}return globalThis.__yuktai_runtime__}var mc=typeof window<"u"?Ku():new rt,ju={wcagPlugin:Se,list(){return mc.getPlugins()},use(e){return mc.use(e)},fix(e){return Se.applyFixes({enabled:!0,autoFix:!0,...e})},scan(){return Se.scan()}};
1546
+ `})]})}var Jo=ac;x();var xe=require("react");x();var lc={en:{found:e=>`${e} row(s) found.`,count:e=>`${e} row(s).`,columns:"Grid columns retrieved.",rowFound:"Row found.",notFound:e=>`Row "${e}" not found.`,noneFound:"None of the given rows were found.",highlighted:e=>`${e} row(s) highlighted.`,selected:e=>`Row "${e}" selected.`,opened:e=>`Row "${e}" opened.`,notSupported:e=>`This grid does not support "${e}".`,emptyQuery:"Please enter something to search.",noIds:"No row IDs were given.",unknownColumn:e=>`Unknown column "${e}".`,badOperator:e=>`Unknown filter operator "${e}".`,badValue:"The filter value is not valid for this column.",filtered:e=>`Filter applied: ${e} row(s) match.`,filtersCleared:"All filters cleared.",sorted:(e,t)=>`Sorted by ${e} (${t==="asc"?"ascending":"descending"}).`,sortCleared:"Sorting cleared.",internal:"Something went wrong while running this action."},te:{found:e=>`${e} \u0C35\u0C30\u0C41\u0C38(\u0C32\u0C41) \u0C26\u0C4A\u0C30\u0C3F\u0C15\u0C3E\u0C2F\u0C3F.`,count:e=>`\u0C2E\u0C4A\u0C24\u0C4D\u0C24\u0C02 ${e} \u0C35\u0C30\u0C41\u0C38\u0C32\u0C41.`,columns:"\u0C15\u0C3E\u0C32\u0C2E\u0C4D\u200C\u0C32 \u0C35\u0C3F\u0C35\u0C30\u0C3E\u0C32\u0C41.",rowFound:"\u0C35\u0C30\u0C41\u0C38 \u0C26\u0C4A\u0C30\u0C3F\u0C15\u0C3F\u0C02\u0C26\u0C3F.",notFound:e=>`"${e}" \u0C35\u0C30\u0C41\u0C38 \u0C26\u0C4A\u0C30\u0C15\u0C32\u0C47\u0C26\u0C41.`,noneFound:"\u0C07\u0C1A\u0C4D\u0C1A\u0C3F\u0C28 \u0C35\u0C30\u0C41\u0C38\u0C32\u0C47\u0C35\u0C40 \u0C26\u0C4A\u0C30\u0C15\u0C32\u0C47\u0C26\u0C41.",highlighted:e=>`${e} \u0C35\u0C30\u0C41\u0C38(\u0C32\u0C41) \u0C39\u0C48\u0C32\u0C48\u0C1F\u0C4D \u0C1A\u0C47\u0C36\u0C3E\u0C28\u0C41.`,selected:e=>`"${e}" \u0C0E\u0C02\u0C1A\u0C41\u0C15\u0C41\u0C28\u0C4D\u0C28\u0C3E\u0C28\u0C41.`,opened:e=>`"${e}" \u0C24\u0C46\u0C30\u0C3F\u0C1A\u0C3E\u0C28\u0C41.`,notSupported:e=>`\u0C08 \u0C2A\u0C1F\u0C4D\u0C1F\u0C3F\u0C15\u0C32\u0C4B "${e}" \u0C38\u0C4C\u0C15\u0C30\u0C4D\u0C2F\u0C02 \u0C32\u0C47\u0C26\u0C41.`,emptyQuery:"\u0C35\u0C46\u0C24\u0C15\u0C21\u0C3E\u0C28\u0C3F\u0C15\u0C3F \u0C0F\u0C26\u0C48\u0C28\u0C3E \u0C30\u0C3E\u0C2F\u0C02\u0C21\u0C3F.",noIds:"\u0C35\u0C30\u0C41\u0C38 ID\u0C32\u0C41 \u0C07\u0C35\u0C4D\u0C35\u0C32\u0C47\u0C26\u0C41.",unknownColumn:e=>`"${e}" \u0C05\u0C28\u0C47 \u0C15\u0C3E\u0C32\u0C2E\u0C4D \u0C32\u0C47\u0C26\u0C41.`,badOperator:e=>`"${e}" \u0C05\u0C28\u0C47 \u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D \u0C35\u0C3F\u0C27\u0C3E\u0C28\u0C02 \u0C32\u0C47\u0C26\u0C41.`,badValue:"\u0C08 \u0C15\u0C3E\u0C32\u0C2E\u0C4D\u200C\u0C15\u0C3F \u0C08 \u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D \u0C35\u0C3F\u0C32\u0C41\u0C35 \u0C38\u0C30\u0C3F\u0C2A\u0C4B\u0C26\u0C41.",filtered:e=>`\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D \u0C35\u0C47\u0C36\u0C3E\u0C28\u0C41: ${e} \u0C35\u0C30\u0C41\u0C38\u0C32\u0C41 \u0C38\u0C30\u0C3F\u0C2A\u0C4B\u0C2F\u0C3E\u0C2F\u0C3F.`,filtersCleared:"\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D\u0C32\u0C28\u0C4D\u0C28\u0C40 \u0C24\u0C40\u0C38\u0C47\u0C36\u0C3E\u0C28\u0C41.",sorted:(e,t)=>`${e} \u0C2A\u0C4D\u0C30\u0C15\u0C3E\u0C30\u0C02 \u0C15\u0C4D\u0C30\u0C2E\u0C02 (${t==="asc"?"\u0C06\u0C30\u0C4B\u0C39\u0C23":"\u0C05\u0C35\u0C30\u0C4B\u0C39\u0C23"}).`,sortCleared:"\u0C15\u0C4D\u0C30\u0C2E\u0C02 \u0C24\u0C40\u0C38\u0C47\u0C36\u0C3E\u0C28\u0C41.",internal:"\u0C08 \u0C2A\u0C28\u0C3F \u0C1A\u0C47\u0C38\u0C4D\u0C24\u0C41\u0C02\u0C21\u0C17\u0C3E \u0C38\u0C2E\u0C38\u0C4D\u0C2F \u0C35\u0C1A\u0C4D\u0C1A\u0C3F\u0C02\u0C26\u0C3F."}};function Ue(e){return lc[e.locale??"en"]}function ze(e,t){return{success:!0,message:e,data:t}}function Ie(e,t){return{success:!1,message:t,error:{code:e}}}var Wa=["contains","equals","startsWith","endsWith","greaterThan","lessThan","between"];function Qe(e,t="id"){let o=e?.[t];return o==null?"":String(o)}function Et(e){return String(e??"").normalize("NFC").toLowerCase().trim()}function Oa(e){if(typeof e=="number")return Number.isFinite(e)?e:null;let t=String(e??"").trim();if(t==="")return null;let o=Number(t);return Number.isFinite(o)?o:null}function Va(e){if(e instanceof Date)return e.getTime();let t=new Date(String(e??"")).getTime();return Number.isFinite(t)?t:null}function _a(e){return(Array.isArray(e)?e:typeof e=="string"?e.split(","):[]).map(o=>String(o).trim()).filter(Boolean)}function Nn(e,t){let o=Et(t);return e.columns.find(n=>Et(n.key)===o||Et(n.label)===o)}function Ko(e,t){return e.data.find(o=>Qe(o,e.rowKey)===t)}function gc(e,t){return e[t]}function cc(e,t,o){let n=gc(e,o.key),A=o.type??"text";if(A==="number"||A==="date"){let s=A==="number"?Oa:Va,a=s(n);if(a===null)return!1;if(t.operator==="between"){let[g,d]=t.value,u=s(g),I=s(d);return u!==null&&I!==null&&a>=Math.min(u,I)&&a<=Math.max(u,I)}let l=s(t.value);if(l===null)return!1;switch(t.operator){case"equals":return a===l;case"greaterThan":return a>l;case"lessThan":return a<l;default:break}}let i=Et(n),r=Et(t.value);switch(t.operator){case"equals":return i===r;case"startsWith":return i.startsWith(r);case"endsWith":return i.endsWith(r);case"contains":return i.includes(r);default:return!1}}function dc(e,t){let o=t.type??"text",n=o==="date"?Va:Oa;return e.operator==="between"?o==="text"||!Array.isArray(e.value)||e.value.length!==2?!1:n(e.value[0])!==null&&n(e.value[1])!==null:e.operator==="greaterThan"||e.operator==="lessThan"?o!=="text"&&n(e.value)!==null:!Array.isArray(e.value)&&String(e.value).trim()!==""}function ot(e,t,o){return o.length?Xa({data:e,columns:t},o):e}function ct(e){return e.map(t=>({key:String(t.key),label:t.label,type:t.type==="number"?"number":t.type==="date"?"date":"text"}))}function Xa(e,t){return e.data.filter(o=>t.every(n=>{let A=Nn(e,n.key);return A?cc(o,n,A):!0}))}function Rn(e,t){let o=Ue(e),n=Et(t);if(!n)return Ie("INVALID_INPUT",o.emptyQuery);let A=e.data.filter(r=>e.columns.some(s=>Et(r[s.key]).includes(n))),i=A.map(r=>Qe(r,e.rowKey)).filter(Boolean);return e.onHighlightRows?.(i),ze(o.found(A.length),A)}function Tn(e){return ze(Ue(e).count(e.data.length),e.data.length)}function Fn(e){return ze(Ue(e).columns,e.columns)}function Ln(e,t){let o=Ue(e),n=String(t??"").trim();if(!n)return Ie("INVALID_INPUT",o.noIds);let A=Ko(e,n);return A?ze(o.rowFound,A):Ie("NOT_FOUND",o.notFound(n))}function Kt(e,t){let o=Ue(e),n=_a(t);if(n.length===0)return Ie("INVALID_INPUT",o.noIds);if(!e.onHighlightRows)return Ie("NOT_SUPPORTED",o.notSupported("highlight"));let A=n.filter(i=>Ko(e,i)!==void 0);return A.length===0?Ie("NOT_FOUND",o.noneFound):(e.onHighlightRows(A),ze(o.highlighted(A.length),A))}function ao(e,t){let o=Ue(e),n=String(t??"").trim();return n?e.onSelectRow?Ko(e,n)?(e.onSelectRow(n),ze(o.selected(n),n)):Ie("NOT_FOUND",o.notFound(n)):Ie("NOT_SUPPORTED",o.notSupported("select")):Ie("INVALID_INPUT",o.noIds)}function lo(e,t){let o=Ue(e),n=String(t??"").trim();return n?e.onOpenRow?Ko(e,n)?(e.onOpenRow(n),ze(o.opened(n),n)):Ie("NOT_FOUND",o.notFound(n)):Ie("NOT_SUPPORTED",o.notSupported("open")):Ie("INVALID_INPUT",o.noIds)}function Pn(e,t){let o=Ue(e),n=Nn(e,t?.key??"");if(!n)return Ie("INVALID_INPUT",o.unknownColumn(String(t?.key??"")));if(!Wa.includes(t.operator))return Ie("INVALID_INPUT",o.badOperator(String(t.operator)));let A={...t,key:n.key};if(!dc(A,n))return Ie("INVALID_INPUT",o.badValue);if(!e.onFiltersChange)return Ie("NOT_SUPPORTED",o.notSupported("filter"));let i=[...(e.filters??[]).filter(s=>s.key!==n.key),A],r=Xa(e,i).length;return e.onFiltersChange(i),ze(o.filtered(r),{filters:i,count:r})}function Yn(e){let t=Ue(e);return e.onFiltersChange?(e.onFiltersChange([]),ze(t.filtersCleared,[])):Ie("NOT_SUPPORTED",t.notSupported("clear filters"))}function Un(e,t,o="asc"){let n=Ue(e),A=Nn(e,t);if(!A)return Ie("INVALID_INPUT",n.unknownColumn(String(t)));if(o!=="asc"&&o!=="desc")return Ie("INVALID_INPUT",n.badValue);if(!e.onSortChange)return Ie("NOT_SUPPORTED",n.notSupported("sort"));let i={key:A.key,direction:o};return e.onSortChange(i),ze(n.sorted(A.label,o),i)}function Hn(e){let t=Ue(e);return e.onSortChange?(e.onSortChange(null),ze(t.sortCleared,null)):Ie("NOT_SUPPORTED",t.notSupported("clear sort"))}var uc={search:"Search all columns for text. Matching rows are highlighted.",count:"Count the rows currently in the grid.",columns:"List the grid's columns with their keys, labels and types.",get_row:"Get one row by its ID.",highlight:"Highlight one or more rows by ID without filtering the grid.",select:"Select one row by ID.",open:"Open one row by ID to show its full details.",filter:"Filter the grid by one column. Replaces any existing filter on that column.",clear_filters:"Remove all filters.",sort:"Sort the grid by one column, ascending or descending.",clear_sort:"Remove sorting."},za={en:{search:"Search",count:"Count",columns:"Columns",get_row:"Get row",highlight:"Highlight",select:"Select",open:"Open",filter:"Filter",clear_filters:"Clear filters",sort:"Sort",clear_sort:"Clear sort"},te:{search:"\u0C35\u0C46\u0C24\u0C41\u0C15\u0C41",count:"\u0C32\u0C46\u0C15\u0C4D\u0C15",columns:"\u0C15\u0C3E\u0C32\u0C2E\u0C4D\u200C\u0C32\u0C41",get_row:"\u0C35\u0C30\u0C41\u0C38 \u0C1A\u0C42\u0C2A\u0C41",highlight:"\u0C39\u0C48\u0C32\u0C48\u0C1F\u0C4D",select:"\u0C0E\u0C02\u0C1A\u0C41\u0C15\u0C4B",open:"\u0C24\u0C46\u0C30\u0C41\u0C35\u0C41",filter:"\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D",clear_filters:"\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D\u0C32\u0C41 \u0C24\u0C40\u0C38\u0C47\u0C2F\u0C3F",sort:"\u0C15\u0C4D\u0C30\u0C2E\u0C02",clear_sort:"\u0C15\u0C4D\u0C30\u0C2E\u0C02 \u0C24\u0C40\u0C38\u0C47\u0C2F\u0C3F"}};async function Ic(e,t){try{return t()}catch{return Ie("INTERNAL",Ue(e).internal)}}function qt(e,t={}){let o=t.name??"yuktai_grid",n=za[e.locale??"en"],A=a=>t.descriptions?.[a]??uc[a],i={id:{type:"string",description:"Row ID"}},r=e.columns.map(a=>a.key);return[{id:"search",available:!0,schema:{type:"object",properties:{query:{type:"string"}},required:["query"]},run:a=>Rn(e,String(a.query??""))},{id:"count",available:!0,schema:{type:"object",properties:{}},run:()=>Tn(e)},{id:"columns",available:!0,schema:{type:"object",properties:{}},run:()=>Fn(e)},{id:"get_row",available:!0,schema:{type:"object",properties:i,required:["id"]},run:a=>Ln(e,String(a.id??""))},{id:"highlight",available:!!e.onHighlightRows,schema:{type:"object",properties:{ids:{type:"array",items:{type:"string"},description:"Row IDs"}},required:["ids"]},run:a=>Kt(e,_a(a.ids))},{id:"select",available:!!e.onSelectRow,schema:{type:"object",properties:i,required:["id"]},run:a=>ao(e,String(a.id??""))},{id:"open",available:!!e.onOpenRow,schema:{type:"object",properties:i,required:["id"]},run:a=>lo(e,String(a.id??""))},{id:"filter",available:!!e.onFiltersChange,schema:{type:"object",properties:{key:{type:"string",enum:r},operator:{type:"string",enum:Wa},value:{description:"Text or number; for 'between' an array of two numbers or dates"}},required:["key","operator","value"]},run:a=>Pn(e,{key:String(a.key??""),operator:String(a.operator??""),value:a.value})},{id:"clear_filters",available:!!e.onFiltersChange,schema:{type:"object",properties:{}},run:()=>Yn(e)},{id:"sort",available:!!e.onSortChange,schema:{type:"object",properties:{key:{type:"string",enum:r},direction:{type:"string",enum:["asc","desc"]}},required:["key"]},run:a=>Un(e,String(a.key??""),a.direction==="desc"?"desc":"asc")},{id:"clear_sort",available:!!e.onSortChange,schema:{type:"object",properties:{}},run:()=>Hn(e)}].filter(a=>a.available).map(a=>({name:`${o}_${a.id}`,title:za.en[a.id],description:A(a.id),label:n[a.id],inputSchema:a.schema,execute:l=>Ic(e,()=>a.run(l??{}))}))}var pc={en:{done:"Done.",toolMissing:e=>`The action "${e}" is not available here.`,missingInput:e=>`Missing: ${e}.`,notUnderstood:"Sorry, I didn't understand. Try: a word to search, \u201Csort by <column>\u201D, or \u201Cclear filters\u201D.",noMatch:e=>`Nothing matched "${e}".`,failed:"Something went wrong while running this action."},te:{done:"\u0C2A\u0C42\u0C30\u0C4D\u0C24\u0C2F\u0C3F\u0C02\u0C26\u0C3F.",toolMissing:e=>`"${e}" \u0C38\u0C4C\u0C15\u0C30\u0C4D\u0C2F\u0C02 \u0C07\u0C15\u0C4D\u0C15\u0C21 \u0C05\u0C02\u0C26\u0C41\u0C2C\u0C3E\u0C1F\u0C41\u0C32\u0C4B \u0C32\u0C47\u0C26\u0C41.`,missingInput:e=>`\u0C07\u0C35\u0C3F \u0C15\u0C3E\u0C35\u0C3E\u0C32\u0C3F: ${e}.`,notUnderstood:"\u0C15\u0C4D\u0C37\u0C2E\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F, \u0C05\u0C30\u0C4D\u0C25\u0C02 \u0C15\u0C3E\u0C32\u0C47\u0C26\u0C41. \u0C07\u0C32\u0C3E \u0C2A\u0C4D\u0C30\u0C2F\u0C24\u0C4D\u0C28\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F: \u0C35\u0C46\u0C24\u0C15\u0C3E\u0C32\u0C4D\u0C38\u0C3F\u0C28 \u0C2A\u0C26\u0C02, \u201C<\u0C15\u0C3E\u0C32\u0C2E\u0C4D> \u0C2A\u0C4D\u0C30\u0C15\u0C3E\u0C30\u0C02 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u201D, \u0C32\u0C47\u0C26\u0C3E \u201C\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D\u0C32\u0C41 \u0C24\u0C40\u0C38\u0C47\u0C2F\u0C3F\u201D.",noMatch:e=>`"${e}" \u0C15\u0C3F \u0C0F\u0C2E\u0C40 \u0C38\u0C30\u0C3F\u0C2A\u0C4B\u0C32\u0C47\u0C26\u0C41.`,failed:"\u0C08 \u0C2A\u0C28\u0C3F \u0C1A\u0C47\u0C38\u0C4D\u0C24\u0C41\u0C02\u0C21\u0C17\u0C3E \u0C38\u0C2E\u0C38\u0C4D\u0C2F \u0C35\u0C1A\u0C4D\u0C1A\u0C3F\u0C02\u0C26\u0C3F."}},ja=e=>e.normalize("NFC").toLowerCase().trim(),dt={clearFilters:/\b(clear|remove|reset)\b.*\bfilters?\b|ఫిల్టర్.*(తీసే|తొలగ)/i,clearSort:/\b(clear|remove|reset)\b.*\bsort(ing)?\b|క్రమం.*(తీసే|తొలగ)/i,count:/^\s*(how many|count)\b|ఎన్ని|లెక్క/i,sort:/\bsort\b|\border by\b|క్రమ|అమర్చ|సార్ట్/i,desc:/\b(desc|descending|z\s*-\s*a|highest|largest|most)\b|అవరోహణ|తగ్గే|పెద్ద|అధిక|చివర|ఎక్కువ నుండి/i,openEn:/^\s*open\s+(.+?)\s*$/i,openTe:/^\s*(.+?)\s*(తెరువు|తెరవండి|తెరవు)\s*$/,searchFiller:/^\s*(search(\s+for)?|find|show(\s+me)?|filter(\s+by)?|look\s+for|వెతుకు|వెతకండి|శోధించు|శోధించండి|చూపించు|చూపించండి)\s+|\s+(వెతుకు|వెతకండి|శోధించు|శోధించండి|చూపించు|చూపించండి)\s*$/gi};function mc(e,t){let o=ja(e),n=null;for(let A of t)for(let i of[A.label,A.key]){let r=ja(i);r&&o.includes(r)&&(!n||r.length>n.len)&&(n={key:A.key,len:r.length})}return n?.key??null}function Jn(e,t){let o=(e??"").trim();if(!o)return null;if(dt.clearFilters.test(o))return{kind:"tool",tool:"clear_filters",input:{}};if(dt.clearSort.test(o))return{kind:"tool",tool:"clear_sort",input:{}};if(dt.count.test(o))return{kind:"tool",tool:"count",input:{}};if(dt.sort.test(o)){let i=mc(o,t.columns);return i?{kind:"tool",tool:"sort",input:{key:i,direction:dt.desc.test(o)?"desc":"asc"}}:null}let n=o.match(dt.openEn)??o.match(dt.openTe);if(n?.[1])return{kind:"open",text:n[1].trim()};let A=o.replace(dt.searchFiller,"").trim();return A?{kind:"tool",tool:"search",input:{query:A}}:null}function Cc(e){return!!e&&typeof e=="object"&&typeof e.success=="boolean"&&typeof e.message=="string"}function fc(e,t){let o=e.inputSchema?.required;return Array.isArray(o)?o.map(String).filter(n=>t[n]===void 0||t[n]===null||String(t[n]).trim()===""):[]}function hc(e,t){let o=e.find(A=>A.name===t);if(o)return o;let n=e.filter(A=>A.name.endsWith(`_${t}`)).sort((A,i)=>A.name.length-i.name.length);if(n.length!==0&&!(n.length>1&&n[0].name.length===n[1].name.length))return n[0]}function Za(e){return e.normalize("NFC").trim().toLocaleLowerCase()}function yc(e,t){let o=Za(e);return t.find(n=>n.phrases.some(A=>{let i=Za(A);return i.length>0&&o.includes(i)}))}function go({tools:e,data:t=[],onResult:o,onError:n,locale:A="en",columns:i=[],rowKey:r="id",parseIntent:s,customRules:a=[],historyLimit:l=20}){let g=pc[A],[d,u]=(0,xe.useState)(0),[I,y]=(0,xe.useState)(null),[f,c]=(0,xe.useState)(null),[p,B]=(0,xe.useState)([]),h=(0,xe.useRef)({tools:e,data:t,onResult:o,onError:n,columns:i,rowKey:r,parseIntent:s,customRules:a,historyLimit:l,m:g,locale:A});h.current={tools:e,data:t,onResult:o,onError:n,columns:i,rowKey:r,parseIntent:s,customRules:a,historyLimit:l,m:g,locale:A};let w=(0,xe.useRef)(!0),b=(0,xe.useRef)(0);(0,xe.useEffect)(()=>(w.current=!0,()=>{w.current=!1}),[]);let S=(0,xe.useCallback)((R,G,k,ee,te)=>{w.current&&(te===b.current&&y(k),B($=>[...$,{id:te,tool:R,input:G,result:k,source:ee,at:Date.now()}].slice(-h.current.historyLimit)))},[]),D=(0,xe.useCallback)(async(R,G,k)=>{let{tools:ee,onResult:te,onError:$,m:ce}=h.current,ue=++b.current,P=hc(ee,R);if(!P){let H={success:!1,message:ce.toolMissing(R),error:{code:"NOT_SUPPORTED"}},Y=new Error(H.message);return w.current&&c(Y),$?.(Y),S(R,G,H,k,ue),H}let _=fc(P,G);if(_.length){let H={success:!1,message:ce.missingInput(_.join(", ")),error:{code:"INVALID_INPUT"},tool:P.name};return S(P.name,G,H,k,ue),te?.(H),H}w.current&&u(H=>H+1);try{let H=await P.execute(G),Y=Cc(H)?{...H,tool:P.name}:{success:!0,message:ce.done,data:H,tool:P.name};return w.current&&Y.success&&c(null),S(P.name,G,Y,k,ue),te?.(Y),Y}catch(H){let Y=H instanceof Error?H:new Error(String(H)),ie={success:!1,message:ce.failed,error:{code:"INTERNAL"},tool:P.name};return w.current&&c(Y),$?.(Y),S(P.name,G,ie,k,ue),ie}finally{w.current&&u(H=>Math.max(0,H-1))}},[S]),T=(0,xe.useCallback)((R,G={})=>D(R,G??{},"tool"),[D]),z=(0,xe.useCallback)(async R=>{let{columns:G,locale:k,parseIntent:ee,customRules:te,data:$,m:ce,rowKey:ue}=h.current,P=yc(R,te??[]);if(P){let V={input:R,data:$,columns:G,executeTool:T};try{let be={success:!0,message:await P.execute(V),tool:`rule:${P.name}`};return S(`rule:${P.name}`,{text:R},be,"ask",++b.current),h.current.onResult?.(be),be}catch(le){let be=le instanceof Error?le:new Error(String(le)),Ee={success:!1,message:ce.failed,error:{code:"INTERNAL"},tool:`rule:${P.name}`};return w.current&&c(be),h.current.onError?.(be),S(`rule:${P.name}`,{text:R},Ee,"ask",++b.current),Ee}}let H=(ee??Jn)(R,{columns:G,locale:k});if(!H){let V={success:!1,message:ce.notUnderstood,error:{code:"NOT_UNDERSTOOD"}};return S("ask",{text:R},V,"ask",++b.current),V}if(H.kind==="tool")return D(H.tool,H.input,"ask");let Y=await D("search",{query:H.text},"ask"),ie=Array.isArray(Y.data)?Y.data:[];if(!Y.success)return Y;if(ie.length===0){let V={success:!1,message:ce.noMatch(H.text),error:{code:"NOT_FOUND"},tool:Y.tool};return S("open",{text:H.text},V,"ask",++b.current),V}return D("open",{id:Qe(ie[0],ue)},"ask")},[T,S,D]),Z=(0,xe.useCallback)(()=>{B([]),y(null),c(null)},[]);return{loading:d>0,tools:e,executeTool:T,ask:z,lastResult:I,lastError:f,history:p,clearHistory:Z}}var el=go;x();var ut=require("react");function bc(e){return JSON.stringify(e.map(t=>[t.name,t.title,t.description,t.inputSchema]))}function Bc({tools:e,data:t=[],columns:o=[],rowKey:n,locale:A,onSelectRow:i,onHighlightRows:r,onOpenRow:s,name:a="yuktai_grid",descriptions:l,onStatusChange:g}){let d=(0,ut.useMemo)(()=>e||qt({data:t,columns:o,rowKey:n,locale:A,onSelectRow:i,onHighlightRows:r,onOpenRow:s},{name:a,descriptions:l}),[e,t,o,n,A,i,r,s,a,l]),u=(0,ut.useRef)(d);u.current=d;let I=(0,ut.useRef)(g);I.current=g;let y=(0,ut.useRef)(Promise.resolve()),f=bc(d);return(0,ut.useEffect)(()=>{let c=b=>I.current?.(b),p=typeof document<"u"?document.modelContext:void 0;if(!p?.registerTool){c({state:"unsupported",registered:[],errors:[]});return}let B=new AbortController,h=u.current,w=y.current.then(async()=>{if(B.signal.aborted)return;c({state:"registering",registered:[],errors:[]});let b=[],S=[];for(let D of h){if(B.signal.aborted)return;try{await p.registerTool({name:D.name,title:D.title,description:D.description,inputSchema:D.inputSchema,execute:T=>{let z=u.current.find(Z=>Z.name===D.name);return z?z.execute(T??{}):{success:!1,message:`Tool "${D.name}" is no longer available.`,error:{code:"NOT_SUPPORTED"}}}},{signal:B.signal}),b.push(D.name)}catch(T){S.push({tool:D.name,message:T instanceof Error?T.message:String(T)})}}B.signal.aborted||c({state:S.length===0?"ready":b.length>0?"partial":"error",registered:b,errors:S})});return y.current=w.catch(()=>{}),()=>B.abort()},[f]),null}var co=Bc;x();var $t=require("react");function qo(e,t){let o=Fo(e,t),[n,A]=(0,$t.useState)(()=>o?Ma():null);return(0,$t.useEffect)(()=>{if(!o||n)return;let i=!0;return Lo().then(r=>{i&&r&&A(r)}),()=>{i=!1}},[o,n]),(0,$t.useMemo)(()=>o&&n?Ut.create(n):null,[o,n])}x();function tl(e,t){return e.map(o=>t.map(n=>String(o[n.key]??"").toLowerCase()).join(oo))}function Qc(e,t){let o=new Float64Array(e.length),n=0;for(let A=0;A<e.length;A++){let i=e[A][t];if(i==null){o[A]=NaN;continue}if(typeof i!="number"||Number.isNaN(i))return null;o[A]=i,n++}return n?o:null}function ol(e){return e.search==="rust"||e.sort==="rust"?"rust":e.search||e.sort?"ts":null}function nl({data:e,columns:t,searchText:o,filters:n,toolColumns:A,sortKey:i,sortDirection:r,locale:s,core:a=null,searchReady:l=!1,stats:g}){let d=[...e];if(g&&(g.search=null,g.sort=null),o.trim()){let u=o.trim().toLowerCase(),I=a&&l?a.search(u):null;g&&(g.search=I?"rust":"ts"),I?d=Ht(e,I):d=d.filter(y=>t.some(f=>String(y[f.key]??"").toLowerCase().includes(u)))}if(n.length&&(d=ot(d,A,n)),i){if(a){let u=Qc(d,i),I=u&&a.sortByKeys(u,r!=="asc");if(I)return g&&(g.sort="rust"),Ht(d,I)}g&&(g.sort="ts"),d.sort((u,I)=>{let y=u[i],f=I[i];if(y==null&&f==null)return 0;if(y==null)return 1;if(f==null)return-1;if(typeof y=="number"&&typeof f=="number")return r==="asc"?y-f:f-y;let c=String(y).localeCompare(String(f),s,{numeric:!0,sensitivity:"base"});return r==="asc"?c:-c})}return d}var F=require("react/jsx-runtime"),Ec={"en-US":{search:"Search...",searchAria:"Search grid",rows:"rows",row:"row",loading:"Loading...",noData:"No data found.",selectRow:"Select row",pageSize:"Page size",page:"Page",of:"of",previous:"Previous",next:"Next",yes:"Yes",no:"No",sortAscending:"Sort ascending",sortDescending:"Sort descending",filtersActive:e=>`${e} filter(s) applied`,clearFilters:"Clear filters"},"te-IN":{search:"\u0C36\u0C4B\u0C27\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F...",searchAria:"\u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D\u200C\u0C32\u0C4B \u0C36\u0C4B\u0C27\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F",rows:"\u0C35\u0C30\u0C41\u0C38\u0C32\u0C41",row:"\u0C35\u0C30\u0C41\u0C38",loading:"\u0C32\u0C4B\u0C21\u0C4D \u0C05\u0C35\u0C41\u0C24\u0C4B\u0C02\u0C26\u0C3F...",noData:"\u0C21\u0C47\u0C1F\u0C3E \u0C15\u0C28\u0C2C\u0C21\u0C32\u0C47\u0C26\u0C41.",selectRow:"\u0C35\u0C30\u0C41\u0C38\u0C28\u0C41 \u0C0E\u0C02\u0C1A\u0C41\u0C15\u0C4B\u0C02\u0C21\u0C3F",pageSize:"\u0C2A\u0C47\u0C1C\u0C40 \u0C2A\u0C30\u0C3F\u0C2E\u0C3E\u0C23\u0C02",page:"\u0C2A\u0C47\u0C1C\u0C40",of:"\u0C32\u0C4B",previous:"\u0C35\u0C46\u0C28\u0C41\u0C15\u0C15\u0C41",next:"\u0C2E\u0C41\u0C02\u0C26\u0C41\u0C15\u0C41",yes:"\u0C05\u0C35\u0C41\u0C28\u0C41",no:"\u0C15\u0C3E\u0C26\u0C41",sortAscending:"\u0C06\u0C30\u0C4B\u0C39\u0C23 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u0C32\u0C4B \u0C05\u0C2E\u0C30\u0C4D\u0C1A\u0C02\u0C21\u0C3F",sortDescending:"\u0C05\u0C35\u0C30\u0C4B\u0C39\u0C23 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u0C32\u0C4B \u0C05\u0C2E\u0C30\u0C4D\u0C1A\u0C02\u0C21\u0C3F",filtersActive:e=>`${e} \u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D(\u0C32\u0C41) \u0C35\u0C47\u0C36\u0C3E\u0C30\u0C41`,clearFilters:"\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D\u0C32\u0C41 \u0C24\u0C40\u0C38\u0C47\u0C2F\u0C02\u0C21\u0C3F"}};function wc({size:e=20,color:t="currentColor",strokeWidth:o=2.4}){return(0,F.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,F.jsx)("circle",{cx:"11",cy:"11",r:"6.5"}),(0,F.jsx)("path",{d:"m16 16 5 5"})]})}function xc({size:e=18,color:t="currentColor",strokeWidth:o=2.4,label:n}){return(0,F.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":n?void 0:!0,"aria-label":n,role:n?"img":void 0,children:[n?(0,F.jsx)("title",{children:n}):null,(0,F.jsx)("path",{d:"m6 15 6-6 6 6"})]})}function kc({size:e=18,color:t="currentColor",strokeWidth:o=2.4,label:n}){return(0,F.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":n?void 0:!0,"aria-label":n,role:n?"img":void 0,children:[n?(0,F.jsx)("title",{children:n}):null,(0,F.jsx)("path",{d:"m6 9 6 6 6-6"})]})}function Sc({size:e=20,color:t="currentColor",strokeWidth:o=2.4}){return(0,F.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,F.jsx)("path",{d:"m15 18-6-6 6-6"})})}function vc({size:e=20,color:t="currentColor",strokeWidth:o=2.4}){return(0,F.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,F.jsx)("path",{d:"m9 18 6-6-6-6"})})}function Al({size:e=18,color:t="currentColor",strokeWidth:o=2.4}){return(0,F.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,F.jsx)("path",{d:"m5 12 4 4L19 6"})})}function rl({data:e,columns:t,rowKey:o="id",view:n="auto",mobileBreakpoint:A=768,theme:i="default",locale:r="en-US",ai:s=!1,search:a=!0,selectable:l=!1,selectedKeys:g=[],onSelectionChange:d,pagination:u,loading:I=!1,highlightIds:y=[],highlightColor:f="#fff3a3",autoScrollToHighlight:c=!1,onRowClick:p,onSortChange:B,empty:h,className:w="",inputLanguage:b,toolName:S="yuktai_grid",toolDescriptions:D,webmcp:T=!1,onWebMCPStatusChange:z,onAgentResult:Z,customRules:R=[],engine:G="ts",showSearchTime:k=!1,onSearchTime:ee}){let te=r==="te-IN"?"te-IN":"en-US",$=Ec[te],ce=s===!0||typeof s=="object"&&s!==null,ue=u!==!1&&u!==void 0,P=typeof u=="object"?u.pageSize??20:20,_=typeof u=="object"&&u.sizeOptions&&u.sizeOptions.length>0?u.sizeOptions:[10,20,50,100],[H,Y]=(0,ae.useState)(""),[ie,V]=(0,ae.useState)(1),[le,be]=(0,ae.useState)(P),[Ee,K]=(0,ae.useState)(),[de,Ne]=(0,ae.useState)("asc"),[Re,Ce]=(0,ae.useState)(!1),[fe,rt]=(0,ae.useState)([]),[je,we]=(0,ae.useState)([]),Je=(0,ae.useMemo)(()=>ct(t.map(E=>({key:String(E.key),label:E.label,type:E.type}))),[t]);(0,ae.useEffect)(()=>{be(P),V(1)},[P]),(0,ae.useEffect)(()=>{let E=()=>{Ce(window.innerWidth<=A)};return E(),window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)}},[A]);let mt=qo(G,e.length),ho=(0,ae.useMemo)(()=>mt?mt.setSearchTexts(tl(e,t)):!1,[mt,e,t]),Te=(0,ae.useMemo)(()=>{let E={search:null,sort:null},J=typeof performance<"u"?performance.now():Date.now(),X=nl({data:e,columns:t,searchText:H,filters:fe,toolColumns:Je,sortKey:Ee,sortDirection:de,locale:r,core:mt,searchReady:ho,stats:E}),ne=(typeof performance<"u"?performance.now():Date.now())-J;return{rows:X,ms:ne,engine:ol(E)}},[e,t,H,fe,Je,Ee,de,r,mt,ho]),Se=Te.rows;(0,ae.useEffect)(()=>{!ee||!Te.engine||ee({query:H.trim(),ms:Te.ms,rows:Te.rows.length,engine:Te.engine})},[Te]);let Ze=ue?Math.max(1,Math.ceil(Se.length/le)):1;(0,ae.useEffect)(()=>{ie>Ze&&V(Ze)},[ie,Ze]);let et=(0,ae.useMemo)(()=>{let E=[...y.map(String),...je];return Array.from(new Set(E))},[y,je]);(0,ae.useEffect)(()=>{if(!c)return;let E=et[0];if(E==null)return;let J=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(String(E)):String(E).replace(/["\\]/g,"\\$&");document.querySelector(`[data-yuktai-row-id="${J}"]`)?.scrollIntoView({behavior:"smooth",block:"center"})},[et,c,ie]);let Ct=(0,ae.useMemo)(()=>{if(!ue)return Se;let E=(ie-1)*le;return Se.slice(E,E+le)},[Se,ue,ie,le]),ft=n==="card"||n==="auto"&&Re,xt=E=>String(E[o]??""),ht=E=>g.some(J=>String(J)===E),yt=E=>et.some(J=>String(J)===E),bt=E=>{if(!l)return;let J=xt(E),X=ht(J)?g.filter(ne=>String(ne)!==J):[...g,J];d?.(X)},it=E=>{if(E.sortable===!1)return;let J=String(E.key),X=Ee===J&&de==="asc"?"desc":"asc";K(J),Ne(X),V(1),B?.({key:J,direction:X})},An=E=>{Y(E),V(1)},yo=(E,J)=>{let X=t.find(ne=>String(ne.key)===E||ne.label.toLowerCase()===E.toLowerCase());X&&(K(String(X.key)),Ne(J),V(1),B?.({key:String(X.key),direction:J}))},kt=te==="te-IN"?"te":"en",Ot=(0,ae.useCallback)(E=>{E?(K(E.key),Ne(E.direction)):(K(void 0),Ne("asc")),V(1),B?.(E)},[B]),Vt=(0,ae.useCallback)(E=>{rt(E),V(1)},[]),bo=(0,ae.useCallback)(E=>{if(we(E),ue&&E.length){let J=Se.findIndex(X=>String(X[o]??"")===E[0]);J>=0&&V(Math.floor(J/le)+1)}},[ue,Se,o,le]),_t=(0,ae.useMemo)(()=>qt({data:e,columns:Je,rowKey:String(o),locale:kt,filters:fe,onHighlightRows:bo,onFiltersChange:Vt,onSortChange:Ot,onOpenRow:p?E=>{let J=Se.findIndex(ne=>String(ne[o]??"")===E),X=J>=0?Se[J]:e.find(ne=>String(ne[o]??"")===E);X&&p(X,Math.max(J,0))}:void 0,onSelectRow:l&&d?E=>{g.some(J=>String(J)===E)||d([...g.map(String),E])}:void 0},{name:S,descriptions:D}),[e,Je,o,kt,fe,bo,Vt,Ot,p,Se,l,d,g,S,D]),St=go({tools:_t,data:e,locale:kt,columns:Je,rowKey:String(o),customRules:R,onResult:Z}),Bo=(0,ae.useMemo)(()=>_t.map(E=>({...E,execute:J=>St.executeTool(E.name,J)})),[_t,St.executeTool]),Bt=()=>{rt([]),V(1)},st=(E,J,X)=>{if(J.render)return J.render(E[J.key],E,X);let ne=E[J.key];if(ne==null)return"";if(J.type==="date"){let ke=new Date(String(ne));if(!Number.isNaN(ke.getTime()))return ke.toLocaleDateString(r)}return J.type==="boolean"?ne?$.yes:$.no:String(ne)},Ae=i==="dark",We={width:"100%",overflow:"hidden",border:i==="high-contrast"?"2px solid #000000":Ae?"1px solid #334155":"1px solid #e2e8f0",borderRadius:12,background:Ae?"#0f172a":"#ffffff",color:Ae?"#f8fafc":"#0f172a",fontFamily:i==="dyslexia"?"Arial, sans-serif":void 0},sn={padding:12,display:"flex",alignItems:"center",gap:12,flexWrap:"wrap",borderBottom:Ae?"1px solid #334155":"1px solid #e2e8f0"},M=E=>({width:40,height:40,minWidth:40,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,borderRadius:8,border:Ae?"1px solid #475569":"1px solid #cbd5e1",background:E?Ae?"#1e293b":"#f8fafc":Ae?"#1e293b":"#ffffff",color:E?"#94a3b8":Ae?"#f8fafc":"#0f172a",cursor:E?"not-allowed":"pointer",opacity:E?.55:1});if(I)return(0,F.jsxs)("div",{className:w,style:We,children:[T&&(0,F.jsx)(co,{tools:Bo,onStatusChange:z}),(0,F.jsx)("div",{style:{padding:32,textAlign:"center"},children:$.loading})]});let oe=t.map(E=>({key:String(E.key),label:E.label,type:E.type==="number"?"number":E.type==="date"?"date":"text"}));return(0,F.jsxs)("div",{className:w,style:We,children:[T&&(0,F.jsx)(co,{tools:Bo,onStatusChange:z}),(a||ce||fe.length>0)&&(0,F.jsxs)("div",{style:sn,children:[a&&(0,F.jsxs)("div",{style:{position:"relative",width:"100%",maxWidth:420},children:[(0,F.jsx)("div",{style:{position:"absolute",left:12,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",color:Ae?"#cbd5e1":"#64748b",pointerEvents:"none"},children:(0,F.jsx)(wc,{size:19})}),(0,F.jsx)("input",{value:H,onChange:E=>{Y(E.target.value),V(1)},placeholder:$.search,"aria-label":$.searchAria,style:{width:"100%",padding:"10px 12px 10px 40px",borderRadius:8,border:Ae?"1px solid #475569":"1px solid #cbd5e1",background:Ae?"#1e293b":"#ffffff",color:Ae?"#ffffff":"#0f172a",outline:"none",boxSizing:"border-box"}})]}),fe.length>0&&(0,F.jsxs)("button",{type:"button",onClick:Bt,title:$.clearFilters,style:{padding:"6px 10px",borderRadius:999,border:Ae?"1px solid #475569":"1px solid #cbd5e1",background:Ae?"#1e293b":"#f1f5f9",color:"inherit",fontSize:12,cursor:"pointer"},children:[$.filtersActive(fe.length)," \u2715"]}),(0,F.jsxs)("div",{style:{marginLeft:"auto",fontSize:13,opacity:.7,whiteSpace:"nowrap"},children:[Se.length," ",Se.length===1?$.row:$.rows,k&&Te.engine&&(0,F.jsxs)("span",{title:Te.engine==="rust"?"Rust (WebAssembly)":"TypeScript",children:[" \xB7 ",Po(Te.ms)," \xB7 ",Te.engine==="rust"?"Rust":"TS"]})]}),ce&&(0,F.jsx)(Jo,{data:e,columns:oe,onSearch:An,onSort:yo,theme:Ae?"dark":"light",language:te,inputLanguage:b??te,agent:{ask:St.ask,loading:St.loading},embedded:!0})]}),Se.length===0?(0,F.jsx)("div",{style:{padding:40,textAlign:"center",opacity:.7},children:h??$.noData}):ft?(0,F.jsx)("div",{style:{display:"grid",gap:12,padding:12},children:Ct.map((E,J)=>{let X=xt(E),ne=ht(X),ke=yt(X);return(0,F.jsxs)("div",{"data-yuktai-row-id":X,onClick:()=>p?.(E,J),style:{padding:14,borderRadius:10,border:Ae?"1px solid #334155":"1px solid #e2e8f0",background:ke?f:ne?Ae?"#1e3a5f":"#eff6ff":Ae?"#1e293b":"#ffffff",cursor:p?"pointer":"default"},children:[l&&(0,F.jsx)("button",{type:"button",onClick:Fe=>{Fe.stopPropagation(),bt(E)},"aria-label":`${$.selectRow} ${X}`,"aria-pressed":ne,style:{width:32,height:32,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,marginBottom:10,borderRadius:7,border:ne?"1px solid #2563eb":"1px solid #cbd5e1",background:ne?"#2563eb":"transparent",color:ne?"#ffffff":"currentColor",cursor:"pointer"},children:ne&&(0,F.jsx)(Al,{size:17})}),t.map(Fe=>(0,F.jsxs)("div",{style:{display:"flex",gap:8,padding:"5px 0",alignItems:"flex-start"},children:[(0,F.jsx)("strong",{style:{minWidth:100,opacity:.7},children:Fe.label}),(0,F.jsx)("span",{children:st(E,Fe,J)})]},String(Fe.key)))]},X)})}):(0,F.jsx)("div",{style:{width:"100%",overflowX:"auto"},children:(0,F.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse"},children:[(0,F.jsx)("thead",{children:(0,F.jsxs)("tr",{children:[l&&(0,F.jsx)("th",{style:{padding:10,borderBottom:Ae?"1px solid #334155":"1px solid #e2e8f0",width:52}}),t.filter(E=>!(Re&&E.hiddenOnMobile)).map(E=>{let J=Ee===String(E.key);return(0,F.jsx)("th",{onClick:()=>it(E),style:{padding:10,textAlign:E.align??"left",borderBottom:Ae?"1px solid #334155":"1px solid #e2e8f0",whiteSpace:"nowrap",cursor:E.sortable===!1?"default":"pointer",width:E.width,userSelect:"none"},children:(0,F.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5},children:[E.label,J&&(de==="asc"?(0,F.jsx)(xc,{size:17,label:$.sortAscending}):(0,F.jsx)(kc,{size:17,label:$.sortDescending}))]})},String(E.key))})]})}),(0,F.jsx)("tbody",{children:Ct.map((E,J)=>{let X=xt(E),ne=ht(X),ke=yt(X);return(0,F.jsxs)("tr",{"data-yuktai-row-id":X,onClick:()=>p?.(E,J),style:{background:ke?f:ne?Ae?"#1e3a5f":"#eff6ff":"transparent",cursor:p?"pointer":"default"},children:[l&&(0,F.jsx)("td",{style:{padding:10,borderBottom:Ae?"1px solid #334155":"1px solid #e2e8f0"},children:(0,F.jsx)("button",{type:"button",onClick:Fe=>{Fe.stopPropagation(),bt(E)},"aria-label":`${$.selectRow} ${X}`,"aria-pressed":ne,style:{width:28,height:28,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,borderRadius:6,border:ne?"1px solid #2563eb":Ae?"1px solid #64748b":"1px solid #cbd5e1",background:ne?"#2563eb":"transparent",color:ne?"#ffffff":"currentColor",cursor:"pointer"},children:ne&&(0,F.jsx)(Al,{size:16})})}),t.filter(Fe=>!(Re&&Fe.hiddenOnMobile)).map(Fe=>(0,F.jsx)("td",{style:{padding:10,textAlign:Fe.align??"left",borderBottom:Ae?"1px solid #334155":"1px solid #e2e8f0"},children:st(E,Fe,J)},String(Fe.key)))]},X)})})]})}),ue&&(0,F.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",padding:12,borderTop:Ae?"1px solid #334155":"1px solid #e2e8f0"},children:[(0,F.jsxs)("span",{style:{fontSize:13,opacity:.7},children:[$.page," ",ie," ",$.of," ",Ze]}),(0,F.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[typeof u=="object"&&u.showSizeChanger&&(0,F.jsx)("select",{value:le,onChange:E=>{let J=Number(E.target.value);!Number.isFinite(J)||J<=0||(be(J),V(1))},"aria-label":$.pageSize,style:{minHeight:40,padding:"7px 10px",borderRadius:8,border:Ae?"1px solid #475569":"1px solid #cbd5e1",background:Ae?"#1e293b":"#ffffff",color:Ae?"#ffffff":"#0f172a"},children:_.map(E=>(0,F.jsx)("option",{value:E,children:E},E))}),(0,F.jsx)("button",{type:"button",disabled:ie<=1,onClick:()=>V(E=>Math.max(1,E-1)),"aria-label":$.previous,title:$.previous,style:M(ie<=1),children:(0,F.jsx)(Sc,{size:20})}),(0,F.jsx)("button",{type:"button",disabled:ie>=Ze,onClick:()=>V(E=>Math.min(Ze,E+1)),"aria-label":$.next,title:$.next,style:M(ie>=Ze),children:(0,F.jsx)(vc,{size:20})})]})]})]})}x();var re=require("react");function il(e){return e===!1?Number.MAX_SAFE_INTEGER:e===!0||e===void 0?10:e.pageSize??10}function Kn(e){return String(e??"").normalize("NFC").toLowerCase().trim()}function $o(e){return e==null||typeof e=="string"&&e.trim()===""}function qn(e){if(typeof e=="number")return Number.isFinite(e)?e:null;let t=String(e??"").trim();if(t==="")return null;let o=Number(t);return Number.isFinite(o)?o:null}function $n(e){let t=e instanceof Date?e.getTime():new Date(String(e)).getTime();return Number.isFinite(t)?t:null}function Dc(e,t,o,n){if(o==="number"||typeof e=="number"&&typeof t=="number"){let A=qn(e),i=qn(t);if(A!==null&&i!==null)return A-i}if(o==="date"||e instanceof Date&&t instanceof Date){let A=$n(e),i=$n(t);if(A!==null&&i!==null)return A-i}return typeof e=="boolean"&&typeof t=="boolean"?e===t?0:e?1:-1:String(e).localeCompare(String(t),n,{sensitivity:"base",numeric:!0})}var It=()=>typeof performance<"u"?performance.now():Date.now();function Mc(e,t){return e.map(o=>t.map(n=>{let A=o[n.key];return A==null?"":Kn(A)}).join(oo))}function Gc(e,t,o){let n=!1,A=!0,i=!0,r=0;for(let l of e){let g=l[t];$o(g)||(r++,typeof g=="number"?n=!0:A=!1,g instanceof Date||(i=!1))}if(r===0)return null;let s=null;if(o==="number"||A?s=qn:(o==="date"&&!n||i)&&(s=$n),!s)return null;let a=new Float64Array(e.length);for(let l=0;l<e.length;l++){let g=e[l][t];if($o(g)){a[l]=NaN;continue}let d=s(g);if(d===null)return null;a[l]=d}return a}function sl(e){let{data:t,columns:o,pagination:n=!0,mobileBreakpoint:A=768,locale:i,initialFilters:r=[],engine:s="ts"}=e,a=qo(s,t.length),[l,g]=(0,re.useState)(null),[d,u]=(0,re.useState)(""),[I,y]=(0,re.useState)(r),[f,c]=(0,re.useState)(1),[p,B]=(0,re.useState)(il(n)),[h,w]=(0,re.useState)(!1),b=il(n);(0,re.useEffect)(()=>{B(b),c(1)},[b]),(0,re.useEffect)(()=>{if(typeof window>"u")return;let K=()=>{w(window.innerWidth<=A)};return K(),window.addEventListener("resize",K),()=>window.removeEventListener("resize",K)},[A]);let S=(0,re.useMemo)(()=>ct(o.map(K=>({key:String(K.key),label:K.label,type:K.type}))),[o]),D=(0,re.useCallback)(K=>{g(de=>!de||de.key!==K?{key:K,direction:"asc"}:de.direction==="asc"?{key:K,direction:"desc"}:null),c(1)},[]),T=(0,re.useCallback)(K=>{g(K&&K.direction?K:null),c(1)},[]),z=(0,re.useCallback)(()=>{g(null),c(1)},[]),Z=(0,re.useCallback)(K=>{u(K),c(1)},[]),R=(0,re.useCallback)(K=>{y(K),c(1)},[]),G=(0,re.useCallback)(K=>{y(de=>[...de.filter(Ne=>Ne.key!==K.key),K]),c(1)},[]),k=(0,re.useCallback)(K=>{y(de=>de.filter(Ne=>Ne.key!==K)),c(1)},[]),ee=(0,re.useCallback)(()=>{y([]),c(1)},[]),te=(0,re.useCallback)(K=>{B(Math.max(1,Math.floor(K)||1)),c(1)},[]),$=(0,re.useMemo)(()=>a?a.setSearchTexts(Mc(t,o)):!1,[a,t,o]),ce=(0,re.useMemo)(()=>{let K=It(),de=Kn(d);if(!de)return{rows:t,ms:0,engine:null};if(a&&$){let Re=a.search(de);if(Re)return{rows:Ht(t,Re),ms:It()-K,engine:"rust"}}return{rows:t.filter(Re=>o.some(Ce=>{let fe=Re[Ce.key];return fe==null?!1:Kn(fe).includes(de)})),ms:It()-K,engine:"ts"}},[t,d,o,a,$]),ue=ce.rows,P=(0,re.useMemo)(()=>{let K=It();return{rows:ot(ue,S,I),ms:It()-K}},[ue,S,I]),_=P.rows,H=(0,re.useMemo)(()=>{if(!l||!l.direction)return{rows:_,ms:0,engine:null};let K=It(),de=o.find(Ce=>String(Ce.key)===l.key),Ne=l.direction==="desc"?-1:1;if(a){let Ce=Gc(_,l.key,de?.type),fe=Ce&&a.sortByKeys(Ce,Ne===-1);if(fe)return{rows:Ht(_,fe),ms:It()-K,engine:"rust"}}return{rows:[..._].sort((Ce,fe)=>{let rt=Ce[l.key],je=fe[l.key],we=$o(rt),Je=$o(je);return we&&Je?0:we?1:Je?-1:Ne*Dc(rt,je,de?.type,i)}),ms:It()-K,engine:"ts"}},[_,l,o,i,a]),Y=H.rows,ie=(0,re.useMemo)(()=>!ce.engine&&!H.engine?null:{query:d.trim(),ms:ce.ms+P.ms+H.ms,rows:_.length,engine:ce.engine==="rust"||H.engine==="rust"?"rust":"ts"},[ce,P,H,d,_.length]),V=Math.max(1,Math.ceil(Y.length/p)),le=(0,re.useMemo)(()=>{if(n===!1)return Y;let K=(f-1)*p;return Y.slice(K,K+p)},[Y,f,p,n]);(0,re.useEffect)(()=>{f>V&&c(V)},[f,V]);let be=(0,re.useCallback)(K=>c(Math.min(Math.max(1,Math.floor(K)||1),V)),[V]),Ee=(0,re.useCallback)(()=>{g(null),u(""),y([]),c(1)},[]);return{displayedData:le,rows:Y,searchTime:ie,totalCount:t.length,filteredCount:Y.length,sort:l,toggleSort:D,setSort:T,clearSort:z,searchQuery:d,setSearchQuery:Z,filters:I,setFilters:R,setFilter:G,removeFilter:k,clearFilters:ee,page:f,pageSize:p,totalPages:V,setPage:be,setPageSize:te,isMobile:h,reset:Ee}}x();x();x();x();var Ve={accessibility:'<circle cx="12" cy="4" r="2"/><path d="M4 8l8-1 8 1M12 7v5m-5 9 5-8 5 8M7 12l-2 5m12-5 2 5"/>',contrast:'<circle cx="12" cy="12" r="9"/><path d="M12 3a9 9 0 0 0 0 18z"/>',moon:'<path d="M20 14.5A8.5 8.5 0 0 1 9.5 4 8.5 8.5 0 1 0 20 14.5z"/>',motion:'<path d="M4 12h12m-5-5 5 5-5 5M20 5v14"/>',reading:'<path d="M4 5h16M4 10h12M4 15h16M4 20h10"/>',target:'<circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="4"/>',speaker:'<path d="M4 9v6h4l5 4V5L8 9H4z"/><path d="M16 9a4 4 0 0 1 0 6M18.5 6.5a8 8 0 0 1 0 11"/>',palette:'<circle cx="12" cy="12" r="9"/><circle cx="8" cy="10" r="1.3"/><circle cx="12" cy="7.5" r="1.3"/><circle cx="16" cy="10" r="1.3"/><path d="M12 21a3 3 0 0 1 0-6h2"/>',skip:'<path d="M5 5l7 7-7 7M13 5l7 7-7 7"/>',close:'<path d="m18 6-12 12M6 6l12 12"/>',plus:'<path d="M12 5v14M5 12h14"/>',minus:'<path d="M5 12h14"/>',reset:'<path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/>',search:'<circle cx="11" cy="11" r="6.5"/><path d="m16 16 5 5"/>',sort:'<path d="m8 9 4-4 4 4m-8 6 4 4 4-4"/>',sortUp:'<path d="m6 15 6-6 6 6"/>',sortDown:'<path d="m6 9 6 6 6-6"/>',chevrons:'<path d="m8 9 4-4 4 4m-8 6 4 4 4-4"/>',grid:'<rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/>',cards:'<rect x="3" y="4" width="18" height="7" rx="1.5"/><rect x="3" y="13" width="18" height="7" rx="1.5"/>',chat:'<path d="M21 11.5a8.5 8.5 0 0 1-8.5 8.5 9 9 0 0 1-4-.9L3 21l1.9-5.5a9 9 0 0 1-.9-4A8.5 8.5 0 0 1 12.5 3H13a8.5 8.5 0 0 1 8 8z"/>',mic:'<rect x="9" y="2" width="6" height="12" rx="3"/><path d="M5 10a7 7 0 0 0 14 0M12 17v5m-4 0h8"/>',stop:'<rect x="6" y="6" width="12" height="12" rx="2"/>',download:'<path d="M12 3v12m-5-5 5 5 5-5M4 21h16"/>',copy:'<rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V5a2 2 0 0 1 2-2h10"/>',filter:'<path d="M4 5h16l-6 7v6l-4 2v-8z"/>',check:'<path d="m5 12 4 4L19 6"/>',left:'<path d="m15 18-6-6 6-6"/>',right:'<path d="m9 18 6-6-6-6"/>',first:'<path d="m11 18-6-6 6-6M19 18l-6-6 6-6"/>',last:'<path d="m13 18 6-6-6-6M5 18l6-6-6-6"/>',spark:'<path d="m12 3 1.9 5.8L20 11l-6.1 2.2L12 19l-1.9-5.8L4 11l6.1-2.2zM19 14l1.2 2.8L23 18l-2.8 1.2L19 22l-1.2-2.8L15 18l2.8-1.2z"/>',alert:'<path d="m12 3 10 18H2L12 3z"/><path d="M12 9v5m0 3h.01"/>',info:'<circle cx="12" cy="12" r="9"/><path d="M12 11v6m0-9h.01"/>',form:'<rect x="5" y="3" width="14" height="18" rx="2"/><path d="M9 8h6M9 12h6M9 16h3"/>',eye:'<path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/>',layout:'<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18M9 21V9"/>',wand:'<path d="m15 4 5 5L9 20H4v-5z"/><path d="m13 6 5 5"/>',undo:'<path d="M9 14 4 9l5-5"/><path d="M4 9h10a6 6 0 0 1 0 12h-3"/>',tools:'<path d="M14.7 6.3a4 4 0 0 0-5.4 5.4L3 18l3 3 6.3-6.3a4 4 0 0 0 5.4-5.4l-2.5 2.5-2.4-.6-.6-2.4z"/>',plug:'<path d="M9 2v6M15 2v6M6 8h12v4a6 6 0 0 1-12 0zM12 18v4"/>',home:'<path d="M3 11 12 4l9 7"/><path d="M5 10v10h5v-6h4v6h5V10"/>',menu:'<path d="M4 6h16M4 12h16M4 18h16"/>',book:'<path d="M12 6c-2-1.5-5-2-8-2v14c3 0 6 .5 8 2 2-1.5 5-2 8-2V4c-3 0-6 .5-8 2zM12 6v14"/>',calendar:'<rect x="3" y="5" width="18" height="16" rx="2"/><path d="M3 10h18M8 3v4M16 3v4M7.5 14h2M14.5 14h2M7.5 17.5h2"/>',clock:'<circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/>',person:'<circle cx="12" cy="8" r="4"/><path d="M4 21a8 8 0 0 1 16 0"/>',users:'<circle cx="9" cy="8" r="3.5"/><path d="M2 20a7 7 0 0 1 14 0"/><path d="M16 4.5a3.5 3.5 0 0 1 0 7M18 13.5a7 7 0 0 1 4 6.5"/>',globe:'<circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"/>',lamp:'<path d="M12 3c2 2.6 3 4.3 3 6a3 3 0 0 1-6 0c0-1.7 1-3.4 3-6z"/><path d="M3 14h18c0 3.5-4 6-9 6s-9-2.5-9-6z"/><path d="M12 12v2"/>',play:'<circle cx="12" cy="12" r="9"/><path d="M10 8.5v7l6-3.5z"/>',pause:'<circle cx="12" cy="12" r="9"/><path d="M10 9v6M14 9v6"/>',send:'<path d="M21 3 3 10.5l7 3 3 7.5z"/><path d="m10 13.5 4.5-4.5"/>',share:'<circle cx="18" cy="5" r="2.5"/><circle cx="6" cy="12" r="2.5"/><circle cx="18" cy="19" r="2.5"/><path d="m8.2 10.8 7.6-4.6M8.2 13.2l7.6 4.6"/>',gift:'<rect x="3" y="8" width="18" height="4" rx="1"/><path d="M5 12v9h14v-9M12 8v13M12 8C10.5 5 7 4 7 6.5S10 8 12 8zm0 0c1.5-3 5-4 5-1.5S14 8 12 8z"/>',image:'<rect x="3" y="4" width="18" height="16" rx="2"/><circle cx="8.5" cy="9.5" r="1.5"/><path d="m21 15-5-5-10 10"/>',file:'<path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"/><path d="M14 3v5h5M9 13h6M9 17h6"/>',external:'<path d="M14 4h6v6M20 4l-9 9"/><path d="M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5"/>',arrowUp:'<path d="M12 19V5m-6 6 6-6 6 6"/>',arrowLeft:'<path d="M19 12H5m6-6-6 6 6 6"/>',arrowRight:'<path d="M5 12h14m-6-6 6 6-6 6"/>',headphones:'<path d="M4 15v-3a8 8 0 0 1 16 0v3"/><rect x="3" y="14" width="4" height="7" rx="1.5"/><rect x="17" y="14" width="4" height="7" rx="1.5"/>',music:'<path d="M9 18V5l11-2v13"/><circle cx="6" cy="18" r="3"/><circle cx="17" cy="16" r="3"/>',pin:'<path d="M12 21s7-6.2 7-11.5a7 7 0 0 0-14 0C5 14.8 12 21 12 21z"/><circle cx="12" cy="9.5" r="2.5"/>',map:'<path d="M3 6l6-3 6 3 6-3v15l-6 3-6-3-6 3z"/><path d="M9 3v15M15 6v15"/>',pen:'<path d="M12 3 6 9l1.5 8h9L18 9z"/><path d="M12 3v7.5"/><circle cx="12" cy="12" r="1.5"/><path d="M8 21h8"/>',wallet:'<rect x="3" y="7" width="18" height="13" rx="2"/><path d="M16 13.5h2M6 7l9-4 2 4"/>',install:'<rect x="6" y="2" width="12" height="20" rx="2"/><path d="M12 6v8m-3-3 3 3 3-3M10 18h4"/>',help:'<circle cx="12" cy="12" r="9"/><path d="M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.6.3-1 .9-1 1.6v.6M12 17h.01"/>',temple:'<path d="M12 2v2M10 4h4l1 3H9zM8 7h8l1.5 4h-11zM6.5 11h11L19 15H5zM4 15h16v6H4z"/><path d="M10 21v-3a2 2 0 0 1 4 0v3"/>',meditate:'<circle cx="12" cy="4.5" r="2.2"/><path d="M12 8c-2.2 0-3.3 1.3-3.7 3.2L7.5 16M12 8c2.2 0 3.3 1.3 3.7 3.2l.8 4.8"/><path d="M4 18c3 2 5.5 2.4 8 1.2 2.5 1.2 5 .8 8-1.2"/><path d="M7.5 16c1.4 1.4 3 2 4.5 2s3.1-.6 4.5-2"/>',trophy:'<path d="M8 4h8v5a4 4 0 0 1-8 0z"/><path d="M8 6H5a3 3 0 0 0 3 4M16 6h3a3 3 0 0 1-3 4M12 13v4M8 21h8M9 17h6"/>',bulb:'<path d="M9 18h6M10 21h4"/><path d="M12 3a6 6 0 0 0-4 10.5c.7.7 1 1.5 1 2.5h6c0-1 .3-1.8 1-2.5A6 6 0 0 0 12 3z"/>',sun:'<circle cx="12" cy="12" r="4"/><path d="M12 2v2.5M12 19.5V22M4.9 4.9l1.8 1.8M17.3 17.3l1.8 1.8M2 12h2.5M19.5 12H22M4.9 19.1l1.8-1.8M17.3 6.7l1.8-1.8"/>',delete:'<path d="M4 7h16M10 11v6M14 11v6M6 7l1 13a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1l1-13M9 7V4h6v3"/>',robot:'<rect x="4" y="8" width="16" height="12" rx="3"/><path d="M12 8V4M9.5 4h5M2 13v3M22 13v3"/><circle cx="9" cy="14" r="1.3"/><circle cx="15" cy="14" r="1.3"/>',heart:'<path d="M12 20s-7.5-4.6-9.2-9.3A4.9 4.9 0 0 1 12 6.6a4.9 4.9 0 0 1 9.2 4.1C19.5 15.4 12 20 12 20z"/>',heartFilled:'<path fill="currentColor" d="M12 20s-7.5-4.6-9.2-9.3A4.9 4.9 0 0 1 12 6.6a4.9 4.9 0 0 1 9.2 4.1C19.5 15.4 12 20 12 20z"/>',hub:'<circle cx="12" cy="12" r="3"/><circle cx="5" cy="5" r="2"/><circle cx="19" cy="5" r="2"/><circle cx="5" cy="19" r="2"/><circle cx="19" cy="19" r="2"/><path d="m6.5 6.5 3.4 3.4M17.5 6.5l-3.4 3.4M6.5 17.5l3.4-3.4M17.5 17.5l-3.4-3.4"/>',code:'<path d="m8 7-5 5 5 5M16 7l5 5-5 5M14 4l-4 16"/>',text:'<path d="M3 7V5h11v2M8.5 5v14M6.5 19h4M14 12v-1.5h7V12M17.5 10.5V19M16 19h3"/>',bold:'<path d="M7 4h6a4 4 0 0 1 0 8H7zM7 12h7a4 4 0 0 1 0 8H7z"/>',italic:'<path d="M10 4h9M5 20h9M15 4 9 20"/>',underline:'<path d="M7 4v7a5 5 0 0 0 10 0V4M5 21h14"/>',alignLeft:'<path d="M4 5h16M4 9.5h9M4 14h16M4 18.5h9"/>',alignCenter:'<path d="M4 5h16M7.5 9.5h9M4 14h16M7.5 18.5h9"/>',alignRight:'<path d="M4 5h16M11 9.5h9M4 14h16M11 18.5h9"/>',alignJustify:'<path d="M4 5h16M4 9.5h16M4 14h16M4 18.5h16"/>',quote:'<path d="M4 18v-6.5A6.5 6.5 0 0 1 10.5 5M4 12h5.5v6H4zM13.5 18v-6.5A6.5 6.5 0 0 1 20 5M13.5 12H19v6h-5.5z"/>',title:'<path d="M5 6V4h14v2M12 4v16M9 20h6"/>',font:'<rect x="3" y="3" width="18" height="18" rx="3"/><path d="m8 17 4-10 4 10M9.4 13.5h5.2"/>',spellcheck:'<path d="m3 14 4-10 4 10M4.6 10.5h4.8M11 17l3 3 7-7"/>',abc:'<path d="m2 16 2.5-8L7 16M3 13.5h3M9.5 8v8h2.5a2 2 0 0 0 0-4H9.5h2a2 2 0 0 0 0-4H9.5M21 9.4a3.1 3.1 0 1 0 0 5.2"/>',pageBreak:'<path d="M6 3v5h12V3M6 21v-5h12v5M3 12h3M9 12h6M18 12h3"/>',link:'<path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1"/><path d="M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1"/>',style:'<rect x="3" y="3" width="7" height="18" rx="2"/><path d="m10 7.5 4.4-2.6a2 2 0 0 1 2.7.7l3.2 5.6a2 2 0 0 1-.7 2.7L10 19"/><circle cx="6.5" cy="17" r="1"/>',lock:'<rect x="5" y="11" width="14" height="10" rx="2"/><path d="M8 11V8a4 4 0 0 1 8 0v3M12 15v2"/>',unlock:'<rect x="5" y="11" width="14" height="10" rx="2"/><path d="M8 11V8a4 4 0 0 1 7.6-1.8M12 15v2"/>',key:'<circle cx="8" cy="15" r="4"/><path d="m11 12 9-9M17 6l3 3M14.5 8.5l2 2"/>',redo:'<path d="m15 14 5-5-5-5"/><path d="M20 9H10a6 6 0 0 0 0 12h3"/>',swap:'<path d="M7 4 3 8l4 4M3 8h14M17 12l4 4-4 4M21 16H7"/>',shuffle:'<path d="M16 3h5v5M4 20 21 3M21 16v5h-5M15 15l6 6M4 4l5 5"/>',fullscreen:'<path d="M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5"/>',fullscreenExit:'<path d="M9 4v5H4M20 9h-5V4M15 20v-5h5M4 15h5v5"/>',merge:'<circle cx="6" cy="5" r="2"/><circle cx="6" cy="19" r="2"/><circle cx="18" cy="12" r="2"/><path d="M6 7v10M6 7c0 4 4 5 10 5"/>',join:'<circle cx="9" cy="12" r="6"/><circle cx="15" cy="12" r="6"/>',touch:'<path d="M9 11V5a1.5 1.5 0 0 1 3 0v6M12 10a1.5 1.5 0 0 1 3 0v1M15 11a1.5 1.5 0 0 1 3 0v3c0 4-2.5 7-6 7-2.5 0-4-1-5.5-3.5L4.6 14a1.5 1.5 0 0 1 2.5-1.6L9 15"/>',volumeOff:'<path d="M4 9v6h4l5 4V5L8 9H4z"/><path d="m16.5 9.5 5 5M21.5 9.5l-5 5"/>',musicOff:'<path d="M9 13v5M9 7V5l11-2v9"/><circle cx="6" cy="18" r="3"/><path d="M3 3l18 18"/>',musicVideo:'<rect x="3" y="4" width="18" height="16" rx="2"/><path d="M10.5 15V8.5l5-1V13"/><circle cx="9" cy="15" r="1.5"/><circle cx="14" cy="13" r="1.5"/>',movie:'<rect x="3" y="9" width="18" height="11" rx="2"/><path d="m3.5 9-.6-3 16.6-3.4.6 3L3.5 9zM8.5 4.8l1.8 2.9M13.8 3.7l1.8 2.9"/>',slideshow:'<rect x="3" y="4" width="18" height="13" rx="2"/><path d="M10 8v5l4-2.5zM8 21h8M12 17v4"/>',storage:'<ellipse cx="12" cy="5" rx="8" ry="3"/><path d="M4 5v14c0 1.7 3.6 3 8 3s8-1.3 8-3V5M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3"/>',api:'<path d="M3 17v-6a2.5 2.5 0 0 1 5 0v6M3 14h5M11 17V7h2.5a2.5 2.5 0 0 1 0 5H11M18 7h3M19.5 7v10M18 17h3"/>',dataObject:'<path d="M8 4H7a2 2 0 0 0-2 2v4l-2 2 2 2v4a2 2 0 0 0 2 2h1M16 4h1a2 2 0 0 1 2 2v4l2 2-2 2v4a2 2 0 0 1-2 2h-1"/>',computer:'<rect x="3" y="4" width="18" height="12" rx="2"/><path d="M8 20h8M12 16v4"/>',phone:'<rect x="6" y="2" width="12" height="20" rx="2"/><path d="M10.5 18.5h3"/>',cloud:'<path d="M7 19a5 5 0 0 1-.6-10A6.5 6.5 0 0 1 18.6 9.5 4.8 4.8 0 0 1 17.5 19z"/>',wifi:'<path d="M2 9a15 15 0 0 1 20 0M5 12.5a10 10 0 0 1 14 0M8.5 16a5 5 0 0 1 7 0M12 19.5h.01"/>',wifiOff:'<path d="M2 9a15 15 0 0 1 20 0M5 12.5a10 10 0 0 1 14 0M8.5 16a5 5 0 0 1 7 0M12 19.5h.01M3 3l18 18"/>',searchOff:'<circle cx="11" cy="11" r="6.5"/><path d="m16 16 5 5M8.7 8.7l4.6 4.6M13.3 8.7l-4.6 4.6"/>',eyeOff:'<path d="M10.6 5.1A10 10 0 0 1 12 5c6.5 0 10 7 10 7a17 17 0 0 1-2.2 3.2M6.6 6.6C3.8 8.4 2 12 2 12s3.5 7 10 7a9.7 9.7 0 0 0 5.4-1.6M9.9 9.9a3 3 0 0 0 4.2 4.2M3 3l18 18"/>',bookmark:'<path d="M6 3h12v18l-6-4-6 4z"/>',school:'<path d="m2 9 10-5 10 5-10 5z"/><path d="M6 11v5c0 1.5 2.7 3 6 3s6-1.5 6-3v-5M22 9v6"/>',gavel:'<path d="m13 3.5 7.5 7.5M10 6.5l7.5 7.5M11.5 5l7 7-3 3-7-7zM10 11.5 3.5 18a1.4 1.4 0 0 0 2 2L12 13.5M13 21h8"/>',architecture:'<circle cx="12" cy="5" r="2"/><path d="M12 3V2M11 7 5.5 21M13 7l5.5 14M8 15h8"/>',brain:'<path d="M11 5.5A3 3 0 0 0 5.6 7 3 3 0 0 0 4 12a3 3 0 0 0 1.6 5A3 3 0 0 0 11 18.5zM13 5.5A3 3 0 0 1 18.4 7 3 3 0 0 1 20 12a3 3 0 0 1-1.6 5 3 3 0 0 1-5.4 1.5z"/><path d="M8 10h3M13 14h3"/>',volunteer:'<path d="M12 11s-3.5-2.2-3.5-4.6a1.8 1.8 0 0 1 3.5-.7 1.8 1.8 0 0 1 3.5.7C15.5 8.8 12 11 12 11z"/><path d="M2 15h3l3.5 1.5H13a1.5 1.5 0 0 1 0 3H9.5M5 21l1.5-1.5H14l5.5-4a1.6 1.6 0 0 0-2-2.4L14 15.6"/>',radio:'<circle cx="12" cy="12" r="9"/>',radioChecked:'<circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="4" fill="currentColor"/>',upload:'<path d="M12 15V3m-5 5 5-5 5 5M4 21h16"/>',arrowDown:'<path d="M12 5v14m-6-6 6 6 6-6"/>',factCheck:'<rect x="3" y="4" width="18" height="16" rx="2"/><path d="M7 9h4M7 13h4M7 17h2M13.5 13l2 2 3.5-3.5"/>',imageSearch:'<path d="M13 4H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"/><path d="m3 17 5-5 4 4"/><circle cx="17" cy="7" r="3"/><path d="m19.2 9.2 2.3 2.3"/>',documentScanner:'<path d="M3 7V4a1 1 0 0 1 1-1h3M17 3h3a1 1 0 0 1 1 1v3M21 17v3a1 1 0 0 1-1 1h-3M7 21H4a1 1 0 0 1-1-1v-3"/><path d="M7 8h10M7 12h10M7 16h6"/>',dashboard:'<rect x="3" y="3" width="8" height="10" rx="1.5"/><rect x="13" y="3" width="8" height="6" rx="1.5"/><rect x="3" y="15" width="8" height="6" rx="1.5"/><path d="M17 13v8M13 17h8"/>',cleaning:'<path d="m20 3-7.5 7.5"/><path d="M12.5 10.5c-2.5-1.6-6-1-7.4 1.7L3 20.5c3.2 1 7.2.4 10.2-1.6l.7-5.3c-.1-1.3-.6-2.3-1.4-3.1z"/><path d="M7.5 15.5 6 20.5M10.5 15l-1 5"/>',dragHandle:'<path d="M5 9h14M5 15h14"/>',zoomIn:'<circle cx="11" cy="11" r="6.5"/><path d="m16 16 5 5M8 11h6M11 8v6"/>',zoomOut:'<circle cx="11" cy="11" r="6.5"/><path d="m16 16 5 5M8 11h6"/>',insights:'<path d="m3 18 5-5 4 3 6-7"/><path d="M15 9h3v3"/><path d="m19 2.5.7 1.8 1.8.7-1.8.7-.7 1.8-.7-1.8-1.8-.7 1.8-.7z"/>',explore:'<circle cx="12" cy="12" r="9"/><path d="m15.5 8.5-2 5-5 2 2-5z"/>',save:'<path d="M5 3h11l5 5v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"/><path d="M7 3v5h8V3M7 21v-7h10v7"/>',label:'<path d="M4 6h11l5 6-5 6H4z"/>',keyboard:'<rect x="2" y="6" width="20" height="12" rx="2"/><path d="M6 10h.01M10 10h.01M14 10h.01M18 10h.01M6 14h.01M18 14h.01M9 14h6"/>',trendingUp:'<path d="m3 17 6-6 4 4 8-8"/><path d="M15 7h6v6"/>',trendingDown:'<path d="m3 7 6 6 4-4 8 8"/><path d="M15 17h6v-6"/>',cake:'<path d="M4 21h16M5 21v-7a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v7M5 16.5c1.5 1 2.5 1 3.5 0s2.5-1 3.5 0 2.5 1 3.5 0 2.5-1 3.5 0M12 12V8.5M12 6c-.9-.9-.9-2 0-3.3.9 1.3.9 2.4 0 3.3z"/>',barChart:'<path d="M4 20h16M7 20v-6M12 20V5M17 20V10"/>',admin:'<path d="M12 3 4 6v6c0 4.5 3.4 8 8 9 4.6-1 8-4.5 8-9V6z"/><circle cx="12" cy="10" r="2.5"/><path d="M8 16.5c1-1.8 2.4-2.5 4-2.5s3 .7 4 2.5"/>',bugReport:'<rect x="7" y="8" width="10" height="12" rx="5"/><path d="M9 8.5a3 3 0 0 1 6 0M12 12v8M7 13H3M21 13h-4M7 17l-3 1.5M17 17l3 1.5M7.5 10 5 8M16.5 10 19 8"/>',sentimentSad:'<circle cx="12" cy="12" r="9"/><path d="M8 16.5c1-1.4 2.4-2 4-2s3 .6 4 2M9 9.5h.01M15 9.5h.01"/>',integration:'<rect x="5" y="4" width="14" height="17" rx="2"/><path d="M9 4V3h6v1M10 11l-2 2 2 2M14 11l2 2-2 2"/>',namaskar:'<path d="M12 5.5V15M12 5.5c-.6-1.7-2.4-2.2-3.1-.9L7.2 11.5 4.5 14.5l3 5H10l2-3.5M12 5.5c.6-1.7 2.4-2.2 3.1-.9l1.7 6.9 2.7 3-3 5H14l-2-3.5"/>',sunrise:'<path d="M3 19h18M7 19a5 5 0 0 1 10 0M12 3v6M9.5 5.5 12 3l2.5 2.5M4.9 11.9l1.4 1.4M19.1 11.9l-1.4 1.4M2 16h2M20 16h2"/>',sunset:'<path d="M3 19h18M7 19a5 5 0 0 1 10 0M12 3v6M9.5 6.5 12 9l2.5-2.5M4.9 11.9l1.4 1.4M19.1 11.9l-1.4 1.4M2 16h2M20 16h2"/>',login:'<path d="M14 4h4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4M10 16l4-4-4-4M14 12H3"/>',logout:'<path d="M10 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h4M16 16l4-4-4-4M20 12H9"/>',speed:'<path d="M4.5 18a9 9 0 1 1 15 0"/><path d="m12 14 4-5"/><circle cx="12" cy="14" r="1.2"/>',repeat:'<path d="m17 2 3 3-3 3M4 11V9a4 4 0 0 1 4-4h12M7 22l-3-3 3-3M20 13v2a4 4 0 0 1-4 4H4"/>',loader:'<path d="M12 3v3M12 18v3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M3 12h3M18 12h3M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1"/>',star:'<path d="m12 3 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2L12 17.3l-5.6 2.9 1.1-6.2L3 9.6l6.2-.9z"/>',shieldCheck:'<path d="M12 3 4 6v6c0 4.5 3.4 8 8 9 4.6-1 8-4.5 8-9V6z"/><path d="m8.5 12 2.5 2.5 4.5-4.5"/>'},zn=Object.keys(Ve);var zo=3,Wn="#ffffff",al="#111827";function zt(e,t){let o=at(e),n=at(t);return o&&n?Pt(o,n):null}function Wo(e){let t=zt(Wn,e),o=zt(al,e);return t===null||o===null||t>=o?Wn:al}var ll=new Set;function Nc(e,t){ll.has(e)||(ll.add(e),typeof console<"u"&&console.warn(`[yuktai icons] ${t}`))}function Oo(e={}){let t=e.variant==="filled"?"filled":"outline",o=e.color||"currentColor";if(t==="outline")return{variant:t,color:o,glyph:o,contrast:null};let n=e.glyphColor||Wo(o),A=zt(n,o);return A!==null&&A<zo&&Nc(`${n}|${o}`,`glyph ${n} on ${o} is ${A}:1. WCAG 1.4.11 needs at least 3:1 for icons.`),{variant:t,color:o,glyph:n,contrast:A}}var On="translate(3.6 3.6) scale(0.7)",Vn="@media (forced-colors: active){.yi-bg{fill:CanvasText}.yi-glyph{stroke:Canvas;color:Canvas}}",pt=e=>String(e).replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t]);function _n(e,t={}){let o=Ve[e]??Ve.spark,n=t.size??20,{variant:A,color:i,glyph:r}=Oo(t),s=t.strokeWidth??(A==="filled"?2.4:1.9),l=`<svg xmlns="http://www.w3.org/2000/svg" ${t.label?`role="img" aria-label="${pt(t.label)}"`:'aria-hidden="true"'} focusable="false" width="${pt(n)}" height="${pt(n)}" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round" data-variant="${A}">`;if(A==="outline")return`${l}<g stroke="${pt(i)}" stroke-width="${s}">${o}</g></svg>`;let g=t.shape==="circle"?`<circle class="yi-bg" cx="12" cy="12" r="12" fill="${pt(i)}"/>`:`<rect class="yi-bg" width="24" height="24" rx="6" fill="${pt(i)}"/>`;return`${l}<style>${Vn}</style>${g}<g class="yi-glyph" color="${pt(r)}" stroke="${pt(r)}" stroke-width="${s}" transform="${On}">${o}</g></svg>`}var _e=require("react/jsx-runtime");function he({size:e=20,color:t,strokeWidth:o,label:n,variant:A,glyphColor:i,shape:r,children:s,...a}){let l=!n,g=Oo({variant:A,color:t,glyphColor:i,shape:r}),d=g.variant==="filled",u=o??(d?2.6:2.5);return(0,_e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:d?void 0:g.color,strokeWidth:d?void 0:u,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":l?"true":void 0,"aria-label":n,role:n?"img":void 0,focusable:"false","data-variant":g.variant,...a,children:d?(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)("style",{children:Vn}),r==="circle"?(0,_e.jsx)("circle",{className:"yi-bg",cx:"12",cy:"12",r:"12",fill:g.color}):(0,_e.jsx)("rect",{className:"yi-bg",width:"24",height:"24",rx:"6",fill:g.color}),(0,_e.jsx)("g",{className:"yi-glyph",color:g.glyph,stroke:g.glyph,strokeWidth:u,transform:On,children:s})]}):s})}x();var uo=require("react/jsx-runtime");function Xn(e){return(0,uo.jsxs)(he,{...e,children:[(0,uo.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,uo.jsx)("path",{d:"m20 20-4-4"})]})}x();var Io=require("react/jsx-runtime");function jn(e){return(0,Io.jsxs)(he,{...e,children:[(0,Io.jsx)("path",{d:"M12 19V5"}),(0,Io.jsx)("path",{d:"m5 12 7-7 7 7"})]})}x();var po=require("react/jsx-runtime");function Zn(e){return(0,po.jsxs)(he,{...e,children:[(0,po.jsx)("path",{d:"M12 5v14"}),(0,po.jsx)("path",{d:"m5 12 7 7 7-7"})]})}x();var eA=require("react/jsx-runtime");function tA(e){return(0,eA.jsx)(he,{...e,children:(0,eA.jsx)("path",{d:"m15 18-6-6 6-6"})})}x();var oA=require("react/jsx-runtime");function nA(e){return(0,oA.jsx)(he,{...e,children:(0,oA.jsx)("path",{d:"m9 18 6-6-6-6"})})}x();var AA=require("react/jsx-runtime");function rA(e){return(0,AA.jsx)(he,{...e,children:(0,AA.jsx)("path",{d:"M5 12.5 10 17.5 19.5 7"})})}x();var mo=require("react/jsx-runtime");function iA(e){return(0,mo.jsxs)(he,{...e,children:[(0,mo.jsx)("path",{d:"M18 6 6 18"}),(0,mo.jsx)("path",{d:"m6 6 12 12"})]})}x();var m=require("react/jsx-runtime");function C({name:e,...t}){let o=Ve[e]??Ve.spark;return(0,m.jsx)(he,{...t,children:(0,m.jsx)("g",{dangerouslySetInnerHTML:{__html:o}})})}var sA=e=>(0,m.jsx)(C,{...e,name:"accessibility"}),aA=e=>(0,m.jsx)(C,{...e,name:"contrast"}),lA=e=>(0,m.jsx)(C,{...e,name:"moon"}),gA=e=>(0,m.jsx)(C,{...e,name:"motion"}),cA=e=>(0,m.jsx)(C,{...e,name:"reading"}),dA=e=>(0,m.jsx)(C,{...e,name:"target"}),uA=e=>(0,m.jsx)(C,{...e,name:"speaker"}),IA=e=>(0,m.jsx)(C,{...e,name:"palette"}),pA=e=>(0,m.jsx)(C,{...e,name:"skip"}),mA=e=>(0,m.jsx)(C,{...e,name:"plus"}),CA=e=>(0,m.jsx)(C,{...e,name:"minus"}),fA=e=>(0,m.jsx)(C,{...e,name:"reset"}),hA=e=>(0,m.jsx)(C,{...e,name:"sort"}),yA=e=>(0,m.jsx)(C,{...e,name:"chevrons"}),bA=e=>(0,m.jsx)(C,{...e,name:"grid"}),BA=e=>(0,m.jsx)(C,{...e,name:"cards"}),QA=e=>(0,m.jsx)(C,{...e,name:"chat"}),EA=e=>(0,m.jsx)(C,{...e,name:"mic"}),wA=e=>(0,m.jsx)(C,{...e,name:"stop"}),xA=e=>(0,m.jsx)(C,{...e,name:"download"}),kA=e=>(0,m.jsx)(C,{...e,name:"copy"}),SA=e=>(0,m.jsx)(C,{...e,name:"filter"}),vA=e=>(0,m.jsx)(C,{...e,name:"first"}),DA=e=>(0,m.jsx)(C,{...e,name:"last"}),MA=e=>(0,m.jsx)(C,{...e,name:"spark"}),GA=e=>(0,m.jsx)(C,{...e,name:"alert"}),NA=e=>(0,m.jsx)(C,{...e,name:"info"}),RA=e=>(0,m.jsx)(C,{...e,name:"form"}),TA=e=>(0,m.jsx)(C,{...e,name:"eye"}),FA=e=>(0,m.jsx)(C,{...e,name:"layout"}),LA=e=>(0,m.jsx)(C,{...e,name:"wand"}),PA=e=>(0,m.jsx)(C,{...e,name:"undo"}),YA=e=>(0,m.jsx)(C,{...e,name:"tools"}),UA=e=>(0,m.jsx)(C,{...e,name:"plug"}),HA=e=>(0,m.jsx)(C,{...e,name:"home"}),JA=e=>(0,m.jsx)(C,{...e,name:"menu"}),KA=e=>(0,m.jsx)(C,{...e,name:"book"}),qA=e=>(0,m.jsx)(C,{...e,name:"calendar"}),$A=e=>(0,m.jsx)(C,{...e,name:"clock"}),zA=e=>(0,m.jsx)(C,{...e,name:"person"}),WA=e=>(0,m.jsx)(C,{...e,name:"users"}),OA=e=>(0,m.jsx)(C,{...e,name:"globe"}),VA=e=>(0,m.jsx)(C,{...e,name:"lamp"}),_A=e=>(0,m.jsx)(C,{...e,name:"play"}),XA=e=>(0,m.jsx)(C,{...e,name:"pause"}),jA=e=>(0,m.jsx)(C,{...e,name:"send"}),ZA=e=>(0,m.jsx)(C,{...e,name:"share"}),er=e=>(0,m.jsx)(C,{...e,name:"gift"}),tr=e=>(0,m.jsx)(C,{...e,name:"image"}),or=e=>(0,m.jsx)(C,{...e,name:"file"}),nr=e=>(0,m.jsx)(C,{...e,name:"external"}),Ar=e=>(0,m.jsx)(C,{...e,name:"arrowUp"}),rr=e=>(0,m.jsx)(C,{...e,name:"arrowLeft"}),ir=e=>(0,m.jsx)(C,{...e,name:"arrowRight"}),sr=e=>(0,m.jsx)(C,{...e,name:"headphones"}),ar=e=>(0,m.jsx)(C,{...e,name:"music"}),lr=e=>(0,m.jsx)(C,{...e,name:"pin"}),gr=e=>(0,m.jsx)(C,{...e,name:"map"}),cr=e=>(0,m.jsx)(C,{...e,name:"pen"}),dr=e=>(0,m.jsx)(C,{...e,name:"wallet"}),ur=e=>(0,m.jsx)(C,{...e,name:"install"}),Ir=e=>(0,m.jsx)(C,{...e,name:"help"}),pr=e=>(0,m.jsx)(C,{...e,name:"temple"}),mr=e=>(0,m.jsx)(C,{...e,name:"meditate"}),Cr=e=>(0,m.jsx)(C,{...e,name:"trophy"}),fr=e=>(0,m.jsx)(C,{...e,name:"bulb"}),hr=e=>(0,m.jsx)(C,{...e,name:"sun"}),yr=e=>(0,m.jsx)(C,{...e,name:"delete"}),br=e=>(0,m.jsx)(C,{...e,name:"robot"}),Br=e=>(0,m.jsx)(C,{...e,name:"heart"}),Qr=e=>(0,m.jsx)(C,{...e,name:"heartFilled"}),Er=e=>(0,m.jsx)(C,{...e,name:"hub"}),wr=e=>(0,m.jsx)(C,{...e,name:"code"}),xr=e=>(0,m.jsx)(C,{...e,name:"text"}),kr=e=>(0,m.jsx)(C,{...e,name:"bold"}),Sr=e=>(0,m.jsx)(C,{...e,name:"italic"}),vr=e=>(0,m.jsx)(C,{...e,name:"underline"}),Dr=e=>(0,m.jsx)(C,{...e,name:"alignLeft"}),Mr=e=>(0,m.jsx)(C,{...e,name:"alignCenter"}),Gr=e=>(0,m.jsx)(C,{...e,name:"alignRight"}),Nr=e=>(0,m.jsx)(C,{...e,name:"alignJustify"}),Rr=e=>(0,m.jsx)(C,{...e,name:"quote"}),Tr=e=>(0,m.jsx)(C,{...e,name:"title"}),Fr=e=>(0,m.jsx)(C,{...e,name:"font"}),Lr=e=>(0,m.jsx)(C,{...e,name:"spellcheck"}),Pr=e=>(0,m.jsx)(C,{...e,name:"abc"}),Yr=e=>(0,m.jsx)(C,{...e,name:"pageBreak"}),Ur=e=>(0,m.jsx)(C,{...e,name:"link"}),Hr=e=>(0,m.jsx)(C,{...e,name:"style"}),Jr=e=>(0,m.jsx)(C,{...e,name:"lock"}),Kr=e=>(0,m.jsx)(C,{...e,name:"unlock"}),qr=e=>(0,m.jsx)(C,{...e,name:"key"}),$r=e=>(0,m.jsx)(C,{...e,name:"redo"}),zr=e=>(0,m.jsx)(C,{...e,name:"swap"}),Wr=e=>(0,m.jsx)(C,{...e,name:"shuffle"}),Or=e=>(0,m.jsx)(C,{...e,name:"fullscreen"}),Vr=e=>(0,m.jsx)(C,{...e,name:"fullscreenExit"}),_r=e=>(0,m.jsx)(C,{...e,name:"merge"}),Xr=e=>(0,m.jsx)(C,{...e,name:"join"}),jr=e=>(0,m.jsx)(C,{...e,name:"touch"}),Zr=e=>(0,m.jsx)(C,{...e,name:"volumeOff"}),ei=e=>(0,m.jsx)(C,{...e,name:"musicOff"}),ti=e=>(0,m.jsx)(C,{...e,name:"musicVideo"}),oi=e=>(0,m.jsx)(C,{...e,name:"movie"}),ni=e=>(0,m.jsx)(C,{...e,name:"slideshow"}),Ai=e=>(0,m.jsx)(C,{...e,name:"storage"}),ri=e=>(0,m.jsx)(C,{...e,name:"api"}),ii=e=>(0,m.jsx)(C,{...e,name:"dataObject"}),si=e=>(0,m.jsx)(C,{...e,name:"computer"}),ai=e=>(0,m.jsx)(C,{...e,name:"phone"}),li=e=>(0,m.jsx)(C,{...e,name:"cloud"}),gi=e=>(0,m.jsx)(C,{...e,name:"wifi"}),ci=e=>(0,m.jsx)(C,{...e,name:"wifiOff"}),di=e=>(0,m.jsx)(C,{...e,name:"searchOff"}),ui=e=>(0,m.jsx)(C,{...e,name:"eyeOff"}),Ii=e=>(0,m.jsx)(C,{...e,name:"bookmark"}),pi=e=>(0,m.jsx)(C,{...e,name:"school"}),mi=e=>(0,m.jsx)(C,{...e,name:"gavel"}),Ci=e=>(0,m.jsx)(C,{...e,name:"architecture"}),fi=e=>(0,m.jsx)(C,{...e,name:"brain"}),hi=e=>(0,m.jsx)(C,{...e,name:"volunteer"}),yi=e=>(0,m.jsx)(C,{...e,name:"radio"}),bi=e=>(0,m.jsx)(C,{...e,name:"radioChecked"}),Bi=e=>(0,m.jsx)(C,{...e,name:"upload"}),Qi=e=>(0,m.jsx)(C,{...e,name:"arrowDown"}),Ei=e=>(0,m.jsx)(C,{...e,name:"factCheck"}),wi=e=>(0,m.jsx)(C,{...e,name:"imageSearch"}),xi=e=>(0,m.jsx)(C,{...e,name:"documentScanner"}),ki=e=>(0,m.jsx)(C,{...e,name:"dashboard"}),Si=e=>(0,m.jsx)(C,{...e,name:"cleaning"}),vi=e=>(0,m.jsx)(C,{...e,name:"dragHandle"}),Di=e=>(0,m.jsx)(C,{...e,name:"zoomIn"}),Mi=e=>(0,m.jsx)(C,{...e,name:"zoomOut"}),Gi=e=>(0,m.jsx)(C,{...e,name:"insights"}),Ni=e=>(0,m.jsx)(C,{...e,name:"explore"}),Ri=e=>(0,m.jsx)(C,{...e,name:"save"}),Ti=e=>(0,m.jsx)(C,{...e,name:"label"}),Fi=e=>(0,m.jsx)(C,{...e,name:"keyboard"}),Li=e=>(0,m.jsx)(C,{...e,name:"trendingUp"}),Pi=e=>(0,m.jsx)(C,{...e,name:"trendingDown"}),Yi=e=>(0,m.jsx)(C,{...e,name:"cake"}),Ui=e=>(0,m.jsx)(C,{...e,name:"barChart"}),Hi=e=>(0,m.jsx)(C,{...e,name:"admin"}),Ji=e=>(0,m.jsx)(C,{...e,name:"bugReport"}),Ki=e=>(0,m.jsx)(C,{...e,name:"sentimentSad"}),qi=e=>(0,m.jsx)(C,{...e,name:"integration"}),$i=e=>(0,m.jsx)(C,{...e,name:"namaskar"}),zi=e=>(0,m.jsx)(C,{...e,name:"sunrise"}),Wi=e=>(0,m.jsx)(C,{...e,name:"sunset"}),Oi=e=>(0,m.jsx)(C,{...e,name:"login"}),Vi=e=>(0,m.jsx)(C,{...e,name:"logout"}),_i=e=>(0,m.jsx)(C,{...e,name:"speed"}),Xi=e=>(0,m.jsx)(C,{...e,name:"repeat"}),ji=e=>(0,m.jsx)(C,{...e,name:"loader"}),Zi=e=>(0,m.jsx)(C,{...e,name:"star"}),es=e=>(0,m.jsx)(C,{...e,name:"shieldCheck"});x();x();x();var Co={"html-lang":{title:"Page language is set",wcag:"3.1.1",severity:"serious",why:"Screen readers pick their voice and pronunciation from the page language. Without it, Telugu or Hindi text may be read with English rules."},"page-title":{title:"Page has a title",wcag:"2.4.2",severity:"serious",why:"The title is the first thing announced and the name shown on browser tabs and bookmarks."},"image-alt":{title:"Images have alternative text",wcag:"1.1.1",severity:"critical",why:'People who cannot see the image get no information from it unless alt text describes it (or alt="" marks it as decorative).'},"heading-order":{title:"Headings follow a logical order",wcag:"1.3.1",severity:"moderate",why:"Many screen-reader users jump between headings. Skipped levels make the page outline confusing."},"single-h1":{title:"Page has one main heading",wcag:"best practice",severity:"minor",why:"A single h1 tells everyone what the page is about."},"landmark-main":{title:"Main content landmark exists",wcag:"1.3.1 / 2.4.1",severity:"moderate",why:"A <main> region lets keyboard and screen-reader users skip straight past menus to the content."},"form-label":{title:"Form fields have labels",wcag:"1.3.1 / 4.1.2",severity:"critical",why:'Without a label, a screen reader just says "edit text" and the user has to guess what to type.'},"button-name":{title:"Buttons have names",wcag:"4.1.2",severity:"critical",why:'An icon-only button with no name is announced as just "button", so its purpose is unknown.'},"link-name":{title:"Links have names",wcag:"2.4.4",severity:"serious",why:"Links are often read out of context in a list. An empty link gives no clue where it goes."},"color-contrast":{title:"Text has enough contrast",wcag:"1.4.3",severity:"serious",why:"Low-contrast text is hard to read for older users, people with low vision, and anyone outdoors on a phone."},"positive-tabindex":{title:"No positive tabindex",wcag:"2.4.3",severity:"moderate",why:"tabindex greater than 0 forces a custom keyboard order that usually doesn't match the visual order."},"keyboard-access":{title:"Clickable things work with a keyboard",wcag:"2.1.1",severity:"critical",why:"A div or span with a click handler can't be reached or activated with Tab and Enter, locking out keyboard users."},"duplicate-id":{title:"IDs are unique",wcag:"best practice",severity:"minor",why:"Labels and ARIA references point at ids. Duplicates make them point at the wrong element."},"form-error":{title:"Errors are linked to their fields",wcag:"3.3.1",severity:"serious",why:"When a field is marked invalid, the error message must be connected to it so it's announced together with the field."},"target-size":{title:"Touch targets are large enough",wcag:"2.5.8",severity:"moderate",why:"Small targets are hard to tap for people with tremors, seniors and everyone on mobile."}},Rc={critical:10,serious:5,moderate:2,minor:1};function nt(e={}){let t=Le(e.root),o=new Set(e.skip??[]),n=[],A={},i=t?Qt(t)?t:t.ownerDocument:null,r=(s,a,l,g,d=!1)=>{if(o.has(s))return;let u=Co[s],I=A[s]=(A[s]??0)+1;n.push({id:`${s}-${I}`,rule:s,severity:u.severity,wcag:u.wcag,message:l,why:u.why,fix:g,selector:a?Oe(a):"document",snippet:a?Be(a.outerHTML,120):"",autoFixable:d,element:a??void 0})};if(t&&i){i.documentElement.getAttribute("lang")||r("html-lang",i.documentElement,"The <html> element has no lang attribute.",'Add lang to <html>, e.g. <html lang="te"> or "en".',!0),i.title.trim()||r("page-title",null,"The page has no <title>.","Add a short, descriptive <title> that names this page.");for(let c of j(t,"img"))if(!(c.getAttribute("role")==="presentation"||c.getAttribute("role")==="none")&&!c.hasAttribute("alt")&&!c.getAttribute("aria-label")&&!c.getAttribute("aria-labelledby")){let p=c.getAttribute("title");r("image-alt",c,`Image has no alt text${c.getAttribute("src")?` (${Be(c.getAttribute("src")??"",40)})`:""}.`,p?`Use the title as alt: alt="${Be(p,40)}".`:'Describe the image in alt, or use alt="" if it is purely decorative.',!!p)}let s=j(t,"h1,h2,h3,h4,h5,h6"),a=0;for(let c of s){let p=Number(c.tagName[1]);a>0&&p>a+1&&r("heading-order",c,`Heading jumps from h${a} to h${p}: "${Be(c.textContent??"",40)}".`,`Change it to h${a+1}, or add the missing level above it.`),a=p}let l=s.filter(c=>c.tagName==="H1");l.length===0?r("single-h1",null,"The page has no h1.","Add one h1 that names the page."):l.length>1&&r("single-h1",l[1],`The page has ${l.length} h1 headings.`,"Keep one h1; turn the others into h2."),t.querySelectorAll("main,[role='main']").length===0&&r("landmark-main",null,"No <main> landmark found.","Wrap the primary content in <main>.");let g=j(t,"input,select,textarea").filter(c=>{let p=(c.getAttribute("type")??"text").toLowerCase();return!["hidden","submit","button","reset","image"].includes(p)});for(let c of g){if(!Ye(c)){let p=c.getAttribute("placeholder")||c.getAttribute("name");r("form-label",c,`Form field has no label${p?` (placeholder/name: "${Be(p,30)}")`:""}.`,p?`Add a visible <label>. Quick fix: aria-label="${Be(p,30)}".`:"Add a visible <label for=\u2026> describing what to enter.",!!p)}c.getAttribute("aria-invalid")==="true"&&(c.getAttribute("aria-describedby")||c.getAttribute("aria-errormessage")||r("form-error",c,"Field is marked invalid but no error message is linked to it.","Put the error text in an element with an id and point aria-describedby at it."))}for(let c of j(t,"button,[role='button'],input[type='submit'],input[type='button']"))if(!Ye(c)){let p=c.getAttribute("title");r("button-name",c,"Button has no accessible name.",p?`Use the title as the name: aria-label="${p}".`:"Add visible text or an aria-label that says what the button does.",!!p)}for(let c of j(t,"a[href]"))if(!Ye(c)){let p=c.getAttribute("title");r("link-name",c,`Link has no text (${Be(c.getAttribute("href")??"",40)}).`,p?`Use the title as the name: aria-label="${p}".`:"Add link text that says where it goes.",!!p)}for(let c of j(t,"[tabindex]"))Number(c.getAttribute("tabindex"))>0&&r("positive-tabindex",c,`tabindex="${c.getAttribute("tabindex")}" overrides the natural tab order.`,'Use tabindex="0" and fix the order in the HTML instead.',!0);let d="a[href],button,input,select,textarea,summary";for(let c of j(t,"[onclick],[role='button'],[role='link']"))c.matches(d)||c.hasAttribute("tabindex")||r("keyboard-access",c,`<${c.tagName.toLowerCase()}> is clickable but can't be reached with the keyboard.`,'Use a real <button>, or add tabindex="0", a role and Enter/Space key handling.',!0);let u=new Map;for(let c of Array.from(t.querySelectorAll("[id]")))c.closest("[data-yuktai-panel]")||u.set(c.id,(u.get(c.id)??0)+1);for(let[c,p]of u)p>1&&r("duplicate-id",t.querySelector(`[id="${c.replace(/"/g,'\\"')}"]`),`id="${c}" is used ${p} times.`,"Give each element a unique id.");let I=e.maxContrastChecks??600,y=0;for(let c of j(t,"body *")){if(y>=I)break;if(!eo(c)||["SCRIPT","STYLE","NOSCRIPT","OPTION"].includes(c.tagName))continue;y++;let p=at(window.getComputedStyle(c).color),B=wa(c);if(!p||!B)continue;let h=Pt(p,B),w=xa(c)?3:4.5;h<w&&r("color-contrast",c,`Contrast ${h}:1 is below ${w}:1 for "${Be(c.textContent??"",30)}".`,`Darken the text or lighten the background until the ratio is at least ${w}:1.`)}let f=e.minTargetSize??24;for(let c of j(t,To)){let p=c.getBoundingClientRect();p.width===0&&p.height===0||c.tagName==="A"&&c.closest("p,li,td")||(p.width<f||p.height<f)&&r("target-size",c,`Target is ${Math.round(p.width)}\xD7${Math.round(p.height)}px (minimum ${f}\xD7${f}).`,`Increase padding so it's at least ${f}\xD7${f}px (44\xD744 is better for seniors).`)}}return Tc(n,i,o)}function Tc(e,t,o){let n=Object.keys(Co).filter(a=>!o.has(a)).map(a=>{let l=e.filter(g=>g.rule===a).length;return{rule:a,title:Co[a].title,passed:l===0,issueCount:l}}),A=0;for(let a of n){let l=Rc[Co[a.rule].severity];A+=Math.min(25,a.issueCount*l)}let i=Math.max(0,100-A),r=n.filter(a=>!a.passed),s=e.filter(a=>a.severity==="critical").length;return{url:t?.location?.href??"",title:t?.title??"",generatedAt:new Date().toISOString(),score:i,passed:s===0&&i>=80,checks:n,issues:e,summary:e.length===0?`All ${n.length} checks passed.`:`${n.length-r.length} of ${n.length} checks passed. ${e.length} issue(s) found, ${s} critical. Score ${i}/100.`}}function ts(e){let t=["# Accessibility QA report","",`- Page: ${e.title||"(untitled)"} ${e.url}`,`- Generated: ${e.generatedAt}`,`- Score: **${e.score}/100** \u2014 ${e.passed?"PASS":"FAIL"}`,"",e.summary,"","## Checks","","| Check | Result | Issues |","|---|---|---|",...e.checks.map(o=>`| ${o.title} | ${o.passed?"\u2705 Pass":"\u274C Fail"} | ${o.issueCount} |`)];if(e.issues.length){t.push("","## Issues","");for(let o of e.issues)t.push(`### ${o.id} \xB7 ${o.severity} \xB7 WCAG ${o.wcag}`,"",`- **Problem:** ${o.message}`,`- **Why it matters:** ${o.why}`,`- **Fix:** ${o.fix}`,`- **Where:** \`${o.selector}\``,"")}return t.join(`
1547
+ `)}function os(e){return JSON.stringify({...e,issues:e.issues.map(({element:t,...o})=>o)},null,2)}function ns(e={}){let t=null,o=null,n=null,A=!1,i=[],r=()=>({report:t,watching:o!==null,appliedFixes:i.length}),s=()=>e.onUpdate?.(r()),a=u=>t?.issues.find(I=>I.id===u),l=(u,I,y)=>{i.push({element:u,attribute:I,previous:u.getAttribute(I)}),u.setAttribute(I,y)};function g(u){let I=u.element,y=(f,c)=>({issueId:u.id,applied:f,message:c});if(!u.autoFixable||!I)return y(!1,"This needs a human decision \u2014 see the suggested fix.");switch(u.rule){case"html-lang":{let f=e.defaultLang||(qe()?navigator.language:"")||"en";return l(I,"lang",f),y(!0,`Set lang="${f}" on <html>.`)}case"image-alt":{let f=I.getAttribute("title");if(!f)break;return l(I,"alt",f),y(!0,`Used the image title as alt text: "${f}".`)}case"form-label":{let f=I.getAttribute("placeholder")||I.getAttribute("name");if(!f)break;let c=f.replace(/[_-]+/g," ").trim();return l(I,"aria-label",c),y(!0,`Added aria-label="${c}". A visible <label> is still better.`)}case"button-name":case"link-name":{let f=I.getAttribute("title");if(!f)break;return l(I,"aria-label",f),y(!0,`Added aria-label="${f}".`)}case"positive-tabindex":return l(I,"tabindex","0"),y(!0,"Changed tabindex to 0 so the natural order applies.");case"keyboard-access":{l(I,"tabindex","0"),I.getAttribute("role")||l(I,"role","button");let f=c=>{let p=c.key;(p==="Enter"||p===" ")&&(c.preventDefault(),I.click())};return I.addEventListener("keydown",f),i.push({element:I,attribute:"",previous:null,listener:f}),y(!0,"Made it focusable and added Enter/Space support.")}default:break}return y(!1,"No safe automatic fix for this one \u2014 see the suggested fix.")}function d(){if(t=nt(e),e.autoApply){A=!0;let u=t.issues.filter(I=>I.autoFixable).map(g);A=!1,u.some(I=>I.applied)&&(t=nt(e))}return s(),t}return{start(){if(!qe()||o)return;let u=Le(e.root),I=Qt(u)?u.body:u;I&&(o=new MutationObserver(y=>{A||!y.some(c=>!c.target.closest?.("[data-yuktai-panel]"))||(n&&clearTimeout(n),n=setTimeout(d,e.debounceMs??600))}),o.observe(I,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["alt","aria-label","aria-invalid","tabindex","lang","title"]}),d())},stop(){o?.disconnect(),o=null,n&&clearTimeout(n),n=null,s()},scan:d,explain(u){let I=a(u);return I?[`${I.message}`,`Why it matters: ${I.why}`,`How to fix: ${I.fix}`,`Standard: WCAG ${I.wcag} (${I.severity}).`,I.autoFixable?"I can apply a safe fix for this in the browser.":"This one needs a change in your code."].join(`
1548
+ `):`No issue "${u}" in the current report. Run a scan first.`},applyFix(u){let I=a(u);if(!I)return{issueId:u,applied:!1,message:"Issue not found. Run a scan first."};A=!0;let y=g(I);return A=!1,y.applied&&d(),y},applyAllFixes(){t||d(),A=!0;let u=(t?.issues??[]).filter(I=>I.autoFixable).map(g);return A=!1,d(),u},undoAll(){let u=i.length;for(A=!0;i.length;){let I=i.pop();I.listener?I.element.removeEventListener("keydown",I.listener):I.previous===null?I.element.removeAttribute(I.attribute):I.element.setAttribute(I.attribute,I.previous)}return A=!1,d(),u},getState:r}}x();x();var Fc=/^(field|input|value|text|enter|details?|info|data|\*|:)$/i,Lc=/^(go|ok|submit|send|click here|>|→|next)$/i,Pc=[[/e-?mail/i,"email","email"],[/phone|mobile|tel/i,"tel","tel"],[/^(full)?name$|full.?name/i,"name"],[/first.?name|given/i,"given-name"],[/last.?name|surname|family/i,"family-name"],[/address|street/i,"street-address"],[/zip|postal|pin.?code|pincode/i,"postal-code"],[/city|town/i,"address-level2"],[/country/i,"country-name"],[/password/i,"current-password","password"],[/dob|birth/i,"bday"]];function Yc(e){let t=e.getAttribute("id");return t&&e.ownerDocument.querySelector(`label[for="${t.replace(/"/g,'\\"')}"]`)?!0:!!e.closest("label")}function gl(e){return j(e,"input,select,textarea").filter(t=>!["hidden","submit","button","reset","image"].includes((t.getAttribute("type")??"text").toLowerCase())).map(t=>({label:Ye(t),type:t.tagName==="INPUT"?(t.getAttribute("type")??"text").toLowerCase():t.tagName.toLowerCase(),name:t.getAttribute("name")??t.getAttribute("id")??"",required:t.hasAttribute("required")||t.getAttribute("aria-required")==="true",hasVisibleLabel:Yc(t),selector:Oe(t),element:t}))}function cl(e,t={}){let o=t.seniorFriendly!==!1,n=t.maxFieldsPerStep??8,A=gl(e),i=[],r=(u,I,y,f)=>i.push({level:u,message:I,suggestion:y,field:f?.label||f?.name,selector:f?.selector});for(let u of A){let I=u.element,y=u.label||u.name||u.type,f=I.getAttribute("placeholder");!u.label&&f?r("problem",`"${f}" uses only a placeholder as its label.`,"Placeholders disappear when typing starts and aren't read by every screen reader. Add a visible label above the field.",u):u.label?!u.hasVisibleLabel&&f&&!I.getAttribute("aria-label")?r("problem",`"${y}" uses only a placeholder as its label.`,"Placeholders disappear when typing starts. Add a visible label above the field.",u):Fc.test(u.label)&&r("improvement",`The label "${u.label}" is unclear.`,'Say exactly what is needed, e.g. "Mobile number (10 digits)".',u):r("problem",`A ${u.type} field${u.name?` ("${u.name}")`:""} has no label.`,"Add a visible <label> that says exactly what to enter.",u),u.required&&u.label&&!/\*|required|mandatory|తప్పనిసరి|आवश्यक/i.test(u.label)&&r("improvement",`"${y}" is required but the label doesn't say so.`,'Add "(required)" to the label so everyone knows before submitting.',u);let c=`${u.name} ${u.label}`;for(let[p,B,h]of Pc)if(p.test(c)){I.getAttribute("autocomplete")||r("improvement",`"${y}" has no autocomplete hint.`,`Add autocomplete="${B}" so browsers can fill it in (WCAG 1.3.5).`,u),h&&u.type==="text"&&r("improvement",`"${y}" uses type="text".`,`Use type="${h}" for the right mobile keyboard and validation.`,u);break}if(I.getAttribute("aria-invalid")==="true"&&!I.getAttribute("aria-describedby")&&!I.getAttribute("aria-errormessage")&&r("problem",`"${y}" shows an error that isn't connected to the field.`,"Link the error text with aria-describedby and explain how to fix it.",u),o){let p=parseFloat(window.getComputedStyle(I).fontSize)||16;p<16&&r("improvement",`"${y}" text is ${p}px.`,"Use at least 16px in inputs; it is easier to read and stops mobile browsers from zooming.",u)}}A.length>n&&r("improvement",`This form has ${A.length} fields on one screen.`,`Split it into steps of about ${n} fields with a progress indicator.`);let s=j(e,"button,input[type='submit'],input[type='button']");if(s.length===0)r("problem","No submit button found.",'Add a clear <button type="submit"> so the form can be completed with the keyboard.');else if(o){let u=me(Ye(s[s.length-1]));Lc.test(u)&&r("improvement",`The button says "${u}".`,'Name the result, e.g. "Send message" or "Book appointment".')}!j(e,"[role='alert'],[aria-live]",{includeHidden:!0}).length&&A.some(u=>u.required)&&r("improvement","No live region for error messages.",'Add an element with role="alert" so errors are announced when the form is submitted.');let a=i.filter(u=>u.level==="problem").length,l=i.length-a,g=Math.max(0,100-a*15-l*4),d=e.getAttribute("aria-label")||me(e.querySelector("legend,h1,h2,h3")?.textContent)||e.getAttribute("name")||e.getAttribute("id")||"Form";return{name:Be(d,50),selector:Oe(e),fields:A,findings:i,score:g,summary:i.length===0?`"${Be(d,40)}" looks clear: ${A.length} labelled field(s), nothing to fix.`:`"${Be(d,40)}" has ${A.length} field(s): ${a} problem(s) and ${l} suggestion(s). Score ${g}/100.`}}function fo(e={}){let t=Le(e.root);return t?j(t,"form,[role='form']").map(o=>cl(o,e)):[]}function dl(e){let t=Le(e),o={title:"",description:"",language:"",headings:[],landmarks:{},counts:{links:0,buttons:0,images:0,forms:0,tables:0,fields:0},unlabeledFields:[],imagesWithoutAlt:[],purpose:""};if(!t)return o;let n=Qt(t)?t:t.ownerDocument,A=j(t,"h1,h2,h3,h4,h5,h6").map(g=>({level:Number(g.tagName[1]),text:Be(g.textContent??"",80)})),i={};for(let[g,d]of Object.entries({header:"header,[role='banner']",navigation:"nav,[role='navigation']",main:"main,[role='main']",search:"search,[role='search']",footer:"footer,[role='contentinfo']"}))i[g]=j(t,d).length;let r=j(t,"input,select,textarea").filter(g=>!["hidden","submit","button","reset","image"].includes((g.getAttribute("type")??"text").toLowerCase())),s=r.filter(g=>!Ye(g)).map(g=>({type:g.tagName==="INPUT"?g.getAttribute("type")??"text":g.tagName.toLowerCase(),hint:g.getAttribute("placeholder")||g.getAttribute("name")||"",selector:Oe(g)})),a=j(t,"img:not([alt])").map(g=>({src:g.getAttribute("src")??"",selector:Oe(g)})),l={title:n.title,description:me(n.querySelector('meta[name="description"]')?.getAttribute("content")),language:n.documentElement.getAttribute("lang")??"",headings:A,landmarks:i,counts:{links:j(t,"a[href]").length,buttons:j(t,"button,[role='button'],input[type='submit']").length,images:j(t,"img").length,forms:j(t,"form,[role='form']").length,tables:j(t,"table,[role='grid'],[role='table']").length,fields:r.length},unlabeledFields:s,imagesWithoutAlt:a,purpose:""};return l.purpose=Uc(l,r),l}function Uc(e,t){let o=e.headings.find(r=>r.level===1)?.text||e.title||"This page",n=t.map(r=>`${r.getAttribute("type")} ${r.getAttribute("name")} ${Ye(r)}`).join(" ").toLowerCase(),A=[];/password/.test(n)?A.push("sign in or create an account"):(/search|query|వెతుకు/.test(n)||e.landmarks.search)&&A.push("search"),/message|comment|feedback|contact|enquiry/.test(n)&&A.push("send a message"),/card|payment|upi|amount/.test(n)&&A.push("make a payment"),e.counts.tables&&A.push(`browse ${e.counts.tables} table(s) of data`),!A.length&&e.counts.forms&&A.push(`fill in ${e.counts.forms} form(s)`),A.length||A.push("read content");let i=e.headings.filter(r=>r.level===2).slice(0,5).map(r=>r.text);return[`"${o}" lets you ${A.join(", ")}.`,e.description?`It describes itself as: ${Be(e.description,140)}`:"",i.length?`Main sections: ${i.join(" \xB7 ")}.`:""].filter(Boolean).join(" ")}var Hc=[["missing-labels",/label|unlabel|లేబుల్/i],["images",/image|alt text|picture|photo|చిత్ర/i],["structure",/heading|structure|outline|section|landmark|శీర్షిక/i],["forms",/form|field|input|ఫారం/i],["links",/link|లింక్/i],["counts",/how many|count|ఎన్ని/i],["purpose",/what (does|is)|purpose|about|summar|explain|ఏమి|గురించి/i]];function ul(e){for(let[t,o]of Hc)if(o.test(e))return t;return"unknown"}async function As(e,t={}){let o=dl(t.root),n=ul(e);switch(n){case"missing-labels":return o.unlabeledFields.length?{intent:n,answer:`${o.unlabeledFields.length} of ${o.counts.fields} field(s) have no label: ${o.unlabeledFields.map(A=>`${A.type}${A.hint?` ("${A.hint}")`:""}`).join(", ")}.`,targets:o.unlabeledFields.map(A=>A.selector),suggestions:["Add a visible <label for=\u2026> to each field.","Run the Accessibility Copilot to add aria-labels from placeholders as a quick fix."]}:{intent:n,answer:`All ${o.counts.fields} form field(s) have labels.`,targets:[],suggestions:[]};case"images":return{intent:n,answer:o.imagesWithoutAlt.length?`${o.imagesWithoutAlt.length} of ${o.counts.images} image(s) have no alt text.`:`All ${o.counts.images} image(s) have alt text.`,targets:o.imagesWithoutAlt.map(A=>A.selector),suggestions:o.imagesWithoutAlt.length?['Describe meaningful images in alt; use alt="" for decorative ones.']:[]};case"structure":{let A=o.headings.slice(0,15).map(r=>`${" ".repeat(r.level-1)}h${r.level} ${r.text}`).join(`
1549
+ `),i=Object.entries(o.landmarks).filter(([,r])=>r===0).map(([r])=>r);return{intent:n,answer:`${o.headings.length} heading(s).
1550
+ ${A}${i.length?`
1551
+ Missing landmarks: ${i.join(", ")}.`:""}`,targets:[],suggestions:i.includes("main")?["Wrap the primary content in <main>."]:[]}}case"forms":{let A=fo({root:t.root});return{intent:n,answer:A.length?A.map(i=>i.summary).join(`
1552
+ `):"There are no forms on this page.",targets:A.flatMap(i=>i.findings.map(r=>r.selector).filter(r=>!!r)),suggestions:A.flatMap(i=>i.findings.slice(0,3).map(r=>r.suggestion))}}case"links":case"counts":{let A=o.counts;return{intent:n,answer:`${A.links} links, ${A.buttons} buttons, ${A.fields} form fields in ${A.forms} form(s), ${A.images} images, ${A.tables} tables.`,targets:[],suggestions:[]}}case"purpose":case"unknown":{let A=o.purpose;if(t.summarize)try{let r=Le(t.root),s=me((r&&Qt(r)?r.body:r)?.textContent).slice(0,4e3);A=await t.summarize(s)||A}catch{}let i=[];return o.unlabeledFields.length&&i.push(`${o.unlabeledFields.length} form field(s) need labels.`),o.imagesWithoutAlt.length&&i.push(`${o.imagesWithoutAlt.length} image(s) need alt text.`),{intent:n,answer:A,targets:[],suggestions:i}}}}x();var Xe=e=>String(e??"").normalize("NFC").toLowerCase().replace(/\s+/g," ").trim(),Jc=new Set("show me find list get give which who what all the a an rows row records record entries with where that are is have has having and or of for in on to please display only those whose any".split(" "));function _o(e){let t=Xe(e).replace(/(₹|rs\.?|inr|\$|usd|€|£)/g," ").match(/(-?\d[\d,]*(?:\.\d+)?|-?\.\d+)\s*(k|thousand|lakhs?|lacs?|crores?|cr|mn|million|m|bn|billion)?(?![\p{L}])/u);if(!t)return null;let o=Number(t[1].replace(/,/g,""));if(!Number.isFinite(o))return null;let n=t[2]??"",A=/^k|thousand/.test(n)?1e3:/^la/.test(n)?1e5:/^(crore|cr)/.test(n)?1e7:/^(m|mn|million)$/.test(n)?1e6:/^(bn|billion)$/.test(n)?1e9:1;return o*A}function ml(e){let t=new Set([Xe(e.label),Xe(e.key),Xe(e.key.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2"))]);for(let o of Array.from(t))o.endsWith("s")?t.add(o.slice(0,-1)):t.add(`${o}s`);return Array.from(t).filter(o=>o.length>1)}function He(e,t,o){let n=` ${Xe(e)} `,A;for(let i of t)if(!(o&&(i.type??"text")!==o))for(let r of ml(i)){let s=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");new RegExp(`(^|[^\\p{L}\\p{M}\\p{N}])${s}($|[^\\p{L}\\p{M}\\p{N}])`,"u").test(n)&&(!A||r.length>A.length)&&(A={column:i,length:r.length})}return A?.column}var Kc=/amount|balance|total|price|salary|value|due|revenue|cost|fee|sales|outstanding|paid/i;function rs(e){let t=e.filter(o=>o.type==="number");return t.find(o=>Kc.test(`${o.key} ${o.label}`))??t[0]}var Vo=/(>=|=>|>|\bover\b|\babove\b|\bmore than\b|\bgreater than\b|\bexceeds?\b|\bexceeding\b|\bhigher than\b|\bat least\b|\bminimum\b|\bmin\b|కంటే ఎక్కువ)/,is=/(<=|=<|<|\bunder\b|\bbelow\b|\bless than\b|\blower than\b|\bat most\b|\bmaximum\b|\bmax\b|\bup to\b|కంటే తక్కువ)/,Il=/\b(after|since|from)\b/,qc=/\b(before|until|till)\b/,$c="(?:\\s*(?:k|thousand|lakhs?|lacs?|crores?|cr|mn|million|m|bn|billion))?",ss=`(?:\u20B9|rs\\.?\\s*|\\$)?\\s*-?\\d[\\d,]*(?:\\.\\d+)?${$c}`;function wt(e,t,o={}){let n={filters:[],search:[],sort:null,limit:null,notes:[],explanation:""},A=Xe(e).replace(/[?!]+/g," ").replace(/\.(?!\d)/g," ").trim(),i=[],r=A.match(/\b(top|first|bottom|last|lowest|highest)\s+(\d+)\b/);r&&(n.limit=Number(r[2]),A=A.replace(r[0],` ${r[1]} `));let s=A.match(/\b(?:sort(?:ed)?|order(?:ed)?)\s+by\s+([\p{L}\p{M}\p{N} _]+?)(?:\s+(asc|ascending|desc|descending))?(?=$|,|\band\b|\bthen\b)/u),a=A.match(/\b(top|highest|largest|biggest|most|bottom|lowest|smallest|least)\b(?:\s+\d+)?\s+(?:by\s+)?([\p{L}\p{M}\p{N} _]+)/u);if(s){let y=He(s[1],t);y&&(n.sort={key:y.key,direction:/^desc/.test(s[2]??"")?"desc":"asc"},A=A.replace(s[0]," "))}else if(a){let y=He(a[2],t,"number")??He(a[2],t)??rs(t);if(y){let f=/top|highest|largest|biggest|most/.test(a[1]);n.sort={key:y.key,direction:f?"desc":"asc"},A=A.replace(new RegExp(`\\b${a[1]}\\b`)," "),!r&&/top|bottom/.test(a[1])&&(n.limit=10)}}let l=new RegExp(`\\bbetween\\s+(${ss}|\\d{4}-\\d{2}-\\d{2})\\s+(?:and|to|-)\\s+(${ss}|\\d{4}-\\d{2}-\\d{2})`,"u"),g;for(;g=A.match(l);){let y=A.slice(Math.max(0,(g.index??0)-40),g.index??0),f=/\d{4}-\d{2}-\d{2}/.test(g[1]),c=f?He(y,t,"date")??t.find(h=>h.type==="date"):He(y,t,"number")??rs(t),p=f?g[1]:_o(g[1]),B=f?g[2]:_o(g[2]);c&&p!==null&&B!==null&&(n.filters.push({key:c.key,operator:"between",value:[p,B]}),i.push(`${c.label} between ${g[1]} and ${g[2]}`)),A=A.replace(g[0]," ")}let d=A.split(/\s*(?:(?<!\d),|,(?!\d)|;|\band\b|(?<!(?:starts?|starting|ends?|ending|begins?|beginning)\s)\bwith\b|\bwhere\b|\bwho\b|\bthat\b|&|మరియు)\s*/u).map(y=>y.trim()).filter(Boolean),u=t.filter(y=>(y.type??"text")==="text"),I=new Map;for(let y of u){let f=new Set;for(let c of(o.data??[]).slice(0,5e3)){let p=Xe(c[y.key]);if(p&&p.length<=40&&f.add(p),f.size>300)break}f.size&&f.size<=300&&I.set(y.key,f)}for(let y of d){let f=n.filters.length,c=He(y,t),p=y.match(new RegExp(ss,"u")),B=y.match(/\d{4}-\d{2}-\d{2}/);if(B&&(Il.test(y)||qc.test(y)||Vo.test(y)||is.test(y))){let h=(c?.type==="date"?c:void 0)??t.find(w=>w.type==="date");if(h){let w=Il.test(y)||Vo.test(y);n.filters.push({key:h.key,operator:w?"greaterThan":"lessThan",value:B[0]}),i.push(`${h.label} ${w?"after":"before"} ${B[0]}`)}}else if(p&&(Vo.test(y)||is.test(y)||c?.type==="number"&&/\b(is|equals?)\b|=/.test(y))){let h=c?.type==="number"?c:void 0;h||(h=rs(t),h&&n.notes.push(`Assumed "${y}" refers to ${h.label}.`));let w=_o(p[0]);if(h&&w!==null){let b=/at least|minimum|\bmin\b|>=|=>|at most|maximum|\bmax\b|up to|<=|=</.test(y);Vo.test(y)?(n.filters.push({key:h.key,operator:"greaterThan",value:b?w-1e-9:w}),i.push(`${h.label} ${b?"\u2265":">"} ${w.toLocaleString("en-IN")}`)):is.test(y)?(n.filters.push({key:h.key,operator:"lessThan",value:b?w+1e-9:w}),i.push(`${h.label} ${b?"\u2264":"<"} ${w.toLocaleString("en-IN")}`)):(n.filters.push({key:h.key,operator:"equals",value:w}),i.push(`${h.label} = ${w.toLocaleString("en-IN")}`))}}else{let h=y.match(/\b(?:starts?|starting|begins?|beginning)\s+with\s+(.+)$/),w=y.match(/\b(?:ends?|ending)\s+with\s+(.+)$/),b=y.match(/\b(?:contains?|containing|including|includes?|mentions?)\s+(.+)$/),S=y.match(/\b(?:is|equals?|=|:)\s+(.+)$/),D=h??w??b??S;if(D){let T=c??u[0],z=D[1].replace(/^["'“‘]|["'”’]$/g,"").trim();if(T&&z){let Z=h?"startsWith":w?"endsWith":b?"contains":"equals";n.filters.push({key:T.key,operator:Z,value:z}),i.push(`${T.label} ${Z==="equals"?"is":Z==="contains"?"contains":Z==="startsWith"?"starts with":"ends with"} "${z}"`),c||n.notes.push(`Assumed "${y}" refers to ${T.label}.`)}}}if(n.filters.length===f)for(let[h,w]of I){let b="";for(let S of w){if(S.length<2||S.length<=b.length)continue;let D=S.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");new RegExp(`(^|[^\\p{L}\\p{M}\\p{N}])${D}($|[^\\p{L}\\p{M}\\p{N}])`,"u").test(y)&&(b=S)}if(b){let S=t.find(D=>D.key===h);n.filters.push({key:h,operator:"equals",value:b}),i.push(`${S.label} is "${b}"`)}}if(n.filters.length===f){let h=y.split(/\s+/).filter(b=>!Jc.has(b)&&!/^(top|first|bottom|last|lowest|highest|by|desc|asc|sort(ed)?)$/.test(b)),w=h.length>0&&h.every(b=>t.some(S=>ml(S).includes(b)));if(h.length&&!w&&!(c&&h.length===1)){let b=h.join(" ");/^(customers?|users?|people|items?|entries|poems?|orders?|products?|employees?|students?|members?)$/.test(b)||(n.search.push(b),i.push(`any column contains "${b}"`))}}}if(n.sort){let y=t.find(f=>f.key===n.sort.key)?.label??n.sort.key;i.push(`sorted by ${y} ${n.sort.direction==="desc"?"high \u2192 low":"low \u2192 high"}`)}return n.limit&&i.push(`first ${n.limit}`),n.explanation=i.length?`Showing rows where ${i.join(", ")}.`:"No conditions understood \u2014 showing all rows.",n}function zc(e,t,o){return o==="number"?(Number(e)||0)-(Number(t)||0):o==="date"?(new Date(String(e)).getTime()||0)-(new Date(String(t)).getTime()||0):String(e??"").localeCompare(String(t??""),void 0,{numeric:!0})}function At(e,t,o){let n=ot(e,t,o.filters);for(let A of o.search)n=n.filter(i=>t.some(r=>Xe(i[r.key]).includes(A)));if(o.sort){let A=t.find(r=>r.key===o.sort.key),i=o.sort.direction==="desc"?-1:1;n=[...n].sort((r,s)=>i*zc(r[o.sort.key],s[o.sort.key],A?.type))}return o.limit&&(n=n.slice(0,o.limit)),n}function Cl(e,t,o={}){let n=wt(e,t.columns,{data:t.data}),A=At(t.data,t.columns,n),i=A.map(s=>Qe(s,t.rowKey)).filter(Boolean);o.apply!==!1&&(n.filters.length&&t.onFiltersChange?.(n.filters),n.sort&&t.onSortChange?.(n.sort),i.length&&t.onHighlightRows?.(i));let r=A.length?`${A.length} row(s) found. ${n.explanation}${n.notes.length?` (${n.notes.join(" ")})`:""}`:`No rows match. ${n.explanation}`;return{rows:A,ids:i,parsed:n,message:r}}function pl(e,t){let o=(e.length-1)*t,n=Math.floor(o),A=o-n;return e[n+1]!==void 0?e[n]+A*(e[n+1]-e[n]):e[n]}function Xo(e,t,o={}){let n=o.factor??1.5,A=[],i=t.filter(l=>l.type==="number"&&(!o.columns||o.columns.includes(l.key))),r=l=>l.toLocaleString("en-IN",{maximumFractionDigits:2});for(let l of i){let g=e.map(p=>Number(p[l.key])).filter(p=>Number.isFinite(p));if(g.length<5)continue;let d=[...g].sort((p,B)=>p-B),u=pl(d,.25),I=pl(d,.75),y=I-u;if(y===0)continue;let f=u-n*y,c=I+n*y;for(let p of e){let B=Number(p[l.key]);!Number.isFinite(B)||B>=f&&B<=c||A.push({rowId:Qe(p,o.rowKey),column:l.key,label:l.label,value:B,kind:B>c?"high":"low",reason:`${l.label} ${r(B)} is far ${B>c?"above":"below"} the typical range (${r(u)}\u2013${r(I)}).`})}}let s=o.rowKey??"id",a=new Map;for(let l of e){let g=JSON.stringify(t.filter(I=>I.key!==s).map(I=>Xe(l[I.key]))),d=Qe(l,o.rowKey),u=a.get(g);u!==void 0?A.push({rowId:d,column:s,label:"Row",value:d,kind:"duplicate",reason:`Row ${d} has the same values as row ${u}.`}):a.set(g,d)}return A}function jo(e,t){if(!e.length)return"No rows to summarise.";let o=[`${e.length} row(s).`],n=A=>A.toLocaleString("en-IN",{maximumFractionDigits:2});for(let A of t){let i=e.map(r=>r[A.key]);if(A.type==="number"){let r=i.map(Number).filter(Number.isFinite);if(!r.length)continue;let s=r.reduce((a,l)=>a+l,0);o.push(`${A.label}: total ${n(s)}, average ${n(s/r.length)}, range ${n(Math.min(...r))}\u2013${n(Math.max(...r))}.`)}else if(A.type==="date"){let r=i.map(a=>new Date(String(a)).getTime()).filter(Number.isFinite);if(!r.length)continue;let s=a=>new Date(a).toISOString().slice(0,10);o.push(`${A.label}: from ${s(Math.min(...r))} to ${s(Math.max(...r))}.`)}else{let r=new Map;for(let a of i){let l=String(a??"").trim();l&&r.set(l,(r.get(l)??0)+1)}if(r.size===0||r.size>Math.max(8,e.length/3))continue;let s=Array.from(r.entries()).sort((a,l)=>l[1]-a[1]).slice(0,4);o.push(`${A.label}: ${s.map(([a,l])=>`${a} (${l})`).join(", ")}.`)}}return o.join(`
1553
+ `)}function as(e,t){let o=Xe(e);if(/unusual|anomal|outlier|odd|strange|suspicious|duplicate|అసాధారణ/.test(o)){let A=Xo(t.data,t.columns,{rowKey:t.rowKey}),i=Array.from(new Set(A.map(s=>s.rowId)));i.length&&t.onHighlightRows?.(i);let r=new Set(i);return{kind:"anomalies",message:A.length?`${i.length} unusual row(s):
1554
+ ${A.slice(0,10).map(s=>`\u2022 ${s.reason}`).join(`
1555
+ `)}`:"Nothing unusual found.",ids:i,rows:t.data.filter(s=>r.has(Qe(s,t.rowKey))),anomalies:A}}if(/summar|overview|describe|సారాంశం/.test(o)){let A=ot(t.data,t.columns,t.filters??[]);return{kind:"summary",message:jo(A,t.columns),ids:[],rows:A}}let n=Cl(e,t);return{kind:"query",message:n.message,ids:n.ids,rows:n.rows}}x();var Wc=/\b(off|disable|stop|remove|no more|turn off|switch off|deactivate)\b|ఆఫ్|ఆపు|తీసివేయి|बंद/i,Oc=[{pattern:/high contrast|contrast|హై కాంట్రాస్ట్|కాంట్రాస్ట్/i,key:"highContrast",name:"High contrast"},{pattern:/dark mode|dark theme|night mode|డార్క్ మోడ్|చీకటి/i,key:"darkMode",name:"Dark mode"},{pattern:/reduce motion|less motion|stop animation|animations?|కదలికలు/i,key:"reduceMotion",name:"Reduced motion"},{pattern:/large targets?|bigger buttons?|big buttons?|larger buttons?|పెద్ద బటన్/i,key:"largeTargets",name:"Large targets"},{pattern:/dyslexia|readable font|easy font/i,key:"dyslexiaFont",name:"Dyslexia-friendly font"},{pattern:/speak on focus|read aloud|read out|screen reader|speech|చదివి వినిపించు/i,key:"speechEnabled",name:"Speak on focus"},{pattern:/skip links?/i,key:"showSkipLinks",name:"Skip links"}],Vc=[[/deuteranop|green.?blind/i,"deuteranopia"],[/protanop|red.?blind/i,"protanopia"],[/tritanop|blue.?blind/i,"tritanopia"],[/grey ?scale|gray ?scale|achromat|black and white/i,"achromatopsia"]],ls=.1,fl=.8,hl=1.3;function yl(e,t={}){let o=e.trim().toLowerCase();if(!o)return null;if(/\b(next|down)\s+(row|line|record|item)\b|తర్వాతి (వరుస|అంశం)/.test(o))return{type:"grid",action:"next-row",say:"Next row."};if(/\b(previous|prev|back|up)\s+(row|line|record|item)\b|ముందరి (వరుస|అంశం)|వెనుక (వరుస|అంశం)/.test(o))return{type:"grid",action:"previous-row",say:"Previous row."};if(/\bfirst\s+(row|record|item)\b|మొదటి (వరుస|అంశం)/.test(o))return{type:"grid",action:"first-row",say:"First row."};if(/\blast\s+(row|record|item)\b|చివరి (వరుస|అంశం)/.test(o))return{type:"grid",action:"last-row",say:"Last row."};if(/\b(open|expand|read)\s+(this\s+)?(row|record|item)\b|ఈ (వరుస|అంశం) తెరువు/.test(o))return{type:"grid",action:"open-row",say:"Opening row."};if(/\b(reset|default|restore)\b.*\b(settings?|accessibility|everything|all)\b|^reset$|రీసెట్/.test(o))return{type:"reset",say:"Accessibility settings reset."};let n=t.fontSizeMultiplier??1,A=r=>Math.round(Math.min(hl,Math.max(fl,r))*100)/100;if(/\b(bigger|larger|increase|zoom in)\b.*\b(text|font|letters?)\b|\b(text|font)\b.*\b(bigger|larger|up)\b|పెద్ద అక్షరాలు|అక్షరాలు పెద్ద/.test(o)){let r=A(n+ls);return{type:"setting",patch:{fontSizeMultiplier:r},say:`Text size ${Math.round(r*100)}%.`}}if(/\b(smaller|decrease|reduce|zoom out)\b.*\b(text|font|letters?)\b|\b(text|font)\b.*\b(smaller|down)\b|చిన్న అక్షరాలు|అక్షరాలు చిన్న/.test(o)){let r=A(n-ls);return{type:"setting",patch:{fontSizeMultiplier:r},say:`Text size ${Math.round(r*100)}%.`}}if(/\b(normal|default|reset)\b.*\b(text|font)\s*(size)?\b/.test(o))return{type:"setting",patch:{fontSizeMultiplier:1},say:"Text size 100%."};let i=Wc.test(o);for(let[r,s]of Vc)if(r.test(o))return i?{type:"setting",patch:{colorBlindMode:"none"},say:"Colour filter off."}:{type:"setting",patch:{colorBlindMode:s},say:`${s} filter on.`};if(/colou?r.?blind/.test(o)&&i)return{type:"setting",patch:{colorBlindMode:"none"},say:"Colour filter off."};for(let r of Oc){if(!r.pattern.test(o))continue;let s=/\btoggle\b/.test(o)?!t[r.key]:!i;return r.key==="reduceMotion"&&!/reduce motion|less motion|కదలికలు తగ్గించు/.test(o)&&/animations?/.test(o)&&(s=i||/\bno\b/.test(o)),{type:"setting",patch:{[r.key]:s},say:`${r.name} ${s?"on":"off"}.`}}return null}var gs={highContrast:!1,darkMode:!1,reduceMotion:!1,largeTargets:!1,dyslexiaFont:!1,speechEnabled:!1,colorBlindMode:"none",fontSizeMultiplier:1};function bl(e,t={}){if(!qe())return null;let o=t.root??document,n=t.rowSelector??"[data-yuktai-row-id], [role='row']",A=Array.from(o.querySelectorAll(n)).filter(l=>!l.querySelector("th,[role='columnheader']"));if(!A.length)return null;let i=document.activeElement?.closest(n),r=i?A.indexOf(i):-1;if(e==="open-row"){let l=r>=0?A[r]:A[0];return l.click(),l}let s=e==="first-row"?0:e==="last-row"?A.length-1:e==="next-row"?Math.min(A.length-1,r+1):Math.max(0,r-1),a=A[s];return a.hasAttribute("tabindex")||a.setAttribute("tabindex","-1"),a.focus(),a.scrollIntoView?.({block:"nearest"}),a}function cs(e={}){let t={enabled:!0,...gs,...e.initial},o=null,n=!1,A=async l=>e.apply?e.apply(l):ve.execute(l),i=l=>{if(e.speak===!1||!qe()||!("speechSynthesis"in window))return;let g=new SpeechSynthesisUtterance(l);g.lang=e.lang??"en-IN",window.speechSynthesis.cancel(),window.speechSynthesis.speak(g)};async function r(l){let g=yl(l,t);if(e.onTranscript?.(l,g),!g)return null;if(g.type==="grid"){let d=bl(g.action,{root:e.gridRoot});return i(d?g.say:"No table rows found."),g}return t=g.type==="reset"?{...t,...gs}:{...t,...g.patch},await A(t),i(g.say),g}function s(){if(!qe()||n)return n;let l=window,g=l.SpeechRecognition??l.webkitSpeechRecognition;return g?(o=new g,o.lang=e.lang??"en-IN",o.continuous=!0,o.interimResults=!1,o.onresult=d=>{let u=d.results,I=u[u.length-1];I?.[0]?.transcript&&r(I[0].transcript)},o.onend=()=>{n&&o?.start()},o.onerror=d=>{(d.error==="not-allowed"||d.error==="service-not-allowed")&&(n=!1)},n=!0,o.start(),!0):!1}function a(){n=!1,o?.stop(),o=null}return{start:s,stop:a,handle:r,isListening:()=>n,getConfig:()=>({...t})}}x();var El="highlight|mark|flag|sort|order|rank|arrange|summari[sz]e|summary|recap|count|how many|open|select|pick|show|filter|find|list|clear|reset|remove|detect|spot|tell";function Zo(e){return e.replace(/[?!]/g," ").split(/\s*(?:;|\.(?!\d)\s*|,?\s*\band then\b|,?\s*\bthen\b|,?\s*\bafter that\b|,?\s*\bfinally\b|,?\s*\bnext\b|ఆ తర్వాత)\s*/i).flatMap(n=>n.split(new RegExp(`\\s*(?:,|\\band\\b)\\s+(?=(?:${El})\\b)`,"i"))).map(n=>n.trim()).filter(n=>n.length>1).map(n=>({action:_c(n),text:n}))}function _c(e){let t=e.toLowerCase();return/^(clear|reset|remove)\b/.test(t)?"clear":/unusual|anomal|outlier|suspicious|odd ones|duplicate/.test(t)?"anomalies":/summari[sz]e|summary|what changed|recap|overview/.test(t)?"summarize":/^(highlight|mark|flag)\b/.test(t)?"highlight":/^(sort|order|rank|arrange)\b/.test(t)?"sort":/^(count|how many)\b/.test(t)?"count":/^(open|go to)\b/.test(t)&&!/filtered|results?/.test(t)?"open":/^(select|pick)\b/.test(t)?"select":"filter"}function Xc(e){return e.replace(new RegExp(`^\\s*(?:${El}|open|go to)\\b`,"i")," ").replace(/\b(the|filtered|results?|rows?|records?|entries|items?|ones|them|those|only|me|all)\b/gi," ").replace(/\s+/g," ").trim()}function Bl(e,t){let o=t.find(i=>i.key===e.key)?.label??e.key,n=Array.isArray(e.value)?`${e.value[0]}\u2013${e.value[1]}`:typeof e.value=="number"?e.value.toLocaleString("en-IN",{maximumFractionDigits:2}):`"${e.value}"`,A={contains:"contains",equals:"is",startsWith:"starts with",endsWith:"ends with",greaterThan:">",lessThan:"<",between:"between"}[e.operator];return`${o} ${A} ${n}`}async function ds(e,t,o={}){let n=Zo(e),{columns:A,data:i}=t,r=[...t.filters??[]],s=[],a=null,l=[],g=()=>At(i,A,{filters:r,search:s,sort:a,limit:null,notes:[],explanation:""}),d={rows:g().length,filters:[...r]},u=[],I=()=>({...t,filters:r});for(let f=0;f<n.length;f++){let c=n[f],p=Xc(c.text),B;try{switch(c.action){case"clear":{r=[],s=[],a=null,l=[],t.onFiltersChange?.([]),t.onSortChange?.(null),t.onHighlightRows?.([]),B={...c,success:!0,message:`Cleared filters, sorting and highlights. ${i.length} row(s) shown.`};break}case"filter":{let h=wt(p,A,{data:i});if(!h.filters.length&&!h.search.length&&!h.sort){B={...c,success:!0,message:`Showing ${g().length} row(s) with the current filters.`};break}for(let S of h.filters)r=[...r.filter(D=>D.key!==S.key),S];s=[...s,...h.search],h.sort&&(a=h.sort,t.onSortChange?.(a)),t.onFiltersChange?.(r);let w=g(),b=w.map(S=>Qe(S,t.rowKey)).filter(Boolean);h.search.length&&b.length&&(l=b,t.onHighlightRows?.(b)),B={...c,success:!0,message:`${w.length} row(s) now shown. ${h.explanation}`,ids:b};break}case"highlight":{let h=g(),w=wt(p,A,{data:h}),S=(w.filters.length||w.search.length?At(h,A,{...w,sort:null,limit:w.limit}):h).map(T=>Qe(T,t.rowKey)).filter(Boolean);if(!S.length){B={...c,success:!1,message:`Nothing to highlight for "${p||"all rows"}".`};break}let D=Kt(I(),S);D.success&&(l=D.data??S),B={...c,success:D.success,message:D.success?`Highlighted ${l.length} row(s)${p?` matching "${p}"`:""}.`:D.message,ids:l};break}case"sort":{let w=wt(c.text,A,{data:i}).sort;if(!w){let S=He(p,A);S&&(w={key:S.key,direction:/desc|high|large|big|most|newest|latest|z.?to.?a/i.test(c.text)?"desc":"asc"})}if(!w){B={...c,success:!1,message:`Which column should I sort by? Columns: ${A.map(S=>S.label).join(", ")}.`};break}a=w,t.onSortChange?.(a);let b=A.find(S=>S.key===a.key)?.label??a.key;B={...c,success:!0,message:`Sorted by ${b} (${a.direction==="desc"?"high \u2192 low":"low \u2192 high"}).`};break}case"count":{B={...c,success:!0,message:`${g().length} row(s) shown${l.length?`, ${l.length} highlighted`:""}.`};break}case"anomalies":{let h=g(),w=Xo(h,A,{rowKey:t.rowKey}),b=Array.from(new Set(w.map(S=>S.rowId)));if(b.length){let S=Kt(I(),b);S.success&&(l=S.data??b)}B={...c,success:!0,message:w.length?`${b.length} unusual row(s): ${w.slice(0,5).map(S=>S.reason).join(" ")}`:"Nothing unusual in the shown rows.",ids:b};break}case"open":case"select":{let h=g(),b=h.find(T=>p&&Qe(T,t.rowKey).toLowerCase()===p.toLowerCase())??At(h,A,wt(p,A,{data:h}))[0]??(p?void 0:h[0]);if(!b){B={...c,success:!1,message:`No row matches "${p}".`};break}let S=Qe(b,t.rowKey),D=c.action==="open"?lo(I(),S):ao(I(),S);B={...c,success:D.success,message:D.message,ids:[S]};break}case"summarize":{let h=g();B={...c,success:!0,message:`${Ql(d,h.length,r,a,l,A)}
1556
+ ${jo(h,A)}`};break}}}catch(h){B={...c,success:!1,message:`This step failed: ${h instanceof Error?h.message:String(h)}`}}u.push(B),o.onStep?.(B,f,n.length)}let y=g().length;return{steps:u,before:d,after:{rows:y,filters:r,sort:a,highlighted:l},summary:Ql(d,y,r,a,l,A)}}function Ql(e,t,o,n,A,i){let r=[`Rows: ${e.rows} \u2192 ${t}.`],s=o.filter(l=>!e.filters.some(g=>JSON.stringify(g)===JSON.stringify(l))),a=e.filters.filter(l=>!o.some(g=>JSON.stringify(l)===JSON.stringify(g)));return s.length&&r.push(`Filters added: ${s.map(l=>Bl(l,i)).join("; ")}.`),a.length&&r.push(`Filters removed: ${a.map(l=>Bl(l,i)).join("; ")}.`),n&&r.push(`Sorted by ${i.find(l=>l.key===n.key)?.label??n.key} ${n.direction==="desc"?"high \u2192 low":"low \u2192 high"}.`),A.length&&r.push(`${A.length} row(s) highlighted.`),r.join(" ")}x();var tn=e=>{let t=typeof e=="number"?e:Number(String(e??"").replace(/[,₹$%\s]/g,""));return Number.isFinite(t)?t:null},wl=e=>{let t=e instanceof Date?e.getTime():new Date(String(e??"")).getTime();return Number.isFinite(t)?t:null};function Wt(e,t){if(t==="count")return e.length;if(!e.length)return 0;switch(t){case"sum":return e.reduce((o,n)=>o+n,0);case"avg":return e.reduce((o,n)=>o+n,0)/e.length;case"min":return Math.min(...e);case"max":return Math.max(...e)}}function xl(e,t,o,n="sum"){let A=new Map;for(let i of e){let r=String(i[t]??"\u2014").trim()||"\u2014",s=A.get(r)??[];if(o===null||n==="count")s.push(1);else{let a=tn(i[o]);a!==null&&s.push(a)}A.set(r,s)}return Array.from(A.entries()).map(([i,r])=>({group:i,value:Wt(r,n),count:r.length})).sort((i,r)=>r.value-i.value)}function Is(e,t,o=1){let n=new Date(e);return n.setHours(0,0,0,0),t==="week"&&n.setDate(n.getDate()-(n.getDay()-o+7)%7),t==="month"&&n.setDate(1),t==="quarter"&&n.setMonth(Math.floor(n.getMonth()/3)*3,1),t==="year"&&n.setMonth(0,1),n}function en(e,t,o){let n=new Date(e);return t==="day"&&n.setDate(n.getDate()+o),t==="week"&&n.setDate(n.getDate()+7*o),t==="month"&&n.setMonth(n.getMonth()+o),t==="quarter"&&n.setMonth(n.getMonth()+3*o),t==="year"&&n.setFullYear(n.getFullYear()+o),n}function kl(e,t){let o=t.referenceDate?new Date(t.referenceDate):new Date,n=Is(o,t.period,t.weekStartsOn),A=t.toDate===!1?en(n,t.period,1):new Date(Math.max(o.getTime()+1,n.getTime()+1)),i=en(n,t.period,-1),r=t.toDate===!1?n:new Date(i.getTime()+(A.getTime()-n.getTime())),s=t.agg??"sum",a=new Map,l=new Map;for(let u of e){let I=wl(u[t.dateKey]);if(I===null)continue;let y=I>=n.getTime()&&I<A.getTime()?a:I>=i.getTime()&&I<r.getTime()?l:null;if(!y)continue;let f=t.groupKey?String(u[t.groupKey]??"\u2014"):"All",c=s==="count"?1:tn(u[t.metricKey]);c!==null&&y.set(f,[...y.get(f)??[],c])}let g=new Set([...a.keys(),...l.keys()]),d=Array.from(g).map(u=>{let I=Wt(a.get(u)??[],s),y=Wt(l.get(u)??[],s);return{group:u,current:I,previous:y,change:I-y,changePct:y===0?null:(I-y)/Math.abs(y)*100}});return{period:t.period,current:{from:n,to:A},previous:{from:i,to:r},rows:d}}function Sl(e,t,o,n,A="sum"){let i=new Map;for(let r of e){let s=wl(r[t]),a=A==="count"?1:tn(r[o]);if(s===null||a===null)continue;let l=Is(new Date(s),n).getTime();i.set(l,[...i.get(l)??[],a])}return Array.from(i.entries()).sort((r,s)=>r[0]-s[0]).map(([r,s])=>({start:new Date(r),value:Wt(s,A)}))}var jc=/rate|conversion|ratio|percent|%|score|rating|margin|ctr|avg|average/i;function Zc(e){let t=e.match(/\b(today|yesterday|this|last|previous|past)\s*(day|week|month|quarter|year)?\b/);return t?t[1]==="today"?{period:"day",shift:0}:t[1]==="yesterday"?{period:"day",shift:-1}:t[2]?{period:t[2],shift:t[1]==="this"?0:-1}:null:null}var Ge=e=>e.toLocaleString("en-IN",{maximumFractionDigits:2}),us=e=>e===null?"new":`${e>0?"+":""}${e.toFixed(1)}%`;function ps(e,t,o,n={}){let A=e.toLowerCase(),i=o.filter(h=>h.type==="number"),r=He(A,o,"number")??i.find(h=>/amount|revenue|sales|total|value/i.test(`${h.key} ${h.label}`))??i[0],s=o.find(h=>h.type==="date")??o.find(h=>/date|time|day|created|month/i.test(`${h.key} ${h.label}`)),a=A.match(/\b(?:which|by|per|each|across|every|top|for each)\s+([\p{L}\p{M}\p{N} _]+)/u)?.[1]??"",l=He(a,o,"text"),g=/how many|number of|count/.test(A),d=g?"count":/average|avg|mean/.test(A)?"avg":/\btotal\b|\bsum\b/.test(A)?"sum":r&&jc.test(`${r.key} ${r.label}`)?"avg":"sum",u=/drop|decline|decrease|fell|fall|down|worst|lost|shrink|reduc/.test(A),I=/increase|growth|grew|rise|rose|up\b|best|improv|gain/.test(A),y=/lowest|least|smallest|bottom|worst|minimum/.test(A),f=Zc(A);if(!r&&!g)return{kind:"unknown",answer:"I couldn't find a numeric column to analyse.",table:[]};let c=g?"rows":r.label;if(f&&s&&(I||u||/change|compare|vs|versus/.test(A))){let h=n.referenceDate?new Date(n.referenceDate):new Date,w=f.shift?en(h,f.period,f.shift):h,S=[...kl(t,{dateKey:s.key,metricKey:r?.key??s.key,groupKey:l?.key,agg:d,period:f.period,referenceDate:w,toDate:f.shift===0}).rows].sort((ee,te)=>u?ee.change-te.change:te.change-ee.change),D=S.map(ee=>({[l?.label??"Group"]:ee.group,Current:Ge(ee.current),Previous:Ge(ee.previous),Change:Ge(ee.change),"Change %":us(ee.changePct)}));if(!S.length)return{kind:"period-change",answer:`No ${c} data in this ${f.period} or the one before.`,table:D};let T=S[0],z=`${f.shift?"last":"this"} ${f.period} vs the ${f.period} before`,Z=T.change===0?"did not change":T.change<0?`dropped ${Ge(Math.abs(T.change))}`:`rose ${Ge(T.change)}`,R=`${c} ${Z} (${Ge(T.previous)} \u2192 ${Ge(T.current)}, ${us(T.changePct)}) \u2014 ${z}.`,G=u&&T.change>=0||I&&T.change<=0;return{kind:"period-change",answer:l?G?`No ${l.label.toLowerCase()} ${u?"dropped":"grew"}. Closest is ${T.group}: ${R}`:`${T.group}: ${R}`:R,table:D}}if(/trend|over time|month by month|week by week/.test(A)&&s&&r){let h=/week/.test(A)?"week":/day|daily/.test(A)?"day":/year/.test(A)?"year":"month",w=Sl(t,s.key,r.key,h,d),b=w.map(z=>({Period:z.start.toISOString().slice(0,10),[r.label]:Ge(z.value)}));if(w.length<2)return{kind:"trend",answer:`Not enough ${h}s of data for a trend.`,table:b};let S=w[0].value,D=w[w.length-1].value,T=w.reduce((z,Z)=>Z.value>z.value?Z:z);return{kind:"trend",answer:`${r.label} went from ${Ge(S)} to ${Ge(D)} over ${w.length} ${h}s (${us(S?(D-S)/Math.abs(S)*100:null)}). Peak: ${Ge(T.value)} in the ${h} of ${T.start.toISOString().slice(0,10)}.`,table:b}}if(l){let h=xl(t,l.key,r?.key??null,d),w=y?[...h].reverse():h,b=w.map(D=>({[l.label]:D.group,[`${d} of ${c}`]:Ge(D.value),Rows:D.count}));if(!w.length)return{kind:"group",answer:"No data.",table:b};let S=w[0];return{kind:"group",answer:`${S.group} has the ${y?"lowest":"highest"} ${d==="sum"?"total":d==="avg"?"average":d} ${c}: ${Ge(S.value)} (across ${w.length} ${l.label.toLowerCase()} groups).`,table:b}}let p=g?t.map(()=>1):t.map(h=>tn(h[r.key])).filter(h=>h!==null),B=Wt(p,d);return{kind:"total",answer:`${d==="avg"?"Average":d==="count"?"Count of":d==="sum"?"Total":d} ${c}: ${Ge(B)} across ${t.length} row(s).`,table:[{Metric:c,Aggregation:d,Value:Ge(B)}]}}x();var vl={high:12,medium:6,low:2};function ms(e={}){let t=Le(e.root),o=[],n=(s,a,l,g,d)=>o.push({category:s,severity:a,message:l,suggestion:g,selector:d?Oe(d):void 0});if(t&&qe()){let s=e.minFontSize??14,a=e.maxLineLength??90,l=R=>window.getComputedStyle(R),g=j(t,"h1");g.length===0&&n("hierarchy","medium","There is no h1, so the page has no clear main title.","Add one prominent h1 near the top."),g.length>1&&n("hierarchy","low",`${g.length} h1 headings compete for attention.`,"Keep one h1 and demote the rest.",g[1]);let d=R=>{let G=j(t,R)[0];return G&&parseFloat(l(G).fontSize)||0},[u,I,y]=[d("h1"),d("h2"),d("h3")];u&&I&&I>=u&&n("hierarchy","medium",`h2 (${I}px) is as large as or larger than h1 (${u}px).`,"Make each heading level visibly smaller than the one above it."),I&&y&&y>I&&n("hierarchy","low",`h3 (${y}px) is larger than h2 (${I}px).`,"Keep heading sizes in descending order.");let f=nt({root:e.root,skip:["color-contrast","target-size","duplicate-id","page-title","html-lang","form-error","positive-tabindex"]});for(let R of f.issues.filter(G=>G.rule==="heading-order").slice(0,3))n("hierarchy","low",R.message,R.fix,R.element);let c=0,p;for(let R of j(t,"p,li,td,span,a,label,small,div").slice(0,1500)){if(!eo(R))continue;(parseFloat(l(R).fontSize)||16)<s&&(c++,p??=R)}c&&n("readability",c>10?"high":"medium",`${c} text element(s) are smaller than ${s}px, e.g. "${Be(p?.textContent??"",30)}".`,`Use at least ${s}px for body text (16px for senior-friendly pages).`,p);for(let R of j(t,"p").slice(0,200)){let G=l(R),k=parseFloat(G.fontSize)||16,ee=R.getBoundingClientRect().width,te=ee/(k*.5);if(ee>0&&te>a&&(R.textContent??"").length>a){n("readability","low",`A paragraph is about ${Math.round(te)} characters wide.`,`Limit text width to ~${a} characters (e.g. max-width: 70ch).`,R);break}let $=parseFloat(G.lineHeight);if(Number.isFinite($)&&$/k<1.3){n("readability","low",`Line height is ${($/k).toFixed(2)}\xD7 the font size.`,"Use line-height of at least 1.5 for body text (WCAG 1.4.12).",R);break}}let B=nt({root:e.root,skip:["html-lang","page-title","image-alt","heading-order","single-h1","landmark-main","form-label","button-name","link-name","positive-tabindex","keyboard-access","duplicate-id","form-error","target-size"]});B.issues.length&&n("readability",B.issues.length>5?"high":"medium",`${B.issues.length} text element(s) have weak contrast. ${B.issues[0].message}`,"Raise contrast to at least 4.5:1 for body text.",B.issues[0].element);let h=ed();h.length&&n("interaction","high",`Focus outlines are removed by CSS (${h.slice(0,2).join(", ")}) with no replacement.`,"Never remove outlines without a visible :focus-visible style (WCAG 2.4.7).");let w=j(t,To).filter(R=>{let G=R.getBoundingClientRect();return G.width>0&&G.height>0&&(G.width<24||G.height<24)&&!(R.tagName==="A"&&R.closest("p,li"))});w.length&&n("interaction",w.length>5?"high":"medium",`${w.length} control(s) are smaller than 24\xD724px.`,"Give controls at least 24\xD724px, ideally 44\xD744px for touch and seniors.",w[0]);let b=window.innerHeight||800,S=j(t,ka).filter(R=>{let G=R.getBoundingClientRect();return G.height>0&&G.top<b});S.length>40&&n("clutter","medium",`${S.length} interactive elements in the first screen.`,"Group secondary actions into menus and keep the first screen focused on one task.");let D=j(t,"button,a[href],[role='button']").filter(R=>{let G=R.getBoundingClientRect();if(G.height===0||G.top>b)return!1;let k=l(R).backgroundColor;return!!k&&!/rgba\(0, 0, 0, 0\)|transparent/.test(k)&&!/rgb\(255, 255, 255\)/.test(k)});D.length>4&&n("clutter","medium",`${D.length} filled buttons compete in the first screen.`,"Keep one primary action per view; make the rest secondary (outline or text).",D[0]);let T=new Set,z=new Set;for(let R of j(t,"body *").slice(0,2e3)){if(!eo(R))continue;let G=l(R);T.add(G.fontFamily.split(",")[0].replace(/["']/g,"").trim().toLowerCase()),z.add(Math.round(parseFloat(G.fontSize)||0))}T.size>4&&n("consistency","low",`${T.size} different font families are used.`,"Stick to 1\u20132 font families (e.g. one Telugu + one Latin)."),z.size>10&&n("consistency","low",`${z.size} different font sizes are used.`,"Use a small type scale (5\u20137 sizes) for a calmer page.");let Z=j(t,"img:not([width]):not([height])").filter(R=>!l(R).aspectRatio||l(R).aspectRatio==="auto");Z.length>3&&n("consistency","low",`${Z.length} images have no width/height, so the layout jumps while loading.`,"Set width and height (or aspect-ratio) on images.",Z[0])}let A=["hierarchy","readability","interaction","clutter","consistency"].reduce((s,a)=>{let l=o.filter(g=>g.category===a);return s[a]={score:Math.max(0,100-l.reduce((g,d)=>g+vl[d.severity]*2,0)),findings:l.length},s},{}),i=Math.max(0,100-o.reduce((s,a)=>s+vl[a.severity],0)),r=Object.entries(A).sort((s,a)=>s[1].score-a[1].score)[0];return{score:i,categories:A,findings:o,summary:o.length?`Design score ${i}/100 with ${o.length} finding(s). Weakest area: ${r[0]}.`:"No design issues found by the automatic review."}}function ed(){let e=[],t=!1,o=n=>{for(let A of Array.from(n)){let i=A.cssRules;i&&o(i);let r=A;if(!r.selectorText||!/:focus/.test(r.selectorText))continue;let s=`${r.style.outline} ${r.style.outlineStyle} ${r.style.outlineWidth}`,a=/\bnone\b|\b0(px)?\b/.test(s),l=!!(r.style.boxShadow&&r.style.boxShadow!=="none")||!!r.style.borderColor||!!r.style.backgroundColor||!!r.style.textDecoration;/:focus-visible/.test(r.selectorText)&&(!a||l)&&(t=!0),a&&!l&&e.push(r.selectorText)}};for(let n of Array.from(document.styleSheets))try{o(n.cssRules)}catch{}return t?[]:e}x();var O=require("react");var v=require("react/jsx-runtime"),td=/\b(trend|over time|this (week|month|quarter|year)|last (week|month|quarter|year)|compare|versus|vs)\b|\b(by|per|each|which)\b.*\b(total|average|avg|sum|drop|increase|growth|highest|lowest|most|least)\b|\b(total|average|avg|sum)\b.*\b(by|per|each)\b/i;function od(e){let{data:t,rowKey:o="id"}=e,n=(0,O.useMemo)(()=>ct(e.columns),[e.columns]),[A,i]=(0,O.useState)([]),[r,s]=(0,O.useState)(null),[a,l]=(0,O.useState)([]),[g,d]=(0,O.useState)(""),[u,I]=(0,O.useState)(null),[y,f]=(0,O.useState)([]),[c,p]=(0,O.useState)([]),[B,h]=(0,O.useState)(!1),w=(0,O.useRef)(A);w.current=A;let b=(0,O.useCallback)(()=>({data:t,columns:n,rowKey:o,filters:w.current,onFiltersChange:z=>{w.current=z,i(z)},onSortChange:s,onHighlightRows:l,onOpenRow:e.onOpenRow,onSelectRow:z=>l([z])}),[t,n,o,e.onOpenRow]),S=(0,O.useCallback)(async z=>{let Z=z.trim();if(Z){h(!0),p([]),f([]);try{if(Zo(Z).length>1){let R=[],G=await ds(Z,b(),{onStep:k=>p((R.push(k),[...R]))});I("tasks"),d(G.summary)}else if(td.test(Z)){let R=At(t,n,{filters:w.current,search:[],sort:null,limit:null,notes:[],explanation:""}),G=ps(Z,R,n,{referenceDate:e.referenceDate});I("insight"),d(G.answer),f(G.table)}else{let R=as(Z,b());I(R.kind),d(R.message)}}finally{h(!1)}}},[b,t,n,e.referenceDate]),D=(0,O.useCallback)(()=>{w.current=[],i([]),s(null),l([]),d(""),I(null),f([]),p([])},[]),T=(0,O.useMemo)(()=>At(t,n,{filters:A,search:[],sort:r,limit:null,notes:[],explanation:""}),[t,n,A,r]);return{gridData:T,highlightIds:a,filters:A,sort:r,ask:S,reset:D,answer:g,kind:u,table:y,steps:c,busy:B,visibleIds:T.map(z=>Qe(z,o))}}var Ml={border:"1px solid color-mix(in srgb, CanvasText 20%, transparent)",borderRadius:12,padding:16,background:"Canvas",color:"CanvasText",font:"inherit"},ye={minHeight:44,padding:"8px 14px",borderRadius:8,border:"1px solid color-mix(in srgb, CanvasText 35%, transparent)",background:"ButtonFace",color:"ButtonText",font:"inherit",cursor:"pointer"},Cs={...ye,flex:1,minWidth:0,background:"Field",color:"FieldText",cursor:"text"},nn={opacity:.75,fontSize:"0.9em"};function fs({rows:e}){if(!e.length)return null;let t=Object.keys(e[0]);return(0,v.jsx)("div",{style:{overflowX:"auto",marginTop:12},children:(0,v.jsxs)("table",{style:{borderCollapse:"collapse",width:"100%"},children:[(0,v.jsx)("thead",{children:(0,v.jsx)("tr",{children:t.map(o=>(0,v.jsx)("th",{scope:"col",style:{textAlign:"left",padding:"6px 8px",borderBottom:"1px solid currentColor"},children:o},o))})}),(0,v.jsx)("tbody",{children:e.slice(0,50).map((o,n)=>(0,v.jsx)("tr",{children:t.map(A=>(0,v.jsx)("td",{style:{padding:"6px 8px",borderBottom:"1px solid color-mix(in srgb, CanvasText 12%, transparent)"},children:o[A]},A))},n))})]})})}function Dl(e,t,o){let n=URL.createObjectURL(new Blob([t],{type:o})),A=document.createElement("a");A.href=n,A.download=e,A.click(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}function nd({grid:e,placeholder:t="Ask about this data, e.g. \u201Coverdue and over \u20B910,000\u201D",examples:o=[],style:n}){let[A,i]=(0,O.useState)(""),r=s=>{s.preventDefault(),e.ask(A)};return(0,v.jsxs)("section",{"data-yuktai-panel":"","aria-label":"Data assistant",style:{...Ml,...n},children:[(0,v.jsxs)("form",{onSubmit:r,style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,v.jsx)("label",{htmlFor:"yuktai-grid-ask",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:"Question about the data"}),(0,v.jsx)("input",{id:"yuktai-grid-ask",value:A,onChange:s=>i(s.target.value),placeholder:t,style:Cs}),(0,v.jsx)("button",{type:"submit",style:ye,disabled:e.busy,children:e.busy?"Working\u2026":"Ask"}),(0,v.jsx)("button",{type:"button",style:ye,onClick:()=>{i(""),e.reset()},children:"Reset"})]}),o.length>0&&(0,v.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap",marginTop:8},children:o.map(s=>(0,v.jsx)("button",{type:"button",style:{...ye,minHeight:36,fontSize:"0.85em"},onClick:()=>{i(s),e.ask(s)},children:s},s))}),(0,v.jsx)("div",{"aria-live":"polite",style:{marginTop:12,whiteSpace:"pre-line"},children:e.answer}),e.steps.length>0&&(0,v.jsx)("ol",{style:{marginTop:8,paddingLeft:20},children:e.steps.map((s,a)=>(0,v.jsxs)("li",{style:{marginBottom:4},children:[(0,v.jsx)("span",{"aria-hidden":"true",children:s.success?"\u2705 ":"\u26A0\uFE0F "}),(0,v.jsx)("strong",{children:s.text})," \u2014 ",(0,v.jsx)("span",{style:{whiteSpace:"pre-line"},children:s.message})]},a))}),(0,v.jsx)(fs,{rows:e.table})]})}var on=[["copilot","Copilot"],["qa","QA report"],["forms","Forms"],["design","Design"],["ask","Ask page"],["voice","Voice"]];function Ad({defaultTab:e="copilot",voiceLang:t="en-IN",generate:o,engine:n,style:A}){let[i,r]=(0,O.useState)(e),s=(0,O.useRef)([]),a=(l,g)=>{let d=l.key==="ArrowRight"?1:l.key==="ArrowLeft"?-1:0;if(!d)return;l.preventDefault();let u=(g+d+on.length)%on.length;r(on[u][0]),s.current[u]?.focus()};return(0,v.jsxs)("section",{"data-yuktai-panel":"","aria-label":"yuktai agentic tools",style:{...Ml,...A},children:[(0,v.jsx)("div",{role:"tablist","aria-label":"Tools",style:{display:"flex",gap:6,flexWrap:"wrap",marginBottom:12},children:on.map(([l,g],d)=>(0,v.jsx)("button",{ref:u=>{s.current[d]=u},role:"tab",id:`yuktai-tab-${l}`,"aria-selected":i===l,"aria-controls":`yuktai-tabpanel-${l}`,tabIndex:i===l?0:-1,onClick:()=>r(l),onKeyDown:u=>a(u,d),style:{...ye,fontWeight:i===l?700:400,outlineOffset:2,borderWidth:i===l?2:1},children:g},l))}),(0,v.jsxs)("div",{role:"tabpanel",id:`yuktai-tabpanel-${i}`,"aria-labelledby":`yuktai-tab-${i}`,children:[i==="copilot"&&(0,v.jsx)(rd,{}),i==="qa"&&(0,v.jsx)(id,{}),i==="forms"&&(0,v.jsx)(sd,{}),i==="design"&&(0,v.jsx)(ad,{}),i==="ask"&&(0,v.jsx)(ld,{generate:o,engine:n}),i==="voice"&&(0,v.jsx)(gd,{lang:t})]})]})}function rd(){let e=(0,O.useRef)(null),[t,o]=(0,O.useState)(null),[n,A]=(0,O.useState)(null),[i,r]=(0,O.useState)("");(0,O.useEffect)(()=>(e.current=ns({onUpdate:o}),e.current.scan(),()=>e.current?.stop()),[]);let s=e.current,a=t?.report?.issues??[];return(0,v.jsxs)("div",{children:[(0,v.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,v.jsx)("button",{type:"button",style:ye,onClick:()=>t?.watching?s?.stop():s?.start(),children:t?.watching?"Stop watching":"Watch page live"}),(0,v.jsx)("button",{type:"button",style:ye,onClick:()=>s?.scan(),children:"Scan now"}),(0,v.jsx)("button",{type:"button",style:ye,onClick:()=>r(`${s?.applyAllFixes().filter(l=>l.applied).length??0} fix(es) applied.`),children:"Apply safe fixes"}),(0,v.jsx)("button",{type:"button",style:ye,onClick:()=>r(`${s?.undoAll()??0} change(s) undone.`),children:"Undo all"})]}),(0,v.jsxs)("p",{"aria-live":"polite",style:{marginTop:12},children:[t?.report?.summary," ",i]}),(0,v.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0},children:a.slice(0,40).map(l=>(0,v.jsxs)("li",{style:{borderTop:"1px solid color-mix(in srgb, CanvasText 12%, transparent)",padding:"8px 0"},children:[(0,v.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[(0,v.jsx)("span",{style:{...nn,minWidth:70},children:l.severity}),(0,v.jsx)("span",{style:{flex:1},children:l.message}),(0,v.jsx)("button",{type:"button",style:ye,"aria-expanded":n===l.id,onClick:()=>A(n===l.id?null:l.id),children:"Why?"}),l.autoFixable&&(0,v.jsx)("button",{type:"button",style:ye,onClick:()=>r(s?.applyFix(l.id).message??""),children:"Fix"})]}),n===l.id&&(0,v.jsx)("p",{style:{whiteSpace:"pre-line",margin:"8px 0 0"},children:s?.explain(l.id)})]},l.id))})]})}function id(){let[e,t]=(0,O.useState)(null);return(0,v.jsxs)("div",{children:[(0,v.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,v.jsx)("button",{type:"button",style:ye,onClick:()=>t(nt()),children:"Run QA check"}),e&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("button",{type:"button",style:ye,onClick:()=>Dl("accessibility-report.md",ts(e),"text/markdown"),children:"Download .md"}),(0,v.jsx)("button",{type:"button",style:ye,onClick:()=>Dl("accessibility-report.json",os(e),"application/json"),children:"Download .json"})]})]}),e&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("p",{"aria-live":"polite",style:{marginTop:12},children:[(0,v.jsx)("strong",{children:e.passed?"PASS":"FAIL"})," \u2014 ",e.summary]}),(0,v.jsx)(fs,{rows:e.checks.map(o=>({Check:o.title,Result:o.passed?"\u2705 Pass":"\u274C Fail",Issues:o.issueCount}))})]})]})}function sd(){let[e,t]=(0,O.useState)(null);return(0,v.jsxs)("div",{children:[(0,v.jsx)("button",{type:"button",style:ye,onClick:()=>t(fo()),children:"Review forms"}),(0,v.jsxs)("div",{"aria-live":"polite",children:[e&&e.length===0&&(0,v.jsx)("p",{children:"No forms on this page."}),e?.map(o=>(0,v.jsxs)("div",{style:{marginTop:12},children:[(0,v.jsx)("p",{children:(0,v.jsx)("strong",{children:o.summary})}),(0,v.jsx)("ul",{children:o.findings.map((n,A)=>(0,v.jsxs)("li",{children:[n.level==="problem"?"Problem: ":"Suggestion: ",n.message," ",(0,v.jsx)("span",{style:nn,children:n.suggestion})]},A))})]},o.selector))]})]})}function ad(){let[e,t]=(0,O.useState)(null);return(0,v.jsxs)("div",{children:[(0,v.jsx)("button",{type:"button",style:ye,onClick:()=>t(ms()),children:"Review design"}),e&&(0,v.jsxs)("div",{"aria-live":"polite",children:[(0,v.jsx)("p",{style:{marginTop:12},children:(0,v.jsx)("strong",{children:e.summary})}),(0,v.jsx)(fs,{rows:Object.entries(e.categories).map(([o,n])=>({Area:o,Score:n.score,Findings:n.findings}))}),(0,v.jsx)("ul",{children:e.findings.map((o,n)=>(0,v.jsxs)("li",{children:["[",o.severity,"] ",o.message," ",(0,v.jsx)("span",{style:nn,children:o.suggestion})]},n))})]})]})}function ld({generate:e,engine:t}){let[o,n]=(0,O.useState)(""),A=(0,O.useRef)(null),i=(0,O.useRef)(t),[r,s]=(0,O.useState)(""),[a,l]=(0,O.useState)([]);return(0,v.jsxs)("div",{children:[(0,v.jsxs)("form",{onSubmit:async d=>{if(d.preventDefault(),!o.trim())return;let u=await As(o);if(u.intent!=="unknown"&&u.intent!=="purpose"){s(u.answer),l(u.suggestions);return}!A.current||i.current!==t?(A.current=ro({engine:t}),i.current=t):A.current.rebuild();let I=await A.current.ask(o,{generate:e});s(u.intent==="purpose"&&!I.hits.length?u.answer:I.hits.length?I.answer:u.answer),l(u.suggestions)},style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,v.jsx)("label",{htmlFor:"yuktai-page-ask",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:"Question about this page"}),(0,v.jsx)("input",{id:"yuktai-page-ask",value:o,onChange:d=>n(d.target.value),placeholder:"What does this page do? Which fields are missing labels?",style:Cs}),(0,v.jsx)("button",{type:"submit",style:ye,children:"Ask"})]}),(0,v.jsx)("p",{"aria-live":"polite",style:{whiteSpace:"pre-line",marginTop:12},children:r}),a.length>0&&(0,v.jsx)("ul",{children:a.map((d,u)=>(0,v.jsx)("li",{children:d},u))})]})}function gd({lang:e}){let t=(0,O.useMemo)(()=>cs({lang:e,onTranscript:(a,l)=>i(`\u201C${a}\u201D \u2192 ${l?l.say:"not a command"}`)}),[e]),[o,n]=(0,O.useState)(!1),[A,i]=(0,O.useState)(""),[r,s]=(0,O.useState)("");return(0,O.useEffect)(()=>()=>t.stop(),[t]),(0,v.jsxs)("div",{children:[(0,v.jsx)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:(0,v.jsx)("button",{type:"button",style:ye,"aria-pressed":o,onClick:()=>{o?(t.stop(),n(!1)):n(t.start())},children:o?"Stop listening":"Start voice commands"})}),(0,v.jsxs)("form",{onSubmit:a=>{a.preventDefault(),t.handle(r),s("")},style:{display:"flex",gap:8,marginTop:8,flexWrap:"wrap"},children:[(0,v.jsx)("label",{htmlFor:"yuktai-voice-typed",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:"Type a command"}),(0,v.jsx)("input",{id:"yuktai-voice-typed",value:r,onChange:a=>s(a.target.value),placeholder:"Or type: turn on high contrast",style:Cs}),(0,v.jsx)("button",{type:"submit",style:ye,children:"Run"})]}),(0,v.jsx)("p",{"aria-live":"polite",style:{marginTop:12},children:A}),(0,v.jsx)("p",{style:nn,children:"Try: \u201Cturn on high contrast\u201D, \u201Cbigger text\u201D, \u201Cdark mode off\u201D, \u201Cnext row\u201D, \u201C\u0C2A\u0C46\u0C26\u0C4D\u0C26 \u0C05\u0C15\u0C4D\u0C37\u0C30\u0C3E\u0C32\u0C41\u201D, \u201Creset settings\u201D."})]})}function cd(){if(typeof globalThis>"u")return new gt;if(!globalThis.__yuktai_runtime__){let e=new gt;e.register(ve.name,ve),e.register(io.name,io),e.register(so.name,so),globalThis.__yuktai_runtime__=e}return globalThis.__yuktai_runtime__}var Gl=typeof window<"u"?cd():new gt,dd={wcagPlugin:ve,list(){return Gl.getPlugins()},use(e){return Gl.use(e)},fix(e){return ve.applyFixes({enabled:!0,autoFix:!0,...e})},scan(){return ve.scan()}};