@hanzo/browser-extension 1.9.71 → 1.9.72

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.
@@ -1,9 +1,9 @@
1
- "use strict";(()=>{var He=Object.create;var ie=Object.defineProperty;var Ze=Object.getOwnPropertyDescriptor;var qe=Object.getOwnPropertyNames;var Ye=Object.getPrototypeOf,Je=Object.prototype.hasOwnProperty;var Xe=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}};var Qe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of qe(t))!Je.call(e,s)&&s!==n&&ie(e,s,{get:()=>t[s],enumerable:!(r=Ze(t,s))||r.enumerable});return e};var et=(e,t,n)=>(n=e!=null?He(Ye(e)):{},Qe(t||!e||!e.__esModule?ie(n,"default",{value:e,enumerable:!0}):n,e));var ae=Xe((G,oe)=>{(function(e,t){if(typeof define=="function"&&define.amd)define("webextension-polyfill",["module"],t);else if(typeof G<"u")t(oe);else{var n={exports:{}};t(n),e.browser=n.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:G,function(e){"use strict";if(!(globalThis.chrome&&globalThis.chrome.runtime&&globalThis.chrome.runtime.id))throw new Error("This script should only be loaded in a browser extension.");if(globalThis.browser&&globalThis.browser.runtime&&globalThis.browser.runtime.id)e.exports=globalThis.browser;else{let t="The message port closed before a response was received.",n=r=>{let s={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(s).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class o extends WeakMap{constructor(a,u=void 0){super(u),this.createItem=a}get(a){return this.has(a)||this.set(a,this.createItem(a)),super.get(a)}}let c=i=>i&&typeof i=="object"&&typeof i.then=="function",f=(i,a)=>(...u)=>{r.runtime.lastError?i.reject(new Error(r.runtime.lastError.message)):a.singleCallbackArg||u.length<=1&&a.singleCallbackArg!==!1?i.resolve(u[0]):i.resolve(u)},p=i=>i==1?"argument":"arguments",_=(i,a)=>function(m,...A){if(A.length<a.minArgs)throw new Error(`Expected at least ${a.minArgs} ${p(a.minArgs)} for ${i}(), got ${A.length}`);if(A.length>a.maxArgs)throw new Error(`Expected at most ${a.maxArgs} ${p(a.maxArgs)} for ${i}(), got ${A.length}`);return new Promise((y,b)=>{if(a.fallbackToNoCallback)try{m[i](...A,f({resolve:y,reject:b},a))}catch(l){console.warn(`${i} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,l),m[i](...A),a.fallbackToNoCallback=!1,a.noCallback=!0,y()}else a.noCallback?(m[i](...A),y()):m[i](...A,f({resolve:y,reject:b},a))})},E=(i,a,u)=>new Proxy(a,{apply(m,A,y){return u.call(A,i,...y)}}),k=Function.call.bind(Object.prototype.hasOwnProperty),S=(i,a={},u={})=>{let m=Object.create(null),A={has(b,l){return l in i||l in m},get(b,l,T){if(l in m)return m[l];if(!(l in i))return;let h=i[l];if(typeof h=="function")if(typeof a[l]=="function")h=E(i,i[l],a[l]);else if(k(u,l)){let N=_(l,u[l]);h=E(i,i[l],N)}else h=h.bind(i);else if(typeof h=="object"&&h!==null&&(k(a,l)||k(u,l)))h=S(h,a[l],u[l]);else if(k(u,"*"))h=S(h,a[l],u["*"]);else return Object.defineProperty(m,l,{configurable:!0,enumerable:!0,get(){return i[l]},set(N){i[l]=N}}),h;return m[l]=h,h},set(b,l,T,h){return l in m?m[l]=T:i[l]=T,!0},defineProperty(b,l,T){return Reflect.defineProperty(m,l,T)},deleteProperty(b,l){return Reflect.deleteProperty(m,l)}},y=Object.create(i);return new Proxy(y,A)},C=i=>({addListener(a,u,...m){a.addListener(i.get(u),...m)},hasListener(a,u){return a.hasListener(i.get(u))},removeListener(a,u){a.removeListener(i.get(u))}}),Ke=new o(i=>typeof i!="function"?i:function(u){let m=S(u,{},{getContent:{minArgs:0,maxArgs:0}});i(m)}),re=new o(i=>typeof i!="function"?i:function(u,m,A){let y=!1,b,l=new Promise(D=>{b=function(x){y=!0,D(x)}}),T;try{T=i(u,m,b)}catch(D){T=Promise.reject(D)}let h=T!==!0&&c(T);if(T!==!0&&!h&&!y)return!1;let N=D=>{D.then(x=>{A(x)},x=>{let F;x&&(x instanceof Error||typeof x.message=="string")?F=x.message:F="An unexpected error occurred",A({__mozWebExtensionPolyfillReject__:!0,message:F})}).catch(x=>{console.error("Failed to send onMessage rejected reply",x)})};return N(h?T:l),!0}),Ve=({reject:i,resolve:a},u)=>{r.runtime.lastError?r.runtime.lastError.message===t?a():i(new Error(r.runtime.lastError.message)):u&&u.__mozWebExtensionPolyfillReject__?i(new Error(u.message)):a(u)},se=(i,a,u,...m)=>{if(m.length<a.minArgs)throw new Error(`Expected at least ${a.minArgs} ${p(a.minArgs)} for ${i}(), got ${m.length}`);if(m.length>a.maxArgs)throw new Error(`Expected at most ${a.maxArgs} ${p(a.maxArgs)} for ${i}(), got ${m.length}`);return new Promise((A,y)=>{let b=Ve.bind(null,{resolve:A,reject:y});m.push(b),u.sendMessage(...m)})},We={devtools:{network:{onRequestFinished:C(Ke)}},runtime:{onMessage:C(re),onMessageExternal:C(re),sendMessage:se.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:se.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},B={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return s.privacy={network:{"*":B},services:{"*":B},websites:{"*":B}},S(r,We,s)};e.exports=n(chrome)}})});var Dn=et(ae());var g={SIGNUP_VIEWED:"signup_viewed",SIGNUP_SUBMITTED:"signup_submitted",SIGNUP_VERIFIED:"signup_verified",SIGNUP_COMPLETED:"signup_completed",LOGIN_COMPLETED:"login_completed",FIRST_ACTION:"first_action",WAITLIST_JOINED:"waitlist_joined",WAITLIST_SHARED:"waitlist_shared",REFERRAL_USED:"referral_used",REFERRAL_CLAIMED:"referral_claimed",PRICING_VIEWED:"pricing_viewed",PLAN_CLICKED:"plan_clicked",CHECKOUT_STARTED:"checkout_started",ORDER_COMPLETED:"order_completed",FEATURE_USED:"feature_used",API_KEY_CREATED:"api_key_created",APP_CREATED:"app_created",PROJECT_CREATED:"project_created",AGENT_CREATED:"agent_created",CHAT_STARTED:"chat_started",CHAT_MESSAGE_SENT:"chat_message_sent",MODEL_SWITCHED:"model_switched",TASK_STARTED:"task_started",TASK_COMPLETED:"task_completed",BUILD_STARTED:"build_started",GENERATION_COMPLETED:"generation_completed",GENERATION_FAILED:"generation_failed",DEPLOY_STARTED:"deploy_started",DEPLOY_SUCCEEDED:"deploy_succeeded",DEPLOY_FAILED:"deploy_failed"},w="$pageview",O="$exception";var d=(e,t,n)=>({event:e,label:t,...n??{}}),j={signup:{label:"Signup",products:["site","id"],join:"aggregate",steps:[d(w,"Landed",{product:"site"}),d(g.SIGNUP_VIEWED,"Opened signup",{product:"site"}),d(g.SIGNUP_SUBMITTED,"Redirected to Hanzo ID",{product:"site"}),d(g.SIGNUP_VIEWED,"Saw the form",{product:"id"}),d(g.SIGNUP_SUBMITTED,"Submitted the form",{product:"id"}),d(g.SIGNUP_COMPLETED,"Account created",{product:"site"})]},apiActivation:{label:"API activation",products:["site","cloud"],join:"person",steps:[d(g.SIGNUP_COMPLETED,"Account created"),d(g.API_KEY_CREATED,"Key minted"),d(g.FIRST_ACTION,"First successful API call",{where:{property:"action",equals:"api_call"}})]},upgrade:{label:"Upgrade",products:["site","app","console","billing","pay"],join:"person",steps:[d(g.PRICING_VIEWED,"Viewed pricing"),d(g.PLAN_CLICKED,"Chose a plan"),d(g.CHECKOUT_STARTED,"Left for checkout",{product:"billing"}),d(g.CHECKOUT_STARTED,"Reached the card form",{product:"pay"}),d(g.ORDER_COMPLETED,"Paid")]},appShip:{label:"Describe \u2192 ship",products:["app"],join:"person",steps:[d(w,"Landed"),d(g.BUILD_STARTED,"Described an app"),d(g.GENERATION_COMPLETED,"Got a working build"),d(g.DEPLOY_STARTED,"Hit publish"),d(g.DEPLOY_SUCCEEDED,"Live URL")]},chatEngage:{label:"Chat engagement",products:["chat"],join:"person",steps:[d(w,"Landed"),d(g.CHAT_STARTED,"Started a conversation"),d(g.CHAT_MESSAGE_SENT,"Sent a message"),d(g.GENERATION_COMPLETED,"Got an answer")]},siteToChat:{label:"Site \u2192 Chat handoff",products:["site","chat"],join:"aggregate",steps:[d(g.CHAT_STARTED,"Submitted the hanzo.ai composer",{product:"site",where:{property:"source",equals:"composer"}}),d(g.CHAT_STARTED,"Landed in hanzo.chat",{product:"chat",where:{property:"referrerProduct",equals:"site"}}),d(g.GENERATION_COMPLETED,"Got an answer")]}};function I(e){return j[e].steps.map(t=>t.event)}var An=Object.freeze(Object.values(g)),_n=Object.freeze([w,O]);var rt=["facebook.","instagram.","twitter.","x.com","t.co","linkedin.","reddit.","youtube.","tiktok.","pinterest.","news.ycombinator.com"],st=["google.","bing.","duckduckgo.","yahoo.","baidu.","ecosia."];function it(e,t){let n=new URLSearchParams(e||""),r=o=>{let c=n.get(o);return c?c.trim():void 0},s={utm:{source:r("utm_source"),medium:r("utm_medium"),campaign:r("utm_campaign"),term:r("utm_term"),content:r("utm_content")},referrer:t?t.trim():void 0,refCode:r("ref")||r("refCode")||r("ref_code")||void 0};return s.channel=ve(s),s}function ve(e){let t=(e.utm.medium||"").toLowerCase();if(/(cpc|ppc|paid|paidsearch|display|cpm)/.test(t))return"paid";if(e.utm.source||e.utm.campaign)return"campaign";if(e.refCode)return"referral";let n=xe(e.referrer);return n?rt.some(r=>n.includes(r))?"social":st.some(r=>n.includes(r))?"organic":"referral":"direct"}function xe(e){if(!e)return"";let t=e.trim(),n=t.indexOf("://");n>=0&&(t=t.slice(n+3));let r=t.search(/[/?#]/);r>=0&&(t=t.slice(0,r));let s=t.indexOf("@");s>=0&&(t=t.slice(s+1));let o=t.indexOf(":");return o>=0&&(t=t.slice(0,o)),t.toLowerCase().trim()}function ot(e){return!!(e.utm.source||e.utm.medium||e.utm.campaign||e.utm.term||e.utm.content||e.refCode||e.referrer&&xe(e.referrer))}var at=Object.freeze({console:"019fa40b-94ae-7f1d-8f7b-e92f123fad42",app:"019f9b1e-57eb-7171-9d92-72c0b85e4b4b",site:"019f9b1e-5785-7359-ad0b-f75db8e58c99"});function ce(e,t){if(!e||!t)return;let n=at[e];if(n)return`https://${t}@api.hanzo.ai/v1/event/${n}`}var ct=Object.freeze({hanzo:Object.freeze(["hanzo.ai","hanzo.app","hanzo.bot","hanzo.chat","hanzo.codes","hanzo.id","hanzo.sh","hanzo.team","hanzo.ventures","hanzo.works","hanzoskills.com"]),lux:Object.freeze(["lux.network","lux.exchange","lux.market","lux.finance","lux.financial","lux.credit","lux.fund","lux.id"]),zoo:Object.freeze(["zoo.ngo","zoo.network","zoolabs.id","zoolabs.io"])}),we=Object.freeze({hanzo:"pk-rM_CdaF2MQckGCrla113SrR1oH4zvqN8xh2I95Z9tY8",lux:"pk-gUZp6ZVfhJzSwK-rb4oLbVkpCnMBx5uSCpxf_5yEhQk",zoo:"pk-3TKpKnERV9AQSsBUERWkZejC1O1mUxc1jRzsP3MPbs4"}),lt="pk-",gt=e=>e.trim().toLowerCase().replace(/\.$/,"").split(":")[0]??"";function ut(e){let t=gt(e);if(!t)return;let n,r=0;for(let[s,o]of Object.entries(ct))for(let c of o)(t===c||t.endsWith(`.${c}`))&&c.length>r&&(n=s,r=c.length);return n}function mt(e,t=we){let n=ut(e);if(!n)return;let r=t[n];if(typeof r!="string")return;let s=r.trim();return s.startsWith(lt)?s:void 0}function dt(e=we){if(!(typeof location>"u"))return mt(location.hostname,e)}var q="[redacted]",ft="[email]",le="[ip]",pt=[/-----BEGIN[ A-Z]*PRIVATE KEY-----[\s\S]*?-----END[ A-Z]*PRIVATE KEY-----/g,/eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}/g,/\bbearer\s+[A-Za-z0-9._~+/-]{12,}=*/gi,/\b(?:sk|pk|rk)-[A-Za-z0-9]{2,}-?[A-Za-z0-9]{12,}/g,/\b(?:sk|pk)_(?:live|test)_[A-Za-z0-9]{16,}/g,/\bhk-[A-Za-z0-9]{16,}/g,/\bAKIA[0-9A-Z]{16}\b/g,/\bASIA[0-9A-Z]{16}\b/g,/\bAIza[0-9A-Za-z_-]{20,}/g,/\bgh[posru]_[A-Za-z0-9]{20,}/g,/\bxox[baprs]-[A-Za-z0-9-]{10,}/g,/[a-zA-Z][a-zA-Z0-9+.-]{0,32}:\/\/[^\s:@/]{1,256}:[^\s@/]{1,256}@/g],ht=/\b(?:\d[ -]?){13,19}\b/g;function At(e){let t=0,n=!1;for(let r=e.length-1;r>=0;r--){let s=e.charCodeAt(r)-48;n&&(s*=2,s>9&&(s-=9)),t+=s,n=!n}return t%10===0}function _t(e){return e.replace(ht,t=>{let n=t.replace(/[ -]/g,"");return n.length<13||n.length>19?t:At(n)?q:t})}var Et=/[A-Za-z0-9._%+-]{1,64}@[A-Za-z0-9.-]{1,255}\.[A-Za-z]{2,24}/g,yt=/\b(?:\d{1,3}\.){3}\d{1,3}\b/g,bt=/\b(?:[0-9A-Fa-f]{1,4}:){2,7}[0-9A-Fa-f]{1,4}\b/g,Tt=["code","state","token","access_token","id_token","refresh_token","auth","authorization","secret","client_secret","password","passwd","pwd","api_key","apikey","key","session","session_id","sid","sig","signature","nonce","otp","invite","invitation","reset_token","confirmation_token","magic","ticket","assertion"],vt=new RegExp("([?&#;](?:"+Tt.join("|")+")=)[^&#;\\s]{1,4096}","gi");function xt(e){return e.replace(vt,(t,n)=>n+q)}function wt(e){e=xt(e);for(let t of pt)e=e.replace(t,q);return _t(e)}function kt(e){return e=e.replace(Et,ft),e=e.replace(bt,le),e=e.replace(yt,le),e}var St=8192;function Ct(e,t=St){return e.length>t?e.slice(0,t)+"\u2026 [truncated]":e}function L(e,t=!1){return e?(e=Ct(e),e=wt(e),t||(e=kt(e)),e):e??""}var z="iam-anon-id",K=["hz_anon_id","hz_id"],V="hanzo.ai",It=2*365*24*60*60,ge;function U(e){var t=new Uint8Array(16),n,r=typeof crypto<"u"?crypto:void 0;if(r&&typeof r.getRandomValues=="function")r.getRandomValues(t);else for(n=0;n<16;n++)t[n]=Math.random()*256|0;var s=Math.floor(e===void 0?Date.now():e);for(n=5;n>=0;n--)t[n]=s%256,s=Math.floor(s/256);t[6]=112|t[6]&15,t[8]=128|t[8]&63;var o="";for(n=0;n<16;n++)o+=(t[n]+256).toString(16).slice(1),(n===3||n===5||n===7||n===9)&&(o+="-");return o}function ke(){try{return typeof document>"u"||typeof document.cookie!="string"?null:document}catch{return null}}function Pt(){try{return typeof window>"u"||!window.localStorage?null:window.localStorage}catch{return null}}function Se(e,t){try{return e&&e.getItem(t)||""}catch{return""}}function Ce(e){var t=ke();if(!t)return"";for(var n=t.cookie.split(";"),r=0;r<n.length;r++){var s=n[r].indexOf("=");if(!(s<0||n[r].slice(0,s).trim()!==e)){var o=n[r].slice(s+1).trim();if(o)try{return decodeURIComponent(o)}catch{return o}}}return""}function Nt(e,t){var n=ke();if(n){var r="",s=!1;try{typeof window<"u"&&window.location&&(r=window.location.hostname||"",s=window.location.protocol==="https:")}catch{}var o=e+"="+encodeURIComponent(t);o+="; Path=/; Max-Age="+It+"; SameSite=Lax",("."+r).slice(-(V.length+1))==="."+V&&(o+="; Domain="+V),s&&(o+="; Secure");try{n.cookie=o}catch{}}}function Ot(e){for(var t=0;t<K.length;t++){var n=Ce(K[t])||Se(e,K[t]);if(n)return n}return""}function Rt(){if(typeof window>"u")return"";var e=Pt(),t=Ce(z)||Se(e,z)||Ot(e)||ge||U();ge=t,Nt(z,t);try{e&&e.getItem(z)!==t&&e.setItem(z,t)}catch{}return t}var Dt="0.3.41",Ie=Dt,ue=50,zt=500,Lt=2048,me=1024,Ut=50;function Mt(){return U().replace(/-/g,"")}function $t(e){return typeof TextEncoder<"u"?new TextEncoder().encode(e).length:typeof Buffer<"u"?Buffer.byteLength(e,"utf8"):e.length}function de(e){if(!e)return null;let t=/^(https?):\/\/([^@]+)@([^/]+)(\/.*)?$/.exec(e.trim());if(!t)return null;let n=t[1],r=t[2],s=t[3],o=t[4]??"";if(!r||!s)return null;let c=o.split("/").filter(Boolean),f=c.length>0?c[c.length-1]:"";if(!f)return null;let p=`${n}://${s}`,_=`${p}/${c.map(encodeURIComponent).join("/")}`,E=`${_}/envelope/?sentry_key=${encodeURIComponent(r)}`;return{publicKey:r,origin:p,projectId:f,base:_,ingestUrl:E}}var Bt=/^\s*at\s+(?:(.+?)\s+\()?(?:(.+?):(\d+):(\d+)|([^)]+))\)?\s*$/,Ft=/^\s*(?:(.*?)@)?(.+?):(\d+):(\d+)\s*$/;function Gt(e){return e?!(e.includes("node_modules")||e.startsWith("webpack-internal")||e.startsWith("webpack://")||e.startsWith("chrome-extension://")||e.startsWith("moz-extension://")):!1}function Pe(e){if(!e)return[];let t=e.split(`
2
- `,zt),n=[];for(let r of t){if(r.length>Lt)continue;let s=r.trimEnd();if(!s)continue;let o,c="",f=0,p=0,_=Bt.exec(s);if(_)o=_[1],_[2]?(c=_[2],f=Number(_[3])||0,p=Number(_[4])||0):c=(_[5]||"").trim();else{let E=Ft.exec(s);if(!E)continue;o=E[1],c=E[2],f=Number(E[3])||0,p=Number(E[4])||0}!c&&!o||n.push({function:o||"<anonymous>",filename:c,abs_path:c,lineno:f,colno:p,in_app:Gt(c)})}return n.reverse(),n.length>ue?n.slice(n.length-ue):n}function Y(e){if(e instanceof Error){let t=W(e,"name"),n=W(e,"message"),r=W(e,"stack");return{name:typeof t=="string"&&t?t:"Error",message:typeof n=="string"&&n?n:H(e),stack:typeof r=="string"?r:void 0}}if(typeof e=="string")return{name:"Error",message:e};try{return{name:"Error",message:JSON.stringify(e)??H(e)}}catch{return{name:"Error",message:H(e)}}}function W(e,t){try{return e[t]}catch{return}}function H(e){try{return String(e)}catch{return"[unstringifiable]"}}function jt(e){let t=typeof e=="string"?e:(()=>{try{return JSON.stringify(e)??String(e)}catch{try{return String(e)}catch{return"[unstringifiable]"}}})();return t.length>me?t.slice(0,me):t}function Kt(e){let{error:t,options:n={},identity:r,capturePII:s=!1}=e,o=Y(t),c=n.handled!==!1,f=n.level??(c?"error":"fatal"),p={handled:String(c)};r.product&&(p.product=r.product),r.sessionId&&(p.session=r.sessionId);try{let E=n.properties??{},k=0;for(let S of Object.keys(E)){if(k>=Ut)break;try{let C=E[S];if(C==null)continue;p[S]=L(jt(C),s),k++}catch{continue}}}catch{}let _={event_id:e.id??Mt(),timestamp:(e.now??Date.now())/1e3,platform:"javascript",level:f,logger:r.product,environment:r.environment,release:r.release,exception:{values:[{type:o.name,value:L(o.message,s),stacktrace:{frames:Pe(o.stack)}}]},tags:p,sdk:{name:"@hanzo/event",version:Ie}};return r.userId&&(_.user={id:r.userId}),_}function Vt(e,t,n){let r=JSON.stringify(e),s=JSON.stringify({event_id:e.event_id,dsn:t.base,sent_at:n??new Date().toISOString()}),o=JSON.stringify({type:"event",content_type:"application/json",length:$t(r)});return`${s}
1
+ "use strict";(()=>{var He=Object.create;var oe=Object.defineProperty;var Ze=Object.getOwnPropertyDescriptor;var qe=Object.getOwnPropertyNames;var Ye=Object.getPrototypeOf,Je=Object.prototype.hasOwnProperty;var Xe=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}};var Qe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of qe(t))!Je.call(e,s)&&s!==n&&oe(e,s,{get:()=>t[s],enumerable:!(r=Ze(t,s))||r.enumerable});return e};var et=(e,t,n)=>(n=e!=null?He(Ye(e)):{},Qe(t||!e||!e.__esModule?oe(n,"default",{value:e,enumerable:!0}):n,e));var ce=Xe((G,ae)=>{(function(e,t){if(typeof define=="function"&&define.amd)define("webextension-polyfill",["module"],t);else if(typeof G<"u")t(ae);else{var n={exports:{}};t(n),e.browser=n.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:G,function(e){"use strict";if(!(globalThis.chrome&&globalThis.chrome.runtime&&globalThis.chrome.runtime.id))throw new Error("This script should only be loaded in a browser extension.");if(globalThis.browser&&globalThis.browser.runtime&&globalThis.browser.runtime.id)e.exports=globalThis.browser;else{let t="The message port closed before a response was received.",n=r=>{let s={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(s).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class o extends WeakMap{constructor(a,u=void 0){super(u),this.createItem=a}get(a){return this.has(a)||this.set(a,this.createItem(a)),super.get(a)}}let c=i=>i&&typeof i=="object"&&typeof i.then=="function",f=(i,a)=>(...u)=>{r.runtime.lastError?i.reject(new Error(r.runtime.lastError.message)):a.singleCallbackArg||u.length<=1&&a.singleCallbackArg!==!1?i.resolve(u[0]):i.resolve(u)},p=i=>i==1?"argument":"arguments",_=(i,a)=>function(m,...A){if(A.length<a.minArgs)throw new Error(`Expected at least ${a.minArgs} ${p(a.minArgs)} for ${i}(), got ${A.length}`);if(A.length>a.maxArgs)throw new Error(`Expected at most ${a.maxArgs} ${p(a.maxArgs)} for ${i}(), got ${A.length}`);return new Promise((y,b)=>{if(a.fallbackToNoCallback)try{m[i](...A,f({resolve:y,reject:b},a))}catch(l){console.warn(`${i} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,l),m[i](...A),a.fallbackToNoCallback=!1,a.noCallback=!0,y()}else a.noCallback?(m[i](...A),y()):m[i](...A,f({resolve:y,reject:b},a))})},E=(i,a,u)=>new Proxy(a,{apply(m,A,y){return u.call(A,i,...y)}}),k=Function.call.bind(Object.prototype.hasOwnProperty),S=(i,a={},u={})=>{let m=Object.create(null),A={has(b,l){return l in i||l in m},get(b,l,T){if(l in m)return m[l];if(!(l in i))return;let h=i[l];if(typeof h=="function")if(typeof a[l]=="function")h=E(i,i[l],a[l]);else if(k(u,l)){let N=_(l,u[l]);h=E(i,i[l],N)}else h=h.bind(i);else if(typeof h=="object"&&h!==null&&(k(a,l)||k(u,l)))h=S(h,a[l],u[l]);else if(k(u,"*"))h=S(h,a[l],u["*"]);else return Object.defineProperty(m,l,{configurable:!0,enumerable:!0,get(){return i[l]},set(N){i[l]=N}}),h;return m[l]=h,h},set(b,l,T,h){return l in m?m[l]=T:i[l]=T,!0},defineProperty(b,l,T){return Reflect.defineProperty(m,l,T)},deleteProperty(b,l){return Reflect.deleteProperty(m,l)}},y=Object.create(i);return new Proxy(y,A)},C=i=>({addListener(a,u,...m){a.addListener(i.get(u),...m)},hasListener(a,u){return a.hasListener(i.get(u))},removeListener(a,u){a.removeListener(i.get(u))}}),Ke=new o(i=>typeof i!="function"?i:function(u){let m=S(u,{},{getContent:{minArgs:0,maxArgs:0}});i(m)}),se=new o(i=>typeof i!="function"?i:function(u,m,A){let y=!1,b,l=new Promise(D=>{b=function(x){y=!0,D(x)}}),T;try{T=i(u,m,b)}catch(D){T=Promise.reject(D)}let h=T!==!0&&c(T);if(T!==!0&&!h&&!y)return!1;let N=D=>{D.then(x=>{A(x)},x=>{let F;x&&(x instanceof Error||typeof x.message=="string")?F=x.message:F="An unexpected error occurred",A({__mozWebExtensionPolyfillReject__:!0,message:F})}).catch(x=>{console.error("Failed to send onMessage rejected reply",x)})};return N(h?T:l),!0}),Ve=({reject:i,resolve:a},u)=>{r.runtime.lastError?r.runtime.lastError.message===t?a():i(new Error(r.runtime.lastError.message)):u&&u.__mozWebExtensionPolyfillReject__?i(new Error(u.message)):a(u)},ie=(i,a,u,...m)=>{if(m.length<a.minArgs)throw new Error(`Expected at least ${a.minArgs} ${p(a.minArgs)} for ${i}(), got ${m.length}`);if(m.length>a.maxArgs)throw new Error(`Expected at most ${a.maxArgs} ${p(a.maxArgs)} for ${i}(), got ${m.length}`);return new Promise((A,y)=>{let b=Ve.bind(null,{resolve:A,reject:y});m.push(b),u.sendMessage(...m)})},We={devtools:{network:{onRequestFinished:C(Ke)}},runtime:{onMessage:C(se),onMessageExternal:C(se),sendMessage:ie.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:ie.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},B={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return s.privacy={network:{"*":B},services:{"*":B},websites:{"*":B}},S(r,We,s)};e.exports=n(chrome)}})});var Dn=et(ce());var g={SIGNUP_VIEWED:"signup_viewed",SIGNUP_SUBMITTED:"signup_submitted",SIGNUP_VERIFIED:"signup_verified",SIGNUP_COMPLETED:"signup_completed",LOGIN_COMPLETED:"login_completed",FIRST_ACTION:"first_action",WAITLIST_JOINED:"waitlist_joined",WAITLIST_SHARED:"waitlist_shared",REFERRAL_USED:"referral_used",REFERRAL_CLAIMED:"referral_claimed",PRICING_VIEWED:"pricing_viewed",PLAN_CLICKED:"plan_clicked",CHECKOUT_STARTED:"checkout_started",ORDER_COMPLETED:"order_completed",FEATURE_USED:"feature_used",API_KEY_CREATED:"api_key_created",APP_CREATED:"app_created",PROJECT_CREATED:"project_created",AGENT_CREATED:"agent_created",CHAT_STARTED:"chat_started",CHAT_MESSAGE_SENT:"chat_message_sent",MODEL_SWITCHED:"model_switched",TASK_STARTED:"task_started",TASK_COMPLETED:"task_completed",BUILD_STARTED:"build_started",GENERATION_COMPLETED:"generation_completed",GENERATION_FAILED:"generation_failed",DEPLOY_STARTED:"deploy_started",DEPLOY_SUCCEEDED:"deploy_succeeded",DEPLOY_FAILED:"deploy_failed"},w="$pageview",O="$exception";var d=(e,t,n)=>({event:e,label:t,...n??{}}),j={signup:{label:"Signup",products:["site","id"],join:"aggregate",steps:[d(w,"Landed",{product:"site"}),d(g.SIGNUP_VIEWED,"Opened signup",{product:"site"}),d(g.SIGNUP_SUBMITTED,"Redirected to Hanzo ID",{product:"site"}),d(g.SIGNUP_VIEWED,"Saw the form",{product:"id"}),d(g.SIGNUP_SUBMITTED,"Submitted the form",{product:"id"}),d(g.SIGNUP_COMPLETED,"Account created",{product:"site"})]},apiActivation:{label:"API activation",products:["site","cloud"],join:"person",steps:[d(g.SIGNUP_COMPLETED,"Account created"),d(g.API_KEY_CREATED,"Key minted"),d(g.FIRST_ACTION,"First successful API call",{where:{property:"action",equals:"api_call"}})]},upgrade:{label:"Upgrade",products:["site","app","console","billing","pay"],join:"person",steps:[d(g.PRICING_VIEWED,"Viewed pricing"),d(g.PLAN_CLICKED,"Chose a plan"),d(g.CHECKOUT_STARTED,"Left for checkout",{product:"billing"}),d(g.CHECKOUT_STARTED,"Reached the card form",{product:"pay"}),d(g.ORDER_COMPLETED,"Paid")]},appShip:{label:"Describe \u2192 ship",products:["app"],join:"person",steps:[d(w,"Landed"),d(g.BUILD_STARTED,"Described an app"),d(g.GENERATION_COMPLETED,"Got a working build"),d(g.DEPLOY_STARTED,"Hit publish"),d(g.DEPLOY_SUCCEEDED,"Live URL")]},chatEngage:{label:"Chat engagement",products:["chat"],join:"person",steps:[d(w,"Landed"),d(g.CHAT_STARTED,"Started a conversation"),d(g.CHAT_MESSAGE_SENT,"Sent a message"),d(g.GENERATION_COMPLETED,"Got an answer")]},siteToChat:{label:"Site \u2192 Chat handoff",products:["site","chat"],join:"aggregate",steps:[d(g.CHAT_STARTED,"Submitted the hanzo.ai composer",{product:"site",where:{property:"source",equals:"composer"}}),d(g.CHAT_STARTED,"Landed in hanzo.chat",{product:"chat",where:{property:"referrerProduct",equals:"site"}}),d(g.GENERATION_COMPLETED,"Got an answer")]}};function I(e){return j[e].steps.map(t=>t.event)}var An=Object.freeze(Object.values(g)),_n=Object.freeze([w,O]);var rt=["facebook.","instagram.","twitter.","x.com","t.co","linkedin.","reddit.","youtube.","tiktok.","pinterest.","news.ycombinator.com"],st=["google.","bing.","duckduckgo.","yahoo.","baidu.","ecosia."];function it(e,t){let n=new URLSearchParams(e||""),r=o=>{let c=n.get(o);return c?c.trim():void 0},s={utm:{source:r("utm_source"),medium:r("utm_medium"),campaign:r("utm_campaign"),term:r("utm_term"),content:r("utm_content")},referrer:t?t.trim():void 0,refCode:r("ref")||r("refCode")||r("ref_code")||void 0};return s.channel=xe(s),s}function xe(e){let t=(e.utm.medium||"").toLowerCase();if(/(cpc|ppc|paid|paidsearch|display|cpm)/.test(t))return"paid";if(e.utm.source||e.utm.campaign)return"campaign";if(e.refCode)return"referral";let n=we(e.referrer);return n?rt.some(r=>n.includes(r))?"social":st.some(r=>n.includes(r))?"organic":"referral":"direct"}function we(e){if(!e)return"";let t=e.trim(),n=t.indexOf("://");n>=0&&(t=t.slice(n+3));let r=t.search(/[/?#]/);r>=0&&(t=t.slice(0,r));let s=t.indexOf("@");s>=0&&(t=t.slice(s+1));let o=t.indexOf(":");return o>=0&&(t=t.slice(0,o)),t.toLowerCase().trim()}function ot(e){return!!(e.utm.source||e.utm.medium||e.utm.campaign||e.utm.term||e.utm.content||e.refCode||e.referrer&&we(e.referrer))}var at=Object.freeze({console:"019fa40b-94ae-7f1d-8f7b-e92f123fad42",app:"019f9b1e-57eb-7171-9d92-72c0b85e4b4b",site:"019f9b1e-5785-7359-ad0b-f75db8e58c99"});function le(e,t){if(!e||!t)return;let n=at[e];if(n)return`https://${t}@api.hanzo.ai/v1/event/${n}`}var ct=Object.freeze({hanzo:Object.freeze(["hanzo.ai","hanzo.app","hanzo.bot","hanzo.chat","hanzo.codes","hanzo.id","hanzo.sh","hanzo.team","hanzo.ventures","hanzo.works","hanzoskills.com"]),lux:Object.freeze(["lux.network","lux.exchange","lux.market","lux.finance","lux.financial","lux.credit","lux.fund","lux.id"]),zoo:Object.freeze(["zoo.ngo","zoo.network","zoolabs.id","zoolabs.io"])}),ke=Object.freeze({hanzo:"pk-rM_CdaF2MQckGCrla113SrR1oH4zvqN8xh2I95Z9tY8",lux:"pk-gUZp6ZVfhJzSwK-rb4oLbVkpCnMBx5uSCpxf_5yEhQk",zoo:"pk-3TKpKnERV9AQSsBUERWkZejC1O1mUxc1jRzsP3MPbs4"}),lt="pk-",gt=e=>e.trim().toLowerCase().replace(/\.$/,"").split(":")[0]??"";function ut(e){let t=gt(e);if(!t)return;let n,r=0;for(let[s,o]of Object.entries(ct))for(let c of o)(t===c||t.endsWith(`.${c}`))&&c.length>r&&(n=s,r=c.length);return n}function mt(e,t=ke){let n=ut(e);if(!n)return;let r=t[n];if(typeof r!="string")return;let s=r.trim();return s.startsWith(lt)?s:void 0}function dt(e=ke){if(!(typeof location>"u"))return mt(location.hostname,e)}var q="[redacted]",ft="[email]",ge="[ip]",pt=[/-----BEGIN[ A-Z]*PRIVATE KEY-----[\s\S]*?-----END[ A-Z]*PRIVATE KEY-----/g,/eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}/g,/\bbearer\s+[A-Za-z0-9._~+/-]{12,}=*/gi,/\b(?:sk|pk|rk)-[A-Za-z0-9]{2,}-?[A-Za-z0-9]{12,}/g,/\b(?:sk|pk)_(?:live|test)_[A-Za-z0-9]{16,}/g,/\bhk-[A-Za-z0-9]{16,}/g,/\bAKIA[0-9A-Z]{16}\b/g,/\bASIA[0-9A-Z]{16}\b/g,/\bAIza[0-9A-Za-z_-]{20,}/g,/\bgh[posru]_[A-Za-z0-9]{20,}/g,/\bxox[baprs]-[A-Za-z0-9-]{10,}/g,/[a-zA-Z][a-zA-Z0-9+.-]{0,32}:\/\/[^\s:@/]{1,256}:[^\s@/]{1,256}@/g],ht=/\b(?:\d[ -]?){13,19}\b/g;function At(e){let t=0,n=!1;for(let r=e.length-1;r>=0;r--){let s=e.charCodeAt(r)-48;n&&(s*=2,s>9&&(s-=9)),t+=s,n=!n}return t%10===0}function _t(e){return e.replace(ht,t=>{let n=t.replace(/[ -]/g,"");return n.length<13||n.length>19?t:At(n)?q:t})}var Et=/[A-Za-z0-9._%+-]{1,64}@[A-Za-z0-9.-]{1,255}\.[A-Za-z]{2,24}/g,yt=/\b(?:\d{1,3}\.){3}\d{1,3}\b/g,bt=/\b(?:[0-9A-Fa-f]{1,4}:){2,7}[0-9A-Fa-f]{1,4}\b/g,Tt=["code","state","token","access_token","id_token","refresh_token","auth","authorization","secret","client_secret","password","passwd","pwd","api_key","apikey","key","session","session_id","sid","sig","signature","nonce","otp","invite","invitation","reset_token","confirmation_token","magic","ticket","assertion"],vt=new RegExp("([?&#;](?:"+Tt.join("|")+")=)[^&#;\\s]{1,4096}","gi");function xt(e){return e.replace(vt,(t,n)=>n+q)}function wt(e){e=xt(e);for(let t of pt)e=e.replace(t,q);return _t(e)}function kt(e){return e=e.replace(Et,ft),e=e.replace(bt,ge),e=e.replace(yt,ge),e}var St=8192;function Ct(e,t=St){return e.length>t?e.slice(0,t)+"\u2026 [truncated]":e}function z(e,t=!1){return e?(e=Ct(e),e=wt(e),t||(e=kt(e)),e):e??""}var L="iam-anon-id",K=["hz_anon_id","hz_id"],V="hanzo.ai",It=2*365*24*60*60,ue;function U(e){var t=new Uint8Array(16),n,r=typeof crypto<"u"?crypto:void 0;if(r&&typeof r.getRandomValues=="function")r.getRandomValues(t);else for(n=0;n<16;n++)t[n]=Math.random()*256|0;var s=Math.floor(e===void 0?Date.now():e);for(n=5;n>=0;n--)t[n]=s%256,s=Math.floor(s/256);t[6]=112|t[6]&15,t[8]=128|t[8]&63;var o="";for(n=0;n<16;n++)o+=(t[n]+256).toString(16).slice(1),(n===3||n===5||n===7||n===9)&&(o+="-");return o}function Se(){try{return typeof document>"u"||typeof document.cookie!="string"?null:document}catch{return null}}function Pt(){try{return typeof window>"u"||!window.localStorage?null:window.localStorage}catch{return null}}function Ce(e,t){try{return e&&e.getItem(t)||""}catch{return""}}function Ie(e){var t=Se();if(!t)return"";for(var n=t.cookie.split(";"),r=0;r<n.length;r++){var s=n[r].indexOf("=");if(!(s<0||n[r].slice(0,s).trim()!==e)){var o=n[r].slice(s+1).trim();if(o)try{return decodeURIComponent(o)}catch{return o}}}return""}function Nt(e,t){var n=Se();if(n){var r="",s=!1;try{typeof window<"u"&&window.location&&(r=window.location.hostname||"",s=window.location.protocol==="https:")}catch{}var o=e+"="+encodeURIComponent(t);o+="; Path=/; Max-Age="+It+"; SameSite=Lax",("."+r).slice(-(V.length+1))==="."+V&&(o+="; Domain="+V),s&&(o+="; Secure");try{n.cookie=o}catch{}}}function Ot(e){for(var t=0;t<K.length;t++){var n=Ie(K[t])||Ce(e,K[t]);if(n)return n}return""}function Rt(){if(typeof window>"u")return"";var e=Pt(),t=Ie(L)||Ce(e,L)||Ot(e)||ue||U();ue=t,Nt(L,t);try{e&&e.getItem(L)!==t&&e.setItem(L,t)}catch{}return t}var Dt="0.3.41",Pe=Dt,me=50,Lt=500,zt=2048,de=1024,Ut=50;function Mt(){return U().replace(/-/g,"")}function $t(e){return typeof TextEncoder<"u"?new TextEncoder().encode(e).length:typeof Buffer<"u"?Buffer.byteLength(e,"utf8"):e.length}function fe(e){if(!e)return null;let t=/^(https?):\/\/([^@]+)@([^/]+)(\/.*)?$/.exec(e.trim());if(!t)return null;let n=t[1],r=t[2],s=t[3],o=t[4]??"";if(!r||!s)return null;let c=o.split("/").filter(Boolean),f=c.length>0?c[c.length-1]:"";if(!f)return null;let p=`${n}://${s}`,_=`${p}/${c.map(encodeURIComponent).join("/")}`,E=`${_}/envelope/?sentry_key=${encodeURIComponent(r)}`;return{publicKey:r,origin:p,projectId:f,base:_,ingestUrl:E}}var Bt=/^\s*at\s+(?:(.+?)\s+\()?(?:(.+?):(\d+):(\d+)|([^)]+))\)?\s*$/,Ft=/^\s*(?:(.*?)@)?(.+?):(\d+):(\d+)\s*$/;function Gt(e){return e?!(e.includes("node_modules")||e.startsWith("webpack-internal")||e.startsWith("webpack://")||e.startsWith("chrome-extension://")||e.startsWith("moz-extension://")):!1}function Ne(e){if(!e)return[];let t=e.split(`
2
+ `,Lt),n=[];for(let r of t){if(r.length>zt)continue;let s=r.trimEnd();if(!s)continue;let o,c="",f=0,p=0,_=Bt.exec(s);if(_)o=_[1],_[2]?(c=_[2],f=Number(_[3])||0,p=Number(_[4])||0):c=(_[5]||"").trim();else{let E=Ft.exec(s);if(!E)continue;o=E[1],c=E[2],f=Number(E[3])||0,p=Number(E[4])||0}!c&&!o||n.push({function:o||"<anonymous>",filename:c,abs_path:c,lineno:f,colno:p,in_app:Gt(c)})}return n.reverse(),n.length>me?n.slice(n.length-me):n}function Y(e){if(e instanceof Error){let t=W(e,"name"),n=W(e,"message"),r=W(e,"stack");return{name:typeof t=="string"&&t?t:"Error",message:typeof n=="string"&&n?n:H(e),stack:typeof r=="string"?r:void 0}}if(typeof e=="string")return{name:"Error",message:e};try{return{name:"Error",message:JSON.stringify(e)??H(e)}}catch{return{name:"Error",message:H(e)}}}function W(e,t){try{return e[t]}catch{return}}function H(e){try{return String(e)}catch{return"[unstringifiable]"}}function jt(e){let t=typeof e=="string"?e:(()=>{try{return JSON.stringify(e)??String(e)}catch{try{return String(e)}catch{return"[unstringifiable]"}}})();return t.length>de?t.slice(0,de):t}function Kt(e){let{error:t,options:n={},identity:r,capturePII:s=!1}=e,o=Y(t),c=n.handled!==!1,f=n.level??(c?"error":"fatal"),p={handled:String(c)};r.product&&(p.product=r.product),r.sessionId&&(p.session=r.sessionId);try{let E=n.properties??{},k=0;for(let S of Object.keys(E)){if(k>=Ut)break;try{let C=E[S];if(C==null)continue;p[S]=z(jt(C),s),k++}catch{continue}}}catch{}let _={event_id:e.id??Mt(),timestamp:(e.now??Date.now())/1e3,platform:"javascript",level:f,logger:r.product,environment:r.environment,release:r.release,exception:{values:[{type:o.name,value:z(o.message,s),stacktrace:{frames:Ne(o.stack)}}]},tags:p,sdk:{name:"@hanzo/event",version:Pe}};return r.userId&&(_.user={id:r.userId}),_}function Vt(e,t,n){let r=JSON.stringify(e),s=JSON.stringify({event_id:e.event_id,dsn:t.base,sent_at:n??new Date().toISOString()}),o=JSON.stringify({type:"event",content_type:"application/json",length:$t(r)});return`${s}
3
3
  ${o}
4
4
  ${r}
5
- `}var Wt=4096;function Ne(e){let t="";for(let n of[2166136261,16777619,2654435769,2246822507]){let r=n>>>0;for(let s=0;s<e.length;s++)r^=e.charCodeAt(s),r=r+(r<<1)+(r<<4)+(r<<7)+(r<<8)+(r<<24)>>>0;t+=r.toString(16).padStart(8,"0")}return t}function Ht(e){let t=e.filename??"",n=e.function??"<anonymous>",r=e.lineno??0,s=e.colno??0;return{raw_id:`${Ne(`${t}|${n}|${r}|${s}`)}/0`,mangled_name:n,source:t,line:r,column:s,in_app:e.in_app??!1,lang:"javascript",resolved:!1,resolve_failure:"no symbol set uploaded for this release",resolved_name:null,module:null}}function Zt(e,t){if(e.length<=t)return e;let n=t,r=e.charCodeAt(n-1);return r>=55296&&r<=56319&&n--,e.slice(0,n)}function qt(e,t){let n=Y(e),r=Pe(n.stack).slice(-50),s={id:t.id,type:n.name,value:Zt(n.message,Wt),mechanism:{type:"generic",handled:t.handled,synthetic:!(e instanceof Error)}};return r.length>0&&(s.stacktrace={type:"resolved",frames:r.map(Ht)}),s}function Yt(e){var r;let n=(((r=e.stacktrace)==null?void 0:r.frames)??[]).filter(s=>s.in_app).map(s=>`${s.mangled_name}@${s.source}`);return Ne([e.type,...n].join(`
6
- `))}function Jt(e,t){var o,c;let n=qt(e,t),r=((o=n.stacktrace)==null?void 0:o.frames)??[],s=Yt(n);return{$exception_list:[n],$exception_fingerprint:s,$exception_fingerprint_record:[{type:"manual"}],$exception_type:n.type,$exception_message:n.value,$exception_level:t.level??"error",$exception_handled:t.handled,$exception_synthetic:((c=n.mechanism)==null?void 0:c.synthetic)??!1,$exception_types:[n.type],$exception_values:[n.value],$exception_sources:r.map(f=>f.source).filter(f=>!!f),$exception_functions:r.map(f=>f.resolved_name??f.mangled_name).filter(f=>!!f)}}var R={session:"hz_session",firstTouch:"hz_first_touch",cohort:"hz_cohort"},Xt=1800*1e3;function M(){try{return typeof window>"u"||!window.localStorage?void 0:window.localStorage}catch{return}}function fe(){return Rt()||void 0}function pe(e=Date.now()){let t=M();if(!t)return;let n=null;try{n=JSON.parse(t.getItem(R.session)||"null")}catch{n=null}return!n||e-n.last>Xt?n={id:U(e),last:e}:n.last=e,t.setItem(R.session,JSON.stringify(n)),n.id}function Oe(){let e=M();if(e)try{let t=e.getItem(R.firstTouch);return t?JSON.parse(t):void 0}catch{return}}function Qt(e){let t=M(),n=Oe();return n||(t&&t.setItem(R.firstTouch,JSON.stringify(e)),e)}function en(){let e=M();if(e)try{let t=e.getItem(R.cohort);return t?JSON.parse(t):void 0}catch{return}}function he(e){let t=M(),n=en()||{},r={signupWeek:n.signupWeek||e.signupWeek,channel:e.channel||n.channel,refCode:n.refCode||e.refCode};return t&&t.setItem(R.cohort,JSON.stringify(r)),r}var Ae="/v1/event",Re="https://api.hanzo.ai",tn="application/x-sentry-envelope",_e="text/plain";function Ee(){try{if(typeof process<"u"&&process.env)return process.env.NEXT_PUBLIC_HANZO_EVENT_DSN||process.env.HANZO_EVENT_DSN||void 0}catch{}}function Z(e){try{if(typeof process<"u"&&process.env)return process.env[e]||void 0}catch{}}function ye(e,t,n){return e+(e.includes("?")?"&":"?")+t+"="+encodeURIComponent(n)}function nn(e){let t=Y(e);return{type:t.name,message:t.message,stack:t.stack}}var P=()=>typeof window<"u"&&typeof document<"u";function rn(e){try{return JSON.stringify({batch:e})}catch{}let t=[];for(let n of e)try{t.push(JSON.stringify(n))}catch{try{t.push(JSON.stringify({...n,properties:{$unserializable:!0}}))}catch{}}return t.length>0?'{"batch":['+t.join(",")+"]}":null}var sn=class{send(e,t,n){if(n.beacon&&P()&&typeof navigator.sendBeacon=="function"){let c=n.ingestKey?ye(e,"ingest_key",n.ingestKey):e;try{if(navigator.sendBeacon(c,new Blob([t],{type:_e})))return;n.debug&&console.warn("[event] beacon refused, falling back to fetch")}catch{}}if(typeof fetch!="function")return;let r=n.ingestKey!==void 0&&n.contentType===void 0,s={"Content-Type":r?_e:n.contentType??"application/json"},o=r?void 0:n.ingestKey??n.token;o&&(s.Authorization=`Bearer ${o}`),fetch(r?ye(e,"ingest_key",n.ingestKey):e,{method:"POST",headers:s,body:t,keepalive:!0,credentials:r?"omit":"include"}).then(c=>{!c.ok&&n.debug&&console.warn("[event] ingest rejected",c.status,e.split("?")[0])}).catch(c=>{n.debug&&console.warn("[event] ingest failed",e.split("?")[0],c)})}},be=class{constructor(e){this.queue=[],this.timer=null,this.attribution={utm:{}},this.cohort={},this.started=!1,this.reentrant=!1,this.cfg={host:Re,batchSize:20,flushIntervalMs:5e3,enabled:!0,captureErrors:!0,...e,ingestKey:e.ingestKey??Z("NEXT_PUBLIC_PUBLISHABLE_KEY")??dt()},this.transport=e.transport??new sn,this.dsn=de(e.dsn??Ee()??ce(this.cfg.product,this.cfg.ingestKey))}adopt(e){e.ingestKey&&!this.cfg.ingestKey&&(this.cfg.ingestKey=e.ingestKey),e.getToken&&!this.cfg.getToken&&(this.cfg.getToken=e.getToken),this.dsn||(this.dsn=de(e.dsn??Ee()??ce(this.cfg.product,this.cfg.ingestKey)))}get errorPlaneEnabled(){return this.dsn!==null}get errorIngestUrl(){var e;return(e=this.dsn)==null?void 0:e.ingestUrl}init(){if(this.started||!this.cfg.enabled||(this.started=!0,!P()))return;let e=it(window.location.search,document.referrer);this.attribution=ot(e)?Qt(e):Oe()??e,this.cohort=he({channel:this.attribution.channel??ve(this.attribution),refCode:this.attribution.refCode});let t=()=>{document.visibilityState==="hidden"&&this.flush(!0)};window.addEventListener("visibilitychange",t),window.addEventListener("pagehide",()=>this.flush(!0)),this.cfg.captureErrors&&(window.addEventListener("error",n=>{this.captureError(n.error??n.message,{handled:!1})}),window.addEventListener("unhandledrejection",n=>{this.captureError(n.reason,{handled:!1})}))}identify(e,t){this.personId=e,this.enqueue("identify",void 0,{properties:t})}group(e,t){this.enqueue("group",void 0,{groupId:e,properties:t})}pageview(e,t){let n=e??(P()?window.location.pathname:void 0),r=(n??"")+"\0"+(P()?window.location.href:"");r!==this.counted&&(this.counted=r,this.enqueue("pageview",w,{path:n,properties:t}))}capture(e,t,n){this.enqueue("event",e,{properties:t,...n})}captureError(e,t){if(!this.reentrant){this.reentrant=!0;try{try{this.sendError(e,t)}catch{}try{let n=(t==null?void 0:t.handled)??!0,r=nn(e);r.handled=n,this.enqueue("event",O,{error:r,properties:{...t==null?void 0:t.properties,...Jt(e,{handled:n,id:U(),level:t==null?void 0:t.level})}}),this.flush()}catch{}}finally{this.reentrant=!1}}}setCohort(e){this.cohort=he(e)}flush(e=!1){var c,f,p;if(!this.cfg.enabled||this.queue.length===0)return;let t=this.queue;this.queue=[],this.clearTimer();let n=((f=(c=this.cfg).getToken)==null?void 0:f.call(c))??void 0,r=n?void 0:((p=this.cfg.ingestKey)==null?void 0:p.trim())||void 0,s=e&&!n,o=rn(t);if(o===null){this.cfg.debug&&console.debug("[event] flush \u2192 dropped, batch unserializable");return}this.cfg.debug&&console.debug("[event] flush \u2192",Ae,t.length),this.transport.send(this.cfg.host+Ae,o,{beacon:s,token:n,ingestKey:r,debug:this.cfg.debug})}sendError(e,t){if(!this.cfg.enabled||!this.dsn)return;let n=Kt({error:e,options:t,identity:this.errorIdentity(),capturePII:this.cfg.capturePII??!1}),r=Vt(n,this.dsn);this.cfg.debug&&console.debug("[event] error \u2192",this.dsn.ingestUrl,n.event_id),this.transport.send(this.dsn.ingestUrl,r,{beacon:!1,contentType:tn,debug:this.cfg.debug})}errorIdentity(){return{userId:this.personId??fe(),sessionId:pe(),product:this.cfg.product,release:this.cfg.release??Z("NEXT_PUBLIC_HANZO_RELEASE"),environment:this.cfg.environment??Z("NODE_ENV")}}enqueue(e,t,n){this.cfg.enabled&&(this.started||this.init(),this.queue.push(this.build(e,t,n)),this.queue.length>=this.cfg.batchSize?this.flush():this.schedule())}build(e,t,n){let r=fe(),s={messageId:U(),type:e,event:t,timestamp:new Date().toISOString(),distinctId:this.personId??r,anonymousId:r,personId:this.personId,sessionId:pe(),product:this.cfg.product,referrer:this.attribution.referrer,utm:this.attribution.utm,refCode:this.cohort.refCode??this.attribution.refCode,channel:this.cohort.channel??this.attribution.channel,signupWeek:this.cohort.signupWeek,url:P()?window.location.href:void 0,path:P()?window.location.pathname:void 0,library:"@hanzo/event",libraryVersion:Ie,...n},o=this.cfg.capturePII??!1;return s.url&&(s.url=L(s.url,o)),s.path&&(s.path=L(s.path,o)),s.referrer&&(s.referrer=L(s.referrer,o)),s}schedule(){this.timer||!this.cfg.enabled||(this.timer=setTimeout(()=>{this.timer=null,this.flush()},this.cfg.flushIntervalMs))}clearTimer(){this.timer&&(clearTimeout(this.timer),this.timer=null)}},Te=Symbol.for("hanzo.event.clients");function on(){let e=globalThis,t=e[Te];if(t)return t;let n=new Map;return e[Te]=n,n}function De(e){if(!P()||e.enabled===!1)return new be(e);let t=(e.host??Re)+"\0"+e.product,n=on(),r=n.get(t);if(r)return r.adopt(e),r;let s=new be(e);return n.set(t,s),s}var xn={signup:{label:"Signup",event:g.SIGNUP_COMPLETED,funnelId:"signup",funnel:I("signup")},sale:{label:"Sale",event:g.ORDER_COMPLETED,funnelId:"upgrade",funnel:I("upgrade"),filter:{property:"kind",equals:"plan"}},upgradeIntent:{label:"Upgrade Intent",event:g.PLAN_CLICKED,funnelId:"upgrade",funnel:I("upgrade")},activation:{label:"Activation",event:g.FIRST_ACTION,funnelId:"apiActivation",funnel:I("apiActivation")}};var $="https://api.hanzo.ai";var ze=void 0;var In=60*1e3;var v={insights:"hanzo_insights_enabled",training:"hanzo_share_training",onboarded:"hanzo_onboarded"},J=globalThis.browser??globalThis.chrome;function Le(){var e,t,n,r;return((t=(e=globalThis.chrome)==null?void 0:e.storage)==null?void 0:t.local)??((r=(n=globalThis.browser)==null?void 0:n.storage)==null?void 0:r.local)}function Ue(e){return new Promise(t=>{let n=Le();if(!n)return t({});try{n.get(e,r=>t(r||{}))}catch{t({})}})}function Q(e){return new Promise(t=>{let n=Le();if(!n)return t();try{n.set(e,()=>t())}catch{t()}})}async function Me(){var e,t;try{let n=await((t=(e=J==null?void 0:J.runtime)==null?void 0:e.sendMessage)==null?void 0:t.call(e,{action:"auth.getToken"}));return(n==null?void 0:n.token)??null}catch{return null}}function $e(e){return{insights:e[v.insights]!==!1,shareTraining:e[v.training]===!0}}async function an(){let e=$e(await Ue([v.insights,v.training])),t=await Me();if(!t)return e;try{let n=await fetch(`${$}/v1/iam/consent`,{headers:{authorization:`Bearer ${t}`}});if(n.ok){let r=await n.json(),s={insights:r.insights!==!1,shareTraining:r.shareTraining===!0};return await Q({[v.insights]:s.insights,[v.training]:s.shareTraining}),s}}catch{}return e}async function Be(e){let t=$e(await Ue([v.insights,v.training])),n={insights:e.insights??t.insights,shareTraining:e.shareTraining??t.shareTraining};await Q({[v.insights]:n.insights,[v.training]:n.shareTraining});let r=await Me();if(r)try{await fetch(`${$}/v1/iam/consent`,{method:"PUT",headers:{"content-type":"application/json",authorization:`Bearer ${r}`},body:JSON.stringify(n),keepalive:!0}).catch(()=>{})}catch{}}async function Fe(){await Q({[v.onboarded]:!0})}function cn(){if(typeof navigator>"u")return!0;let e=navigator,t=e.doNotTrack??e.msDoNotTrack;return!(t==="1"||t==="yes"||e.globalPrivacyControl)}var X=null;function ln(){return X||(X=De({product:"extension",host:$,ingestKey:ze,captureErrors:!1})),X}async function Ge(e,t){try{if(!cn()||!(await an()).insights)return;let r=ln();r.capture(e,t),r.flush(!0)}catch{}}var je=globalThis.browser??globalThis.chrome,ee=document.getElementById("ob-insights"),te=document.getElementById("ob-training"),ne=document.getElementById("ob-continue");ne==null||ne.addEventListener("click",async()=>{let e={insights:(ee==null?void 0:ee.checked)??!0,shareTraining:(te==null?void 0:te.checked)??!1};await Be(e),await Fe(),await Ge("onboarding_complete",{shareTraining:e.shareTraining});try{let t=await je.tabs.getCurrent();t!=null&&t.id?await je.tabs.remove(t.id):window.close()}catch{window.close()}});})();
5
+ `}var Wt=4096;function Oe(e){let t="";for(let n of[2166136261,16777619,2654435769,2246822507]){let r=n>>>0;for(let s=0;s<e.length;s++)r^=e.charCodeAt(s),r=r+(r<<1)+(r<<4)+(r<<7)+(r<<8)+(r<<24)>>>0;t+=r.toString(16).padStart(8,"0")}return t}function Ht(e){let t=e.filename??"",n=e.function??"<anonymous>",r=e.lineno??0,s=e.colno??0;return{raw_id:`${Oe(`${t}|${n}|${r}|${s}`)}/0`,mangled_name:n,source:t,line:r,column:s,in_app:e.in_app??!1,lang:"javascript",resolved:!1,resolve_failure:"no symbol set uploaded for this release",resolved_name:null,module:null}}function Zt(e,t){if(e.length<=t)return e;let n=t,r=e.charCodeAt(n-1);return r>=55296&&r<=56319&&n--,e.slice(0,n)}function qt(e,t){let n=Y(e),r=Ne(n.stack).slice(-50),s={id:t.id,type:n.name,value:Zt(n.message,Wt),mechanism:{type:"generic",handled:t.handled,synthetic:!(e instanceof Error)}};return r.length>0&&(s.stacktrace={type:"resolved",frames:r.map(Ht)}),s}function Yt(e){var r;let n=(((r=e.stacktrace)==null?void 0:r.frames)??[]).filter(s=>s.in_app).map(s=>`${s.mangled_name}@${s.source}`);return Oe([e.type,...n].join(`
6
+ `))}function Jt(e,t){var o,c;let n=qt(e,t),r=((o=n.stacktrace)==null?void 0:o.frames)??[],s=Yt(n);return{$exception_list:[n],$exception_fingerprint:s,$exception_fingerprint_record:[{type:"manual"}],$exception_type:n.type,$exception_message:n.value,$exception_level:t.level??"error",$exception_handled:t.handled,$exception_synthetic:((c=n.mechanism)==null?void 0:c.synthetic)??!1,$exception_types:[n.type],$exception_values:[n.value],$exception_sources:r.map(f=>f.source).filter(f=>!!f),$exception_functions:r.map(f=>f.resolved_name??f.mangled_name).filter(f=>!!f)}}var R={session:"hz_session",firstTouch:"hz_first_touch",cohort:"hz_cohort"},Xt=1800*1e3;function M(){try{return typeof window>"u"||!window.localStorage?void 0:window.localStorage}catch{return}}function pe(){return Rt()||void 0}function he(e=Date.now()){let t=M();if(!t)return;let n=null;try{n=JSON.parse(t.getItem(R.session)||"null")}catch{n=null}return!n||e-n.last>Xt?n={id:U(e),last:e}:n.last=e,t.setItem(R.session,JSON.stringify(n)),n.id}function Re(){let e=M();if(e)try{let t=e.getItem(R.firstTouch);return t?JSON.parse(t):void 0}catch{return}}function Qt(e){let t=M(),n=Re();return n||(t&&t.setItem(R.firstTouch,JSON.stringify(e)),e)}function en(){let e=M();if(e)try{let t=e.getItem(R.cohort);return t?JSON.parse(t):void 0}catch{return}}function Ae(e){let t=M(),n=en()||{},r={signupWeek:n.signupWeek||e.signupWeek,channel:e.channel||n.channel,refCode:n.refCode||e.refCode};return t&&t.setItem(R.cohort,JSON.stringify(r)),r}var _e="/v1/event",De="https://api.hanzo.ai",tn="application/x-sentry-envelope",Ee="text/plain";function ye(){try{if(typeof process<"u"&&process.env)return process.env.NEXT_PUBLIC_HANZO_EVENT_DSN||process.env.HANZO_EVENT_DSN||void 0}catch{}}function Z(e){try{if(typeof process<"u"&&process.env)return process.env[e]||void 0}catch{}}function be(e,t,n){return e+(e.includes("?")?"&":"?")+t+"="+encodeURIComponent(n)}function nn(e){let t=Y(e);return{type:t.name,message:t.message,stack:t.stack}}var P=()=>typeof window<"u"&&typeof document<"u";function rn(e){try{return JSON.stringify({batch:e})}catch{}let t=[];for(let n of e)try{t.push(JSON.stringify(n))}catch{try{t.push(JSON.stringify({...n,properties:{$unserializable:!0}}))}catch{}}return t.length>0?'{"batch":['+t.join(",")+"]}":null}var sn=class{send(e,t,n){if(n.beacon&&P()&&typeof navigator.sendBeacon=="function"){let c=n.ingestKey?be(e,"ingest_key",n.ingestKey):e;try{if(navigator.sendBeacon(c,new Blob([t],{type:Ee})))return;n.debug&&console.warn("[event] beacon refused, falling back to fetch")}catch{}}if(typeof fetch!="function")return;let r=n.ingestKey!==void 0&&n.contentType===void 0,s={"Content-Type":r?Ee:n.contentType??"application/json"},o=r?void 0:n.ingestKey??n.token;o&&(s.Authorization=`Bearer ${o}`),fetch(r?be(e,"ingest_key",n.ingestKey):e,{method:"POST",headers:s,body:t,keepalive:!0,credentials:r?"omit":"include"}).then(c=>{!c.ok&&n.debug&&console.warn("[event] ingest rejected",c.status,e.split("?")[0])}).catch(c=>{n.debug&&console.warn("[event] ingest failed",e.split("?")[0],c)})}},Te=class{constructor(e){this.queue=[],this.timer=null,this.attribution={utm:{}},this.cohort={},this.started=!1,this.reentrant=!1,this.cfg={host:De,batchSize:20,flushIntervalMs:5e3,enabled:!0,captureErrors:!0,...e,ingestKey:e.ingestKey??Z("NEXT_PUBLIC_PUBLISHABLE_KEY")??dt()},this.transport=e.transport??new sn,this.dsn=fe(e.dsn??ye()??le(this.cfg.product,this.cfg.ingestKey))}adopt(e){e.ingestKey&&!this.cfg.ingestKey&&(this.cfg.ingestKey=e.ingestKey),e.getToken&&!this.cfg.getToken&&(this.cfg.getToken=e.getToken),this.dsn||(this.dsn=fe(e.dsn??ye()??le(this.cfg.product,this.cfg.ingestKey)))}get errorPlaneEnabled(){return this.dsn!==null}get errorIngestUrl(){var e;return(e=this.dsn)==null?void 0:e.ingestUrl}init(){if(this.started||!this.cfg.enabled||(this.started=!0,!P()))return;let e=it(window.location.search,document.referrer);this.attribution=ot(e)?Qt(e):Re()??e,this.cohort=Ae({channel:this.attribution.channel??xe(this.attribution),refCode:this.attribution.refCode});let t=()=>{document.visibilityState==="hidden"&&this.flush(!0)};window.addEventListener("visibilitychange",t),window.addEventListener("pagehide",()=>this.flush(!0)),this.cfg.captureErrors&&(window.addEventListener("error",n=>{this.captureError(n.error??n.message,{handled:!1})}),window.addEventListener("unhandledrejection",n=>{this.captureError(n.reason,{handled:!1})}))}identify(e,t){this.personId=e,this.enqueue("identify",void 0,{properties:t})}group(e,t){this.enqueue("group",void 0,{groupId:e,properties:t})}pageview(e,t){let n=e??(P()?window.location.pathname:void 0),r=(n??"")+"\0"+(P()?window.location.href:"");r!==this.counted&&(this.counted=r,this.enqueue("pageview",w,{path:n,properties:t}))}capture(e,t,n){this.enqueue("event",e,{properties:t,...n})}captureError(e,t){if(!this.reentrant){this.reentrant=!0;try{try{this.sendError(e,t)}catch{}try{let n=(t==null?void 0:t.handled)??!0,r=nn(e);r.handled=n,this.enqueue("event",O,{error:r,properties:{...t==null?void 0:t.properties,...Jt(e,{handled:n,id:U(),level:t==null?void 0:t.level})}}),this.flush()}catch{}}finally{this.reentrant=!1}}}setCohort(e){this.cohort=Ae(e)}flush(e=!1){var c,f,p;if(!this.cfg.enabled||this.queue.length===0)return;let t=this.queue;this.queue=[],this.clearTimer();let n=((f=(c=this.cfg).getToken)==null?void 0:f.call(c))??void 0,r=n?void 0:((p=this.cfg.ingestKey)==null?void 0:p.trim())||void 0,s=e&&!n,o=rn(t);if(o===null){this.cfg.debug&&console.debug("[event] flush \u2192 dropped, batch unserializable");return}this.cfg.debug&&console.debug("[event] flush \u2192",_e,t.length),this.transport.send(this.cfg.host+_e,o,{beacon:s,token:n,ingestKey:r,debug:this.cfg.debug})}sendError(e,t){if(!this.cfg.enabled||!this.dsn)return;let n=Kt({error:e,options:t,identity:this.errorIdentity(),capturePII:this.cfg.capturePII??!1}),r=Vt(n,this.dsn);this.cfg.debug&&console.debug("[event] error \u2192",this.dsn.ingestUrl,n.event_id),this.transport.send(this.dsn.ingestUrl,r,{beacon:!1,contentType:tn,debug:this.cfg.debug})}errorIdentity(){return{userId:this.personId??pe(),sessionId:he(),product:this.cfg.product,release:this.cfg.release??Z("NEXT_PUBLIC_HANZO_RELEASE"),environment:this.cfg.environment??Z("NODE_ENV")}}enqueue(e,t,n){this.cfg.enabled&&(this.started||this.init(),this.queue.push(this.build(e,t,n)),this.queue.length>=this.cfg.batchSize?this.flush():this.schedule())}build(e,t,n){let r=pe(),s={messageId:U(),type:e,event:t,timestamp:new Date().toISOString(),distinctId:this.personId??r,anonymousId:r,personId:this.personId,sessionId:he(),product:this.cfg.product,referrer:this.attribution.referrer,utm:this.attribution.utm,refCode:this.cohort.refCode??this.attribution.refCode,channel:this.cohort.channel??this.attribution.channel,signupWeek:this.cohort.signupWeek,url:P()?window.location.href:void 0,path:P()?window.location.pathname:void 0,library:"@hanzo/event",libraryVersion:Pe,...n},o=this.cfg.capturePII??!1;return s.url&&(s.url=z(s.url,o)),s.path&&(s.path=z(s.path,o)),s.referrer&&(s.referrer=z(s.referrer,o)),s}schedule(){this.timer||!this.cfg.enabled||(this.timer=setTimeout(()=>{this.timer=null,this.flush()},this.cfg.flushIntervalMs))}clearTimer(){this.timer&&(clearTimeout(this.timer),this.timer=null)}},ve=Symbol.for("hanzo.event.clients");function on(){let e=globalThis,t=e[ve];if(t)return t;let n=new Map;return e[ve]=n,n}function Le(e){if(!P()||e.enabled===!1)return new Te(e);let t=(e.host??De)+"\0"+e.product,n=on(),r=n.get(t);if(r)return r.adopt(e),r;let s=new Te(e);return n.set(t,s),s}var xn={signup:{label:"Signup",event:g.SIGNUP_COMPLETED,funnelId:"signup",funnel:I("signup")},sale:{label:"Sale",event:g.ORDER_COMPLETED,funnelId:"upgrade",funnel:I("upgrade"),filter:{property:"kind",equals:"plan"}},upgradeIntent:{label:"Upgrade Intent",event:g.PLAN_CLICKED,funnelId:"upgrade",funnel:I("upgrade")},activation:{label:"Activation",event:g.FIRST_ACTION,funnelId:"apiActivation",funnel:I("apiActivation")}};var $="https://api.hanzo.ai";var ze=void 0;var In=60*1e3;var v={insights:"hanzo_insights_enabled",training:"hanzo_share_training",onboarded:"hanzo_onboarded"},J=globalThis.browser??globalThis.chrome;function Ue(){var e,t,n,r;return((t=(e=globalThis.chrome)==null?void 0:e.storage)==null?void 0:t.local)??((r=(n=globalThis.browser)==null?void 0:n.storage)==null?void 0:r.local)}function Me(e){return new Promise(t=>{let n=Ue();if(!n)return t({});try{n.get(e,r=>t(r||{}))}catch{t({})}})}function Q(e){return new Promise(t=>{let n=Ue();if(!n)return t();try{n.set(e,()=>t())}catch{t()}})}async function $e(){var e,t;try{let n=await((t=(e=J==null?void 0:J.runtime)==null?void 0:e.sendMessage)==null?void 0:t.call(e,{action:"auth.getToken"}));return(n==null?void 0:n.token)??null}catch{return null}}function Be(e){return{insights:e[v.insights]!==!1,shareTraining:e[v.training]===!0}}async function an(){let e=Be(await Me([v.insights,v.training])),t=await $e();if(!t)return e;try{let n=await fetch(`${$}/v1/iam/consent`,{headers:{authorization:`Bearer ${t}`}});if(n.ok){let r=await n.json(),s={insights:r.insights!==!1,shareTraining:r.shareTraining===!0};return await Q({[v.insights]:s.insights,[v.training]:s.shareTraining}),s}}catch{}return e}async function Fe(e){let t=Be(await Me([v.insights,v.training])),n={insights:e.insights??t.insights,shareTraining:e.shareTraining??t.shareTraining};await Q({[v.insights]:n.insights,[v.training]:n.shareTraining});let r=await $e();if(r)try{await fetch(`${$}/v1/iam/consent`,{method:"PUT",headers:{"content-type":"application/json",authorization:`Bearer ${r}`},body:JSON.stringify(n),keepalive:!0}).catch(()=>{})}catch{}}async function Ge(){await Q({[v.onboarded]:!0})}function cn(){if(typeof navigator>"u")return!0;let e=navigator,t=e.doNotTrack??e.msDoNotTrack;return!(t==="1"||t==="yes"||e.globalPrivacyControl)}var X=null;function ln(){return X||(X=Le({product:"extension",host:$,ingestKey:ze,captureErrors:!1})),X}async function je(e,t){try{if(!cn()||!(await an()).insights)return;let r=ln();r.capture(e,t),r.flush(!0)}catch{}}var re=globalThis.browser??globalThis.chrome;typeof location<"u"&&new URLSearchParams(location.search).get("reload")==="1"&&re.runtime.reload();var ee=document.getElementById("ob-insights"),te=document.getElementById("ob-training"),ne=document.getElementById("ob-continue");ne==null||ne.addEventListener("click",async()=>{let e={insights:(ee==null?void 0:ee.checked)??!0,shareTraining:(te==null?void 0:te.checked)??!1};await Fe(e),await Ge(),await je("onboarding_complete",{shareTraining:e.shareTraining});try{let t=await re.tabs.getCurrent();t!=null&&t.id?await re.tabs.remove(t.id):window.close()}catch{window.close()}});})();
7
7
  /*! Bundled license information:
8
8
 
9
9
  @hanzo/event/dist/index.mjs:
package/firefox/page.js CHANGED
@@ -1,35 +1,35 @@
1
- "use strict";(()=>{var I=e=>new Map(Object.entries(e)),Be=I({enter:"Enter",return:"Enter",tab:"Tab",escape:"Escape",esc:"Escape",space:" ",backspace:"Backspace",delete:"Delete",del:"Delete",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",arrowup:"ArrowUp",arrowdown:"ArrowDown",arrowleft:"ArrowLeft",arrowright:"ArrowRight",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",comma:","}),je=I({control:"ctrlKey",ctrl:"ctrlKey",shift:"shiftKey",alt:"altKey",option:"altKey",meta:"metaKey",cmd:"metaKey",command:"metaKey"}),Pe=I({Backspace:8,Tab:9,Enter:13,Shift:16,Control:17,Alt:18,CapsLock:20,Escape:27," ":32,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Insert:45,Delete:46,Meta:91,ContextMenu:93,")":48,"!":49,"@":50,"#":51,$:52,"%":53,"^":54,"&":55,"*":56,"(":57,";":186,":":186,"=":187,"+":187,",":188,"<":188,"-":189,_:189,".":190,">":190,"/":191,"?":191,"`":192,"~":192,"[":219,"{":219,"\\":220,"|":220,"]":221,"}":221,"'":222,'"':222}),Ve=I({" ":"Space",",":"Comma",".":"Period",";":"Semicolon","=":"Equal","-":"Minus","/":"Slash","`":"Backquote","[":"BracketLeft","]":"BracketRight","\\":"Backslash","'":"Quote"});function re(e,n){let t=e.split("+").map(l=>l.trim());t[t.length-1]===""&&t.length>1&&(t.pop(),t[t.length-1]="+");let r={};for(let l of t.slice(0,-1)){let c=je.get(l.toLowerCase());if(!c)throw new Error(`Unknown modifier ${JSON.stringify(l)} in ${JSON.stringify(e)}: use Control, Shift, Alt or Meta.`);r[c]=!0}let o=typeof n=="number"||typeof n=="string"&&/^\d+$/.test(n)?Number(n):0,i=n&&typeof n=="object"?n:{};(o&1||i.alt)&&(r.altKey=!0),(o&2||i.ctrl)&&(r.ctrlKey=!0),(o&4||i.meta)&&(r.metaKey=!0),(o&8||i.shift)&&(r.shiftKey=!0);let s=t[t.length-1];if(!s)throw new Error("key required: Enter, Tab, Escape, ArrowDown, Control+a \u2026");return{key:Be.get(s.toLowerCase())??(s.length===1?s:s[0].toUpperCase()+s.slice(1)),mods:r}}function oe(e){return/^[a-z]$/i.test(e)?`Key${e.toUpperCase()}`:/^\d$/.test(e)?`Digit${e}`:Ve.get(e)??e}function Fe(e){let n=Pe.get(e);if(n!==void 0)return n;if(/^[a-z0-9]$/i.test(e))return e.toUpperCase().charCodeAt(0);let t=/^F([1-9]|1\d|2[0-4])$/.exec(e);return t?111+Number(t[1]):0}function ie(e,n){if(e==="keypress"){let r=n==="Enter"?13:n.length===1?n.charCodeAt(0):0;return{keyCode:r,which:r,charCode:r}}let t=Fe(n);return{keyCode:t,which:t,charCode:0}}var R=new Set(["button","link","textbox","searchbox","checkbox","radio","switch","combobox","listbox","option","slider","spinbutton","tab","menuitem","menuitemcheckbox","menuitemradio","treeitem","clickable"]),We=new Set(["heading","img","cell","gridcell","columnheader","rowheader","dialog","alertdialog","article","region","navigation","form","iframe"]),pe=new Set(["button","link","heading","cell","gridcell","columnheader","rowheader","option","tab","menuitem","menuitemcheckbox","menuitemradio","treeitem","checkbox","radio","switch","tooltip","clickable"]),_e=new Set(["cell","gridcell","columnheader","rowheader"]),Ue=new Set(["textbox","searchbox","combobox","spinbutton","slider"]),Je=new Set(["script","style","noscript","template","head","meta","link","title","base","object","embed","param","source","track","datalist"]),K=new Set(["inline","inline-block","inline-flex","inline-grid","contents"]),ze=new Set(["hanzo-ai-overlay","hanzo-page-overlay-root","hanzo-picker-overlay","hanzo-console-root"]),be='a[href],area[href],button,input,select,textarea,summary,iframe,[tabindex],[contenteditable=""],[contenteditable="true"]',Xe={fieldset:"legend",table:"caption",figure:"figcaption"},d=150,F=300,L=25,C=new Map,W=new WeakMap,x=0;function ge(e){let n=W.get(e);return n||(n=`e${++x}`,W.set(e,n)),C.set(n,new WeakRef(e)),n}function Ee(e){return/^@?e\d+$/.test(e.trim())}function we(e){return e.isConnected&&!!e.ownerDocument.defaultView}function h(e){var r;if(!e||!e.trim())throw new Error("selector required: a snapshot ref (@e2) or a CSS selector");let n=e.trim();if(Ee(n)){let o=n.replace(/^@/,""),i=(r=C.get(o))==null?void 0:r.deref();if(!i)throw new Error(`Unknown ref @${o}: this page has no such ref (it navigated, or the ref came from another tab). Run snapshot again for fresh refs.`);if(!we(i))throw C.delete(o),new Error(`Stale ref @${o}: its element is no longer in the page. Run snapshot again for fresh refs.`);return i}let t;try{t=document.querySelector(n)}catch{throw new Error(`Invalid selector ${JSON.stringify(n)}: pass a snapshot ref (@e2) or a CSS selector.`)}if(!t)throw new Error(`No element matches ${JSON.stringify(n)}. Run snapshot to see what is on the page.`);return t}function g(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function z(e){var t;let n=e;try{if(typeof n.openOrClosedShadowRoot=="function")return n.openOrClosedShadowRoot()??null;let r=(t=globalThis.chrome)==null?void 0:t.dom;if(r!=null&&r.openOrClosedShadowRoot&&e instanceof e.ownerDocument.defaultView.HTMLElement)return r.openOrClosedShadowRoot(e)??null}catch{}return e.shadowRoot}function $(e){let n=e instanceof Element?z(e):null,t=[];for(let r of Array.from((n??e).childNodes))if(r.nodeType===1&&r.localName==="slot"){let o=r,i=typeof o.assignedNodes=="function"?o.assignedNodes({flatten:!0}):[];t.push(...i.length?i:Array.from(o.childNodes))}else t.push(r);return t}function X(e){if(e.assignedSlot)return e.assignedSlot;let n=e.parentNode;return n?n.nodeType===11?n.host??null:n.nodeType===1?n:null:null}function Ye(e,n){for(let t=n;t;t=X(t))if(t===e)return!0;return!1}function k(e){if(Je.has(e.localName)||ze.has(e.id)||e.hidden||e.getAttribute("aria-hidden")==="true")return!0;let n=g(e).display;return n==="none"?!0:n!=="contents"&&typeof e.checkVisibility=="function"&&!e.checkVisibility()}function f(e){return e.replace(/\s+/g," ").trim()}function m(e,n){return e.length>n?`${e.slice(0,n-1)}\u2026`:e}function A(e,n=d*2){let t="",r=o=>{if(t.length>n)return;if(o.nodeType===3){t+=o.textContent;return}if(o.nodeType!==1)return;let i=o;if(k(i))return;let s=i.getAttribute("aria-label");if(s&&s.trim()){t+=` ${s} `;return}if(i.localName==="img"){t+=` ${i.getAttribute("alt")??""} `;return}if(i.localName==="input"){let c=i.type;(c==="submit"||c==="button"||c==="reset")&&(t+=` ${i.value} `);return}if(i.localName==="select"||i.localName==="textarea")return;let a=!K.has(g(i).display),l=t.length;a&&(t+=" ");for(let c of $(i))r(c);!t.slice(l).trim()&&i.getAttribute("title")&&(t+=` ${i.getAttribute("title")} `),a&&(t+=" ")};for(let o of $(e))r(o);return f(t)}function Qe(e,n){let t=e.getAttribute(n);if(!t)return"";let r=e.getRootNode();return f(t.split(/\s+/).map(o=>{var s;let i=((s=r.getElementById)==null?void 0:s.call(r,o))??e.ownerDocument.getElementById(o);return i?A(i):""}).join(" "))}function se(e){for(let n=e.parentElement;n;n=n.parentElement)if(["article","aside","main","nav","section"].includes(n.localName))return!0;return!1}function Ge(e){var t;switch(e.localName){case"a":case"area":return e.hasAttribute("href")?"link":"";case"button":return"button";case"input":{let r=e.type;return r==="hidden"?"":r==="button"||r==="submit"||r==="reset"||r==="image"||r==="file"?"button":r==="checkbox"?"checkbox":r==="radio"?"radio":r==="range"?"slider":r==="number"?"spinbutton":e.hasAttribute("list")?"combobox":r==="search"?"searchbox":"textbox"}case"select":return e.multiple||e.size>1?"listbox":"combobox";case"option":return"option";case"textarea":return"textbox";case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return"heading";case"img":return e.getAttribute("alt")===""?"":"img";case"svg":return e.getAttribute("aria-label")||e.querySelector("title")?"img":"";case"ul":case"ol":case"menu":return"list";case"li":return"listitem";case"nav":return"navigation";case"main":return"main";case"header":return se(e)?"":"banner";case"footer":return se(e)?"":"contentinfo";case"aside":return"complementary";case"form":return"form";case"section":return e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")?"region":"";case"article":return"article";case"table":return"table";case"tr":return"row";case"td":return"cell";case"th":return e.getAttribute("scope")==="row"?"rowheader":"columnheader";case"dialog":return"dialog";case"details":case"fieldset":return"group";case"summary":return"button";case"p":return"paragraph";case"blockquote":return"blockquote";case"hr":return"separator";case"progress":return"progressbar";case"meter":return"meter";case"output":return"status";case"iframe":return"iframe";case"figure":return"figure"}return e.isContentEditable&&!((t=e.parentElement)!=null&&t.isContentEditable)?"textbox":""}function Y(e,n,t){let r=(e.getAttribute("role")||"").trim().split(/\s+/)[0].toLowerCase();if(r&&r!=="presentation"&&r!=="none"&&r!=="generic")return r;let o=Ge(e);if(o)return o;let i=e.localName;return i==="label"||i==="body"||i==="html"?"":e.hasAttribute("tabindex")&&e.tabIndex>=0||e.hasAttribute("onclick")||n==="pointer"&&t!=="pointer"?"clickable":""}function ye(e){let n=e.localName;if(n==="select")return Array.from(e.selectedOptions).map(o=>f(o.label||o.text)).join(", ");if(n==="input"||n==="textarea"){let r=e;return r.type==="password"?r.value?"\u2022".repeat(Math.min(r.value.length,8)):"":r.value}return e.isContentEditable?f(e.textContent||""):e.getAttribute("aria-valuenow")??void 0}function xe(e,n){var s;let t=Qe(e,"aria-labelledby");if(t)return m(t,d);let r=e.getAttribute("aria-label");if(r&&r.trim())return m(f(r),d);let o=e.localName;if(o==="input"||o==="select"||o==="textarea"){let a=e;if(o==="input"&&(a.type==="submit"||a.type==="reset"||a.type==="button"))return m(a.value||(a.type==="submit"?"Submit":a.type==="reset"?"Reset":""),d);if(o==="input"&&a.type==="image")return m(a.alt||a.title||"Submit",d);let l=Array.from(a.labels??[]).map(c=>A(c)).filter(Boolean).join(" ");return m(l||f(a.placeholder||e.getAttribute("title")||""),d)}if(o==="img"||o==="area")return m(f(e.getAttribute("alt")||e.getAttribute("title")||""),d);if(o==="svg")return m(f(((s=e.querySelector("title"))==null?void 0:s.textContent)||""),d);let i=Xe[o];if(i){let a=e.querySelector(`:scope > ${i}`);if(a)return m(A(a),d)}if(o==="iframe")return m(f(e.getAttribute("title")||e.getAttribute("name")||""),d);if(pe.has(n)){let a=A(e);if(a)return m(a,d)}return m(f(e.getAttribute("title")||""),d)}function T(e){try{if(e.matches(":disabled"))return!0}catch{}return!!e.closest('[aria-disabled="true"]')}function _(e){if(e.localName==="input"){let t=e;if(t.type==="checkbox"||t.type==="radio")return t.indeterminate?"mixed":t.checked}let n=e.getAttribute("aria-checked");if(n==="mixed")return"mixed";if(n==="true"||n==="false")return n==="true"}function Ze(e,n){var i;let t=[];if(n==="heading"){let s=/^h([1-6])$/.exec(e.localName);t.push(`level=${e.getAttribute("aria-level")||(s?s[1]:"2")}`)}let r=_(e);r==="mixed"?t.push("checked=mixed"):r===!0&&t.push("checked"),R.has(n)&&T(e)&&t.push("disabled");let o=e.getAttribute("aria-expanded");return o==="true"||o==="false"?t.push(`expanded=${o}`):e.localName==="summary"&&((i=e.parentElement)==null?void 0:i.localName)==="details"&&t.push(`expanded=${e.parentElement.open}`),(e.getAttribute("aria-selected")==="true"||e.localName==="option"&&e.selected)&&t.push("selected"),e.getAttribute("aria-pressed")==="true"&&t.push("pressed"),(e.required||e.getAttribute("aria-required")==="true")&&t.push("required"),t}function H(e){return e.text===void 0&&R.has(e.role)&&!!e.el||e.kids.some(H)}function qe(e,n){let t=e[e.length-1];t&&t.text!==void 0&&!t.closed?t.text+=n:e.push({role:"",name:"",text:n,props:[],kids:[]})}function v(e){let n=e[e.length-1];n&&n.text!==void 0&&(n.closed=!0)}function O(e,n,t,r){for(let o of $(e))o.nodeType===3?t||qe(n,o.textContent||""):o.nodeType===1&&ke(o,n,r)}function ke(e,n,t){if(k(e))return;let r=g(e),o=r.visibility!=="visible",i=o?"":Y(e,r.cursor,t),s=!K.has(r.display);if(!i){s&&v(n),O(e,n,o,r.cursor),s&&v(n);return}let a={role:i,name:xe(e,i),el:e,props:Ze(e,i),kids:[]},l=[];if((Ue.has(i)||e.localName==="select")&&(a.value=ye(e)),e.localName==="select"){let c=Array.from(e.options);for(let p of c.slice(0,L))a.kids.push({role:"option",name:m(f(p.label||p.text),d),props:p.selected?["selected"]:[],kids:[]});c.length>L&&a.kids.push({role:"",name:"",text:`\u2026 ${c.length-L} more options`,props:[],kids:[]})}else if(e.localName==="iframe"){let c=null;try{c=e.contentDocument}catch{}c!=null&&c.body?O(c.body,a.kids,!1,""):a.props.push("cross-origin")}else i==="img"||e.localName==="input"||e.localName==="textarea"||(O(e,a.kids,!1,r.cursor),l=a.kids,_e.has(i)&&a.kids.some(H)&&!e.hasAttribute("aria-label")&&!e.hasAttribute("aria-labelledby")&&(a.name=""),pe.has(i)&&a.name&&(a.kids=a.kids.filter(H)));if(i==="clickable"&&l.some(H)){s&&v(n),n.push(...l),s&&v(n);return}s&&v(n),n.push(a),s&&v(n)}function Te(e){let n=[];for(let t of e){if(t.text!==void 0){let r=f(t.text);r&&n.push({...t,text:r});continue}t.kids=Te(t.kids),!(ve(t)&&!t.kids.length&&t.role!=="separator")&&n.push(t)}return n}function ve(e){return!$e(e)&&!e.name&&e.value===void 0&&e.props.length===0}function $e(e){return e.el?R.has(e.role)||We.has(e.role)&&(!!e.name||e.role==="iframe"):!1}function Me(e){let n=[];for(let t of e){if(t.text!==void 0){n.push(t);continue}if(t.kids=Me(t.kids),ve(t)&&t.kids.length<=1){n.push(...t.kids);continue}n.push(t)}return n}function Q(e,n=[]){for(let t of e)t.text===void 0&&R.has(t.role)&&t.el&&n.push({...t,kids:[]}),Q(t.kids,n);return n}function et(e,n){if(e.text!==void 0)return`${n}- text: ${m(e.text,F)}`;let t=`${n}- ${e.role}`;e.name&&(t+=` ${JSON.stringify(e.name)}`),$e(e)&&(t+=` [ref=${ge(e.el)}]`);for(let r of e.props)t+=` [${r}]`;return t}function Se(e,n,t,r){let o=" ".repeat(n),i=!t.depth||n+1<t.depth;for(let s of e){let a=et(s,o),l=s.kids;if(s.text===void 0){s.value&&(!l.length||!i)?a+=`: ${m(f(s.value),F)}`:l.length===1&&l[0].text!==void 0&&(a+=`: ${m(l[0].text,F)}`,l=[]);let c=t.urls&&s.role==="link"?s.el.href:"";(c||l.length&&i)&&(a+=":"),r.push(a),c&&r.push(`${o} - /url: ${c}`),i&&Se(l,n+1,t,r)}else r.push(a)}}function Ne(e){let n=[];if(e.selector){let t=h(e.selector),r=X(t);ke(t,n,r?g(r).cursor:"")}else{let t=document.body??document.documentElement;O(t,n,!1,"")}return n=Te(n),e.compact?Me(n):n}function Le(){for(let[e,n]of C){let t=n.deref();(!t||!we(t))&&C.delete(e)}}function Ae(e={}){e.base&&e.base>x&&(x=e.base),Le();let n=Ne(e);e.interactive&&(n=Q(n));let t=[];Se(n,0,e,t);let r=t.filter(o=>o.includes("[ref=")).length;return{tree:t.join(`
2
- `)||"(empty: nothing rendered)",refs:r,last:x,url:location.href,title:document.title}}function u(e){let n=Y(e,"","")||e.localName,t=xe(e,n),r=W.get(e);return`${r?`@${r} `:""}(${n}${t?` ${JSON.stringify(m(t,60))}`:""})`}function tt(e){let n=e.localName;e.id&&(n+=`#${e.id}`);let t=typeof e.className=="string"?e.className.trim().split(/\s+/).filter(Boolean).slice(0,2):[];t.length&&(n+=`.${t.join(".")}`);let r=m(A(e,80),60);return`<${n}>${r?` ${JSON.stringify(r)}`:""}`}function nt(e){let n=e.ownerDocument.defaultView;return{width:n.innerWidth,height:n.innerHeight}}function M(e){let n=e.getBoundingClientRect();return n.width<=0||n.height<=0||g(e).visibility!=="visible"?null:n}function ae(e,n,t){let r=e.elementFromPoint(n,t);for(;r;){let o=z(r);if(!o)break;let i=o.elementFromPoint(n,t);if(!i||i===r)break;r=i}return r}function ce(e,n,t,r){let o=n?tt(n):"nothing (the point is outside the page)";return new Error(`${u(e)} is covered by ${o} at (${Math.round(t)}, ${Math.round(r)}). Dismiss or act on the covering element (a consent banner, modal or overlay), then run snapshot again before reusing refs.`)}function rt(e){var q;if(!M(e))throw new Error(`${u(e)} is not visible (no box on screen). Run snapshot again; it may be collapsed or hidden.`);try{e.scrollIntoView({block:"center",inline:"center",behavior:"instant"})}catch{}let n=e.getBoundingClientRect(),t=nt(e),r=Math.max(n.left,0),o=Math.min(n.right,t.width),i=Math.max(n.top,0),s=Math.min(n.bottom,t.height);if(o<=r||s<=i)throw new Error(`${u(e)} is outside the viewport and could not be scrolled into it.`);let a=(r+o)/2,l=(i+s)/2,c=ae(e.ownerDocument,a,l),p=c==null?void 0:c.closest("label");if(!c||!(Ye(e,c)||(p==null?void 0:p.control)===e))throw ce(e,c,a,l);let j=e.ownerDocument,P=a,V=l;for(;j!==document;){let b=(q=j.defaultView)==null?void 0:q.frameElement;if(!b)break;let ee=b.getBoundingClientRect(),te=g(b);P+=ee.left+b.clientLeft+parseFloat(te.paddingLeft||"0"),V+=ee.top+b.clientTop+parseFloat(te.paddingTop||"0");let ne=ae(b.ownerDocument,P,V);if(ne!==b)throw ce(e,ne,P,V);j=b.ownerDocument}return{x:a,y:l,hit:c}}function w(e,n,t,r,o={}){let i=e.ownerDocument.defaultView,s=n.startsWith("pointer")?i.PointerEvent??i.MouseEvent:i.MouseEvent,a=n.endsWith("enter")||n.endsWith("leave");return e.dispatchEvent(new s(n,{bubbles:!a,cancelable:!a,composed:!0,clientX:t,clientY:r,screenX:t,screenY:r,button:0,buttons:0,detail:0,pointerId:1,pointerType:"mouse",isPrimary:!0,...o}))}function ot(e){var n,t;for(let r=e;r;r=X(r))if(r.matches(be)&&!T(r)){r.focus({preventScroll:!0});return}(t=(n=e.ownerDocument.activeElement)==null?void 0:n.blur)==null||t.call(n)}function le(e,n,t,r){w(e,"pointerdown",n,t,{buttons:1}),w(e,"mousedown",n,t,{buttons:1,detail:r})&&ot(e),w(e,"pointerup",n,t),w(e,"mouseup",n,t,{detail:r}),w(e,"click",n,t,{detail:r})}function Ce(e,n){if(n!=="hover"&&T(e))throw new Error(`${u(e)} is disabled.`);let{x:t,y:r,hit:o}=rt(e);for(let i of["pointerover","pointerenter","mouseover","mouseenter","pointermove","mousemove"])w(o,i,t,r);n!=="hover"&&(le(o,t,r,1),n==="dblclick"&&(le(o,t,r,2),w(o,"dblclick",t,r,{detail:2})))}var it=new Set(["","text","search","email","url","tel","password","number","date","datetime-local","month","week","time","color"]);function B(e){let n=e.localName;if(n==="textarea")return"field";if(n==="input"){let t=e.type;if(it.has(t))return"field";let r=t==="checkbox"||t==="radio"?"use check/uncheck":t==="file"?"use upload":"it takes no text";throw new Error(`${u(e)} is an <input type=${t}>: ${r}.`)}if(n==="select")throw new Error(`${u(e)} is a <select>: use select with the option's value or label.`);if(e.isContentEditable)return"rich";throw new Error(`${u(e)} is not editable. Run snapshot and pick a textbox.`)}function ue(e){let n=B(e);if(T(e))throw new Error(`${u(e)} is disabled.`);if(e.readOnly)throw new Error(`${u(e)} is read-only.`);return n}function G(e,n){var r;let t=(r=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value"))==null?void 0:r.set;t?t.call(e,n):e.value=n}function D(e,n,t){let r=e.ownerDocument.defaultView;e.dispatchEvent(new(r.InputEvent??r.Event)("input",{bubbles:!0,composed:!0,inputType:n,data:t}))}function U(e,n){e.dispatchEvent(new e.ownerDocument.defaultView.Event(n,{bubbles:!0}))}function Ie(e){try{let n=e.selectionStart,t=e.selectionEnd;if(n!==null&&t!==null)return[n,t]}catch{}return[e.value.length,e.value.length]}function J(e,n){var t;if(B(e)==="rich"){let r=e.ownerDocument;(t=r.execCommand)!=null&&t.call(r,"insertText",!1,n)||e.append(n)}else{let r=e,[o,i]=Ie(r);G(r,r.value.slice(0,o)+n+r.value.slice(i));try{r.setSelectionRange(o+n.length,o+n.length)}catch{}}D(e,"insertText",n)}function st(e,n){if(B(e)!=="field")return;let t=e,[r,o]=Ie(t);r===o&&(n?o=Math.min(t.value.length,o+1):r=Math.max(0,r-1)),G(t,t.value.slice(0,r)+t.value.slice(o));try{t.setSelectionRange(r,r)}catch{}D(e,n?"deleteContentForward":"deleteContentBackward",null)}function fe(e){if(e.ownerDocument.activeElement===e)return;e.focus({preventScroll:!0});let n=e;if(e.localName==="input"||e.localName==="textarea")try{n.setSelectionRange(n.value.length,n.value.length)}catch{}}function me(){var n;let e=document.activeElement;for(;;){let t=e?((n=z(e))==null?void 0:n.activeElement)??null:null;if(t){e=t;continue}if((e==null?void 0:e.localName)==="iframe"){let r=null;try{r=e.contentDocument}catch{}if(r!=null&&r.activeElement){e=r.activeElement;continue}}break}return e??document.body}function y(e,n,t,r){let o=e.ownerDocument.defaultView,i=ie(n,t),s=new o.KeyboardEvent(n,{key:t,code:oe(t),bubbles:!0,cancelable:!0,composed:!0,...i,...r});for(let a of["keyCode","which","charCode"])s[a]!==i[a]&&Object.defineProperty(s,a,{get:()=>i[a]});return e.dispatchEvent(s)}function at(e){return Array.from(e.querySelectorAll(be)).filter(n=>n.tabIndex>=0&&!T(n)&&!!M(n))}var ct=new Set(["button","link","tab","menuitem","option","clickable"]),lt=new Set(["button","checkbox","radio","switch","tab","menuitem","option","clickable"]);function de(e,n){return n.has(Y(e,"",""))?(e.click(),!0):!1}function ut(e,n){let{key:t,mods:r}=re(n),o=r.ctrlKey||r.metaKey||r.altKey,i=t.length===1&&!o;if(y(e,"keydown",t,r)&&!(t===" "&&e.localName!=="input"&&e.localName!=="textarea"&&de(e,lt)))if(i)y(e,"keypress",t,r),(e.localName==="input"||e.localName==="textarea"||e.isContentEditable)&&J(e,t);else if(t==="Enter")if(y(e,"keypress",t,r),e.localName==="textarea")J(e,`
3
- `);else if(e.localName==="input"&&e.form){let s=e.form;typeof s.requestSubmit=="function"?s.requestSubmit():s.submit()}else de(e,ct);else if(t==="Tab"){let s=at(e.ownerDocument),a=s.indexOf(e),l=s[(a+(r.shiftKey?-1:1)+s.length)%s.length];l==null||l.focus()}else t==="Backspace"||t==="Delete"?st(e,t==="Delete"):(r.ctrlKey||r.metaKey)&&t.toLowerCase()==="a"&&B(e)==="field"&&e.select();y(e,"keyup",t,r)}function ft(e,n){if(e.localName!=="select")throw new Error(`${u(e)} is not a <select>. For a custom dropdown: click it open, snapshot, then click the option.`);if(T(e))throw new Error(`${u(e)} is disabled.`);let t=e,r=Array.from(t.options),o=n.trim(),i=r.find(s=>s.value===n)??r.find(s=>f(s.label||s.text)===o)??r.find(s=>f(s.label||s.text).toLowerCase()===o.toLowerCase());if(!i){let s=r.slice(0,L).map(a=>JSON.stringify(f(a.label||a.text))).join(", ");throw new Error(`${u(e)} has no option ${JSON.stringify(n)}. Options: ${s}${r.length>L?", \u2026":""}.`)}if(i.disabled)throw new Error(`Option ${JSON.stringify(f(i.label))} of ${u(e)} is disabled.`);return t.focus(),i.selected=!0,U(t,"input"),U(t,"change"),{value:i.value,label:f(i.label||i.text)}}function mt(e,n){let t=_(e);if(t===void 0)throw new Error(`${u(e)} is not a checkbox, radio or switch.`);if(t===n)return{checked:n,changed:!1};if(!n&&e.localName==="input"&&e.type==="radio")throw new Error(`${u(e)} is a radio: it unchecks when another option in its group is checked.`);let r=e.localName==="input"&&!M(e)?Array.from(e.labels??[]).find(o=>M(o)):void 0;if(T(e))throw new Error(`${u(e)} is disabled.`);if(Ce(r??e,"click"),_(e)!==n)throw new Error(`Clicking ${u(e)} did not ${n?"check":"uncheck"} it.`);return{checked:n,changed:!0}}function he(e){if(e.localName==="input"||e.localName==="textarea")return e.value;if(e.localName==="select")return ye(e)??"";let n=e.innerText;return(typeof n=="string"?n:e.textContent||"").trim()}function He(e){let n=e.op;switch(n){case"click":case"dblclick":case"hover":{let t=h(e.selector);return Ce(t,n),{[n==="hover"?"hovered":"clicked"]:u(t)}}case"fill":{let t=h(e.selector),r=ue(t),o=e.text??"";return t.focus({preventScroll:!0}),r==="rich"?(t.textContent=o,D(t,"insertText",o)):(G(t,o),D(t,"insertText",o),U(t,"change")),{filled:u(t),value:r==="rich"?o:t.value}}case"type":{let t=e.selector?h(e.selector):me();ue(t),e.selector&&fe(t);for(let r of e.text??"")y(t,"keydown",r,{}),y(t,"keypress",r,{}),J(t,r),y(t,"keyup",r,{});return{typed:u(t),value:he(t)}}case"press":{if(!e.key)throw new Error("key required: Enter, Tab, Escape, ArrowDown, Control+a \u2026");let t=e.selector?h(e.selector):me();return e.selector&&fe(t),ut(t,e.key),{pressed:e.key,on:u(t)}}case"focus":{let t=h(e.selector);return t.focus({preventScroll:!0}),{focused:u(t)}}case"select":return{selected:ft(h(e.selector),e.value??e.text??"")};case"check":case"uncheck":return mt(h(e.selector),n==="check");case"text":return{text:he(h(e.selector))};case"attribute":{if(!e.attribute)throw new Error("attribute required: the attribute name to read");return{value:h(e.selector).getAttribute(e.attribute)}}case"scrollIntoView":{let t=h(e.selector);return t.scrollIntoView({block:"center",inline:"center",behavior:"instant"}),{scrolled:u(t)}}case"scroll":{let t=e.selector?h(e.selector):document.scrollingElement??document.documentElement;return t.scrollBy({left:e.dx??0,top:e.dy??0,behavior:"instant"}),{x:t.scrollLeft,y:t.scrollTop}}case"count":{if(!e.selector)throw new Error("selector required: a CSS selector to count");return{count:document.querySelectorAll(e.selector).length}}}throw new Error(`Unknown page action ${JSON.stringify(n)}.`)}function Oe(e){let n=e.state==="hidden";if(e.text){let o=document.body,i=o==null?void 0:o.innerText;return{met:(typeof i=="string"?i:(o==null?void 0:o.textContent)||"").includes(e.text)!==n}}let t=null;try{t=h(e.selector)}catch(o){if(e.selector&&Ee(e.selector)&&!n)throw o}return{met:(!!t&&!!M(t))!==n}}function De(e=0){var t;e>x&&(x=e),Le();let n=[];for(let r of Q(Ne({}))){let o=r.el,i=M(o);if(!i)continue;let s=i.left,a=i.top;for(let l=o.ownerDocument;l!==document;){let c=(t=l.defaultView)==null?void 0:t.frameElement;if(!c)break;let p=c.getBoundingClientRect();s+=p.left+c.clientLeft,a+=p.top+c.clientTop,l=c.ownerDocument}s+i.width<=0||a+i.height<=0||s>=innerWidth||a>=innerHeight||n.push({ref:ge(o),label:`${r.role}${r.name?` ${JSON.stringify(m(r.name,60))}`:""}`,x:s,y:a,w:i.width,h:i.height})}return{boxes:n,last:x,width:innerWidth,height:innerHeight}}var Z=6e4,dt=new Set(["input","select","textarea","svg","canvas","video","audio","map"]);function N(e,n){let t=e.nodeType===9?e.body:e;return t?$(t).map(r=>bt(r,n)).join(""):""}function S(e,n){return f(N(e,n))}function E(e){return e.trim()?`
1
+ "use strict";(()=>{var D=e=>new Map(Object.entries(e)),je=D({enter:"Enter",return:"Enter",tab:"Tab",escape:"Escape",esc:"Escape",space:" ",backspace:"Backspace",delete:"Delete",del:"Delete",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",arrowup:"ArrowUp",arrowdown:"ArrowDown",arrowleft:"ArrowLeft",arrowright:"ArrowRight",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",comma:","}),Ve=D({control:"ctrlKey",ctrl:"ctrlKey",shift:"shiftKey",alt:"altKey",option:"altKey",meta:"metaKey",cmd:"metaKey",command:"metaKey"}),_e=D({Backspace:8,Tab:9,Enter:13,Shift:16,Control:17,Alt:18,CapsLock:20,Escape:27," ":32,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Insert:45,Delete:46,Meta:91,ContextMenu:93,")":48,"!":49,"@":50,"#":51,$:52,"%":53,"^":54,"&":55,"*":56,"(":57,";":186,":":186,"=":187,"+":187,",":188,"<":188,"-":189,_:189,".":190,">":190,"/":191,"?":191,"`":192,"~":192,"[":219,"{":219,"\\":220,"|":220,"]":221,"}":221,"'":222,'"':222}),Fe=D({" ":"Space",",":"Comma",".":"Period",";":"Semicolon","=":"Equal","-":"Minus","/":"Slash","`":"Backquote","[":"BracketLeft","]":"BracketRight","\\":"Backslash","'":"Quote"});function oe(e,n){let t=e.split("+").map(c=>c.trim());t[t.length-1]===""&&t.length>1&&(t.pop(),t[t.length-1]="+");let r={};for(let c of t.slice(0,-1)){let l=Ve.get(c.toLowerCase());if(!l)throw new Error(`Unknown modifier ${JSON.stringify(c)} in ${JSON.stringify(e)}: use Control, Shift, Alt or Meta.`);r[l]=!0}let o=typeof n=="number"||typeof n=="string"&&/^\d+$/.test(n)?Number(n):0,i=n&&typeof n=="object"?n:{};(o&1||i.alt)&&(r.altKey=!0),(o&2||i.ctrl)&&(r.ctrlKey=!0),(o&4||i.meta)&&(r.metaKey=!0),(o&8||i.shift)&&(r.shiftKey=!0);let s=t[t.length-1];if(!s)throw new Error("key required: Enter, Tab, Escape, ArrowDown, Control+a \u2026");return{key:je.get(s.toLowerCase())??(s.length===1?s:s[0].toUpperCase()+s.slice(1)),mods:r}}function ie(e){return/^[a-z]$/i.test(e)?`Key${e.toUpperCase()}`:/^\d$/.test(e)?`Digit${e}`:Fe.get(e)??e}function We(e){let n=_e.get(e);if(n!==void 0)return n;if(/^[a-z0-9]$/i.test(e))return e.toUpperCase().charCodeAt(0);let t=/^F([1-9]|1\d|2[0-4])$/.exec(e);return t?111+Number(t[1]):0}function se(e,n){if(e==="keypress"){let r=n==="Enter"?13:n.length===1?n.charCodeAt(0):0;return{keyCode:r,which:r,charCode:r}}let t=We(n);return{keyCode:t,which:t,charCode:0}}var O=new Set(["button","link","textbox","searchbox","checkbox","radio","switch","combobox","listbox","option","slider","spinbutton","tab","menuitem","menuitemcheckbox","menuitemradio","treeitem","clickable"]),Ue=new Set(["heading","img","cell","gridcell","columnheader","rowheader","dialog","alertdialog","article","region","navigation","form","iframe"]),Ee=new Set(["button","link","heading","cell","gridcell","columnheader","rowheader","option","tab","menuitem","menuitemcheckbox","menuitemradio","treeitem","checkbox","radio","switch","tooltip","clickable"]),Je=new Set(["cell","gridcell","columnheader","rowheader"]),ze=new Set(["textbox","searchbox","combobox","spinbutton","slider"]),Xe=new Set(["script","style","noscript","template","head","meta","link","title","base","object","embed","param","source","track","datalist"]),B=new Set(["inline","inline-block","inline-flex","inline-grid","contents"]),Ye=new Set(["hanzo-ai-overlay","hanzo-page-overlay-root","hanzo-picker-overlay","hanzo-console-root"]),we='a[href],area[href],button,input,select,textarea,summary,iframe,[tabindex],[contenteditable=""],[contenteditable="true"]',Qe={fieldset:"legend",table:"caption",figure:"figcaption"},d=150,W=300,L=25,I=new Map,U=new WeakMap,x=0;function ye(e){let n=U.get(e);return n||(n=`e${++x}`,U.set(e,n)),I.set(n,new WeakRef(e)),n}function xe(e){return/^@?e\d+$/.test(e.trim())}function ke(e){return e.isConnected&&!!e.ownerDocument.defaultView}function p(e){var r;if(!e||!e.trim())throw new Error("selector required: a snapshot ref (@e2) or a CSS selector");let n=e.trim();if(xe(n)){let o=n.replace(/^@/,""),i=(r=I.get(o))==null?void 0:r.deref();if(!i)throw new Error(`Unknown ref @${o}: this page has no such ref (it navigated, or the ref came from another tab). Run snapshot again for fresh refs.`);if(!ke(i))throw I.delete(o),new Error(`Stale ref @${o}: its element is no longer in the page. Run snapshot again for fresh refs.`);return i}let t;try{t=n.includes(">>>")?ae(document,n):document.querySelector(n)??ae(document,n)}catch{throw new Error(`Invalid selector ${JSON.stringify(n)}: pass a snapshot ref (@e2) or a CSS selector.`)}if(!t)throw new Error(`No element matches ${JSON.stringify(n)}. Run snapshot to see what is on the page.`);return t}function b(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function k(e){var t;let n=e;try{if(typeof n.openOrClosedShadowRoot=="function")return n.openOrClosedShadowRoot()??null;let r=(t=globalThis.chrome)==null?void 0:t.dom;if(r!=null&&r.openOrClosedShadowRoot)return r.openOrClosedShadowRoot(e)??null}catch{}return e.shadowRoot}function Ge(e,n){let t=[],r=new Set,o=i=>{for(let s of Array.from(i.querySelectorAll(n)))r.has(s)||(r.add(s),t.push(s));for(let s of Array.from(i.querySelectorAll("*"))){let a=k(s);a&&o(a)}};return o(e),t}function ae(e,n){if(n.includes(">>>")){let o=n.split(">>>").map(a=>a.trim());if(o.some(a=>!a))throw new SyntaxError(n);let i=(e instanceof Document?e:e.ownerDocument??document).createDocumentFragment();for(let a of o)i.querySelector(a);let s=[e];for(let a=0;a<o.length;a++){let c=[];for(let l of s)for(let h of Ge(l,o[a]))c.includes(h)||c.push(h);if(!c.length)return null;if(a===o.length-1)return c[0];s=c.map(l=>k(l)??l)}return null}let t=e.querySelector(n);if(t)return t;let r=o=>{for(let i of Array.from(o.querySelectorAll("*"))){let s=k(i);if(s){let a=s.querySelector(n)??r(s);if(a)return a}}return null};return r(e)}function v(e){let n=e instanceof Element?k(e):null,t=[];for(let r of Array.from((n??e).childNodes))if(r.nodeType===1&&r.localName==="slot"){let o=r,i=typeof o.assignedNodes=="function"?o.assignedNodes({flatten:!0}):[];t.push(...i.length?i:Array.from(o.childNodes))}else t.push(r);return t}function H(e){if(e.assignedSlot)return e.assignedSlot;let n=e.parentNode;return n?n.nodeType===11?n.host??null:n.nodeType===1?n:null:null}function ce(e,n){for(let t=n;t;t=H(t))if(t===e)return!0;return!1}function S(e){if(Xe.has(e.localName)||Ye.has(e.id)||e.hidden||e.getAttribute("aria-hidden")==="true")return!0;let n=b(e).display;return n==="none"?!0:n!=="contents"&&typeof e.checkVisibility=="function"&&!e.checkVisibility()}function f(e){return e.replace(/\s+/g," ").trim()}function m(e,n){return e.length>n?`${e.slice(0,n-1)}\u2026`:e}function C(e,n=d*2){let t="",r=o=>{if(t.length>n)return;if(o.nodeType===3){t+=o.textContent;return}if(o.nodeType!==1)return;let i=o;if(S(i))return;let s=i.getAttribute("aria-label");if(s&&s.trim()){t+=` ${s} `;return}if(i.localName==="img"){t+=` ${i.getAttribute("alt")??""} `;return}if(i.localName==="input"){let l=i.type;(l==="submit"||l==="button"||l==="reset")&&(t+=` ${i.value} `);return}if(i.localName==="select"||i.localName==="textarea")return;let a=!B.has(b(i).display),c=t.length;a&&(t+=" ");for(let l of v(i))r(l);!t.slice(c).trim()&&i.getAttribute("title")&&(t+=` ${i.getAttribute("title")} `),a&&(t+=" ")};for(let o of v(e))r(o);return f(t)}function Ze(e,n){let t=e.getAttribute(n);if(!t)return"";let r=e.getRootNode();return f(t.split(/\s+/).map(o=>{var s;let i=((s=r.getElementById)==null?void 0:s.call(r,o))??e.ownerDocument.getElementById(o);return i?C(i):""}).join(" "))}function le(e){for(let n=e.parentElement;n;n=n.parentElement)if(["article","aside","main","nav","section"].includes(n.localName))return!0;return!1}function qe(e){var t;switch(e.localName){case"a":case"area":return e.hasAttribute("href")?"link":"";case"button":return"button";case"input":{let r=e.type;return r==="hidden"?"":r==="button"||r==="submit"||r==="reset"||r==="image"||r==="file"?"button":r==="checkbox"?"checkbox":r==="radio"?"radio":r==="range"?"slider":r==="number"?"spinbutton":e.hasAttribute("list")?"combobox":r==="search"?"searchbox":"textbox"}case"select":return e.multiple||e.size>1?"listbox":"combobox";case"option":return"option";case"textarea":return"textbox";case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return"heading";case"img":return e.getAttribute("alt")===""?"":"img";case"svg":return e.getAttribute("aria-label")||e.querySelector("title")?"img":"";case"ul":case"ol":case"menu":return"list";case"li":return"listitem";case"nav":return"navigation";case"main":return"main";case"header":return le(e)?"":"banner";case"footer":return le(e)?"":"contentinfo";case"aside":return"complementary";case"form":return"form";case"section":return e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")?"region":"";case"article":return"article";case"table":return"table";case"tr":return"row";case"td":return"cell";case"th":return e.getAttribute("scope")==="row"?"rowheader":"columnheader";case"dialog":return"dialog";case"details":case"fieldset":return"group";case"summary":return"button";case"p":return"paragraph";case"blockquote":return"blockquote";case"hr":return"separator";case"progress":return"progressbar";case"meter":return"meter";case"output":return"status";case"iframe":return"iframe";case"figure":return"figure"}return e.isContentEditable&&!((t=e.parentElement)!=null&&t.isContentEditable)?"textbox":""}function Q(e,n,t){let r=(e.getAttribute("role")||"").trim().split(/\s+/)[0].toLowerCase();if(r&&r!=="presentation"&&r!=="none"&&r!=="generic")return r;let o=qe(e);if(o)return o;let i=e.localName;return i==="label"||i==="body"||i==="html"?"":e.hasAttribute("tabindex")&&e.tabIndex>=0||e.hasAttribute("onclick")||n==="pointer"&&t!=="pointer"?"clickable":""}function J(e){let n=e.localName;if(n==="select")return Array.from(e.selectedOptions).map(o=>f(o.label||o.text)).join(", ");if(n==="input"||n==="textarea"){let r=e;return r.type==="password"?r.value?"\u2022".repeat(Math.min(r.value.length,8)):"":r.value}return e.isContentEditable?f(e.textContent||""):e.getAttribute("aria-valuenow")??void 0}function Se(e,n){var s;let t=Ze(e,"aria-labelledby");if(t)return m(t,d);let r=e.getAttribute("aria-label");if(r&&r.trim())return m(f(r),d);let o=e.localName;if(o==="input"||o==="select"||o==="textarea"){let a=e;if(o==="input"&&(a.type==="submit"||a.type==="reset"||a.type==="button"))return m(a.value||(a.type==="submit"?"Submit":a.type==="reset"?"Reset":""),d);if(o==="input"&&a.type==="image")return m(a.alt||a.title||"Submit",d);let c=Array.from(a.labels??[]).map(l=>C(l)).filter(Boolean).join(" ");return m(c||f(a.placeholder||e.getAttribute("title")||""),d)}if(o==="img"||o==="area")return m(f(e.getAttribute("alt")||e.getAttribute("title")||""),d);if(o==="svg")return m(f(((s=e.querySelector("title"))==null?void 0:s.textContent)||""),d);let i=Qe[o];if(i){let a=e.querySelector(`:scope > ${i}`);if(a)return m(C(a),d)}if(o==="iframe")return m(f(e.getAttribute("title")||e.getAttribute("name")||""),d);if(Ee.has(n)){let a=C(e);if(a)return m(a,d)}return m(f(e.getAttribute("title")||""),d)}function T(e){try{if(e.matches(":disabled"))return!0}catch{}return!!e.closest('[aria-disabled="true"]')}function z(e){if(e.localName==="input"){let t=e;if(t.type==="checkbox"||t.type==="radio")return t.indeterminate?"mixed":t.checked}let n=e.getAttribute("aria-checked");if(n==="mixed")return"mixed";if(n==="true"||n==="false")return n==="true"}function et(e,n){var i;let t=[];if(n==="heading"){let s=/^h([1-6])$/.exec(e.localName);t.push(`level=${e.getAttribute("aria-level")||(s?s[1]:"2")}`)}let r=z(e);r==="mixed"?t.push("checked=mixed"):r===!0&&t.push("checked"),O.has(n)&&T(e)&&t.push("disabled");let o=e.getAttribute("aria-expanded");return o==="true"||o==="false"?t.push(`expanded=${o}`):e.localName==="summary"&&((i=e.parentElement)==null?void 0:i.localName)==="details"&&t.push(`expanded=${e.parentElement.open}`),(e.getAttribute("aria-selected")==="true"||e.localName==="option"&&e.selected)&&t.push("selected"),e.getAttribute("aria-pressed")==="true"&&t.push("pressed"),(e.required||e.getAttribute("aria-required")==="true")&&t.push("required"),t}function R(e){return e.text===void 0&&O.has(e.role)&&!!e.el||e.kids.some(R)}function tt(e,n){let t=e[e.length-1];t&&t.text!==void 0&&!t.closed?t.text+=n:e.push({role:"",name:"",text:n,props:[],kids:[]})}function N(e){let n=e[e.length-1];n&&n.text!==void 0&&(n.closed=!0)}function K(e,n,t,r){for(let o of v(e))o.nodeType===3?t||tt(n,o.textContent||""):o.nodeType===1&&Te(o,n,r)}function Te(e,n,t){if(S(e))return;let r=b(e),o=r.visibility!=="visible",i=o?"":Q(e,r.cursor,t),s=!B.has(r.display);if(!i){s&&N(n),K(e,n,o,r.cursor),s&&N(n);return}let a={role:i,name:Se(e,i),el:e,props:et(e,i),kids:[]},c=[];if((ze.has(i)||e.localName==="select")&&(a.value=J(e)),e.localName==="select"){let l=Array.from(e.options);for(let h of l.slice(0,L))a.kids.push({role:"option",name:m(f(h.label||h.text),d),props:h.selected?["selected"]:[],kids:[]});l.length>L&&a.kids.push({role:"",name:"",text:`\u2026 ${l.length-L} more options`,props:[],kids:[]})}else if(e.localName==="iframe"){let l=null;try{l=e.contentDocument}catch{}l!=null&&l.body?K(l.body,a.kids,!1,""):a.props.push("cross-origin")}else i==="img"||e.localName==="input"||e.localName==="textarea"||(K(e,a.kids,!1,r.cursor),c=a.kids,Je.has(i)&&a.kids.some(R)&&!e.hasAttribute("aria-label")&&!e.hasAttribute("aria-labelledby")&&(a.name=""),Ee.has(i)&&a.name&&(a.kids=a.kids.filter(R)));if(i==="clickable"&&c.some(R)){s&&N(n),n.push(...c),s&&N(n);return}s&&N(n),n.push(a),s&&N(n)}function Ne(e){let n=[];for(let t of e){if(t.text!==void 0){let r=f(t.text);r&&n.push({...t,text:r});continue}t.kids=Ne(t.kids),!(ve(t)&&!t.kids.length&&t.role!=="separator")&&n.push(t)}return n}function ve(e){return!$e(e)&&!e.name&&e.value===void 0&&e.props.length===0}function $e(e){return e.el?O.has(e.role)||Ue.has(e.role)&&(!!e.name||e.role==="iframe"):!1}function Me(e){let n=[];for(let t of e){if(t.text!==void 0){n.push(t);continue}if(t.kids=Me(t.kids),ve(t)&&t.kids.length<=1){n.push(...t.kids);continue}n.push(t)}return n}function G(e,n=[]){for(let t of e)t.text===void 0&&O.has(t.role)&&t.el&&n.push({...t,kids:[]}),G(t.kids,n);return n}function nt(e,n){if(e.text!==void 0)return`${n}- text: ${m(e.text,W)}`;let t=`${n}- ${e.role}`;e.name&&(t+=` ${JSON.stringify(e.name)}`),$e(e)&&(t+=` [ref=${ye(e.el)}]`);for(let r of e.props)t+=` [${r}]`;return t}function Ae(e,n,t,r){let o=" ".repeat(n),i=!t.depth||n+1<t.depth;for(let s of e){let a=nt(s,o),c=s.kids;if(s.text===void 0){s.value&&(!c.length||!i)?a+=`: ${m(f(s.value),W)}`:c.length===1&&c[0].text!==void 0&&(a+=`: ${m(c[0].text,W)}`,c=[]);let l=t.urls&&s.role==="link"?s.el.href:"";(l||c.length&&i)&&(a+=":"),r.push(a),l&&r.push(`${o} - /url: ${l}`),i&&Ae(c,n+1,t,r)}else r.push(a)}}function Le(e){let n=[];if(e.selector){let t=p(e.selector),r=H(t);Te(t,n,r?b(r).cursor:"")}else{let t=document.body??document.documentElement;K(t,n,!1,"")}return n=Ne(n),e.compact?Me(n):n}function Ce(){for(let[e,n]of I){let t=n.deref();(!t||!ke(t))&&I.delete(e)}}function Ie(e={}){e.base&&e.base>x&&(x=e.base),Ce();let n=Le(e);e.interactive&&(n=G(n));let t=[];Ae(n,0,e,t);let r=t.filter(o=>o.includes("[ref=")).length;return{tree:t.join(`
2
+ `)||"(empty: nothing rendered)",refs:r,last:x,url:location.href,title:document.title}}function u(e){let n=Q(e,"","")||e.localName,t=Se(e,n),r=U.get(e);return`${r?`@${r} `:""}(${n}${t?` ${JSON.stringify(m(t,60))}`:""})`}function rt(e){let n=e.localName;e.id&&(n+=`#${e.id}`);let t=typeof e.className=="string"?e.className.trim().split(/\s+/).filter(Boolean).slice(0,2):[];t.length&&(n+=`.${t.join(".")}`);let r=m(C(e,80),60);return`<${n}>${r?` ${JSON.stringify(r)}`:""}`}function ot(e){let n=e.ownerDocument.defaultView;return{width:n.innerWidth,height:n.innerHeight}}function $(e){let n=e.getBoundingClientRect();return n.width<=0||n.height<=0||b(e).visibility!=="visible"?null:n}function ue(e,n,t){let r=e.elementFromPoint(n,t);for(;r;){let o=k(r);if(!o)break;let i=o.elementFromPoint(n,t);if(!i||i===r)break;r=i}return r}function fe(e,n,t,r){let o=n?rt(n):"nothing (the point is outside the page)";return new Error(`${u(e)} is covered by ${o} at (${Math.round(t)}, ${Math.round(r)}). Dismiss or act on the covering element (a consent banner, modal or overlay), then run snapshot again before reusing refs.`)}function it(e,n){if(ce(e,n))return!0;let t=n.closest("label");if((t==null?void 0:t.control)===e)return!0;let r=e.getRootNode();if((r.nodeType===11||typeof ShadowRoot<"u"&&r instanceof ShadowRoot)&&n.getRootNode()===r)return!0;if(e.localName==="svg"||e.closest("svg"))for(let o=H(e);o;o=H(o)){let i=o.localName,s=(o.getAttribute("role")||"").trim().toLowerCase();if(i==="button"||i==="a"||i==="label"||i==="summary"||O.has(s)||o.hasAttribute("onclick")||o.hasAttribute("tabindex")&&o.tabIndex>=0||b(o).cursor==="pointer"||k(o)!==null)return ce(o,n)}return!1}function st(e){var ee;if(!$(e))throw new Error(`${u(e)} is not visible (no box on screen). Run snapshot again; it may be collapsed or hidden.`);try{e.scrollIntoView({block:"center",inline:"center",behavior:"instant"})}catch{}let n=e.getBoundingClientRect(),t=ot(e),r=Math.max(n.left,0),o=Math.min(n.right,t.width),i=Math.max(n.top,0),s=Math.min(n.bottom,t.height);if(o<=r||s<=i)throw new Error(`${u(e)} is outside the viewport and could not be scrolled into it.`);let a=(r+o)/2,c=(i+s)/2,l=ue(e.ownerDocument,a,c);if(!l||!it(e,l))throw fe(e,l,a,c);let h=e.ownerDocument,V=a,_=c;for(;h!==document;){let g=(ee=h.defaultView)==null?void 0:ee.frameElement;if(!g)break;let te=g.getBoundingClientRect(),ne=b(g);V+=te.left+g.clientLeft+parseFloat(ne.paddingLeft||"0"),_+=te.top+g.clientTop+parseFloat(ne.paddingTop||"0");let re=ue(g.ownerDocument,V,_);if(re!==g)throw fe(e,re,V,_);h=g.ownerDocument}return{x:a,y:c,hit:l}}function w(e,n,t,r,o={}){let i=e.ownerDocument.defaultView,s=n.startsWith("pointer")?i.PointerEvent??i.MouseEvent:i.MouseEvent,a=n.endsWith("enter")||n.endsWith("leave");return e.dispatchEvent(new s(n,{bubbles:!a,cancelable:!a,composed:!0,clientX:t,clientY:r,screenX:t,screenY:r,button:0,buttons:0,detail:0,pointerId:1,pointerType:"mouse",isPrimary:!0,...o}))}function at(e){var n,t;for(let r=e;r;r=H(r))if(r.matches(we)&&!T(r)){r.focus({preventScroll:!0});return}(t=(n=e.ownerDocument.activeElement)==null?void 0:n.blur)==null||t.call(n)}function me(e,n,t,r){w(e,"pointerdown",n,t,{buttons:1}),w(e,"mousedown",n,t,{buttons:1,detail:r})&&at(e),w(e,"pointerup",n,t),w(e,"mouseup",n,t,{detail:r}),w(e,"click",n,t,{detail:r})}function He(e,n){if(n!=="hover"&&T(e))throw new Error(`${u(e)} is disabled.`);let{x:t,y:r,hit:o}=st(e);for(let i of["pointerover","pointerenter","mouseover","mouseenter","pointermove","mousemove"])w(o,i,t,r);n!=="hover"&&(me(o,t,r,1),n==="dblclick"&&(me(o,t,r,2),w(o,"dblclick",t,r,{detail:2})))}var ct=new Set(["","text","search","email","url","tel","password","number","date","datetime-local","month","week","time","color"]);function j(e){let n=e.localName;if(n==="textarea")return"field";if(n==="input"){let t=e.type;if(ct.has(t))return"field";let r=t==="checkbox"||t==="radio"?"use check/uncheck":t==="file"?"use upload":"it takes no text";throw new Error(`${u(e)} is an <input type=${t}>: ${r}.`)}if(n==="select")throw new Error(`${u(e)} is a <select>: use select with the option's value or label.`);if(e.isContentEditable)return"rich";throw new Error(`${u(e)} is not editable. Run snapshot and pick a textbox.`)}function de(e){let n=j(e);if(T(e))throw new Error(`${u(e)} is disabled.`);if(e.readOnly)throw new Error(`${u(e)} is read-only.`);return n}function Z(e,n){var r;let t=(r=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value"))==null?void 0:r.set;t?t.call(e,n):e.value=n}function P(e,n,t){let r=e.ownerDocument.defaultView;e.dispatchEvent(new(r.InputEvent??r.Event)("input",{bubbles:!0,composed:!0,inputType:n,data:t}))}function X(e,n){e.dispatchEvent(new e.ownerDocument.defaultView.Event(n,{bubbles:!0}))}function Oe(e){try{let n=e.selectionStart,t=e.selectionEnd;if(n!==null&&t!==null)return[n,t]}catch{}return[e.value.length,e.value.length]}function Y(e,n){var t;if(j(e)==="rich"){let r=e.ownerDocument;(t=r.execCommand)!=null&&t.call(r,"insertText",!1,n)||e.append(n)}else{let r=e,[o,i]=Oe(r);Z(r,r.value.slice(0,o)+n+r.value.slice(i));try{r.setSelectionRange(o+n.length,o+n.length)}catch{}}P(e,"insertText",n)}function lt(e,n){if(j(e)!=="field")return;let t=e,[r,o]=Oe(t);r===o&&(n?o=Math.min(t.value.length,o+1):r=Math.max(0,r-1)),Z(t,t.value.slice(0,r)+t.value.slice(o));try{t.setSelectionRange(r,r)}catch{}P(e,n?"deleteContentForward":"deleteContentBackward",null)}function he(e){if(e.ownerDocument.activeElement===e)return;e.focus({preventScroll:!0});let n=e;if(e.localName==="input"||e.localName==="textarea")try{n.setSelectionRange(n.value.length,n.value.length)}catch{}}function pe(){var n;let e=document.activeElement;for(;;){let t=e?((n=k(e))==null?void 0:n.activeElement)??null:null;if(t){e=t;continue}if((e==null?void 0:e.localName)==="iframe"){let r=null;try{r=e.contentDocument}catch{}if(r!=null&&r.activeElement){e=r.activeElement;continue}}break}return e??document.body}function y(e,n,t,r){let o=e.ownerDocument.defaultView,i=se(n,t),s=new o.KeyboardEvent(n,{key:t,code:ie(t),bubbles:!0,cancelable:!0,composed:!0,...i,...r});for(let a of["keyCode","which","charCode"])s[a]!==i[a]&&Object.defineProperty(s,a,{get:()=>i[a]});return e.dispatchEvent(s)}function ut(e){return Array.from(e.querySelectorAll(we)).filter(n=>n.tabIndex>=0&&!T(n)&&!!$(n))}var ft=new Set(["button","link","tab","menuitem","option","clickable"]),mt=new Set(["button","checkbox","radio","switch","tab","menuitem","option","clickable"]);function be(e,n){return n.has(Q(e,"",""))?(e.click(),!0):!1}function dt(e,n){let{key:t,mods:r}=oe(n),o=r.ctrlKey||r.metaKey||r.altKey,i=t.length===1&&!o;if(y(e,"keydown",t,r)&&!(t===" "&&e.localName!=="input"&&e.localName!=="textarea"&&be(e,mt)))if(i)y(e,"keypress",t,r),(e.localName==="input"||e.localName==="textarea"||e.isContentEditable)&&Y(e,t);else if(t==="Enter")if(y(e,"keypress",t,r),e.localName==="textarea")Y(e,`
3
+ `);else if(e.localName==="input"&&e.form){let s=e.form;typeof s.requestSubmit=="function"?s.requestSubmit():s.submit()}else be(e,ft);else if(t==="Tab"){let s=ut(e.ownerDocument),a=s.indexOf(e),c=s[(a+(r.shiftKey?-1:1)+s.length)%s.length];c==null||c.focus()}else t==="Backspace"||t==="Delete"?lt(e,t==="Delete"):(r.ctrlKey||r.metaKey)&&t.toLowerCase()==="a"&&j(e)==="field"&&e.select();y(e,"keyup",t,r)}function ht(e,n){if(e.localName!=="select")throw new Error(`${u(e)} is not a <select>. For a custom dropdown: click it open, snapshot, then click the option.`);if(T(e))throw new Error(`${u(e)} is disabled.`);let t=e,r=Array.from(t.options),o=n.trim(),i=r.find(s=>s.value===n)??r.find(s=>f(s.label||s.text)===o)??r.find(s=>f(s.label||s.text).toLowerCase()===o.toLowerCase());if(!i){let s=r.slice(0,L).map(a=>JSON.stringify(f(a.label||a.text))).join(", ");throw new Error(`${u(e)} has no option ${JSON.stringify(n)}. Options: ${s}${r.length>L?", \u2026":""}.`)}if(i.disabled)throw new Error(`Option ${JSON.stringify(f(i.label))} of ${u(e)} is disabled.`);return t.focus(),i.selected=!0,X(t,"input"),X(t,"change"),{value:i.value,label:f(i.label||i.text)}}function pt(e,n){let t=z(e);if(t===void 0)throw new Error(`${u(e)} is not a checkbox, radio or switch.`);if(t===n)return{checked:n,changed:!1};if(!n&&e.localName==="input"&&e.type==="radio")throw new Error(`${u(e)} is a radio: it unchecks when another option in its group is checked.`);let r=e.localName==="input"&&!$(e)?Array.from(e.labels??[]).find(o=>$(o)):void 0;if(T(e))throw new Error(`${u(e)} is disabled.`);if(He(r??e,"click"),z(e)!==n)throw new Error(`Clicking ${u(e)} did not ${n?"check":"uncheck"} it.`);return{checked:n,changed:!0}}function F(e){if(e.localName==="input"||e.localName==="textarea"){let t=e;return t.type==="password"?J(e)??"":t.value}if(e.localName==="select")return J(e)??"";let n=e.innerText;return(typeof n=="string"?n:e.textContent||"").trim()}function ge(e){if(e.localName!=="input"&&e.localName!=="textarea")return;let n=`hz-${Math.random().toString(36).slice(2,10)}`;return e.setAttribute("data-hanzo-sync",n),n}function De(e){let n=e.op;switch(n){case"click":case"dblclick":case"hover":{let t=p(e.selector);return He(t,n),{[n==="hover"?"hovered":"clicked"]:u(t)}}case"fill":{let t=p(e.selector),r=de(t),o=e.text??"";t.focus({preventScroll:!0});let i;return r==="rich"?(t.textContent=o,P(t,"insertText",o)):(Z(t,o),P(t,"insertText",o),X(t,"change"),i=ge(t)),{filled:u(t),value:r==="rich"?o:F(t),...i?{_sync:i}:{}}}case"type":{let t=e.selector?p(e.selector):pe();de(t),e.selector&&he(t);for(let o of e.text??"")y(t,"keydown",o,{}),y(t,"keypress",o,{}),Y(t,o),y(t,"keyup",o,{});let r=ge(t);return{typed:u(t),value:F(t),...r?{_sync:r}:{}}}case"press":{if(!e.key)throw new Error("key required: Enter, Tab, Escape, ArrowDown, Control+a \u2026");let t=e.selector?p(e.selector):pe();return e.selector&&he(t),dt(t,e.key),{pressed:e.key,on:u(t)}}case"focus":{let t=p(e.selector);return t.focus({preventScroll:!0}),{focused:u(t)}}case"select":return{selected:ht(p(e.selector),e.value??e.text??"")};case"check":case"uncheck":return pt(p(e.selector),n==="check");case"text":return{text:F(p(e.selector))};case"attribute":{if(!e.attribute)throw new Error("attribute required: the attribute name to read");return{value:p(e.selector).getAttribute(e.attribute)}}case"scrollIntoView":{let t=p(e.selector);return t.scrollIntoView({block:"center",inline:"center",behavior:"instant"}),{scrolled:u(t)}}case"scroll":{let t=e.selector?p(e.selector):document.scrollingElement??document.documentElement;return t.scrollBy({left:e.dx??0,top:e.dy??0,behavior:"instant"}),{x:t.scrollLeft,y:t.scrollTop}}case"count":{if(!e.selector)throw new Error("selector required: a CSS selector to count");return{count:document.querySelectorAll(e.selector).length}}}throw new Error(`Unknown page action ${JSON.stringify(n)}.`)}function Re(e){let n=e.state==="hidden";if(e.text){let o=document.body,i=o==null?void 0:o.innerText;return{met:(typeof i=="string"?i:(o==null?void 0:o.textContent)||"").includes(e.text)!==n}}let t=null;try{t=p(e.selector)}catch(o){if(e.selector&&xe(e.selector)&&!n)throw o}return{met:(!!t&&!!$(t))!==n}}function Ke(e=0){var t;e>x&&(x=e),Ce();let n=[];for(let r of G(Le({}))){let o=r.el,i=$(o);if(!i)continue;let s=i.left,a=i.top;for(let c=o.ownerDocument;c!==document;){let l=(t=c.defaultView)==null?void 0:t.frameElement;if(!l)break;let h=l.getBoundingClientRect();s+=h.left+l.clientLeft,a+=h.top+l.clientTop,c=l.ownerDocument}s+i.width<=0||a+i.height<=0||s>=innerWidth||a>=innerHeight||n.push({ref:ye(o),label:`${r.role}${r.name?` ${JSON.stringify(m(r.name,60))}`:""}`,x:s,y:a,w:i.width,h:i.height})}return{boxes:n,last:x,width:innerWidth,height:innerHeight}}var q=6e4,bt=new Set(["input","select","textarea","svg","canvas","video","audio","map"]);function A(e,n){let t=e.nodeType===9?e.body:e;return t?v(t).map(r=>wt(r,n)).join(""):""}function M(e,n){return f(A(e,n))}function E(e){return e.trim()?`
4
4
 
5
5
  ${e.trim()}
6
6
 
7
- `:""}function ht(e,n){let t=e.localName==="ol",r=Number(e.getAttribute("start"))||1,o=" ".repeat(n),i=[];for(let s of $(e)){if(s.nodeType!==1||k(s))continue;let a=N(s,n+1).replace(/\n{2,}/g,`
8
- `).trim();if(!a)continue;let[l,...c]=a.split(`
9
- `);i.push(`${o}${t?`${r++}.`:"-"} ${l.trim()}`,...c)}return`
7
+ `:""}function gt(e,n){let t=e.localName==="ol",r=Number(e.getAttribute("start"))||1,o=" ".repeat(n),i=[];for(let s of v(e)){if(s.nodeType!==1||S(s))continue;let a=A(s,n+1).replace(/\n{2,}/g,`
8
+ `).trim();if(!a)continue;let[c,...l]=a.split(`
9
+ `);i.push(`${o}${t?`${r++}.`:"-"} ${c.trim()}`,...l)}return`
10
10
 
11
11
  ${i.join(`
12
12
  `)}
13
13
 
14
- `}function pt(e,n){let t=Array.from(e.querySelectorAll("tr")).filter(i=>i.closest("table")===e&&!k(i)).map(i=>Array.from(i.children).filter(s=>(s.localName==="td"||s.localName==="th")&&!k(s)).map(s=>S(s,n).replace(/\|/g,"\\|")));if(!t.length)return"";let r=Math.max(...t.map(i=>i.length)),o=i=>`| ${[...i,...Array(r-i.length).fill("")].join(" | ")} |`;return E([o(t[0]),o(Array(r).fill("---")),...t.slice(1).map(o)].join(`
15
- `))}function bt(e,n){if(e.nodeType===3)return(e.textContent||"").replace(/\s+/g," ");if(e.nodeType!==1)return"";let t=e;if(k(t)||dt.has(t.localName))return"";let r=t.localName,o=/^h([1-6])$/.exec(r);if(o){let s=S(t,n);return s?E(`${"#".repeat(Number(o[1]))} ${s}`):""}switch(r){case"p":return E(S(t,n));case"br":return`
16
- `;case"hr":return E("---");case"ul":case"ol":return ht(t,n);case"table":return pt(t,n);case"pre":{let s=t.innerText,a=typeof s=="string"?s:t.textContent||"";return E(`\`\`\`
14
+ `}function Et(e,n){let t=Array.from(e.querySelectorAll("tr")).filter(i=>i.closest("table")===e&&!S(i)).map(i=>Array.from(i.children).filter(s=>(s.localName==="td"||s.localName==="th")&&!S(s)).map(s=>M(s,n).replace(/\|/g,"\\|")));if(!t.length)return"";let r=Math.max(...t.map(i=>i.length)),o=i=>`| ${[...i,...Array(r-i.length).fill("")].join(" | ")} |`;return E([o(t[0]),o(Array(r).fill("---")),...t.slice(1).map(o)].join(`
15
+ `))}function wt(e,n){if(e.nodeType===3)return(e.textContent||"").replace(/\s+/g," ");if(e.nodeType!==1)return"";let t=e;if(S(t)||bt.has(t.localName))return"";let r=t.localName,o=/^h([1-6])$/.exec(r);if(o){let s=M(t,n);return s?E(`${"#".repeat(Number(o[1]))} ${s}`):""}switch(r){case"p":return E(M(t,n));case"br":return`
16
+ `;case"hr":return E("---");case"ul":case"ol":return gt(t,n);case"table":return Et(t,n);case"pre":{let s=t.innerText,a=typeof s=="string"?s:t.textContent||"";return E(`\`\`\`
17
17
  ${a.replace(/\n+$/,"")}
18
- \`\`\``)}case"code":{let s=f(t.textContent||"");return s?`\`${s}\``:""}case"blockquote":{let s=N(t,n).trim().replace(/\n{3,}/g,`
18
+ \`\`\``)}case"code":{let s=f(t.textContent||"");return s?`\`${s}\``:""}case"blockquote":{let s=A(t,n).trim().replace(/\n{3,}/g,`
19
19
 
20
20
  `);return s?E(s.split(`
21
21
  `).map(a=>`> ${a}`).join(`
22
- `)):""}case"strong":case"b":{let s=S(t,n);return s?`**${s}**`:""}case"em":case"i":{let s=S(t,n);return s?`_${s}_`:""}case"a":{let s=S(t,n),a=t.href;return s?a&&!a.startsWith("javascript:")?`[${s}](${a})`:s:""}case"img":{let s=f(t.getAttribute("alt")||"");if(!s)return"";let a=t.src;return a&&!a.startsWith("data:")?`![${s}](${a})`:`![${s}]`}case"iframe":{let s=null;try{s=t.contentDocument}catch{}return s?E(N(s,n)):""}}let i=N(t,n);return K.has(g(t).display)?i:E(i)}function gt(e){let n=!1;return e.split(`
22
+ `)):""}case"strong":case"b":{let s=M(t,n);return s?`**${s}**`:""}case"em":case"i":{let s=M(t,n);return s?`_${s}_`:""}case"a":{let s=M(t,n),a=t.href;return s?a&&!a.startsWith("javascript:")?`[${s}](${a})`:s:""}case"img":{let s=f(t.getAttribute("alt")||"");if(!s)return"";let a=t.src;return a&&!a.startsWith("data:")?`![${s}](${a})`:`![${s}]`}case"iframe":{let s=null;try{s=t.contentDocument}catch{}return s?E(A(s,n)):""}}let i=A(t,n);return B.has(b(t).display)?i:E(i)}function yt(e){let n=!1;return e.split(`
23
23
  `).map(t=>{if(t.trimStart().startsWith("```"))return n=!n,t.trim();if(n)return t;let[,r,o]=/^(\s*)(.*)$/.exec(t),i=o.replace(/[ \t]+/g," ").trim();return/^(-|\d+\.) /.test(i)?r+i:i}).join(`
24
24
  `).replace(/\n{3,}/g,`
25
25
 
26
- `).trim()}function Re(e){let n=[],t=[],r=!1;for(let o of e.split(`
26
+ `).trim()}function Pe(e){let n=[],t=[],r=!1;for(let o of e.split(`
27
27
  `))o.startsWith("```")&&(r=!r),!r&&/^#{1,6} /.test(o)&&t.length&&(n.push(t.join(`
28
28
  `).trim()),t=[]),t.push(o);return t.length&&n.push(t.join(`
29
- `).trim()),n.filter(Boolean)}function Ke(e={}){var o;let n=gt(N(document.body??document.documentElement,0)),t=(o=e.filter)==null?void 0:o.trim().toLowerCase();e.outline?n=Re(n).map(i=>i.split(`
29
+ `).trim()),n.filter(Boolean)}function Be(e={}){var o;let n=yt(A(document.body??document.documentElement,0)),t=(o=e.filter)==null?void 0:o.trim().toLowerCase();e.outline?n=Pe(n).map(i=>i.split(`
30
30
  `)[0]).filter(i=>/^#{1,6} /.test(i)&&(!t||i.toLowerCase().includes(t))).join(`
31
- `):t&&(n=Re(n).filter(i=>i.toLowerCase().includes(t)).join(`
31
+ `):t&&(n=Pe(n).filter(i=>i.toLowerCase().includes(t)).join(`
32
32
 
33
- `)),n||(n=t?`(no section mentions ${JSON.stringify(e.filter)})`:e.outline?"(no headings)":"(no text)");let r=n.length>Z;return r&&(n=`${n.slice(0,Z)}
33
+ `)),n||(n=t?`(no section mentions ${JSON.stringify(e.filter)})`:e.outline?"(no headings)":"(no text)");let r=n.length>q;return r&&(n=`${n.slice(0,q)}
34
34
 
35
- \u2026 (truncated at ${Z} characters: narrow with filter, or skim with outline)`),{title:document.title,url:location.href,markdown:n,truncated:r}}function Et(e){switch(e.op){case"snapshot":return Ae(e);case"read":return Ke(e);case"boxes":return De(e.base);case"probe":return Oe(e);default:return He(e)}}var wt=globalThis;wt.__hanzoPage??=e=>{try{return{ok:!0,...Et(e)}}catch(n){return{ok:!1,error:n instanceof Error?n.message:String(n)}}};})();
35
+ \u2026 (truncated at ${q} characters: narrow with filter, or skim with outline)`),{title:document.title,url:location.href,markdown:n,truncated:r}}function xt(e){switch(e.op){case"snapshot":return Ie(e);case"read":return Be(e);case"boxes":return Ke(e.base);case"probe":return Re(e);default:return De(e)}}var kt=globalThis;kt.__hanzoPage??=e=>{try{return{ok:!0,...xt(e)}}catch(n){return{ok:!1,error:n instanceof Error?n.message:String(n)}}};})();
@@ -142,7 +142,7 @@
142
142
  <nav class="popup-nav-tabs">
143
143
  <button type="button" class="nav-tab-btn active" data-tab="tab-chat">Chat &amp; Search</button>
144
144
  <button type="button" class="nav-tab-btn" data-tab="tab-accounts">Accounts &amp; Usage</button>
145
- <button type="button" class="nav-tab-btn" data-tab="tab-bridges">Bridges &amp; Tools</button>
145
+ <button type="button" class="nav-tab-btn" data-tab="tab-bridges">Bridges</button>
146
146
  </nav>
147
147
 
148
148
  <!-- Main Container Body -->
@@ -158,6 +158,49 @@
158
158
  <button id="toggle-context-btn" class="context-toggle" title="Toggle page context" type="button">Active</button>
159
159
  </div>
160
160
 
161
+ <!-- Page tools: first tab, one click from opening the popup -->
162
+ <div class="tools-section">
163
+ <span class="setting-title">Tools</span>
164
+ <div class="tools-btn-grid">
165
+ <button type="button" class="tool-btn" id="tool-picker" title="Pick an element; the agent sees it and its source (browser action=inspected)">
166
+ <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.8">
167
+ <path d="M3 3l4 10 2-4 4-2L3 3z"/>
168
+ </svg>
169
+ <span>Inspect</span>
170
+ </button>
171
+ <button type="button" class="tool-btn" id="tool-screenshot" title="Capture active tab">
172
+ <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.8">
173
+ <rect x="2" y="3" width="12" height="10" rx="1.5"/><circle cx="8" cy="8" r="2.5"/>
174
+ </svg>
175
+ <span>Screenshot</span>
176
+ </button>
177
+ <button type="button" class="tool-btn" id="tool-pageinfo" title="Copy page metadata">
178
+ <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.8">
179
+ <circle cx="8" cy="8" r="6"/><line x1="8" y1="7" x2="8" y2="11"/><line x1="8" y1="5" x2="8.01" y2="5"/>
180
+ </svg>
181
+ <span>Page Info</span>
182
+ </button>
183
+ <button type="button" class="tool-btn" id="tool-accessibility" title="Run accessibility audit">
184
+ <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.8">
185
+ <circle cx="8" cy="4" r="2"/><path d="M4 7h8M8 7v7M5 14l3-3 3 3"/>
186
+ </svg>
187
+ <span>A11y Audit</span>
188
+ </button>
189
+ <button type="button" class="tool-btn" id="tool-performance" title="Run performance audit">
190
+ <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.8">
191
+ <path d="M8 2v4l3 2"/><circle cx="8" cy="8" r="6"/>
192
+ </svg>
193
+ <span>Performance</span>
194
+ </button>
195
+ <button type="button" class="tool-btn" id="tool-console" title="Open JS eval prompt">
196
+ <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.8">
197
+ <polyline points="4 6 8 10 4 14"/><line x1="10" y1="14" x2="14" y2="14"/>
198
+ </svg>
199
+ <span>Console</span>
200
+ </button>
201
+ </div>
202
+ </div>
203
+
161
204
  <!-- Omnibox Form (Chat & Search) -->
162
205
  <form id="search-form" class="composer-box">
163
206
  <textarea
@@ -323,7 +366,7 @@
323
366
  </div>
324
367
  </div>
325
368
 
326
- <!-- Tab 3: Bridges & Tools View -->
369
+ <!-- Tab 3: Bridges View -->
327
370
  <div id="tab-bridges" class="tab-pane hidden">
328
371
  <div class="pane-header">
329
372
  <span class="pane-title">Bridge Runtime Status</span>
@@ -375,49 +418,6 @@
375
418
  <span id="zap-pair-error" class="status-detail error-text"></span>
376
419
  </div>
377
420
 
378
- <!-- Developer Quick Tools -->
379
- <div class="tools-section">
380
- <span class="setting-title">Developer Quick Tools</span>
381
- <div class="tools-btn-grid">
382
- <button type="button" class="tool-btn" id="tool-picker" title="Inspect element on page">
383
- <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.8">
384
- <path d="M3 3l4 10 2-4 4-2L3 3z"/>
385
- </svg>
386
- <span>Pick Element</span>
387
- </button>
388
- <button type="button" class="tool-btn" id="tool-screenshot" title="Capture active tab">
389
- <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.8">
390
- <rect x="2" y="3" width="12" height="10" rx="1.5"/><circle cx="8" cy="8" r="2.5"/>
391
- </svg>
392
- <span>Screenshot</span>
393
- </button>
394
- <button type="button" class="tool-btn" id="tool-pageinfo" title="Copy page metadata">
395
- <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.8">
396
- <circle cx="8" cy="8" r="6"/><line x1="8" y1="7" x2="8" y2="11"/><line x1="8" y1="5" x2="8.01" y2="5"/>
397
- </svg>
398
- <span>Page Info</span>
399
- </button>
400
- <button type="button" class="tool-btn" id="tool-accessibility" title="Run accessibility audit">
401
- <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.8">
402
- <circle cx="8" cy="4" r="2"/><path d="M4 7h8M8 7v7M5 14l3-3 3 3"/>
403
- </svg>
404
- <span>A11y Audit</span>
405
- </button>
406
- <button type="button" class="tool-btn" id="tool-performance" title="Run performance audit">
407
- <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.8">
408
- <path d="M8 2v4l3 2"/><circle cx="8" cy="8" r="6"/>
409
- </svg>
410
- <span>Performance</span>
411
- </button>
412
- <button type="button" class="tool-btn" id="tool-console" title="Open JS eval prompt">
413
- <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.8">
414
- <polyline points="4 6 8 10 4 14"/><line x1="10" y1="14" x2="14" y2="14"/>
415
- </svg>
416
- <span>Console</span>
417
- </button>
418
- </div>
419
- </div>
420
-
421
421
  <!-- Feature Capabilities -->
422
422
  <div class="features-section">
423
423
  <span class="setting-title">Agentic Capabilities</span>