linear-grab 0.18.0 → 0.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/linear-grab-bridge.mjs +29 -1
- package/dist/index.global.js +31 -31
- package/dist/linear-grab.js +3840 -3635
- package/package.json +1 -1
package/dist/index.global.js
CHANGED
|
@@ -219,52 +219,52 @@ of the other sections.`,hD="- FIRST, self-orient in the repo checkout (skip any
|
|
|
219
219
|
success
|
|
220
220
|
uploadFile { uploadUrl assetUrl headers { key value } }
|
|
221
221
|
}
|
|
222
|
-
}`,{contentType:e.type,filename:t,size:e.size}),r=n.fileUpload.uploadFile;if(!n.fileUpload.success||!r)throw Error(`Linear did not provide an upload URL.`);let{linearApiKey:i,linearAccessToken:a}=await Tr(),o=a?`Bearer ${a}`:i??``,s=Object.fromEntries((r.headers??[]).map(e=>[e.key,e.value])),c=[{"Content-Type":e.type,...s,...o?{Authorization:o}:{}},{"Content-Type":e.type,...s},{"Content-Type":e.type}],l=null;for(let t of c)try{let n=await fetch(r.uploadUrl,{method:`PUT`,mode:`cors`,headers:t,body:e});if(n.ok)return r.assetUrl;l=Error(`Upload rejected (${n.status}).`)}catch(e){l=e}try{let{bridgeUrl:t}=await Tr(),n=(t?.trim()||`http://localhost:4577`).replace(/\/$/,``);if((await fetch(`${n}/put`,{method:`POST`,headers:{"Content-Type":e.type,"x-upload-url":r.uploadUrl,"x-upload-headers":JSON.stringify({...s,...o?{Authorization:o}:{}})},body:e})).ok)return r.assetUrl}catch{}throw Error(`Upload to Linear storage failed${l instanceof Error?` — ${l.message}`:``}. Run \`npx linear-grab-bridge\` in the repo (uploads relay through it), set the GitHub fallback in Settings, or use "Copy GIF" + paste.`)}Br();async function DO(e,t){try{return await EO(e,t)}catch(n){let r=await Tr();if(r.githubToken&&r.githubAssetsRepo)return OO(e,t,r.githubToken,r.githubAssetsRepo);throw n instanceof Error?Error(`${n.message} Tip: configure the GitHub assets fallback in Settings for automatic uploads in this browser.`):n}}async function OO(e,t,n,r){let i=`linear-grab/${Date.now()}-${t.replace(/[^\w.-]/g,`_`)}`,a=await fetch(`https://api.github.com/repos/${r}/contents/${i}`,{method:`PUT`,headers:{Authorization:`Bearer ${n}`,Accept:`application/vnd.github+json`,"Content-Type":`application/json`},body:JSON.stringify({message:`chore(linear-grab): asset ${t}`,content:await kO(e)})}),o=await a.json().catch(()=>null);if(!a.ok||!o?.content?.download_url)throw Error(`GitHub asset upload failed — ${o?.message??`HTTP ${a.status}`}`);return o.content.download_url}function kO(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(r.result.split(`,`)[1]??``),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}Br();async function AO(){return((await Tr()).bridgeUrl?.trim()||`http://localhost:4577`).replace(/\/$/,``)}async function jO(e,t){let n=await AO(),r=await fetch(`${n}${e}`,{...t,headers:{"Content-Type":`application/json`,...t?.headers??{}}});if(!r.ok){let e=await r.json().catch(()=>null);throw Error(e?.error??`Bridge request failed (${r.status})`)}return await r.json()}function MO(){return jO(`/health`)}async function NO(){return(await jO(`/tasks`)).tasks}function PO(e){return jO(`/tasks/${e}`)}function FO(e,t,n){return jO(`/tasks`,{method:`POST`,body:JSON.stringify({title:e,prompt:t,...n})})}function IO(e,t){return jO(`/tasks/${e}/message`,{method:`POST`,body:JSON.stringify({text:t})})}function LO(e,t){return jO(`/tasks/${e}/model`,{method:`POST`,body:JSON.stringify({model:t||null})})}function RO(e){return jO(`/tasks/${e}/stop`,{method:`POST`}).then(()=>void 0)}function zO(e){return jO(`/tasks/${e}/worktree/remove`,{method:`POST`})}function BO(e){return jO(`/tasks/${e}/diff`)}async function VO(){let e=await Tr(),t=e.linearAccessToken?`Bearer ${e.linearAccessToken}`:e.linearApiKey;t&&await jO(`/config`,{method:`POST`,body:JSON.stringify({linearAuth:t})}).catch(()=>void 0)}async function HO(e){if(!e.length)return{statuses:{},previews:{}};let t=await jO(`/pr/status`,{method:`POST`,body:JSON.stringify({urls:e})});return{statuses:t.statuses??{},previews:t.previews??{}}}function UO(e,t){return jO(`/pr/stage`,{method:`POST`,body:JSON.stringify({url:e,base:t})})}function WO(e){return jO(`/pr/merge`,{method:`POST`,body:JSON.stringify({url:e})})}async function
|
|
223
|
-
`)}async function
|
|
222
|
+
}`,{contentType:e.type,filename:t,size:e.size}),r=n.fileUpload.uploadFile;if(!n.fileUpload.success||!r)throw Error(`Linear did not provide an upload URL.`);let{linearApiKey:i,linearAccessToken:a}=await Tr(),o=a?`Bearer ${a}`:i??``,s=Object.fromEntries((r.headers??[]).map(e=>[e.key,e.value])),c=[{"Content-Type":e.type,...s,...o?{Authorization:o}:{}},{"Content-Type":e.type,...s},{"Content-Type":e.type}],l=null;for(let t of c)try{let n=await fetch(r.uploadUrl,{method:`PUT`,mode:`cors`,headers:t,body:e});if(n.ok)return r.assetUrl;l=Error(`Upload rejected (${n.status}).`)}catch(e){l=e}try{let{bridgeUrl:t}=await Tr(),n=(t?.trim()||`http://localhost:4577`).replace(/\/$/,``);if((await fetch(`${n}/put`,{method:`POST`,headers:{"Content-Type":e.type,"x-upload-url":r.uploadUrl,"x-upload-headers":JSON.stringify({...s,...o?{Authorization:o}:{}})},body:e})).ok)return r.assetUrl}catch{}throw Error(`Upload to Linear storage failed${l instanceof Error?` — ${l.message}`:``}. Run \`npx linear-grab-bridge\` in the repo (uploads relay through it), set the GitHub fallback in Settings, or use "Copy GIF" + paste.`)}Br();async function DO(e,t){try{return await EO(e,t)}catch(n){let r=await Tr();if(r.githubToken&&r.githubAssetsRepo)return OO(e,t,r.githubToken,r.githubAssetsRepo);throw n instanceof Error?Error(`${n.message} Tip: configure the GitHub assets fallback in Settings for automatic uploads in this browser.`):n}}async function OO(e,t,n,r){let i=`linear-grab/${Date.now()}-${t.replace(/[^\w.-]/g,`_`)}`,a=await fetch(`https://api.github.com/repos/${r}/contents/${i}`,{method:`PUT`,headers:{Authorization:`Bearer ${n}`,Accept:`application/vnd.github+json`,"Content-Type":`application/json`},body:JSON.stringify({message:`chore(linear-grab): asset ${t}`,content:await kO(e)})}),o=await a.json().catch(()=>null);if(!a.ok||!o?.content?.download_url)throw Error(`GitHub asset upload failed — ${o?.message??`HTTP ${a.status}`}`);return o.content.download_url}function kO(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(r.result.split(`,`)[1]??``),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}Br();async function AO(){return((await Tr()).bridgeUrl?.trim()||`http://localhost:4577`).replace(/\/$/,``)}async function jO(e,t){let n=await AO(),r=await fetch(`${n}${e}`,{...t,headers:{"Content-Type":`application/json`,...t?.headers??{}}});if(!r.ok){let e=await r.json().catch(()=>null);throw Error(e?.error??`Bridge request failed (${r.status})`)}return await r.json()}function MO(){return jO(`/health`)}async function NO(){return(await jO(`/tasks`)).tasks}function PO(e){return jO(`/tasks/${e}`)}function FO(e,t,n){return jO(`/tasks`,{method:`POST`,body:JSON.stringify({title:e,prompt:t,...n})})}function IO(e,t){return jO(`/tasks/${e}/message`,{method:`POST`,body:JSON.stringify({text:t})})}function LO(e,t){return jO(`/tasks/${e}/model`,{method:`POST`,body:JSON.stringify({model:t||null})})}function RO(e){return jO(`/tasks/${e}/stop`,{method:`POST`}).then(()=>void 0)}function zO(e){return jO(`/tasks/${e}/worktree/remove`,{method:`POST`})}function BO(e){return jO(`/tasks/${e}/diff`)}async function VO(){let e=await Tr(),t=e.linearAccessToken?`Bearer ${e.linearAccessToken}`:e.linearApiKey;t&&await jO(`/config`,{method:`POST`,body:JSON.stringify({linearAuth:t})}).catch(()=>void 0)}async function HO(e){if(!e.length)return{statuses:{},previews:{}};let t=await jO(`/pr/status`,{method:`POST`,body:JSON.stringify({urls:e})});return{statuses:t.statuses??{},previews:t.previews??{}}}function UO(e,t){return jO(`/pr/stage`,{method:`POST`,body:JSON.stringify({url:e,base:t})})}function WO(e,t){return jO(`/branch/status`,{method:`POST`,body:JSON.stringify({url:e,base:t})})}function GO(e){return jO(`/pr/merge`,{method:`POST`,body:JSON.stringify({url:e})})}async function KO(){return((await Tr()).bridgeUrl?.trim()||`http://localhost:4577`).replace(/\/$/,``)}function qO(e){return`claude --dangerously-skip-permissions --resume ${e.sessionId??`<session-id>`}`}function JO(e,t){return[`🛠️ ${(e=>t===`slack`?`*${e}*`:e)(`${e.identifier} — ${e.title}`)}`,e.summary?.trim()?e.summary.trim().slice(0,300):null,e.impact?.trim()?`Impact: ${e.impact.trim().slice(0,200)}`:null,e.executor===`cursor`?`🤖 Delegated to the Cursor cloud agent — PR with demo video incoming.`:e.executor===`local`?`💻 Delegated to local Claude Code.`:null,e.repo?`Repo: ${e.repo}`:null,e.demoUrl?`Demo: ${e.demoUrl}`:null,`👉 Follow & review: ${e.url}`].filter(Boolean).join(`
|
|
223
|
+
`)}async function YO(e,t){let n=await(await fetch(`https://slack.com/api/chat.postMessage`,{method:`POST`,body:new URLSearchParams({token:e.slackToken,channel:e.slackChannelId,text:JO(t,`slack`),unfurl_links:`false`})})).json();if(!n.ok)throw Error(n.error??`slack error`)}async function XO(e,t){let n=`https://api.telegram.org/bot${e.telegramToken}`,r=JO(t,`telegram`),i=t.demoUrl&&/raw\.githubusercontent\.com|\.gif($|\?)/i.test(t.demoUrl),a=await(await fetch(`${n}/${i?`sendAnimation`:`sendMessage`}`,{method:`POST`,body:new URLSearchParams(i?{chat_id:e.telegramChatId,animation:t.demoUrl,caption:r.slice(0,1e3)}:{chat_id:e.telegramChatId,text:r})})).json();if(!a.ok)throw Error(a.description??`telegram error`)}async function ZO(e,t){if(e.notifyOnCreate===!1)return[];let n=[];if(e.slackToken&&e.slackChannelId)try{await YO(e,t)}catch{n.push(`Slack`)}if(e.telegramToken&&e.telegramChatId)try{await XO(e,t)}catch{n.push(`Telegram`)}return n}async function QO(e){let t=async t=>await(await fetch(`https://slack.com/api/conversations.list`,{method:`POST`,body:new URLSearchParams({token:e,types:t,exclude_archived:`true`,limit:`200`})})).json(),n=await t(`public_channel,private_channel`);if(!n.ok&&n.error===`missing_scope`&&(n=await t(`public_channel`)),!n.ok)throw Error(n.error??`slack error`);return(n.channels??[]).map(e=>({id:e.id,name:e.name})).sort((e,t)=>e.name.localeCompare(t.name))}var $O=12e3,ek=4e3;async function tk(e){let t=e.logUrl?.trim();if(!t)return null;let n=Math.min(500,Math.max(10,e.logLines??100)),r=new AbortController,i=setTimeout(()=>r.abort(),ek);try{let e=await fetch(t,{cache:`no-store`,signal:r.signal});if(!e.ok)throw Error(`Log fetch failed (${e.status})`);let i=(await e.text()).split(`
|
|
224
224
|
`).slice(-n).join(`
|
|
225
|
-
`).trim();return i.length
|
|
226
|
-
`);return n.length>8e3&&(n=`…\n${n.slice(n.length-8e3)}`),n}function lk(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;let n=document.implementation.createHTMLDocument(),r=n.createElement(`base`),i=n.createElement(`a`);return n.head.appendChild(r),n.body.appendChild(i),t&&(r.href=t),i.href=e,i.href}var uk=(()=>{let e=0,t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function dk(e){let t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}var fk=null;function pk(e={}){return fk||(e.includeStyleProperties?(fk=e.includeStyleProperties,fk):(fk=dk(window.getComputedStyle(document.documentElement)),fk))}function mk(e,t){let n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace(`px`,``)):0}function hk(e){let t=mk(e,`border-left-width`),n=mk(e,`border-right-width`);return e.clientWidth+t+n}function gk(e){let t=mk(e,`border-top-width`),n=mk(e,`border-bottom-width`);return e.clientHeight+t+n}function _k(e,t={}){return{width:t.width||hk(e),height:t.height||gk(e)}}function vk(){let e,t;try{t=process}catch{}let n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}var yk=16384;function bk(e){(e.width>yk||e.height>yk)&&(e.width>yk&&e.height>yk?e.width>e.height?(e.height*=yk/e.width,e.width=yk):(e.width*=yk/e.height,e.height=yk):e.width>yk?(e.height*=yk/e.width,e.width=yk):(e.width*=yk/e.height,e.height=yk))}function xk(e){return new Promise((t,n)=>{let r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>t(r))})},r.onerror=n,r.crossOrigin=`anonymous`,r.decoding=`async`,r.src=e})}async function Sk(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(e=>`data:image/svg+xml;charset=utf-8,${e}`)}async function Ck(e,t,n){let r=`http://www.w3.org/2000/svg`,i=document.createElementNS(r,`svg`),a=document.createElementNS(r,`foreignObject`);return i.setAttribute(`width`,`${t}`),i.setAttribute(`height`,`${n}`),i.setAttribute(`viewBox`,`0 0 ${t} ${n}`),a.setAttribute(`width`,`100%`),a.setAttribute(`height`,`100%`),a.setAttribute(`x`,`0`),a.setAttribute(`y`,`0`),a.setAttribute(`externalResourcesRequired`,`true`),i.appendChild(a),a.appendChild(e),Sk(i)}var wk=(e,t)=>{if(e instanceof t)return!0;let n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||wk(n,t)};function Tk(e){let t=e.getPropertyValue(`content`);return`${e.cssText} content: '${t.replace(/'|"/g,``)}';`}function Ek(e,t){return pk(t).map(t=>`${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t)?` !important`:``};`).join(` `)}function Dk(e,t,n,r){let i=`.${e}:${t}`,a=n.cssText?Tk(n):Ek(n,r);return document.createTextNode(`${i}{${a}}`)}function Ok(e,t,n,r){let i=window.getComputedStyle(e,n),a=i.getPropertyValue(`content`);if(a===``||a===`none`)return;let o=uk();try{t.className=`${t.className} ${o}`}catch{return}let s=document.createElement(`style`);s.appendChild(Dk(o,n,i,r)),t.appendChild(s)}function kk(e,t,n){Ok(e,t,`:before`,n),Ok(e,t,`:after`,n)}var Ak=`application/font-woff`,jk=`image/jpeg`,Mk={woff:Ak,woff2:Ak,ttf:`application/font-truetype`,eot:`application/vnd.ms-fontobject`,png:`image/png`,jpg:jk,jpeg:jk,gif:`image/gif`,tiff:`image/tiff`,svg:`image/svg+xml`,webp:`image/webp`};function Nk(e){let t=/\.([^./]*?)$/g.exec(e);return t?t[1]:``}function Pk(e){return Mk[Nk(e).toLowerCase()]||``}function Fk(e){return e.split(/,/)[1]}function Ik(e){return e.search(/^(data:)/)!==-1}function Lk(e,t){return`data:${t};base64,${e}`}async function Rk(e,t,n){let r=await fetch(e,t);if(r.status===404)throw Error(`Resource "${r.url}" not found`);let i=await r.blob();return new Promise((e,t)=>{let a=new FileReader;a.onerror=t,a.onloadend=()=>{try{e(n({res:r,result:a.result}))}catch(e){t(e)}},a.readAsDataURL(i)})}var zk={};function Bk(e,t,n){let r=e.replace(/\?.*/,``);return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,``)),t?`[${t}]${r}`:r}async function Vk(e,t,n){let r=Bk(e,t,n.includeQueryParams);if(zk[r]!=null)return zk[r];n.cacheBust&&(e+=(/\?/.test(e)?`&`:`?`)+new Date().getTime());let i;try{i=Lk(await Rk(e,n.fetchRequestInit,({res:e,result:n})=>(t||=e.headers.get(`Content-Type`)||``,Fk(n))),t)}catch(t){i=n.imagePlaceholder||``;let r=`Failed to fetch resource: ${e}`;t&&(r=typeof t==`string`?t:t.message),r&&console.warn(r)}return zk[r]=i,i}async function Hk(e){let t=e.toDataURL();return t===`data:,`?e.cloneNode(!1):xk(t)}async function Uk(e,t){if(e.currentSrc){let t=document.createElement(`canvas`),n=t.getContext(`2d`);return t.width=e.clientWidth,t.height=e.clientHeight,n?.drawImage(e,0,0,t.width,t.height),xk(t.toDataURL())}let n=e.poster;return xk(await Vk(n,Pk(n),t))}async function Wk(e,t){try{if(e?.contentDocument?.body)return await eA(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Gk(e,t){return wk(e,HTMLCanvasElement)?Hk(e):wk(e,HTMLVideoElement)?Uk(e,t):wk(e,HTMLIFrameElement)?Wk(e,t):e.cloneNode(qk(e))}var Kk=e=>e.tagName!=null&&e.tagName.toUpperCase()===`SLOT`,qk=e=>e.tagName!=null&&e.tagName.toUpperCase()===`SVG`;async function Jk(e,t,n){if(qk(t))return t;let r=[];return r=Kk(e)&&e.assignedNodes?dk(e.assignedNodes()):wk(e,HTMLIFrameElement)&&e.contentDocument?.body?dk(e.contentDocument.body.childNodes):dk((e.shadowRoot??e).childNodes),r.length===0||wk(e,HTMLVideoElement)||await r.reduce((e,r)=>e.then(()=>eA(r,n)).then(e=>{e&&t.appendChild(e)}),Promise.resolve()),t}function Yk(e,t,n){let r=t.style;if(!r)return;let i=window.getComputedStyle(e);i.cssText?(r.cssText=i.cssText,r.transformOrigin=i.transformOrigin):pk(n).forEach(n=>{let a=i.getPropertyValue(n);n===`font-size`&&a.endsWith(`px`)&&(a=`${Math.floor(parseFloat(a.substring(0,a.length-2)))-.1}px`),wk(e,HTMLIFrameElement)&&n===`display`&&a===`inline`&&(a=`block`),n===`d`&&t.getAttribute(`d`)&&(a=`path(${t.getAttribute(`d`)})`),r.setProperty(n,a,i.getPropertyPriority(n))})}function Xk(e,t){wk(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),wk(e,HTMLInputElement)&&t.setAttribute(`value`,e.value)}function Zk(e,t){if(wk(e,HTMLSelectElement)){let n=t,r=Array.from(n.children).find(t=>e.value===t.getAttribute(`value`));r&&r.setAttribute(`selected`,``)}}function Qk(e,t,n){return wk(t,Element)&&(Yk(e,t,n),kk(e,t,n),Xk(e,t),Zk(e,t)),t}async function $k(e,t){let n=e.querySelectorAll?e.querySelectorAll(`use`):[];if(n.length===0)return e;let r={};for(let i=0;i<n.length;i++){let a=n[i].getAttribute(`xlink:href`);if(a){let n=e.querySelector(a),i=document.querySelector(a);!n&&i&&!r[a]&&(r[a]=await eA(i,t,!0))}}let i=Object.values(r);if(i.length){let t=`http://www.w3.org/1999/xhtml`,n=document.createElementNS(t,`svg`);n.setAttribute(`xmlns`,t),n.style.position=`absolute`,n.style.width=`0`,n.style.height=`0`,n.style.overflow=`hidden`,n.style.display=`none`;let r=document.createElementNS(t,`defs`);n.appendChild(r);for(let e=0;e<i.length;e++)r.appendChild(i[e]);e.appendChild(n)}return e}async function eA(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(e=>Gk(e,t)).then(n=>Jk(e,n,t)).then(n=>Qk(e,n,t)).then(e=>$k(e,t))}var tA=/url\((['"]?)([^'"]+?)\1\)/g,nA=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,rA=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function iA(e){let t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,`\\$1`);return RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,`g`)}function aA(e){let t=[];return e.replace(tA,(e,n,r)=>(t.push(r),e)),t.filter(e=>!Ik(e))}async function oA(e,t,n,r,i){try{let a=n?lk(t,n):t,o=Pk(t),s;return s=i?Lk(await i(a),o):await Vk(a,o,r),e.replace(iA(t),`$1${s}$3`)}catch{}return e}function sA(e,{preferredFontFormat:t}){return t?e.replace(rA,e=>{for(;;){let[n,,r]=nA.exec(e)||[];if(!r)return``;if(r===t)return`src: ${n};`}}):e}function cA(e){return e.search(tA)!==-1}async function lA(e,t,n){if(!cA(e))return e;let r=sA(e,n);return aA(r).reduce((e,r)=>e.then(e=>oA(e,r,t,n)),Promise.resolve(r))}async function uA(e,t,n){let r=t.style?.getPropertyValue(e);if(r){let i=await lA(r,null,n);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function dA(e,t){await uA(`background`,e,t)||await uA(`background-image`,e,t),await uA(`mask`,e,t)||await uA(`-webkit-mask`,e,t)||await uA(`mask-image`,e,t)||await uA(`-webkit-mask-image`,e,t)}async function fA(e,t){let n=wk(e,HTMLImageElement);if(!(n&&!Ik(e.src))&&!(wk(e,SVGImageElement)&&!Ik(e.href.baseVal)))return;let r=n?e.src:e.href.baseVal,i=await Vk(r,Pk(r),t);await new Promise((r,a)=>{e.onload=r,e.onerror=t.onImageErrorHandler?(...e)=>{try{r(t.onImageErrorHandler(...e))}catch(e){a(e)}}:a;let o=e;o.decode&&=r,o.loading===`lazy`&&(o.loading=`eager`),n?(e.srcset=``,e.src=i):e.href.baseVal=i})}async function pA(e,t){let n=dk(e.childNodes).map(e=>mA(e,t));await Promise.all(n).then(()=>e)}async function mA(e,t){wk(e,Element)&&(await dA(e,t),await fA(e,t),await pA(e,t))}function hA(e,t){let{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);let r=t.style;return r!=null&&Object.keys(r).forEach(e=>{n[e]=r[e]}),e}var gA={};async function _A(e){let t=gA[e];return t??(t={url:e,cssText:await(await fetch(e)).text()},gA[e]=t,t)}async function vA(e,t){let n=e.cssText,r=/url\(["']?([^"')]+)["']?\)/g,i=(n.match(/url\([^)]+\)/g)||[]).map(async i=>{let a=i.replace(r,`$1`);return a.startsWith(`https://`)||(a=new URL(a,e.url).href),Rk(a,t.fetchRequestInit,({result:e})=>(n=n.replace(i,`url(${e})`),[i,e]))});return Promise.all(i).then(()=>n)}function yA(e){if(e==null)return[];let t=[],n=e.replace(/(\/\*[\s\S]*?\*\/)/gi,``),r=RegExp(`((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})`,`gi`);for(;;){let e=r.exec(n);if(e===null)break;t.push(e[0])}n=n.replace(r,``);let i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a=RegExp(`((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})`,`gi`);for(;;){let e=i.exec(n);if(e===null){if(e=a.exec(n),e===null)break;i.lastIndex=a.lastIndex}else a.lastIndex=i.lastIndex;t.push(e[0])}return t}async function bA(e,t){let n=[],r=[];return e.forEach(n=>{if(`cssRules`in n)try{dk(n.cssRules||[]).forEach((e,i)=>{if(e.type===CSSRule.IMPORT_RULE){let a=i+1,o=e.href,s=_A(o).then(e=>vA(e,t)).then(e=>yA(e).forEach(e=>{try{n.insertRule(e,e.startsWith(`@import`)?a+=1:n.cssRules.length)}catch(t){console.error(`Error inserting rule from remote css`,{rule:e,error:t})}})).catch(e=>{console.error(`Error loading remote css`,e.toString())});r.push(s)}})}catch(i){let a=e.find(e=>e.href==null)||document.styleSheets[0];n.href!=null&&r.push(_A(n.href).then(e=>vA(e,t)).then(e=>yA(e).forEach(e=>{a.insertRule(e,a.cssRules.length)})).catch(e=>{console.error(`Error loading remote stylesheet`,e)})),console.error(`Error inlining remote css file`,i)}}),Promise.all(r).then(()=>(e.forEach(e=>{if(`cssRules`in e)try{dk(e.cssRules||[]).forEach(e=>{n.push(e)})}catch(t){console.error(`Error while reading CSS rules from ${e.href}`,t)}}),n))}function xA(e){return e.filter(e=>e.type===CSSRule.FONT_FACE_RULE).filter(e=>cA(e.style.getPropertyValue(`src`)))}async function SA(e,t){if(e.ownerDocument==null)throw Error(`Provided element is not within a Document`);return xA(await bA(dk(e.ownerDocument.styleSheets),t))}function CA(e){return e.trim().replace(/["']/g,``)}function wA(e){let t=new Set;function n(e){(e.style.fontFamily||getComputedStyle(e).fontFamily).split(`,`).forEach(e=>{t.add(CA(e))}),Array.from(e.children).forEach(e=>{e instanceof HTMLElement&&n(e)})}return n(e),t}async function TA(e,t){let n=await SA(e,t),r=wA(e);return(await Promise.all(n.filter(e=>r.has(CA(e.style.fontFamily))).map(e=>{let n=e.parentStyleSheet?e.parentStyleSheet.href:null;return lA(e.cssText,n,t)}))).join(`
|
|
227
|
-
`)}async function EA(e,t){let n=t.fontEmbedCSS==null?t.skipFonts?null:await TA(e,t):t.fontEmbedCSS;if(n){let t=document.createElement(`style`),r=document.createTextNode(n);t.appendChild(r),e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}}async function DA(e,t={}){let{width:n,height:r}=_k(e,t),i=await eA(e,t,!0);return await EA(i,t),await mA(i,t),hA(i,t),await Ck(i,n,r)}async function OA(e,t={}){let{width:n,height:r}=_k(e,t),i=await xk(await DA(e,t)),a=document.createElement(`canvas`),o=a.getContext(`2d`),s=t.pixelRatio||vk(),c=t.canvasWidth||n,l=t.canvasHeight||r;return a.width=c*s,a.height=l*s,t.skipAutoScale||bk(a),a.style.width=`${c}`,a.style.height=`${l}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,a.width,a.height)),o.drawImage(i,0,0,a.width,a.height),a}async function kA(e,t={}){return TA(e,t)}var AA=6,jA=class{last=performance.now();async tick(){performance.now()-this.last<=AA||(await new Promise(e=>{`requestIdleCallback`in window?requestIdleCallback(()=>e(),{timeout:100}):setTimeout(e,0)}),this.last=performance.now())}},MA=null,NA=new Map;function PA(e){let t=NA.get(e);if(t)return t;if(!MA){let e=document.createElement(`iframe`);if(e.style.cssText=`position:absolute;width:0;height:0;border:0;visibility:hidden`,document.body.appendChild(e),MA=e.contentDocument,!MA)return{}}let n=MA.createElement(e);MA.body.appendChild(n);let r=MA.defaultView.getComputedStyle(n),i={};for(let e=0;e<r.length;e++){let t=r[e];i[t]=r.getPropertyValue(t)}return n.remove(),NA.set(e,i),i}function FA(){try{for(let e of[`div`,`span`,`p`,`a`,`button`,`img`,`ul`,`li`,`svg`])PA(e)}catch{}}function IA(e){if(e.id===`linear-grab-root`)return!0;let t=e.tagName?.toLowerCase()??``;return t===`overlay-canvas`||t.startsWith(`react-grab`)||t===`script`||t===`iframe`}function LA(e,t){try{let n=document.createElement(`canvas`);n.width=e.naturalWidth||e.width||1,n.height=e.naturalHeight||e.height||1,n.getContext(`2d`).drawImage(e,0,0),t.src=n.toDataURL(`image/png`)}catch{t.removeAttribute(`src`),t.setAttribute(`style`,`${t.getAttribute(`style`)??``}background:#8b8e9822;`)}}async function RA(e,t){if(IA(e))return null;if(e instanceof SVGSVGElement)return e.cloneNode(!0);let n=e.cloneNode(!1),r=getComputedStyle(e),i=PA(e.tagName.toLowerCase()),a=``;for(let e=0;e<r.length;e++){let t=r[e],n=r.getPropertyValue(t);n&&n!==i[t]&&(a+=`${t}:${n};`)}if(n.setAttribute(`style`,a),n.removeAttribute(`class`),e instanceof HTMLImageElement&&LA(e,n),e instanceof HTMLCanvasElement)try{let t=document.createElement(`img`);return t.setAttribute(`style`,a),t.src=e.toDataURL(),t}catch{}e instanceof HTMLInputElement&&n.setAttribute(`value`,e.value),e instanceof HTMLTextAreaElement&&(n.textContent=e.value),await t.tick();for(let r of Array.from(e.childNodes))if(r.nodeType===Node.TEXT_NODE)n.appendChild(r.cloneNode());else if(r.nodeType===Node.ELEMENT_NODE){let e=await RA(r,t);e&&n.appendChild(e)}return n}async function zA(e,t){let n=e.getBoundingClientRect(),r=Math.max(1,Math.ceil(n.width)),i=Math.max(1,Math.ceil(n.height)),a=await RA(e,new jA);if(!a)throw Error(`Capture root was filtered`);a.style.margin=`0`;let o=`<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${i}"><style>${t}</style><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">${new XMLSerializer().serializeToString(a)}</div></foreignObject></svg>`,s=URL.createObjectURL(new Blob([o],{type:`image/svg+xml;charset=utf-8`})),c=new Image;c.decoding=`async`,c.src=s;try{await c.decode()}finally{URL.revokeObjectURL(s)}let l=8192,u=Math.min(window.devicePixelRatio||1,1.5,l/r,l/i),d=document.createElement(`canvas`);d.width=Math.max(1,Math.round(r*u)),d.height=Math.max(1,Math.round(i*u));let f=d.getContext(`2d`);if(!f)throw Error(`Canvas 2d unavailable`);return f.drawImage(c,0,0,d.width,d.height),d}var BA=null;function VA(e){return BA??=kA(e).catch(()=>``),BA}function HA(){`requestIdleCallback`in window?requestIdleCallback(()=>{FA(),VA(document.body)},{timeout:3e3}):setTimeout(()=>{FA(),VA(document.body)},1500)}var UA=4e3,WA=1e3;async function GA(e){try{if(await new Promise(e=>{requestAnimationFrame(()=>`requestIdleCallback`in window?requestIdleCallback(()=>e(void 0),{timeout:500}):setTimeout(e,80))}),!e.isConnected)return null;let t=JA(e),n=t.querySelectorAll(`*`).length;n>UA&&(t=e);let r;try{r=await zA(t,await VA(t))}catch{t!==e&&n>WA&&(t=e),r=await OA(t,{pixelRatio:Math.min(window.devicePixelRatio||1,1.5),fontEmbedCSS:await VA(t),filter:e=>{if(!(e instanceof Element))return!0;if(e.id===`linear-grab-root`)return!1;let t=e.tagName?.toLowerCase()??``;return!(t===`overlay-canvas`||t.startsWith(`react-grab`))}})}return t!==e&&YA(r,t,e),await qA(r)}catch{return null}}async function KA(e){try{let t=e.x+e.w/2,n=e.y+e.h/2,r=document.elementFromPoint(t,n)??document.body,i=t=>{let n=t.getBoundingClientRect();return n.left<=e.x&&n.top<=e.y&&n.right>=e.x+e.w&&n.bottom>=e.y+e.h};for(;r!==document.body&&(!i(r)||r.querySelectorAll(`*`).length<1);)r=r.parentElement??document.body;let a=await zA(r,await VA(r)),o=r.getBoundingClientRect(),s=a.width/o.width,c=a.height/o.height,l=document.createElement(`canvas`);l.width=Math.max(1,Math.round(e.w*s)),l.height=Math.max(1,Math.round(e.h*c));let u=l.getContext(`2d`);return u?(u.drawImage(a,(e.x-o.left+r.scrollLeft)*s,(e.y-o.top+r.scrollTop)*c,e.w*s,e.h*c,0,0,l.width,l.height),await qA(l)):null}catch{return null}}async function qA(e){try{if(typeof createImageBitmap==`function`&&typeof OffscreenCanvas<`u`){let t=await createImageBitmap(e);return(await ND({type:`encode-png`,bitmap:t},[t])).dataUrl}}catch{}return XA(e)}function JA(e){let t=window.innerWidth,n=window.innerHeight,r=t*n*1.7,i=e,a=e;for(;a&&a!==document.body&&a!==document.documentElement;){let o=a.getBoundingClientRect();if(o.width*o.height>r||a!==e&&(a.scrollTop>0||a.scrollLeft>0)||(i=a,o.width>=t*.55&&o.height>=n*.35))break;a=a.parentElement}return i}function YA(e,t,n){let r=e.getContext(`2d`);if(!r)return;let i=t.getBoundingClientRect(),a=n.getBoundingClientRect();if(!i.width||!i.height)return;let o=e.width/i.width,s=e.height/i.height,c=(a.left-i.left+t.scrollLeft)*o,l=(a.top-i.top+t.scrollTop)*s,u=a.width*o,d=a.height*s,f=Math.min(6*o,u/2,d/2);r.strokeStyle=`rgba(94, 106, 210, 0.35)`,r.lineWidth=8*o,r.beginPath(),r.roundRect(c,l,u,d,f),r.stroke(),r.strokeStyle=`#5e6ad2`,r.lineWidth=3*o,r.beginPath(),r.roundRect(c,l,u,d,f),r.stroke()}function XA(e){let t=e.toDataURL(`image/png`);return t.length<=25e5?t:e.toDataURL(`image/jpeg`,.85)}function ZA(e){let[t,n]=e.split(`,`),r=t.match(/data:([^;]+)/)?.[1]??`image/png`,i=atob(n),a=new Uint8Array(i.length);for(let e=0;e<i.length;e++)a[e]=i.charCodeAt(e);return new Blob([a],{type:r})}var[QA,$A]=T(null),[ej,tj]=T(null);function nj(e,t){$A(e),tj(t??null)}function rj(){$A(null),tj(null)}var[ij,aj]=T(`capture`);function oj(e){aj(e)}var sj=N(`<span class="absolute inset-0 grid place-items-center">`),cj=N(`<button><span>`),lj=N(`<span role=status aria-label=Loading class="text-text-dim relative inline-block shrink-0">`),uj=N(`<span class="absolute top-0 left-1/2 rounded-full bg-current"style="animation:geist-spinner-fade 1.2s linear infinite;will-change:opacity">`),dj=N(`<input>`),fj=N(`<textarea>`),pj=N(`<select>`),mj=N(`<svg viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden class=shrink-0><path d="M4.5 12.5a3 3 0 0 1-.4-5.97 4 4 0 0 1 7.8-.9A3.2 3.2 0 0 1 11.5 12.5h-7Z">`),hj=N(`<svg viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden class=shrink-0><rect x=1.5 y=2.5 width=13 height=9 rx=1.5></rect><path d="M5.5 14h5M8 11.5V14">`),gj=N(`<a target=_blank rel="noopener noreferrer"><span class="min-w-0 truncate"></span><svg width=11 height=11 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden class=shrink-0><path d="M4.5 11.5 11.5 4.5M5.5 4.5h6v6">`),_j=N(`<span class="text-text-faint text-[10.5px] leading-snug">`),vj=N(`<label class="flex flex-col gap-1"><span class="text-text-dim text-[11px] font-medium">`),yj=N(`<section class="flex flex-col gap-2.5"><h2 class="text-text-dim text-[11px] font-semibold tracking-wide uppercase">`),bj=N(`<span>`),xj=N(`<span aria-hidden class="inline-block size-2 shrink-0 rounded-full">`),Sj=N(`<div class="flex flex-col items-center gap-1.5 px-4 py-10 text-center"><p class="text-text-dim text-[12px] font-medium"></p><div class="text-text-faint text-[11.5px] leading-relaxed">`),Cj=N(`<p class="bg-danger-soft text-danger rounded-md px-2.5 py-1.5 text-[11.5px] leading-snug break-words">`),wj={primary:`bg-accent hover:bg-accent-hover text-white border-transparent disabled:bg-surface-3 disabled:text-text-faint`,ghost:`bg-surface-2 hover:bg-surface-3 text-text border-border disabled:text-text-faint disabled:hover:bg-surface-2`,danger:`bg-danger-soft hover:bg-danger/30 text-danger border-transparent`};function Tj(e){let[t,n]=He(e,[`variant`,`loading`,`children`,`class`,`disabled`,`title`]);return(()=>{var e=cj(),r=e.firstChild;return ft(e,Ve(n,{get"data-tip"(){return t.title||void 0},get"aria-label"(){return n[`aria-label`]??t.title},get disabled(){return t.disabled||t.loading},get class(){return`relative inline-flex h-7 cursor-pointer items-center justify-center gap-1.5 rounded-md border px-3 text-[12px] font-medium transition-colors disabled:cursor-not-allowed ${wj[t.variant??`ghost`]} ${t.class??``}`}}),!1,!0),P(r,()=>t.children),P(e,j(M,{get when(){return t.loading},get children(){var e=sj();return P(e,j(Ej,{})),e}}),null),D(()=>st(r,`inline-flex items-center gap-1.5 ${t.loading?`invisible`:``}`)),e})()}function Ej(e){let t=()=>e.size??14,n=()=>Math.max(1,Math.round(t()*.09)),r=()=>Math.round(t()*.26);return(()=>{var e=lj();return P(e,j(We,{get each(){return Array.from({length:12},(e,t)=>t)},children:e=>(()=>{var i=uj();return dt(i,`transform`,`rotate(${e*30}deg)`),dt(i,`animation-delay`,`${(e-12)*.1}s`),D(e=>{var a=`${n()}px`,o=`${r()}px`,s=`-${n()/2}px`,c=`center ${t()/2}px`;return a!==e.e&&dt(i,`width`,e.e=a),o!==e.t&&dt(i,`height`,e.t=o),s!==e.a&&dt(i,`margin-left`,e.a=s),c!==e.o&&dt(i,`transform-origin`,e.o=c),e},{e:void 0,t:void 0,a:void 0,o:void 0}),i})()})),D(n=>{var r=`${t()}px`,i=`${t()}px`;return r!==n.e&&dt(e,`width`,n.e=r),i!==n.t&&dt(e,`height`,n.t=i),n},{e:void 0,t:void 0}),e})()}function Dj(e){let[t,n]=He(e,[`class`]);return(()=>{var e=dj();return ft(e,Ve(n,{get class(){return`bg-surface-2 border-border focus:border-accent placeholder:text-text-faint h-7 w-full rounded-md border px-2 text-[12px] outline-none transition-colors ${t.class??``}`}}),!1,!1),e})()}function Oj(e){let[t,n]=He(e,[`class`]);return(()=>{var e=fj();return ft(e,Ve(n,{get class(){return`bg-surface-2 border-border focus:border-accent placeholder:text-text-faint w-full resize-y rounded-md border px-2 py-1.5 text-[12px] leading-relaxed outline-none transition-colors ${t.class??``}`}}),!1,!1),e})()}function kj(e){let[t,n]=He(e,[`class`,`children`]);return(()=>{var e=pj();return ft(e,Ve(n,{get class(){return`bg-surface-2 border-border focus:border-accent h-7 w-full cursor-pointer rounded-md border px-1.5 text-[12px] outline-none ${t.class??``}`}}),!1,!0),P(e,()=>t.children),e})()}function Aj(e){let t=e.size??11;return(()=>{var e=mj();return it(e,`width`,t),it(e,`height`,t),e})()}function jj(e){let t=e.size??11;return(()=>{var e=hj();return it(e,`width`,t),it(e,`height`,t),e})()}function Mj(e){return(()=>{var t=gj(),n=t.firstChild;return P(n,()=>e.children),D(n=>{var r=e.href,i=e.title||void 0,a=`text-accent inline-flex min-w-0 items-center gap-1 text-[11px] underline-offset-2 hover:underline ${e.class??``}`;return r!==n.e&&it(t,`href`,n.e=r),i!==n.t&&it(t,`data-tip`,n.t=i),a!==n.a&&st(t,n.a=a),n},{e:void 0,t:void 0,a:void 0}),t})()}function Nj(e){return(()=>{var t=vj(),n=t.firstChild;return P(n,()=>e.label),P(t,()=>e.children,null),P(t,j(M,{get when(){return e.hint},get children(){var t=_j();return P(t,()=>e.hint),t}}),null),t})()}function Pj(e){return(()=>{var t=yj(),n=t.firstChild;return P(n,()=>e.title),P(t,()=>e.children,null),t})()}function Fj(e){return(()=>{var t=bj();return P(t,()=>e.children),D(n=>{var r=`bg-surface-3 text-text-dim inline-flex h-[18px] items-center gap-1 rounded-full px-2 text-[10.5px] font-medium whitespace-nowrap ${e.class??``}`,i=e.color?{color:e.color}:void 0,a=e.title||void 0;return r!==n.e&&st(t,n.e=r),n.t=ut(t,i,n.t),a!==n.a&&it(t,`data-tip`,n.a=a),n},{e:void 0,t:void 0,a:void 0}),t})()}function Ij(e){return(()=>{var t=xj();return D(n=>dt(t,`background`,e.color)),t})()}function Lj(e){return(()=>{var t=Sj(),n=t.firstChild,r=n.nextSibling;return P(n,()=>e.title),P(r,()=>e.children),t})()}function Rj(e){return(()=>{var t=Cj();return P(t,()=>e.message),t})()}var zj={0:`No priority`,1:`Urgent`,2:`High`,3:`Medium`,4:`Low`};function Bj(e){let t=typeof e==`number`?e:Date.parse(e),n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return`just now`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}Br(),Fx(),gD();var Vj=N(`<span class="truncate font-mono">`),Hj=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden><path d="M5.5 3.5 6.6 2h2.8l1.1 1.5H13A1.5 1.5 0 0 1 14.5 5v7A1.5 1.5 0 0 1 13 13.5H3A1.5 1.5 0 0 1 1.5 12V5A1.5 1.5 0 0 1 3 3.5h2.5Z"></path><circle cx=8 cy=8.2 r=2.4>`),Uj=N(`<div class="flex flex-wrap gap-1.5"><span class="text-text-faint self-end text-[10.5px]">attached on create`),Wj=N(`<div class="flex items-center justify-between gap-1.5"><span class="text-text-faint text-[11px]">Model:</span><div class="flex rounded-md border border-border overflow-hidden">`),Gj=N(`<span class="inline-block min-w-[12ch] text-center">`),Kj=N(`<div class="flex justify-end">`),qj=N(`<div class="flex flex-col gap-1.5">`),Jj=N(`<p class="text-text-faint text-[11px] leading-snug">Primary provider failed — drafted with <span class=text-text-dim></span> (<!>).`),Yj=N(`<div class="border-warn/40 bg-surface rounded-md border px-2.5 py-2"><p class="text-warn mb-1 text-[10.5px] font-semibold tracking-wide uppercase">Possibly related — check before creating`),Xj=N(`<div class="flex flex-col gap-1">`),Zj=N(`<option value>Select a team…`),Qj=N(`<option value=cursor> — cloud agent`),$j=N(`<option value=local>Local Claude Code (bridge)`),eM=N(`<option value=none>No one — just create the issue`),tM=N(`<option value>Claude Code default`),nM=N(`<option value=fable>Fable 5`),rM=N(`<option value=opus>Opus`),iM=N(`<option value=sonnet>Sonnet`),aM=N(`<option value=haiku>Haiku`),oM=N(`<label class="flex cursor-pointer items-center gap-2 select-none"><input type=checkbox class="accent-accent rounded"><span class="text-text text-[12px]">Isolated worktree <span class=text-text-dim>— own branch, run agents in parallel safely`),sM=N(`<label class="flex items-center gap-2 cursor-pointer select-none"><input type=checkbox class="rounded accent-accent"><span class="text-[12px] text-text">Attach console errors <span class="text-text-dim tabular-nums">(<!> captured)`),cM=N(`<label class="flex items-center gap-2 cursor-pointer select-none"><input type=checkbox class="rounded accent-accent"><span class="text-[12px] text-text">Attach dev server logs <span class="text-text-dim tabular-nums">(last <!> lines)`),lM=N(`<p class="text-warn text-[11px] leading-snug">`),uM=N(`<div class="flex h-full flex-col gap-4 overflow-y-auto pt-3 pb-4 pl-3 pr-4"><div class="bg-surface border-border flex items-center gap-2 rounded-lg border px-2.5 py-2"><div class="flex min-w-0 flex-1 flex-col gap-1"><span class="text-text-dim text-[11px] font-medium">Attached context</span><div class="flex min-w-0 flex-wrap items-center gap-1.5"></div></div></div><div class="bg-bg border-border sticky bottom-0 z-10 -mb-4 flex flex-col gap-2 border-t pt-2.5 pb-3">`),dM=N(`<div class="border-border relative overflow-hidden rounded-md border"><img alt="Pasted attachment"class="block h-16 w-16 object-cover"><button class="bg-bg/80 text-text-dim hover:text-danger absolute top-0.5 right-0.5 grid size-4 cursor-pointer place-items-center rounded text-[10px] leading-none"title=Remove aria-label="Remove pasted image">×`),fM=N(`<button>`),pM=N(`<div class="flex min-w-0 items-center gap-1.5 py-0.5"><span class="font-mono text-text-dim shrink-0 text-[10.5px]"></span><a target=_blank rel=noreferrer class="text-accent min-w-0 truncate text-[11px] hover:underline">`),mM=N(`<div class="flex items-center gap-1"><span class="text-text-faint text-[11px] tabular-nums w-4 shrink-0 text-right">.</span><button class="text-text-faint hover:text-danger shrink-0 w-5 h-5 flex items-center justify-center rounded transition-colors cursor-pointer text-[12px] leading-none"aria-label="Remove step">×`),hM=N(`<option>`),gM=N(`<option>Loading teams…`),_M=N(`<div class="bg-surface border-border rounded-lg border p-2.5 flex items-center justify-between gap-2"><a target=_blank rel="noopener noreferrer"class="text-accent font-mono text-[12px] hover:underline">`);function vM(e){sr();let t=_r(()=>({queryKey:[`grab`],queryFn:Dr})),n=_r(()=>({queryKey:[`settings`],queryFn:Tr})),r=k(()=>n.data??{}),i=k(()=>t.data?.[0]??null),a=k(()=>!!(r().linearApiKey||r().linearAccessToken)),o=k(()=>Ax(r())),[s,c]=br(`draft:title`,``),[l,u]=br(`draft:description`,``),[d,f]=br(`draft:steps`,[]),[p,m]=br(`draft:expected`,``),[h,g]=br(`draft:actual`,``),[_,v]=br(`draft:impact`,``),[y,b]=br(`draft:analysis`,``),[x,S]=br(`draft:next-steps`,``),[C,w]=br(`draft:priority`,0),[E,ee]=T(r().defaultTeamId??``),[te,A]=T(r().defaultRepo??``),[ne,re]=br(`draft:target`,`none`),[ie,oe]=br(`draft:local-model`,``),[se,ce]=br(`draft:cloud-model`,``),[le,ue]=br(`draft:worktree`,!1),[de,fe]=T(!0),[pe,me]=T(sk().length);O(()=>{let e=setInterval(()=>me(sk().length),3e3);ae(()=>clearInterval(e))});let[he,ge]=T(``);O(()=>{let e=s().trim(),t=setTimeout(()=>ge(e.length>=8?e:``),600);ae(()=>clearTimeout(t))});let _e=_r(()=>({queryKey:[`dup-search`,he()],queryFn:()=>_O(he()),enabled:!!he()&&a(),staleTime:3e4})),[ve,ye]=br(`draft:note`,``),[be,xe]=T([]),Se=e=>{for(let t of Array.from(e.clipboardData?.items??[])){if(!t.type.startsWith(`image/`))continue;let e=t.getAsFile();if(!e||e.size>8e6)continue;let n=new FileReader;n.onload=()=>xe(e=>[...e,{id:Date.now()+Math.random(),dataUrl:n.result}].slice(-6)),n.readAsDataURL(e)}},[Ce,we]=T(`fast`),[Te,Ee]=T(!0),De=!1;O(()=>{let e=n.data;De||!e||(De=!0,ee(e.defaultTeamId??``),A(e.defaultRepo??``),re(e.cursorAgentId?`cursor`:`none`))});let Oe=_r(()=>({queryKey:[`teams`],queryFn:uO,enabled:a()})),ke=k(()=>(Oe.data??[]).find(e=>e.id===E())?.name),[Ae,je]=T(!1),[Me,Ne]=T(null),[Pe,Fe]=T(null),Ie=null,Le=()=>{Ie?.(),Ie=null};ae(Le);let Re=e=>{e.title!==void 0&&c(e.title),e.description!==void 0&&u(e.description),e.reproSteps!==void 0&&f(e.reproSteps),e.expected!==void 0&&m(e.expected),e.actual!==void 0&&g(e.actual),e.impact!==void 0&&v(e.impact),e.analysisNotes!==void 0&&b(e.analysisNotes),e.suggestedNextSteps!==void 0&&S(e.suggestedNextSteps),e.priority!==void 0&&w(e.priority)},ze=async()=>{if(!o())return;je(!0),Ne(null),Fe(null),Le();let e=r().logUrl&&Te()?await ek({logUrl:r().logUrl,logLines:40}).catch(()=>void 0):void 0,n=de()?ck(15):null,a=[e?`--- dev server ---\n${e}`:null,n?`--- browser console ---\n${n}`:null].filter(Boolean).join(`
|
|
225
|
+
`).trim();return i.length>$O&&(i=`…\n${i.slice(i.length-$O)}`),i||null}finally{clearTimeout(i)}}var nk=50,rk=[],ik=!1;function ak(e){if(e instanceof Error)return e.stack??`${e.name}: ${e.message}`;if(typeof e==`object`&&e)try{return JSON.stringify(e).slice(0,400)}catch{return String(e)}return String(e)}function ok(e,t){let n=t.map(ak).join(` `).slice(0,600);n.trim()&&(rk.push({at:Date.now(),level:e,text:n}),rk.length>nk&&rk.shift())}function sk(){if(ik||typeof window>`u`)return;ik=!0;let e=console.error.bind(console);console.error=(...t)=>{ok(`error`,t),e(...t)};let t=console.warn.bind(console);console.warn=(...e)=>{ok(`warn`,e),t(...e)},window.addEventListener(`error`,e=>{ok(`error`,[`${e.message}${e.filename?` (${e.filename}:${e.lineno})`:``}`])}),window.addEventListener(`unhandledrejection`,e=>{let t=e.reason;ok(`unhandled`,[t?.stack??String(e.reason??`unhandled rejection`)])})}function ck(e=30){return rk.slice(-e)}function lk(e=30){let t=ck(e);if(!t.length)return null;let n=t.map(e=>`[${new Date(e.at).toTimeString().slice(0,8)}] ${e.level.toUpperCase()}: ${e.text}`).join(`
|
|
226
|
+
`);return n.length>8e3&&(n=`…\n${n.slice(n.length-8e3)}`),n}function uk(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;let n=document.implementation.createHTMLDocument(),r=n.createElement(`base`),i=n.createElement(`a`);return n.head.appendChild(r),n.body.appendChild(i),t&&(r.href=t),i.href=e,i.href}var dk=(()=>{let e=0,t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function fk(e){let t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}var pk=null;function mk(e={}){return pk||(e.includeStyleProperties?(pk=e.includeStyleProperties,pk):(pk=fk(window.getComputedStyle(document.documentElement)),pk))}function hk(e,t){let n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace(`px`,``)):0}function gk(e){let t=hk(e,`border-left-width`),n=hk(e,`border-right-width`);return e.clientWidth+t+n}function _k(e){let t=hk(e,`border-top-width`),n=hk(e,`border-bottom-width`);return e.clientHeight+t+n}function vk(e,t={}){return{width:t.width||gk(e),height:t.height||_k(e)}}function yk(){let e,t;try{t=process}catch{}let n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}var bk=16384;function xk(e){(e.width>bk||e.height>bk)&&(e.width>bk&&e.height>bk?e.width>e.height?(e.height*=bk/e.width,e.width=bk):(e.width*=bk/e.height,e.height=bk):e.width>bk?(e.height*=bk/e.width,e.width=bk):(e.width*=bk/e.height,e.height=bk))}function Sk(e){return new Promise((t,n)=>{let r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>t(r))})},r.onerror=n,r.crossOrigin=`anonymous`,r.decoding=`async`,r.src=e})}async function Ck(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(e=>`data:image/svg+xml;charset=utf-8,${e}`)}async function wk(e,t,n){let r=`http://www.w3.org/2000/svg`,i=document.createElementNS(r,`svg`),a=document.createElementNS(r,`foreignObject`);return i.setAttribute(`width`,`${t}`),i.setAttribute(`height`,`${n}`),i.setAttribute(`viewBox`,`0 0 ${t} ${n}`),a.setAttribute(`width`,`100%`),a.setAttribute(`height`,`100%`),a.setAttribute(`x`,`0`),a.setAttribute(`y`,`0`),a.setAttribute(`externalResourcesRequired`,`true`),i.appendChild(a),a.appendChild(e),Ck(i)}var Tk=(e,t)=>{if(e instanceof t)return!0;let n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||Tk(n,t)};function Ek(e){let t=e.getPropertyValue(`content`);return`${e.cssText} content: '${t.replace(/'|"/g,``)}';`}function Dk(e,t){return mk(t).map(t=>`${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t)?` !important`:``};`).join(` `)}function Ok(e,t,n,r){let i=`.${e}:${t}`,a=n.cssText?Ek(n):Dk(n,r);return document.createTextNode(`${i}{${a}}`)}function kk(e,t,n,r){let i=window.getComputedStyle(e,n),a=i.getPropertyValue(`content`);if(a===``||a===`none`)return;let o=dk();try{t.className=`${t.className} ${o}`}catch{return}let s=document.createElement(`style`);s.appendChild(Ok(o,n,i,r)),t.appendChild(s)}function Ak(e,t,n){kk(e,t,`:before`,n),kk(e,t,`:after`,n)}var jk=`application/font-woff`,Mk=`image/jpeg`,Nk={woff:jk,woff2:jk,ttf:`application/font-truetype`,eot:`application/vnd.ms-fontobject`,png:`image/png`,jpg:Mk,jpeg:Mk,gif:`image/gif`,tiff:`image/tiff`,svg:`image/svg+xml`,webp:`image/webp`};function Pk(e){let t=/\.([^./]*?)$/g.exec(e);return t?t[1]:``}function Fk(e){return Nk[Pk(e).toLowerCase()]||``}function Ik(e){return e.split(/,/)[1]}function Lk(e){return e.search(/^(data:)/)!==-1}function Rk(e,t){return`data:${t};base64,${e}`}async function zk(e,t,n){let r=await fetch(e,t);if(r.status===404)throw Error(`Resource "${r.url}" not found`);let i=await r.blob();return new Promise((e,t)=>{let a=new FileReader;a.onerror=t,a.onloadend=()=>{try{e(n({res:r,result:a.result}))}catch(e){t(e)}},a.readAsDataURL(i)})}var Bk={};function Vk(e,t,n){let r=e.replace(/\?.*/,``);return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,``)),t?`[${t}]${r}`:r}async function Hk(e,t,n){let r=Vk(e,t,n.includeQueryParams);if(Bk[r]!=null)return Bk[r];n.cacheBust&&(e+=(/\?/.test(e)?`&`:`?`)+new Date().getTime());let i;try{i=Rk(await zk(e,n.fetchRequestInit,({res:e,result:n})=>(t||=e.headers.get(`Content-Type`)||``,Ik(n))),t)}catch(t){i=n.imagePlaceholder||``;let r=`Failed to fetch resource: ${e}`;t&&(r=typeof t==`string`?t:t.message),r&&console.warn(r)}return Bk[r]=i,i}async function Uk(e){let t=e.toDataURL();return t===`data:,`?e.cloneNode(!1):Sk(t)}async function Wk(e,t){if(e.currentSrc){let t=document.createElement(`canvas`),n=t.getContext(`2d`);return t.width=e.clientWidth,t.height=e.clientHeight,n?.drawImage(e,0,0,t.width,t.height),Sk(t.toDataURL())}let n=e.poster;return Sk(await Hk(n,Fk(n),t))}async function Gk(e,t){try{if(e?.contentDocument?.body)return await tA(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Kk(e,t){return Tk(e,HTMLCanvasElement)?Uk(e):Tk(e,HTMLVideoElement)?Wk(e,t):Tk(e,HTMLIFrameElement)?Gk(e,t):e.cloneNode(Jk(e))}var qk=e=>e.tagName!=null&&e.tagName.toUpperCase()===`SLOT`,Jk=e=>e.tagName!=null&&e.tagName.toUpperCase()===`SVG`;async function Yk(e,t,n){if(Jk(t))return t;let r=[];return r=qk(e)&&e.assignedNodes?fk(e.assignedNodes()):Tk(e,HTMLIFrameElement)&&e.contentDocument?.body?fk(e.contentDocument.body.childNodes):fk((e.shadowRoot??e).childNodes),r.length===0||Tk(e,HTMLVideoElement)||await r.reduce((e,r)=>e.then(()=>tA(r,n)).then(e=>{e&&t.appendChild(e)}),Promise.resolve()),t}function Xk(e,t,n){let r=t.style;if(!r)return;let i=window.getComputedStyle(e);i.cssText?(r.cssText=i.cssText,r.transformOrigin=i.transformOrigin):mk(n).forEach(n=>{let a=i.getPropertyValue(n);n===`font-size`&&a.endsWith(`px`)&&(a=`${Math.floor(parseFloat(a.substring(0,a.length-2)))-.1}px`),Tk(e,HTMLIFrameElement)&&n===`display`&&a===`inline`&&(a=`block`),n===`d`&&t.getAttribute(`d`)&&(a=`path(${t.getAttribute(`d`)})`),r.setProperty(n,a,i.getPropertyPriority(n))})}function Zk(e,t){Tk(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),Tk(e,HTMLInputElement)&&t.setAttribute(`value`,e.value)}function Qk(e,t){if(Tk(e,HTMLSelectElement)){let n=t,r=Array.from(n.children).find(t=>e.value===t.getAttribute(`value`));r&&r.setAttribute(`selected`,``)}}function $k(e,t,n){return Tk(t,Element)&&(Xk(e,t,n),Ak(e,t,n),Zk(e,t),Qk(e,t)),t}async function eA(e,t){let n=e.querySelectorAll?e.querySelectorAll(`use`):[];if(n.length===0)return e;let r={};for(let i=0;i<n.length;i++){let a=n[i].getAttribute(`xlink:href`);if(a){let n=e.querySelector(a),i=document.querySelector(a);!n&&i&&!r[a]&&(r[a]=await tA(i,t,!0))}}let i=Object.values(r);if(i.length){let t=`http://www.w3.org/1999/xhtml`,n=document.createElementNS(t,`svg`);n.setAttribute(`xmlns`,t),n.style.position=`absolute`,n.style.width=`0`,n.style.height=`0`,n.style.overflow=`hidden`,n.style.display=`none`;let r=document.createElementNS(t,`defs`);n.appendChild(r);for(let e=0;e<i.length;e++)r.appendChild(i[e]);e.appendChild(n)}return e}async function tA(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(e=>Kk(e,t)).then(n=>Yk(e,n,t)).then(n=>$k(e,n,t)).then(e=>eA(e,t))}var nA=/url\((['"]?)([^'"]+?)\1\)/g,rA=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,iA=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function aA(e){let t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,`\\$1`);return RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,`g`)}function oA(e){let t=[];return e.replace(nA,(e,n,r)=>(t.push(r),e)),t.filter(e=>!Lk(e))}async function sA(e,t,n,r,i){try{let a=n?uk(t,n):t,o=Fk(t),s;return s=i?Rk(await i(a),o):await Hk(a,o,r),e.replace(aA(t),`$1${s}$3`)}catch{}return e}function cA(e,{preferredFontFormat:t}){return t?e.replace(iA,e=>{for(;;){let[n,,r]=rA.exec(e)||[];if(!r)return``;if(r===t)return`src: ${n};`}}):e}function lA(e){return e.search(nA)!==-1}async function uA(e,t,n){if(!lA(e))return e;let r=cA(e,n);return oA(r).reduce((e,r)=>e.then(e=>sA(e,r,t,n)),Promise.resolve(r))}async function dA(e,t,n){let r=t.style?.getPropertyValue(e);if(r){let i=await uA(r,null,n);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function fA(e,t){await dA(`background`,e,t)||await dA(`background-image`,e,t),await dA(`mask`,e,t)||await dA(`-webkit-mask`,e,t)||await dA(`mask-image`,e,t)||await dA(`-webkit-mask-image`,e,t)}async function pA(e,t){let n=Tk(e,HTMLImageElement);if(!(n&&!Lk(e.src))&&!(Tk(e,SVGImageElement)&&!Lk(e.href.baseVal)))return;let r=n?e.src:e.href.baseVal,i=await Hk(r,Fk(r),t);await new Promise((r,a)=>{e.onload=r,e.onerror=t.onImageErrorHandler?(...e)=>{try{r(t.onImageErrorHandler(...e))}catch(e){a(e)}}:a;let o=e;o.decode&&=r,o.loading===`lazy`&&(o.loading=`eager`),n?(e.srcset=``,e.src=i):e.href.baseVal=i})}async function mA(e,t){let n=fk(e.childNodes).map(e=>hA(e,t));await Promise.all(n).then(()=>e)}async function hA(e,t){Tk(e,Element)&&(await fA(e,t),await pA(e,t),await mA(e,t))}function gA(e,t){let{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);let r=t.style;return r!=null&&Object.keys(r).forEach(e=>{n[e]=r[e]}),e}var _A={};async function vA(e){let t=_A[e];return t??(t={url:e,cssText:await(await fetch(e)).text()},_A[e]=t,t)}async function yA(e,t){let n=e.cssText,r=/url\(["']?([^"')]+)["']?\)/g,i=(n.match(/url\([^)]+\)/g)||[]).map(async i=>{let a=i.replace(r,`$1`);return a.startsWith(`https://`)||(a=new URL(a,e.url).href),zk(a,t.fetchRequestInit,({result:e})=>(n=n.replace(i,`url(${e})`),[i,e]))});return Promise.all(i).then(()=>n)}function bA(e){if(e==null)return[];let t=[],n=e.replace(/(\/\*[\s\S]*?\*\/)/gi,``),r=RegExp(`((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})`,`gi`);for(;;){let e=r.exec(n);if(e===null)break;t.push(e[0])}n=n.replace(r,``);let i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a=RegExp(`((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})`,`gi`);for(;;){let e=i.exec(n);if(e===null){if(e=a.exec(n),e===null)break;i.lastIndex=a.lastIndex}else a.lastIndex=i.lastIndex;t.push(e[0])}return t}async function xA(e,t){let n=[],r=[];return e.forEach(n=>{if(`cssRules`in n)try{fk(n.cssRules||[]).forEach((e,i)=>{if(e.type===CSSRule.IMPORT_RULE){let a=i+1,o=e.href,s=vA(o).then(e=>yA(e,t)).then(e=>bA(e).forEach(e=>{try{n.insertRule(e,e.startsWith(`@import`)?a+=1:n.cssRules.length)}catch(t){console.error(`Error inserting rule from remote css`,{rule:e,error:t})}})).catch(e=>{console.error(`Error loading remote css`,e.toString())});r.push(s)}})}catch(i){let a=e.find(e=>e.href==null)||document.styleSheets[0];n.href!=null&&r.push(vA(n.href).then(e=>yA(e,t)).then(e=>bA(e).forEach(e=>{a.insertRule(e,a.cssRules.length)})).catch(e=>{console.error(`Error loading remote stylesheet`,e)})),console.error(`Error inlining remote css file`,i)}}),Promise.all(r).then(()=>(e.forEach(e=>{if(`cssRules`in e)try{fk(e.cssRules||[]).forEach(e=>{n.push(e)})}catch(t){console.error(`Error while reading CSS rules from ${e.href}`,t)}}),n))}function SA(e){return e.filter(e=>e.type===CSSRule.FONT_FACE_RULE).filter(e=>lA(e.style.getPropertyValue(`src`)))}async function CA(e,t){if(e.ownerDocument==null)throw Error(`Provided element is not within a Document`);return SA(await xA(fk(e.ownerDocument.styleSheets),t))}function wA(e){return e.trim().replace(/["']/g,``)}function TA(e){let t=new Set;function n(e){(e.style.fontFamily||getComputedStyle(e).fontFamily).split(`,`).forEach(e=>{t.add(wA(e))}),Array.from(e.children).forEach(e=>{e instanceof HTMLElement&&n(e)})}return n(e),t}async function EA(e,t){let n=await CA(e,t),r=TA(e);return(await Promise.all(n.filter(e=>r.has(wA(e.style.fontFamily))).map(e=>{let n=e.parentStyleSheet?e.parentStyleSheet.href:null;return uA(e.cssText,n,t)}))).join(`
|
|
227
|
+
`)}async function DA(e,t){let n=t.fontEmbedCSS==null?t.skipFonts?null:await EA(e,t):t.fontEmbedCSS;if(n){let t=document.createElement(`style`),r=document.createTextNode(n);t.appendChild(r),e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}}async function OA(e,t={}){let{width:n,height:r}=vk(e,t),i=await tA(e,t,!0);return await DA(i,t),await hA(i,t),gA(i,t),await wk(i,n,r)}async function kA(e,t={}){let{width:n,height:r}=vk(e,t),i=await Sk(await OA(e,t)),a=document.createElement(`canvas`),o=a.getContext(`2d`),s=t.pixelRatio||yk(),c=t.canvasWidth||n,l=t.canvasHeight||r;return a.width=c*s,a.height=l*s,t.skipAutoScale||xk(a),a.style.width=`${c}`,a.style.height=`${l}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,a.width,a.height)),o.drawImage(i,0,0,a.width,a.height),a}async function AA(e,t={}){return EA(e,t)}var jA=6,MA=class{last=performance.now();async tick(){performance.now()-this.last<=jA||(await new Promise(e=>{`requestIdleCallback`in window?requestIdleCallback(()=>e(),{timeout:100}):setTimeout(e,0)}),this.last=performance.now())}},NA=null,PA=new Map;function FA(e){let t=PA.get(e);if(t)return t;if(!NA){let e=document.createElement(`iframe`);if(e.style.cssText=`position:absolute;width:0;height:0;border:0;visibility:hidden`,document.body.appendChild(e),NA=e.contentDocument,!NA)return{}}let n=NA.createElement(e);NA.body.appendChild(n);let r=NA.defaultView.getComputedStyle(n),i={};for(let e=0;e<r.length;e++){let t=r[e];i[t]=r.getPropertyValue(t)}return n.remove(),PA.set(e,i),i}function IA(){try{for(let e of[`div`,`span`,`p`,`a`,`button`,`img`,`ul`,`li`,`svg`])FA(e)}catch{}}function LA(e){if(e.id===`linear-grab-root`)return!0;let t=e.tagName?.toLowerCase()??``;return t===`overlay-canvas`||t.startsWith(`react-grab`)||t===`script`||t===`iframe`}function RA(e,t){try{let n=document.createElement(`canvas`);n.width=e.naturalWidth||e.width||1,n.height=e.naturalHeight||e.height||1,n.getContext(`2d`).drawImage(e,0,0),t.src=n.toDataURL(`image/png`)}catch{t.removeAttribute(`src`),t.setAttribute(`style`,`${t.getAttribute(`style`)??``}background:#8b8e9822;`)}}async function zA(e,t){if(LA(e))return null;if(e instanceof SVGSVGElement)return e.cloneNode(!0);let n=e.cloneNode(!1),r=getComputedStyle(e),i=FA(e.tagName.toLowerCase()),a=``;for(let e=0;e<r.length;e++){let t=r[e],n=r.getPropertyValue(t);n&&n!==i[t]&&(a+=`${t}:${n};`)}if(n.setAttribute(`style`,a),n.removeAttribute(`class`),e instanceof HTMLImageElement&&RA(e,n),e instanceof HTMLCanvasElement)try{let t=document.createElement(`img`);return t.setAttribute(`style`,a),t.src=e.toDataURL(),t}catch{}e instanceof HTMLInputElement&&n.setAttribute(`value`,e.value),e instanceof HTMLTextAreaElement&&(n.textContent=e.value),await t.tick();for(let r of Array.from(e.childNodes))if(r.nodeType===Node.TEXT_NODE)n.appendChild(r.cloneNode());else if(r.nodeType===Node.ELEMENT_NODE){let e=await zA(r,t);e&&n.appendChild(e)}return n}async function BA(e,t){let n=e.getBoundingClientRect(),r=Math.max(1,Math.ceil(n.width)),i=Math.max(1,Math.ceil(n.height)),a=await zA(e,new MA);if(!a)throw Error(`Capture root was filtered`);a.style.margin=`0`;let o=`<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${i}"><style>${t}</style><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">${new XMLSerializer().serializeToString(a)}</div></foreignObject></svg>`,s=URL.createObjectURL(new Blob([o],{type:`image/svg+xml;charset=utf-8`})),c=new Image;c.decoding=`async`,c.src=s;try{await c.decode()}finally{URL.revokeObjectURL(s)}let l=8192,u=Math.min(window.devicePixelRatio||1,1.5,l/r,l/i),d=document.createElement(`canvas`);d.width=Math.max(1,Math.round(r*u)),d.height=Math.max(1,Math.round(i*u));let f=d.getContext(`2d`);if(!f)throw Error(`Canvas 2d unavailable`);return f.drawImage(c,0,0,d.width,d.height),d}var VA=null;function HA(e){return VA??=AA(e).catch(()=>``),VA}function UA(){`requestIdleCallback`in window?requestIdleCallback(()=>{IA(),HA(document.body)},{timeout:3e3}):setTimeout(()=>{IA(),HA(document.body)},1500)}var WA=4e3,GA=1e3;async function KA(e){try{if(await new Promise(e=>{requestAnimationFrame(()=>`requestIdleCallback`in window?requestIdleCallback(()=>e(void 0),{timeout:500}):setTimeout(e,80))}),!e.isConnected)return null;let t=YA(e),n=t.querySelectorAll(`*`).length;n>WA&&(t=e);let r;try{r=await BA(t,await HA(t))}catch{t!==e&&n>GA&&(t=e),r=await kA(t,{pixelRatio:Math.min(window.devicePixelRatio||1,1.5),fontEmbedCSS:await HA(t),filter:e=>{if(!(e instanceof Element))return!0;if(e.id===`linear-grab-root`)return!1;let t=e.tagName?.toLowerCase()??``;return!(t===`overlay-canvas`||t.startsWith(`react-grab`))}})}return t!==e&&XA(r,t,e),await JA(r)}catch{return null}}async function qA(e){try{let t=e.x+e.w/2,n=e.y+e.h/2,r=document.elementFromPoint(t,n)??document.body,i=t=>{let n=t.getBoundingClientRect();return n.left<=e.x&&n.top<=e.y&&n.right>=e.x+e.w&&n.bottom>=e.y+e.h};for(;r!==document.body&&(!i(r)||r.querySelectorAll(`*`).length<1);)r=r.parentElement??document.body;let a=await BA(r,await HA(r)),o=r.getBoundingClientRect(),s=a.width/o.width,c=a.height/o.height,l=document.createElement(`canvas`);l.width=Math.max(1,Math.round(e.w*s)),l.height=Math.max(1,Math.round(e.h*c));let u=l.getContext(`2d`);return u?(u.drawImage(a,(e.x-o.left+r.scrollLeft)*s,(e.y-o.top+r.scrollTop)*c,e.w*s,e.h*c,0,0,l.width,l.height),await JA(l)):null}catch{return null}}async function JA(e){try{if(typeof createImageBitmap==`function`&&typeof OffscreenCanvas<`u`){let t=await createImageBitmap(e);return(await ND({type:`encode-png`,bitmap:t},[t])).dataUrl}}catch{}return ZA(e)}function YA(e){let t=window.innerWidth,n=window.innerHeight,r=t*n*1.7,i=e,a=e;for(;a&&a!==document.body&&a!==document.documentElement;){let o=a.getBoundingClientRect();if(o.width*o.height>r||a!==e&&(a.scrollTop>0||a.scrollLeft>0)||(i=a,o.width>=t*.55&&o.height>=n*.35))break;a=a.parentElement}return i}function XA(e,t,n){let r=e.getContext(`2d`);if(!r)return;let i=t.getBoundingClientRect(),a=n.getBoundingClientRect();if(!i.width||!i.height)return;let o=e.width/i.width,s=e.height/i.height,c=(a.left-i.left+t.scrollLeft)*o,l=(a.top-i.top+t.scrollTop)*s,u=a.width*o,d=a.height*s,f=Math.min(6*o,u/2,d/2);r.strokeStyle=`rgba(94, 106, 210, 0.35)`,r.lineWidth=8*o,r.beginPath(),r.roundRect(c,l,u,d,f),r.stroke(),r.strokeStyle=`#5e6ad2`,r.lineWidth=3*o,r.beginPath(),r.roundRect(c,l,u,d,f),r.stroke()}function ZA(e){let t=e.toDataURL(`image/png`);return t.length<=25e5?t:e.toDataURL(`image/jpeg`,.85)}function QA(e){let[t,n]=e.split(`,`),r=t.match(/data:([^;]+)/)?.[1]??`image/png`,i=atob(n),a=new Uint8Array(i.length);for(let e=0;e<i.length;e++)a[e]=i.charCodeAt(e);return new Blob([a],{type:r})}var[$A,ej]=T(null),[tj,nj]=T(null);function rj(e,t){ej(e),nj(t??null)}function ij(){ej(null),nj(null)}var[aj,oj]=T(`capture`);function sj(e){oj(e)}var cj=N(`<span class="absolute inset-0 grid place-items-center">`),lj=N(`<button><span>`),uj=N(`<span role=status aria-label=Loading class="text-text-dim relative inline-block shrink-0">`),dj=N(`<span class="absolute top-0 left-1/2 rounded-full bg-current"style="animation:geist-spinner-fade 1.2s linear infinite;will-change:opacity">`),fj=N(`<input>`),pj=N(`<textarea>`),mj=N(`<select>`),hj=N(`<svg viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden class=shrink-0><path d="M4.5 12.5a3 3 0 0 1-.4-5.97 4 4 0 0 1 7.8-.9A3.2 3.2 0 0 1 11.5 12.5h-7Z">`),gj=N(`<svg viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden class=shrink-0><rect x=1.5 y=2.5 width=13 height=9 rx=1.5></rect><path d="M5.5 14h5M8 11.5V14">`),_j=N(`<a target=_blank rel="noopener noreferrer"><span class="min-w-0 truncate"></span><svg width=11 height=11 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden class=shrink-0><path d="M4.5 11.5 11.5 4.5M5.5 4.5h6v6">`),vj=N(`<span class="text-text-faint text-[10.5px] leading-snug">`),yj=N(`<label class="flex flex-col gap-1"><span class="text-text-dim text-[11px] font-medium">`),bj=N(`<section class="flex flex-col gap-2.5"><h2 class="text-text-dim text-[11px] font-semibold tracking-wide uppercase">`),xj=N(`<span>`),Sj=N(`<span aria-hidden class="inline-block size-2 shrink-0 rounded-full">`),Cj=N(`<div class="flex flex-col items-center gap-1.5 px-4 py-10 text-center"><p class="text-text-dim text-[12px] font-medium"></p><div class="text-text-faint text-[11.5px] leading-relaxed">`),wj=N(`<p class="bg-danger-soft text-danger rounded-md px-2.5 py-1.5 text-[11.5px] leading-snug break-words">`),Tj={primary:`bg-accent hover:bg-accent-hover text-white border-transparent disabled:bg-surface-3 disabled:text-text-faint`,ghost:`bg-surface-2 hover:bg-surface-3 text-text border-border disabled:text-text-faint disabled:hover:bg-surface-2`,danger:`bg-danger-soft hover:bg-danger/30 text-danger border-transparent`};function Ej(e){let[t,n]=He(e,[`variant`,`loading`,`children`,`class`,`disabled`,`title`]);return(()=>{var e=lj(),r=e.firstChild;return ft(e,Ve(n,{get"data-tip"(){return t.title||void 0},get"aria-label"(){return n[`aria-label`]??t.title},get disabled(){return t.disabled||t.loading},get class(){return`relative inline-flex h-7 cursor-pointer items-center justify-center gap-1.5 rounded-md border px-3 text-[12px] font-medium transition-colors disabled:cursor-not-allowed ${Tj[t.variant??`ghost`]} ${t.class??``}`}}),!1,!0),P(r,()=>t.children),P(e,j(M,{get when(){return t.loading},get children(){var e=cj();return P(e,j(Dj,{})),e}}),null),D(()=>st(r,`inline-flex items-center gap-1.5 ${t.loading?`invisible`:``}`)),e})()}function Dj(e){let t=()=>e.size??14,n=()=>Math.max(1,Math.round(t()*.09)),r=()=>Math.round(t()*.26);return(()=>{var e=uj();return P(e,j(We,{get each(){return Array.from({length:12},(e,t)=>t)},children:e=>(()=>{var i=dj();return dt(i,`transform`,`rotate(${e*30}deg)`),dt(i,`animation-delay`,`${(e-12)*.1}s`),D(e=>{var a=`${n()}px`,o=`${r()}px`,s=`-${n()/2}px`,c=`center ${t()/2}px`;return a!==e.e&&dt(i,`width`,e.e=a),o!==e.t&&dt(i,`height`,e.t=o),s!==e.a&&dt(i,`margin-left`,e.a=s),c!==e.o&&dt(i,`transform-origin`,e.o=c),e},{e:void 0,t:void 0,a:void 0,o:void 0}),i})()})),D(n=>{var r=`${t()}px`,i=`${t()}px`;return r!==n.e&&dt(e,`width`,n.e=r),i!==n.t&&dt(e,`height`,n.t=i),n},{e:void 0,t:void 0}),e})()}function Oj(e){let[t,n]=He(e,[`class`]);return(()=>{var e=fj();return ft(e,Ve(n,{get class(){return`bg-surface-2 border-border focus:border-accent placeholder:text-text-faint h-7 w-full rounded-md border px-2 text-[12px] outline-none transition-colors ${t.class??``}`}}),!1,!1),e})()}function kj(e){let[t,n]=He(e,[`class`]);return(()=>{var e=pj();return ft(e,Ve(n,{get class(){return`bg-surface-2 border-border focus:border-accent placeholder:text-text-faint w-full resize-y rounded-md border px-2 py-1.5 text-[12px] leading-relaxed outline-none transition-colors ${t.class??``}`}}),!1,!1),e})()}function Aj(e){let[t,n]=He(e,[`class`,`children`]);return(()=>{var e=mj();return ft(e,Ve(n,{get class(){return`bg-surface-2 border-border focus:border-accent h-7 w-full cursor-pointer rounded-md border px-1.5 text-[12px] outline-none ${t.class??``}`}}),!1,!0),P(e,()=>t.children),e})()}function jj(e){let t=e.size??11;return(()=>{var e=hj();return it(e,`width`,t),it(e,`height`,t),e})()}function Mj(e){let t=e.size??11;return(()=>{var e=gj();return it(e,`width`,t),it(e,`height`,t),e})()}function Nj(e){return(()=>{var t=_j(),n=t.firstChild;return P(n,()=>e.children),D(n=>{var r=e.href,i=e.title||void 0,a=`text-accent inline-flex min-w-0 items-center gap-1 text-[11px] underline-offset-2 hover:underline ${e.class??``}`;return r!==n.e&&it(t,`href`,n.e=r),i!==n.t&&it(t,`data-tip`,n.t=i),a!==n.a&&st(t,n.a=a),n},{e:void 0,t:void 0,a:void 0}),t})()}function Pj(e){return(()=>{var t=yj(),n=t.firstChild;return P(n,()=>e.label),P(t,()=>e.children,null),P(t,j(M,{get when(){return e.hint},get children(){var t=vj();return P(t,()=>e.hint),t}}),null),t})()}function Fj(e){return(()=>{var t=bj(),n=t.firstChild;return P(n,()=>e.title),P(t,()=>e.children,null),t})()}function Ij(e){return(()=>{var t=xj();return P(t,()=>e.children),D(n=>{var r=`bg-surface-3 text-text-dim inline-flex h-[18px] items-center gap-1 rounded-full px-2 text-[10.5px] font-medium whitespace-nowrap ${e.class??``}`,i=e.color?{color:e.color}:void 0,a=e.title||void 0;return r!==n.e&&st(t,n.e=r),n.t=ut(t,i,n.t),a!==n.a&&it(t,`data-tip`,n.a=a),n},{e:void 0,t:void 0,a:void 0}),t})()}function Lj(e){return(()=>{var t=Sj();return D(n=>dt(t,`background`,e.color)),t})()}function Rj(e){return(()=>{var t=Cj(),n=t.firstChild,r=n.nextSibling;return P(n,()=>e.title),P(r,()=>e.children),t})()}function zj(e){return(()=>{var t=wj();return P(t,()=>e.message),t})()}var Bj={0:`No priority`,1:`Urgent`,2:`High`,3:`Medium`,4:`Low`};function Vj(e){let t=typeof e==`number`?e:Date.parse(e),n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return`just now`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}Br(),Fx(),gD();var Hj=N(`<span class="truncate font-mono">`),Uj=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden><path d="M5.5 3.5 6.6 2h2.8l1.1 1.5H13A1.5 1.5 0 0 1 14.5 5v7A1.5 1.5 0 0 1 13 13.5H3A1.5 1.5 0 0 1 1.5 12V5A1.5 1.5 0 0 1 3 3.5h2.5Z"></path><circle cx=8 cy=8.2 r=2.4>`),Wj=N(`<div class="flex flex-wrap gap-1.5"><span class="text-text-faint self-end text-[10.5px]">attached on create`),Gj=N(`<div class="flex items-center justify-between gap-1.5"><span class="text-text-faint text-[11px]">Model:</span><div class="flex rounded-md border border-border overflow-hidden">`),Kj=N(`<span class="inline-block min-w-[12ch] text-center">`),qj=N(`<div class="flex justify-end">`),Jj=N(`<div class="flex flex-col gap-1.5">`),Yj=N(`<p class="text-text-faint text-[11px] leading-snug">Primary provider failed — drafted with <span class=text-text-dim></span> (<!>).`),Xj=N(`<div class="border-warn/40 bg-surface rounded-md border px-2.5 py-2"><p class="text-warn mb-1 text-[10.5px] font-semibold tracking-wide uppercase">Possibly related — check before creating`),Zj=N(`<div class="flex flex-col gap-1">`),Qj=N(`<option value>Select a team…`),$j=N(`<option value=cursor> — cloud agent`),eM=N(`<option value=local>Local Claude Code (bridge)`),tM=N(`<option value=none>No one — just create the issue`),nM=N(`<option value>Claude Code default`),rM=N(`<option value=fable>Fable 5`),iM=N(`<option value=opus>Opus`),aM=N(`<option value=sonnet>Sonnet`),oM=N(`<option value=haiku>Haiku`),sM=N(`<label class="flex cursor-pointer items-center gap-2 select-none"><input type=checkbox class="accent-accent rounded"><span class="text-text text-[12px]">Isolated worktree <span class=text-text-dim>— own branch, run agents in parallel safely`),cM=N(`<label class="flex items-center gap-2 cursor-pointer select-none"><input type=checkbox class="rounded accent-accent"><span class="text-[12px] text-text">Attach console errors <span class="text-text-dim tabular-nums">(<!> captured)`),lM=N(`<label class="flex items-center gap-2 cursor-pointer select-none"><input type=checkbox class="rounded accent-accent"><span class="text-[12px] text-text">Attach dev server logs <span class="text-text-dim tabular-nums">(last <!> lines)`),uM=N(`<p class="text-warn text-[11px] leading-snug">`),dM=N(`<div class="flex h-full flex-col gap-4 overflow-y-auto pt-3 pb-4 pl-3 pr-4"><div class="bg-surface border-border flex items-center gap-2 rounded-lg border px-2.5 py-2"><div class="flex min-w-0 flex-1 flex-col gap-1"><span class="text-text-dim text-[11px] font-medium">Attached context</span><div class="flex min-w-0 flex-wrap items-center gap-1.5"></div></div></div><div class="bg-bg border-border sticky bottom-0 z-10 -mb-4 flex flex-col gap-2 border-t pt-2.5 pb-3">`),fM=N(`<div class="border-border relative overflow-hidden rounded-md border"><img alt="Pasted attachment"class="block h-16 w-16 object-cover"><button class="bg-bg/80 text-text-dim hover:text-danger absolute top-0.5 right-0.5 grid size-4 cursor-pointer place-items-center rounded text-[10px] leading-none"title=Remove aria-label="Remove pasted image">×`),pM=N(`<button>`),mM=N(`<div class="flex min-w-0 items-center gap-1.5 py-0.5"><span class="font-mono text-text-dim shrink-0 text-[10.5px]"></span><a target=_blank rel=noreferrer class="text-accent min-w-0 truncate text-[11px] hover:underline">`),hM=N(`<div class="flex items-center gap-1"><span class="text-text-faint text-[11px] tabular-nums w-4 shrink-0 text-right">.</span><button class="text-text-faint hover:text-danger shrink-0 w-5 h-5 flex items-center justify-center rounded transition-colors cursor-pointer text-[12px] leading-none"aria-label="Remove step">×`),gM=N(`<option>`),_M=N(`<option>Loading teams…`),vM=N(`<div class="bg-surface border-border rounded-lg border p-2.5 flex items-center justify-between gap-2"><a target=_blank rel="noopener noreferrer"class="text-accent font-mono text-[12px] hover:underline">`);function yM(e){sr();let t=_r(()=>({queryKey:[`grab`],queryFn:Dr})),n=_r(()=>({queryKey:[`settings`],queryFn:Tr})),r=k(()=>n.data??{}),i=k(()=>t.data?.[0]??null),a=k(()=>!!(r().linearApiKey||r().linearAccessToken)),o=k(()=>Ax(r())),[s,c]=br(`draft:title`,``),[l,u]=br(`draft:description`,``),[d,f]=br(`draft:steps`,[]),[p,m]=br(`draft:expected`,``),[h,g]=br(`draft:actual`,``),[_,v]=br(`draft:impact`,``),[y,b]=br(`draft:analysis`,``),[x,S]=br(`draft:next-steps`,``),[C,w]=br(`draft:priority`,0),[E,ee]=T(r().defaultTeamId??``),[te,A]=T(r().defaultRepo??``),[ne,re]=br(`draft:target`,`none`),[ie,oe]=br(`draft:local-model`,``),[se,ce]=br(`draft:cloud-model`,``),[le,ue]=br(`draft:worktree`,!1),[de,fe]=T(!0),[pe,me]=T(ck().length);O(()=>{let e=setInterval(()=>me(ck().length),3e3);ae(()=>clearInterval(e))});let[he,ge]=T(``);O(()=>{let e=s().trim(),t=setTimeout(()=>ge(e.length>=8?e:``),600);ae(()=>clearTimeout(t))});let _e=_r(()=>({queryKey:[`dup-search`,he()],queryFn:()=>_O(he()),enabled:!!he()&&a(),staleTime:3e4})),[ve,ye]=br(`draft:note`,``),[be,xe]=T([]),Se=e=>{for(let t of Array.from(e.clipboardData?.items??[])){if(!t.type.startsWith(`image/`))continue;let e=t.getAsFile();if(!e||e.size>8e6)continue;let n=new FileReader;n.onload=()=>xe(e=>[...e,{id:Date.now()+Math.random(),dataUrl:n.result}].slice(-6)),n.readAsDataURL(e)}},[Ce,we]=T(`fast`),[Te,Ee]=T(!0),De=!1;O(()=>{let e=n.data;De||!e||(De=!0,ee(e.defaultTeamId??``),A(e.defaultRepo??``),re(e.cursorAgentId?`cursor`:`none`))});let Oe=_r(()=>({queryKey:[`teams`],queryFn:uO,enabled:a()})),ke=k(()=>(Oe.data??[]).find(e=>e.id===E())?.name),[Ae,je]=T(!1),[Me,Ne]=T(null),[Pe,Fe]=T(null),Ie=null,Le=()=>{Ie?.(),Ie=null};ae(Le);let Re=e=>{e.title!==void 0&&c(e.title),e.description!==void 0&&u(e.description),e.reproSteps!==void 0&&f(e.reproSteps),e.expected!==void 0&&m(e.expected),e.actual!==void 0&&g(e.actual),e.impact!==void 0&&v(e.impact),e.analysisNotes!==void 0&&b(e.analysisNotes),e.suggestedNextSteps!==void 0&&S(e.suggestedNextSteps),e.priority!==void 0&&w(e.priority)},ze=async()=>{if(!o())return;je(!0),Ne(null),Fe(null),Le();let e=r().logUrl&&Te()?await tk({logUrl:r().logUrl,logLines:40}).catch(()=>void 0):void 0,n=de()?lk(15):null,a=[e?`--- dev server ---\n${e}`:null,n?`--- browser console ---\n${n}`:null].filter(Boolean).join(`
|
|
228
228
|
|
|
229
|
-
`)||void 0;Ie=SD({note:be().length?`${ve()}\n\n(${be().length} pasted screenshot(s) will be attached to the issue.)`:ve(),grabbed:i()??null,grabbedList:t.data??void 0,teamName:ke(),tier:Ce(),template:lD(r()),logs:a},{onPartial:Re,onDone:e=>{Re(e.draft),e.fellBack&&Fe({provider:e.provider,modelId:e.modelId}),je(!1),Ie=null},onError:(e,t)=>{Ne(t===`no-provider`?`No AI provider configured — add an OpenAI or Anthropic key in Settings.`:e),je(!1),Ie=null}})},[Be,Ve]=T(HD());ae(UD(Ve));let He=async()=>{let e=HD().result;if(!e)throw Error(`No recording available.`);if(e.assetUrl)return e.assetUrl;let t=await DO(e.blob,`recording-${Date.now()}.gif`);return rO(t),t},[Ue,Ke]=T(null),[qe,Je]=T(null),[Ye,Xe]=T(null),Ze=vr(()=>({mutationFn:async()=>{let e=pD({description:l(),reproSteps:d(),expected:p(),actual:h(),impact:_(),analysisNotes:y(),suggestedNextSteps:x(),grabs:t.data??[],repo:te(),model:se().trim()||r().cursorModel,agentInstructions:lD(r())});Je(null);let n=[],i=HD();if(i.result&&i.attachOnCreate)try{let t=await He();e+=`\n\n### Recording\n`}catch{n.push(`recording`)}let a=(t.data??[]).filter(e=>e.screenshotDataUrl).slice(0,3);for(let[t,r]of a.entries())try{let n=await DO(
|
|
229
|
+
`)||void 0;Ie=SD({note:be().length?`${ve()}\n\n(${be().length} pasted screenshot(s) will be attached to the issue.)`:ve(),grabbed:i()??null,grabbedList:t.data??void 0,teamName:ke(),tier:Ce(),template:lD(r()),logs:a},{onPartial:Re,onDone:e=>{Re(e.draft),e.fellBack&&Fe({provider:e.provider,modelId:e.modelId}),je(!1),Ie=null},onError:(e,t)=>{Ne(t===`no-provider`?`No AI provider configured — add an OpenAI or Anthropic key in Settings.`:e),je(!1),Ie=null}})},[Be,Ve]=T(HD());ae(UD(Ve));let He=async()=>{let e=HD().result;if(!e)throw Error(`No recording available.`);if(e.assetUrl)return e.assetUrl;let t=await DO(e.blob,`recording-${Date.now()}.gif`);return rO(t),t},[Ue,Ke]=T(null),[qe,Je]=T(null),[Ye,Xe]=T(null),Ze=vr(()=>({mutationFn:async()=>{let e=pD({description:l(),reproSteps:d(),expected:p(),actual:h(),impact:_(),analysisNotes:y(),suggestedNextSteps:x(),grabs:t.data??[],repo:te(),model:se().trim()||r().cursorModel,agentInstructions:lD(r())});Je(null);let n=[],i=HD();if(i.result&&i.attachOnCreate)try{let t=await He();e+=`\n\n### Recording\n`}catch{n.push(`recording`)}let a=(t.data??[]).filter(e=>e.screenshotDataUrl).slice(0,3);for(let[t,r]of a.entries())try{let n=await DO(QA(r.screenshotDataUrl),`element-${Date.now()}-${t}.png`),i=r.componentName?`<${r.componentName}>`:r.tagName??`element`;e+=`\n\n### Element location${a.length>1?` — ${i}`:``}\n`}catch{n.push(`screenshot${a.length>1?` ${t+1}`:``}`)}let o=be();for(let[t,r]of o.entries())try{let n=await DO(QA(r.dataUrl),`pasted-${Date.now()}-${t}.png`);e+=`${t===0?`
|
|
230
230
|
|
|
231
|
-
### Attachments`:``}\n`}catch{n.push(`pasted image ${t+1}`)}if(de()){let t=
|
|
232
|
-
`);await FO(`${c.identifier} — ${s()}`,le()?`${t}\n\nNote: you are running in an ISOLATED git worktree on a dedicated branch (already checked out) — commit and push THAT branch for the PR; do not switch back to main.`:t,{model:ie()||void 0,permissionMode:`bypassPermissions`,worktree:le(),env:r().linearApiKey?{LINEAR_API_KEY:r().linearApiKey}:void 0}),u=!0;try{let e=(await vO(E())).filter(e=>e.type===`started`).sort((e,t)=>e.position-t.position)[0];e&&await yO(c.id,e.id)}catch{}await CO(c.id,`🖥️ Delegated to **local Claude Code** on this machine (Linear Grab bridge). Live status, conversation, and steering in the panel's Local tab. The agent will post its fix summary + PR here and move this issue to review when done.`).catch(()=>{})}catch{Je("Issue created, but the local bridge is unreachable — run `npx linear-grab-bridge` in the repo and re-delegate from the Local tab.")}let f=await XO(r(),{identifier:c.identifier,title:s(),url:c.url,summary:l(),impact:_(),repo:te()||r().defaultRepo,demoUrl:HD().result?.assetUrl,executor:ne()});return f.length&&Je(`${f.join(` + `)} announcement failed — check the token/channel in Settings.`),{...c,localTask:u}},onSuccess:e=>{Xe({identifier:e.identifier,url:e.url}),Ke(null),Fe(null),xe([]),ye(``),c(``),u(``),f([]),m(``),g(``),v(``),b(``),S(``),w(0),tO(),e.localTask&&nj(`local`)},onError:e=>{Ke(e.message)}})),Qe=k(()=>!!s().trim()&&!!E()&&a()),et=k(()=>{let e=o();return e?Nx[e][Ce()]:null}),tt=()=>f(e=>[...e,``]),nt=e=>f(t=>t.filter((t,n)=>n!==e)),N=(e,t)=>f(n=>n.map((n,r)=>r===e?t:n));return(()=>{var n=uM(),f=n.firstChild,T=f.firstChild.firstChild.nextSibling,O=f.nextSibling;return P(T,j(M,{get when(){return i()},get fallback(){return j(Fj,{class:`text-text-faint`,children:`No element`})},get children(){return j(Fj,{class:`text-accent max-w-full`,get children(){var e=Vj();return P(e,(()=>{var e=$e(()=>!!i().componentName);return()=>e()?`<${i().componentName}>`:i().source?.filePath?.split(`/`).pop()??`element`})()),e}})}}),null),P(T,j(M,{get when(){return i()?.screenshotDataUrl},get children(){return j(Fj,{class:`text-success`,children:`screenshot ✓`})}}),null),P(T,j(M,{get when(){return Be().result},get children(){return j(Fj,{get class(){return Be().attachOnCreate?`text-success`:`text-text-faint`},get children(){return[`gif `,$e(()=>(Be().result.durationMs/1e3).toFixed(0)),`s`,$e(()=>Be().attachOnCreate?` ✓`:` (off)`)]}})}}),null),P(T,j(M,{get when(){return(t.data?.length??0)>1},get children(){return j(Fj,{get children(){return[`+`,$e(()=>t.data.length-1),` more`]}})}}),null),P(T,j(M,{get when(){return Be().phase===`recording`},get children(){return j(Fj,{class:`text-danger`,children:`● recording…`})}}),null),P(f,j(Tj,{variant:`ghost`,class:`size-7 shrink-0 px-0`,title:`Manage in the Capture tab — elements, screenshots, recording`,"aria-label":`Open Capture tab`,onClick:()=>nj(`capture`),get children(){return Hj()}}),null),P(n,j(Pj,{title:`AI draft`,get children(){return[j(Nj,{label:`Your note`,get children(){return j(Oj,{rows:3,placeholder:`Describe the problem or change in your own words… (paste screenshots here too)`,get value(){return ve()},onInput:e=>ye(e.currentTarget.value),onPaste:Se})}}),j(M,{get when(){return be().length>0},get children(){var e=Uj(),t=e.firstChild;return P(e,j(We,{get each(){return be()},children:e=>(()=>{var t=dM(),n=t.firstChild,r=n.nextSibling;return r.$$click=()=>xe(t=>t.filter(t=>t.id!==e.id)),D(()=>it(n,`src`,e.dataUrl)),t})()}),t),e}}),(()=>{var e=Wj(),t=e.firstChild.nextSibling;return P(t,()=>[`fast`,`best`].map(e=>(()=>{var t=fM();return t.$$click=()=>we(e),P(t,e===`fast`?`Fast`:`Best`),D(()=>st(t,`h-6 px-2.5 text-[11px] font-medium transition-colors cursor-pointer ${Ce()===e?`bg-accent text-white`:`bg-surface-2 text-text-dim hover:text-text`}`)),t})())),e})(),(()=>{var e=qj();return P(e,j(M,{get when(){return o()},get fallback(){return j(Tj,{variant:`ghost`,class:`w-full opacity-60 cursor-default`,disabled:!1,children:`Add an AI key in Settings`})},get children(){return j(Tj,{variant:`primary`,class:`w-full`,get loading(){return Ae()},onClick:ze,get disabled(){return Ae()},children:`Draft with AI`})}}),null),P(e,j(M,{get when(){return et()},get children(){var e=Kj();return P(e,j(Fj,{get children(){var e=Gj();return P(e,et),e}})),e}}),null),e})(),j(M,{get when(){return Pe()},get children(){var e=Jj(),t=e.firstChild.nextSibling,n=t.nextSibling.nextSibling;return n.nextSibling,P(t,()=>Pe().provider),P(e,()=>Pe().modelId,n),e}}),j(M,{get when(){return Me()},get children(){return j(Rj,{get message(){return Me()}})}})]}}),O),P(n,j(Pj,{title:`Issue`,get children(){return[j(Nj,{label:`Title`,get children(){return j(Dj,{class:`h-8 text-[13px] font-medium`,get value(){return s()},onInput:e=>c(e.currentTarget.value),placeholder:`Brief summary of the issue`})}}),j(M,{get when(){return(_e.data??[]).length>0},get children(){var e=Yj();return e.firstChild,P(e,j(We,{get each(){return _e.data.slice(0,3)},children:e=>(()=>{var t=pM(),n=t.firstChild,r=n.nextSibling;return P(n,()=>e.identifier),P(r,()=>e.title),P(t,j(Fj,{class:`ml-auto shrink-0`,get children(){return e.state.name}}),null),D(t=>{var n=e.url,i=e.title;return n!==t.e&&it(r,`href`,t.e=n),i!==t.t&&it(r,`title`,t.t=i),t},{e:void 0,t:void 0}),t})()}),null),e}}),j(Nj,{label:`Description`,get children(){return j(Oj,{rows:6,get value(){return l()},onInput:e=>u(e.currentTarget.value),placeholder:`Markdown supported`})}}),j(Nj,{label:`Reproduction steps`,get children(){var e=Xj();return P(e,j(Ge,{get each(){return d()},children:(e,t)=>(()=>{var n=mM(),r=n.firstChild,i=r.firstChild,a=r.nextSibling;return P(r,t+1,i),P(n,j(Dj,{class:`flex-1`,get value(){return e()},onInput:e=>N(t,e.currentTarget.value),placeholder:`Step ${t+1}`}),a),a.$$click=()=>nt(t),n})()}),null),P(e,j(Tj,{variant:`ghost`,class:`self-start h-6 px-2 text-[11px]`,onClick:tt,children:`+ Add step`}),null),e}}),j(Nj,{label:`Expected`,get children(){return j(Oj,{rows:2,get value(){return p()},onInput:e=>m(e.currentTarget.value),placeholder:`What should happen`})}}),j(Nj,{label:`Actual`,get children(){return j(Oj,{rows:2,get value(){return h()},onInput:e=>g(e.currentTarget.value),placeholder:`What actually happens`})}}),j(Nj,{label:`Impact`,get children(){return j(Oj,{rows:2,get value(){return _()},onInput:e=>v(e.currentTarget.value),placeholder:`Who/what is affected and how badly`})}}),j(Nj,{label:`Analysis / Notes`,get children(){return j(Oj,{rows:3,get value(){return y()},onInput:e=>b(e.currentTarget.value),placeholder:`- Likely root cause…`})}}),j(Nj,{label:`Suggested next steps`,get children(){return j(Oj,{rows:3,get value(){return x()},onInput:e=>S(e.currentTarget.value),placeholder:`- Concrete fix suggestion…`})}}),j(Nj,{label:`Priority`,get children(){return j(kj,{get value(){return C()},onChange:e=>w(Number(e.currentTarget.value)),get children(){return j(We,{get each(){return Object.entries(zj)},children:([e,t])=>(()=>{var n=hM();return n.value=e,P(n,t),n})()})}})}}),j(M,{get when(){return a()},get fallback(){return j(Rj,{message:`Connect Linear in Settings to create issues.`})},get children(){return j(Nj,{label:`Team`,get children(){return j(M,{get when(){return!Oe.isLoading},get fallback(){return j(kj,{disabled:!0,get children(){return gM()}})},get children(){return j(kj,{get value(){return E()},onChange:e=>ee(e.currentTarget.value),get children(){return[Zj(),j(We,{get each(){return Oe.data??[]},children:e=>(()=>{var t=hM();return P(t,()=>e.name),D(()=>t.selected=e.id===E()),D(()=>t.value=e.id),t})()})]}})}})}})}}),j(Nj,{label:`Repo`,hint:`Appended as [repo=…] so Cursor works in the right repository.`,get children(){return j(Dj,{get value(){return te()},onInput:e=>A(e.currentTarget.value),placeholder:`owner/repository`})}}),j(Nj,{label:`Delegate to`,get hint(){return $e(()=>ne()===`local`)()?"Requires `npx linear-grab-bridge` running in the repo — track it in the Local tab.":ne()===`cursor`&&!r().cursorAgentId?`Pick the Cursor agent in Settings first.`:void 0},get children(){return j(kj,{get value(){return ne()},onChange:e=>re(e.currentTarget.value),get children(){return[(()=>{var e=Qj(),t=e.firstChild;return P(e,()=>r().cursorAgentName??`Cursor`,t),D(t=>{var n=!r().cursorAgentId,i=ne()===`cursor`;return n!==t.e&&(e.disabled=t.e=n),i!==t.t&&(e.selected=t.t=i),t},{e:void 0,t:void 0}),e})(),(()=>{var e=$j();return D(()=>e.selected=ne()===`local`),e})(),(()=>{var e=eM();return D(()=>e.selected=ne()===`none`),e})()]}})}}),j(M,{get when(){return ne()===`cursor`},get children(){return j(Nj,{label:`Cloud model`,get hint(){return`Sent as [model=…]. Empty = ${r().cursorModel?`your default (${r().cursorModel})`:`Cursor's default`}.`},get children(){return j(Dj,{get placeholder(){return r().cursorModel||`Cursor's default — e.g. claude-opus-4-8, composer`},get value(){return se()},onInput:e=>ce(e.currentTarget.value)})}})}}),j(M,{get when(){return ne()===`local`},get children(){return[j(Nj,{label:`Local model`,hint:`Switchable while running from the Local tab.`,get children(){return j(kj,{get value(){return ie()},onChange:e=>oe(e.currentTarget.value),get children(){return[(()=>{var e=tM();return D(()=>e.selected=ie()===``),e})(),(()=>{var e=nM();return D(()=>e.selected=ie()===`fable`),e})(),(()=>{var e=rM();return D(()=>e.selected=ie()===`opus`),e})(),(()=>{var e=iM();return D(()=>e.selected=ie()===`sonnet`),e})(),(()=>{var e=aM();return D(()=>e.selected=ie()===`haiku`),e})()]}})}}),(()=>{var e=oM(),t=e.firstChild;return t.addEventListener(`change`,e=>ue(e.currentTarget.checked)),D(()=>t.checked=le()),e})()]}}),j(M,{get when(){return pe()>0},get children(){var e=sM(),t=e.firstChild,n=t.nextSibling.firstChild.nextSibling,r=n.firstChild.nextSibling;return r.nextSibling,t.addEventListener(`change`,e=>fe(e.currentTarget.checked)),P(n,pe,r),D(()=>t.checked=de()),e}}),j(M,{get when(){return r().logUrl},get children(){var e=cM(),t=e.firstChild,n=t.nextSibling.firstChild.nextSibling,i=n.firstChild.nextSibling;return i.nextSibling,t.addEventListener(`change`,e=>Ee(e.currentTarget.checked)),P(n,()=>Math.min(500,Math.max(10,r().logLines??100)),i),D(()=>t.checked=Te()),e}})]}}),O),P(O,j(M,{get when(){return Ue()},get children(){return j(Rj,{get message(){return Ue()}})}}),null),P(O,j(M,{get when(){return qe()},get children(){var e=lM();return P(e,qe),e}}),null),P(O,j(M,{get when(){return Ye()},children:t=>(()=>{var n=_M(),r=n.firstChild;return P(r,()=>t().identifier),P(n,j(Tj,{variant:`ghost`,class:`h-6 px-2 text-[11px]`,onClick:()=>{Xe(null),Fe(null),e.onCreated()},children:`View activity`}),null),D(()=>it(r,`href`,t().url)),n})()}),null),P(O,j(Tj,{variant:`primary`,get loading(){return Ze.isPending},get disabled(){return!Qe()},onClick:()=>Ze.mutate(),children:`Create issue`}),null),n})()}rt([`click`]);function yM(e,t,n=!1){if(!e)return null;let r=t(e);if(r instanceof Promise)return(async()=>{if(await r===!0)return e;let i=n?e.return:e.child;for(;i;){let e=await nP(i,t,n);if(e)return e;i=n?null:i.sibling}return null})();if(r===!0)return e;let i=n?e.return:e.child;for(;i;){let e=tP(i,t,n);if(e)return e;i=n?null:i.sibling}return null}function bM(e,t){let n=0,r=0,i=0;do i=EP[e.next()],n|=(i&31)<<r,r+=5;while(i&32);let a=n&1;return n>>>=1,a&&(n=-2147483648|-n),t+n}function xM(e,t){return e.pos>=t?!1:e.peek()!==CP}function SM(e){let{length:t}=e,n=new DP(e),r=[],i=0,a=0,o=0,s=0,c=0;do{let e=n.indexOf(`;`),t=[],l=!0,u=0;for(i=0;n.pos<e;){let r;i=bM(n,i),i<u&&(l=!1),u=i,xM(n,e)?(a=bM(n,a),o=bM(n,o),s=bM(n,s),xM(n,e)?(c=bM(n,c),r=[i,a,o,s,c]):r=[i,a,o,s]):r=[i],t.push(r),n.pos++}l||CM(t),r.push(t),n.pos=e+1}while(n.pos<=t);return r}function CM(e){e.sort(wM)}function wM(e,t){return e[0]-t[0]}var TM,EM,DM,OM,kM,AM,jM,MM,NM,PM,FM,IM,LM,RM,zM,BM,VM,HM,UM,WM,GM,KM,qM,JM,YM,XM,ZM,QM,$M,eN,tN,nN,rN,iN,aN,oN,sN,cN,lN,uN,dN,fN,pN,mN,hN,gN,_N,vN,yN,bN,xN,SN,CN,wN,TN,EN,DN,ON,kN,AN,jN,MN,NN,PN,FN,IN,LN,RN,zN,BN,VN,HN,UN,WN,GN,KN,qN,JN,YN,XN,ZN,QN,$N,eP,tP,nP,rP,iP,aP,oP,sP,cP,lP,uP,dP,fP,pP,mP,hP,gP,_P,vP,yP,bP,xP,SP,CP,wP,TP,EP,DP,OP,kP,AP,jP,MP,NP,PP,FP,IP,LP,RP,zP,BP,VP,HP,UP,WP,GP,KP,qP,JP,YP,XP,ZP,QP,$P,eF,tF,nF,rF,iF,aF,oF,sF,cF,lF,uF,dF,fF,pF,mF,hF,gF,_F,vF,yF,bF,xF,SF,CF,wF,TF,EF,DF,OF,kF,AF,jF,MF,NF,PF,FF,IF,LF,RF,zF,BF,VF,HF,UF,WF,GF,KF,qF,JF,YF,XF,ZF,QF,$F,eI,tI,nI,rI,iI,aI,oI,sI,cI,lI,uI,dI,fI,pI,mI,hI,gI,_I,vI,yI,bI,xI,SI,CI,wI,TI,EI,DI,OI,kI,AI,jI,MI,NI,PI,FI,II,LI,RI,zI,BI,VI,HI,UI,WI,GI,KI,qI,JI,YI,XI,ZI,QI,$I,eL,tL,nL,rL,iL,aL,oL,sL,cL,lL,uL,dL,fL,pL,mL,hL,gL,_L,vL,yL,bL,xL,SL,CL,wL,TL,EL,DL,OL,kL,AL,jL,ML,NL,PL,FL,IL,LL,RL,zL,BL,VL,HL,UL,WL,GL,KL,qL,JL,YL,XL,ZL,QL,$L,eR,tR,nR,rR,iR,aR,oR,sR=t((()=>{TM=null,EM=()=>{if(TM!==null)return TM;try{TM=window.matchMedia(`(color-gamut: p3)`).matches}catch{TM=!1}return TM},DM=EM(),OM=e=>DM?`color(display-p3 0.84 0.19 0.78 / ${e})`:`rgba(210, 57, 192, ${e})`,kM=null,AM=e=>{kM=e},jM=()=>kM,MM=e=>!kM||e!==null&&kM.contains(e),NM=e=>e,PM=`data-react-grab`,FM=`0.1.48`,IM=`var(--rg-shadow)`,LM=-1e3,RM=.95,zM=1500,BM=[`/components/ui/`,`/packages/ui/`,`/design-system/`,`/design-systems/`,`/primitives/`],VM=5e3,HM=8e3,UM=1e4,WM=2147483647,GM=2147483645,KM=.7,qM=1e3/60,JM=.01,YM=OM(.4),XM=OM(.05),ZM=OM(.5),QM=OM(.08),$M=OM(.15),eN=.2,tN=[`id`,`class`,`aria-label`,`data-testid`,`role`,`name`,`title`],nN=new Set([`id`,`data-testid`,`aria-label`,`href`,`src`,`alt`,`type`,`name`,`placeholder`,`role`,`for`,`action`,`method`,`title`,`disabled`,`checked`,`readonly`,`required`,`selected`,`open`]),rN=new Set([`a`,`code`,`pre`]),iN=new Set([`script`,`style`,`template`,`noscript`]),aN=[`Meta`,`Control`,`Shift`,`Alt`],oN=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]),sN=`data-react-grab-frozen`,cN=.5,lN=`data-react-grab-input`,uN=.5,dN=`copy`,fN=`comment`,pN=`edit`,mN=`superellipse(1.25)`,hN=.01,gN=1e3,_N={left:-9999,top:-9999},vN={left:`left center`,right:`right center`,top:`center top`,bottom:`center bottom`},yN=1e3,bN=`#00000000`,xN=`transparent`,SN=2e3,CN=`cubic-bezier(0.34, 1.56, 0.64, 1)`,wN=12e3,TN=9e3,EN=1e4,DN=8e3,ON=5e3,kN=1e3,AN=1.2,jN=-9999,new Set(`display.position.top.right.bottom.left.z-index.overflow.overflow-x.overflow-y.width.height.min-width.min-height.max-width.max-height.margin-top.margin-right.margin-bottom.margin-left.padding-top.padding-right.padding-bottom.padding-left.flex-direction.flex-wrap.justify-content.align-items.align-self.align-content.flex-grow.flex-shrink.flex-basis.order.gap.row-gap.column-gap.grid-template-columns.grid-template-rows.grid-template-areas.font-family.font-size.font-weight.font-style.line-height.letter-spacing.text-align.text-decoration-line.text-decoration-style.text-transform.text-overflow.text-shadow.white-space.word-break.overflow-wrap.vertical-align.color.background-color.background-image.background-position.background-size.background-repeat.border-top-width.border-right-width.border-bottom-width.border-left-width.border-top-style.border-right-style.border-bottom-style.border-left-style.border-top-color.border-right-color.border-bottom-color.border-left-color.border-top-left-radius.border-top-right-radius.border-bottom-left-radius.border-bottom-right-radius.box-shadow.opacity.transform.filter.backdrop-filter.object-fit.object-position`.split(`.`)),MN=e=>(e.tagName||``).toLowerCase(),PN=()=>{if(NN!==void 0)return NN;let e=document.querySelector(`script[nonce], style[nonce]`),t=e?.nonce||e?.getAttribute(`nonce`)||null;return t&&(NN=t),t},FN=[[`data-rr-block`,``],[`data-rr-ignore`,``],[`data-rr-mask`,``],[`data-sentry-block`,``],[`data-sentry-ignore`,``],[`data-sentry-mask`,``],[`data-dd-privacy`,`hidden`],[`data-fs-exclude`,``],[`data-lr-exclude`,``],[`data-hj-suppress`,``],[`data-recording-disable`,``],[`data-clarity-mask`,`true`],[`data-heap-redact-text`,``]],IN=e=>{for(let[t,n]of FN)e.setAttribute(t,n);e.setAttribute(`data-testid`,`react-grab-overlay`),e.classList.add(`ph-no-capture`)},LN=`bippy-0.5.43`,RN=Object.defineProperty,zN=Object.prototype.hasOwnProperty,BN=()=>{},VN=e=>{try{Function.prototype.toString.call(e).indexOf(`^_^`)>-1&&setTimeout(()=>{throw Error(`React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build`)})}catch{}},HN=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>!!(e&&`getFiberRoots`in e),UN=!1,GN=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>UN?!0:(e&&typeof e.inject==`function`&&(WN=e.inject.toString()),!!WN?.includes(`(injected)`)),KN=new Set,qN=new Set,JN=e=>{let t=new Map,n=0,r={_instrumentationIsActive:!1,_instrumentationSource:LN,checkDCE:VN,hasUnsupportedRendererAttached:!1,inject(e){let i=++n;return t.set(i,e),qN.add(e),r._instrumentationIsActive||(r._instrumentationIsActive=!0,KN.forEach(e=>e())),i},on:BN,onCommitFiberRoot:BN,onCommitFiberUnmount:BN,onPostCommitFiberRoot:BN,renderers:t,supportsFiber:!0,supportsFlight:!0};try{RN(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`,{configurable:!0,enumerable:!0,get(){return r},set(t){if(t&&typeof t==`object`){let n=r.renderers;r=t,n.size>0&&(n.forEach((e,n)=>{qN.add(e),t.renderers.set(n,e)}),YN(e))}}});let t=window.hasOwnProperty,n=!1;RN(window,`hasOwnProperty`,{configurable:!0,value:function(...e){try{if(!n&&e[0]===`__REACT_DEVTOOLS_GLOBAL_HOOK__`)return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,n=!0,-0}catch{}return t.apply(this,e)},writable:!0})}catch{YN(e)}return r},YN=e=>{e&&KN.add(e);try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=VN,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=LN,t._instrumentationIsActive=!1;let e=HN(t);if(e||(t.on=BN),t.renderers.size){t._instrumentationIsActive=!0,KN.forEach(e=>e());return}let n=t.inject,r=GN(t);r&&!e&&(UN=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=e=>{let i=n(e);return qN.add(e),r&&t.renderers.set(i,e),t._instrumentationIsActive=!0,KN.forEach(e=>e()),i}}(t.renderers.size||t._instrumentationIsActive||GN())&&e?.()}catch{}},XN=()=>zN.call(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`),ZN=e=>XN()?(YN(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):JN(e),QN=()=>!!(typeof window<`u`&&(window.document?.createElement||window.navigator?.product===`ReactNative`)),$N=()=>{try{QN()&&ZN()}catch{}},eP=e=>{switch(e.tag){case 1:case 11:case 0:case 14:case 15:return!0;default:return!1}},tP=(e,t,n=!1)=>{if(!e)return null;if(t(e)===!0)return e;let r=n?e.return:e.child;for(;r;){let e=tP(r,t,n);if(e)return e;r=n?null:r.sibling}return null},nP=async(e,t,n=!1)=>{if(!e)return null;if(await t(e)===!0)return e;let r=n?e.return:e.child;for(;r;){let e=await nP(r,t,n);if(e)return e;r=n?null:r.sibling}return null},rP=e=>{let t=e;return typeof t==`function`?t:typeof t==`object`&&t?rP(t.type||t.render):null},iP=e=>{let t=e;if(typeof t==`string`)return t;if(typeof t!=`function`&&!(typeof t==`object`&&t))return null;let n=t.displayName||t.name||null;if(n)return n;let r=rP(t);return r&&(r.displayName||r.name)||null},aP=()=>{let e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return!!e?._instrumentationIsActive||HN(e)||GN(e)},oP=e=>{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t?.renderers)for(let n of t.renderers.values())try{let t=n.findFiberByHostInstance?.(e);if(t)return t}catch{}if(typeof e==`object`&&e){if(`_reactRootContainer`in e)return e._reactRootContainer?._internalRoot?.current?.child;for(let t in e)if(t.startsWith(`__reactContainer$`)||t.startsWith(`__reactInternalInstance$`)||t.startsWith(`__reactFiber`))return e[t]||null}return null},sP=new Set,cP=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,lP=[`rsc://`,`file:///`,`webpack-internal://`,`webpack://`,`node:`,`turbopack://`,`metro://`,`/app-pages-browser/`,`/(app-pages-browser)/`],uP=[`<anonymous>`,`eval`,``],dP=/\.(jsx|tsx|ts|js)$/,fP=/(\.min|bundle|chunk|vendor|vendors|runtime|polyfill|polyfills)\.(js|mjs|cjs)$|(chunk|bundle|vendor|vendors|runtime|polyfill|polyfills|framework|app|main|index)[-_.][A-Za-z0-9_-]{4,}\.(js|mjs|cjs)$|[\da-f]{8,}\.(js|mjs|cjs)$|[-_.][\da-f]{20,}\.(js|mjs|cjs)$|\/dist\/|\/build\/|\/.next\/|\/out\/|\/node_modules\/|\.webpack\.|\.vite\.|\.turbopack\./i,pP=/^\?[\w~.-]+(?:=[^&#]*)?(?:&[\w~.-]+(?:=[^&#]*)?)*$/,mP=/\(at [^)]+\)$/,hP=/(^|@)\S+:\d+/,gP=/^\s*at .*(\S+:\d+|\(native\))/m,_P=/^(eval@)?(\[native code\])?$/,vP=(e,t)=>{if(t?.includeInElement!==!1){let n=e.split(`
|
|
233
|
-
`),r=[];for(let e of n)if(/^\s*at\s+/.test(e)){let t=
|
|
234
|
-
`).filter(e=>!!e.match(
|
|
235
|
-
`).filter(e=>!e.match(
|
|
236
|
-
`),r;for(let e=n.length-1;e>=0&&!r;e--){let t=n[e].match(
|
|
231
|
+
### Attachments`:``}\n`}catch{n.push(`pasted image ${t+1}`)}if(de()){let t=lk(30);t&&(e+=`\n\n### Console errors (client)\n\`\`\`\n${t}\n\`\`\``)}if(r().logUrl&&Te())try{let t=await tk(r());if(t){let n=Math.min(500,Math.max(10,r().logLines??100));e+=`\n\n### Dev server logs (last ${n} lines)\n\`\`\`\n${t}\n\`\`\``}}catch{n.push(`server logs (fetch failed — is the Log URL serving the file?)`)}if(n.length){let e=n.some(e=>!e.startsWith(`server logs`));Je(`Skipped: ${n.join(`, `)} — issue created without ${n.length>1?`them`:`it`}.${e?" Real fix for uploads: run `npx linear-grab-bridge` in the repo (uploads relay through it) or set the GitHub fallback in Settings.":``}`)}let c=await SO({teamId:E(),title:s(),description:e,priority:C(),delegateId:ne()===`cursor`?r().cursorAgentId:void 0,projectId:r().defaultProjectId||void 0,labelIds:r().defaultLabelIds?.length?r().defaultLabelIds:void 0}),u=!1;if(ne()===`local`)try{let t=[`You are delegated Linear issue ${c.identifier} (${c.url}).`,``,e,``,`## Closeout — do ALL of this autonomously when the fix is verified (permissions are granted):`,`1. Create a branch (e.g. fix/${c.identifier.toLowerCase()}-short-slug), commit, push.`,`2. Open a PR: \`gh pr create\` — reference ${c.identifier} and ${c.url} in the body so Linear links it.`,`3. Update the Linear issue via its GraphQL API (https://api.linear.app/graphql) using the LINEAR_API_KEY env var as the Authorization header:`,` - commentCreate on issue ${c.identifier}: one-line fix summary + root cause + the PR link.`,` - Move it to review: query the team's workflowStates, then issueUpdate with the review/'In Review' stateId.`,`4. Announce the finished fix on every channel whose token appears in the instructions above (Slack chat.postMessage + files upload, Telegram sendMessage/sendVideo) — include: what was broken, the one-line fix, the Linear issue link, the PR link, and the demo recording if you made one. End with "👉 Review the PR".`].join(`
|
|
232
|
+
`);await FO(`${c.identifier} — ${s()}`,le()?`${t}\n\nNote: you are running in an ISOLATED git worktree on a dedicated branch (already checked out) — commit and push THAT branch for the PR; do not switch back to main.`:t,{model:ie()||void 0,permissionMode:`bypassPermissions`,worktree:le(),env:r().linearApiKey?{LINEAR_API_KEY:r().linearApiKey}:void 0}),u=!0;try{let e=(await vO(E())).filter(e=>e.type===`started`).sort((e,t)=>e.position-t.position)[0];e&&await yO(c.id,e.id)}catch{}await CO(c.id,`🖥️ Delegated to **local Claude Code** on this machine (Linear Grab bridge). Live status, conversation, and steering in the panel's Local tab. The agent will post its fix summary + PR here and move this issue to review when done.`).catch(()=>{})}catch{Je("Issue created, but the local bridge is unreachable — run `npx linear-grab-bridge` in the repo and re-delegate from the Local tab.")}let f=await ZO(r(),{identifier:c.identifier,title:s(),url:c.url,summary:l(),impact:_(),repo:te()||r().defaultRepo,demoUrl:HD().result?.assetUrl,executor:ne()});return f.length&&Je(`${f.join(` + `)} announcement failed — check the token/channel in Settings.`),{...c,localTask:u}},onSuccess:e=>{Xe({identifier:e.identifier,url:e.url}),Ke(null),Fe(null),xe([]),ye(``),c(``),u(``),f([]),m(``),g(``),v(``),b(``),S(``),w(0),tO(),e.localTask&&rj(`local`)},onError:e=>{Ke(e.message)}})),Qe=k(()=>!!s().trim()&&!!E()&&a()),et=k(()=>{let e=o();return e?Nx[e][Ce()]:null}),tt=()=>f(e=>[...e,``]),nt=e=>f(t=>t.filter((t,n)=>n!==e)),N=(e,t)=>f(n=>n.map((n,r)=>r===e?t:n));return(()=>{var n=dM(),f=n.firstChild,T=f.firstChild.firstChild.nextSibling,O=f.nextSibling;return P(T,j(M,{get when(){return i()},get fallback(){return j(Ij,{class:`text-text-faint`,children:`No element`})},get children(){return j(Ij,{class:`text-accent max-w-full`,get children(){var e=Hj();return P(e,(()=>{var e=$e(()=>!!i().componentName);return()=>e()?`<${i().componentName}>`:i().source?.filePath?.split(`/`).pop()??`element`})()),e}})}}),null),P(T,j(M,{get when(){return i()?.screenshotDataUrl},get children(){return j(Ij,{class:`text-success`,children:`screenshot ✓`})}}),null),P(T,j(M,{get when(){return Be().result},get children(){return j(Ij,{get class(){return Be().attachOnCreate?`text-success`:`text-text-faint`},get children(){return[`gif `,$e(()=>(Be().result.durationMs/1e3).toFixed(0)),`s`,$e(()=>Be().attachOnCreate?` ✓`:` (off)`)]}})}}),null),P(T,j(M,{get when(){return(t.data?.length??0)>1},get children(){return j(Ij,{get children(){return[`+`,$e(()=>t.data.length-1),` more`]}})}}),null),P(T,j(M,{get when(){return Be().phase===`recording`},get children(){return j(Ij,{class:`text-danger`,children:`● recording…`})}}),null),P(f,j(Ej,{variant:`ghost`,class:`size-7 shrink-0 px-0`,title:`Manage in the Capture tab — elements, screenshots, recording`,"aria-label":`Open Capture tab`,onClick:()=>rj(`capture`),get children(){return Uj()}}),null),P(n,j(Fj,{title:`AI draft`,get children(){return[j(Pj,{label:`Your note`,get children(){return j(kj,{rows:3,placeholder:`Describe the problem or change in your own words… (paste screenshots here too)`,get value(){return ve()},onInput:e=>ye(e.currentTarget.value),onPaste:Se})}}),j(M,{get when(){return be().length>0},get children(){var e=Wj(),t=e.firstChild;return P(e,j(We,{get each(){return be()},children:e=>(()=>{var t=fM(),n=t.firstChild,r=n.nextSibling;return r.$$click=()=>xe(t=>t.filter(t=>t.id!==e.id)),D(()=>it(n,`src`,e.dataUrl)),t})()}),t),e}}),(()=>{var e=Gj(),t=e.firstChild.nextSibling;return P(t,()=>[`fast`,`best`].map(e=>(()=>{var t=pM();return t.$$click=()=>we(e),P(t,e===`fast`?`Fast`:`Best`),D(()=>st(t,`h-6 px-2.5 text-[11px] font-medium transition-colors cursor-pointer ${Ce()===e?`bg-accent text-white`:`bg-surface-2 text-text-dim hover:text-text`}`)),t})())),e})(),(()=>{var e=Jj();return P(e,j(M,{get when(){return o()},get fallback(){return j(Ej,{variant:`ghost`,class:`w-full opacity-60 cursor-default`,disabled:!1,children:`Add an AI key in Settings`})},get children(){return j(Ej,{variant:`primary`,class:`w-full`,get loading(){return Ae()},onClick:ze,get disabled(){return Ae()},children:`Draft with AI`})}}),null),P(e,j(M,{get when(){return et()},get children(){var e=qj();return P(e,j(Ij,{get children(){var e=Kj();return P(e,et),e}})),e}}),null),e})(),j(M,{get when(){return Pe()},get children(){var e=Yj(),t=e.firstChild.nextSibling,n=t.nextSibling.nextSibling;return n.nextSibling,P(t,()=>Pe().provider),P(e,()=>Pe().modelId,n),e}}),j(M,{get when(){return Me()},get children(){return j(zj,{get message(){return Me()}})}})]}}),O),P(n,j(Fj,{title:`Issue`,get children(){return[j(Pj,{label:`Title`,get children(){return j(Oj,{class:`h-8 text-[13px] font-medium`,get value(){return s()},onInput:e=>c(e.currentTarget.value),placeholder:`Brief summary of the issue`})}}),j(M,{get when(){return(_e.data??[]).length>0},get children(){var e=Xj();return e.firstChild,P(e,j(We,{get each(){return _e.data.slice(0,3)},children:e=>(()=>{var t=mM(),n=t.firstChild,r=n.nextSibling;return P(n,()=>e.identifier),P(r,()=>e.title),P(t,j(Ij,{class:`ml-auto shrink-0`,get children(){return e.state.name}}),null),D(t=>{var n=e.url,i=e.title;return n!==t.e&&it(r,`href`,t.e=n),i!==t.t&&it(r,`title`,t.t=i),t},{e:void 0,t:void 0}),t})()}),null),e}}),j(Pj,{label:`Description`,get children(){return j(kj,{rows:6,get value(){return l()},onInput:e=>u(e.currentTarget.value),placeholder:`Markdown supported`})}}),j(Pj,{label:`Reproduction steps`,get children(){var e=Zj();return P(e,j(Ge,{get each(){return d()},children:(e,t)=>(()=>{var n=hM(),r=n.firstChild,i=r.firstChild,a=r.nextSibling;return P(r,t+1,i),P(n,j(Oj,{class:`flex-1`,get value(){return e()},onInput:e=>N(t,e.currentTarget.value),placeholder:`Step ${t+1}`}),a),a.$$click=()=>nt(t),n})()}),null),P(e,j(Ej,{variant:`ghost`,class:`self-start h-6 px-2 text-[11px]`,onClick:tt,children:`+ Add step`}),null),e}}),j(Pj,{label:`Expected`,get children(){return j(kj,{rows:2,get value(){return p()},onInput:e=>m(e.currentTarget.value),placeholder:`What should happen`})}}),j(Pj,{label:`Actual`,get children(){return j(kj,{rows:2,get value(){return h()},onInput:e=>g(e.currentTarget.value),placeholder:`What actually happens`})}}),j(Pj,{label:`Impact`,get children(){return j(kj,{rows:2,get value(){return _()},onInput:e=>v(e.currentTarget.value),placeholder:`Who/what is affected and how badly`})}}),j(Pj,{label:`Analysis / Notes`,get children(){return j(kj,{rows:3,get value(){return y()},onInput:e=>b(e.currentTarget.value),placeholder:`- Likely root cause…`})}}),j(Pj,{label:`Suggested next steps`,get children(){return j(kj,{rows:3,get value(){return x()},onInput:e=>S(e.currentTarget.value),placeholder:`- Concrete fix suggestion…`})}}),j(Pj,{label:`Priority`,get children(){return j(Aj,{get value(){return C()},onChange:e=>w(Number(e.currentTarget.value)),get children(){return j(We,{get each(){return Object.entries(Bj)},children:([e,t])=>(()=>{var n=gM();return n.value=e,P(n,t),n})()})}})}}),j(M,{get when(){return a()},get fallback(){return j(zj,{message:`Connect Linear in Settings to create issues.`})},get children(){return j(Pj,{label:`Team`,get children(){return j(M,{get when(){return!Oe.isLoading},get fallback(){return j(Aj,{disabled:!0,get children(){return _M()}})},get children(){return j(Aj,{get value(){return E()},onChange:e=>ee(e.currentTarget.value),get children(){return[Qj(),j(We,{get each(){return Oe.data??[]},children:e=>(()=>{var t=gM();return P(t,()=>e.name),D(()=>t.selected=e.id===E()),D(()=>t.value=e.id),t})()})]}})}})}})}}),j(Pj,{label:`Repo`,hint:`Appended as [repo=…] so Cursor works in the right repository.`,get children(){return j(Oj,{get value(){return te()},onInput:e=>A(e.currentTarget.value),placeholder:`owner/repository`})}}),j(Pj,{label:`Delegate to`,get hint(){return $e(()=>ne()===`local`)()?"Requires `npx linear-grab-bridge` running in the repo — track it in the Local tab.":ne()===`cursor`&&!r().cursorAgentId?`Pick the Cursor agent in Settings first.`:void 0},get children(){return j(Aj,{get value(){return ne()},onChange:e=>re(e.currentTarget.value),get children(){return[(()=>{var e=$j(),t=e.firstChild;return P(e,()=>r().cursorAgentName??`Cursor`,t),D(t=>{var n=!r().cursorAgentId,i=ne()===`cursor`;return n!==t.e&&(e.disabled=t.e=n),i!==t.t&&(e.selected=t.t=i),t},{e:void 0,t:void 0}),e})(),(()=>{var e=eM();return D(()=>e.selected=ne()===`local`),e})(),(()=>{var e=tM();return D(()=>e.selected=ne()===`none`),e})()]}})}}),j(M,{get when(){return ne()===`cursor`},get children(){return j(Pj,{label:`Cloud model`,get hint(){return`Sent as [model=…]. Empty = ${r().cursorModel?`your default (${r().cursorModel})`:`Cursor's default`}.`},get children(){return j(Oj,{get placeholder(){return r().cursorModel||`Cursor's default — e.g. claude-opus-4-8, composer`},get value(){return se()},onInput:e=>ce(e.currentTarget.value)})}})}}),j(M,{get when(){return ne()===`local`},get children(){return[j(Pj,{label:`Local model`,hint:`Switchable while running from the Local tab.`,get children(){return j(Aj,{get value(){return ie()},onChange:e=>oe(e.currentTarget.value),get children(){return[(()=>{var e=nM();return D(()=>e.selected=ie()===``),e})(),(()=>{var e=rM();return D(()=>e.selected=ie()===`fable`),e})(),(()=>{var e=iM();return D(()=>e.selected=ie()===`opus`),e})(),(()=>{var e=aM();return D(()=>e.selected=ie()===`sonnet`),e})(),(()=>{var e=oM();return D(()=>e.selected=ie()===`haiku`),e})()]}})}}),(()=>{var e=sM(),t=e.firstChild;return t.addEventListener(`change`,e=>ue(e.currentTarget.checked)),D(()=>t.checked=le()),e})()]}}),j(M,{get when(){return pe()>0},get children(){var e=cM(),t=e.firstChild,n=t.nextSibling.firstChild.nextSibling,r=n.firstChild.nextSibling;return r.nextSibling,t.addEventListener(`change`,e=>fe(e.currentTarget.checked)),P(n,pe,r),D(()=>t.checked=de()),e}}),j(M,{get when(){return r().logUrl},get children(){var e=lM(),t=e.firstChild,n=t.nextSibling.firstChild.nextSibling,i=n.firstChild.nextSibling;return i.nextSibling,t.addEventListener(`change`,e=>Ee(e.currentTarget.checked)),P(n,()=>Math.min(500,Math.max(10,r().logLines??100)),i),D(()=>t.checked=Te()),e}})]}}),O),P(O,j(M,{get when(){return Ue()},get children(){return j(zj,{get message(){return Ue()}})}}),null),P(O,j(M,{get when(){return qe()},get children(){var e=uM();return P(e,qe),e}}),null),P(O,j(M,{get when(){return Ye()},children:t=>(()=>{var n=vM(),r=n.firstChild;return P(r,()=>t().identifier),P(n,j(Ej,{variant:`ghost`,class:`h-6 px-2 text-[11px]`,onClick:()=>{Xe(null),Fe(null),e.onCreated()},children:`View activity`}),null),D(()=>it(r,`href`,t().url)),n})()}),null),P(O,j(Ej,{variant:`primary`,get loading(){return Ze.isPending},get disabled(){return!Qe()},onClick:()=>Ze.mutate(),children:`Create issue`}),null),n})()}rt([`click`]);function bM(e,t,n=!1){if(!e)return null;let r=t(e);if(r instanceof Promise)return(async()=>{if(await r===!0)return e;let i=n?e.return:e.child;for(;i;){let e=await rP(i,t,n);if(e)return e;i=n?null:i.sibling}return null})();if(r===!0)return e;let i=n?e.return:e.child;for(;i;){let e=nP(i,t,n);if(e)return e;i=n?null:i.sibling}return null}function xM(e,t){let n=0,r=0,i=0;do i=DP[e.next()],n|=(i&31)<<r,r+=5;while(i&32);let a=n&1;return n>>>=1,a&&(n=-2147483648|-n),t+n}function SM(e,t){return e.pos>=t?!1:e.peek()!==wP}function CM(e){let{length:t}=e,n=new OP(e),r=[],i=0,a=0,o=0,s=0,c=0;do{let e=n.indexOf(`;`),t=[],l=!0,u=0;for(i=0;n.pos<e;){let r;i=xM(n,i),i<u&&(l=!1),u=i,SM(n,e)?(a=xM(n,a),o=xM(n,o),s=xM(n,s),SM(n,e)?(c=xM(n,c),r=[i,a,o,s,c]):r=[i,a,o,s]):r=[i],t.push(r),n.pos++}l||wM(t),r.push(t),n.pos=e+1}while(n.pos<=t);return r}function wM(e){e.sort(TM)}function TM(e,t){return e[0]-t[0]}var EM,DM,OM,kM,AM,jM,MM,NM,PM,FM,IM,LM,RM,zM,BM,VM,HM,UM,WM,GM,KM,qM,JM,YM,XM,ZM,QM,$M,eN,tN,nN,rN,iN,aN,oN,sN,cN,lN,uN,dN,fN,pN,mN,hN,gN,_N,vN,yN,bN,xN,SN,CN,wN,TN,EN,DN,ON,kN,AN,jN,MN,NN,PN,FN,IN,LN,RN,zN,BN,VN,HN,UN,WN,GN,KN,qN,JN,YN,XN,ZN,QN,$N,eP,tP,nP,rP,iP,aP,oP,sP,cP,lP,uP,dP,fP,pP,mP,hP,gP,_P,vP,yP,bP,xP,SP,CP,wP,TP,EP,DP,OP,kP,AP,jP,MP,NP,PP,FP,IP,LP,RP,zP,BP,VP,HP,UP,WP,GP,KP,qP,JP,YP,XP,ZP,QP,$P,eF,tF,nF,rF,iF,aF,oF,sF,cF,lF,uF,dF,fF,pF,mF,hF,gF,_F,vF,yF,bF,xF,SF,CF,wF,TF,EF,DF,OF,kF,AF,jF,MF,NF,PF,FF,IF,LF,RF,zF,BF,VF,HF,UF,WF,GF,KF,qF,JF,YF,XF,ZF,QF,$F,eI,tI,nI,rI,iI,aI,oI,sI,cI,lI,uI,dI,fI,pI,mI,hI,gI,_I,vI,yI,bI,xI,SI,CI,wI,TI,EI,DI,OI,kI,AI,jI,MI,NI,PI,FI,II,LI,RI,zI,BI,VI,HI,UI,WI,GI,KI,qI,JI,YI,XI,ZI,QI,$I,eL,tL,nL,rL,iL,aL,oL,sL,cL,lL,uL,dL,fL,pL,mL,hL,gL,_L,vL,yL,bL,xL,SL,CL,wL,TL,EL,DL,OL,kL,AL,jL,ML,NL,PL,FL,IL,LL,RL,zL,BL,VL,HL,UL,WL,GL,KL,qL,JL,YL,XL,ZL,QL,$L,eR,tR,nR,rR,iR,aR,oR,sR,cR=t((()=>{EM=null,DM=()=>{if(EM!==null)return EM;try{EM=window.matchMedia(`(color-gamut: p3)`).matches}catch{EM=!1}return EM},OM=DM(),kM=e=>OM?`color(display-p3 0.84 0.19 0.78 / ${e})`:`rgba(210, 57, 192, ${e})`,AM=null,jM=e=>{AM=e},MM=()=>AM,NM=e=>!AM||e!==null&&AM.contains(e),PM=e=>e,FM=`data-react-grab`,IM=`0.1.48`,LM=`var(--rg-shadow)`,RM=-1e3,zM=.95,BM=1500,VM=[`/components/ui/`,`/packages/ui/`,`/design-system/`,`/design-systems/`,`/primitives/`],HM=5e3,UM=8e3,WM=1e4,GM=2147483647,KM=2147483645,qM=.7,JM=1e3/60,YM=.01,XM=kM(.4),ZM=kM(.05),QM=kM(.5),$M=kM(.08),eN=kM(.15),tN=.2,nN=[`id`,`class`,`aria-label`,`data-testid`,`role`,`name`,`title`],rN=new Set([`id`,`data-testid`,`aria-label`,`href`,`src`,`alt`,`type`,`name`,`placeholder`,`role`,`for`,`action`,`method`,`title`,`disabled`,`checked`,`readonly`,`required`,`selected`,`open`]),iN=new Set([`a`,`code`,`pre`]),aN=new Set([`script`,`style`,`template`,`noscript`]),oN=[`Meta`,`Control`,`Shift`,`Alt`],sN=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]),cN=`data-react-grab-frozen`,lN=.5,uN=`data-react-grab-input`,dN=.5,fN=`copy`,pN=`comment`,mN=`edit`,hN=`superellipse(1.25)`,gN=.01,_N=1e3,vN={left:-9999,top:-9999},yN={left:`left center`,right:`right center`,top:`center top`,bottom:`center bottom`},bN=1e3,xN=`#00000000`,SN=`transparent`,CN=2e3,wN=`cubic-bezier(0.34, 1.56, 0.64, 1)`,TN=12e3,EN=9e3,DN=1e4,ON=8e3,kN=5e3,AN=1e3,jN=1.2,MN=-9999,new Set(`display.position.top.right.bottom.left.z-index.overflow.overflow-x.overflow-y.width.height.min-width.min-height.max-width.max-height.margin-top.margin-right.margin-bottom.margin-left.padding-top.padding-right.padding-bottom.padding-left.flex-direction.flex-wrap.justify-content.align-items.align-self.align-content.flex-grow.flex-shrink.flex-basis.order.gap.row-gap.column-gap.grid-template-columns.grid-template-rows.grid-template-areas.font-family.font-size.font-weight.font-style.line-height.letter-spacing.text-align.text-decoration-line.text-decoration-style.text-transform.text-overflow.text-shadow.white-space.word-break.overflow-wrap.vertical-align.color.background-color.background-image.background-position.background-size.background-repeat.border-top-width.border-right-width.border-bottom-width.border-left-width.border-top-style.border-right-style.border-bottom-style.border-left-style.border-top-color.border-right-color.border-bottom-color.border-left-color.border-top-left-radius.border-top-right-radius.border-bottom-left-radius.border-bottom-right-radius.box-shadow.opacity.transform.filter.backdrop-filter.object-fit.object-position`.split(`.`)),NN=e=>(e.tagName||``).toLowerCase(),FN=()=>{if(PN!==void 0)return PN;let e=document.querySelector(`script[nonce], style[nonce]`),t=e?.nonce||e?.getAttribute(`nonce`)||null;return t&&(PN=t),t},IN=[[`data-rr-block`,``],[`data-rr-ignore`,``],[`data-rr-mask`,``],[`data-sentry-block`,``],[`data-sentry-ignore`,``],[`data-sentry-mask`,``],[`data-dd-privacy`,`hidden`],[`data-fs-exclude`,``],[`data-lr-exclude`,``],[`data-hj-suppress`,``],[`data-recording-disable`,``],[`data-clarity-mask`,`true`],[`data-heap-redact-text`,``]],LN=e=>{for(let[t,n]of IN)e.setAttribute(t,n);e.setAttribute(`data-testid`,`react-grab-overlay`),e.classList.add(`ph-no-capture`)},RN=`bippy-0.5.43`,zN=Object.defineProperty,BN=Object.prototype.hasOwnProperty,VN=()=>{},HN=e=>{try{Function.prototype.toString.call(e).indexOf(`^_^`)>-1&&setTimeout(()=>{throw Error(`React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build`)})}catch{}},UN=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>!!(e&&`getFiberRoots`in e),WN=!1,KN=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>WN?!0:(e&&typeof e.inject==`function`&&(GN=e.inject.toString()),!!GN?.includes(`(injected)`)),qN=new Set,JN=new Set,YN=e=>{let t=new Map,n=0,r={_instrumentationIsActive:!1,_instrumentationSource:RN,checkDCE:HN,hasUnsupportedRendererAttached:!1,inject(e){let i=++n;return t.set(i,e),JN.add(e),r._instrumentationIsActive||(r._instrumentationIsActive=!0,qN.forEach(e=>e())),i},on:VN,onCommitFiberRoot:VN,onCommitFiberUnmount:VN,onPostCommitFiberRoot:VN,renderers:t,supportsFiber:!0,supportsFlight:!0};try{zN(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`,{configurable:!0,enumerable:!0,get(){return r},set(t){if(t&&typeof t==`object`){let n=r.renderers;r=t,n.size>0&&(n.forEach((e,n)=>{JN.add(e),t.renderers.set(n,e)}),XN(e))}}});let t=window.hasOwnProperty,n=!1;zN(window,`hasOwnProperty`,{configurable:!0,value:function(...e){try{if(!n&&e[0]===`__REACT_DEVTOOLS_GLOBAL_HOOK__`)return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,n=!0,-0}catch{}return t.apply(this,e)},writable:!0})}catch{XN(e)}return r},XN=e=>{e&&qN.add(e);try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=HN,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=RN,t._instrumentationIsActive=!1;let e=UN(t);if(e||(t.on=VN),t.renderers.size){t._instrumentationIsActive=!0,qN.forEach(e=>e());return}let n=t.inject,r=KN(t);r&&!e&&(WN=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=e=>{let i=n(e);return JN.add(e),r&&t.renderers.set(i,e),t._instrumentationIsActive=!0,qN.forEach(e=>e()),i}}(t.renderers.size||t._instrumentationIsActive||KN())&&e?.()}catch{}},ZN=()=>BN.call(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`),QN=e=>ZN()?(XN(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):YN(e),$N=()=>!!(typeof window<`u`&&(window.document?.createElement||window.navigator?.product===`ReactNative`)),eP=()=>{try{$N()&&QN()}catch{}},tP=e=>{switch(e.tag){case 1:case 11:case 0:case 14:case 15:return!0;default:return!1}},nP=(e,t,n=!1)=>{if(!e)return null;if(t(e)===!0)return e;let r=n?e.return:e.child;for(;r;){let e=nP(r,t,n);if(e)return e;r=n?null:r.sibling}return null},rP=async(e,t,n=!1)=>{if(!e)return null;if(await t(e)===!0)return e;let r=n?e.return:e.child;for(;r;){let e=await rP(r,t,n);if(e)return e;r=n?null:r.sibling}return null},iP=e=>{let t=e;return typeof t==`function`?t:typeof t==`object`&&t?iP(t.type||t.render):null},aP=e=>{let t=e;if(typeof t==`string`)return t;if(typeof t!=`function`&&!(typeof t==`object`&&t))return null;let n=t.displayName||t.name||null;if(n)return n;let r=iP(t);return r&&(r.displayName||r.name)||null},oP=()=>{let e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return!!e?._instrumentationIsActive||UN(e)||KN(e)},sP=e=>{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t?.renderers)for(let n of t.renderers.values())try{let t=n.findFiberByHostInstance?.(e);if(t)return t}catch{}if(typeof e==`object`&&e){if(`_reactRootContainer`in e)return e._reactRootContainer?._internalRoot?.current?.child;for(let t in e)if(t.startsWith(`__reactContainer$`)||t.startsWith(`__reactInternalInstance$`)||t.startsWith(`__reactFiber`))return e[t]||null}return null},cP=new Set,lP=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,uP=[`rsc://`,`file:///`,`webpack-internal://`,`webpack://`,`node:`,`turbopack://`,`metro://`,`/app-pages-browser/`,`/(app-pages-browser)/`],dP=[`<anonymous>`,`eval`,``],fP=/\.(jsx|tsx|ts|js)$/,pP=/(\.min|bundle|chunk|vendor|vendors|runtime|polyfill|polyfills)\.(js|mjs|cjs)$|(chunk|bundle|vendor|vendors|runtime|polyfill|polyfills|framework|app|main|index)[-_.][A-Za-z0-9_-]{4,}\.(js|mjs|cjs)$|[\da-f]{8,}\.(js|mjs|cjs)$|[-_.][\da-f]{20,}\.(js|mjs|cjs)$|\/dist\/|\/build\/|\/.next\/|\/out\/|\/node_modules\/|\.webpack\.|\.vite\.|\.turbopack\./i,mP=/^\?[\w~.-]+(?:=[^&#]*)?(?:&[\w~.-]+(?:=[^&#]*)?)*$/,hP=/\(at [^)]+\)$/,gP=/(^|@)\S+:\d+/,_P=/^\s*at .*(\S+:\d+|\(native\))/m,vP=/^(eval@)?(\[native code\])?$/,yP=(e,t)=>{if(t?.includeInElement!==!1){let n=e.split(`
|
|
233
|
+
`),r=[];for(let e of n)if(/^\s*at\s+/.test(e)){let t=SP(e,void 0)[0];t&&r.push(t)}else if(/^\s*in\s+/.test(e)){let t=e.replace(/^\s*in\s+/,``).replace(/\s*\(at .*\)$/,``);r.push({functionName:t,source:e})}else if(e.match(gP)){let t=CP(e,void 0)[0];t&&r.push(t)}return xP(r,t)}return e.match(_P)?SP(e,t):CP(e,t)},bP=e=>{if(!e.includes(`:`))return[e,void 0,void 0];let t=e.startsWith(`(`)&&/:\d+\)$/.test(e)?e.slice(1,-1):e,n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t);return n?[n[1],n[2]||void 0,n[3]||void 0]:[t,void 0,void 0]},xP=(e,t)=>t&&t.slice!=null?Array.isArray(t.slice)?e.slice(t.slice[0],t.slice[1]):e.slice(0,t.slice):e,SP=(e,t)=>xP(e.split(`
|
|
234
|
+
`).filter(e=>!!e.match(_P)),t).map(e=>{let t=e;t.includes(`(eval `)&&(t=t.replace(/eval code/g,`eval`).replace(/(\(eval at [^()]*)|(,.*$)/g,``));let n=t.replace(/^\s+/,``).replace(/\(eval code/g,`(`).replace(/^.*?\s+/,``),r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],``):n;let i=bP(r?r[1]:n);return{functionName:r&&n||void 0,fileName:[`eval`,`<anonymous>`].includes(i[0])?void 0:i[0],lineNumber:i[1]?+i[1]:void 0,columnNumber:i[2]?+i[2]:void 0,source:t}}),CP=(e,t)=>xP(e.split(`
|
|
235
|
+
`).filter(e=>!e.match(vP)),t).map(e=>{let t=e;if(t.includes(` > eval`)&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,`:$1`)),!t.includes(`@`)&&!t.includes(`:`))return{functionName:t};{let e=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,n=t.match(e),r=n&&n[1]?n[1]:void 0,i=bP(t.replace(e,``));return{functionName:r,fileName:i[0],lineNumber:i[1]?+i[1]:void 0,columnNumber:i[2]?+i[2]:void 0,source:t}}}),wP=44,TP=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,EP=new Uint8Array(64),DP=new Uint8Array(128);for(let e=0;e<TP.length;e++){let t=TP.charCodeAt(e);EP[e]=t,DP[t]=e}OP=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){let{buffer:t,pos:n}=this,r=t.indexOf(e,n);return r===-1?t.length:r}},kP=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,AP=/^data:application\/json[^,]+base64,/,jP=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,MP=new Map,NP=new Map,PP=(e,t,n,r)=>{if(n<0||n>=e.length)return null;let i=e[n];if(!i||i.length===0)return null;let a=null;for(let e of i)if(e[0]<=r)a=e;else break;if(!a||a.length<4)return null;let[,o,s,c]=a;if(o===void 0||s===void 0||c===void 0)return null;let l=t[o];return l?{columnNumber:c,fileName:l,lineNumber:s+1}:null},FP=(e,t,n)=>{if(e.sections){let r=null;for(let i of e.sections)if(t>i.offset.line||t===i.offset.line&&n>=i.offset.column)r=i;else break;if(!r)return null;let i=t-r.offset.line,a=t===r.offset.line?n-r.offset.column:n;return PP(r.map.mappings,r.map.sources,i,a)}return PP(e.mappings,e.sources,t-1,n)},IP=(e,t)=>{let n=t.split(`
|
|
236
|
+
`),r;for(let e=n.length-1;e>=0&&!r;e--){let t=n[e].match(jP);t&&(r=t[1]||t[2])}if(!r)return null;let i=kP.test(r);if(!(AP.test(r)||i||r.startsWith(`/`))){let t=e.split(`/`);t[t.length-1]=r,r=t.join(`/`)}return r},LP=e=>({file:e.file,mappings:CM(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,version:3}),RP=e=>{let t=e.sections.map(({map:e,offset:t})=>({map:{...e,mappings:CM(e.mappings)},offset:t})),n=new Set;for(let e of t)for(let t of e.map.sources)n.add(t);return{file:e.file,mappings:[],names:[],sections:t,sourceRoot:void 0,sources:Array.from(n),sourcesContent:void 0,version:3}},zP=e=>{if(!e)return!1;let t=e.trim();if(!t)return!1;let n=t.match(kP);if(!n)return!0;let r=n[0].toLowerCase();return r===`http:`||r===`https:`},BP=async(e,t=fetch)=>{if(!zP(e))return null;let n=await t(e);if(!n.ok)return null;let r=await n.text();if(!r)return null;let i=IP(e,r);if(!i||!zP(i))return null;let a=await t(i);if(!a.ok)return null;try{let e=await a.json();return`sections`in e?RP(e):LP(e)}catch{return null}},VP=async(e,t=!0,n)=>{if(t&&MP.has(e))return MP.get(e)??null;let r=t?NP.get(e):void 0;if(r)return(await r).sourceMap;let i=BP(e,n).then(e=>({sourceMap:e,isTransientFailure:!1}),()=>({sourceMap:null,isTransientFailure:!0}));t&&NP.set(e,i);let{sourceMap:a,isTransientFailure:o}=await i;return t&&(NP.delete(e),o||MP.set(e,a)),a},HP=async(e,t=!0,n)=>await Promise.all(e.map(async e=>{if(!e.fileName)return e;let r=await VP(e.fileName,t,n);if(!r||typeof e.lineNumber!=`number`||typeof e.columnNumber!=`number`)return e;let i=FP(r,e.lineNumber,e.columnNumber);return i?{...e,source:i.fileName&&e.source?e.source.replace(e.fileName,i.fileName):e.source,fileName:i.fileName,lineNumber:i.lineNumber,columnNumber:i.columnNumber,isSymbolicated:!0}:e})),UP=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack==`string`,WP=()=>{let e=QN();for(let t of[...Array.from(JN),...Array.from(e.renderers.values())]){let e=t.currentDispatcherRef;if(e&&typeof e==`object`)return`H`in e?e.H:e.current}return null},GP=e=>{for(let t of JN){let n=t.currentDispatcherRef;n&&typeof n==`object`&&(`H`in n?n.H=e:n.current=e)}},KP=e=>`\n in ${e}`,qP=(e,t)=>{let n=KP(e);return t&&(n+=` (at ${t})`),n},JP=!1,YP=(e,t)=>{if(!e||JP)return``;let n=Error.prepareStackTrace;Error.prepareStackTrace=void 0,JP=!0;let r=WP();GP(null);let i=console.error,a=console.warn;console.error=()=>{},console.warn=()=>{};try{let n={DetermineComponentFrameRoot(){let n;try{if(t){let t=function(){throw Error()};if(Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){n=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){n=e}e.call(t.prototype)}}else{try{throw Error()}catch(e){n=e}let t=e();t&&typeof t.catch==`function`&&t.catch(()=>{})}}catch(e){if(e instanceof Error&&n instanceof Error&&typeof e.stack==`string`)return[e.stack,n.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`,Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,`name`)?.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});let[r,i]=n.DetermineComponentFrameRoot();if(r&&i){let t=r.split(`
|
|
237
237
|
`),n=i.split(`
|
|
238
|
-
`),a=0,o=0;for(;a<t.length&&!t[a].includes(`DetermineComponentFrameRoot`);)a++;for(;o<n.length&&!n[o].includes(`DetermineComponentFrameRoot`);)o++;if(a===t.length||o===n.length)for(a=t.length-1,o=n.length-1;a>=1&&o>=0&&t[a]!==n[o];)o--;for(;a>=1&&o>=0;a--,o--)if(t[a]!==n[o]){if(a!==1||o!==1)do if(a--,o--,o<0||t[a]!==n[o]){let n=`\n${t[a].replace(` at new `,` at `)}`,r=
|
|
238
|
+
`),a=0,o=0;for(;a<t.length&&!t[a].includes(`DetermineComponentFrameRoot`);)a++;for(;o<n.length&&!n[o].includes(`DetermineComponentFrameRoot`);)o++;if(a===t.length||o===n.length)for(a=t.length-1,o=n.length-1;a>=1&&o>=0&&t[a]!==n[o];)o--;for(;a>=1&&o>=0;a--,o--)if(t[a]!==n[o]){if(a!==1||o!==1)do if(a--,o--,o<0||t[a]!==n[o]){let n=`\n${t[a].replace(` at new `,` at `)}`,r=aP(e);return r&&n.includes(`<anonymous>`)&&(n=n.replace(`<anonymous>`,r)),n}while(a>=1&&o>=0);break}}}finally{JP=!1,Error.prepareStackTrace=n,GP(r),console.error=i,console.warn=a}let o=e?aP(e):``;return o?KP(o):``},XP=(e,t)=>{let n=e.tag,r=``;switch(n){case 28:r=KP(`Activity`);break;case 1:r=YP(e.type,!0);break;case 11:r=YP(e.type.render,!1);break;case 0:case 15:r=YP(e.type,!1);break;case 5:case 26:case 27:r=KP(e.type);break;case 16:r=KP(`Lazy`);break;case 13:r=e.child!==t&&t!==null?KP(`Suspense Fallback`):KP(`Suspense`);break;case 19:r=KP(`SuspenseList`);break;case 30:r=KP(`ViewTransition`);break;default:return``}return r},ZP=e=>{try{let t=``,n=e,r=null;do{t+=XP(n,r);let e=n._debugInfo;if(e&&Array.isArray(e))for(let n=e.length-1;n>=0;n--){let r=e[n];typeof r.name==`string`&&(t+=qP(r.name,r.env))}r=n,n=n.return}while(n);return t}catch(e){return e instanceof Error?`\nError generating stack: ${e.message}\n${e.stack}`:``}},QP=e=>{let t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;let n=e;if(!n)return``;Error.prepareStackTrace=t,n.startsWith(`Error: react-stack-top-frame
|
|
239
239
|
`)&&(n=n.slice(29));let r=n.indexOf(`
|
|
240
240
|
`);if(r!==-1&&(n=n.slice(r+1)),r=Math.max(n.indexOf(`react_stack_bottom_frame`),n.indexOf(`react-stack-bottom-frame`)),r!==-1&&(r=n.lastIndexOf(`
|
|
241
|
-
`,r)),r!==-1)n=n.slice(0,r);else return``;return n},QP=e=>!!(e.functionName&&e.fileName&&(e.fileName.startsWith(`rsc://`)||e.fileName.startsWith(`about://React/`))),$P=(e,t)=>e.fileName===t.fileName&&e.lineNumber===t.lineNumber&&e.columnNumber===t.columnNumber,eF=e=>{let t=new Map;for(let n of e)for(let e of n.stackFrames){if(!QP(e))continue;let n=e.functionName,r=t.get(n)??[];r.some(t=>$P(t,e))||(r.push(e),t.set(n,r))}return t},tF=(e,t,n)=>{if(!e.functionName)return{...e,isServer:!0};let r=t.get(e.functionName);if(!r||r.length===0)return{...e,isServer:!0};let i=n.get(e.functionName)??0,a=r[i%r.length];return n.set(e.functionName,i+1),{...e,isServer:!0,fileName:a.fileName,lineNumber:a.lineNumber,columnNumber:a.columnNumber,source:e.source?.replace(`(at Server)`,`(${a.fileName}:${a.lineNumber}:${a.columnNumber})`)}},nF=e=>{let t=[];return yM(e,e=>{if(!HP(e))return;let n=typeof e.type==`string`?e.type:iP(e.type)||`<anonymous>`;t.push({componentName:n,stackFrames:vP(ZP(e._debugStack?.stack))})},!0),t},rF=async(e,t=!0,n)=>{let r=nF(e),i=vP(XP(e)),a=eF(r),o=new Map;return VP(i.map(e=>(e.source?.includes(`(at Server)`)??!1)||e.source!=null&&mP.test(e.source)?tF(e,a,o):e).filter((e,t,n)=>{if(t===0)return!0;let r=n[t-1];return e.functionName!==r.functionName}),t,n)},iF=e=>{let t=e._debugSource;return t?typeof t==`object`&&!!t&&`fileName`in t&&typeof t.fileName==`string`&&`lineNumber`in t&&typeof t.lineNumber==`number`:!1},aF=async(e,t=!0,n)=>{if(iF(e))return e._debugSource||null;let r=await rF(e,t,n);for(let e of r)if(e.fileName)return{fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,functionName:e.functionName};return null},oF=e=>e.split(`/`).filter(Boolean).length,sF=e=>e.split(`/`).filter(Boolean)[0]??null,cF=e=>{let t=e.indexOf(`/`,1);if(t===-1||oF(e.slice(0,t))!==1)return e;let n=e.slice(t);if(!dP.test(n)||oF(n)<2)return e;let r=sF(n);return!r||r.startsWith(`@`)||r.length>4?e:n},lF=e=>{if(!e||uP.some(t=>t===e))return``;let t=e,n=t.startsWith(`http://`)||t.startsWith(`https://`);if(n)try{t=new URL(t).pathname}catch{}if(n&&(t=cF(t)),t.startsWith(`about://React/`)){let e=t.slice(14),n=e.indexOf(`/`),r=e.indexOf(`:`);t=n!==-1&&(r===-1||n<r)?e.slice(n+1):e}let r=!0;for(;r;){r=!1;for(let e of lP)if(t.startsWith(e)){t=t.slice(e.length),e===`file:///`&&(t=`/${t.replace(/^\/+/,``)}`),r=!0;break}}if(cP.test(t)){let e=t.match(cP);e&&(t=t.slice(e[0].length))}if(t.startsWith(`//`)){let e=t.indexOf(`/`,2);t=e===-1?``:t.slice(e)}let i=t.indexOf(`?`);if(i!==-1){let e=t.slice(i);pP.test(e)&&(t=t.slice(0,i))}return t},uF=e=>{let t=lF(e);return!(!t||!dP.test(t)||fP.test(t))},dF=Symbol.for(`react.context`),fF=[],pF=null,mF=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render."),hF=()=>{let e=pF;return e!==null&&(pF=e.next),e},gF=e=>e._currentValue,_F=(e,t,n,r=null)=>{fF.push({displayName:r,primitive:e,stackError:Error(),value:t,dispatcherHookName:n})},vF=e=>{if(typeof e==`object`&&e){let t=e;if(typeof t.then==`function`){let e=t;switch(e.status){case`fulfilled`:return _F(`Promise`,e.value,`Use`),e.value;case`rejected`:throw e.reason}throw _F(`Unresolved`,e,`Use`),mF}if(t.$$typeof===dF&&`_currentValue`in t){let e=t,n=gF(e);return _F(`Context (use)`,n,`Use`,e.displayName||`Context`),n}}throw Error(`An unsupported type was passed to use(): `+String(e))},yF=e=>{let t=gF(e);return _F(`Context`,t,`Context`,e.displayName||null),t},bF=e=>{let t=hF(),n=t===null?typeof e==`function`?e():e:t.memoizedState;return _F(`State`,n,`State`),[n,()=>{}]},xF=(e,t,n)=>{let r=hF(),i=r===null?n===void 0?t:n(t):r.memoizedState;return _F(`Reducer`,i,`Reducer`),[i,()=>{}]},SF=e=>{let t=hF(),n=t===null?{current:e}:t.memoizedState;return _F(`Ref`,n.current,`Ref`),n},CF=()=>{let e=hF();return _F(`CacheRefresh`,e===null?()=>{}:e.memoizedState,`CacheRefresh`),()=>{}},wF=e=>{hF(),_F(`LayoutEffect`,e,`LayoutEffect`)},TF=e=>{hF(),_F(`InsertionEffect`,e,`InsertionEffect`)},EF=e=>{hF(),_F(`Effect`,e,`Effect`)},DF=e=>{hF();let t;typeof e==`object`&&e&&`current`in e&&(t=e.current),_F(`ImperativeHandle`,t,`ImperativeHandle`)},OF=(e,t)=>{_F(`DebugValue`,typeof t==`function`?t(e):e,`DebugValue`)},kF=e=>{let t=hF();return _F(`Callback`,t===null?e:t.memoizedState[0],`Callback`),e},AF=e=>{let t=hF(),n=t===null?e():t.memoizedState[0];return _F(`Memo`,n,`Memo`),n},jF=(e,t)=>{let n=hF();hF();let r=n===null?t():n.memoizedState;return _F(`SyncExternalStore`,r,`SyncExternalStore`),r},MF=()=>{let e=hF();hF();let t=e!==null&&e.memoizedState;return _F(`Transition`,t,`Transition`),[t,()=>{}]},NF=e=>{let t=hF(),n=t===null?e:t.memoizedState;return _F(`DeferredValue`,n,`DeferredValue`),n},PF=()=>{let e=hF(),t=e===null?``:e.memoizedState;return _F(`Id`,t,`Id`),t},FF=e=>[],IF=e=>{let t=hF(),n=t===null?e:t.memoizedState;return _F(`Optimistic`,n,`Optimistic`),[n,()=>{}]},LF=(e,t)=>{let n,r=null;if(e!==null){let t=e.memoizedState;if(typeof t==`object`&&t&&`then`in t&&typeof t.then==`function`){let e=t;switch(e.status){case`fulfilled`:n=e.value;break;case`rejected`:r=e.reason;break;default:r=mF,n=e}}else n=t}else n=t;return{value:n,error:r}},RF=e=>(t,n)=>{let r=hF();hF(),hF();let i=Error(),{value:a,error:o}=LF(r,n);if(fF.push({displayName:null,primitive:e,stackError:i,value:a,dispatcherHookName:e}),o!==null)throw o;return[a,()=>{},!1]},zF=RF(`ActionState`),BF={readContext:gF,use:vF,useCallback:kF,useContext:yF,useEffect:EF,useImperativeHandle:DF,useLayoutEffect:wF,useInsertionEffect:TF,useMemo:AF,useReducer:xF,useRef:SF,useState:bF,useDebugValue:OF,useDeferredValue:NF,useTransition:MF,useSyncExternalStore:jF,useId:PF,useHostTransitionStatus:()=>{let e=gF({_currentValue:null});return _F(`HostTransitionStatus`,e,`HostTransitionStatus`),e},useFormState:RF(`FormState`),useActionState:zF,useOptimistic:IF,useMemoCache:FF,useCacheRefresh:CF,useEffectEvent:e=>(hF(),_F(`EffectEvent`,e,`EffectEvent`),e)},typeof Proxy>`u`||new Proxy(BF,{get(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];let n=Error(`Missing method in Dispatcher: `+t);throw n.name=`ReactDebugToolsUnsupportedHookError`,n}}),$N(),VF=/^(?:\.\/)?\/?\([a-z][a-z0-9-]*\)\//,HF=e=>{let t=lF(e);return t=t.replace(VF,``),t.startsWith(`./`)&&(t=t.slice(2)),t},WF=e=>(e&&(UF=void 0),UF??=typeof document<`u`&&!!(document.getElementById(`__NEXT_DATA__`)||document.querySelector(`nextjs-portal`)),UF),KF=()=>{if(GF!==void 0)return GF;let e=document.querySelector(`script[src*="/_next/"]`)?.src,t=e?new URL(e).pathname:``,n=t.indexOf(`/_next/`);return GF=n>0?t.slice(0,n):``,GF},qF=typeof window<`u`,JF=e=>0,YF=e=>{},XF=qF?(Object.getOwnPropertyDescriptor(Window.prototype,`requestAnimationFrame`)?.value??window.requestAnimationFrame).bind(window):JF,ZF=qF?(Object.getOwnPropertyDescriptor(Window.prototype,`cancelAnimationFrame`)?.value??window.cancelAnimationFrame).bind(window):YF,QF=()=>qF?new Promise(e=>XF(()=>e())):Promise.resolve(),$F=(e,t=window.getComputedStyle(e))=>t.display!==`none`&&t.visibility!==`hidden`&&t.opacity!==`0`,eI=e=>{let t=MN(e);return t===`html`||t===`body`},tI=[`data-react-grab`,`data-react-grab-demo`],nI=e=>tI.some(t=>e.hasAttribute(t)),rI=e=>{if(nI(e))return!0;let t=e.getRootNode();return t instanceof ShadowRoot&&nI(t.host)},iI=e=>e.hasAttribute(`data-react-grab-ignore`)||e.closest(`[data-react-grab-ignore]`)!==null,aI=e=>{let t=parseInt(e.zIndex,10);return e.pointerEvents===`none`&&e.position===`fixed`&&!isNaN(t)&&t>=2147483600},oI=e=>{let t=e.backgroundColor;return t===`transparent`||t===`rgba(0, 0, 0, 0)`},sI=e=>{let t=e.position;if(t!==`fixed`&&t!==`absolute`)return!1;if(oI(e)||parseFloat(e.opacity)<.1)return!0;let n=parseInt(e.zIndex,10);return!isNaN(n)&&n>1e3},cI=new WeakMap,lI=()=>{cI=new WeakMap},uI=e=>{if(eI(e)||rI(e)||iI(e))return!1;let t=performance.now(),n=cI.get(e);if(n&&t-n.timestamp<50)return n.isVisible;let r=window.getComputedStyle(e);return $F(e,r)?e.clientWidth/window.innerWidth>=.9&&e.clientHeight/window.innerHeight>=.9&&(aI(r)||sI(r))?!1:(cI.set(e,{isVisible:!0,timestamp:t}),!0):(cI.set(e,{isVisible:!1,timestamp:t}),!1)},dI=(e,t)=>{let n=document.createElement(`style`);n.setAttribute(e,``);let r=PN();return r&&(n.nonce=r),IN(n),n.textContent=t,document.head.appendChild(n),n},fI=null,pI=null,mI=()=>fI!==null,hI=()=>{fI||(fI=dI(`data-react-grab-frozen-pseudo`,`html { pointer-events: none !important; }`),pI=dI(`data-react-grab-hittest-override`,`html, body { pointer-events: auto !important; }`),pI.disabled=!0)},gI=()=>{fI?.remove(),fI=null,pI?.remove(),pI=null},_I=()=>{fI&&(fI.disabled||=!0,pI?.disabled&&(pI.disabled=!1))},vI=()=>{fI&&(fI.disabled&&=!1,pI&&!pI.disabled&&(pI.disabled=!0))},yI=null,bI=null,xI=null,SI=(e,t,n)=>e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom,CI=()=>{xI!==null&&clearTimeout(xI),xI=setTimeout(()=>{xI=null,vI()},100)},wI=()=>{xI!==null&&(clearTimeout(xI),xI=null)},TI=(e,t,n,r)=>{let i=Math.abs(e-n),a=Math.abs(t-r);return i<=2&&a<=2},EI=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return[];wI(),_I();let n=document.elementsFromPoint(e,t);return CI(),jM()?n.filter(MM):n},DI=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return null;let n=performance.now();if(bI&&SI(e,t,bI.rect))return bI.element;if(yI){let r=TI(e,t,yI.clientX,yI.clientY),i=n-yI.timestamp<16;if(r||i)return yI.element}wI(),_I();let r=null,i=document.elementFromPoint(e,t);if(i&&uI(i)&&MM(i))r=i;else{let n=document.elementsFromPoint(e,t);for(let e of n)if(e!==i&&uI(e)&&MM(e)){r=e;break}}return CI(),bI=r instanceof HTMLIFrameElement?{element:r,rect:r.getBoundingClientRect()}:null,yI={clientX:e,clientY:t,element:r,timestamp:n},r},OI=()=>{wI(),vI(),yI=null,bI=null},kI=async(e,t)=>{let n=WF(),r=new URLSearchParams({file:e}),i=n?`line1`:`line`,a=n?`column1`:`column`;t&&r.set(i,String(t)),r.set(a,`1`);let o=n?`${KF()}/__nextjs_launch-editor`:`/__open-in-editor`;return(await fetch(`${o}?${r}`)).ok},AI=async(e,t,n)=>{let r=HF(e);if(await kI(r,t).catch(()=>!1))return;let i=t?`&line=${t}`:``,a=`https://react-grab.com/open-file?url=${encodeURIComponent(r)}${i}`,o=n?n(a,r,t):a;window.open(o,`_blank`,`noopener,noreferrer`)},jI=!1,MI=new Map,NI=-1,PI=new WeakSet,FI=new Map,II=new Map,LI=e=>PI.has(e)?!0:!jI||!(`gsapVersions`in window)||!(Error().stack??``).includes(`_tick`)?!1:(PI.add(e),!0),typeof window<`u`&&(window.requestAnimationFrame=e=>{if(!LI(e))return XF(e);if(jI){let t=NI--;return MI.set(t,e),t}let t=XF(n=>{if(jI){let n=NI--;MI.set(n,e),FI.set(t,n);return}e(n)});return t},window.cancelAnimationFrame=e=>{if(MI.has(e)){MI.delete(e);return}let t=II.get(e);if(t!==void 0){ZF(t.nativeId),II.delete(e);return}let n=FI.get(e);if(n!==void 0){MI.delete(n),FI.delete(e);return}ZF(e)}),RI=()=>{if(!jI){jI=!0,MI.clear(),FI.clear();for(let[e,{nativeId:t,callback:n}]of II)ZF(t),MI.set(e,n);II.clear()}},zI=()=>{if(jI){jI=!1;for(let[e,t]of MI.entries()){let n=XF(n=>{II.delete(e),t(n)});II.set(e,{nativeId:n,callback:t})}MI.clear(),FI.clear()}},BI=`
|
|
242
|
-
[${
|
|
243
|
-
[${
|
|
241
|
+
`,r)),r!==-1)n=n.slice(0,r);else return``;return n},$P=e=>!!(e.functionName&&e.fileName&&(e.fileName.startsWith(`rsc://`)||e.fileName.startsWith(`about://React/`))),eF=(e,t)=>e.fileName===t.fileName&&e.lineNumber===t.lineNumber&&e.columnNumber===t.columnNumber,tF=e=>{let t=new Map;for(let n of e)for(let e of n.stackFrames){if(!$P(e))continue;let n=e.functionName,r=t.get(n)??[];r.some(t=>eF(t,e))||(r.push(e),t.set(n,r))}return t},nF=(e,t,n)=>{if(!e.functionName)return{...e,isServer:!0};let r=t.get(e.functionName);if(!r||r.length===0)return{...e,isServer:!0};let i=n.get(e.functionName)??0,a=r[i%r.length];return n.set(e.functionName,i+1),{...e,isServer:!0,fileName:a.fileName,lineNumber:a.lineNumber,columnNumber:a.columnNumber,source:e.source?.replace(`(at Server)`,`(${a.fileName}:${a.lineNumber}:${a.columnNumber})`)}},rF=e=>{let t=[];return bM(e,e=>{if(!UP(e))return;let n=typeof e.type==`string`?e.type:aP(e.type)||`<anonymous>`;t.push({componentName:n,stackFrames:yP(QP(e._debugStack?.stack))})},!0),t},iF=async(e,t=!0,n)=>{let r=rF(e),i=yP(ZP(e)),a=tF(r),o=new Map;return HP(i.map(e=>(e.source?.includes(`(at Server)`)??!1)||e.source!=null&&hP.test(e.source)?nF(e,a,o):e).filter((e,t,n)=>{if(t===0)return!0;let r=n[t-1];return e.functionName!==r.functionName}),t,n)},aF=e=>{let t=e._debugSource;return t?typeof t==`object`&&!!t&&`fileName`in t&&typeof t.fileName==`string`&&`lineNumber`in t&&typeof t.lineNumber==`number`:!1},oF=async(e,t=!0,n)=>{if(aF(e))return e._debugSource||null;let r=await iF(e,t,n);for(let e of r)if(e.fileName)return{fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,functionName:e.functionName};return null},sF=e=>e.split(`/`).filter(Boolean).length,cF=e=>e.split(`/`).filter(Boolean)[0]??null,lF=e=>{let t=e.indexOf(`/`,1);if(t===-1||sF(e.slice(0,t))!==1)return e;let n=e.slice(t);if(!fP.test(n)||sF(n)<2)return e;let r=cF(n);return!r||r.startsWith(`@`)||r.length>4?e:n},uF=e=>{if(!e||dP.some(t=>t===e))return``;let t=e,n=t.startsWith(`http://`)||t.startsWith(`https://`);if(n)try{t=new URL(t).pathname}catch{}if(n&&(t=lF(t)),t.startsWith(`about://React/`)){let e=t.slice(14),n=e.indexOf(`/`),r=e.indexOf(`:`);t=n!==-1&&(r===-1||n<r)?e.slice(n+1):e}let r=!0;for(;r;){r=!1;for(let e of uP)if(t.startsWith(e)){t=t.slice(e.length),e===`file:///`&&(t=`/${t.replace(/^\/+/,``)}`),r=!0;break}}if(lP.test(t)){let e=t.match(lP);e&&(t=t.slice(e[0].length))}if(t.startsWith(`//`)){let e=t.indexOf(`/`,2);t=e===-1?``:t.slice(e)}let i=t.indexOf(`?`);if(i!==-1){let e=t.slice(i);mP.test(e)&&(t=t.slice(0,i))}return t},dF=e=>{let t=uF(e);return!(!t||!fP.test(t)||pP.test(t))},fF=Symbol.for(`react.context`),pF=[],mF=null,hF=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render."),gF=()=>{let e=mF;return e!==null&&(mF=e.next),e},_F=e=>e._currentValue,vF=(e,t,n,r=null)=>{pF.push({displayName:r,primitive:e,stackError:Error(),value:t,dispatcherHookName:n})},yF=e=>{if(typeof e==`object`&&e){let t=e;if(typeof t.then==`function`){let e=t;switch(e.status){case`fulfilled`:return vF(`Promise`,e.value,`Use`),e.value;case`rejected`:throw e.reason}throw vF(`Unresolved`,e,`Use`),hF}if(t.$$typeof===fF&&`_currentValue`in t){let e=t,n=_F(e);return vF(`Context (use)`,n,`Use`,e.displayName||`Context`),n}}throw Error(`An unsupported type was passed to use(): `+String(e))},bF=e=>{let t=_F(e);return vF(`Context`,t,`Context`,e.displayName||null),t},xF=e=>{let t=gF(),n=t===null?typeof e==`function`?e():e:t.memoizedState;return vF(`State`,n,`State`),[n,()=>{}]},SF=(e,t,n)=>{let r=gF(),i=r===null?n===void 0?t:n(t):r.memoizedState;return vF(`Reducer`,i,`Reducer`),[i,()=>{}]},CF=e=>{let t=gF(),n=t===null?{current:e}:t.memoizedState;return vF(`Ref`,n.current,`Ref`),n},wF=()=>{let e=gF();return vF(`CacheRefresh`,e===null?()=>{}:e.memoizedState,`CacheRefresh`),()=>{}},TF=e=>{gF(),vF(`LayoutEffect`,e,`LayoutEffect`)},EF=e=>{gF(),vF(`InsertionEffect`,e,`InsertionEffect`)},DF=e=>{gF(),vF(`Effect`,e,`Effect`)},OF=e=>{gF();let t;typeof e==`object`&&e&&`current`in e&&(t=e.current),vF(`ImperativeHandle`,t,`ImperativeHandle`)},kF=(e,t)=>{vF(`DebugValue`,typeof t==`function`?t(e):e,`DebugValue`)},AF=e=>{let t=gF();return vF(`Callback`,t===null?e:t.memoizedState[0],`Callback`),e},jF=e=>{let t=gF(),n=t===null?e():t.memoizedState[0];return vF(`Memo`,n,`Memo`),n},MF=(e,t)=>{let n=gF();gF();let r=n===null?t():n.memoizedState;return vF(`SyncExternalStore`,r,`SyncExternalStore`),r},NF=()=>{let e=gF();gF();let t=e!==null&&e.memoizedState;return vF(`Transition`,t,`Transition`),[t,()=>{}]},PF=e=>{let t=gF(),n=t===null?e:t.memoizedState;return vF(`DeferredValue`,n,`DeferredValue`),n},FF=()=>{let e=gF(),t=e===null?``:e.memoizedState;return vF(`Id`,t,`Id`),t},IF=e=>[],LF=e=>{let t=gF(),n=t===null?e:t.memoizedState;return vF(`Optimistic`,n,`Optimistic`),[n,()=>{}]},RF=(e,t)=>{let n,r=null;if(e!==null){let t=e.memoizedState;if(typeof t==`object`&&t&&`then`in t&&typeof t.then==`function`){let e=t;switch(e.status){case`fulfilled`:n=e.value;break;case`rejected`:r=e.reason;break;default:r=hF,n=e}}else n=t}else n=t;return{value:n,error:r}},zF=e=>(t,n)=>{let r=gF();gF(),gF();let i=Error(),{value:a,error:o}=RF(r,n);if(pF.push({displayName:null,primitive:e,stackError:i,value:a,dispatcherHookName:e}),o!==null)throw o;return[a,()=>{},!1]},BF=zF(`ActionState`),VF={readContext:_F,use:yF,useCallback:AF,useContext:bF,useEffect:DF,useImperativeHandle:OF,useLayoutEffect:TF,useInsertionEffect:EF,useMemo:jF,useReducer:SF,useRef:CF,useState:xF,useDebugValue:kF,useDeferredValue:PF,useTransition:NF,useSyncExternalStore:MF,useId:FF,useHostTransitionStatus:()=>{let e=_F({_currentValue:null});return vF(`HostTransitionStatus`,e,`HostTransitionStatus`),e},useFormState:zF(`FormState`),useActionState:BF,useOptimistic:LF,useMemoCache:IF,useCacheRefresh:wF,useEffectEvent:e=>(gF(),vF(`EffectEvent`,e,`EffectEvent`),e)},typeof Proxy>`u`||new Proxy(VF,{get(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];let n=Error(`Missing method in Dispatcher: `+t);throw n.name=`ReactDebugToolsUnsupportedHookError`,n}}),eP(),HF=/^(?:\.\/)?\/?\([a-z][a-z0-9-]*\)\//,UF=e=>{let t=uF(e);return t=t.replace(HF,``),t.startsWith(`./`)&&(t=t.slice(2)),t},GF=e=>(e&&(WF=void 0),WF??=typeof document<`u`&&!!(document.getElementById(`__NEXT_DATA__`)||document.querySelector(`nextjs-portal`)),WF),qF=()=>{if(KF!==void 0)return KF;let e=document.querySelector(`script[src*="/_next/"]`)?.src,t=e?new URL(e).pathname:``,n=t.indexOf(`/_next/`);return KF=n>0?t.slice(0,n):``,KF},JF=typeof window<`u`,YF=e=>0,XF=e=>{},ZF=JF?(Object.getOwnPropertyDescriptor(Window.prototype,`requestAnimationFrame`)?.value??window.requestAnimationFrame).bind(window):YF,QF=JF?(Object.getOwnPropertyDescriptor(Window.prototype,`cancelAnimationFrame`)?.value??window.cancelAnimationFrame).bind(window):XF,$F=()=>JF?new Promise(e=>ZF(()=>e())):Promise.resolve(),eI=(e,t=window.getComputedStyle(e))=>t.display!==`none`&&t.visibility!==`hidden`&&t.opacity!==`0`,tI=e=>{let t=NN(e);return t===`html`||t===`body`},nI=[`data-react-grab`,`data-react-grab-demo`],rI=e=>nI.some(t=>e.hasAttribute(t)),iI=e=>{if(rI(e))return!0;let t=e.getRootNode();return t instanceof ShadowRoot&&rI(t.host)},aI=e=>e.hasAttribute(`data-react-grab-ignore`)||e.closest(`[data-react-grab-ignore]`)!==null,oI=e=>{let t=parseInt(e.zIndex,10);return e.pointerEvents===`none`&&e.position===`fixed`&&!isNaN(t)&&t>=2147483600},sI=e=>{let t=e.backgroundColor;return t===`transparent`||t===`rgba(0, 0, 0, 0)`},cI=e=>{let t=e.position;if(t!==`fixed`&&t!==`absolute`)return!1;if(sI(e)||parseFloat(e.opacity)<.1)return!0;let n=parseInt(e.zIndex,10);return!isNaN(n)&&n>1e3},lI=new WeakMap,uI=()=>{lI=new WeakMap},dI=e=>{if(tI(e)||iI(e)||aI(e))return!1;let t=performance.now(),n=lI.get(e);if(n&&t-n.timestamp<50)return n.isVisible;let r=window.getComputedStyle(e);return eI(e,r)?e.clientWidth/window.innerWidth>=.9&&e.clientHeight/window.innerHeight>=.9&&(oI(r)||cI(r))?!1:(lI.set(e,{isVisible:!0,timestamp:t}),!0):(lI.set(e,{isVisible:!1,timestamp:t}),!1)},fI=(e,t)=>{let n=document.createElement(`style`);n.setAttribute(e,``);let r=FN();return r&&(n.nonce=r),LN(n),n.textContent=t,document.head.appendChild(n),n},pI=null,mI=null,hI=()=>pI!==null,gI=()=>{pI||(pI=fI(`data-react-grab-frozen-pseudo`,`html { pointer-events: none !important; }`),mI=fI(`data-react-grab-hittest-override`,`html, body { pointer-events: auto !important; }`),mI.disabled=!0)},_I=()=>{pI?.remove(),pI=null,mI?.remove(),mI=null},vI=()=>{pI&&(pI.disabled||=!0,mI?.disabled&&(mI.disabled=!1))},yI=()=>{pI&&(pI.disabled&&=!1,mI&&!mI.disabled&&(mI.disabled=!0))},bI=null,xI=null,SI=null,CI=(e,t,n)=>e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom,wI=()=>{SI!==null&&clearTimeout(SI),SI=setTimeout(()=>{SI=null,yI()},100)},TI=()=>{SI!==null&&(clearTimeout(SI),SI=null)},EI=(e,t,n,r)=>{let i=Math.abs(e-n),a=Math.abs(t-r);return i<=2&&a<=2},DI=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return[];TI(),vI();let n=document.elementsFromPoint(e,t);return wI(),MM()?n.filter(NM):n},OI=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return null;let n=performance.now();if(xI&&CI(e,t,xI.rect))return xI.element;if(bI){let r=EI(e,t,bI.clientX,bI.clientY),i=n-bI.timestamp<16;if(r||i)return bI.element}TI(),vI();let r=null,i=document.elementFromPoint(e,t);if(i&&dI(i)&&NM(i))r=i;else{let n=document.elementsFromPoint(e,t);for(let e of n)if(e!==i&&dI(e)&&NM(e)){r=e;break}}return wI(),xI=r instanceof HTMLIFrameElement?{element:r,rect:r.getBoundingClientRect()}:null,bI={clientX:e,clientY:t,element:r,timestamp:n},r},kI=()=>{TI(),yI(),bI=null,xI=null},AI=async(e,t)=>{let n=GF(),r=new URLSearchParams({file:e}),i=n?`line1`:`line`,a=n?`column1`:`column`;t&&r.set(i,String(t)),r.set(a,`1`);let o=n?`${qF()}/__nextjs_launch-editor`:`/__open-in-editor`;return(await fetch(`${o}?${r}`)).ok},jI=async(e,t,n)=>{let r=UF(e);if(await AI(r,t).catch(()=>!1))return;let i=t?`&line=${t}`:``,a=`https://react-grab.com/open-file?url=${encodeURIComponent(r)}${i}`,o=n?n(a,r,t):a;window.open(o,`_blank`,`noopener,noreferrer`)},MI=!1,NI=new Map,PI=-1,FI=new WeakSet,II=new Map,LI=new Map,RI=e=>FI.has(e)?!0:!MI||!(`gsapVersions`in window)||!(Error().stack??``).includes(`_tick`)?!1:(FI.add(e),!0),typeof window<`u`&&(window.requestAnimationFrame=e=>{if(!RI(e))return ZF(e);if(MI){let t=PI--;return NI.set(t,e),t}let t=ZF(n=>{if(MI){let n=PI--;NI.set(n,e),II.set(t,n);return}e(n)});return t},window.cancelAnimationFrame=e=>{if(NI.has(e)){NI.delete(e);return}let t=LI.get(e);if(t!==void 0){QF(t.nativeId),LI.delete(e);return}let n=II.get(e);if(n!==void 0){NI.delete(n),II.delete(e);return}QF(e)}),zI=()=>{if(!MI){MI=!0,NI.clear(),II.clear();for(let[e,{nativeId:t,callback:n}]of LI)QF(t),NI.set(e,n);LI.clear()}},BI=()=>{if(MI){MI=!1;for(let[e,t]of NI.entries()){let n=ZF(n=>{LI.delete(e),t(n)});LI.set(e,{nativeId:n,callback:t})}NI.clear(),II.clear()}},VI=`
|
|
242
|
+
[${cN}],
|
|
243
|
+
[${cN}] * {
|
|
244
244
|
animation-play-state: paused !important;
|
|
245
245
|
transition: none !important;
|
|
246
246
|
}
|
|
247
|
-
`,
|
|
247
|
+
`,HI=null,UI=[],WI=[],GI=[],KI=null,qI=[],JI=[],YI=!1,XI=new Map,ZI=[],QI=()=>{HI||=fI(`data-react-grab-frozen-styles`,VI)},$I=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),eL=e=>{let t=new Set;for(let n of e){n instanceof SVGSVGElement?t.add(n):n instanceof SVGElement&&n.ownerSVGElement&&t.add(n.ownerSVGElement);for(let e of n.querySelectorAll(`svg`))e instanceof SVGSVGElement&&t.add(e)}return[...t]},tL=(e,t)=>{let n=Reflect.get(e,t);typeof n==`function`&&n.call(e)},nL=e=>{for(let t of e){let e=XI.get(t)??0;e===0&&tL(t,`pauseAnimations`),XI.set(t,e+1)}},rL=e=>{for(let t of e){let e=XI.get(t);if(e){if(e===1){XI.delete(t),tL(t,`unpauseAnimations`);continue}XI.set(t,e-1)}}},iL=e=>{let t=[];for(let n of e)for(let e of n.getAnimations({subtree:!0}))e.playState===`running`&&t.push(e);return t},aL=e=>{for(let t of e)try{t.finish()}catch{}},oL=e=>{if(!(e.effect instanceof KeyframeEffect))return!1;let t=e.effect.target;return t instanceof Element&&t.getRootNode()instanceof ShadowRoot},sL=e=>{if(e.length!==0&&!$I(e,GI)){cL(),GI=[...e],QI(),UI=e,WI=eL(UI),nL(WI);for(let e of UI)e.setAttribute(cN,``);ZI=iL(UI);for(let e of ZI)e.pause()}},cL=()=>{if(!(UI.length===0&&WI.length===0&&ZI.length===0)){for(let e of UI)e.removeAttribute(cN);rL(WI),aL(ZI),UI=[],WI=[],ZI=[],GI=[]}},lL=e=>e.length===0?(cL(),()=>{}):(sL(e),cL),uL=()=>{if(KI)return[];let e=[];for(let t of document.getAnimations())oL(t)||t.playState===`running`&&e.push(t);return e},dL=e=>{if(!KI){if(KI=fI(`data-react-grab-global-freeze`,``),e.length>200)KI.textContent=`
|
|
248
248
|
*, *::before, *::after {
|
|
249
249
|
animation-play-state: paused !important;
|
|
250
250
|
transition: none !important;
|
|
251
251
|
}
|
|
252
|
-
`,
|
|
252
|
+
`,YI=!0,JI=[];else{for(let t of e)t.pause();JI=e,YI=!1}qI=eL(Array.from(document.querySelectorAll(`svg`))),nL(qI),zI()}},fL=()=>{if(KI){if(YI){KI.textContent=`
|
|
253
253
|
*, *::before, *::after {
|
|
254
254
|
transition: none !important;
|
|
255
255
|
}
|
|
256
|
-
`;let e=[];for(let t of document.getAnimations())aL(t)||e.push(t);iL(e),JI=!1}else{for(let e of qI)try{e.finish()}catch{try{e.play()}catch{}}qI=[]}GI.remove(),GI=null,nL(KI),KI=[],zI()}},fL=[`mouseenter`,`mouseleave`,`mouseover`,`mouseout`,`pointerenter`,`pointerleave`,`pointerover`,`pointerout`],pL=[`focus`,`blur`,`focusin`,`focusout`],mL=[`background-color`,`color`,`border-color`,`box-shadow`,`transform`,`opacity`,`outline`,`filter`,`scale`,`visibility`],hL=[`background-color`,`color`,`border-color`,`box-shadow`,`outline`,`outline-offset`,`outline-width`,`outline-color`,`outline-style`,`filter`,`opacity`,`ring-color`,`ring-width`],gL=new Map,_L=new Map,vL=e=>{e.stopImmediatePropagation()},yL=e=>{e.preventDefault(),e.stopImmediatePropagation()},bL=(e,t)=>{let n=new Map;for(let r of t){let t=e.style.getPropertyValue(r);t&&n.set(r,t)}return n},xL=(e,t,n)=>{if(n?.has(e))return null;let r=getComputedStyle(e),i=e.style.cssText,a=bL(e,t);for(let e of t){let t=r.getPropertyValue(e);t&&(i+=`${e}: ${t} !important; `)}return{element:e,frozenStyles:i,originalPropertyValues:a}},SL=(e,t)=>{let n=[],r=document.elementFromPoint(e,t);for(;r&&r!==document.documentElement;)r instanceof HTMLElement&&n.push(r),r=r.parentElement;return n},CL=()=>{let e=[],t=document.activeElement;for(;t&&t!==document.body;)t instanceof HTMLElement&&e.push(t),t=t.shadowRoot?.activeElement??null;return e},wL=(e,t)=>{for(let{element:n,frozenStyles:r,originalPropertyValues:i}of e)t.set(n,i),n.style.cssText=r},TL=(e,t)=>{for(let[n,r]of e)for(let e of t){let t=r.get(e);t?n.style.setProperty(e,t):n.style.removeProperty(e)}e.clear()},EL=(e,t)=>{if(mI())return null;let n=[],r=e!==void 0&&t!==void 0&&e>=0&&t>=0&&e<window.innerWidth&&t<window.innerHeight?SL(e,t):Array.from(document.querySelectorAll(`:hover`)).filter(e=>e instanceof HTMLElement);for(let e of r){let t=xL(e,mL);t&&n.push(t)}let i=[];for(let e of CL()){let t=xL(e,hL,_L);t&&i.push(t)}return{hoverStates:n,focusStates:i}},DL=e=>{if(e){for(let e of fL)document.addEventListener(e,vL,!0);for(let e of pL)document.addEventListener(e,yL,!0);wL(e.hoverStates,gL),wL(e.focusStates,_L),hI()}},OL=()=>{OI();for(let e of fL)document.removeEventListener(e,vL,!0);for(let e of pL)document.removeEventListener(e,yL,!0);TL(gL,mL),TL(_L,hL),gI()},kL=(e,t)=>{let n=EL(e,t),r=lL();DL(n),uL(r)},AL=()=>{OL(),dL()},jL=!1,ML=(e,t,n)=>{let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i},NL=new WeakMap,PL=new WeakMap,FL=new WeakMap,IL=new Set,LL=[],RL=[],zL=new WeakMap,BL=new WeakMap,VL=new WeakSet,HL=sP,UL=e=>{let t=e;for(;t.return;)t=t.return;return t.stateNode??null},WL=()=>{if(HL.size>0)return HL;let e=new Set,t=n=>{let r=oP(n);if(r){let t=UL(r);t&&e.add(t);return}for(let r of Array.from(n.children))if(t(r),e.size>0)return};return t(document.body),e},GL=(e,t)=>{if(!e)return t;if(!t)return e;if(!e.next||!t.next)return t;let n=e.next,r=t.next,i=e===n,a=t===r;return i&&a?(e.next=t,t.next=e):i?(e.next=r,t.next=e):a?(t.next=n,e.next=t):(e.next=r,t.next=n),t},KL=e=>{if(!e||zL.has(e))return;let t={originalPendingDescriptor:Object.getOwnPropertyDescriptor(e,`pending`),pendingValueAtPause:e.pending,bufferedPending:null};typeof e.getSnapshot==`function`&&(t.originalGetSnapshot=e.getSnapshot,t.snapshotValueAtPause=e.getSnapshot(),e.getSnapshot=()=>jL?t.snapshotValueAtPause:t.originalGetSnapshot());let n=t.pendingValueAtPause;Object.defineProperty(e,"pending",{configurable:!0,enumerable:!0,get:()=>jL?null:n,set:e=>{if(jL){e!==null&&(t.bufferedPending=GL(t.bufferedPending??null,e));return}n=e}}),zL.set(e,t)},qL=e=>{if(!e)return[];let t=[],n=e.next;if(!n)return[];let r=n;do r&&=(t.push(r.action),r.next);while(r&&r!==n);return t},JL=e=>{let t=zL.get(e);if(!t)return;t.originalGetSnapshot&&(e.getSnapshot=t.originalGetSnapshot),t.originalPendingDescriptor?Object.defineProperty(e,"pending",t.originalPendingDescriptor):delete e.pending,e.pending=null;let n=e.dispatch;if(typeof n==`function`){let e=qL(t.pendingValueAtPause??null),r=qL(t.bufferedPending??null);for(let t of[...e,...r])RL.push(()=>n(t))}zL.delete(e)},YL=e=>{if(BL.has(e))return;let t={originalDescriptor:Object.getOwnPropertyDescriptor(e,`memoizedValue`),frozenValue:e.memoizedValue};Object.defineProperty(e,"memoizedValue",{configurable:!0,enumerable:!0,get(){return jL?t.frozenValue:t.originalDescriptor?.get?t.originalDescriptor.get.call(this):this._memoizedValue},set(e){if(jL){t.pendingValue=e,t.didReceivePendingValue=!0;return}t.originalDescriptor?.set?t.originalDescriptor.set.call(this,e):this._memoizedValue=e}}),t.originalDescriptor?.get||(e._memoizedValue=t.frozenValue),BL.set(e,t)},XL=e=>{let t=BL.get(e);t&&(t.originalDescriptor?Object.defineProperty(e,"memoizedValue",t.originalDescriptor):delete e.memoizedValue,t.didReceivePendingValue&&(e.memoizedValue=t.pendingValue),BL.delete(e))},ZL=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&KL(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)YL(n),n=n.next},QL=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&JL(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)XL(n),n=n.next},$L=e=>{let t=e;for(;t;){if(eP(t)&&ZL(t),t.child){t=t.child;continue}for(;t!==e&&!t.sibling;)if(t=t.return,!t)return;if(t===e)return;t=t.sibling}},eR=e=>{let t=e;for(;t;){if(eP(t)&&QL(t),t.child){t=t.child;continue}for(;t!==e&&!t.sibling;)if(t=t.return,!t)return;if(t===e)return;t=t.sibling}},tR=e=>{if(NL.has(e))return;let t=e,n={useState:t.useState,useReducer:t.useReducer,useTransition:t.useTransition,useSyncExternalStore:t.useSyncExternalStore};NL.set(e,n),t.useState=(...t)=>{let r=n.useState.apply(e,t);if(!jL||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,ML(PL,a,()=>(...e)=>{jL?RL.push(()=>a(...e)):a(...e)})]},t.useReducer=(...t)=>{let r=n.useReducer.apply(e,t);if(!jL||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,ML(PL,a,()=>(...e)=>{jL?RL.push(()=>a(...e)):a(...e)})]},t.useTransition=(...t)=>{let r=n.useTransition.apply(e,t);if(!jL||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,ML(FL,a,()=>e=>{jL?LL.push(()=>a(e)):a(e)})]},t.useSyncExternalStore=((e,t,r)=>jL?n.useSyncExternalStore(t=>e(()=>{jL?IL.add(t):t()}),t,r):n.useSyncExternalStore(e,t,r))},nR=e=>{let t=e.currentDispatcherRef;if(!t||typeof t!=`object`)return;let n=`H`in t?`H`:`current`,r=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get:()=>(r&&typeof r==`object`&&tR(r),r),set:e=>{r=e}})},rR=e=>{queueMicrotask(()=>{try{for(let t of ZN().renderers.values())if(typeof t.scheduleUpdate==`function`){for(let n of e)if(n.current)try{t.scheduleUpdate(n.current)}catch{}}}catch{}})},iR=e=>{for(let t of e)try{t()}catch{}},aR=()=>{for(let e of ZN().renderers.values())VL.has(e)||(nR(e),VL.add(e))},oR=()=>{if(jL)return()=>{};aR(),jL=!0;let e=WL();for(let t of e)$L(t.current);return()=>{if(jL)try{let e=WL();for(let t of e)eR(t.current);let t=Array.from(IL),n=LL.slice(),r=RL.slice();jL=!1,iR(t),iR(n),iR(r),rR(e)}finally{IL.clear(),LL.length=0,RL.length=0}}}}));function cR(e){let t=String(e),n=t.length-1;return Ez.context.id+(n?String.fromCharCode(96+n):``)+t}function lR(e){Ez.context=e}function uR(e,t){let n=Lz,r=Fz,i=e.length===0,a=t===void 0?r:t,o=i?Nz:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>_R(()=>RR(o)));Fz=o,Lz=null;try{return MR(s,!0)}finally{Lz=n,Fz=r}}function J(e,t){t=t?Object.assign({},jz,t):jz;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[ER.bind(n),e=>(typeof e==`function`&&(e=Iz&&Iz.running&&Iz.sources.has(n)?e(n.tValue):e(n.value)),DR(n,e))]}function dR(e,t,n){OR(AR(e,t,!0,1))}function fR(e,t,n){OR(AR(e,t,!1,1))}function pR(e,t,n){Mz=FR;let r=AR(e,t,!1,1),i=Uz&&wR(Uz);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),zz?zz.push(r):OR(r)}function Y(e,t,n){n=n?Object.assign({},jz,n):jz;let r=AR(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,OR(r),ER.bind(r)}function mR(e){return e&&typeof e==`object`&&`then`in e}function hR(e,t,n){let r,i,a;typeof t==`function`?(r=e,i=t,a=n||{}):(r=!0,i=e,a=t||{});let o=null,s=Pz,c=null,l=!1,u=!1,d=`initialValue`in a,f=typeof r==`function`&&Y(r),p=new Set,[m,h]=(a.storage||J)(a.initialValue),[g,_]=J(void 0),[v,y]=J(void 0,{equals:!1}),[b,x]=J(d?`ready`:`unresolved`);Ez.context&&(c=Ez.getNextContextId(),a.ssrLoadFrom===`initial`?s=a.initialValue:Ez.load&&Ez.has(c)&&(s=Ez.load(c)));function S(e,t,n,r){return o===e&&(o=null,r!==void 0&&(d=!0),(e===s||t===s)&&a.onHydrated&&queueMicrotask(()=>a.onHydrated(r,{value:t})),s=Pz,Iz&&e&&l?(Iz.promises.delete(e),l=!1,MR(()=>{Iz.running=!0,C(t,n)},!1)):C(t,n)),t}function C(e,t){MR(()=>{t===void 0&&h(()=>e),x(t===void 0?d?`ready`:`unresolved`:`errored`),_(t);for(let e of p.keys())e.decrement();p.clear()},!1)}function w(){let e=Uz&&wR(Uz),t=m(),n=g();if(n!==void 0&&!o)throw n;return Lz&&!Lz.user&&e&&dR(()=>{v(),o&&(e.resolved&&Iz&&l?Iz.promises.add(o):p.has(e)||(e.increment(),p.add(e)))}),t}function T(e=!0){if(e!==!1&&u)return;u=!1;let t=f?f():r;if(l=Iz&&Iz.running,t==null||t===!1){S(o,_R(m));return}Iz&&o&&Iz.promises.delete(o);let n,a=s===Pz?_R(()=>{try{return i(t,{value:m(),refetching:e})}catch(e){n=e}}):s;if(n!==void 0){S(o,void 0,BR(n),t);return}else if(!mR(a))return S(o,a,void 0,t),a;return o=a,`v`in a?(a.s===1?S(o,a.v,void 0,t):S(o,void 0,BR(a.v),t),a):(u=!0,queueMicrotask(()=>u=!1),MR(()=>{x(d?`refreshing`:`pending`),y()},!1),a.then(e=>S(a,e,void 0,t),e=>S(a,void 0,BR(e),t)))}Object.defineProperties(w,{state:{get:()=>b()},error:{get:()=>g()},loading:{get(){let e=b();return e===`pending`||e===`refreshing`}},latest:{get(){if(!d)return w();let e=g();if(e&&!o)throw e;return m()}}});let E=Fz;return f?dR(()=>(E=Fz,T(!1))):T(!1),[w,{refetch:e=>SR(E,()=>T(e)),mutate:h}]}function gR(e){return MR(e,!1)}function _R(e){if(Lz===null)return e();let t=Lz;Lz=null;try{return e()}finally{Lz=t}}function vR(e,t,n){let r=Array.isArray(e),i,a=n&&n.defer;return n=>{let o;if(r){o=Array(e.length);for(let t=0;t<e.length;t++)o[t]=e[t]()}else o=e();if(a)return a=!1,n;let s=_R(()=>t(o,i,n));return i=o,s}}function yR(e){pR(()=>_R(e))}function bR(e){return Fz===null||(Fz.cleanups===null?Fz.cleanups=[e]:Fz.cleanups.push(e)),e}function xR(){return Lz}function SR(e,t){let n=Fz,r=Lz;Fz=e,Lz=null;try{return MR(t,!0)}catch(e){VR(e)}finally{Fz=n,Lz=r}}function CR(e,t){let n=Symbol(`context`);return{id:n,Provider:UR(n),defaultValue:e}}function wR(e){let t;return Fz&&Fz.context&&(t=Fz.context[e.id])!==void 0?t:e.defaultValue}function TR(e){let t=Y(e),n=Y(()=>HR(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}function ER(){let e=Iz&&Iz.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===1)OR(this);else{let e=Rz;Rz=null,MR(()=>IR(this),!1),Rz=e}if(Lz){let e=this.observers?this.observers.length:0;Lz.sources?(Lz.sources.push(this),Lz.sourceSlots.push(e)):(Lz.sources=[this],Lz.sourceSlots=[e]),this.observers?(this.observers.push(Lz),this.observerSlots.push(Lz.sources.length-1)):(this.observers=[Lz],this.observerSlots=[Lz.sources.length-1])}return e&&Iz.sources.has(this)?this.tValue:this.value}function DR(e,t,n){let r=Iz&&Iz.running&&Iz.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(Iz){let r=Iz.running;(r||!n&&Iz.sources.has(e))&&(Iz.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&MR(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=Iz&&Iz.running;r&&Iz.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?Rz.push(n):zz.push(n),n.observers&&LR(n)),r?n.tState=1:n.state=1)}if(Rz.length>1e6)throw Rz=[],Error()},!1)}return t}function OR(e){if(!e.fn)return;RR(e);let t=Bz;kR(e,Iz&&Iz.running&&Iz.sources.has(e)?e.tValue:e.value,t),Iz&&!Iz.running&&Iz.sources.has(e)&&queueMicrotask(()=>{MR(()=>{Iz&&(Iz.running=!0),Lz=Fz=e,kR(e,e.tValue,t),Lz=Fz=null},!1)})}function kR(e,t,n){let r,i=Fz,a=Lz;Lz=Fz=e;try{r=e.fn(t)}catch(t){return e.pure&&(Iz&&Iz.running?(e.tState=1,e.tOwned&&e.tOwned.forEach(RR),e.tOwned=void 0):(e.state=1,e.owned&&e.owned.forEach(RR),e.owned=null)),e.updatedAt=n+1,VR(t)}finally{Lz=a,Fz=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?DR(e,r,!0):Iz&&Iz.running&&e.pure?(Iz.sources.has(e)||(e.value=r),Iz.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function AR(e,t,n,r=1,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Fz,context:Fz?Fz.context:null,pure:n};return Iz&&Iz.running&&(a.state=0,a.tState=r),Fz===null||Fz!==Nz&&(Iz&&Iz.running&&Fz.pure?Fz.tOwned?Fz.tOwned.push(a):Fz.tOwned=[a]:Fz.owned?Fz.owned.push(a):Fz.owned=[a]),a}function jR(e){let t=Iz&&Iz.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===2)return IR(e);if(e.suspense&&_R(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Bz);){if(t&&Iz.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(Iz.disposed.has(t))return}if((t?e.tState:e.state)===1)OR(e);else if((t?e.tState:e.state)===2){let t=Rz;Rz=null,MR(()=>IR(e,n[0]),!1),Rz=t}}}function MR(e,t){if(Rz)return e();let n=!1;t||(Rz=[]),zz?n=!0:zz=[],Bz++;try{let t=e();return NR(n),t}catch(e){n||(zz=null),Rz=null,VR(e)}}function NR(e){if(Rz&&=(PR(Rz),null),e)return;let t;if(Iz){if(!Iz.promises.size&&!Iz.queue.size){let e=Iz.sources,n=Iz.disposed;zz.push.apply(zz,Iz.effects),t=Iz.resolve;for(let e of zz)`tState`in e&&(e.state=e.tState),delete e.tState;Iz=null,MR(()=>{for(let e of n)RR(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)RR(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}Hz(!1)},!1)}else if(Iz.running){Iz.running=!1,Iz.effects.push.apply(Iz.effects,zz),zz=null,Hz(!0);return}}let n=zz;zz=null,n.length&&MR(()=>Mz(n),!1),t&&t()}function PR(e){for(let t=0;t<e.length;t++)jR(e[t])}function FR(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:jR(r)}if(Ez.context){if(Ez.count){Ez.effects||=[],Ez.effects.push(...e.slice(0,n));return}lR()}for(Ez.effects&&(Ez.done||!Ez.count)&&(e=[...Ez.effects,...e],n+=Ez.effects.length,delete Ez.effects),t=0;t<n;t++)jR(e[t])}function IR(e,t){let n=Iz&&Iz.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===1?i!==t&&(!i.updatedAt||i.updatedAt<Bz)&&jR(i):e===2&&IR(i,t)}}}function LR(e){let t=Iz&&Iz.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=2:r.state=2,r.pure?Rz.push(r):zz.push(r),r.observers&&LR(r))}}function RR(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)RR(e.tOwned[t]);delete e.tOwned}if(Iz&&Iz.running&&e.pure)zR(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)RR(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}Iz&&Iz.running?e.tState=0:e.state=0}function zR(e,t){if(t||(e.tState=0,Iz.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)zR(e.owned[t])}function BR(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function VR(e,t=Fz){throw BR(e)}function HR(e){if(typeof e==`function`&&!e.length)return HR(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=HR(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function UR(e,t){return function(t){let n;return fR(()=>n=_R(()=>(Fz.context={...Fz.context,[e]:t.value},TR(()=>t.children))),void 0),n}}function WR(e){for(let t=0;t<e.length;t++)e[t]()}function GR(e,t,n={}){let r=[],i=[],a=[],o=0,s=t.length>1?[]:null;return bR(()=>WR(a)),()=>{let c=e()||[],l=c.length,u,d;return c[Az],_R(()=>{let e,t,p,m,h,g,_,v,y;if(l===0)o!==0&&(WR(a),a=[],r=[],i=[],o=0,s&&=[]),n.fallback&&(r=[Wz],i[0]=uR(e=>(a[0]=e,n.fallback())),o=1);else if(o===0){for(i=Array(l),d=0;d<l;d++)r[d]=c[d],i[d]=uR(f);o=l}else{for(p=Array(l),m=Array(l),s&&(h=Array(l)),g=0,_=Math.min(o,l);g<_&&r[g]===c[g];g++);for(_=o-1,v=l-1;_>=g&&v>=g&&r[_]===c[v];_--,v--)p[v]=i[_],m[v]=a[_],s&&(h[v]=s[_]);for(e=new Map,t=Array(v+1),d=v;d>=g;d--)y=c[d],u=e.get(y),t[d]=u===void 0?-1:u,e.set(y,d);for(u=g;u<=_;u++)y=r[u],d=e.get(y),d!==void 0&&d!==-1?(p[d]=i[u],m[d]=a[u],s&&(h[d]=s[u]),d=t[d],e.set(y,d)):a[u]();for(d=g;d<l;d++)d in p?(i[d]=p[d],a[d]=m[d],s&&(s[d]=h[d],s[d](d))):i[d]=uR(f);i=i.slice(0,o=l),r=c.slice(0)}return i});function f(e){if(a[d]=e,s){let[e,n]=J(d);return s[d]=n,t(c[d],e)}return t(c[d])}}}function KR(e,t,n={}){let r=[],i=[],a=[],o=[],s=0,c;return bR(()=>WR(a)),()=>{let l=e()||[],u=l.length;return l[Az],_R(()=>{if(u===0)return s!==0&&(WR(a),a=[],r=[],i=[],s=0,o=[]),n.fallback&&(r=[Wz],i[0]=uR(e=>(a[0]=e,n.fallback())),s=1),i;for(r[0]===Wz&&(a[0](),a=[],r=[],i=[],s=0),c=0;c<u;c++)c<r.length&&r[c]!==l[c]?o[c](()=>l[c]):c>=r.length&&(i[c]=uR(d));for(;c<r.length;c++)a[c]();return s=o.length=a.length=u,r=l.slice(0),i=i.slice(0,s)});function d(e){a[c]=e;let[n,r]=J(l[c]);return o[c]=r,t(n,c)}}}function X(e,t){return _R(()=>e(t||{}))}function qR(){return!0}function JR(e){return(e=typeof e==`function`?e():e)?e:{}}function YR(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function XR(...e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];t||=!!r&&Oz in r,e[n]=typeof r==`function`?(t=!0,Y(r)):r}if(kz&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=JR(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in JR(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(JR(e[n])));return[...new Set(t)]}},Gz);let n={},r=Object.create(null);for(let t=e.length-1;t>=0;t--){let i=e[t];if(!i)continue;let a=Object.getOwnPropertyNames(i);for(let e=a.length-1;e>=0;e--){let t=a[e];if(t===`__proto__`||t===`constructor`)continue;let o=Object.getOwnPropertyDescriptor(i,t);if(!r[t])r[t]=o.get?{enumerable:!0,configurable:!0,get:YR.bind(n[t]=[o.get.bind(i)])}:o.value===void 0?void 0:o;else{let e=n[t];e&&(o.get?e.push(o.get.bind(i)):o.value!==void 0&&e.push(()=>o.value))}}}let i={},a=Object.keys(r);for(let e=a.length-1;e>=0;e--){let t=a[e],n=r[t];n&&n.get?Object.defineProperty(i,t,n):i[t]=n?n.value:void 0}return i}function ZR(e,...t){let n=t.length;if(kz&&Oz in e){let r=n>1?t.flat():t[0],i=t.map(t=>new Proxy({get(n){return t.includes(n)?e[n]:void 0},has(n){return t.includes(n)&&n in e},keys(){return t.filter(t=>t in e)}},Gz));return i.push(new Proxy({get(t){return r.includes(t)?void 0:e[t]},has(t){return!r.includes(t)&&t in e},keys(){return Object.keys(e).filter(e=>!r.includes(e))}},Gz)),i}let r=[];for(let e=0;e<=n;e++)r[e]={};for(let i of Object.getOwnPropertyNames(e)){let a=n;for(let e=0;e<t.length;e++)if(t[e].includes(i)){a=e;break}let o=Object.getOwnPropertyDescriptor(e,i);!o.get&&!o.set&&o.enumerable&&o.writable&&o.configurable?r[a][i]=o.value:Object.defineProperty(r[a],i,o)}return r}function QR(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return Y(GR(()=>e.each,e.children,t||void 0))}function $R(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return Y(KR(()=>e.each,e.children,t||void 0))}function ez(e){let t=e.keyed,n=Y(()=>e.when,void 0,void 0),r=t?n:Y(n,void 0,{equals:(e,t)=>!e==!t});return Y(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?_R(()=>a(t?i:()=>{if(!_R(r))throw Kz(`Show`);return n()})):a}return e.fallback},void 0,void 0)}function tz(e){let t=TR(()=>e.children),n=Y(()=>{let e=t(),n=Array.isArray(e)?e:[e],r=()=>void 0;for(let e=0;e<n.length;e++){let t=e,i=n[e],a=r,o=Y(()=>a()?void 0:i.when,void 0,void 0),s=i.keyed?o:Y(o,void 0,{equals:(e,t)=>!e==!t});r=()=>a()||(s()?[t,o,i]:void 0)}return r});return Y(()=>{let t=n()();if(!t)return e.fallback;let[r,i,a]=t,o=a.children;return typeof o==`function`&&o.length>0?_R(()=>o(a.keyed?i():()=>{if(_R(n)()?.[0]!==r)throw Kz(`Match`);return i()})):o},void 0,void 0)}function nz(e){return e}function rz(e,t){let n=Xz[e];return typeof n==`object`?n[t]?n.$:void 0:n}function iz(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null)if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&!((d=l.get(t[c]))==null||d!==r+u);)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++;else t[o++].remove()}}}function az(e,t,n,r={}){let i;return uR(r=>{i=r,t===document?e():$(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function Z(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>_R(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function oz(e,t=window.document){let n=t[eB]||(t[eB]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,xz))}}function Q(e,t,n){_z(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function sz(e,t,n,r){_z(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function cz(e,t,n){_z(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function lz(e,t){_z(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function uz(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function dz(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];!r||r===`undefined`||t[r]||(yz(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];!i||i===`undefined`||n[i]===o||!o||(yz(e,i,!0),n[i]=o)}return n}function fz(e,t,n){if(!t)return n?Q(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||={},t||={};let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function pz(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function mz(e,t={},n,r){let i={};return r||fR(()=>i.children=Sz(e,t.children,i.children)),fR(()=>typeof t.ref==`function`&&hz(t.ref,e)),fR(()=>gz(e,t,n,!0,i,!0)),i}function hz(e,t,n){return _R(()=>e(t,n))}function $(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return Sz(e,t,r,n);fR(r=>Sz(e,t(),r,n),r)}function gz(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=bz(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||Sz(e,t.children);continue}let s=t[o];i[o]=bz(e,o,s,i[o],n,a,t)}}function _z(e){return!!Ez.context&&!Ez.done&&(!e||e.isConnected)}function vz(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function yz(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function bz(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return fz(e,n,r);if(t===`classList`)return dz(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=Zz.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(uz(e,i,n,a),a&&oz([i]))}else if(t.slice(0,5)===`attr:`)Q(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)cz(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=Jz.has(t))||!i&&((u=rz(t,e.tagName))||(c=qz.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(_z(e))return n;t===`class`||t===`className`?lz(e,n):s&&!c&&!l?e[vz(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&Qz[t.split(`:`)[0]];r?sz(e,r,t,n):Q(e,Yz[t]||t,n)}return n}function xz(e){if(Ez.registry&&Ez.events&&Ez.events.find(([t,n])=>n===e))return;let t=e.target,n=`$$${e.type}`,r=e.target,i=e.currentTarget,a=t=>Object.defineProperty(e,"target",{configurable:!0,value:t}),o=()=>{let r=t[n];if(r&&!t.disabled){let i=t[`${n}Data`];if(i===void 0?r.call(t,e):r.call(t,i,e),e.cancelBubble)return}return t.host&&typeof t.host!=`string`&&!t.host._$host&&t.contains(e.target)&&a(t.host),!0},s=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),Ez.registry&&!Ez.done&&(Ez.done=_$HY.done=!0),e.composedPath){let n=e.composedPath();a(n[0]);for(let e=0;e<n.length-2&&(t=n[e],o());e++){if(t._$host){t=t._$host,s();break}if(t.parentNode===i)break}}else s();a(r)}function Sz(e,t,n,r,i){let a=_z(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=Tz(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=Tz(e,n,r)}else if(o===`function`)return fR(()=>{let i=t();for(;typeof i==`function`;)i=i();n=Sz(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(Cz(o,t,n,i))return fR(()=>n=Sz(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=Tz(e,n,r),s)return n}else c?n.length===0?wz(e,o,r):iz(e,n,o):(n&&Tz(e),wz(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=Tz(e,n,r,t);Tz(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function Cz(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(!(o==null||o===!0||o===!1))if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=Cz(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=Cz(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0;else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}return i}function wz(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Tz(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}var Ez,Dz,Oz,kz,Az,jz,Mz,Nz,Pz,Fz,Iz,Lz,Rz,zz,Bz,Vz,Hz,Uz,Wz,Gz,Kz,qz,Jz,Yz,Xz,Zz,Qz,$z,eB,tB,nB,rB,iB,aB,oB,sB,cB,lB,uB,dB,fB,pB,mB,hB,gB,_B,vB,yB,bB,xB,SB,CB,wB,TB,EB,DB,OB,kB,AB,jB,MB,NB,PB,FB,IB,LB,RB,zB,BB,VB,HB,UB,WB,GB,KB,qB,JB,YB,XB,ZB,QB,$B,eV,tV,nV,rV,iV,aV,oV,sV,cV,lV,uV,dV,fV,pV,mV,hV,gV,_V,vV,yV,bV,xV,SV,CV,wV,TV,EV,DV,OV,kV,AV,jV,MV,NV,PV,FV,IV,LV,RV,zV,BV=t((()=>{sR(),Ez={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return cR(this.context.count)},getNextContextId(){return cR(this.context.count++)}},Dz=(e,t)=>e===t,Oz=Symbol(`solid-proxy`),kz=typeof Proxy==`function`,Az=Symbol(`solid-track`),jz={equals:Dz},Mz=PR,Nz={owned:null,cleanups:null,context:null,owner:null},Pz={},Fz=null,Iz=null,Lz=null,Rz=null,zz=null,Bz=0,[Vz,Hz]=J(!1),Wz=Symbol(`fallback`),Gz={get(e,t,n){return t===Oz?n:e.get(t)},has(e,t){return t===Oz||e.has(t)},set:qR,deleteProperty:qR,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:qR,deleteProperty:qR}},ownKeys(e){return e.keys()}},Kz=e=>`Stale read from <${e}>.`,qz=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)]),Jz=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),Yz=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),Xz=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}}),Zz=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),Qz={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},$z=e=>Y(()=>e()),eB=`_$DX_DELEGATE`,tB=e=>!!(e?.isConnected??e?.ownerDocument?.contains(e)),nB=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],rB=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},iB=e=>{if(document.designMode===`on`)return!0;let t=rB(e);if(!t)return!1;if(t.isContentEditable)return!0;let n=MN(t);return nB.some(e=>e===n||e===t.role)},aB=e=>{let t=e.target;if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){let e=t.selectionStart??0;return(t.selectionEnd??0)-e>0}return!1},oB=()=>{let e=window.getSelection();return e?e.toString().length>0:!1},sB=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+%?))?\s*\)$/,cB=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`),lB=(e,t,n,r=1)=>{let i=cB(e),a=cB(t),o=cB(n);return r>=1?`#${i}${a}${o}`:`#${i}${a}${o}${cB(r*255)}`},uB=e=>{if(!e.startsWith(`#`))return null;let t=e.slice(1);if(t.length!==6&&t.length!==8)return null;let n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16),a=t.length===8?parseInt(t.slice(6,8),16)/255:1;return!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)?null:{red:n,green:r,blue:i,alpha:a}},dB=e=>{let t=e.match(sB);if(!t)return null;let n=1;if(t[4]!==void 0){let e=t[4];n=e.endsWith(`%`)?Number(e.slice(0,-1))/100:Number(e)}return lB(Number(t[1]),Number(t[2]),Number(t[3]),n)},fB=e=>{let t=e.match(sB);return!t||t[4]===void 0?!1:(t[4].endsWith(`%`)?Number(t[4].slice(0,-1))/100:Number(t[4]))===0},pB=/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,mB=e=>{let t=e.match(pB);if(!t)return null;let n=t[1];return n.length===3?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`:n.length===4?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}${n[3]}${n[3]}`:`#${n}`},hB=`rgba(0, 0, 0, 0)`,gB=/^oklch\(\s*([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+)(deg|grad|rad|turn)?(?:\s*\/\s*([+-]?\d*\.?\d+%?))?\s*\)$/i,_B=180/Math.PI,vB=(e,t)=>e.endsWith(`%`)?Number(e.slice(0,-1))/100*t:Number(e),yB=(e,t)=>{let n=Number(e);return t===`grad`?n*.9:t===`rad`?n*_B:t===`turn`?n*360:n},bB=e=>{let t=Math.max(0,Math.min(1,e));return(t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055)*255},xB=e=>{let t=e.match(gB);if(!t)return null;let n=vB(t[1],1),r=vB(t[2],.4),i=yB(t[3],t[4])*Math.PI/180,a=t[5]===void 0?1:vB(t[5],1);if(![n,r,i,a].every(Number.isFinite))return null;let o=r*Math.cos(i),s=r*Math.sin(i),c=n+.3963377774*o+.2158037573*s,l=n-.1055613458*o-.0638541728*s,u=n-.0894841775*o-1.291485548*s,d=c**3,f=l**3,p=u**3,m=4.0767416621*d-3.3077115913*f+.2309699292*p,h=-1.2684380046*d+2.6097574011*f-.3413193965*p,g=-.0041960863*d-.7034186147*f+1.707614701*p;return lB(bB(m),bB(h),bB(g),Math.max(0,Math.min(1,a)))},SB=null,CB=()=>SB||(typeof document>`u`?null:(SB=document.createElement(`canvas`).getContext(`2d`,{willReadFrequently:!0}),SB)),wB=(e,t)=>{e.clearRect(0,0,1,1),e.fillStyle=t,e.fillRect(0,0,1,1);let n=e.getImageData(0,0,1,1).data;return n[3]===0?bN:lB(n[0],n[1],n[2],n[3]/255)},TB=e=>{let t=e.trim();if(!t)return null;if(t.toLowerCase()===`transparent`)return bN;let n=mB(t);if(n)return n;let r=xB(t);if(r)return r;let i=CB();if(!i)return null;i.fillStyle=hB,i.fillStyle=t;let a=i.fillStyle;return typeof a==`string`?a.toLowerCase()===hB?t.toLowerCase().replace(/\s+/g,``)===`rgba(0,0,0,0)`?bN:null:a.startsWith(`#`)&&a.length===7?a:a.startsWith(`rgb`)?dB(a):wB(i,t):null},EB=(e,t,n)=>Math.max(t,Math.min(e,n)),DB=null,OB=()=>{if(typeof navigator>`u`||!(`userAgentData`in navigator))return null;let e=navigator.userAgentData;if(typeof e!=`object`||!e||!(`platform`in e))return null;let t=e.platform;return typeof t==`string`?t:null},kB=()=>{if(DB===null){if(typeof navigator>`u`)return DB=!1,DB;let e=navigator.platform??OB()??navigator.userAgent;DB=/Mac|iPhone|iPad|iPod/i.test(e)}return DB},AB=(e,t)=>{try{return e.composedPath().some(e=>e instanceof HTMLElement&&e.hasAttribute(t))}catch{return!1}},jB=`padding-top.padding-right.padding-bottom.padding-left.margin-top.margin-right.margin-bottom.margin-left.gap.row-gap.column-gap.font-size.line-height.letter-spacing.border-radius.border-top-left-radius.border-top-right-radius.border-bottom-right-radius.border-bottom-left-radius.border-width.border-top-width.border-right-width.border-bottom-width.border-left-width.opacity.width.height.min-width.min-height.max-width.max-height.top.right.bottom.left.z-index`.split(`.`),MB=-128,NB=-512,PB=-9999,FB=9999,IB=new Set([`letter-spacing`,`gap`,`row-gap`,`column-gap`]),LB=new Set([`z-index`]),RB=[{key:`padding`,label:`padding`,longhands:[`padding-top`,`padding-right`,`padding-bottom`,`padding-left`]},{key:`padding-top,padding-bottom`,label:`padding-y`,longhands:[`padding-top`,`padding-bottom`]},{key:`padding-left,padding-right`,label:`padding-x`,longhands:[`padding-left`,`padding-right`]},{key:`padding-top`,label:`padding top`,longhands:[`padding-top`]},{key:`padding-right`,label:`padding right`,longhands:[`padding-right`]},{key:`padding-bottom`,label:`padding bottom`,longhands:[`padding-bottom`]},{key:`padding-left`,label:`padding left`,longhands:[`padding-left`]}],zB=[{key:`margin`,label:`margin`,longhands:[`margin-top`,`margin-right`,`margin-bottom`,`margin-left`]},{key:`margin-top,margin-bottom`,label:`margin-y`,longhands:[`margin-top`,`margin-bottom`]},{key:`margin-left,margin-right`,label:`margin-x`,longhands:[`margin-left`,`margin-right`]},{key:`margin-top`,label:`margin top`,longhands:[`margin-top`]},{key:`margin-right`,label:`margin right`,longhands:[`margin-right`]},{key:`margin-bottom`,label:`margin bottom`,longhands:[`margin-bottom`]},{key:`margin-left`,label:`margin left`,longhands:[`margin-left`]}],BB=[{key:`gap`,label:`gap`,longhands:[`row-gap`,`column-gap`]},{key:`row-gap`,label:`row gap`,longhands:[`row-gap`]},{key:`column-gap`,label:`column gap`,longhands:[`column-gap`]}],VB=[{key:`border-radius`,label:`border radius`,longhands:[`border-top-left-radius`,`border-top-right-radius`,`border-bottom-right-radius`,`border-bottom-left-radius`]},{key:`border-top-left-radius,border-top-right-radius`,label:`top corners`,longhands:[`border-top-left-radius`,`border-top-right-radius`]},{key:`border-bottom-left-radius,border-bottom-right-radius`,label:`bottom corners`,longhands:[`border-bottom-left-radius`,`border-bottom-right-radius`]},{key:`border-top-left-radius,border-bottom-left-radius`,label:`left corners`,longhands:[`border-top-left-radius`,`border-bottom-left-radius`]},{key:`border-top-right-radius,border-bottom-right-radius`,label:`right corners`,longhands:[`border-top-right-radius`,`border-bottom-right-radius`]},{key:`border-top-left-radius`,label:`top left radius`,longhands:[`border-top-left-radius`]},{key:`border-top-right-radius`,label:`top right radius`,longhands:[`border-top-right-radius`]},{key:`border-bottom-right-radius`,label:`bottom right radius`,longhands:[`border-bottom-right-radius`]},{key:`border-bottom-left-radius`,label:`bottom left radius`,longhands:[`border-bottom-left-radius`]}],HB=[{key:`top,right,bottom,left`,label:`inset`,longhands:[`top`,`right`,`bottom`,`left`]},{key:`top,bottom`,label:`inset-y`,longhands:[`top`,`bottom`]},{key:`left,right`,label:`inset-x`,longhands:[`left`,`right`]},{key:`top`,label:`top`,longhands:[`top`]},{key:`right`,label:`right`,longhands:[`right`]},{key:`bottom`,label:`bottom`,longhands:[`bottom`]},{key:`left`,label:`left`,longhands:[`left`]}],UB=new Set(HB.map(e=>e.key)),WB=[RB,zB,BB,VB,[{key:`border-width`,label:`border width`,longhands:[`border-top-width`,`border-right-width`,`border-bottom-width`,`border-left-width`]},{key:`border-top-width`,label:`border top width`,longhands:[`border-top-width`]},{key:`border-right-width`,label:`border right width`,longhands:[`border-right-width`]},{key:`border-bottom-width`,label:`border bottom width`,longhands:[`border-bottom-width`]},{key:`border-left-width`,label:`border left width`,longhands:[`border-left-width`]}],[{key:`width,height`,label:`size`,longhands:[`width`,`height`]},{key:`width`,label:`width`,longhands:[`width`]},{key:`height`,label:`height`,longhands:[`height`]}],HB],GB=[{key:`font-size`,label:`font size`},{key:`line-height`,label:`line height`},{key:`letter-spacing`,label:`letter spacing`},{key:`min-width`,label:`min width`},{key:`min-height`,label:`min height`},{key:`max-width`,label:`max width`},{key:`max-height`,label:`max height`},{key:`z-index`,label:`z-index`},{key:`opacity`,label:`opacity`}],KB=[{key:`color`,label:`text color`,alwaysShow:!0},{key:`background-color`,label:`background`,alwaysShow:!0},{key:`border-color`,label:`border color`},{key:`fill`,label:`fill`},{key:`stroke`,label:`stroke`}],qB=[{value:`ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`,label:`sans`},{value:`ui-serif, Georgia, Cambria, "Times New Roman", Times, serif`,label:`serif`},{value:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`,label:`mono`},{value:`system-ui, sans-serif`,label:`system`},{value:`serif`,label:`serif`},{value:`monospace`,label:`mono`}],JB=e=>{let t=e.trim();return qB.some(e=>e.value===t)?qB:[{value:t,label:`current`},...qB]},YB={key:`font-family`,label:`font family`},XB=[{key:`display`,label:`display`,options:[{value:`block`,label:`block`},{value:`flex`,label:`flex`},{value:`inline-block`,label:`inline-block`},{value:`inline`,label:`inline`},{value:`grid`,label:`grid`},{value:`none`,label:`none`}]},{key:`text-align`,label:`text align`,options:[{value:`left`,label:`left`},{value:`center`,label:`center`},{value:`right`,label:`right`},{value:`justify`,label:`justify`}]},{key:`font-style`,label:`font style`,options:[{value:`normal`,label:`normal`},{value:`italic`,label:`italic`}]},{key:`text-transform`,label:`text transform`,options:[{value:`none`,label:`none`},{value:`uppercase`,label:`uppercase`},{value:`lowercase`,label:`lowercase`},{value:`capitalize`,label:`capitalize`}]},{key:`white-space`,label:`white space`,options:[{value:`normal`,label:`normal`},{value:`nowrap`,label:`nowrap`},{value:`pre`,label:`pre`},{value:`pre-wrap`,label:`pre-wrap`},{value:`pre-line`,label:`pre-line`},{value:`break-spaces`,label:`break-spaces`}]},{key:`word-break`,label:`word break`,options:[{value:`normal`,label:`normal`},{value:`break-all`,label:`break-all`},{value:`keep-all`,label:`keep-all`}]},{key:`overflow-wrap`,label:`wrap`,options:[{value:`normal`,label:`normal`},{value:`break-word`,label:`break-word`},{value:`anywhere`,label:`anywhere`}]},{key:`font-variant-numeric`,label:`number style`,options:[{value:`normal`,label:`normal`},{value:`tabular-nums`,label:`tabular`},{value:`proportional-nums`,label:`proportional`},{value:`lining-nums`,label:`lining`},{value:`oldstyle-nums`,label:`oldstyle`},{value:`slashed-zero`,label:`slashed zero`}]},{key:`text-decoration-line`,label:`decoration`,options:[{value:`none`,label:`none`},{value:`underline`,label:`underline`},{value:`line-through`,label:`strike`}]},{key:`border-style`,label:`border style`,options:[{value:`none`,label:`none`},{value:`solid`,label:`solid`},{value:`dashed`,label:`dashed`},{value:`dotted`,label:`dotted`}]},{key:`visibility`,label:`visibility`,options:[{value:`visible`,label:`visible`},{value:`hidden`,label:`hidden`}]},{key:`align-items`,label:`align items`,options:[{value:`stretch`,label:`stretch`},{value:`flex-start`,label:`start`},{value:`center`,label:`center`},{value:`flex-end`,label:`end`},{value:`baseline`,label:`baseline`}]},{key:`justify-content`,label:`justify content`,options:[{value:`flex-start`,label:`start`},{value:`center`,label:`center`},{value:`flex-end`,label:`end`},{value:`space-between`,label:`between`},{value:`space-around`,label:`around`},{value:`space-evenly`,label:`evenly`}]},{key:`font-weight`,label:`font weight`,options:[{value:`100`,label:`thin`},{value:`200`,label:`extra-light`},{value:`300`,label:`light`},{value:`400`,label:`normal`},{value:`500`,label:`medium`},{value:`600`,label:`semibold`},{value:`700`,label:`bold`},{value:`800`,label:`extra-bold`},{value:`900`,label:`black`}]}],ZB=[...jB,`color`,`background-color`,`border-color`,`fill`,`stroke`,`font-family`,`display`,`text-align`,`font-style`,`text-transform`,`white-space`,`word-break`,`overflow-wrap`,`font-variant-numeric`,`text-decoration-line`,`border-style`,`visibility`,`align-items`,`justify-content`,`font-weight`],QB=e=>Number.isInteger(e)?e:Math.round(e*100)/100,$B=e=>Number.isInteger(e)?String(e):e.toFixed(2).replace(/\.?0+$/,``),eV=e=>Number.isFinite(e)?$B(QB(e)):String(e),tV=e=>Math.round(e),nV=(e,t)=>{if(e.kind===`color`||e.kind===`enum`)return typeof t==`string`?t:e.value;let n=typeof t==`number`?t:e.value;return e.key===`opacity`&&e.unit===`%`?$B(QB(n/100)):`${$B(QB(n))}${e.unit}`},rV={slate:{50:`#f8fafc`,100:`#f1f5f9`,200:`#e2e8f0`,300:`#cbd5e1`,400:`#94a3b8`,500:`#64748b`,600:`#475569`,700:`#334155`,800:`#1e293b`,900:`#0f172a`,950:`#020617`},gray:{50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#1f2937`,900:`#111827`,950:`#030712`},zinc:{50:`#fafafa`,100:`#f4f4f5`,200:`#e4e4e7`,300:`#d4d4d8`,400:`#a1a1aa`,500:`#71717a`,600:`#52525b`,700:`#3f3f46`,800:`#27272a`,900:`#18181b`,950:`#09090b`},neutral:{50:`#fafafa`,100:`#f5f5f5`,200:`#e5e5e5`,300:`#d4d4d4`,400:`#a3a3a3`,500:`#737373`,600:`#525252`,700:`#404040`,800:`#262626`,900:`#171717`,950:`#0a0a0a`},stone:{50:`#fafaf9`,100:`#f5f5f4`,200:`#e7e5e4`,300:`#d6d3d1`,400:`#a8a29e`,500:`#78716c`,600:`#57534e`,700:`#44403c`,800:`#292524`,900:`#1c1917`,950:`#0c0a09`},red:{50:`#fef2f2`,100:`#fee2e2`,200:`#fecaca`,300:`#fca5a5`,400:`#f87171`,500:`#ef4444`,600:`#dc2626`,700:`#b91c1c`,800:`#991b1b`,900:`#7f1d1d`,950:`#450a0a`},orange:{50:`#fff7ed`,100:`#ffedd5`,200:`#fed7aa`,300:`#fdba74`,400:`#fb923c`,500:`#f97316`,600:`#ea580c`,700:`#c2410c`,800:`#9a3412`,900:`#7c2d12`,950:`#431407`},amber:{50:`#fffbeb`,100:`#fef3c7`,200:`#fde68a`,300:`#fcd34d`,400:`#fbbf24`,500:`#f59e0b`,600:`#d97706`,700:`#b45309`,800:`#92400e`,900:`#78350f`,950:`#451a03`},yellow:{50:`#fefce8`,100:`#fef9c3`,200:`#fef08a`,300:`#fde047`,400:`#facc15`,500:`#eab308`,600:`#ca8a04`,700:`#a16207`,800:`#854d0e`,900:`#713f12`,950:`#422006`},lime:{50:`#f7fee7`,100:`#ecfccb`,200:`#d9f99d`,300:`#bef264`,400:`#a3e635`,500:`#84cc16`,600:`#65a30d`,700:`#4d7c0f`,800:`#3f6212`,900:`#365314`,950:`#1a2e05`},green:{50:`#f0fdf4`,100:`#dcfce7`,200:`#bbf7d0`,300:`#86efac`,400:`#4ade80`,500:`#22c55e`,600:`#16a34a`,700:`#15803d`,800:`#166534`,900:`#14532d`,950:`#052e16`},emerald:{50:`#ecfdf5`,100:`#d1fae5`,200:`#a7f3d0`,300:`#6ee7b7`,400:`#34d399`,500:`#10b981`,600:`#059669`,700:`#047857`,800:`#065f46`,900:`#064e3b`,950:`#022c22`},teal:{50:`#f0fdfa`,100:`#ccfbf1`,200:`#99f6e4`,300:`#5eead4`,400:`#2dd4bf`,500:`#14b8a6`,600:`#0d9488`,700:`#0f766e`,800:`#115e59`,900:`#134e4a`,950:`#042f2e`},cyan:{50:`#ecfeff`,100:`#cffafe`,200:`#a5f3fc`,300:`#67e8f9`,400:`#22d3ee`,500:`#06b6d4`,600:`#0891b2`,700:`#0e7490`,800:`#155e75`,900:`#164e63`,950:`#083344`},sky:{50:`#f0f9ff`,100:`#e0f2fe`,200:`#bae6fd`,300:`#7dd3fc`,400:`#38bdf8`,500:`#0ea5e9`,600:`#0284c7`,700:`#0369a1`,800:`#075985`,900:`#0c4a6e`,950:`#082f49`},blue:{50:`#eff6ff`,100:`#dbeafe`,200:`#bfdbfe`,300:`#93c5fd`,400:`#60a5fa`,500:`#3b82f6`,600:`#2563eb`,700:`#1d4ed8`,800:`#1e40af`,900:`#1e3a8a`,950:`#172554`},indigo:{50:`#eef2ff`,100:`#e0e7ff`,200:`#c7d2fe`,300:`#a5b4fc`,400:`#818cf8`,500:`#6366f1`,600:`#4f46e5`,700:`#4338ca`,800:`#3730a3`,900:`#312e81`,950:`#1e1b4b`},violet:{50:`#f5f3ff`,100:`#ede9fe`,200:`#ddd6fe`,300:`#c4b5fd`,400:`#a78bfa`,500:`#8b5cf6`,600:`#7c3aed`,700:`#6d28d9`,800:`#5b21b6`,900:`#4c1d95`,950:`#2e1065`},purple:{50:`#faf5ff`,100:`#f3e8ff`,200:`#e9d5ff`,300:`#d8b4fe`,400:`#c084fc`,500:`#a855f7`,600:`#9333ea`,700:`#7e22ce`,800:`#6b21a8`,900:`#581c87`,950:`#3b0764`},fuchsia:{50:`#fdf4ff`,100:`#fae8ff`,200:`#f5d0fe`,300:`#f0abfc`,400:`#e879f9`,500:`#d946ef`,600:`#c026d3`,700:`#a21caf`,800:`#86198f`,900:`#701a75`,950:`#4a044e`},pink:{50:`#fdf2f8`,100:`#fce7f3`,200:`#fbcfe8`,300:`#f9a8d4`,400:`#f472b6`,500:`#ec4899`,600:`#db2777`,700:`#be185d`,800:`#9d174d`,900:`#831843`,950:`#500724`},rose:{50:`#fff1f2`,100:`#ffe4e6`,200:`#fecdd3`,300:`#fda4af`,400:`#fb7185`,500:`#f43f5e`,600:`#e11d48`,700:`#be123c`,800:`#9f1239`,900:`#881337`,950:`#4c0519`}},iV={p:`padding`,px:`padding-left,padding-right`,py:`padding-top,padding-bottom`,pt:`padding-top`,pr:`padding-right`,pb:`padding-bottom`,pl:`padding-left`,ps:`padding-left`,pe:`padding-right`,m:`margin`,mx:`margin-left,margin-right`,my:`margin-top,margin-bottom`,mt:`margin-top`,mr:`margin-right`,mb:`margin-bottom`,ml:`margin-left`,ms:`margin-left`,me:`margin-right`,gap:`gap`,"gap-x":`column-gap`,"gap-y":`row-gap`,text:`font-size`,leading:`line-height`,tracking:`letter-spacing`,rounded:`border-radius`,"rounded-t":`border-top-left-radius,border-top-right-radius`,"rounded-b":`border-bottom-left-radius,border-bottom-right-radius`,"rounded-l":`border-top-left-radius,border-bottom-left-radius`,"rounded-r":`border-top-right-radius,border-bottom-right-radius`,"rounded-tl":`border-top-left-radius`,"rounded-tr":`border-top-right-radius`,"rounded-bl":`border-bottom-left-radius`,"rounded-br":`border-bottom-right-radius`,border:`border-width`,"border-t":`border-top-width`,"border-r":`border-right-width`,"border-b":`border-bottom-width`,"border-l":`border-left-width`,w:`width`,h:`height`,size:`width,height`,"max-w":`max-width`,"max-h":`max-height`,"min-w":`min-width`,"min-h":`min-height`,opacity:`opacity`,inset:`top,right,bottom,left`,"inset-x":`left,right`,"inset-y":`top,bottom`,top:`top`,right:`right`,bottom:`bottom`,left:`left`,z:`z-index`,items:`align-items`,justify:`justify-content`,font:`font-weight`,whitespace:`white-space`},aV={"font-size":[`font-size`,`font size`,`text-size`,`text size`],color:[`color`,`text-color`,`text color`,`text-colour`,`text colour`,`foreground`,`fg`],"background-color":[`background`,`background-color`,`background color`,`bg`,`bg-color`,`bg color`],"border-color":[`border-color`,`border color`],fill:[`fill`,`fill-color`,`fill color`],stroke:[`stroke`,`stroke-color`,`stroke color`],"font-family":[`font`,`font-sans`,`font-serif`,`font-mono`,`family`,`sans`,`serif`,`mono`],"font-style":[`italic`,`not-italic`],"text-align":[`text-left`,`text-center`,`text-right`,`text-justify`],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-decoration-line":[`underline`,`line-through`,`no-underline`],"white-space":[`whitespace`,`whitespace-normal`,`whitespace-nowrap`,`whitespace-pre`],"word-break":[`break-normal`,`break-all`,`break-keep`],"overflow-wrap":[`break-words`,`break-anywhere`],"font-variant-numeric":[`tabular-nums`,`proportional-nums`,`lining-nums`,`oldstyle-nums`],"border-style":[`border-solid`,`border-dashed`,`border-dotted`,`border-none`]},oV=(()=>{let e={};for(let[t,n]of Object.entries(iV))n!==void 0&&(e[n]??=new Set).add(t);let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=Array.from(r));for(let[e,n]of Object.entries(aV)){let r=new Set([...t[e]??[],...n]);t[e]=Array.from(r)}return t})(),sV={text:`color`,bg:`background-color`,border:`border-color`,"border-x":`border-color`,"border-y":`border-color`,"border-t":`border-color`,"border-r":`border-color`,"border-b":`border-color`,"border-l":`border-color`,"border-s":`border-color`,"border-e":`border-color`,fill:`fill`,stroke:`stroke`},cV=e=>iV[e]!==void 0||sV[e]!==void 0,lV=e=>{let t=0,n=-1;for(let r=0;r<e.length;r++){let i=e[r];i===`[`?t++:i===`]`?t--:i===`:`&&t===0&&(n=r)}let r=n>=0?e.slice(n+1):e;return r.startsWith(`!`)?r.slice(1):r},uV=e=>{let t=lV(e);if(!t)return null;let n=t.indexOf(`[`);if(n>0)return t.slice(0,n).replace(/-$/,``)||null;let r=t.split(`-`).filter(Boolean);if(r.length===0)return null;for(let e=r.length;e>=1;e--){let t=r.slice(0,e).join(`-`);if(cV(t))return t}return r[0]},dV=/-(red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone|black|white|transparent|current|inherit)\b/,fV=(e,t)=>e!==`text`&&e!==`bg`&&e!==`border`&&!e.startsWith(`border-`)?!1:dV.test(t),pV=new Set(`color.red.orange.amber.yellow.lime.green.emerald.teal.cyan.sky.blue.indigo.violet.purple.fuchsia.pink.rose.slate.gray.grey.zinc.neutral.stone.black.white.transparent.current.currentcolor.inherit.primary.secondary.accent.muted.foreground.background.destructive.success.warning.error.info.card.popover.input.ring`.split(`.`)),mV=new Set([`xs`,`sm`,`base`,`lg`,`xl`,`2xl`,`3xl`,`4xl`,`5xl`,`6xl`,`7xl`,`8xl`,`9xl`]),hV=/^(#|rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color:|color\(|var\(--.*color)/,gV=/^(-?\d|length:|size:)/,_V=e=>e.trim().toLowerCase().replace(/\s+/g,`-`).replace(/([a-z])(\d)/g,`$1-$2`),vV=e=>hV.test(e)&&!gV.test(e),yV=(e,t)=>{if(e===t)return``;let n=`${t}-`;return e.startsWith(n)?e.slice(n.length):null},bV=e=>{let t=lV(_V(e)),n=uV(t);if(!n)return null;let r=sV[n];if(!r)return null;let i=t.indexOf(`[`);if(i>=0)return vV(t.slice(i+1).replace(/\]$/,``))?r:null;let a=yV(t,n);if(a===null)return null;if(n===`bg`&&a===``||(n===`fill`||n===`stroke`)&&a===``)return r;let o=a.split(`-`)[0];return n===`text`&&mV.has(o)?null:pV.has(o)?r:null},xV={black:`#000000`,white:`#ffffff`,transparent:bN},SV=e=>{let t=lV(_V(e)),n=uV(t);if(!n||sV[n]===void 0||t.includes(`[`))return null;let r=yV(t,n);if(!r)return null;let i=xV[r];if(i)return i;let a=r.lastIndexOf(`-`);if(a<0)return null;let o=r.slice(0,a),s=o===`grey`?`gray`:o,c=Number.parseInt(r.slice(a+1),10);return rV[s]?.[c]??null},CV=/^-?\d/,wV=(e,t)=>{if(t===``||t.startsWith(`[`)||CV.test(t))return!0;let n=t.split(`-`)[0];return e===`text`?mV.has(n):e===`font`||e===`border`||e.startsWith(`border-`)?!1:(e===`rounded`||e.startsWith(`rounded-`),!0)},TV={"font-sans":{property:`font-family`,value:`ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`},"font-serif":{property:`font-family`,value:`ui-serif, Georgia, Cambria, "Times New Roman", Times, serif`},"font-mono":{property:`font-family`,value:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`},"font-thin":{property:`font-weight`,value:`100`},"font-extralight":{property:`font-weight`,value:`200`},"font-light":{property:`font-weight`,value:`300`},"font-normal":{property:`font-weight`,value:`400`},"font-medium":{property:`font-weight`,value:`500`},"font-semibold":{property:`font-weight`,value:`600`},"font-bold":{property:`font-weight`,value:`700`},"font-extrabold":{property:`font-weight`,value:`800`},"font-black":{property:`font-weight`,value:`900`},"text-left":{property:`text-align`,value:`left`},"text-center":{property:`text-align`,value:`center`},"text-right":{property:`text-align`,value:`right`},"text-justify":{property:`text-align`,value:`justify`},italic:{property:`font-style`,value:`italic`},"not-italic":{property:`font-style`,value:`normal`},uppercase:{property:`text-transform`,value:`uppercase`},lowercase:{property:`text-transform`,value:`lowercase`},capitalize:{property:`text-transform`,value:`capitalize`},"normal-case":{property:`text-transform`,value:`none`},underline:{property:`text-decoration-line`,value:`underline`},"line-through":{property:`text-decoration-line`,value:`line-through`},"no-underline":{property:`text-decoration-line`,value:`none`},"whitespace-normal":{property:`white-space`,value:`normal`},"whitespace-nowrap":{property:`white-space`,value:`nowrap`},"whitespace-pre":{property:`white-space`,value:`pre`},"whitespace-pre-line":{property:`white-space`,value:`pre-line`},"whitespace-pre-wrap":{property:`white-space`,value:`pre-wrap`},"whitespace-break-spaces":{property:`white-space`,value:`break-spaces`},"break-normal":{property:`word-break`,value:`normal`},"break-all":{property:`word-break`,value:`break-all`},"break-keep":{property:`word-break`,value:`keep-all`},"break-words":{property:`overflow-wrap`,value:`break-word`},"break-anywhere":{property:`overflow-wrap`,value:`anywhere`},"tabular-nums":{property:`font-variant-numeric`,value:`tabular-nums`},"proportional-nums":{property:`font-variant-numeric`,value:`proportional-nums`},"lining-nums":{property:`font-variant-numeric`,value:`lining-nums`},"oldstyle-nums":{property:`font-variant-numeric`,value:`oldstyle-nums`},"slashed-zero":{property:`font-variant-numeric`,value:`slashed-zero`},"border-solid":{property:`border-style`,value:`solid`},"border-dashed":{property:`border-style`,value:`dashed`},"border-dotted":{property:`border-style`,value:`dotted`},"border-none":{property:`border-style`,value:`none`}},EV=e=>{let t=_V(e);if(!t)return[];let n=jV(t);if(n)return[n.property];let r=bV(t);return r?[r]:[]},DV=e=>{let t=_V(e);if(!t)return[];let n=uV(t);if(!n)return[];let r=yV(lV(t),n);if(r===null||!wV(n,r))return[];let i=AV(n);return i?[i]:[]},OV=e=>{let t=e.getAttribute(`class`);if(!t)return new Set;let n=t.split(/\s+/).filter(Boolean),r=new Set;for(let e of n){let t=uV(e);if(!t||fV(t,e))continue;let n=jV(e);if(n){r.add(n.property);continue}let i=AV(t);i&&r.add(i)}return r},kV=e=>oV[e]??[],AV=e=>{let t=iV[e];return t===void 0?null:t},jV=e=>{let t=TV[lV(e)];return t===void 0?null:t},MV=`react-grab-toolbar-state`,NV=()=>{try{let e=localStorage.getItem(MV);if(!e)return null;let t=JSON.parse(e);if(typeof t!=`object`||!t)return null;let n=t,r=typeof n.collapsed==`boolean`&&n.collapsed;return{edge:n.edge===`top`||n.edge===`bottom`||n.edge===`left`||n.edge===`right`?n.edge:`bottom`,ratio:typeof n.ratio==`number`?n.ratio:uN,collapsed:r,enabled:!r,defaultAction:typeof n.defaultAction==`string`?n.defaultAction:dN}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},PV=e=>{try{localStorage.setItem(MV,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}},FV=e=>{let[t,n]=J(!1);return yR(()=>{let t=NM(t=>n(e(t))),r=()=>n(!1);window.addEventListener(`keydown`,t,{capture:!0}),window.addEventListener(`keyup`,t,{capture:!0}),window.addEventListener(`blur`,r),bR(()=>{window.removeEventListener(`keydown`,t,{capture:!0}),window.removeEventListener(`keyup`,t,{capture:!0}),window.removeEventListener(`blur`,r)})}),t},IV=e=>e.key===`Enter`,LV=e=>e.metaKey||e.ctrlKey,RV=(e,t,n={})=>{if(!t.key)return null;if(IV(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return LV(t)?n.includeModifierShortcuts===!0?e.find(e=>e.shortcut!==void 0&&e.shortcut!==`Enter`&&e.shortcutModifier!==!1&&r===e.shortcut.toLowerCase())??null:null:e.find(e=>e.shortcut!==void 0&&e.shortcutModifier===!1&&r===e.shortcut.toLowerCase())??null},zV=()=>{let e=!1;return{arm:()=>{e=!0},clear:()=>{e=!1},consume:()=>e?(e=!1,!0):!1}}})),VV,HV,UV,WV,GV,KV,qV,JV,YV,XV,ZV,QV,$V,eH,tH,nH,rH,iH,aH,oH,sH,cH,lH,uH,dH,fH,pH,mH,hH,gH,_H,vH,yH,bH,xH,SH,CH,wH,TH,EH,DH,OH,kH,AH,jH,MH,NH,PH,FH,IH,LH,RH,zH,BH,VH,HH,UH,WH,GH,KH,qH,JH,YH,XH,ZH,QH,$H,eU,tU,nU,rU,iU,aU,oU,sU,cU,lU,uU,dU,fU,pU,mU,hU,gU,_U,vU,yU,bU,xU,SU,CU,wU,TU,EU,DU,OU,kU,AU,jU,MU,NU,PU,FU,IU,LU,RU,zU,BU,VU,HU,UU,WU,GU,KU,qU,JU,YU,XU,ZU,QU=t((()=>{sR(),VV=class extends Error{constructor(e){super(e),this.name=`ReactGrabError`}},HV=class extends VV{constructor(){super(`Can't generate CSS selector for non-element node type.`),this.name=`NonElementNodeError`}},UV=class extends VV{constructor(e){super(`Timeout: Can't find a unique selector after ${e}ms`),this.name=`SelectorTimeoutError`,this.timeoutMs=e}},WV=class extends VV{constructor(){super(`Selector was not found.`),this.name=`SelectorNotFoundError`}},GV=class extends VV{constructor(){super(`Failed to copy`),this.name=`CopyFailedError`}},KV=e=>e===void 0||!Number.isFinite(e)?3:Math.max(0,Math.floor(e)),qV=e=>{try{return decodeURIComponent(e)}catch{return e}},JV=/(?:^|[/\\])node_modules[/\\]/,YV=/[/\\]\.vite[/\\]deps[^/\\]*[/\\]/,XV=/\.[mc]?[jt]sx?$/i,ZV=/^chunk-[A-Za-z0-9_-]+$/,QV=/[/\\]/,$V=/^(.+?)@v?\d/,eH=e=>e.split(QV).filter(Boolean),tH=e=>{let[t,n]=eH(e);return!t||t.startsWith(`.`)?null:t.startsWith(`@`)?n?`${t}/${n}`:null:t},nH=e=>{let t=eH(e)[0];if(!t)return null;let n=t.replace(XV,``);if(ZV.test(n))return null;if(!n.startsWith(`@`))return n;let r=n.indexOf(`_`);return r===-1?null:`${n.slice(0,r)}/${n.slice(r+1)}`},rH=(e,t,n)=>{let r=e.split(t);return r.length>1?n(r[r.length-1]):null},iH=e=>e?.match($V)?.[1]??null,aH=e=>{let t;try{t=new URL(e)}catch{return null}if(!t.hostname)return null;let n=eH(t.pathname).map(qV);for(let[e,t]of n.entries()){if(t.startsWith(`@`)){let r=iH(n[e+1]);if(r)return`${t}/${r}`;continue}let r=iH(t);if(r)return r}return null},oH=e=>rH(e,YV,nH)??rH(e,JV,tH),sH=e=>{if(!e)return null;let t=lF(e);return t&&(oH(qV(t))||aH(e))||null},cH=/^@[A-Za-z0-9][A-Za-z0-9._-]*$/,lH=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,uH=new Set([`app`,`web`,`website`,`frontend`,`client`,`src`]),dH=new Set([`app`,`src`,`components`,`pages`,`features`,`modules`,`hooks`,`lib`,`utils`,`ui`,`shared`,`common`,`core`,`styles`,`assets`]),fH=e=>{let t=e;for(;t.startsWith(`../`)||t.startsWith(`./`);)t=t.slice(t.startsWith(`../`)?3:2);return t},pH=e=>{let t=fH(qV(lF(e)));if(t.startsWith(`/`))return null;let[n,r,...i]=eH(t);return!n||!r||i.length===0||!cH.test(n)||dH.has(n.slice(1))||!lH.test(r)||XV.test(r)||uH.has(r)?null:`${n}/${r}`},mH=e=>e?sH(e)??pH(e):null,hH=e=>{if(!e)return{origin:`unknown`,packageName:null};let t=mH(e);return t?{origin:`package`,packageName:t}:uF(e)?{origin:`app`,packageName:null}:{origin:`unknown`,packageName:null}},gH=new Set([`role`,`name`,`aria-label`,`rel`,`href`]),_H=e=>{if(!/^[a-z-]{3,}$/i.test(e))return!1;let t=e.split(/-|[A-Z]/);for(let e of t)if(e.length<=2||/[^aeiou]{4,}/i.test(e))return!1;return!0},vH=(e,t)=>{let n=gH.has(e)||e.startsWith(`data-`)&&_H(e),r=_H(t)&&t.length<100||t.startsWith(`#`)&&_H(t.slice(1));return n&&r},yH=e=>{let t=e[0].name;for(let n=1;n<e.length;n++)t=`${e[n].name} > ${t}`;return t},bH=e=>{let t=0;for(let n of e)t+=n.penalty;return t},xH=(e,t)=>bH(e)-bH(t),SH=(e,t)=>{let n=e.parentNode;if(!n)return;let r=n.firstChild;if(!r)return;let i=0;for(;r&&(r instanceof Element&&(t===void 0||r.tagName.toLowerCase()===t)&&i++,r!==e);)r=r.nextSibling;return i},CH=(e,t)=>e===`html`?`html`:`${e}:nth-child(${t})`,wH=(e,t)=>e===`html`?`html`:`${e}:nth-of-type(${t})`,TH=(e,t)=>{let n=[],r=e.getAttribute(`id`),i=e.tagName.toLowerCase();r&&_H(r)&&n.push({name:`#${CSS.escape(r)}`,penalty:0});for(let t of e.classList)_H(t)&&n.push({name:`.${CSS.escape(t)}`,penalty:1});for(let r of e.attributes)t(r.name,r.value)&&n.push({name:`[${CSS.escape(r.name)}="${CSS.escape(r.value)}"]`,penalty:2});n.push({name:i,penalty:5});let a=SH(e,i);a!==void 0&&n.push({name:wH(i,a),penalty:10});let o=SH(e);return o!==void 0&&n.push({name:CH(i,o),penalty:50}),n},EH=(e,t=UM,n=[])=>{if(t<=0)return[];if(e.length===0)return[n];let r=[];for(let i of e[0]){let a=t-r.length;if(a<=0)break;r.push(...EH(e.slice(1),a,[...n,i]))}return r},DH=(e,t)=>{let n=t.getRootNode?.();return n instanceof ShadowRoot?n:e instanceof Document?e:e.ownerDocument},OH=(e,t)=>t.querySelectorAll(yH(e)).length===1,kH=(e,t)=>{let n=e,r=[];for(;n&&n!==t;){let e=n.tagName.toLowerCase(),t=SH(n,e);if(t===void 0)return;r.push({name:wH(e,t),penalty:10}),n=n.parentElement}return OH(r,t)?r:void 0},AH=(e,t,n,r)=>{if(e.nodeType!==Node.ELEMENT_NODE)throw new HV;if(e.tagName.toLowerCase()===`html`)return`html`;let i=DH(t,e),a=Date.now(),o=[],s=e,c=0,l;for(;s&&s!==i&&!l;)if(o.push(TH(s,r)),s=s.parentElement,c++,c>=3){let t=EH(o);t.sort(xH);for(let r of t){if(Date.now()-a>n){let t=kH(e,i);if(!t)throw new UV(n);return yH(t)}if(OH(r,i)){l=r;break}}}if(!l&&c<3){let e=EH(o);e.sort(xH);for(let t of e){if(Date.now()-a>n)break;if(OH(t,i)){l=t;break}}}if(!l)throw new WV;return yH(l)},jH=e=>e.ownerDocument.body??e.ownerDocument.documentElement,MH=new Set([`data-testid`,`data-test-id`,`data-test`,`data-cy`,`data-qa`,`aria-label`,`href`,`src`,`role`,`name`,`title`,`alt`]),NH=e=>e.length>0&&e.length<=120,PH=(e,t)=>{try{let n=e.ownerDocument.querySelectorAll(t);return n.length===1&&n[0]===e}catch{return!1}},FH=e=>{if(e instanceof HTMLElement&&e.id){let t=`#${CSS.escape(e.id)}`;if(PH(e,t))return t}for(let t of MH){let n=e.getAttribute(t);if(!n||!NH(n))continue;let r=`[${t}=${JSON.stringify(n)}]`;if(PH(e,r))return r;let i=`${e.tagName.toLowerCase()}${r}`;if(PH(e,i))return i}return null},IH=e=>{let t=[],n=jH(e),r=e;for(;r;){if(r instanceof HTMLElement&&r.id){t.unshift(`#${CSS.escape(r.id)}`);break}let e=r.parentElement;if(!e){t.unshift(r.tagName.toLowerCase());break}let i=Array.from(e.children).indexOf(r)+1;if(t.unshift(`${r.tagName.toLowerCase()}:nth-child(${i})`),e===n){t.unshift(n.tagName.toLowerCase());break}r=e}return t.join(` > `)},LH=e=>{let t=FH(e);if(t)return t;try{let t=AH(e,jH(e),200,(e,t)=>vH(e,t)||MH.has(e)&&NH(t));if(t)return t}catch{}return IH(e)},RH=e=>{if(!e)return!1;let t=`/${HF(e)}/`.toLowerCase();return BM.some(e=>t.includes(e))},zH=e=>e.map(e=>`\n in ${e}`).join(``),BH=[`about://React/`,`rsc://React/`],VH=e=>BH.some(t=>e.startsWith(t)),HH=e=>{for(let t of BH){if(!e.startsWith(t))continue;let n=e.indexOf(`/`,t.length);if(n===-1)continue;let r=n+1,i=e.lastIndexOf(`?`);return qV(i>r?e.slice(r,i):e.slice(r))}return e},UH=e=>{if(typeof e!=`object`||!e||!(`status`in e)||e.status!==`fulfilled`||!(`value`in e)||typeof e.value!=`object`||e.value===null||!(`originalStackFrame`in e.value))return null;let t=e.value.originalStackFrame;return typeof t!=`object`||!t||!(`file`in t)||typeof t.file!=`string`||!t.file||`ignored`in t&&t.ignored?null:{file:t.file,line1:`line1`in t&&typeof t.line1==`number`?t.line1:null,column1:`column1`in t&&typeof t.column1==`number`?t.column1:null}},WH=async(e,t)=>{let n=[],r=[];for(let t=0;t<e.length;t++){let i=e[t];!i.isServer||!i.fileName||(n.push(t),r.push({file:HH(i.fileName),methodName:i.functionName??`<unknown>`,line1:i.lineNumber??null,column1:i.columnNumber??null,arguments:[]}))}if(r.length===0)return e;let i=new AbortController,a=setTimeout(()=>i.abort(),VM),o=()=>i.abort();t?.aborted&&i.abort(),t?.addEventListener(`abort`,o);try{let t=await fetch(`${KF()}/__nextjs_original-stack-frames`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({frames:r,isServer:!0,isEdgeServer:!1,isAppDirectory:!0}),priority:`high`,signal:i.signal});if(!t.ok)return e;let a=await t.json();if(!Array.isArray(a))return e;let o=[...e];for(let t=0;t<n.length;t++){let r=UH(a[t]);if(!r)continue;let i=n[t];o[i]={...e[i],fileName:r.file,lineNumber:r.line1??void 0,columnNumber:r.column1??void 0,isSymbolicated:!0}}return o}catch{return e}finally{clearTimeout(a),t?.removeEventListener(`abort`,o)}},GH=e=>{let t=new Map;return yM(e,e=>{if(!HP(e))return!1;let n=ZP(e._debugStack.stack);if(!n)return!1;for(let e of vP(n))!e.functionName||!e.fileName||VH(e.fileName)&&(t.has(e.functionName)||t.set(e.functionName,{...e,isServer:!0}));return!1},!0),t},KH=(e,t)=>{if(!t.some(e=>e.isServer&&!e.fileName&&e.functionName))return t;let n=GH(e);return n.size===0?t:t.map(e=>{if(!e.isServer||e.fileName||!e.functionName)return e;let t=n.get(e.functionName);return t?{...e,fileName:t.fileName,lineNumber:t.lineNumber,columnNumber:t.columnNumber}:e})},qH=0,JH=[],YH=()=>qH<3?(qH+=1,Promise.resolve()):new Promise(e=>{JH.push(e)}),XH=()=>{let e=JH.shift();if(e){e();return}--qH},ZH=async(e,t,n=HM)=>{await YH();let r=new AbortController,i,a=new Promise(e=>{i=setTimeout(()=>{r.abort(),e(t)},n)}),o=e(r.signal);o.catch(()=>{});try{return await Promise.race([o,a])}finally{clearTimeout(i),XH()}},QH=(e,t)=>e.length>t?`${e.slice(0,t)}...`:e,$H=e=>e.startsWith(`data-react-grab-`),eU=e=>e.replace(/\s+/g,` `).trim(),tU=e=>{let t=[];for(let n of e.childNodes){if(n.nodeType!==Node.TEXT_NODE)continue;let e=eU(n.textContent??``);e&&t.push(e)}return t.join(` `)},nU=e=>e.getAttribute(`aria-hidden`)===`true`||e.hasAttribute(`hidden`)?!0:iN.has(e.tagName.toLowerCase()),rU=(e,t,n)=>{if(e.nodeType===Node.TEXT_NODE){let r=eU(e.textContent??``);return r?(t.push(r),n-r.length):n}if(!(e instanceof Element)||nU(e))return n;for(let r of e.childNodes)if(n=rU(r,t,n),n<=0)break;return n},iU=(e,t)=>{if(nU(e))return``;let n=tU(e);if(!rN.has(t)||n&&e.children.length===0)return n;let r=[];return rU(e,r,100),r.join(` `)},aU=e=>QH(e,15),oU=e=>{let t=[];for(let n of tN){let r=e.getAttribute(n);r&&t.push(`${n}="${r}"`)}return t.length>0?` ${t.join(` `)}`:``},sU=e=>e===`class`||e===`className`||e===`style`,cU=e=>{let t=[],n=[],r=``;for(let{name:i,value:a}of e.attributes)if(!$H(i)){if(sU(i)){i!==`style`&&a&&(r=` class="${aU(a)}"`);continue}nN.has(i)?t.push(a?` ${i}="${a}"`:` ${i}`):a&&n.push(` ${i}="${aU(a)}"`)}return t.join(``)+n.join(``)+r},lU=e=>e.length===0?``:e.length<=2?e.map(e=>`<${MN(e)} ...>`).join(`
|
|
257
|
-
`):`(${e.length} elements)`,uU=e=>{let t=MN(e);if(!(e instanceof HTMLElement))return`<${t}${oU(e)} />`;let n=cU(e),r=QH(iU(e,t),100);return r?`<${t}${n}>${r}</${t}>`:`<${t}${n} />`},dU=e=>{let t=MN(e),n=cU(e),r=iU(e,t),i=[],a=[],o=!1;for(let t of e.childNodes)t.nodeType!==Node.COMMENT_NODE&&(t.nodeType===Node.TEXT_NODE?t.textContent&&t.textContent.trim().length>0&&(o=!0):t instanceof Element&&(o?a.push(t):i.push(t)));let s=r.length>0&&rN.has(t),c=``,l=lU(i);l&&!s&&(c+=`\n ${l}`),r&&(c+=`\n ${QH(r,100)}`);let u=lU(a);return u&&!s&&(c+=`\n ${u}`),c.length>0?`<${t}${n}>${c}\n</${t}>`:`<${t}${n} />`},fU=new Set([`_`,`$`,`motion.`,`styled.`,`chakra.`,`ark.`,`Primitive.`,`Slot.`]),pU=new Set(`AppRouter.AppRouterAnnouncer.AppDevOverlay.AppDevOverlayErrorBoundary.ClientPageRoot.ClientSegmentRoot.DevRootHTTPAccessFallbackBoundary.ErrorBoundary.ErrorBoundaryHandler.GracefulDegradeBoundary.HTTPAccessErrorFallback.HTTPAccessFallbackBoundary.HTTPAccessFallbackErrorBoundary.HandleRedirect.Head.HistoryUpdater.HotReload.InnerLayoutRouter.InnerScrollAndFocusHandler.InnerScrollAndFocusHandlerOld.InnerScrollAndMaybeFocusHandler.InnerScrollHandlerNew.LoadableComponent.LoadingBoundary.LoadingBoundaryProvider.NotAllowedRootHTTPFallbackError.OfflineProvider.OuterLayoutRouter.RedirectBoundary.RedirectErrorBoundary.RenderFromTemplateContext.RenderValidationBoundaryAtThisLevel.ReplaySsrOnlyErrors.RootErrorBoundary.RootLevelDevOverlayElement.Router.ScrollAndFocusHandler.ScrollAndMaybeFocusHandler.SegmentBoundaryTrigger.SegmentBoundaryTriggerNode.SegmentStateProvider.SegmentTrieNode.SegmentViewNode.SegmentViewStateNode.ServerRoot.body.html`.split(`.`)),mU=new Set([`Suspense`,`Fragment`,`StrictMode`,`Profiler`,`SuspenseList`]),hU=new Set([`MotionDOMComponent`]),gU=e=>{if(pU.has(e)||mU.has(e)||hU.has(e))return!0;for(let t of fU)if(e.startsWith(t))return!0;return!1},_U=e=>!(!e||gU(e)||e===`SlotClone`||e===`Slot`),vU=e=>!(e.length<=1||gU(e)||e[0]!==e[0].toUpperCase()||e.endsWith(`Provider`)||e.endsWith(`Context`)),yU=e=>e&&vU(e)?e:null,bU=e=>{if(!aP())return e;let t=e;for(;t;){if(oP(t))return t;t=t.parentElement}return e},xU=e=>{if(!aP())return null;let t=oP(bU(e)),n=0;for(;t;){if(t.key)return t.key;if(eP(t)&&(n+=1,n===2))break;t=t.return}return null},SU=new WeakMap,CU=new WeakMap,wU=e=>t=>fetch(t,{signal:e,priority:`high`}),TU=e=>ZH(async t=>{try{let n=oP(e);if(!n)return null;let r=await rF(n,!0,wU(t));return WF()?await WH(KH(n,r),t):r}catch{return null}},null),EU=e=>{if(!aP())return Promise.resolve([]);let t=bU(e),n=SU.get(t);if(n)return n;let r=TU(t).then(e=>(e===null&&SU.delete(t),e));return SU.set(t,r),r},DU=async e=>{if(!aP())return null;let t=await EU(e);if(!t)return null;for(let e of t){let t=yU(e.functionName);if(t)return t}return null},OU=e=>e.find(e=>!!yU(e.functionName))??e[0]??null,kU=e=>!e||!eP(e)?null:yU(iP(e.type)),AU=e=>ZH(async t=>{let n=oP(bU(e));if(!n)return null;try{let e=await aF(n,!0,wU(t));return e?.fileName?{filePath:HF(e.fileName),lineNumber:e.lineNumber??null,columnNumber:e.columnNumber??null,componentName:yU(e.functionName)??kU(n._debugOwner),origin:hH(e.fileName).origin}:null}catch{return null}},null),jU=e=>{let t=bU(e),n=CU.get(t);if(n)return n;let r=AU(t).then(e=>(e||CU.delete(t),e));return CU.set(t,r),r},MU=[`app`,`package`],NU=(e,t)=>{for(let n of MU){if(e?.origin===n)return e;let r=OU(t.filter(e=>hH(e.fileName).origin===n));if(r?.fileName)return{filePath:HF(r.fileName),lineNumber:r.lineNumber??null,columnNumber:r.columnNumber??null,componentName:yU(r.functionName),origin:n}}return null},PU=async e=>{let t=await jU(e);return t?.origin===`app`?t:NU(t,await EU(e)??[])},FU=e=>IU(bU(e),1)[0]??null,IU=(e,t,n=()=>!0)=>{if(!aP())return[];let r=oP(e);if(!r)return[];let i=[];return yM(r,e=>{if(i.length>=t)return!0;if(eP(e)){let t=iP(e.type);t&&_U(t)&&n(t)&&i.push(t)}return!1},!0),i},LU=[`/src/app/`,`/src/pages/`,`/app/`,`/pages/`],RU=(e,t)=>{let n=HF(e);if(!t||!n.startsWith(`/`))return n;for(let e of LU){let t=n.indexOf(e);if(t!==-1)return`/./${n.slice(t+1)}`}return n},zU=(e,t)=>{let n=RU(e.filePath,t),r=t&&e.lineNumber?`${n}:${e.lineNumber}${e.columnNumber?`:${e.columnNumber}`:``}`:n;return e.componentName?`\n in ${e.componentName} (at ${r})`:`\n in ${r}`},BU={isAppSource:!1,consumesBudget:!1},VU=(e,t,n,r)=>{let i=t.packageName,a=t.origin===`app`?e.fileName:null;if(e.isServer&&!a&&(n||!e.functionName)){let e=i?`${i} at Server`:`at Server`;return{text:`\n in ${n??`<anonymous>`} (${e})`,...BU}}return!a&&n?{text:i?`\n in ${n} (${i})`:`\n in ${n}`,...BU}:i?{text:`\n in ${i}`,...BU}:a?{text:zU({componentName:n,filePath:a,lineNumber:e.lineNumber??null,columnNumber:e.columnNumber??null},r),isAppSource:!0,consumesBudget:!RH(a)}:null},HU=(e,t={},n=null)=>{let r=KV(t.maxLines),i=Math.max(r,20),a=WF(),o=[],s=new Set,c=null,l=!1,u=!1,d=!1,f=0,p=e=>{e&&s.add(e)};n&&(u=n.origin===`app`,RH(n.filePath)||(f+=1),p(n.componentName),o.push(zU(n,a)));for(let t of e){if(f>=r||o.length>=i)break;let e=hH(t.fileName),s=yU(t.functionName),m=e.packageName?`${e.packageName}:${s??``}:${t.isServer?`server`:`client`}`:null;if(m&&m===c)continue;if(!l&&s&&s===n?.componentName){l=!0;continue}let h=VU(t,e,s,a);h!==null&&h.text!==o[o.length-1]&&(h.isAppSource&&(u=!0),h.consumesBudget&&(f+=1,d=!0),p(s),o.push(h.text),c=m)}return{text:o.join(``),shouldAppendSelectorHint:!u,hasBudgetedStackFrame:d,renderedComponentNames:s}},UU=async e=>{let t=await jU(e);return t?.origin===`app`?t:null},WU=(e,t,n)=>{let r=IU(bU(e),n,e=>vU(e)&&!t.renderedComponentNames.has(e));return r.length===0?t:{...t,text:`${t.text}${zH(r)}`}},GU=async(e,t={})=>{let n=await UU(e),r=await EU(e),i=KV(t.maxLines),a=HU(r??[],t,n);if(a.text)return a.hasBudgetedStackFrame?a:WU(e,a,i);let o=IU(bU(e),i);return{text:zH(o),shouldAppendSelectorHint:!0,hasBudgetedStackFrame:!1,renderedComponentNames:new Set(o)}},KU=async(e,t={})=>(await GU(e,t)).text,qU=(e,t)=>{let n=xU(e),r=n===null?``:`\n key: "${n}"`,i=t.shouldAppendSelectorHint?`\n selector: ${LH(e)}`:``;return`${t.text}${r}${i}`},JU=async(e,t={})=>{let n=await GU(e,t);return`${uU(e)}${qU(e,n).replace(/\n\s+/g,` `)}`},YU=async(e,t={})=>{let n=bU(e);return`${dU(n)}${qU(n,await GU(n,t))}`},XU=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`),ZU=(e,t)=>{let n=t?.componentName??`div`,r={version:FM,content:e,entries:t?.entries??[{tagName:t?.tagName,componentName:n,content:e,commentText:t?.commentText}],timestamp:Date.now()},i=t=>{t.preventDefault(),t.clipboardData?.setData(`text/plain`,e),t.clipboardData?.setData(`text/html`,`<meta charset='utf-8'><pre><code>${XU(e)}</code></pre>`),t.clipboardData?.setData(`application/x-react-grab`,JSON.stringify(r))};document.addEventListener(`copy`,i);let a=document.createElement(`textarea`);a.value=e,a.style.position=`fixed`,a.style.left=`-9999px`,a.ariaHidden=`true`,document.body.appendChild(a),a.select();try{return typeof document.execCommand==`function`&&document.execCommand(`copy`)}finally{document.removeEventListener(`copy`,i),a.remove()}}})),$U=r({ReactGrabRenderer:()=>bJ}),eW,tW,nW,rW,iW,aW,oW,sW,cW,lW,uW,dW,fW,pW,mW,hW,gW,_W,vW,yW,bW,xW,SW,CW,wW,TW,EW,DW,OW,kW,AW,jW,MW,NW,PW,FW,IW,LW,RW,zW,BW,VW,HW,UW,WW,GW,KW,qW,JW,YW,XW,ZW,QW,$W,eG,tG,nG,rG,iG,aG,oG,sG,cG,lG,uG,dG,fG,pG,mG,hG,gG,_G,vG,yG,bG,xG,SG,CG,wG,TG,EG,DG,OG,kG,AG,jG,MG,NG,PG,FG,IG,LG,RG,zG,BG,VG,HG,UG,WG,GG,KG,qG,JG,YG,XG,ZG,QG,$G,eK,tK,nK,rK,iK,aK,oK,sK,cK,lK,uK,dK,fK,pK,mK,hK,gK,_K,vK,yK,bK,xK,SK,CK,wK,TK,EK,DK,OK,kK,AK,jK,MK,NK,PK,FK,IK,LK,RK,zK,BK,VK,HK,UK,WK,GK,KK,qK,JK,YK,XK,ZK,QK,$K,eq,tq,nq,rq,iq,aq,oq,sq,cq,lq,uq,dq,fq,pq,mq,hq,gq,_q,vq,yq,bq,xq,Sq,Cq,wq,Tq,Eq,Dq,Oq,kq,Aq,jq,Mq,Nq,Pq,Fq,Iq,Lq,Rq,zq,Bq,Vq,Hq,Uq,Wq,Gq,Kq,qq,Jq,Yq,Xq,Zq,Qq,$q,eJ,tJ,nJ,rJ,iJ,aJ,oJ,sJ,cJ,lJ,uJ,dJ,fJ,pJ,mJ,hJ,gJ,_J,vJ,yJ,bJ,xJ=t((()=>{BV(),sR(),eW=(e,t,n)=>e+(t-e)*n,tW=(e,t)=>{let n=Math.max(t,1);return 1-(1-e)**(n/qM)},nW=Z(`<canvas data-react-grab-overlay-canvas style=position:fixed;top:0;left:0;pointer-events:none>`),rW={borderColor:ZM,fillColor:QM,lerpFactor:RM},iW={drag:{borderColor:YM,fillColor:XM,lerpFactor:KM},selection:rW,grabbed:rW},aW=e=>{let t,n=null,r=0,i=0,a=1,o=null,s=null,c={drag:{canvas:null,context:null},selection:{canvas:null,context:null},grabbed:{canvas:null,context:null}},l=[],u=null,d=[],f=EM()?`display-p3`:`srgb`,p=(e,t,n)=>{let r=new OffscreenCanvas(e*n,t*n),i=r.getContext(`2d`,{colorSpace:f});return i&&i.scale(n,n),{canvas:r,context:i}},m=()=>{if(t){a=Math.max(window.devicePixelRatio||1,2),r=window.innerWidth,i=window.innerHeight,t.width=r*a,t.height=i*a,t.style.width=`${r}px`,t.style.height=`${i}px`,n=t.getContext(`2d`,{colorSpace:f}),n&&n.scale(a,a);for(let e of Object.keys(c))c[e]=p(r,i,a)}},h=e=>{if(!e)return 0;let t=e.match(/^(\d+(?:\.\d+)?)/);return t?parseFloat(t[1]):0},g=(e,t,n)=>({id:e,current:{x:t.x,y:t.y,width:t.width,height:t.height},target:{x:t.x,y:t.y,width:t.width,height:t.height},borderRadius:h(t.borderRadius),opacity:n?.opacity??1,targetOpacity:n?.targetOpacity??n?.opacity??1,createdAt:n?.createdAt,fadeStartTimestamp:null,isInitialized:!0}),_=(e,t,n)=>{let r=e.target;r.x=t.x,r.y=t.y,r.width=t.width,r.height=t.height,e.borderRadius=h(t.borderRadius),n!==void 0&&(e.targetOpacity=n)},v=e=>e.boundsMultiple??[e.bounds],y=(e,t,n,r,i,a,o,s,c=1)=>{if(r<=0||i<=0)return;let l=Math.min(r/2,i/2),u=Math.min(a,l),d=c!==1;d&&(e.globalAlpha=c),e.beginPath(),u>0?e.roundRect(t,n,r,i,u):e.rect(t,n,r,i),e.fillStyle=o,e.fill(),e.strokeStyle=s,e.lineWidth=1,e.stroke(),d&&(e.globalAlpha=1)},b=()=>{let t=c.drag;if(!t.context)return;let n=t.context;if(n.clearRect(0,0,r,i),!e.dragVisible||!u)return;let a=iW.drag;y(n,u.current.x,u.current.y,u.current.width,u.current.height,u.borderRadius,a.fillColor,a.borderColor)},x=()=>{let t=c.selection;if(!t.context)return;let n=t.context;if(n.clearRect(0,0,r,i),!e.selectionVisible)return;let a=iW.selection;for(let e of l)y(n,e.current.x,e.current.y,e.current.width,e.current.height,e.borderRadius,a.fillColor,a.borderColor,e.opacity)},S=(e,t)=>{let n=c[e];if(!n.context)return;let a=n.context;a.clearRect(0,0,r,i);let o=iW[e];for(let e of t)y(a,e.current.x,e.current.y,e.current.width,e.current.height,e.borderRadius,o.fillColor,o.borderColor,e.opacity)},C=()=>{if(!(!n||!t)&&!(r<=0||i<=0)){n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,t.width,t.height),n.setTransform(a,0,0,a,0,0),b(),x(),S(`grabbed`,d);for(let e of[`drag`,`selection`,`grabbed`]){let t=c[e];t.canvas&&n.drawImage(t.canvas,0,0,r,i)}}},w=(e,t,n)=>{let r=eW(e.current.x,e.target.x,t),i=eW(e.current.y,e.target.y,t),a=eW(e.current.width,e.target.width,t),o=eW(e.current.height,e.target.height,t),s=Math.abs(r-e.target.x)<.5&&Math.abs(i-e.target.y)<.5&&Math.abs(a-e.target.width)<.5&&Math.abs(o-e.target.height)<.5;e.current.x=s?e.target.x:r,e.current.y=s?e.target.y:i,e.current.width=s?e.target.width:a,e.current.height=s?e.target.height:o;let c=!0;if(n?.interpolateOpacity){let n=eW(e.opacity,e.targetOpacity,t);c=Math.abs(n-e.targetOpacity)<JM,e.opacity=c?e.targetOpacity:n}return!s||!c},T=()=>{let e=performance.now(),t=s===null?qM:e-s;s=e;let n=tW(iW.drag.lerpFactor,t),r=tW(iW.selection.lerpFactor,t),i=tW(iW.grabbed.lerpFactor,t),a=!1;u?.isInitialized&&w(u,n)&&(a=!0);for(let e of l)e.isInitialized&&w(e,r)&&(a=!0);let c=Date.now();d=d.filter(t=>{let n=t.id.startsWith(`label-`);if(t.isInitialized&&w(t,i)&&(a=!0),n&&t.targetOpacity===0){t.fadeStartTimestamp===null&&(t.fadeStartTimestamp=e);let n=e-t.fadeStartTimestamp,r=Math.min(1,n/125),i=1-(1-r)*(1-r);return t.opacity=Math.max(0,1-i),r>=1?!1:(a=!0,!0)}else n&&(t.fadeStartTimestamp=null);if(t.createdAt){let e=c-t.createdAt;if(e>=1625)return!1;if(e>1500){let n=Math.min(1,(e-zM)/125);t.opacity=1-(1-(1-n)*(1-n)),a=!0}return!0}return n?!0:t.opacity>0}),C(),a?o=XF(T):(o=null,s=null)},E=()=>{o===null&&(o=XF(T))},D=()=>{m(),E()};return pR(vR(()=>[e.selectionVisible,e.selectionBounds,e.selectionBoundsMultiple,e.selectionShouldSnap],([e,t,n,r])=>{if(!e||!t&&(!n||n.length===0)){l=[],E();return}let i;i=n&&n.length>0?n:t?[t]:[];let a=new Map;for(let e of l)a.set(e.id,e);l=i.map((e,t)=>{let n=`selection-${t}`,i=a.get(n);return i?(_(i,e),r&&(i.current.x=i.target.x,i.current.y=i.target.y,i.current.width=i.target.width,i.current.height=i.target.height),i):g(n,e)}),E()})),pR(vR(()=>[e.dragVisible,e.dragBounds],([e,t])=>{if(!e||!t){u=null,E();return}u?_(u,t):u=g(`drag`,t),E()})),pR(vR(()=>[e.grabbedBoxes,e.labelInstances],([e,t])=>{let n=e??[],r=t??[],i=new Map;for(let e of n)i.set(e.id,e);let a=new Map;for(let e of d)a.set(e.id,e);for(let e of n)if(!a.has(e.id)){let t=g(e.id,e.bounds,{createdAt:e.createdAt});d.push(t),a.set(e.id,t)}for(let e of d){let t=i.get(e.id);t&&_(e,t.bounds)}let o=new Set;for(let e of r){let t=v(e),n=e.status===`fading`?0:1;for(let r=0;r<t.length;r++){let i=t[r],s=`label-${e.id}-${r}`;o.add(s);let c=a.get(s);if(c)_(c,i,n);else{let e=g(s,i,{opacity:1,targetOpacity:n});d.push(e),a.set(s,e)}}}d=d.filter(e=>e.id.startsWith(`label-`)?o.has(e.id):i.has(e.id)),E()})),yR(()=>{m(),E(),window.addEventListener(`resize`,D);let e=null,t=()=>{Math.max(window.devicePixelRatio||1,2)!==a&&(D(),n())},n=()=>{e&&e.removeEventListener(`change`,t),e=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),e.addEventListener(`change`,t)};n(),bR(()=>{window.removeEventListener(`resize`,D),e&&e.removeEventListener(`change`,t),o!==null&&ZF(o)})}),(()=>{var e=nW(),n=t;return typeof n==`function`?hz(n,e):t=e,fR(t=>pz(e,`z-index`,String(GM))),e})()},oW=Z(`<div style=position:fixed;pointer-events:none;will-change:opacity;contain:strict;transform:translateZ(0)>`),sW=e=>{let t=jM(),n=t?getComputedStyle(t).borderRadius:`0px`,r=()=>t?.getBoundingClientRect()??null,[i,a]=J(r());if(t){let n=()=>a(r());yR(()=>{let e=new ResizeObserver(n);e.observe(t),window.addEventListener(`scroll`,n,{capture:!0,passive:!0}),window.addEventListener(`resize`,n),bR(()=>{e.disconnect(),window.removeEventListener(`scroll`,n,{capture:!0}),window.removeEventListener(`resize`,n)})}),pR(()=>{e.visible&&n()})}let o=()=>{let e=i();return e?`${e.top}px`:`0`},s=()=>{let e=i();return e?`${e.left}px`:`0`},c=()=>{let e=i();return e?`${e.width}px`:`100%`},l=()=>{let e=i();return e?`${e.height}px`:`100%`};return(()=>{var t=oW();return pz(t,`border-radius`,n),pz(t,`z-index`,GM),pz(t,`transition`,`opacity 125ms ease-out`),pz(t,`box-shadow`,`inset 0 0 50px ${$M}`),fR(n=>{var r=o(),i=s(),a=c(),u=l(),d=+!!e.visible;return r!==n.e&&pz(t,`top`,n.e=r),i!==n.t&&pz(t,`left`,n.t=i),a!==n.a&&pz(t,`width`,n.a=a),u!==n.o&&pz(t,`height`,n.o=u),d!==n.i&&pz(t,`opacity`,n.i=d),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),t})()},cW=(e,t)=>{e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,t)}px`},lW=(e,t)=>{e&&e.focus(t)},uW=e=>{if(e<=0)return 8;let t=e*eN;return Math.round(Math.max(4,Math.min(8,t)))},dW=()=>{let e=jM();if(e){let t=e.getBoundingClientRect();return{width:t.width,height:t.height,offsetLeft:t.left,offsetTop:t.top}}let t=window.visualViewport;return t?{width:t.width,height:t.height,offsetLeft:t.offsetLeft,offsetTop:t.offsetTop}:{width:window.innerWidth,height:window.innerHeight,offsetLeft:0,offsetTop:0}},fW=e=>{if(typeof e==`string`||typeof e==`number`)return String(e);if(!e||typeof e!=`object`)return``;if(Array.isArray(e)){let t=``;for(let n of e){if(!n)continue;let e=fW(n);e&&(t=t?`${t} ${e}`:e)}return t}let t=``;for(let n in e)e[n]&&(t=t?`${t} ${n}`:n);return t},pW=(...e)=>{let t=``;for(let n of e){if(!n)continue;let e=fW(n);e&&(t=t?`${t} ${e}`:e)}return t},mW=e=>e.elementsCount&&e.elementsCount>1?{tagName:`${e.elementsCount} elements`,componentName:void 0}:{tagName:e.tagName||e.componentName||`element`,componentName:e.tagName?e.componentName:void 0},hW=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M19.2929 12.7071C19.6834 13.0976 20.3166 13.0976 20.7071 12.7071C21.0976 12.3166 21.0976 11.6834 20.7071 11.2929L12.7071 3.29289C12.5196 3.10536 12.2652 3 12 3C11.7348 3 11.4804 3.10536 11.2929 3.29289L3.29289 11.2929C2.90237 11.6834 2.90237 12.3166 3.29289 12.7071C3.68342 13.0976 4.31658 13.0976 4.70711 12.7071L11 6.41421L11 20C11 20.5523 11.4477 21 12 21C12.5523 21 13 20.5523 13 20L13 6.41422L19.2929 12.7071Z">`),gW=e=>{let t=()=>e.size??10;return(()=>{var n=hW();return fR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},_W=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path class=icon-loader-bar d="M12 2v4"style=animation-delay:0ms></path><path class=icon-loader-bar d="M15 6.8l2-3.5"style=animation-delay:-42ms></path><path class=icon-loader-bar d="M17.2 9l3.5-2"style=animation-delay:-83ms></path><path class=icon-loader-bar d="M18 12h4"style=animation-delay:-125ms></path><path class=icon-loader-bar d="M17.2 15l3.5 2"style=animation-delay:-167ms></path><path class=icon-loader-bar d="M15 17.2l2 3.5"style=animation-delay:-208ms></path><path class=icon-loader-bar d="M12 18v4"style=animation-delay:-250ms></path><path class=icon-loader-bar d="M9 17.2l-2 3.5"style=animation-delay:-292ms></path><path class=icon-loader-bar d="M6.8 15l-3.5 2"style=animation-delay:-333ms></path><path class=icon-loader-bar d="M2 12h4"style=animation-delay:-375ms></path><path class=icon-loader-bar d="M6.8 9l-3.5-2"style=animation-delay:-417ms></path><path class=icon-loader-bar d="M9 6.8l-2-3.5"style=animation-delay:-458ms>`),vW=e=>{let t=()=>e.size??16;return(()=>{var n=_W();return n.firstChild.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling,fR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},yW=Z(`<svg data-react-grab-arrow class="absolute block z-10"><path>`),bW=e=>{let t=()=>e.color??`var(--rg-panel-bg)`,n=()=>e.position===`bottom`,r=()=>uW(e.labelWidth??0),i=()=>r()*2,a=()=>r(),o=()=>{let e=i(),t=a(),r=1*Math.SQRT1_2,o=e/2,s=n()?t:0,c=n()?r:t-r,l=+!!n();return`M0 ${s} L${o-r} ${c} A1 1 0 0 ${l} ${o+r} ${c} L${e} ${s} Z`};return(()=>{var r=yW(),s=r.firstChild;return fR(c=>{var l=i(),u=a(),d=`0 0 ${i()} ${a()}`,f=`calc(${e.leftPercent}% + ${e.leftOffsetPx}px)`,p=n()?`0`:void 0,m=n()?void 0:`0`,h=n()?`translateX(-50%) translateY(calc(-100% + 1px))`:`translateX(-50%) translateY(calc(100% - 1px))`,g=o(),_=t();return l!==c.e&&Q(r,`width`,c.e=l),u!==c.t&&Q(r,`height`,c.t=u),d!==c.a&&Q(r,`viewBox`,c.a=d),f!==c.o&&pz(r,`left`,c.o=f),p!==c.i&&pz(r,`top`,c.i=p),m!==c.n&&pz(r,`bottom`,c.n=m),h!==c.s&&pz(r,`transform`,c.s=h),g!==c.h&&Q(s,`d`,c.h=g),_!==c.r&&Q(s,`fill`,c.r=_),c},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0}),r})()},xW=Z(`<span class=text-[var(--rg-text-primary)]>`),SW=Z(`<span class=text-[var(--rg-text-secondary)]>.`),CW=Z(`<span class="text-[13px] leading-4 h-fit font-medium overflow-hidden text-ellipsis whitespace-nowrap min-w-0">`),wW=Z(`<button type=button>`),TW=Z(`<div>`),EW=e=>{let t=()=>{e.onHoverChange?.(!0)},n=()=>{e.onHoverChange?.(!1)},r=()=>e.componentName?`${e.componentName}.${e.tagName}`:e.tagName,i=()=>(()=>{var t=CW();return $(t,X(ez,{get when(){return e.componentName},get children(){return[(()=>{var t=xW();return $(t,()=>e.componentName),t})(),(()=>{var t=SW();return t.firstChild,$(t,()=>e.tagName,null),t})()]}}),null),$(t,X(ez,{get when(){return!e.componentName},get children(){var t=xW();return $(t,()=>e.tagName),t}}),null),t})();return X(ez,{get when(){return e.isClickable},get fallback(){return(()=>{var r=TW();return uz(r,`click`,e.onClick,!0),r.addEventListener(`mouseleave`,n),r.addEventListener(`mouseenter`,t),$(r,i),fR(()=>lz(r,pW(`contain-layout flex items-center gap-1 max-w-[280px] overflow-hidden`,e.shrink&&`shrink-0`))),r})()},get children(){var a=wW();return uz(a,`click`,e.onClick,!0),a.addEventListener(`mouseleave`,n),a.addEventListener(`mouseenter`,t),$(a,i),fR(t=>{var n=`Open source for ${r()}`,i=pW(`contain-layout flex items-center gap-1 max-w-[280px] overflow-hidden cursor-pointer bg-transparent border-none p-0 m-0 text-left`,e.shrink&&`shrink-0`);return n!==t.e&&Q(a,`aria-label`,t.e=n),i!==t.t&&lz(a,t.t=i),t},{e:void 0,t:void 0}),a}})},oz([`click`]),DW=Z(`<div class="[font-synthesis:none] contain-layout shrink-0 flex flex-col items-start px-2 py-1.5 w-auto h-fit self-stretch [border-top-width:0.5px] border-t-solid border-t-[var(--rg-border-subtle)] antialiased rounded-t-none rounded-b-[6px]">`),OW=e=>(()=>{var t=DW();return $(t,()=>e.children),t})(),kW=(e,t={})=>(n={})=>{let r=t.variants;if(!r)return e;let i=[e];for(let e in r){let a=n[e]??t.defaultVariants?.[e];if(a===void 0)continue;let o=r[e][String(a)];o&&i.push(o)}return pW(...i)},AW=Z(`<div>`),jW=kW(`contain-layout antialiased [font-synthesis:none] bg-[var(--rg-panel-bg)]`,{variants:{shape:{panel:`rounded-[14px] [corner-shape:superellipse(1.25)]`,pill:`rounded-full`}},defaultVariants:{shape:`panel`}}),MW=e=>{let[t,n]=ZR(e,[`shape`,`class`]);return(()=>{var e=AW();return mz(e,XR({get class(){return pW(jW({shape:t.shape}),t.class)}},n),!1,!1),e})()},NW=null,PW={claim:e=>{NW=e},release:e=>{NW===e&&(NW=null)},isActive:e=>NW===e},FW=e=>{let t=Symbol(),n=NM(n=>{PW.isActive(t)&&(iB(n)||(n.code===`Enter`?e.onEnter?.(n):n.code===`Escape`&&e.onEscape?.(n)))});return yR(()=>{PW.claim(t),window.addEventListener(`keydown`,n,{capture:!0})}),bR(()=>{PW.release(t),window.removeEventListener(`keydown`,n,{capture:!0})}),{claimFocus:()=>PW.claim(t)}},IW=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M10.7071 21.2071C10.3166 21.5976 9.68342 21.5976 9.29289 21.2071L3.29289 15.2071C2.90237 14.8166 2.90237 14.1834 3.29289 13.7929L9.29289 7.79289C9.68342 7.40237 10.3166 7.40237 10.7071 7.79289C11.0976 8.18342 11.0976 8.81658 10.7071 9.20711L6.41421 13.5H16C16.5523 13.5 17 13.0523 17 12.5V3.5C17 2.94772 17.4477 2.5 18 2.5C18.5523 2.5 19 2.94772 19 3.5V12.5C19 14.1569 17.6569 15.5 16 15.5H6.41421L10.7071 19.7929C11.0976 20.1834 11.0976 20.8166 10.7071 21.2071Z">`),LW=e=>{let t=()=>e.size??10;return(()=>{var n=IW();return fR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},RW=Z(`<button>`),zW=kW(`contain-layout shrink-0 flex items-center justify-center cursor-pointer transition-all press-scale`,{variants:{variant:{chip:`px-[3px] py-px h-[17px] rounded-sm bg-[var(--rg-surface-hover)] [border-width:0.5px] border-solid border-[var(--rg-border-button)] hover:bg-[var(--rg-surface-active)] text-[var(--rg-text-primary)]`,destructive:`px-[3px] py-px h-[17px] rounded-sm bg-[var(--rg-error-bg)] hover:bg-[var(--rg-error-bg-hover)] text-[var(--rg-error-text)]`,ghost:`rounded-sm bg-transparent hover:bg-[var(--rg-surface-hover)] border-none outline-none p-0`}},defaultVariants:{variant:`chip`}}),BW=e=>{let[t,n]=ZR(e,[`variant`,`class`,`type`]);return(()=>{var e=RW();return mz(e,XR({get type(){return t.type??`button`},get class(){return pW(zW({variant:t.variant}),t.class)}},n),!1,!1),e})()},VW=Z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">No`),HW=Z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Copy`),UW=Z(`<span class="text-[var(--rg-error-text)] text-[13px] leading-3.5 font-sans font-medium">Yes`),WW=Z(`<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit">`),GW=Z(`<div data-react-grab-discard-prompt class="contain-layout shrink-0 flex flex-col justify-center items-end w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 px-2 w-full h-fit"><span class="text-[var(--rg-text-primary)] text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit">`),KW=e=>{let t=()=>e.showCancel??!0,{claimFocus:n}=FW({onEnter:t=>{t.preventDefault(),t.stopPropagation();let n=t.composedPath()[0],r=n instanceof HTMLElement?n:null;if(r?.closest(`[data-react-grab-discard-copy]`)){e.onCopy?.();return}if(r?.closest(`[data-react-grab-discard-no]`)){e.onCancel?.();return}if(r?.closest(`[data-react-grab-discard-yes]`)){e.onConfirm?.();return}e.onConfirm?.()},onEscape:t=>{t.preventDefault(),t.stopPropagation(),e.cancelOnEscape?e.onCancel?.():e.onConfirm?.()}});return(()=>{var r=GW(),i=r.firstChild.firstChild;return uz(r,`click`,n,!0),uz(r,`pointerdown`,n,!0),$(i,()=>e.label??`Discard?`),$(r,X(OW,{get children(){var n=WW();return $(n,X(ez,{get when(){return t()},get children(){return X(BW,{"data-react-grab-discard-no":!0,get onClick(){return e.onCancel},get children(){return VW()}})}}),null),$(n,X(ez,{get when(){return e.onCopy},get children(){return X(BW,{"data-react-grab-discard-copy":!0,get onClick(){return e.onCopy},get children(){return HW()}})}}),null),$(n,X(BW,{variant:`destructive`,class:`gap-0.5`,"data-react-grab-discard-yes":!0,get onClick(){return e.onConfirm},get children(){return[UW(),X(LW,{size:10,class:`text-[var(--rg-error-text)] opacity-50`})]}}),null),n}}),null),r})()},oz([`pointerdown`,`click`]),qW=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M7 2C4.23858 2 2 4.23858 2 7V15C2 17.7614 4.23858 20 7 20H8C8.55228 20 9 19.5523 9 19C9 18.4477 8.55228 18 8 18H7C5.34315 18 4 16.6569 4 15V7C4 5.34315 5.34315 4 7 4H17C18.6569 4 20 5.34315 20 7V15C20 16.6569 18.6569 18 17 18H14.4142L16.2071 16.2071C16.5976 15.8166 16.5976 15.1834 16.2071 14.7929C15.8166 14.4024 15.1834 14.4024 14.7929 14.7929L11.2929 18.2929C11.197 18.3888 11.1247 18.4993 11.0759 18.6172C11.027 18.7351 11 18.8644 11 19C11 19.2728 11.1093 19.5201 11.2864 19.7005C11.2889 19.7031 11.2914 19.7056 11.2939 19.7081L14.7929 23.2071C15.1834 23.5976 15.8166 23.5976 16.2071 23.2071C16.5976 22.8166 16.5976 22.1834 16.2071 21.7929L14.4142 20H17C19.7614 20 22 17.7614 22 15V7C22 4.23858 19.7614 2 17 2H7Z">`),JW=e=>{let t=()=>e.size??12;return(()=>{var n=qW();return fR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},YW=Z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Retry`),XW=Z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Ok`),ZW=Z(`<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit">`),QW=Z(`<div data-react-grab-error role=alert aria-live=assertive class="contain-layout shrink-0 flex flex-col justify-center items-end w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-start gap-1 px-2 w-full h-fit"><span class="text-[var(--rg-error-text)] text-[13px] leading-4 font-sans font-medium overflow-hidden line-clamp-5">`),$W=e=>{let{claimFocus:t}=FW({onEnter:t=>{t.preventDefault(),t.stopPropagation(),e.onRetry?.()},onEscape:t=>{t.preventDefault(),t.stopPropagation(),e.onAcknowledge?.()}}),n=()=>!!(e.onRetry||e.onAcknowledge);return(()=>{var r=QW(),i=r.firstChild,a=i.firstChild;return uz(r,`click`,t,!0),uz(r,`pointerdown`,t,!0),$(a,()=>e.error),$(r,X(ez,{get when(){return n()},get children(){return X(OW,{get children(){var t=ZW();return $(t,X(ez,{get when(){return e.onRetry},get children(){return X(BW,{"data-react-grab-retry":!0,class:`gap-1`,"aria-keyshortcuts":`Enter`,get onClick(){return e.onRetry},get children(){return[YW(),X(JW,{size:10,"aria-hidden":`true`,class:`text-[var(--rg-text-secondary)]`})]}})}}),null),$(t,X(ez,{get when(){return e.onAcknowledge},get children(){return X(BW,{"data-react-grab-error-ok":!0,class:`gap-1`,"aria-keyshortcuts":`Escape`,get onClick(){return e.onAcknowledge},get children(){return XW()}})}}),null),t}})}}),null),fR(t=>{var r={"pt-1.5 pb-1":n(),"py-1.5":!n()},o=e.error;return t.e=dz(i,r,t.e),o!==t.t&&Q(a,`title`,t.t=o),t},{e:void 0,t:void 0}),r})()},oz([`pointerdown`,`click`]),eG=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M7.5 12C7.5 13.3807 6.38071 14.5 5 14.5C3.61929 14.5 2.5 13.3807 2.5 12C2.5 10.6193 3.61929 9.5 5 9.5C6.38071 9.5 7.5 10.6193 7.5 12ZM14.5 12C14.5 13.3807 13.3807 14.5 12 14.5C10.6193 14.5 9.5 13.3807 9.5 12C9.5 10.6193 10.6193 9.5 12 9.5C13.3807 9.5 14.5 10.6193 14.5 12ZM19 14.5C20.3807 14.5 21.5 13.3807 21.5 12C21.5 10.6193 20.3807 9.5 19 9.5C17.6193 9.5 16.5 10.6193 16.5 12C16.5 13.3807 17.6193 14.5 19 14.5Z">`),tG=e=>{let t=()=>e.size??14;return(()=>{var n=eG();return fR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},nG=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM17.7071 10.7071C18.0976 10.3166 18.0976 9.68342 17.7071 9.29289C17.3166 8.90237 16.6834 8.90237 16.2929 9.29289L11 14.5858L8.70711 12.2929C8.31658 11.9024 7.68342 11.9024 7.29289 12.2929C6.90237 12.6834 6.90237 13.3166 7.29289 13.7071L10.2929 16.7071C10.6834 17.0976 11.3166 17.0976 11.7071 16.7071L17.7071 10.7071Z">`),rG=e=>{let t=()=>e.size??14;return(()=>{var n=nG();return fR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},iG=Z(`<button data-react-grab-ignore-events data-react-grab-more-options>`),aG=Z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Keep`),oG=Z(`<div class="contain-layout shrink-0 flex items-center justify-between gap-2 pt-1.5 pb-1 px-2 w-full h-fit"><span class="text-[var(--rg-text-primary)] text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap min-w-0"></span><div class="contain-layout shrink-0 flex items-center gap-2 h-fit">`),sG=Z(`<div class="contain-layout shrink-0 flex items-center gap-0.5 py-1.5 px-2 w-full h-fit"><span class="text-[var(--rg-text-primary)] text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap min-w-0">`),cG=e=>(()=>{var t=iG();return uz(t,`click`,t=>{t.stopImmediatePropagation(),e.onClick()}),uz(t,`pointerdown`,e=>{e.stopImmediatePropagation()}),$(t,X(tG,{size:14,class:`opacity-50 group-hover:opacity-100 transition-opacity`})),fR(()=>lz(t,pW(zW({variant:`ghost`}),`group size-4 text-[var(--rg-text-secondary)] hover:text-[var(--rg-text-primary)]`))),t})(),lG=e=>{let t,n,[r,i]=J(!1),[a,o]=J(!1),s=()=>r()?`Copied`:e.statusText,c=()=>{t!==void 0&&window.clearTimeout(t),n!==void 0&&window.clearTimeout(n),o(!0),e.onFadingChange?.(!0),e.onShowContextMenu?.()},l=()=>{r()||(i(!0),t=window.setTimeout(()=>{o(!0),e.onFadingChange?.(!0),n=window.setTimeout(()=>{e.onDismiss?.()},125)},1375))},{claimFocus:u}=FW({onEnter:e=>{e.preventDefault(),e.stopPropagation(),l()},onEscape:t=>{t.preventDefault(),t.stopPropagation(),e.onDismiss?.()}});return bR(()=>{t!==void 0&&window.clearTimeout(t),n!==void 0&&window.clearTimeout(n)}),X(MW,{shape:`pill`,"data-react-grab-completion":!0,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,class:`shrink-0 flex flex-col justify-center items-end w-fit h-fit max-w-[280px] transition-opacity duration-100 ease-out`,get style(){return{opacity:+!a()}},onPointerDown:u,onClick:u,get children(){return[X(ez,{get when(){return $z(()=>!r())()&&e.onDismiss},get children(){var t=oG(),n=t.firstChild,i=n.nextSibling;return $(n,s),$(i,X(ez,{get when(){return e.onShowContextMenu},get children(){return X(cG,{onClick:c})}}),null),$(i,X(ez,{get when(){return e.onDismiss},get children(){return X(BW,{"data-react-grab-dismiss":!0,class:`gap-1`,"aria-keyshortcuts":`Enter`,onClick:l,get disabled(){return r()},get"aria-disabled"(){return r()},get children(){return[aG(),X(ez,{get when(){return!r()},get children(){return X(LW,{size:10,class:`text-[var(--rg-text-secondary)]`})}})]}})}}),null),t}}),X(ez,{get when(){return r()||!e.onDismiss},get children(){var t=sG(),n=t.firstChild;return $(t,X(rG,{size:14,"aria-hidden":`true`,class:`text-[var(--rg-text-primary-85)] shrink-0`}),n),$(n,s),$(t,X(ez,{get when(){return e.onShowContextMenu},get children(){return X(cG,{onClick:c})}}),null),t}})]}})},uG=Z(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 py-1.5 px-2 w-full h-fit"><span class="shimmer-text text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap">`),dG=Z(`<div class="contain-layout shrink-0 flex flex-col items-start w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 w-fit h-fit px-2 py-1.5">`),fG=Z(`<button data-react-grab-submit type=button aria-label="Submit context"class="contain-layout shrink-0 flex items-center justify-center size-4 rounded-full bg-[var(--rg-submit-bg)] cursor-pointer ml-1 interactive-scale a11y-hitbox">`),pG=Z(`<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events data-react-grab-input aria-label="Add context for selected element"aria-keyshortcuts="Enter Escape"class="text-[var(--rg-text-primary)] text-[13px] leading-4 font-medium bg-transparent border-none resize-none flex-1 p-0 m-0 wrap-break-word overflow-y-auto"placeholder="Add context"rows=1 style=field-sizing:content;min-height:16px;scrollbar-width:none>`),mG=Z(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start w-fit h-fit min-w-[150px] max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2 max-w-full">`),hG=Z(`<div data-react-grab-ignore-events data-react-grab-selection-label>`),gG={left:jN,top:jN,arrowLeftPercent:50,arrowLeftOffset:0,edgeOffsetX:0},_G=e=>{let t,n,r,i=!1,[a,o]=J(0),[s,c]=J(0),[l,u]=J(0),[d,f]=J(0),[p,m]=J(!1),[h,g]=J(!1),_=()=>e.status!==`copying`&&e.status!==`copied`&&e.status!==`fading`&&e.status!==`error`,v=()=>e.status===`copied`||e.status===`fading`,y=()=>!!e.shouldToggleExpandOnClick&&!!e.onToggleExpand&&_()&&!e.discardPrompt&&!e.isPromptMode,b=()=>!!(e.isPromptMode||e.discardPrompt||y()||v()&&(e.onDismiss||e.onShowContextMenu)||e.status===`error`&&(e.onAcknowledgeError||e.onRetry)),x,S=e=>{i=e},C=()=>{f(e=>e+1)},w=NM(t=>{iB(t)||t.code===`Enter`&&!e.isPromptMode&&!e.discardPrompt&&_()&&(t.preventDefault(),t.stopImmediatePropagation(),e.onToggleExpand?.())});yR(()=>{let r=jM();if(x=new ResizeObserver(e=>{for(let a of e){let e=a.target.getBoundingClientRect();a.target===t&&!i?(o(e.width),c(e.height)):a.target===n?u(e.width):a.target===r&&C()}}),r&&x.observe(r),t){let e=t.getBoundingClientRect();o(e.width),c(e.height),x.observe(t)}n&&(u(n.getBoundingClientRect().width),x.observe(n)),window.addEventListener(`scroll`,C,!0),window.addEventListener(`resize`,C),window.visualViewport?.addEventListener(`resize`,C),window.visualViewport?.addEventListener(`scroll`,C),e.onToggleExpand&&window.addEventListener(`keydown`,w,{capture:!0})}),bR(()=>{x?.disconnect(),window.removeEventListener(`scroll`,C,!0),window.removeEventListener(`resize`,C),window.visualViewport?.removeEventListener(`resize`,C),window.visualViewport?.removeEventListener(`scroll`,C),window.removeEventListener(`keydown`,w,{capture:!0})});let T=()=>`${e.tagName??``}:${e.componentName??``}`,E=Y(t=>{d();let n=T(),r=n===t.elementIdentity?t:{position:gG,computedArrowPosition:null,hadValidBounds:!1,elementIdentity:n},i=e.selectionBounds,o=a(),c=s(),u=o>0&&c>0,f=i&&i.width>0&&i.height>0;if(!u||!f)return{position:r.hadValidBounds?r.position:gG,computedArrowPosition:r.computedArrowPosition,hadValidBounds:r.hadValidBounds,elementIdentity:n};let p=dW(),m=p.offsetLeft,h=p.offsetTop,g=m+p.width,_=h+p.height;if(!(i.x+i.width>m&&i.x<g&&i.y+i.height>h&&i.y<_))return{position:gG,computedArrowPosition:r.computedArrowPosition,hadValidBounds:r.hadValidBounds,elementIdentity:n};let v=i.x+i.width/2,y=e.mouseX??v,b=i.y+i.height,x=i.y,S=e.hideArrow?0:uW(l()),C=y,w=0,E=b+S+4;if(o>0){let e=C-o/2,t=C+o/2;t>g-8&&(w=g-8-t),e+w<m+8&&(w=m+8-e)}let D=c+S+4,O=E+c<=_-8;O||(E=x-D),E<h+8&&(E=h+8);let k=o/2,ee=k-w,te=Math.min(16,k),A=Math.max(o-16,k),ne=Math.max(te,Math.min(A,ee))-k;return{position:{left:C,top:E,arrowLeftPercent:50,arrowLeftOffset:ne,edgeOffsetX:w},computedArrowPosition:O?`bottom`:`top`,hadValidBounds:!0,elementIdentity:n}},{position:gG,computedArrowPosition:null,hadValidBounds:!1,elementIdentity:``}),D=()=>E().computedArrowPosition??`bottom`,O=()=>E().hadValidBounds;pR(vR(()=>e.selectionLabelShakeCount,()=>g(!0),{defer:!0}));let k=t=>{if(t.isComposing||t.keyCode===229)return;t.stopImmediatePropagation();let n=t.code===`Enter`&&!t.shiftKey,r=t.code===`Escape`;n?(t.preventDefault(),e.onSubmit?.()):r&&(t.preventDefault(),e.onConfirmDismiss?.())},ee=t=>{let n=t.target;n instanceof HTMLTextAreaElement&&(cW(n,95),e.onInputChange?.(n.value))},te=()=>mW({tagName:e.tagName,componentName:e.componentName,elementsCount:e.elementsCount}),A=Y(()=>!(e.error||e.discardPrompt||_()&&e.isPromptMode)),ne=t=>{if(t.stopImmediatePropagation(),e.filePath&&e.onOpen){e.onOpen();return}y()&&e.onToggleExpand?.()},re=t=>{t.stopImmediatePropagation(),_()&&e.isPromptMode&&!e.discardPrompt&&e.onSubmit&&r&&lW(r,{preventScroll:!0})},ie=()=>O()&&(v()||e.status===`error`);return X(ez,{get when(){return $z(()=>e.visible!==!1)()&&(e.selectionBounds||ie())},get children(){var i=hG();i.addEventListener(`mouseleave`,()=>e.onHoverChange?.(!1)),i.addEventListener(`mouseenter`,()=>e.onHoverChange?.(!0)),i.$$click=e=>{e.stopImmediatePropagation()},i.$$pointerdown=re;var a=t;return typeof a==`function`?hz(a,i):t=i,pz(i,`z-index`,`${WM}`),pz(i,`transition`,`opacity 125ms ease-out, filter 125ms ease-out`),$(i,X(ez,{get when(){return!e.hideArrow},get children(){return X(bW,{get position(){return D()},get leftPercent(){return E().position.arrowLeftPercent},get leftOffsetPx(){return E().position.arrowLeftOffset},get labelWidth(){return l()}})}}),null),$(i,X(ez,{get when(){return $z(()=>!!v())()&&!e.error},get children(){return X(lG,{get statusText(){return e.statusText??`Copied`},get onDismiss(){return e.onDismiss},onFadingChange:m,get onShowContextMenu(){return e.onShowContextMenu}})}}),null),$(i,X(MW,{ref:e=>n=e,get shape(){return A()?`pill`:`panel`},get class(){return pW(`flex items-center gap-[5px] w-fit h-fit p-0`,h()&&`animate-shake`)},get style(){return{display:v()&&!e.error?`none`:void 0}},onAnimationEnd:()=>g(!1),get children(){return[X(ez,{get when(){return e.status===`copying`},get children(){var t=uG(),n=t.firstChild,r=n.firstChild;return $(n,X(vW,{size:13,class:`text-[var(--rg-text-secondary)] shrink-0`}),r),$(r,()=>e.statusText??`Grabbing…`),t}}),X(ez,{get when(){return $z(()=>!!(_()&&!e.isPromptMode))()&&!e.discardPrompt},get children(){var t=dG(),n=t.firstChild;return $(n,X(EW,{get tagName(){return te().tagName},get componentName(){return te().componentName},get isClickable(){return!!(e.filePath&&e.onOpen)},onClick:ne,onHoverChange:S,shrink:!0})),t}}),X(ez,{get when(){return $z(()=>!!(_()&&e.isPromptMode))()&&!e.discardPrompt},get children(){var t=mG(),n=t.firstChild;return $(n,X(EW,{get tagName(){return te().tagName},get componentName(){return te().componentName},get isClickable(){return!!(e.filePath&&e.onOpen)},onClick:ne,onHoverChange:S})),$(t,X(OW,{get children(){var t=pG(),n=t.firstChild;return n.$$keydown=k,n.$$input=ee,hz(t=>{r=t,e.onSubmit&&queueMicrotask(()=>{lW(t,{preventScroll:!0}),cW(t,95)})},n),pz(n,`max-height`,`95px`),$(t,X(ez,{get when(){return e.onSubmit},get children(){var t=fG();return t.$$click=()=>e.onSubmit?.(),$(t,X(gW,{size:10,"aria-hidden":`true`,class:`text-[var(--rg-submit-fg)]`})),t}}),null),fR(()=>n.readOnly=!e.onSubmit),fR(()=>n.value=e.inputValue??``),t}}),null),t}}),X(ez,{get when(){return e.discardPrompt},keyed:!0,children:e=>X(KW,{get label(){return $z(()=>!!e.isKeyboardSelection)()?`Discard selection?`:e.label},get showCancel(){return!e.isKeyboardSelection},get cancelOnEscape(){return e.cancelOnEscape},get onConfirm(){return e.onConfirm},get onCopy(){return e.onCopy},onCancel:()=>{e.isKeyboardSelection||e.onCancel?.(),lW(r,{preventScroll:!0})}})}),X(ez,{get when(){return e.error},get children(){return X($W,{get error(){return e.error},get onAcknowledge(){return e.onAcknowledgeError},get onRetry(){return e.onRetry}})}})]}}),null),fR(t=>{var n=pW(`fixed font-sans text-[13px] antialiased select-none ease-out`),r=`${E().position.top}px`,a=`${E().position.left}px`,o=`translateX(calc(-50% + ${E().position.edgeOffsetX}px))`,s=b()?`auto`:`none`,c=e.status===`fading`||p()?0:1,l=`drop-shadow(${IM}) blur(${e.status===`fading`||p()?`3px`:`0`})`;return n!==t.e&&lz(i,t.e=n),r!==t.t&&pz(i,`top`,t.t=r),a!==t.a&&pz(i,`left`,t.a=a),o!==t.o&&pz(i,`transform`,t.o=o),s!==t.i&&pz(i,`pointer-events`,t.i=s),c!==t.n&&pz(i,`opacity`,t.n=c),l!==t.s&&pz(i,`filter`,t.s=l),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),i}})},oz([`pointerdown`,`click`,`input`,`keydown`]),vG=Z(`<span style="transition-property:transform;transition-timing-function:cubic-bezier(0.32, 0.72, 0, 1)"><svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M20.8977 4.02356L21.8277 4.39121C22.3784 2.99813 21.0382 1.60206 19.6238 2.09546L3.47334 7.72936C1.38661 8.45728 1.49021 11.443 3.6224 12.0245L10.1289 13.799L11.2331 19.8724C11.638 22.0991 14.7072 22.4019 15.5393 20.2972L21.8277 4.39121L20.8977 4.02356Z">`),yG=e=>{let t=()=>e.size??14,n=()=>e.rotationDeg??0;return(()=>{var r=vG(),i=r.firstChild;return pz(r,`transition-duration`,`180ms`),fR(a=>{var o=pW(`inline-flex items-center justify-center will-change-transform`,e.class),s=`rotate(${n()}deg)`,c=t(),l=t();return o!==a.e&&lz(r,a.e=o),s!==a.t&&pz(r,`transform`,a.t=s),c!==a.a&&Q(i,`width`,a.a=c),l!==a.o&&Q(i,`height`,a.o=l),a},{e:void 0,t:void 0,a:void 0,o:void 0}),r})()},bG=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 12 12"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M1 6C1 3.239 3.239 1 6 1C8.761 1 11 3.239 11 6C11 8.761 8.761 11 6 11C5.103 11 4.261 10.764 3.532 10.35C2.959 10.759 2.257 11 1.5 11C1.376 11 1.253 10.993 1.132 10.981C0.923 10.959 0.75 10.809 0.699 10.605C0.648 10.402 0.729 10.188 0.903 10.07C1.347 9.768 1.688 9.328 1.865 8.812C1.319 8.011 1 7.042 1 6Z">`),xG=e=>{let t=()=>e.size??14;return(()=>{var n=bG();return fR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},SG=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M2 12C2 6.477 6.477 2 12 2C17.523 2 22 6.477 22 12C22 13.867 20.345 14.992 18.77 14.992H16.029C14.739 14.992 13.823 16.248 14.218 17.476L14.48 18.295C14.751 19.139 14.643 20.041 14.211 20.751C13.769 21.479 12.985 22 12 22C6.477 22 2 17.523 2 12ZM12.21 6.783C12.416 7.585 11.933 8.403 11.131 8.609C10.328 8.815 9.511 8.332 9.305 7.529C9.099 6.727 9.582 5.909 10.384 5.703C11.187 5.497 12.004 5.981 12.21 6.783ZM7.59 9.207C8.388 9.43 8.853 10.258 8.63 11.055C8.407 11.853 7.579 12.319 6.782 12.096C5.984 11.873 5.518 11.045 5.741 10.247C5.964 9.449 6.792 8.983 7.59 9.207ZM9.497 14.446C8.918 13.854 7.968 13.844 7.376 14.423C6.784 15.002 6.773 15.952 7.353 16.544C7.932 17.136 8.882 17.147 9.474 16.567C10.066 15.988 10.076 15.039 9.497 14.446ZM16.624 9.575C16.032 10.155 15.082 10.144 14.503 9.552C13.923 8.96 13.934 8.01 14.526 7.431C15.118 6.852 16.068 6.862 16.647 7.454C17.226 8.046 17.216 8.996 16.624 9.575Z">`),CG=e=>{let t=()=>e.size??14;return(()=>{var n=SG();return fR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},wG=Z(`<div>`),TG=0,EG=()=>Date.now()-TG<800,DG=e=>{let[t,n]=J(!1),[r,i]=J(!0),a;pR(vR(()=>e.visible,e=>{a!==void 0&&(clearTimeout(a),a=void 0),e?EG()?(i(!1),n(!0)):(i(!0),a=setTimeout(()=>{n(!0)},400)):(t()&&(TG=Date.now()),n(!1))})),bR(()=>{a!==void 0&&clearTimeout(a),t()&&(TG=Date.now())});let o=()=>e.position===`top`||e.position===`bottom`?{left:`50%`,translate:`-50%`,"z-index":`${WM}`}:{top:`50%`,translate:`0 -50%`,"z-index":`${WM}`};return X(ez,{get when(){return t()},get children(){var t=wG();return $(t,()=>e.children),fR(n=>{var i=pW(`absolute whitespace-nowrap px-2 py-0.5 rounded-full text-[10px] font-sans font-medium leading-4 pointer-events-none`,`bg-[var(--rg-panel-bg)] text-[var(--rg-text-primary)] [box-shadow:var(--rg-shadow)]`,e.position===`top`&&`bottom-full mb-2.5`,e.position===`bottom`&&`top-full mt-2.5`,e.position===`left`&&`right-full mr-2.5`,e.position===`right`&&`left-full ml-2.5`,r()&&`animate-tooltip-fade-in`),a=o();return i!==n.e&&lz(t,n.e=i),n.t=fz(t,a,n.t),n},{e:void 0,t:void 0}),t}})},OG=Z(`<div><button data-react-grab-ignore-events type=button>`),kG=e=>(()=>{var t=OG(),n=t.firstChild;uz(n,`mouseleave`,e.onMouseLeave),uz(n,`mouseenter`,e.onMouseEnter),uz(n,`contextmenu`,t=>e.onContextMenu?.(t)),uz(n,`click`,e.onClick,!0);var r=e.ref;return typeof r==`function`?hz(r,n):e.ref=n,$(n,()=>e.icon),$(t,X(ez,{get when(){return e.tooltip},get children(){return X(DG,{get visible(){return!!e.tooltipVisible},get position(){return e.tooltipPosition??`top`},get children(){return e.tooltip}})}}),null),fR(r=>{var i=e.wrapperClass,a=e.isToggle?``:void 0,o=e.actionId,s=e.label,c=!!e.isActive,l=e.class;return i!==r.e&&lz(t,r.e=i),a!==r.t&&Q(n,`data-react-grab-toolbar-toggle`,r.t=a),o!==r.a&&Q(n,`data-react-grab-toolbar-action`,r.a=o),s!==r.o&&Q(n,`aria-label`,r.o=s),c!==r.i&&Q(n,`aria-pressed`,r.i=c),l!==r.n&&lz(n,r.n=l),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),t})(),oz([`click`]),AG=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M9.29289 16.7071C8.90237 16.3166 8.90237 15.6834 9.29289 15.2929L12.5858 12L9.29289 8.70711C8.90237 8.31658 8.90237 7.68342 9.29289 7.29289C9.68342 6.90237 10.3166 6.90237 10.7071 7.29289L14.7071 11.2929C14.8946 11.4804 15 11.7348 15 12C15 12.2652 14.8946 12.5196 14.7071 12.7071L10.7071 16.7071C10.3166 17.0976 9.68342 17.0976 9.29289 16.7071Z">`),jG=e=>{let t=()=>e.size??14;return(()=>{var n=AG();return fR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},MG=Z(`<button data-react-grab-ignore-events data-react-grab-toolbar-collapse type=button class="group contain-layout shrink-0 flex items-center justify-center cursor-pointer interactive-scale a11y-hitbox">`),NG=Z(`<div data-react-grab-toolbar-panel><div><div><div>`),PG=e=>{let t=()=>e.snapEdge??`bottom`,n=()=>t()===`left`||t()===`right`,r=()=>e.isCollapsed?`duration-140`:`duration-220`,i=()=>n()?`transition-[grid-template-rows] ${r()} ease-drawer`:`transition-[grid-template-columns] ${r()} ease-drawer`,a=()=>n()?`min-h-0`:`min-w-0`,o=()=>e.isCollapsed?`${{top:`rounded-t-none rounded-b-[10px]`,bottom:`rounded-b-none rounded-t-[10px]`,left:`rounded-l-none rounded-r-[10px]`,right:`rounded-r-none rounded-l-[10px]`}[t()]} ${n()?`px-0.25 py-2`:`px-2 py-0.25`}`:``,s=()=>{let n=e.isCollapsed;switch(t()){case`top`:return n?`rotate-90`:`-rotate-90`;case`bottom`:return n?`-rotate-90`:`rotate-90`;case`left`:return n?`rotate-0`:`rotate-180`;case`right`:return n?`rotate-180`:`rotate-0`;default:return`-rotate-90`}},c=()=>{if(e.isChevronPressed)return n()?`scale(0.97, 1)`:`scale(1, 0.97)`},l=()=>(()=>{var t=MG();return uz(t,`pointercancel`,e.onCollapsePointerLeave),uz(t,`pointerleave`,e.onCollapsePointerLeave),uz(t,`pointerup`,e.onCollapsePointerUp,!0),uz(t,`pointerdown`,e.onCollapsePointerDown),uz(t,`click`,e.onCollapseClick,!0),$(t,X(jG,{size:18,get class(){return pW(`text-[var(--rg-text-secondary)] group-hover:text-[var(--rg-text-primary)] transition-[transform,color] duration-150 ease-drawer -m-0.5`,s())}})),fR(n=>{var r=e.isCollapsed?`Expand toolbar`:`Collapse toolbar`,i=!e.isCollapsed;return r!==n.e&&Q(t,`aria-label`,n.e=r),i!==n.t&&Q(t,`aria-expanded`,n.t=i),n},{e:void 0,t:void 0}),t})(),u=()=>e.isChevronPressed?`transition-[padding,border-radius,transform] duration-60 ease-[cubic-bezier(0,0,0.2,1)]`:`transition-[padding,border-radius,transform] ${r()} ease-drawer`;return(()=>{var t=NG(),r=t.firstChild,s=r.firstChild,d=s.firstChild;return uz(t,`click`,e.onPanelClick,!0),uz(t,`animationend`,e.onAnimationEnd),$(d,()=>e.actionButtons),$(t,l,null),fR(l=>{var f=pW(`flex items-center justify-center rounded-[13px] antialiased relative overflow-visible [font-synthesis:none]`,u(),n()&&`flex-col`,`bg-[var(--rg-panel-bg)] [box-shadow:var(--rg-shadow)]`,!e.isCollapsed&&(n()?`px-1.5 gap-0 py-2`:`py-1.5 gap-0 px-2`),o(),e.isShaking&&(n()?`animate-shake-vertical`:`animate-shake`)),p=e.transformOrigin,m=c(),h=pW(`grid relative overflow-visible`,i(),e.isCollapsed?n()?`grid-rows-[0fr] pointer-events-none`:`grid-cols-[0fr] pointer-events-none`:n()?`grid-rows-[1fr]`:`grid-cols-[1fr]`),g=pW(`flex`,n()?`flex-col items-center min-h-0`:`items-center min-w-0`,e.isCollapsed?`opacity-0`:`opacity-100`,e.isCollapsed?`transition-opacity duration-100 ease-drawer`:`transition-opacity duration-180 ease-drawer delay-[80ms]`),_=pW(`relative overflow-visible flex`,n()?`flex-col items-center`:`items-center`,a());return f!==l.e&&lz(t,l.e=f),p!==l.t&&pz(t,`transform-origin`,l.t=p),m!==l.a&&pz(t,`transform`,l.a=m),h!==l.o&&lz(r,l.o=h),g!==l.i&&lz(s,l.i=g),_!==l.n&&lz(d,l.n=_),l},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),t})()},oz([`click`,`pointerup`]),FG=e=>e===`top`||e===`bottom`,IG=e=>{let t=FG(e);return{width:t?30:16,height:t?16:30}},LG=(e,t,n,r)=>{let i=dW(),a=i.width,o=i.height,s=i.offsetLeft+16,c=Math.max(s,i.offsetLeft+a-n-16),l=i.offsetTop+16,u=Math.max(l,i.offsetTop+o-r-16);if(e===`top`||e===`bottom`){let r=Math.max(0,a-n-32);return{x:Math.min(c,Math.max(s,i.offsetLeft+16+r*t)),y:e===`top`?l:u}}let d=Math.max(0,o-r-32),f=Math.min(u,Math.max(l,i.offsetTop+16+d*t));return{x:e===`left`?s:c,y:f}},RG=(e,t,n,r,i)=>{let a=dW(),o=a.width,s=a.height;if(e===`top`||e===`bottom`){let e=o-r-32;return e<=0?uN:Math.max(0,Math.min(1,(t-a.offsetLeft-16)/e))}let c=s-i-32;return c<=0?uN:Math.max(0,Math.min(1,(n-a.offsetTop-16)/c))},zG=(e,t,n,r,i)=>{let a=dW(),o=a.width,s=a.height,{width:c,height:l}=n,u;if(t===`top`||t===`bottom`){let n=(c-r)/2;u={x:EB(e.x-n,a.offsetLeft+16,a.offsetLeft+o-c-16),y:t===`top`?a.offsetTop+16:a.offsetTop+s-l-16}}else{let n=(l-i)/2,r=EB(e.y-n,a.offsetTop+16,a.offsetTop+s-l-16);u={x:t===`left`?a.offsetLeft+16:a.offsetLeft+o-c-16,y:r}}let d=RG(t,u.x,u.y,c,l);return{position:u,ratio:d}},BG=(e,t,n,r)=>{let i=dW(),{width:a,height:o}=n,{width:s,height:c}=r;switch(e){case`top`:case`bottom`:{let n=(a-s)/2;return{x:EB(t.x+n,i.offsetLeft,i.offsetLeft+i.width-s),y:e===`top`?i.offsetTop:i.offsetTop+i.height-c}}case`left`:case`right`:{let n=(o-c)/2,r=EB(t.y+n,i.offsetTop,i.offsetTop+i.height-c);return{x:e===`left`?i.offsetLeft:i.offsetLeft+i.width-s,y:r}}}},VG=(e,t,n,r,i,a)=>{let o=dW(),s=o.width,c=o.height,l=e+i*150,u=t+a*150,d=u-o.offsetTop+r/2,f=o.offsetTop+c-u-r/2,p=l-o.offsetLeft+n/2,m=o.offsetLeft+s-l-n/2,h=Math.min(d,f,p,m),g=e=>EB(e,o.offsetLeft+16,o.offsetLeft+s-n-16),_=e=>EB(e,o.offsetTop+16,o.offsetTop+c-r-16);return h===d?{edge:`top`,x:g(l),y:o.offsetTop+16}:h===p?{edge:`left`,x:o.offsetLeft+16,y:_(u)}:h===m?{edge:`right`,x:o.offsetLeft+s-n-16,y:_(u)}:{edge:`bottom`,x:g(l),y:o.offsetTop+c-r-16}},HG=e=>{let[t,n]=J(!1),[r,i]=J(!1),[a,o]=J(!1),[s,c]=J({x:0,y:0}),l={x:0,y:0},u={x:0,y:0,time:0},d={x:0,y:0},f=!1,p,m=null,h=()=>{m?.abort(),m=null},g=t=>{if(!a()){if(Math.hypot(t.clientX-d.x,t.clientY-d.y)<=5)return;o(!0),e.onDragStart()}let n=performance.now(),r=n-u.time;r>0&&c({x:(t.clientX-u.x)/r,y:(t.clientY-u.y)/r}),u={x:t.clientX,y:t.clientY,time:n};let i=t.clientX-l.x,s=t.clientY-l.y;e.onPositionUpdate({x:i,y:s})},_=()=>{h();let t=a();if(n(!1),!t)return;f=!0;let r=e.getContainerRef(),o=r?.getBoundingClientRect();if(!o)return;let c=s(),l=VG(o.left,o.top,o.width,o.height,c.x,c.y),u=RG(l.edge,l.x,l.y,o.width,o.height);e.onSnapEdgeChange(l.edge,u),i(!0),XF(()=>{let t=r?.getBoundingClientRect(),n=t?{width:t.width,height:t.height}:e.getExpandedDimensions();XF(()=>{let t=LG(l.edge,u,n.width,n.height);e.onSnapComplete({edge:l.edge,ratio:u,position:t,expandedDimensions:n}),p=setTimeout(()=>{i(!1),e.onSnapAnimationEnd?.()},300)})})},v=NM(t=>{if(t.button!==0||e.isCollapsed())return;let r=e.getContainerRef()?.getBoundingClientRect();if(!r)return;d={x:t.clientX,y:t.clientY},l={x:t.clientX-r.left,y:t.clientY-r.top},n(!0),o(!1),c({x:0,y:0}),u={x:t.clientX,y:t.clientY,time:performance.now()},h(),m=new AbortController;let{signal:i}=m;window.addEventListener(`pointermove`,g,{signal:i}),window.addEventListener(`pointerup`,_,{signal:i}),window.addEventListener(`pointercancel`,_,{signal:i})});return bR(()=>{h(),clearTimeout(p)}),{isDragging:t,isSnapping:r,handlePointerDown:v,createDragAwareHandler:e=>t=>{if(t.stopImmediatePropagation(),f){f=!1;return}e()}}},UG=(e,t)=>{let n=t-e;return e+(n-Math.round(n/360)*360)},WG=Z(`<div data-react-grab-ignore-events data-react-grab-toolbar>`),GG=e=>{let t,n,r=null,i=NV(),[a,o]=J(!1),[s,c]=J(!1),[l,u]=J(!1),[d,f]=J(i?.edge??`bottom`),[p,m]=J(i?.ratio??.5),[h,g]=J({x:0,y:0}),[_,v]=J(!1),[y,b]=J(!1),[x,S]=J(!1),[C,w]=J(!1),[T,E]=J(0),[D,O]=J(null),k=()=>{r?.(),r=null,e.isActive||AL()},ee=HG({getContainerRef:()=>t,isCollapsed:s,getExpandedDimensions:()=>ce,onDragStart:()=>{O(null),r&&k()},onPositionUpdate:e=>g(e),onSnapEdgeChange:(e,t)=>{de(d(),e),f(e),m(t)},onSnapComplete:e=>{ce=e.expandedDimensions,g(e.position),Ae({edge:e.edge,ratio:e.ratio,collapsed:s(),enabled:!s()})}}),te=()=>d()===`left`||d()===`right`,A=()=>te()?`mb-1.5`:`mr-1.5`,ne=t=>e.activeActionId===t,re=()=>!!e.isActive&&(e.activeActionId??`copy`)===`copy`,ie=t=>D()===t&&!e.isActive&&!s()&&!ee.isDragging()&&!ee.isSnapping()&&!e.isContextMenuOpen,ae=()=>{switch(d()){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`;default:return`top`}},oe=e=>{e.stopImmediatePropagation()},se=(t,n)=>({onMouseEnter:e=>{ee.isDragging()||(O(t),n?.shouldFreezeInteractions!==!1&&!r&&(r=oR(),kL(e.clientX,e.clientY)),n?.onHoverChange?.(!0))},onMouseLeave:()=>{O(e=>e===t?null:e),n?.shouldFreezeInteractions!==!1&&!e.isActive&&!e.isContextMenuOpen&&k(),n?.onHoverChange?.(!1)}});pR(vR(()=>e.shakeCount,t=>{t&&!e.enabled&&v(!0)})),pR(vR(()=>[e.isActive,e.isContextMenuOpen],([e,t])=>{!e&&!t&&r&&(r(),r=null)})),pR(vR(()=>re(),e=>{if(!e){E(e=>UG(e,0));return}let t=NM(e=>{if(!n)return;let t=n.getBoundingClientRect(),r=t.left+t.width/2,i=t.top+t.height/2,a=e.clientX-r,o=e.clientY-i;if(Math.hypot(a,o)<4)return;let s=Math.atan2(o,a)*180/Math.PI- -45;E(e=>UG(e,s))});window.addEventListener(`pointermove`,t,{passive:!0}),bR(()=>{window.removeEventListener(`pointermove`,t)})}));let ce={width:78,height:28},[le,ue]=J(IG(d())),de=(e,t)=>{FG(e)!==FG(t)&&ue(IG(t))},fe=(e,n)=>{let r=t?.getBoundingClientRect(),i=IG(n);return zG(e,n,ce,r?.width??i.width,r?.height??i.height)},pe=()=>{g(LG(d(),p(),ce.width,ce.height))},me=ee.createDragAwareHandler(()=>e.onToggle?.()),he=ee.createDragAwareHandler(()=>e.onActivateAction?.(fN)),ge=ee.createDragAwareHandler(()=>e.onActivateAction?.(pN)),_e=`group contain-layout flex items-center justify-center cursor-pointer interactive-scale a11y-hitbox`,ve=()=>pW(`relative contain-layout flex items-center justify-center`,A()),ye=e=>e?`text-[var(--rg-text-primary)]`:`text-[var(--rg-text-secondary)] group-hover:text-[var(--rg-text-primary)]`,be=ee.createDragAwareHandler(()=>{let e=t?.getBoundingClientRect(),n=s(),r=p();if(n){let{position:e,ratio:t}=fe(je(),d());r=t,g(e),m(r)}else e&&(ce={width:e.width,height:e.height});b(!0),c(e=>!e),Ae({edge:d(),ratio:r,collapsed:!n,enabled:n}),Ce&&clearTimeout(Ce),Ce=setTimeout(()=>{b(!1),Te()},260)}),xe=()=>BG(d(),h(),ce,le()),Se,Ce,we=null,Te=()=>{let e=t?.getBoundingClientRect();!e||e.width===0||e.height===0||(s()?ue({width:e.width,height:e.height}):(ce={width:e.width,height:e.height},we={width:e.width,height:e.height}))},Ee=(e,t)=>{if(!(e===0||t===0)&&!(ee.isDragging()||ee.isSnapping())&&!y()){if(s()){let n=le();if(n.width===e&&n.height===t)return;ue({width:e,height:t});return}we&&we.width===e&&we.height===t||(we={width:e,height:t},ce={width:e,height:t},g(LG(d(),p(),e,t)))}},De=null,Oe=()=>{ee.isDragging()||ee.isSnapping()||De===null&&(De=XF(()=>{De=null,pe()}))},ke=()=>{ee.isDragging()||(u(!0),pe(),Se&&clearTimeout(Se),Se=setTimeout(()=>{u(!1);let e=RG(d(),h().x,h().y,ce.width,ce.height);m(e),Ae({edge:d(),ratio:e,collapsed:s(),enabled:!s()})},500))},Ae=t=>{PV(t),e.onStateChange?.(t)};yR(()=>{t&&e.onContainerRef?.(t);let n=t?.getBoundingClientRect(),r=dW(),a=!!(n&&n.width>0&&n.height>0);i?(a&&n&&(ce={width:n.width,height:n.height}),c(i.collapsed),g(LG(i.edge,i.ratio,ce.width,ce.height))):a&&n?(ce={width:n.width,height:n.height},g({x:r.offsetLeft+(r.width-n.width)/2,y:r.offsetTop+r.height-n.height-16}),m(uN)):(g(LG(`bottom`,uN,ce.width,ce.height)),m(uN)),e.onSubscribeToStateChanges&&bR(e.onSubscribeToStateChanges(e=>{if(y()||!t?.getBoundingClientRect())return;let n=s()!==e.collapsed;if(de(d(),e.edge),f(e.edge),n&&!e.collapsed){let t=je();b(!0),c(e.collapsed);let{position:n,ratio:r}=fe(t,e.edge);g(n),m(r),clearTimeout(Ce),Ce=setTimeout(()=>{b(!1),Te()},260)}else n&&(b(!0),clearTimeout(Ce),Ce=setTimeout(()=>{b(!1),Te()},260)),c(e.collapsed),g(LG(e.edge,e.ratio,ce.width,ce.height)),m(e.ratio)})),window.addEventListener(`resize`,ke),window.visualViewport?.addEventListener(`resize`,ke),window.visualViewport?.addEventListener(`scroll`,ke);let l=jM();if(l&&(window.addEventListener(`scroll`,Oe,{passive:!0,capture:!0}),typeof ResizeObserver<`u`)){let e=new ResizeObserver(Oe);e.observe(l),bR(()=>e.disconnect())}if(typeof ResizeObserver<`u`&&t){let e=new ResizeObserver(e=>{let n=e[0];if(!n)return;let r=n.borderBoxSize?.[0],i,a;if(r)i=r.inlineSize,a=r.blockSize;else{let e=t?.getBoundingClientRect();if(!e)return;i=e.width,a=e.height}Ee(i,a)});e.observe(t),bR(()=>e.disconnect())}let u=setTimeout(()=>{o(!0)},500);bR(()=>{clearTimeout(u)})}),bR(()=>{window.removeEventListener(`resize`,ke),window.visualViewport?.removeEventListener(`resize`,ke),window.visualViewport?.removeEventListener(`scroll`,ke),window.removeEventListener(`scroll`,Oe,{capture:!0}),De!==null&&ZF(De),clearTimeout(Se),clearTimeout(Ce),r&&k()});let je=()=>s()?xe():h(),Me=()=>s()?`cursor-pointer`:ee.isDragging()?`cursor-grabbing`:`cursor-grab`,Ne=()=>C()||!!e.isContextMenuOpen||ee.isDragging()||ee.isSnapping()||y()||x(),Pe=()=>!!e.isActive&&!Ne(),Fe=()=>l()||ee.isDragging()?``:ee.isSnapping()?`transition-[transform,opacity] duration-300 ease-out`:y()?`transition-[transform,opacity] ${s()?`duration-140`:`duration-220`} ease-drawer`:`transition-[transform,opacity] duration-400 ease-drawer`,Ie=()=>{switch(d()){case`top`:return`center top`;case`bottom`:return`center bottom`;case`left`:return`left center`;case`right`:return`right center`;default:return`center center`}};return(()=>{var r=WG();r.addEventListener(`mouseleave`,()=>{w(!1),e.onSelectHoverChange?.(!1)}),r.addEventListener(`mouseenter`,()=>{w(!0),s()||e.onSelectHoverChange?.(!0)}),uz(r,`mousedown`,oe),uz(r,`pointerdown`,e=>{oe(e),ee.handlePointerDown(e)});var i=t;return typeof i==`function`?hz(i,r):t=r,$(r,X(PG,{get isCollapsed(){return s()},get snapEdge(){return d()},get isShaking(){return _()},get isChevronPressed(){return x()},get transformOrigin(){return Ie()},onAnimationEnd:()=>v(!1),onCollapseClick:be,onCollapsePointerDown:()=>S(!0),onCollapsePointerUp:()=>S(!1),onCollapsePointerLeave:()=>S(!1),onPanelClick:e=>{if(s()){e.stopPropagation();let{position:t,ratio:n}=fe(je(),d());g(t),m(n),b(!0),c(!1),Ae({edge:d(),ratio:n,collapsed:!1,enabled:!0}),Ce&&clearTimeout(Ce),Ce=setTimeout(()=>{b(!1),Te()},260)}},get actionButtons(){return[X(kG,XR({actionId:dN,isToggle:!0,ref:e=>n=e,get label(){return re()?`Stop selecting element`:`Copy element`},get isActive(){return re()},class:_e,get wrapperClass(){return ve()},onClick:me,onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),O(null),e.onToggleToolbarMenu?.()}},()=>se(dN),{get icon(){return X(yG,{size:14,get rotationDeg(){return T()},get class(){return ye(re())}})},get tooltipVisible(){return ie(dN)},get tooltipPosition(){return ae()},tooltip:`Copy`})),X(kG,XR({actionId:fN,label:`Comment on element`,get isActive(){return ne(fN)},class:_e,get wrapperClass(){return ve()},onClick:he},()=>se(fN),{get icon(){return X(xG,{size:14,get class(){return ye(ne(fN))}})},get tooltipVisible(){return ie(fN)},get tooltipPosition(){return ae()},tooltip:`Comment`})),X(kG,XR({actionId:pN,label:`Style element`,get isActive(){return ne(pN)},class:_e,get wrapperClass(){return ve()},onClick:ge},()=>se(pN),{get icon(){return X(CG,{size:14,get class(){return ye(ne(pN))}})},get tooltipVisible(){return ie(pN)},get tooltipPosition(){return ae()},tooltip:`Style`}))]}})),fR(e=>{var t=pW(`fixed left-0 top-0 font-sans text-[13px] antialiased select-none`,Me(),Fe(),a()?`pointer-events-auto`:`pointer-events-none`),n=String(WM),i=`translate(${je().x}px, ${je().y}px) scale(${Pe()?.97:1})`,o=Ie(),s=a()?Pe()?.55:1:0;return t!==e.e&&lz(r,e.e=t),n!==e.t&&pz(r,`z-index`,e.t=n),i!==e.a&&pz(r,`transform`,e.a=i),o!==e.o&&pz(r,`transform-origin`,e.o=o),s!==e.i&&pz(r,`opacity`,e.i=s),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),r})()},KG=CR(),qG=()=>{let e=wR(KG);if(!e)throw Error(`Menu subcomponents must be rendered inside <Menu.Provider>`);return e},JG=e=>X(KG.Provider,{get value(){return e.store},get children(){return e.children}}),YG=e=>X(MW,{get class(){return pW(`flex flex-col w-fit h-fit`,e.class)},get style(){return e.style},get children(){return e.children}}),XG=Z(`<div role=menu aria-orientation=vertical><div aria-hidden=true class="pointer-events-none absolute opacity-0 transition-[top,left,width,height,opacity,border-radius] duration-75 ease-out bg-[var(--rg-surface-hover)]">`),ZG=e=>{let t=qG();return(()=>{var n=XG(),r=n.firstChild;n.$$pointermove=()=>t.notePointerMove(),hz(n=>{t.setHighlightContainer(n),e.ref?.(n)},n);var i=t.setHighlightRail;return typeof i==`function`?hz(i,r):t.setHighlightRail=r,$(n,()=>e.children,null),fR(r=>{var i=e.label,a=t.keyboardNavigation?t.activeDescendantId():void 0,o=t.keyboardNavigation?-1:void 0,s=pW(`relative flex flex-col`,e.class);return i!==r.e&&Q(n,`aria-label`,r.e=i),a!==r.t&&Q(n,`aria-activedescendant`,r.t=a),o!==r.a&&Q(n,`tabindex`,r.a=o),s!==r.o&&lz(n,r.o=s),r},{e:void 0,t:void 0,a:void 0,o:void 0}),n})()},oz([`pointermove`]),QG=Z(`<button data-react-grab-ignore-events type=button>`),$G=e=>{let t=qG(),n=t.createItemId(),r=e.value,i=()=>e.role??`menuitem`,a=()=>!e.disabled,o=()=>t.activeValue()===r,s;return yR(()=>{s&&(t.registerItem({value:r,domId:n,element:s,isEnabled:a,onSelect:()=>e.onSelect?.()}),bR(()=>t.unregisterItem(r)))}),(()=>{var c=QG();c.$$click=t=>{t.stopPropagation(),a()&&e.onSelect?.()},c.addEventListener(`pointerleave`,()=>{t.clearActiveOnPointerLeave&&t.setActiveItem(null)}),c.addEventListener(`pointerenter`,()=>{a()&&t.canActivateOnHover()&&t.setActiveItem(r)}),c.$$pointerdown=e=>e.stopPropagation();var l=s;return typeof l==`function`?hz(l,c):s=c,Q(c,`id`,n),$(c,()=>e.children),fR(n=>{var a=e.dataId??r,s=i(),l=i()===`menuitemradio`?!!e.checked:void 0,u=!!e.disabled,d=t.keyboardNavigation?o()?0:-1:void 0,f=e.disabled,p=pW(`relative z-1 contain-layout flex items-center justify-between w-full px-2 py-1 cursor-pointer text-left border-none bg-transparent disabled:opacity-40 disabled:cursor-default`,e.class);return a!==n.e&&Q(c,`data-react-grab-menu-item`,n.e=a),s!==n.t&&Q(c,`role`,n.t=s),l!==n.a&&Q(c,`aria-checked`,n.a=l),u!==n.o&&Q(c,`aria-disabled`,n.o=u),d!==n.i&&Q(c,`tabindex`,n.i=d),f!==n.n&&(c.disabled=n.n=f),p!==n.s&&lz(c,n.s=p),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),c})()},oz([`pointerdown`,`click`]),eK=Z(`<span>`),tK=e=>(()=>{var t=eK();return $(t,()=>e.children),fR(()=>lz(t,pW(`text-[13px] leading-4 font-sans font-medium`,e.class))),t})(),nK=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M6.5 5C5.67157 5 5 5.67157 5 6.5C5 7.32843 5.67157 8 6.5 8H8V6.5C8 5.67157 7.32843 5 6.5 5ZM10 8V6.5C10 4.567 8.433 3 6.5 3C4.567 3 3 4.567 3 6.5C3 8.433 4.567 10 6.5 10H8V14H6.5C4.567 14 3 15.567 3 17.5C3 19.433 4.567 21 6.5 21C8.433 21 10 19.433 10 17.5V16H14V17.5C14 19.433 15.567 21 17.5 21C19.433 21 21 19.433 21 17.5C21 15.567 19.433 14 17.5 14H16V10H17.5C19.433 10 21 8.433 21 6.5C21 4.567 19.433 3 17.5 3C15.567 3 14 4.567 14 6.5V8H10ZM10 10V14H14V10H10ZM16 8H17.5C18.3284 8 19 7.32843 19 6.5C19 5.67157 18.3284 5 17.5 5C16.6716 5 16 5.67157 16 6.5V8ZM16 16V17.5C16 18.3284 16.6716 19 17.5 19C18.3284 19 19 18.3284 19 17.5C19 16.6716 18.3284 16 17.5 16H16ZM8 16H6.5C5.67157 16 5 16.6716 5 17.5C5 18.3284 5.67157 19 6.5 19C7.32843 19 8 18.3284 8 17.5V16Z">`),rK=e=>{let t=()=>e.size??11;return(()=>{var n=nK();return fR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},iK=Z(`<span>`),aK=Z(`<span style=display:inline-flex;align-items:center;gap:2px>`),oK=Z(`<span>Ctrl+`),sK=e=>{let t=()=>e.shortcut===`Enter`,n=()=>e.modifier!==!1,r=kB();return(()=>{var i=aK();return $(i,X(ez,{get when(){return t()},get children(){return X(LW,{size:8})}}),null),$(i,X(ez,{get when(){return!t()},get children(){return X(ez,{get when(){return n()},get fallback(){return(()=>{var t=iK();return $(t,()=>e.shortcut),t})()},get children(){return X(ez,{when:r,get fallback(){return(()=>{var t=oK();return t.firstChild,$(t,()=>e.shortcut,null),t})()},get children(){return[X(rK,{size:9}),(()=>{var t=iK();return $(t,()=>e.shortcut),t})()]}})}})}}),null),fR(()=>lz(i,e.class)),i})()},cK=e=>X(sK,{get shortcut(){return e.shortcut},get modifier(){return e.modifier},get class(){return pW(`text-[11px] font-sans text-[var(--rg-text-secondary)] ml-4`,e.class)}}),lK=({hiddenOpacity:e=`0`,visibleOpacity:t=`1`}={})=>{let n,r,i,a=e=>{r&&(r.style.opacity=t,r.style.top=`${e.offsetTop}px`,r.style.left=`${e.offsetLeft}px`,r.style.width=`${e.offsetWidth}px`,r.style.height=`${e.offsetHeight}px`)},o=typeof ResizeObserver>`u`?void 0:new ResizeObserver(()=>{i&&a(i)});bR(()=>o?.disconnect());let s=()=>{i=void 0,o?.disconnect(),r&&(r.style.opacity=e)};return{containerRef:e=>{n=e},followerRef:e=>{r=e},followElement:e=>{if(!(!r||!n)){if(!e){s();return}i=e,a(e),o?.disconnect(),o?.observe(e),o?.observe(n)}},hideFollower:s}},uK=(e,t)=>e!==t&&e instanceof HTMLElement,dK=(e,t)=>{let n=[];for(let r of Array.from(e.children))uK(r,t)&&n.push(r);return n},fK=(e={})=>{let{topCornerRadiusPx:t,bottomCornerRadiusPx:n,cornerShape:r}=e,i=t!==void 0||n!==void 0,a,o=!1,s=e=>{if(!a||!i)return;let s=e.parentElement;if(!s)return;let c=dK(s,a),l=c[0]===e,u=c[c.length-1]===e,d=l&&t!==void 0?`${t}px`:`0px`,f=u&&n!==void 0?`${n}px`:`0px`;a.style.borderTopLeftRadius=d,a.style.borderTopRightRadius=d,a.style.borderBottomLeftRadius=f,a.style.borderBottomRightRadius=f,r&&!o&&(a.style.setProperty(`corner-shape`,r),o=!0)},{containerRef:c,followerRef:l,followElement:u,hideFollower:d}=lK();return{containerRef:c,highlightRef:e=>{a=e,o=!1,l(e)},updateHighlight:e=>{u(e),e&&s(e)},clearHighlight:d}},pK=(e={})=>{let t=new Map,n=[],r=`react-grab-menu-${Math.random().toString(36).slice(2,8)}`,i=0,a=!1,o=e.value!==void 0,[s,c]=J(null),[l,u]=J(0),d=Y(()=>o?e.value?.()??null:s()),f=t=>{if(o){e.onValueChange?.(t);return}c(t)},p=fK(e.highlight??{});pR(vR([d,l],([e])=>{if(e===null){p.clearHighlight();return}let n=t.get(e);n?p.updateHighlight(n.element):p.clearHighlight()}));let m=()=>n.filter(e=>t.get(e)?.isEnabled()),h=()=>{let e=m();e.length>0&&f(e[0])},g=()=>{let e=m();e.length>0&&f(e[e.length-1])},_=()=>{let e=m();if(e.length===0)return;let t=e.indexOf(d()??``);f(e[t===-1?0:(t+1)%e.length])},v=()=>{let e=m();if(e.length===0)return;let t=e.indexOf(d()??``);f(e[t===-1?e.length-1:(t-1+e.length)%e.length])},y=Y(()=>{l();let e=d();if(e!==null)return t.get(e)?.domId});return{keyboardNavigation:e.keyboardNavigation??!1,clearActiveOnPointerLeave:e.clearActiveOnPointerLeave??!1,activeValue:d,activeDescendantId:y,setActiveItem:f,createItemId:()=>`${r}-item-${i++}`,canActivateOnHover:()=>!(e.requirePointerMove??!1)||a,notePointerMove:()=>{a=!0},resetPointerMove:()=>{a=!1},registerItem:e=>{t.set(e.value,e),n.includes(e.value)||n.push(e.value),u(e=>e+1)},unregisterItem:e=>{t.delete(e);let r=n.indexOf(e);r!==-1&&n.splice(r,1),o||c(t=>t===e?null:t),u(e=>e+1)},getActiveItem:()=>{let e=d();return e===null?void 0:t.get(e)},selectFirst:h,selectLast:g,selectNext:_,selectPrevious:v,setHighlightContainer:p.containerRef,setHighlightRail:p.highlightRef}},mK={Provider:JG,Panel:YG,List:ZG,Item:$G,Label:tK,Shortcut:cK},hK=e=>e??!0,gK=(e,t)=>typeof e.enabled==`function`?t?e.enabled(t):!1:hK(e.enabled),_K=e=>{e.type===`contextmenu`&&e.preventDefault(),e.stopImmediatePropagation()},vK=e=>{let t=NM(t=>{e.isOpen()&&(e.shouldIgnoreKeyboardEvent?.(t)||e.shouldIgnoreInputEvents&&iB(t)||t.code===`Escape`&&(t.preventDefault(),t.stopImmediatePropagation(),e.onDismiss(`keyboard`)))}),n=NM(t=>{e.isOpen()&&(AB(t,`data-react-grab-ignore-events`)||e.shouldIgnoreRightClick&&t instanceof MouseEvent&&t.button===2||e.onDismiss(`pointer`))}),r=XF(()=>{window.addEventListener(`mousedown`,n,{capture:!0}),window.addEventListener(`touchstart`,n,{capture:!0})});return window.addEventListener(`keydown`,t,{capture:!0}),()=>{ZF(r),window.removeEventListener(`keydown`,t,{capture:!0}),window.removeEventListener(`mousedown`,n,{capture:!0}),window.removeEventListener(`touchstart`,n,{capture:!0})}},yK=Z(`<div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2">`),bK=Z(`<div data-react-grab-ignore-events data-react-grab-context-menu class="fixed font-sans text-[13px] antialiased [filter:var(--rg-drop-shadow)] select-none"style=pointer-events:auto>`),xK=e=>{let t,n,r=null,i=pK({keyboardNavigation:!0,highlight:{bottomCornerRadiusPx:14,cornerShape:mN}}),[a,o]=J(0),[s,c]=J(0),l=Y(()=>e.position!==null),u=Y(()=>mW({tagName:e.tagName,componentName:e.componentName})),d=()=>{if(t){let e=t.getBoundingClientRect();o(e.width),c(e.height)}};pR(()=>{l()&&XF(d)});let f=Y(()=>{let t=e.selectionBounds,n=e.position,r=a(),i=s();if(r===0||i===0||!t||!n)return{left:_N.left,top:_N.top,arrowLeft:0,arrowPosition:`bottom`};let o=n.x??t.x+t.width/2,c=Math.max(4,Math.min(o-r/2,window.innerWidth-r-4)),l=Math.max(8,Math.min(o-c,r-8)),u=t.y+t.height+8+4,d=t.y-i-8-4,f=u+i>window.innerHeight,p=d>=0,m=f&&p,h=m?d:u,g=m?`top`:`bottom`;if(f&&!p){let e=n.y??t.y+t.height/2;h=Math.max(4,Math.min(e+4,window.innerHeight-i-4)),g=`top`}return{left:c,top:h,arrowLeft:l,arrowPosition:g}}),p=Y(()=>{let t=e.actions??[],n=e.actionContext;return t.map(e=>({id:e.id,label:e.label,action:()=>{n&&e.onAction(n)},enabled:gK(e,n),shortcut:e.shortcut,shortcutModifier:e.shortcutModifier}))});pR(vR(l,e=>{if(e){let e=t?.getRootNode(),i=e instanceof ShadowRoot?e.activeElement:null,a=document.activeElement;r=a instanceof HTMLElement&&i===null&&!(t instanceof Element&&t.contains(a))?a:null,n?.focus({preventScroll:!0});return}i.setActiveItem(null);let a=r;r=null,!(!(a instanceof HTMLElement)||!document.contains(a))&&XF(()=>{let e=document.activeElement;(e===null||e===document.body)&&a.focus({preventScroll:!0})})})),yR(()=>{d();let t=t=>{if(!l())return;let n=t.key===`ArrowDown`,r=t.key===`ArrowUp`,a=t.key===`Home`,o=t.key===`End`,s=t.key===`Tab`;if(n||r||a||o||s){t.preventDefault(),t.stopPropagation();let e=n||s&&!t.shiftKey;a?i.selectFirst():o?i.selectLast():e?i.selectNext():i.selectPrevious();return}let c=e.actions??[],u=e.actionContext,d=n=>{u&&gK(n,u)&&(t.preventDefault(),t.stopPropagation(),n.onAction(u),e.onHide())};if(t.key===`Enter`){let e=i.getActiveItem();if(e){t.preventDefault(),t.stopPropagation(),e.isEnabled()&&e.onSelect();return}}let f=RV(c,t,{includeModifierShortcuts:!0});f&&d(f)},n=vK({isOpen:l,onDismiss:e.onDismiss,shouldIgnoreRightClick:!0}),r=NM(t);window.addEventListener(`keydown`,r,{capture:!0}),bR(()=>{n(),window.removeEventListener(`keydown`,r,{capture:!0})})});let m=Y(()=>{let{tagName:e,componentName:t}=u();return`Actions for ${t?`${t}.${e}`:e}`});return X(ez,{get when(){return l()},get children(){var r=bK();uz(r,`contextmenu`,_K,!0),uz(r,`click`,_K,!0),uz(r,`mousedown`,_K,!0),uz(r,`pointerdown`,_K,!0);var a=t;return typeof a==`function`?hz(a,r):t=r,pz(r,`z-index`,`${WM}`),$(r,X(bW,{get position(){return f().arrowPosition},leftPercent:0,get leftOffsetPx(){return f().arrowLeft}}),null),$(r,X(mK.Panel,{class:`justify-center items-start min-w-[100px]`,get children(){return[(()=>{var t=yK();return $(t,X(EW,{get tagName(){return u().tagName},get componentName(){return u().componentName},get isClickable(){return e.hasFilePath},onClick:t=>{t.stopPropagation(),e.hasFilePath&&e.actionContext&&(e.actions?.find(e=>e.id===`open`))?.onAction(e.actionContext)},shrink:!0})),t})(),X(OW,{get children(){return X(mK.Provider,{store:i,get children(){return X(mK.List,{ref:e=>n=e,get label(){return m()},class:`w-[calc(100%+16px)] -mx-2 -my-1.5 outline-none`,get children(){return X(QR,{get each(){return p()},children:t=>X(mK.Item,{get value(){return t.id},get dataId(){return t.label.toLowerCase()},get disabled(){return!t.enabled},onSelect:()=>{t.action(),e.onHide()},get children(){return[X(mK.Label,{class:`text-[var(--rg-text-primary)]`,get children(){return t.label}}),X(ez,{get when(){return t.shortcut},children:e=>X(mK.Shortcut,{get shortcut(){return e()},get modifier(){return t.shortcutModifier}})})]}})})}})}})}})]}}),null),fR(e=>{var t=`${f().top}px`,n=`${f().left}px`;return t!==e.e&&pz(r,`top`,e.e=t),n!==e.t&&pz(r,`left`,e.t=n),e},{e:void 0,t:void 0}),r}})},oz([`pointerdown`,`mousedown`,`click`,`contextmenu`]),SK=(e,t,n,r)=>Math.max(r,Math.min(e,n-t-r)),CK=({anchor:e,measuredWidth:t,measuredHeight:n,viewportLeft:r=0,viewportTop:i=0,viewportWidth:a,viewportHeight:o,anchorGapPx:s,viewportPaddingPx:c,offscreenPosition:l})=>{if(!e||t===0||n===0)return l;let u,d;return e.edge===`left`||e.edge===`right`?(u=e.edge===`left`?e.x+s:e.x-t-s,d=e.y-n/2):(u=e.x-t/2,d=e.edge===`top`?e.y+s:e.y-n-s),{left:r+SK(u-r,t,a,c),top:i+SK(d-i,n,o,c)}},wK=(e,t)=>{let[n,r]=J(0),[i,a]=J(0),[o,s]=J(!1),[c,l]=J(!1),[u,d]=J(0),[f,p]=J(`bottom`),m,h,g=()=>{clearTimeout(m),h!==void 0&&(ZF(h),h=void 0)},_=()=>{let t=e();t&&(r(t.offsetWidth),a(t.offsetHeight))},v=()=>{gR(()=>{d(e=>e+1),_()})},y=Y(()=>t()!==null);return pR(()=>{let n=t();n?(p(n.edge),clearTimeout(m),s(!0),h!==void 0&&ZF(h),h=XF(()=>{_(),e()?.offsetHeight,l(!0)})):(h!==void 0&&ZF(h),l(!1),m=setTimeout(()=>{s(!1)},120)),bR(g)}),pR(()=>{if(!y())return;window.addEventListener(`resize`,v),window.visualViewport?.addEventListener(`resize`,v),window.visualViewport?.addEventListener(`scroll`,v);let e=jM(),t;e&&typeof ResizeObserver<`u`&&(t=new ResizeObserver(v),t.observe(e)),bR(()=>{window.removeEventListener(`resize`,v),window.visualViewport?.removeEventListener(`resize`,v),window.visualViewport?.removeEventListener(`scroll`,v),t?.disconnect()})}),{shouldMount:o,isAnimatedIn:c,lastAnchorEdge:f,displayPosition:Y(e=>{u();let r=dW(),a=CK({anchor:t(),measuredWidth:n(),measuredHeight:i(),viewportLeft:r.offsetLeft,viewportTop:r.offsetTop,viewportWidth:r.width,viewportHeight:r.height,anchorGapPx:8,viewportPaddingPx:8,offscreenPosition:_N});return a.left===_N.left?e:a},_N),measure:_,clearAnimationHandles:g}},TK={padding:{prefix:`p`,scale:`spacing`},"padding-top,padding-bottom":{prefix:`py`,scale:`spacing`},"padding-left,padding-right":{prefix:`px`,scale:`spacing`},"padding-top":{prefix:`pt`,scale:`spacing`},"padding-right":{prefix:`pr`,scale:`spacing`},"padding-bottom":{prefix:`pb`,scale:`spacing`},"padding-left":{prefix:`pl`,scale:`spacing`},margin:{prefix:`m`,scale:`spacing`},"margin-top,margin-bottom":{prefix:`my`,scale:`spacing`},"margin-left,margin-right":{prefix:`mx`,scale:`spacing`},"margin-top":{prefix:`mt`,scale:`spacing`},"margin-right":{prefix:`mr`,scale:`spacing`},"margin-bottom":{prefix:`mb`,scale:`spacing`},"margin-left":{prefix:`ml`,scale:`spacing`},gap:{prefix:`gap`,scale:`spacing`},"column-gap":{prefix:`gap-x`,scale:`spacing`},"row-gap":{prefix:`gap-y`,scale:`spacing`},"width,height":{prefix:`size`,scale:`spacing`},width:{prefix:`w`,scale:`spacing`},height:{prefix:`h`,scale:`spacing`},"min-width":{prefix:`min-w`,scale:`spacing`},"max-width":{prefix:`max-w`,scale:`spacing`},"min-height":{prefix:`min-h`,scale:`spacing`},"max-height":{prefix:`max-h`,scale:`spacing`},"top,right,bottom,left":{prefix:`inset`,scale:`spacing`},"top,bottom":{prefix:`inset-y`,scale:`spacing`},"left,right":{prefix:`inset-x`,scale:`spacing`},top:{prefix:`top`,scale:`spacing`},right:{prefix:`right`,scale:`spacing`},bottom:{prefix:`bottom`,scale:`spacing`},left:{prefix:`left`,scale:`spacing`},"border-width":{prefix:`border`,scale:`border-width`},"border-top-width":{prefix:`border-t`,scale:`border-width`},"border-right-width":{prefix:`border-r`,scale:`border-width`},"border-bottom-width":{prefix:`border-b`,scale:`border-width`},"border-left-width":{prefix:`border-l`,scale:`border-width`},"z-index":{prefix:`z`,scale:`z-index`},opacity:{prefix:`opacity`,scale:`opacity`}},EK=(e,t)=>{let n=TK[e];if(!n)return null;let{prefix:r,scale:i}=n;if(i===`spacing`){if(t<0)return null;let e=t/4;return!Number.isInteger(e)||e>96?null:`${r}-${e}`}return i===`border-width`?!Number.isInteger(t)||t<0||t>8?null:t===1?r:`${r}-${t}`:i===`z-index`?!Number.isInteger(t)||t<0||t>50?null:`${r}-${t}`:!Number.isFinite(t)||t<0||t>100||t%5!=0?null:`${r}-${t}`},DK=e=>{let t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement:e.ownerDocument?.activeElement??document.activeElement},OK=e=>e.toLowerCase()===`#00000000`?xN:e.toUpperCase(),kK=Z(`<input data-react-grab-ignore-events data-react-grab-input type=text autocapitalize=none autocorrect=off autocomplete=off>`),AK=e=>{let[t,n]=ZR(e,[`class`,`ref`,`autoFocusSelect`]);return(()=>{var e=kK();return hz(e=>{t.autoFocusSelect&&queueMicrotask(()=>{e.focus(),e.select()}),t.ref?.(e)},e),Q(e,`spellcheck`,!1),mz(e,XR({get class(){return pW(`bg-transparent border-none outline-none text-[var(--rg-text-primary)] p-0 m-0`,t.class)}},n),!1,!1),e})()},jK=`text-[13px] leading-4 font-medium`,MK={position:`absolute`,opacity:0,"pointer-events":`none`,width:`0`,height:`0`,margin:`0`,padding:`0`,overflow:`hidden`},NK=Z(`<div class="flex items-center gap-2 w-full px-2 h-[20px]"><div class="flex items-center gap-1 ml-auto shrink-0"><button type=button data-react-grab-ignore-events aria-label="Pick color"class="size-[16px] rounded-[4px] border-[var(--rg-border-button)] [border-width:0.5px] border-solid p-0 m-0 cursor-pointer shrink-0"></button><input data-react-grab-ignore-events type=color aria-hidden=true tabindex=-1 class="absolute opacity-0 pointer-events-none size-0">`),PK=Z(`<span>`),FK=Z(`<span class="text-[12px] leading-4 font-medium tabular-nums text-[var(--rg-text-primary)] cursor-text">`),IK=e=>e.length===9?e.slice(0,7):e,LK=e=>{let[t,n]=J(null),r=()=>t()!==null,i=()=>OK(e.value),a,o=!0;bR(()=>{o=!1}),yR(()=>{let t=e.onRegisterTrigger?.(()=>a?.click());bR(()=>t?.())});let s=()=>{let r=t();if(r===null)return;n(null);let i=TB(r);i?i.toLowerCase()!==e.value.toLowerCase()&&e.onCommit(i,`keyboard`):e.onInvalidCommit?.(),e.onEditComplete?.()},c=()=>{r()&&(n(null),e.onEditComplete?.())},l=e=>{if(!(e.isComposing||e.keyCode===229)){if(e.stopImmediatePropagation(),e.key===`Enter`){e.preventDefault(),s();return}e.key===`Escape`&&(e.preventDefault(),c())}},u=t=>{t.preventDefault(),t.stopPropagation(),e.onInteract?.(),a?.click()};return(()=>{var c=NK(),d=c.firstChild,f=d.firstChild,p=f.nextSibling;$(c,X(ez,{get when(){return e.label},children:e=>(()=>{var t=PK();return lz(t,`${jK} text-[var(--rg-text-primary)] truncate min-w-0`),$(t,e),t})()}),d),$(d,X(ez,{get when(){return r()},get fallback(){return(()=>{var e=FK();return e.$$click=e=>{e.preventDefault(),e.stopPropagation(),n(i())},e.$$pointerdown=e=>e.stopPropagation(),$(e,i),fR(()=>Q(e,`data-react-grab-value`,i())),e})()},get children(){return X(AK,{autoFocusSelect:!0,inputmode:`text`,"aria-label":`Style color hex`,class:`text-[12px] leading-4 font-medium tabular-nums text-right`,get style(){return{"field-sizing":`content`,"min-width":`32px`,"max-width":e.emphasized?`100px`:`72px`}},get value(){return t()??``},onInput:e=>n(e.currentTarget.value),onKeyDown:l,onBlur:s,onPointerDown:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()})}}),f),f.$$click=u,f.$$mousedown=e=>e.preventDefault(),f.$$pointerdown=e=>e.stopPropagation(),p.$$input=t=>{if(!o)return;let n=t.currentTarget.value,r=e.value.length===9?e.value.slice(7):``,i=n+(r.toLowerCase()===`00`?``:r);e.onInteract?.(),i&&i.toLowerCase()!==e.value.toLowerCase()&&e.onCommit(i,`pointer`)};var m=a;return typeof m==`function`?hz(m,p):a=p,fR(t=>pz(f,`background-color`,e.value)),fR(()=>p.value=IK(e.value)),c})()},oz([`pointerdown`,`mousedown`,`click`,`input`]),RK=Z(`<svg width=1em height=1em viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg aria-hidden=true style=width:16px;height:16px;flex-shrink:0;cursor:pointer><path fill-rule=evenodd clip-rule=evenodd>`),zK=e=>{let t=()=>e.active?`var(--rg-text-primary)`:`var(--rg-text-secondary)`,n=()=>e.active?e.direction===`left`?-2:2:0,r=()=>e.active?1.12:1,i=()=>e.direction===`left`?`M2.54282 10.5427C1.76177 11.3238 1.76177 12.5901 2.54282 13.3712L9.70183 20.5302C11.1193 21.9476 13.5428 20.9437 13.5428 18.9392V16.9573H21.0428C22.1474 16.9573 23.0428 16.0619 23.0428 14.9573V8.95733C23.0428 7.85276 22.1474 6.95733 21.0428 6.95733L13.5428 6.95733V4.97473C13.5428 2.9702 11.1193 1.96631 9.70183 3.38373L2.54282 10.5427Z`:`M14.2983 20.5302L21.4573 13.3712C22.2383 12.5901 22.2383 11.3238 21.4573 10.5427L14.2983 3.38374C12.8808 1.96631 10.4573 2.97019 10.4573 4.97473V6.95659L3.95728 6.95659C2.85271 6.95659 1.95728 7.85202 1.95728 8.95659V14.9566C1.95728 16.0612 2.85271 16.9566 3.95727 16.9566H10.4573V18.9392C10.4573 20.9437 12.8808 21.9476 14.2983 20.5302Z`;return(()=>{var a=RK(),o=a.firstChild;return uz(a,`pointerdown`,e.onPointerDown,!0),fR(s=>{var c=`translateX(${n()}px) scale(${r()})`,l=e.active?`transform 30ms cubic-bezier(0, 0, 0.2, 1)`:`transform 450ms cubic-bezier(0.34, 1.8, 0.64, 1)`,u=i(),d=t(),f=e.active?`fill 50ms ease`:`fill 300ms ease`;return c!==s.e&&pz(a,`transform`,s.e=c),l!==s.t&&pz(a,`transition`,s.t=l),u!==s.a&&Q(o,`d`,s.a=u),d!==s.o&&Q(o,`fill`,s.o=d),f!==s.i&&pz(o,`transition`,s.i=f),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),a})()},oz([`pointerdown`]),BK=Z(`<span>`),VK=Z(`<div class="flex items-center gap-2 w-full px-2 h-[20px]"><div class="ml-auto shrink-0 flex items-center gap-1"><span data-react-grab-ignore-events role=button tabindex=-1 class="text-[12px] leading-4 font-medium tabular-nums text-[var(--rg-text-primary)] cursor-pointer select-none min-w-[36px] text-center">`),HK=e=>{let t=()=>e.options.find(t=>t.value===e.value)?.label??e.value;return(()=>{var n=VK(),r=n.firstChild,i=r.firstChild;return $(n,X(ez,{get when(){return e.label},get children(){var t=BK();return lz(t,`${jK} text-[var(--rg-text-primary)] truncate min-w-0`),$(t,()=>e.label),t}}),r),$(r,X(zK,{direction:`left`,get active(){return e.activeKey===`left`},onPointerDown:()=>e.onStep(-1)}),i),i.$$contextmenu=t=>{t.preventDefault(),t.stopPropagation(),e.onStep(-1)},i.$$click=t=>{t.preventDefault(),t.stopPropagation(),e.onStep(1)},i.$$mousedown=e=>e.preventDefault(),i.$$pointerdown=e=>e.stopPropagation(),$(i,t),$(r,X(zK,{direction:`right`,get active(){return e.activeKey===`right`},onPointerDown:()=>e.onStep(1)}),null),fR(t=>{var n=`Cycle ${e.label??`value`}`,r=`Click to cycle (${e.options.length} options)`;return n!==t.e&&Q(i,`aria-label`,t.e=n),r!==t.t&&Q(i,`title`,t.t=r),t},{e:void 0,t:void 0}),n})()},oz([`pointerdown`,`mousedown`,`click`,`contextmenu`]),UK=e=>e.kind===`numeric`?e:null,WK=e=>e.kind===`color`?e:null,GK=e=>e.kind===`enum`?e:null,KK=/^[0-9]$/,qK=e=>{let t=Array.from(e),n=t.findIndex(e=>KK.test(e));if(n<0)return{prefixLiterals:t,rightAlignedSegments:[]};let r=t.slice(0,n),i=[],a=0;for(let e=t.length-1;e>=n;e--){let n=t[e],r=KK.test(n)?`digit`:`literal`;i.push({kind:r,value:n,digitDistanceFromRight:a}),r===`digit`&&(a+=1)}return{prefixLiterals:r,rightAlignedSegments:i}},JK=Z(`<span class=rg-slot-column aria-hidden=true><span class=rg-slot-sizer>0</span><span class=rg-slot-cell>`),YK=Z(`<span class="rg-slot-cell rg-slot-exit">`),XK=Z(`<span><span class=inline-flex style=flex-direction:row-reverse>`),ZK=Z(`<span class="inline-block whitespace-pre"aria-hidden=true>`),QK=e=>typeof e==`number`?e:Number.parseFloat(String(e).replace(/[^0-9.-]/g,``))||0,$K=e=>{let t,[n,r]=J(null),i=null;pR(vR(()=>e.digit,(n,a)=>{a===void 0||n===a||(t&&(t.classList.remove(`rg-slot-enter`),t.offsetWidth,t.classList.add(`rg-slot-enter`)),r({digit:a,direction:e.direction}),i!==null&&clearTimeout(i),i=setTimeout(()=>r(null),350))},{defer:!0})),bR(()=>{i!==null&&clearTimeout(i)});let a=()=>({"animation-delay":`${e.delayMs}ms`});return(()=>{var r=JK(),i=r.firstChild.nextSibling,o=t;return typeof o==`function`?hz(o,i):t=i,$(i,()=>e.digit),$(r,X(ez,{get when(){return n()},keyed:!0,children:e=>(()=>{var t=YK();return $(t,()=>e.digit),fR(n=>{var r=String(e.direction),i=a();return r!==n.e&&Q(t,`data-dir`,n.e=r),n.t=fz(t,i,n.t),n},{e:void 0,t:void 0}),t})()}),null),fR(t=>{var n=String(e.direction),r=a();return n!==t.e&&Q(i,`data-dir`,t.e=n),t.t=fz(i,r,t.t),t},{e:void 0,t:void 0}),r})()},eq=e=>{let t=Y(()=>String(e.children??``)),n=Y(()=>qK(t())),r=Y(vR(()=>QK(e.children),(e,t)=>t===void 0||e===t?0:e>t?1:-1)),i=Y(()=>e.direction??r());return(()=>{var r=XK(),a=r.firstChild;return $(r,X($R,{get each(){return n().prefixLiterals},children:e=>(()=>{var t=ZK();return $(t,e),t})()}),a),$(a,X($R,{get each(){return n().rightAlignedSegments},children:e=>X(ez,{get when(){return e().kind===`digit`},get fallback(){return(()=>{var t=ZK();return $(t,()=>e().value),t})()},get children(){return X($K,{get digit(){return Number(e().value)},get direction(){return i()},get delayMs(){return e().digitDistanceFromRight*18}})}})})),fR(n=>{var i=t(),a=`inline-flex ${e.class??``}`,o={...e.style,"--rg-slot-dur":`350ms`};return i!==n.e&&Q(r,`aria-label`,n.e=i),a!==n.t&&lz(r,n.t=a),n.a=fz(r,o,n.a),n},{e:void 0,t:void 0,a:void 0}),r})()},tq=Z(`<div data-react-grab-slider-base aria-hidden=true class="absolute inset-y-0 left-0 right-0 rounded-[6px] bg-[var(--rg-surface-active)] pointer-events-none">`),nq=Z(`<div class="flex items-center gap-1 w-full px-1"><div role=slider aria-keyshortcuts="ArrowLeft ArrowRight"tabindex=-1 class="relative flex-1 h-[20px] flex items-center overflow-hidden rounded-[6px]"><div data-react-grab-slider-fill aria-hidden=true class="absolute inset-y-0 left-0 bg-[var(--rg-surface-active)] pointer-events-none"></div><div aria-hidden=true class="absolute inset-0 pointer-events-none"></div><div data-react-grab-slider-handle aria-hidden=true class="absolute top-[2px] bottom-[2px] w-[2px] rounded-[1px] bg-[var(--rg-text-primary)] pointer-events-none"style="transition:opacity 120ms ease"></div><div class="relative z-10 flex items-center justify-between w-full px-2 pointer-events-none">`),rq=Z(`<div data-react-grab-slider-hash-mark class="absolute top-1/2 w-px h-[8px] rounded-[1px] bg-[var(--rg-text-secondary)]"style="transform:translate(-50%, -50%);transition:opacity 200ms ease">`),iq=Z(`<span>`),aq=Z(`<span class="ml-auto flex items-center gap-1 pointer-events-auto"><span data-react-grab-value-text class="text-[12px] leading-4 font-medium tabular-nums text-[var(--rg-text-primary)]"><span class="text-[9px] text-[var(--rg-text-secondary)] ml-px">`),oq=Z(`<span data-react-grab-tailwind-label aria-hidden=true class="text-[10px] leading-4 text-[var(--rg-text-secondary)] tabular-nums">`),sq=Array.from({length:9},(e,t)=>(t+1)*100/10),cq=/^(-?(?:\d+\.?\d*|\.\d+))\s*([a-zA-Z%]*)$/,lq=e=>{let[t,n]=J(null),[r,i]=J(0),[a,o]=J(!1),[s,c]=J(!1),l=()=>t()!==null,u,d=null,f=()=>{let t=e.max-e.min;return t<=0?0:(Math.max(e.min,Math.min(e.max,e.value))-e.min)/t*100},p=()=>{e.onCommitValue&&n(eV(e.value))},m=()=>!!e.onCommitValue,h=(t,n)=>{if(n.width<=0)return e.value;let r=Math.max(0,Math.min(1,(t-n.left)/n.width));return e.min+r*(e.max-e.min)},g=(t,n)=>{e.onCommitValue?.(h(t,n),`pointer`)},_=(e,t)=>{let n=Math.max(0,e-t.right)-Math.max(0,t.left-e),r=Math.max(0,Math.abs(n)-32),i=Math.sqrt(Math.min(r/200,1));return Math.sign(n)*8*i},v=t=>{if(!m()||l())return;t.preventDefault(),t.stopPropagation(),t.currentTarget.setPointerCapture(t.pointerId);let n=u,r=n!==void 0&&t.target instanceof Node&&n.contains(t.target);d={startX:t.clientX,isDragging:!1,startedOnValueText:r,trackRect:t.currentTarget.getBoundingClientRect()},o(!0),e.onInteract?.()},y=t=>{if(!d)return;let n=t.clientX-d.startX;!d.isDragging&&Math.abs(n)<3||(d.isDragging=!0,e.onInteract?.(),g(t.clientX,d.trackRect),i(_(t.clientX,d.trackRect)))},b=e=>{let t=e.currentTarget;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),d&&(d.isDragging||(d.startedOnValueText?p():g(d.startX,d.trackRect)),d=null,o(!1),i(0))},x=e=>{let t=e.currentTarget;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),d&&(d=null,o(!1),i(0))};yR(()=>{let e=()=>{d=null,o(!1),c(!1),i(0)};window.addEventListener(`blur`,e),bR(()=>window.removeEventListener(`blur`,e))});let S=()=>!!e.activeKey||a()||s(),C=()=>{let r=t();if(r===null)return;n(null);let i=r.trim().replace(/(\d),(\d)/g,`$1.$2`).match(cq);if(!i){e.onInvalidCommit?.(),e.onEditComplete?.();return}let a=i[2].toLowerCase();if(a&&a!==e.unit){e.onInvalidCommit?.(),e.onEditComplete?.();return}let o=Number.parseFloat(i[1]);Number.isFinite(o)?e.onCommitValue?.(o,`keyboard`):e.onInvalidCommit?.(),e.onEditComplete?.()},w=()=>{l()&&(n(null),e.onEditComplete?.())},T=e=>{if(!(e.isComposing||e.keyCode===229)){if(e.stopImmediatePropagation(),e.key===`Enter`){e.preventDefault(),C();return}e.key===`Escape`&&(e.preventDefault(),w())}},E=()=>{let t=r();return{cursor:m()&&!l()?`ew-resize`:`default`,"touch-action":m()?`none`:`auto`,"user-select":`none`,"-webkit-user-select":`none`,"min-width":e.emphasized?`96px`:void 0,transform:t===0?`translateX(0)`:`translateX(${t}px)`,transition:a()?`none`:`transform 350ms ${CN}`}};return(()=>{var r=nq(),i=r.firstChild,o=i.firstChild,d=o.nextSibling,p=d.nextSibling,m=p.nextSibling;return i.addEventListener(`lostpointercapture`,x),i.addEventListener(`pointercancel`,x),i.$$pointerup=b,i.addEventListener(`pointerleave`,()=>c(!1)),i.addEventListener(`pointerenter`,()=>c(!0)),i.$$pointermove=y,i.$$pointerdown=v,$(i,X(ez,{get when(){return e.emphasized},get children(){var e=tq();return fR(t=>pz(e,`opacity`,l()?0:.55)),e}}),o),$(d,X($R,{each:sq,children:e=>(()=>{var t=rq();return fR(n=>{var r=`${e()}%`,i=S()?.4:0;return r!==n.e&&pz(t,`left`,n.e=r),i!==n.t&&pz(t,`opacity`,n.t=i),n},{e:void 0,t:void 0}),t})()})),$(m,X(ez,{get when(){return e.label},children:e=>(()=>{var t=iq();return lz(t,`${jK} text-[var(--rg-text-primary)] truncate min-w-0`),$(t,e),t})()}),null),$(m,X(ez,{get when(){return l()},get fallback(){return(()=>{var t=aq(),n=t.firstChild,r=n.firstChild,i=u;return typeof i==`function`?hz(i,t):u=t,$(t,X(ez,{get when(){return e.tailwindLabel},children:e=>(()=>{var t=oq();return $(t,e),t})()}),n),$(n,X(eq,{get children(){return eV(e.value)}}),r),$(r,()=>e.unit),fR(n=>{var r=`${eV(e.value)}${e.unit}`,i=e.onCommitValue?`text`:`default`;return r!==n.e&&Q(t,`data-react-grab-value`,n.e=r),i!==n.t&&pz(t,`cursor`,n.t=i),n},{e:void 0,t:void 0}),t})()},get children(){return X(AK,{autoFocusSelect:!0,inputmode:`decimal`,"aria-label":`Style value`,class:`text-[12px] leading-4 font-medium tabular-nums text-right pointer-events-auto ml-auto`,get style(){return{"field-sizing":`content`,"min-width":`16px`,"max-width":e.emphasized?`120px`:`60px`}},get value(){return t()??``},onInput:e=>n(e.currentTarget.value),onKeyDown:T,onBlur:C,onPointerDown:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()})}}),null),$(r,X(ez,{get when(){return e.emphasized},get children(){return[X(zK,{direction:`left`,get active(){return e.activeKey===`left`},onPointerDown:()=>e.onStep(-1)}),X(zK,{direction:`right`,get active(){return e.activeKey===`right`},onPointerDown:()=>e.onStep(1)})]}}),null),fR(t=>{var n=e.label??`Value`,r=e.min,c=e.max,u=e.value,d=`${eV(e.value)}${e.unit}`,m=E(),h=`${f()}%`,g=+!l(),_=`calc(${f()}% - 1px)`,v=e.activeKey?.9:a()||s()?.35:0;return n!==t.e&&Q(i,`aria-label`,t.e=n),r!==t.t&&Q(i,`aria-valuemin`,t.t=r),c!==t.a&&Q(i,`aria-valuemax`,t.a=c),u!==t.o&&Q(i,`aria-valuenow`,t.o=u),d!==t.i&&Q(i,`aria-valuetext`,t.i=d),t.n=fz(i,m,t.n),h!==t.s&&pz(o,`width`,t.s=h),g!==t.h&&pz(o,`opacity`,t.h=g),_!==t.r&&pz(p,`left`,t.r=_),v!==t.d&&pz(p,`opacity`,t.d=v),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0}),r})()},oz([`pointerdown`,`pointermove`,`pointerup`]),uq=e=>X(tz,{get children(){return[X(nz,{get when(){return UK(e.property)},children:t=>X(lq,{get label(){return $z(()=>!!e.showLabel)()?t().label:void 0},get value(){return t().value},get min(){return t().min},get max(){return t().max},get unit(){return t().unit},get activeKey(){return e.activeKey},get onStep(){return e.onStep},get onCommitValue(){return e.onCommit},get onEditComplete(){return e.onEditComplete},get onInvalidCommit(){return e.onInvalidCommit},get onInteract(){return e.onInteract},get tailwindLabel(){return e.tailwindLabel},get emphasized(){return e.emphasized}})}),X(nz,{get when(){return WK(e.property)},children:t=>X(LK,{get label(){return $z(()=>!!e.showLabel)()?t().label:void 0},get value(){return t().value},get onCommit(){return e.onCommit},get onEditComplete(){return e.onEditComplete},get onInvalidCommit(){return e.onInvalidCommit},get onRegisterTrigger(){return e.onColorPickerRegister},get onInteract(){return e.onInteract},get emphasized(){return e.emphasized}})}),X(nz,{get when(){return GK(e.property)},children:t=>X(HK,{get label(){return $z(()=>!!e.showLabel)()?t().label:void 0},get value(){return t().value},get options(){return t().options},get activeKey(){return e.activeKey},get onStep(){return e.onStep}})})]}}),dq=Z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Copy`),fq=e=>X(BW,{"data-react-grab-ignore-events":!0,"data-react-grab-copy-button":!0,onClick:t=>{t.preventDefault(),t.stopPropagation(),e.onCopy()},get children(){return dq()}}),pq=()=>{let[e,t]=J(!1),n,r=()=>{clearTimeout(n),t(!1)},i=()=>{t(!0),clearTimeout(n),n=setTimeout(()=>{t(!1)},SN)},a=()=>{clearTimeout(n)};return bR(a),{isPending:e,show:i,hide:r,cleanup:a}},mq=Z(`<div role=menu aria-orientation=vertical aria-label="Editable properties"class="relative flex flex-col w-full max-h-[var(--rg-edit-list-max-h)] overflow-y-auto outline-none no-scrollbar"><div aria-hidden=true class="pointer-events-none absolute opacity-0 transition-[top,left,width,height,opacity,border-radius] duration-75 ease-out bg-[var(--rg-surface-hover)]">`),hq=Z(`<div class="flex items-center w-full h-[24px]">`),gq=Z(`<button data-react-grab-ignore-events type=button role=menuitem tabindex=-1 class="relative z-1 contain-layout block w-full h-[24px] px-0 py-0 cursor-pointer text-left border-none bg-transparent">`),_q=Z(`<div class="flex items-center justify-between w-full h-[24px] px-2 gap-2"><span class="text-[13px] leading-4 font-sans font-medium text-[var(--rg-text-primary)] truncate min-w-0">`),vq=Z(`<span class="font-sans text-[var(--rg-text-secondary)] tabular-nums shrink-0"><span class=text-[11px]></span><span class="text-[9px] ml-px">`),yq=Z(`<span aria-hidden=true class="size-[12px] rounded-[3px] border-[var(--rg-border-button)] [border-width:0.5px] border-solid shrink-0">`),bq=Z(`<span class="text-[11px] font-sans text-[var(--rg-text-secondary)] shrink-0">`),xq=e=>{let t=GK(e);return t?t.options.find(e=>e.value===t.value)?.label??t.value:``},Sq=e=>{let t=[],n,r=!1,i=null,a=()=>{if(!n)return!1;let e=DK(n);return e instanceof HTMLElement&&e.matches(`input[data-react-grab-input]`)},o=(t,n)=>{n===`move`&&(r=!0);let o=a();if(r&&!o){if(e.isAdjusting()){i=t;return}i=null,t!==e.activeIndex&&e.onHoverIndex(t)}};pR(()=>{if(e.isAdjusting())return;let n=i;if(n===null)return;i=null;let o=t[n],s=a();r&&(s||o?.matches(`:hover`)&&n!==e.activeIndex&&e.onHoverIndex(n))});let{containerRef:s,highlightRef:c,updateHighlight:l,clearHighlight:u}=fK({});pR(()=>{t.length=e.properties.length});let d;return pR(()=>{let r=e.activeIndex,i=t[r];if(!i||r<0){u();return}if(l(i),d!==void 0&&cancelAnimationFrame(d),d=requestAnimationFrame(()=>{d=void 0;let e=t[r];e&&l(e)}),!n)return;let a=n.getBoundingClientRect(),o=i.getBoundingClientRect();(o.top<a.top||o.bottom>a.bottom)&&i.scrollIntoView({block:`nearest`})}),bR(()=>{d!==void 0&&cancelAnimationFrame(d)}),(()=>{var a=mq(),l=a.firstChild;return a.$$pointermove=()=>{r=!0},hz(e=>{n=e,s(e)},a),hz(c,l),$(a,X($R,{get each(){return e.properties},children:(r,a)=>{let s=()=>a===e.activeIndex;return(()=>{var c=gq();return c.$$click=t=>{t.stopPropagation(),e.onSelect(a)},c.$$mousedown=e=>{let t=n?DK(n):null;t instanceof HTMLElement&&t.matches(`input[data-react-grab-input]`)&&t.blur(),e.preventDefault()},c.addEventListener(`pointerleave`,()=>{i===a&&(i=null)}),c.$$pointermove=()=>{o(a,`move`)},c.addEventListener(`pointerenter`,()=>{o(a,`enter`)}),hz(e=>{t[a]=e,bR(()=>{t[a]===e&&(t[a]=void 0)})},c),$(c,X(ez,{get when(){return s()},get fallback(){return(()=>{var e=_q(),t=e.firstChild;return $(t,()=>r().label),$(e,X(tz,{get children(){return[X(nz,{get when(){return UK(r())},children:e=>(()=>{var t=vq(),n=t.firstChild,r=n.nextSibling;return $(n,()=>eV(e().value)),$(r,()=>e().unit),t})()}),X(nz,{get when(){return WK(r())},children:e=>(()=>{var t=yq();return fR(n=>pz(t,`background-color`,e().value)),t})()}),X(nz,{get when(){return GK(r())},children:e=>(()=>{var t=bq();return $(t,()=>xq(e())),t})()})]}}),null),e})()},get children(){var t=hq();return $(t,X(uq,{get property(){return r()},get activeKey(){return e.activeKey},get onStep(){return e.onStep},get onCommit(){return e.onCommit},get onEditComplete(){return e.onEditComplete},get onInvalidCommit(){return e.onInvalidCommit},get onInteract(){return e.onInteract},get onColorPickerRegister(){return e.onColorPickerRegister},showLabel:!0,get tailwindLabel(){return e.activeTailwindLabel}})),t}})),fR(e=>{var t=r().key,n=s()?`true`:void 0;return t!==e.e&&Q(c,`data-react-grab-edit-property`,e.e=t),n!==e.t&&Q(c,`aria-current`,e.t=n),e},{e:void 0,t:void 0}),c})()}}),null),a})()},oz([`pointermove`,`mousedown`,`click`]),Cq=(e,t,n)=>e.kind===`color`&&typeof t==`string`&&typeof n==`string`?t.toLowerCase()===n.toLowerCase():t===n,wq=e=>e===`ArrowLeft`?-1:1,Tq=e=>{let[t,n]=J(0),r=null,i=null,a=null,o=()=>{i!==null&&clearTimeout(i),a!==null&&clearInterval(a),i=null,a=null,r=null},s=()=>{o(),n(0)},c=t=>{o(),r=t;let n=wq(t);i=setTimeout(()=>{a=setInterval(()=>{e.step(n,e.isShiftHeld(),e.isAltHeld(),!0)},60)},280)};return yR(()=>{window.addEventListener(`blur`,s),bR(()=>window.removeEventListener(`blur`,s))}),bR(s),{heldDirection:t,pressArrow:(t,r,i,a)=>{if(r)return;let o=wq(t);c(t),n(o),e.step(o,i,a,!1)},releaseKey:e=>{e===r&&s()},cancelRepeat:s}},Eq=(e,t,n)=>{if(e.length===0)return null;let r=e.findIndex(e=>e.value===t),i=e[((r===-1?0:r)+n+e.length)%e.length];return!i||i.value===t?null:i},Dq=(e,t,n,r,i)=>{if(e.kind===`enum`)return Eq(e.options,e.value,t)?.value??null;if(e.kind!==`numeric`)return null;let a=Math.min(e.min,e.value),o=Math.max(e.max,e.value);if(!n&&!r&&e.unit===`px`&&i?.hasTokens){let n=i.stepLength(e.value,t,e.cssProperties[0]);if(n!==null){let t=tV(EB(n,a,o));if(t!==e.value)return t}}let s=n?10:1,c=tV(EB(e.value+t*s,a,o));return c===e.value?null:c},Oq=/^-?\d*\.?\d+$/,kq=e=>Oq.test(e),Aq=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,``),jq=e=>{if(e.kind!==`enum`)return[];let t=[];for(let n of e.options){let e=Aq(n.value),r=Aq(n.label);e&&t.push(e),r&&r!==e&&t.push(r)}return t},Mq=e=>{let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(let e of r.tailwindAliases){let i=Aq(e);i&&t.push({property:r,originalIndex:n,kind:`alias`,term:i})}for(let e of jq(r))t.push({property:r,originalIndex:n,kind:`enum-option`,term:e});let i=Aq(r.label);i&&t.push({property:r,originalIndex:n,kind:`name`,term:i});let a=Aq(r.key);a&&a!==i&&t.push({property:r,originalIndex:n,kind:`name`,term:a});let o=Aq(`${r.label} ${r.key}`);o&&t.push({property:r,originalIndex:n,kind:`label`,term:o})}return t},Nq=(e,t)=>{if(t.kind===`alias`||t.kind===`enum-option`||t.kind===`name`)return e===t.term?EN+t.term.length:t.term.startsWith(e)||e.startsWith(t.term)?DN+Math.min(e.length,t.term.length):null;let n=t.term.indexOf(e);return n===-1?null:n===0?ON-t.term.length*1:kN-n*100-t.term.length*1},Pq=(e,t,n,r)=>{let i=e.get(t.key);i&&i.score>=r||e.set(t.key,{property:t,score:r,originalIndex:n})},Fq=e=>{let t=Mq(e),n=new Map;for(let t=0;t<e.length;t++)n.set(e[t].key,t);let r=(t,r,i)=>{for(let a=0;a<r.length;a++){let o=r[a],s=n.get(o);if(s===void 0)continue;let c=e[s];Pq(t,c,s,i-a)}};return{search:n=>{let i=Aq(n);if(!i||kq(i))return e;let a=new Map;r(a,EV(n),wN),r(a,DV(n),TN);for(let e of t){let t=Nq(i,e);t!==null&&Pq(a,e.property,e.originalIndex,t)}return Array.from(a.values()).sort((e,t)=>t.score===e.score?e.originalIndex-t.originalIndex:t.score-e.score).map(e=>e.property)}}},Iq=(e,t)=>e.kind===t.kind&&!Cq(e,t.value,e.original),Lq=e=>{let{initialProperties:t,searchQuery:n}=e,[r,i]=J({}),a=Fq(t),o=Y(()=>{let e=n(),i=r(),o=e?t:t.filter(e=>e.isPrioritized||e.isCanonical&&!e.isDefault||i[e.key]!==void 0);return e?a.search(e):o.slice(0,40)}),s=new Map(t.map(e=>[e.key,e])),c=Y(()=>{let e=r(),t=Object.keys(e);if(t.length===0)return o();let n=new Map;for(let r of t){let t=e[r];if(t.kind!==`numeric`)continue;let i=s.get(r);if(i)for(let e of i.cssProperties)n.set(e,t.value)}return o().map(t=>{let r=e[t.key];if(r!==void 0)return l(t,r);if(t.kind!==`numeric`)return t;let i=n.get(t.cssProperties[0]);return i===void 0?t:t.cssProperties.every(e=>n.get(e)===i)?{...t,value:i}:t})}),l=(e,t)=>e.kind===`numeric`&&t.kind===`numeric`||e.kind===`color`&&t.kind===`color`||e.kind===`enum`&&t.kind===`enum`?{...e,value:t.value}:e;return{filteredProperties:c,applyStyle:(e,t)=>{let n;if(e.kind===`numeric`&&typeof t==`number`)n={kind:`numeric`,value:t};else if(e.kind===`color`&&typeof t==`string`)n={kind:`color`,value:t};else if(e.kind===`enum`&&typeof t==`string`)n={kind:`enum`,value:t};else return;i(t=>{let r=Object.keys(t);if(r[r.length-1]===e.key)return{...t,[e.key]:n};let i={};for(let n of r){if(n===e.key)continue;let r=s.get(n);r!==void 0&&r.cssProperties.every(t=>e.cssProperties.includes(t))||(i[n]=t[n])}return i[e.key]=n,i})},buildPendingEdits:()=>{let e=r(),t=[],n=new Set;for(let r of Object.keys(e)){let i=e[r],a=s.get(r);if(!a||a.kind!==i.kind)continue;let o=Iq(a,i),c=!o&&a.cssProperties.some(e=>n.has(e));if(!(!o&&!c)){if(o)for(let e of a.cssProperties)n.add(e);a.kind===`numeric`&&i.kind===`numeric`?t.push({kind:`numeric`,key:a.key,cssProperties:a.cssProperties,value:i.value,unit:a.unit}):a.kind===`color`&&i.kind===`color`?t.push({kind:`color`,key:a.key,cssProperties:a.cssProperties,value:i.value}):a.kind===`enum`&&i.kind===`enum`&&t.push({kind:`enum`,key:a.key,cssProperties:a.cssProperties,value:i.value})}}return t},hasPendingStyles:()=>{let e=r();for(let n of t){let t=e[n.key];if(t&&Iq(n,t))return!0}return!1},hasChangedStyleFor:e=>{let t=r()[e],n=s.get(e);return!!(t&&n&&Iq(n,t))}}},Rq=new Map;for(let e of WB)for(let t of e)Rq.set(t.key,t.longhands);zq=e=>{if(e.includes(`,`))return e.split(`,`);let t=Rq.get(e);return t?[...t]:[e]},Bq=/^-?(?:\d+\.?|\d*\.\d*)?$/,Vq=e=>Bq.test(e),Hq=e=>{let t=e.startsWith(`-`);return{isNegative:t,base:t?e.slice(1):e}},Uq=/^([a-z-]+)-(-?\d+(?:\.\d+)?)$/,Wq=/^(.+?)-\[(.+)]$/,Gq=/^(-?\d*\.?\d+)\s*([a-zA-Z%]*)$/,Kq=/^(-?\d*\.?\d+)(px|rem)?$/i,qq=/^(?:length|size):/i,Jq=new Set([`opacity`,`border-width`,`border-top-width`,`border-right-width`,`border-bottom-width`,`border-left-width`,`z-index`,`font-weight`]),Yq=(e,t)=>{for(let n of e)if(n.key===t&&n.kind===`numeric`)return n;return null},Xq=(e,t)=>{for(let n of e)if(n.key===t&&n.kind===`enum`)return n;return null},Zq=(e,t)=>{for(let n of e)if(n.key===t&&n.kind===`color`)return n;return null},Qq=e=>{let t=e.replace(/^(?:color|length|size):/i,``).trim();return/(?:var|url)\(/i.test(t)?t:t.replace(/_/g,` `)},$q=e=>{let t=e.lastIndexOf(`:`),n=t>=0?e.slice(t+1):e;return(n.startsWith(`!`)?n.slice(1):n).toLowerCase()},eJ=(e,t)=>{let n=e.match(Kq);if(!n)return null;let r=n[2]?.toLowerCase();if(!r&&!t)return null;let i=Number.parseFloat(n[1]);return Number.isFinite(i)?r===`rem`?i*16:i:null},tJ=(e,t)=>{let n=zq(t),r=new Map;for(let t of n)for(let n of e)n.kind===`numeric`&&n.cssProperties.includes(t)&&r.set(n.key,n);return Array.from(r.values())},nJ=(e,t)=>tV(EB(t,e.min,e.max)),rJ=e=>{let{initialProperties:t,searchQuery:n,isCompact:r,activeProperty:i,commit:a,setIsCompact:o}=e,s=e=>{for(let n of t)if(n.key===e&&(n.kind===`numeric`||n.kind===`enum`))return!0;return tJ(t,e).length>0},c=e=>{let t=e.trim().replace(/(\d),(\d)/g,`$1.$2`).match(Gq);if(!t)return null;let n=Number.parseFloat(t[1]);return Number.isFinite(n)?{value:n,unit:t[2].toLowerCase()}:null},l=(e,t)=>!e||t.toLowerCase().startsWith(e),u=e=>{if(!r())return!1;let t=i();if(t?.kind!==`numeric`)return!1;let n=c(e);return n?l(n.unit,t.unit):Vq(e)},d=Y(()=>u(n())),f=e=>{if(!r())return!1;let t=i();if(t?.kind!==`numeric`)return!1;let n=c(e);if(!n)return!1;let o=t.unit.toLowerCase();if(n.unit!==``&&n.unit!==o)return l(n.unit,t.unit);let s=nJ(t,n.value);return s!==t.value&&a(t,s),!0},p=(e,n)=>{let r=Yq(t,e);if(r)return r.unit===`px`?(o(!0),a(r,nJ(r,n),{shouldCompact:!0}),!0):!1;let i=tJ(t,e);return i.length===0?!1:(o(!0),gR(()=>{for(let e of i)a(e,nJ(e,n),{shouldCompact:!0})}),!0)},m=(e,n)=>{let r=bV(e);if(!r)return!1;let i=Zq(t,r);if(!i)return!1;let s=n===null?SV(e):TB(n);return s?(o(!0),a(i,s,{shouldCompact:!0}),!0):!1},h=e=>{let t=e.trim(),n=t.match(Wq);if(!n)return!1;let r=n[2],i=Qq(r);if(m(t,i))return!0;let a=eJ(i,qq.test(r.trim()));if(a===null)return!1;let{isNegative:o,base:s}=Hq(n[1]),c=AV($q(s));return c?p(c,o?-a:a):!1},g=e=>{if(h(e))return;let n=_V(e),{isNegative:r,base:i}=Hq(n),c=i.replace(/-\d*$/,``).replace(/-$/,``),l=c?AV(c):null;if(l&&s(l)&&o(!0),!r){if(m(n,null))return;let e=jV(n);if(e){let n=Xq(t,e.property);if(!n)return;let r=n.options.find(t=>t.value===e.value);r&&(o(!0),a(n,r.value,{shouldCompact:!0}));return}}let u=i.match(Uq);if(!u)return;let d=AV(u[1]);if(!d)return;let f=Number.parseFloat(u[2]);if(!Number.isFinite(f))return;let p=r?-f:f,g=Jq.has(d)?p:p*4,_=Yq(t,d);if(_){a(_,nJ(_,g),{shouldCompact:!0});return}if(!r){let e=Xq(t,d);if(e){let t=String(f),n=e.options.find(e=>e.value===t);if(n){a(e,n.value,{shouldCompact:!0});return}}}let v=tJ(t,d);v.length!==0&&gR(()=>{for(let e of v)a(e,nJ(e,g),{shouldCompact:!0})})},_=e=>{if(jV(e))return!0;let{base:n}=Hq(e),r=n.match(Uq);if(!r)return!1;let i=AV(r[1]);return i?s(i)?!0:Xq(t,i)!==null:!1};return{isInlineNumericEdit:d,isInlineNumericDraft:u,tryApplyNumericValue:f,applyTailwindClass:e=>{let t=e.trim().replace(/^class\s*=\s*["']/,``).replace(/["']\s*$/,``).replace(/\s+\[/g,`-[`),n=_V(t),r=t.split(/\s+/).filter(Boolean);if(r.length>1&&!_(n)){for(let e of r)g(e);return}g(t)}}},iJ=Z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">No`),aJ=Z(`<span class="text-[var(--rg-error-text)] text-[13px] leading-3.5 font-sans font-medium">Yes`),oJ=Z(`<div role=alertdialog aria-modal=true aria-labelledby=rg-discard-prompt-title class="contain-layout shrink-0 flex items-center justify-between gap-2 pt-1.5 pb-1 px-2 w-full self-stretch"><span id=rg-discard-prompt-title class="text-[var(--rg-text-primary)] text-[13px] leading-4 font-sans font-medium">Discard edits?</span><div class="flex items-center gap-[5px]">`),sJ=Z(`<div><textarea data-react-grab-ignore-events data-react-grab-input aria-label="Search properties"aria-keyshortcuts="Enter Escape ArrowUp ArrowDown ArrowLeft ArrowRight Tab"autocapitalize=none autocorrect=off autocomplete=off class="text-[var(--rg-text-primary)] text-[13px] leading-4 font-medium bg-transparent border-none resize-none w-full p-0 m-0 outline-none"rows=1 style=caret-color:var(--rg-text-primary);field-sizing:content;min-height:16px;max-height:16px;scrollbar-width:none>`),cJ=Z(`<div>`),lJ=Z(`<div role=dialog aria-modal=true aria-label="Style element"data-react-grab-ignore-events data-react-grab-edit-panel>`),uJ=Z(`<div class="flex items-center justify-center w-full px-3 py-1.5 min-h-[28px]">`),dJ=e=>X(ez,{get when(){return e.state},children:t=>X(ez,{keyed:!0,get when(){return t().element},children:n=>X(fJ,{get state(){return t()},position:()=>e.position,get onDismiss(){return e.onDismiss},get onSubmit(){return e.onSubmit},get onPendingEditsChange(){return e.onPendingEditsChange},get onInteractingChange(){return e.onInteractingChange}})})}),fJ=e=>{let t=e.state.properties,n,r=e.state.preview,[i,a]=J(e.state.initialSearchQuery??``),[o,s]=J(null),[c,l]=J(null),u=Lq({initialProperties:t,searchQuery:()=>o()??i()}),d=()=>{let e=u.filteredProperties().findIndex(e=>e.kind===`numeric`);return e>0?e:0},[f,p]=J(d()),m=Y(()=>u.hasPendingStyles()),h=Y(()=>m()||!!e.state.hasSessionEdits),[g,_]=J(!1),v,y,b,x=!1,[S,C]=J(!1),w=Y(()=>S()||m()),[T,E]=J(!1),D=zV(),O=Y(()=>mW({tagName:e.state.tagName,componentName:e.state.componentName})),k=Y(()=>{let e=u.filteredProperties();return e.length===0?null:e[Math.min(Math.max(0,f()),e.length-1)]}),ee,te=wK(()=>ee,e.position),A=e=>{l(e),clearTimeout(v),v=setTimeout(()=>{l(t=>t===e?null:t)},100)},ne=Y(()=>w()&&!T());pR(()=>{let t=ne();e.onInteractingChange?.(t)});let re=()=>{C(!0),clearTimeout(y),y=setTimeout(()=>{C(!1)},150)},ie=()=>{queueMicrotask(()=>{n&&DK(n)!==n&&lW(n,{preventScroll:!0})})},ae=()=>{o()===null&&s(i())},oe=()=>{x=!1,clearTimeout(b)},se=()=>{x=!1,clearTimeout(b),b=setTimeout(()=>{x=!0},500)},ce=e=>{let t=e.trim(),n=t.replace(/^-/,``).replace(`.`,``);/[a-z%]+$/i.test(t)||n.length>1?se():oe()},le=e=>{if(!x)return e;let t=i();if(!t||!e.startsWith(t))return oe(),e;let n=e.slice(t.length);return/^[-.\d]/.test(n)?(oe(),n):e},ue=e=>{if(!x||e.metaKey||e.ctrlKey||e.altKey||!/^[-.\d]$/.test(e.key))return!1;e.preventDefault(),e.stopImmediatePropagation(),oe();let t=e.key;return n&&(n.value=t),xe.tryApplyNumericValue(t)?(ae(),a(t),ce(t),ie(),!0):(a(t),ie(),!0)},de=()=>{oe(),s(null),_(!1)},fe=(t,n,i={})=>{u.applyStyle(t,n),r.apply(t.cssProperties,nV(t,n)),e.onPendingEditsChange?.(u.buildPendingEdits()),re(),i.isFromKeyRepeat||we.hide(),i.flashDirection&&A(i.flashDirection===1?`right`:`left`),i.shouldFocus&&ie(),i.shouldCompact&&_(!0),i.source===`keyboard`&&D.arm()},pe=FV(e=>e.shiftKey),me=FV(e=>e.altKey),he=(t,n,r,i,a)=>{let o=k();if(!o)return null;let s=Dq(o,t,n,r,e.state.designTokens);return s===null?(A(t===1?`right`:`left`),null):(fe(o,s,{flashDirection:t,shouldFocus:!0,isFromKeyRepeat:i,source:a}),o)},ge=(e,t,n,r)=>{he(e,t,n,r,`keyboard`)&&_(!0)},_e=e=>{he(e,!1,!1,!1,`pointer`)},ve=Tq({step:ge,isShiftHeld:pe,isAltHeld:me}),ye=(e,t)=>{let n=k();if(n){if(n.kind===`numeric`&&typeof e==`number`){let r=tV(EB(e,n.min,n.max));r!==n.value&&fe(n,r,{source:t});return}typeof e==`string`&&(Cq(n,e,n.value)||fe(n,e,{source:t}))}},be=Y(()=>{if(!pe())return null;let e=k();return!e||e.kind!==`numeric`?null:EK(e.key,e.value)}),xe=rJ({initialProperties:t,searchQuery:i,isCompact:g,activeProperty:k,commit:(e,t,n)=>{fe(e,t,{...n,source:`keyboard`})},setIsCompact:_}),Se=Y(()=>g()&&i()!==``&&xe.isInlineNumericEdit()),Ce=()=>{we.hide(),D.clear(),e.onSubmit(u.buildPendingEdits())},we=pq(),Te,Ee=()=>{Te&&(Te.classList.remove(`animate-shake`),Te.offsetWidth,Te.classList.add(`animate-shake`))},De=t=>{we.hide(),t===`discard`&&r.restore(),e.onDismiss()},Oe=e=>{if(ve.cancelRepeat(),e===`pointer`&&D.clear(),we.isPending()){De(`discard`);return}if(!h()){De(r.hasAppliedStyles()?`discard`:`preserve`);return}let t=g();de(),!(e===`keyboard`&&t)&&(we.show(),Ee())},ke=e=>{let t=u.filteredProperties();t.length!==0&&(p(n=>(n+e+t.length)%t.length),de())},Ae=()=>{D.clear(),we.hide()},je=[],Me=e=>(je.push(e),()=>{je=je.filter(t=>t!==e)}),Ne=()=>je[je.length-1]??null,Pe=(e,t)=>{if(k()?.kind===`color`){t.repeat||Ne()?.();return}ve.pressArrow(e,t.repeat,t.shiftKey,t.altKey)},Fe={ArrowUp:()=>ke(-1),ArrowDown:()=>ke(1),ArrowLeft:e=>Pe(`ArrowLeft`,e),ArrowRight:e=>Pe(`ArrowRight`,e),Tab:e=>ke(e.shiftKey?-1:1),Enter:()=>{if(we.isPending())return;let e=k(),t=Ne();if(e?.kind===`color`&&!u.hasChangedStyleFor(e.key)&&t&&!h()){t();return}Ce()},Escape:()=>Oe(`keyboard`)},Ie=e=>{if(e.isComposing||e.keyCode===229)return;if(we.isPending()){let t=e.composedPath()[0];if(t instanceof HTMLElement&&t.closest(`[data-react-grab-discard-button]`)!==null&&(e.key===`Tab`||e.key===`Enter`))return;if(e.key===`Tab`||e.key===`ArrowUp`||e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`){e.preventDefault(),e.stopImmediatePropagation();return}}let t=Fe[e.key];t&&(e.preventDefault(),e.stopImmediatePropagation(),t(e))};yR(()=>{queueMicrotask(()=>{if(lW(n,{preventScroll:!0}),n){let e=n.value.length;n.setSelectionRange(e,e)}}),te.measure();let e=i();e&&xe.applyTailwindClass(e);let t=vK({isOpen:()=>!0,onDismiss:Oe,shouldIgnoreKeyboardEvent:e=>{let t=e.composedPath()[0];return we.isPending()&&t instanceof HTMLElement&&t.closest(`[data-react-grab-discard-button]`)!==null},shouldIgnoreRightClick:!0,shouldIgnoreInputEvents:!0}),r=NM(e=>{AB(e,`data-react-grab-input`)||ue(e)||Ie(e)}),a=NM(e=>{ve.releaseKey(e.key)}),o=NM(e=>{e.pointerType===`mouse`&&(we.isPending()||D.consume()&&h()&&Oe(`pointer`))});window.addEventListener(`keydown`,r,{capture:!0}),window.addEventListener(`keyup`,a,{capture:!0}),window.addEventListener(`pointermove`,o,{capture:!0}),bR(()=>{t(),window.removeEventListener(`keydown`,r,{capture:!0}),window.removeEventListener(`keyup`,a,{capture:!0}),window.removeEventListener(`pointermove`,o,{capture:!0}),clearTimeout(v),clearTimeout(y),clearTimeout(b),we.cleanup(),te.clearAnimationHandles(),C(!1)})});let j=e=>{p(e),ie()};return X(ez,{get when(){return te.shouldMount()},get children(){var e=lJ();uz(e,`contextmenu`,_K,!0),uz(e,`click`,_K,!0),uz(e,`mousedown`,_K,!0),uz(e,`pointerdown`,_K,!0);var t=ee;return typeof t==`function`?hz(t,e):ee=e,pz(e,`z-index`,`${WM}`),pz(e,`--rg-edit-list-max-h`,`280px`),$(e,X(MW,{ref:e=>Te=e,class:`flex flex-col justify-center items-start overflow-hidden w-fit h-fit`,get style(){return{"min-width":g()?void 0:`200px`,"max-width":`320px`,transform:`translateX(${ve.heldDirection()*2}px)`,transition:`transform 280ms ${CN}`}},get children(){return[X(ez,{get when(){return we.isPending()},get fallback(){return X(ez,{get when(){return!g()},get children(){var e=cJ();return e.addEventListener(`mouseleave`,()=>E(!1)),e.addEventListener(`mouseenter`,()=>E(!0)),$(e,X(EW,{get tagName(){return O().tagName},get componentName(){return O().componentName},isClickable:!1,onClick:()=>{},shrink:!0}),null),$(e,X(ez,{get when(){return h()},get children(){return X(fq,{onCopy:Ce})}}),null),fR(()=>lz(e,pW(`contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 h-fit px-2`,h()?`w-full self-stretch justify-between`:`w-fit`))),e}})},get children(){var e=oJ(),t=e.firstChild.nextSibling;return $(t,X(BW,{"data-react-grab-ignore-events":!0,"data-react-grab-discard-button":`cancel`,onClick:e=>{e.preventDefault(),e.stopPropagation(),Ae()},get children(){return iJ()}}),null),$(t,X(BW,{variant:`destructive`,"data-react-grab-ignore-events":!0,"data-react-grab-discard-button":`confirm`,onClick:e=>{e.preventDefault(),e.stopPropagation(),De(`discard`)},get children(){return aJ()}}),null),e}}),(()=>{var e=sJ(),t=e.firstChild;return t.$$keydown=Ie,t.$$input=e=>{let t=le(e.currentTarget.value);if(t!==e.currentTarget.value&&(e.currentTarget.value=t),xe.tryApplyNumericValue(t)){ae(),a(t),ce(t),ie();return}if(oe(),xe.isInlineNumericDraft(t)){ae(),a(t),ie();return}a(t),s(null),p(t.trim()===``?d():0),de(),xe.applyTailwindClass(t)},hz(e=>{n=e},t),Q(t,`spellcheck`,!1),fR(n=>{var r=Se()?``:`[font-synthesis:none] contain-layout shrink-0 flex flex-col items-start px-2 py-1.5 w-full self-stretch [border-top-width:0.5px] border-t-solid border-t-[var(--rg-border-subtle)] antialiased`,i=Se()?MK:void 0,a=Se()?-1:0,o=g()?k()?.label??`Search property`:`Search property`;return r!==n.e&&lz(e,n.e=r),n.t=fz(e,i,n.t),a!==n.a&&Q(t,`tabindex`,n.a=a),o!==n.o&&Q(t,`placeholder`,n.o=o),n},{e:void 0,t:void 0,a:void 0,o:void 0}),fR(()=>t.value=i()),e})(),X(ez,{get when(){return u.filteredProperties().length>0},get children(){var e=cJ();return $(e,X(Sq,{get properties(){return u.filteredProperties()},get activeIndex(){return f()},get activeKey(){return c()},onHoverIndex:p,onSelect:j,onStep:_e,onCommit:ye,onColorPickerRegister:Me,onEditComplete:ie,onInvalidCommit:Ee,onInteract:re,isAdjusting:S,get activeTailwindLabel(){return be()}})),fR(t=>{var n=g()?``:`[font-synthesis:none] contain-layout shrink-0 flex flex-col items-start w-full self-stretch antialiased`,r=g()?MK:void 0;return n!==t.e&&lz(e,t.e=n),t.t=fz(e,r,t.t),t},{e:void 0,t:void 0}),e}}),X(ez,{get when(){return $z(()=>!!g())()&&k()},children:e=>(()=>{var t=uJ();return t.$$mousedown=e=>e.preventDefault(),$(t,X(uq,{get property(){return e()},get activeKey(){return c()},onStep:_e,onCommit:ye,onEditComplete:ie,onInvalidCommit:Ee,onInteract:re,onColorPickerRegister:Me,showLabel:!1,get tailwindLabel(){return be()},emphasized:!0})),t})()})]}})),fR(t=>{var n=g()?`true`:`false`,r=pW(`fixed font-sans text-[13px] antialiased [filter:var(--rg-drop-shadow)] select-none`,te.isAnimatedIn()?`transition-[opacity,transform] duration-220 ease-spring`:`transition-[opacity,transform] duration-120 ease-drawer`),i=`${te.displayPosition().top}px`,a=`${te.displayPosition().left}px`,o=te.isAnimatedIn()?`auto`:`none`,s=vN[te.lastAnchorEdge()],c=te.isAnimatedIn()?`1`:`0`,l=te.isAnimatedIn()?`scale(1)`:`scale(0.92)`;return n!==t.e&&Q(e,`data-rg-compact`,t.e=n),r!==t.t&&lz(e,t.t=r),i!==t.a&&pz(e,`top`,t.a=i),a!==t.o&&pz(e,`left`,t.o=a),o!==t.i&&pz(e,`pointer-events`,t.i=o),s!==t.n&&pz(e,`transform-origin`,t.n=s),c!==t.s&&pz(e,`opacity`,t.s=c),l!==t.h&&pz(e,`transform`,t.h=l),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),e}})},oz([`pointerdown`,`mousedown`,`click`,`contextmenu`,`input`,`keydown`]),pJ=Z(`<div data-react-grab-ignore-events>`),mJ=e=>{let t,n=()=>e.interactive!==!1,r=wK(()=>t,()=>e.position);return yR(()=>{r.measure();let t=e.onDismiss?vK({isOpen:()=>!!e.position,onDismiss:e.onDismiss}):void 0;bR(()=>{r.clearAnimationHandles(),t?.()})}),X(ez,{get when(){return r.shouldMount()},get children(){var i=pJ(),a=t;return typeof a==`function`?hz(a,i):t=i,mz(i,XR(()=>({[e.dataAttribute]:``}),{get class(){return pW(`fixed font-sans text-[13px] antialiased [filter:var(--rg-drop-shadow)] select-none will-change-[opacity,transform]`,r.isAnimatedIn()?`transition-[opacity,transform] duration-220 ease-spring`:`transition-[opacity,transform] duration-120 ease-drawer`)},get style(){return{top:`${r.displayPosition().top}px`,left:`${r.displayPosition().left}px`,"z-index":`${WM}`,"pointer-events":n()&&r.isAnimatedIn()?`auto`:`none`,"transform-origin":vN[r.lastAnchorEdge()],opacity:r.isAnimatedIn()?`1`:`0`,transform:r.isAnimatedIn()?`scale(1)`:`scale(0.92)`}},onPointerDown:_K,onMouseDown:_K,onClick:_K,onContextMenu:_K}),!1,!0),$(i,()=>e.children),i}})},hJ=e=>{let t=pK({clearActiveOnPointerLeave:!0,highlight:{topCornerRadiusPx:14,bottomCornerRadiusPx:14,cornerShape:mN}});return X(mJ,{get position(){return e.position},dataAttribute:`data-react-grab-toolbar-menu`,get onDismiss(){return e.onDismiss},get children(){return X(mK.Panel,{class:`overflow-hidden`,style:{"min-width":`100px`},get children(){return X(mK.Provider,{store:t,get children(){return X(mK.List,{label:`Default action`,get children(){return X(QR,{get each(){return e.actions},children:t=>{let n=()=>t.id===e.defaultActionId;return X(mK.Item,{get value(){return t.id},role:`menuitemradio`,get checked(){return n()},onSelect:()=>{e.onSetDefaultAction(t.id),e.onDismiss()},get children(){return[X(mK.Label,{get class(){return n()?`text-[var(--rg-text-primary)]`:`text-[var(--rg-text-secondary)]`},get children(){return t.label}}),X(ez,{get when(){return t.shortcut},children:e=>X(mK.Shortcut,{get shortcut(){return e()},get modifier(){return t.shortcutModifier}})})]}})}})}})}})}})}})},gJ=Z(`<span aria-hidden=true class="shrink-0 font-mono text-[11px] leading-4 text-[var(--rg-text-secondary)] opacity-60 mr-1">`),_J=Z(`<span class=text-[var(--rg-text-secondary)]>.`),vJ=Z(`<span class="flex items-center min-w-0 w-full"><span class="text-[13px] leading-4 h-fit font-medium overflow-hidden text-ellipsis whitespace-nowrap min-w-0 transition-colors">`),yJ=e=>{let t=()=>e.state?.activeIndex??0,n=pK({value:()=>String(t()),highlight:{topCornerRadiusPx:14,bottomCornerRadiusPx:14,cornerShape:mN}});return X(mJ,{get position(){return e.position},dataAttribute:`data-react-grab-hierarchy-menu`,interactive:!1,get children(){return X(mK.Panel,{class:`overflow-hidden`,style:{"min-width":`160px`},get children(){return X(mK.Provider,{store:n,get children(){return X(mK.List,{label:`Navigate element hierarchy`,get children(){return X(QR,{get each(){return e.state?.items??[]},children:(e,n)=>X(mK.Item,{get value(){return String(n())},role:`menuitemradio`,get checked(){return n()===t()},get children(){var r=vJ(),i=r.firstChild;return $(r,X(ez,{get when(){return e.depth>0},get children(){var t=gJ();return $(t,()=>e.isLast?`└─`:`├─`),fR(n=>pz(t,`padding-left`,`${(e.depth-1)*12}px`)),t}}),i),$(i,X(ez,{get when(){return e.componentName},get children(){return[$z(()=>e.componentName),_J()]}}),null),$(i,()=>e.tagName,null),fR(e=>{var r=n()===t(),a=n()!==t();return r!==e.e&&i.classList.toggle(`text-[var(--rg-text-primary)]`,e.e=r),a!==e.t&&i.classList.toggle(`text-[var(--rg-text-secondary)]`,e.t=a),e},{e:void 0,t:void 0}),r}})})}})}})}})}})},bJ=e=>[X(aW,{get selectionVisible(){return e.selectionVisible},get selectionBounds(){return e.selectionBounds},get selectionBoundsMultiple(){return e.selectionBoundsMultiple},get selectionShouldSnap(){return e.selectionShouldSnap},get dragVisible(){return e.dragVisible},get dragBounds(){return e.dragBounds},get grabbedBoxes(){return e.grabbedBoxes},get labelInstances(){return e.labelInstances}}),X(sW,{get visible(){return e.isFrozen??!1}}),X(ez,{get when(){return $z(()=>!!e.selectionLabelVisible)()&&(e.frozenLabelEntries?.length??0)>0},get children(){return X($R,{get each(){return e.frozenLabelEntries??[]},children:(t,n)=>X(_G,{get tagName(){return t().tagName},get componentName(){return t().componentName},get selectionBounds(){return t().bounds},get mouseX(){return t().mouseX},visible:!0,shouldToggleExpandOnClick:n===0,get onToggleExpand(){return n===0?e.onToggleExpand:void 0}})})}}),X(ez,{get when(){return $z(()=>!!e.selectionLabelVisible)()&&e.pendingShiftPreviewEntry},children:e=>X(_G,{get tagName(){return e().tagName},get componentName(){return e().componentName},get selectionBounds(){return e().bounds},get mouseX(){return e().mouseX},visible:!0})}),X(ez,{get when(){return $z(()=>!!(e.selectionLabelVisible&&e.selectionBounds))()&&(e.frozenLabelEntries?.length??0)===0},get children(){return X(_G,{get tagName(){return e.selectionTagName},get componentName(){return e.selectionComponentName},get elementsCount(){return e.selectionElementsCount},get selectionBounds(){return e.selectionBounds},get mouseX(){return e.mouseX},get visible(){return e.selectionLabelVisible},get isPromptMode(){return e.isPromptMode},get inputValue(){return e.inputValue},get status(){return e.selectionLabelStatus},get filePath(){return e.selectionFilePath},get onInputChange(){return e.onInputChange},get onSubmit(){return e.onInputSubmit},get onToggleExpand(){return e.onToggleExpand},get selectionLabelShakeCount(){return e.selectionLabelShakeCount},get onConfirmDismiss(){return e.onConfirmDismiss},get discardPrompt(){return e.discardPrompt},onOpen:()=>{e.selectionFilePath&&AI(e.selectionFilePath,e.selectionLineNumber)},get isContextMenuOpen(){return e.contextMenuPosition!==null}})}}),X($R,{get each(){return e.labelInstances??[]},children:t=>X(_G,{get tagName(){return t().tagName},get componentName(){return t().componentName},get elementsCount(){return t().elementsCount},get selectionBounds(){return t().bounds},get mouseX(){return t().mouseX},visible:!0,get status(){return t().status},get statusText(){return t().statusText},get isPromptMode(){return t().isPromptMode},get inputValue(){return t().inputValue},get error(){return t().errorMessage},get hideArrow(){return t().hideArrow},get onShowContextMenu(){let n=t();if(!(!(n.status===`copied`||n.status===`fading`)||!tB(n.element)))return()=>e.onShowContextMenuInstance?.(n.id)},onHoverChange:n=>e.onLabelInstanceHoverChange?.(t().id,n)})}),X(ez,{get when(){return e.toolbarVisible!==!1},get children(){return X(GG,{get isActive(){return e.isActive},get isContextMenuOpen(){return e.contextMenuPosition!==null},get onToggle(){return e.onToggleActive},get onActivateAction(){return e.onActivateAction},get activeActionId(){return e.activeActionId},get enabled(){return e.enabled},get shakeCount(){return e.shakeCount},get onStateChange(){return e.onToolbarStateChange},get onSubscribeToStateChanges(){return e.onSubscribeToToolbarStateChanges},get onSelectHoverChange(){return e.onToolbarSelectHoverChange},get onContainerRef(){return e.onToolbarRef},get onToggleToolbarMenu(){return e.onToggleToolbarMenu}})}}),X(xK,{get position(){return e.contextMenuPosition??null},get selectionBounds(){return e.contextMenuBounds??null},get tagName(){return e.contextMenuTagName},get componentName(){return e.contextMenuComponentName},get hasFilePath(){return e.contextMenuHasFilePath??!1},get actions(){return e.actions},get actionContext(){return e.actionContext},get onDismiss(){return e.onContextMenuDismiss??(()=>{})},get onHide(){return e.onContextMenuHide??(()=>{})}}),X(hJ,{get position(){return e.toolbarMenuPosition??null},get actions(){return e.toolbarMenuActions??[]},get defaultActionId(){return e.defaultActionId??`copy`},get onSetDefaultAction(){return e.onSetDefaultAction??(()=>{})},get onDismiss(){return e.onToolbarMenuDismiss??(()=>{})}}),X(yJ,{get position(){return e.hierarchyMenuPosition??null},get state(){return e.hierarchyState}}),X(dJ,{get state(){return e.editPanelState??null},get position(){return e.editPanelPosition??null},get onDismiss(){return e.onEditPanelDismiss??(()=>{})},get onSubmit(){return e.onEditPanelSubmit??(()=>{})},get onPendingEditsChange(){return e.onEditPanelPendingEditsChange},get onInteractingChange(){return e.onEditPanelInteractingChange}})]}));function SJ(e){let t=e[Oz];if(!t&&(Object.defineProperty(e,Oz,{value:t=new Proxy(e,VJ)}),!Array.isArray(e))){let n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let i=0,a=n.length;i<a;i++){let a=n[i];r[a].get&&Object.defineProperty(e,a,{enumerable:r[a].enumerable,get:r[a].get.bind(t)})}}return t}function CJ(e){let t;return typeof e==`object`&&!!e&&(e[Oz]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function wJ(e,t=new Set){let n,r,i,a;if(n=e!=null&&e[LJ])return n;if(!CJ(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,a=e.length;n<a;n++)i=e[n],(r=wJ(i,t))!==i&&(e[n]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);let n=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let s=0,c=n.length;s<c;s++)a=n[s],!o[a].get&&(i=e[a],(r=wJ(i,t))!==i&&(e[a]=r))}return e}function TJ(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function EJ(e,t,n){if(e[t])return e[t];let[r,i]=J(n,{equals:!1,internal:!0});return r.$=i,e[t]=r}function DJ(e,t){let n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===Oz||t===RJ?n:(delete n.value,delete n.writable,n.get=()=>e[Oz][t],n)}function OJ(e){xR()&&EJ(TJ(e,RJ),BJ)()}function kJ(e){return OJ(e),Reflect.ownKeys(e)}function AJ(e,t,n,r=!1){if(!r&&e[t]===n)return;let i=e[t],a=e.length;n===void 0?(delete e[t],e[zJ]&&e[zJ][t]&&i!==void 0&&e[zJ][t].$()):(e[t]=n,e[zJ]&&e[zJ][t]&&i===void 0&&e[zJ][t].$());let o=TJ(e,RJ),s;if((s=EJ(o,t,i))&&s.$(()=>n),Array.isArray(e)&&e.length!==a){for(let t=e.length;t<a;t++)(s=o[t])&&s.$();(s=EJ(o,`length`,a))&&s.$(e.length)}(s=o[BJ])&&s.$()}function jJ(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];AJ(e,i,t[i])}}function MJ(e,t){if(typeof t==`function`&&(t=t(e)),t=wJ(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){let r=t[n];e[n]!==r&&AJ(e,n,r)}AJ(e,`length`,r)}else jJ(e,t)}function NJ(e,t,n=[]){let r,i=e;if(t.length>1){r=t.shift();let a=typeof r,o=Array.isArray(e);if(Array.isArray(r)){for(let i=0;i<r.length;i++)NJ(e,[r[i]].concat(t),n);return}else if(o&&a===`function`){for(let i=0;i<e.length;i++)r(e[i],i)&&NJ(e,[i].concat(t),n);return}else if(o&&a===`object`){let{from:i=0,to:a=e.length-1,by:o=1}=r;for(let r=i;r<=a;r+=o)NJ(e,[r].concat(t),n);return}else if(t.length>1){NJ(e[r],t,[r].concat(n));return}i=e[r],n=[r].concat(n)}let a=t[0];typeof a==`function`&&(a=a(i,n),a===i)||r===void 0&&a==null||(a=wJ(a),r===void 0||CJ(i)&&CJ(a)&&!Array.isArray(a)?jJ(i,a):AJ(e,r,a))}function PJ(...[e,t]){let n=wJ(e||{}),r=Array.isArray(n),i=SJ(n);function a(...e){gR(()=>{r&&e.length===1?MJ(n,e[0]):NJ(n,e)})}return[i,a]}function FJ(e){return t=>{if(CJ(t)){let n;(n=HJ.get(t))||HJ.set(t,n=new Proxy(t,UJ)),e(n)}return t}}var IJ,LJ,RJ,zJ,BJ,VJ,HJ,UJ,WJ,GJ,KJ,qJ,JJ,YJ,XJ,ZJ,QJ,$J,eY,tY,nY,rY,iY,aY,oY,sY,cY,lY,uY,dY,fY,pY,mY,hY,gY,_Y,vY,yY,bY,xY,SY,CY,wY,TY,EY,DY,OY,kY,AY,jY,MY,NY,PY,FY,IY,LY,RY,zY,BY,VY,HY,UY,WY,GY,KY,qY,JY,YY,XY,ZY,QY,$Y,eX,tX,nX,rX,iX,aX,oX,sX,cX,lX,uX,dX,fX,pX,mX,hX,gX,_X,vX,yX,bX,xX,SX,CX,wX,TX,EX,DX,OX,kX,AX,jX,MX,NX,PX,FX,IX,LX,RX,zX,BX,VX,HX,UX,WX,GX,KX,qX,JX,YX,XX,ZX,QX,$X,eZ,tZ,nZ,rZ,iZ,aZ,oZ,sZ,cZ,lZ,uZ,dZ,fZ,pZ,mZ,hZ,gZ,_Z,vZ,yZ,bZ,xZ,SZ,CZ=t((()=>{BV(),sR(),QU(),IJ=`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
258
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial}}}@layer theme{:root,:host{--font-sans:"Geist", ui-sans-serif, system-ui, sans-serif;--font-serif:ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-500:oklch(63.7% .237 25.331);--spacing:4px;--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--radius-sm:4px;--ease-out:cubic-bezier(0, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--ease-drawer:cubic-bezier(.32, .72, 0, 1);--ease-spring:cubic-bezier(.34, 1.56, .64, 1)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.a11y-hitbox{position:relative}.a11y-hitbox:before{content:"";pointer-events:auto;width:100%;min-width:24px;height:100%;min-height:24px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.top-0{top:calc(var(--spacing) * 0)}.top-1\\/2{top:50%}.top-\\[2px\\]{top:2px}.top-full{top:100%}.right-0{right:calc(var(--spacing) * 0)}.right-full{right:100%}.bottom-\\[2px\\]{bottom:2px}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing) * 0)}.left-full{left:100%}.z-1{z-index:1}.z-10{z-index:10}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.-m-0\\.5{margin:calc(var(--spacing) * -.5)}.-m-4{margin:calc(var(--spacing) * -4)}.m-0{margin:calc(var(--spacing) * 0)}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.-my-1\\.5{margin-block:calc(var(--spacing) * -1.5)}.-mt-\\[8px\\]{margin-top:-8px}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-1\\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2\\.5{margin-right:calc(var(--spacing) * 2.5)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2\\.5{margin-bottom:calc(var(--spacing) * 2.5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2\\.5{margin-left:calc(var(--spacing) * 2.5)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.ml-px{margin-left:1px}.no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.no-scrollbar::-webkit-scrollbar{width:0;height:0;display:none}.line-clamp-5{-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.list-item{display:list-item}.size-0{width:calc(var(--spacing) * 0);height:calc(var(--spacing) * 0)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-\\[12px\\]{width:12px;height:12px}.size-\\[16px\\]{width:16px;height:16px}.h-\\[8px\\]{height:8px}.h-\\[17px\\]{height:17px}.h-\\[20px\\]{height:20px}.h-\\[24px\\]{height:24px}.h-fit{height:fit-content}.max-h-\\[var\\(--rg-edit-list-max-h\\)\\]{max-height:var(--rg-edit-list-max-h)}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-\\[28px\\]{min-height:28px}.w-\\[2px\\]{width:2px}.w-\\[calc\\(100\\%\\+16px\\)\\]{width:calc(100% + 16px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.max-w-\\[280px\\]{max-width:280px}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\\[36px\\]{min-width:36px}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[150px\\]{min-width:150px}.flex-1{flex:1}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.-rotate-90{rotate:-90deg}.rotate-0{rotate:0deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.interactive-scale{transition:transform .4s cubic-bezier(.34,1.56,.64,1)}@media (hover:hover) and (pointer:fine){.interactive-scale:hover{transform:scale(1.05)}}.interactive-scale:active{transition:transform 60ms cubic-bezier(0,0,.2,1);transform:scale(.96)}.press-scale{transition:transform .4s cubic-bezier(.34,1.56,.64,1)}.press-scale:active{transition:transform 60ms cubic-bezier(0,0,.2,1);transform:scale(.97)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.resize{resize:both}.resize-none{resize:none}.grid-cols-\\[0fr\\]{grid-template-columns:0fr}.grid-cols-\\[1fr\\]{grid-template-columns:1fr}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing) * 0)}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-\\[5px\\]{gap:5px}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:4px}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[6px\\]{border-radius:6px}.rounded-\\[13px\\]{border-radius:13px}.rounded-\\[14px\\]{border-radius:14px}.rounded-full{border-radius:3.40282e38px}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t{border-top-left-radius:4px;border-top-right-radius:4px}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-l{border-top-left-radius:4px;border-bottom-left-radius:4px}.rounded-l-\\[10px\\]{border-top-left-radius:10px;border-bottom-left-radius:10px}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-tl{border-top-left-radius:4px}.rounded-r{border-top-right-radius:4px;border-bottom-right-radius:4px}.rounded-r-\\[10px\\]{border-top-right-radius:10px;border-bottom-right-radius:10px}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-tr{border-top-right-radius:4px}.rounded-b{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.rounded-b-\\[6px\\]{border-bottom-right-radius:6px;border-bottom-left-radius:6px}.rounded-b-\\[10px\\]{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.rounded-br{border-bottom-right-radius:4px}.rounded-bl{border-bottom-left-radius:4px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.\\[border-width\\:0\\.5px\\]{border-width:.5px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-4{border-top-style:var(--tw-border-style);border-top-width:4px}.\\[border-top-width\\:0\\.5px\\]{border-top-width:.5px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-dotted{--tw-border-style:dotted;border-style:dotted}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-\\[var\\(--rg-border-button\\)\\]{border-color:var(--rg-border-button)}.border-t-\\[var\\(--rg-border-subtle\\)\\]{border-top-color:var(--rg-border-subtle)}.bg-\\[\\#f00\\]{background-color:red}.bg-\\[var\\(--rg-error-bg\\)\\]{background-color:var(--rg-error-bg)}.bg-\\[var\\(--rg-panel-bg\\)\\]{background-color:var(--rg-panel-bg)}.bg-\\[var\\(--rg-submit-bg\\)\\]{background-color:var(--rg-submit-bg)}.bg-\\[var\\(--rg-surface-active\\)\\]{background-color:var(--rg-surface-active)}.bg-\\[var\\(--rg-surface-hover\\)\\]{background-color:var(--rg-surface-hover)}.bg-\\[var\\(--rg-text-primary\\)\\]{background-color:var(--rg-text-primary)}.bg-\\[var\\(--rg-text-secondary\\)\\]{background-color:var(--rg-text-secondary)}.bg-red-500{background-color:var(--color-red-500)}.bg-transparent{background-color:#0000}.p-0{padding:calc(var(--spacing) * 0)}.p-1{padding:calc(var(--spacing) * 1)}.p-6{padding:calc(var(--spacing) * 6)}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-0\\.25{padding-inline:calc(var(--spacing) * .25)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-\\[3px\\]{padding-inline:3px}.py-0{padding-block:calc(var(--spacing) * 0)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-0\\.25{padding-block:calc(var(--spacing) * .25)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-px{padding-block:1px}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.text-center{text-align:center}.text-justify{text-align:justify}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-serif{font-family:var(--font-serif)}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.leading-3\\.5{--tw-leading:calc(var(--spacing) * 3.5);line-height:calc(var(--spacing) * 3.5)}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-extralight{--tw-font-weight:var(--font-weight-extralight);font-weight:var(--font-weight-extralight)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.font-thin{--tw-font-weight:var(--font-weight-thin);font-weight:var(--font-weight-thin)}.break-normal{overflow-wrap:normal;word-break:normal}.break-words,.wrap-break-word{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.text-ellipsis{text-overflow:ellipsis}.whitespace-break-spaces{white-space:break-spaces}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[var\\(--rg-error-text\\)\\]{color:var(--rg-error-text)}.text-\\[var\\(--rg-submit-fg\\)\\]{color:var(--rg-submit-fg)}.text-\\[var\\(--rg-text-primary\\)\\]{color:var(--rg-text-primary)}.text-\\[var\\(--rg-text-primary-85\\)\\]{color:var(--rg-text-primary-85)}.text-\\[var\\(--rg-text-secondary\\)\\]{color:var(--rg-text-secondary)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.\\[box-shadow\\:var\\(--rg-shadow\\)\\]{box-shadow:var(--rg-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.\\[filter\\:var\\(--rg-drop-shadow\\)\\]{filter:var(--rg-drop-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-columns\\]{transition-property:grid-template-columns;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\]{transition-property:grid-template-rows;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[padding\\,border-radius\\,transform\\]{transition-property:padding,border-radius,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[top\\,left\\,width\\,height\\,opacity\\,border-radius\\]{transition-property:top,left,width,height,opacity,border-radius;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,color\\]{transition-property:transform,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.delay-\\[80ms\\]{transition-delay:80ms}.duration-60{--tw-duration:60ms;transition-duration:60ms}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-120{--tw-duration:.12s;transition-duration:.12s}.duration-140{--tw-duration:.14s;transition-duration:.14s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-180{--tw-duration:.18s;transition-duration:.18s}.duration-220{--tw-duration:.22s;transition-duration:.22s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-400{--tw-duration:.4s;transition-duration:.4s}.ease-\\[cubic-bezier\\(0\\,0\\,0\\.2\\,1\\)\\]{--tw-ease:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-drawer{--tw-ease:var(--ease-drawer);transition-timing-function:var(--ease-drawer)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.ease-spring{--tw-ease:var(--ease-spring);transition-timing-function:var(--ease-spring)}.will-change-\\[opacity\\,transform\\]{will-change:opacity,transform}.will-change-transform{will-change:transform}.contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,) var(--tw-contain-layout,) var(--tw-contain-paint,) var(--tw-contain-style,)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[corner-shape\\:superellipse\\(1\\.25\\)\\]{corner-shape:superellipse(1.25)}.\\[font-synthesis\\:none\\]{font-synthesis:none}@media (hover:hover){.group-hover\\:text-\\[var\\(--rg-text-primary\\)\\]:is(:where(.group):hover *){color:var(--rg-text-primary)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.hover\\:bg-\\[var\\(--rg-error-bg-hover\\)\\]:hover{background-color:var(--rg-error-bg-hover)}.hover\\:bg-\\[var\\(--rg-surface-active\\)\\]:hover{background-color:var(--rg-surface-active)}.hover\\:bg-\\[var\\(--rg-surface-hover\\)\\]:hover{background-color:var(--rg-surface-hover)}.hover\\:text-\\[var\\(--rg-text-primary\\)\\]:hover{color:var(--rg-text-primary)}}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:opacity-40:disabled{opacity:.4}}:host{all:initial;direction:ltr}:host,[data-rg-theme=dark]{--rg-panel-bg:#161616;--rg-text-primary:#fff;--rg-text-secondary:#a7a7a7;--rg-surface-hover:#ffffff1a;--rg-surface-active:#ffffff26;--rg-border-subtle:#ffffff1a;--rg-border-button:#fff3;--rg-submit-bg:#fff;--rg-submit-fg:#161616;--rg-error-text:#f87171;--rg-error-bg:#3d1515;--rg-error-bg-hover:#4d1f1f;--rg-shadow:0 2px 8px #00000014;--rg-drop-shadow:drop-shadow(0px 2px 8px #00000014);--rg-shimmer-from:#a1a1aa;--rg-shimmer-to:#d4d4d8;--rg-text-primary-85:#ffffffd9}@media (prefers-color-scheme:dark){:host:not([data-rg-theme]){--rg-panel-bg:#fff;--rg-text-primary:#171717;--rg-text-secondary:#737373;--rg-surface-hover:#0000000d;--rg-surface-active:#00000014;--rg-border-subtle:#00000014;--rg-border-button:#00000026;--rg-submit-bg:#171717;--rg-submit-fg:#fff;--rg-error-text:#dc2626;--rg-error-bg:#fee2e2;--rg-error-bg-hover:#fecaca;--rg-shadow:0 2px 12px #0000001a;--rg-drop-shadow:drop-shadow(0px 2px 12px #0000001a);--rg-shimmer-from:#71717a;--rg-shimmer-to:#a1a1aa;--rg-text-primary-85:#171717d9}}:host([data-rg-theme=light]),[data-rg-theme=light]{--rg-panel-bg:#fff;--rg-text-primary:#171717;--rg-text-secondary:#737373;--rg-surface-hover:#0000000d;--rg-surface-active:#00000014;--rg-border-subtle:#00000014;--rg-border-button:#00000026;--rg-submit-bg:#171717;--rg-submit-fg:#fff;--rg-error-text:#dc2626;--rg-error-bg:#fee2e2;--rg-error-bg-hover:#fecaca;--rg-shadow:0 2px 12px #0000001a;--rg-drop-shadow:drop-shadow(0px 2px 12px #0000001a);--rg-shimmer-from:#71717a;--rg-shimmer-to:#a1a1aa;--rg-text-primary-85:#171717d9}@keyframes rg-slot-enter-up{0%{filter:blur(2px);opacity:0;transform:translateY(.5em)scale(.5)}to{filter:blur();opacity:1;transform:translateY(0)scale(1)}}@keyframes rg-slot-exit-up{0%{filter:blur();opacity:1;transform:translateY(0)scale(1)}to{filter:blur(2px);opacity:0;transform:translateY(-.5em)scale(.5)}}@keyframes rg-slot-enter-down{0%{filter:blur(2px);opacity:0;transform:translateY(-.5em)scale(.5)}to{filter:blur();opacity:1;transform:translateY(0)scale(1)}}@keyframes rg-slot-exit-down{0%{filter:blur();opacity:1;transform:translateY(0)scale(1)}to{filter:blur(2px);opacity:0;transform:translateY(.5em)scale(.5)}}@keyframes rg-slot-enter-fade{0%{filter:blur(2px);opacity:0;transform:scale(.5)}to{filter:blur();opacity:1;transform:scale(1)}}@keyframes rg-slot-exit-fade{0%{filter:blur();opacity:1;transform:scale(1)}to{filter:blur(2px);opacity:0;transform:scale(.5)}}.rg-slot-column{vertical-align:top;display:inline-block;position:relative}.rg-slot-sizer{visibility:hidden;white-space:pre;display:inline-block}.rg-slot-cell{white-space:pre;will-change:transform, filter, opacity;animation-duration:var(--rg-slot-dur,.35s);animation-timing-function:var(--rg-slot-ease,cubic-bezier(.34, 1.56, .64, 1));animation-fill-mode:both;display:inline-block;position:absolute;top:0;left:0}.rg-slot-cell.rg-slot-enter[data-dir="1"]{animation-name:rg-slot-enter-up}.rg-slot-cell.rg-slot-enter[data-dir="-1"]{animation-name:rg-slot-enter-down}.rg-slot-cell.rg-slot-enter[data-dir="0"]{animation-name:rg-slot-enter-fade}.rg-slot-cell.rg-slot-exit[data-dir="1"]{animation-name:rg-slot-exit-up}.rg-slot-cell.rg-slot-exit[data-dir="-1"]{animation-name:rg-slot-exit-down}.rg-slot-cell.rg-slot-exit[data-dir="0"]{animation-name:rg-slot-exit-fade}@media (prefers-reduced-motion:reduce){:host,:host *,:host :before,:host :after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}:host :focus,:host :focus-visible{box-shadow:none!important;outline:none!important}@keyframes shake{0%,to{translate:0}15%,45%{translate:calc(-3px * var(--rg-shake-x,1)) calc(-3px * var(--rg-shake-y,0))}30%,60%{translate:calc(3px * var(--rg-shake-x,1)) calc(3px * var(--rg-shake-y,0))}75%{translate:calc(-2px * var(--rg-shake-x,1)) calc(-2px * var(--rg-shake-y,0))}90%{translate:calc(2px * var(--rg-shake-x,1)) calc(2px * var(--rg-shake-y,0))}}@keyframes icon-loader-spin{0%{opacity:1}50%{opacity:.5}to{opacity:.2}}.icon-loader-bar{animation:.5s linear infinite icon-loader-spin}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.shimmer-text{background:linear-gradient(90deg, var(--rg-shimmer-from) 0%, var(--rg-shimmer-to) 25%, var(--rg-shimmer-from) 50%, var(--rg-shimmer-to) 75%, var(--rg-shimmer-from) 100%);color:#0000;background-size:200% 100%;-webkit-background-clip:text;background-clip:text;animation:2.5s linear infinite shimmer}.animate-shake,.animate-shake-vertical{will-change:translate;animation:.3s ease-out shake}@keyframes tooltip-fade-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}.animate-tooltip-fade-in{will-change:transform, opacity;animation:.1s ease-out tooltip-fade-in}.animate-shake-vertical{--rg-shake-x:0;--rg-shake-y:1}@supports (-webkit-touch-callout:none){textarea[data-react-grab-input]{font-size:16px}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}`,LJ=Symbol(`store-raw`),RJ=Symbol(`store-node`),zJ=Symbol(`store-has`),BJ=Symbol(`store-self`),VJ={get(e,t,n){if(t===LJ)return e;if(t===Oz)return n;if(t===Az)return OJ(e),n;let r=TJ(e,RJ),i=r[t],a=i?i():e[t];if(t===RJ||t===zJ||t===`__proto__`)return a;if(!i){let n=Object.getOwnPropertyDescriptor(e,t);xR()&&(typeof a!=`function`||e.hasOwnProperty(t))&&!(n&&n.get)&&(a=EJ(r,t,a)())}return CJ(a)?SJ(a):a},has(e,t){return t===LJ||t===Oz||t===Az||t===RJ||t===zJ||t===`__proto__`?!0:(xR()&&EJ(TJ(e,zJ),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:kJ,getOwnPropertyDescriptor:DJ},HJ=new WeakMap,UJ={get(e,t){if(t===LJ)return e;let n=e[t],r;return CJ(n)?HJ.get(n)||(HJ.set(n,r=new Proxy(n,UJ)),r):n},set(e,t,n){return AJ(e,t,wJ(n)),!0},deleteProperty(e,t){return AJ(e,t,void 0,!0),!0}},WJ=new WeakMap,GJ=new WeakMap,KJ=()=>{WJ=new WeakMap,GJ=new WeakMap},qJ=(e,t,n)=>{let r=GJ.get(e);if(r&&n-r.timestamp<200)return r.borderRadius;let i=(t??window.getComputedStyle(e)).borderRadius||`0px`;return GJ.set(e,{borderRadius:i,timestamp:n}),i},JJ=e=>{let t=performance.now(),n=WJ.get(e);if(n&&t-n.timestamp<16)return n.bounds;let r=e.getBoundingClientRect(),i={borderRadius:qJ(e,null,t),height:r.height,width:r.width,x:r.left,y:r.top};return WJ.set(e,{bounds:i,timestamp:t}),i},YJ=e=>({x:e.x+e.width/2,y:e.y+e.height/2}),XJ=e=>({selectionInteractionLockDepth:0,wasActivatedByToggle:!1,pendingCommentMode:!1,keyHoldDuration:e.keyHoldDuration,dragStart:{x:LM,y:LM},copyStart:{x:LM,y:LM},copyOffsetFromCenterX:0,detectedElement:null,frozenElement:null,frozenElements:[],frozenDragRect:null,lastGrabbedElement:null,selectionFilePath:null,selectionLineNumber:null,inputText:``,grabbedBoxes:[],labelInstances:[],isTouchMode:!1,activationTimestamp:null,previouslyFocusedElement:null,contextMenuPosition:null,contextMenuElement:null,contextMenuClickOffset:null}),ZJ=e=>{let[t,n]=PJ(XJ(e)),[r,i]=J({x:LM,y:LM}),[a,o]=J(0),[s,c]=J({state:`idle`}),l=e=>{n(FJ(t=>{e(t),t.frozenElement=t.frozenElements.length>0?t.frozenElements[0]:null,t.frozenDragRect=null}))},u=()=>{l(e=>{e.frozenElements=[]})},d=e=>{c(t=>t.state===`active`?{...t,phase:e}:t)},f={startHold:e=>{e!==void 0&&n(`keyHoldDuration`,e),c({state:`holding`,startedAt:Date.now()})},releaseHold:()=>{s().state===`holding`&&c({state:`idle`})},activate:()=>{gR(()=>{c({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1}),n(`activationTimestamp`,Date.now()),n(`previouslyFocusedElement`,document.activeElement)})},deactivate:()=>{gR(()=>{c({state:`idle`}),n(FJ(e=>{e.wasActivatedByToggle=!1,e.pendingCommentMode=!1,e.inputText=``,e.frozenElement=null,e.frozenElements=[],e.frozenDragRect=null,e.activationTimestamp=null,e.previouslyFocusedElement=null,e.contextMenuPosition=null,e.contextMenuElement=null,e.contextMenuClickOffset=null,e.isTouchMode&&(e.detectedElement=null)}))})},toggle:()=>{t.activationTimestamp===null?(n(`wasActivatedByToggle`,!0),f.activate()):f.deactivate()},freeze:()=>{if(s().state===`active`){let e=t.frozenElement??t.detectedElement;e&&n(`frozenElement`,e),d(`frozen`)}},unfreeze:()=>{s().state===`active`&&gR(()=>{n(FJ(e=>{e.frozenElement=null,e.frozenElements=[],e.frozenDragRect=null})),d(`hovering`)})},startDrag:(e,t)=>{s().state===`active`&&gR(()=>{t||u(),n(`dragStart`,{x:e.x+window.scrollX,y:e.y+window.scrollY}),d(`dragging-select`)})},startDragReposition:()=>{let e=s();e.state===`active`&&e.phase===`dragging-select`&&d(`dragging-reposition`)},stopDragReposition:()=>{let e=s();e.state===`active`&&e.phase===`dragging-reposition`&&d(`dragging-select`)},shiftDragStart:e=>{let t=s();t.state===`active`&&t.phase===`dragging-reposition`&&n(`dragStart`,t=>({x:t.x+e.x,y:t.y+e.y}))},endDrag:()=>{let e=s();e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)&&gR(()=>{n(`dragStart`,{x:-1e3,y:-1e3}),d(`justDragged`)})},cancelDrag:()=>{let e=s();e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)&&gR(()=>{n(`dragStart`,{x:-1e3,y:-1e3}),d(`hovering`)})},finishJustDragged:()=>{let e=s();e.state===`active`&&e.phase===`justDragged`&&d(`hovering`)},startCopy:()=>{let e=s().state===`active`;c({state:`copying`,startedAt:Date.now(),wasActive:e})},completeCopy:()=>{let e=s(),t=e.state===`copying`&&e.wasActive;c({state:`justCopied`,copiedAt:Date.now(),wasActive:t})},finishJustCopied:()=>{let e=s();e.state===`justCopied`&&(e.wasActive&&!t.wasActivatedByToggle?gR(()=>{u(),c({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1})}):f.deactivate())},enterPromptMode:(e,t)=>{let{x:r}=YJ(JJ(t));gR(()=>{n(`copyStart`,e),n(`copyOffsetFromCenterX`,e.x-r),i(e),n(`frozenElement`,t),n(`wasActivatedByToggle`,!0),s().state===`active`?c(e=>e.state===`active`?{...e,isPromptMode:!0,phase:`frozen`}:e):(c({state:`active`,phase:`frozen`,isPromptMode:!0,isPendingDismiss:!1}),n(`activationTimestamp`,Date.now()),n(`previouslyFocusedElement`,document.activeElement))})},exitPromptMode:()=>{c(e=>e.state===`active`?{...e,isPromptMode:!1,isPendingDismiss:!1}:e)},setInputText:e=>{n(`inputText`,e)},clearInputText:()=>{n(`inputText`,``)},setPendingDismiss:e=>{c(t=>t.state===`active`?{...t,isPendingDismiss:e}:t)},setPointer:e=>{i(t=>t.x===e.x&&t.y===e.y?t:e)},setDetectedElement:e=>{n(`detectedElement`,e)},setFrozenElement:e=>{l(t=>{t.frozenElements=[e]})},setFrozenElements:e=>{l(t=>{t.frozenElements=e})},toggleFrozenElement:e=>{l(t=>{let n=t.frozenElements.indexOf(e);n>=0?t.frozenElements.splice(n,1):t.frozenElements.push(e)})},addFrozenElements:e=>{l(t=>{for(let n of e)t.frozenElements.includes(n)||t.frozenElements.push(n)})},setFrozenDragRect:e=>{n(`frozenDragRect`,e)},setCopyStart:(e,t)=>{let{x:r}=YJ(JJ(t));n(`copyStart`,e),n(`copyOffsetFromCenterX`,e.x-r)},setLastGrabbed:e=>{n(`lastGrabbedElement`,e)},setWasActivatedByToggle:e=>{n(`wasActivatedByToggle`,e)},setPendingCommentMode:e=>{n(`pendingCommentMode`,e)},setTouchMode:e=>{n(`isTouchMode`,e)},incrementSelectionInteractionLockDepth:()=>{n(`selectionInteractionLockDepth`,e=>e+1)},decrementSelectionInteractionLockDepth:()=>{n(`selectionInteractionLockDepth`,e=>Math.max(0,e-1))},setSelectionSource:(e,t)=>{gR(()=>{n(`selectionFilePath`,e),n(`selectionLineNumber`,t)})},incrementViewportVersion:()=>{o(e=>e+1)},addGrabbedBox:e=>{n(`grabbedBoxes`,t=>[...t,e])},removeGrabbedBox:e=>{n(`grabbedBoxes`,t=>t.filter(t=>t.id!==e))},clearGrabbedBoxes:()=>{n(`grabbedBoxes`,[])},addLabelInstance:e=>{n(`labelInstances`,t=>[...t,e])},updateLabelInstance:(e,r,i)=>{let a=t.labelInstances.findIndex(t=>t.id===e);a!==-1&&gR(()=>{n(`labelInstances`,a,`status`,r),i!==void 0&&n(`labelInstances`,a,`errorMessage`,i)})},removeLabelInstance:e=>{n(`labelInstances`,t=>t.filter(t=>t.id!==e))},clearLabelInstances:()=>{n(`labelInstances`,[])},showContextMenu:(e,t)=>{let{x:r,y:i}=YJ(JJ(t));gR(()=>{n(`contextMenuPosition`,e),n(`contextMenuElement`,t),n(`contextMenuClickOffset`,{x:e.x-r,y:e.y-i})})},hideContextMenu:()=>{gR(()=>{n(`contextMenuPosition`,null),n(`contextMenuElement`,null),n(`contextMenuClickOffset`,null)})},updateContextMenuPosition:()=>{let e=t.contextMenuElement,r=t.contextMenuClickOffset;if(!e||!r||!tB(e))return;let{x:i,y:a}=YJ(JJ(e));n(`contextMenuPosition`,{x:i+r.x,y:a+r.y})}};return{store:t,actions:f,pointer:r,viewportVersion:a,current:s}},QJ=e=>{if(!document.body)return;let t=document.querySelectorAll(`[${PM}]`);for(let n of t)n!==e&&n.parentNode!==e&&(n.shadowRoot||n.remove());document.body.appendChild(e)},$J=e=>{if(document.body){QJ(e);return}let t=()=>{document.removeEventListener(`DOMContentLoaded`,t),QJ(e)};document.addEventListener(`DOMContentLoaded`,t,{once:!0})},eY=e=>{let t=document.querySelectorAll(`[${PM}]`);for(let e of t){let t=e.shadowRoot?.querySelector(`[${PM}]`);if(t instanceof HTMLDivElement)return{root:t,host:e};e.remove()}let n=document.createElement(`div`);n.setAttribute(PM,`true`),IN(n),n.style.zIndex=String(WM),n.style.position=`fixed`,n.style.inset=`0`,n.style.pointerEvents=`none`,n.style.contain=`strict`;let r=n.attachShadow({mode:`open`}),i=document.createElement(`style`),a=PN();a&&(i.nonce=a),i.textContent=`@import url("https://fonts.googleapis.com/css2?family=Geist:wght@500&display=swap");\n${e??``}`,r.appendChild(i);let o=document.createElement(`div`);return o.setAttribute(PM,`true`),r.appendChild(o),$J(n),setTimeout(()=>{QJ(n)},gN),{root:o,host:n}},tY=e=>{let[t,n]=J(void 0),r=0;return pR(vR(e,e=>{let t=++r;if(!e){n(void 0);return}let i=FU(e)??void 0;n(i),DU(e).then(e=>{r===t&&n(e??i)}).catch(()=>{r===t&&n(i)})})),[t,n]},nY=[`data-theme`,`data-mode`,`data-color-scheme`,`data-bs-theme`,`data-mui-color-scheme`,`data-mantine-color-scheme`],rY=[{attribute:`data-dark`,theme:`dark`},{attribute:`data-light`,theme:`light`}],iY=(e,t,n)=>{let[r,i,a]=[e,t,n].map(e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return .2126*r+.7152*i+.0722*a},aY=(e,t=0)=>{let n=TB(e),r=n?uB(n):null;return!r||r.alpha<=t?null:iY(r.red,r.green,r.blue)},oY=e=>{let t=aY(e);return t===null?null:t<.18?`dark`:`light`},sY=e=>oY(getComputedStyle(e).backgroundColor),cY=()=>{let e=aY(getComputedStyle(document.documentElement).color,cN);return e===null?null:e>.6?`dark`:null},lY=()=>{let e=document.createElement(`div`);e.style.cssText=`position:fixed;width:0;height:0;background-color:Canvas!important`,document.documentElement.appendChild(e);let t=oY(getComputedStyle(e).backgroundColor);return e.remove(),t},uY=e=>{let t=e.toLowerCase();return t===`dark`?`dark`:t===`light`?`light`:null},dY=e=>{let t=e.style.colorScheme||getComputedStyle(e).colorScheme;return t?t.trim().toLowerCase().split(/\s+/):[]},fY=e=>{let t=dY(e),n=t.includes(`dark`);return n===t.includes(`light`)?null:n?`dark`:`light`},pY=e=>{if(e.classList.contains(`dark`))return`dark`;if(e.classList.contains(`light`))return`light`;for(let t of nY){let n=e.getAttribute(t);if(!n)continue;let r=uY(n);if(r)return r}for(let{attribute:t,theme:n}of rY)if(e.hasAttribute(t))return n;return null},mY=(e,t)=>{for(let n of e){if(!n)continue;let e=t(n);if(e)return e}return null},hY=()=>{let e=[document.documentElement,document.body],t=[document.body,document.documentElement];return mY(e,pY)??mY(e,fY)??mY(t,sY)??cY()??lY()??`light`},gY=e=>e===`dark`?`light`:`dark`,_Y=()=>{let e=[];for(let t of[document.documentElement,document.body]){if(!t)continue;e.push(t.className);for(let n of nY)e.push(t.getAttribute(n)??``);for(let{attribute:n}of rY)e.push(t.hasAttribute(n)?`1`:``);let n=t.style;e.push(n.colorScheme,n.backgroundColor,n.color);for(let t=0;t<n.length;t++){let r=n[t];r.startsWith(`--`)&&e.push(`${r}:${n.getPropertyValue(r)}`)}}return e.join(`|`)},vY={attributes:!0,attributeFilter:[`class`,`style`,...nY,...rY.map(({attribute:e})=>e)]},yY=(e,t)=>{let n=null,r=null,i=null,a=()=>{let i=_Y();if(i===r&&n!==null)return getComputedStyle(document.body??document.documentElement).backgroundColor,n;r=i;let a=gY(hY());return a!==n&&(n=a,e.setAttribute(`data-rg-theme`,a),t?.(a)),a},o=()=>{i===null&&(i=XF(()=>{i=null,a()}))},s=a(),c=new MutationObserver(o);c.observe(document.documentElement,vY);let l=null;document.body?c.observe(document.body,vY):(l=new MutationObserver(()=>{document.body&&(l.disconnect(),l=null,c.observe(document.body,vY),a())}),l.observe(document.documentElement,{childList:!0}));let u=()=>{r=null,o()},d=window.matchMedia(`(prefers-color-scheme: dark)`);return d.addEventListener(`change`,u),{theme:s,cleanup:()=>{l?.disconnect(),c.disconnect(),d.removeEventListener(`change`,u),i!==null&&ZF(i)}}},bY=()=>{},xY=()=>({activate:bY,deactivate:bY,toggle:bY,comment:bY,isActive:()=>!1,isEnabled:()=>!1,setEnabled:bY,getToolbarState:()=>null,setToolbarState:bY,onToolbarStateChange:()=>bY,reset:bY,dispose:bY,copyElement:()=>Promise.resolve(!1),getSource:()=>Promise.resolve(null),getStackContext:()=>Promise.resolve(``),getState:()=>({isActive:!1,isDragging:!1,isCopying:!1,isPromptMode:!1,isSelectionBoxVisible:!1,isDragBoxVisible:!1,targetElement:null,dragBounds:null,grabbedBoxes:[],labelInstances:[],selectionFilePath:null,toolbarState:null}),setOptions:bY,registerPlugin:bY,unregisterPlugin:bY,getPlugins:()=>[],getDisplayName:()=>null}),SY=()=>{let e=new AbortController;return{signal:e.signal,abort:()=>e.abort(),addWindowListener:(t,n,r={})=>{window.addEventListener(t,n,{...r,signal:e.signal})},addDocumentListener:(t,n,r={})=>{document.addEventListener(t,n,{...r,signal:e.signal})}}},CY=(e,t=`Unknown error`)=>e instanceof Error&&e.message?e.message:t,wY=e=>e instanceof Error?e:Error(String(e)),TY=e=>({functionName:e.functionName,fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,isServer:e.isServer,isSymbolicated:e.isSymbolicated}),EY=async(e,t)=>{let n={maxLines:t},[r,i,a,o]=await Promise.all([JU(e,n),KU(e,n),PU(e),EU(e)]);return{tagName:MN(e),componentName:a?.componentName??void 0,content:`[${r}]`,source:a,stackContext:i,frames:(o??[]).map(TY)}},DY=async(e,t)=>{let n=await Promise.all(e.map(e=>EY(e,t))),r=new Map;for(let e of n)r.has(e.content)||r.set(e.content,e);let i=[...r.values()];return i.length>0?{content:i.map(e=>e.content).join(`
|
|
259
|
-
`),entries:i}:null},OY=(e,t,n)=>{if(e?.entries)return t===e.content?e.entries:e.entries.length===1?[{...e.entries[0],content:t,commentText:n}]:e.entries.map(e=>({...e,commentText:n}))},kY=async(e,t,n,r)=>{await t.onBeforeCopy(n);let i=!1,a=``;try{let o=e.getContent?{content:await e.getContent(n)}:await DY(n,e.maxContextLines),s=o?.content;if(s?.trim()){let c=await t.transformCopyContent(s,n);a=r?`${r}\n${c}`:c,i=ZU(a,{componentName:e.componentName,entries:OY(o,a,r)})}}catch(e){t.onCopyError(wY(e))}return i&&t.onCopySuccess(n,a),t.onAfterCopy(n,i),i},AY=(e,t)=>{let n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),i=Math.min(e.right,t.right),a=Math.min(e.bottom,t.bottom);return Math.max(0,i-n)*Math.max(0,a-r)},jY=(e,t)=>e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top,MY=e=>e.sort((e,t)=>{if(e===t)return 0;let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0}),NY=e=>{if(e.width<=0||e.height<=0)return[];let t=window.innerWidth,n=window.innerHeight,r=e.x,i=e.y,a=e.x+e.width,o=e.y+e.height,s=r+e.width/2,c=i+e.height/2,l=EB(Math.ceil(e.width/32),3,20),u=EB(Math.ceil(e.height/32),3,20),d=l*u,f=d>100?Math.sqrt(100/d):1,p=EB(Math.floor(l*f),3,20),m=EB(Math.floor(u*f),3,20),h=new Set,g=[],_=(e,r)=>{let i=EB(Math.round(e),0,t-1),a=EB(Math.round(r),0,n-1),o=`${i}:${a}`;h.has(o)||(h.add(o),g.push({x:i,y:a}))};_(r+1,i+1),_(a-1,i+1),_(r+1,o-1),_(a-1,o-1),_(s,i+1),_(s,o-1),_(r+1,c),_(a-1,c),_(s,c);for(let t=0;t<p;t+=1){let n=r+(t+.5)/p*e.width;for(let t=0;t<m;t+=1)_(n,i+(t+.5)/m*e.height)}return g},PY=(e,t,n)=>{let r={left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height},i=new Set,a=NY(e);_I();try{for(let e of a){let t=document.elementsFromPoint(e.x,e.y);for(let e of t)i.add(e)}}finally{vI()}let o=[];for(let e of i)!n&&eI(e)||MM(e)&&t(e)&&o.push(e);let s=new Map;for(let e of o)s.set(e,e.getBoundingClientRect());let c=[];for(let e of o){let t=s.get(e);if(t.width<=0||t.height<=0)continue;let i={left:t.left,top:t.top,right:t.left+t.width,bottom:t.top+t.height};if(n){let n=AY(r,i),a=t.width*t.height;a>0&&n/a>=.75&&c.push(e)}else jY(i,r)&&c.push(e)}return MY(c)},FY=e=>{let t=new Set(e);return e.filter(e=>{for(let n=e.parentElement;n;n=n.parentElement)if(t.has(n))return!1;return!0})},IY=(e,t,n=!0)=>FY(PY(e,t,n)),LY=(e,t)=>e.width<=0?0:EB((t.x-e.x)/e.width,0,1),RY=()=>{KJ(),OI(),lI()},zY=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.pageX-window.scrollX,y:e.pageY-window.scrollY}),BY=e=>({pageX:e.x+window.scrollX,pageY:e.y+window.scrollY,width:e.width,height:e.height}),VY=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.x,y:e.y}),HY=(e,t,n)=>{let r=(e,t,n,r)=>{let i=[],a=e,o=0;for(;a&&i.length<n&&o<100;)r(a)&&i.push(a),a=t(a),o+=1;return i},i=r(e.parentElement,e=>e.parentElement,6,t);i.reverse();let a=i.map((e,t)=>({element:e,depth:t,isLast:!0})),o=i.length,s=r(e.previousElementSibling,e=>e.previousElementSibling,7,n),c=r(e.nextElementSibling,e=>e.nextElementSibling,7,n),l=Math.min(s.length,Math.max(3,7-c.length)),u=Math.min(c.length,7-l),d=[...s.slice(0,l).reverse(),e,...c.slice(0,u)],f=r(e.firstElementChild,e=>e.nextElementSibling,6,t),p=d.length-1,m=f.length-1;return d.forEach((t,n)=>{a.push({element:t,depth:o,isLast:n===p}),t===e&&f.forEach((e,t)=>{a.push({element:e,depth:o+1,isLast:t===m})})}),a},UY=e=>e instanceof SVGElement&&!(e instanceof SVGSVGElement),WY=e=>{let t=e.getBoundingClientRect();return t.width>=16||t.height>=16},GY=(e,t)=>t(e)&&!UY(e)&&WY(e),KY=new Set([`c`,`C`,`с`,`С`,`ȼ`,`Ȼ`,`ↄ`,`Ↄ`,`ᴄ`,`ᶜ`,`ⱼ`,`ⅽ`,`Ⅽ`,`ç`,`Ç`,`ć`,`Ć`,`č`,`Č`,`ĉ`,`Ĉ`,`ċ`,`Ċ`]),qY=(e,t)=>t===`KeyC`?!0:!e||e.length!==1?!1:KY.has(e),JY=(e,t)=>{if(!e||!t)return!1;let n=e.toLowerCase();return t===`Space`?n===`space`||n===` `:t.startsWith(`Key`)?t.slice(3).toLowerCase()===n:t.startsWith(`Digit`)?t.slice(5)===n:!1},YY={meta:`metaKey`,cmd:`metaKey`,command:`metaKey`,win:`metaKey`,windows:`metaKey`,ctrl:`ctrlKey`,control:`ctrlKey`,shift:`shiftKey`,alt:`altKey`,option:`altKey`,opt:`altKey`},XY=e=>{let t=e.split(`+`).map(e=>e.trim().toLowerCase()),n={metaKey:!1,ctrlKey:!1,shiftKey:!1,altKey:!1,key:null};for(let e of t){let t=YY[e];t?n[t]=!0:n.key=e}return n},ZY=e=>{if(typeof e==`function`)return e;let t=XY(e),n=t.key;return e=>{if(n===null){let n=!t.metaKey||e.metaKey||e.key===`Meta`,r=!t.ctrlKey||e.ctrlKey||e.key===`Control`,i=!t.shiftKey||e.shiftKey||e.key===`Shift`,a=!t.altKey||e.altKey||e.key===`Alt`,o=n&&r&&i&&a,s=[t.metaKey,t.ctrlKey,t.shiftKey,t.altKey].filter(Boolean).length,c=[e.metaKey||e.key===`Meta`,e.ctrlKey||e.key===`Control`,e.shiftKey||e.key===`Shift`,e.altKey||e.key===`Alt`].filter(Boolean).length;return o&&c>=s}let r=e.key?.toLowerCase()===n||JY(n,e.code),i=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey?(!t.metaKey||e.metaKey)&&(!t.ctrlKey||e.ctrlKey)&&(!t.shiftKey||e.shiftKey)&&(!t.altKey||e.altKey):!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey;return r&&i}},QY=e=>!e||typeof e==`function`?{metaKey:kB(),ctrlKey:!kB(),shiftKey:!1,altKey:!1,key:null}:XY(e),$Y=(e,t)=>{if(t.activationKey)return ZY(t.activationKey)(e);let n=(kB()?e.metaKey:e.ctrlKey)&&!e.shiftKey&&!e.altKey;return!!(e.key&&n&&qY(e.key,e.code))},eX=e=>{if(e.length===0)return{x:0,y:0,width:0,height:0};if(e.length===1)return e[0];let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),i=Math.max(i,a.y+a.height);return{x:t,y:n,width:r-t,height:i-n}},tX=e=>{let t=getComputedStyle(e),n={};for(let e of jB)n[e]=t.getPropertyValue(e);return n},nX=e=>{let t={};for(let n of ZB)t[n]=e.getPropertyValue(n);return t},rX=e=>{try{let t=e.parentElement;if(!t)return null;let n=e.namespaceURI,r=e.tagName.toLowerCase(),i=n&&n!==`http://www.w3.org/1999/xhtml`?e.ownerDocument.createElementNS(n,r):e.ownerDocument.createElement(r),a=`style`in i?i.style:null;a instanceof CSSStyleDeclaration&&a.setProperty(`display`,`none`,`important`),t.appendChild(i);try{return nX(getComputedStyle(i))}finally{i.remove()}}catch{return null}},iX=new Set([`display`,`width`,`height`]),aX=(e,t,n)=>e.kind===`color`?!1:e.cssProperties.some(e=>iX.has(e))?oX(e):e.cssProperties.every(e=>{let r=t[e],i=n[e];return r===void 0||i===void 0?!1:r===i}),oX=e=>{if(e.kind===`color`)return!1;if(e.kind===`enum`)return e.key===`font-weight`?e.original===`400`:e.options[0]?.value===e.original;let{key:t,original:n}=e;return t.startsWith(`padding`)||t.startsWith(`margin`)||t.includes(`gap`)||t===`border-width`||t.endsWith(`-radius`)||t===`border-radius`?n===0:t===`opacity`?n===100:t===`letter-spacing`||t===`z-index`?n===0:!UB.has(t)&&!!(t===`width`||t===`height`||t===`width,height`||t.startsWith(`max-`)||t.startsWith(`min-`)||t===`line-height`)},sX=e=>{let t=e.trim();if(!t||t===`auto`||t===`normal`||t===`none`)return null;let n=Number.parseFloat(t);return Number.isFinite(n)?t.endsWith(`%`)?{value:n,unit:`%`}:t.endsWith(`rem`)||t.endsWith(`em`)?{value:n*16,unit:`px`}:t.endsWith(`px`)?{value:n,unit:`px`}:{value:n,unit:``}:null},cX=(e,t)=>{let n=sX(e[t]);if(n)return n;if(t===`line-height`){let t=sX(e[`font-size`]);return t?{value:tV(t.value*AN),unit:t.unit||`px`}:null}return IB.has(t)?{value:0,unit:`px`}:null},lX=(e,t)=>{let n=cX(e,t[0]);if(!n)return null;for(let r=1;r<t.length;r++){let i=cX(e,t[r]);if(!i||i.unit!==n.unit||Math.abs(i.value-n.value)>=.5)return null}return n},uX=(e,t)=>e===`opacity`?{value:Math.round(t.value*100),unit:`%`}:LB.has(e)?{value:tV(t.value),unit:``}:{value:tV(t.value),unit:t.unit||`px`},dX=e=>e!==null,fX=(e,t)=>{let n=t.map(t=>{let n=t.longhands.length===1?cX(e,t.longhands[0]):lX(e,t.longhands);return n?{definition:t,value:n}:null}).filter(dX),r=new Map;for(let e of n)for(let t of e.definition.longhands){let n=r.get(t);(!n||e.definition.longhands.length>n.definition.longhands.length)&&r.set(t,e)}let i=new Set(r.values());return n.map(e=>({...e,isCanonical:i.has(e)}))},pX=(e,t,n)=>e===`opacity`?{min:0,max:100}:e===`z-index`?{min:PB,max:FB}:e===`letter-spacing`?{min:-10,max:20}:e===`font-size`?{min:8,max:96}:e===`line-height`?{min:0,max:120}:e.includes(`radius`)?{min:0,max:96}:e===`width`||e===`height`||e===`width,height`||e.startsWith(`min-`)||e.startsWith(`max-`)?{min:0,max:Math.max(512,Math.ceil(t*2))}:UB.has(e)?{min:NB,max:512}:n===`%`?{min:0,max:100}:{min:e.startsWith(`margin`)?MB:0,max:384},mX=(e,t,n)=>{let r=uX(e.key,t),i=r.unit===`px`&&Math.abs(r.value)>1e7,a=pX(e.key,i?0:r.value,r.unit),o=r.value<0?a.min:a.max,s=i?o:r.value;return{kind:`numeric`,key:e.key,label:e.label,cssProperties:e.longhands,min:a.min,max:a.max,value:s,original:s,unit:r.unit,tailwindAliases:kV(e.key),isPrioritized:!1,isDefault:!1,isCanonical:n}},hX=(e,t,n,r=!1)=>{let i=TB(n),a=i?uB(i):null,o=a!==null&&a.alpha!==0;if(!o&&!r)return null;let s=o&&i?i:bN;return{kind:`color`,key:e,label:t,cssProperties:[e],value:s,original:s,tailwindAliases:kV(e),isPrioritized:r,isDefault:!1,isCanonical:!0}},gX=(e,t,n)=>{let r=t.trim(),i=n??e.options;return!i||!i.some(e=>e.value===r)?null:{kind:`enum`,key:e.key,label:e.label,cssProperties:[e.key],value:r,original:r,options:i,tailwindAliases:kV(e.key),isPrioritized:!1,isDefault:!1,isCanonical:!0}},_X=new Map(`background-color.color.padding.padding-left,padding-right.padding-top,padding-bottom.padding-top.padding-right.padding-bottom.padding-left.margin.margin-left,margin-right.margin-top,margin-bottom.margin-top.margin-right.margin-bottom.margin-left.font-family.font-size.font-weight.font-style.line-height.letter-spacing.text-transform.text-align.text-decoration-line.white-space.word-break.overflow-wrap.font-variant-numeric.border-radius.border-top-left-radius,border-top-right-radius.border-bottom-left-radius,border-bottom-right-radius.border-top-left-radius,border-bottom-left-radius.border-top-right-radius,border-bottom-right-radius.border-top-left-radius.border-top-right-radius.border-bottom-left-radius.border-bottom-right-radius.width,height.width.height.max-width.max-height.min-width.min-height.opacity.gap.row-gap.column-gap.border-width.border-top-width.border-right-width.border-bottom-width.border-left-width.border-color.align-items.justify-content.top,right,bottom,left.left,right.top,bottom.top.right.bottom.left.z-index`.split(`.`).map((e,t)=>[e,t])),vX=e=>_X.get(e.key)??1/0,yX=e=>e.map((e,t)=>({property:e,index:t})).sort((e,t)=>{let n=vX(e.property)-vX(t.property);return n===0?e.index-t.index:n}).map(e=>e.property),bX=e=>{let t=tX(e),n=getComputedStyle(e),r=nX(n),i=rX(e),a=[],o=new Set,s=e=>{o.has(e.key)||(a.push(e),o.add(e.key))};for(let e of WB)for(let n of fX(t,e))s(mX(n.definition,n.value,n.isCanonical));for(let e of GB){let n=cX(t,e.key);n&&s(mX({key:e.key,label:e.label,longhands:[e.key]},n,!0))}for(let{key:e,label:t,alwaysShow:r}of KB){let i=n.getPropertyValue(e);if(!r&&(!i||fB(i)))continue;let a=hX(e,t,i,r);a&&s(a)}let c=n.getPropertyValue(YB.key);if(c){let e=gX(YB,c,JB(c));e&&s(e)}for(let e of XB){let t=n.getPropertyValue(e.key);if(!t)continue;let r=gX(e,t);r&&s(r)}return xX(a,OV(e),r,i)},xX=(e,t,n,r)=>{let i=[],a=[];for(let o of e)if(o.isPrioritized||t.has(o.key))i.push({...o,isPrioritized:!0,isDefault:!1});else{let e=r?aX(o,n,r):oX(o);a.push({...o,isDefault:e})}return[...yX(i),...yX(a)]},SX=[{keyword:`letter`,family:`letter-spacing`},{keyword:`tracking`,family:`letter-spacing`},{keyword:`leading`,family:`line-height`},{keyword:`line-height`,family:`line-height`},{keyword:`lineheight`,family:`line-height`},{keyword:`radius`,family:`radius`},{keyword:`rounded`,family:`radius`},{keyword:`corner`,family:`radius`},{keyword:`font-size`,family:`font-size`},{keyword:`fontsize`,family:`font-size`},{keyword:`text`,family:`font-size`},{keyword:`stroke`,family:`border-width`},{keyword:`border-width`,family:`border-width`},{keyword:`borderwidth`,family:`border-width`},{keyword:`space`,family:`spacing`},{keyword:`gap`,family:`spacing`},{keyword:`gutter`,family:`spacing`},{keyword:`inset`,family:`spacing`},{keyword:`padding`,family:`spacing`},{keyword:`margin`,family:`spacing`},{keyword:`size`,family:`size`},{keyword:`width`,family:`size`},{keyword:`height`,family:`size`}],CX=e=>{let t=e.toLowerCase();for(let{keyword:e,family:n}of SX)if(t.includes(e))return n;return null},wX=e=>e.includes(`radius`)?`radius`:e.endsWith(`-width`)&&e.includes(`border`)?`border-width`:e===`font-size`?`font-size`:e===`line-height`?`line-height`:e===`letter-spacing`?`letter-spacing`:e.startsWith(`padding`)||e.startsWith(`margin`)||e.endsWith(`gap`)||e===`top`||e===`right`||e===`bottom`||e===`left`||e.startsWith(`inset`)?`spacing`:e===`width`||e===`height`||e.startsWith(`min-`)||e.startsWith(`max-`)?`size`:null,TX=e=>{let t=sX(e);return!t||t.unit!==`px`?null:tV(t.value)},EX=(e,t)=>t===null?!0:e.length===t.length?e<t:e.length<t.length,DX=(e,t,n)=>{if(n===1){for(let n of e)if(n>t)return n;return null}for(let n=e.length-1;n>=0;n--)if(e[n]<t)return e[n];return null},OX=(e,t,n)=>{let r=(t===1?Math.floor(e/n)+1:Math.ceil(e/n)-1)*n;return r<0?null:r},kX=null,AX=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),jX=()=>{let e=Array.from(document.adoptedStyleSheets??[]),t=document.styleSheets.length;if(kX&&kX.documentSheetCount===t&&AX(kX.adoptedSheets,e))return kX.names;let n=new Set;for(let t of[...document.styleSheets,...e]){let e;try{e=t.cssRules}catch{continue}MX(e,n)}return kX={documentSheetCount:t,adoptedSheets:e,names:n},n},MX=(e,t)=>{for(let n of Array.from(e))if(n instanceof CSSStyleRule){let e=n.style;for(let n=0;n<e.length;n++){let r=e.item(n);r.startsWith(`--`)&&t.add(r)}}else n instanceof CSSGroupingRule&&MX(n.cssRules,t)},NX={hasTokens:!1,matchColor:()=>null,matchLength:()=>null,stepLength:()=>null},PX=e=>{if(typeof document>`u`)return NX;let t=jX();if(t.size===0)return NX;let n=getComputedStyle(e),r=new Map,i=new Map,a=new Map,o=null;for(let e of t){let t=n.getPropertyValue(e).trim();if(!t)continue;let s=TX(t);if(s!==null){e===`--spacing`&&s>0&&(o=s);let t=CX(e);if(t!==null){let n=i.get(s);n?n.push({name:e,family:t}):i.set(s,[{name:e,family:t}]);let r=a.get(t);r?r.add(s):a.set(t,new Set([s]))}continue}let c=TB(t);if(c){let t=c.toLowerCase();EX(e,r.get(t)??null)&&r.set(t,e)}}if(r.size===0&&i.size===0)return NX;let s=new Map;for(let[e,t]of a)s.set(e,Array.from(t).sort((e,t)=>e-t));return{hasTokens:!0,matchColor:e=>{let t=TB(e)?.toLowerCase();return t?r.get(t)??null:null},matchLength:(e,t)=>{let n=wX(t);if(n===null)return null;let r=i.get(Math.round(e));if(!r)return null;let a=null;for(let e of r)e.family===n&&EX(e.name,a)&&(a=e.name);return a},stepLength:(e,t,n)=>{let r=wX(n);if(r===null)return null;let i=Math.round(e),a=s.get(r);return a&&a.length>=2?DX(a,i,t):(r===`spacing`||r===`size`)&&o?OX(i,t,o):a?DX(a,i,t):null}}},FX=e=>e.kind===`color`||e.kind===`enum`?e.value:e.key===`opacity`&&e.unit===`%`?eV(e.value/100):`${eV(e.value)}${e.unit}`,IX=(e,t,n)=>{if(!n?.hasTokens)return null;let{edit:r}=t;return r.kind===`color`?n.matchColor(r.value):r.kind===`numeric`&&r.unit===`px`?n.matchLength(r.value,e):null},LX=e=>{let t=new Map;for(let n of e.edits){let e=FX(n);for(let r of n.cssProperties)t.set(r,{edit:n,cssValue:e})}let n=!1;return{lines:Array.from(t,([t,r])=>{let i=IX(t,r,e.designTokens);i&&(n=!0);let a=i?` /* var(${i}) */`:``;return`${t}: ${r.cssValue};${a}`}),usesToken:n}},RX=e=>e.filePath?`${e.filePath}:${e.lineNumber}`:``,zX=e=>["```css",...e,"```"].join(`
|
|
260
|
-
`),
|
|
261
|
-
`)}for(let e of t)n.push(e.header?`\n${e.header}`:``),n.push(
|
|
262
|
-
`)},VX=e=>`style`in e&&e.style instanceof CSSStyleDeclaration,HX=e=>{let t=new Map,n=VX(e)?e:null;return{apply:(e,r)=>{if(n)for(let i of e)t.has(i)||t.set(i,{value:n.style.getPropertyValue(i),priority:n.style.getPropertyPriority(i)}),n.style.setProperty(i,r)},restore:()=>{if(!n){t.clear();return}for(let[e,{value:r,priority:i}]of t)r?n.style.setProperty(e,r,i):n.style.removeProperty(e);t.clear()},hasAppliedStyles:()=>t.size>0}},UX=(e,t)=>{for(let n of t){let t=e.edits.findIndex(e=>e.key===n.key);t>=0?e.edits[t]=n:e.edits.push(n)}},WX=(e,t)=>({element:e.element,preview:e.preview,filePath:e.filePath??``,lineNumber:e.lineNumber??0,edits:t,designTokens:e.designTokens}),GX=e=>{let[t,n]=J(null),[r,i]=J(!1),a=[],o=[],s=e=>{o=e},c=()=>{let r=t()!==null;n(null),i(!1),a=[],o=[],r&&e.onClose?.()},l=()=>{t()?.preview.restore();for(let e=a.length-1;e>=0;e--)a[e].preview.restore();c()},u=e=>{DU(e).then(t=>{t&&n(n=>!n||n.element!==e||n.componentName?n:{...n,componentName:t})})},d=(r,i,a={})=>{if(t()!==null)return!1;let o=bX(r);if(o.length===0)return!1;let s=a.filePath??e.store.selectionFilePath??void 0,c=a.lineNumber??e.store.selectionLineNumber??void 0;return n({element:r,position:i,selectionBounds:JJ(r),properties:o,preview:HX(r),filePath:s,lineNumber:c,componentName:a.componentName,tagName:a.tagName??MN(r),initialSearchQuery:a.initialSearchQuery,designTokens:PX(r)}),u(r),e.isActivated()||e.activateRenderer(),e.actions.setPointer(i),e.actions.setFrozenElement(r),e.actions.freeze(),e.onOpen?.(),!0},f=(r,i)=>{let s=t();if(!s||s.element===r)return!1;let c=bX(r);return c.length===0?!1:((o.length>0||s.preview.hasAppliedStyles())&&a.push(WX(s,o)),o=[],n({element:r,position:i,selectionBounds:JJ(r),properties:c,preview:HX(r),tagName:MN(r),hasSessionEdits:a.some(e=>e.edits.length>0),designTokens:PX(r)}),PU(r).then(e=>{if(e){for(let t of a)t.element===r&&!t.filePath&&(t.filePath=e.filePath,t.lineNumber=e.lineNumber??0);n(t=>!t||t.element!==r||t.filePath?t:{...t,filePath:e.filePath,lineNumber:e.lineNumber??void 0})}}).catch(()=>void 0),u(r),e.actions.setPointer(i),e.actions.setFrozenElement(r),!0)},p=(e,t)=>[...a,WX(e,t)],m=e=>{let t=new Map;for(let n of e){if(n.edits.length===0)continue;let e=t.get(n.element);if(e){!e.filePath&&n.filePath&&(e.filePath=n.filePath,e.lineNumber=n.lineNumber),UX(e,n.edits);continue}t.set(n.element,{filePath:n.filePath,lineNumber:n.lineNumber,edits:[...n.edits],designTokens:n.designTokens})}return Array.from(t.values())},h=e=>{let t=new Set;for(let n of e)n.edits.length>0&&t.add(n.element);for(let n=e.length-1;n>=0;n--){let r=e[n];r.edits.length===0&&!t.has(r.element)&&r.preview.restore()}};return{state:t,trigger:d,switchToElement:f,setPendingEdits:s,dismiss:()=>{t()!==null&&(l(),e.store.wasActivatedByToggle?e.deactivateRenderer():e.actions.unfreeze())},closePreservingRenderer:()=>{t()!==null&&(l(),e.actions.unfreeze())},submit:n=>{let r=t();if(!r)return;let i=r.element,a=p(r,n),o=BX(m(a));h(a),c(),e.store.wasActivatedByToggle||e.actions.unfreeze(),e.performCopyWithLabel({element:i,cursorX:r.position.x,extraPrompt:o||void 0,shouldDeactivateAfter:e.store.wasActivatedByToggle})},resetWithDiscard:l,isOpen:()=>t()!==null,isInteracting:r,setInteracting:i}},KX={enabled:!0,hue:0,selectionBox:{enabled:!0},dragBox:{enabled:!0},grabbedBoxes:{enabled:!0},elementLabel:{enabled:!0},toolbar:{enabled:!0}},qX=(e,t)=>({enabled:t.enabled??e.enabled,hue:t.hue??e.hue,selectionBox:{enabled:t.selectionBox?.enabled??e.selectionBox.enabled},dragBox:{enabled:t.dragBox?.enabled??e.dragBox.enabled},grabbedBoxes:{enabled:t.grabbedBoxes?.enabled??e.grabbedBoxes.enabled},elementLabel:{enabled:t.elementLabel?.enabled??e.elementLabel.enabled},toolbar:{enabled:t.toolbar?.enabled??e.toolbar.enabled}}),JX={activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,activationKey:void 0,getContent:void 0,maxContextLines:3,freezeReactUpdates:!0},YX=(e={})=>{let t=new Map,n={},[r,i]=PJ({theme:KX,options:{...JX,...e},actions:[]}),a=()=>{let r=KX,a={...JX,...e},o=[];for(let{config:e}of t.values())if(e.theme&&(r=qX(r,e.theme)),e.options&&(a={...a,...e.options}),e.actions)for(let t of e.actions)o.push(t);a={...a,...n},i(`theme`,r),i(`options`,a),i(`actions`,o)},o=(e,t)=>{n[e]=t,i(`options`,e,t)},s=[`activationMode`,`keyHoldDuration`,`allowActivationInsideInput`,`activationKey`,`getContent`,`maxContextLines`,`freezeReactUpdates`],c=e=>{for(let t of s)e[t]!==void 0&&o(t,e[t])},l=(e,n)=>{t.has(e.name)&&u(e.name);let r=e.setup?.(n,_)??{};e.theme&&(r.theme=r.theme?qX(qX(KX,e.theme),r.theme):e.theme),e.actions&&(r.actions=[...e.actions,...r.actions??[]]),e.hooks&&(r.hooks=r.hooks?{...e.hooks,...r.hooks}:e.hooks),e.options&&(r.options=r.options?{...e.options,...r.options}:e.options),t.set(e.name,{plugin:e,config:r}),a()},u=e=>{let n=t.get(e);n&&(n.config.cleanup&&n.config.cleanup(),t.delete(e),a())},d=()=>Array.from(t.keys()),f=(e,...n)=>{for(let{config:r}of t.values()){let t=r.hooks?.[e];t&&t(...n)}},p=(e,...n)=>{let r=!1;for(let{config:i}of t.values()){let t=i.hooks?.[e];t&&t(...n)===!0&&(r=!0)}return r},m=async(e,...n)=>{for(let{config:r}of t.values()){let t=r.hooks?.[e];t&&await t(...n)}},h=async(e,n,...r)=>{let i=n;for(let{config:n}of t.values()){let t=n.hooks?.[e];t&&(i=await t(i,...r))}return i},g=(e,n,...r)=>{let i=n;for(let{config:n}of t.values()){let t=n.hooks?.[e];t&&(i=t(i,...r))}return i},_={onActivate:()=>f(`onActivate`),onDeactivate:()=>f(`onDeactivate`),onElementHover:e=>f(`onElementHover`,e),onElementSelect:e=>{let n=!1,r;for(let{config:i}of t.values()){let t=i.hooks?.onElementSelect;if(t){let i=t(e);i===!0?n=!0:i instanceof Promise&&(n=!0,r=i)}}return{wasIntercepted:n,pendingResult:r}},onDragStart:(e,t)=>f(`onDragStart`,e,t),onDragEnd:(e,t)=>f(`onDragEnd`,e,t),onBeforeCopy:async e=>m(`onBeforeCopy`,e),transformCopyContent:async(e,t)=>h(`transformCopyContent`,e,t),onAfterCopy:(e,t)=>f(`onAfterCopy`,e,t),onCopySuccess:(e,t)=>f(`onCopySuccess`,e,t),onCopyError:e=>f(`onCopyError`,e),onStateChange:e=>f(`onStateChange`,e),onPromptModeChange:(e,t)=>f(`onPromptModeChange`,e,t),onSelectionBox:(e,t,n)=>f(`onSelectionBox`,e,t,n),onDragBox:(e,t)=>f(`onDragBox`,e,t),onGrabbedBox:(e,t)=>f(`onGrabbedBox`,e,t),onElementLabel:(e,t,n)=>f(`onElementLabel`,e,t,n),onContextMenu:(e,t)=>f(`onContextMenu`,e,t),onOpenFile:(e,t)=>p(`onOpenFile`,e,t),transformHtmlContent:async(e,t)=>h(`transformHtmlContent`,e,t),transformAgentContext:async(e,t)=>h(`transformAgentContext`,e,t),transformActionContext:e=>g(`transformActionContext`,e),transformOpenFileUrl:(e,t,n)=>g(`transformOpenFileUrl`,e,t,n)};return{register:l,unregister:u,getPluginNames:d,setOptions:c,store:r,hooks:_}},XX=e=>`${e}-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,ZX=e=>{let t=e.bounds.x+e.bounds.width/2,n=e.bounds.width/2,r=e.mouseX===void 0?void 0:e.mouseX-t;return{id:XX(`label`),bounds:e.bounds,boundsMultiple:e.boundsMultiple,tagName:e.tagName,componentName:e.componentName,status:e.status,createdAt:Date.now(),element:e.element,elements:e.elements,mouseX:e.mouseX,mouseXOffsetFromCenter:r,mouseXOffsetRatio:r!==void 0&&n>0?r/n:void 0,hideArrow:e.hideArrow}},QX=(e,t)=>{let n=new Map,r=e=>{let t=n.get(e);t!==void 0&&(window.clearTimeout(t),n.delete(e))},i=()=>{for(let e of n.values())window.clearTimeout(e);n.clear()},a=()=>{i(),e.clearLabelInstances()},o=t=>{r(t);let i=window.setTimeout(()=>{e.updateLabelInstance(t,`fading`);let r=window.setTimeout(()=>{n.delete(t),e.removeLabelInstance(t)},125);n.set(t,r)},zM);n.set(t,i)};return{createInstance:(t,n,r,i,o)=>{a();let s=ZX({bounds:t,tagName:n,componentName:r,status:i,element:o?.element,mouseX:o?.mouseX,elements:o?.elements,boundsMultiple:o?.boundsMultiple,hideArrow:o?.hideArrow});return e.addLabelInstance(s),s.id},createPerElementInstances:(t,n)=>{a();let r=[];for(let i of t){let t=ZX({bounds:JJ(i.element),tagName:i.tagName,componentName:i.componentName,status:n,element:i.element,mouseX:i.mouseX});e.addLabelInstance(t),r.push(t.id)}return r},updateAfterCopy:(t,n,r)=>{n?e.updateLabelInstance(t,`copied`):e.updateLabelInstance(t,`error`,r||`Unknown error`),o(t)},cancelAllFades:i,clearAll:a,handleHoverChange:(e,n)=>{if(n){r(e);return}let i=t().find(t=>t.id===e);i&&(i.status===`copied`||i.status===`error`||i.status===`fading`)&&o(e)}}},$X=e=>{let t=window.innerWidth,n=window.innerHeight,r=Math.max(0,e.x),i=Math.min(t,e.x+e.width),a=Math.max(0,e.y),o=Math.min(n,e.y+e.height);return{x:(r+i)/2,y:(a+o)/2}},eZ=(e,t,n)=>{let r=[],i=(t,r)=>{let i=$X(n(t)),a=EI(i.x,i.y).filter(e),o=a.indexOf(t);return o===-1?null:a[o+r]??null},a=e=>{let t=i(e,1);return t&&(r.push(e),r.length>50&&(r=r.slice(-50))),t},o=e=>{if(r.length>0){let e=r.pop();if(tB(e))return e}return i(e,-1)},s=(e,n)=>{let i=e=>n?e.nextElementSibling:e.previousElementSibling,a=i(e);for(;a;){if(t(a))return r=[],a;a=i(a)}return null};return{findNext:(e,t)=>{switch(e){case`ArrowUp`:return a(t);case`ArrowDown`:return o(t);case`ArrowRight`:return s(t,!0);case`ArrowLeft`:return s(t,!1);default:return null}},clearHistory:()=>{r=[]}}},tZ=e=>{let{metaKey:t,ctrlKey:n,shiftKey:r,altKey:i}=QY(e.activationKey);return{metaKey:t,ctrlKey:n,shiftKey:r,altKey:i}},nZ=()=>{let e=new WeakSet,t=Object.getOwnPropertyDescriptor(KeyboardEvent.prototype,`key`),n=!1;if(t?.get&&!t.get.__reactGrabPatched){n=!0;let r=t.get,i=function(){return e.has(this)?``:r.call(this)};i.__reactGrabPatched=!0,Object.defineProperty(KeyboardEvent.prototype,"key",{get:i,configurable:!0})}return{claimedEvents:e,originalKeyDescriptor:t,restore:()=>{n&&t&&Object.defineProperty(KeyboardEvent.prototype,"key",t)}}},rZ=(e,t)=>({top:t<25,bottom:t>window.innerHeight-25,left:e<25,right:e>window.innerWidth-25}),iZ=(e,t,n)=>{let r=null,i=()=>{if(!t()){a();return}let o=e(),s=rZ(o.x,o.y),c=0,l=0;if(s.top&&(l-=10),s.bottom&&(l+=10),s.left&&(c-=10),s.right&&(c+=10),c!==0||l!==0){let e=window.scrollX,t=window.scrollY;window.scrollBy(c,l);let r=window.scrollX-e,i=window.scrollY-t;(r!==0||i!==0)&&n?.({x:r,y:i})}r=s.top||s.bottom||s.left||s.right?XF(i):null},a=()=>{r!==null&&(ZF(r),r=null)};return{start:i,stop:a,isActive:()=>r!==null}},aZ=()=>{let e=globalThis;return!!(e.chrome?.runtime?.id||e.browser?.runtime?.id)},oZ=e=>{try{let t=`0.1.48`,n=`data:image/svg+xml;base64,${btoa(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 294 294"><path fill="#ff40e0" d="M145 47c25-20 50-27 67-17 16 9 23 30 20 60 0 2-1 5-1 7l-2 13h-1l-12-4c-8-3-17-5-25-6l-17-3c-10-1-20-1-29-1-10 0-20 0-29 1-6 8-11 16-16 24-5 9-9 17-13 26 4 9 8 18 13 26s10 16 16 24l11 14c5 7 11 13 18 19l10 8s-1 0 0 0l-11 9c-17 14-35 22-49 22-6 0-13-2-18-5-16-9-23-30-20-59 1-3 1-5 1-8-30-12-48-29-48-50 0-18 14-35 41-47 2-1 5-2 7-3 0-2 0-5-1-7-3-30 4-51 20-60 18-10 42-3 68 17M71 201c-1 2-1 4-1 5-2 24 3 41 13 47h1c11 7 30 1 51-15-10-9-18-18-26-29-13-1-26-4-38-8m9-38c-3 9-5 17-7 26 8 2 17 4 25 6-3-5-6-10-9-16-3-5-6-10-9-16m-19-53c-2 1-3 1-5 2-21 10-34 23-34 35 0 13 14 27 39 37 3-12 7-25 12-37-5-12-9-24-12-37m37-10c-8 1-17 3-25 6 2 8 4 16 7 25 3-5 6-11 9-16zm-3-61c-4-1-8 0-12 2-10 7-15 24-13 47 0 2 0 3 1 5 12-4 25-6 38-8 8-10 16-20 26-29-15-11-29-17-40-17m111 2c-4-2-8-3-12-2-11 0-25 5-40 17 10 9 19 19 26 29 13 2 26 4 39 8v-5c3-23-2-40-13-47m-61 23c-7 6-13 13-19 19h37c-6-6-12-13-18-19"/><mask id="a"><path fill="#fff" d="m235 85-133 27 28 133 133-27Z"/></mask><path fill="#ff40e0" d="m137 130 76 11c8 1 9 11 3 15l-28 16-4 32c-1 8-10 10-14 4l-41-66c-3-6 1-13 8-12" mask="url(#a)"/></svg>`)}`;console.log(`%cReact Grab${` v${t}`}%c\nhttps://react-grab.com`,`background: #330039; color: #ffffff; border: 1px solid #d75fcb; padding: 4px 4px 4px 24px; border-radius: 4px; background-image: url("${n}"); background-size: 16px 16px; background-repeat: no-repeat; background-position: 4px center; display: inline-block; margin-bottom: 4px;`,``),e&&navigator.onLine&&!aZ()&&fetch(`https://www.react-grab.com/api/version?source=browser&v=${t}&t=${Date.now()}`,{referrerPolicy:`origin`,keepalive:!0,priority:`low`,cache:`no-store`}).then(e=>e.text()).then(e=>{e&&e!==t&&console.warn(`[React Grab] v${t} is outdated (latest: v${e}). Run \`npx grab@latest upgrade\` to upgrade.`)}).catch(()=>null)}catch{}},sZ=e=>typeof e==`object`&&!!e,cZ=e=>{if(!sZ(e))return null;let t={};return typeof e.enabled==`boolean`&&(t.enabled=e.enabled),(e.activationMode===`toggle`||e.activationMode===`hold`)&&(t.activationMode=e.activationMode),typeof e.keyHoldDuration==`number`&&Number.isFinite(e.keyHoldDuration)&&(t.keyHoldDuration=e.keyHoldDuration),typeof e.allowActivationInsideInput==`boolean`&&(t.allowActivationInsideInput=e.allowActivationInsideInput),typeof e.activationKey==`string`&&(t.activationKey=e.activationKey),typeof e.maxContextLines==`number`&&Number.isFinite(e.maxContextLines)&&(t.maxContextLines=e.maxContextLines),typeof e.freezeReactUpdates==`boolean`&&(t.freezeReactUpdates=e.freezeReactUpdates),typeof e.telemetry==`boolean`&&(t.telemetry=e.telemetry),Object.keys(t).length===0?null:t},lZ=()=>{if(typeof window>`u`)return null;try{let e=(document.currentScript instanceof HTMLScriptElement?document.currentScript:null)?.getAttribute(`data-options`);return e?cZ(JSON.parse(e)):null}catch{return null}},uZ=e=>e===`Enter`||e===`NumpadEnter`,dZ=(e,t)=>e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height,fZ=(e=>({name:e.name,setup:(t,n)=>({actions:[typeof e.contextMenuAction==`function`?e.contextMenuAction(t,n):e.contextMenuAction],cleanup:e.cleanup})}))({name:`copy`,contextMenuAction:{id:`copy`,label:`Copy`,shortcut:`C`,showInToolbarMenu:!0,onAction:e=>{e.copy?.()}}}),pZ={name:`comment`,setup:()=>({actions:[{id:`comment`,label:`Comment`,shortcut:`Enter`,shortcutModifier:!1,showInToolbarMenu:!0,onAction:e=>{e.enterPromptMode?.()}}]})},mZ={name:`edit`,setup:()=>({actions:[{id:`edit`,label:`Style`,shortcut:`S`,shortcutModifier:!1,showInToolbarMenu:!0,onAction:e=>{e.enterEditMode?.()}}]})},hZ={name:`open`,actions:[{id:`open`,label:`Open`,shortcut:`O`,enabled:e=>!!e.filePath,onAction:e=>{e.filePath&&(e.hooks.onOpenFile(e.filePath,e.lineNumber)||AI(e.filePath,e.lineNumber,e.hooks.transformOpenFileUrl),e.hideContextMenu(),e.cleanup())}}]},gZ=e=>{let t=e.left+e.width/2,n=e.top+e.height/2,r=n,i=window.innerHeight-n,a=t,o=window.innerWidth-t,s=Math.min(r,i,a,o);return s===r?`top`:s===a?`left`:s===o?`right`:`bottom`},_Z=()=>{let[e,t]=J(!1),[n,r]=J(null),i=zV(),a=()=>{let e=n();return tB(e)?e:null},o=()=>{r(null),i.clear(),t(!1)};return{selectedElement:a,isPendingDismiss:e,select:(e,n)=>{r(e),t(!1),n?.shouldPromptBeforeMouseHandoff?i.arm():i.clear()},clear:o,consumeMouseHandoff:()=>i.consume()&&a()!==null,showDismissPrompt:()=>a()?e()?!1:(t(!0),!0):(o(),!1),takeSelection:e=>{let t=a()??(tB(e)?e:null);return o(),t}}},vZ=async(e,t={})=>(await Promise.allSettled(e.map(e=>YU(e,t)))).map(e=>e.status===`fulfilled`?e.value:``),yZ=[fZ,mZ,pZ,hZ],bZ=!1,xZ=new Set,SZ=e=>{if(typeof window>`u`)return xY();let t={enabled:!0,activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,...lZ(),...e};if(t.enabled===!1||bZ)return xY();bZ=!0,AM(t.container??null),oZ(t.telemetry!==!1);let{enabled:n,telemetry:r,container:i,...a}=t;return uR(e=>{let t=!1,n,r=YX(a),{store:i,actions:o,pointer:s,viewportVersion:c,current:l}=ZJ({keyHoldDuration:r.store.options.keyHoldDuration??100}),u=Y(()=>l().state===`holding`),d=Y(()=>l().state===`active`),f=Y(()=>{let e=l();return e.state===`active`&&e.phase===`frozen`}),p=Y(()=>{let e=l();return e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)}),m=Y(()=>{if(!p())return!1;let e=Math.abs(s().x+window.scrollX-i.dragStart.x),t=Math.abs(s().y+window.scrollY-i.dragStart.y);return e>2||t>2}),h=Y(()=>{let e=l();return e.state===`active`&&e.phase===`dragging-reposition`}),g=Y(()=>{let e=l();return e.state===`active`&&e.phase===`justDragged`}),_=Y(()=>l().state===`copying`),v=Y(()=>i.selectionInteractionLockDepth>0),y=Y(()=>l().state===`justCopied`),b=Y(()=>{let e=l();return e.state===`active`&&!!e.isPromptMode}),x=Y(()=>i.pendingCommentMode||b()),S=Y(()=>{let e=l();return e.state===`active`&&!!e.isPromptMode&&!!e.isPendingDismiss}),C=(e,t)=>{document.body.style[e]=t};pR(vR(d,(e,t)=>{e&&!t?(kL(s().x,s().y),C(`touchAction`,`none`)):!e&&t&&(AL(),C(`touchAction`,``))}));let w=NV(),[T,E]=J(!w||!w.collapsed),[D,O]=J(0),[k,ee]=J(0),[te,A]=J(w),[ne,re]=J(!1),ie=FV(e=>e.shiftKey),[ae,oe]=J(null),[se,ce]=J(null),[le,ue]=J(null),de=GX({store:i,actions:o,isActivated:d,activateRenderer:()=>Gt(),deactivateRenderer:()=>Kt(),performCopyWithLabel:e=>dt(e),onOpen:()=>{kr(),ge?.(),ge=Or(Dr,ce)},onClose:()=>{ge?.(),ge=null,ce(null)}}),fe=Y(()=>i.contextMenuPosition!==null||de.isOpen()),pe=Y(()=>fe()||ae()!==null),me,he=null,ge=null,_e=!1,ve=new WeakMap,ye=_Z(),be=()=>!T()||b()||v()||fe()||ye.isPendingDismiss(),xe=()=>{ve=new WeakMap},Se=()=>{Le(!1),xe()},Ce=e=>{let t=te()??NV(),n={edge:t?.edge??`bottom`,ratio:t?.ratio??.5,collapsed:t?.collapsed??!1,enabled:t?.enabled??!0,defaultAction:t?.defaultAction??`copy`,...e};PV(n),A(n);for(let e of xZ)e(n)},we=()=>{Fe.timerId!==null&&(clearTimeout(Fe.timerId),Fe.timerId=null)},Te=()=>{Fe.copyWaiting=!1,Fe.holdTimerFired=!1,Fe.startTimestamp=null};pR(()=>{if(l().state!==`holding`){we();return}Fe.startTimestamp=Date.now(),Fe.timerId=window.setTimeout(()=>{if(Fe.timerId=null,Fe.copyWaiting){Fe.holdTimerFired=!0;return}o.activate()},i.keyHoldDuration),bR(we)}),pR(()=>{let e=l();if(e.state!==`active`||e.phase!==`justDragged`)return;let t=setTimeout(()=>{o.finishJustDragged()},zM);bR(()=>clearTimeout(t))}),pR(()=>{if(l().state!==`justCopied`)return;let e=setTimeout(()=>{o.finishJustCopied()},zM);bR(()=>clearTimeout(e))}),pR(vR(u,(e,t=!1)=>{!t||e||!d()||(r.store.options.activationMode!==`hold`&&o.setWasActivatedByToggle(!0),r.hooks.onActivate())}));let Ee=(e,t,n)=>{Oe(e,t,n),o.clearInputText()},De=()=>{let e=i.frozenElement||pt();e&&o.enterPromptMode({x:s().x,y:s().y},e)},Oe=(e,t,n)=>{o.setCopyStart({x:t,y:n},e)},ke={lastDetectionTimestamp:0,pendingDetectionScheduledAt:0,latestPointerX:0,latestPointerY:0},Ae=null,[je,Me]=J(null),Ne=(e,t)=>{Ae!==null&&clearTimeout(Ae),Me(null),Ae=window.setTimeout(()=>{Me({x:e,y:t}),Ae=null},32)},Pe=null,Fe={timerId:null,startTimestamp:null,copyWaiting:!1,holdTimerFired:!1},Ie=null,[j,Le]=J(!1),Re=0,ze=!1,Be=null,Ve=()=>{ze=!0,Be!==null&&window.clearTimeout(Be),Be=window.setTimeout(()=>{ze=!1,Be=null},zM)},He=()=>{Be!==null&&(window.clearTimeout(Be),Be=null),ze=!1},Ue=0,We=null,Ge=null,[M,Ke]=J(!1),[qe,Je]=J(null),[Ye,Xe]=J(null),[Ze,Qe]=tY(Ye),$e=Y(()=>de.isOpen()?pN:x()?fN:M()?qe():d()?dN:null),et=e=>GY(e,uI),tt=eZ(uI,et,JJ),nt=iZ(s,()=>p(),e=>{if(h()){if(o.shiftDragStart(e),Ie){Ie={x:Ie.x+e.x,y:Ie.y+e.y};return}let{pageX:t,pageY:n}=Et(s().x,s().y);Ie={x:t,y:n}}}),N=Y(()=>d()&&!_()),rt=new Map,it=(e,t)=>{let n=XX(`grabbed`),i={id:n,bounds:e,createdAt:Date.now(),element:t};o.addGrabbedBox(i),r.hooks.onGrabbedBox(e,t);let a=window.setTimeout(()=>{rt.delete(n),o.removeGrabbedBox(n)},zM+125);rt.set(n,a)},at=async e=>{let t=await Promise.all(e.map(async e=>{let t=await PU(e),n=t?.componentName??null,r=t?.filePath,i=t?.lineNumber??void 0,a=t?.columnNumber??void 0;n||=FU(e);let o=e instanceof HTMLElement?e.innerText?.slice(0,100):void 0;return{tagName:MN(e),id:e.id||void 0,className:e.getAttribute(`class`)||void 0,textContent:o,componentName:n??void 0,filePath:r,lineNumber:i,columnNumber:a}}));window.dispatchEvent(new CustomEvent(`react-grab:element-selected`,{detail:{elements:t}}))},ot=QX(o,()=>i.labelInstances),st=async(e,t,n)=>{He(),l().state!==`copying`&&o.startCopy();let r=!1,i;try{r=await e(),r||(i=`Failed to copy`)}catch(e){i=CY(e,`Action failed`)}if(t)for(let e of t)ot.updateAfterCopy(e,r,i);l().state===`copying`&&(r&&o.completeCopy(),n?Kt():r?(o.activate(),Ve()):o.unfreeze())},ct=(e,t,n)=>{let i=e[0],a=n??(i?FU(i):null),o=i?MN(i):null,s=a??o??void 0;return kY({getContent:r.store.options.getContent,componentName:s,maxContextLines:r.store.options.maxContextLines},r.hooks,e,t)},lt=async(e,t,n)=>{if(e.length===0)return!1;let i=[],a=[];for(let t of e){let{wasIntercepted:e,pendingResult:n}=r.hooks.onElementSelect(t);e||i.push(t),n&&a.push(n),r.store.theme.grabbedBoxes.enabled&&it(JJ(t),t)}await QF();let o=!0;if(i.length>0&&(o=await ct(i,t,n)),a.length>0&&!(await Promise.all(a)).every(Boolean))throw new GV;return at(e),o},ut=e=>{DU(e.primaryElement).then(async t=>{await st(()=>lt(e.targetElements,e.extraPrompt,t??void 0),e.labelInstanceIds.length>0?e.labelInstanceIds:null,e.shouldDeactivateAfter),e.onComplete?.()}).catch(t=>{let n=CY(t,`Action failed`);for(let t of e.labelInstanceIds)ot.updateAfterCopy(t,!1,n);l().state===`copying`&&o.unfreeze()})},dt=e=>{let{element:t,cursorX:n,selectedElements:r,extraPrompt:a,shouldDeactivateAfter:s,onComplete:c,dragRect:l}=e,u=r??[t],d=l??i.frozenDragRect,f=u.length>1,p=!f&&t===yt()?Tt():void 0,m=d&&f?zY(d):p??JJ(t),h=f?m.x+m.width/2:n,g=MN(t);He(),o.startCopy();let _=g?ot.createInstance(m,g,void 0,`copying`,{element:t,mouseX:h,elements:r}):null;ut({primaryElement:t,targetElements:u,labelInstanceIds:_?[_]:[],extraPrompt:a,shouldDeactivateAfter:s,onComplete:c})},ft=e=>{let{elements:t,labelEntries:n,shouldDeactivateAfter:r,onComplete:i}=e,a=t[0];He(),o.startCopy(),ut({primaryElement:a,targetElements:t,labelInstanceIds:ot.createPerElementInstances(n,`copying`),shouldDeactivateAfter:r,onComplete:i})},pt=Y(()=>{if(c(),!N()||m()||v()||ye.isPendingDismiss())return null;let e=i.detectedElement;return tB(e)?e:null}),P=Y(()=>i.frozenElement||(f()?null:pt())),mt=Y(()=>!d()||b()||j()||_()||pe()||ye.isPendingDismiss()?null:ie()?f()?P():pt()??i.frozenElement:ye.selectedElement()),ht=Y(()=>{let e=mt();return e?HY(e,uI,et):[]}),gt=Y(()=>{let e=mt();return e?Math.max(0,ht().findIndex(t=>t.element===e)):0}),_t=Y(()=>mt()!==null);pR(()=>{let e=i.detectedElement;if(!e)return;let t=setInterval(()=>{tB(e)||o.setDetectedElement(null)},100);bR(()=>clearInterval(t))}),pR(vR(P,e=>{if(We!==null&&(clearTimeout(We),We=null),!e){Xe(null);return}We=window.setTimeout(()=>{We=null,Xe(e)},100)})),bR(()=>{We!==null&&(clearTimeout(We),We=null)}),pR(()=>{let e=i.frozenElements;bR(cL(e))}),pR(vR(d,e=>{e&&r.store.options.freezeReactUpdates&&bR(oR())}));let vt=()=>{if(i.isTouchMode&&p()){let e=i.detectedElement;return!e||eI(e)?void 0:e}let e=P();if(!(!e||eI(e)))return e},yt=Y(()=>vt()),bt=()=>yt()?i.isTouchMode&&p()?N():N()&&!m():!1,xt=GR(()=>i.frozenElements,e=>Y(()=>(c(),JJ(e)))),St=Y(()=>{let e=i.frozenElements;if(e.length===0)return[];let t=i.frozenDragRect;return t&&e.length>1?[zY(t)]:xt().map(e=>e())}),Ct=Y(()=>{if(!j()||i.pendingCommentMode||M())return null;let e=i.detectedElement;return!tB(e)||eI(e)||i.frozenElements.includes(e)?null:e}),wt=Y(()=>{c();let e=Ct();if(e)return JJ(e)}),Tt=Y(()=>{c();let e=i.frozenElements;if(e.length>0){let t=St();if(e.length===1){let e=t[0];if(e)return e}let n=i.frozenDragRect;return n?t[0]??zY(n):VY(eX(t))}let t=yt();if(t)return JJ(t)}),Et=(e,t)=>({pageX:e+window.scrollX,pageY:t+window.scrollY}),Dt=(e,t)=>{let{pageX:n,pageY:r}=Et(e,t);return{x:Math.abs(n-i.dragStart.x),y:Math.abs(r-i.dragStart.y)}},Ot=Y(()=>{if(!p())return!1;let e=Dt(s().x,s().y);return e.x>2||e.y>2}),kt=(e,t)=>{let{pageX:n,pageY:r}=Et(e,t),a=Math.min(i.dragStart.x,n),o=Math.min(i.dragStart.y,r),s=Math.abs(n-i.dragStart.x),c=Math.abs(r-i.dragStart.y);return{x:a-window.scrollX,y:o-window.scrollY,width:s,height:c}},At=e=>e.code===`Space`||e.key===` `,jt=()=>{if(!p())return;o.startDragReposition();let{pageX:e,pageY:t}=Et(s().x,s().y);Ie={x:e,y:t}},Mt=()=>{o.stopDragReposition(),Ie=null},Nt=Y(()=>{if(c(),Ot())return VY(kt(s().x,s().y))}),Pt=Y(()=>{if(c(),!Ot())return[];let e=je();if(!e)return[];let t=kt(e.x,e.y),n=IY(t,uI);return(n.length>0?n:IY(t,uI,!1)).map(e=>JJ(e))}),Ft=Y(()=>{let e=Pt();if(e.length>0)return e;let t=wt();return t?[...St(),t]:St()}),It=GR(()=>i.frozenElements,e=>{let t=MN(e)||`element`,n=FU(e)??void 0;return Y(()=>{if(c(),!tB(e))return null;let r=JJ(e),i=ve.get(e);return{tagName:t,componentName:n,bounds:r,mouseX:i===void 0?void 0:r.x+r.width*i}})}),Lt=Y(()=>{if(b()||i.frozenElements.length<2)return[];let e=[];for(let t of It()){let n=t();n!==null&&e.push(n)}return e}),Rt=Y(()=>{if(b())return null;let e=Ct();return e?(c(),{tagName:MN(e)||`element`,componentName:FU(e)??void 0,bounds:JJ(e),mouseX:s().x}):null}),zt=Y(()=>{if(_()||b()){c();let e=i.frozenElement||pt();return e?{x:YJ(JJ(e)).x+i.copyOffsetFromCenterX,y:i.copyStart.y}:{x:i.copyStart.x,y:i.copyStart.y}}return{x:s().x,y:s().y}}),Bt=Y(()=>{if(!j()||i.frozenElements.length!==1)return;c();let e=i.frozenElements[0];if(!tB(e))return;let t=ve.get(e);if(t===void 0)return;let n=JJ(e);return n.x+n.width*t});pR(vR(()=>[pt(),i.lastGrabbedElement],([e,t])=>{t&&e&&t!==e&&o.setLastGrabbed(null),e&&r.hooks.onElementHover(e)})),pR(vR(()=>pt(),e=>{let t=++Ue,n=()=>{Ue===t&&o.setSelectionSource(null,null)};if(!e){n();return}PU(e).then(e=>{if(Ue===t){if(!e){n();return}o.setSelectionSource(e.filePath,e.lineNumber)}}).catch(()=>{Ue===t&&o.setSelectionSource(null,null)})}));let Vt=Y(()=>i.grabbedBoxes.map(e=>({id:e.id,bounds:e.bounds,createdAt:e.createdAt}))),Ht=Y(()=>i.labelInstances.map(e=>({id:e.id,status:e.status,tagName:e.tagName,componentName:e.componentName,createdAt:e.createdAt})));pR(vR(Y(()=>{let e=d(),t=p(),n=_(),a=b(),o=pt(),s=Nt(),c=r.store.theme.enabled,l=r.store.theme.selectionBox.enabled,u=r.store.theme.dragBox.enabled,f=Ot(),m=P(),h=y();return{isActive:e,isDragging:t,isCopying:n,isPromptMode:a,isSelectionBoxVisible:!!(c&&l&&e&&!n&&!h&&!t&&m!=null),isDragBoxVisible:!!(c&&u&&e&&!n&&f),targetElement:o,dragBounds:s?{x:s.x,y:s.y,width:s.width,height:s.height}:null,grabbedBoxes:[...Vt()],labelInstances:[...Ht()],selectionFilePath:i.selectionFilePath,toolbarState:te()}}),e=>{r.hooks.onStateChange(e)})),pR(vR(()=>{let e=b();return{inputMode:e,position:e?s():_R(s),target:e?pt():_R(pt)}},({inputMode:e,position:t,target:n})=>{r.hooks.onPromptModeChange(e,{x:t.x,y:t.y,targetElement:n})})),pR(vR(()=>[ar(),Tt(),pt()],([e,t,n])=>{r.hooks.onSelectionBox(!!e,t??null,n)})),pR(vR(()=>[fr(),Nt()],([e,t])=>{r.hooks.onDragBox(!!e,t??null)})),pR(vR(()=>{let e=mr();return[e,pr(),e?zt():_R(zt),e?pt():_R(pt),i.selectionFilePath,i.selectionLineNumber]},([e,t,n,i,a,o])=>{r.hooks.onElementLabel(e,t,{x:n.x,y:n.y,content:``,element:i??void 0,tagName:i&&MN(i)||void 0,filePath:a??void 0,lineNumber:o??void 0})}));let Ut=null,Wt=e=>{if(e){if(!Ut){Ut=document.createElement(`style`),Ut.setAttribute(`data-react-grab-cursor`,``);let e=PN();e&&(Ut.nonce=e),IN(Ut),document.head.appendChild(Ut)}Ut.textContent=`* { cursor: ${e} !important; }`}else Ut&&=(Ut.remove(),null)};pR(vR(()=>[d(),_(),b()],([e,t,n])=>{Wt(t?`progress`:e&&!n?`crosshair`:null)}));let Gt=()=>{let e=u();o.activate(),e||r.hooks.onActivate()},Kt=()=>{let e=p(),t=i.previouslyFocusedElement;Mt(),o.deactivate(),de.resetWithDiscard(),kr(),Se(),wn(),ye.clear(),Ke(!1),Je(null),e&&C(`userSelect`,``),Pe&&window.clearTimeout(Pe),nt.stop(),t instanceof HTMLElement&&t!==document.body&&t!==document.activeElement&&tB(t)&&t.focus({preventScroll:!0}),r.hooks.onDeactivate()},qt=()=>{u()&&o.releaseHold(),d()&&Kt(),He()},Jt=()=>{o.setWasActivatedByToggle(!0),Gt()},Yt=()=>{let e=[...i.frozenElements],t=i.frozenElement||pt(),n=b()?i.inputText.trim():``;if(!t){Kt();return}let r=e.length>0?e:[t],a=r.map(e=>JJ(e))[0],{x:s,y:c}=YJ(a),l=s+i.copyOffsetFromCenterX;o.setPointer({x:s,y:c}),o.exitPromptMode(),o.clearInputText(),dt({element:t,cursorX:l,selectedElements:r,extraPrompt:n||void 0,shouldDeactivateAfter:!0})},Xt=()=>{if(b()){if(S()){o.clearInputText(),Kt();return}o.setPendingDismiss(!0),ee(e=>e+1)}},Zt=()=>{if(ye.isPendingDismiss()){Dn();return}o.clearInputText(),Kt()},Qt=()=>{o.setPendingDismiss(!1)},$t=()=>{if(de.isOpen()){de.dismiss();return}let e=i.frozenElement||pt();e&&en(e,{x:s().x,y:s().y})},en=(e,t,n={})=>de.trigger(e,t,n),tn=(e,t)=>{if(!de.isOpen()||i.contextMenuPosition!==null)return!1;let n=EI(e,t).find(uI);if(!n)return!1;let r=de.switchToElement(n,{x:e,y:t});return r&&oL([n]),r},nn=e=>({filePath:i.selectionFilePath??void 0,lineNumber:i.selectionLineNumber??void 0,componentName:Ze(),tagName:MN(e)||void 0}),rn=()=>{Ge=null,Ke(!1),o.setPendingCommentMode(!1),Je(null)},an=e=>{let t=i.frozenElement||pt();if(!t)return!1;let n={x:s().x,y:s().y},a=r.store.actions.find(t=>t.id===e);return a?e===`edit`?en(t,n,nn(t))?(o.clearInputText(),o.exitPromptMode(),rn(),!0):!0:(o.clearInputText(),o.exitPromptMode(),rn(),a.onAction(Nn(t,n)),!0):(o.clearInputText(),o.exitPromptMode(),rn(),Mr(dN),ln(t,n),!0)},on=e=>{if(d()){if($e()!==e&&b()&&an(e))return;if($e()!==e&&i.pendingCommentMode){o.setPendingCommentMode(!1),Ge=e,Je(e),Ke(!0);return}if($e()!==e&&M()){Ge=e,Je(e);return}Kt();return}T()&&(Ge=e,Je(e),Ke(!0),Jt())},sn=()=>{on(te()?.defaultAction??`copy`)},cn=(e,t,n)=>{rn(),o.clearInputText(),o.enterPromptMode({x:t,y:n},e)},ln=(e,t)=>{Se(),Ar(),o.showContextMenu(t,e),wn(),r.hooks.onContextMenu(e,t)},un=(e,t)=>{let n=Ge;if(Ge=null,Je(null),!n)return;if(n===`edit`){en(e,t,nn(e));return}let i=r.store.actions.find(e=>e.id===n);if(!i){Mr(dN),ln(e,t);return}i.onAction(Nn(e,t))},dn=()=>{if(T()){if(d()&&x()){Kt();return}o.setPendingCommentMode(!0),d()||Jt()}},fn=(e,t,n)=>{let r=n&&j()&&!p()&&!i.pendingCommentMode&&!M();if(be()||f()&&!r)return;if(o.setPointer({x:e,y:t}),ke.latestPointerX=e,ke.latestPointerY=t,r){let n=DI(e,t);n!==i.detectedElement&&o.setDetectedElement(n);return}let a=performance.now(),s=ke.pendingDetectionScheduledAt>0&&a-ke.pendingDetectionScheduledAt<200;if(a-ke.lastDetectionTimestamp>=32&&!s&&(ke.lastDetectionTimestamp=a,ke.pendingDetectionScheduledAt=a,setTimeout(()=>{if(be()){ke.pendingDetectionScheduledAt=0;return}let e=DI(ke.latestPointerX,ke.latestPointerY);e!==i.detectedElement&&o.setDetectedElement(e),ke.pendingDetectionScheduledAt=0})),p()){if(h()){let{pageX:n,pageY:r}=Et(e,t);Ie&&o.shiftDragStart({x:n-Ie.x,y:r-Ie.y}),Ie={x:n,y:r}}Ne(e,t);let n=rZ(e,t),r=n.top||n.bottom||n.left||n.right;r&&!nt.isActive()?nt.start():!r&&nt.isActive()&&nt.stop()}},pn=(e,t,n)=>{if(!N()||v())return!1;!n&&j()&&Se();let i=ye.selectedElement()!==null;return o.startDrag({x:e,y:t},n||i),o.setPointer({x:e,y:t}),C(`userSelect`,`none`),Ne(e,t),r.hooks.onDragStart(e+window.scrollX,t+window.scrollY),!0},mn=(e,t)=>{let n=i.frozenElements.includes(e),r=i.frozenElements.length===0;if(!n){let n=LY(JJ(e),t);ve.set(e,n),r&&Qe(FU(e)??void 0)}o.toggleFrozenElement(e),OI();let a=i.frozenElements.includes(e);if(a||ve.delete(e),i.frozenElements.length===0){Se(),o.unfreeze();return}oL(i.frozenElements),Le(!0),o.setPointer(t),o.setLastGrabbed(a?e:i.frozenElements[i.frozenElements.length-1]),o.freeze(),wn()},hn=()=>{let e=i.frozenElements.filter(tB),t=e.map(e=>{let t=MN(e)||`element`,n=FU(e)??void 0,r=ve.get(e),i=JJ(e);return{element:e,tagName:t,componentName:n,mouseX:r===void 0?i.x+i.width/2:i.x+i.width*r}});if(Se(),e.length===0){o.unfreeze();return}if(e.length===1){dt({element:e[0],cursorX:t[0].mouseX,selectedElements:e,shouldDeactivateAfter:i.wasActivatedByToggle});return}ft({elements:e,labelEntries:t,shouldDeactivateAfter:i.wasActivatedByToggle})},gn=(e,t,n)=>{let a=IY(e,uI),s=a.length>0?a:IY(e,uI,!1);if(s.length===0)return;let c=n&&!i.pendingCommentMode&&!M();if(c&&o.addFrozenElements(s),oL(c?i.frozenElements:s),r.hooks.onDragEnd(s,e),c){let e=s[s.length-1];Le(!0),OI(),o.setPointer(YJ(JJ(e))),o.setLastGrabbed(e),o.freeze(),wn();return}let l=s[0],u=YJ(JJ(l));o.setPointer(u),o.setFrozenElements(s);let d=BY(e);if(o.setFrozenDragRect(d),o.freeze(),o.setLastGrabbed(l),i.pendingCommentMode){cn(l,u.x,u.y);return}if(M()){Ke(!1),Ge?un(l,u):ln(l,u);return}let f=i.wasActivatedByToggle&&!t;dt({element:l,cursorX:u.x,selectedElements:s,shouldDeactivateAfter:f,dragRect:d})},_n=e=>{for(let t of i.frozenElements)if(tB(t)&&dZ(e,JJ(t)))return t;return null},vn=(e,t,n,a)=>{let c=tB(i.frozenElement)?i.frozenElement:null,l=ye.selectedElement(),u=()=>EI(e,t).find(uI)??null;if(a&&!i.pendingCommentMode&&!M()){let n=u();n!==null&&mn(n,{x:e,y:t});return}let d=u()??(tB(i.detectedElement)?i.detectedElement:null),f=l??d??c;if(!f)return;let p,m,h=d===null&&c===f,g=l===f;if(h)p=s().x,m=s().y;else if(g){let e=YJ(JJ(f));p=e.x,m=e.y}else p=e,m=t;if(i.pendingCommentMode){cn(f,p,m),ye.clear();return}if(M()){Ke(!1);let{wasIntercepted:e}=r.hooks.onElementSelect(f);if(e)return;ye.clear(),oL([f]),o.setFrozenElement(f);let t={x:p,y:m};o.setPointer(t),o.freeze(),Ge?un(f,t):ln(f,t);return}let _=i.wasActivatedByToggle&&!n;o.setLastGrabbed(f),dt({element:f,cursorX:p,shouldDeactivateAfter:_}),ye.clear()},yn=()=>{p()&&(Mt(),o.cancelDrag(),nt.stop(),C(`userSelect`,``))},bn=(e,t,n,r)=>{if(!p())return;Ae!==null&&(clearTimeout(Ae),Ae=null),Me(null);let i=Dt(e,t),a=i.x>2||i.y>2,s=a?kt(e,t):null;a?o.endDrag():o.cancelDrag(),Mt(),nt.stop(),C(`userSelect`,``),s?gn(s,n,r):vn(e,t,n,r)},xn=SY(),Sn=nZ(),Cn=e=>{let t;try{t=Sn.originalKeyDescriptor?.get?Sn.originalKeyDescriptor.get.call(e):e.key}catch{return!1}let n=t===`Enter`||uZ(e.code),r=d()||u();return n&&r&&!b()&&!ye.isPendingDismiss()&&!i.wasActivatedByToggle?AB(e,`data-react-grab-input`)?!1:(Sn.claimedEvents.add(e),e.preventDefault(),e.stopImmediatePropagation(),!0):!1};xn.addDocumentListener(`keydown`,NM(Cn),{capture:!0}),xn.addDocumentListener(`keyup`,NM(Cn),{capture:!0}),xn.addDocumentListener(`keypress`,NM(Cn),{capture:!0});let wn=()=>{tt.clearHistory(),ye.clear()},Tn=(e,t=!1)=>{o.setFrozenElement(e),o.freeze(),ye.select(e,{shouldPromptBeforeMouseHandoff:t});let n=YJ(JJ(e));o.setPointer(n),i.contextMenuPosition!==null&&o.showContextMenu(n,e)},En=()=>{ye.showDismissPrompt()&&ee(e=>e+1)},Dn=()=>{ye.clear(),o.unfreeze(),wn()},On=()=>{let e=ye.takeSelection(i.frozenElement);if(!e){Dn();return}let t=YJ(JJ(e));wn(),o.setLastGrabbed(e),dt({element:e,cursorX:t.x,shouldDeactivateAfter:i.wasActivatedByToggle})},kn=e=>oN.has(e.key)?e.key:e.key===`Tab`?e.shiftKey?`ArrowLeft`:`ArrowRight`:null,An=(e,t={})=>{if(!d()||b()||j()||ye.isPendingDismiss()&&!t.allowPendingKeyboardSelection)return!1;let n=kn(e);if(!n||pe())return!1;let r=P(),i=!r;if(!r){let e=jM()?.getBoundingClientRect();r=e?DI(e.left+e.width/2,e.top+e.height/2):DI(window.innerWidth/2,window.innerHeight/2)}if(!r)return!1;let a=n===`ArrowUp`||n===`ArrowDown`,o=tt.findNext(n,r);if(!o&&!a&&!i)return!1;let s=o??r;return e.preventDefault(),e.stopPropagation(),Tn(s,!0),!0},jn=e=>e.metaKey||e.ctrlKey||e.altKey||e.repeat||iB(e)||!d()||_()||v()||pe()?null:i.frozenElement||pt(),Mn=e=>{let t=jn(e);if(!t)return null;let n=RV(r.store.actions,e);return n?{element:t,action:n}:null},Nn=(e,t)=>{let n=JJ(e);return Cr({element:e,filePath:i.selectionFilePath??void 0,lineNumber:i.selectionLineNumber??void 0,tagName:MN(e)||void 0,componentName:Ze(),position:t,shouldDeferHideContextMenu:!1,performWithFeedbackOptions:{fallbackBounds:n,fallbackSelectionBounds:[n],position:t}})},Pn=/^[a-zA-Z0-9-]$/,Fn=e=>{if(!e.key||e.key.length!==1||!Pn.test(e.key))return!1;let t=jn(e);return!t||!de.trigger(t,{x:s().x,y:s().y},{initialSearchQuery:e.key})?!1:(rn(),e.preventDefault(),e.stopImmediatePropagation(),!0)},In=e=>{let t=Mn(e);if(!t)return!1;let{element:n,action:r}=t;if(b())return an(r.id)?(e.preventDefault(),e.stopImmediatePropagation(),!0):!1;let i={x:s().x,y:s().y};return r.onAction(Nn(n,i)),e.preventDefault(),e.stopImmediatePropagation(),!0},Ln=e=>{if(e.key?.toLowerCase()!==`o`||!d()||!(e.metaKey||e.ctrlKey))return!1;let t=i.selectionFilePath,n=i.selectionLineNumber;return t?(e.preventDefault(),e.stopPropagation(),r.hooks.onOpenFile(t,n??void 0)||AI(t,n??void 0,r.hooks.transformOpenFileUrl),!0):!1},Rn=e=>{if(!d()||_()||i.contextMenuPosition!==null||de.isOpen())return!1;let t=e.key===`F10`&&e.shiftKey,n=e.key===`ContextMenu`;if(!t&&!n)return!1;let r=i.frozenElements,a=r.length>1,s=(a?r[0]:null)||i.frozenElement||pt();if(!s)return!1;e.preventDefault(),e.stopPropagation();let c=YJ(JJ(s));return a?oL(r):(oL([s]),o.setFrozenElement(s)),o.setPointer(c),o.freeze(),ln(s,c),!0},zn=Y(()=>ht().map(e=>({tagName:MN(e.element)||`element`,componentName:FU(e.element)??void 0,depth:e.depth,isLast:e.isLast}))),Bn=Y(()=>({items:zn(),activeIndex:gt()})),Vn=e=>{if(!(!r.store.options.allowActivationInsideInput&&iB(e))&&!(!$Y(e,r.store.options)&&((e.metaKey||e.ctrlKey)&&!aN.includes(e.key)&&!uZ(e.code)&&(d()&&!i.wasActivatedByToggle?Kt():u()&&(we(),Te(),o.releaseHold())),!uZ(e.code)||!u()))){if((d()||u())&&!b()&&(e.preventDefault(),uZ(e.code)&&e.stopImmediatePropagation()),d()){if(i.wasActivatedByToggle&&r.store.options.activationMode!==`hold`||e.repeat)return;Pe!==null&&window.clearTimeout(Pe),Pe=window.setTimeout(()=>{Kt()},200);return}if(u()&&e.repeat){if(Fe.copyWaiting){let e=Fe.holdTimerFired;Te(),e&&o.activate()}return}if(!(_()||y())&&!u()){let t=r.store.options.keyHoldDuration??100;iB(e)?aB(e)?t+=600:t+=400:oB()&&(t+=600),Te(),o.startHold(t)}}},Hn=e=>{if(!ye.isPendingDismiss())return!1;if(uZ(e.code))return!0;let t=oN.has(e.key),n=Mn(e)!==null;return!t&&!n?!1:t?An(e,{allowPendingKeyboardSelection:!0}):In(e)?(wn(),!0):!1};xn.addWindowListener(`keydown`,NM(e=>{if(kn(e)&&iB(e)||Hn(e))return;if(Cn(e),!T()){$Y(e,r.store.options)&&!e.repeat&&O(e=>e+1);return}let t=uZ(e.code)&&u()&&!b(),n=AB(e,lN);if(b()&&$Y(e,r.store.options)&&!e.repeat&&!n){e.preventDefault(),e.stopPropagation(),Xt();return}if(e.key===`Escape`&&pe()){ae()!==null&&kr();return}let a=AB(e,`data-react-grab-ignore-events`)&&!t;if(b()||a)return b()&&!n&&In(e)||(e.key===`Escape`&&(b()?Xt():i.wasActivatedByToggle&&Kt()),a&&oN.has(e.key)&&An(e)),void 0;if(p()&&At(e)){e.repeat||jt(),e.preventDefault(),e.stopPropagation();return}if(e.key===`Escape`&&(u()||i.wasActivatedByToggle)){Kt();return}d()&&!aN.includes(e.key)&&e.preventDefault();let o=Date.now()-Re<200;An(e)||Ln(e)||Rn(e)||In(e)||Fn(e)||o||Vn(e)}),{capture:!0}),xn.addWindowListener(`keyup`,NM(e=>{if(Cn(e))return;if(At(e)&&h()&&(Mt(),e.preventDefault(),e.stopPropagation()),e.key===`Shift`&&j()){p()&&yn(),hn();return}if(AB(e,`data-react-grab-ignore-events`))return;let t=tZ(r.store.options),n=t.metaKey||t.ctrlKey?kB()?!e.metaKey:!e.ctrlKey:t.shiftKey&&!e.shiftKey||t.altKey&&!e.altKey,a=r.store.options.activationKey?typeof r.store.options.activationKey==`function`?r.store.options.activationKey(e):ZY(r.store.options.activationKey)(e):qY(e.key,e.code);if(y()||ze){(a||n)&&(He(),Kt());return}if(!u()&&!d()||b())return;let s=!!r.store.options.activationKey,c=r.store.options.activationMode===`hold`,l=p();if(d()){let e=fe();if(n){if(i.wasActivatedByToggle&&r.store.options.activationMode!==`hold`||e)return;Kt()}else if(c&&a){if(Pe!==null&&(window.clearTimeout(Pe),Pe=null),e||l)return;Kt()}else!s&&a&&Pe!==null&&(window.clearTimeout(Pe),Pe=null);return}if(a||n){if(i.wasActivatedByToggle&&r.store.options.activationMode!==`hold`)return;if(u()||Fe.holdTimerFired&&n){we();let t=(Fe.startTimestamp?Date.now()-Fe.startTimestamp:0)>=200,n=Fe.holdTimerFired&&t&&(r.store.options.allowActivationInsideInput||!iB(e));Te(),n?o.activate():o.releaseHold()}else Kt()}}),{capture:!0}),xn.addDocumentListener(`copy`,()=>{u()&&(Fe.copyWaiting=!0)}),xn.addWindowListener(`keypress`,NM(Cn),{capture:!0}),xn.addWindowListener(`pointermove`,NM(e=>{if(!e.isPrimary)return;let t=e.pointerType===`touch`;if(o.setTouchMode(t),!AB(e,`data-react-grab-ignore-events`)&&!be()&&!(t&&!u()&&!d())){if((t?u():d())&&!b()&&f()&&!e.shiftKey&&!j()){if(ye.consumeMouseHandoff()){En();return}o.unfreeze(),wn()}fn(e.clientX,e.clientY,e.shiftKey)}}),{passive:!0}),xn.addWindowListener(`pointerdown`,NM(e=>{if(e.button===0&&e.isPrimary&&(o.setTouchMode(e.pointerType===`touch`),_e=!1,!AB(e,`data-react-grab-ignore-events`))){if(fe()){tn(e.clientX,e.clientY)&&(_e=!0,e.preventDefault(),e.stopImmediatePropagation());return}if(b()){let t=Tt();t&&e.clientX>=t.x&&e.clientX<=t.x+t.width&&e.clientY>=t.y&&e.clientY<=t.y+t.height?Yt():Xt();return}if(ye.isPendingDismiss()){e.preventDefault(),e.stopImmediatePropagation();return}if(v()){e.preventDefault(),e.stopImmediatePropagation();return}pn(e.clientX,e.clientY,e.shiftKey)&&(e.pointerId!==void 0&&document.documentElement.setPointerCapture(e.pointerId),e.preventDefault(),e.stopImmediatePropagation())}}),{capture:!0}),xn.addWindowListener(`pointerup`,NM(e=>{if(e.button!==0||!e.isPrimary||AB(e,`data-react-grab-ignore-events`)||fe())return;let t=N()||v()||p(),n=e.metaKey||e.ctrlKey;bn(e.clientX,e.clientY,n,e.shiftKey),t&&(e.preventDefault(),e.stopImmediatePropagation())}),{capture:!0}),xn.addWindowListener(`contextmenu`,NM(e=>{if(!N()||_()||b()||de.isOpen())return;let t=AB(e,`data-react-grab-ignore-events`),n={x:e.clientX,y:e.clientY},r=t&&i.frozenElements.length>1?_n(n):null,a=ye.isPendingDismiss();if(t&&!r&&!a&&!_t())return;if(fe()){e.preventDefault();return}e.preventDefault(),e.stopPropagation();let s=r??DI(e.clientX,e.clientY);if(!s)return;let c=i.frozenElements;c.length>1&&c.includes(s)?oL(c):(oL([s]),o.setFrozenElement(s)),o.setPointer(n),o.freeze(),ln(s,n)}),{capture:!0}),xn.addWindowListener(`pointercancel`,NM(e=>{e.isPrimary&&yn()})),xn.addWindowListener(`click`,NM(e=>{if(!AB(e,`data-react-grab-ignore-events`)){if(_e){_e=!1,e.preventDefault(),e.stopImmediatePropagation();return}fe()||(N()||g())&&(e.preventDefault(),e.stopImmediatePropagation(),i.wasActivatedByToggle&&!b()&&!e.shiftKey&&(u()?o.setWasActivatedByToggle(!1):Kt()))}}),{capture:!0}),xn.addDocumentListener(`visibilitychange`,()=>{if(document.hidden){o.clearGrabbedBoxes();let e=i.activationTimestamp;d()&&!b()&&e!==null&&Date.now()-e>500&&Kt()}}),xn.addWindowListener(`blur`,()=>{yn(),u()&&(we(),o.releaseHold(),Te()),Se()}),xn.addWindowListener(`focus`,()=>{Re=Date.now()}),xn.addWindowListener(`focusin`,e=>{AB(e,PM)&&e.stopPropagation()},{capture:!0});let Un=()=>{if(!(i.isTouchMode&&!u()&&!d())&&!be()&&!f()&&!p()&&i.frozenElements.length===0){let e=DI(s().x,s().y);o.setDetectedElement(e)}},Wn=null,Gn=null,Kn=()=>{RY(),Un(),o.incrementViewportVersion(),o.updateContextMenuPosition()};xn.addWindowListener(`scroll`,Kn,{capture:!0});let qn=window.innerWidth,Jn=window.innerHeight;xn.addWindowListener(`resize`,()=>{let e=window.innerWidth,t=window.innerHeight;if(qn>0&&Jn>0){let n=e/qn,r=t/Jn,i=Math.abs(n-r)<hN,a=Math.abs(n-1)>hN;i&&a&&o.setPointer({x:s().x*n,y:s().y*r})}qn=e,Jn=t,Kn()});let Yn=window.visualViewport;if(Yn){let{signal:e}=xn;Yn.addEventListener(`resize`,Kn,{signal:e}),Yn.addEventListener(`scroll`,Kn,{signal:e})}let Xn=()=>{Gn===null&&(Gn=XF(()=>{Gn=null,o.incrementViewportVersion()}))};pR(()=>{if(r.store.theme.enabled&&(d()||_()||i.labelInstances.length>0||i.grabbedBoxes.length>0)){if(Wn!==null)return;Wn=window.setInterval(()=>{Xn()},100);return}Wn!==null&&(window.clearInterval(Wn),Wn=null),Gn!==null&&(ZF(Gn),Gn=null)}),bR(()=>{Wn!==null&&window.clearInterval(Wn),Gn!==null&&ZF(Gn)}),xn.addDocumentListener(`copy`,NM(e=>{b()||AB(e,`data-react-grab-ignore-events`)||N()&&e.preventDefault()}),{capture:!0}),bR(()=>{xn.abort(),Ae!==null&&window.clearTimeout(Ae),Pe&&window.clearTimeout(Pe),He(),he?.(),he=null,ge?.(),ge=null,rt.forEach(e=>window.clearTimeout(e)),rt.clear(),ot.cancelAllFades(),nt.stop(),C(`userSelect`,``),C(`touchAction`,``),Wt(null),Sn.restore(),AM(null)});let{root:Zn,host:Qn}=eY(IJ);bR(yY(Qn).cleanup);let $n=Y(()=>r.store.theme.enabled),er=Y(()=>r.store.theme.selectionBox.enabled),tr=Y(()=>r.store.theme.elementLabel.enabled),nr=Y(()=>r.store.theme.dragBox.enabled),rr=Y(()=>y()||ne()&&!f()||de.isInteracting()),ir=Y(()=>Pt().length>0),ar=Y(()=>!$n()||!er()||rr()?!1:ir()?!0:bt()),or=Y(()=>{let e=yt();if(e)return MN(e)||void 0}),sr=Y(()=>!$n()||fe()||!tr()||rr()?!1:bt()),cr=new Map,lr=e=>{let t=e.elements?.filter(tB)??[],n=e.element,r=null;t.length>0?r=t.map(JJ):n&&tB(n)&&(r=[JJ(n)]);let i=e.bounds,a=e.boundsMultiple;r&&(i=r.length>1?VY(eX(r)):r[0],e.boundsMultiple!==void 0&&(a=e.boundsMultiple.length>1&&e.boundsMultiple.length===e.elements?.length?r:[i]));let o=cr.get(e.id),s=o?.boundsMultiple,c=s===a||s!==void 0&&a!==void 0&&s.length===a.length&&s.every((e,t)=>e.x===a[t].x&&e.y===a[t].y&&e.width===a[t].width&&e.height===a[t].height);if(o&&o.status===e.status&&o.errorMessage===e.errorMessage&&o.bounds.x===i.x&&o.bounds.y===i.y&&o.bounds.width===i.width&&o.bounds.height===i.height&&c)return o;let l=i.x+i.width/2,u=i.width/2,d;d=e.mouseXOffsetRatio!==void 0&&u>0?l+e.mouseXOffsetRatio*u:e.mouseXOffsetFromCenter===void 0?e.mouseX??l:l+e.mouseXOffsetFromCenter;let f={...e,bounds:i,boundsMultiple:a,mouseX:d};return cr.set(e.id,f),f},ur=Y(()=>{if(!$n()||!r.store.theme.grabbedBoxes.enabled)return[];c();let e=new Set(i.labelInstances.map(e=>e.id));for(let t of cr.keys())e.has(t)||cr.delete(t);return i.labelInstances.map(lr)}),dr=Y(()=>!$n()||!r.store.theme.grabbedBoxes.enabled?[]:(c(),i.grabbedBoxes.map(e=>!e.element||!document.body.contains(e.element)?e:{...e,bounds:JJ(e.element)}))),fr=Y(()=>$n()&&nr()&&N()&&Ot()),pr=Y(()=>_()?`processing`:`hover`),mr=Y(()=>{if(!$n())return!1;let e=tr(),t=b(),n=_(),r=N(),i=p(),a=!!P(),o=ne(),s=f();return!e||t||o&&!s?!1:n?!0:r&&!i&&a}),hr=Y(()=>{c();let e=i.contextMenuElement;return e?JJ(e):null}),gr=Y(()=>(c(),i.contextMenuPosition)),_r=Y(()=>{let e=i.contextMenuElement;if(!e)return;let t=i.frozenElements.length;return t>1?`${t} elements`:MN(e)||void 0}),[vr]=tY(()=>i.frozenElements.length>1?null:i.contextMenuElement),[yr]=hR(()=>i.contextMenuElement,async e=>e?PU(e):null),br=async e=>{o.incrementSelectionInteractionLockDepth();try{return await e()}finally{o.decrementSelectionInteractionLockDepth()}},xr=(e,t,n,r,a)=>async c=>{await br(async()=>{let l=a?.fallbackBounds??null,u=a?.fallbackSelectionBounds??[],d=a?.position??i.contextMenuPosition??s(),f=St(),p=hr()??l,m=t.length>1,h=m?VY(eX(f)):p,g=i.wasActivatedByToggle,_;if(_=m?f:p?[p]:u,o.hideContextMenu(),h){let i=m?h.x+h.width/2:d.x,a=ot.createInstance(h,n||`element`,r,`copying`,{element:e,mouseX:i,elements:m?t:void 0,boundsMultiple:_}),o=!1,s;try{o=await c(),o||(s=`Failed to copy`)}catch(e){s=CY(e,`Action failed`)}ot.updateAfterCopy(a,o,s)}else try{await c()}catch{}g?Kt():o.unfreeze()})},Sr=()=>{setTimeout(()=>{o.hideContextMenu()},0)},Cr=e=>{let{element:t,filePath:n,lineNumber:a,tagName:s,componentName:c,position:l,performWithFeedbackOptions:u,shouldDeferHideContextMenu:f,onBeforeCopy:p,onBeforePrompt:m,customEnterPromptMode:h}=e,g=i.frozenElements.length>0?i.frozenElements:[t],_=f?Sr:o.hideContextMenu,v={element:t,elements:g,filePath:n,lineNumber:a,componentName:c,tagName:s,enterPromptMode:h??(()=>{ot.clearAll(),rn(),m?.(),Ee(t,l.x,l.y),o.setPointer({x:l.x,y:l.y}),o.setFrozenElement(t),De(),d()||Gt(),_()}),enterEditMode:()=>{en(t,l,{filePath:n,lineNumber:a,componentName:c,tagName:s})&&rn(),_()},copy:()=>{rn(),p?.(),dt({element:t,cursorX:l.x,selectedElements:g.length>1?g:void 0,shouldDeactivateAfter:i.wasActivatedByToggle}),_()},hooks:{transformHtmlContent:r.hooks.transformHtmlContent,onOpenFile:r.hooks.onOpenFile,transformOpenFileUrl:r.hooks.transformOpenFileUrl},performWithFeedback:xr(t,g,s,c,u),hideContextMenu:_,cleanup:()=>{i.wasActivatedByToggle?Kt():o.unfreeze()}},y=r.hooks.transformActionContext(v);return{...v,...y}},wr=Y(()=>{let e=i.contextMenuElement;if(!e)return;let t=yr(),n=i.contextMenuPosition??s();return Cr({element:e,filePath:t?.filePath,lineNumber:t?.lineNumber??void 0,tagName:_r(),componentName:vr(),position:n,shouldDeferHideContextMenu:!0,onBeforeCopy:()=>{ye.clear()},customEnterPromptMode:()=>{ot.clearAll(),rn(),o.clearInputText(),o.enterPromptMode(n,e),Sr()}})}),Tr=()=>{setTimeout(()=>{o.hideContextMenu(),Kt()},0)},Er=()=>{if(!me)return null;let e=me.getBoundingClientRect(),t=gZ(e);return t===`left`||t===`right`?{x:t===`left`?e.right:e.left,y:e.top+e.height/2,edge:t}:{x:e.left+e.width/2,y:t===`top`?e.bottom:e.top,edge:t}},Dr=()=>{let e=Er();if(e)return e;let t=de.state();return t?{x:t.position.x,y:t.position.y,edge:`bottom`}:null},Or=(e,t)=>{let n=null,r=()=>{let i=e();i&&t(i),n=XF(r)};return r(),()=>{n!==null&&(ZF(n),n=null)}};pR(()=>{if(!_t())return;let e=Or(Er,ue);bR(()=>{e(),ue(null)})});let kr=()=>{he?.(),he=null,oe(null)},Ar=()=>{o.hideContextMenu(),kr(),de.dismiss()},jr=()=>{ae()===null?(o.hideContextMenu(),de.isOpen()&&de.closePreservingRenderer(),he?.(),he=Or(Er,oe)):kr()},Mr=e=>{Ce({defaultAction:e})},Nr=e=>{let t=i.labelInstances.find(t=>t.id===e);if(!t?.element||!tB(t.element))return;let n=t.element,r=YJ(JJ(n)),a={x:t.mouseX??r.x,y:r.y},s=t.elements&&t.elements.length>0?t.elements.filter(e=>tB(e)):[n];setTimeout(()=>{kr(),de.isOpen()&&de.closePreservingRenderer(),d()||(o.setWasActivatedByToggle(!0),Gt()),o.setPointer(a),o.setFrozenElements(s),s.length>1&&t.bounds&&o.setFrozenDragRect(BY(t.bounds)),o.freeze(),o.showContextMenu(a,n)},0)};pR(()=>{let e=r.store.theme.hue;e===0?Zn.style.filter=``:Zn.style.filter=`hue-rotate(${e}deg)`}),r.store.theme.enabled&&Promise.resolve().then(()=>(xJ(),$U)).then(({ReactGrabRenderer:e})=>{t||(n=az(()=>X(e,{get selectionVisible(){return ar()},get selectionBounds(){return Tt()},get selectionBoundsMultiple(){return Ft()},get selectionShouldSnap(){return i.frozenElements.length>0||Pt().length>0},get selectionElementsCount(){return i.frozenElements.length},get frozenLabelEntries(){return Lt()},get pendingShiftPreviewEntry(){return Rt()??void 0},get selectionFilePath(){return i.selectionFilePath??void 0},get selectionLineNumber(){return i.selectionLineNumber??void 0},get selectionTagName(){return or()},get selectionComponentName(){return Ze()},get selectionLabelVisible(){return sr()},selectionLabelStatus:`idle`,get hierarchyState(){return Bn()},get hierarchyMenuPosition(){return le()},get labelInstances(){return ur()},get dragVisible(){return fr()},get dragBounds(){return Nt()},get grabbedBoxes(){return dr()},get mouseX(){return $z(()=>i.frozenElements.length>1)()?void 0:Bt()??zt().x},get isFrozen(){return f()||d()||ne()},get inputValue(){return i.inputText},get isPromptMode(){return b()},onShowContextMenuInstance:Nr,get onLabelInstanceHoverChange(){return ot.handleHoverChange},get onInputChange(){return o.setInputText},onInputSubmit:()=>void Yt(),onToggleExpand:$t,get selectionLabelShakeCount(){return k()},onConfirmDismiss:Zt,get discardPrompt(){return $z(()=>!!ye.isPendingDismiss())()?{isKeyboardSelection:!0,onConfirm:Zt,onCopy:On}:S()?{onConfirm:Zt,onCancel:Qt}:void 0},get toolbarVisible(){return r.store.theme.toolbar.enabled},get isActive(){return d()},onToggleActive:sn,onActivateAction:on,get activeActionId(){return $e()},get enabled(){return T()},get shakeCount(){return D()},onToolbarStateChange:e=>{A(e),e.enabled!==T()&&(E(e.enabled),e.enabled||(qt(),Ar())),xZ.forEach(t=>t(e))},onSubscribeToToolbarStateChanges:e=>(xZ.add(e),()=>{xZ.delete(e)}),onToolbarSelectHoverChange:re,onToolbarRef:e=>{me=e},get contextMenuPosition(){return gr()},get contextMenuBounds(){return hr()},get contextMenuTagName(){return _r()},get contextMenuComponentName(){return vr()},get contextMenuHasFilePath(){return!!yr()?.filePath},get actions(){return r.store.actions},get actionContext(){return wr()},onContextMenuDismiss:Tr,onContextMenuHide:Sr,get toolbarMenuPosition(){return ae()},get toolbarMenuActions(){return r.store.actions.filter(e=>e.showInToolbarMenu===!0)},get defaultActionId(){return te()?.defaultAction??`copy`},onSetDefaultAction:Mr,onToggleToolbarMenu:jr,onToolbarMenuDismiss:kr,get editPanelState(){return de.state()},get editPanelPosition(){return se()},get onEditPanelDismiss(){return de.dismiss},get onEditPanelSubmit(){return de.submit},get onEditPanelPendingEditsChange(){return de.setPendingEdits},get onEditPanelInteractingChange(){return de.setInteracting}}),Zn))}).catch(e=>{console.warn(`[react-grab] Failed to load renderer:`,e)});let Pr={activate:()=>{o.setPendingCommentMode(!1),!d()&&T()&&Jt()},deactivate:()=>{(d()||_())&&Kt()},toggle:()=>{d()?Kt():T()&&Jt()},comment:dn,isActive:()=>d(),isEnabled:()=>T(),setEnabled:e=>{e!==T()&&(E(e),Ce({enabled:e,collapsed:!e}),e||(qt(),Ar()))},getToolbarState:()=>te()??NV(),setToolbarState:e=>{let t=te()??NV(),n=e.collapsed??t?.collapsed??!1,r={edge:e.edge??t?.edge??`bottom`,ratio:e.ratio??t?.ratio??.5,collapsed:n,enabled:e.enabled??!n,defaultAction:e.defaultAction??t?.defaultAction??`copy`};PV(r),A(r),r.enabled!==T()&&(E(r.enabled),r.enabled||(qt(),Ar())),xZ.forEach(e=>e(r))},onToolbarStateChange:e=>(xZ.add(e),()=>{xZ.delete(e)}),reset:()=>{qt(),Ar(),o.clearGrabbedBoxes(),o.clearLabelInstances(),o.setSelectionSource(null,null)},dispose:()=>{t=!0,bZ=!1,n?.(),he?.(),he=null,ge?.(),ge=null,xZ.clear(),e()},copyElement:async e=>{let t=Array.isArray(e)?e:[e];return t.length!==0&&await ct(t)},getSource:async e=>{let t=await PU(e);return t?{filePath:t.filePath,lineNumber:t.lineNumber,componentName:t.componentName}:null},getStackContext:e=>KU(e,{maxLines:r.store.options.maxContextLines}),getState:()=>({isActive:d(),isDragging:p(),isCopying:_(),isPromptMode:b(),isSelectionBoxVisible:!!ar(),isDragBoxVisible:!!fr(),targetElement:pt(),dragBounds:Nt()??null,grabbedBoxes:[...Vt()],labelInstances:[...Ht()],selectionFilePath:i.selectionFilePath,toolbarState:te()}),setOptions:e=>{r.setOptions(e)},registerPlugin:e=>{r.register(e,Pr)},unregisterPlugin:e=>{r.unregister(e)},getPlugins:()=>r.getPluginNames(),getDisplayName:FU};for(let e of yZ)r.register(e,Pr);return setTimeout(()=>{WF(!0)},yN),Pr})}})),wZ=r({DEFAULT_THEME:()=>KX,commentPlugin:()=>pZ,formatElementInfo:()=>YU,generateSnippet:()=>vZ,getGlobalApi:()=>EZ,getStack:()=>EU,init:()=>SZ,isInstrumentationActive:()=>aP,openPlugin:()=>hZ,registerPlugin:()=>AZ,setGlobalApi:()=>DZ,unregisterPlugin:()=>jZ}),TZ,EZ,DZ,OZ,kZ,AZ,jZ,MZ=t((()=>{CZ(),sR(),QU(),TZ=null,EZ=()=>typeof window>`u`?TZ:window.__REACT_GRAB__??TZ??null,DZ=e=>{TZ=e,typeof window<`u`&&(e?window.__REACT_GRAB__=e:delete window.__REACT_GRAB__)},OZ=[],kZ=e=>{for(;OZ.length>0;){let t=OZ.shift();t&&e.registerPlugin(t)}},AZ=e=>{let t=EZ();if(t){t.registerPlugin(e);return}OZ.push(e)},jZ=e=>{let t=EZ();if(t){t.unregisterPlugin(e);return}let n=OZ.findIndex(t=>t.name===e);n!==-1&&OZ.splice(n,1)},typeof window<`u`&&!window.__REACT_GRAB_DISABLED__&&(window.__REACT_GRAB__?TZ=window.__REACT_GRAB__:(TZ=SZ(),window.__REACT_GRAB__=TZ),kZ(TZ),window.dispatchEvent(new CustomEvent(`react-grab:init`,{detail:TZ})))}));Sr(),Br(),gD();var NZ=`linear-grab:context-copied`,PZ=`linear-grab:picker-activated`,FZ=0,IZ=null;function LZ(e){!e||e.grabbedAt===FZ||Tr().then(t=>{if(t.workflowMode!==`local`||e.grabbedAt===FZ)return;let n=()=>{FZ=e.grabbedAt,navigator.clipboard.writeText(fD(e,t)).then(()=>window.dispatchEvent(new CustomEvent(NZ))).catch(()=>{FZ=0})};e.source?.filePath?(IZ&&clearTimeout(IZ),IZ=null,n()):(IZ&&clearTimeout(IZ),IZ=setTimeout(n,900))})}function RZ(e,t=Date.now()){return{tagName:e.tagName||void 0,componentName:e.componentName||void 0,content:e.textContent?e.textContent.slice(0,500):``,source:e.filePath?{filePath:e.filePath,lineNumber:e.lineNumber??null,columnNumber:e.columnNumber??null,componentName:e.componentName??null}:null,stackContext:void 0,pageUrl:location.href,grabbedAt:t}}function zZ(e,t){let n=null,r=0;return{plugin:{name:`linear-grab`,hooks:{onElementSelect:i=>{r=Date.now(),n=Tr().then(e=>e.captureShots?GA(i):null);let a=t?.(),o={tagName:i.tagName?.toLowerCase()||void 0,componentName:a?.getDisplayName?.(i)||void 0,content:(i.textContent??``).slice(0,500),source:null,stackContext:void 0,pageUrl:location.href,grabbedAt:r};e([o]);try{a?.getSource?.(i)?.then(t=>{t?.filePath&&e([{...o,source:{filePath:t.filePath,lineNumber:t.lineNumber??null,columnNumber:t.columnNumber??null,componentName:t.componentName??o.componentName??null}}])})}catch{}}}},handleSelection(t){let i=r&&Date.now()-r<4e3?r:Date.now(),a=t.map((e,t)=>RZ(e,i+t));if(!a.length)return;e(a);let o=n;n=null,o&&o.then(t=>{t&&e([{...a[0],screenshotDataUrl:t},...a.slice(1)])})}}}var BZ=!1;async function VZ(){if(xr||BZ)return;BZ=!0;let e=await Promise.resolve().then(()=>(MZ(),wZ));try{e.init()}catch{BZ=!1;return}let t=zZ(e=>{kr(e),LZ(e[0])},()=>e.getGlobalApi());e.registerPlugin(t.plugin),HA(),window.addEventListener(`react-grab:element-selected`,e=>{t.handleSelection(e.detail.elements??[])})}async function HZ(){if(xr){let e=await chrome.runtime.sendMessage({type:`grab/activate`});if(e&&e.ok===!1)throw Error(e.error??`Cannot activate the picker on this page.`);return}await VZ();let e=await Promise.resolve().then(()=>(MZ(),wZ));window.dispatchEvent(new CustomEvent(PZ)),e.getGlobalApi()?.activate()}function UZ(e){if(!xr)return()=>{};let t=t=>{t?.type===`grab/updated`&&e()};return chrome.runtime.onMessage.addListener(t),()=>chrome.runtime.onMessage.removeListener(t)}function WZ(){return new Promise(e=>{let t=document.createElement(`div`);t.style.cssText=`position:fixed;inset:0;z-index:2147483647;cursor:crosshair;user-select:none;`;let n=document.createElement(`div`);n.style.cssText=`position:fixed;display:none;border:2px solid #5e6ad2;border-radius:4px;box-shadow:0 0 0 100000px rgba(0,0,0,0.35);pointer-events:none;`,t.appendChild(n),document.body.appendChild(t);let r=0,i=0,a=!1,o=e=>({x:Math.min(r,e.clientX),y:Math.min(i,e.clientY),w:Math.abs(e.clientX-r),h:Math.abs(e.clientY-i)}),s=()=>{t.remove(),window.removeEventListener(`keydown`,l,!0)},c=()=>{s(),e(null)},l=e=>{e.key===`Escape`&&(e.stopPropagation(),c())};window.addEventListener(`keydown`,l,!0),t.addEventListener(`pointerdown`,e=>{a=!0,r=e.clientX,i=e.clientY,t.setPointerCapture(e.pointerId)}),t.addEventListener(`pointermove`,e=>{if(!a)return;let t=o(e);n.style.display=`block`,n.style.left=`${t.x}px`,n.style.top=`${t.y}px`,n.style.width=`${t.w}px`,n.style.height=`${t.h}px`}),t.addEventListener(`pointerup`,t=>{let n=o(t);if(s(),n.w<8||n.h<8)return e(null);KA(n).then(t=>{if(!t)return e(null);e({tagName:`region`,componentName:void 0,content:`Region capture ${Math.round(n.w)}×${Math.round(n.h)}`,source:null,stackContext:void 0,screenshotDataUrl:t,pageUrl:location.href,grabbedAt:Date.now()})})})})}Br(),Sr(),gD();var GZ=N(`<span class="text-text-faint ml-auto text-[10.5px] font-normal normal-case tabular-nums">`),KZ=N(`<details open class=group><summary class="text-text-dim hover:text-text flex cursor-pointer items-center gap-1.5 text-[11px] font-semibold tracking-wide uppercase select-none"><span aria-hidden class="text-text-faint inline-block w-3 text-center transition-transform group-open:rotate-90">›</span></summary><div class="flex flex-col gap-2 pt-2 pl-4">`),qZ=N(`<p class="text-warn text-[10.5px] leading-snug">Several captures resolve to the same source — this page region likely renders inside an iframe/canvas the picker can't see into. Use <b>Capture region</b> for visual pointers there.`),JZ=N(`<div class="flex flex-col gap-1.5"><div class="flex items-center justify-between gap-2"><span class="text-text-faint min-w-0 text-[10.5px] leading-snug">All elements post into ONE issue. Shift+click / drag selects several at once.`),YZ=N(`<div class="flex flex-col gap-1.5"><div class="flex gap-1.5">`),XZ=N(`<span class=text-danger>●`),ZZ=N(`<div class="flex flex-col gap-1.5"><span class="text-text-faint text-[10.5px] leading-snug">Captures your screen as a looping GIF (max 30s) the coding agent can watch. Pick this tab in the share dialog, then reproduce the issue.`),QZ=N(`<span class="inline-block min-w-[4ch] text-center">Stop`),$Z=N(`<div class="bg-surface border-border flex items-center gap-2 rounded-lg border p-2.5"><span aria-hidden class="bg-danger size-2 shrink-0 animate-pulse rounded-full"></span><span class="text-text min-w-[5ch] text-[12px] tabular-nums"></span><span class="text-text-faint text-[10.5px]">max 0:30`),eQ=N(`<div class="bg-surface border-border flex items-center gap-2 rounded-lg border p-2.5"><span class="text-text-dim text-[12px]">Encoding GIF…`),tQ=N(`<div class="flex h-full flex-col gap-4 overflow-y-auto pt-3 pb-4 pl-3 pr-4">`),nQ=N(`<span class="text-success text-[12px] leading-none">✓`),rQ=N(`<svg width=12 height=12 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round aria-hidden><path d="M4 4l8 8M12 4l-8 8">`),iQ=N(`<span class="font-mono text-text-dim break-all text-[11px] leading-snug">`),aQ=N(`<img alt="Element location screenshot"class="border-border bg-bg max-h-32 w-full rounded-md border object-contain">`),oQ=N(`<div class="bg-surface border-border flex flex-col gap-1.5 rounded-lg border p-2.5"><div class="flex items-center justify-between gap-2"><span class="font-mono text-accent min-w-0 truncate text-[12px]"></span><div class="flex shrink-0 items-center gap-1">`),sQ=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linejoin=round aria-hidden><rect x=5.5 y=5.5 width=9 height=9 rx=1.5></rect><path d="M10.5 5.5v-2a2 2 0 0 0-2-2h-5a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h2">`),cQ=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden><path d="M8 2.5v8M4.5 7.5 8 11l3.5-3.5M2.5 13.5h11">`),lQ=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round aria-hidden><path d="M2.5 4h11M6.5 4V2.5h3V4M4 4l.7 9a1.5 1.5 0 0 0 1.5 1.4h3.6A1.5 1.5 0 0 0 11.3 13l.7-9M6.5 7v4.5M9.5 7v4.5">`),uQ=N(`<div class="bg-surface border-border flex flex-col gap-2 rounded-lg border p-2.5"><img alt="Screen recording preview"class="border-border bg-bg max-h-44 w-full rounded-md border object-contain"><span class="text-text-faint text-[10.5px] tabular-nums"> KB · <!>s · <!>×</span><label class="flex cursor-pointer items-center gap-2 select-none"><input type=checkbox class="accent-accent rounded"><span class="text-text text-[12px]">Attach to issue on create</span></label><div class="flex items-center gap-1">`),dQ=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round aria-hidden><path d="M6.5 9.5 9.5 6.5M7.5 4.5 9 3a2.5 2.5 0 0 1 3.5 3.5L11 8M8.5 11.5 7 13a2.5 2.5 0 0 1-3.5-3.5L5 8">`);function fQ(e){return(()=>{var t=KZ(),n=t.firstChild;n.firstChild;var r=n.nextSibling;return P(n,()=>e.title,null),P(n,j(M,{get when(){return e.badge},get children(){var t=GZ();return P(t,()=>e.badge),t}}),null),P(r,()=>e.children),t})()}function pQ(){let e=sr(),t=_r(()=>({queryKey:[`grab`],queryFn:Dr})),n=_r(()=>({queryKey:[`settings`],queryFn:Tr})),r=()=>t.data??[],i=()=>!!(n.data?.linearApiKey||n.data?.linearAccessToken),[a,o]=T(null),s=()=>{o(null),HZ().catch(e=>{o(e instanceof Error&&e.message?e.message:`Cannot activate the picker — open your dev app in the active tab first.`)})},c=async()=>{await jr(),e.invalidateQueries({queryKey:[`grab`]})},[l,u]=T(null),d=async e=>{try{await navigator.clipboard.writeText(fD(e,n.data??{})),u(e.grabbedAt),setTimeout(()=>u(null),1800)}catch{o(`Clipboard was blocked — click the button again.`)}},f=async t=>{await Ar(t),e.invalidateQueries({queryKey:[`grab`]})},[p,m]=T(!1),h=async()=>{o(null),m(!0),window.dispatchEvent(new CustomEvent(PZ));try{let e=await WZ();e?await kr([e]):o(`Region capture failed — try a smaller area (huge scrollers exceed canvas limits), or it was cancelled.`)}finally{m(!1)}},[g,_]=T(HD());ae(UD(_));let[v,y]=T(0);O(()=>{if(g().phase!==`recording`)return;let e=setInterval(()=>y(Date.now()-(HD().startedAt??Date.now())),250);ae(()=>clearInterval(e))});let b=e=>{let t=Math.floor(e/1e3);return`${Math.floor(t/60)}:${String(t%60).padStart(2,`0`)}`},[x,S]=T(`idle`),[C,w]=T(null),E=async()=>{let e=HD().result;if(!e)throw Error(`No recording available.`);if(e.assetUrl)return e.assetUrl;let t=await DO(e.blob,`recording-${Date.now()}.gif`);return rO(t),t},k=async()=>{w(null),S(`busy`);try{let e=E().then(e=>new Blob([``],{type:`text/plain`}));try{await navigator.clipboard.write([new ClipboardItem({"text/plain":e})])}catch{let t=await e;await navigator.clipboard.writeText(await t.text())}S(`copied`),setTimeout(()=>S(`idle`),2e3)}catch{S(`idle`),await ne(),w(`Direct upload is blocked in this browser — copied the GIF instead. Paste it into a Linear comment and Linear uploads it.`)}},ee=()=>{let e=g().result;if(!e)return;let t=document.createElement(`a`);t.href=e.url,t.download=`linear-grab-recording.gif`,t.click()},[te,A]=T(`idle`),ne=async()=>{let e=g().result;if(e){w(null),A(`busy`);try{try{await navigator.clipboard.write([new ClipboardItem({"image/gif":e.blob})])}catch{let t=await createImageBitmap(e.blob),n=document.createElement(`canvas`);n.width=t.width,n.height=t.height,n.getContext(`2d`).drawImage(t,0,0);let r=await new Promise((e,t)=>n.toBlob(n=>n?e(n):t(Error(`PNG encode failed`)),`image/png`));await navigator.clipboard.write([new ClipboardItem({"image/png":r})]),w(`Browser blocks GIF clipboard — copied the first frame as PNG. Use Download for the animation.`)}A(`copied`),setTimeout(()=>A(`idle`),2e3)}catch(e){A(`idle`),w(e instanceof Error?e.message:`Copy failed.`)}}};return(()=>{var e=tQ();return P(e,j(fQ,{title:`Captured elements`,get badge(){return $e(()=>!!r().length)()?`${r().length}/8`:void 0},get children(){return[j(M,{get when(){return r().length>0},get fallback(){return j(Lj,{title:`No elements captured`,children:`Click "Pick element" below, then use the react-grab overlay on your dev app. Every pick ADDS to this list — Shift+click or drag in the overlay selects several at once. Source info needs a dev build.`})},get children(){var e=JZ(),t=e.firstChild;return t.firstChild,P(e,j(We,{get each(){return r()},children:e=>(()=>{var t=oQ(),n=t.firstChild.firstChild,r=n.nextSibling;return P(n,(()=>{var t=$e(()=>!!e.componentName);return()=>t()?`<${e.componentName}>`:$e(()=>!!e.tagName)()?`<${e.tagName}>`:`Element`})()),P(r,j(Tj,{class:`size-7 px-0`,variant:`ghost`,title:`Copy context for a local agent (Claude Code / Cursor) — includes skills & memory paths`,"aria-label":`Copy context`,onClick:()=>void d(e),get children(){return j(M,{get when(){return l()===e.grabbedAt},get fallback(){return sQ()},get children(){return nQ()}})}}),null),P(r,j(Tj,{class:`size-7 px-0`,variant:`ghost`,title:`Remove this element`,"aria-label":`Remove element`,onClick:()=>void f(e.grabbedAt),get children(){return rQ()}}),null),P(t,j(M,{get when(){return e.source?.filePath},get children(){var t=iQ();return P(t,()=>e.source.filePath,null),P(t,(()=>{var t=$e(()=>e.source?.lineNumber!=null);return()=>t()?`:${e.source.lineNumber}`:``})(),null),t}}),null),P(t,j(M,{get when(){return e.screenshotDataUrl},get children(){var t=aQ();return D(()=>it(t,`src`,e.screenshotDataUrl)),t}}),null),t})()}),t),P(e,j(M,{get when(){return new Set(r().filter(e=>e.source?.filePath).map(e=>`${e.source.filePath}:${e.source.lineNumber??``}`)).size<r().filter(e=>e.source?.filePath).length},get children(){return qZ()}}),t),P(t,j(Tj,{class:`h-6 shrink-0 px-2 text-[11px]`,variant:`ghost`,onClick:c,children:`Clear all`}),null),e}}),(()=>{var e=YZ(),t=e.firstChild;return P(t,j(Tj,{variant:`primary`,class:`min-w-0 flex-1`,onClick:s,children:`Pick element`}),null),P(t,j(M,{when:!xr,get children(){return j(Tj,{variant:`ghost`,class:`min-w-0 flex-1`,get loading(){return p()},title:`Drag a rectangle over any part of the page — the shot attaches to the issue`,onClick:()=>void h(),children:`Capture region`})}}),null),P(e,j(M,{get when(){return a()},get children(){return j(Rj,{get message(){return a()}})}}),null),e})()]}}),null),P(e,j(fQ,{title:`Recording`,get badge(){return $e(()=>!!g().result)()?`${(g().result.durationMs/1e3).toFixed(1)}s`:void 0},get children(){return[j(M,{get when(){return g().phase===`idle`||g().phase===`error`},get children(){var e=ZZ(),t=e.firstChild;return P(e,j(Tj,{variant:`ghost`,onClick:()=>void $D(),get children(){return[XZ(),` Record interaction`]}}),t),P(e,j(M,{get when(){return $e(()=>g().phase===`error`)()&&g().error},get children(){return j(Rj,{get message(){return g().error}})}}),null),e}}),j(M,{get when(){return g().phase===`recording`},get children(){var e=$Z(),t=e.firstChild.nextSibling;return t.nextSibling,P(t,()=>b(v())),P(e,j(Tj,{variant:`primary`,class:`ml-auto`,onClick:()=>void eO(),get children(){return QZ()}}),null),e}}),j(M,{get when(){return g().phase===`processing`},get children(){var e=eQ(),t=e.firstChild;return P(e,j(Ej,{}),t),e}}),j(M,{get when(){return $e(()=>g().phase===`ready`)()&&g().result},children:e=>(()=>{var t=uQ(),n=t.firstChild,r=n.nextSibling,a=r.firstChild,o=a.nextSibling,s=o.nextSibling.nextSibling;s.nextSibling;var c=r.nextSibling,l=c.firstChild,u=c.nextSibling;return P(r,()=>(e().blob.size/1024).toFixed(0),a),P(r,()=>(e().durationMs/1e3).toFixed(1),o),P(r,()=>e().width,s),P(r,()=>e().height,null),l.addEventListener(`change`,e=>nO(e.currentTarget.checked)),P(u,j(Tj,{variant:`ghost`,class:`size-7 px-0`,get loading(){return x()===`busy`},get disabled(){return!i()},get title(){return i()?`Copy markdown — uploads to Linear, copies embeddable link`:`Connect Linear in Settings first`},"aria-label":`Copy markdown`,onClick:()=>void k(),get children(){return j(M,{get when(){return x()===`copied`},get fallback(){return dQ()},get children(){return nQ()}})}}),null),P(u,j(Tj,{variant:`ghost`,class:`size-7 px-0`,get loading(){return te()===`busy`},title:`Copy GIF — paste into a Linear comment and Linear uploads it`,"aria-label":`Copy GIF`,onClick:()=>void ne(),get children(){return j(M,{get when(){return te()===`copied`},get fallback(){return sQ()},get children(){return nQ()}})}}),null),P(u,j(Tj,{variant:`ghost`,class:`size-7 px-0`,title:`Download GIF`,"aria-label":`Download GIF`,onClick:ee,get children(){return cQ()}}),null),P(u,j(Tj,{variant:`danger`,class:`ml-auto size-7 px-0`,title:`Discard recording`,"aria-label":`Discard recording`,onClick:tO,get children(){return lQ()}}),null),P(t,j(M,{get when(){return C()},get children(){return j(Rj,{get message(){return C()}})}}),null),D(()=>it(n,`src`,e().url)),D(()=>l.checked=g().attachOnCreate),t})()})]}}),null),e})()}function mQ(e,t,n){let r=Array(e);return new Proxy(r,{get(r,i,a){if(typeof i==`string`){let a=i.charCodeAt(0);if(a>=48&&a<=57){let a=+i;if(Number.isInteger(a)&&a>=0&&a<e){let e=r[a];if(!e){let i=t[a*2];e=r[a]={index:a,key:n(a),start:i,size:t[a*2+1],end:i+t[a*2+1],lane:0}}return e}}if(i===`length`)return e}return Reflect.get(r,i,a)}})}function hQ(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=e();return o.length!==r.length||o.some((e,t)=>r[t]!==e)?(r=o,i=t(...o),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i):i}return o.updateDeps=e=>{r=e},o}function gQ(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var _Q=(e,t)=>Math.abs(e-t)<1.01,vQ=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},yQ,bQ=()=>{if(yQ!==void 0)return yQ;if(typeof navigator>`u`)return yQ=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return yQ=!0;let e=navigator.maxTouchPoints;return yQ=navigator.platform===`MacIntel`&&e!==void 0&&e>0},xQ=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},SQ=e=>e,CQ=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(n);for(let e=0;e<n;e++)r[e]=t+e;return r},wQ=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(xQ(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(xQ(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},TQ={passive:!0},EQ=typeof window>`u`||`onscrollend`in window,DQ=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&EQ,o=0,s=a?null:vQ(i,()=>t(o,!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,TQ),a&&r.addEventListener(`scrollend`,u,TQ),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u)}},OQ=(e,t)=>DQ(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),kQ=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},AQ=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})},jQ=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}return}this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:SQ,rangeExtractor:CQ,onChange:()=>{},measureElement:kQ,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=e>0?s[0]?.key??n.getItemKey(0):null,l=e>0?s[e-1]?.key??n.getItemKey(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==c||t.getItemKey(o-1)!==l)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>e&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==l)&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=!1,s=0;if(r&&this.scrollOffset!==null){let[e,t]=r,n=this.getMeasurements(),{count:i,getItemKey:a}=this.options,c=0;for(;c<i&&a(c)!==e;)c++;if(c<i){let e=n[c];if(e){let n=e.start+t;n!==this.scrollOffset&&(s=n-this.scrollOffset,this.scrollOffset=n,o=!0)}}}(o||i)&&(this.pendingScrollAnchor=[o?r[0]:null,o?r[1]:0,i,s])},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=hQ(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{if(t&&this._intendedScrollOffset===null&&e===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;let n=this.getScrollOffset();this.scrollDirection=t?n===e?this.scrollDirection:n<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,!(!bQ()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener(`touchstart`,t,TQ),e.addEventListener(`touchend`,n,TQ),this.unsubs.push(()=>{e.removeEventListener(`touchstart`,t),e.removeEventListener(`touchend`,n),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let t=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled){let[e,n,r,i]=t;e!==null&&!r&&(bQ()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?i!==0&&(this._iosDeferredAdjustment+=i):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;let n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=hQ(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,n,r,i,a,o,s)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s}),{key:!1}),this.getMeasurements=hQ(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s},c)=>{let l=this.itemSizeCache;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=e*2,a=this._flatMeasurements;if(!a||a.length<i){let e=new Float64Array(i);a&&u>0&&e.set(a.subarray(0,u*2)),a=e,this._flatMeasurements=a}let o;if(u===0)o=t+n;else{let e=u-1;o=a[e*2]+a[e*2+1]+s}for(let t=u;t<e;t++){let e=r(t),n=l.get(e),i=typeof n==`number`?n:this.options.estimateSize(t);a[t*2]=o,a[t*2+1]=i,o+=i+s}let c=mQ(e,a,r);return this.measurementsCache=c,c}let d=this.measurementsCache.slice(0,u),f=Array(a).fill(void 0),p=new Float64Array(a),m=0;for(let e=0;e<u;e++){let t=d[e];t&&(f[t.lane]===void 0&&m++,f[t.lane]=e,p[t.lane]=t.end)}for(let i=u;i<e;i++){let e=r(i),c=this.laneAssignments.get(i),u,h,g=o===`estimate`||l.has(e);if(c!==void 0&&this.options.lanes>1){u=c;let e=f[u],r=e===void 0?void 0:d[e];h=r?r.end+s:t+n}else if(m===a){let e=0,t=p[0],n=f[0];for(let r=1;r<a;r++){let i=p[r];(i<t||i===t&&f[r]<n)&&(e=r,t=i,n=f[r])}u=e,h=t+s,g&&this.laneAssignments.set(i,u)}else u=i%this.options.lanes,h=t+n,g&&this.laneAssignments.set(i,u);let _=l.get(e),v=typeof _==`number`?_:this.options.estimateSize(i),y=h+v;d[i]={index:i,start:h,size:v,end:y,key:e,lane:u},f[u]===void 0&&m++,f[u]=i,p[u]=y}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=hQ(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=PQ(e,t,n,r,r===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=hQ(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{if(e<0||e>=this.options.count)return;let n,r,i,a=this._flatMeasurements;if(this.options.lanes===1&&a!==null)i=this.options.getItemKey(e),r=a[e*2],n=a[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;i=t.key,r=t.start,n=t.size}let o=t-(this.itemSizeCache.get(i)??n);if(o!==0){let a=this.options.anchorTo===`end`&&this.scrollState?.behavior!==`smooth`&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,s=a?this.getTotalSize():0,c=this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?r<this.getScrollOffset()+this.scrollAdjustments&&(!this.itemSizeCache.has(i)||this.scrollDirection!==`backward`):this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:i,start:r,size:n,end:r+n,lane:0},o,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(i,t),this.itemSizeCacheVersion++,a?this.applyScrollAdjustment(this.getTotalSize()-s):c&&this.applyScrollAdjustment(o),this.notify(!1)}},this.getVirtualItems=hQ(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._flatMeasurements,r=this.options.lanes===1&&n!=null;return gQ(t[MQ(0,t.length-1,r?e=>n[e*2]:e=>gQ(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`)if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e=`auto`}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:`end`,behavior:e});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._flatMeasurements;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){e!==0&&(bQ()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=e:(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollAdjustments=0)))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&_Q(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r=this.scrollState.behavior===`smooth`&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior=`auto`),this._scrollToOffset(t,{adjustments:void 0,behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}},MQ=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function NQ(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(a<n)r=i+1;else if(a>n)t=i-1;else return i}return r>0?r-1:0}function PQ(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=NQ(i,a,n),r=e,o=n+t;for(;r<a&&i[r*2]+i[r*2+1]<o;)r++;return{startIndex:e,endIndex:r}}let o=MQ(0,a,t=>e[t].start,n),s=o;if(r===1)for(;s<a&&e[s].end<n+t;)s++;else if(r>1){let i=Array(r).fill(0);for(;s<a&&i.some(e=>e<n+t);){let t=e[s];i[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}function FQ(e){let t=Ve(e),n=new jQ(t),[r,i]=tr(n.getVirtualItems()),[a,o]=T(n.getTotalSize()),s=new Proxy(n,{get(e,t){switch(t){case`getVirtualItems`:return()=>r;case`getTotalSize`:return()=>a();default:return Reflect.get(e,t)}}});return s.setOptions(t),ie(()=>{let e=s._didMount();s._willUpdate(),ae(e)}),E(()=>{s.setOptions(Ve(t,e,{onChange:(t,n)=>{var r;t._willUpdate(),i(ar(t.getVirtualItems(),{key:`index`})),o(t.getTotalSize()),(r=e.onChange)==null||r.call(e,t,n)}})),s._willUpdate(),i(ar(n.getVirtualItems(),{key:`index`})),o(n.getTotalSize())}),s}function IQ(e){return FQ(Ve({observeElementRect:wQ,observeElementOffset:OQ,scrollToFn:AQ},e))}Br();var LQ=3e4,RQ=/github\.com\/[^/]+\/[^/]+\/pull\/\d+/i,zQ={running:[],review:[]},BQ=null,VQ=new Set;function HQ(e){return VQ.add(e),BQ||(BQ=setInterval(()=>void GQ(),LQ),GQ()),()=>{VQ.delete(e),!VQ.size&&BQ&&(clearInterval(BQ),BQ=null)}}function UQ(){GQ()}function WQ(e){return{id:e.id,identifier:e.identifier,title:e.title,stateName:e.state.name,stateColor:e.state.color,delegateName:e.delegate?.displayName??`Agent`,updatedAt:e.updatedAt,prUrl:e.attachments?.find(e=>RQ.test(e.url))?.url}}async function GQ(){try{let e=await Tr();if(!e.linearApiKey&&!e.linearAccessToken)return;let t=(await fO()).filter(e=>!!e.delegate&&e.state.type===`started`).map(WQ);zQ={running:t.filter(e=>!e.prUrl),review:t.filter(e=>!!e.prUrl)};for(let e of VQ)e(zQ)}catch{}}Br();function KQ(e,t=6e3){return Promise.race([e,new Promise((e,n)=>setTimeout(()=>n(Error(`upload timeout`)),t))])}async function qQ(){let e=[];for(let t of await Dr()??[]){let n=t.source?.filePath?` — \`${t.source.filePath}${t.source.lineNumber==null?``:`:${t.source.lineNumber}`}\``:``;if(e.push(`- \`<${t.componentName??t.tagName??`element`}>\`${n}`),t.screenshotDataUrl)try{let n=await KQ(DO(ZA(t.screenshotDataUrl),`capture-${t.grabbedAt}.png`));e.push(` `)}catch{}}let t=HD();if(t.result)try{let n=t.result.assetUrl??await KQ(DO(t.result.blob,`recording-${Date.now()}.gif`));rO(n),e.push(``)}catch{}return e.length?`Captured context:\n${e.join(`
|
|
263
|
-
`)}`:null}function
|
|
256
|
+
`;let e=[];for(let t of document.getAnimations())oL(t)||e.push(t);aL(e),YI=!1}else{for(let e of JI)try{e.finish()}catch{try{e.play()}catch{}}JI=[]}KI.remove(),KI=null,rL(qI),qI=[],BI()}},pL=[`mouseenter`,`mouseleave`,`mouseover`,`mouseout`,`pointerenter`,`pointerleave`,`pointerover`,`pointerout`],mL=[`focus`,`blur`,`focusin`,`focusout`],hL=[`background-color`,`color`,`border-color`,`box-shadow`,`transform`,`opacity`,`outline`,`filter`,`scale`,`visibility`],gL=[`background-color`,`color`,`border-color`,`box-shadow`,`outline`,`outline-offset`,`outline-width`,`outline-color`,`outline-style`,`filter`,`opacity`,`ring-color`,`ring-width`],_L=new Map,vL=new Map,yL=e=>{e.stopImmediatePropagation()},bL=e=>{e.preventDefault(),e.stopImmediatePropagation()},xL=(e,t)=>{let n=new Map;for(let r of t){let t=e.style.getPropertyValue(r);t&&n.set(r,t)}return n},SL=(e,t,n)=>{if(n?.has(e))return null;let r=getComputedStyle(e),i=e.style.cssText,a=xL(e,t);for(let e of t){let t=r.getPropertyValue(e);t&&(i+=`${e}: ${t} !important; `)}return{element:e,frozenStyles:i,originalPropertyValues:a}},CL=(e,t)=>{let n=[],r=document.elementFromPoint(e,t);for(;r&&r!==document.documentElement;)r instanceof HTMLElement&&n.push(r),r=r.parentElement;return n},wL=()=>{let e=[],t=document.activeElement;for(;t&&t!==document.body;)t instanceof HTMLElement&&e.push(t),t=t.shadowRoot?.activeElement??null;return e},TL=(e,t)=>{for(let{element:n,frozenStyles:r,originalPropertyValues:i}of e)t.set(n,i),n.style.cssText=r},EL=(e,t)=>{for(let[n,r]of e)for(let e of t){let t=r.get(e);t?n.style.setProperty(e,t):n.style.removeProperty(e)}e.clear()},DL=(e,t)=>{if(hI())return null;let n=[],r=e!==void 0&&t!==void 0&&e>=0&&t>=0&&e<window.innerWidth&&t<window.innerHeight?CL(e,t):Array.from(document.querySelectorAll(`:hover`)).filter(e=>e instanceof HTMLElement);for(let e of r){let t=SL(e,hL);t&&n.push(t)}let i=[];for(let e of wL()){let t=SL(e,gL,vL);t&&i.push(t)}return{hoverStates:n,focusStates:i}},OL=e=>{if(e){for(let e of pL)document.addEventListener(e,yL,!0);for(let e of mL)document.addEventListener(e,bL,!0);TL(e.hoverStates,_L),TL(e.focusStates,vL),gI()}},kL=()=>{kI();for(let e of pL)document.removeEventListener(e,yL,!0);for(let e of mL)document.removeEventListener(e,bL,!0);EL(_L,hL),EL(vL,gL),_I()},AL=(e,t)=>{let n=DL(e,t),r=uL();OL(n),dL(r)},jL=()=>{kL(),fL()},ML=!1,NL=(e,t,n)=>{let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i},PL=new WeakMap,FL=new WeakMap,IL=new WeakMap,LL=new Set,RL=[],zL=[],BL=new WeakMap,VL=new WeakMap,HL=new WeakSet,UL=cP,WL=e=>{let t=e;for(;t.return;)t=t.return;return t.stateNode??null},GL=()=>{if(UL.size>0)return UL;let e=new Set,t=n=>{let r=sP(n);if(r){let t=WL(r);t&&e.add(t);return}for(let r of Array.from(n.children))if(t(r),e.size>0)return};return t(document.body),e},KL=(e,t)=>{if(!e)return t;if(!t)return e;if(!e.next||!t.next)return t;let n=e.next,r=t.next,i=e===n,a=t===r;return i&&a?(e.next=t,t.next=e):i?(e.next=r,t.next=e):a?(t.next=n,e.next=t):(e.next=r,t.next=n),t},qL=e=>{if(!e||BL.has(e))return;let t={originalPendingDescriptor:Object.getOwnPropertyDescriptor(e,`pending`),pendingValueAtPause:e.pending,bufferedPending:null};typeof e.getSnapshot==`function`&&(t.originalGetSnapshot=e.getSnapshot,t.snapshotValueAtPause=e.getSnapshot(),e.getSnapshot=()=>ML?t.snapshotValueAtPause:t.originalGetSnapshot());let n=t.pendingValueAtPause;Object.defineProperty(e,"pending",{configurable:!0,enumerable:!0,get:()=>ML?null:n,set:e=>{if(ML){e!==null&&(t.bufferedPending=KL(t.bufferedPending??null,e));return}n=e}}),BL.set(e,t)},JL=e=>{if(!e)return[];let t=[],n=e.next;if(!n)return[];let r=n;do r&&=(t.push(r.action),r.next);while(r&&r!==n);return t},YL=e=>{let t=BL.get(e);if(!t)return;t.originalGetSnapshot&&(e.getSnapshot=t.originalGetSnapshot),t.originalPendingDescriptor?Object.defineProperty(e,"pending",t.originalPendingDescriptor):delete e.pending,e.pending=null;let n=e.dispatch;if(typeof n==`function`){let e=JL(t.pendingValueAtPause??null),r=JL(t.bufferedPending??null);for(let t of[...e,...r])zL.push(()=>n(t))}BL.delete(e)},XL=e=>{if(VL.has(e))return;let t={originalDescriptor:Object.getOwnPropertyDescriptor(e,`memoizedValue`),frozenValue:e.memoizedValue};Object.defineProperty(e,"memoizedValue",{configurable:!0,enumerable:!0,get(){return ML?t.frozenValue:t.originalDescriptor?.get?t.originalDescriptor.get.call(this):this._memoizedValue},set(e){if(ML){t.pendingValue=e,t.didReceivePendingValue=!0;return}t.originalDescriptor?.set?t.originalDescriptor.set.call(this,e):this._memoizedValue=e}}),t.originalDescriptor?.get||(e._memoizedValue=t.frozenValue),VL.set(e,t)},ZL=e=>{let t=VL.get(e);t&&(t.originalDescriptor?Object.defineProperty(e,"memoizedValue",t.originalDescriptor):delete e.memoizedValue,t.didReceivePendingValue&&(e.memoizedValue=t.pendingValue),VL.delete(e))},QL=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&qL(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)XL(n),n=n.next},$L=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&YL(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)ZL(n),n=n.next},eR=e=>{let t=e;for(;t;){if(tP(t)&&QL(t),t.child){t=t.child;continue}for(;t!==e&&!t.sibling;)if(t=t.return,!t)return;if(t===e)return;t=t.sibling}},tR=e=>{let t=e;for(;t;){if(tP(t)&&$L(t),t.child){t=t.child;continue}for(;t!==e&&!t.sibling;)if(t=t.return,!t)return;if(t===e)return;t=t.sibling}},nR=e=>{if(PL.has(e))return;let t=e,n={useState:t.useState,useReducer:t.useReducer,useTransition:t.useTransition,useSyncExternalStore:t.useSyncExternalStore};PL.set(e,n),t.useState=(...t)=>{let r=n.useState.apply(e,t);if(!ML||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,NL(FL,a,()=>(...e)=>{ML?zL.push(()=>a(...e)):a(...e)})]},t.useReducer=(...t)=>{let r=n.useReducer.apply(e,t);if(!ML||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,NL(FL,a,()=>(...e)=>{ML?zL.push(()=>a(...e)):a(...e)})]},t.useTransition=(...t)=>{let r=n.useTransition.apply(e,t);if(!ML||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,NL(IL,a,()=>e=>{ML?RL.push(()=>a(e)):a(e)})]},t.useSyncExternalStore=((e,t,r)=>ML?n.useSyncExternalStore(t=>e(()=>{ML?LL.add(t):t()}),t,r):n.useSyncExternalStore(e,t,r))},rR=e=>{let t=e.currentDispatcherRef;if(!t||typeof t!=`object`)return;let n=`H`in t?`H`:`current`,r=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get:()=>(r&&typeof r==`object`&&nR(r),r),set:e=>{r=e}})},iR=e=>{queueMicrotask(()=>{try{for(let t of QN().renderers.values())if(typeof t.scheduleUpdate==`function`){for(let n of e)if(n.current)try{t.scheduleUpdate(n.current)}catch{}}}catch{}})},aR=e=>{for(let t of e)try{t()}catch{}},oR=()=>{for(let e of QN().renderers.values())HL.has(e)||(rR(e),HL.add(e))},sR=()=>{if(ML)return()=>{};oR(),ML=!0;let e=GL();for(let t of e)eR(t.current);return()=>{if(ML)try{let e=GL();for(let t of e)tR(t.current);let t=Array.from(LL),n=RL.slice(),r=zL.slice();ML=!1,aR(t),aR(n),aR(r),iR(e)}finally{LL.clear(),RL.length=0,zL.length=0}}}}));function lR(e){let t=String(e),n=t.length-1;return Dz.context.id+(n?String.fromCharCode(96+n):``)+t}function uR(e){Dz.context=e}function dR(e,t){let n=Rz,r=Iz,i=e.length===0,a=t===void 0?r:t,o=i?Pz:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>vR(()=>zR(o)));Iz=o,Rz=null;try{return NR(s,!0)}finally{Rz=n,Iz=r}}function J(e,t){t=t?Object.assign({},Mz,t):Mz;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[DR.bind(n),e=>(typeof e==`function`&&(e=Lz&&Lz.running&&Lz.sources.has(n)?e(n.tValue):e(n.value)),OR(n,e))]}function fR(e,t,n){kR(jR(e,t,!0,1))}function pR(e,t,n){kR(jR(e,t,!1,1))}function mR(e,t,n){Nz=IR;let r=jR(e,t,!1,1),i=Wz&&TR(Wz);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),Bz?Bz.push(r):kR(r)}function Y(e,t,n){n=n?Object.assign({},Mz,n):Mz;let r=jR(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,kR(r),DR.bind(r)}function hR(e){return e&&typeof e==`object`&&`then`in e}function gR(e,t,n){let r,i,a;typeof t==`function`?(r=e,i=t,a=n||{}):(r=!0,i=e,a=t||{});let o=null,s=Fz,c=null,l=!1,u=!1,d=`initialValue`in a,f=typeof r==`function`&&Y(r),p=new Set,[m,h]=(a.storage||J)(a.initialValue),[g,_]=J(void 0),[v,y]=J(void 0,{equals:!1}),[b,x]=J(d?`ready`:`unresolved`);Dz.context&&(c=Dz.getNextContextId(),a.ssrLoadFrom===`initial`?s=a.initialValue:Dz.load&&Dz.has(c)&&(s=Dz.load(c)));function S(e,t,n,r){return o===e&&(o=null,r!==void 0&&(d=!0),(e===s||t===s)&&a.onHydrated&&queueMicrotask(()=>a.onHydrated(r,{value:t})),s=Fz,Lz&&e&&l?(Lz.promises.delete(e),l=!1,NR(()=>{Lz.running=!0,C(t,n)},!1)):C(t,n)),t}function C(e,t){NR(()=>{t===void 0&&h(()=>e),x(t===void 0?d?`ready`:`unresolved`:`errored`),_(t);for(let e of p.keys())e.decrement();p.clear()},!1)}function w(){let e=Wz&&TR(Wz),t=m(),n=g();if(n!==void 0&&!o)throw n;return Rz&&!Rz.user&&e&&fR(()=>{v(),o&&(e.resolved&&Lz&&l?Lz.promises.add(o):p.has(e)||(e.increment(),p.add(e)))}),t}function T(e=!0){if(e!==!1&&u)return;u=!1;let t=f?f():r;if(l=Lz&&Lz.running,t==null||t===!1){S(o,vR(m));return}Lz&&o&&Lz.promises.delete(o);let n,a=s===Fz?vR(()=>{try{return i(t,{value:m(),refetching:e})}catch(e){n=e}}):s;if(n!==void 0){S(o,void 0,VR(n),t);return}else if(!hR(a))return S(o,a,void 0,t),a;return o=a,`v`in a?(a.s===1?S(o,a.v,void 0,t):S(o,void 0,VR(a.v),t),a):(u=!0,queueMicrotask(()=>u=!1),NR(()=>{x(d?`refreshing`:`pending`),y()},!1),a.then(e=>S(a,e,void 0,t),e=>S(a,void 0,VR(e),t)))}Object.defineProperties(w,{state:{get:()=>b()},error:{get:()=>g()},loading:{get(){let e=b();return e===`pending`||e===`refreshing`}},latest:{get(){if(!d)return w();let e=g();if(e&&!o)throw e;return m()}}});let E=Iz;return f?fR(()=>(E=Iz,T(!1))):T(!1),[w,{refetch:e=>CR(E,()=>T(e)),mutate:h}]}function _R(e){return NR(e,!1)}function vR(e){if(Rz===null)return e();let t=Rz;Rz=null;try{return e()}finally{Rz=t}}function yR(e,t,n){let r=Array.isArray(e),i,a=n&&n.defer;return n=>{let o;if(r){o=Array(e.length);for(let t=0;t<e.length;t++)o[t]=e[t]()}else o=e();if(a)return a=!1,n;let s=vR(()=>t(o,i,n));return i=o,s}}function bR(e){mR(()=>vR(e))}function xR(e){return Iz===null||(Iz.cleanups===null?Iz.cleanups=[e]:Iz.cleanups.push(e)),e}function SR(){return Rz}function CR(e,t){let n=Iz,r=Rz;Iz=e,Rz=null;try{return NR(t,!0)}catch(e){HR(e)}finally{Iz=n,Rz=r}}function wR(e,t){let n=Symbol(`context`);return{id:n,Provider:WR(n),defaultValue:e}}function TR(e){let t;return Iz&&Iz.context&&(t=Iz.context[e.id])!==void 0?t:e.defaultValue}function ER(e){let t=Y(e),n=Y(()=>UR(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}function DR(){let e=Lz&&Lz.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===1)kR(this);else{let e=zz;zz=null,NR(()=>LR(this),!1),zz=e}if(Rz){let e=this.observers?this.observers.length:0;Rz.sources?(Rz.sources.push(this),Rz.sourceSlots.push(e)):(Rz.sources=[this],Rz.sourceSlots=[e]),this.observers?(this.observers.push(Rz),this.observerSlots.push(Rz.sources.length-1)):(this.observers=[Rz],this.observerSlots=[Rz.sources.length-1])}return e&&Lz.sources.has(this)?this.tValue:this.value}function OR(e,t,n){let r=Lz&&Lz.running&&Lz.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(Lz){let r=Lz.running;(r||!n&&Lz.sources.has(e))&&(Lz.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&NR(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=Lz&&Lz.running;r&&Lz.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?zz.push(n):Bz.push(n),n.observers&&RR(n)),r?n.tState=1:n.state=1)}if(zz.length>1e6)throw zz=[],Error()},!1)}return t}function kR(e){if(!e.fn)return;zR(e);let t=Vz;AR(e,Lz&&Lz.running&&Lz.sources.has(e)?e.tValue:e.value,t),Lz&&!Lz.running&&Lz.sources.has(e)&&queueMicrotask(()=>{NR(()=>{Lz&&(Lz.running=!0),Rz=Iz=e,AR(e,e.tValue,t),Rz=Iz=null},!1)})}function AR(e,t,n){let r,i=Iz,a=Rz;Rz=Iz=e;try{r=e.fn(t)}catch(t){return e.pure&&(Lz&&Lz.running?(e.tState=1,e.tOwned&&e.tOwned.forEach(zR),e.tOwned=void 0):(e.state=1,e.owned&&e.owned.forEach(zR),e.owned=null)),e.updatedAt=n+1,HR(t)}finally{Rz=a,Iz=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?OR(e,r,!0):Lz&&Lz.running&&e.pure?(Lz.sources.has(e)||(e.value=r),Lz.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function jR(e,t,n,r=1,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Iz,context:Iz?Iz.context:null,pure:n};return Lz&&Lz.running&&(a.state=0,a.tState=r),Iz===null||Iz!==Pz&&(Lz&&Lz.running&&Iz.pure?Iz.tOwned?Iz.tOwned.push(a):Iz.tOwned=[a]:Iz.owned?Iz.owned.push(a):Iz.owned=[a]),a}function MR(e){let t=Lz&&Lz.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===2)return LR(e);if(e.suspense&&vR(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Vz);){if(t&&Lz.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(Lz.disposed.has(t))return}if((t?e.tState:e.state)===1)kR(e);else if((t?e.tState:e.state)===2){let t=zz;zz=null,NR(()=>LR(e,n[0]),!1),zz=t}}}function NR(e,t){if(zz)return e();let n=!1;t||(zz=[]),Bz?n=!0:Bz=[],Vz++;try{let t=e();return PR(n),t}catch(e){n||(Bz=null),zz=null,HR(e)}}function PR(e){if(zz&&=(FR(zz),null),e)return;let t;if(Lz){if(!Lz.promises.size&&!Lz.queue.size){let e=Lz.sources,n=Lz.disposed;Bz.push.apply(Bz,Lz.effects),t=Lz.resolve;for(let e of Bz)`tState`in e&&(e.state=e.tState),delete e.tState;Lz=null,NR(()=>{for(let e of n)zR(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)zR(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}Uz(!1)},!1)}else if(Lz.running){Lz.running=!1,Lz.effects.push.apply(Lz.effects,Bz),Bz=null,Uz(!0);return}}let n=Bz;Bz=null,n.length&&NR(()=>Nz(n),!1),t&&t()}function FR(e){for(let t=0;t<e.length;t++)MR(e[t])}function IR(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:MR(r)}if(Dz.context){if(Dz.count){Dz.effects||=[],Dz.effects.push(...e.slice(0,n));return}uR()}for(Dz.effects&&(Dz.done||!Dz.count)&&(e=[...Dz.effects,...e],n+=Dz.effects.length,delete Dz.effects),t=0;t<n;t++)MR(e[t])}function LR(e,t){let n=Lz&&Lz.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===1?i!==t&&(!i.updatedAt||i.updatedAt<Vz)&&MR(i):e===2&&LR(i,t)}}}function RR(e){let t=Lz&&Lz.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=2:r.state=2,r.pure?zz.push(r):Bz.push(r),r.observers&&RR(r))}}function zR(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)zR(e.tOwned[t]);delete e.tOwned}if(Lz&&Lz.running&&e.pure)BR(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)zR(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}Lz&&Lz.running?e.tState=0:e.state=0}function BR(e,t){if(t||(e.tState=0,Lz.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)BR(e.owned[t])}function VR(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function HR(e,t=Iz){throw VR(e)}function UR(e){if(typeof e==`function`&&!e.length)return UR(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=UR(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function WR(e,t){return function(t){let n;return pR(()=>n=vR(()=>(Iz.context={...Iz.context,[e]:t.value},ER(()=>t.children))),void 0),n}}function GR(e){for(let t=0;t<e.length;t++)e[t]()}function KR(e,t,n={}){let r=[],i=[],a=[],o=0,s=t.length>1?[]:null;return xR(()=>GR(a)),()=>{let c=e()||[],l=c.length,u,d;return c[jz],vR(()=>{let e,t,p,m,h,g,_,v,y;if(l===0)o!==0&&(GR(a),a=[],r=[],i=[],o=0,s&&=[]),n.fallback&&(r=[Gz],i[0]=dR(e=>(a[0]=e,n.fallback())),o=1);else if(o===0){for(i=Array(l),d=0;d<l;d++)r[d]=c[d],i[d]=dR(f);o=l}else{for(p=Array(l),m=Array(l),s&&(h=Array(l)),g=0,_=Math.min(o,l);g<_&&r[g]===c[g];g++);for(_=o-1,v=l-1;_>=g&&v>=g&&r[_]===c[v];_--,v--)p[v]=i[_],m[v]=a[_],s&&(h[v]=s[_]);for(e=new Map,t=Array(v+1),d=v;d>=g;d--)y=c[d],u=e.get(y),t[d]=u===void 0?-1:u,e.set(y,d);for(u=g;u<=_;u++)y=r[u],d=e.get(y),d!==void 0&&d!==-1?(p[d]=i[u],m[d]=a[u],s&&(h[d]=s[u]),d=t[d],e.set(y,d)):a[u]();for(d=g;d<l;d++)d in p?(i[d]=p[d],a[d]=m[d],s&&(s[d]=h[d],s[d](d))):i[d]=dR(f);i=i.slice(0,o=l),r=c.slice(0)}return i});function f(e){if(a[d]=e,s){let[e,n]=J(d);return s[d]=n,t(c[d],e)}return t(c[d])}}}function qR(e,t,n={}){let r=[],i=[],a=[],o=[],s=0,c;return xR(()=>GR(a)),()=>{let l=e()||[],u=l.length;return l[jz],vR(()=>{if(u===0)return s!==0&&(GR(a),a=[],r=[],i=[],s=0,o=[]),n.fallback&&(r=[Gz],i[0]=dR(e=>(a[0]=e,n.fallback())),s=1),i;for(r[0]===Gz&&(a[0](),a=[],r=[],i=[],s=0),c=0;c<u;c++)c<r.length&&r[c]!==l[c]?o[c](()=>l[c]):c>=r.length&&(i[c]=dR(d));for(;c<r.length;c++)a[c]();return s=o.length=a.length=u,r=l.slice(0),i=i.slice(0,s)});function d(e){a[c]=e;let[n,r]=J(l[c]);return o[c]=r,t(n,c)}}}function X(e,t){return vR(()=>e(t||{}))}function JR(){return!0}function YR(e){return(e=typeof e==`function`?e():e)?e:{}}function XR(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function ZR(...e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];t||=!!r&&kz in r,e[n]=typeof r==`function`?(t=!0,Y(r)):r}if(Az&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=YR(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in YR(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(YR(e[n])));return[...new Set(t)]}},Kz);let n={},r=Object.create(null);for(let t=e.length-1;t>=0;t--){let i=e[t];if(!i)continue;let a=Object.getOwnPropertyNames(i);for(let e=a.length-1;e>=0;e--){let t=a[e];if(t===`__proto__`||t===`constructor`)continue;let o=Object.getOwnPropertyDescriptor(i,t);if(!r[t])r[t]=o.get?{enumerable:!0,configurable:!0,get:XR.bind(n[t]=[o.get.bind(i)])}:o.value===void 0?void 0:o;else{let e=n[t];e&&(o.get?e.push(o.get.bind(i)):o.value!==void 0&&e.push(()=>o.value))}}}let i={},a=Object.keys(r);for(let e=a.length-1;e>=0;e--){let t=a[e],n=r[t];n&&n.get?Object.defineProperty(i,t,n):i[t]=n?n.value:void 0}return i}function QR(e,...t){let n=t.length;if(Az&&kz in e){let r=n>1?t.flat():t[0],i=t.map(t=>new Proxy({get(n){return t.includes(n)?e[n]:void 0},has(n){return t.includes(n)&&n in e},keys(){return t.filter(t=>t in e)}},Kz));return i.push(new Proxy({get(t){return r.includes(t)?void 0:e[t]},has(t){return!r.includes(t)&&t in e},keys(){return Object.keys(e).filter(e=>!r.includes(e))}},Kz)),i}let r=[];for(let e=0;e<=n;e++)r[e]={};for(let i of Object.getOwnPropertyNames(e)){let a=n;for(let e=0;e<t.length;e++)if(t[e].includes(i)){a=e;break}let o=Object.getOwnPropertyDescriptor(e,i);!o.get&&!o.set&&o.enumerable&&o.writable&&o.configurable?r[a][i]=o.value:Object.defineProperty(r[a],i,o)}return r}function $R(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return Y(KR(()=>e.each,e.children,t||void 0))}function ez(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return Y(qR(()=>e.each,e.children,t||void 0))}function tz(e){let t=e.keyed,n=Y(()=>e.when,void 0,void 0),r=t?n:Y(n,void 0,{equals:(e,t)=>!e==!t});return Y(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?vR(()=>a(t?i:()=>{if(!vR(r))throw qz(`Show`);return n()})):a}return e.fallback},void 0,void 0)}function nz(e){let t=ER(()=>e.children),n=Y(()=>{let e=t(),n=Array.isArray(e)?e:[e],r=()=>void 0;for(let e=0;e<n.length;e++){let t=e,i=n[e],a=r,o=Y(()=>a()?void 0:i.when,void 0,void 0),s=i.keyed?o:Y(o,void 0,{equals:(e,t)=>!e==!t});r=()=>a()||(s()?[t,o,i]:void 0)}return r});return Y(()=>{let t=n()();if(!t)return e.fallback;let[r,i,a]=t,o=a.children;return typeof o==`function`&&o.length>0?vR(()=>o(a.keyed?i():()=>{if(vR(n)()?.[0]!==r)throw qz(`Match`);return i()})):o},void 0,void 0)}function rz(e){return e}function iz(e,t){let n=Zz[e];return typeof n==`object`?n[t]?n.$:void 0:n}function az(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null)if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&!((d=l.get(t[c]))==null||d!==r+u);)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++;else t[o++].remove()}}}function oz(e,t,n,r={}){let i;return dR(r=>{i=r,t===document?e():$(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function Z(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>vR(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function sz(e,t=window.document){let n=t[tB]||(t[tB]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,Sz))}}function Q(e,t,n){vz(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function cz(e,t,n,r){vz(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function lz(e,t,n){vz(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function uz(e,t){vz(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function dz(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function fz(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];!r||r===`undefined`||t[r]||(bz(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];!i||i===`undefined`||n[i]===o||!o||(bz(e,i,!0),n[i]=o)}return n}function pz(e,t,n){if(!t)return n?Q(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||={},t||={};let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function mz(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function hz(e,t={},n,r){let i={};return r||pR(()=>i.children=Cz(e,t.children,i.children)),pR(()=>typeof t.ref==`function`&&gz(t.ref,e)),pR(()=>_z(e,t,n,!0,i,!0)),i}function gz(e,t,n){return vR(()=>e(t,n))}function $(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return Cz(e,t,r,n);pR(r=>Cz(e,t(),r,n),r)}function _z(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=xz(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||Cz(e,t.children);continue}let s=t[o];i[o]=xz(e,o,s,i[o],n,a,t)}}function vz(e){return!!Dz.context&&!Dz.done&&(!e||e.isConnected)}function yz(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function bz(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function xz(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return pz(e,n,r);if(t===`classList`)return fz(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=Qz.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(dz(e,i,n,a),a&&sz([i]))}else if(t.slice(0,5)===`attr:`)Q(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)lz(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=Yz.has(t))||!i&&((u=iz(t,e.tagName))||(c=Jz.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(vz(e))return n;t===`class`||t===`className`?uz(e,n):s&&!c&&!l?e[yz(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&$z[t.split(`:`)[0]];r?cz(e,r,t,n):Q(e,Xz[t]||t,n)}return n}function Sz(e){if(Dz.registry&&Dz.events&&Dz.events.find(([t,n])=>n===e))return;let t=e.target,n=`$$${e.type}`,r=e.target,i=e.currentTarget,a=t=>Object.defineProperty(e,"target",{configurable:!0,value:t}),o=()=>{let r=t[n];if(r&&!t.disabled){let i=t[`${n}Data`];if(i===void 0?r.call(t,e):r.call(t,i,e),e.cancelBubble)return}return t.host&&typeof t.host!=`string`&&!t.host._$host&&t.contains(e.target)&&a(t.host),!0},s=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),Dz.registry&&!Dz.done&&(Dz.done=_$HY.done=!0),e.composedPath){let n=e.composedPath();a(n[0]);for(let e=0;e<n.length-2&&(t=n[e],o());e++){if(t._$host){t=t._$host,s();break}if(t.parentNode===i)break}}else s();a(r)}function Cz(e,t,n,r,i){let a=vz(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=Ez(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=Ez(e,n,r)}else if(o===`function`)return pR(()=>{let i=t();for(;typeof i==`function`;)i=i();n=Cz(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(wz(o,t,n,i))return pR(()=>n=Cz(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=Ez(e,n,r),s)return n}else c?n.length===0?Tz(e,o,r):az(e,n,o):(n&&Ez(e),Tz(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=Ez(e,n,r,t);Ez(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function wz(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(!(o==null||o===!0||o===!1))if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=wz(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=wz(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0;else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}return i}function Tz(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Ez(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}var Dz,Oz,kz,Az,jz,Mz,Nz,Pz,Fz,Iz,Lz,Rz,zz,Bz,Vz,Hz,Uz,Wz,Gz,Kz,qz,Jz,Yz,Xz,Zz,Qz,$z,eB,tB,nB,rB,iB,aB,oB,sB,cB,lB,uB,dB,fB,pB,mB,hB,gB,_B,vB,yB,bB,xB,SB,CB,wB,TB,EB,DB,OB,kB,AB,jB,MB,NB,PB,FB,IB,LB,RB,zB,BB,VB,HB,UB,WB,GB,KB,qB,JB,YB,XB,ZB,QB,$B,eV,tV,nV,rV,iV,aV,oV,sV,cV,lV,uV,dV,fV,pV,mV,hV,gV,_V,vV,yV,bV,xV,SV,CV,wV,TV,EV,DV,OV,kV,AV,jV,MV,NV,PV,FV,IV,LV,RV,zV,BV,VV=t((()=>{cR(),Dz={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return lR(this.context.count)},getNextContextId(){return lR(this.context.count++)}},Oz=(e,t)=>e===t,kz=Symbol(`solid-proxy`),Az=typeof Proxy==`function`,jz=Symbol(`solid-track`),Mz={equals:Oz},Nz=FR,Pz={owned:null,cleanups:null,context:null,owner:null},Fz={},Iz=null,Lz=null,Rz=null,zz=null,Bz=null,Vz=0,[Hz,Uz]=J(!1),Gz=Symbol(`fallback`),Kz={get(e,t,n){return t===kz?n:e.get(t)},has(e,t){return t===kz||e.has(t)},set:JR,deleteProperty:JR,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:JR,deleteProperty:JR}},ownKeys(e){return e.keys()}},qz=e=>`Stale read from <${e}>.`,Jz=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)]),Yz=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),Xz=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),Zz=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}}),Qz=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),$z={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},eB=e=>Y(()=>e()),tB=`_$DX_DELEGATE`,nB=e=>!!(e?.isConnected??e?.ownerDocument?.contains(e)),rB=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],iB=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},aB=e=>{if(document.designMode===`on`)return!0;let t=iB(e);if(!t)return!1;if(t.isContentEditable)return!0;let n=NN(t);return rB.some(e=>e===n||e===t.role)},oB=e=>{let t=e.target;if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){let e=t.selectionStart??0;return(t.selectionEnd??0)-e>0}return!1},sB=()=>{let e=window.getSelection();return e?e.toString().length>0:!1},cB=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+%?))?\s*\)$/,lB=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`),uB=(e,t,n,r=1)=>{let i=lB(e),a=lB(t),o=lB(n);return r>=1?`#${i}${a}${o}`:`#${i}${a}${o}${lB(r*255)}`},dB=e=>{if(!e.startsWith(`#`))return null;let t=e.slice(1);if(t.length!==6&&t.length!==8)return null;let n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16),a=t.length===8?parseInt(t.slice(6,8),16)/255:1;return!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)?null:{red:n,green:r,blue:i,alpha:a}},fB=e=>{let t=e.match(cB);if(!t)return null;let n=1;if(t[4]!==void 0){let e=t[4];n=e.endsWith(`%`)?Number(e.slice(0,-1))/100:Number(e)}return uB(Number(t[1]),Number(t[2]),Number(t[3]),n)},pB=e=>{let t=e.match(cB);return!t||t[4]===void 0?!1:(t[4].endsWith(`%`)?Number(t[4].slice(0,-1))/100:Number(t[4]))===0},mB=/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,hB=e=>{let t=e.match(mB);if(!t)return null;let n=t[1];return n.length===3?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`:n.length===4?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}${n[3]}${n[3]}`:`#${n}`},gB=`rgba(0, 0, 0, 0)`,_B=/^oklch\(\s*([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+)(deg|grad|rad|turn)?(?:\s*\/\s*([+-]?\d*\.?\d+%?))?\s*\)$/i,vB=180/Math.PI,yB=(e,t)=>e.endsWith(`%`)?Number(e.slice(0,-1))/100*t:Number(e),bB=(e,t)=>{let n=Number(e);return t===`grad`?n*.9:t===`rad`?n*vB:t===`turn`?n*360:n},xB=e=>{let t=Math.max(0,Math.min(1,e));return(t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055)*255},SB=e=>{let t=e.match(_B);if(!t)return null;let n=yB(t[1],1),r=yB(t[2],.4),i=bB(t[3],t[4])*Math.PI/180,a=t[5]===void 0?1:yB(t[5],1);if(![n,r,i,a].every(Number.isFinite))return null;let o=r*Math.cos(i),s=r*Math.sin(i),c=n+.3963377774*o+.2158037573*s,l=n-.1055613458*o-.0638541728*s,u=n-.0894841775*o-1.291485548*s,d=c**3,f=l**3,p=u**3,m=4.0767416621*d-3.3077115913*f+.2309699292*p,h=-1.2684380046*d+2.6097574011*f-.3413193965*p,g=-.0041960863*d-.7034186147*f+1.707614701*p;return uB(xB(m),xB(h),xB(g),Math.max(0,Math.min(1,a)))},CB=null,wB=()=>CB||(typeof document>`u`?null:(CB=document.createElement(`canvas`).getContext(`2d`,{willReadFrequently:!0}),CB)),TB=(e,t)=>{e.clearRect(0,0,1,1),e.fillStyle=t,e.fillRect(0,0,1,1);let n=e.getImageData(0,0,1,1).data;return n[3]===0?xN:uB(n[0],n[1],n[2],n[3]/255)},EB=e=>{let t=e.trim();if(!t)return null;if(t.toLowerCase()===`transparent`)return xN;let n=hB(t);if(n)return n;let r=SB(t);if(r)return r;let i=wB();if(!i)return null;i.fillStyle=gB,i.fillStyle=t;let a=i.fillStyle;return typeof a==`string`?a.toLowerCase()===gB?t.toLowerCase().replace(/\s+/g,``)===`rgba(0,0,0,0)`?xN:null:a.startsWith(`#`)&&a.length===7?a:a.startsWith(`rgb`)?fB(a):TB(i,t):null},DB=(e,t,n)=>Math.max(t,Math.min(e,n)),OB=null,kB=()=>{if(typeof navigator>`u`||!(`userAgentData`in navigator))return null;let e=navigator.userAgentData;if(typeof e!=`object`||!e||!(`platform`in e))return null;let t=e.platform;return typeof t==`string`?t:null},AB=()=>{if(OB===null){if(typeof navigator>`u`)return OB=!1,OB;let e=navigator.platform??kB()??navigator.userAgent;OB=/Mac|iPhone|iPad|iPod/i.test(e)}return OB},jB=(e,t)=>{try{return e.composedPath().some(e=>e instanceof HTMLElement&&e.hasAttribute(t))}catch{return!1}},MB=`padding-top.padding-right.padding-bottom.padding-left.margin-top.margin-right.margin-bottom.margin-left.gap.row-gap.column-gap.font-size.line-height.letter-spacing.border-radius.border-top-left-radius.border-top-right-radius.border-bottom-right-radius.border-bottom-left-radius.border-width.border-top-width.border-right-width.border-bottom-width.border-left-width.opacity.width.height.min-width.min-height.max-width.max-height.top.right.bottom.left.z-index`.split(`.`),NB=-128,PB=-512,FB=-9999,IB=9999,LB=new Set([`letter-spacing`,`gap`,`row-gap`,`column-gap`]),RB=new Set([`z-index`]),zB=[{key:`padding`,label:`padding`,longhands:[`padding-top`,`padding-right`,`padding-bottom`,`padding-left`]},{key:`padding-top,padding-bottom`,label:`padding-y`,longhands:[`padding-top`,`padding-bottom`]},{key:`padding-left,padding-right`,label:`padding-x`,longhands:[`padding-left`,`padding-right`]},{key:`padding-top`,label:`padding top`,longhands:[`padding-top`]},{key:`padding-right`,label:`padding right`,longhands:[`padding-right`]},{key:`padding-bottom`,label:`padding bottom`,longhands:[`padding-bottom`]},{key:`padding-left`,label:`padding left`,longhands:[`padding-left`]}],BB=[{key:`margin`,label:`margin`,longhands:[`margin-top`,`margin-right`,`margin-bottom`,`margin-left`]},{key:`margin-top,margin-bottom`,label:`margin-y`,longhands:[`margin-top`,`margin-bottom`]},{key:`margin-left,margin-right`,label:`margin-x`,longhands:[`margin-left`,`margin-right`]},{key:`margin-top`,label:`margin top`,longhands:[`margin-top`]},{key:`margin-right`,label:`margin right`,longhands:[`margin-right`]},{key:`margin-bottom`,label:`margin bottom`,longhands:[`margin-bottom`]},{key:`margin-left`,label:`margin left`,longhands:[`margin-left`]}],VB=[{key:`gap`,label:`gap`,longhands:[`row-gap`,`column-gap`]},{key:`row-gap`,label:`row gap`,longhands:[`row-gap`]},{key:`column-gap`,label:`column gap`,longhands:[`column-gap`]}],HB=[{key:`border-radius`,label:`border radius`,longhands:[`border-top-left-radius`,`border-top-right-radius`,`border-bottom-right-radius`,`border-bottom-left-radius`]},{key:`border-top-left-radius,border-top-right-radius`,label:`top corners`,longhands:[`border-top-left-radius`,`border-top-right-radius`]},{key:`border-bottom-left-radius,border-bottom-right-radius`,label:`bottom corners`,longhands:[`border-bottom-left-radius`,`border-bottom-right-radius`]},{key:`border-top-left-radius,border-bottom-left-radius`,label:`left corners`,longhands:[`border-top-left-radius`,`border-bottom-left-radius`]},{key:`border-top-right-radius,border-bottom-right-radius`,label:`right corners`,longhands:[`border-top-right-radius`,`border-bottom-right-radius`]},{key:`border-top-left-radius`,label:`top left radius`,longhands:[`border-top-left-radius`]},{key:`border-top-right-radius`,label:`top right radius`,longhands:[`border-top-right-radius`]},{key:`border-bottom-right-radius`,label:`bottom right radius`,longhands:[`border-bottom-right-radius`]},{key:`border-bottom-left-radius`,label:`bottom left radius`,longhands:[`border-bottom-left-radius`]}],UB=[{key:`top,right,bottom,left`,label:`inset`,longhands:[`top`,`right`,`bottom`,`left`]},{key:`top,bottom`,label:`inset-y`,longhands:[`top`,`bottom`]},{key:`left,right`,label:`inset-x`,longhands:[`left`,`right`]},{key:`top`,label:`top`,longhands:[`top`]},{key:`right`,label:`right`,longhands:[`right`]},{key:`bottom`,label:`bottom`,longhands:[`bottom`]},{key:`left`,label:`left`,longhands:[`left`]}],WB=new Set(UB.map(e=>e.key)),GB=[zB,BB,VB,HB,[{key:`border-width`,label:`border width`,longhands:[`border-top-width`,`border-right-width`,`border-bottom-width`,`border-left-width`]},{key:`border-top-width`,label:`border top width`,longhands:[`border-top-width`]},{key:`border-right-width`,label:`border right width`,longhands:[`border-right-width`]},{key:`border-bottom-width`,label:`border bottom width`,longhands:[`border-bottom-width`]},{key:`border-left-width`,label:`border left width`,longhands:[`border-left-width`]}],[{key:`width,height`,label:`size`,longhands:[`width`,`height`]},{key:`width`,label:`width`,longhands:[`width`]},{key:`height`,label:`height`,longhands:[`height`]}],UB],KB=[{key:`font-size`,label:`font size`},{key:`line-height`,label:`line height`},{key:`letter-spacing`,label:`letter spacing`},{key:`min-width`,label:`min width`},{key:`min-height`,label:`min height`},{key:`max-width`,label:`max width`},{key:`max-height`,label:`max height`},{key:`z-index`,label:`z-index`},{key:`opacity`,label:`opacity`}],qB=[{key:`color`,label:`text color`,alwaysShow:!0},{key:`background-color`,label:`background`,alwaysShow:!0},{key:`border-color`,label:`border color`},{key:`fill`,label:`fill`},{key:`stroke`,label:`stroke`}],JB=[{value:`ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`,label:`sans`},{value:`ui-serif, Georgia, Cambria, "Times New Roman", Times, serif`,label:`serif`},{value:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`,label:`mono`},{value:`system-ui, sans-serif`,label:`system`},{value:`serif`,label:`serif`},{value:`monospace`,label:`mono`}],YB=e=>{let t=e.trim();return JB.some(e=>e.value===t)?JB:[{value:t,label:`current`},...JB]},XB={key:`font-family`,label:`font family`},ZB=[{key:`display`,label:`display`,options:[{value:`block`,label:`block`},{value:`flex`,label:`flex`},{value:`inline-block`,label:`inline-block`},{value:`inline`,label:`inline`},{value:`grid`,label:`grid`},{value:`none`,label:`none`}]},{key:`text-align`,label:`text align`,options:[{value:`left`,label:`left`},{value:`center`,label:`center`},{value:`right`,label:`right`},{value:`justify`,label:`justify`}]},{key:`font-style`,label:`font style`,options:[{value:`normal`,label:`normal`},{value:`italic`,label:`italic`}]},{key:`text-transform`,label:`text transform`,options:[{value:`none`,label:`none`},{value:`uppercase`,label:`uppercase`},{value:`lowercase`,label:`lowercase`},{value:`capitalize`,label:`capitalize`}]},{key:`white-space`,label:`white space`,options:[{value:`normal`,label:`normal`},{value:`nowrap`,label:`nowrap`},{value:`pre`,label:`pre`},{value:`pre-wrap`,label:`pre-wrap`},{value:`pre-line`,label:`pre-line`},{value:`break-spaces`,label:`break-spaces`}]},{key:`word-break`,label:`word break`,options:[{value:`normal`,label:`normal`},{value:`break-all`,label:`break-all`},{value:`keep-all`,label:`keep-all`}]},{key:`overflow-wrap`,label:`wrap`,options:[{value:`normal`,label:`normal`},{value:`break-word`,label:`break-word`},{value:`anywhere`,label:`anywhere`}]},{key:`font-variant-numeric`,label:`number style`,options:[{value:`normal`,label:`normal`},{value:`tabular-nums`,label:`tabular`},{value:`proportional-nums`,label:`proportional`},{value:`lining-nums`,label:`lining`},{value:`oldstyle-nums`,label:`oldstyle`},{value:`slashed-zero`,label:`slashed zero`}]},{key:`text-decoration-line`,label:`decoration`,options:[{value:`none`,label:`none`},{value:`underline`,label:`underline`},{value:`line-through`,label:`strike`}]},{key:`border-style`,label:`border style`,options:[{value:`none`,label:`none`},{value:`solid`,label:`solid`},{value:`dashed`,label:`dashed`},{value:`dotted`,label:`dotted`}]},{key:`visibility`,label:`visibility`,options:[{value:`visible`,label:`visible`},{value:`hidden`,label:`hidden`}]},{key:`align-items`,label:`align items`,options:[{value:`stretch`,label:`stretch`},{value:`flex-start`,label:`start`},{value:`center`,label:`center`},{value:`flex-end`,label:`end`},{value:`baseline`,label:`baseline`}]},{key:`justify-content`,label:`justify content`,options:[{value:`flex-start`,label:`start`},{value:`center`,label:`center`},{value:`flex-end`,label:`end`},{value:`space-between`,label:`between`},{value:`space-around`,label:`around`},{value:`space-evenly`,label:`evenly`}]},{key:`font-weight`,label:`font weight`,options:[{value:`100`,label:`thin`},{value:`200`,label:`extra-light`},{value:`300`,label:`light`},{value:`400`,label:`normal`},{value:`500`,label:`medium`},{value:`600`,label:`semibold`},{value:`700`,label:`bold`},{value:`800`,label:`extra-bold`},{value:`900`,label:`black`}]}],QB=[...MB,`color`,`background-color`,`border-color`,`fill`,`stroke`,`font-family`,`display`,`text-align`,`font-style`,`text-transform`,`white-space`,`word-break`,`overflow-wrap`,`font-variant-numeric`,`text-decoration-line`,`border-style`,`visibility`,`align-items`,`justify-content`,`font-weight`],$B=e=>Number.isInteger(e)?e:Math.round(e*100)/100,eV=e=>Number.isInteger(e)?String(e):e.toFixed(2).replace(/\.?0+$/,``),tV=e=>Number.isFinite(e)?eV($B(e)):String(e),nV=e=>Math.round(e),rV=(e,t)=>{if(e.kind===`color`||e.kind===`enum`)return typeof t==`string`?t:e.value;let n=typeof t==`number`?t:e.value;return e.key===`opacity`&&e.unit===`%`?eV($B(n/100)):`${eV($B(n))}${e.unit}`},iV={slate:{50:`#f8fafc`,100:`#f1f5f9`,200:`#e2e8f0`,300:`#cbd5e1`,400:`#94a3b8`,500:`#64748b`,600:`#475569`,700:`#334155`,800:`#1e293b`,900:`#0f172a`,950:`#020617`},gray:{50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#1f2937`,900:`#111827`,950:`#030712`},zinc:{50:`#fafafa`,100:`#f4f4f5`,200:`#e4e4e7`,300:`#d4d4d8`,400:`#a1a1aa`,500:`#71717a`,600:`#52525b`,700:`#3f3f46`,800:`#27272a`,900:`#18181b`,950:`#09090b`},neutral:{50:`#fafafa`,100:`#f5f5f5`,200:`#e5e5e5`,300:`#d4d4d4`,400:`#a3a3a3`,500:`#737373`,600:`#525252`,700:`#404040`,800:`#262626`,900:`#171717`,950:`#0a0a0a`},stone:{50:`#fafaf9`,100:`#f5f5f4`,200:`#e7e5e4`,300:`#d6d3d1`,400:`#a8a29e`,500:`#78716c`,600:`#57534e`,700:`#44403c`,800:`#292524`,900:`#1c1917`,950:`#0c0a09`},red:{50:`#fef2f2`,100:`#fee2e2`,200:`#fecaca`,300:`#fca5a5`,400:`#f87171`,500:`#ef4444`,600:`#dc2626`,700:`#b91c1c`,800:`#991b1b`,900:`#7f1d1d`,950:`#450a0a`},orange:{50:`#fff7ed`,100:`#ffedd5`,200:`#fed7aa`,300:`#fdba74`,400:`#fb923c`,500:`#f97316`,600:`#ea580c`,700:`#c2410c`,800:`#9a3412`,900:`#7c2d12`,950:`#431407`},amber:{50:`#fffbeb`,100:`#fef3c7`,200:`#fde68a`,300:`#fcd34d`,400:`#fbbf24`,500:`#f59e0b`,600:`#d97706`,700:`#b45309`,800:`#92400e`,900:`#78350f`,950:`#451a03`},yellow:{50:`#fefce8`,100:`#fef9c3`,200:`#fef08a`,300:`#fde047`,400:`#facc15`,500:`#eab308`,600:`#ca8a04`,700:`#a16207`,800:`#854d0e`,900:`#713f12`,950:`#422006`},lime:{50:`#f7fee7`,100:`#ecfccb`,200:`#d9f99d`,300:`#bef264`,400:`#a3e635`,500:`#84cc16`,600:`#65a30d`,700:`#4d7c0f`,800:`#3f6212`,900:`#365314`,950:`#1a2e05`},green:{50:`#f0fdf4`,100:`#dcfce7`,200:`#bbf7d0`,300:`#86efac`,400:`#4ade80`,500:`#22c55e`,600:`#16a34a`,700:`#15803d`,800:`#166534`,900:`#14532d`,950:`#052e16`},emerald:{50:`#ecfdf5`,100:`#d1fae5`,200:`#a7f3d0`,300:`#6ee7b7`,400:`#34d399`,500:`#10b981`,600:`#059669`,700:`#047857`,800:`#065f46`,900:`#064e3b`,950:`#022c22`},teal:{50:`#f0fdfa`,100:`#ccfbf1`,200:`#99f6e4`,300:`#5eead4`,400:`#2dd4bf`,500:`#14b8a6`,600:`#0d9488`,700:`#0f766e`,800:`#115e59`,900:`#134e4a`,950:`#042f2e`},cyan:{50:`#ecfeff`,100:`#cffafe`,200:`#a5f3fc`,300:`#67e8f9`,400:`#22d3ee`,500:`#06b6d4`,600:`#0891b2`,700:`#0e7490`,800:`#155e75`,900:`#164e63`,950:`#083344`},sky:{50:`#f0f9ff`,100:`#e0f2fe`,200:`#bae6fd`,300:`#7dd3fc`,400:`#38bdf8`,500:`#0ea5e9`,600:`#0284c7`,700:`#0369a1`,800:`#075985`,900:`#0c4a6e`,950:`#082f49`},blue:{50:`#eff6ff`,100:`#dbeafe`,200:`#bfdbfe`,300:`#93c5fd`,400:`#60a5fa`,500:`#3b82f6`,600:`#2563eb`,700:`#1d4ed8`,800:`#1e40af`,900:`#1e3a8a`,950:`#172554`},indigo:{50:`#eef2ff`,100:`#e0e7ff`,200:`#c7d2fe`,300:`#a5b4fc`,400:`#818cf8`,500:`#6366f1`,600:`#4f46e5`,700:`#4338ca`,800:`#3730a3`,900:`#312e81`,950:`#1e1b4b`},violet:{50:`#f5f3ff`,100:`#ede9fe`,200:`#ddd6fe`,300:`#c4b5fd`,400:`#a78bfa`,500:`#8b5cf6`,600:`#7c3aed`,700:`#6d28d9`,800:`#5b21b6`,900:`#4c1d95`,950:`#2e1065`},purple:{50:`#faf5ff`,100:`#f3e8ff`,200:`#e9d5ff`,300:`#d8b4fe`,400:`#c084fc`,500:`#a855f7`,600:`#9333ea`,700:`#7e22ce`,800:`#6b21a8`,900:`#581c87`,950:`#3b0764`},fuchsia:{50:`#fdf4ff`,100:`#fae8ff`,200:`#f5d0fe`,300:`#f0abfc`,400:`#e879f9`,500:`#d946ef`,600:`#c026d3`,700:`#a21caf`,800:`#86198f`,900:`#701a75`,950:`#4a044e`},pink:{50:`#fdf2f8`,100:`#fce7f3`,200:`#fbcfe8`,300:`#f9a8d4`,400:`#f472b6`,500:`#ec4899`,600:`#db2777`,700:`#be185d`,800:`#9d174d`,900:`#831843`,950:`#500724`},rose:{50:`#fff1f2`,100:`#ffe4e6`,200:`#fecdd3`,300:`#fda4af`,400:`#fb7185`,500:`#f43f5e`,600:`#e11d48`,700:`#be123c`,800:`#9f1239`,900:`#881337`,950:`#4c0519`}},aV={p:`padding`,px:`padding-left,padding-right`,py:`padding-top,padding-bottom`,pt:`padding-top`,pr:`padding-right`,pb:`padding-bottom`,pl:`padding-left`,ps:`padding-left`,pe:`padding-right`,m:`margin`,mx:`margin-left,margin-right`,my:`margin-top,margin-bottom`,mt:`margin-top`,mr:`margin-right`,mb:`margin-bottom`,ml:`margin-left`,ms:`margin-left`,me:`margin-right`,gap:`gap`,"gap-x":`column-gap`,"gap-y":`row-gap`,text:`font-size`,leading:`line-height`,tracking:`letter-spacing`,rounded:`border-radius`,"rounded-t":`border-top-left-radius,border-top-right-radius`,"rounded-b":`border-bottom-left-radius,border-bottom-right-radius`,"rounded-l":`border-top-left-radius,border-bottom-left-radius`,"rounded-r":`border-top-right-radius,border-bottom-right-radius`,"rounded-tl":`border-top-left-radius`,"rounded-tr":`border-top-right-radius`,"rounded-bl":`border-bottom-left-radius`,"rounded-br":`border-bottom-right-radius`,border:`border-width`,"border-t":`border-top-width`,"border-r":`border-right-width`,"border-b":`border-bottom-width`,"border-l":`border-left-width`,w:`width`,h:`height`,size:`width,height`,"max-w":`max-width`,"max-h":`max-height`,"min-w":`min-width`,"min-h":`min-height`,opacity:`opacity`,inset:`top,right,bottom,left`,"inset-x":`left,right`,"inset-y":`top,bottom`,top:`top`,right:`right`,bottom:`bottom`,left:`left`,z:`z-index`,items:`align-items`,justify:`justify-content`,font:`font-weight`,whitespace:`white-space`},oV={"font-size":[`font-size`,`font size`,`text-size`,`text size`],color:[`color`,`text-color`,`text color`,`text-colour`,`text colour`,`foreground`,`fg`],"background-color":[`background`,`background-color`,`background color`,`bg`,`bg-color`,`bg color`],"border-color":[`border-color`,`border color`],fill:[`fill`,`fill-color`,`fill color`],stroke:[`stroke`,`stroke-color`,`stroke color`],"font-family":[`font`,`font-sans`,`font-serif`,`font-mono`,`family`,`sans`,`serif`,`mono`],"font-style":[`italic`,`not-italic`],"text-align":[`text-left`,`text-center`,`text-right`,`text-justify`],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-decoration-line":[`underline`,`line-through`,`no-underline`],"white-space":[`whitespace`,`whitespace-normal`,`whitespace-nowrap`,`whitespace-pre`],"word-break":[`break-normal`,`break-all`,`break-keep`],"overflow-wrap":[`break-words`,`break-anywhere`],"font-variant-numeric":[`tabular-nums`,`proportional-nums`,`lining-nums`,`oldstyle-nums`],"border-style":[`border-solid`,`border-dashed`,`border-dotted`,`border-none`]},sV=(()=>{let e={};for(let[t,n]of Object.entries(aV))n!==void 0&&(e[n]??=new Set).add(t);let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=Array.from(r));for(let[e,n]of Object.entries(oV)){let r=new Set([...t[e]??[],...n]);t[e]=Array.from(r)}return t})(),cV={text:`color`,bg:`background-color`,border:`border-color`,"border-x":`border-color`,"border-y":`border-color`,"border-t":`border-color`,"border-r":`border-color`,"border-b":`border-color`,"border-l":`border-color`,"border-s":`border-color`,"border-e":`border-color`,fill:`fill`,stroke:`stroke`},lV=e=>aV[e]!==void 0||cV[e]!==void 0,uV=e=>{let t=0,n=-1;for(let r=0;r<e.length;r++){let i=e[r];i===`[`?t++:i===`]`?t--:i===`:`&&t===0&&(n=r)}let r=n>=0?e.slice(n+1):e;return r.startsWith(`!`)?r.slice(1):r},dV=e=>{let t=uV(e);if(!t)return null;let n=t.indexOf(`[`);if(n>0)return t.slice(0,n).replace(/-$/,``)||null;let r=t.split(`-`).filter(Boolean);if(r.length===0)return null;for(let e=r.length;e>=1;e--){let t=r.slice(0,e).join(`-`);if(lV(t))return t}return r[0]},fV=/-(red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone|black|white|transparent|current|inherit)\b/,pV=(e,t)=>e!==`text`&&e!==`bg`&&e!==`border`&&!e.startsWith(`border-`)?!1:fV.test(t),mV=new Set(`color.red.orange.amber.yellow.lime.green.emerald.teal.cyan.sky.blue.indigo.violet.purple.fuchsia.pink.rose.slate.gray.grey.zinc.neutral.stone.black.white.transparent.current.currentcolor.inherit.primary.secondary.accent.muted.foreground.background.destructive.success.warning.error.info.card.popover.input.ring`.split(`.`)),hV=new Set([`xs`,`sm`,`base`,`lg`,`xl`,`2xl`,`3xl`,`4xl`,`5xl`,`6xl`,`7xl`,`8xl`,`9xl`]),gV=/^(#|rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color:|color\(|var\(--.*color)/,_V=/^(-?\d|length:|size:)/,vV=e=>e.trim().toLowerCase().replace(/\s+/g,`-`).replace(/([a-z])(\d)/g,`$1-$2`),yV=e=>gV.test(e)&&!_V.test(e),bV=(e,t)=>{if(e===t)return``;let n=`${t}-`;return e.startsWith(n)?e.slice(n.length):null},xV=e=>{let t=uV(vV(e)),n=dV(t);if(!n)return null;let r=cV[n];if(!r)return null;let i=t.indexOf(`[`);if(i>=0)return yV(t.slice(i+1).replace(/\]$/,``))?r:null;let a=bV(t,n);if(a===null)return null;if(n===`bg`&&a===``||(n===`fill`||n===`stroke`)&&a===``)return r;let o=a.split(`-`)[0];return n===`text`&&hV.has(o)?null:mV.has(o)?r:null},SV={black:`#000000`,white:`#ffffff`,transparent:xN},CV=e=>{let t=uV(vV(e)),n=dV(t);if(!n||cV[n]===void 0||t.includes(`[`))return null;let r=bV(t,n);if(!r)return null;let i=SV[r];if(i)return i;let a=r.lastIndexOf(`-`);if(a<0)return null;let o=r.slice(0,a),s=o===`grey`?`gray`:o,c=Number.parseInt(r.slice(a+1),10);return iV[s]?.[c]??null},wV=/^-?\d/,TV=(e,t)=>{if(t===``||t.startsWith(`[`)||wV.test(t))return!0;let n=t.split(`-`)[0];return e===`text`?hV.has(n):e===`font`||e===`border`||e.startsWith(`border-`)?!1:(e===`rounded`||e.startsWith(`rounded-`),!0)},EV={"font-sans":{property:`font-family`,value:`ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`},"font-serif":{property:`font-family`,value:`ui-serif, Georgia, Cambria, "Times New Roman", Times, serif`},"font-mono":{property:`font-family`,value:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`},"font-thin":{property:`font-weight`,value:`100`},"font-extralight":{property:`font-weight`,value:`200`},"font-light":{property:`font-weight`,value:`300`},"font-normal":{property:`font-weight`,value:`400`},"font-medium":{property:`font-weight`,value:`500`},"font-semibold":{property:`font-weight`,value:`600`},"font-bold":{property:`font-weight`,value:`700`},"font-extrabold":{property:`font-weight`,value:`800`},"font-black":{property:`font-weight`,value:`900`},"text-left":{property:`text-align`,value:`left`},"text-center":{property:`text-align`,value:`center`},"text-right":{property:`text-align`,value:`right`},"text-justify":{property:`text-align`,value:`justify`},italic:{property:`font-style`,value:`italic`},"not-italic":{property:`font-style`,value:`normal`},uppercase:{property:`text-transform`,value:`uppercase`},lowercase:{property:`text-transform`,value:`lowercase`},capitalize:{property:`text-transform`,value:`capitalize`},"normal-case":{property:`text-transform`,value:`none`},underline:{property:`text-decoration-line`,value:`underline`},"line-through":{property:`text-decoration-line`,value:`line-through`},"no-underline":{property:`text-decoration-line`,value:`none`},"whitespace-normal":{property:`white-space`,value:`normal`},"whitespace-nowrap":{property:`white-space`,value:`nowrap`},"whitespace-pre":{property:`white-space`,value:`pre`},"whitespace-pre-line":{property:`white-space`,value:`pre-line`},"whitespace-pre-wrap":{property:`white-space`,value:`pre-wrap`},"whitespace-break-spaces":{property:`white-space`,value:`break-spaces`},"break-normal":{property:`word-break`,value:`normal`},"break-all":{property:`word-break`,value:`break-all`},"break-keep":{property:`word-break`,value:`keep-all`},"break-words":{property:`overflow-wrap`,value:`break-word`},"break-anywhere":{property:`overflow-wrap`,value:`anywhere`},"tabular-nums":{property:`font-variant-numeric`,value:`tabular-nums`},"proportional-nums":{property:`font-variant-numeric`,value:`proportional-nums`},"lining-nums":{property:`font-variant-numeric`,value:`lining-nums`},"oldstyle-nums":{property:`font-variant-numeric`,value:`oldstyle-nums`},"slashed-zero":{property:`font-variant-numeric`,value:`slashed-zero`},"border-solid":{property:`border-style`,value:`solid`},"border-dashed":{property:`border-style`,value:`dashed`},"border-dotted":{property:`border-style`,value:`dotted`},"border-none":{property:`border-style`,value:`none`}},DV=e=>{let t=vV(e);if(!t)return[];let n=MV(t);if(n)return[n.property];let r=xV(t);return r?[r]:[]},OV=e=>{let t=vV(e);if(!t)return[];let n=dV(t);if(!n)return[];let r=bV(uV(t),n);if(r===null||!TV(n,r))return[];let i=jV(n);return i?[i]:[]},kV=e=>{let t=e.getAttribute(`class`);if(!t)return new Set;let n=t.split(/\s+/).filter(Boolean),r=new Set;for(let e of n){let t=dV(e);if(!t||pV(t,e))continue;let n=MV(e);if(n){r.add(n.property);continue}let i=jV(t);i&&r.add(i)}return r},AV=e=>sV[e]??[],jV=e=>{let t=aV[e];return t===void 0?null:t},MV=e=>{let t=EV[uV(e)];return t===void 0?null:t},NV=`react-grab-toolbar-state`,PV=()=>{try{let e=localStorage.getItem(NV);if(!e)return null;let t=JSON.parse(e);if(typeof t!=`object`||!t)return null;let n=t,r=typeof n.collapsed==`boolean`&&n.collapsed;return{edge:n.edge===`top`||n.edge===`bottom`||n.edge===`left`||n.edge===`right`?n.edge:`bottom`,ratio:typeof n.ratio==`number`?n.ratio:dN,collapsed:r,enabled:!r,defaultAction:typeof n.defaultAction==`string`?n.defaultAction:fN}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},FV=e=>{try{localStorage.setItem(NV,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}},IV=e=>{let[t,n]=J(!1);return bR(()=>{let t=PM(t=>n(e(t))),r=()=>n(!1);window.addEventListener(`keydown`,t,{capture:!0}),window.addEventListener(`keyup`,t,{capture:!0}),window.addEventListener(`blur`,r),xR(()=>{window.removeEventListener(`keydown`,t,{capture:!0}),window.removeEventListener(`keyup`,t,{capture:!0}),window.removeEventListener(`blur`,r)})}),t},LV=e=>e.key===`Enter`,RV=e=>e.metaKey||e.ctrlKey,zV=(e,t,n={})=>{if(!t.key)return null;if(LV(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return RV(t)?n.includeModifierShortcuts===!0?e.find(e=>e.shortcut!==void 0&&e.shortcut!==`Enter`&&e.shortcutModifier!==!1&&r===e.shortcut.toLowerCase())??null:null:e.find(e=>e.shortcut!==void 0&&e.shortcutModifier===!1&&r===e.shortcut.toLowerCase())??null},BV=()=>{let e=!1;return{arm:()=>{e=!0},clear:()=>{e=!1},consume:()=>e?(e=!1,!0):!1}}})),HV,UV,WV,GV,KV,qV,JV,YV,XV,ZV,QV,$V,eH,tH,nH,rH,iH,aH,oH,sH,cH,lH,uH,dH,fH,pH,mH,hH,gH,_H,vH,yH,bH,xH,SH,CH,wH,TH,EH,DH,OH,kH,AH,jH,MH,NH,PH,FH,IH,LH,RH,zH,BH,VH,HH,UH,WH,GH,KH,qH,JH,YH,XH,ZH,QH,$H,eU,tU,nU,rU,iU,aU,oU,sU,cU,lU,uU,dU,fU,pU,mU,hU,gU,_U,vU,yU,bU,xU,SU,CU,wU,TU,EU,DU,OU,kU,AU,jU,MU,NU,PU,FU,IU,LU,RU,zU,BU,VU,HU,UU,WU,GU,KU,qU,JU,YU,XU,ZU,QU,$U=t((()=>{cR(),HV=class extends Error{constructor(e){super(e),this.name=`ReactGrabError`}},UV=class extends HV{constructor(){super(`Can't generate CSS selector for non-element node type.`),this.name=`NonElementNodeError`}},WV=class extends HV{constructor(e){super(`Timeout: Can't find a unique selector after ${e}ms`),this.name=`SelectorTimeoutError`,this.timeoutMs=e}},GV=class extends HV{constructor(){super(`Selector was not found.`),this.name=`SelectorNotFoundError`}},KV=class extends HV{constructor(){super(`Failed to copy`),this.name=`CopyFailedError`}},qV=e=>e===void 0||!Number.isFinite(e)?3:Math.max(0,Math.floor(e)),JV=e=>{try{return decodeURIComponent(e)}catch{return e}},YV=/(?:^|[/\\])node_modules[/\\]/,XV=/[/\\]\.vite[/\\]deps[^/\\]*[/\\]/,ZV=/\.[mc]?[jt]sx?$/i,QV=/^chunk-[A-Za-z0-9_-]+$/,$V=/[/\\]/,eH=/^(.+?)@v?\d/,tH=e=>e.split($V).filter(Boolean),nH=e=>{let[t,n]=tH(e);return!t||t.startsWith(`.`)?null:t.startsWith(`@`)?n?`${t}/${n}`:null:t},rH=e=>{let t=tH(e)[0];if(!t)return null;let n=t.replace(ZV,``);if(QV.test(n))return null;if(!n.startsWith(`@`))return n;let r=n.indexOf(`_`);return r===-1?null:`${n.slice(0,r)}/${n.slice(r+1)}`},iH=(e,t,n)=>{let r=e.split(t);return r.length>1?n(r[r.length-1]):null},aH=e=>e?.match(eH)?.[1]??null,oH=e=>{let t;try{t=new URL(e)}catch{return null}if(!t.hostname)return null;let n=tH(t.pathname).map(JV);for(let[e,t]of n.entries()){if(t.startsWith(`@`)){let r=aH(n[e+1]);if(r)return`${t}/${r}`;continue}let r=aH(t);if(r)return r}return null},sH=e=>iH(e,XV,rH)??iH(e,YV,nH),cH=e=>{if(!e)return null;let t=uF(e);return t&&(sH(JV(t))||oH(e))||null},lH=/^@[A-Za-z0-9][A-Za-z0-9._-]*$/,uH=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,dH=new Set([`app`,`web`,`website`,`frontend`,`client`,`src`]),fH=new Set([`app`,`src`,`components`,`pages`,`features`,`modules`,`hooks`,`lib`,`utils`,`ui`,`shared`,`common`,`core`,`styles`,`assets`]),pH=e=>{let t=e;for(;t.startsWith(`../`)||t.startsWith(`./`);)t=t.slice(t.startsWith(`../`)?3:2);return t},mH=e=>{let t=pH(JV(uF(e)));if(t.startsWith(`/`))return null;let[n,r,...i]=tH(t);return!n||!r||i.length===0||!lH.test(n)||fH.has(n.slice(1))||!uH.test(r)||ZV.test(r)||dH.has(r)?null:`${n}/${r}`},hH=e=>e?cH(e)??mH(e):null,gH=e=>{if(!e)return{origin:`unknown`,packageName:null};let t=hH(e);return t?{origin:`package`,packageName:t}:dF(e)?{origin:`app`,packageName:null}:{origin:`unknown`,packageName:null}},_H=new Set([`role`,`name`,`aria-label`,`rel`,`href`]),vH=e=>{if(!/^[a-z-]{3,}$/i.test(e))return!1;let t=e.split(/-|[A-Z]/);for(let e of t)if(e.length<=2||/[^aeiou]{4,}/i.test(e))return!1;return!0},yH=(e,t)=>{let n=_H.has(e)||e.startsWith(`data-`)&&vH(e),r=vH(t)&&t.length<100||t.startsWith(`#`)&&vH(t.slice(1));return n&&r},bH=e=>{let t=e[0].name;for(let n=1;n<e.length;n++)t=`${e[n].name} > ${t}`;return t},xH=e=>{let t=0;for(let n of e)t+=n.penalty;return t},SH=(e,t)=>xH(e)-xH(t),CH=(e,t)=>{let n=e.parentNode;if(!n)return;let r=n.firstChild;if(!r)return;let i=0;for(;r&&(r instanceof Element&&(t===void 0||r.tagName.toLowerCase()===t)&&i++,r!==e);)r=r.nextSibling;return i},wH=(e,t)=>e===`html`?`html`:`${e}:nth-child(${t})`,TH=(e,t)=>e===`html`?`html`:`${e}:nth-of-type(${t})`,EH=(e,t)=>{let n=[],r=e.getAttribute(`id`),i=e.tagName.toLowerCase();r&&vH(r)&&n.push({name:`#${CSS.escape(r)}`,penalty:0});for(let t of e.classList)vH(t)&&n.push({name:`.${CSS.escape(t)}`,penalty:1});for(let r of e.attributes)t(r.name,r.value)&&n.push({name:`[${CSS.escape(r.name)}="${CSS.escape(r.value)}"]`,penalty:2});n.push({name:i,penalty:5});let a=CH(e,i);a!==void 0&&n.push({name:TH(i,a),penalty:10});let o=CH(e);return o!==void 0&&n.push({name:wH(i,o),penalty:50}),n},DH=(e,t=WM,n=[])=>{if(t<=0)return[];if(e.length===0)return[n];let r=[];for(let i of e[0]){let a=t-r.length;if(a<=0)break;r.push(...DH(e.slice(1),a,[...n,i]))}return r},OH=(e,t)=>{let n=t.getRootNode?.();return n instanceof ShadowRoot?n:e instanceof Document?e:e.ownerDocument},kH=(e,t)=>t.querySelectorAll(bH(e)).length===1,AH=(e,t)=>{let n=e,r=[];for(;n&&n!==t;){let e=n.tagName.toLowerCase(),t=CH(n,e);if(t===void 0)return;r.push({name:TH(e,t),penalty:10}),n=n.parentElement}return kH(r,t)?r:void 0},jH=(e,t,n,r)=>{if(e.nodeType!==Node.ELEMENT_NODE)throw new UV;if(e.tagName.toLowerCase()===`html`)return`html`;let i=OH(t,e),a=Date.now(),o=[],s=e,c=0,l;for(;s&&s!==i&&!l;)if(o.push(EH(s,r)),s=s.parentElement,c++,c>=3){let t=DH(o);t.sort(SH);for(let r of t){if(Date.now()-a>n){let t=AH(e,i);if(!t)throw new WV(n);return bH(t)}if(kH(r,i)){l=r;break}}}if(!l&&c<3){let e=DH(o);e.sort(SH);for(let t of e){if(Date.now()-a>n)break;if(kH(t,i)){l=t;break}}}if(!l)throw new GV;return bH(l)},MH=e=>e.ownerDocument.body??e.ownerDocument.documentElement,NH=new Set([`data-testid`,`data-test-id`,`data-test`,`data-cy`,`data-qa`,`aria-label`,`href`,`src`,`role`,`name`,`title`,`alt`]),PH=e=>e.length>0&&e.length<=120,FH=(e,t)=>{try{let n=e.ownerDocument.querySelectorAll(t);return n.length===1&&n[0]===e}catch{return!1}},IH=e=>{if(e instanceof HTMLElement&&e.id){let t=`#${CSS.escape(e.id)}`;if(FH(e,t))return t}for(let t of NH){let n=e.getAttribute(t);if(!n||!PH(n))continue;let r=`[${t}=${JSON.stringify(n)}]`;if(FH(e,r))return r;let i=`${e.tagName.toLowerCase()}${r}`;if(FH(e,i))return i}return null},LH=e=>{let t=[],n=MH(e),r=e;for(;r;){if(r instanceof HTMLElement&&r.id){t.unshift(`#${CSS.escape(r.id)}`);break}let e=r.parentElement;if(!e){t.unshift(r.tagName.toLowerCase());break}let i=Array.from(e.children).indexOf(r)+1;if(t.unshift(`${r.tagName.toLowerCase()}:nth-child(${i})`),e===n){t.unshift(n.tagName.toLowerCase());break}r=e}return t.join(` > `)},RH=e=>{let t=IH(e);if(t)return t;try{let t=jH(e,MH(e),200,(e,t)=>yH(e,t)||NH.has(e)&&PH(t));if(t)return t}catch{}return LH(e)},zH=e=>{if(!e)return!1;let t=`/${UF(e)}/`.toLowerCase();return VM.some(e=>t.includes(e))},BH=e=>e.map(e=>`\n in ${e}`).join(``),VH=[`about://React/`,`rsc://React/`],HH=e=>VH.some(t=>e.startsWith(t)),UH=e=>{for(let t of VH){if(!e.startsWith(t))continue;let n=e.indexOf(`/`,t.length);if(n===-1)continue;let r=n+1,i=e.lastIndexOf(`?`);return JV(i>r?e.slice(r,i):e.slice(r))}return e},WH=e=>{if(typeof e!=`object`||!e||!(`status`in e)||e.status!==`fulfilled`||!(`value`in e)||typeof e.value!=`object`||e.value===null||!(`originalStackFrame`in e.value))return null;let t=e.value.originalStackFrame;return typeof t!=`object`||!t||!(`file`in t)||typeof t.file!=`string`||!t.file||`ignored`in t&&t.ignored?null:{file:t.file,line1:`line1`in t&&typeof t.line1==`number`?t.line1:null,column1:`column1`in t&&typeof t.column1==`number`?t.column1:null}},GH=async(e,t)=>{let n=[],r=[];for(let t=0;t<e.length;t++){let i=e[t];!i.isServer||!i.fileName||(n.push(t),r.push({file:UH(i.fileName),methodName:i.functionName??`<unknown>`,line1:i.lineNumber??null,column1:i.columnNumber??null,arguments:[]}))}if(r.length===0)return e;let i=new AbortController,a=setTimeout(()=>i.abort(),HM),o=()=>i.abort();t?.aborted&&i.abort(),t?.addEventListener(`abort`,o);try{let t=await fetch(`${qF()}/__nextjs_original-stack-frames`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({frames:r,isServer:!0,isEdgeServer:!1,isAppDirectory:!0}),priority:`high`,signal:i.signal});if(!t.ok)return e;let a=await t.json();if(!Array.isArray(a))return e;let o=[...e];for(let t=0;t<n.length;t++){let r=WH(a[t]);if(!r)continue;let i=n[t];o[i]={...e[i],fileName:r.file,lineNumber:r.line1??void 0,columnNumber:r.column1??void 0,isSymbolicated:!0}}return o}catch{return e}finally{clearTimeout(a),t?.removeEventListener(`abort`,o)}},KH=e=>{let t=new Map;return bM(e,e=>{if(!UP(e))return!1;let n=QP(e._debugStack.stack);if(!n)return!1;for(let e of yP(n))!e.functionName||!e.fileName||HH(e.fileName)&&(t.has(e.functionName)||t.set(e.functionName,{...e,isServer:!0}));return!1},!0),t},qH=(e,t)=>{if(!t.some(e=>e.isServer&&!e.fileName&&e.functionName))return t;let n=KH(e);return n.size===0?t:t.map(e=>{if(!e.isServer||e.fileName||!e.functionName)return e;let t=n.get(e.functionName);return t?{...e,fileName:t.fileName,lineNumber:t.lineNumber,columnNumber:t.columnNumber}:e})},JH=0,YH=[],XH=()=>JH<3?(JH+=1,Promise.resolve()):new Promise(e=>{YH.push(e)}),ZH=()=>{let e=YH.shift();if(e){e();return}--JH},QH=async(e,t,n=UM)=>{await XH();let r=new AbortController,i,a=new Promise(e=>{i=setTimeout(()=>{r.abort(),e(t)},n)}),o=e(r.signal);o.catch(()=>{});try{return await Promise.race([o,a])}finally{clearTimeout(i),ZH()}},$H=(e,t)=>e.length>t?`${e.slice(0,t)}...`:e,eU=e=>e.startsWith(`data-react-grab-`),tU=e=>e.replace(/\s+/g,` `).trim(),nU=e=>{let t=[];for(let n of e.childNodes){if(n.nodeType!==Node.TEXT_NODE)continue;let e=tU(n.textContent??``);e&&t.push(e)}return t.join(` `)},rU=e=>e.getAttribute(`aria-hidden`)===`true`||e.hasAttribute(`hidden`)?!0:aN.has(e.tagName.toLowerCase()),iU=(e,t,n)=>{if(e.nodeType===Node.TEXT_NODE){let r=tU(e.textContent??``);return r?(t.push(r),n-r.length):n}if(!(e instanceof Element)||rU(e))return n;for(let r of e.childNodes)if(n=iU(r,t,n),n<=0)break;return n},aU=(e,t)=>{if(rU(e))return``;let n=nU(e);if(!iN.has(t)||n&&e.children.length===0)return n;let r=[];return iU(e,r,100),r.join(` `)},oU=e=>$H(e,15),sU=e=>{let t=[];for(let n of nN){let r=e.getAttribute(n);r&&t.push(`${n}="${r}"`)}return t.length>0?` ${t.join(` `)}`:``},cU=e=>e===`class`||e===`className`||e===`style`,lU=e=>{let t=[],n=[],r=``;for(let{name:i,value:a}of e.attributes)if(!eU(i)){if(cU(i)){i!==`style`&&a&&(r=` class="${oU(a)}"`);continue}rN.has(i)?t.push(a?` ${i}="${a}"`:` ${i}`):a&&n.push(` ${i}="${oU(a)}"`)}return t.join(``)+n.join(``)+r},uU=e=>e.length===0?``:e.length<=2?e.map(e=>`<${NN(e)} ...>`).join(`
|
|
257
|
+
`):`(${e.length} elements)`,dU=e=>{let t=NN(e);if(!(e instanceof HTMLElement))return`<${t}${sU(e)} />`;let n=lU(e),r=$H(aU(e,t),100);return r?`<${t}${n}>${r}</${t}>`:`<${t}${n} />`},fU=e=>{let t=NN(e),n=lU(e),r=aU(e,t),i=[],a=[],o=!1;for(let t of e.childNodes)t.nodeType!==Node.COMMENT_NODE&&(t.nodeType===Node.TEXT_NODE?t.textContent&&t.textContent.trim().length>0&&(o=!0):t instanceof Element&&(o?a.push(t):i.push(t)));let s=r.length>0&&iN.has(t),c=``,l=uU(i);l&&!s&&(c+=`\n ${l}`),r&&(c+=`\n ${$H(r,100)}`);let u=uU(a);return u&&!s&&(c+=`\n ${u}`),c.length>0?`<${t}${n}>${c}\n</${t}>`:`<${t}${n} />`},pU=new Set([`_`,`$`,`motion.`,`styled.`,`chakra.`,`ark.`,`Primitive.`,`Slot.`]),mU=new Set(`AppRouter.AppRouterAnnouncer.AppDevOverlay.AppDevOverlayErrorBoundary.ClientPageRoot.ClientSegmentRoot.DevRootHTTPAccessFallbackBoundary.ErrorBoundary.ErrorBoundaryHandler.GracefulDegradeBoundary.HTTPAccessErrorFallback.HTTPAccessFallbackBoundary.HTTPAccessFallbackErrorBoundary.HandleRedirect.Head.HistoryUpdater.HotReload.InnerLayoutRouter.InnerScrollAndFocusHandler.InnerScrollAndFocusHandlerOld.InnerScrollAndMaybeFocusHandler.InnerScrollHandlerNew.LoadableComponent.LoadingBoundary.LoadingBoundaryProvider.NotAllowedRootHTTPFallbackError.OfflineProvider.OuterLayoutRouter.RedirectBoundary.RedirectErrorBoundary.RenderFromTemplateContext.RenderValidationBoundaryAtThisLevel.ReplaySsrOnlyErrors.RootErrorBoundary.RootLevelDevOverlayElement.Router.ScrollAndFocusHandler.ScrollAndMaybeFocusHandler.SegmentBoundaryTrigger.SegmentBoundaryTriggerNode.SegmentStateProvider.SegmentTrieNode.SegmentViewNode.SegmentViewStateNode.ServerRoot.body.html`.split(`.`)),hU=new Set([`Suspense`,`Fragment`,`StrictMode`,`Profiler`,`SuspenseList`]),gU=new Set([`MotionDOMComponent`]),_U=e=>{if(mU.has(e)||hU.has(e)||gU.has(e))return!0;for(let t of pU)if(e.startsWith(t))return!0;return!1},vU=e=>!(!e||_U(e)||e===`SlotClone`||e===`Slot`),yU=e=>!(e.length<=1||_U(e)||e[0]!==e[0].toUpperCase()||e.endsWith(`Provider`)||e.endsWith(`Context`)),bU=e=>e&&yU(e)?e:null,xU=e=>{if(!oP())return e;let t=e;for(;t;){if(sP(t))return t;t=t.parentElement}return e},SU=e=>{if(!oP())return null;let t=sP(xU(e)),n=0;for(;t;){if(t.key)return t.key;if(tP(t)&&(n+=1,n===2))break;t=t.return}return null},CU=new WeakMap,wU=new WeakMap,TU=e=>t=>fetch(t,{signal:e,priority:`high`}),EU=e=>QH(async t=>{try{let n=sP(e);if(!n)return null;let r=await iF(n,!0,TU(t));return GF()?await GH(qH(n,r),t):r}catch{return null}},null),DU=e=>{if(!oP())return Promise.resolve([]);let t=xU(e),n=CU.get(t);if(n)return n;let r=EU(t).then(e=>(e===null&&CU.delete(t),e));return CU.set(t,r),r},OU=async e=>{if(!oP())return null;let t=await DU(e);if(!t)return null;for(let e of t){let t=bU(e.functionName);if(t)return t}return null},kU=e=>e.find(e=>!!bU(e.functionName))??e[0]??null,AU=e=>!e||!tP(e)?null:bU(aP(e.type)),jU=e=>QH(async t=>{let n=sP(xU(e));if(!n)return null;try{let e=await oF(n,!0,TU(t));return e?.fileName?{filePath:UF(e.fileName),lineNumber:e.lineNumber??null,columnNumber:e.columnNumber??null,componentName:bU(e.functionName)??AU(n._debugOwner),origin:gH(e.fileName).origin}:null}catch{return null}},null),MU=e=>{let t=xU(e),n=wU.get(t);if(n)return n;let r=jU(t).then(e=>(e||wU.delete(t),e));return wU.set(t,r),r},NU=[`app`,`package`],PU=(e,t)=>{for(let n of NU){if(e?.origin===n)return e;let r=kU(t.filter(e=>gH(e.fileName).origin===n));if(r?.fileName)return{filePath:UF(r.fileName),lineNumber:r.lineNumber??null,columnNumber:r.columnNumber??null,componentName:bU(r.functionName),origin:n}}return null},FU=async e=>{let t=await MU(e);return t?.origin===`app`?t:PU(t,await DU(e)??[])},IU=e=>LU(xU(e),1)[0]??null,LU=(e,t,n=()=>!0)=>{if(!oP())return[];let r=sP(e);if(!r)return[];let i=[];return bM(r,e=>{if(i.length>=t)return!0;if(tP(e)){let t=aP(e.type);t&&vU(t)&&n(t)&&i.push(t)}return!1},!0),i},RU=[`/src/app/`,`/src/pages/`,`/app/`,`/pages/`],zU=(e,t)=>{let n=UF(e);if(!t||!n.startsWith(`/`))return n;for(let e of RU){let t=n.indexOf(e);if(t!==-1)return`/./${n.slice(t+1)}`}return n},BU=(e,t)=>{let n=zU(e.filePath,t),r=t&&e.lineNumber?`${n}:${e.lineNumber}${e.columnNumber?`:${e.columnNumber}`:``}`:n;return e.componentName?`\n in ${e.componentName} (at ${r})`:`\n in ${r}`},VU={isAppSource:!1,consumesBudget:!1},HU=(e,t,n,r)=>{let i=t.packageName,a=t.origin===`app`?e.fileName:null;if(e.isServer&&!a&&(n||!e.functionName)){let e=i?`${i} at Server`:`at Server`;return{text:`\n in ${n??`<anonymous>`} (${e})`,...VU}}return!a&&n?{text:i?`\n in ${n} (${i})`:`\n in ${n}`,...VU}:i?{text:`\n in ${i}`,...VU}:a?{text:BU({componentName:n,filePath:a,lineNumber:e.lineNumber??null,columnNumber:e.columnNumber??null},r),isAppSource:!0,consumesBudget:!zH(a)}:null},UU=(e,t={},n=null)=>{let r=qV(t.maxLines),i=Math.max(r,20),a=GF(),o=[],s=new Set,c=null,l=!1,u=!1,d=!1,f=0,p=e=>{e&&s.add(e)};n&&(u=n.origin===`app`,zH(n.filePath)||(f+=1),p(n.componentName),o.push(BU(n,a)));for(let t of e){if(f>=r||o.length>=i)break;let e=gH(t.fileName),s=bU(t.functionName),m=e.packageName?`${e.packageName}:${s??``}:${t.isServer?`server`:`client`}`:null;if(m&&m===c)continue;if(!l&&s&&s===n?.componentName){l=!0;continue}let h=HU(t,e,s,a);h!==null&&h.text!==o[o.length-1]&&(h.isAppSource&&(u=!0),h.consumesBudget&&(f+=1,d=!0),p(s),o.push(h.text),c=m)}return{text:o.join(``),shouldAppendSelectorHint:!u,hasBudgetedStackFrame:d,renderedComponentNames:s}},WU=async e=>{let t=await MU(e);return t?.origin===`app`?t:null},GU=(e,t,n)=>{let r=LU(xU(e),n,e=>yU(e)&&!t.renderedComponentNames.has(e));return r.length===0?t:{...t,text:`${t.text}${BH(r)}`}},KU=async(e,t={})=>{let n=await WU(e),r=await DU(e),i=qV(t.maxLines),a=UU(r??[],t,n);if(a.text)return a.hasBudgetedStackFrame?a:GU(e,a,i);let o=LU(xU(e),i);return{text:BH(o),shouldAppendSelectorHint:!0,hasBudgetedStackFrame:!1,renderedComponentNames:new Set(o)}},qU=async(e,t={})=>(await KU(e,t)).text,JU=(e,t)=>{let n=SU(e),r=n===null?``:`\n key: "${n}"`,i=t.shouldAppendSelectorHint?`\n selector: ${RH(e)}`:``;return`${t.text}${r}${i}`},YU=async(e,t={})=>{let n=await KU(e,t);return`${dU(e)}${JU(e,n).replace(/\n\s+/g,` `)}`},XU=async(e,t={})=>{let n=xU(e);return`${fU(n)}${JU(n,await KU(n,t))}`},ZU=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`),QU=(e,t)=>{let n=t?.componentName??`div`,r={version:IM,content:e,entries:t?.entries??[{tagName:t?.tagName,componentName:n,content:e,commentText:t?.commentText}],timestamp:Date.now()},i=t=>{t.preventDefault(),t.clipboardData?.setData(`text/plain`,e),t.clipboardData?.setData(`text/html`,`<meta charset='utf-8'><pre><code>${ZU(e)}</code></pre>`),t.clipboardData?.setData(`application/x-react-grab`,JSON.stringify(r))};document.addEventListener(`copy`,i);let a=document.createElement(`textarea`);a.value=e,a.style.position=`fixed`,a.style.left=`-9999px`,a.ariaHidden=`true`,document.body.appendChild(a),a.select();try{return typeof document.execCommand==`function`&&document.execCommand(`copy`)}finally{document.removeEventListener(`copy`,i),a.remove()}}})),eW=r({ReactGrabRenderer:()=>xJ}),tW,nW,rW,iW,aW,oW,sW,cW,lW,uW,dW,fW,pW,mW,hW,gW,_W,vW,yW,bW,xW,SW,CW,wW,TW,EW,DW,OW,kW,AW,jW,MW,NW,PW,FW,IW,LW,RW,zW,BW,VW,HW,UW,WW,GW,KW,qW,JW,YW,XW,ZW,QW,$W,eG,tG,nG,rG,iG,aG,oG,sG,cG,lG,uG,dG,fG,pG,mG,hG,gG,_G,vG,yG,bG,xG,SG,CG,wG,TG,EG,DG,OG,kG,AG,jG,MG,NG,PG,FG,IG,LG,RG,zG,BG,VG,HG,UG,WG,GG,KG,qG,JG,YG,XG,ZG,QG,$G,eK,tK,nK,rK,iK,aK,oK,sK,cK,lK,uK,dK,fK,pK,mK,hK,gK,_K,vK,yK,bK,xK,SK,CK,wK,TK,EK,DK,OK,kK,AK,jK,MK,NK,PK,FK,IK,LK,RK,zK,BK,VK,HK,UK,WK,GK,KK,qK,JK,YK,XK,ZK,QK,$K,eq,tq,nq,rq,iq,aq,oq,sq,cq,lq,uq,dq,fq,pq,mq,hq,gq,_q,vq,yq,bq,xq,Sq,Cq,wq,Tq,Eq,Dq,Oq,kq,Aq,jq,Mq,Nq,Pq,Fq,Iq,Lq,Rq,zq,Bq,Vq,Hq,Uq,Wq,Gq,Kq,qq,Jq,Yq,Xq,Zq,Qq,$q,eJ,tJ,nJ,rJ,iJ,aJ,oJ,sJ,cJ,lJ,uJ,dJ,fJ,pJ,mJ,hJ,gJ,_J,vJ,yJ,bJ,xJ,SJ=t((()=>{VV(),cR(),tW=(e,t,n)=>e+(t-e)*n,nW=(e,t)=>{let n=Math.max(t,1);return 1-(1-e)**(n/JM)},rW=Z(`<canvas data-react-grab-overlay-canvas style=position:fixed;top:0;left:0;pointer-events:none>`),iW={borderColor:QM,fillColor:$M,lerpFactor:zM},aW={drag:{borderColor:XM,fillColor:ZM,lerpFactor:qM},selection:iW,grabbed:iW},oW=e=>{let t,n=null,r=0,i=0,a=1,o=null,s=null,c={drag:{canvas:null,context:null},selection:{canvas:null,context:null},grabbed:{canvas:null,context:null}},l=[],u=null,d=[],f=DM()?`display-p3`:`srgb`,p=(e,t,n)=>{let r=new OffscreenCanvas(e*n,t*n),i=r.getContext(`2d`,{colorSpace:f});return i&&i.scale(n,n),{canvas:r,context:i}},m=()=>{if(t){a=Math.max(window.devicePixelRatio||1,2),r=window.innerWidth,i=window.innerHeight,t.width=r*a,t.height=i*a,t.style.width=`${r}px`,t.style.height=`${i}px`,n=t.getContext(`2d`,{colorSpace:f}),n&&n.scale(a,a);for(let e of Object.keys(c))c[e]=p(r,i,a)}},h=e=>{if(!e)return 0;let t=e.match(/^(\d+(?:\.\d+)?)/);return t?parseFloat(t[1]):0},g=(e,t,n)=>({id:e,current:{x:t.x,y:t.y,width:t.width,height:t.height},target:{x:t.x,y:t.y,width:t.width,height:t.height},borderRadius:h(t.borderRadius),opacity:n?.opacity??1,targetOpacity:n?.targetOpacity??n?.opacity??1,createdAt:n?.createdAt,fadeStartTimestamp:null,isInitialized:!0}),_=(e,t,n)=>{let r=e.target;r.x=t.x,r.y=t.y,r.width=t.width,r.height=t.height,e.borderRadius=h(t.borderRadius),n!==void 0&&(e.targetOpacity=n)},v=e=>e.boundsMultiple??[e.bounds],y=(e,t,n,r,i,a,o,s,c=1)=>{if(r<=0||i<=0)return;let l=Math.min(r/2,i/2),u=Math.min(a,l),d=c!==1;d&&(e.globalAlpha=c),e.beginPath(),u>0?e.roundRect(t,n,r,i,u):e.rect(t,n,r,i),e.fillStyle=o,e.fill(),e.strokeStyle=s,e.lineWidth=1,e.stroke(),d&&(e.globalAlpha=1)},b=()=>{let t=c.drag;if(!t.context)return;let n=t.context;if(n.clearRect(0,0,r,i),!e.dragVisible||!u)return;let a=aW.drag;y(n,u.current.x,u.current.y,u.current.width,u.current.height,u.borderRadius,a.fillColor,a.borderColor)},x=()=>{let t=c.selection;if(!t.context)return;let n=t.context;if(n.clearRect(0,0,r,i),!e.selectionVisible)return;let a=aW.selection;for(let e of l)y(n,e.current.x,e.current.y,e.current.width,e.current.height,e.borderRadius,a.fillColor,a.borderColor,e.opacity)},S=(e,t)=>{let n=c[e];if(!n.context)return;let a=n.context;a.clearRect(0,0,r,i);let o=aW[e];for(let e of t)y(a,e.current.x,e.current.y,e.current.width,e.current.height,e.borderRadius,o.fillColor,o.borderColor,e.opacity)},C=()=>{if(!(!n||!t)&&!(r<=0||i<=0)){n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,t.width,t.height),n.setTransform(a,0,0,a,0,0),b(),x(),S(`grabbed`,d);for(let e of[`drag`,`selection`,`grabbed`]){let t=c[e];t.canvas&&n.drawImage(t.canvas,0,0,r,i)}}},w=(e,t,n)=>{let r=tW(e.current.x,e.target.x,t),i=tW(e.current.y,e.target.y,t),a=tW(e.current.width,e.target.width,t),o=tW(e.current.height,e.target.height,t),s=Math.abs(r-e.target.x)<.5&&Math.abs(i-e.target.y)<.5&&Math.abs(a-e.target.width)<.5&&Math.abs(o-e.target.height)<.5;e.current.x=s?e.target.x:r,e.current.y=s?e.target.y:i,e.current.width=s?e.target.width:a,e.current.height=s?e.target.height:o;let c=!0;if(n?.interpolateOpacity){let n=tW(e.opacity,e.targetOpacity,t);c=Math.abs(n-e.targetOpacity)<YM,e.opacity=c?e.targetOpacity:n}return!s||!c},T=()=>{let e=performance.now(),t=s===null?JM:e-s;s=e;let n=nW(aW.drag.lerpFactor,t),r=nW(aW.selection.lerpFactor,t),i=nW(aW.grabbed.lerpFactor,t),a=!1;u?.isInitialized&&w(u,n)&&(a=!0);for(let e of l)e.isInitialized&&w(e,r)&&(a=!0);let c=Date.now();d=d.filter(t=>{let n=t.id.startsWith(`label-`);if(t.isInitialized&&w(t,i)&&(a=!0),n&&t.targetOpacity===0){t.fadeStartTimestamp===null&&(t.fadeStartTimestamp=e);let n=e-t.fadeStartTimestamp,r=Math.min(1,n/125),i=1-(1-r)*(1-r);return t.opacity=Math.max(0,1-i),r>=1?!1:(a=!0,!0)}else n&&(t.fadeStartTimestamp=null);if(t.createdAt){let e=c-t.createdAt;if(e>=1625)return!1;if(e>1500){let n=Math.min(1,(e-BM)/125);t.opacity=1-(1-(1-n)*(1-n)),a=!0}return!0}return n?!0:t.opacity>0}),C(),a?o=ZF(T):(o=null,s=null)},E=()=>{o===null&&(o=ZF(T))},D=()=>{m(),E()};return mR(yR(()=>[e.selectionVisible,e.selectionBounds,e.selectionBoundsMultiple,e.selectionShouldSnap],([e,t,n,r])=>{if(!e||!t&&(!n||n.length===0)){l=[],E();return}let i;i=n&&n.length>0?n:t?[t]:[];let a=new Map;for(let e of l)a.set(e.id,e);l=i.map((e,t)=>{let n=`selection-${t}`,i=a.get(n);return i?(_(i,e),r&&(i.current.x=i.target.x,i.current.y=i.target.y,i.current.width=i.target.width,i.current.height=i.target.height),i):g(n,e)}),E()})),mR(yR(()=>[e.dragVisible,e.dragBounds],([e,t])=>{if(!e||!t){u=null,E();return}u?_(u,t):u=g(`drag`,t),E()})),mR(yR(()=>[e.grabbedBoxes,e.labelInstances],([e,t])=>{let n=e??[],r=t??[],i=new Map;for(let e of n)i.set(e.id,e);let a=new Map;for(let e of d)a.set(e.id,e);for(let e of n)if(!a.has(e.id)){let t=g(e.id,e.bounds,{createdAt:e.createdAt});d.push(t),a.set(e.id,t)}for(let e of d){let t=i.get(e.id);t&&_(e,t.bounds)}let o=new Set;for(let e of r){let t=v(e),n=e.status===`fading`?0:1;for(let r=0;r<t.length;r++){let i=t[r],s=`label-${e.id}-${r}`;o.add(s);let c=a.get(s);if(c)_(c,i,n);else{let e=g(s,i,{opacity:1,targetOpacity:n});d.push(e),a.set(s,e)}}}d=d.filter(e=>e.id.startsWith(`label-`)?o.has(e.id):i.has(e.id)),E()})),bR(()=>{m(),E(),window.addEventListener(`resize`,D);let e=null,t=()=>{Math.max(window.devicePixelRatio||1,2)!==a&&(D(),n())},n=()=>{e&&e.removeEventListener(`change`,t),e=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),e.addEventListener(`change`,t)};n(),xR(()=>{window.removeEventListener(`resize`,D),e&&e.removeEventListener(`change`,t),o!==null&&QF(o)})}),(()=>{var e=rW(),n=t;return typeof n==`function`?gz(n,e):t=e,pR(t=>mz(e,`z-index`,String(KM))),e})()},sW=Z(`<div style=position:fixed;pointer-events:none;will-change:opacity;contain:strict;transform:translateZ(0)>`),cW=e=>{let t=MM(),n=t?getComputedStyle(t).borderRadius:`0px`,r=()=>t?.getBoundingClientRect()??null,[i,a]=J(r());if(t){let n=()=>a(r());bR(()=>{let e=new ResizeObserver(n);e.observe(t),window.addEventListener(`scroll`,n,{capture:!0,passive:!0}),window.addEventListener(`resize`,n),xR(()=>{e.disconnect(),window.removeEventListener(`scroll`,n,{capture:!0}),window.removeEventListener(`resize`,n)})}),mR(()=>{e.visible&&n()})}let o=()=>{let e=i();return e?`${e.top}px`:`0`},s=()=>{let e=i();return e?`${e.left}px`:`0`},c=()=>{let e=i();return e?`${e.width}px`:`100%`},l=()=>{let e=i();return e?`${e.height}px`:`100%`};return(()=>{var t=sW();return mz(t,`border-radius`,n),mz(t,`z-index`,KM),mz(t,`transition`,`opacity 125ms ease-out`),mz(t,`box-shadow`,`inset 0 0 50px ${eN}`),pR(n=>{var r=o(),i=s(),a=c(),u=l(),d=+!!e.visible;return r!==n.e&&mz(t,`top`,n.e=r),i!==n.t&&mz(t,`left`,n.t=i),a!==n.a&&mz(t,`width`,n.a=a),u!==n.o&&mz(t,`height`,n.o=u),d!==n.i&&mz(t,`opacity`,n.i=d),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),t})()},lW=(e,t)=>{e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,t)}px`},uW=(e,t)=>{e&&e.focus(t)},dW=e=>{if(e<=0)return 8;let t=e*tN;return Math.round(Math.max(4,Math.min(8,t)))},fW=()=>{let e=MM();if(e){let t=e.getBoundingClientRect();return{width:t.width,height:t.height,offsetLeft:t.left,offsetTop:t.top}}let t=window.visualViewport;return t?{width:t.width,height:t.height,offsetLeft:t.offsetLeft,offsetTop:t.offsetTop}:{width:window.innerWidth,height:window.innerHeight,offsetLeft:0,offsetTop:0}},pW=e=>{if(typeof e==`string`||typeof e==`number`)return String(e);if(!e||typeof e!=`object`)return``;if(Array.isArray(e)){let t=``;for(let n of e){if(!n)continue;let e=pW(n);e&&(t=t?`${t} ${e}`:e)}return t}let t=``;for(let n in e)e[n]&&(t=t?`${t} ${n}`:n);return t},mW=(...e)=>{let t=``;for(let n of e){if(!n)continue;let e=pW(n);e&&(t=t?`${t} ${e}`:e)}return t},hW=e=>e.elementsCount&&e.elementsCount>1?{tagName:`${e.elementsCount} elements`,componentName:void 0}:{tagName:e.tagName||e.componentName||`element`,componentName:e.tagName?e.componentName:void 0},gW=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M19.2929 12.7071C19.6834 13.0976 20.3166 13.0976 20.7071 12.7071C21.0976 12.3166 21.0976 11.6834 20.7071 11.2929L12.7071 3.29289C12.5196 3.10536 12.2652 3 12 3C11.7348 3 11.4804 3.10536 11.2929 3.29289L3.29289 11.2929C2.90237 11.6834 2.90237 12.3166 3.29289 12.7071C3.68342 13.0976 4.31658 13.0976 4.70711 12.7071L11 6.41421L11 20C11 20.5523 11.4477 21 12 21C12.5523 21 13 20.5523 13 20L13 6.41422L19.2929 12.7071Z">`),_W=e=>{let t=()=>e.size??10;return(()=>{var n=gW();return pR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},vW=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path class=icon-loader-bar d="M12 2v4"style=animation-delay:0ms></path><path class=icon-loader-bar d="M15 6.8l2-3.5"style=animation-delay:-42ms></path><path class=icon-loader-bar d="M17.2 9l3.5-2"style=animation-delay:-83ms></path><path class=icon-loader-bar d="M18 12h4"style=animation-delay:-125ms></path><path class=icon-loader-bar d="M17.2 15l3.5 2"style=animation-delay:-167ms></path><path class=icon-loader-bar d="M15 17.2l2 3.5"style=animation-delay:-208ms></path><path class=icon-loader-bar d="M12 18v4"style=animation-delay:-250ms></path><path class=icon-loader-bar d="M9 17.2l-2 3.5"style=animation-delay:-292ms></path><path class=icon-loader-bar d="M6.8 15l-3.5 2"style=animation-delay:-333ms></path><path class=icon-loader-bar d="M2 12h4"style=animation-delay:-375ms></path><path class=icon-loader-bar d="M6.8 9l-3.5-2"style=animation-delay:-417ms></path><path class=icon-loader-bar d="M9 6.8l-2-3.5"style=animation-delay:-458ms>`),yW=e=>{let t=()=>e.size??16;return(()=>{var n=vW();return n.firstChild.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling,pR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},bW=Z(`<svg data-react-grab-arrow class="absolute block z-10"><path>`),xW=e=>{let t=()=>e.color??`var(--rg-panel-bg)`,n=()=>e.position===`bottom`,r=()=>dW(e.labelWidth??0),i=()=>r()*2,a=()=>r(),o=()=>{let e=i(),t=a(),r=1*Math.SQRT1_2,o=e/2,s=n()?t:0,c=n()?r:t-r,l=+!!n();return`M0 ${s} L${o-r} ${c} A1 1 0 0 ${l} ${o+r} ${c} L${e} ${s} Z`};return(()=>{var r=bW(),s=r.firstChild;return pR(c=>{var l=i(),u=a(),d=`0 0 ${i()} ${a()}`,f=`calc(${e.leftPercent}% + ${e.leftOffsetPx}px)`,p=n()?`0`:void 0,m=n()?void 0:`0`,h=n()?`translateX(-50%) translateY(calc(-100% + 1px))`:`translateX(-50%) translateY(calc(100% - 1px))`,g=o(),_=t();return l!==c.e&&Q(r,`width`,c.e=l),u!==c.t&&Q(r,`height`,c.t=u),d!==c.a&&Q(r,`viewBox`,c.a=d),f!==c.o&&mz(r,`left`,c.o=f),p!==c.i&&mz(r,`top`,c.i=p),m!==c.n&&mz(r,`bottom`,c.n=m),h!==c.s&&mz(r,`transform`,c.s=h),g!==c.h&&Q(s,`d`,c.h=g),_!==c.r&&Q(s,`fill`,c.r=_),c},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0}),r})()},SW=Z(`<span class=text-[var(--rg-text-primary)]>`),CW=Z(`<span class=text-[var(--rg-text-secondary)]>.`),wW=Z(`<span class="text-[13px] leading-4 h-fit font-medium overflow-hidden text-ellipsis whitespace-nowrap min-w-0">`),TW=Z(`<button type=button>`),EW=Z(`<div>`),DW=e=>{let t=()=>{e.onHoverChange?.(!0)},n=()=>{e.onHoverChange?.(!1)},r=()=>e.componentName?`${e.componentName}.${e.tagName}`:e.tagName,i=()=>(()=>{var t=wW();return $(t,X(tz,{get when(){return e.componentName},get children(){return[(()=>{var t=SW();return $(t,()=>e.componentName),t})(),(()=>{var t=CW();return t.firstChild,$(t,()=>e.tagName,null),t})()]}}),null),$(t,X(tz,{get when(){return!e.componentName},get children(){var t=SW();return $(t,()=>e.tagName),t}}),null),t})();return X(tz,{get when(){return e.isClickable},get fallback(){return(()=>{var r=EW();return dz(r,`click`,e.onClick,!0),r.addEventListener(`mouseleave`,n),r.addEventListener(`mouseenter`,t),$(r,i),pR(()=>uz(r,mW(`contain-layout flex items-center gap-1 max-w-[280px] overflow-hidden`,e.shrink&&`shrink-0`))),r})()},get children(){var a=TW();return dz(a,`click`,e.onClick,!0),a.addEventListener(`mouseleave`,n),a.addEventListener(`mouseenter`,t),$(a,i),pR(t=>{var n=`Open source for ${r()}`,i=mW(`contain-layout flex items-center gap-1 max-w-[280px] overflow-hidden cursor-pointer bg-transparent border-none p-0 m-0 text-left`,e.shrink&&`shrink-0`);return n!==t.e&&Q(a,`aria-label`,t.e=n),i!==t.t&&uz(a,t.t=i),t},{e:void 0,t:void 0}),a}})},sz([`click`]),OW=Z(`<div class="[font-synthesis:none] contain-layout shrink-0 flex flex-col items-start px-2 py-1.5 w-auto h-fit self-stretch [border-top-width:0.5px] border-t-solid border-t-[var(--rg-border-subtle)] antialiased rounded-t-none rounded-b-[6px]">`),kW=e=>(()=>{var t=OW();return $(t,()=>e.children),t})(),AW=(e,t={})=>(n={})=>{let r=t.variants;if(!r)return e;let i=[e];for(let e in r){let a=n[e]??t.defaultVariants?.[e];if(a===void 0)continue;let o=r[e][String(a)];o&&i.push(o)}return mW(...i)},jW=Z(`<div>`),MW=AW(`contain-layout antialiased [font-synthesis:none] bg-[var(--rg-panel-bg)]`,{variants:{shape:{panel:`rounded-[14px] [corner-shape:superellipse(1.25)]`,pill:`rounded-full`}},defaultVariants:{shape:`panel`}}),NW=e=>{let[t,n]=QR(e,[`shape`,`class`]);return(()=>{var e=jW();return hz(e,ZR({get class(){return mW(MW({shape:t.shape}),t.class)}},n),!1,!1),e})()},PW=null,FW={claim:e=>{PW=e},release:e=>{PW===e&&(PW=null)},isActive:e=>PW===e},IW=e=>{let t=Symbol(),n=PM(n=>{FW.isActive(t)&&(aB(n)||(n.code===`Enter`?e.onEnter?.(n):n.code===`Escape`&&e.onEscape?.(n)))});return bR(()=>{FW.claim(t),window.addEventListener(`keydown`,n,{capture:!0})}),xR(()=>{FW.release(t),window.removeEventListener(`keydown`,n,{capture:!0})}),{claimFocus:()=>FW.claim(t)}},LW=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M10.7071 21.2071C10.3166 21.5976 9.68342 21.5976 9.29289 21.2071L3.29289 15.2071C2.90237 14.8166 2.90237 14.1834 3.29289 13.7929L9.29289 7.79289C9.68342 7.40237 10.3166 7.40237 10.7071 7.79289C11.0976 8.18342 11.0976 8.81658 10.7071 9.20711L6.41421 13.5H16C16.5523 13.5 17 13.0523 17 12.5V3.5C17 2.94772 17.4477 2.5 18 2.5C18.5523 2.5 19 2.94772 19 3.5V12.5C19 14.1569 17.6569 15.5 16 15.5H6.41421L10.7071 19.7929C11.0976 20.1834 11.0976 20.8166 10.7071 21.2071Z">`),RW=e=>{let t=()=>e.size??10;return(()=>{var n=LW();return pR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},zW=Z(`<button>`),BW=AW(`contain-layout shrink-0 flex items-center justify-center cursor-pointer transition-all press-scale`,{variants:{variant:{chip:`px-[3px] py-px h-[17px] rounded-sm bg-[var(--rg-surface-hover)] [border-width:0.5px] border-solid border-[var(--rg-border-button)] hover:bg-[var(--rg-surface-active)] text-[var(--rg-text-primary)]`,destructive:`px-[3px] py-px h-[17px] rounded-sm bg-[var(--rg-error-bg)] hover:bg-[var(--rg-error-bg-hover)] text-[var(--rg-error-text)]`,ghost:`rounded-sm bg-transparent hover:bg-[var(--rg-surface-hover)] border-none outline-none p-0`}},defaultVariants:{variant:`chip`}}),VW=e=>{let[t,n]=QR(e,[`variant`,`class`,`type`]);return(()=>{var e=zW();return hz(e,ZR({get type(){return t.type??`button`},get class(){return mW(BW({variant:t.variant}),t.class)}},n),!1,!1),e})()},HW=Z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">No`),UW=Z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Copy`),WW=Z(`<span class="text-[var(--rg-error-text)] text-[13px] leading-3.5 font-sans font-medium">Yes`),GW=Z(`<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit">`),KW=Z(`<div data-react-grab-discard-prompt class="contain-layout shrink-0 flex flex-col justify-center items-end w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 px-2 w-full h-fit"><span class="text-[var(--rg-text-primary)] text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit">`),qW=e=>{let t=()=>e.showCancel??!0,{claimFocus:n}=IW({onEnter:t=>{t.preventDefault(),t.stopPropagation();let n=t.composedPath()[0],r=n instanceof HTMLElement?n:null;if(r?.closest(`[data-react-grab-discard-copy]`)){e.onCopy?.();return}if(r?.closest(`[data-react-grab-discard-no]`)){e.onCancel?.();return}if(r?.closest(`[data-react-grab-discard-yes]`)){e.onConfirm?.();return}e.onConfirm?.()},onEscape:t=>{t.preventDefault(),t.stopPropagation(),e.cancelOnEscape?e.onCancel?.():e.onConfirm?.()}});return(()=>{var r=KW(),i=r.firstChild.firstChild;return dz(r,`click`,n,!0),dz(r,`pointerdown`,n,!0),$(i,()=>e.label??`Discard?`),$(r,X(kW,{get children(){var n=GW();return $(n,X(tz,{get when(){return t()},get children(){return X(VW,{"data-react-grab-discard-no":!0,get onClick(){return e.onCancel},get children(){return HW()}})}}),null),$(n,X(tz,{get when(){return e.onCopy},get children(){return X(VW,{"data-react-grab-discard-copy":!0,get onClick(){return e.onCopy},get children(){return UW()}})}}),null),$(n,X(VW,{variant:`destructive`,class:`gap-0.5`,"data-react-grab-discard-yes":!0,get onClick(){return e.onConfirm},get children(){return[WW(),X(RW,{size:10,class:`text-[var(--rg-error-text)] opacity-50`})]}}),null),n}}),null),r})()},sz([`pointerdown`,`click`]),JW=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M7 2C4.23858 2 2 4.23858 2 7V15C2 17.7614 4.23858 20 7 20H8C8.55228 20 9 19.5523 9 19C9 18.4477 8.55228 18 8 18H7C5.34315 18 4 16.6569 4 15V7C4 5.34315 5.34315 4 7 4H17C18.6569 4 20 5.34315 20 7V15C20 16.6569 18.6569 18 17 18H14.4142L16.2071 16.2071C16.5976 15.8166 16.5976 15.1834 16.2071 14.7929C15.8166 14.4024 15.1834 14.4024 14.7929 14.7929L11.2929 18.2929C11.197 18.3888 11.1247 18.4993 11.0759 18.6172C11.027 18.7351 11 18.8644 11 19C11 19.2728 11.1093 19.5201 11.2864 19.7005C11.2889 19.7031 11.2914 19.7056 11.2939 19.7081L14.7929 23.2071C15.1834 23.5976 15.8166 23.5976 16.2071 23.2071C16.5976 22.8166 16.5976 22.1834 16.2071 21.7929L14.4142 20H17C19.7614 20 22 17.7614 22 15V7C22 4.23858 19.7614 2 17 2H7Z">`),YW=e=>{let t=()=>e.size??12;return(()=>{var n=JW();return pR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},XW=Z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Retry`),ZW=Z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Ok`),QW=Z(`<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit">`),$W=Z(`<div data-react-grab-error role=alert aria-live=assertive class="contain-layout shrink-0 flex flex-col justify-center items-end w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-start gap-1 px-2 w-full h-fit"><span class="text-[var(--rg-error-text)] text-[13px] leading-4 font-sans font-medium overflow-hidden line-clamp-5">`),eG=e=>{let{claimFocus:t}=IW({onEnter:t=>{t.preventDefault(),t.stopPropagation(),e.onRetry?.()},onEscape:t=>{t.preventDefault(),t.stopPropagation(),e.onAcknowledge?.()}}),n=()=>!!(e.onRetry||e.onAcknowledge);return(()=>{var r=$W(),i=r.firstChild,a=i.firstChild;return dz(r,`click`,t,!0),dz(r,`pointerdown`,t,!0),$(a,()=>e.error),$(r,X(tz,{get when(){return n()},get children(){return X(kW,{get children(){var t=QW();return $(t,X(tz,{get when(){return e.onRetry},get children(){return X(VW,{"data-react-grab-retry":!0,class:`gap-1`,"aria-keyshortcuts":`Enter`,get onClick(){return e.onRetry},get children(){return[XW(),X(YW,{size:10,"aria-hidden":`true`,class:`text-[var(--rg-text-secondary)]`})]}})}}),null),$(t,X(tz,{get when(){return e.onAcknowledge},get children(){return X(VW,{"data-react-grab-error-ok":!0,class:`gap-1`,"aria-keyshortcuts":`Escape`,get onClick(){return e.onAcknowledge},get children(){return ZW()}})}}),null),t}})}}),null),pR(t=>{var r={"pt-1.5 pb-1":n(),"py-1.5":!n()},o=e.error;return t.e=fz(i,r,t.e),o!==t.t&&Q(a,`title`,t.t=o),t},{e:void 0,t:void 0}),r})()},sz([`pointerdown`,`click`]),tG=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M7.5 12C7.5 13.3807 6.38071 14.5 5 14.5C3.61929 14.5 2.5 13.3807 2.5 12C2.5 10.6193 3.61929 9.5 5 9.5C6.38071 9.5 7.5 10.6193 7.5 12ZM14.5 12C14.5 13.3807 13.3807 14.5 12 14.5C10.6193 14.5 9.5 13.3807 9.5 12C9.5 10.6193 10.6193 9.5 12 9.5C13.3807 9.5 14.5 10.6193 14.5 12ZM19 14.5C20.3807 14.5 21.5 13.3807 21.5 12C21.5 10.6193 20.3807 9.5 19 9.5C17.6193 9.5 16.5 10.6193 16.5 12C16.5 13.3807 17.6193 14.5 19 14.5Z">`),nG=e=>{let t=()=>e.size??14;return(()=>{var n=tG();return pR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},rG=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM17.7071 10.7071C18.0976 10.3166 18.0976 9.68342 17.7071 9.29289C17.3166 8.90237 16.6834 8.90237 16.2929 9.29289L11 14.5858L8.70711 12.2929C8.31658 11.9024 7.68342 11.9024 7.29289 12.2929C6.90237 12.6834 6.90237 13.3166 7.29289 13.7071L10.2929 16.7071C10.6834 17.0976 11.3166 17.0976 11.7071 16.7071L17.7071 10.7071Z">`),iG=e=>{let t=()=>e.size??14;return(()=>{var n=rG();return pR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},aG=Z(`<button data-react-grab-ignore-events data-react-grab-more-options>`),oG=Z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Keep`),sG=Z(`<div class="contain-layout shrink-0 flex items-center justify-between gap-2 pt-1.5 pb-1 px-2 w-full h-fit"><span class="text-[var(--rg-text-primary)] text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap min-w-0"></span><div class="contain-layout shrink-0 flex items-center gap-2 h-fit">`),cG=Z(`<div class="contain-layout shrink-0 flex items-center gap-0.5 py-1.5 px-2 w-full h-fit"><span class="text-[var(--rg-text-primary)] text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap min-w-0">`),lG=e=>(()=>{var t=aG();return dz(t,`click`,t=>{t.stopImmediatePropagation(),e.onClick()}),dz(t,`pointerdown`,e=>{e.stopImmediatePropagation()}),$(t,X(nG,{size:14,class:`opacity-50 group-hover:opacity-100 transition-opacity`})),pR(()=>uz(t,mW(BW({variant:`ghost`}),`group size-4 text-[var(--rg-text-secondary)] hover:text-[var(--rg-text-primary)]`))),t})(),uG=e=>{let t,n,[r,i]=J(!1),[a,o]=J(!1),s=()=>r()?`Copied`:e.statusText,c=()=>{t!==void 0&&window.clearTimeout(t),n!==void 0&&window.clearTimeout(n),o(!0),e.onFadingChange?.(!0),e.onShowContextMenu?.()},l=()=>{r()||(i(!0),t=window.setTimeout(()=>{o(!0),e.onFadingChange?.(!0),n=window.setTimeout(()=>{e.onDismiss?.()},125)},1375))},{claimFocus:u}=IW({onEnter:e=>{e.preventDefault(),e.stopPropagation(),l()},onEscape:t=>{t.preventDefault(),t.stopPropagation(),e.onDismiss?.()}});return xR(()=>{t!==void 0&&window.clearTimeout(t),n!==void 0&&window.clearTimeout(n)}),X(NW,{shape:`pill`,"data-react-grab-completion":!0,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,class:`shrink-0 flex flex-col justify-center items-end w-fit h-fit max-w-[280px] transition-opacity duration-100 ease-out`,get style(){return{opacity:+!a()}},onPointerDown:u,onClick:u,get children(){return[X(tz,{get when(){return eB(()=>!r())()&&e.onDismiss},get children(){var t=sG(),n=t.firstChild,i=n.nextSibling;return $(n,s),$(i,X(tz,{get when(){return e.onShowContextMenu},get children(){return X(lG,{onClick:c})}}),null),$(i,X(tz,{get when(){return e.onDismiss},get children(){return X(VW,{"data-react-grab-dismiss":!0,class:`gap-1`,"aria-keyshortcuts":`Enter`,onClick:l,get disabled(){return r()},get"aria-disabled"(){return r()},get children(){return[oG(),X(tz,{get when(){return!r()},get children(){return X(RW,{size:10,class:`text-[var(--rg-text-secondary)]`})}})]}})}}),null),t}}),X(tz,{get when(){return r()||!e.onDismiss},get children(){var t=cG(),n=t.firstChild;return $(t,X(iG,{size:14,"aria-hidden":`true`,class:`text-[var(--rg-text-primary-85)] shrink-0`}),n),$(n,s),$(t,X(tz,{get when(){return e.onShowContextMenu},get children(){return X(lG,{onClick:c})}}),null),t}})]}})},dG=Z(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 py-1.5 px-2 w-full h-fit"><span class="shimmer-text text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap">`),fG=Z(`<div class="contain-layout shrink-0 flex flex-col items-start w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 w-fit h-fit px-2 py-1.5">`),pG=Z(`<button data-react-grab-submit type=button aria-label="Submit context"class="contain-layout shrink-0 flex items-center justify-center size-4 rounded-full bg-[var(--rg-submit-bg)] cursor-pointer ml-1 interactive-scale a11y-hitbox">`),mG=Z(`<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events data-react-grab-input aria-label="Add context for selected element"aria-keyshortcuts="Enter Escape"class="text-[var(--rg-text-primary)] text-[13px] leading-4 font-medium bg-transparent border-none resize-none flex-1 p-0 m-0 wrap-break-word overflow-y-auto"placeholder="Add context"rows=1 style=field-sizing:content;min-height:16px;scrollbar-width:none>`),hG=Z(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start w-fit h-fit min-w-[150px] max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2 max-w-full">`),gG=Z(`<div data-react-grab-ignore-events data-react-grab-selection-label>`),_G={left:MN,top:MN,arrowLeftPercent:50,arrowLeftOffset:0,edgeOffsetX:0},vG=e=>{let t,n,r,i=!1,[a,o]=J(0),[s,c]=J(0),[l,u]=J(0),[d,f]=J(0),[p,m]=J(!1),[h,g]=J(!1),_=()=>e.status!==`copying`&&e.status!==`copied`&&e.status!==`fading`&&e.status!==`error`,v=()=>e.status===`copied`||e.status===`fading`,y=()=>!!e.shouldToggleExpandOnClick&&!!e.onToggleExpand&&_()&&!e.discardPrompt&&!e.isPromptMode,b=()=>!!(e.isPromptMode||e.discardPrompt||y()||v()&&(e.onDismiss||e.onShowContextMenu)||e.status===`error`&&(e.onAcknowledgeError||e.onRetry)),x,S=e=>{i=e},C=()=>{f(e=>e+1)},w=PM(t=>{aB(t)||t.code===`Enter`&&!e.isPromptMode&&!e.discardPrompt&&_()&&(t.preventDefault(),t.stopImmediatePropagation(),e.onToggleExpand?.())});bR(()=>{let r=MM();if(x=new ResizeObserver(e=>{for(let a of e){let e=a.target.getBoundingClientRect();a.target===t&&!i?(o(e.width),c(e.height)):a.target===n?u(e.width):a.target===r&&C()}}),r&&x.observe(r),t){let e=t.getBoundingClientRect();o(e.width),c(e.height),x.observe(t)}n&&(u(n.getBoundingClientRect().width),x.observe(n)),window.addEventListener(`scroll`,C,!0),window.addEventListener(`resize`,C),window.visualViewport?.addEventListener(`resize`,C),window.visualViewport?.addEventListener(`scroll`,C),e.onToggleExpand&&window.addEventListener(`keydown`,w,{capture:!0})}),xR(()=>{x?.disconnect(),window.removeEventListener(`scroll`,C,!0),window.removeEventListener(`resize`,C),window.visualViewport?.removeEventListener(`resize`,C),window.visualViewport?.removeEventListener(`scroll`,C),window.removeEventListener(`keydown`,w,{capture:!0})});let T=()=>`${e.tagName??``}:${e.componentName??``}`,E=Y(t=>{d();let n=T(),r=n===t.elementIdentity?t:{position:_G,computedArrowPosition:null,hadValidBounds:!1,elementIdentity:n},i=e.selectionBounds,o=a(),c=s(),u=o>0&&c>0,f=i&&i.width>0&&i.height>0;if(!u||!f)return{position:r.hadValidBounds?r.position:_G,computedArrowPosition:r.computedArrowPosition,hadValidBounds:r.hadValidBounds,elementIdentity:n};let p=fW(),m=p.offsetLeft,h=p.offsetTop,g=m+p.width,_=h+p.height;if(!(i.x+i.width>m&&i.x<g&&i.y+i.height>h&&i.y<_))return{position:_G,computedArrowPosition:r.computedArrowPosition,hadValidBounds:r.hadValidBounds,elementIdentity:n};let v=i.x+i.width/2,y=e.mouseX??v,b=i.y+i.height,x=i.y,S=e.hideArrow?0:dW(l()),C=y,w=0,E=b+S+4;if(o>0){let e=C-o/2,t=C+o/2;t>g-8&&(w=g-8-t),e+w<m+8&&(w=m+8-e)}let D=c+S+4,O=E+c<=_-8;O||(E=x-D),E<h+8&&(E=h+8);let k=o/2,ee=k-w,te=Math.min(16,k),A=Math.max(o-16,k),ne=Math.max(te,Math.min(A,ee))-k;return{position:{left:C,top:E,arrowLeftPercent:50,arrowLeftOffset:ne,edgeOffsetX:w},computedArrowPosition:O?`bottom`:`top`,hadValidBounds:!0,elementIdentity:n}},{position:_G,computedArrowPosition:null,hadValidBounds:!1,elementIdentity:``}),D=()=>E().computedArrowPosition??`bottom`,O=()=>E().hadValidBounds;mR(yR(()=>e.selectionLabelShakeCount,()=>g(!0),{defer:!0}));let k=t=>{if(t.isComposing||t.keyCode===229)return;t.stopImmediatePropagation();let n=t.code===`Enter`&&!t.shiftKey,r=t.code===`Escape`;n?(t.preventDefault(),e.onSubmit?.()):r&&(t.preventDefault(),e.onConfirmDismiss?.())},ee=t=>{let n=t.target;n instanceof HTMLTextAreaElement&&(lW(n,95),e.onInputChange?.(n.value))},te=()=>hW({tagName:e.tagName,componentName:e.componentName,elementsCount:e.elementsCount}),A=Y(()=>!(e.error||e.discardPrompt||_()&&e.isPromptMode)),ne=t=>{if(t.stopImmediatePropagation(),e.filePath&&e.onOpen){e.onOpen();return}y()&&e.onToggleExpand?.()},re=t=>{t.stopImmediatePropagation(),_()&&e.isPromptMode&&!e.discardPrompt&&e.onSubmit&&r&&uW(r,{preventScroll:!0})},ie=()=>O()&&(v()||e.status===`error`);return X(tz,{get when(){return eB(()=>e.visible!==!1)()&&(e.selectionBounds||ie())},get children(){var i=gG();i.addEventListener(`mouseleave`,()=>e.onHoverChange?.(!1)),i.addEventListener(`mouseenter`,()=>e.onHoverChange?.(!0)),i.$$click=e=>{e.stopImmediatePropagation()},i.$$pointerdown=re;var a=t;return typeof a==`function`?gz(a,i):t=i,mz(i,`z-index`,`${GM}`),mz(i,`transition`,`opacity 125ms ease-out, filter 125ms ease-out`),$(i,X(tz,{get when(){return!e.hideArrow},get children(){return X(xW,{get position(){return D()},get leftPercent(){return E().position.arrowLeftPercent},get leftOffsetPx(){return E().position.arrowLeftOffset},get labelWidth(){return l()}})}}),null),$(i,X(tz,{get when(){return eB(()=>!!v())()&&!e.error},get children(){return X(uG,{get statusText(){return e.statusText??`Copied`},get onDismiss(){return e.onDismiss},onFadingChange:m,get onShowContextMenu(){return e.onShowContextMenu}})}}),null),$(i,X(NW,{ref:e=>n=e,get shape(){return A()?`pill`:`panel`},get class(){return mW(`flex items-center gap-[5px] w-fit h-fit p-0`,h()&&`animate-shake`)},get style(){return{display:v()&&!e.error?`none`:void 0}},onAnimationEnd:()=>g(!1),get children(){return[X(tz,{get when(){return e.status===`copying`},get children(){var t=dG(),n=t.firstChild,r=n.firstChild;return $(n,X(yW,{size:13,class:`text-[var(--rg-text-secondary)] shrink-0`}),r),$(r,()=>e.statusText??`Grabbing…`),t}}),X(tz,{get when(){return eB(()=>!!(_()&&!e.isPromptMode))()&&!e.discardPrompt},get children(){var t=fG(),n=t.firstChild;return $(n,X(DW,{get tagName(){return te().tagName},get componentName(){return te().componentName},get isClickable(){return!!(e.filePath&&e.onOpen)},onClick:ne,onHoverChange:S,shrink:!0})),t}}),X(tz,{get when(){return eB(()=>!!(_()&&e.isPromptMode))()&&!e.discardPrompt},get children(){var t=hG(),n=t.firstChild;return $(n,X(DW,{get tagName(){return te().tagName},get componentName(){return te().componentName},get isClickable(){return!!(e.filePath&&e.onOpen)},onClick:ne,onHoverChange:S})),$(t,X(kW,{get children(){var t=mG(),n=t.firstChild;return n.$$keydown=k,n.$$input=ee,gz(t=>{r=t,e.onSubmit&&queueMicrotask(()=>{uW(t,{preventScroll:!0}),lW(t,95)})},n),mz(n,`max-height`,`95px`),$(t,X(tz,{get when(){return e.onSubmit},get children(){var t=pG();return t.$$click=()=>e.onSubmit?.(),$(t,X(_W,{size:10,"aria-hidden":`true`,class:`text-[var(--rg-submit-fg)]`})),t}}),null),pR(()=>n.readOnly=!e.onSubmit),pR(()=>n.value=e.inputValue??``),t}}),null),t}}),X(tz,{get when(){return e.discardPrompt},keyed:!0,children:e=>X(qW,{get label(){return eB(()=>!!e.isKeyboardSelection)()?`Discard selection?`:e.label},get showCancel(){return!e.isKeyboardSelection},get cancelOnEscape(){return e.cancelOnEscape},get onConfirm(){return e.onConfirm},get onCopy(){return e.onCopy},onCancel:()=>{e.isKeyboardSelection||e.onCancel?.(),uW(r,{preventScroll:!0})}})}),X(tz,{get when(){return e.error},get children(){return X(eG,{get error(){return e.error},get onAcknowledge(){return e.onAcknowledgeError},get onRetry(){return e.onRetry}})}})]}}),null),pR(t=>{var n=mW(`fixed font-sans text-[13px] antialiased select-none ease-out`),r=`${E().position.top}px`,a=`${E().position.left}px`,o=`translateX(calc(-50% + ${E().position.edgeOffsetX}px))`,s=b()?`auto`:`none`,c=e.status===`fading`||p()?0:1,l=`drop-shadow(${LM}) blur(${e.status===`fading`||p()?`3px`:`0`})`;return n!==t.e&&uz(i,t.e=n),r!==t.t&&mz(i,`top`,t.t=r),a!==t.a&&mz(i,`left`,t.a=a),o!==t.o&&mz(i,`transform`,t.o=o),s!==t.i&&mz(i,`pointer-events`,t.i=s),c!==t.n&&mz(i,`opacity`,t.n=c),l!==t.s&&mz(i,`filter`,t.s=l),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),i}})},sz([`pointerdown`,`click`,`input`,`keydown`]),yG=Z(`<span style="transition-property:transform;transition-timing-function:cubic-bezier(0.32, 0.72, 0, 1)"><svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M20.8977 4.02356L21.8277 4.39121C22.3784 2.99813 21.0382 1.60206 19.6238 2.09546L3.47334 7.72936C1.38661 8.45728 1.49021 11.443 3.6224 12.0245L10.1289 13.799L11.2331 19.8724C11.638 22.0991 14.7072 22.4019 15.5393 20.2972L21.8277 4.39121L20.8977 4.02356Z">`),bG=e=>{let t=()=>e.size??14,n=()=>e.rotationDeg??0;return(()=>{var r=yG(),i=r.firstChild;return mz(r,`transition-duration`,`180ms`),pR(a=>{var o=mW(`inline-flex items-center justify-center will-change-transform`,e.class),s=`rotate(${n()}deg)`,c=t(),l=t();return o!==a.e&&uz(r,a.e=o),s!==a.t&&mz(r,`transform`,a.t=s),c!==a.a&&Q(i,`width`,a.a=c),l!==a.o&&Q(i,`height`,a.o=l),a},{e:void 0,t:void 0,a:void 0,o:void 0}),r})()},xG=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 12 12"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M1 6C1 3.239 3.239 1 6 1C8.761 1 11 3.239 11 6C11 8.761 8.761 11 6 11C5.103 11 4.261 10.764 3.532 10.35C2.959 10.759 2.257 11 1.5 11C1.376 11 1.253 10.993 1.132 10.981C0.923 10.959 0.75 10.809 0.699 10.605C0.648 10.402 0.729 10.188 0.903 10.07C1.347 9.768 1.688 9.328 1.865 8.812C1.319 8.011 1 7.042 1 6Z">`),SG=e=>{let t=()=>e.size??14;return(()=>{var n=xG();return pR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},CG=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M2 12C2 6.477 6.477 2 12 2C17.523 2 22 6.477 22 12C22 13.867 20.345 14.992 18.77 14.992H16.029C14.739 14.992 13.823 16.248 14.218 17.476L14.48 18.295C14.751 19.139 14.643 20.041 14.211 20.751C13.769 21.479 12.985 22 12 22C6.477 22 2 17.523 2 12ZM12.21 6.783C12.416 7.585 11.933 8.403 11.131 8.609C10.328 8.815 9.511 8.332 9.305 7.529C9.099 6.727 9.582 5.909 10.384 5.703C11.187 5.497 12.004 5.981 12.21 6.783ZM7.59 9.207C8.388 9.43 8.853 10.258 8.63 11.055C8.407 11.853 7.579 12.319 6.782 12.096C5.984 11.873 5.518 11.045 5.741 10.247C5.964 9.449 6.792 8.983 7.59 9.207ZM9.497 14.446C8.918 13.854 7.968 13.844 7.376 14.423C6.784 15.002 6.773 15.952 7.353 16.544C7.932 17.136 8.882 17.147 9.474 16.567C10.066 15.988 10.076 15.039 9.497 14.446ZM16.624 9.575C16.032 10.155 15.082 10.144 14.503 9.552C13.923 8.96 13.934 8.01 14.526 7.431C15.118 6.852 16.068 6.862 16.647 7.454C17.226 8.046 17.216 8.996 16.624 9.575Z">`),wG=e=>{let t=()=>e.size??14;return(()=>{var n=CG();return pR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},TG=Z(`<div>`),EG=0,DG=()=>Date.now()-EG<800,OG=e=>{let[t,n]=J(!1),[r,i]=J(!0),a;mR(yR(()=>e.visible,e=>{a!==void 0&&(clearTimeout(a),a=void 0),e?DG()?(i(!1),n(!0)):(i(!0),a=setTimeout(()=>{n(!0)},400)):(t()&&(EG=Date.now()),n(!1))})),xR(()=>{a!==void 0&&clearTimeout(a),t()&&(EG=Date.now())});let o=()=>e.position===`top`||e.position===`bottom`?{left:`50%`,translate:`-50%`,"z-index":`${GM}`}:{top:`50%`,translate:`0 -50%`,"z-index":`${GM}`};return X(tz,{get when(){return t()},get children(){var t=TG();return $(t,()=>e.children),pR(n=>{var i=mW(`absolute whitespace-nowrap px-2 py-0.5 rounded-full text-[10px] font-sans font-medium leading-4 pointer-events-none`,`bg-[var(--rg-panel-bg)] text-[var(--rg-text-primary)] [box-shadow:var(--rg-shadow)]`,e.position===`top`&&`bottom-full mb-2.5`,e.position===`bottom`&&`top-full mt-2.5`,e.position===`left`&&`right-full mr-2.5`,e.position===`right`&&`left-full ml-2.5`,r()&&`animate-tooltip-fade-in`),a=o();return i!==n.e&&uz(t,n.e=i),n.t=pz(t,a,n.t),n},{e:void 0,t:void 0}),t}})},kG=Z(`<div><button data-react-grab-ignore-events type=button>`),AG=e=>(()=>{var t=kG(),n=t.firstChild;dz(n,`mouseleave`,e.onMouseLeave),dz(n,`mouseenter`,e.onMouseEnter),dz(n,`contextmenu`,t=>e.onContextMenu?.(t)),dz(n,`click`,e.onClick,!0);var r=e.ref;return typeof r==`function`?gz(r,n):e.ref=n,$(n,()=>e.icon),$(t,X(tz,{get when(){return e.tooltip},get children(){return X(OG,{get visible(){return!!e.tooltipVisible},get position(){return e.tooltipPosition??`top`},get children(){return e.tooltip}})}}),null),pR(r=>{var i=e.wrapperClass,a=e.isToggle?``:void 0,o=e.actionId,s=e.label,c=!!e.isActive,l=e.class;return i!==r.e&&uz(t,r.e=i),a!==r.t&&Q(n,`data-react-grab-toolbar-toggle`,r.t=a),o!==r.a&&Q(n,`data-react-grab-toolbar-action`,r.a=o),s!==r.o&&Q(n,`aria-label`,r.o=s),c!==r.i&&Q(n,`aria-pressed`,r.i=c),l!==r.n&&uz(n,r.n=l),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),t})(),sz([`click`]),jG=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M9.29289 16.7071C8.90237 16.3166 8.90237 15.6834 9.29289 15.2929L12.5858 12L9.29289 8.70711C8.90237 8.31658 8.90237 7.68342 9.29289 7.29289C9.68342 6.90237 10.3166 6.90237 10.7071 7.29289L14.7071 11.2929C14.8946 11.4804 15 11.7348 15 12C15 12.2652 14.8946 12.5196 14.7071 12.7071L10.7071 16.7071C10.3166 17.0976 9.68342 17.0976 9.29289 16.7071Z">`),MG=e=>{let t=()=>e.size??14;return(()=>{var n=jG();return pR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},NG=Z(`<button data-react-grab-ignore-events data-react-grab-toolbar-collapse type=button class="group contain-layout shrink-0 flex items-center justify-center cursor-pointer interactive-scale a11y-hitbox">`),PG=Z(`<div data-react-grab-toolbar-panel><div><div><div>`),FG=e=>{let t=()=>e.snapEdge??`bottom`,n=()=>t()===`left`||t()===`right`,r=()=>e.isCollapsed?`duration-140`:`duration-220`,i=()=>n()?`transition-[grid-template-rows] ${r()} ease-drawer`:`transition-[grid-template-columns] ${r()} ease-drawer`,a=()=>n()?`min-h-0`:`min-w-0`,o=()=>e.isCollapsed?`${{top:`rounded-t-none rounded-b-[10px]`,bottom:`rounded-b-none rounded-t-[10px]`,left:`rounded-l-none rounded-r-[10px]`,right:`rounded-r-none rounded-l-[10px]`}[t()]} ${n()?`px-0.25 py-2`:`px-2 py-0.25`}`:``,s=()=>{let n=e.isCollapsed;switch(t()){case`top`:return n?`rotate-90`:`-rotate-90`;case`bottom`:return n?`-rotate-90`:`rotate-90`;case`left`:return n?`rotate-0`:`rotate-180`;case`right`:return n?`rotate-180`:`rotate-0`;default:return`-rotate-90`}},c=()=>{if(e.isChevronPressed)return n()?`scale(0.97, 1)`:`scale(1, 0.97)`},l=()=>(()=>{var t=NG();return dz(t,`pointercancel`,e.onCollapsePointerLeave),dz(t,`pointerleave`,e.onCollapsePointerLeave),dz(t,`pointerup`,e.onCollapsePointerUp,!0),dz(t,`pointerdown`,e.onCollapsePointerDown),dz(t,`click`,e.onCollapseClick,!0),$(t,X(MG,{size:18,get class(){return mW(`text-[var(--rg-text-secondary)] group-hover:text-[var(--rg-text-primary)] transition-[transform,color] duration-150 ease-drawer -m-0.5`,s())}})),pR(n=>{var r=e.isCollapsed?`Expand toolbar`:`Collapse toolbar`,i=!e.isCollapsed;return r!==n.e&&Q(t,`aria-label`,n.e=r),i!==n.t&&Q(t,`aria-expanded`,n.t=i),n},{e:void 0,t:void 0}),t})(),u=()=>e.isChevronPressed?`transition-[padding,border-radius,transform] duration-60 ease-[cubic-bezier(0,0,0.2,1)]`:`transition-[padding,border-radius,transform] ${r()} ease-drawer`;return(()=>{var t=PG(),r=t.firstChild,s=r.firstChild,d=s.firstChild;return dz(t,`click`,e.onPanelClick,!0),dz(t,`animationend`,e.onAnimationEnd),$(d,()=>e.actionButtons),$(t,l,null),pR(l=>{var f=mW(`flex items-center justify-center rounded-[13px] antialiased relative overflow-visible [font-synthesis:none]`,u(),n()&&`flex-col`,`bg-[var(--rg-panel-bg)] [box-shadow:var(--rg-shadow)]`,!e.isCollapsed&&(n()?`px-1.5 gap-0 py-2`:`py-1.5 gap-0 px-2`),o(),e.isShaking&&(n()?`animate-shake-vertical`:`animate-shake`)),p=e.transformOrigin,m=c(),h=mW(`grid relative overflow-visible`,i(),e.isCollapsed?n()?`grid-rows-[0fr] pointer-events-none`:`grid-cols-[0fr] pointer-events-none`:n()?`grid-rows-[1fr]`:`grid-cols-[1fr]`),g=mW(`flex`,n()?`flex-col items-center min-h-0`:`items-center min-w-0`,e.isCollapsed?`opacity-0`:`opacity-100`,e.isCollapsed?`transition-opacity duration-100 ease-drawer`:`transition-opacity duration-180 ease-drawer delay-[80ms]`),_=mW(`relative overflow-visible flex`,n()?`flex-col items-center`:`items-center`,a());return f!==l.e&&uz(t,l.e=f),p!==l.t&&mz(t,`transform-origin`,l.t=p),m!==l.a&&mz(t,`transform`,l.a=m),h!==l.o&&uz(r,l.o=h),g!==l.i&&uz(s,l.i=g),_!==l.n&&uz(d,l.n=_),l},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),t})()},sz([`click`,`pointerup`]),IG=e=>e===`top`||e===`bottom`,LG=e=>{let t=IG(e);return{width:t?30:16,height:t?16:30}},RG=(e,t,n,r)=>{let i=fW(),a=i.width,o=i.height,s=i.offsetLeft+16,c=Math.max(s,i.offsetLeft+a-n-16),l=i.offsetTop+16,u=Math.max(l,i.offsetTop+o-r-16);if(e===`top`||e===`bottom`){let r=Math.max(0,a-n-32);return{x:Math.min(c,Math.max(s,i.offsetLeft+16+r*t)),y:e===`top`?l:u}}let d=Math.max(0,o-r-32),f=Math.min(u,Math.max(l,i.offsetTop+16+d*t));return{x:e===`left`?s:c,y:f}},zG=(e,t,n,r,i)=>{let a=fW(),o=a.width,s=a.height;if(e===`top`||e===`bottom`){let e=o-r-32;return e<=0?dN:Math.max(0,Math.min(1,(t-a.offsetLeft-16)/e))}let c=s-i-32;return c<=0?dN:Math.max(0,Math.min(1,(n-a.offsetTop-16)/c))},BG=(e,t,n,r,i)=>{let a=fW(),o=a.width,s=a.height,{width:c,height:l}=n,u;if(t===`top`||t===`bottom`){let n=(c-r)/2;u={x:DB(e.x-n,a.offsetLeft+16,a.offsetLeft+o-c-16),y:t===`top`?a.offsetTop+16:a.offsetTop+s-l-16}}else{let n=(l-i)/2,r=DB(e.y-n,a.offsetTop+16,a.offsetTop+s-l-16);u={x:t===`left`?a.offsetLeft+16:a.offsetLeft+o-c-16,y:r}}let d=zG(t,u.x,u.y,c,l);return{position:u,ratio:d}},VG=(e,t,n,r)=>{let i=fW(),{width:a,height:o}=n,{width:s,height:c}=r;switch(e){case`top`:case`bottom`:{let n=(a-s)/2;return{x:DB(t.x+n,i.offsetLeft,i.offsetLeft+i.width-s),y:e===`top`?i.offsetTop:i.offsetTop+i.height-c}}case`left`:case`right`:{let n=(o-c)/2,r=DB(t.y+n,i.offsetTop,i.offsetTop+i.height-c);return{x:e===`left`?i.offsetLeft:i.offsetLeft+i.width-s,y:r}}}},HG=(e,t,n,r,i,a)=>{let o=fW(),s=o.width,c=o.height,l=e+i*150,u=t+a*150,d=u-o.offsetTop+r/2,f=o.offsetTop+c-u-r/2,p=l-o.offsetLeft+n/2,m=o.offsetLeft+s-l-n/2,h=Math.min(d,f,p,m),g=e=>DB(e,o.offsetLeft+16,o.offsetLeft+s-n-16),_=e=>DB(e,o.offsetTop+16,o.offsetTop+c-r-16);return h===d?{edge:`top`,x:g(l),y:o.offsetTop+16}:h===p?{edge:`left`,x:o.offsetLeft+16,y:_(u)}:h===m?{edge:`right`,x:o.offsetLeft+s-n-16,y:_(u)}:{edge:`bottom`,x:g(l),y:o.offsetTop+c-r-16}},UG=e=>{let[t,n]=J(!1),[r,i]=J(!1),[a,o]=J(!1),[s,c]=J({x:0,y:0}),l={x:0,y:0},u={x:0,y:0,time:0},d={x:0,y:0},f=!1,p,m=null,h=()=>{m?.abort(),m=null},g=t=>{if(!a()){if(Math.hypot(t.clientX-d.x,t.clientY-d.y)<=5)return;o(!0),e.onDragStart()}let n=performance.now(),r=n-u.time;r>0&&c({x:(t.clientX-u.x)/r,y:(t.clientY-u.y)/r}),u={x:t.clientX,y:t.clientY,time:n};let i=t.clientX-l.x,s=t.clientY-l.y;e.onPositionUpdate({x:i,y:s})},_=()=>{h();let t=a();if(n(!1),!t)return;f=!0;let r=e.getContainerRef(),o=r?.getBoundingClientRect();if(!o)return;let c=s(),l=HG(o.left,o.top,o.width,o.height,c.x,c.y),u=zG(l.edge,l.x,l.y,o.width,o.height);e.onSnapEdgeChange(l.edge,u),i(!0),ZF(()=>{let t=r?.getBoundingClientRect(),n=t?{width:t.width,height:t.height}:e.getExpandedDimensions();ZF(()=>{let t=RG(l.edge,u,n.width,n.height);e.onSnapComplete({edge:l.edge,ratio:u,position:t,expandedDimensions:n}),p=setTimeout(()=>{i(!1),e.onSnapAnimationEnd?.()},300)})})},v=PM(t=>{if(t.button!==0||e.isCollapsed())return;let r=e.getContainerRef()?.getBoundingClientRect();if(!r)return;d={x:t.clientX,y:t.clientY},l={x:t.clientX-r.left,y:t.clientY-r.top},n(!0),o(!1),c({x:0,y:0}),u={x:t.clientX,y:t.clientY,time:performance.now()},h(),m=new AbortController;let{signal:i}=m;window.addEventListener(`pointermove`,g,{signal:i}),window.addEventListener(`pointerup`,_,{signal:i}),window.addEventListener(`pointercancel`,_,{signal:i})});return xR(()=>{h(),clearTimeout(p)}),{isDragging:t,isSnapping:r,handlePointerDown:v,createDragAwareHandler:e=>t=>{if(t.stopImmediatePropagation(),f){f=!1;return}e()}}},WG=(e,t)=>{let n=t-e;return e+(n-Math.round(n/360)*360)},GG=Z(`<div data-react-grab-ignore-events data-react-grab-toolbar>`),KG=e=>{let t,n,r=null,i=PV(),[a,o]=J(!1),[s,c]=J(!1),[l,u]=J(!1),[d,f]=J(i?.edge??`bottom`),[p,m]=J(i?.ratio??.5),[h,g]=J({x:0,y:0}),[_,v]=J(!1),[y,b]=J(!1),[x,S]=J(!1),[C,w]=J(!1),[T,E]=J(0),[D,O]=J(null),k=()=>{r?.(),r=null,e.isActive||jL()},ee=UG({getContainerRef:()=>t,isCollapsed:s,getExpandedDimensions:()=>ce,onDragStart:()=>{O(null),r&&k()},onPositionUpdate:e=>g(e),onSnapEdgeChange:(e,t)=>{de(d(),e),f(e),m(t)},onSnapComplete:e=>{ce=e.expandedDimensions,g(e.position),Ae({edge:e.edge,ratio:e.ratio,collapsed:s(),enabled:!s()})}}),te=()=>d()===`left`||d()===`right`,A=()=>te()?`mb-1.5`:`mr-1.5`,ne=t=>e.activeActionId===t,re=()=>!!e.isActive&&(e.activeActionId??`copy`)===`copy`,ie=t=>D()===t&&!e.isActive&&!s()&&!ee.isDragging()&&!ee.isSnapping()&&!e.isContextMenuOpen,ae=()=>{switch(d()){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`;default:return`top`}},oe=e=>{e.stopImmediatePropagation()},se=(t,n)=>({onMouseEnter:e=>{ee.isDragging()||(O(t),n?.shouldFreezeInteractions!==!1&&!r&&(r=sR(),AL(e.clientX,e.clientY)),n?.onHoverChange?.(!0))},onMouseLeave:()=>{O(e=>e===t?null:e),n?.shouldFreezeInteractions!==!1&&!e.isActive&&!e.isContextMenuOpen&&k(),n?.onHoverChange?.(!1)}});mR(yR(()=>e.shakeCount,t=>{t&&!e.enabled&&v(!0)})),mR(yR(()=>[e.isActive,e.isContextMenuOpen],([e,t])=>{!e&&!t&&r&&(r(),r=null)})),mR(yR(()=>re(),e=>{if(!e){E(e=>WG(e,0));return}let t=PM(e=>{if(!n)return;let t=n.getBoundingClientRect(),r=t.left+t.width/2,i=t.top+t.height/2,a=e.clientX-r,o=e.clientY-i;if(Math.hypot(a,o)<4)return;let s=Math.atan2(o,a)*180/Math.PI- -45;E(e=>WG(e,s))});window.addEventListener(`pointermove`,t,{passive:!0}),xR(()=>{window.removeEventListener(`pointermove`,t)})}));let ce={width:78,height:28},[le,ue]=J(LG(d())),de=(e,t)=>{IG(e)!==IG(t)&&ue(LG(t))},fe=(e,n)=>{let r=t?.getBoundingClientRect(),i=LG(n);return BG(e,n,ce,r?.width??i.width,r?.height??i.height)},pe=()=>{g(RG(d(),p(),ce.width,ce.height))},me=ee.createDragAwareHandler(()=>e.onToggle?.()),he=ee.createDragAwareHandler(()=>e.onActivateAction?.(pN)),ge=ee.createDragAwareHandler(()=>e.onActivateAction?.(mN)),_e=`group contain-layout flex items-center justify-center cursor-pointer interactive-scale a11y-hitbox`,ve=()=>mW(`relative contain-layout flex items-center justify-center`,A()),ye=e=>e?`text-[var(--rg-text-primary)]`:`text-[var(--rg-text-secondary)] group-hover:text-[var(--rg-text-primary)]`,be=ee.createDragAwareHandler(()=>{let e=t?.getBoundingClientRect(),n=s(),r=p();if(n){let{position:e,ratio:t}=fe(je(),d());r=t,g(e),m(r)}else e&&(ce={width:e.width,height:e.height});b(!0),c(e=>!e),Ae({edge:d(),ratio:r,collapsed:!n,enabled:n}),Ce&&clearTimeout(Ce),Ce=setTimeout(()=>{b(!1),Te()},260)}),xe=()=>VG(d(),h(),ce,le()),Se,Ce,we=null,Te=()=>{let e=t?.getBoundingClientRect();!e||e.width===0||e.height===0||(s()?ue({width:e.width,height:e.height}):(ce={width:e.width,height:e.height},we={width:e.width,height:e.height}))},Ee=(e,t)=>{if(!(e===0||t===0)&&!(ee.isDragging()||ee.isSnapping())&&!y()){if(s()){let n=le();if(n.width===e&&n.height===t)return;ue({width:e,height:t});return}we&&we.width===e&&we.height===t||(we={width:e,height:t},ce={width:e,height:t},g(RG(d(),p(),e,t)))}},De=null,Oe=()=>{ee.isDragging()||ee.isSnapping()||De===null&&(De=ZF(()=>{De=null,pe()}))},ke=()=>{ee.isDragging()||(u(!0),pe(),Se&&clearTimeout(Se),Se=setTimeout(()=>{u(!1);let e=zG(d(),h().x,h().y,ce.width,ce.height);m(e),Ae({edge:d(),ratio:e,collapsed:s(),enabled:!s()})},500))},Ae=t=>{FV(t),e.onStateChange?.(t)};bR(()=>{t&&e.onContainerRef?.(t);let n=t?.getBoundingClientRect(),r=fW(),a=!!(n&&n.width>0&&n.height>0);i?(a&&n&&(ce={width:n.width,height:n.height}),c(i.collapsed),g(RG(i.edge,i.ratio,ce.width,ce.height))):a&&n?(ce={width:n.width,height:n.height},g({x:r.offsetLeft+(r.width-n.width)/2,y:r.offsetTop+r.height-n.height-16}),m(dN)):(g(RG(`bottom`,dN,ce.width,ce.height)),m(dN)),e.onSubscribeToStateChanges&&xR(e.onSubscribeToStateChanges(e=>{if(y()||!t?.getBoundingClientRect())return;let n=s()!==e.collapsed;if(de(d(),e.edge),f(e.edge),n&&!e.collapsed){let t=je();b(!0),c(e.collapsed);let{position:n,ratio:r}=fe(t,e.edge);g(n),m(r),clearTimeout(Ce),Ce=setTimeout(()=>{b(!1),Te()},260)}else n&&(b(!0),clearTimeout(Ce),Ce=setTimeout(()=>{b(!1),Te()},260)),c(e.collapsed),g(RG(e.edge,e.ratio,ce.width,ce.height)),m(e.ratio)})),window.addEventListener(`resize`,ke),window.visualViewport?.addEventListener(`resize`,ke),window.visualViewport?.addEventListener(`scroll`,ke);let l=MM();if(l&&(window.addEventListener(`scroll`,Oe,{passive:!0,capture:!0}),typeof ResizeObserver<`u`)){let e=new ResizeObserver(Oe);e.observe(l),xR(()=>e.disconnect())}if(typeof ResizeObserver<`u`&&t){let e=new ResizeObserver(e=>{let n=e[0];if(!n)return;let r=n.borderBoxSize?.[0],i,a;if(r)i=r.inlineSize,a=r.blockSize;else{let e=t?.getBoundingClientRect();if(!e)return;i=e.width,a=e.height}Ee(i,a)});e.observe(t),xR(()=>e.disconnect())}let u=setTimeout(()=>{o(!0)},500);xR(()=>{clearTimeout(u)})}),xR(()=>{window.removeEventListener(`resize`,ke),window.visualViewport?.removeEventListener(`resize`,ke),window.visualViewport?.removeEventListener(`scroll`,ke),window.removeEventListener(`scroll`,Oe,{capture:!0}),De!==null&&QF(De),clearTimeout(Se),clearTimeout(Ce),r&&k()});let je=()=>s()?xe():h(),Me=()=>s()?`cursor-pointer`:ee.isDragging()?`cursor-grabbing`:`cursor-grab`,Ne=()=>C()||!!e.isContextMenuOpen||ee.isDragging()||ee.isSnapping()||y()||x(),Pe=()=>!!e.isActive&&!Ne(),Fe=()=>l()||ee.isDragging()?``:ee.isSnapping()?`transition-[transform,opacity] duration-300 ease-out`:y()?`transition-[transform,opacity] ${s()?`duration-140`:`duration-220`} ease-drawer`:`transition-[transform,opacity] duration-400 ease-drawer`,Ie=()=>{switch(d()){case`top`:return`center top`;case`bottom`:return`center bottom`;case`left`:return`left center`;case`right`:return`right center`;default:return`center center`}};return(()=>{var r=GG();r.addEventListener(`mouseleave`,()=>{w(!1),e.onSelectHoverChange?.(!1)}),r.addEventListener(`mouseenter`,()=>{w(!0),s()||e.onSelectHoverChange?.(!0)}),dz(r,`mousedown`,oe),dz(r,`pointerdown`,e=>{oe(e),ee.handlePointerDown(e)});var i=t;return typeof i==`function`?gz(i,r):t=r,$(r,X(FG,{get isCollapsed(){return s()},get snapEdge(){return d()},get isShaking(){return _()},get isChevronPressed(){return x()},get transformOrigin(){return Ie()},onAnimationEnd:()=>v(!1),onCollapseClick:be,onCollapsePointerDown:()=>S(!0),onCollapsePointerUp:()=>S(!1),onCollapsePointerLeave:()=>S(!1),onPanelClick:e=>{if(s()){e.stopPropagation();let{position:t,ratio:n}=fe(je(),d());g(t),m(n),b(!0),c(!1),Ae({edge:d(),ratio:n,collapsed:!1,enabled:!0}),Ce&&clearTimeout(Ce),Ce=setTimeout(()=>{b(!1),Te()},260)}},get actionButtons(){return[X(AG,ZR({actionId:fN,isToggle:!0,ref:e=>n=e,get label(){return re()?`Stop selecting element`:`Copy element`},get isActive(){return re()},class:_e,get wrapperClass(){return ve()},onClick:me,onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),O(null),e.onToggleToolbarMenu?.()}},()=>se(fN),{get icon(){return X(bG,{size:14,get rotationDeg(){return T()},get class(){return ye(re())}})},get tooltipVisible(){return ie(fN)},get tooltipPosition(){return ae()},tooltip:`Copy`})),X(AG,ZR({actionId:pN,label:`Comment on element`,get isActive(){return ne(pN)},class:_e,get wrapperClass(){return ve()},onClick:he},()=>se(pN),{get icon(){return X(SG,{size:14,get class(){return ye(ne(pN))}})},get tooltipVisible(){return ie(pN)},get tooltipPosition(){return ae()},tooltip:`Comment`})),X(AG,ZR({actionId:mN,label:`Style element`,get isActive(){return ne(mN)},class:_e,get wrapperClass(){return ve()},onClick:ge},()=>se(mN),{get icon(){return X(wG,{size:14,get class(){return ye(ne(mN))}})},get tooltipVisible(){return ie(mN)},get tooltipPosition(){return ae()},tooltip:`Style`}))]}})),pR(e=>{var t=mW(`fixed left-0 top-0 font-sans text-[13px] antialiased select-none`,Me(),Fe(),a()?`pointer-events-auto`:`pointer-events-none`),n=String(GM),i=`translate(${je().x}px, ${je().y}px) scale(${Pe()?.97:1})`,o=Ie(),s=a()?Pe()?.55:1:0;return t!==e.e&&uz(r,e.e=t),n!==e.t&&mz(r,`z-index`,e.t=n),i!==e.a&&mz(r,`transform`,e.a=i),o!==e.o&&mz(r,`transform-origin`,e.o=o),s!==e.i&&mz(r,`opacity`,e.i=s),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),r})()},qG=wR(),JG=()=>{let e=TR(qG);if(!e)throw Error(`Menu subcomponents must be rendered inside <Menu.Provider>`);return e},YG=e=>X(qG.Provider,{get value(){return e.store},get children(){return e.children}}),XG=e=>X(NW,{get class(){return mW(`flex flex-col w-fit h-fit`,e.class)},get style(){return e.style},get children(){return e.children}}),ZG=Z(`<div role=menu aria-orientation=vertical><div aria-hidden=true class="pointer-events-none absolute opacity-0 transition-[top,left,width,height,opacity,border-radius] duration-75 ease-out bg-[var(--rg-surface-hover)]">`),QG=e=>{let t=JG();return(()=>{var n=ZG(),r=n.firstChild;n.$$pointermove=()=>t.notePointerMove(),gz(n=>{t.setHighlightContainer(n),e.ref?.(n)},n);var i=t.setHighlightRail;return typeof i==`function`?gz(i,r):t.setHighlightRail=r,$(n,()=>e.children,null),pR(r=>{var i=e.label,a=t.keyboardNavigation?t.activeDescendantId():void 0,o=t.keyboardNavigation?-1:void 0,s=mW(`relative flex flex-col`,e.class);return i!==r.e&&Q(n,`aria-label`,r.e=i),a!==r.t&&Q(n,`aria-activedescendant`,r.t=a),o!==r.a&&Q(n,`tabindex`,r.a=o),s!==r.o&&uz(n,r.o=s),r},{e:void 0,t:void 0,a:void 0,o:void 0}),n})()},sz([`pointermove`]),$G=Z(`<button data-react-grab-ignore-events type=button>`),eK=e=>{let t=JG(),n=t.createItemId(),r=e.value,i=()=>e.role??`menuitem`,a=()=>!e.disabled,o=()=>t.activeValue()===r,s;return bR(()=>{s&&(t.registerItem({value:r,domId:n,element:s,isEnabled:a,onSelect:()=>e.onSelect?.()}),xR(()=>t.unregisterItem(r)))}),(()=>{var c=$G();c.$$click=t=>{t.stopPropagation(),a()&&e.onSelect?.()},c.addEventListener(`pointerleave`,()=>{t.clearActiveOnPointerLeave&&t.setActiveItem(null)}),c.addEventListener(`pointerenter`,()=>{a()&&t.canActivateOnHover()&&t.setActiveItem(r)}),c.$$pointerdown=e=>e.stopPropagation();var l=s;return typeof l==`function`?gz(l,c):s=c,Q(c,`id`,n),$(c,()=>e.children),pR(n=>{var a=e.dataId??r,s=i(),l=i()===`menuitemradio`?!!e.checked:void 0,u=!!e.disabled,d=t.keyboardNavigation?o()?0:-1:void 0,f=e.disabled,p=mW(`relative z-1 contain-layout flex items-center justify-between w-full px-2 py-1 cursor-pointer text-left border-none bg-transparent disabled:opacity-40 disabled:cursor-default`,e.class);return a!==n.e&&Q(c,`data-react-grab-menu-item`,n.e=a),s!==n.t&&Q(c,`role`,n.t=s),l!==n.a&&Q(c,`aria-checked`,n.a=l),u!==n.o&&Q(c,`aria-disabled`,n.o=u),d!==n.i&&Q(c,`tabindex`,n.i=d),f!==n.n&&(c.disabled=n.n=f),p!==n.s&&uz(c,n.s=p),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),c})()},sz([`pointerdown`,`click`]),tK=Z(`<span>`),nK=e=>(()=>{var t=tK();return $(t,()=>e.children),pR(()=>uz(t,mW(`text-[13px] leading-4 font-sans font-medium`,e.class))),t})(),rK=Z(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M6.5 5C5.67157 5 5 5.67157 5 6.5C5 7.32843 5.67157 8 6.5 8H8V6.5C8 5.67157 7.32843 5 6.5 5ZM10 8V6.5C10 4.567 8.433 3 6.5 3C4.567 3 3 4.567 3 6.5C3 8.433 4.567 10 6.5 10H8V14H6.5C4.567 14 3 15.567 3 17.5C3 19.433 4.567 21 6.5 21C8.433 21 10 19.433 10 17.5V16H14V17.5C14 19.433 15.567 21 17.5 21C19.433 21 21 19.433 21 17.5C21 15.567 19.433 14 17.5 14H16V10H17.5C19.433 10 21 8.433 21 6.5C21 4.567 19.433 3 17.5 3C15.567 3 14 4.567 14 6.5V8H10ZM10 10V14H14V10H10ZM16 8H17.5C18.3284 8 19 7.32843 19 6.5C19 5.67157 18.3284 5 17.5 5C16.6716 5 16 5.67157 16 6.5V8ZM16 16V17.5C16 18.3284 16.6716 19 17.5 19C18.3284 19 19 18.3284 19 17.5C19 16.6716 18.3284 16 17.5 16H16ZM8 16H6.5C5.67157 16 5 16.6716 5 17.5C5 18.3284 5.67157 19 6.5 19C7.32843 19 8 18.3284 8 17.5V16Z">`),iK=e=>{let t=()=>e.size??11;return(()=>{var n=rK();return pR(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&Q(n,`width`,r.e=i),a!==r.t&&Q(n,`height`,r.t=a),o!==r.a&&Q(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},aK=Z(`<span>`),oK=Z(`<span style=display:inline-flex;align-items:center;gap:2px>`),sK=Z(`<span>Ctrl+`),cK=e=>{let t=()=>e.shortcut===`Enter`,n=()=>e.modifier!==!1,r=AB();return(()=>{var i=oK();return $(i,X(tz,{get when(){return t()},get children(){return X(RW,{size:8})}}),null),$(i,X(tz,{get when(){return!t()},get children(){return X(tz,{get when(){return n()},get fallback(){return(()=>{var t=aK();return $(t,()=>e.shortcut),t})()},get children(){return X(tz,{when:r,get fallback(){return(()=>{var t=sK();return t.firstChild,$(t,()=>e.shortcut,null),t})()},get children(){return[X(iK,{size:9}),(()=>{var t=aK();return $(t,()=>e.shortcut),t})()]}})}})}}),null),pR(()=>uz(i,e.class)),i})()},lK=e=>X(cK,{get shortcut(){return e.shortcut},get modifier(){return e.modifier},get class(){return mW(`text-[11px] font-sans text-[var(--rg-text-secondary)] ml-4`,e.class)}}),uK=({hiddenOpacity:e=`0`,visibleOpacity:t=`1`}={})=>{let n,r,i,a=e=>{r&&(r.style.opacity=t,r.style.top=`${e.offsetTop}px`,r.style.left=`${e.offsetLeft}px`,r.style.width=`${e.offsetWidth}px`,r.style.height=`${e.offsetHeight}px`)},o=typeof ResizeObserver>`u`?void 0:new ResizeObserver(()=>{i&&a(i)});xR(()=>o?.disconnect());let s=()=>{i=void 0,o?.disconnect(),r&&(r.style.opacity=e)};return{containerRef:e=>{n=e},followerRef:e=>{r=e},followElement:e=>{if(!(!r||!n)){if(!e){s();return}i=e,a(e),o?.disconnect(),o?.observe(e),o?.observe(n)}},hideFollower:s}},dK=(e,t)=>e!==t&&e instanceof HTMLElement,fK=(e,t)=>{let n=[];for(let r of Array.from(e.children))dK(r,t)&&n.push(r);return n},pK=(e={})=>{let{topCornerRadiusPx:t,bottomCornerRadiusPx:n,cornerShape:r}=e,i=t!==void 0||n!==void 0,a,o=!1,s=e=>{if(!a||!i)return;let s=e.parentElement;if(!s)return;let c=fK(s,a),l=c[0]===e,u=c[c.length-1]===e,d=l&&t!==void 0?`${t}px`:`0px`,f=u&&n!==void 0?`${n}px`:`0px`;a.style.borderTopLeftRadius=d,a.style.borderTopRightRadius=d,a.style.borderBottomLeftRadius=f,a.style.borderBottomRightRadius=f,r&&!o&&(a.style.setProperty(`corner-shape`,r),o=!0)},{containerRef:c,followerRef:l,followElement:u,hideFollower:d}=uK();return{containerRef:c,highlightRef:e=>{a=e,o=!1,l(e)},updateHighlight:e=>{u(e),e&&s(e)},clearHighlight:d}},mK=(e={})=>{let t=new Map,n=[],r=`react-grab-menu-${Math.random().toString(36).slice(2,8)}`,i=0,a=!1,o=e.value!==void 0,[s,c]=J(null),[l,u]=J(0),d=Y(()=>o?e.value?.()??null:s()),f=t=>{if(o){e.onValueChange?.(t);return}c(t)},p=pK(e.highlight??{});mR(yR([d,l],([e])=>{if(e===null){p.clearHighlight();return}let n=t.get(e);n?p.updateHighlight(n.element):p.clearHighlight()}));let m=()=>n.filter(e=>t.get(e)?.isEnabled()),h=()=>{let e=m();e.length>0&&f(e[0])},g=()=>{let e=m();e.length>0&&f(e[e.length-1])},_=()=>{let e=m();if(e.length===0)return;let t=e.indexOf(d()??``);f(e[t===-1?0:(t+1)%e.length])},v=()=>{let e=m();if(e.length===0)return;let t=e.indexOf(d()??``);f(e[t===-1?e.length-1:(t-1+e.length)%e.length])},y=Y(()=>{l();let e=d();if(e!==null)return t.get(e)?.domId});return{keyboardNavigation:e.keyboardNavigation??!1,clearActiveOnPointerLeave:e.clearActiveOnPointerLeave??!1,activeValue:d,activeDescendantId:y,setActiveItem:f,createItemId:()=>`${r}-item-${i++}`,canActivateOnHover:()=>!(e.requirePointerMove??!1)||a,notePointerMove:()=>{a=!0},resetPointerMove:()=>{a=!1},registerItem:e=>{t.set(e.value,e),n.includes(e.value)||n.push(e.value),u(e=>e+1)},unregisterItem:e=>{t.delete(e);let r=n.indexOf(e);r!==-1&&n.splice(r,1),o||c(t=>t===e?null:t),u(e=>e+1)},getActiveItem:()=>{let e=d();return e===null?void 0:t.get(e)},selectFirst:h,selectLast:g,selectNext:_,selectPrevious:v,setHighlightContainer:p.containerRef,setHighlightRail:p.highlightRef}},hK={Provider:YG,Panel:XG,List:QG,Item:eK,Label:nK,Shortcut:lK},gK=e=>e??!0,_K=(e,t)=>typeof e.enabled==`function`?t?e.enabled(t):!1:gK(e.enabled),vK=e=>{e.type===`contextmenu`&&e.preventDefault(),e.stopImmediatePropagation()},yK=e=>{let t=PM(t=>{e.isOpen()&&(e.shouldIgnoreKeyboardEvent?.(t)||e.shouldIgnoreInputEvents&&aB(t)||t.code===`Escape`&&(t.preventDefault(),t.stopImmediatePropagation(),e.onDismiss(`keyboard`)))}),n=PM(t=>{e.isOpen()&&(jB(t,`data-react-grab-ignore-events`)||e.shouldIgnoreRightClick&&t instanceof MouseEvent&&t.button===2||e.onDismiss(`pointer`))}),r=ZF(()=>{window.addEventListener(`mousedown`,n,{capture:!0}),window.addEventListener(`touchstart`,n,{capture:!0})});return window.addEventListener(`keydown`,t,{capture:!0}),()=>{QF(r),window.removeEventListener(`keydown`,t,{capture:!0}),window.removeEventListener(`mousedown`,n,{capture:!0}),window.removeEventListener(`touchstart`,n,{capture:!0})}},bK=Z(`<div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2">`),xK=Z(`<div data-react-grab-ignore-events data-react-grab-context-menu class="fixed font-sans text-[13px] antialiased [filter:var(--rg-drop-shadow)] select-none"style=pointer-events:auto>`),SK=e=>{let t,n,r=null,i=mK({keyboardNavigation:!0,highlight:{bottomCornerRadiusPx:14,cornerShape:hN}}),[a,o]=J(0),[s,c]=J(0),l=Y(()=>e.position!==null),u=Y(()=>hW({tagName:e.tagName,componentName:e.componentName})),d=()=>{if(t){let e=t.getBoundingClientRect();o(e.width),c(e.height)}};mR(()=>{l()&&ZF(d)});let f=Y(()=>{let t=e.selectionBounds,n=e.position,r=a(),i=s();if(r===0||i===0||!t||!n)return{left:vN.left,top:vN.top,arrowLeft:0,arrowPosition:`bottom`};let o=n.x??t.x+t.width/2,c=Math.max(4,Math.min(o-r/2,window.innerWidth-r-4)),l=Math.max(8,Math.min(o-c,r-8)),u=t.y+t.height+8+4,d=t.y-i-8-4,f=u+i>window.innerHeight,p=d>=0,m=f&&p,h=m?d:u,g=m?`top`:`bottom`;if(f&&!p){let e=n.y??t.y+t.height/2;h=Math.max(4,Math.min(e+4,window.innerHeight-i-4)),g=`top`}return{left:c,top:h,arrowLeft:l,arrowPosition:g}}),p=Y(()=>{let t=e.actions??[],n=e.actionContext;return t.map(e=>({id:e.id,label:e.label,action:()=>{n&&e.onAction(n)},enabled:_K(e,n),shortcut:e.shortcut,shortcutModifier:e.shortcutModifier}))});mR(yR(l,e=>{if(e){let e=t?.getRootNode(),i=e instanceof ShadowRoot?e.activeElement:null,a=document.activeElement;r=a instanceof HTMLElement&&i===null&&!(t instanceof Element&&t.contains(a))?a:null,n?.focus({preventScroll:!0});return}i.setActiveItem(null);let a=r;r=null,!(!(a instanceof HTMLElement)||!document.contains(a))&&ZF(()=>{let e=document.activeElement;(e===null||e===document.body)&&a.focus({preventScroll:!0})})})),bR(()=>{d();let t=t=>{if(!l())return;let n=t.key===`ArrowDown`,r=t.key===`ArrowUp`,a=t.key===`Home`,o=t.key===`End`,s=t.key===`Tab`;if(n||r||a||o||s){t.preventDefault(),t.stopPropagation();let e=n||s&&!t.shiftKey;a?i.selectFirst():o?i.selectLast():e?i.selectNext():i.selectPrevious();return}let c=e.actions??[],u=e.actionContext,d=n=>{u&&_K(n,u)&&(t.preventDefault(),t.stopPropagation(),n.onAction(u),e.onHide())};if(t.key===`Enter`){let e=i.getActiveItem();if(e){t.preventDefault(),t.stopPropagation(),e.isEnabled()&&e.onSelect();return}}let f=zV(c,t,{includeModifierShortcuts:!0});f&&d(f)},n=yK({isOpen:l,onDismiss:e.onDismiss,shouldIgnoreRightClick:!0}),r=PM(t);window.addEventListener(`keydown`,r,{capture:!0}),xR(()=>{n(),window.removeEventListener(`keydown`,r,{capture:!0})})});let m=Y(()=>{let{tagName:e,componentName:t}=u();return`Actions for ${t?`${t}.${e}`:e}`});return X(tz,{get when(){return l()},get children(){var r=xK();dz(r,`contextmenu`,vK,!0),dz(r,`click`,vK,!0),dz(r,`mousedown`,vK,!0),dz(r,`pointerdown`,vK,!0);var a=t;return typeof a==`function`?gz(a,r):t=r,mz(r,`z-index`,`${GM}`),$(r,X(xW,{get position(){return f().arrowPosition},leftPercent:0,get leftOffsetPx(){return f().arrowLeft}}),null),$(r,X(hK.Panel,{class:`justify-center items-start min-w-[100px]`,get children(){return[(()=>{var t=bK();return $(t,X(DW,{get tagName(){return u().tagName},get componentName(){return u().componentName},get isClickable(){return e.hasFilePath},onClick:t=>{t.stopPropagation(),e.hasFilePath&&e.actionContext&&(e.actions?.find(e=>e.id===`open`))?.onAction(e.actionContext)},shrink:!0})),t})(),X(kW,{get children(){return X(hK.Provider,{store:i,get children(){return X(hK.List,{ref:e=>n=e,get label(){return m()},class:`w-[calc(100%+16px)] -mx-2 -my-1.5 outline-none`,get children(){return X($R,{get each(){return p()},children:t=>X(hK.Item,{get value(){return t.id},get dataId(){return t.label.toLowerCase()},get disabled(){return!t.enabled},onSelect:()=>{t.action(),e.onHide()},get children(){return[X(hK.Label,{class:`text-[var(--rg-text-primary)]`,get children(){return t.label}}),X(tz,{get when(){return t.shortcut},children:e=>X(hK.Shortcut,{get shortcut(){return e()},get modifier(){return t.shortcutModifier}})})]}})})}})}})}})]}}),null),pR(e=>{var t=`${f().top}px`,n=`${f().left}px`;return t!==e.e&&mz(r,`top`,e.e=t),n!==e.t&&mz(r,`left`,e.t=n),e},{e:void 0,t:void 0}),r}})},sz([`pointerdown`,`mousedown`,`click`,`contextmenu`]),CK=(e,t,n,r)=>Math.max(r,Math.min(e,n-t-r)),wK=({anchor:e,measuredWidth:t,measuredHeight:n,viewportLeft:r=0,viewportTop:i=0,viewportWidth:a,viewportHeight:o,anchorGapPx:s,viewportPaddingPx:c,offscreenPosition:l})=>{if(!e||t===0||n===0)return l;let u,d;return e.edge===`left`||e.edge===`right`?(u=e.edge===`left`?e.x+s:e.x-t-s,d=e.y-n/2):(u=e.x-t/2,d=e.edge===`top`?e.y+s:e.y-n-s),{left:r+CK(u-r,t,a,c),top:i+CK(d-i,n,o,c)}},TK=(e,t)=>{let[n,r]=J(0),[i,a]=J(0),[o,s]=J(!1),[c,l]=J(!1),[u,d]=J(0),[f,p]=J(`bottom`),m,h,g=()=>{clearTimeout(m),h!==void 0&&(QF(h),h=void 0)},_=()=>{let t=e();t&&(r(t.offsetWidth),a(t.offsetHeight))},v=()=>{_R(()=>{d(e=>e+1),_()})},y=Y(()=>t()!==null);return mR(()=>{let n=t();n?(p(n.edge),clearTimeout(m),s(!0),h!==void 0&&QF(h),h=ZF(()=>{_(),e()?.offsetHeight,l(!0)})):(h!==void 0&&QF(h),l(!1),m=setTimeout(()=>{s(!1)},120)),xR(g)}),mR(()=>{if(!y())return;window.addEventListener(`resize`,v),window.visualViewport?.addEventListener(`resize`,v),window.visualViewport?.addEventListener(`scroll`,v);let e=MM(),t;e&&typeof ResizeObserver<`u`&&(t=new ResizeObserver(v),t.observe(e)),xR(()=>{window.removeEventListener(`resize`,v),window.visualViewport?.removeEventListener(`resize`,v),window.visualViewport?.removeEventListener(`scroll`,v),t?.disconnect()})}),{shouldMount:o,isAnimatedIn:c,lastAnchorEdge:f,displayPosition:Y(e=>{u();let r=fW(),a=wK({anchor:t(),measuredWidth:n(),measuredHeight:i(),viewportLeft:r.offsetLeft,viewportTop:r.offsetTop,viewportWidth:r.width,viewportHeight:r.height,anchorGapPx:8,viewportPaddingPx:8,offscreenPosition:vN});return a.left===vN.left?e:a},vN),measure:_,clearAnimationHandles:g}},EK={padding:{prefix:`p`,scale:`spacing`},"padding-top,padding-bottom":{prefix:`py`,scale:`spacing`},"padding-left,padding-right":{prefix:`px`,scale:`spacing`},"padding-top":{prefix:`pt`,scale:`spacing`},"padding-right":{prefix:`pr`,scale:`spacing`},"padding-bottom":{prefix:`pb`,scale:`spacing`},"padding-left":{prefix:`pl`,scale:`spacing`},margin:{prefix:`m`,scale:`spacing`},"margin-top,margin-bottom":{prefix:`my`,scale:`spacing`},"margin-left,margin-right":{prefix:`mx`,scale:`spacing`},"margin-top":{prefix:`mt`,scale:`spacing`},"margin-right":{prefix:`mr`,scale:`spacing`},"margin-bottom":{prefix:`mb`,scale:`spacing`},"margin-left":{prefix:`ml`,scale:`spacing`},gap:{prefix:`gap`,scale:`spacing`},"column-gap":{prefix:`gap-x`,scale:`spacing`},"row-gap":{prefix:`gap-y`,scale:`spacing`},"width,height":{prefix:`size`,scale:`spacing`},width:{prefix:`w`,scale:`spacing`},height:{prefix:`h`,scale:`spacing`},"min-width":{prefix:`min-w`,scale:`spacing`},"max-width":{prefix:`max-w`,scale:`spacing`},"min-height":{prefix:`min-h`,scale:`spacing`},"max-height":{prefix:`max-h`,scale:`spacing`},"top,right,bottom,left":{prefix:`inset`,scale:`spacing`},"top,bottom":{prefix:`inset-y`,scale:`spacing`},"left,right":{prefix:`inset-x`,scale:`spacing`},top:{prefix:`top`,scale:`spacing`},right:{prefix:`right`,scale:`spacing`},bottom:{prefix:`bottom`,scale:`spacing`},left:{prefix:`left`,scale:`spacing`},"border-width":{prefix:`border`,scale:`border-width`},"border-top-width":{prefix:`border-t`,scale:`border-width`},"border-right-width":{prefix:`border-r`,scale:`border-width`},"border-bottom-width":{prefix:`border-b`,scale:`border-width`},"border-left-width":{prefix:`border-l`,scale:`border-width`},"z-index":{prefix:`z`,scale:`z-index`},opacity:{prefix:`opacity`,scale:`opacity`}},DK=(e,t)=>{let n=EK[e];if(!n)return null;let{prefix:r,scale:i}=n;if(i===`spacing`){if(t<0)return null;let e=t/4;return!Number.isInteger(e)||e>96?null:`${r}-${e}`}return i===`border-width`?!Number.isInteger(t)||t<0||t>8?null:t===1?r:`${r}-${t}`:i===`z-index`?!Number.isInteger(t)||t<0||t>50?null:`${r}-${t}`:!Number.isFinite(t)||t<0||t>100||t%5!=0?null:`${r}-${t}`},OK=e=>{let t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement:e.ownerDocument?.activeElement??document.activeElement},kK=e=>e.toLowerCase()===`#00000000`?SN:e.toUpperCase(),AK=Z(`<input data-react-grab-ignore-events data-react-grab-input type=text autocapitalize=none autocorrect=off autocomplete=off>`),jK=e=>{let[t,n]=QR(e,[`class`,`ref`,`autoFocusSelect`]);return(()=>{var e=AK();return gz(e=>{t.autoFocusSelect&&queueMicrotask(()=>{e.focus(),e.select()}),t.ref?.(e)},e),Q(e,`spellcheck`,!1),hz(e,ZR({get class(){return mW(`bg-transparent border-none outline-none text-[var(--rg-text-primary)] p-0 m-0`,t.class)}},n),!1,!1),e})()},MK=`text-[13px] leading-4 font-medium`,NK={position:`absolute`,opacity:0,"pointer-events":`none`,width:`0`,height:`0`,margin:`0`,padding:`0`,overflow:`hidden`},PK=Z(`<div class="flex items-center gap-2 w-full px-2 h-[20px]"><div class="flex items-center gap-1 ml-auto shrink-0"><button type=button data-react-grab-ignore-events aria-label="Pick color"class="size-[16px] rounded-[4px] border-[var(--rg-border-button)] [border-width:0.5px] border-solid p-0 m-0 cursor-pointer shrink-0"></button><input data-react-grab-ignore-events type=color aria-hidden=true tabindex=-1 class="absolute opacity-0 pointer-events-none size-0">`),FK=Z(`<span>`),IK=Z(`<span class="text-[12px] leading-4 font-medium tabular-nums text-[var(--rg-text-primary)] cursor-text">`),LK=e=>e.length===9?e.slice(0,7):e,RK=e=>{let[t,n]=J(null),r=()=>t()!==null,i=()=>kK(e.value),a,o=!0;xR(()=>{o=!1}),bR(()=>{let t=e.onRegisterTrigger?.(()=>a?.click());xR(()=>t?.())});let s=()=>{let r=t();if(r===null)return;n(null);let i=EB(r);i?i.toLowerCase()!==e.value.toLowerCase()&&e.onCommit(i,`keyboard`):e.onInvalidCommit?.(),e.onEditComplete?.()},c=()=>{r()&&(n(null),e.onEditComplete?.())},l=e=>{if(!(e.isComposing||e.keyCode===229)){if(e.stopImmediatePropagation(),e.key===`Enter`){e.preventDefault(),s();return}e.key===`Escape`&&(e.preventDefault(),c())}},u=t=>{t.preventDefault(),t.stopPropagation(),e.onInteract?.(),a?.click()};return(()=>{var c=PK(),d=c.firstChild,f=d.firstChild,p=f.nextSibling;$(c,X(tz,{get when(){return e.label},children:e=>(()=>{var t=FK();return uz(t,`${MK} text-[var(--rg-text-primary)] truncate min-w-0`),$(t,e),t})()}),d),$(d,X(tz,{get when(){return r()},get fallback(){return(()=>{var e=IK();return e.$$click=e=>{e.preventDefault(),e.stopPropagation(),n(i())},e.$$pointerdown=e=>e.stopPropagation(),$(e,i),pR(()=>Q(e,`data-react-grab-value`,i())),e})()},get children(){return X(jK,{autoFocusSelect:!0,inputmode:`text`,"aria-label":`Style color hex`,class:`text-[12px] leading-4 font-medium tabular-nums text-right`,get style(){return{"field-sizing":`content`,"min-width":`32px`,"max-width":e.emphasized?`100px`:`72px`}},get value(){return t()??``},onInput:e=>n(e.currentTarget.value),onKeyDown:l,onBlur:s,onPointerDown:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()})}}),f),f.$$click=u,f.$$mousedown=e=>e.preventDefault(),f.$$pointerdown=e=>e.stopPropagation(),p.$$input=t=>{if(!o)return;let n=t.currentTarget.value,r=e.value.length===9?e.value.slice(7):``,i=n+(r.toLowerCase()===`00`?``:r);e.onInteract?.(),i&&i.toLowerCase()!==e.value.toLowerCase()&&e.onCommit(i,`pointer`)};var m=a;return typeof m==`function`?gz(m,p):a=p,pR(t=>mz(f,`background-color`,e.value)),pR(()=>p.value=LK(e.value)),c})()},sz([`pointerdown`,`mousedown`,`click`,`input`]),zK=Z(`<svg width=1em height=1em viewBox="0 0 24 24"fill=none xmlns=http://www.w3.org/2000/svg aria-hidden=true style=width:16px;height:16px;flex-shrink:0;cursor:pointer><path fill-rule=evenodd clip-rule=evenodd>`),BK=e=>{let t=()=>e.active?`var(--rg-text-primary)`:`var(--rg-text-secondary)`,n=()=>e.active?e.direction===`left`?-2:2:0,r=()=>e.active?1.12:1,i=()=>e.direction===`left`?`M2.54282 10.5427C1.76177 11.3238 1.76177 12.5901 2.54282 13.3712L9.70183 20.5302C11.1193 21.9476 13.5428 20.9437 13.5428 18.9392V16.9573H21.0428C22.1474 16.9573 23.0428 16.0619 23.0428 14.9573V8.95733C23.0428 7.85276 22.1474 6.95733 21.0428 6.95733L13.5428 6.95733V4.97473C13.5428 2.9702 11.1193 1.96631 9.70183 3.38373L2.54282 10.5427Z`:`M14.2983 20.5302L21.4573 13.3712C22.2383 12.5901 22.2383 11.3238 21.4573 10.5427L14.2983 3.38374C12.8808 1.96631 10.4573 2.97019 10.4573 4.97473V6.95659L3.95728 6.95659C2.85271 6.95659 1.95728 7.85202 1.95728 8.95659V14.9566C1.95728 16.0612 2.85271 16.9566 3.95727 16.9566H10.4573V18.9392C10.4573 20.9437 12.8808 21.9476 14.2983 20.5302Z`;return(()=>{var a=zK(),o=a.firstChild;return dz(a,`pointerdown`,e.onPointerDown,!0),pR(s=>{var c=`translateX(${n()}px) scale(${r()})`,l=e.active?`transform 30ms cubic-bezier(0, 0, 0.2, 1)`:`transform 450ms cubic-bezier(0.34, 1.8, 0.64, 1)`,u=i(),d=t(),f=e.active?`fill 50ms ease`:`fill 300ms ease`;return c!==s.e&&mz(a,`transform`,s.e=c),l!==s.t&&mz(a,`transition`,s.t=l),u!==s.a&&Q(o,`d`,s.a=u),d!==s.o&&Q(o,`fill`,s.o=d),f!==s.i&&mz(o,`transition`,s.i=f),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),a})()},sz([`pointerdown`]),VK=Z(`<span>`),HK=Z(`<div class="flex items-center gap-2 w-full px-2 h-[20px]"><div class="ml-auto shrink-0 flex items-center gap-1"><span data-react-grab-ignore-events role=button tabindex=-1 class="text-[12px] leading-4 font-medium tabular-nums text-[var(--rg-text-primary)] cursor-pointer select-none min-w-[36px] text-center">`),UK=e=>{let t=()=>e.options.find(t=>t.value===e.value)?.label??e.value;return(()=>{var n=HK(),r=n.firstChild,i=r.firstChild;return $(n,X(tz,{get when(){return e.label},get children(){var t=VK();return uz(t,`${MK} text-[var(--rg-text-primary)] truncate min-w-0`),$(t,()=>e.label),t}}),r),$(r,X(BK,{direction:`left`,get active(){return e.activeKey===`left`},onPointerDown:()=>e.onStep(-1)}),i),i.$$contextmenu=t=>{t.preventDefault(),t.stopPropagation(),e.onStep(-1)},i.$$click=t=>{t.preventDefault(),t.stopPropagation(),e.onStep(1)},i.$$mousedown=e=>e.preventDefault(),i.$$pointerdown=e=>e.stopPropagation(),$(i,t),$(r,X(BK,{direction:`right`,get active(){return e.activeKey===`right`},onPointerDown:()=>e.onStep(1)}),null),pR(t=>{var n=`Cycle ${e.label??`value`}`,r=`Click to cycle (${e.options.length} options)`;return n!==t.e&&Q(i,`aria-label`,t.e=n),r!==t.t&&Q(i,`title`,t.t=r),t},{e:void 0,t:void 0}),n})()},sz([`pointerdown`,`mousedown`,`click`,`contextmenu`]),WK=e=>e.kind===`numeric`?e:null,GK=e=>e.kind===`color`?e:null,KK=e=>e.kind===`enum`?e:null,qK=/^[0-9]$/,JK=e=>{let t=Array.from(e),n=t.findIndex(e=>qK.test(e));if(n<0)return{prefixLiterals:t,rightAlignedSegments:[]};let r=t.slice(0,n),i=[],a=0;for(let e=t.length-1;e>=n;e--){let n=t[e],r=qK.test(n)?`digit`:`literal`;i.push({kind:r,value:n,digitDistanceFromRight:a}),r===`digit`&&(a+=1)}return{prefixLiterals:r,rightAlignedSegments:i}},YK=Z(`<span class=rg-slot-column aria-hidden=true><span class=rg-slot-sizer>0</span><span class=rg-slot-cell>`),XK=Z(`<span class="rg-slot-cell rg-slot-exit">`),ZK=Z(`<span><span class=inline-flex style=flex-direction:row-reverse>`),QK=Z(`<span class="inline-block whitespace-pre"aria-hidden=true>`),$K=e=>typeof e==`number`?e:Number.parseFloat(String(e).replace(/[^0-9.-]/g,``))||0,eq=e=>{let t,[n,r]=J(null),i=null;mR(yR(()=>e.digit,(n,a)=>{a===void 0||n===a||(t&&(t.classList.remove(`rg-slot-enter`),t.offsetWidth,t.classList.add(`rg-slot-enter`)),r({digit:a,direction:e.direction}),i!==null&&clearTimeout(i),i=setTimeout(()=>r(null),350))},{defer:!0})),xR(()=>{i!==null&&clearTimeout(i)});let a=()=>({"animation-delay":`${e.delayMs}ms`});return(()=>{var r=YK(),i=r.firstChild.nextSibling,o=t;return typeof o==`function`?gz(o,i):t=i,$(i,()=>e.digit),$(r,X(tz,{get when(){return n()},keyed:!0,children:e=>(()=>{var t=XK();return $(t,()=>e.digit),pR(n=>{var r=String(e.direction),i=a();return r!==n.e&&Q(t,`data-dir`,n.e=r),n.t=pz(t,i,n.t),n},{e:void 0,t:void 0}),t})()}),null),pR(t=>{var n=String(e.direction),r=a();return n!==t.e&&Q(i,`data-dir`,t.e=n),t.t=pz(i,r,t.t),t},{e:void 0,t:void 0}),r})()},tq=e=>{let t=Y(()=>String(e.children??``)),n=Y(()=>JK(t())),r=Y(yR(()=>$K(e.children),(e,t)=>t===void 0||e===t?0:e>t?1:-1)),i=Y(()=>e.direction??r());return(()=>{var r=ZK(),a=r.firstChild;return $(r,X(ez,{get each(){return n().prefixLiterals},children:e=>(()=>{var t=QK();return $(t,e),t})()}),a),$(a,X(ez,{get each(){return n().rightAlignedSegments},children:e=>X(tz,{get when(){return e().kind===`digit`},get fallback(){return(()=>{var t=QK();return $(t,()=>e().value),t})()},get children(){return X(eq,{get digit(){return Number(e().value)},get direction(){return i()},get delayMs(){return e().digitDistanceFromRight*18}})}})})),pR(n=>{var i=t(),a=`inline-flex ${e.class??``}`,o={...e.style,"--rg-slot-dur":`350ms`};return i!==n.e&&Q(r,`aria-label`,n.e=i),a!==n.t&&uz(r,n.t=a),n.a=pz(r,o,n.a),n},{e:void 0,t:void 0,a:void 0}),r})()},nq=Z(`<div data-react-grab-slider-base aria-hidden=true class="absolute inset-y-0 left-0 right-0 rounded-[6px] bg-[var(--rg-surface-active)] pointer-events-none">`),rq=Z(`<div class="flex items-center gap-1 w-full px-1"><div role=slider aria-keyshortcuts="ArrowLeft ArrowRight"tabindex=-1 class="relative flex-1 h-[20px] flex items-center overflow-hidden rounded-[6px]"><div data-react-grab-slider-fill aria-hidden=true class="absolute inset-y-0 left-0 bg-[var(--rg-surface-active)] pointer-events-none"></div><div aria-hidden=true class="absolute inset-0 pointer-events-none"></div><div data-react-grab-slider-handle aria-hidden=true class="absolute top-[2px] bottom-[2px] w-[2px] rounded-[1px] bg-[var(--rg-text-primary)] pointer-events-none"style="transition:opacity 120ms ease"></div><div class="relative z-10 flex items-center justify-between w-full px-2 pointer-events-none">`),iq=Z(`<div data-react-grab-slider-hash-mark class="absolute top-1/2 w-px h-[8px] rounded-[1px] bg-[var(--rg-text-secondary)]"style="transform:translate(-50%, -50%);transition:opacity 200ms ease">`),aq=Z(`<span>`),oq=Z(`<span class="ml-auto flex items-center gap-1 pointer-events-auto"><span data-react-grab-value-text class="text-[12px] leading-4 font-medium tabular-nums text-[var(--rg-text-primary)]"><span class="text-[9px] text-[var(--rg-text-secondary)] ml-px">`),sq=Z(`<span data-react-grab-tailwind-label aria-hidden=true class="text-[10px] leading-4 text-[var(--rg-text-secondary)] tabular-nums">`),cq=Array.from({length:9},(e,t)=>(t+1)*100/10),lq=/^(-?(?:\d+\.?\d*|\.\d+))\s*([a-zA-Z%]*)$/,uq=e=>{let[t,n]=J(null),[r,i]=J(0),[a,o]=J(!1),[s,c]=J(!1),l=()=>t()!==null,u,d=null,f=()=>{let t=e.max-e.min;return t<=0?0:(Math.max(e.min,Math.min(e.max,e.value))-e.min)/t*100},p=()=>{e.onCommitValue&&n(tV(e.value))},m=()=>!!e.onCommitValue,h=(t,n)=>{if(n.width<=0)return e.value;let r=Math.max(0,Math.min(1,(t-n.left)/n.width));return e.min+r*(e.max-e.min)},g=(t,n)=>{e.onCommitValue?.(h(t,n),`pointer`)},_=(e,t)=>{let n=Math.max(0,e-t.right)-Math.max(0,t.left-e),r=Math.max(0,Math.abs(n)-32),i=Math.sqrt(Math.min(r/200,1));return Math.sign(n)*8*i},v=t=>{if(!m()||l())return;t.preventDefault(),t.stopPropagation(),t.currentTarget.setPointerCapture(t.pointerId);let n=u,r=n!==void 0&&t.target instanceof Node&&n.contains(t.target);d={startX:t.clientX,isDragging:!1,startedOnValueText:r,trackRect:t.currentTarget.getBoundingClientRect()},o(!0),e.onInteract?.()},y=t=>{if(!d)return;let n=t.clientX-d.startX;!d.isDragging&&Math.abs(n)<3||(d.isDragging=!0,e.onInteract?.(),g(t.clientX,d.trackRect),i(_(t.clientX,d.trackRect)))},b=e=>{let t=e.currentTarget;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),d&&(d.isDragging||(d.startedOnValueText?p():g(d.startX,d.trackRect)),d=null,o(!1),i(0))},x=e=>{let t=e.currentTarget;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),d&&(d=null,o(!1),i(0))};bR(()=>{let e=()=>{d=null,o(!1),c(!1),i(0)};window.addEventListener(`blur`,e),xR(()=>window.removeEventListener(`blur`,e))});let S=()=>!!e.activeKey||a()||s(),C=()=>{let r=t();if(r===null)return;n(null);let i=r.trim().replace(/(\d),(\d)/g,`$1.$2`).match(lq);if(!i){e.onInvalidCommit?.(),e.onEditComplete?.();return}let a=i[2].toLowerCase();if(a&&a!==e.unit){e.onInvalidCommit?.(),e.onEditComplete?.();return}let o=Number.parseFloat(i[1]);Number.isFinite(o)?e.onCommitValue?.(o,`keyboard`):e.onInvalidCommit?.(),e.onEditComplete?.()},w=()=>{l()&&(n(null),e.onEditComplete?.())},T=e=>{if(!(e.isComposing||e.keyCode===229)){if(e.stopImmediatePropagation(),e.key===`Enter`){e.preventDefault(),C();return}e.key===`Escape`&&(e.preventDefault(),w())}},E=()=>{let t=r();return{cursor:m()&&!l()?`ew-resize`:`default`,"touch-action":m()?`none`:`auto`,"user-select":`none`,"-webkit-user-select":`none`,"min-width":e.emphasized?`96px`:void 0,transform:t===0?`translateX(0)`:`translateX(${t}px)`,transition:a()?`none`:`transform 350ms ${wN}`}};return(()=>{var r=rq(),i=r.firstChild,o=i.firstChild,d=o.nextSibling,p=d.nextSibling,m=p.nextSibling;return i.addEventListener(`lostpointercapture`,x),i.addEventListener(`pointercancel`,x),i.$$pointerup=b,i.addEventListener(`pointerleave`,()=>c(!1)),i.addEventListener(`pointerenter`,()=>c(!0)),i.$$pointermove=y,i.$$pointerdown=v,$(i,X(tz,{get when(){return e.emphasized},get children(){var e=nq();return pR(t=>mz(e,`opacity`,l()?0:.55)),e}}),o),$(d,X(ez,{each:cq,children:e=>(()=>{var t=iq();return pR(n=>{var r=`${e()}%`,i=S()?.4:0;return r!==n.e&&mz(t,`left`,n.e=r),i!==n.t&&mz(t,`opacity`,n.t=i),n},{e:void 0,t:void 0}),t})()})),$(m,X(tz,{get when(){return e.label},children:e=>(()=>{var t=aq();return uz(t,`${MK} text-[var(--rg-text-primary)] truncate min-w-0`),$(t,e),t})()}),null),$(m,X(tz,{get when(){return l()},get fallback(){return(()=>{var t=oq(),n=t.firstChild,r=n.firstChild,i=u;return typeof i==`function`?gz(i,t):u=t,$(t,X(tz,{get when(){return e.tailwindLabel},children:e=>(()=>{var t=sq();return $(t,e),t})()}),n),$(n,X(tq,{get children(){return tV(e.value)}}),r),$(r,()=>e.unit),pR(n=>{var r=`${tV(e.value)}${e.unit}`,i=e.onCommitValue?`text`:`default`;return r!==n.e&&Q(t,`data-react-grab-value`,n.e=r),i!==n.t&&mz(t,`cursor`,n.t=i),n},{e:void 0,t:void 0}),t})()},get children(){return X(jK,{autoFocusSelect:!0,inputmode:`decimal`,"aria-label":`Style value`,class:`text-[12px] leading-4 font-medium tabular-nums text-right pointer-events-auto ml-auto`,get style(){return{"field-sizing":`content`,"min-width":`16px`,"max-width":e.emphasized?`120px`:`60px`}},get value(){return t()??``},onInput:e=>n(e.currentTarget.value),onKeyDown:T,onBlur:C,onPointerDown:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()})}}),null),$(r,X(tz,{get when(){return e.emphasized},get children(){return[X(BK,{direction:`left`,get active(){return e.activeKey===`left`},onPointerDown:()=>e.onStep(-1)}),X(BK,{direction:`right`,get active(){return e.activeKey===`right`},onPointerDown:()=>e.onStep(1)})]}}),null),pR(t=>{var n=e.label??`Value`,r=e.min,c=e.max,u=e.value,d=`${tV(e.value)}${e.unit}`,m=E(),h=`${f()}%`,g=+!l(),_=`calc(${f()}% - 1px)`,v=e.activeKey?.9:a()||s()?.35:0;return n!==t.e&&Q(i,`aria-label`,t.e=n),r!==t.t&&Q(i,`aria-valuemin`,t.t=r),c!==t.a&&Q(i,`aria-valuemax`,t.a=c),u!==t.o&&Q(i,`aria-valuenow`,t.o=u),d!==t.i&&Q(i,`aria-valuetext`,t.i=d),t.n=pz(i,m,t.n),h!==t.s&&mz(o,`width`,t.s=h),g!==t.h&&mz(o,`opacity`,t.h=g),_!==t.r&&mz(p,`left`,t.r=_),v!==t.d&&mz(p,`opacity`,t.d=v),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0}),r})()},sz([`pointerdown`,`pointermove`,`pointerup`]),dq=e=>X(nz,{get children(){return[X(rz,{get when(){return WK(e.property)},children:t=>X(uq,{get label(){return eB(()=>!!e.showLabel)()?t().label:void 0},get value(){return t().value},get min(){return t().min},get max(){return t().max},get unit(){return t().unit},get activeKey(){return e.activeKey},get onStep(){return e.onStep},get onCommitValue(){return e.onCommit},get onEditComplete(){return e.onEditComplete},get onInvalidCommit(){return e.onInvalidCommit},get onInteract(){return e.onInteract},get tailwindLabel(){return e.tailwindLabel},get emphasized(){return e.emphasized}})}),X(rz,{get when(){return GK(e.property)},children:t=>X(RK,{get label(){return eB(()=>!!e.showLabel)()?t().label:void 0},get value(){return t().value},get onCommit(){return e.onCommit},get onEditComplete(){return e.onEditComplete},get onInvalidCommit(){return e.onInvalidCommit},get onRegisterTrigger(){return e.onColorPickerRegister},get onInteract(){return e.onInteract},get emphasized(){return e.emphasized}})}),X(rz,{get when(){return KK(e.property)},children:t=>X(UK,{get label(){return eB(()=>!!e.showLabel)()?t().label:void 0},get value(){return t().value},get options(){return t().options},get activeKey(){return e.activeKey},get onStep(){return e.onStep}})})]}}),fq=Z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Copy`),pq=e=>X(VW,{"data-react-grab-ignore-events":!0,"data-react-grab-copy-button":!0,onClick:t=>{t.preventDefault(),t.stopPropagation(),e.onCopy()},get children(){return fq()}}),mq=()=>{let[e,t]=J(!1),n,r=()=>{clearTimeout(n),t(!1)},i=()=>{t(!0),clearTimeout(n),n=setTimeout(()=>{t(!1)},CN)},a=()=>{clearTimeout(n)};return xR(a),{isPending:e,show:i,hide:r,cleanup:a}},hq=Z(`<div role=menu aria-orientation=vertical aria-label="Editable properties"class="relative flex flex-col w-full max-h-[var(--rg-edit-list-max-h)] overflow-y-auto outline-none no-scrollbar"><div aria-hidden=true class="pointer-events-none absolute opacity-0 transition-[top,left,width,height,opacity,border-radius] duration-75 ease-out bg-[var(--rg-surface-hover)]">`),gq=Z(`<div class="flex items-center w-full h-[24px]">`),_q=Z(`<button data-react-grab-ignore-events type=button role=menuitem tabindex=-1 class="relative z-1 contain-layout block w-full h-[24px] px-0 py-0 cursor-pointer text-left border-none bg-transparent">`),vq=Z(`<div class="flex items-center justify-between w-full h-[24px] px-2 gap-2"><span class="text-[13px] leading-4 font-sans font-medium text-[var(--rg-text-primary)] truncate min-w-0">`),yq=Z(`<span class="font-sans text-[var(--rg-text-secondary)] tabular-nums shrink-0"><span class=text-[11px]></span><span class="text-[9px] ml-px">`),bq=Z(`<span aria-hidden=true class="size-[12px] rounded-[3px] border-[var(--rg-border-button)] [border-width:0.5px] border-solid shrink-0">`),xq=Z(`<span class="text-[11px] font-sans text-[var(--rg-text-secondary)] shrink-0">`),Sq=e=>{let t=KK(e);return t?t.options.find(e=>e.value===t.value)?.label??t.value:``},Cq=e=>{let t=[],n,r=!1,i=null,a=()=>{if(!n)return!1;let e=OK(n);return e instanceof HTMLElement&&e.matches(`input[data-react-grab-input]`)},o=(t,n)=>{n===`move`&&(r=!0);let o=a();if(r&&!o){if(e.isAdjusting()){i=t;return}i=null,t!==e.activeIndex&&e.onHoverIndex(t)}};mR(()=>{if(e.isAdjusting())return;let n=i;if(n===null)return;i=null;let o=t[n],s=a();r&&(s||o?.matches(`:hover`)&&n!==e.activeIndex&&e.onHoverIndex(n))});let{containerRef:s,highlightRef:c,updateHighlight:l,clearHighlight:u}=pK({});mR(()=>{t.length=e.properties.length});let d;return mR(()=>{let r=e.activeIndex,i=t[r];if(!i||r<0){u();return}if(l(i),d!==void 0&&cancelAnimationFrame(d),d=requestAnimationFrame(()=>{d=void 0;let e=t[r];e&&l(e)}),!n)return;let a=n.getBoundingClientRect(),o=i.getBoundingClientRect();(o.top<a.top||o.bottom>a.bottom)&&i.scrollIntoView({block:`nearest`})}),xR(()=>{d!==void 0&&cancelAnimationFrame(d)}),(()=>{var a=hq(),l=a.firstChild;return a.$$pointermove=()=>{r=!0},gz(e=>{n=e,s(e)},a),gz(c,l),$(a,X(ez,{get each(){return e.properties},children:(r,a)=>{let s=()=>a===e.activeIndex;return(()=>{var c=_q();return c.$$click=t=>{t.stopPropagation(),e.onSelect(a)},c.$$mousedown=e=>{let t=n?OK(n):null;t instanceof HTMLElement&&t.matches(`input[data-react-grab-input]`)&&t.blur(),e.preventDefault()},c.addEventListener(`pointerleave`,()=>{i===a&&(i=null)}),c.$$pointermove=()=>{o(a,`move`)},c.addEventListener(`pointerenter`,()=>{o(a,`enter`)}),gz(e=>{t[a]=e,xR(()=>{t[a]===e&&(t[a]=void 0)})},c),$(c,X(tz,{get when(){return s()},get fallback(){return(()=>{var e=vq(),t=e.firstChild;return $(t,()=>r().label),$(e,X(nz,{get children(){return[X(rz,{get when(){return WK(r())},children:e=>(()=>{var t=yq(),n=t.firstChild,r=n.nextSibling;return $(n,()=>tV(e().value)),$(r,()=>e().unit),t})()}),X(rz,{get when(){return GK(r())},children:e=>(()=>{var t=bq();return pR(n=>mz(t,`background-color`,e().value)),t})()}),X(rz,{get when(){return KK(r())},children:e=>(()=>{var t=xq();return $(t,()=>Sq(e())),t})()})]}}),null),e})()},get children(){var t=gq();return $(t,X(dq,{get property(){return r()},get activeKey(){return e.activeKey},get onStep(){return e.onStep},get onCommit(){return e.onCommit},get onEditComplete(){return e.onEditComplete},get onInvalidCommit(){return e.onInvalidCommit},get onInteract(){return e.onInteract},get onColorPickerRegister(){return e.onColorPickerRegister},showLabel:!0,get tailwindLabel(){return e.activeTailwindLabel}})),t}})),pR(e=>{var t=r().key,n=s()?`true`:void 0;return t!==e.e&&Q(c,`data-react-grab-edit-property`,e.e=t),n!==e.t&&Q(c,`aria-current`,e.t=n),e},{e:void 0,t:void 0}),c})()}}),null),a})()},sz([`pointermove`,`mousedown`,`click`]),wq=(e,t,n)=>e.kind===`color`&&typeof t==`string`&&typeof n==`string`?t.toLowerCase()===n.toLowerCase():t===n,Tq=e=>e===`ArrowLeft`?-1:1,Eq=e=>{let[t,n]=J(0),r=null,i=null,a=null,o=()=>{i!==null&&clearTimeout(i),a!==null&&clearInterval(a),i=null,a=null,r=null},s=()=>{o(),n(0)},c=t=>{o(),r=t;let n=Tq(t);i=setTimeout(()=>{a=setInterval(()=>{e.step(n,e.isShiftHeld(),e.isAltHeld(),!0)},60)},280)};return bR(()=>{window.addEventListener(`blur`,s),xR(()=>window.removeEventListener(`blur`,s))}),xR(s),{heldDirection:t,pressArrow:(t,r,i,a)=>{if(r)return;let o=Tq(t);c(t),n(o),e.step(o,i,a,!1)},releaseKey:e=>{e===r&&s()},cancelRepeat:s}},Dq=(e,t,n)=>{if(e.length===0)return null;let r=e.findIndex(e=>e.value===t),i=e[((r===-1?0:r)+n+e.length)%e.length];return!i||i.value===t?null:i},Oq=(e,t,n,r,i)=>{if(e.kind===`enum`)return Dq(e.options,e.value,t)?.value??null;if(e.kind!==`numeric`)return null;let a=Math.min(e.min,e.value),o=Math.max(e.max,e.value);if(!n&&!r&&e.unit===`px`&&i?.hasTokens){let n=i.stepLength(e.value,t,e.cssProperties[0]);if(n!==null){let t=nV(DB(n,a,o));if(t!==e.value)return t}}let s=n?10:1,c=nV(DB(e.value+t*s,a,o));return c===e.value?null:c},kq=/^-?\d*\.?\d+$/,Aq=e=>kq.test(e),jq=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,``),Mq=e=>{if(e.kind!==`enum`)return[];let t=[];for(let n of e.options){let e=jq(n.value),r=jq(n.label);e&&t.push(e),r&&r!==e&&t.push(r)}return t},Nq=e=>{let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(let e of r.tailwindAliases){let i=jq(e);i&&t.push({property:r,originalIndex:n,kind:`alias`,term:i})}for(let e of Mq(r))t.push({property:r,originalIndex:n,kind:`enum-option`,term:e});let i=jq(r.label);i&&t.push({property:r,originalIndex:n,kind:`name`,term:i});let a=jq(r.key);a&&a!==i&&t.push({property:r,originalIndex:n,kind:`name`,term:a});let o=jq(`${r.label} ${r.key}`);o&&t.push({property:r,originalIndex:n,kind:`label`,term:o})}return t},Pq=(e,t)=>{if(t.kind===`alias`||t.kind===`enum-option`||t.kind===`name`)return e===t.term?DN+t.term.length:t.term.startsWith(e)||e.startsWith(t.term)?ON+Math.min(e.length,t.term.length):null;let n=t.term.indexOf(e);return n===-1?null:n===0?kN-t.term.length*1:AN-n*100-t.term.length*1},Fq=(e,t,n,r)=>{let i=e.get(t.key);i&&i.score>=r||e.set(t.key,{property:t,score:r,originalIndex:n})},Iq=e=>{let t=Nq(e),n=new Map;for(let t=0;t<e.length;t++)n.set(e[t].key,t);let r=(t,r,i)=>{for(let a=0;a<r.length;a++){let o=r[a],s=n.get(o);if(s===void 0)continue;let c=e[s];Fq(t,c,s,i-a)}};return{search:n=>{let i=jq(n);if(!i||Aq(i))return e;let a=new Map;r(a,DV(n),TN),r(a,OV(n),EN);for(let e of t){let t=Pq(i,e);t!==null&&Fq(a,e.property,e.originalIndex,t)}return Array.from(a.values()).sort((e,t)=>t.score===e.score?e.originalIndex-t.originalIndex:t.score-e.score).map(e=>e.property)}}},Lq=(e,t)=>e.kind===t.kind&&!wq(e,t.value,e.original),Rq=e=>{let{initialProperties:t,searchQuery:n}=e,[r,i]=J({}),a=Iq(t),o=Y(()=>{let e=n(),i=r(),o=e?t:t.filter(e=>e.isPrioritized||e.isCanonical&&!e.isDefault||i[e.key]!==void 0);return e?a.search(e):o.slice(0,40)}),s=new Map(t.map(e=>[e.key,e])),c=Y(()=>{let e=r(),t=Object.keys(e);if(t.length===0)return o();let n=new Map;for(let r of t){let t=e[r];if(t.kind!==`numeric`)continue;let i=s.get(r);if(i)for(let e of i.cssProperties)n.set(e,t.value)}return o().map(t=>{let r=e[t.key];if(r!==void 0)return l(t,r);if(t.kind!==`numeric`)return t;let i=n.get(t.cssProperties[0]);return i===void 0?t:t.cssProperties.every(e=>n.get(e)===i)?{...t,value:i}:t})}),l=(e,t)=>e.kind===`numeric`&&t.kind===`numeric`||e.kind===`color`&&t.kind===`color`||e.kind===`enum`&&t.kind===`enum`?{...e,value:t.value}:e;return{filteredProperties:c,applyStyle:(e,t)=>{let n;if(e.kind===`numeric`&&typeof t==`number`)n={kind:`numeric`,value:t};else if(e.kind===`color`&&typeof t==`string`)n={kind:`color`,value:t};else if(e.kind===`enum`&&typeof t==`string`)n={kind:`enum`,value:t};else return;i(t=>{let r=Object.keys(t);if(r[r.length-1]===e.key)return{...t,[e.key]:n};let i={};for(let n of r){if(n===e.key)continue;let r=s.get(n);r!==void 0&&r.cssProperties.every(t=>e.cssProperties.includes(t))||(i[n]=t[n])}return i[e.key]=n,i})},buildPendingEdits:()=>{let e=r(),t=[],n=new Set;for(let r of Object.keys(e)){let i=e[r],a=s.get(r);if(!a||a.kind!==i.kind)continue;let o=Lq(a,i),c=!o&&a.cssProperties.some(e=>n.has(e));if(!(!o&&!c)){if(o)for(let e of a.cssProperties)n.add(e);a.kind===`numeric`&&i.kind===`numeric`?t.push({kind:`numeric`,key:a.key,cssProperties:a.cssProperties,value:i.value,unit:a.unit}):a.kind===`color`&&i.kind===`color`?t.push({kind:`color`,key:a.key,cssProperties:a.cssProperties,value:i.value}):a.kind===`enum`&&i.kind===`enum`&&t.push({kind:`enum`,key:a.key,cssProperties:a.cssProperties,value:i.value})}}return t},hasPendingStyles:()=>{let e=r();for(let n of t){let t=e[n.key];if(t&&Lq(n,t))return!0}return!1},hasChangedStyleFor:e=>{let t=r()[e],n=s.get(e);return!!(t&&n&&Lq(n,t))}}},zq=new Map;for(let e of GB)for(let t of e)zq.set(t.key,t.longhands);Bq=e=>{if(e.includes(`,`))return e.split(`,`);let t=zq.get(e);return t?[...t]:[e]},Vq=/^-?(?:\d+\.?|\d*\.\d*)?$/,Hq=e=>Vq.test(e),Uq=e=>{let t=e.startsWith(`-`);return{isNegative:t,base:t?e.slice(1):e}},Wq=/^([a-z-]+)-(-?\d+(?:\.\d+)?)$/,Gq=/^(.+?)-\[(.+)]$/,Kq=/^(-?\d*\.?\d+)\s*([a-zA-Z%]*)$/,qq=/^(-?\d*\.?\d+)(px|rem)?$/i,Jq=/^(?:length|size):/i,Yq=new Set([`opacity`,`border-width`,`border-top-width`,`border-right-width`,`border-bottom-width`,`border-left-width`,`z-index`,`font-weight`]),Xq=(e,t)=>{for(let n of e)if(n.key===t&&n.kind===`numeric`)return n;return null},Zq=(e,t)=>{for(let n of e)if(n.key===t&&n.kind===`enum`)return n;return null},Qq=(e,t)=>{for(let n of e)if(n.key===t&&n.kind===`color`)return n;return null},$q=e=>{let t=e.replace(/^(?:color|length|size):/i,``).trim();return/(?:var|url)\(/i.test(t)?t:t.replace(/_/g,` `)},eJ=e=>{let t=e.lastIndexOf(`:`),n=t>=0?e.slice(t+1):e;return(n.startsWith(`!`)?n.slice(1):n).toLowerCase()},tJ=(e,t)=>{let n=e.match(qq);if(!n)return null;let r=n[2]?.toLowerCase();if(!r&&!t)return null;let i=Number.parseFloat(n[1]);return Number.isFinite(i)?r===`rem`?i*16:i:null},nJ=(e,t)=>{let n=Bq(t),r=new Map;for(let t of n)for(let n of e)n.kind===`numeric`&&n.cssProperties.includes(t)&&r.set(n.key,n);return Array.from(r.values())},rJ=(e,t)=>nV(DB(t,e.min,e.max)),iJ=e=>{let{initialProperties:t,searchQuery:n,isCompact:r,activeProperty:i,commit:a,setIsCompact:o}=e,s=e=>{for(let n of t)if(n.key===e&&(n.kind===`numeric`||n.kind===`enum`))return!0;return nJ(t,e).length>0},c=e=>{let t=e.trim().replace(/(\d),(\d)/g,`$1.$2`).match(Kq);if(!t)return null;let n=Number.parseFloat(t[1]);return Number.isFinite(n)?{value:n,unit:t[2].toLowerCase()}:null},l=(e,t)=>!e||t.toLowerCase().startsWith(e),u=e=>{if(!r())return!1;let t=i();if(t?.kind!==`numeric`)return!1;let n=c(e);return n?l(n.unit,t.unit):Hq(e)},d=Y(()=>u(n())),f=e=>{if(!r())return!1;let t=i();if(t?.kind!==`numeric`)return!1;let n=c(e);if(!n)return!1;let o=t.unit.toLowerCase();if(n.unit!==``&&n.unit!==o)return l(n.unit,t.unit);let s=rJ(t,n.value);return s!==t.value&&a(t,s),!0},p=(e,n)=>{let r=Xq(t,e);if(r)return r.unit===`px`?(o(!0),a(r,rJ(r,n),{shouldCompact:!0}),!0):!1;let i=nJ(t,e);return i.length===0?!1:(o(!0),_R(()=>{for(let e of i)a(e,rJ(e,n),{shouldCompact:!0})}),!0)},m=(e,n)=>{let r=xV(e);if(!r)return!1;let i=Qq(t,r);if(!i)return!1;let s=n===null?CV(e):EB(n);return s?(o(!0),a(i,s,{shouldCompact:!0}),!0):!1},h=e=>{let t=e.trim(),n=t.match(Gq);if(!n)return!1;let r=n[2],i=$q(r);if(m(t,i))return!0;let a=tJ(i,Jq.test(r.trim()));if(a===null)return!1;let{isNegative:o,base:s}=Uq(n[1]),c=jV(eJ(s));return c?p(c,o?-a:a):!1},g=e=>{if(h(e))return;let n=vV(e),{isNegative:r,base:i}=Uq(n),c=i.replace(/-\d*$/,``).replace(/-$/,``),l=c?jV(c):null;if(l&&s(l)&&o(!0),!r){if(m(n,null))return;let e=MV(n);if(e){let n=Zq(t,e.property);if(!n)return;let r=n.options.find(t=>t.value===e.value);r&&(o(!0),a(n,r.value,{shouldCompact:!0}));return}}let u=i.match(Wq);if(!u)return;let d=jV(u[1]);if(!d)return;let f=Number.parseFloat(u[2]);if(!Number.isFinite(f))return;let p=r?-f:f,g=Yq.has(d)?p:p*4,_=Xq(t,d);if(_){a(_,rJ(_,g),{shouldCompact:!0});return}if(!r){let e=Zq(t,d);if(e){let t=String(f),n=e.options.find(e=>e.value===t);if(n){a(e,n.value,{shouldCompact:!0});return}}}let v=nJ(t,d);v.length!==0&&_R(()=>{for(let e of v)a(e,rJ(e,g),{shouldCompact:!0})})},_=e=>{if(MV(e))return!0;let{base:n}=Uq(e),r=n.match(Wq);if(!r)return!1;let i=jV(r[1]);return i?s(i)?!0:Zq(t,i)!==null:!1};return{isInlineNumericEdit:d,isInlineNumericDraft:u,tryApplyNumericValue:f,applyTailwindClass:e=>{let t=e.trim().replace(/^class\s*=\s*["']/,``).replace(/["']\s*$/,``).replace(/\s+\[/g,`-[`),n=vV(t),r=t.split(/\s+/).filter(Boolean);if(r.length>1&&!_(n)){for(let e of r)g(e);return}g(t)}}},aJ=Z(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">No`),oJ=Z(`<span class="text-[var(--rg-error-text)] text-[13px] leading-3.5 font-sans font-medium">Yes`),sJ=Z(`<div role=alertdialog aria-modal=true aria-labelledby=rg-discard-prompt-title class="contain-layout shrink-0 flex items-center justify-between gap-2 pt-1.5 pb-1 px-2 w-full self-stretch"><span id=rg-discard-prompt-title class="text-[var(--rg-text-primary)] text-[13px] leading-4 font-sans font-medium">Discard edits?</span><div class="flex items-center gap-[5px]">`),cJ=Z(`<div><textarea data-react-grab-ignore-events data-react-grab-input aria-label="Search properties"aria-keyshortcuts="Enter Escape ArrowUp ArrowDown ArrowLeft ArrowRight Tab"autocapitalize=none autocorrect=off autocomplete=off class="text-[var(--rg-text-primary)] text-[13px] leading-4 font-medium bg-transparent border-none resize-none w-full p-0 m-0 outline-none"rows=1 style=caret-color:var(--rg-text-primary);field-sizing:content;min-height:16px;max-height:16px;scrollbar-width:none>`),lJ=Z(`<div>`),uJ=Z(`<div role=dialog aria-modal=true aria-label="Style element"data-react-grab-ignore-events data-react-grab-edit-panel>`),dJ=Z(`<div class="flex items-center justify-center w-full px-3 py-1.5 min-h-[28px]">`),fJ=e=>X(tz,{get when(){return e.state},children:t=>X(tz,{keyed:!0,get when(){return t().element},children:n=>X(pJ,{get state(){return t()},position:()=>e.position,get onDismiss(){return e.onDismiss},get onSubmit(){return e.onSubmit},get onPendingEditsChange(){return e.onPendingEditsChange},get onInteractingChange(){return e.onInteractingChange}})})}),pJ=e=>{let t=e.state.properties,n,r=e.state.preview,[i,a]=J(e.state.initialSearchQuery??``),[o,s]=J(null),[c,l]=J(null),u=Rq({initialProperties:t,searchQuery:()=>o()??i()}),d=()=>{let e=u.filteredProperties().findIndex(e=>e.kind===`numeric`);return e>0?e:0},[f,p]=J(d()),m=Y(()=>u.hasPendingStyles()),h=Y(()=>m()||!!e.state.hasSessionEdits),[g,_]=J(!1),v,y,b,x=!1,[S,C]=J(!1),w=Y(()=>S()||m()),[T,E]=J(!1),D=BV(),O=Y(()=>hW({tagName:e.state.tagName,componentName:e.state.componentName})),k=Y(()=>{let e=u.filteredProperties();return e.length===0?null:e[Math.min(Math.max(0,f()),e.length-1)]}),ee,te=TK(()=>ee,e.position),A=e=>{l(e),clearTimeout(v),v=setTimeout(()=>{l(t=>t===e?null:t)},100)},ne=Y(()=>w()&&!T());mR(()=>{let t=ne();e.onInteractingChange?.(t)});let re=()=>{C(!0),clearTimeout(y),y=setTimeout(()=>{C(!1)},150)},ie=()=>{queueMicrotask(()=>{n&&OK(n)!==n&&uW(n,{preventScroll:!0})})},ae=()=>{o()===null&&s(i())},oe=()=>{x=!1,clearTimeout(b)},se=()=>{x=!1,clearTimeout(b),b=setTimeout(()=>{x=!0},500)},ce=e=>{let t=e.trim(),n=t.replace(/^-/,``).replace(`.`,``);/[a-z%]+$/i.test(t)||n.length>1?se():oe()},le=e=>{if(!x)return e;let t=i();if(!t||!e.startsWith(t))return oe(),e;let n=e.slice(t.length);return/^[-.\d]/.test(n)?(oe(),n):e},ue=e=>{if(!x||e.metaKey||e.ctrlKey||e.altKey||!/^[-.\d]$/.test(e.key))return!1;e.preventDefault(),e.stopImmediatePropagation(),oe();let t=e.key;return n&&(n.value=t),xe.tryApplyNumericValue(t)?(ae(),a(t),ce(t),ie(),!0):(a(t),ie(),!0)},de=()=>{oe(),s(null),_(!1)},fe=(t,n,i={})=>{u.applyStyle(t,n),r.apply(t.cssProperties,rV(t,n)),e.onPendingEditsChange?.(u.buildPendingEdits()),re(),i.isFromKeyRepeat||we.hide(),i.flashDirection&&A(i.flashDirection===1?`right`:`left`),i.shouldFocus&&ie(),i.shouldCompact&&_(!0),i.source===`keyboard`&&D.arm()},pe=IV(e=>e.shiftKey),me=IV(e=>e.altKey),he=(t,n,r,i,a)=>{let o=k();if(!o)return null;let s=Oq(o,t,n,r,e.state.designTokens);return s===null?(A(t===1?`right`:`left`),null):(fe(o,s,{flashDirection:t,shouldFocus:!0,isFromKeyRepeat:i,source:a}),o)},ge=(e,t,n,r)=>{he(e,t,n,r,`keyboard`)&&_(!0)},_e=e=>{he(e,!1,!1,!1,`pointer`)},ve=Eq({step:ge,isShiftHeld:pe,isAltHeld:me}),ye=(e,t)=>{let n=k();if(n){if(n.kind===`numeric`&&typeof e==`number`){let r=nV(DB(e,n.min,n.max));r!==n.value&&fe(n,r,{source:t});return}typeof e==`string`&&(wq(n,e,n.value)||fe(n,e,{source:t}))}},be=Y(()=>{if(!pe())return null;let e=k();return!e||e.kind!==`numeric`?null:DK(e.key,e.value)}),xe=iJ({initialProperties:t,searchQuery:i,isCompact:g,activeProperty:k,commit:(e,t,n)=>{fe(e,t,{...n,source:`keyboard`})},setIsCompact:_}),Se=Y(()=>g()&&i()!==``&&xe.isInlineNumericEdit()),Ce=()=>{we.hide(),D.clear(),e.onSubmit(u.buildPendingEdits())},we=mq(),Te,Ee=()=>{Te&&(Te.classList.remove(`animate-shake`),Te.offsetWidth,Te.classList.add(`animate-shake`))},De=t=>{we.hide(),t===`discard`&&r.restore(),e.onDismiss()},Oe=e=>{if(ve.cancelRepeat(),e===`pointer`&&D.clear(),we.isPending()){De(`discard`);return}if(!h()){De(r.hasAppliedStyles()?`discard`:`preserve`);return}let t=g();de(),!(e===`keyboard`&&t)&&(we.show(),Ee())},ke=e=>{let t=u.filteredProperties();t.length!==0&&(p(n=>(n+e+t.length)%t.length),de())},Ae=()=>{D.clear(),we.hide()},je=[],Me=e=>(je.push(e),()=>{je=je.filter(t=>t!==e)}),Ne=()=>je[je.length-1]??null,Pe=(e,t)=>{if(k()?.kind===`color`){t.repeat||Ne()?.();return}ve.pressArrow(e,t.repeat,t.shiftKey,t.altKey)},Fe={ArrowUp:()=>ke(-1),ArrowDown:()=>ke(1),ArrowLeft:e=>Pe(`ArrowLeft`,e),ArrowRight:e=>Pe(`ArrowRight`,e),Tab:e=>ke(e.shiftKey?-1:1),Enter:()=>{if(we.isPending())return;let e=k(),t=Ne();if(e?.kind===`color`&&!u.hasChangedStyleFor(e.key)&&t&&!h()){t();return}Ce()},Escape:()=>Oe(`keyboard`)},Ie=e=>{if(e.isComposing||e.keyCode===229)return;if(we.isPending()){let t=e.composedPath()[0];if(t instanceof HTMLElement&&t.closest(`[data-react-grab-discard-button]`)!==null&&(e.key===`Tab`||e.key===`Enter`))return;if(e.key===`Tab`||e.key===`ArrowUp`||e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`){e.preventDefault(),e.stopImmediatePropagation();return}}let t=Fe[e.key];t&&(e.preventDefault(),e.stopImmediatePropagation(),t(e))};bR(()=>{queueMicrotask(()=>{if(uW(n,{preventScroll:!0}),n){let e=n.value.length;n.setSelectionRange(e,e)}}),te.measure();let e=i();e&&xe.applyTailwindClass(e);let t=yK({isOpen:()=>!0,onDismiss:Oe,shouldIgnoreKeyboardEvent:e=>{let t=e.composedPath()[0];return we.isPending()&&t instanceof HTMLElement&&t.closest(`[data-react-grab-discard-button]`)!==null},shouldIgnoreRightClick:!0,shouldIgnoreInputEvents:!0}),r=PM(e=>{jB(e,`data-react-grab-input`)||ue(e)||Ie(e)}),a=PM(e=>{ve.releaseKey(e.key)}),o=PM(e=>{e.pointerType===`mouse`&&(we.isPending()||D.consume()&&h()&&Oe(`pointer`))});window.addEventListener(`keydown`,r,{capture:!0}),window.addEventListener(`keyup`,a,{capture:!0}),window.addEventListener(`pointermove`,o,{capture:!0}),xR(()=>{t(),window.removeEventListener(`keydown`,r,{capture:!0}),window.removeEventListener(`keyup`,a,{capture:!0}),window.removeEventListener(`pointermove`,o,{capture:!0}),clearTimeout(v),clearTimeout(y),clearTimeout(b),we.cleanup(),te.clearAnimationHandles(),C(!1)})});let j=e=>{p(e),ie()};return X(tz,{get when(){return te.shouldMount()},get children(){var e=uJ();dz(e,`contextmenu`,vK,!0),dz(e,`click`,vK,!0),dz(e,`mousedown`,vK,!0),dz(e,`pointerdown`,vK,!0);var t=ee;return typeof t==`function`?gz(t,e):ee=e,mz(e,`z-index`,`${GM}`),mz(e,`--rg-edit-list-max-h`,`280px`),$(e,X(NW,{ref:e=>Te=e,class:`flex flex-col justify-center items-start overflow-hidden w-fit h-fit`,get style(){return{"min-width":g()?void 0:`200px`,"max-width":`320px`,transform:`translateX(${ve.heldDirection()*2}px)`,transition:`transform 280ms ${wN}`}},get children(){return[X(tz,{get when(){return we.isPending()},get fallback(){return X(tz,{get when(){return!g()},get children(){var e=lJ();return e.addEventListener(`mouseleave`,()=>E(!1)),e.addEventListener(`mouseenter`,()=>E(!0)),$(e,X(DW,{get tagName(){return O().tagName},get componentName(){return O().componentName},isClickable:!1,onClick:()=>{},shrink:!0}),null),$(e,X(tz,{get when(){return h()},get children(){return X(pq,{onCopy:Ce})}}),null),pR(()=>uz(e,mW(`contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 h-fit px-2`,h()?`w-full self-stretch justify-between`:`w-fit`))),e}})},get children(){var e=sJ(),t=e.firstChild.nextSibling;return $(t,X(VW,{"data-react-grab-ignore-events":!0,"data-react-grab-discard-button":`cancel`,onClick:e=>{e.preventDefault(),e.stopPropagation(),Ae()},get children(){return aJ()}}),null),$(t,X(VW,{variant:`destructive`,"data-react-grab-ignore-events":!0,"data-react-grab-discard-button":`confirm`,onClick:e=>{e.preventDefault(),e.stopPropagation(),De(`discard`)},get children(){return oJ()}}),null),e}}),(()=>{var e=cJ(),t=e.firstChild;return t.$$keydown=Ie,t.$$input=e=>{let t=le(e.currentTarget.value);if(t!==e.currentTarget.value&&(e.currentTarget.value=t),xe.tryApplyNumericValue(t)){ae(),a(t),ce(t),ie();return}if(oe(),xe.isInlineNumericDraft(t)){ae(),a(t),ie();return}a(t),s(null),p(t.trim()===``?d():0),de(),xe.applyTailwindClass(t)},gz(e=>{n=e},t),Q(t,`spellcheck`,!1),pR(n=>{var r=Se()?``:`[font-synthesis:none] contain-layout shrink-0 flex flex-col items-start px-2 py-1.5 w-full self-stretch [border-top-width:0.5px] border-t-solid border-t-[var(--rg-border-subtle)] antialiased`,i=Se()?NK:void 0,a=Se()?-1:0,o=g()?k()?.label??`Search property`:`Search property`;return r!==n.e&&uz(e,n.e=r),n.t=pz(e,i,n.t),a!==n.a&&Q(t,`tabindex`,n.a=a),o!==n.o&&Q(t,`placeholder`,n.o=o),n},{e:void 0,t:void 0,a:void 0,o:void 0}),pR(()=>t.value=i()),e})(),X(tz,{get when(){return u.filteredProperties().length>0},get children(){var e=lJ();return $(e,X(Cq,{get properties(){return u.filteredProperties()},get activeIndex(){return f()},get activeKey(){return c()},onHoverIndex:p,onSelect:j,onStep:_e,onCommit:ye,onColorPickerRegister:Me,onEditComplete:ie,onInvalidCommit:Ee,onInteract:re,isAdjusting:S,get activeTailwindLabel(){return be()}})),pR(t=>{var n=g()?``:`[font-synthesis:none] contain-layout shrink-0 flex flex-col items-start w-full self-stretch antialiased`,r=g()?NK:void 0;return n!==t.e&&uz(e,t.e=n),t.t=pz(e,r,t.t),t},{e:void 0,t:void 0}),e}}),X(tz,{get when(){return eB(()=>!!g())()&&k()},children:e=>(()=>{var t=dJ();return t.$$mousedown=e=>e.preventDefault(),$(t,X(dq,{get property(){return e()},get activeKey(){return c()},onStep:_e,onCommit:ye,onEditComplete:ie,onInvalidCommit:Ee,onInteract:re,onColorPickerRegister:Me,showLabel:!1,get tailwindLabel(){return be()},emphasized:!0})),t})()})]}})),pR(t=>{var n=g()?`true`:`false`,r=mW(`fixed font-sans text-[13px] antialiased [filter:var(--rg-drop-shadow)] select-none`,te.isAnimatedIn()?`transition-[opacity,transform] duration-220 ease-spring`:`transition-[opacity,transform] duration-120 ease-drawer`),i=`${te.displayPosition().top}px`,a=`${te.displayPosition().left}px`,o=te.isAnimatedIn()?`auto`:`none`,s=yN[te.lastAnchorEdge()],c=te.isAnimatedIn()?`1`:`0`,l=te.isAnimatedIn()?`scale(1)`:`scale(0.92)`;return n!==t.e&&Q(e,`data-rg-compact`,t.e=n),r!==t.t&&uz(e,t.t=r),i!==t.a&&mz(e,`top`,t.a=i),a!==t.o&&mz(e,`left`,t.o=a),o!==t.i&&mz(e,`pointer-events`,t.i=o),s!==t.n&&mz(e,`transform-origin`,t.n=s),c!==t.s&&mz(e,`opacity`,t.s=c),l!==t.h&&mz(e,`transform`,t.h=l),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),e}})},sz([`pointerdown`,`mousedown`,`click`,`contextmenu`,`input`,`keydown`]),mJ=Z(`<div data-react-grab-ignore-events>`),hJ=e=>{let t,n=()=>e.interactive!==!1,r=TK(()=>t,()=>e.position);return bR(()=>{r.measure();let t=e.onDismiss?yK({isOpen:()=>!!e.position,onDismiss:e.onDismiss}):void 0;xR(()=>{r.clearAnimationHandles(),t?.()})}),X(tz,{get when(){return r.shouldMount()},get children(){var i=mJ(),a=t;return typeof a==`function`?gz(a,i):t=i,hz(i,ZR(()=>({[e.dataAttribute]:``}),{get class(){return mW(`fixed font-sans text-[13px] antialiased [filter:var(--rg-drop-shadow)] select-none will-change-[opacity,transform]`,r.isAnimatedIn()?`transition-[opacity,transform] duration-220 ease-spring`:`transition-[opacity,transform] duration-120 ease-drawer`)},get style(){return{top:`${r.displayPosition().top}px`,left:`${r.displayPosition().left}px`,"z-index":`${GM}`,"pointer-events":n()&&r.isAnimatedIn()?`auto`:`none`,"transform-origin":yN[r.lastAnchorEdge()],opacity:r.isAnimatedIn()?`1`:`0`,transform:r.isAnimatedIn()?`scale(1)`:`scale(0.92)`}},onPointerDown:vK,onMouseDown:vK,onClick:vK,onContextMenu:vK}),!1,!0),$(i,()=>e.children),i}})},gJ=e=>{let t=mK({clearActiveOnPointerLeave:!0,highlight:{topCornerRadiusPx:14,bottomCornerRadiusPx:14,cornerShape:hN}});return X(hJ,{get position(){return e.position},dataAttribute:`data-react-grab-toolbar-menu`,get onDismiss(){return e.onDismiss},get children(){return X(hK.Panel,{class:`overflow-hidden`,style:{"min-width":`100px`},get children(){return X(hK.Provider,{store:t,get children(){return X(hK.List,{label:`Default action`,get children(){return X($R,{get each(){return e.actions},children:t=>{let n=()=>t.id===e.defaultActionId;return X(hK.Item,{get value(){return t.id},role:`menuitemradio`,get checked(){return n()},onSelect:()=>{e.onSetDefaultAction(t.id),e.onDismiss()},get children(){return[X(hK.Label,{get class(){return n()?`text-[var(--rg-text-primary)]`:`text-[var(--rg-text-secondary)]`},get children(){return t.label}}),X(tz,{get when(){return t.shortcut},children:e=>X(hK.Shortcut,{get shortcut(){return e()},get modifier(){return t.shortcutModifier}})})]}})}})}})}})}})}})},_J=Z(`<span aria-hidden=true class="shrink-0 font-mono text-[11px] leading-4 text-[var(--rg-text-secondary)] opacity-60 mr-1">`),vJ=Z(`<span class=text-[var(--rg-text-secondary)]>.`),yJ=Z(`<span class="flex items-center min-w-0 w-full"><span class="text-[13px] leading-4 h-fit font-medium overflow-hidden text-ellipsis whitespace-nowrap min-w-0 transition-colors">`),bJ=e=>{let t=()=>e.state?.activeIndex??0,n=mK({value:()=>String(t()),highlight:{topCornerRadiusPx:14,bottomCornerRadiusPx:14,cornerShape:hN}});return X(hJ,{get position(){return e.position},dataAttribute:`data-react-grab-hierarchy-menu`,interactive:!1,get children(){return X(hK.Panel,{class:`overflow-hidden`,style:{"min-width":`160px`},get children(){return X(hK.Provider,{store:n,get children(){return X(hK.List,{label:`Navigate element hierarchy`,get children(){return X($R,{get each(){return e.state?.items??[]},children:(e,n)=>X(hK.Item,{get value(){return String(n())},role:`menuitemradio`,get checked(){return n()===t()},get children(){var r=yJ(),i=r.firstChild;return $(r,X(tz,{get when(){return e.depth>0},get children(){var t=_J();return $(t,()=>e.isLast?`└─`:`├─`),pR(n=>mz(t,`padding-left`,`${(e.depth-1)*12}px`)),t}}),i),$(i,X(tz,{get when(){return e.componentName},get children(){return[eB(()=>e.componentName),vJ()]}}),null),$(i,()=>e.tagName,null),pR(e=>{var r=n()===t(),a=n()!==t();return r!==e.e&&i.classList.toggle(`text-[var(--rg-text-primary)]`,e.e=r),a!==e.t&&i.classList.toggle(`text-[var(--rg-text-secondary)]`,e.t=a),e},{e:void 0,t:void 0}),r}})})}})}})}})}})},xJ=e=>[X(oW,{get selectionVisible(){return e.selectionVisible},get selectionBounds(){return e.selectionBounds},get selectionBoundsMultiple(){return e.selectionBoundsMultiple},get selectionShouldSnap(){return e.selectionShouldSnap},get dragVisible(){return e.dragVisible},get dragBounds(){return e.dragBounds},get grabbedBoxes(){return e.grabbedBoxes},get labelInstances(){return e.labelInstances}}),X(cW,{get visible(){return e.isFrozen??!1}}),X(tz,{get when(){return eB(()=>!!e.selectionLabelVisible)()&&(e.frozenLabelEntries?.length??0)>0},get children(){return X(ez,{get each(){return e.frozenLabelEntries??[]},children:(t,n)=>X(vG,{get tagName(){return t().tagName},get componentName(){return t().componentName},get selectionBounds(){return t().bounds},get mouseX(){return t().mouseX},visible:!0,shouldToggleExpandOnClick:n===0,get onToggleExpand(){return n===0?e.onToggleExpand:void 0}})})}}),X(tz,{get when(){return eB(()=>!!e.selectionLabelVisible)()&&e.pendingShiftPreviewEntry},children:e=>X(vG,{get tagName(){return e().tagName},get componentName(){return e().componentName},get selectionBounds(){return e().bounds},get mouseX(){return e().mouseX},visible:!0})}),X(tz,{get when(){return eB(()=>!!(e.selectionLabelVisible&&e.selectionBounds))()&&(e.frozenLabelEntries?.length??0)===0},get children(){return X(vG,{get tagName(){return e.selectionTagName},get componentName(){return e.selectionComponentName},get elementsCount(){return e.selectionElementsCount},get selectionBounds(){return e.selectionBounds},get mouseX(){return e.mouseX},get visible(){return e.selectionLabelVisible},get isPromptMode(){return e.isPromptMode},get inputValue(){return e.inputValue},get status(){return e.selectionLabelStatus},get filePath(){return e.selectionFilePath},get onInputChange(){return e.onInputChange},get onSubmit(){return e.onInputSubmit},get onToggleExpand(){return e.onToggleExpand},get selectionLabelShakeCount(){return e.selectionLabelShakeCount},get onConfirmDismiss(){return e.onConfirmDismiss},get discardPrompt(){return e.discardPrompt},onOpen:()=>{e.selectionFilePath&&jI(e.selectionFilePath,e.selectionLineNumber)},get isContextMenuOpen(){return e.contextMenuPosition!==null}})}}),X(ez,{get each(){return e.labelInstances??[]},children:t=>X(vG,{get tagName(){return t().tagName},get componentName(){return t().componentName},get elementsCount(){return t().elementsCount},get selectionBounds(){return t().bounds},get mouseX(){return t().mouseX},visible:!0,get status(){return t().status},get statusText(){return t().statusText},get isPromptMode(){return t().isPromptMode},get inputValue(){return t().inputValue},get error(){return t().errorMessage},get hideArrow(){return t().hideArrow},get onShowContextMenu(){let n=t();if(!(!(n.status===`copied`||n.status===`fading`)||!nB(n.element)))return()=>e.onShowContextMenuInstance?.(n.id)},onHoverChange:n=>e.onLabelInstanceHoverChange?.(t().id,n)})}),X(tz,{get when(){return e.toolbarVisible!==!1},get children(){return X(KG,{get isActive(){return e.isActive},get isContextMenuOpen(){return e.contextMenuPosition!==null},get onToggle(){return e.onToggleActive},get onActivateAction(){return e.onActivateAction},get activeActionId(){return e.activeActionId},get enabled(){return e.enabled},get shakeCount(){return e.shakeCount},get onStateChange(){return e.onToolbarStateChange},get onSubscribeToStateChanges(){return e.onSubscribeToToolbarStateChanges},get onSelectHoverChange(){return e.onToolbarSelectHoverChange},get onContainerRef(){return e.onToolbarRef},get onToggleToolbarMenu(){return e.onToggleToolbarMenu}})}}),X(SK,{get position(){return e.contextMenuPosition??null},get selectionBounds(){return e.contextMenuBounds??null},get tagName(){return e.contextMenuTagName},get componentName(){return e.contextMenuComponentName},get hasFilePath(){return e.contextMenuHasFilePath??!1},get actions(){return e.actions},get actionContext(){return e.actionContext},get onDismiss(){return e.onContextMenuDismiss??(()=>{})},get onHide(){return e.onContextMenuHide??(()=>{})}}),X(gJ,{get position(){return e.toolbarMenuPosition??null},get actions(){return e.toolbarMenuActions??[]},get defaultActionId(){return e.defaultActionId??`copy`},get onSetDefaultAction(){return e.onSetDefaultAction??(()=>{})},get onDismiss(){return e.onToolbarMenuDismiss??(()=>{})}}),X(bJ,{get position(){return e.hierarchyMenuPosition??null},get state(){return e.hierarchyState}}),X(fJ,{get state(){return e.editPanelState??null},get position(){return e.editPanelPosition??null},get onDismiss(){return e.onEditPanelDismiss??(()=>{})},get onSubmit(){return e.onEditPanelSubmit??(()=>{})},get onPendingEditsChange(){return e.onEditPanelPendingEditsChange},get onInteractingChange(){return e.onEditPanelInteractingChange}})]}));function CJ(e){let t=e[kz];if(!t&&(Object.defineProperty(e,kz,{value:t=new Proxy(e,HJ)}),!Array.isArray(e))){let n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let i=0,a=n.length;i<a;i++){let a=n[i];r[a].get&&Object.defineProperty(e,a,{enumerable:r[a].enumerable,get:r[a].get.bind(t)})}}return t}function wJ(e){let t;return typeof e==`object`&&!!e&&(e[kz]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function TJ(e,t=new Set){let n,r,i,a;if(n=e!=null&&e[RJ])return n;if(!wJ(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,a=e.length;n<a;n++)i=e[n],(r=TJ(i,t))!==i&&(e[n]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);let n=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let s=0,c=n.length;s<c;s++)a=n[s],!o[a].get&&(i=e[a],(r=TJ(i,t))!==i&&(e[a]=r))}return e}function EJ(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function DJ(e,t,n){if(e[t])return e[t];let[r,i]=J(n,{equals:!1,internal:!0});return r.$=i,e[t]=r}function OJ(e,t){let n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===kz||t===zJ?n:(delete n.value,delete n.writable,n.get=()=>e[kz][t],n)}function kJ(e){SR()&&DJ(EJ(e,zJ),VJ)()}function AJ(e){return kJ(e),Reflect.ownKeys(e)}function jJ(e,t,n,r=!1){if(!r&&e[t]===n)return;let i=e[t],a=e.length;n===void 0?(delete e[t],e[BJ]&&e[BJ][t]&&i!==void 0&&e[BJ][t].$()):(e[t]=n,e[BJ]&&e[BJ][t]&&i===void 0&&e[BJ][t].$());let o=EJ(e,zJ),s;if((s=DJ(o,t,i))&&s.$(()=>n),Array.isArray(e)&&e.length!==a){for(let t=e.length;t<a;t++)(s=o[t])&&s.$();(s=DJ(o,`length`,a))&&s.$(e.length)}(s=o[VJ])&&s.$()}function MJ(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];jJ(e,i,t[i])}}function NJ(e,t){if(typeof t==`function`&&(t=t(e)),t=TJ(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){let r=t[n];e[n]!==r&&jJ(e,n,r)}jJ(e,`length`,r)}else MJ(e,t)}function PJ(e,t,n=[]){let r,i=e;if(t.length>1){r=t.shift();let a=typeof r,o=Array.isArray(e);if(Array.isArray(r)){for(let i=0;i<r.length;i++)PJ(e,[r[i]].concat(t),n);return}else if(o&&a===`function`){for(let i=0;i<e.length;i++)r(e[i],i)&&PJ(e,[i].concat(t),n);return}else if(o&&a===`object`){let{from:i=0,to:a=e.length-1,by:o=1}=r;for(let r=i;r<=a;r+=o)PJ(e,[r].concat(t),n);return}else if(t.length>1){PJ(e[r],t,[r].concat(n));return}i=e[r],n=[r].concat(n)}let a=t[0];typeof a==`function`&&(a=a(i,n),a===i)||r===void 0&&a==null||(a=TJ(a),r===void 0||wJ(i)&&wJ(a)&&!Array.isArray(a)?MJ(i,a):jJ(e,r,a))}function FJ(...[e,t]){let n=TJ(e||{}),r=Array.isArray(n),i=CJ(n);function a(...e){_R(()=>{r&&e.length===1?NJ(n,e[0]):PJ(n,e)})}return[i,a]}function IJ(e){return t=>{if(wJ(t)){let n;(n=UJ.get(t))||UJ.set(t,n=new Proxy(t,WJ)),e(n)}return t}}var LJ,RJ,zJ,BJ,VJ,HJ,UJ,WJ,GJ,KJ,qJ,JJ,YJ,XJ,ZJ,QJ,$J,eY,tY,nY,rY,iY,aY,oY,sY,cY,lY,uY,dY,fY,pY,mY,hY,gY,_Y,vY,yY,bY,xY,SY,CY,wY,TY,EY,DY,OY,kY,AY,jY,MY,NY,PY,FY,IY,LY,RY,zY,BY,VY,HY,UY,WY,GY,KY,qY,JY,YY,XY,ZY,QY,$Y,eX,tX,nX,rX,iX,aX,oX,sX,cX,lX,uX,dX,fX,pX,mX,hX,gX,_X,vX,yX,bX,xX,SX,CX,wX,TX,EX,DX,OX,kX,AX,jX,MX,NX,PX,FX,IX,LX,RX,zX,BX,VX,HX,UX,WX,GX,KX,qX,JX,YX,XX,ZX,QX,$X,eZ,tZ,nZ,rZ,iZ,aZ,oZ,sZ,cZ,lZ,uZ,dZ,fZ,pZ,mZ,hZ,gZ,_Z,vZ,yZ,bZ,xZ,SZ,CZ,wZ=t((()=>{VV(),cR(),$U(),LJ=`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
258
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial}}}@layer theme{:root,:host{--font-sans:"Geist", ui-sans-serif, system-ui, sans-serif;--font-serif:ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-500:oklch(63.7% .237 25.331);--spacing:4px;--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--radius-sm:4px;--ease-out:cubic-bezier(0, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--ease-drawer:cubic-bezier(.32, .72, 0, 1);--ease-spring:cubic-bezier(.34, 1.56, .64, 1)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.a11y-hitbox{position:relative}.a11y-hitbox:before{content:"";pointer-events:auto;width:100%;min-width:24px;height:100%;min-height:24px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.top-0{top:calc(var(--spacing) * 0)}.top-1\\/2{top:50%}.top-\\[2px\\]{top:2px}.top-full{top:100%}.right-0{right:calc(var(--spacing) * 0)}.right-full{right:100%}.bottom-\\[2px\\]{bottom:2px}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing) * 0)}.left-full{left:100%}.z-1{z-index:1}.z-10{z-index:10}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.-m-0\\.5{margin:calc(var(--spacing) * -.5)}.-m-4{margin:calc(var(--spacing) * -4)}.m-0{margin:calc(var(--spacing) * 0)}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.-my-1\\.5{margin-block:calc(var(--spacing) * -1.5)}.-mt-\\[8px\\]{margin-top:-8px}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-1\\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2\\.5{margin-right:calc(var(--spacing) * 2.5)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2\\.5{margin-bottom:calc(var(--spacing) * 2.5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2\\.5{margin-left:calc(var(--spacing) * 2.5)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.ml-px{margin-left:1px}.no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.no-scrollbar::-webkit-scrollbar{width:0;height:0;display:none}.line-clamp-5{-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.list-item{display:list-item}.size-0{width:calc(var(--spacing) * 0);height:calc(var(--spacing) * 0)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-\\[12px\\]{width:12px;height:12px}.size-\\[16px\\]{width:16px;height:16px}.h-\\[8px\\]{height:8px}.h-\\[17px\\]{height:17px}.h-\\[20px\\]{height:20px}.h-\\[24px\\]{height:24px}.h-fit{height:fit-content}.max-h-\\[var\\(--rg-edit-list-max-h\\)\\]{max-height:var(--rg-edit-list-max-h)}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-\\[28px\\]{min-height:28px}.w-\\[2px\\]{width:2px}.w-\\[calc\\(100\\%\\+16px\\)\\]{width:calc(100% + 16px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.max-w-\\[280px\\]{max-width:280px}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\\[36px\\]{min-width:36px}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[150px\\]{min-width:150px}.flex-1{flex:1}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.-rotate-90{rotate:-90deg}.rotate-0{rotate:0deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.interactive-scale{transition:transform .4s cubic-bezier(.34,1.56,.64,1)}@media (hover:hover) and (pointer:fine){.interactive-scale:hover{transform:scale(1.05)}}.interactive-scale:active{transition:transform 60ms cubic-bezier(0,0,.2,1);transform:scale(.96)}.press-scale{transition:transform .4s cubic-bezier(.34,1.56,.64,1)}.press-scale:active{transition:transform 60ms cubic-bezier(0,0,.2,1);transform:scale(.97)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.resize{resize:both}.resize-none{resize:none}.grid-cols-\\[0fr\\]{grid-template-columns:0fr}.grid-cols-\\[1fr\\]{grid-template-columns:1fr}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing) * 0)}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-\\[5px\\]{gap:5px}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:4px}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[6px\\]{border-radius:6px}.rounded-\\[13px\\]{border-radius:13px}.rounded-\\[14px\\]{border-radius:14px}.rounded-full{border-radius:3.40282e38px}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t{border-top-left-radius:4px;border-top-right-radius:4px}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-l{border-top-left-radius:4px;border-bottom-left-radius:4px}.rounded-l-\\[10px\\]{border-top-left-radius:10px;border-bottom-left-radius:10px}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-tl{border-top-left-radius:4px}.rounded-r{border-top-right-radius:4px;border-bottom-right-radius:4px}.rounded-r-\\[10px\\]{border-top-right-radius:10px;border-bottom-right-radius:10px}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-tr{border-top-right-radius:4px}.rounded-b{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.rounded-b-\\[6px\\]{border-bottom-right-radius:6px;border-bottom-left-radius:6px}.rounded-b-\\[10px\\]{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.rounded-br{border-bottom-right-radius:4px}.rounded-bl{border-bottom-left-radius:4px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.\\[border-width\\:0\\.5px\\]{border-width:.5px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-4{border-top-style:var(--tw-border-style);border-top-width:4px}.\\[border-top-width\\:0\\.5px\\]{border-top-width:.5px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-dotted{--tw-border-style:dotted;border-style:dotted}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-\\[var\\(--rg-border-button\\)\\]{border-color:var(--rg-border-button)}.border-t-\\[var\\(--rg-border-subtle\\)\\]{border-top-color:var(--rg-border-subtle)}.bg-\\[\\#f00\\]{background-color:red}.bg-\\[var\\(--rg-error-bg\\)\\]{background-color:var(--rg-error-bg)}.bg-\\[var\\(--rg-panel-bg\\)\\]{background-color:var(--rg-panel-bg)}.bg-\\[var\\(--rg-submit-bg\\)\\]{background-color:var(--rg-submit-bg)}.bg-\\[var\\(--rg-surface-active\\)\\]{background-color:var(--rg-surface-active)}.bg-\\[var\\(--rg-surface-hover\\)\\]{background-color:var(--rg-surface-hover)}.bg-\\[var\\(--rg-text-primary\\)\\]{background-color:var(--rg-text-primary)}.bg-\\[var\\(--rg-text-secondary\\)\\]{background-color:var(--rg-text-secondary)}.bg-red-500{background-color:var(--color-red-500)}.bg-transparent{background-color:#0000}.p-0{padding:calc(var(--spacing) * 0)}.p-1{padding:calc(var(--spacing) * 1)}.p-6{padding:calc(var(--spacing) * 6)}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-0\\.25{padding-inline:calc(var(--spacing) * .25)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-\\[3px\\]{padding-inline:3px}.py-0{padding-block:calc(var(--spacing) * 0)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-0\\.25{padding-block:calc(var(--spacing) * .25)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-px{padding-block:1px}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.text-center{text-align:center}.text-justify{text-align:justify}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-serif{font-family:var(--font-serif)}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.leading-3\\.5{--tw-leading:calc(var(--spacing) * 3.5);line-height:calc(var(--spacing) * 3.5)}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-extralight{--tw-font-weight:var(--font-weight-extralight);font-weight:var(--font-weight-extralight)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.font-thin{--tw-font-weight:var(--font-weight-thin);font-weight:var(--font-weight-thin)}.break-normal{overflow-wrap:normal;word-break:normal}.break-words,.wrap-break-word{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.text-ellipsis{text-overflow:ellipsis}.whitespace-break-spaces{white-space:break-spaces}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[var\\(--rg-error-text\\)\\]{color:var(--rg-error-text)}.text-\\[var\\(--rg-submit-fg\\)\\]{color:var(--rg-submit-fg)}.text-\\[var\\(--rg-text-primary\\)\\]{color:var(--rg-text-primary)}.text-\\[var\\(--rg-text-primary-85\\)\\]{color:var(--rg-text-primary-85)}.text-\\[var\\(--rg-text-secondary\\)\\]{color:var(--rg-text-secondary)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.\\[box-shadow\\:var\\(--rg-shadow\\)\\]{box-shadow:var(--rg-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.\\[filter\\:var\\(--rg-drop-shadow\\)\\]{filter:var(--rg-drop-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-columns\\]{transition-property:grid-template-columns;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\]{transition-property:grid-template-rows;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[padding\\,border-radius\\,transform\\]{transition-property:padding,border-radius,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[top\\,left\\,width\\,height\\,opacity\\,border-radius\\]{transition-property:top,left,width,height,opacity,border-radius;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,color\\]{transition-property:transform,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.delay-\\[80ms\\]{transition-delay:80ms}.duration-60{--tw-duration:60ms;transition-duration:60ms}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-120{--tw-duration:.12s;transition-duration:.12s}.duration-140{--tw-duration:.14s;transition-duration:.14s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-180{--tw-duration:.18s;transition-duration:.18s}.duration-220{--tw-duration:.22s;transition-duration:.22s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-400{--tw-duration:.4s;transition-duration:.4s}.ease-\\[cubic-bezier\\(0\\,0\\,0\\.2\\,1\\)\\]{--tw-ease:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-drawer{--tw-ease:var(--ease-drawer);transition-timing-function:var(--ease-drawer)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.ease-spring{--tw-ease:var(--ease-spring);transition-timing-function:var(--ease-spring)}.will-change-\\[opacity\\,transform\\]{will-change:opacity,transform}.will-change-transform{will-change:transform}.contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,) var(--tw-contain-layout,) var(--tw-contain-paint,) var(--tw-contain-style,)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[corner-shape\\:superellipse\\(1\\.25\\)\\]{corner-shape:superellipse(1.25)}.\\[font-synthesis\\:none\\]{font-synthesis:none}@media (hover:hover){.group-hover\\:text-\\[var\\(--rg-text-primary\\)\\]:is(:where(.group):hover *){color:var(--rg-text-primary)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.hover\\:bg-\\[var\\(--rg-error-bg-hover\\)\\]:hover{background-color:var(--rg-error-bg-hover)}.hover\\:bg-\\[var\\(--rg-surface-active\\)\\]:hover{background-color:var(--rg-surface-active)}.hover\\:bg-\\[var\\(--rg-surface-hover\\)\\]:hover{background-color:var(--rg-surface-hover)}.hover\\:text-\\[var\\(--rg-text-primary\\)\\]:hover{color:var(--rg-text-primary)}}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:opacity-40:disabled{opacity:.4}}:host{all:initial;direction:ltr}:host,[data-rg-theme=dark]{--rg-panel-bg:#161616;--rg-text-primary:#fff;--rg-text-secondary:#a7a7a7;--rg-surface-hover:#ffffff1a;--rg-surface-active:#ffffff26;--rg-border-subtle:#ffffff1a;--rg-border-button:#fff3;--rg-submit-bg:#fff;--rg-submit-fg:#161616;--rg-error-text:#f87171;--rg-error-bg:#3d1515;--rg-error-bg-hover:#4d1f1f;--rg-shadow:0 2px 8px #00000014;--rg-drop-shadow:drop-shadow(0px 2px 8px #00000014);--rg-shimmer-from:#a1a1aa;--rg-shimmer-to:#d4d4d8;--rg-text-primary-85:#ffffffd9}@media (prefers-color-scheme:dark){:host:not([data-rg-theme]){--rg-panel-bg:#fff;--rg-text-primary:#171717;--rg-text-secondary:#737373;--rg-surface-hover:#0000000d;--rg-surface-active:#00000014;--rg-border-subtle:#00000014;--rg-border-button:#00000026;--rg-submit-bg:#171717;--rg-submit-fg:#fff;--rg-error-text:#dc2626;--rg-error-bg:#fee2e2;--rg-error-bg-hover:#fecaca;--rg-shadow:0 2px 12px #0000001a;--rg-drop-shadow:drop-shadow(0px 2px 12px #0000001a);--rg-shimmer-from:#71717a;--rg-shimmer-to:#a1a1aa;--rg-text-primary-85:#171717d9}}:host([data-rg-theme=light]),[data-rg-theme=light]{--rg-panel-bg:#fff;--rg-text-primary:#171717;--rg-text-secondary:#737373;--rg-surface-hover:#0000000d;--rg-surface-active:#00000014;--rg-border-subtle:#00000014;--rg-border-button:#00000026;--rg-submit-bg:#171717;--rg-submit-fg:#fff;--rg-error-text:#dc2626;--rg-error-bg:#fee2e2;--rg-error-bg-hover:#fecaca;--rg-shadow:0 2px 12px #0000001a;--rg-drop-shadow:drop-shadow(0px 2px 12px #0000001a);--rg-shimmer-from:#71717a;--rg-shimmer-to:#a1a1aa;--rg-text-primary-85:#171717d9}@keyframes rg-slot-enter-up{0%{filter:blur(2px);opacity:0;transform:translateY(.5em)scale(.5)}to{filter:blur();opacity:1;transform:translateY(0)scale(1)}}@keyframes rg-slot-exit-up{0%{filter:blur();opacity:1;transform:translateY(0)scale(1)}to{filter:blur(2px);opacity:0;transform:translateY(-.5em)scale(.5)}}@keyframes rg-slot-enter-down{0%{filter:blur(2px);opacity:0;transform:translateY(-.5em)scale(.5)}to{filter:blur();opacity:1;transform:translateY(0)scale(1)}}@keyframes rg-slot-exit-down{0%{filter:blur();opacity:1;transform:translateY(0)scale(1)}to{filter:blur(2px);opacity:0;transform:translateY(.5em)scale(.5)}}@keyframes rg-slot-enter-fade{0%{filter:blur(2px);opacity:0;transform:scale(.5)}to{filter:blur();opacity:1;transform:scale(1)}}@keyframes rg-slot-exit-fade{0%{filter:blur();opacity:1;transform:scale(1)}to{filter:blur(2px);opacity:0;transform:scale(.5)}}.rg-slot-column{vertical-align:top;display:inline-block;position:relative}.rg-slot-sizer{visibility:hidden;white-space:pre;display:inline-block}.rg-slot-cell{white-space:pre;will-change:transform, filter, opacity;animation-duration:var(--rg-slot-dur,.35s);animation-timing-function:var(--rg-slot-ease,cubic-bezier(.34, 1.56, .64, 1));animation-fill-mode:both;display:inline-block;position:absolute;top:0;left:0}.rg-slot-cell.rg-slot-enter[data-dir="1"]{animation-name:rg-slot-enter-up}.rg-slot-cell.rg-slot-enter[data-dir="-1"]{animation-name:rg-slot-enter-down}.rg-slot-cell.rg-slot-enter[data-dir="0"]{animation-name:rg-slot-enter-fade}.rg-slot-cell.rg-slot-exit[data-dir="1"]{animation-name:rg-slot-exit-up}.rg-slot-cell.rg-slot-exit[data-dir="-1"]{animation-name:rg-slot-exit-down}.rg-slot-cell.rg-slot-exit[data-dir="0"]{animation-name:rg-slot-exit-fade}@media (prefers-reduced-motion:reduce){:host,:host *,:host :before,:host :after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}:host :focus,:host :focus-visible{box-shadow:none!important;outline:none!important}@keyframes shake{0%,to{translate:0}15%,45%{translate:calc(-3px * var(--rg-shake-x,1)) calc(-3px * var(--rg-shake-y,0))}30%,60%{translate:calc(3px * var(--rg-shake-x,1)) calc(3px * var(--rg-shake-y,0))}75%{translate:calc(-2px * var(--rg-shake-x,1)) calc(-2px * var(--rg-shake-y,0))}90%{translate:calc(2px * var(--rg-shake-x,1)) calc(2px * var(--rg-shake-y,0))}}@keyframes icon-loader-spin{0%{opacity:1}50%{opacity:.5}to{opacity:.2}}.icon-loader-bar{animation:.5s linear infinite icon-loader-spin}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.shimmer-text{background:linear-gradient(90deg, var(--rg-shimmer-from) 0%, var(--rg-shimmer-to) 25%, var(--rg-shimmer-from) 50%, var(--rg-shimmer-to) 75%, var(--rg-shimmer-from) 100%);color:#0000;background-size:200% 100%;-webkit-background-clip:text;background-clip:text;animation:2.5s linear infinite shimmer}.animate-shake,.animate-shake-vertical{will-change:translate;animation:.3s ease-out shake}@keyframes tooltip-fade-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}.animate-tooltip-fade-in{will-change:transform, opacity;animation:.1s ease-out tooltip-fade-in}.animate-shake-vertical{--rg-shake-x:0;--rg-shake-y:1}@supports (-webkit-touch-callout:none){textarea[data-react-grab-input]{font-size:16px}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}`,RJ=Symbol(`store-raw`),zJ=Symbol(`store-node`),BJ=Symbol(`store-has`),VJ=Symbol(`store-self`),HJ={get(e,t,n){if(t===RJ)return e;if(t===kz)return n;if(t===jz)return kJ(e),n;let r=EJ(e,zJ),i=r[t],a=i?i():e[t];if(t===zJ||t===BJ||t===`__proto__`)return a;if(!i){let n=Object.getOwnPropertyDescriptor(e,t);SR()&&(typeof a!=`function`||e.hasOwnProperty(t))&&!(n&&n.get)&&(a=DJ(r,t,a)())}return wJ(a)?CJ(a):a},has(e,t){return t===RJ||t===kz||t===jz||t===zJ||t===BJ||t===`__proto__`?!0:(SR()&&DJ(EJ(e,BJ),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:AJ,getOwnPropertyDescriptor:OJ},UJ=new WeakMap,WJ={get(e,t){if(t===RJ)return e;let n=e[t],r;return wJ(n)?UJ.get(n)||(UJ.set(n,r=new Proxy(n,WJ)),r):n},set(e,t,n){return jJ(e,t,TJ(n)),!0},deleteProperty(e,t){return jJ(e,t,void 0,!0),!0}},GJ=new WeakMap,KJ=new WeakMap,qJ=()=>{GJ=new WeakMap,KJ=new WeakMap},JJ=(e,t,n)=>{let r=KJ.get(e);if(r&&n-r.timestamp<200)return r.borderRadius;let i=(t??window.getComputedStyle(e)).borderRadius||`0px`;return KJ.set(e,{borderRadius:i,timestamp:n}),i},YJ=e=>{let t=performance.now(),n=GJ.get(e);if(n&&t-n.timestamp<16)return n.bounds;let r=e.getBoundingClientRect(),i={borderRadius:JJ(e,null,t),height:r.height,width:r.width,x:r.left,y:r.top};return GJ.set(e,{bounds:i,timestamp:t}),i},XJ=e=>({x:e.x+e.width/2,y:e.y+e.height/2}),ZJ=e=>({selectionInteractionLockDepth:0,wasActivatedByToggle:!1,pendingCommentMode:!1,keyHoldDuration:e.keyHoldDuration,dragStart:{x:RM,y:RM},copyStart:{x:RM,y:RM},copyOffsetFromCenterX:0,detectedElement:null,frozenElement:null,frozenElements:[],frozenDragRect:null,lastGrabbedElement:null,selectionFilePath:null,selectionLineNumber:null,inputText:``,grabbedBoxes:[],labelInstances:[],isTouchMode:!1,activationTimestamp:null,previouslyFocusedElement:null,contextMenuPosition:null,contextMenuElement:null,contextMenuClickOffset:null}),QJ=e=>{let[t,n]=FJ(ZJ(e)),[r,i]=J({x:RM,y:RM}),[a,o]=J(0),[s,c]=J({state:`idle`}),l=e=>{n(IJ(t=>{e(t),t.frozenElement=t.frozenElements.length>0?t.frozenElements[0]:null,t.frozenDragRect=null}))},u=()=>{l(e=>{e.frozenElements=[]})},d=e=>{c(t=>t.state===`active`?{...t,phase:e}:t)},f={startHold:e=>{e!==void 0&&n(`keyHoldDuration`,e),c({state:`holding`,startedAt:Date.now()})},releaseHold:()=>{s().state===`holding`&&c({state:`idle`})},activate:()=>{_R(()=>{c({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1}),n(`activationTimestamp`,Date.now()),n(`previouslyFocusedElement`,document.activeElement)})},deactivate:()=>{_R(()=>{c({state:`idle`}),n(IJ(e=>{e.wasActivatedByToggle=!1,e.pendingCommentMode=!1,e.inputText=``,e.frozenElement=null,e.frozenElements=[],e.frozenDragRect=null,e.activationTimestamp=null,e.previouslyFocusedElement=null,e.contextMenuPosition=null,e.contextMenuElement=null,e.contextMenuClickOffset=null,e.isTouchMode&&(e.detectedElement=null)}))})},toggle:()=>{t.activationTimestamp===null?(n(`wasActivatedByToggle`,!0),f.activate()):f.deactivate()},freeze:()=>{if(s().state===`active`){let e=t.frozenElement??t.detectedElement;e&&n(`frozenElement`,e),d(`frozen`)}},unfreeze:()=>{s().state===`active`&&_R(()=>{n(IJ(e=>{e.frozenElement=null,e.frozenElements=[],e.frozenDragRect=null})),d(`hovering`)})},startDrag:(e,t)=>{s().state===`active`&&_R(()=>{t||u(),n(`dragStart`,{x:e.x+window.scrollX,y:e.y+window.scrollY}),d(`dragging-select`)})},startDragReposition:()=>{let e=s();e.state===`active`&&e.phase===`dragging-select`&&d(`dragging-reposition`)},stopDragReposition:()=>{let e=s();e.state===`active`&&e.phase===`dragging-reposition`&&d(`dragging-select`)},shiftDragStart:e=>{let t=s();t.state===`active`&&t.phase===`dragging-reposition`&&n(`dragStart`,t=>({x:t.x+e.x,y:t.y+e.y}))},endDrag:()=>{let e=s();e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)&&_R(()=>{n(`dragStart`,{x:-1e3,y:-1e3}),d(`justDragged`)})},cancelDrag:()=>{let e=s();e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)&&_R(()=>{n(`dragStart`,{x:-1e3,y:-1e3}),d(`hovering`)})},finishJustDragged:()=>{let e=s();e.state===`active`&&e.phase===`justDragged`&&d(`hovering`)},startCopy:()=>{let e=s().state===`active`;c({state:`copying`,startedAt:Date.now(),wasActive:e})},completeCopy:()=>{let e=s(),t=e.state===`copying`&&e.wasActive;c({state:`justCopied`,copiedAt:Date.now(),wasActive:t})},finishJustCopied:()=>{let e=s();e.state===`justCopied`&&(e.wasActive&&!t.wasActivatedByToggle?_R(()=>{u(),c({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1})}):f.deactivate())},enterPromptMode:(e,t)=>{let{x:r}=XJ(YJ(t));_R(()=>{n(`copyStart`,e),n(`copyOffsetFromCenterX`,e.x-r),i(e),n(`frozenElement`,t),n(`wasActivatedByToggle`,!0),s().state===`active`?c(e=>e.state===`active`?{...e,isPromptMode:!0,phase:`frozen`}:e):(c({state:`active`,phase:`frozen`,isPromptMode:!0,isPendingDismiss:!1}),n(`activationTimestamp`,Date.now()),n(`previouslyFocusedElement`,document.activeElement))})},exitPromptMode:()=>{c(e=>e.state===`active`?{...e,isPromptMode:!1,isPendingDismiss:!1}:e)},setInputText:e=>{n(`inputText`,e)},clearInputText:()=>{n(`inputText`,``)},setPendingDismiss:e=>{c(t=>t.state===`active`?{...t,isPendingDismiss:e}:t)},setPointer:e=>{i(t=>t.x===e.x&&t.y===e.y?t:e)},setDetectedElement:e=>{n(`detectedElement`,e)},setFrozenElement:e=>{l(t=>{t.frozenElements=[e]})},setFrozenElements:e=>{l(t=>{t.frozenElements=e})},toggleFrozenElement:e=>{l(t=>{let n=t.frozenElements.indexOf(e);n>=0?t.frozenElements.splice(n,1):t.frozenElements.push(e)})},addFrozenElements:e=>{l(t=>{for(let n of e)t.frozenElements.includes(n)||t.frozenElements.push(n)})},setFrozenDragRect:e=>{n(`frozenDragRect`,e)},setCopyStart:(e,t)=>{let{x:r}=XJ(YJ(t));n(`copyStart`,e),n(`copyOffsetFromCenterX`,e.x-r)},setLastGrabbed:e=>{n(`lastGrabbedElement`,e)},setWasActivatedByToggle:e=>{n(`wasActivatedByToggle`,e)},setPendingCommentMode:e=>{n(`pendingCommentMode`,e)},setTouchMode:e=>{n(`isTouchMode`,e)},incrementSelectionInteractionLockDepth:()=>{n(`selectionInteractionLockDepth`,e=>e+1)},decrementSelectionInteractionLockDepth:()=>{n(`selectionInteractionLockDepth`,e=>Math.max(0,e-1))},setSelectionSource:(e,t)=>{_R(()=>{n(`selectionFilePath`,e),n(`selectionLineNumber`,t)})},incrementViewportVersion:()=>{o(e=>e+1)},addGrabbedBox:e=>{n(`grabbedBoxes`,t=>[...t,e])},removeGrabbedBox:e=>{n(`grabbedBoxes`,t=>t.filter(t=>t.id!==e))},clearGrabbedBoxes:()=>{n(`grabbedBoxes`,[])},addLabelInstance:e=>{n(`labelInstances`,t=>[...t,e])},updateLabelInstance:(e,r,i)=>{let a=t.labelInstances.findIndex(t=>t.id===e);a!==-1&&_R(()=>{n(`labelInstances`,a,`status`,r),i!==void 0&&n(`labelInstances`,a,`errorMessage`,i)})},removeLabelInstance:e=>{n(`labelInstances`,t=>t.filter(t=>t.id!==e))},clearLabelInstances:()=>{n(`labelInstances`,[])},showContextMenu:(e,t)=>{let{x:r,y:i}=XJ(YJ(t));_R(()=>{n(`contextMenuPosition`,e),n(`contextMenuElement`,t),n(`contextMenuClickOffset`,{x:e.x-r,y:e.y-i})})},hideContextMenu:()=>{_R(()=>{n(`contextMenuPosition`,null),n(`contextMenuElement`,null),n(`contextMenuClickOffset`,null)})},updateContextMenuPosition:()=>{let e=t.contextMenuElement,r=t.contextMenuClickOffset;if(!e||!r||!nB(e))return;let{x:i,y:a}=XJ(YJ(e));n(`contextMenuPosition`,{x:i+r.x,y:a+r.y})}};return{store:t,actions:f,pointer:r,viewportVersion:a,current:s}},$J=e=>{if(!document.body)return;let t=document.querySelectorAll(`[${FM}]`);for(let n of t)n!==e&&n.parentNode!==e&&(n.shadowRoot||n.remove());document.body.appendChild(e)},eY=e=>{if(document.body){$J(e);return}let t=()=>{document.removeEventListener(`DOMContentLoaded`,t),$J(e)};document.addEventListener(`DOMContentLoaded`,t,{once:!0})},tY=e=>{let t=document.querySelectorAll(`[${FM}]`);for(let e of t){let t=e.shadowRoot?.querySelector(`[${FM}]`);if(t instanceof HTMLDivElement)return{root:t,host:e};e.remove()}let n=document.createElement(`div`);n.setAttribute(FM,`true`),LN(n),n.style.zIndex=String(GM),n.style.position=`fixed`,n.style.inset=`0`,n.style.pointerEvents=`none`,n.style.contain=`strict`;let r=n.attachShadow({mode:`open`}),i=document.createElement(`style`),a=FN();a&&(i.nonce=a),i.textContent=`@import url("https://fonts.googleapis.com/css2?family=Geist:wght@500&display=swap");\n${e??``}`,r.appendChild(i);let o=document.createElement(`div`);return o.setAttribute(FM,`true`),r.appendChild(o),eY(n),setTimeout(()=>{$J(n)},_N),{root:o,host:n}},nY=e=>{let[t,n]=J(void 0),r=0;return mR(yR(e,e=>{let t=++r;if(!e){n(void 0);return}let i=IU(e)??void 0;n(i),OU(e).then(e=>{r===t&&n(e??i)}).catch(()=>{r===t&&n(i)})})),[t,n]},rY=[`data-theme`,`data-mode`,`data-color-scheme`,`data-bs-theme`,`data-mui-color-scheme`,`data-mantine-color-scheme`],iY=[{attribute:`data-dark`,theme:`dark`},{attribute:`data-light`,theme:`light`}],aY=(e,t,n)=>{let[r,i,a]=[e,t,n].map(e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return .2126*r+.7152*i+.0722*a},oY=(e,t=0)=>{let n=EB(e),r=n?dB(n):null;return!r||r.alpha<=t?null:aY(r.red,r.green,r.blue)},sY=e=>{let t=oY(e);return t===null?null:t<.18?`dark`:`light`},cY=e=>sY(getComputedStyle(e).backgroundColor),lY=()=>{let e=oY(getComputedStyle(document.documentElement).color,lN);return e===null?null:e>.6?`dark`:null},uY=()=>{let e=document.createElement(`div`);e.style.cssText=`position:fixed;width:0;height:0;background-color:Canvas!important`,document.documentElement.appendChild(e);let t=sY(getComputedStyle(e).backgroundColor);return e.remove(),t},dY=e=>{let t=e.toLowerCase();return t===`dark`?`dark`:t===`light`?`light`:null},fY=e=>{let t=e.style.colorScheme||getComputedStyle(e).colorScheme;return t?t.trim().toLowerCase().split(/\s+/):[]},pY=e=>{let t=fY(e),n=t.includes(`dark`);return n===t.includes(`light`)?null:n?`dark`:`light`},mY=e=>{if(e.classList.contains(`dark`))return`dark`;if(e.classList.contains(`light`))return`light`;for(let t of rY){let n=e.getAttribute(t);if(!n)continue;let r=dY(n);if(r)return r}for(let{attribute:t,theme:n}of iY)if(e.hasAttribute(t))return n;return null},hY=(e,t)=>{for(let n of e){if(!n)continue;let e=t(n);if(e)return e}return null},gY=()=>{let e=[document.documentElement,document.body],t=[document.body,document.documentElement];return hY(e,mY)??hY(e,pY)??hY(t,cY)??lY()??uY()??`light`},_Y=e=>e===`dark`?`light`:`dark`,vY=()=>{let e=[];for(let t of[document.documentElement,document.body]){if(!t)continue;e.push(t.className);for(let n of rY)e.push(t.getAttribute(n)??``);for(let{attribute:n}of iY)e.push(t.hasAttribute(n)?`1`:``);let n=t.style;e.push(n.colorScheme,n.backgroundColor,n.color);for(let t=0;t<n.length;t++){let r=n[t];r.startsWith(`--`)&&e.push(`${r}:${n.getPropertyValue(r)}`)}}return e.join(`|`)},yY={attributes:!0,attributeFilter:[`class`,`style`,...rY,...iY.map(({attribute:e})=>e)]},bY=(e,t)=>{let n=null,r=null,i=null,a=()=>{let i=vY();if(i===r&&n!==null)return getComputedStyle(document.body??document.documentElement).backgroundColor,n;r=i;let a=_Y(gY());return a!==n&&(n=a,e.setAttribute(`data-rg-theme`,a),t?.(a)),a},o=()=>{i===null&&(i=ZF(()=>{i=null,a()}))},s=a(),c=new MutationObserver(o);c.observe(document.documentElement,yY);let l=null;document.body?c.observe(document.body,yY):(l=new MutationObserver(()=>{document.body&&(l.disconnect(),l=null,c.observe(document.body,yY),a())}),l.observe(document.documentElement,{childList:!0}));let u=()=>{r=null,o()},d=window.matchMedia(`(prefers-color-scheme: dark)`);return d.addEventListener(`change`,u),{theme:s,cleanup:()=>{l?.disconnect(),c.disconnect(),d.removeEventListener(`change`,u),i!==null&&QF(i)}}},xY=()=>{},SY=()=>({activate:xY,deactivate:xY,toggle:xY,comment:xY,isActive:()=>!1,isEnabled:()=>!1,setEnabled:xY,getToolbarState:()=>null,setToolbarState:xY,onToolbarStateChange:()=>xY,reset:xY,dispose:xY,copyElement:()=>Promise.resolve(!1),getSource:()=>Promise.resolve(null),getStackContext:()=>Promise.resolve(``),getState:()=>({isActive:!1,isDragging:!1,isCopying:!1,isPromptMode:!1,isSelectionBoxVisible:!1,isDragBoxVisible:!1,targetElement:null,dragBounds:null,grabbedBoxes:[],labelInstances:[],selectionFilePath:null,toolbarState:null}),setOptions:xY,registerPlugin:xY,unregisterPlugin:xY,getPlugins:()=>[],getDisplayName:()=>null}),CY=()=>{let e=new AbortController;return{signal:e.signal,abort:()=>e.abort(),addWindowListener:(t,n,r={})=>{window.addEventListener(t,n,{...r,signal:e.signal})},addDocumentListener:(t,n,r={})=>{document.addEventListener(t,n,{...r,signal:e.signal})}}},wY=(e,t=`Unknown error`)=>e instanceof Error&&e.message?e.message:t,TY=e=>e instanceof Error?e:Error(String(e)),EY=e=>({functionName:e.functionName,fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,isServer:e.isServer,isSymbolicated:e.isSymbolicated}),DY=async(e,t)=>{let n={maxLines:t},[r,i,a,o]=await Promise.all([YU(e,n),qU(e,n),FU(e),DU(e)]);return{tagName:NN(e),componentName:a?.componentName??void 0,content:`[${r}]`,source:a,stackContext:i,frames:(o??[]).map(EY)}},OY=async(e,t)=>{let n=await Promise.all(e.map(e=>DY(e,t))),r=new Map;for(let e of n)r.has(e.content)||r.set(e.content,e);let i=[...r.values()];return i.length>0?{content:i.map(e=>e.content).join(`
|
|
259
|
+
`),entries:i}:null},kY=(e,t,n)=>{if(e?.entries)return t===e.content?e.entries:e.entries.length===1?[{...e.entries[0],content:t,commentText:n}]:e.entries.map(e=>({...e,commentText:n}))},AY=async(e,t,n,r)=>{await t.onBeforeCopy(n);let i=!1,a=``;try{let o=e.getContent?{content:await e.getContent(n)}:await OY(n,e.maxContextLines),s=o?.content;if(s?.trim()){let c=await t.transformCopyContent(s,n);a=r?`${r}\n${c}`:c,i=QU(a,{componentName:e.componentName,entries:kY(o,a,r)})}}catch(e){t.onCopyError(TY(e))}return i&&t.onCopySuccess(n,a),t.onAfterCopy(n,i),i},jY=(e,t)=>{let n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),i=Math.min(e.right,t.right),a=Math.min(e.bottom,t.bottom);return Math.max(0,i-n)*Math.max(0,a-r)},MY=(e,t)=>e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top,NY=e=>e.sort((e,t)=>{if(e===t)return 0;let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0}),PY=e=>{if(e.width<=0||e.height<=0)return[];let t=window.innerWidth,n=window.innerHeight,r=e.x,i=e.y,a=e.x+e.width,o=e.y+e.height,s=r+e.width/2,c=i+e.height/2,l=DB(Math.ceil(e.width/32),3,20),u=DB(Math.ceil(e.height/32),3,20),d=l*u,f=d>100?Math.sqrt(100/d):1,p=DB(Math.floor(l*f),3,20),m=DB(Math.floor(u*f),3,20),h=new Set,g=[],_=(e,r)=>{let i=DB(Math.round(e),0,t-1),a=DB(Math.round(r),0,n-1),o=`${i}:${a}`;h.has(o)||(h.add(o),g.push({x:i,y:a}))};_(r+1,i+1),_(a-1,i+1),_(r+1,o-1),_(a-1,o-1),_(s,i+1),_(s,o-1),_(r+1,c),_(a-1,c),_(s,c);for(let t=0;t<p;t+=1){let n=r+(t+.5)/p*e.width;for(let t=0;t<m;t+=1)_(n,i+(t+.5)/m*e.height)}return g},FY=(e,t,n)=>{let r={left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height},i=new Set,a=PY(e);vI();try{for(let e of a){let t=document.elementsFromPoint(e.x,e.y);for(let e of t)i.add(e)}}finally{yI()}let o=[];for(let e of i)!n&&tI(e)||NM(e)&&t(e)&&o.push(e);let s=new Map;for(let e of o)s.set(e,e.getBoundingClientRect());let c=[];for(let e of o){let t=s.get(e);if(t.width<=0||t.height<=0)continue;let i={left:t.left,top:t.top,right:t.left+t.width,bottom:t.top+t.height};if(n){let n=jY(r,i),a=t.width*t.height;a>0&&n/a>=.75&&c.push(e)}else MY(i,r)&&c.push(e)}return NY(c)},IY=e=>{let t=new Set(e);return e.filter(e=>{for(let n=e.parentElement;n;n=n.parentElement)if(t.has(n))return!1;return!0})},LY=(e,t,n=!0)=>IY(FY(e,t,n)),RY=(e,t)=>e.width<=0?0:DB((t.x-e.x)/e.width,0,1),zY=()=>{qJ(),kI(),uI()},BY=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.pageX-window.scrollX,y:e.pageY-window.scrollY}),VY=e=>({pageX:e.x+window.scrollX,pageY:e.y+window.scrollY,width:e.width,height:e.height}),HY=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.x,y:e.y}),UY=(e,t,n)=>{let r=(e,t,n,r)=>{let i=[],a=e,o=0;for(;a&&i.length<n&&o<100;)r(a)&&i.push(a),a=t(a),o+=1;return i},i=r(e.parentElement,e=>e.parentElement,6,t);i.reverse();let a=i.map((e,t)=>({element:e,depth:t,isLast:!0})),o=i.length,s=r(e.previousElementSibling,e=>e.previousElementSibling,7,n),c=r(e.nextElementSibling,e=>e.nextElementSibling,7,n),l=Math.min(s.length,Math.max(3,7-c.length)),u=Math.min(c.length,7-l),d=[...s.slice(0,l).reverse(),e,...c.slice(0,u)],f=r(e.firstElementChild,e=>e.nextElementSibling,6,t),p=d.length-1,m=f.length-1;return d.forEach((t,n)=>{a.push({element:t,depth:o,isLast:n===p}),t===e&&f.forEach((e,t)=>{a.push({element:e,depth:o+1,isLast:t===m})})}),a},WY=e=>e instanceof SVGElement&&!(e instanceof SVGSVGElement),GY=e=>{let t=e.getBoundingClientRect();return t.width>=16||t.height>=16},KY=(e,t)=>t(e)&&!WY(e)&&GY(e),qY=new Set([`c`,`C`,`с`,`С`,`ȼ`,`Ȼ`,`ↄ`,`Ↄ`,`ᴄ`,`ᶜ`,`ⱼ`,`ⅽ`,`Ⅽ`,`ç`,`Ç`,`ć`,`Ć`,`č`,`Č`,`ĉ`,`Ĉ`,`ċ`,`Ċ`]),JY=(e,t)=>t===`KeyC`?!0:!e||e.length!==1?!1:qY.has(e),YY=(e,t)=>{if(!e||!t)return!1;let n=e.toLowerCase();return t===`Space`?n===`space`||n===` `:t.startsWith(`Key`)?t.slice(3).toLowerCase()===n:t.startsWith(`Digit`)?t.slice(5)===n:!1},XY={meta:`metaKey`,cmd:`metaKey`,command:`metaKey`,win:`metaKey`,windows:`metaKey`,ctrl:`ctrlKey`,control:`ctrlKey`,shift:`shiftKey`,alt:`altKey`,option:`altKey`,opt:`altKey`},ZY=e=>{let t=e.split(`+`).map(e=>e.trim().toLowerCase()),n={metaKey:!1,ctrlKey:!1,shiftKey:!1,altKey:!1,key:null};for(let e of t){let t=XY[e];t?n[t]=!0:n.key=e}return n},QY=e=>{if(typeof e==`function`)return e;let t=ZY(e),n=t.key;return e=>{if(n===null){let n=!t.metaKey||e.metaKey||e.key===`Meta`,r=!t.ctrlKey||e.ctrlKey||e.key===`Control`,i=!t.shiftKey||e.shiftKey||e.key===`Shift`,a=!t.altKey||e.altKey||e.key===`Alt`,o=n&&r&&i&&a,s=[t.metaKey,t.ctrlKey,t.shiftKey,t.altKey].filter(Boolean).length,c=[e.metaKey||e.key===`Meta`,e.ctrlKey||e.key===`Control`,e.shiftKey||e.key===`Shift`,e.altKey||e.key===`Alt`].filter(Boolean).length;return o&&c>=s}let r=e.key?.toLowerCase()===n||YY(n,e.code),i=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey?(!t.metaKey||e.metaKey)&&(!t.ctrlKey||e.ctrlKey)&&(!t.shiftKey||e.shiftKey)&&(!t.altKey||e.altKey):!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey;return r&&i}},$Y=e=>!e||typeof e==`function`?{metaKey:AB(),ctrlKey:!AB(),shiftKey:!1,altKey:!1,key:null}:ZY(e),eX=(e,t)=>{if(t.activationKey)return QY(t.activationKey)(e);let n=(AB()?e.metaKey:e.ctrlKey)&&!e.shiftKey&&!e.altKey;return!!(e.key&&n&&JY(e.key,e.code))},tX=e=>{if(e.length===0)return{x:0,y:0,width:0,height:0};if(e.length===1)return e[0];let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),i=Math.max(i,a.y+a.height);return{x:t,y:n,width:r-t,height:i-n}},nX=e=>{let t=getComputedStyle(e),n={};for(let e of MB)n[e]=t.getPropertyValue(e);return n},rX=e=>{let t={};for(let n of QB)t[n]=e.getPropertyValue(n);return t},iX=e=>{try{let t=e.parentElement;if(!t)return null;let n=e.namespaceURI,r=e.tagName.toLowerCase(),i=n&&n!==`http://www.w3.org/1999/xhtml`?e.ownerDocument.createElementNS(n,r):e.ownerDocument.createElement(r),a=`style`in i?i.style:null;a instanceof CSSStyleDeclaration&&a.setProperty(`display`,`none`,`important`),t.appendChild(i);try{return rX(getComputedStyle(i))}finally{i.remove()}}catch{return null}},aX=new Set([`display`,`width`,`height`]),oX=(e,t,n)=>e.kind===`color`?!1:e.cssProperties.some(e=>aX.has(e))?sX(e):e.cssProperties.every(e=>{let r=t[e],i=n[e];return r===void 0||i===void 0?!1:r===i}),sX=e=>{if(e.kind===`color`)return!1;if(e.kind===`enum`)return e.key===`font-weight`?e.original===`400`:e.options[0]?.value===e.original;let{key:t,original:n}=e;return t.startsWith(`padding`)||t.startsWith(`margin`)||t.includes(`gap`)||t===`border-width`||t.endsWith(`-radius`)||t===`border-radius`?n===0:t===`opacity`?n===100:t===`letter-spacing`||t===`z-index`?n===0:!WB.has(t)&&!!(t===`width`||t===`height`||t===`width,height`||t.startsWith(`max-`)||t.startsWith(`min-`)||t===`line-height`)},cX=e=>{let t=e.trim();if(!t||t===`auto`||t===`normal`||t===`none`)return null;let n=Number.parseFloat(t);return Number.isFinite(n)?t.endsWith(`%`)?{value:n,unit:`%`}:t.endsWith(`rem`)||t.endsWith(`em`)?{value:n*16,unit:`px`}:t.endsWith(`px`)?{value:n,unit:`px`}:{value:n,unit:``}:null},lX=(e,t)=>{let n=cX(e[t]);if(n)return n;if(t===`line-height`){let t=cX(e[`font-size`]);return t?{value:nV(t.value*jN),unit:t.unit||`px`}:null}return LB.has(t)?{value:0,unit:`px`}:null},uX=(e,t)=>{let n=lX(e,t[0]);if(!n)return null;for(let r=1;r<t.length;r++){let i=lX(e,t[r]);if(!i||i.unit!==n.unit||Math.abs(i.value-n.value)>=.5)return null}return n},dX=(e,t)=>e===`opacity`?{value:Math.round(t.value*100),unit:`%`}:RB.has(e)?{value:nV(t.value),unit:``}:{value:nV(t.value),unit:t.unit||`px`},fX=e=>e!==null,pX=(e,t)=>{let n=t.map(t=>{let n=t.longhands.length===1?lX(e,t.longhands[0]):uX(e,t.longhands);return n?{definition:t,value:n}:null}).filter(fX),r=new Map;for(let e of n)for(let t of e.definition.longhands){let n=r.get(t);(!n||e.definition.longhands.length>n.definition.longhands.length)&&r.set(t,e)}let i=new Set(r.values());return n.map(e=>({...e,isCanonical:i.has(e)}))},mX=(e,t,n)=>e===`opacity`?{min:0,max:100}:e===`z-index`?{min:FB,max:IB}:e===`letter-spacing`?{min:-10,max:20}:e===`font-size`?{min:8,max:96}:e===`line-height`?{min:0,max:120}:e.includes(`radius`)?{min:0,max:96}:e===`width`||e===`height`||e===`width,height`||e.startsWith(`min-`)||e.startsWith(`max-`)?{min:0,max:Math.max(512,Math.ceil(t*2))}:WB.has(e)?{min:PB,max:512}:n===`%`?{min:0,max:100}:{min:e.startsWith(`margin`)?NB:0,max:384},hX=(e,t,n)=>{let r=dX(e.key,t),i=r.unit===`px`&&Math.abs(r.value)>1e7,a=mX(e.key,i?0:r.value,r.unit),o=r.value<0?a.min:a.max,s=i?o:r.value;return{kind:`numeric`,key:e.key,label:e.label,cssProperties:e.longhands,min:a.min,max:a.max,value:s,original:s,unit:r.unit,tailwindAliases:AV(e.key),isPrioritized:!1,isDefault:!1,isCanonical:n}},gX=(e,t,n,r=!1)=>{let i=EB(n),a=i?dB(i):null,o=a!==null&&a.alpha!==0;if(!o&&!r)return null;let s=o&&i?i:xN;return{kind:`color`,key:e,label:t,cssProperties:[e],value:s,original:s,tailwindAliases:AV(e),isPrioritized:r,isDefault:!1,isCanonical:!0}},_X=(e,t,n)=>{let r=t.trim(),i=n??e.options;return!i||!i.some(e=>e.value===r)?null:{kind:`enum`,key:e.key,label:e.label,cssProperties:[e.key],value:r,original:r,options:i,tailwindAliases:AV(e.key),isPrioritized:!1,isDefault:!1,isCanonical:!0}},vX=new Map(`background-color.color.padding.padding-left,padding-right.padding-top,padding-bottom.padding-top.padding-right.padding-bottom.padding-left.margin.margin-left,margin-right.margin-top,margin-bottom.margin-top.margin-right.margin-bottom.margin-left.font-family.font-size.font-weight.font-style.line-height.letter-spacing.text-transform.text-align.text-decoration-line.white-space.word-break.overflow-wrap.font-variant-numeric.border-radius.border-top-left-radius,border-top-right-radius.border-bottom-left-radius,border-bottom-right-radius.border-top-left-radius,border-bottom-left-radius.border-top-right-radius,border-bottom-right-radius.border-top-left-radius.border-top-right-radius.border-bottom-left-radius.border-bottom-right-radius.width,height.width.height.max-width.max-height.min-width.min-height.opacity.gap.row-gap.column-gap.border-width.border-top-width.border-right-width.border-bottom-width.border-left-width.border-color.align-items.justify-content.top,right,bottom,left.left,right.top,bottom.top.right.bottom.left.z-index`.split(`.`).map((e,t)=>[e,t])),yX=e=>vX.get(e.key)??1/0,bX=e=>e.map((e,t)=>({property:e,index:t})).sort((e,t)=>{let n=yX(e.property)-yX(t.property);return n===0?e.index-t.index:n}).map(e=>e.property),xX=e=>{let t=nX(e),n=getComputedStyle(e),r=rX(n),i=iX(e),a=[],o=new Set,s=e=>{o.has(e.key)||(a.push(e),o.add(e.key))};for(let e of GB)for(let n of pX(t,e))s(hX(n.definition,n.value,n.isCanonical));for(let e of KB){let n=lX(t,e.key);n&&s(hX({key:e.key,label:e.label,longhands:[e.key]},n,!0))}for(let{key:e,label:t,alwaysShow:r}of qB){let i=n.getPropertyValue(e);if(!r&&(!i||pB(i)))continue;let a=gX(e,t,i,r);a&&s(a)}let c=n.getPropertyValue(XB.key);if(c){let e=_X(XB,c,YB(c));e&&s(e)}for(let e of ZB){let t=n.getPropertyValue(e.key);if(!t)continue;let r=_X(e,t);r&&s(r)}return SX(a,kV(e),r,i)},SX=(e,t,n,r)=>{let i=[],a=[];for(let o of e)if(o.isPrioritized||t.has(o.key))i.push({...o,isPrioritized:!0,isDefault:!1});else{let e=r?oX(o,n,r):sX(o);a.push({...o,isDefault:e})}return[...bX(i),...bX(a)]},CX=[{keyword:`letter`,family:`letter-spacing`},{keyword:`tracking`,family:`letter-spacing`},{keyword:`leading`,family:`line-height`},{keyword:`line-height`,family:`line-height`},{keyword:`lineheight`,family:`line-height`},{keyword:`radius`,family:`radius`},{keyword:`rounded`,family:`radius`},{keyword:`corner`,family:`radius`},{keyword:`font-size`,family:`font-size`},{keyword:`fontsize`,family:`font-size`},{keyword:`text`,family:`font-size`},{keyword:`stroke`,family:`border-width`},{keyword:`border-width`,family:`border-width`},{keyword:`borderwidth`,family:`border-width`},{keyword:`space`,family:`spacing`},{keyword:`gap`,family:`spacing`},{keyword:`gutter`,family:`spacing`},{keyword:`inset`,family:`spacing`},{keyword:`padding`,family:`spacing`},{keyword:`margin`,family:`spacing`},{keyword:`size`,family:`size`},{keyword:`width`,family:`size`},{keyword:`height`,family:`size`}],wX=e=>{let t=e.toLowerCase();for(let{keyword:e,family:n}of CX)if(t.includes(e))return n;return null},TX=e=>e.includes(`radius`)?`radius`:e.endsWith(`-width`)&&e.includes(`border`)?`border-width`:e===`font-size`?`font-size`:e===`line-height`?`line-height`:e===`letter-spacing`?`letter-spacing`:e.startsWith(`padding`)||e.startsWith(`margin`)||e.endsWith(`gap`)||e===`top`||e===`right`||e===`bottom`||e===`left`||e.startsWith(`inset`)?`spacing`:e===`width`||e===`height`||e.startsWith(`min-`)||e.startsWith(`max-`)?`size`:null,EX=e=>{let t=cX(e);return!t||t.unit!==`px`?null:nV(t.value)},DX=(e,t)=>t===null?!0:e.length===t.length?e<t:e.length<t.length,OX=(e,t,n)=>{if(n===1){for(let n of e)if(n>t)return n;return null}for(let n=e.length-1;n>=0;n--)if(e[n]<t)return e[n];return null},kX=(e,t,n)=>{let r=(t===1?Math.floor(e/n)+1:Math.ceil(e/n)-1)*n;return r<0?null:r},AX=null,jX=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),MX=()=>{let e=Array.from(document.adoptedStyleSheets??[]),t=document.styleSheets.length;if(AX&&AX.documentSheetCount===t&&jX(AX.adoptedSheets,e))return AX.names;let n=new Set;for(let t of[...document.styleSheets,...e]){let e;try{e=t.cssRules}catch{continue}NX(e,n)}return AX={documentSheetCount:t,adoptedSheets:e,names:n},n},NX=(e,t)=>{for(let n of Array.from(e))if(n instanceof CSSStyleRule){let e=n.style;for(let n=0;n<e.length;n++){let r=e.item(n);r.startsWith(`--`)&&t.add(r)}}else n instanceof CSSGroupingRule&&NX(n.cssRules,t)},PX={hasTokens:!1,matchColor:()=>null,matchLength:()=>null,stepLength:()=>null},FX=e=>{if(typeof document>`u`)return PX;let t=MX();if(t.size===0)return PX;let n=getComputedStyle(e),r=new Map,i=new Map,a=new Map,o=null;for(let e of t){let t=n.getPropertyValue(e).trim();if(!t)continue;let s=EX(t);if(s!==null){e===`--spacing`&&s>0&&(o=s);let t=wX(e);if(t!==null){let n=i.get(s);n?n.push({name:e,family:t}):i.set(s,[{name:e,family:t}]);let r=a.get(t);r?r.add(s):a.set(t,new Set([s]))}continue}let c=EB(t);if(c){let t=c.toLowerCase();DX(e,r.get(t)??null)&&r.set(t,e)}}if(r.size===0&&i.size===0)return PX;let s=new Map;for(let[e,t]of a)s.set(e,Array.from(t).sort((e,t)=>e-t));return{hasTokens:!0,matchColor:e=>{let t=EB(e)?.toLowerCase();return t?r.get(t)??null:null},matchLength:(e,t)=>{let n=TX(t);if(n===null)return null;let r=i.get(Math.round(e));if(!r)return null;let a=null;for(let e of r)e.family===n&&DX(e.name,a)&&(a=e.name);return a},stepLength:(e,t,n)=>{let r=TX(n);if(r===null)return null;let i=Math.round(e),a=s.get(r);return a&&a.length>=2?OX(a,i,t):(r===`spacing`||r===`size`)&&o?kX(i,t,o):a?OX(a,i,t):null}}},IX=e=>e.kind===`color`||e.kind===`enum`?e.value:e.key===`opacity`&&e.unit===`%`?tV(e.value/100):`${tV(e.value)}${e.unit}`,LX=(e,t,n)=>{if(!n?.hasTokens)return null;let{edit:r}=t;return r.kind===`color`?n.matchColor(r.value):r.kind===`numeric`&&r.unit===`px`?n.matchLength(r.value,e):null},RX=e=>{let t=new Map;for(let n of e.edits){let e=IX(n);for(let r of n.cssProperties)t.set(r,{edit:n,cssValue:e})}let n=!1;return{lines:Array.from(t,([t,r])=>{let i=LX(t,r,e.designTokens);i&&(n=!0);let a=i?` /* var(${i}) */`:``;return`${t}: ${r.cssValue};${a}`}),usesToken:n}},zX=e=>e.filePath?`${e.filePath}:${e.lineNumber}`:``,BX=e=>["```css",...e,"```"].join(`
|
|
260
|
+
`),VX=e=>{if(e.length===0)return``;let t=e.map(e=>{let{lines:t,usesToken:n}=RX(e);return{header:zX(e),cssLines:t,usesToken:n}}),n=[`Apply these style changes canonically (CSS = visual intent; choose the source change that best expresses the underlying layout intent):`];if(t.some(e=>e.usesToken)&&n.push("Prefer the design token shown in each `/* var(--token) */` comment over the raw value when it matches the project's intent."),t.length===1){let[e]=t;return e.header&&n.push(`\n${e.header}`),n.push(BX(e.cssLines)),n.join(`
|
|
261
|
+
`)}for(let e of t)n.push(e.header?`\n${e.header}`:``),n.push(BX(e.cssLines));return n.join(`
|
|
262
|
+
`)},HX=e=>`style`in e&&e.style instanceof CSSStyleDeclaration,UX=e=>{let t=new Map,n=HX(e)?e:null;return{apply:(e,r)=>{if(n)for(let i of e)t.has(i)||t.set(i,{value:n.style.getPropertyValue(i),priority:n.style.getPropertyPriority(i)}),n.style.setProperty(i,r)},restore:()=>{if(!n){t.clear();return}for(let[e,{value:r,priority:i}]of t)r?n.style.setProperty(e,r,i):n.style.removeProperty(e);t.clear()},hasAppliedStyles:()=>t.size>0}},WX=(e,t)=>{for(let n of t){let t=e.edits.findIndex(e=>e.key===n.key);t>=0?e.edits[t]=n:e.edits.push(n)}},GX=(e,t)=>({element:e.element,preview:e.preview,filePath:e.filePath??``,lineNumber:e.lineNumber??0,edits:t,designTokens:e.designTokens}),KX=e=>{let[t,n]=J(null),[r,i]=J(!1),a=[],o=[],s=e=>{o=e},c=()=>{let r=t()!==null;n(null),i(!1),a=[],o=[],r&&e.onClose?.()},l=()=>{t()?.preview.restore();for(let e=a.length-1;e>=0;e--)a[e].preview.restore();c()},u=e=>{OU(e).then(t=>{t&&n(n=>!n||n.element!==e||n.componentName?n:{...n,componentName:t})})},d=(r,i,a={})=>{if(t()!==null)return!1;let o=xX(r);if(o.length===0)return!1;let s=a.filePath??e.store.selectionFilePath??void 0,c=a.lineNumber??e.store.selectionLineNumber??void 0;return n({element:r,position:i,selectionBounds:YJ(r),properties:o,preview:UX(r),filePath:s,lineNumber:c,componentName:a.componentName,tagName:a.tagName??NN(r),initialSearchQuery:a.initialSearchQuery,designTokens:FX(r)}),u(r),e.isActivated()||e.activateRenderer(),e.actions.setPointer(i),e.actions.setFrozenElement(r),e.actions.freeze(),e.onOpen?.(),!0},f=(r,i)=>{let s=t();if(!s||s.element===r)return!1;let c=xX(r);return c.length===0?!1:((o.length>0||s.preview.hasAppliedStyles())&&a.push(GX(s,o)),o=[],n({element:r,position:i,selectionBounds:YJ(r),properties:c,preview:UX(r),tagName:NN(r),hasSessionEdits:a.some(e=>e.edits.length>0),designTokens:FX(r)}),FU(r).then(e=>{if(e){for(let t of a)t.element===r&&!t.filePath&&(t.filePath=e.filePath,t.lineNumber=e.lineNumber??0);n(t=>!t||t.element!==r||t.filePath?t:{...t,filePath:e.filePath,lineNumber:e.lineNumber??void 0})}}).catch(()=>void 0),u(r),e.actions.setPointer(i),e.actions.setFrozenElement(r),!0)},p=(e,t)=>[...a,GX(e,t)],m=e=>{let t=new Map;for(let n of e){if(n.edits.length===0)continue;let e=t.get(n.element);if(e){!e.filePath&&n.filePath&&(e.filePath=n.filePath,e.lineNumber=n.lineNumber),WX(e,n.edits);continue}t.set(n.element,{filePath:n.filePath,lineNumber:n.lineNumber,edits:[...n.edits],designTokens:n.designTokens})}return Array.from(t.values())},h=e=>{let t=new Set;for(let n of e)n.edits.length>0&&t.add(n.element);for(let n=e.length-1;n>=0;n--){let r=e[n];r.edits.length===0&&!t.has(r.element)&&r.preview.restore()}};return{state:t,trigger:d,switchToElement:f,setPendingEdits:s,dismiss:()=>{t()!==null&&(l(),e.store.wasActivatedByToggle?e.deactivateRenderer():e.actions.unfreeze())},closePreservingRenderer:()=>{t()!==null&&(l(),e.actions.unfreeze())},submit:n=>{let r=t();if(!r)return;let i=r.element,a=p(r,n),o=VX(m(a));h(a),c(),e.store.wasActivatedByToggle||e.actions.unfreeze(),e.performCopyWithLabel({element:i,cursorX:r.position.x,extraPrompt:o||void 0,shouldDeactivateAfter:e.store.wasActivatedByToggle})},resetWithDiscard:l,isOpen:()=>t()!==null,isInteracting:r,setInteracting:i}},qX={enabled:!0,hue:0,selectionBox:{enabled:!0},dragBox:{enabled:!0},grabbedBoxes:{enabled:!0},elementLabel:{enabled:!0},toolbar:{enabled:!0}},JX=(e,t)=>({enabled:t.enabled??e.enabled,hue:t.hue??e.hue,selectionBox:{enabled:t.selectionBox?.enabled??e.selectionBox.enabled},dragBox:{enabled:t.dragBox?.enabled??e.dragBox.enabled},grabbedBoxes:{enabled:t.grabbedBoxes?.enabled??e.grabbedBoxes.enabled},elementLabel:{enabled:t.elementLabel?.enabled??e.elementLabel.enabled},toolbar:{enabled:t.toolbar?.enabled??e.toolbar.enabled}}),YX={activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,activationKey:void 0,getContent:void 0,maxContextLines:3,freezeReactUpdates:!0},XX=(e={})=>{let t=new Map,n={},[r,i]=FJ({theme:qX,options:{...YX,...e},actions:[]}),a=()=>{let r=qX,a={...YX,...e},o=[];for(let{config:e}of t.values())if(e.theme&&(r=JX(r,e.theme)),e.options&&(a={...a,...e.options}),e.actions)for(let t of e.actions)o.push(t);a={...a,...n},i(`theme`,r),i(`options`,a),i(`actions`,o)},o=(e,t)=>{n[e]=t,i(`options`,e,t)},s=[`activationMode`,`keyHoldDuration`,`allowActivationInsideInput`,`activationKey`,`getContent`,`maxContextLines`,`freezeReactUpdates`],c=e=>{for(let t of s)e[t]!==void 0&&o(t,e[t])},l=(e,n)=>{t.has(e.name)&&u(e.name);let r=e.setup?.(n,_)??{};e.theme&&(r.theme=r.theme?JX(JX(qX,e.theme),r.theme):e.theme),e.actions&&(r.actions=[...e.actions,...r.actions??[]]),e.hooks&&(r.hooks=r.hooks?{...e.hooks,...r.hooks}:e.hooks),e.options&&(r.options=r.options?{...e.options,...r.options}:e.options),t.set(e.name,{plugin:e,config:r}),a()},u=e=>{let n=t.get(e);n&&(n.config.cleanup&&n.config.cleanup(),t.delete(e),a())},d=()=>Array.from(t.keys()),f=(e,...n)=>{for(let{config:r}of t.values()){let t=r.hooks?.[e];t&&t(...n)}},p=(e,...n)=>{let r=!1;for(let{config:i}of t.values()){let t=i.hooks?.[e];t&&t(...n)===!0&&(r=!0)}return r},m=async(e,...n)=>{for(let{config:r}of t.values()){let t=r.hooks?.[e];t&&await t(...n)}},h=async(e,n,...r)=>{let i=n;for(let{config:n}of t.values()){let t=n.hooks?.[e];t&&(i=await t(i,...r))}return i},g=(e,n,...r)=>{let i=n;for(let{config:n}of t.values()){let t=n.hooks?.[e];t&&(i=t(i,...r))}return i},_={onActivate:()=>f(`onActivate`),onDeactivate:()=>f(`onDeactivate`),onElementHover:e=>f(`onElementHover`,e),onElementSelect:e=>{let n=!1,r;for(let{config:i}of t.values()){let t=i.hooks?.onElementSelect;if(t){let i=t(e);i===!0?n=!0:i instanceof Promise&&(n=!0,r=i)}}return{wasIntercepted:n,pendingResult:r}},onDragStart:(e,t)=>f(`onDragStart`,e,t),onDragEnd:(e,t)=>f(`onDragEnd`,e,t),onBeforeCopy:async e=>m(`onBeforeCopy`,e),transformCopyContent:async(e,t)=>h(`transformCopyContent`,e,t),onAfterCopy:(e,t)=>f(`onAfterCopy`,e,t),onCopySuccess:(e,t)=>f(`onCopySuccess`,e,t),onCopyError:e=>f(`onCopyError`,e),onStateChange:e=>f(`onStateChange`,e),onPromptModeChange:(e,t)=>f(`onPromptModeChange`,e,t),onSelectionBox:(e,t,n)=>f(`onSelectionBox`,e,t,n),onDragBox:(e,t)=>f(`onDragBox`,e,t),onGrabbedBox:(e,t)=>f(`onGrabbedBox`,e,t),onElementLabel:(e,t,n)=>f(`onElementLabel`,e,t,n),onContextMenu:(e,t)=>f(`onContextMenu`,e,t),onOpenFile:(e,t)=>p(`onOpenFile`,e,t),transformHtmlContent:async(e,t)=>h(`transformHtmlContent`,e,t),transformAgentContext:async(e,t)=>h(`transformAgentContext`,e,t),transformActionContext:e=>g(`transformActionContext`,e),transformOpenFileUrl:(e,t,n)=>g(`transformOpenFileUrl`,e,t,n)};return{register:l,unregister:u,getPluginNames:d,setOptions:c,store:r,hooks:_}},ZX=e=>`${e}-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,QX=e=>{let t=e.bounds.x+e.bounds.width/2,n=e.bounds.width/2,r=e.mouseX===void 0?void 0:e.mouseX-t;return{id:ZX(`label`),bounds:e.bounds,boundsMultiple:e.boundsMultiple,tagName:e.tagName,componentName:e.componentName,status:e.status,createdAt:Date.now(),element:e.element,elements:e.elements,mouseX:e.mouseX,mouseXOffsetFromCenter:r,mouseXOffsetRatio:r!==void 0&&n>0?r/n:void 0,hideArrow:e.hideArrow}},$X=(e,t)=>{let n=new Map,r=e=>{let t=n.get(e);t!==void 0&&(window.clearTimeout(t),n.delete(e))},i=()=>{for(let e of n.values())window.clearTimeout(e);n.clear()},a=()=>{i(),e.clearLabelInstances()},o=t=>{r(t);let i=window.setTimeout(()=>{e.updateLabelInstance(t,`fading`);let r=window.setTimeout(()=>{n.delete(t),e.removeLabelInstance(t)},125);n.set(t,r)},BM);n.set(t,i)};return{createInstance:(t,n,r,i,o)=>{a();let s=QX({bounds:t,tagName:n,componentName:r,status:i,element:o?.element,mouseX:o?.mouseX,elements:o?.elements,boundsMultiple:o?.boundsMultiple,hideArrow:o?.hideArrow});return e.addLabelInstance(s),s.id},createPerElementInstances:(t,n)=>{a();let r=[];for(let i of t){let t=QX({bounds:YJ(i.element),tagName:i.tagName,componentName:i.componentName,status:n,element:i.element,mouseX:i.mouseX});e.addLabelInstance(t),r.push(t.id)}return r},updateAfterCopy:(t,n,r)=>{n?e.updateLabelInstance(t,`copied`):e.updateLabelInstance(t,`error`,r||`Unknown error`),o(t)},cancelAllFades:i,clearAll:a,handleHoverChange:(e,n)=>{if(n){r(e);return}let i=t().find(t=>t.id===e);i&&(i.status===`copied`||i.status===`error`||i.status===`fading`)&&o(e)}}},eZ=e=>{let t=window.innerWidth,n=window.innerHeight,r=Math.max(0,e.x),i=Math.min(t,e.x+e.width),a=Math.max(0,e.y),o=Math.min(n,e.y+e.height);return{x:(r+i)/2,y:(a+o)/2}},tZ=(e,t,n)=>{let r=[],i=(t,r)=>{let i=eZ(n(t)),a=DI(i.x,i.y).filter(e),o=a.indexOf(t);return o===-1?null:a[o+r]??null},a=e=>{let t=i(e,1);return t&&(r.push(e),r.length>50&&(r=r.slice(-50))),t},o=e=>{if(r.length>0){let e=r.pop();if(nB(e))return e}return i(e,-1)},s=(e,n)=>{let i=e=>n?e.nextElementSibling:e.previousElementSibling,a=i(e);for(;a;){if(t(a))return r=[],a;a=i(a)}return null};return{findNext:(e,t)=>{switch(e){case`ArrowUp`:return a(t);case`ArrowDown`:return o(t);case`ArrowRight`:return s(t,!0);case`ArrowLeft`:return s(t,!1);default:return null}},clearHistory:()=>{r=[]}}},nZ=e=>{let{metaKey:t,ctrlKey:n,shiftKey:r,altKey:i}=$Y(e.activationKey);return{metaKey:t,ctrlKey:n,shiftKey:r,altKey:i}},rZ=()=>{let e=new WeakSet,t=Object.getOwnPropertyDescriptor(KeyboardEvent.prototype,`key`),n=!1;if(t?.get&&!t.get.__reactGrabPatched){n=!0;let r=t.get,i=function(){return e.has(this)?``:r.call(this)};i.__reactGrabPatched=!0,Object.defineProperty(KeyboardEvent.prototype,"key",{get:i,configurable:!0})}return{claimedEvents:e,originalKeyDescriptor:t,restore:()=>{n&&t&&Object.defineProperty(KeyboardEvent.prototype,"key",t)}}},iZ=(e,t)=>({top:t<25,bottom:t>window.innerHeight-25,left:e<25,right:e>window.innerWidth-25}),aZ=(e,t,n)=>{let r=null,i=()=>{if(!t()){a();return}let o=e(),s=iZ(o.x,o.y),c=0,l=0;if(s.top&&(l-=10),s.bottom&&(l+=10),s.left&&(c-=10),s.right&&(c+=10),c!==0||l!==0){let e=window.scrollX,t=window.scrollY;window.scrollBy(c,l);let r=window.scrollX-e,i=window.scrollY-t;(r!==0||i!==0)&&n?.({x:r,y:i})}r=s.top||s.bottom||s.left||s.right?ZF(i):null},a=()=>{r!==null&&(QF(r),r=null)};return{start:i,stop:a,isActive:()=>r!==null}},oZ=()=>{let e=globalThis;return!!(e.chrome?.runtime?.id||e.browser?.runtime?.id)},sZ=e=>{try{let t=`0.1.48`,n=`data:image/svg+xml;base64,${btoa(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 294 294"><path fill="#ff40e0" d="M145 47c25-20 50-27 67-17 16 9 23 30 20 60 0 2-1 5-1 7l-2 13h-1l-12-4c-8-3-17-5-25-6l-17-3c-10-1-20-1-29-1-10 0-20 0-29 1-6 8-11 16-16 24-5 9-9 17-13 26 4 9 8 18 13 26s10 16 16 24l11 14c5 7 11 13 18 19l10 8s-1 0 0 0l-11 9c-17 14-35 22-49 22-6 0-13-2-18-5-16-9-23-30-20-59 1-3 1-5 1-8-30-12-48-29-48-50 0-18 14-35 41-47 2-1 5-2 7-3 0-2 0-5-1-7-3-30 4-51 20-60 18-10 42-3 68 17M71 201c-1 2-1 4-1 5-2 24 3 41 13 47h1c11 7 30 1 51-15-10-9-18-18-26-29-13-1-26-4-38-8m9-38c-3 9-5 17-7 26 8 2 17 4 25 6-3-5-6-10-9-16-3-5-6-10-9-16m-19-53c-2 1-3 1-5 2-21 10-34 23-34 35 0 13 14 27 39 37 3-12 7-25 12-37-5-12-9-24-12-37m37-10c-8 1-17 3-25 6 2 8 4 16 7 25 3-5 6-11 9-16zm-3-61c-4-1-8 0-12 2-10 7-15 24-13 47 0 2 0 3 1 5 12-4 25-6 38-8 8-10 16-20 26-29-15-11-29-17-40-17m111 2c-4-2-8-3-12-2-11 0-25 5-40 17 10 9 19 19 26 29 13 2 26 4 39 8v-5c3-23-2-40-13-47m-61 23c-7 6-13 13-19 19h37c-6-6-12-13-18-19"/><mask id="a"><path fill="#fff" d="m235 85-133 27 28 133 133-27Z"/></mask><path fill="#ff40e0" d="m137 130 76 11c8 1 9 11 3 15l-28 16-4 32c-1 8-10 10-14 4l-41-66c-3-6 1-13 8-12" mask="url(#a)"/></svg>`)}`;console.log(`%cReact Grab${` v${t}`}%c\nhttps://react-grab.com`,`background: #330039; color: #ffffff; border: 1px solid #d75fcb; padding: 4px 4px 4px 24px; border-radius: 4px; background-image: url("${n}"); background-size: 16px 16px; background-repeat: no-repeat; background-position: 4px center; display: inline-block; margin-bottom: 4px;`,``),e&&navigator.onLine&&!oZ()&&fetch(`https://www.react-grab.com/api/version?source=browser&v=${t}&t=${Date.now()}`,{referrerPolicy:`origin`,keepalive:!0,priority:`low`,cache:`no-store`}).then(e=>e.text()).then(e=>{e&&e!==t&&console.warn(`[React Grab] v${t} is outdated (latest: v${e}). Run \`npx grab@latest upgrade\` to upgrade.`)}).catch(()=>null)}catch{}},cZ=e=>typeof e==`object`&&!!e,lZ=e=>{if(!cZ(e))return null;let t={};return typeof e.enabled==`boolean`&&(t.enabled=e.enabled),(e.activationMode===`toggle`||e.activationMode===`hold`)&&(t.activationMode=e.activationMode),typeof e.keyHoldDuration==`number`&&Number.isFinite(e.keyHoldDuration)&&(t.keyHoldDuration=e.keyHoldDuration),typeof e.allowActivationInsideInput==`boolean`&&(t.allowActivationInsideInput=e.allowActivationInsideInput),typeof e.activationKey==`string`&&(t.activationKey=e.activationKey),typeof e.maxContextLines==`number`&&Number.isFinite(e.maxContextLines)&&(t.maxContextLines=e.maxContextLines),typeof e.freezeReactUpdates==`boolean`&&(t.freezeReactUpdates=e.freezeReactUpdates),typeof e.telemetry==`boolean`&&(t.telemetry=e.telemetry),Object.keys(t).length===0?null:t},uZ=()=>{if(typeof window>`u`)return null;try{let e=(document.currentScript instanceof HTMLScriptElement?document.currentScript:null)?.getAttribute(`data-options`);return e?lZ(JSON.parse(e)):null}catch{return null}},dZ=e=>e===`Enter`||e===`NumpadEnter`,fZ=(e,t)=>e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height,pZ=(e=>({name:e.name,setup:(t,n)=>({actions:[typeof e.contextMenuAction==`function`?e.contextMenuAction(t,n):e.contextMenuAction],cleanup:e.cleanup})}))({name:`copy`,contextMenuAction:{id:`copy`,label:`Copy`,shortcut:`C`,showInToolbarMenu:!0,onAction:e=>{e.copy?.()}}}),mZ={name:`comment`,setup:()=>({actions:[{id:`comment`,label:`Comment`,shortcut:`Enter`,shortcutModifier:!1,showInToolbarMenu:!0,onAction:e=>{e.enterPromptMode?.()}}]})},hZ={name:`edit`,setup:()=>({actions:[{id:`edit`,label:`Style`,shortcut:`S`,shortcutModifier:!1,showInToolbarMenu:!0,onAction:e=>{e.enterEditMode?.()}}]})},gZ={name:`open`,actions:[{id:`open`,label:`Open`,shortcut:`O`,enabled:e=>!!e.filePath,onAction:e=>{e.filePath&&(e.hooks.onOpenFile(e.filePath,e.lineNumber)||jI(e.filePath,e.lineNumber,e.hooks.transformOpenFileUrl),e.hideContextMenu(),e.cleanup())}}]},_Z=e=>{let t=e.left+e.width/2,n=e.top+e.height/2,r=n,i=window.innerHeight-n,a=t,o=window.innerWidth-t,s=Math.min(r,i,a,o);return s===r?`top`:s===a?`left`:s===o?`right`:`bottom`},vZ=()=>{let[e,t]=J(!1),[n,r]=J(null),i=BV(),a=()=>{let e=n();return nB(e)?e:null},o=()=>{r(null),i.clear(),t(!1)};return{selectedElement:a,isPendingDismiss:e,select:(e,n)=>{r(e),t(!1),n?.shouldPromptBeforeMouseHandoff?i.arm():i.clear()},clear:o,consumeMouseHandoff:()=>i.consume()&&a()!==null,showDismissPrompt:()=>a()?e()?!1:(t(!0),!0):(o(),!1),takeSelection:e=>{let t=a()??(nB(e)?e:null);return o(),t}}},yZ=async(e,t={})=>(await Promise.allSettled(e.map(e=>XU(e,t)))).map(e=>e.status===`fulfilled`?e.value:``),bZ=[pZ,hZ,mZ,gZ],xZ=!1,SZ=new Set,CZ=e=>{if(typeof window>`u`)return SY();let t={enabled:!0,activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,...uZ(),...e};if(t.enabled===!1||xZ)return SY();xZ=!0,jM(t.container??null),sZ(t.telemetry!==!1);let{enabled:n,telemetry:r,container:i,...a}=t;return dR(e=>{let t=!1,n,r=XX(a),{store:i,actions:o,pointer:s,viewportVersion:c,current:l}=QJ({keyHoldDuration:r.store.options.keyHoldDuration??100}),u=Y(()=>l().state===`holding`),d=Y(()=>l().state===`active`),f=Y(()=>{let e=l();return e.state===`active`&&e.phase===`frozen`}),p=Y(()=>{let e=l();return e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)}),m=Y(()=>{if(!p())return!1;let e=Math.abs(s().x+window.scrollX-i.dragStart.x),t=Math.abs(s().y+window.scrollY-i.dragStart.y);return e>2||t>2}),h=Y(()=>{let e=l();return e.state===`active`&&e.phase===`dragging-reposition`}),g=Y(()=>{let e=l();return e.state===`active`&&e.phase===`justDragged`}),_=Y(()=>l().state===`copying`),v=Y(()=>i.selectionInteractionLockDepth>0),y=Y(()=>l().state===`justCopied`),b=Y(()=>{let e=l();return e.state===`active`&&!!e.isPromptMode}),x=Y(()=>i.pendingCommentMode||b()),S=Y(()=>{let e=l();return e.state===`active`&&!!e.isPromptMode&&!!e.isPendingDismiss}),C=(e,t)=>{document.body.style[e]=t};mR(yR(d,(e,t)=>{e&&!t?(AL(s().x,s().y),C(`touchAction`,`none`)):!e&&t&&(jL(),C(`touchAction`,``))}));let w=PV(),[T,E]=J(!w||!w.collapsed),[D,O]=J(0),[k,ee]=J(0),[te,A]=J(w),[ne,re]=J(!1),ie=IV(e=>e.shiftKey),[ae,oe]=J(null),[se,ce]=J(null),[le,ue]=J(null),de=KX({store:i,actions:o,isActivated:d,activateRenderer:()=>Gt(),deactivateRenderer:()=>Kt(),performCopyWithLabel:e=>dt(e),onOpen:()=>{kr(),ge?.(),ge=Or(Dr,ce)},onClose:()=>{ge?.(),ge=null,ce(null)}}),fe=Y(()=>i.contextMenuPosition!==null||de.isOpen()),pe=Y(()=>fe()||ae()!==null),me,he=null,ge=null,_e=!1,ve=new WeakMap,ye=vZ(),be=()=>!T()||b()||v()||fe()||ye.isPendingDismiss(),xe=()=>{ve=new WeakMap},Se=()=>{Le(!1),xe()},Ce=e=>{let t=te()??PV(),n={edge:t?.edge??`bottom`,ratio:t?.ratio??.5,collapsed:t?.collapsed??!1,enabled:t?.enabled??!0,defaultAction:t?.defaultAction??`copy`,...e};FV(n),A(n);for(let e of SZ)e(n)},we=()=>{Fe.timerId!==null&&(clearTimeout(Fe.timerId),Fe.timerId=null)},Te=()=>{Fe.copyWaiting=!1,Fe.holdTimerFired=!1,Fe.startTimestamp=null};mR(()=>{if(l().state!==`holding`){we();return}Fe.startTimestamp=Date.now(),Fe.timerId=window.setTimeout(()=>{if(Fe.timerId=null,Fe.copyWaiting){Fe.holdTimerFired=!0;return}o.activate()},i.keyHoldDuration),xR(we)}),mR(()=>{let e=l();if(e.state!==`active`||e.phase!==`justDragged`)return;let t=setTimeout(()=>{o.finishJustDragged()},BM);xR(()=>clearTimeout(t))}),mR(()=>{if(l().state!==`justCopied`)return;let e=setTimeout(()=>{o.finishJustCopied()},BM);xR(()=>clearTimeout(e))}),mR(yR(u,(e,t=!1)=>{!t||e||!d()||(r.store.options.activationMode!==`hold`&&o.setWasActivatedByToggle(!0),r.hooks.onActivate())}));let Ee=(e,t,n)=>{Oe(e,t,n),o.clearInputText()},De=()=>{let e=i.frozenElement||pt();e&&o.enterPromptMode({x:s().x,y:s().y},e)},Oe=(e,t,n)=>{o.setCopyStart({x:t,y:n},e)},ke={lastDetectionTimestamp:0,pendingDetectionScheduledAt:0,latestPointerX:0,latestPointerY:0},Ae=null,[je,Me]=J(null),Ne=(e,t)=>{Ae!==null&&clearTimeout(Ae),Me(null),Ae=window.setTimeout(()=>{Me({x:e,y:t}),Ae=null},32)},Pe=null,Fe={timerId:null,startTimestamp:null,copyWaiting:!1,holdTimerFired:!1},Ie=null,[j,Le]=J(!1),Re=0,ze=!1,Be=null,Ve=()=>{ze=!0,Be!==null&&window.clearTimeout(Be),Be=window.setTimeout(()=>{ze=!1,Be=null},BM)},He=()=>{Be!==null&&(window.clearTimeout(Be),Be=null),ze=!1},Ue=0,We=null,Ge=null,[M,Ke]=J(!1),[qe,Je]=J(null),[Ye,Xe]=J(null),[Ze,Qe]=nY(Ye),$e=Y(()=>de.isOpen()?mN:x()?pN:M()?qe():d()?fN:null),et=e=>KY(e,dI),tt=tZ(dI,et,YJ),nt=aZ(s,()=>p(),e=>{if(h()){if(o.shiftDragStart(e),Ie){Ie={x:Ie.x+e.x,y:Ie.y+e.y};return}let{pageX:t,pageY:n}=Et(s().x,s().y);Ie={x:t,y:n}}}),N=Y(()=>d()&&!_()),rt=new Map,it=(e,t)=>{let n=ZX(`grabbed`),i={id:n,bounds:e,createdAt:Date.now(),element:t};o.addGrabbedBox(i),r.hooks.onGrabbedBox(e,t);let a=window.setTimeout(()=>{rt.delete(n),o.removeGrabbedBox(n)},BM+125);rt.set(n,a)},at=async e=>{let t=await Promise.all(e.map(async e=>{let t=await FU(e),n=t?.componentName??null,r=t?.filePath,i=t?.lineNumber??void 0,a=t?.columnNumber??void 0;n||=IU(e);let o=e instanceof HTMLElement?e.innerText?.slice(0,100):void 0;return{tagName:NN(e),id:e.id||void 0,className:e.getAttribute(`class`)||void 0,textContent:o,componentName:n??void 0,filePath:r,lineNumber:i,columnNumber:a}}));window.dispatchEvent(new CustomEvent(`react-grab:element-selected`,{detail:{elements:t}}))},ot=$X(o,()=>i.labelInstances),st=async(e,t,n)=>{He(),l().state!==`copying`&&o.startCopy();let r=!1,i;try{r=await e(),r||(i=`Failed to copy`)}catch(e){i=wY(e,`Action failed`)}if(t)for(let e of t)ot.updateAfterCopy(e,r,i);l().state===`copying`&&(r&&o.completeCopy(),n?Kt():r?(o.activate(),Ve()):o.unfreeze())},ct=(e,t,n)=>{let i=e[0],a=n??(i?IU(i):null),o=i?NN(i):null,s=a??o??void 0;return AY({getContent:r.store.options.getContent,componentName:s,maxContextLines:r.store.options.maxContextLines},r.hooks,e,t)},lt=async(e,t,n)=>{if(e.length===0)return!1;let i=[],a=[];for(let t of e){let{wasIntercepted:e,pendingResult:n}=r.hooks.onElementSelect(t);e||i.push(t),n&&a.push(n),r.store.theme.grabbedBoxes.enabled&&it(YJ(t),t)}await $F();let o=!0;if(i.length>0&&(o=await ct(i,t,n)),a.length>0&&!(await Promise.all(a)).every(Boolean))throw new KV;return at(e),o},ut=e=>{OU(e.primaryElement).then(async t=>{await st(()=>lt(e.targetElements,e.extraPrompt,t??void 0),e.labelInstanceIds.length>0?e.labelInstanceIds:null,e.shouldDeactivateAfter),e.onComplete?.()}).catch(t=>{let n=wY(t,`Action failed`);for(let t of e.labelInstanceIds)ot.updateAfterCopy(t,!1,n);l().state===`copying`&&o.unfreeze()})},dt=e=>{let{element:t,cursorX:n,selectedElements:r,extraPrompt:a,shouldDeactivateAfter:s,onComplete:c,dragRect:l}=e,u=r??[t],d=l??i.frozenDragRect,f=u.length>1,p=!f&&t===yt()?Tt():void 0,m=d&&f?BY(d):p??YJ(t),h=f?m.x+m.width/2:n,g=NN(t);He(),o.startCopy();let _=g?ot.createInstance(m,g,void 0,`copying`,{element:t,mouseX:h,elements:r}):null;ut({primaryElement:t,targetElements:u,labelInstanceIds:_?[_]:[],extraPrompt:a,shouldDeactivateAfter:s,onComplete:c})},ft=e=>{let{elements:t,labelEntries:n,shouldDeactivateAfter:r,onComplete:i}=e,a=t[0];He(),o.startCopy(),ut({primaryElement:a,targetElements:t,labelInstanceIds:ot.createPerElementInstances(n,`copying`),shouldDeactivateAfter:r,onComplete:i})},pt=Y(()=>{if(c(),!N()||m()||v()||ye.isPendingDismiss())return null;let e=i.detectedElement;return nB(e)?e:null}),P=Y(()=>i.frozenElement||(f()?null:pt())),mt=Y(()=>!d()||b()||j()||_()||pe()||ye.isPendingDismiss()?null:ie()?f()?P():pt()??i.frozenElement:ye.selectedElement()),ht=Y(()=>{let e=mt();return e?UY(e,dI,et):[]}),gt=Y(()=>{let e=mt();return e?Math.max(0,ht().findIndex(t=>t.element===e)):0}),_t=Y(()=>mt()!==null);mR(()=>{let e=i.detectedElement;if(!e)return;let t=setInterval(()=>{nB(e)||o.setDetectedElement(null)},100);xR(()=>clearInterval(t))}),mR(yR(P,e=>{if(We!==null&&(clearTimeout(We),We=null),!e){Xe(null);return}We=window.setTimeout(()=>{We=null,Xe(e)},100)})),xR(()=>{We!==null&&(clearTimeout(We),We=null)}),mR(()=>{let e=i.frozenElements;xR(lL(e))}),mR(yR(d,e=>{e&&r.store.options.freezeReactUpdates&&xR(sR())}));let vt=()=>{if(i.isTouchMode&&p()){let e=i.detectedElement;return!e||tI(e)?void 0:e}let e=P();if(!(!e||tI(e)))return e},yt=Y(()=>vt()),bt=()=>yt()?i.isTouchMode&&p()?N():N()&&!m():!1,xt=KR(()=>i.frozenElements,e=>Y(()=>(c(),YJ(e)))),St=Y(()=>{let e=i.frozenElements;if(e.length===0)return[];let t=i.frozenDragRect;return t&&e.length>1?[BY(t)]:xt().map(e=>e())}),Ct=Y(()=>{if(!j()||i.pendingCommentMode||M())return null;let e=i.detectedElement;return!nB(e)||tI(e)||i.frozenElements.includes(e)?null:e}),wt=Y(()=>{c();let e=Ct();if(e)return YJ(e)}),Tt=Y(()=>{c();let e=i.frozenElements;if(e.length>0){let t=St();if(e.length===1){let e=t[0];if(e)return e}let n=i.frozenDragRect;return n?t[0]??BY(n):HY(tX(t))}let t=yt();if(t)return YJ(t)}),Et=(e,t)=>({pageX:e+window.scrollX,pageY:t+window.scrollY}),Dt=(e,t)=>{let{pageX:n,pageY:r}=Et(e,t);return{x:Math.abs(n-i.dragStart.x),y:Math.abs(r-i.dragStart.y)}},Ot=Y(()=>{if(!p())return!1;let e=Dt(s().x,s().y);return e.x>2||e.y>2}),kt=(e,t)=>{let{pageX:n,pageY:r}=Et(e,t),a=Math.min(i.dragStart.x,n),o=Math.min(i.dragStart.y,r),s=Math.abs(n-i.dragStart.x),c=Math.abs(r-i.dragStart.y);return{x:a-window.scrollX,y:o-window.scrollY,width:s,height:c}},At=e=>e.code===`Space`||e.key===` `,jt=()=>{if(!p())return;o.startDragReposition();let{pageX:e,pageY:t}=Et(s().x,s().y);Ie={x:e,y:t}},Mt=()=>{o.stopDragReposition(),Ie=null},Nt=Y(()=>{if(c(),Ot())return HY(kt(s().x,s().y))}),Pt=Y(()=>{if(c(),!Ot())return[];let e=je();if(!e)return[];let t=kt(e.x,e.y),n=LY(t,dI);return(n.length>0?n:LY(t,dI,!1)).map(e=>YJ(e))}),Ft=Y(()=>{let e=Pt();if(e.length>0)return e;let t=wt();return t?[...St(),t]:St()}),It=KR(()=>i.frozenElements,e=>{let t=NN(e)||`element`,n=IU(e)??void 0;return Y(()=>{if(c(),!nB(e))return null;let r=YJ(e),i=ve.get(e);return{tagName:t,componentName:n,bounds:r,mouseX:i===void 0?void 0:r.x+r.width*i}})}),Lt=Y(()=>{if(b()||i.frozenElements.length<2)return[];let e=[];for(let t of It()){let n=t();n!==null&&e.push(n)}return e}),Rt=Y(()=>{if(b())return null;let e=Ct();return e?(c(),{tagName:NN(e)||`element`,componentName:IU(e)??void 0,bounds:YJ(e),mouseX:s().x}):null}),zt=Y(()=>{if(_()||b()){c();let e=i.frozenElement||pt();return e?{x:XJ(YJ(e)).x+i.copyOffsetFromCenterX,y:i.copyStart.y}:{x:i.copyStart.x,y:i.copyStart.y}}return{x:s().x,y:s().y}}),Bt=Y(()=>{if(!j()||i.frozenElements.length!==1)return;c();let e=i.frozenElements[0];if(!nB(e))return;let t=ve.get(e);if(t===void 0)return;let n=YJ(e);return n.x+n.width*t});mR(yR(()=>[pt(),i.lastGrabbedElement],([e,t])=>{t&&e&&t!==e&&o.setLastGrabbed(null),e&&r.hooks.onElementHover(e)})),mR(yR(()=>pt(),e=>{let t=++Ue,n=()=>{Ue===t&&o.setSelectionSource(null,null)};if(!e){n();return}FU(e).then(e=>{if(Ue===t){if(!e){n();return}o.setSelectionSource(e.filePath,e.lineNumber)}}).catch(()=>{Ue===t&&o.setSelectionSource(null,null)})}));let Vt=Y(()=>i.grabbedBoxes.map(e=>({id:e.id,bounds:e.bounds,createdAt:e.createdAt}))),Ht=Y(()=>i.labelInstances.map(e=>({id:e.id,status:e.status,tagName:e.tagName,componentName:e.componentName,createdAt:e.createdAt})));mR(yR(Y(()=>{let e=d(),t=p(),n=_(),a=b(),o=pt(),s=Nt(),c=r.store.theme.enabled,l=r.store.theme.selectionBox.enabled,u=r.store.theme.dragBox.enabled,f=Ot(),m=P(),h=y();return{isActive:e,isDragging:t,isCopying:n,isPromptMode:a,isSelectionBoxVisible:!!(c&&l&&e&&!n&&!h&&!t&&m!=null),isDragBoxVisible:!!(c&&u&&e&&!n&&f),targetElement:o,dragBounds:s?{x:s.x,y:s.y,width:s.width,height:s.height}:null,grabbedBoxes:[...Vt()],labelInstances:[...Ht()],selectionFilePath:i.selectionFilePath,toolbarState:te()}}),e=>{r.hooks.onStateChange(e)})),mR(yR(()=>{let e=b();return{inputMode:e,position:e?s():vR(s),target:e?pt():vR(pt)}},({inputMode:e,position:t,target:n})=>{r.hooks.onPromptModeChange(e,{x:t.x,y:t.y,targetElement:n})})),mR(yR(()=>[ar(),Tt(),pt()],([e,t,n])=>{r.hooks.onSelectionBox(!!e,t??null,n)})),mR(yR(()=>[fr(),Nt()],([e,t])=>{r.hooks.onDragBox(!!e,t??null)})),mR(yR(()=>{let e=mr();return[e,pr(),e?zt():vR(zt),e?pt():vR(pt),i.selectionFilePath,i.selectionLineNumber]},([e,t,n,i,a,o])=>{r.hooks.onElementLabel(e,t,{x:n.x,y:n.y,content:``,element:i??void 0,tagName:i&&NN(i)||void 0,filePath:a??void 0,lineNumber:o??void 0})}));let Ut=null,Wt=e=>{if(e){if(!Ut){Ut=document.createElement(`style`),Ut.setAttribute(`data-react-grab-cursor`,``);let e=FN();e&&(Ut.nonce=e),LN(Ut),document.head.appendChild(Ut)}Ut.textContent=`* { cursor: ${e} !important; }`}else Ut&&=(Ut.remove(),null)};mR(yR(()=>[d(),_(),b()],([e,t,n])=>{Wt(t?`progress`:e&&!n?`crosshair`:null)}));let Gt=()=>{let e=u();o.activate(),e||r.hooks.onActivate()},Kt=()=>{let e=p(),t=i.previouslyFocusedElement;Mt(),o.deactivate(),de.resetWithDiscard(),kr(),Se(),wn(),ye.clear(),Ke(!1),Je(null),e&&C(`userSelect`,``),Pe&&window.clearTimeout(Pe),nt.stop(),t instanceof HTMLElement&&t!==document.body&&t!==document.activeElement&&nB(t)&&t.focus({preventScroll:!0}),r.hooks.onDeactivate()},qt=()=>{u()&&o.releaseHold(),d()&&Kt(),He()},Jt=()=>{o.setWasActivatedByToggle(!0),Gt()},Yt=()=>{let e=[...i.frozenElements],t=i.frozenElement||pt(),n=b()?i.inputText.trim():``;if(!t){Kt();return}let r=e.length>0?e:[t],a=r.map(e=>YJ(e))[0],{x:s,y:c}=XJ(a),l=s+i.copyOffsetFromCenterX;o.setPointer({x:s,y:c}),o.exitPromptMode(),o.clearInputText(),dt({element:t,cursorX:l,selectedElements:r,extraPrompt:n||void 0,shouldDeactivateAfter:!0})},Xt=()=>{if(b()){if(S()){o.clearInputText(),Kt();return}o.setPendingDismiss(!0),ee(e=>e+1)}},Zt=()=>{if(ye.isPendingDismiss()){Dn();return}o.clearInputText(),Kt()},Qt=()=>{o.setPendingDismiss(!1)},$t=()=>{if(de.isOpen()){de.dismiss();return}let e=i.frozenElement||pt();e&&en(e,{x:s().x,y:s().y})},en=(e,t,n={})=>de.trigger(e,t,n),tn=(e,t)=>{if(!de.isOpen()||i.contextMenuPosition!==null)return!1;let n=DI(e,t).find(dI);if(!n)return!1;let r=de.switchToElement(n,{x:e,y:t});return r&&sL([n]),r},nn=e=>({filePath:i.selectionFilePath??void 0,lineNumber:i.selectionLineNumber??void 0,componentName:Ze(),tagName:NN(e)||void 0}),rn=()=>{Ge=null,Ke(!1),o.setPendingCommentMode(!1),Je(null)},an=e=>{let t=i.frozenElement||pt();if(!t)return!1;let n={x:s().x,y:s().y},a=r.store.actions.find(t=>t.id===e);return a?e===`edit`?en(t,n,nn(t))?(o.clearInputText(),o.exitPromptMode(),rn(),!0):!0:(o.clearInputText(),o.exitPromptMode(),rn(),a.onAction(Nn(t,n)),!0):(o.clearInputText(),o.exitPromptMode(),rn(),Mr(fN),ln(t,n),!0)},on=e=>{if(d()){if($e()!==e&&b()&&an(e))return;if($e()!==e&&i.pendingCommentMode){o.setPendingCommentMode(!1),Ge=e,Je(e),Ke(!0);return}if($e()!==e&&M()){Ge=e,Je(e);return}Kt();return}T()&&(Ge=e,Je(e),Ke(!0),Jt())},sn=()=>{on(te()?.defaultAction??`copy`)},cn=(e,t,n)=>{rn(),o.clearInputText(),o.enterPromptMode({x:t,y:n},e)},ln=(e,t)=>{Se(),Ar(),o.showContextMenu(t,e),wn(),r.hooks.onContextMenu(e,t)},un=(e,t)=>{let n=Ge;if(Ge=null,Je(null),!n)return;if(n===`edit`){en(e,t,nn(e));return}let i=r.store.actions.find(e=>e.id===n);if(!i){Mr(fN),ln(e,t);return}i.onAction(Nn(e,t))},dn=()=>{if(T()){if(d()&&x()){Kt();return}o.setPendingCommentMode(!0),d()||Jt()}},fn=(e,t,n)=>{let r=n&&j()&&!p()&&!i.pendingCommentMode&&!M();if(be()||f()&&!r)return;if(o.setPointer({x:e,y:t}),ke.latestPointerX=e,ke.latestPointerY=t,r){let n=OI(e,t);n!==i.detectedElement&&o.setDetectedElement(n);return}let a=performance.now(),s=ke.pendingDetectionScheduledAt>0&&a-ke.pendingDetectionScheduledAt<200;if(a-ke.lastDetectionTimestamp>=32&&!s&&(ke.lastDetectionTimestamp=a,ke.pendingDetectionScheduledAt=a,setTimeout(()=>{if(be()){ke.pendingDetectionScheduledAt=0;return}let e=OI(ke.latestPointerX,ke.latestPointerY);e!==i.detectedElement&&o.setDetectedElement(e),ke.pendingDetectionScheduledAt=0})),p()){if(h()){let{pageX:n,pageY:r}=Et(e,t);Ie&&o.shiftDragStart({x:n-Ie.x,y:r-Ie.y}),Ie={x:n,y:r}}Ne(e,t);let n=iZ(e,t),r=n.top||n.bottom||n.left||n.right;r&&!nt.isActive()?nt.start():!r&&nt.isActive()&&nt.stop()}},pn=(e,t,n)=>{if(!N()||v())return!1;!n&&j()&&Se();let i=ye.selectedElement()!==null;return o.startDrag({x:e,y:t},n||i),o.setPointer({x:e,y:t}),C(`userSelect`,`none`),Ne(e,t),r.hooks.onDragStart(e+window.scrollX,t+window.scrollY),!0},mn=(e,t)=>{let n=i.frozenElements.includes(e),r=i.frozenElements.length===0;if(!n){let n=RY(YJ(e),t);ve.set(e,n),r&&Qe(IU(e)??void 0)}o.toggleFrozenElement(e),kI();let a=i.frozenElements.includes(e);if(a||ve.delete(e),i.frozenElements.length===0){Se(),o.unfreeze();return}sL(i.frozenElements),Le(!0),o.setPointer(t),o.setLastGrabbed(a?e:i.frozenElements[i.frozenElements.length-1]),o.freeze(),wn()},hn=()=>{let e=i.frozenElements.filter(nB),t=e.map(e=>{let t=NN(e)||`element`,n=IU(e)??void 0,r=ve.get(e),i=YJ(e);return{element:e,tagName:t,componentName:n,mouseX:r===void 0?i.x+i.width/2:i.x+i.width*r}});if(Se(),e.length===0){o.unfreeze();return}if(e.length===1){dt({element:e[0],cursorX:t[0].mouseX,selectedElements:e,shouldDeactivateAfter:i.wasActivatedByToggle});return}ft({elements:e,labelEntries:t,shouldDeactivateAfter:i.wasActivatedByToggle})},gn=(e,t,n)=>{let a=LY(e,dI),s=a.length>0?a:LY(e,dI,!1);if(s.length===0)return;let c=n&&!i.pendingCommentMode&&!M();if(c&&o.addFrozenElements(s),sL(c?i.frozenElements:s),r.hooks.onDragEnd(s,e),c){let e=s[s.length-1];Le(!0),kI(),o.setPointer(XJ(YJ(e))),o.setLastGrabbed(e),o.freeze(),wn();return}let l=s[0],u=XJ(YJ(l));o.setPointer(u),o.setFrozenElements(s);let d=VY(e);if(o.setFrozenDragRect(d),o.freeze(),o.setLastGrabbed(l),i.pendingCommentMode){cn(l,u.x,u.y);return}if(M()){Ke(!1),Ge?un(l,u):ln(l,u);return}let f=i.wasActivatedByToggle&&!t;dt({element:l,cursorX:u.x,selectedElements:s,shouldDeactivateAfter:f,dragRect:d})},_n=e=>{for(let t of i.frozenElements)if(nB(t)&&fZ(e,YJ(t)))return t;return null},vn=(e,t,n,a)=>{let c=nB(i.frozenElement)?i.frozenElement:null,l=ye.selectedElement(),u=()=>DI(e,t).find(dI)??null;if(a&&!i.pendingCommentMode&&!M()){let n=u();n!==null&&mn(n,{x:e,y:t});return}let d=u()??(nB(i.detectedElement)?i.detectedElement:null),f=l??d??c;if(!f)return;let p,m,h=d===null&&c===f,g=l===f;if(h)p=s().x,m=s().y;else if(g){let e=XJ(YJ(f));p=e.x,m=e.y}else p=e,m=t;if(i.pendingCommentMode){cn(f,p,m),ye.clear();return}if(M()){Ke(!1);let{wasIntercepted:e}=r.hooks.onElementSelect(f);if(e)return;ye.clear(),sL([f]),o.setFrozenElement(f);let t={x:p,y:m};o.setPointer(t),o.freeze(),Ge?un(f,t):ln(f,t);return}let _=i.wasActivatedByToggle&&!n;o.setLastGrabbed(f),dt({element:f,cursorX:p,shouldDeactivateAfter:_}),ye.clear()},yn=()=>{p()&&(Mt(),o.cancelDrag(),nt.stop(),C(`userSelect`,``))},bn=(e,t,n,r)=>{if(!p())return;Ae!==null&&(clearTimeout(Ae),Ae=null),Me(null);let i=Dt(e,t),a=i.x>2||i.y>2,s=a?kt(e,t):null;a?o.endDrag():o.cancelDrag(),Mt(),nt.stop(),C(`userSelect`,``),s?gn(s,n,r):vn(e,t,n,r)},xn=CY(),Sn=rZ(),Cn=e=>{let t;try{t=Sn.originalKeyDescriptor?.get?Sn.originalKeyDescriptor.get.call(e):e.key}catch{return!1}let n=t===`Enter`||dZ(e.code),r=d()||u();return n&&r&&!b()&&!ye.isPendingDismiss()&&!i.wasActivatedByToggle?jB(e,`data-react-grab-input`)?!1:(Sn.claimedEvents.add(e),e.preventDefault(),e.stopImmediatePropagation(),!0):!1};xn.addDocumentListener(`keydown`,PM(Cn),{capture:!0}),xn.addDocumentListener(`keyup`,PM(Cn),{capture:!0}),xn.addDocumentListener(`keypress`,PM(Cn),{capture:!0});let wn=()=>{tt.clearHistory(),ye.clear()},Tn=(e,t=!1)=>{o.setFrozenElement(e),o.freeze(),ye.select(e,{shouldPromptBeforeMouseHandoff:t});let n=XJ(YJ(e));o.setPointer(n),i.contextMenuPosition!==null&&o.showContextMenu(n,e)},En=()=>{ye.showDismissPrompt()&&ee(e=>e+1)},Dn=()=>{ye.clear(),o.unfreeze(),wn()},On=()=>{let e=ye.takeSelection(i.frozenElement);if(!e){Dn();return}let t=XJ(YJ(e));wn(),o.setLastGrabbed(e),dt({element:e,cursorX:t.x,shouldDeactivateAfter:i.wasActivatedByToggle})},kn=e=>sN.has(e.key)?e.key:e.key===`Tab`?e.shiftKey?`ArrowLeft`:`ArrowRight`:null,An=(e,t={})=>{if(!d()||b()||j()||ye.isPendingDismiss()&&!t.allowPendingKeyboardSelection)return!1;let n=kn(e);if(!n||pe())return!1;let r=P(),i=!r;if(!r){let e=MM()?.getBoundingClientRect();r=e?OI(e.left+e.width/2,e.top+e.height/2):OI(window.innerWidth/2,window.innerHeight/2)}if(!r)return!1;let a=n===`ArrowUp`||n===`ArrowDown`,o=tt.findNext(n,r);if(!o&&!a&&!i)return!1;let s=o??r;return e.preventDefault(),e.stopPropagation(),Tn(s,!0),!0},jn=e=>e.metaKey||e.ctrlKey||e.altKey||e.repeat||aB(e)||!d()||_()||v()||pe()?null:i.frozenElement||pt(),Mn=e=>{let t=jn(e);if(!t)return null;let n=zV(r.store.actions,e);return n?{element:t,action:n}:null},Nn=(e,t)=>{let n=YJ(e);return Cr({element:e,filePath:i.selectionFilePath??void 0,lineNumber:i.selectionLineNumber??void 0,tagName:NN(e)||void 0,componentName:Ze(),position:t,shouldDeferHideContextMenu:!1,performWithFeedbackOptions:{fallbackBounds:n,fallbackSelectionBounds:[n],position:t}})},Pn=/^[a-zA-Z0-9-]$/,Fn=e=>{if(!e.key||e.key.length!==1||!Pn.test(e.key))return!1;let t=jn(e);return!t||!de.trigger(t,{x:s().x,y:s().y},{initialSearchQuery:e.key})?!1:(rn(),e.preventDefault(),e.stopImmediatePropagation(),!0)},In=e=>{let t=Mn(e);if(!t)return!1;let{element:n,action:r}=t;if(b())return an(r.id)?(e.preventDefault(),e.stopImmediatePropagation(),!0):!1;let i={x:s().x,y:s().y};return r.onAction(Nn(n,i)),e.preventDefault(),e.stopImmediatePropagation(),!0},Ln=e=>{if(e.key?.toLowerCase()!==`o`||!d()||!(e.metaKey||e.ctrlKey))return!1;let t=i.selectionFilePath,n=i.selectionLineNumber;return t?(e.preventDefault(),e.stopPropagation(),r.hooks.onOpenFile(t,n??void 0)||jI(t,n??void 0,r.hooks.transformOpenFileUrl),!0):!1},Rn=e=>{if(!d()||_()||i.contextMenuPosition!==null||de.isOpen())return!1;let t=e.key===`F10`&&e.shiftKey,n=e.key===`ContextMenu`;if(!t&&!n)return!1;let r=i.frozenElements,a=r.length>1,s=(a?r[0]:null)||i.frozenElement||pt();if(!s)return!1;e.preventDefault(),e.stopPropagation();let c=XJ(YJ(s));return a?sL(r):(sL([s]),o.setFrozenElement(s)),o.setPointer(c),o.freeze(),ln(s,c),!0},zn=Y(()=>ht().map(e=>({tagName:NN(e.element)||`element`,componentName:IU(e.element)??void 0,depth:e.depth,isLast:e.isLast}))),Bn=Y(()=>({items:zn(),activeIndex:gt()})),Vn=e=>{if(!(!r.store.options.allowActivationInsideInput&&aB(e))&&!(!eX(e,r.store.options)&&((e.metaKey||e.ctrlKey)&&!oN.includes(e.key)&&!dZ(e.code)&&(d()&&!i.wasActivatedByToggle?Kt():u()&&(we(),Te(),o.releaseHold())),!dZ(e.code)||!u()))){if((d()||u())&&!b()&&(e.preventDefault(),dZ(e.code)&&e.stopImmediatePropagation()),d()){if(i.wasActivatedByToggle&&r.store.options.activationMode!==`hold`||e.repeat)return;Pe!==null&&window.clearTimeout(Pe),Pe=window.setTimeout(()=>{Kt()},200);return}if(u()&&e.repeat){if(Fe.copyWaiting){let e=Fe.holdTimerFired;Te(),e&&o.activate()}return}if(!(_()||y())&&!u()){let t=r.store.options.keyHoldDuration??100;aB(e)?oB(e)?t+=600:t+=400:sB()&&(t+=600),Te(),o.startHold(t)}}},Hn=e=>{if(!ye.isPendingDismiss())return!1;if(dZ(e.code))return!0;let t=sN.has(e.key),n=Mn(e)!==null;return!t&&!n?!1:t?An(e,{allowPendingKeyboardSelection:!0}):In(e)?(wn(),!0):!1};xn.addWindowListener(`keydown`,PM(e=>{if(kn(e)&&aB(e)||Hn(e))return;if(Cn(e),!T()){eX(e,r.store.options)&&!e.repeat&&O(e=>e+1);return}let t=dZ(e.code)&&u()&&!b(),n=jB(e,uN);if(b()&&eX(e,r.store.options)&&!e.repeat&&!n){e.preventDefault(),e.stopPropagation(),Xt();return}if(e.key===`Escape`&&pe()){ae()!==null&&kr();return}let a=jB(e,`data-react-grab-ignore-events`)&&!t;if(b()||a)return b()&&!n&&In(e)||(e.key===`Escape`&&(b()?Xt():i.wasActivatedByToggle&&Kt()),a&&sN.has(e.key)&&An(e)),void 0;if(p()&&At(e)){e.repeat||jt(),e.preventDefault(),e.stopPropagation();return}if(e.key===`Escape`&&(u()||i.wasActivatedByToggle)){Kt();return}d()&&!oN.includes(e.key)&&e.preventDefault();let o=Date.now()-Re<200;An(e)||Ln(e)||Rn(e)||In(e)||Fn(e)||o||Vn(e)}),{capture:!0}),xn.addWindowListener(`keyup`,PM(e=>{if(Cn(e))return;if(At(e)&&h()&&(Mt(),e.preventDefault(),e.stopPropagation()),e.key===`Shift`&&j()){p()&&yn(),hn();return}if(jB(e,`data-react-grab-ignore-events`))return;let t=nZ(r.store.options),n=t.metaKey||t.ctrlKey?AB()?!e.metaKey:!e.ctrlKey:t.shiftKey&&!e.shiftKey||t.altKey&&!e.altKey,a=r.store.options.activationKey?typeof r.store.options.activationKey==`function`?r.store.options.activationKey(e):QY(r.store.options.activationKey)(e):JY(e.key,e.code);if(y()||ze){(a||n)&&(He(),Kt());return}if(!u()&&!d()||b())return;let s=!!r.store.options.activationKey,c=r.store.options.activationMode===`hold`,l=p();if(d()){let e=fe();if(n){if(i.wasActivatedByToggle&&r.store.options.activationMode!==`hold`||e)return;Kt()}else if(c&&a){if(Pe!==null&&(window.clearTimeout(Pe),Pe=null),e||l)return;Kt()}else!s&&a&&Pe!==null&&(window.clearTimeout(Pe),Pe=null);return}if(a||n){if(i.wasActivatedByToggle&&r.store.options.activationMode!==`hold`)return;if(u()||Fe.holdTimerFired&&n){we();let t=(Fe.startTimestamp?Date.now()-Fe.startTimestamp:0)>=200,n=Fe.holdTimerFired&&t&&(r.store.options.allowActivationInsideInput||!aB(e));Te(),n?o.activate():o.releaseHold()}else Kt()}}),{capture:!0}),xn.addDocumentListener(`copy`,()=>{u()&&(Fe.copyWaiting=!0)}),xn.addWindowListener(`keypress`,PM(Cn),{capture:!0}),xn.addWindowListener(`pointermove`,PM(e=>{if(!e.isPrimary)return;let t=e.pointerType===`touch`;if(o.setTouchMode(t),!jB(e,`data-react-grab-ignore-events`)&&!be()&&!(t&&!u()&&!d())){if((t?u():d())&&!b()&&f()&&!e.shiftKey&&!j()){if(ye.consumeMouseHandoff()){En();return}o.unfreeze(),wn()}fn(e.clientX,e.clientY,e.shiftKey)}}),{passive:!0}),xn.addWindowListener(`pointerdown`,PM(e=>{if(e.button===0&&e.isPrimary&&(o.setTouchMode(e.pointerType===`touch`),_e=!1,!jB(e,`data-react-grab-ignore-events`))){if(fe()){tn(e.clientX,e.clientY)&&(_e=!0,e.preventDefault(),e.stopImmediatePropagation());return}if(b()){let t=Tt();t&&e.clientX>=t.x&&e.clientX<=t.x+t.width&&e.clientY>=t.y&&e.clientY<=t.y+t.height?Yt():Xt();return}if(ye.isPendingDismiss()){e.preventDefault(),e.stopImmediatePropagation();return}if(v()){e.preventDefault(),e.stopImmediatePropagation();return}pn(e.clientX,e.clientY,e.shiftKey)&&(e.pointerId!==void 0&&document.documentElement.setPointerCapture(e.pointerId),e.preventDefault(),e.stopImmediatePropagation())}}),{capture:!0}),xn.addWindowListener(`pointerup`,PM(e=>{if(e.button!==0||!e.isPrimary||jB(e,`data-react-grab-ignore-events`)||fe())return;let t=N()||v()||p(),n=e.metaKey||e.ctrlKey;bn(e.clientX,e.clientY,n,e.shiftKey),t&&(e.preventDefault(),e.stopImmediatePropagation())}),{capture:!0}),xn.addWindowListener(`contextmenu`,PM(e=>{if(!N()||_()||b()||de.isOpen())return;let t=jB(e,`data-react-grab-ignore-events`),n={x:e.clientX,y:e.clientY},r=t&&i.frozenElements.length>1?_n(n):null,a=ye.isPendingDismiss();if(t&&!r&&!a&&!_t())return;if(fe()){e.preventDefault();return}e.preventDefault(),e.stopPropagation();let s=r??OI(e.clientX,e.clientY);if(!s)return;let c=i.frozenElements;c.length>1&&c.includes(s)?sL(c):(sL([s]),o.setFrozenElement(s)),o.setPointer(n),o.freeze(),ln(s,n)}),{capture:!0}),xn.addWindowListener(`pointercancel`,PM(e=>{e.isPrimary&&yn()})),xn.addWindowListener(`click`,PM(e=>{if(!jB(e,`data-react-grab-ignore-events`)){if(_e){_e=!1,e.preventDefault(),e.stopImmediatePropagation();return}fe()||(N()||g())&&(e.preventDefault(),e.stopImmediatePropagation(),i.wasActivatedByToggle&&!b()&&!e.shiftKey&&(u()?o.setWasActivatedByToggle(!1):Kt()))}}),{capture:!0}),xn.addDocumentListener(`visibilitychange`,()=>{if(document.hidden){o.clearGrabbedBoxes();let e=i.activationTimestamp;d()&&!b()&&e!==null&&Date.now()-e>500&&Kt()}}),xn.addWindowListener(`blur`,()=>{yn(),u()&&(we(),o.releaseHold(),Te()),Se()}),xn.addWindowListener(`focus`,()=>{Re=Date.now()}),xn.addWindowListener(`focusin`,e=>{jB(e,FM)&&e.stopPropagation()},{capture:!0});let Un=()=>{if(!(i.isTouchMode&&!u()&&!d())&&!be()&&!f()&&!p()&&i.frozenElements.length===0){let e=OI(s().x,s().y);o.setDetectedElement(e)}},Wn=null,Gn=null,Kn=()=>{zY(),Un(),o.incrementViewportVersion(),o.updateContextMenuPosition()};xn.addWindowListener(`scroll`,Kn,{capture:!0});let qn=window.innerWidth,Jn=window.innerHeight;xn.addWindowListener(`resize`,()=>{let e=window.innerWidth,t=window.innerHeight;if(qn>0&&Jn>0){let n=e/qn,r=t/Jn,i=Math.abs(n-r)<gN,a=Math.abs(n-1)>gN;i&&a&&o.setPointer({x:s().x*n,y:s().y*r})}qn=e,Jn=t,Kn()});let Yn=window.visualViewport;if(Yn){let{signal:e}=xn;Yn.addEventListener(`resize`,Kn,{signal:e}),Yn.addEventListener(`scroll`,Kn,{signal:e})}let Xn=()=>{Gn===null&&(Gn=ZF(()=>{Gn=null,o.incrementViewportVersion()}))};mR(()=>{if(r.store.theme.enabled&&(d()||_()||i.labelInstances.length>0||i.grabbedBoxes.length>0)){if(Wn!==null)return;Wn=window.setInterval(()=>{Xn()},100);return}Wn!==null&&(window.clearInterval(Wn),Wn=null),Gn!==null&&(QF(Gn),Gn=null)}),xR(()=>{Wn!==null&&window.clearInterval(Wn),Gn!==null&&QF(Gn)}),xn.addDocumentListener(`copy`,PM(e=>{b()||jB(e,`data-react-grab-ignore-events`)||N()&&e.preventDefault()}),{capture:!0}),xR(()=>{xn.abort(),Ae!==null&&window.clearTimeout(Ae),Pe&&window.clearTimeout(Pe),He(),he?.(),he=null,ge?.(),ge=null,rt.forEach(e=>window.clearTimeout(e)),rt.clear(),ot.cancelAllFades(),nt.stop(),C(`userSelect`,``),C(`touchAction`,``),Wt(null),Sn.restore(),jM(null)});let{root:Zn,host:Qn}=tY(LJ);xR(bY(Qn).cleanup);let $n=Y(()=>r.store.theme.enabled),er=Y(()=>r.store.theme.selectionBox.enabled),tr=Y(()=>r.store.theme.elementLabel.enabled),nr=Y(()=>r.store.theme.dragBox.enabled),rr=Y(()=>y()||ne()&&!f()||de.isInteracting()),ir=Y(()=>Pt().length>0),ar=Y(()=>!$n()||!er()||rr()?!1:ir()?!0:bt()),or=Y(()=>{let e=yt();if(e)return NN(e)||void 0}),sr=Y(()=>!$n()||fe()||!tr()||rr()?!1:bt()),cr=new Map,lr=e=>{let t=e.elements?.filter(nB)??[],n=e.element,r=null;t.length>0?r=t.map(YJ):n&&nB(n)&&(r=[YJ(n)]);let i=e.bounds,a=e.boundsMultiple;r&&(i=r.length>1?HY(tX(r)):r[0],e.boundsMultiple!==void 0&&(a=e.boundsMultiple.length>1&&e.boundsMultiple.length===e.elements?.length?r:[i]));let o=cr.get(e.id),s=o?.boundsMultiple,c=s===a||s!==void 0&&a!==void 0&&s.length===a.length&&s.every((e,t)=>e.x===a[t].x&&e.y===a[t].y&&e.width===a[t].width&&e.height===a[t].height);if(o&&o.status===e.status&&o.errorMessage===e.errorMessage&&o.bounds.x===i.x&&o.bounds.y===i.y&&o.bounds.width===i.width&&o.bounds.height===i.height&&c)return o;let l=i.x+i.width/2,u=i.width/2,d;d=e.mouseXOffsetRatio!==void 0&&u>0?l+e.mouseXOffsetRatio*u:e.mouseXOffsetFromCenter===void 0?e.mouseX??l:l+e.mouseXOffsetFromCenter;let f={...e,bounds:i,boundsMultiple:a,mouseX:d};return cr.set(e.id,f),f},ur=Y(()=>{if(!$n()||!r.store.theme.grabbedBoxes.enabled)return[];c();let e=new Set(i.labelInstances.map(e=>e.id));for(let t of cr.keys())e.has(t)||cr.delete(t);return i.labelInstances.map(lr)}),dr=Y(()=>!$n()||!r.store.theme.grabbedBoxes.enabled?[]:(c(),i.grabbedBoxes.map(e=>!e.element||!document.body.contains(e.element)?e:{...e,bounds:YJ(e.element)}))),fr=Y(()=>$n()&&nr()&&N()&&Ot()),pr=Y(()=>_()?`processing`:`hover`),mr=Y(()=>{if(!$n())return!1;let e=tr(),t=b(),n=_(),r=N(),i=p(),a=!!P(),o=ne(),s=f();return!e||t||o&&!s?!1:n?!0:r&&!i&&a}),hr=Y(()=>{c();let e=i.contextMenuElement;return e?YJ(e):null}),gr=Y(()=>(c(),i.contextMenuPosition)),_r=Y(()=>{let e=i.contextMenuElement;if(!e)return;let t=i.frozenElements.length;return t>1?`${t} elements`:NN(e)||void 0}),[vr]=nY(()=>i.frozenElements.length>1?null:i.contextMenuElement),[yr]=gR(()=>i.contextMenuElement,async e=>e?FU(e):null),br=async e=>{o.incrementSelectionInteractionLockDepth();try{return await e()}finally{o.decrementSelectionInteractionLockDepth()}},xr=(e,t,n,r,a)=>async c=>{await br(async()=>{let l=a?.fallbackBounds??null,u=a?.fallbackSelectionBounds??[],d=a?.position??i.contextMenuPosition??s(),f=St(),p=hr()??l,m=t.length>1,h=m?HY(tX(f)):p,g=i.wasActivatedByToggle,_;if(_=m?f:p?[p]:u,o.hideContextMenu(),h){let i=m?h.x+h.width/2:d.x,a=ot.createInstance(h,n||`element`,r,`copying`,{element:e,mouseX:i,elements:m?t:void 0,boundsMultiple:_}),o=!1,s;try{o=await c(),o||(s=`Failed to copy`)}catch(e){s=wY(e,`Action failed`)}ot.updateAfterCopy(a,o,s)}else try{await c()}catch{}g?Kt():o.unfreeze()})},Sr=()=>{setTimeout(()=>{o.hideContextMenu()},0)},Cr=e=>{let{element:t,filePath:n,lineNumber:a,tagName:s,componentName:c,position:l,performWithFeedbackOptions:u,shouldDeferHideContextMenu:f,onBeforeCopy:p,onBeforePrompt:m,customEnterPromptMode:h}=e,g=i.frozenElements.length>0?i.frozenElements:[t],_=f?Sr:o.hideContextMenu,v={element:t,elements:g,filePath:n,lineNumber:a,componentName:c,tagName:s,enterPromptMode:h??(()=>{ot.clearAll(),rn(),m?.(),Ee(t,l.x,l.y),o.setPointer({x:l.x,y:l.y}),o.setFrozenElement(t),De(),d()||Gt(),_()}),enterEditMode:()=>{en(t,l,{filePath:n,lineNumber:a,componentName:c,tagName:s})&&rn(),_()},copy:()=>{rn(),p?.(),dt({element:t,cursorX:l.x,selectedElements:g.length>1?g:void 0,shouldDeactivateAfter:i.wasActivatedByToggle}),_()},hooks:{transformHtmlContent:r.hooks.transformHtmlContent,onOpenFile:r.hooks.onOpenFile,transformOpenFileUrl:r.hooks.transformOpenFileUrl},performWithFeedback:xr(t,g,s,c,u),hideContextMenu:_,cleanup:()=>{i.wasActivatedByToggle?Kt():o.unfreeze()}},y=r.hooks.transformActionContext(v);return{...v,...y}},wr=Y(()=>{let e=i.contextMenuElement;if(!e)return;let t=yr(),n=i.contextMenuPosition??s();return Cr({element:e,filePath:t?.filePath,lineNumber:t?.lineNumber??void 0,tagName:_r(),componentName:vr(),position:n,shouldDeferHideContextMenu:!0,onBeforeCopy:()=>{ye.clear()},customEnterPromptMode:()=>{ot.clearAll(),rn(),o.clearInputText(),o.enterPromptMode(n,e),Sr()}})}),Tr=()=>{setTimeout(()=>{o.hideContextMenu(),Kt()},0)},Er=()=>{if(!me)return null;let e=me.getBoundingClientRect(),t=_Z(e);return t===`left`||t===`right`?{x:t===`left`?e.right:e.left,y:e.top+e.height/2,edge:t}:{x:e.left+e.width/2,y:t===`top`?e.bottom:e.top,edge:t}},Dr=()=>{let e=Er();if(e)return e;let t=de.state();return t?{x:t.position.x,y:t.position.y,edge:`bottom`}:null},Or=(e,t)=>{let n=null,r=()=>{let i=e();i&&t(i),n=ZF(r)};return r(),()=>{n!==null&&(QF(n),n=null)}};mR(()=>{if(!_t())return;let e=Or(Er,ue);xR(()=>{e(),ue(null)})});let kr=()=>{he?.(),he=null,oe(null)},Ar=()=>{o.hideContextMenu(),kr(),de.dismiss()},jr=()=>{ae()===null?(o.hideContextMenu(),de.isOpen()&&de.closePreservingRenderer(),he?.(),he=Or(Er,oe)):kr()},Mr=e=>{Ce({defaultAction:e})},Nr=e=>{let t=i.labelInstances.find(t=>t.id===e);if(!t?.element||!nB(t.element))return;let n=t.element,r=XJ(YJ(n)),a={x:t.mouseX??r.x,y:r.y},s=t.elements&&t.elements.length>0?t.elements.filter(e=>nB(e)):[n];setTimeout(()=>{kr(),de.isOpen()&&de.closePreservingRenderer(),d()||(o.setWasActivatedByToggle(!0),Gt()),o.setPointer(a),o.setFrozenElements(s),s.length>1&&t.bounds&&o.setFrozenDragRect(VY(t.bounds)),o.freeze(),o.showContextMenu(a,n)},0)};mR(()=>{let e=r.store.theme.hue;e===0?Zn.style.filter=``:Zn.style.filter=`hue-rotate(${e}deg)`}),r.store.theme.enabled&&Promise.resolve().then(()=>(SJ(),eW)).then(({ReactGrabRenderer:e})=>{t||(n=oz(()=>X(e,{get selectionVisible(){return ar()},get selectionBounds(){return Tt()},get selectionBoundsMultiple(){return Ft()},get selectionShouldSnap(){return i.frozenElements.length>0||Pt().length>0},get selectionElementsCount(){return i.frozenElements.length},get frozenLabelEntries(){return Lt()},get pendingShiftPreviewEntry(){return Rt()??void 0},get selectionFilePath(){return i.selectionFilePath??void 0},get selectionLineNumber(){return i.selectionLineNumber??void 0},get selectionTagName(){return or()},get selectionComponentName(){return Ze()},get selectionLabelVisible(){return sr()},selectionLabelStatus:`idle`,get hierarchyState(){return Bn()},get hierarchyMenuPosition(){return le()},get labelInstances(){return ur()},get dragVisible(){return fr()},get dragBounds(){return Nt()},get grabbedBoxes(){return dr()},get mouseX(){return eB(()=>i.frozenElements.length>1)()?void 0:Bt()??zt().x},get isFrozen(){return f()||d()||ne()},get inputValue(){return i.inputText},get isPromptMode(){return b()},onShowContextMenuInstance:Nr,get onLabelInstanceHoverChange(){return ot.handleHoverChange},get onInputChange(){return o.setInputText},onInputSubmit:()=>void Yt(),onToggleExpand:$t,get selectionLabelShakeCount(){return k()},onConfirmDismiss:Zt,get discardPrompt(){return eB(()=>!!ye.isPendingDismiss())()?{isKeyboardSelection:!0,onConfirm:Zt,onCopy:On}:S()?{onConfirm:Zt,onCancel:Qt}:void 0},get toolbarVisible(){return r.store.theme.toolbar.enabled},get isActive(){return d()},onToggleActive:sn,onActivateAction:on,get activeActionId(){return $e()},get enabled(){return T()},get shakeCount(){return D()},onToolbarStateChange:e=>{A(e),e.enabled!==T()&&(E(e.enabled),e.enabled||(qt(),Ar())),SZ.forEach(t=>t(e))},onSubscribeToToolbarStateChanges:e=>(SZ.add(e),()=>{SZ.delete(e)}),onToolbarSelectHoverChange:re,onToolbarRef:e=>{me=e},get contextMenuPosition(){return gr()},get contextMenuBounds(){return hr()},get contextMenuTagName(){return _r()},get contextMenuComponentName(){return vr()},get contextMenuHasFilePath(){return!!yr()?.filePath},get actions(){return r.store.actions},get actionContext(){return wr()},onContextMenuDismiss:Tr,onContextMenuHide:Sr,get toolbarMenuPosition(){return ae()},get toolbarMenuActions(){return r.store.actions.filter(e=>e.showInToolbarMenu===!0)},get defaultActionId(){return te()?.defaultAction??`copy`},onSetDefaultAction:Mr,onToggleToolbarMenu:jr,onToolbarMenuDismiss:kr,get editPanelState(){return de.state()},get editPanelPosition(){return se()},get onEditPanelDismiss(){return de.dismiss},get onEditPanelSubmit(){return de.submit},get onEditPanelPendingEditsChange(){return de.setPendingEdits},get onEditPanelInteractingChange(){return de.setInteracting}}),Zn))}).catch(e=>{console.warn(`[react-grab] Failed to load renderer:`,e)});let Pr={activate:()=>{o.setPendingCommentMode(!1),!d()&&T()&&Jt()},deactivate:()=>{(d()||_())&&Kt()},toggle:()=>{d()?Kt():T()&&Jt()},comment:dn,isActive:()=>d(),isEnabled:()=>T(),setEnabled:e=>{e!==T()&&(E(e),Ce({enabled:e,collapsed:!e}),e||(qt(),Ar()))},getToolbarState:()=>te()??PV(),setToolbarState:e=>{let t=te()??PV(),n=e.collapsed??t?.collapsed??!1,r={edge:e.edge??t?.edge??`bottom`,ratio:e.ratio??t?.ratio??.5,collapsed:n,enabled:e.enabled??!n,defaultAction:e.defaultAction??t?.defaultAction??`copy`};FV(r),A(r),r.enabled!==T()&&(E(r.enabled),r.enabled||(qt(),Ar())),SZ.forEach(e=>e(r))},onToolbarStateChange:e=>(SZ.add(e),()=>{SZ.delete(e)}),reset:()=>{qt(),Ar(),o.clearGrabbedBoxes(),o.clearLabelInstances(),o.setSelectionSource(null,null)},dispose:()=>{t=!0,xZ=!1,n?.(),he?.(),he=null,ge?.(),ge=null,SZ.clear(),e()},copyElement:async e=>{let t=Array.isArray(e)?e:[e];return t.length!==0&&await ct(t)},getSource:async e=>{let t=await FU(e);return t?{filePath:t.filePath,lineNumber:t.lineNumber,componentName:t.componentName}:null},getStackContext:e=>qU(e,{maxLines:r.store.options.maxContextLines}),getState:()=>({isActive:d(),isDragging:p(),isCopying:_(),isPromptMode:b(),isSelectionBoxVisible:!!ar(),isDragBoxVisible:!!fr(),targetElement:pt(),dragBounds:Nt()??null,grabbedBoxes:[...Vt()],labelInstances:[...Ht()],selectionFilePath:i.selectionFilePath,toolbarState:te()}),setOptions:e=>{r.setOptions(e)},registerPlugin:e=>{r.register(e,Pr)},unregisterPlugin:e=>{r.unregister(e)},getPlugins:()=>r.getPluginNames(),getDisplayName:IU};for(let e of bZ)r.register(e,Pr);return setTimeout(()=>{GF(!0)},bN),Pr})}})),TZ=r({DEFAULT_THEME:()=>qX,commentPlugin:()=>mZ,formatElementInfo:()=>XU,generateSnippet:()=>yZ,getGlobalApi:()=>DZ,getStack:()=>DU,init:()=>CZ,isInstrumentationActive:()=>oP,openPlugin:()=>gZ,registerPlugin:()=>jZ,setGlobalApi:()=>OZ,unregisterPlugin:()=>MZ}),EZ,DZ,OZ,kZ,AZ,jZ,MZ,NZ=t((()=>{wZ(),cR(),$U(),EZ=null,DZ=()=>typeof window>`u`?EZ:window.__REACT_GRAB__??EZ??null,OZ=e=>{EZ=e,typeof window<`u`&&(e?window.__REACT_GRAB__=e:delete window.__REACT_GRAB__)},kZ=[],AZ=e=>{for(;kZ.length>0;){let t=kZ.shift();t&&e.registerPlugin(t)}},jZ=e=>{let t=DZ();if(t){t.registerPlugin(e);return}kZ.push(e)},MZ=e=>{let t=DZ();if(t){t.unregisterPlugin(e);return}let n=kZ.findIndex(t=>t.name===e);n!==-1&&kZ.splice(n,1)},typeof window<`u`&&!window.__REACT_GRAB_DISABLED__&&(window.__REACT_GRAB__?EZ=window.__REACT_GRAB__:(EZ=CZ(),window.__REACT_GRAB__=EZ),AZ(EZ),window.dispatchEvent(new CustomEvent(`react-grab:init`,{detail:EZ})))}));Sr(),Br(),gD();var PZ=`linear-grab:context-copied`,FZ=`linear-grab:picker-activated`,IZ=0,LZ=null;function RZ(e){!e||e.grabbedAt===IZ||Tr().then(t=>{if(t.workflowMode!==`local`||e.grabbedAt===IZ)return;let n=()=>{IZ=e.grabbedAt,navigator.clipboard.writeText(fD(e,t)).then(()=>window.dispatchEvent(new CustomEvent(PZ))).catch(()=>{IZ=0})};e.source?.filePath?(LZ&&clearTimeout(LZ),LZ=null,n()):(LZ&&clearTimeout(LZ),LZ=setTimeout(n,900))})}function zZ(e,t=Date.now()){return{tagName:e.tagName||void 0,componentName:e.componentName||void 0,content:e.textContent?e.textContent.slice(0,500):``,source:e.filePath?{filePath:e.filePath,lineNumber:e.lineNumber??null,columnNumber:e.columnNumber??null,componentName:e.componentName??null}:null,stackContext:void 0,pageUrl:location.href,grabbedAt:t}}function BZ(e,t){let n=null,r=0;return{plugin:{name:`linear-grab`,hooks:{onElementSelect:i=>{r=Date.now(),n=Tr().then(e=>e.captureShots?KA(i):null);let a=t?.(),o={tagName:i.tagName?.toLowerCase()||void 0,componentName:a?.getDisplayName?.(i)||void 0,content:(i.textContent??``).slice(0,500),source:null,stackContext:void 0,pageUrl:location.href,grabbedAt:r};e([o]);try{a?.getSource?.(i)?.then(t=>{t?.filePath&&e([{...o,source:{filePath:t.filePath,lineNumber:t.lineNumber??null,columnNumber:t.columnNumber??null,componentName:t.componentName??o.componentName??null}}])})}catch{}}}},handleSelection(t){let i=r&&Date.now()-r<4e3?r:Date.now(),a=t.map((e,t)=>zZ(e,i+t));if(!a.length)return;e(a);let o=n;n=null,o&&o.then(t=>{t&&e([{...a[0],screenshotDataUrl:t},...a.slice(1)])})}}}var VZ=!1;async function HZ(){if(xr||VZ)return;VZ=!0;let e=await Promise.resolve().then(()=>(NZ(),TZ));try{e.init()}catch{VZ=!1;return}let t=BZ(e=>{kr(e),RZ(e[0])},()=>e.getGlobalApi());e.registerPlugin(t.plugin),UA(),window.addEventListener(`react-grab:element-selected`,e=>{t.handleSelection(e.detail.elements??[])})}async function UZ(){if(xr){let e=await chrome.runtime.sendMessage({type:`grab/activate`});if(e&&e.ok===!1)throw Error(e.error??`Cannot activate the picker on this page.`);return}await HZ();let e=await Promise.resolve().then(()=>(NZ(),TZ));window.dispatchEvent(new CustomEvent(FZ)),e.getGlobalApi()?.activate()}function WZ(e){if(!xr)return()=>{};let t=t=>{t?.type===`grab/updated`&&e()};return chrome.runtime.onMessage.addListener(t),()=>chrome.runtime.onMessage.removeListener(t)}function GZ(){return new Promise(e=>{let t=document.createElement(`div`);t.style.cssText=`position:fixed;inset:0;z-index:2147483647;cursor:crosshair;user-select:none;`;let n=document.createElement(`div`);n.style.cssText=`position:fixed;display:none;border:2px solid #5e6ad2;border-radius:4px;box-shadow:0 0 0 100000px rgba(0,0,0,0.35);pointer-events:none;`,t.appendChild(n),document.body.appendChild(t);let r=0,i=0,a=!1,o=e=>({x:Math.min(r,e.clientX),y:Math.min(i,e.clientY),w:Math.abs(e.clientX-r),h:Math.abs(e.clientY-i)}),s=()=>{t.remove(),window.removeEventListener(`keydown`,l,!0)},c=()=>{s(),e(null)},l=e=>{e.key===`Escape`&&(e.stopPropagation(),c())};window.addEventListener(`keydown`,l,!0),t.addEventListener(`pointerdown`,e=>{a=!0,r=e.clientX,i=e.clientY,t.setPointerCapture(e.pointerId)}),t.addEventListener(`pointermove`,e=>{if(!a)return;let t=o(e);n.style.display=`block`,n.style.left=`${t.x}px`,n.style.top=`${t.y}px`,n.style.width=`${t.w}px`,n.style.height=`${t.h}px`}),t.addEventListener(`pointerup`,t=>{let n=o(t);if(s(),n.w<8||n.h<8)return e(null);qA(n).then(t=>{if(!t)return e(null);e({tagName:`region`,componentName:void 0,content:`Region capture ${Math.round(n.w)}×${Math.round(n.h)}`,source:null,stackContext:void 0,screenshotDataUrl:t,pageUrl:location.href,grabbedAt:Date.now()})})})})}Br(),Sr(),gD();var KZ=N(`<span class="text-text-faint ml-auto text-[10.5px] font-normal normal-case tabular-nums">`),qZ=N(`<details open class=group><summary class="text-text-dim hover:text-text flex cursor-pointer items-center gap-1.5 text-[11px] font-semibold tracking-wide uppercase select-none"><span aria-hidden class="text-text-faint inline-block w-3 text-center transition-transform group-open:rotate-90">›</span></summary><div class="flex flex-col gap-2 pt-2 pl-4">`),JZ=N(`<p class="text-warn text-[10.5px] leading-snug">Several captures resolve to the same source — this page region likely renders inside an iframe/canvas the picker can't see into. Use <b>Capture region</b> for visual pointers there.`),YZ=N(`<div class="flex flex-col gap-1.5"><div class="flex items-center justify-between gap-2"><span class="text-text-faint min-w-0 text-[10.5px] leading-snug">All elements post into ONE issue. Shift+click / drag selects several at once.`),XZ=N(`<div class="flex flex-col gap-1.5"><div class="flex gap-1.5">`),ZZ=N(`<span class=text-danger>●`),QZ=N(`<div class="flex flex-col gap-1.5"><span class="text-text-faint text-[10.5px] leading-snug">Captures your screen as a looping GIF (max 30s) the coding agent can watch. Pick this tab in the share dialog, then reproduce the issue.`),$Z=N(`<span class="inline-block min-w-[4ch] text-center">Stop`),eQ=N(`<div class="bg-surface border-border flex items-center gap-2 rounded-lg border p-2.5"><span aria-hidden class="bg-danger size-2 shrink-0 animate-pulse rounded-full"></span><span class="text-text min-w-[5ch] text-[12px] tabular-nums"></span><span class="text-text-faint text-[10.5px]">max 0:30`),tQ=N(`<div class="bg-surface border-border flex items-center gap-2 rounded-lg border p-2.5"><span class="text-text-dim text-[12px]">Encoding GIF…`),nQ=N(`<div class="flex h-full flex-col gap-4 overflow-y-auto pt-3 pb-4 pl-3 pr-4">`),rQ=N(`<span class="text-success text-[12px] leading-none">✓`),iQ=N(`<svg width=12 height=12 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round aria-hidden><path d="M4 4l8 8M12 4l-8 8">`),aQ=N(`<span class="font-mono text-text-dim break-all text-[11px] leading-snug">`),oQ=N(`<img alt="Element location screenshot"class="border-border bg-bg max-h-32 w-full rounded-md border object-contain">`),sQ=N(`<div class="bg-surface border-border flex flex-col gap-1.5 rounded-lg border p-2.5"><div class="flex items-center justify-between gap-2"><span class="font-mono text-accent min-w-0 truncate text-[12px]"></span><div class="flex shrink-0 items-center gap-1">`),cQ=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linejoin=round aria-hidden><rect x=5.5 y=5.5 width=9 height=9 rx=1.5></rect><path d="M10.5 5.5v-2a2 2 0 0 0-2-2h-5a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h2">`),lQ=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden><path d="M8 2.5v8M4.5 7.5 8 11l3.5-3.5M2.5 13.5h11">`),uQ=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round aria-hidden><path d="M2.5 4h11M6.5 4V2.5h3V4M4 4l.7 9a1.5 1.5 0 0 0 1.5 1.4h3.6A1.5 1.5 0 0 0 11.3 13l.7-9M6.5 7v4.5M9.5 7v4.5">`),dQ=N(`<div class="bg-surface border-border flex flex-col gap-2 rounded-lg border p-2.5"><img alt="Screen recording preview"class="border-border bg-bg max-h-44 w-full rounded-md border object-contain"><span class="text-text-faint text-[10.5px] tabular-nums"> KB · <!>s · <!>×</span><label class="flex cursor-pointer items-center gap-2 select-none"><input type=checkbox class="accent-accent rounded"><span class="text-text text-[12px]">Attach to issue on create</span></label><div class="flex items-center gap-1">`),fQ=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round aria-hidden><path d="M6.5 9.5 9.5 6.5M7.5 4.5 9 3a2.5 2.5 0 0 1 3.5 3.5L11 8M8.5 11.5 7 13a2.5 2.5 0 0 1-3.5-3.5L5 8">`);function pQ(e){return(()=>{var t=qZ(),n=t.firstChild;n.firstChild;var r=n.nextSibling;return P(n,()=>e.title,null),P(n,j(M,{get when(){return e.badge},get children(){var t=KZ();return P(t,()=>e.badge),t}}),null),P(r,()=>e.children),t})()}function mQ(){let e=sr(),t=_r(()=>({queryKey:[`grab`],queryFn:Dr})),n=_r(()=>({queryKey:[`settings`],queryFn:Tr})),r=()=>t.data??[],i=()=>!!(n.data?.linearApiKey||n.data?.linearAccessToken),[a,o]=T(null),s=()=>{o(null),UZ().catch(e=>{o(e instanceof Error&&e.message?e.message:`Cannot activate the picker — open your dev app in the active tab first.`)})},c=async()=>{await jr(),e.invalidateQueries({queryKey:[`grab`]})},[l,u]=T(null),d=async e=>{try{await navigator.clipboard.writeText(fD(e,n.data??{})),u(e.grabbedAt),setTimeout(()=>u(null),1800)}catch{o(`Clipboard was blocked — click the button again.`)}},f=async t=>{await Ar(t),e.invalidateQueries({queryKey:[`grab`]})},[p,m]=T(!1),h=async()=>{o(null),m(!0),window.dispatchEvent(new CustomEvent(FZ));try{let e=await GZ();e?await kr([e]):o(`Region capture failed — try a smaller area (huge scrollers exceed canvas limits), or it was cancelled.`)}finally{m(!1)}},[g,_]=T(HD());ae(UD(_));let[v,y]=T(0);O(()=>{if(g().phase!==`recording`)return;let e=setInterval(()=>y(Date.now()-(HD().startedAt??Date.now())),250);ae(()=>clearInterval(e))});let b=e=>{let t=Math.floor(e/1e3);return`${Math.floor(t/60)}:${String(t%60).padStart(2,`0`)}`},[x,S]=T(`idle`),[C,w]=T(null),E=async()=>{let e=HD().result;if(!e)throw Error(`No recording available.`);if(e.assetUrl)return e.assetUrl;let t=await DO(e.blob,`recording-${Date.now()}.gif`);return rO(t),t},k=async()=>{w(null),S(`busy`);try{let e=E().then(e=>new Blob([``],{type:`text/plain`}));try{await navigator.clipboard.write([new ClipboardItem({"text/plain":e})])}catch{let t=await e;await navigator.clipboard.writeText(await t.text())}S(`copied`),setTimeout(()=>S(`idle`),2e3)}catch{S(`idle`),await ne(),w(`Direct upload is blocked in this browser — copied the GIF instead. Paste it into a Linear comment and Linear uploads it.`)}},ee=()=>{let e=g().result;if(!e)return;let t=document.createElement(`a`);t.href=e.url,t.download=`linear-grab-recording.gif`,t.click()},[te,A]=T(`idle`),ne=async()=>{let e=g().result;if(e){w(null),A(`busy`);try{try{await navigator.clipboard.write([new ClipboardItem({"image/gif":e.blob})])}catch{let t=await createImageBitmap(e.blob),n=document.createElement(`canvas`);n.width=t.width,n.height=t.height,n.getContext(`2d`).drawImage(t,0,0);let r=await new Promise((e,t)=>n.toBlob(n=>n?e(n):t(Error(`PNG encode failed`)),`image/png`));await navigator.clipboard.write([new ClipboardItem({"image/png":r})]),w(`Browser blocks GIF clipboard — copied the first frame as PNG. Use Download for the animation.`)}A(`copied`),setTimeout(()=>A(`idle`),2e3)}catch(e){A(`idle`),w(e instanceof Error?e.message:`Copy failed.`)}}};return(()=>{var e=nQ();return P(e,j(pQ,{title:`Captured elements`,get badge(){return $e(()=>!!r().length)()?`${r().length}/8`:void 0},get children(){return[j(M,{get when(){return r().length>0},get fallback(){return j(Rj,{title:`No elements captured`,children:`Click "Pick element" below, then use the react-grab overlay on your dev app. Every pick ADDS to this list — Shift+click or drag in the overlay selects several at once. Source info needs a dev build.`})},get children(){var e=YZ(),t=e.firstChild;return t.firstChild,P(e,j(We,{get each(){return r()},children:e=>(()=>{var t=sQ(),n=t.firstChild.firstChild,r=n.nextSibling;return P(n,(()=>{var t=$e(()=>!!e.componentName);return()=>t()?`<${e.componentName}>`:$e(()=>!!e.tagName)()?`<${e.tagName}>`:`Element`})()),P(r,j(Ej,{class:`size-7 px-0`,variant:`ghost`,title:`Copy context for a local agent (Claude Code / Cursor) — includes skills & memory paths`,"aria-label":`Copy context`,onClick:()=>void d(e),get children(){return j(M,{get when(){return l()===e.grabbedAt},get fallback(){return cQ()},get children(){return rQ()}})}}),null),P(r,j(Ej,{class:`size-7 px-0`,variant:`ghost`,title:`Remove this element`,"aria-label":`Remove element`,onClick:()=>void f(e.grabbedAt),get children(){return iQ()}}),null),P(t,j(M,{get when(){return e.source?.filePath},get children(){var t=aQ();return P(t,()=>e.source.filePath,null),P(t,(()=>{var t=$e(()=>e.source?.lineNumber!=null);return()=>t()?`:${e.source.lineNumber}`:``})(),null),t}}),null),P(t,j(M,{get when(){return e.screenshotDataUrl},get children(){var t=oQ();return D(()=>it(t,`src`,e.screenshotDataUrl)),t}}),null),t})()}),t),P(e,j(M,{get when(){return new Set(r().filter(e=>e.source?.filePath).map(e=>`${e.source.filePath}:${e.source.lineNumber??``}`)).size<r().filter(e=>e.source?.filePath).length},get children(){return JZ()}}),t),P(t,j(Ej,{class:`h-6 shrink-0 px-2 text-[11px]`,variant:`ghost`,onClick:c,children:`Clear all`}),null),e}}),(()=>{var e=XZ(),t=e.firstChild;return P(t,j(Ej,{variant:`primary`,class:`min-w-0 flex-1`,onClick:s,children:`Pick element`}),null),P(t,j(M,{when:!xr,get children(){return j(Ej,{variant:`ghost`,class:`min-w-0 flex-1`,get loading(){return p()},title:`Drag a rectangle over any part of the page — the shot attaches to the issue`,onClick:()=>void h(),children:`Capture region`})}}),null),P(e,j(M,{get when(){return a()},get children(){return j(zj,{get message(){return a()}})}}),null),e})()]}}),null),P(e,j(pQ,{title:`Recording`,get badge(){return $e(()=>!!g().result)()?`${(g().result.durationMs/1e3).toFixed(1)}s`:void 0},get children(){return[j(M,{get when(){return g().phase===`idle`||g().phase===`error`},get children(){var e=QZ(),t=e.firstChild;return P(e,j(Ej,{variant:`ghost`,onClick:()=>void $D(),get children(){return[ZZ(),` Record interaction`]}}),t),P(e,j(M,{get when(){return $e(()=>g().phase===`error`)()&&g().error},get children(){return j(zj,{get message(){return g().error}})}}),null),e}}),j(M,{get when(){return g().phase===`recording`},get children(){var e=eQ(),t=e.firstChild.nextSibling;return t.nextSibling,P(t,()=>b(v())),P(e,j(Ej,{variant:`primary`,class:`ml-auto`,onClick:()=>void eO(),get children(){return $Z()}}),null),e}}),j(M,{get when(){return g().phase===`processing`},get children(){var e=tQ(),t=e.firstChild;return P(e,j(Dj,{}),t),e}}),j(M,{get when(){return $e(()=>g().phase===`ready`)()&&g().result},children:e=>(()=>{var t=dQ(),n=t.firstChild,r=n.nextSibling,a=r.firstChild,o=a.nextSibling,s=o.nextSibling.nextSibling;s.nextSibling;var c=r.nextSibling,l=c.firstChild,u=c.nextSibling;return P(r,()=>(e().blob.size/1024).toFixed(0),a),P(r,()=>(e().durationMs/1e3).toFixed(1),o),P(r,()=>e().width,s),P(r,()=>e().height,null),l.addEventListener(`change`,e=>nO(e.currentTarget.checked)),P(u,j(Ej,{variant:`ghost`,class:`size-7 px-0`,get loading(){return x()===`busy`},get disabled(){return!i()},get title(){return i()?`Copy markdown — uploads to Linear, copies embeddable link`:`Connect Linear in Settings first`},"aria-label":`Copy markdown`,onClick:()=>void k(),get children(){return j(M,{get when(){return x()===`copied`},get fallback(){return fQ()},get children(){return rQ()}})}}),null),P(u,j(Ej,{variant:`ghost`,class:`size-7 px-0`,get loading(){return te()===`busy`},title:`Copy GIF — paste into a Linear comment and Linear uploads it`,"aria-label":`Copy GIF`,onClick:()=>void ne(),get children(){return j(M,{get when(){return te()===`copied`},get fallback(){return cQ()},get children(){return rQ()}})}}),null),P(u,j(Ej,{variant:`ghost`,class:`size-7 px-0`,title:`Download GIF`,"aria-label":`Download GIF`,onClick:ee,get children(){return lQ()}}),null),P(u,j(Ej,{variant:`danger`,class:`ml-auto size-7 px-0`,title:`Discard recording`,"aria-label":`Discard recording`,onClick:tO,get children(){return uQ()}}),null),P(t,j(M,{get when(){return C()},get children(){return j(zj,{get message(){return C()}})}}),null),D(()=>it(n,`src`,e().url)),D(()=>l.checked=g().attachOnCreate),t})()})]}}),null),e})()}function hQ(e,t,n){let r=Array(e);return new Proxy(r,{get(r,i,a){if(typeof i==`string`){let a=i.charCodeAt(0);if(a>=48&&a<=57){let a=+i;if(Number.isInteger(a)&&a>=0&&a<e){let e=r[a];if(!e){let i=t[a*2];e=r[a]={index:a,key:n(a),start:i,size:t[a*2+1],end:i+t[a*2+1],lane:0}}return e}}if(i===`length`)return e}return Reflect.get(r,i,a)}})}function gQ(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=e();return o.length!==r.length||o.some((e,t)=>r[t]!==e)?(r=o,i=t(...o),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i):i}return o.updateDeps=e=>{r=e},o}function _Q(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var vQ=(e,t)=>Math.abs(e-t)<1.01,yQ=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},bQ,xQ=()=>{if(bQ!==void 0)return bQ;if(typeof navigator>`u`)return bQ=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return bQ=!0;let e=navigator.maxTouchPoints;return bQ=navigator.platform===`MacIntel`&&e!==void 0&&e>0},SQ=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},CQ=e=>e,wQ=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(n);for(let e=0;e<n;e++)r[e]=t+e;return r},TQ=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(SQ(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(SQ(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},EQ={passive:!0},DQ=typeof window>`u`||`onscrollend`in window,OQ=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&DQ,o=0,s=a?null:yQ(i,()=>t(o,!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,EQ),a&&r.addEventListener(`scrollend`,u,EQ),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u)}},kQ=(e,t)=>OQ(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),AQ=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},jQ=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})},MQ=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}return}this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:CQ,rangeExtractor:wQ,onChange:()=>{},measureElement:AQ,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=e>0?s[0]?.key??n.getItemKey(0):null,l=e>0?s[e-1]?.key??n.getItemKey(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==c||t.getItemKey(o-1)!==l)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>e&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==l)&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=!1,s=0;if(r&&this.scrollOffset!==null){let[e,t]=r,n=this.getMeasurements(),{count:i,getItemKey:a}=this.options,c=0;for(;c<i&&a(c)!==e;)c++;if(c<i){let e=n[c];if(e){let n=e.start+t;n!==this.scrollOffset&&(s=n-this.scrollOffset,this.scrollOffset=n,o=!0)}}}(o||i)&&(this.pendingScrollAnchor=[o?r[0]:null,o?r[1]:0,i,s])},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=gQ(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{if(t&&this._intendedScrollOffset===null&&e===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;let n=this.getScrollOffset();this.scrollDirection=t?n===e?this.scrollDirection:n<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,!(!xQ()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener(`touchstart`,t,EQ),e.addEventListener(`touchend`,n,EQ),this.unsubs.push(()=>{e.removeEventListener(`touchstart`,t),e.removeEventListener(`touchend`,n),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let t=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled){let[e,n,r,i]=t;e!==null&&!r&&(xQ()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?i!==0&&(this._iosDeferredAdjustment+=i):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;let n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=gQ(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,n,r,i,a,o,s)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s}),{key:!1}),this.getMeasurements=gQ(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s},c)=>{let l=this.itemSizeCache;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=e*2,a=this._flatMeasurements;if(!a||a.length<i){let e=new Float64Array(i);a&&u>0&&e.set(a.subarray(0,u*2)),a=e,this._flatMeasurements=a}let o;if(u===0)o=t+n;else{let e=u-1;o=a[e*2]+a[e*2+1]+s}for(let t=u;t<e;t++){let e=r(t),n=l.get(e),i=typeof n==`number`?n:this.options.estimateSize(t);a[t*2]=o,a[t*2+1]=i,o+=i+s}let c=hQ(e,a,r);return this.measurementsCache=c,c}let d=this.measurementsCache.slice(0,u),f=Array(a).fill(void 0),p=new Float64Array(a),m=0;for(let e=0;e<u;e++){let t=d[e];t&&(f[t.lane]===void 0&&m++,f[t.lane]=e,p[t.lane]=t.end)}for(let i=u;i<e;i++){let e=r(i),c=this.laneAssignments.get(i),u,h,g=o===`estimate`||l.has(e);if(c!==void 0&&this.options.lanes>1){u=c;let e=f[u],r=e===void 0?void 0:d[e];h=r?r.end+s:t+n}else if(m===a){let e=0,t=p[0],n=f[0];for(let r=1;r<a;r++){let i=p[r];(i<t||i===t&&f[r]<n)&&(e=r,t=i,n=f[r])}u=e,h=t+s,g&&this.laneAssignments.set(i,u)}else u=i%this.options.lanes,h=t+n,g&&this.laneAssignments.set(i,u);let _=l.get(e),v=typeof _==`number`?_:this.options.estimateSize(i),y=h+v;d[i]={index:i,start:h,size:v,end:y,key:e,lane:u},f[u]===void 0&&m++,f[u]=i,p[u]=y}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=gQ(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=FQ(e,t,n,r,r===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=gQ(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{if(e<0||e>=this.options.count)return;let n,r,i,a=this._flatMeasurements;if(this.options.lanes===1&&a!==null)i=this.options.getItemKey(e),r=a[e*2],n=a[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;i=t.key,r=t.start,n=t.size}let o=t-(this.itemSizeCache.get(i)??n);if(o!==0){let a=this.options.anchorTo===`end`&&this.scrollState?.behavior!==`smooth`&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,s=a?this.getTotalSize():0,c=this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?r<this.getScrollOffset()+this.scrollAdjustments&&(!this.itemSizeCache.has(i)||this.scrollDirection!==`backward`):this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:i,start:r,size:n,end:r+n,lane:0},o,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(i,t),this.itemSizeCacheVersion++,a?this.applyScrollAdjustment(this.getTotalSize()-s):c&&this.applyScrollAdjustment(o),this.notify(!1)}},this.getVirtualItems=gQ(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._flatMeasurements,r=this.options.lanes===1&&n!=null;return _Q(t[NQ(0,t.length-1,r?e=>n[e*2]:e=>_Q(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`)if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e=`auto`}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:`end`,behavior:e});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._flatMeasurements;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){e!==0&&(xQ()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=e:(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollAdjustments=0)))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&vQ(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r=this.scrollState.behavior===`smooth`&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior=`auto`),this._scrollToOffset(t,{adjustments:void 0,behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}},NQ=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function PQ(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(a<n)r=i+1;else if(a>n)t=i-1;else return i}return r>0?r-1:0}function FQ(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=PQ(i,a,n),r=e,o=n+t;for(;r<a&&i[r*2]+i[r*2+1]<o;)r++;return{startIndex:e,endIndex:r}}let o=NQ(0,a,t=>e[t].start,n),s=o;if(r===1)for(;s<a&&e[s].end<n+t;)s++;else if(r>1){let i=Array(r).fill(0);for(;s<a&&i.some(e=>e<n+t);){let t=e[s];i[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}function IQ(e){let t=Ve(e),n=new MQ(t),[r,i]=tr(n.getVirtualItems()),[a,o]=T(n.getTotalSize()),s=new Proxy(n,{get(e,t){switch(t){case`getVirtualItems`:return()=>r;case`getTotalSize`:return()=>a();default:return Reflect.get(e,t)}}});return s.setOptions(t),ie(()=>{let e=s._didMount();s._willUpdate(),ae(e)}),E(()=>{s.setOptions(Ve(t,e,{onChange:(t,n)=>{var r;t._willUpdate(),i(ar(t.getVirtualItems(),{key:`index`})),o(t.getTotalSize()),(r=e.onChange)==null||r.call(e,t,n)}})),s._willUpdate(),i(ar(n.getVirtualItems(),{key:`index`})),o(n.getTotalSize())}),s}function LQ(e){return IQ(Ve({observeElementRect:TQ,observeElementOffset:kQ,scrollToFn:jQ},e))}Br();var RQ=3e4,zQ=/github\.com\/[^/]+\/[^/]+\/pull\/\d+/i,BQ={running:[],review:[]},VQ=null,HQ=new Set;function UQ(e){return HQ.add(e),VQ||(VQ=setInterval(()=>void KQ(),RQ),KQ()),()=>{HQ.delete(e),!HQ.size&&VQ&&(clearInterval(VQ),VQ=null)}}function WQ(){KQ()}function GQ(e){return{id:e.id,identifier:e.identifier,title:e.title,stateName:e.state.name,stateColor:e.state.color,delegateName:e.delegate?.displayName??`Agent`,updatedAt:e.updatedAt,prUrl:e.attachments?.find(e=>zQ.test(e.url))?.url}}async function KQ(){try{let e=await Tr();if(!e.linearApiKey&&!e.linearAccessToken)return;let t=(await fO()).filter(e=>!!e.delegate&&e.state.type===`started`).map(GQ);BQ={running:t.filter(e=>!e.prUrl),review:t.filter(e=>!!e.prUrl)};for(let e of HQ)e(BQ)}catch{}}Br();function qQ(e,t=6e3){return Promise.race([e,new Promise((e,n)=>setTimeout(()=>n(Error(`upload timeout`)),t))])}async function JQ(){let e=[];for(let t of await Dr()??[]){let n=t.source?.filePath?` — \`${t.source.filePath}${t.source.lineNumber==null?``:`:${t.source.lineNumber}`}\``:``;if(e.push(`- \`<${t.componentName??t.tagName??`element`}>\`${n}`),t.screenshotDataUrl)try{let n=await qQ(DO(QA(t.screenshotDataUrl),`capture-${t.grabbedAt}.png`));e.push(` `)}catch{}}let t=HD();if(t.result)try{let n=t.result.assetUrl??await qQ(DO(t.result.blob,`recording-${Date.now()}.gif`));rO(n),e.push(``)}catch{}return e.length?`Captured context:\n${e.join(`
|
|
263
|
+
`)}`:null}function YQ(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}var XQ=/^(https?:\/\/|mailto:)/i,ZQ=/\.(mp4|mov|webm|m4v)(\?|#|$)/i,QQ=/\.(png|jpe?g|gif|webp|avif|svg)(\?|#|$)/i,$Q=class extends HTMLElement{objectUrl=null;connectedCallback(){let e=this.getAttribute(`src`)??``,t=this.getAttribute(`alt`)??``;(async()=>{try{let n=await fetch(e);if(!n.ok)throw Error(String(n.status));let r=await n.blob();if(this.objectUrl=URL.createObjectURL(r),this.textContent=``,r.type.startsWith(`video/`)){let e=document.createElement(`video`);e.controls=!0,e.preload=`metadata`,e.src=this.objectUrl,this.appendChild(e)}else{let e=document.createElement(`img`);e.src=this.objectUrl,e.alt=t,this.appendChild(e)}}catch{this.textContent=``;let e=document.createElement(`span`);e.textContent=`🖼 ${t||`media`} — start the bridge (npx linear-grab-bridge) to view Linear-hosted media here`,e.style.cssText=`font-size:10.5px;color:var(--color-text-faint);`,this.appendChild(e)}})()}disconnectedCallback(){this.objectUrl&&URL.revokeObjectURL(this.objectUrl)}};typeof customElements<`u`&&!customElements.get(`lg-media`)&&customElements.define(`lg-media`,$Q);var e$=null;function t$(e){e$=e?e.replace(/\/$/,``):null}function n$(e){try{if(e$&&new URL(e).hostname.endsWith(`uploads.linear.app`))return`${e$}/fetch?url=${encodeURIComponent(e)}`}catch{}return e}function r$(e){let t=e;return t=t.replace(/`([^`]+)`/g,(e,t)=>`<code>${t}</code>`),t=t.replace(/!\[([^\]]*)\]\((?:<)?([^()\s]+?)(?:>)?\)/g,(e,t,n)=>{if(!XQ.test(n))return t;let r=n$(n);return ZQ.test(n)?`<video controls preload="metadata" src="${r}"></video>`:r!==n&&!QQ.test(n)?`<lg-media src="${r}" alt="${t}"></lg-media>`:`<img src="${r}" alt="${t}" loading="lazy" />`}),t=t.replace(/\[([^\]]+)\]\((?:<)?([^()\s]+?)(?:>)?\)/g,(e,t,n)=>XQ.test(n)?`<a href="${n}" target="_blank" rel="noopener noreferrer">${t}</a>`:t),t=t.replace(/<(https?:\/\/[^\s&]+)>/g,`<a href="$1" target="_blank" rel="noopener noreferrer">$1</a>`),t=t.replace(/(^|[\s(])((?:https?:\/\/)[^\s<>()"']+)/g,(e,t,n)=>`${t}<a href="${n}" target="_blank" rel="noopener noreferrer">${n}</a>`),t=t.replace(/\*\*([^*]+)\*\*/g,`<strong>$1</strong>`),t=t.replace(/(^|\W)\*([^*\n]+)\*(?=\W|$)/g,`$1<em>$2</em>`),t}function i$(e){let t=YQ(e.trim()).split(`
|
|
264
264
|
`),n=[],r=0;for(;r<t.length;){let e=t[r];if(!e.trim()){r++;continue}if(e.startsWith("```")){let e=[];for(r++;r<t.length&&!t[r].startsWith("```");)e.push(t[r++]);r++,n.push(`<pre><code>${e.join(`
|
|
265
|
-
`)}</code></pre>`);continue}let i=e.match(/^(#{1,6})\s+(.*)$/);if(i){n.push(`<h4>${n$(i[2])}</h4>`),r++;continue}if(/^\s*[-*]\s+/.test(e)){let e=[];for(;r<t.length&&/^\s*[-*]\s+/.test(t[r]);)e.push(`<li>${n$(t[r].replace(/^\s*[-*]\s+/,``))}</li>`),r++;n.push(`<ul>${e.join(``)}</ul>`);continue}if(/^\s*\d+[.)]\s+/.test(e)){let e=[];for(;r<t.length&&/^\s*\d+[.)]\s+/.test(t[r]);)e.push(`<li>${n$(t[r].replace(/^\s*\d+[.)]\s+/,``))}</li>`),r++;n.push(`<ol>${e.join(``)}</ol>`);continue}let a=[];for(;r<t.length&&t[r].trim()&&!/^(#{1,6}\s|```|\s*[-*]\s+|\s*\d+[.)]\s+)/.test(t[r]);)a.push(t[r]),r++;n.push(`<p>${n$(a.join(`<br />`))}</p>`)}return n.join(``)}Br();var i$=N(`<div class="lg-md text-text text-[12px] leading-relaxed break-words">`),a$=N(`<div class="flex h-full flex-col">`),o$=N(`<span class="tabular-nums text-[10.5px] text-text-faint">live · updated `),s$=N(`<svg aria-hidden width=11 height=11 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M1 4.5A7 7 0 0 1 13.5 3"></path><path d="M15 11.5A7 7 0 0 1 2.5 13"></path><polyline points="1 1 1 5 5 5"></polyline><polyline points="15 11 15 15 11 15">`),c$=N(`<div class="flex-1 overflow-y-auto">`),l$=N(`<div class="min-h-0 flex-1 overflow-y-auto pl-2 pr-3"><div style=position:relative>`),u$=N(`<div class="flex h-full flex-col"><div class="border-border flex shrink-0 items-center justify-between border-b px-3 py-2"><span class="text-text text-[12px] font-semibold">My issues</span><div class="flex items-center gap-2"></div></div><div class="border-border flex shrink-0 items-center gap-1 border-b px-3 py-1.5">`),d$=N(`<button>`),f$=N(`<div style=position:absolute;top:0;left:0;width:100%>`),p$=N(`<button class="w-full cursor-pointer rounded-md px-2 py-1.5 text-left hover:bg-surface-2 transition-colors"><div class="flex items-center gap-1.5 min-w-0"><span class="font-mono text-[11px] text-text-dim shrink-0"></span><span class="truncate text-[12.5px] text-text"></span></div><div class="mt-0.5 flex items-center gap-1.5"><span class="ml-auto tabular-nums text-[10.5px] text-text-faint">`),m$=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden><path d="M10.5 3.5 6 8l4.5 4.5">`),h$=N(`<span class="font-mono text-[11px] text-text-dim shrink-0">`),g$=N(`<span class="truncate text-[12px] font-medium text-text">`),_$=N(`<span class="text-[11.5px] text-text-faint">Loading…`),v$=N(`<div class="flex items-center gap-2"><span class="text-[11px] text-text-dim">`),y$=N(`<div class="flex flex-col gap-2">`),b$=N(`<div class="flex flex-col gap-1"><span class="text-[10.5px] font-semibold uppercase tracking-wide text-text-dim">Attachments</span><div class="flex flex-col gap-1">`),x$=N(`<div class="flex flex-col gap-2.5"><span class="text-[10.5px] font-semibold uppercase tracking-wide text-text-dim">Comments`),S$=N(`<option value=local>Message local Claude Code session`),C$=N(`<option value=new>Start NEW agent (@<!>)`),w$=N(`<option value=comment>Comment only`),T$=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round aria-hidden><circle cx=8 cy=8 r=2.2></circle><path d="M8 1v3M8 12v3M1 8h3M12 8h3">`),E$=N(`<svg width=11 height=11 viewBox="0 0 16 16"fill=currentColor aria-hidden><rect x=3 y=3 width=10 height=10 rx=1.5>`),D$=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden><path d="M13 7.5 8.2 12.3a3.2 3.2 0 0 1-4.5-4.5L8.9 2.6a2.1 2.1 0 0 1 3 3L7.1 10.4a1 1 0 0 1-1.5-1.5l4.3-4.3">`),O$=N(`<span class="inline-block min-w-[4ch] text-left">Send`),k$=N(`<div class="flex h-full flex-col"><div class="border-border flex shrink-0 flex-col gap-1 border-b px-3 py-2"><div class="flex items-center gap-2"></div></div><div class="min-h-0 flex-1 overflow-y-auto pl-3 pr-4 py-3 flex flex-col gap-3"></div><div class="border-border shrink-0 border-t p-2.5 flex flex-col gap-1.5"><div class="flex items-center gap-2">`),A$=N(`<option selected>`),j$=N(`<svg width=10 height=10 viewBox="0 0 16 16"fill=currentColor aria-hidden><rect x=3 y=3 width=10 height=10 rx=1.5>`),M$=N(`<svg width=11 height=11 viewBox="0 0 16 16"fill=currentColor aria-hidden><path d="M4.5 2.8a.8.8 0 0 1 1.22-.68l8 5.2a.8.8 0 0 1 0 1.36l-8 5.2a.8.8 0 0 1-1.22-.68V2.8Z">`),N$=N(`<svg width=11 height=11 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden><path d="m2.5 4 3.5 4-3.5 4M8 12.5h5.5">`),P$=N(`<div class="bg-surface border-border overflow-clip rounded-lg border"><div class="border-border flex h-9 min-w-0 items-center justify-between gap-2 border-b px-3"><div class="flex min-w-0 items-center gap-1.5 text-[11.5px] font-medium"><span aria-hidden class="text-text-dim inline-flex"></span><span class="text-text shrink-0">Local Claude Code</span><span class="text-text-dim shrink-0">started by you</span><span class="text-text-faint shrink-0 tabular-nums">· </span></div></div><div class="flex h-9 items-center gap-1 pr-2"><button class="hover:bg-surface-2 flex h-full min-w-0 flex-1 cursor-pointer items-center gap-2 rounded-md px-3 text-left transition-colors"title="Open the live thread in the Local tab"><span></span><span class="text-text-faint min-w-0 flex-1 truncate text-[11.5px]"></span><svg width=14 height=14 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden class="text-text-dim shrink-0"><path d="m6 3.5 4.5 4.5L6 12.5">`),F$=N(`<option>`),I$=N(`<span class="text-success text-[11px]">✓`),L$=N(`<span class="inline-block min-w-[6ch] text-center">Merge`),R$=N(`<div class="flex min-w-0 items-center gap-1.5"><a target=_blank rel=noreferrer class="text-accent min-w-0 truncate text-[11.5px] hover:underline">`),z$=N(`<svg width=12 height=12 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden><path d="M8 2 14 5.5 8 9 2 5.5 8 2Z"></path><path d="M2 10.5 8 14l6-3.5">`),B$=N(`<div class="flex flex-col gap-0.5"><div class="flex items-center gap-1.5"><span class="text-[11px] font-medium text-text-dim"></span><span class="ml-auto tabular-nums text-[10.5px] text-text-faint">`),V$=N(`<option>Steer running agent<!> · `),H$=N(`<span class="bg-danger inline-block size-2.5 rounded-full"aria-hidden>`),U$=N(`<span class="text-[11px] text-text-dim">`),W$=N(`<p class="text-[12px] text-text leading-relaxed whitespace-pre-wrap break-words">`),G$=N(`<div class="border-border mt-0.5 flex max-h-64 flex-col gap-1 overflow-y-auto border-t pt-1.5 pl-0.5 pr-3">`),K$=N(`<div class="bg-surface border-border rounded-lg border p-2.5 flex flex-col gap-1.5"><div class="flex items-center gap-1.5 flex-wrap"><span class="ml-auto tabular-nums text-[10.5px] text-text-faint">`),q$=N(`<p class="font-mono text-text-faint text-[10.5px] leading-relaxed break-words">→ <!> `),J$=N(`<div>`);function Y$(e){let t=k(()=>r$(e.text));return(()=>{var e=i$();return D(()=>e.innerHTML=t()),e})()}function X$(){let[e,t]=T(null);return O(()=>{let e=ej();e&&(t(e),rj())}),(()=>{var n=a$();return P(n,j(M,{get when(){return e()===null},get fallback(){return j($$,{get issueId(){return e()},onBack:()=>t(null)})},get children(){return j(Z$,{onSelect:e=>t(e)})}})),n})()}function Z$(e){let t,n=_r(()=>({queryKey:[`my-issues`],queryFn:fO,refetchInterval:12e3})),r=_r(()=>({queryKey:[`bridge-tasks`],queryFn:NO,refetchInterval:1e4,retry:0})),i=e=>(r.data??[]).some(t=>t.title.startsWith(e.identifier)),a=e=>e.state.type===`started`&&e.attachments?.some(e=>/github\.com\/[^/]+\/[^/]+\/pull\/\d+/i.test(e.url)),o=[{id:`all`,label:`All`},{id:`active`,label:`In Progress`},{id:`review`,label:`Review`},{id:`done`,label:`Done`},{id:`cloud`,label:`Cloud`},{id:`local`,label:`Local`}],[s,c]=br(`issues:filter`,`all`),[l,u]=br(`issues:search`,``),d=k(()=>{let e=l().trim().toLowerCase();return(n.data??[]).filter(t=>{if(e&&!`${t.identifier} ${t.title}`.toLowerCase().includes(e))return!1;switch(s()){case`active`:return t.state.type===`started`;case`review`:return!!a(t);case`done`:return t.state.type===`completed`;case`cloud`:return!!t.delegate;case`local`:return i(t);default:return!0}})}),f=IQ({get count(){return d().length},getScrollElement:()=>t,estimateSize:()=>56,overscan:5});return(()=>{var r=u$(),a=r.firstChild,p=a.firstChild.nextSibling,m=a.nextSibling;return P(p,j(M,{get when(){return n.dataUpdatedAt>0},get children(){var e=o$();return e.firstChild,P(e,()=>Bj(n.dataUpdatedAt),null),e}}),null),P(p,j(Tj,{class:`size-7 px-0`,get loading(){return n.isFetching},onClick:()=>void n.refetch(),title:`Refresh`,"aria-label":`Refresh issues`,get children(){return s$()}}),null),P(m,j(We,{each:o,children:e=>(()=>{var t=d$();return t.$$click=()=>c(e.id),P(t,()=>e.label),D(()=>st(t,`h-6 shrink-0 cursor-pointer rounded-md px-2 text-[11px] font-medium transition-colors ${s()===e.id?`bg-accent-soft text-accent`:`text-text-dim hover:bg-surface-2`}`)),t})()}),null),P(m,j(Dj,{class:`ml-auto h-6 w-28 text-[11px]`,placeholder:`Search…`,get value(){return l()},onInput:e=>u(e.currentTarget.value)}),null),P(r,j(M,{get when(){return n.isError},get children(){var e=c$();return P(e,j(Lj,{title:`Connect Linear in Settings`,get children(){return n.error?.message??`Unable to load issues.`}})),e}}),null),P(r,j(M,{get when(){return $e(()=>!n.isError&&!n.isPending)()&&d().length===0},get children(){var e=c$();return P(e,j(Lj,{title:`No issues found`,children:`Issues you create will appear here.`})),e}}),null),P(r,j(M,{get when(){return $e(()=>!n.isError)()&&d().length>0},get children(){var n=l$(),r=n.firstChild,a=t;return typeof a==`function`?pt(a,n):t=n,P(r,j(We,{get each(){return f.getVirtualItems()},children:t=>{let n=k(()=>d()[t.index]);return j(M,{get when(){return n()},get children(){var r=f$();return P(r,j(Q$,{get issue(){return n()},get local(){return i(n())},get onSelect(){return e.onSelect}})),D(e=>dt(r,`transform`,`translateY(${t.start}px)`)),r}})}})),D(e=>dt(r,`height`,`${f.getTotalSize()}px`)),n}}),null),r})()}function Q$(e){return(()=>{var t=p$(),n=t.firstChild,r=n.firstChild,i=r.nextSibling,a=n.nextSibling,o=a.firstChild;return t.$$click=()=>e.onSelect(e.issue.id),P(n,j(Ij,{get color(){return e.issue.state.color}}),r),P(r,()=>e.issue.identifier),P(i,()=>e.issue.title),P(a,j(Fj,{get children(){return e.issue.state.name}}),o),P(a,j(M,{get when(){return e.issue.delegate},get children(){return j(Fj,{class:`text-accent`,get children(){return[j(Aj,{}),` `,$e(()=>e.issue.delegate.displayName)]}})}}),o),P(a,j(M,{get when(){return e.local},get children(){return j(Fj,{class:`text-accent`,get children(){return[j(jj,{}),` local`]}})}}),o),P(a,j(M,{get when(){return $e(()=>!!(e.issue.state.type===`started`&&e.issue.delegate))()&&e.issue.attachments?.some(e=>/github\.com\/[^/]+\/[^/]+\/pull\/\d+/i.test(e.url))},get children(){return j(Fj,{color:`var(--color-warn)`,children:`needs review`})}}),o),P(o,()=>Bj(e.issue.updatedAt)),t})()}function $$(e){let t=sr(),n=_r(()=>({queryKey:[`issue`,e.issueId],queryFn:()=>pO(e.issueId),refetchInterval:8e3,enabled:!!e.issueId})),r=_r(()=>({queryKey:[`sessions`,e.issueId],queryFn:()=>hO(e.issueId),refetchInterval:8e3,enabled:!!e.issueId})),i=_r(()=>({queryKey:[`settings`],queryFn:Tr})),a=_r(()=>({queryKey:[`bridge-tasks`],queryFn:NO,refetchInterval:5e3,retry:0})),o=[{id:``,label:`Default model`},{id:`fable`,label:`Fable 5`},{id:`opus`,label:`Opus`},{id:`sonnet`,label:`Sonnet`},{id:`haiku`,label:`Haiku`}],s=vr(()=>({mutationFn:e=>LO(e.id,e.model),onSuccess:e=>{t.setQueryData([`bridge-tasks`],t=>t?.map(t=>t.id===e.id?e:t))}})),c=vr(()=>({mutationFn:e=>IO(e,`Continue where you left off. If the work is already complete, finish any remaining closeout steps (PR, Linear update, announcement).`),onSuccess:()=>void t.invalidateQueries({queryKey:[`bridge-tasks`]})})),l=vr(()=>({mutationFn:e=>RO(e),onSuccess:()=>void t.invalidateQueries({queryKey:[`bridge-tasks`]})})),[u,d]=T(!1),f=async e=>{try{await navigator.clipboard.writeText(KO(e)),d(!0),setTimeout(()=>d(!1),1800)}catch{}},p=k(()=>{let e=n.data?.identifier;return e?a.data?.find(t=>t.title.startsWith(e)):void 0}),m=e=>e.status===`running`?{word:`Working…`,cls:`text-accent`}:e.status===`done`?{word:`Finished`,cls:`text-success`}:e.status===`stopped`?{word:`Stopped`,cls:`text-warn`}:{word:`Error`,cls:`text-danger`},[h,g]=br(`activity-reply:${e.issueId}`,``),[_,v]=T(null),[y,b]=T(0),x=_r(()=>({queryKey:[`grab`],queryFn:Dr,enabled:ij()===`composer`})),[S,C]=T(!1),w=async()=>{C(!0),v(null);try{let e=await qQ();e?g(t=>`${t?`${t}\n`:``}${e}\n`):v(`Nothing captured yet — pick an element, capture a region, or record first.`)}catch(e){v(e instanceof Error?e.message:`Attach failed.`)}finally{C(!1)}},E=()=>{if(ij()===`composer`){oj(`capture`);return}b(Date.now()),oj(`composer`),HZ().catch(()=>oj(`capture`))};O(()=>{if(ij()!==`composer`)return;let e=(x.data??[]).filter(e=>e.grabbedAt>y());if(!e.length)return;let t=e.map(e=>{let t=e.source?.filePath?` — \`${e.source.filePath}${e.source.lineNumber==null?``:`:${e.source.lineNumber}`}\``:``;return`- \`<${e.componentName??e.tagName??`element`}>\`${t}`}).join(`
|
|
266
|
-
`);g(e=>`${e?`${e}\n`:``}${t}\n`),b(Math.max(...e.map(e=>e.grabbedAt)))});let[ee,te]=T(HD());ae(UD(te));let A=!1;O(()=>{ee().phase===`ready`&&A&&(A=!1,w())});let ne=()=>{ee().phase===`recording`?eO():(A=!0,$D())},re=/github\.com\/[^/]+\/[^/]+\/pull\/\d+/i,ie=k(()=>(n.data?.attachments??[]).map(e=>e.url).filter(e=>re.test(e))),oe=_r(()=>({queryKey:[`pr-status`,ie().sort().join(`|`)],queryFn:()=>HO(ie()),refetchInterval:3e4,retry:0,enabled:ie().length>0})),se=e=>ge().has(e)?`MERGED`:oe.data?.statuses[e],[ce,le]=T(null),ue=()=>i.data?.stagingBranch?.trim()||`staging`,[de,fe]=T(null),[pe,me]=T(new Set),he=async e=>{fe(e);try{await UO(e,ue()),me(t=>new Set(t).add(e))}catch{}finally{fe(null)}},[ge,_e]=T(new Set),[ve,ye]=T(null),be=async n=>{ye(null),le(n);try{await WO(n),_e(e=>new Set(e).add(n)),t.invalidateQueries({queryKey:[`issue`,e.issueId]}),t.invalidateQueries({queryKey:[`my-issues`]}),UQ()}catch(e){ye(e instanceof Error?`${e.message} (bridge must be running; gh needs merge rights)`:`Merge failed.`)}finally{le(null)}},xe=k(()=>{let e=n.data?TO(n.data.comments):[],t=new Set(e.map(e=>e.id));return[...(r.data??[]).filter(e=>e.comment?.id&&!t.has(e.comment.id)).map(e=>({id:e.comment.id,createdAt:e.updatedAt,body:``,user:{displayName:e.appUser?.displayName??`agent`,app:!0},parent:null})),...e]}),[Se,Ce]=T(`comment`),we=!1,Te=!1;O(()=>{if(Te||!n.data||!i.data)return;Te=!0;let e=xe();e.length?Ce(`thread:${e[0].id}`):n.data.delegate&&i.data.cursorAgentId&&Ce(`new`)}),O(()=>{we||p()&&(Se()===`comment`||Se()===`new`)&&Ce(`local`)}),O(()=>{if(we)return;let e=xe();e.length&&(Se()===`comment`||Se()===`new`)&&Ce(`thread:${e[0].id}`)});let Ee=vr(()=>({mutationFn:async()=>{let t=h().trim();if(!t)throw Error(`Message is empty`);let n=i.data??{},r=Se();if(r===`local`){let n=p();if(!n)throw Error(`Local session not found — is the bridge running?`);await IO(n.id,t),await CO(e.issueId,`🖥️ **→ local agent:** ${t}`).catch(()=>{})}else r.startsWith(`thread:`)?await CO(e.issueId,t,r.slice(7)):r===`new`&&n.cursorAgentId?await wO(e.issueId,t,{name:n.cursorAgentName,displayName:n.cursorAgentName??`Cursor`,url:n.cursorAgentUrl}):await CO(e.issueId,t)},onSuccess:()=>{g(``),v(null),oj(`capture`),t.invalidateQueries({queryKey:[`issue`,e.issueId]}),UQ()},onError:e=>{v(e.message??`Failed to send`)}})),De=k(()=>n.data),Oe=k(()=>r.data??[]);return(()=>{var t=k$(),r=t.firstChild,a=r.firstChild,d=r.nextSibling,v=d.nextSibling,y=v.firstChild;return P(a,j(Tj,{variant:`ghost`,class:`size-7 shrink-0 px-0`,title:`Back to issues`,"aria-label":`Back to issues`,"data-tip-pos":`right bottom`,get onClick(){return e.onBack},get children(){return m$()}}),null),P(a,j(M,{get when(){return De()},get children(){return[(()=>{var e=h$();return P(e,()=>De().identifier),e})(),(()=>{var e=g$();return P(e,()=>De().title),e})()]}}),null),P(a,j(M,{get when(){return $e(()=>!!n.isPending)()&&!De()},get children(){return _$()}}),null),P(r,j(M,{get when(){return De()},get children(){var e=v$(),t=e.firstChild;return P(e,j(Ij,{get color(){return De().state.color}}),t),P(t,()=>De().state.name),P(e,j(Mj,{get href(){return De().url},class:`ml-auto shrink-0`,children:`Open in Linear`}),null),e}}),null),P(d,j(M,{get when(){return p()},children:e=>{let t=()=>m(e());return(()=>{var n=P$(),r=n.firstChild,i=r.firstChild.firstChild,a=i.nextSibling.nextSibling.nextSibling;a.firstChild;var d=r.nextSibling,p=d.firstChild,m=p.firstChild,h=m.nextSibling;return P(i,j(jj,{size:12})),P(a,()=>Bj(e().startedAt),null),P(r,j(kj,{class:`h-6 w-auto max-w-[110px] shrink-0 text-[10.5px]`,get value(){return e().pendingModel??e().model??``},onChange:t=>s.mutate({id:e().id,model:t.currentTarget.value}),title:`Model — applies from the next message`,get children(){return[j(We,{each:o,children:t=>(()=>{var n=F$();return P(n,()=>t.label),D(()=>n.selected=(e().pendingModel??e().model??``)===t.id),D(()=>n.value=t.id),n})()}),j(M,{get when(){return!o.some(t=>t.id===(e().pendingModel??e().model??``))},get children(){var t=A$();return P(t,()=>e().pendingModel??e().model),D(()=>t.value=e().pendingModel??e().model??``),t}})]}}),null),p.$$click=()=>nj(`local`),P(p,j(M,{get when(){return e().status===`running`},get children(){return j(Ej,{size:12})}}),m),P(m,()=>t().word),P(h,(()=>{var t=$e(()=>e().status===`done`);return()=>t()?e().result??e().lastText:e().lastText})()),P(d,j(M,{get when(){return e().status===`running`},get children(){return j(Tj,{variant:`danger`,class:`size-6 shrink-0 px-0`,get loading(){return l.isPending},title:`Stop the session — resumable afterwards`,"aria-label":`Stop session`,onClick:()=>l.mutate(e().id),get children(){return j$()}})}}),null),P(d,j(M,{get when(){return $e(()=>e().status!==`running`)()&&e().sessionId},get children(){return j(Tj,{variant:`ghost`,class:`size-6 shrink-0 px-0`,get loading(){return c.isPending},get title(){return`Run again — resumes this session${e().pendingModel?` on ${e().pendingModel}`:``}`},"aria-label":`Resume session`,onClick:()=>c.mutate(e().id),get children(){return M$()}})}}),null),P(d,j(M,{get when(){return e().sessionId},get children(){return j(Tj,{variant:`ghost`,class:`size-6 shrink-0 px-0`,get title(){return u()?`Copied!`:`Copy terminal resume command (claude --resume …)`},"aria-label":`Copy resume command`,onClick:()=>void f(e()),get children(){return N$()}})}}),null),D(()=>st(m,`shrink-0 text-[11.5px] font-medium ${t().cls}`)),n})()}}),null),P(d,j(M,{get when(){return Oe().length>0},get children(){var e=y$();return P(e,j(We,{get each(){return Oe()},children:e=>j(e1,{session:e})})),e}}),null),P(d,j(M,{get when(){return $e(()=>!!De())()&&De().attachments.length>0},get children(){var e=b$(),t=e.firstChild.nextSibling;return P(t,j(We,{get each(){return De().attachments},children:e=>{let t=/github\.com\/[^/]+\/[^/]+\/pull\/\d+/i.test(e.url);return(()=>{var n=R$(),r=n.firstChild;return P(r,()=>e.title),P(n,j(M,{get when(){return t&&oe.data?.previews[e.url]},get children(){return j(Mj,{get href(){return oe.data.previews[e.url]},class:`shrink-0`,title:`Vercel deploy preview of this PR's branch`,children:`Preview`})}}),null),P(n,j(M,{get when(){return $e(()=>!!(t&&se(e.url)))()&&se(e.url)!==`OPEN`},get children(){return j(Fj,{get class(){return`ml-auto shrink-0 ${se(e.url)===`MERGED`?`text-success`:`text-text-faint`}`},get children(){return se(e.url)===`MERGED`?`✓ merged`:`closed`}})}}),null),P(n,j(M,{get when(){return t&&(!se(e.url)||se(e.url)===`OPEN`)},get children(){return[j(Tj,{variant:`ghost`,class:`ml-auto size-6 shrink-0 px-0`,get loading(){return de()===e.url},get title(){return $e(()=>!!pe().has(e.url))()?`On ${ue()} — staging preview deploying`:`Merge into ${ue()} — deploys the staging preview domain`},"aria-label":`Merge to staging`,onClick:()=>void he(e.url),get children(){return j(M,{get when(){return pe().has(e.url)},get fallback(){return z$()},get children(){return I$()}})}}),j(Tj,{variant:`primary`,class:`h-6 shrink-0 px-2 text-[11px]`,get loading(){return ce()===e.url},get title(){return oe.isError?`PR state unknown — restart the bridge (npx linear-grab-bridge) for live merge status`:`Squash-merge this PR via the bridge gh — reviewed the demo? Ship it.`},onClick:()=>void be(e.url),get children(){return L$()}})]}}),null),D(t=>{var n=e.url,i=e.title;return n!==t.e&&it(r,`href`,t.e=n),i!==t.t&&it(r,`title`,t.t=i),t},{e:void 0,t:void 0}),n})()}}),null),P(t,j(M,{get when(){return ve()},get children(){return j(Rj,{get message(){return ve()}})}}),null),e}}),null),P(d,j(M,{get when(){return $e(()=>!!De())()&&De().comments.length>0},get children(){var e=x$();return e.firstChild,P(e,j(Ge,{get each(){return De().comments},children:e=>{let t=e();return(()=>{var e=B$(),n=e.firstChild,r=n.firstChild,i=r.nextSibling;return P(r,()=>t.user?.displayName??t.user?.name??`Unknown`),P(n,j(M,{get when(){return t.user?.app},get children(){return j(Fj,{children:`agent`})}}),i),P(i,()=>Bj(t.createdAt)),P(e,j(Y$,{get text(){return t.body}}),null),e})()}}),null),e}}),null),P(d,j(M,{get when(){return $e(()=>!!(De()&&De().comments.length===0))()&&Oe().length===0},get children(){return j(Lj,{title:`No activity yet`,children:`Comments and agent sessions will appear here.`})}}),null),P(d,j(M,{get when(){return $e(()=>!!n.isError)()&&!De()},get children(){return j(Lj,{title:`Failed to load issue`,get children(){return n.error?.message??`Unknown error`}})}}),null),P(v,j(M,{get when(){return _()},get children(){return j(Rj,{get message(){return _()}})}}),y),P(v,j(Oj,{rows:2,placeholder:`Reply — steer the agent or add context…`,get value(){return h()},onInput:e=>g(e.target.value),get disabled(){return Ee.isPending}}),y),P(y,j(kj,{class:`min-w-0 flex-1`,get value(){return Se()},onChange:e=>{we=!0,Ce(e.currentTarget.value)},get children(){return[j(M,{get when(){return p()},get children(){var e=S$();return D(()=>e.selected=Se()===`local`),e}}),j(We,{get each(){return xe()},children:(e,t)=>(()=>{var n=V$(),r=n.firstChild.nextSibling;return r.nextSibling,P(n,(()=>{var e=$e(()=>xe().length>1);return()=>e()?` #${t()+1}`:``})(),r),P(n,()=>Bj(e.createdAt),null),D(()=>n.selected=Se()===`thread:${e.id}`),D(()=>n.value=`thread:${e.id}`),n})()}),j(M,{get when(){return i.data?.cursorAgentId},get children(){var e=C$(),t=e.firstChild.nextSibling;return t.nextSibling,P(e,()=>i.data?.cursorAgentName??`Cursor`,t),D(()=>e.selected=Se()===`new`),e}}),(()=>{var e=w$();return D(()=>e.selected=Se()===`comment`),e})()]}}),null),P(y,j(Tj,{variant:`ghost`,get class(){return`size-7 shrink-0 px-0 ${ij()===`composer`?`text-accent`:``}`},get title(){return ij()===`composer`?`Pick mode ON — every pick appends here. Click to stop.`:`Pick elements — refs append to this reply (stays on until toggled off or sent)`},"aria-label":`Pick element for reply`,onClick:E,get children(){return T$()}}),null),P(y,j(Tj,{variant:`ghost`,get class(){return`size-7 shrink-0 px-0 ${ee().phase===`recording`?`text-danger`:``}`},get title(){return ee().phase===`recording`?`Stop recording — the GIF auto-attaches to this reply`:`Record a GIF from this thread (auto-attaches when done)`},"aria-label":`Record GIF`,onClick:ne,get children(){return j(M,{get when(){return ee().phase===`recording`},get fallback(){return H$()},get children(){return E$()}})}}),null),P(y,j(Tj,{variant:`ghost`,class:`size-7 shrink-0 px-0`,get loading(){return S()},title:`Attach captures — element refs, screenshots, region shots, recording GIF`,"aria-label":`Attach captures`,onClick:()=>void w(),get children(){return D$()}}),null),P(y,j(Tj,{class:`min-w-[52px] shrink-0`,variant:`primary`,get loading(){return Ee.isPending},get disabled(){return h().trim().length===0},onClick:()=>Ee.mutate(),get children(){return O$()}}),null),t})()}function e1(e){let t=k(()=>{let t=e.session.status;return/complete|done/i.test(t)?`var(--color-success)`:/await|pending|elicit/i.test(t)?`var(--color-warn)`:`var(--color-accent)`}),n=k(()=>{let t=e.session.status;return/active/i.test(t)?`Working…`:/awaitingInput|elicit/i.test(t)?`Needs input`:/complete/i.test(t)?`Complete`:/error/i.test(t)?`Error`:/pending/i.test(t)?`Queued`:t}),r=k(()=>e.session.activities.filter(e=>e.content?.body||e.content?.action).slice(-15)),i,a=!0,o=()=>{i&&(a=i.scrollTop+i.clientHeight>=i.scrollHeight-40)};return O(()=>{let e=r().length;!i||!e||!a||requestAnimationFrame(()=>{i&&(i.scrollTop=i.scrollHeight)})}),(()=>{var a=K$(),s=a.firstChild,c=s.firstChild;return P(s,j(M,{get when(){return/active|pending/i.test(e.session.status)},get children(){return j(Ej,{size:12})}}),c),P(s,j(Fj,{get color(){return t()},get children(){return n()}}),c),P(s,j(M,{get when(){return e.session.appUser?.displayName},get children(){var t=U$();return P(t,()=>e.session.appUser.displayName),t}}),c),P(c,()=>Bj(e.session.updatedAt)),P(s,j(M,{get when(){return e.session.externalLinks?.[0]},children:e=>j(Mj,{get href(){return e().url},class:`shrink-0`,title:`Open this run on the agent's site`,get children(){return e().label||`Cursor`}})}),null),P(a,j(M,{get when(){return e.session.summary},get children(){var t=W$();return P(t,()=>e.session.summary),t}}),null),P(a,j(M,{get when(){return r().length>0},get children(){var e=G$();e.addEventListener(`scroll`,o);var t=i;return typeof t==`function`?pt(t,e):i=e,P(e,j(Ge,{get each(){return r()},children:e=>j(M,{get when(){return e().content.action},get fallback(){return(()=>{var t=J$();return P(t,j(Y$,{get text(){return e().content.body??``}})),D(()=>st(t,`lg-md text-[11.5px] leading-relaxed break-words ${e().content.__typename===`AgentActivityErrorContent`?`text-danger`:`text-text`}`)),t})()},get children(){var t=q$(),n=t.firstChild.nextSibling;return n.nextSibling,P(t,()=>e().content.action,n),P(t,()=>e().content.parameter,null),t}})})),e}}),null),a})()}rt([`click`]);var t1=N(`<svg aria-hidden width=11 height=11 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M1 4.5A7 7 0 0 1 13.5 3"></path><path d="M15 11.5A7 7 0 0 1 2.5 13"></path><polyline points="1 1 1 5 5 5"></polyline><polyline points="15 11 15 15 11 15">`),n1=N(`<div class="flex flex-col gap-1.5">`),r1=N(`<div class="flex h-full flex-col"><div class="border-border flex shrink-0 items-center justify-between border-b px-3 py-2"><span class="text-text inline-flex items-center gap-1.5 text-[12px] font-semibold"> Cloud agents</span><span class="text-text-faint text-[10.5px] tabular-nums"> working · updated </span></div><div class="border-border flex shrink-0 items-center gap-1 border-b px-3 py-1.5"></div><div class="min-h-0 flex-1 overflow-y-auto pt-2 pb-3 pl-2 pr-3">`),i1=N(`<button>`),a1=N(`<div class="grid place-items-center py-10">`),o1=N(`<button class="flex min-w-0 flex-1 cursor-pointer items-center gap-1.5 text-left"title="View the thread here"><span class="font-mono text-text-dim shrink-0 text-[11px]"></span><span class="text-text hover:text-accent min-w-0 truncate text-[12.5px] font-medium transition-colors">`),s1=N(`<p class="text-text-dim line-clamp-2 cursor-pointer text-[11.5px] leading-snug break-words">`),c1=N(`<span class="text-text-dim text-[11px]">`),l1=N(`<svg width=12 height=12 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 aria-hidden><circle cx=8 cy=8 r=6></circle><circle cx=8 cy=8 r=1.6 fill=currentColor stroke=none>`),u1=N(`<div class="bg-surface border-border flex flex-col gap-1.5 rounded-lg border p-2.5"><div class="flex min-w-0 items-center gap-1.5"><span class="text-text-faint ml-auto shrink-0 text-[10.5px] tabular-nums"></span></div><div class="flex min-w-0 items-center gap-1.5"><span class=ml-auto>`),d1=N(`<span aria-hidden class="size-2 shrink-0 rounded-full">`),f1=N(`<span class="text-text-dim text-[12.5px]">Conversation session`);function p1(){let e=_r(()=>({queryKey:[`cloud-sessions`],queryFn:gO,refetchInterval:12e3})),t=[{id:`all`,label:`All`},{id:`working`,label:`Working`},{id:`input`,label:`Needs input`},{id:`done`,label:`Done`}],[n,r]=br(`cloud:filter`,`all`),i=k(()=>(e.data??[]).filter(e=>{switch(n()){case`working`:return/active|pending/i.test(e.status);case`input`:return/awaitingInput|elicit/i.test(e.status);case`done`:return/complete/i.test(e.status);default:return!0}})),a=e=>/active/i.test(e)?{word:`Working…`,color:`var(--color-accent)`}:/awaitingInput|elicit/i.test(e)?{word:`Needs input`,color:`var(--color-warn)`}:/complete/i.test(e)?{word:`Complete`,color:`var(--color-success)`}:/error/i.test(e)?{word:`Error`,color:`var(--color-danger)`}:{word:e,color:`var(--color-text-dim)`},o=e=>{let t=[...e.activities].reverse().find(e=>e.content?.body||e.content?.action);return t?t.content.action?`→ ${t.content.action} ${t.content.parameter??``}`:t.content.body??``:e.summary??``},s=k(()=>(e.data??[]).filter(e=>/active|pending/i.test(e.status)).length),[c,l]=T(null);return j(M,{get when(){return!c()},get fallback(){return j($$,{get issueId(){return c()},onBack:()=>l(null)})},get children(){var c=r1(),u=c.firstChild,d=u.firstChild,f=d.firstChild,p=d.nextSibling,m=p.firstChild,h=u.nextSibling,g=h.nextSibling;return P(d,j(Aj,{size:13}),f),P(p,s,m),P(p,()=>Bj(e.dataUpdatedAt||Date.now()),null),P(h,j(We,{each:t,children:e=>(()=>{var t=i1();return t.$$click=()=>r(e.id),P(t,()=>e.label),D(()=>st(t,`h-6 shrink-0 cursor-pointer rounded-md px-2 text-[11px] font-medium transition-colors ${n()===e.id?`bg-accent-soft text-accent`:`text-text-dim hover:bg-surface-2`}`)),t})()}),null),P(h,j(Tj,{class:`ml-auto size-6 px-0`,get loading(){return e.isFetching},title:`Refresh`,"aria-label":`Refresh sessions`,onClick:()=>void e.refetch(),get children(){return t1()}}),null),P(g,j(M,{get when(){return i().length>0},get fallback(){return j(M,{get when(){return!e.isPending},get fallback(){return(()=>{var e=a1();return P(e,j(Ej,{})),e})()},get children(){return j(Lj,{title:`No cloud agent sessions`,children:`Delegate an issue to Cursor from the Draft tab and its live session appears here.`})}})},get children(){var e=n1();return P(e,j(Ge,{get each(){return i()},children:e=>(()=>{var t=u1(),n=t.firstChild,r=n.firstChild,i=n.nextSibling,s=i.firstChild;return P(n,j(M,{get when(){return/active|pending/i.test(e().status)},get fallback(){return(()=>{var t=d1();return D(n=>dt(t,`background`,a(e().status).color)),t})()},get children(){return j(Ej,{})}}),r),P(n,j(M,{get when(){return e().issue},get fallback(){return f1()},get children(){var t=o1(),n=t.firstChild,r=n.nextSibling;return t.$$click=()=>l(e().issue.id),P(n,()=>e().issue.identifier),P(r,()=>e().issue.title),t}}),r),P(r,()=>Bj(e().updatedAt)),P(t,j(M,{get when(){return o(e())},get children(){var t=s1();return t.$$click=()=>e().issue&&l(e().issue.id),P(t,()=>o(e())),t}}),i),P(i,j(Fj,{get color(){return a(e().status).color},get children(){return a(e().status).word}}),s),P(i,j(M,{get when(){return e().issue},get children(){return[j(Ij,{get color(){return e().issue.state.color}}),(()=>{var t=c1();return P(t,()=>e().issue.state.name),t})()]}}),s),P(i,j(M,{get when(){return e().issue},get children(){return[j(Tj,{variant:`ghost`,class:`size-6 shrink-0 px-0`,title:`Open the thread — steer this agent`,"aria-label":`Open thread`,onClick:()=>l(e().issue.id),get children(){return l1()}}),j(Mj,{get href(){return e().issue.url},class:`shrink-0`,children:`Linear`})]}}),null),t})()})),e}})),c}})}rt([`click`]);var m1=N(`<div class="flex flex-col gap-1.5">`),h1=N(`<div class="flex h-full flex-col"><div class="border-border flex shrink-0 items-center justify-between border-b px-3 py-2"><span class="text-text text-[12px] font-semibold">Running now</span><span class="text-text-faint text-[10.5px] tabular-nums"> agent<!> active</span></div><div class="min-h-0 flex-1 overflow-y-auto pt-2 pb-3 pl-2 pr-3">`),g1=N(`<span class="font-mono text-text-dim shrink-0 text-[11px]">`),_1=N(`<svg width=12 height=12 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 aria-hidden><circle cx=8 cy=8 r=6></circle><circle cx=8 cy=8 r=1.6 fill=currentColor stroke=none>`),v1=N(`<div class="bg-surface border-border flex flex-col gap-1.5 rounded-lg border p-2.5"><div class="flex min-w-0 items-center gap-1.5"><button class="flex min-w-0 flex-1 cursor-pointer items-center gap-1.5 text-left"><span class="text-text hover:text-accent min-w-0 truncate text-[12.5px] font-medium transition-colors"></span></button><span class="text-text-faint ml-auto shrink-0 text-[10.5px] tabular-nums"></span></div><p class="text-text-dim line-clamp-2 text-[11.5px] leading-snug break-words"></p><div class="flex min-w-0 items-center gap-1.5"><span class=ml-auto>`);function y1(){let e=_r(()=>({queryKey:[`cloud-sessions`],queryFn:gO,refetchInterval:12e3})),t=_r(()=>({queryKey:[`bridge-tasks`],queryFn:NO,refetchInterval:5e3,retry:0})),n=_r(()=>({queryKey:[`my-issues`],queryFn:fO,refetchInterval:3e4})),r=k(()=>{let r=(e.data??[]).filter(e=>/active|pending|awaitingInput|elicit/i.test(e.status)).map(e=>({kind:`cloud`,at:Date.parse(e.updatedAt),session:e})),i=(t.data??[]).filter(e=>e.status===`running`).map(e=>({kind:`local`,at:e.startedAt,task:e,issueId:(n.data??[]).find(t=>e.title.startsWith(t.identifier))?.id}));return[...r,...i].sort((e,t)=>t.at-e.at)}),[i,a]=T(null),o=e=>/awaitingInput|elicit/i.test(e)?{word:`Needs input`,color:`var(--color-warn)`}:{word:`Working…`,color:`var(--color-accent)`},s=e=>{let t=[...e.activities].reverse().find(e=>e.content?.body||e.content?.action);return t?t.content.action?`→ ${t.content.action} ${t.content.parameter??``}`:t.content.body??``:e.summary??``};return j(M,{get when(){return!i()},get fallback(){return j($$,{get issueId(){return i()},onBack:()=>a(null)})},get children(){var e=h1(),t=e.firstChild,n=t.firstChild.nextSibling,i=n.firstChild,c=i.nextSibling;c.nextSibling;var l=t.nextSibling;return P(n,()=>r().length,i),P(n,()=>r().length===1?``:`s`,c),P(l,j(M,{get when(){return r().length>0},get fallback(){return j(Lj,{title:`Nothing running`,children:`Delegate an issue from the Draft tab — cloud (Cursor) and local (Claude Code) agents working right now appear here together.`})},get children(){var e=m1();return P(e,j(Ge,{get each(){return r()},children:e=>(()=>{var t=v1(),n=t.firstChild,r=n.firstChild,i=r.firstChild,c=r.nextSibling,l=n.nextSibling,u=l.nextSibling,d=u.firstChild;return P(n,j(Ej,{size:12}),r),P(n,j(Fj,{get title(){return e().kind===`cloud`?`Cursor cloud agent`:`Local Claude Code`},get children(){return[$e(()=>$e(()=>e().kind===`cloud`)()?j(Aj,{}):j(jj,{})),$e(()=>e().kind===`cloud`?`cloud`:`local`)]}}),r),r.$$click=()=>{let t=e();t.kind===`cloud`&&t.session.issue?a(t.session.issue.id):t.kind===`local`&&nj(`local`)},P(r,j(M,{get when(){return e().kind===`cloud`},get children(){var t=g1();return P(t,()=>e().session.issue?.identifier),t}}),i),P(i,(()=>{var t=$e(()=>e().kind===`cloud`);return()=>t()?e().session.issue?.title??`Conversation session`:e().task.title})()),P(c,()=>Bj(e().at)),P(l,(()=>{var t=$e(()=>e().kind===`cloud`);return()=>t()?s(e().session):e().task.lastText})()),P(u,j(M,{get when(){return e().kind===`cloud`},get fallback(){return j(Fj,{color:`var(--color-accent)`,children:`Working…`})},get children(){return j(Fj,{get color(){return o(e().session.status).color},get children(){return o(e().session.status).word}})}}),d),P(u,j(Tj,{variant:`ghost`,class:`size-6 shrink-0 px-0`,get title(){return e().kind===`cloud`?`Open the thread — steer this agent`:`Open the live session in the Local tab`},"aria-label":`Open thread`,onClick:()=>{let t=e();t.kind===`cloud`&&t.session.issue?a(t.session.issue.id):t.kind===`local`&&nj(`local`)},get children(){return _1()}}),null),D(()=>it(r,`title`,e().kind===`cloud`?`View the thread here`:`Open the Local tab`)),t})()})),e}})),e}})}rt([`click`]),Br();var b1=N(`<div class="border-accent/40 bg-accent-soft self-end rounded-lg border px-2.5 py-1.5"><p class="text-accent mb-0.5 text-[9.5px] font-semibold tracking-wide uppercase">You</p><div class="lg-md text-text text-[11.5px] leading-relaxed break-words">`),x1=N(`<div><p></p><div class="lg-md text-text text-[11.5px] leading-relaxed break-words">`),S1=N(`<p>`),C1=N(`<span class="text-text-faint max-w-[55%] truncate text-[10.5px] tabular-nums"> running · `),w1=N(`<div class="flex flex-col gap-1.5">`),T1=N(`<div class="flex h-full flex-col"><div class="border-border flex shrink-0 items-center justify-between border-b px-3 py-2"><span class="text-text text-[12px] font-semibold">Local Claude Code</span></div><div class="min-h-0 flex-1 overflow-y-auto pt-2 pb-3 pl-2 pr-3">`),E1=N(`<span class="bg-surface-2 border-border font-mono mt-2 block rounded-md border px-2 py-1.5 text-[11px] select-all">npx linear-grab-bridge`),D1=N(`<span class="text-text-faint text-[10.5px] tabular-nums">ctx <!> · out `),O1=N(`<div class="flex min-w-0 items-center gap-1.5"><span class="font-mono text-text-faint min-w-0 truncate text-[10.5px]">`),k1=N(`<option selected>`),A1=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=currentColor aria-hidden><path d="M4.5 2.8a.8.8 0 0 1 1.22-.68l8 5.2a.8.8 0 0 1 0 1.36l-8 5.2a.8.8 0 0 1-1.22-.68V2.8Z">`),j1=N(`<span class="text-success text-[12px] leading-none">✓`),M1=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linejoin=round aria-hidden><path d="M14 10a2 2 0 0 1-2 2H6l-3.5 2.5V4a2 2 0 0 1 2-2H12a2 2 0 0 1 2 2v6Z">`),N1=N(`<svg width=11 height=11 viewBox="0 0 16 16"fill=currentColor aria-hidden><rect x=3 y=3 width=10 height=10 rx=1.5>`),P1=N(`<span class="font-mono text-text-faint min-w-0 truncate text-[10.5px]">`),F1=N(`<div class="border-border bg-bg flex flex-col gap-1 rounded-md border p-2"><div class="flex min-w-0 items-center gap-1.5"><span class="text-text-dim text-[10.5px] font-semibold tracking-wide uppercase">Changes</span><span class="ml-auto shrink-0 text-[10.5px] tabular-nums"><span class=text-success>+</span> <span class=text-danger>−`),I1=N(`<div class="border-border bg-bg flex max-h-80 flex-col gap-1.5 overflow-y-auto rounded-md border py-2 pl-2 pr-3">`),L1=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round aria-hidden><circle cx=8 cy=8 r=2.2></circle><path d="M8 1v3M8 12v3M1 8h3M12 8h3">`),R1=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden><path d="M13 7.5 8.2 12.3a3.2 3.2 0 0 1-4.5-4.5L8.9 2.6a2.1 2.1 0 0 1 3 3L7.1 10.4a1 1 0 0 1-1.5-1.5l4.3-4.3">`),z1=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round aria-hidden><path d="M8 2v4M8 10v4M2 8h4M10 8h4M4.5 4.5 6 6M11.5 11.5 10 10M11.5 4.5 10 6M4.5 11.5 6 10">`),B1=N(`<span class="inline-block min-w-[4ch] text-center">Send`),V1=N(`<div class="flex flex-col gap-1.5"><div class="flex items-center gap-1"><span class="text-text-faint min-w-0 flex-1 truncate text-[10.5px]">`),H1=N(`<div class="bg-surface border-border flex flex-col gap-1.5 rounded-lg border p-2.5"><div class="flex min-w-0 items-center gap-1.5"><span class="text-text min-w-0 truncate text-[12.5px] font-medium"></span><span class="text-text-faint ml-auto shrink-0 text-[10.5px] tabular-nums"></span></div><p class="text-text-dim text-[11.5px] leading-snug break-words"></p><div class="flex flex-wrap items-center gap-1.5"></div><div class="flex items-center gap-1">`),U1=N(`<span aria-hidden class="size-2 shrink-0 rounded-full">`),W1=N(`<div class="flex min-w-0 items-center gap-1.5">`),G1=N(`<option>`),K1=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 aria-hidden><circle cx=8 cy=8 r=6></circle><circle cx=8 cy=8 r=1.6 fill=currentColor stroke=none>`),q1=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden><path d="M2.5 3.5 6 7 2.5 10.5M7.5 12.5h6">`),J1=N(`<span class=text-success>+`),Y1=N(`<span class=text-danger>−`),X1=N(`<div class="flex min-w-0 items-center gap-1.5"><span class="font-mono text-text-dim min-w-0 flex-1 truncate text-[10.5px]"></span><span class="shrink-0 text-[10px] tabular-nums">`),Z1=N(`<span class=text-text-faint>bin`),Q1=N(`<div class="flex min-w-0 items-center gap-1.5"><span class="font-mono text-text-dim min-w-0 flex-1 truncate text-[10.5px]"></span><span class="text-success shrink-0 text-[10px]">new`),$1=N(`<div class="flex min-w-0 items-center gap-1.5 pt-0.5"><a target=_blank rel=noreferrer class="text-accent min-w-0 truncate text-[11px] hover:underline">`),e0=N(`<p class="text-text-faint text-[11px]">Waiting for output…`),t0=[{id:``,label:`Default model`},{id:`fable`,label:`Fable 5`},{id:`opus`,label:`Opus`},{id:`sonnet`,label:`Sonnet`},{id:`haiku`,label:`Haiku`}];function n0(e,t){let n=e.split(`.`).map(Number),r=t.split(`.`).map(Number);for(let e=0;e<3;e++)if((n[e]??0)!==(r[e]??0))return(n[e]??0)<(r[e]??0);return!1}var r0=e=>e==null?`–`:e>=1e3?`${(e/1e3).toFixed(e>=1e5?0:1)}k`:String(e);function i0(){let e=sr(),t=_r(()=>({queryKey:[`bridge-health`],queryFn:MO,refetchInterval:5e3,retry:0})),n=_r(()=>({queryKey:[`bridge-tasks`],queryFn:NO,refetchInterval:3e3,enabled:!!t.data?.ok})),[r,i]=T(null),a=_r(()=>({queryKey:[`my-issues`],queryFn:fO,staleTime:15e3})),o=e=>{let t=e.title.match(/^([A-Z][A-Z0-9]*-\d+)/)?.[1];return t?a.data?.find(e=>e.identifier===t):void 0},s=_r(()=>({queryKey:[`bridge-task`,r()],queryFn:()=>PO(r()),refetchInterval:1500,enabled:!!r()&&!!t.data?.ok})),c=_r(()=>({queryKey:[`bridge-diff`,r()],queryFn:()=>BO(r()),refetchInterval:6e3,enabled:!!r()&&!!t.data?.ok})),l=()=>{e.invalidateQueries({queryKey:[`bridge-tasks`]}),e.invalidateQueries({queryKey:[`bridge-task`,r()]})},u=vr(()=>({mutationFn:e=>RO(e),onSuccess:l})),[d,f]=br(`local:message`,``),[p,m]=T(!1),[h,g]=T(0),_=_r(()=>({queryKey:[`grab`],queryFn:Dr,enabled:ij()===`local`})),v=()=>{g(Date.now()),oj(`local`),HZ().catch(()=>oj(`capture`))};O(()=>{if(ij()!==`local`)return;let e=(_.data??[]).filter(e=>e.grabbedAt>=h());if(!e.length)return;let t=e.map(e=>{let t=e.source?.filePath?` — \`${e.source.filePath}${e.source.lineNumber==null?``:`:${e.source.lineNumber}`}\``:``;return`- \`<${e.componentName??e.tagName??`element`}>\`${t}`}).join(`
|
|
267
|
-
`);f(e=>`${e?`${e}\n`:``}${t}\n`),oj(`capture`)});let y=async()=>{m(!0);try{let e=await qQ();e&&f(t=>`${t?`${t}\n`:``}${e}\n`)}finally{m(!1)}},b=vr(()=>({mutationFn:e=>IO(e.id,e.text),onSuccess:()=>{f(``),l()}})),x=vr(()=>({mutationFn:e=>LO(e.id,e.model),onSuccess:t=>{e.setQueryData([`bridge-tasks`],e=>e?.map(e=>e.id===t.id?t:e)),l()}})),S=vr(()=>({mutationFn:e=>zO(e),onSuccess:l})),C,w=!0,E=()=>{C&&(w=C.scrollTop+C.clientHeight>=C.scrollHeight-48)};O(()=>{let e=s.data?.tail?.length??0;r(),!(!C||!e||!w)&&requestAnimationFrame(()=>{C&&(C.scrollTop=C.scrollHeight)})});let[ee,te]=T(null),A=async e=>{try{await navigator.clipboard.writeText(KO(e)),te(e.id),setTimeout(()=>te(null),1800)}catch{}},ne=e=>e===`running`?`var(--color-accent)`:e===`done`?`var(--color-success)`:e===`stopped`?`var(--color-warn)`:`var(--color-danger)`,re=e=>{let t=e.line.kind,n=k(()=>r$(e.line.text));return t===`user`?(()=>{var e=b1(),t=e.firstChild.nextSibling;return D(()=>t.innerHTML=n()),e})():t===`assistant`||t===`result`?(()=>{var e=x1(),r=e.firstChild,i=r.nextSibling;return st(e,`bg-surface rounded-lg border px-2.5 py-1.5 ${t===`result`?`border-success/40`:`border-border`}`),st(r,`mb-0.5 text-[9.5px] font-semibold tracking-wide uppercase ${t===`result`?`text-success`:`text-text-faint`}`),P(r,t===`result`?`Result`:`Claude`),D(()=>i.innerHTML=n()),e})():(()=>{var n=S1();return st(n,`font-mono px-1 text-[10px] leading-relaxed break-words ${t===`subagent`?`text-warn`:t===`stderr`?`text-danger`:`text-text-faint`}`),P(n,()=>e.line.text),n})()};return(()=>{var e=T1(),a=e.firstChild;a.firstChild;var l=a.nextSibling;return P(a,j(M,{get when(){return t.data?.ok},get fallback(){return j(Fj,{class:`text-danger`,children:`bridge offline`})},get children(){return[j(M,{get when(){return n0(t.data.version,`0.15.1`)},get children(){return j(Fj,{class:`text-warn`,title:`Ctrl+C the old process, then: npx linear-grab-bridge`,get children(){return[`v`,$e(()=>t.data.version),` outdated — restart`]}})}}),(()=>{var e=C1(),n=e.firstChild;return P(e,()=>t.data.active,n),P(e,()=>t.data.cwd.split(`/`).slice(-2).join(`/`),null),D(()=>it(e,`title`,t.data?.cwd)),e})()]}}),null),P(l,j(M,{get when(){return t.data?.ok},get fallback(){return j(Lj,{title:`Bridge not running`,get children(){return[`Start it in your repo's terminal:`,E1(),`Then delegate from the Draft tab ("Local Claude Code") or watch tasks here. Sessions stay interactive — send follow-ups, switch models, interrupt, resume in your terminal. History persists across restarts.`]}})},get children(){return j(M,{get when(){return(n.data??[]).length>0},get fallback(){return j(Lj,{title:`No local tasks yet`,children:`Create an issue in Draft with "Delegate to → Local Claude Code", and it appears here with live status and a conversation view.`})},get children(){var e=w1();return P(e,j(Ge,{get each(){return n.data},children:e=>(()=>{var t=H1(),n=t.firstChild,a=n.firstChild,l=a.nextSibling,m=n.nextSibling,h=m.nextSibling,g=h.nextSibling;return P(n,j(M,{get when(){return e().status===`running`},get fallback(){return(()=>{var t=U1();return D(n=>dt(t,`background`,ne(e().status))),t})()},get children(){return j(Ej,{})}}),a),P(a,()=>e().title),P(l,()=>Bj(e().startedAt)),P(m,()=>e().lastText),P(h,j(Fj,{get color(){return ne(e().status)},get children(){return e().status}}),null),P(h,j(Fj,{get children(){return e().model??`default model`}}),null),P(h,j(M,{get when(){return e().pendingModel},get children(){return j(Fj,{class:`text-warn`,get children(){return[`→ `,$e(()=>e().pendingModel),` next msg`]}})}}),null),P(h,j(M,{get when(){return e().subagents>0},get children(){return j(Fj,{class:`text-warn`,get children(){return[`⛓ `,$e(()=>e().subagents),` subagents`]}})}}),null),P(h,j(M,{get when(){return e().usage},get children(){var t=D1(),n=t.firstChild.nextSibling;return n.nextSibling,P(t,()=>r0(e().usage.contextTokens),n),P(t,()=>r0(e().usage.outputTokens),null),P(t,(()=>{var t=$e(()=>!!e().usage.costUsd);return()=>t()?` · $${e().usage.costUsd.toFixed(2)}`:``})(),null),t}}),null),P(t,j(M,{get when(){return o(e())},children:e=>(()=>{var t=W1();return P(t,j(Fj,{get children(){return e().state.name}}),null),P(t,j(Mj,{get href(){return e().url},children:`Open in Linear`}),null),t})()}),g),P(t,j(M,{get when(){return $e(()=>!!e().worktree)()&&!e().worktree.removed},get children(){var t=O1(),n=t.firstChild;return P(t,j(Fj,{class:`text-warn`,children:`⎇ worktree`}),n),P(n,()=>e().worktree.branch),P(t,j(M,{get when(){return e().status!==`running`},get children(){return j(Tj,{variant:`ghost`,class:`ml-auto h-6 shrink-0 px-2 text-[11px]`,get loading(){return S.isPending},get title(){return`Remove the worktree at ${e().worktree.path} — the branch (and PR) survive`},onClick:()=>S.mutate(e().id),children:`Remove`})}}),null),D(()=>it(n,`title`,e().worktree.path)),t}}),g),P(g,j(kj,{class:`h-7 w-auto min-w-0 flex-1 text-[11px]`,get value(){return e().pendingModel??e().model??``},onChange:t=>x.mutate({id:e().id,model:t.currentTarget.value}),title:`Model — applies from the next message`,get children(){return[j(We,{each:t0,children:t=>(()=>{var n=G1();return P(n,()=>t.label),D(()=>n.selected=(e().pendingModel??e().model??``)===t.id),D(()=>n.value=t.id),n})()}),j(M,{get when(){return!t0.some(t=>t.id===(e().pendingModel??e().model??``))},get children(){var t=k1();return P(t,()=>e().pendingModel??e().model),D(()=>t.value=e().pendingModel??e().model??``),t}})]}}),null),P(g,j(M,{get when(){return $e(()=>e().status!==`running`)()&&e().sessionId},get children(){return j(Tj,{variant:`ghost`,class:`size-7 px-0`,get loading(){return b.isPending},get title(){return`Resume — continues this session${e().pendingModel?` on ${e().pendingModel}`:``}`},"aria-label":`Resume session`,onClick:()=>b.mutate({id:e().id,text:`Continue where you left off. If the work is already complete, finish any remaining closeout steps (PR, Linear update, announcement).`}),get children(){return A1()}})}}),null),P(g,j(M,{get when(){return o(e())},children:e=>j(Tj,{variant:`ghost`,class:`size-7 px-0`,title:`Open the issue's Activity thread`,onClick:()=>nj(`activity`,e().id),get children(){return K1()}})}),null),P(g,j(Tj,{variant:`ghost`,class:`size-7 px-0`,get disabled(){return!e().sessionId},get title(){return $e(()=>!!e().sessionId)()?`Copy resume command · session ${e().sessionId.slice(0,8)}…`:`No session yet`},onClick:()=>void A(e()),get children(){return j(M,{get when(){return ee()===e().id},get fallback(){return q1()},get children(){return j1()}})}}),null),P(g,j(Tj,{variant:`ghost`,class:`size-7 px-0`,get title(){return r()===e().id?`Hide thread`:`Open thread — chat & changes`},onClick:()=>i(r()===e().id?null:e().id),get children(){return M1()}}),null),P(g,j(M,{get when(){return e().status===`running`},get children(){return j(Tj,{variant:`danger`,class:`size-7 px-0`,get loading(){return u.isPending},title:`Interrupt — the session stays resumable`,onClick:()=>u.mutate(e().id),get children(){return N1()}})}}),null),P(t,j(M,{get when(){return r()===e().id},get children(){return[j(M,{get when(){return $e(()=>!!c.data)()&&(c.data.files.length||c.data.untracked.length||c.data.prs.length)},get children(){var e=F1(),t=e.firstChild,n=t.firstChild.nextSibling,r=n.firstChild;r.firstChild;var i=r.nextSibling.nextSibling;return i.firstChild,P(t,j(M,{get when(){return c.data.branch},get children(){var e=P1();return P(e,()=>c.data.branch),e}}),n),P(r,()=>c.data.totalAdded,null),P(i,()=>c.data.totalDeleted,null),P(e,j(We,{get each(){return c.data.files},children:e=>(()=>{var t=X1(),n=t.firstChild,r=n.nextSibling;return P(n,()=>e.path),P(r,j(M,{get when(){return!e.binary},get fallback(){return Z1()},get children(){return[(()=>{var t=J1();return t.firstChild,P(t,()=>e.added,null),t})(),` `,(()=>{var t=Y1();return t.firstChild,P(t,()=>e.deleted,null),t})()]}})),D(()=>it(n,`title`,e.path)),t})()}),null),P(e,j(We,{get each(){return c.data.untracked},children:e=>(()=>{var t=Q1(),n=t.firstChild;return it(n,`title`,e),P(n,e),t})()}),null),P(e,j(We,{get each(){return c.data.prs},children:e=>(()=>{var t=$1(),n=t.firstChild;return P(t,j(Fj,{class:`text-accent`,get children(){return[`PR · `,$e(()=>e.state.toLowerCase())]}}),n),P(n,()=>e.title),D(t=>{var r=e.url,i=e.title;return r!==t.e&&it(n,`href`,t.e=r),i!==t.t&&it(n,`title`,t.t=i),t},{e:void 0,t:void 0}),t})()}),null),e}}),(()=>{var e=I1();return e.addEventListener(`scroll`,E),pt(e=>{C=e,w=!0},e),P(e,j(M,{get when(){return(s.data?.tail??[]).length>0},get fallback(){return e0()},get children(){return j(Ge,{get each(){return s.data?.tail??[]},children:e=>j(re,{get line(){return e()}})})}})),e})(),(()=>{var t=V1(),n=t.firstChild,r=n.firstChild;return P(t,j(Oj,{rows:2,get placeholder(){return e().status===`running`?`Message the working agent — it queues into the live session…`:`Follow-up — resumes the session…`},get value(){return d()},onInput:e=>f(e.currentTarget.value)}),n),P(r,(()=>{var t=$e(()=>!!e().alive);return()=>t()?`live session`:e().sessionId?`resumes on send`:`no session`})()),P(n,j(Tj,{variant:`ghost`,class:`size-7 shrink-0 px-0`,title:`Pick elements on the page — refs drop into this message`,"aria-label":`Pick element`,onClick:v,get children(){return L1()}}),null),P(n,j(Tj,{variant:`ghost`,class:`size-7 shrink-0 px-0`,get loading(){return p()},title:`Attach captures — element refs, screenshots, region shots, recording GIF`,"aria-label":`Attach captures`,onClick:()=>void y(),get children(){return R1()}}),null),P(n,j(Tj,{variant:`ghost`,class:`size-7 shrink-0 px-0`,get disabled(){return $e(()=>!e().alive)()&&!e().sessionId},title:`Compact the session — frees context (sends /compact)`,"aria-label":`Compact session`,onClick:()=>b.mutate({id:e().id,text:`/compact`}),get children(){return z1()}}),null),P(n,j(Tj,{variant:`primary`,class:`shrink-0`,get loading(){return b.isPending},get disabled(){return!d().trim()||!e().alive&&!e().sessionId},onClick:()=>b.mutate({id:e().id,text:d().trim()}),get children(){return B1()}}),null),t})()]}}),null),t})()})),e}})}})),e})()}Br();var a0=N(`<span class="text-text-faint text-[10.5px] tabular-nums">/<!> from your issues`),o0=N(`<div class="flex flex-col gap-1.5">`),s0=N(`<div class="flex h-full flex-col"><div class="border-border flex shrink-0 items-center justify-between border-b px-3 py-2"><span class="text-text text-[12px] font-semibold">Pull requests</span></div><div class="border-border flex shrink-0 items-center gap-1.5 border-b px-3 py-1.5"><div class="bg-surface-2 border-border flex shrink-0 rounded-md border p-0.5"></div></div><div class="min-h-0 flex-1 overflow-y-auto pt-2 pb-3 pl-2 pr-3">`),c0=N(`<span class="text-warn text-[10.5px]"title="Merge states come from gh via the bridge">states unknown — restart the bridge`),l0=N(`<button>`),u0=N(`<span class="text-success text-[11px]">✓`),d0=N(`<span class="text-[12px] leading-none">✓`),f0=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round aria-hidden><circle cx=8 cy=8 r=6></circle><circle cx=8 cy=8 r=1.6 fill=currentColor stroke=none>`),p0=N(`<span class="text-success text-[12px] leading-none">✓`),m0=N(`<div class="bg-surface border-border flex flex-col gap-1.5 rounded-lg border p-2.5"><a target=_blank rel=noreferrer class="text-accent truncate text-[12.5px] font-medium hover:underline"></a><div class="flex min-w-0 items-center gap-1.5"><span class="font-mono text-text-dim shrink-0 text-[11px]"></span><span class="text-text-dim truncate text-[11.5px]"></span><span class="text-text-faint ml-auto shrink-0 text-[10.5px] tabular-nums"></span></div><div class="flex min-w-0 flex-wrap items-center gap-1.5"><div class="ml-auto flex shrink-0 items-center gap-1">`),h0=N(`<svg width=12 height=12 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden><path d="M8 2 14 5.5 8 9 2 5.5 8 2Z"></path><path d="M2 10.5 8 14l6-3.5">`),g0=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round aria-hidden><circle cx=4 cy=3.5 r=1.5></circle><circle cx=4 cy=12.5 r=1.5></circle><circle cx=12 cy=8 r=1.5></circle><path d="M4 5v6M4 6.5c0 2 2 3 4.5 3h2">`),_0=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linejoin=round aria-hidden><rect x=5.5 y=5.5 width=9 height=9 rx=1.5></rect><path d="M10.5 5.5v-2a2 2 0 0 0-2-2h-5a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h2">`),v0=/github\.com\/[^/]+\/[^/]+\/pull\/\d+/i;function y0(e){let t=_r(()=>({queryKey:[`my-issues`],queryFn:fO,refetchInterval:15e3})),n=k(()=>(t.data??[]).flatMap(e=>(e.attachments??[]).filter(e=>v0.test(e.url)).map(t=>({issue:e,attachment:t})))),r=_r(()=>({queryKey:[`bridge-tasks`],queryFn:NO,refetchInterval:1e4,retry:0})),i=_r(()=>({queryKey:[`pr-status`,n().map(e=>e.attachment.url).sort().join(`|`)],queryFn:()=>HO(n().map(e=>e.attachment.url)),refetchInterval:3e4,retry:0,enabled:n().length>0})),a=e=>E().has(e.attachment.url)?`MERGED`:i.data?.statuses[e.attachment.url],o=e=>!!r.data?.some(t=>t.title.startsWith(e.issue.identifier)),[s,c]=T(`all`),[l,u]=T(``),d=k(()=>{let e=l().trim().toLowerCase();return n().filter(t=>{let n=t.issue.state.type,r=a(t);return!(s()===`review`&&(n!==`started`||r===`MERGED`||r===`CLOSED`)||s()===`open`&&(r===`MERGED`||r===`CLOSED`||!(n===`started`||n===`unstarted`||n===`backlog`))||s()===`done`&&!(n===`completed`||r===`MERGED`||r===`CLOSED`)||e&&![t.attachment.title,t.issue.title,t.issue.identifier].join(` `).toLowerCase().includes(e))})}),f=_r(()=>({queryKey:[`settings`],queryFn:Tr})),p=()=>f.data?.stagingBranch?.trim()||`staging`,[m,h]=T(null),[g,_]=T(new Set),[v,y]=T(null),b=async e=>{h(e),y(null);try{await UO(e,p()),_(t=>new Set(t).add(e))}catch(e){y(e instanceof Error?e.message:String(e))}finally{h(null)}},[x,S]=T(null),[C,w]=T(null),[E,O]=T(new Set),ee=async e=>{w(e);try{await WO(e),O(t=>new Set(t).add(e))}catch{}finally{w(null)}},te=async e=>{try{await navigator.clipboard.writeText(e.attachment.url),S(e.attachment.id),setTimeout(()=>S(null),1500)}catch{}};return(()=>{var r=s0(),f=r.firstChild;f.firstChild;var h=f.nextSibling,_=h.firstChild,v=h.nextSibling;return P(f,j(M,{get when(){return!i.isError},get fallback(){return c0()},get children(){var e=a0(),t=e.firstChild,r=t.nextSibling;return r.nextSibling,P(e,()=>d().length,t),P(e,()=>n().length,r),e}}),null),P(_,j(We,{each:[{id:`all`,label:`All`},{id:`review`,label:`Review`},{id:`open`,label:`Open`},{id:`done`,label:`Done`}],children:e=>(()=>{var t=l0();return t.$$click=()=>c(e.id),P(t,()=>e.label),D(()=>st(t,`rounded-[5px] px-2 py-0.5 text-[11px] font-medium transition-colors ${s()===e.id?`bg-surface-3 text-text`:`text-text-dim hover:text-text cursor-pointer`}`)),t})()})),P(h,j(Dj,{class:`h-6 min-w-0 flex-1 text-[11px]`,placeholder:`Search PRs…`,get value(){return l()},onInput:e=>u(e.currentTarget.value)}),null),P(v,j(M,{get when(){return d().length>0},get fallback(){return j(Lj,{title:`No PRs yet`,get children(){return $e(()=>!!t.isError)()?`Connect Linear in Settings.`:n().length>0?`No PRs match the current filter.`:`PRs opened by delegated agents appear here as soon as they link back to your issues.`}})},get children(){var t=o0();return P(t,j(We,{get each(){return d()},children:t=>(()=>{var n=m0(),r=n.firstChild,s=r.nextSibling,c=s.firstChild,l=c.nextSibling,u=l.nextSibling,d=s.nextSibling,f=d.firstChild;return P(r,()=>t.attachment.title||t.attachment.url),P(n,j(M,{get when(){return i.data?.previews[t.attachment.url]},get children(){return j(Mj,{get href(){return i.data.previews[t.attachment.url]},class:`shrink-0 self-start`,title:`Vercel deploy preview of this PR's branch`,children:`Preview`})}}),s),P(s,j(Ij,{get color(){return t.issue.state.color}}),c),P(c,()=>t.issue.identifier),P(l,()=>t.issue.title),P(u,()=>Bj(t.issue.updatedAt)),P(d,j(Fj,{get children(){return t.issue.state.name}}),f),P(d,j(M,{get when(){return t.issue.delegate},get children(){return j(Fj,{class:`text-accent`,get children(){return[j(Aj,{}),` `,$e(()=>t.issue.delegate.displayName)]}})}}),f),P(d,j(M,{get when(){return o(t)},get children(){return j(Fj,{class:`text-warn`,get children(){return[j(jj,{}),` local`]}})}}),f),P(d,j(Mj,{get href(){return t.issue.url},class:`shrink-0`,title:`Open the issue in Linear`,children:`Linear`}),f),P(f,j(M,{get when(){return $e(()=>!!a(t))()&&a(t)!==`OPEN`},get children(){return j(Fj,{get class(){return a(t)===`MERGED`?`text-success`:`text-text-faint`},get children(){return a(t)===`MERGED`?`✓ merged`:`closed`}})}}),null),P(f,j(Tj,{variant:`ghost`,class:`size-7 shrink-0 px-0`,get loading(){return m()===t.attachment.url},get title(){return $e(()=>!!g().has(t.attachment.url))()?`On ${p()} — staging preview deploying`:`Merge into ${p()} — deploys the staging preview domain`},"aria-label":`Merge to staging`,onClick:()=>void b(t.attachment.url),get children(){return j(M,{get when(){return g().has(t.attachment.url)},get fallback(){return h0()},get children(){return u0()}})}}),null),P(f,j(Tj,{variant:`primary`,class:`size-7 px-0`,get classList(){return{hidden:!!a(t)&&a(t)!==`OPEN`}},get loading(){return C()===t.attachment.url},get disabled(){return E().has(t.attachment.url)},get title(){return E().has(t.attachment.url)?`Merged`:`Squash-merge this PR (bridge gh)`},"aria-label":`Merge PR`,onClick:()=>void ee(t.attachment.url),get children(){return j(M,{get when(){return E().has(t.attachment.url)},get fallback(){return g0()},get children(){return d0()}})}}),null),P(f,j(Tj,{variant:`ghost`,class:`size-7 px-0`,title:`Open the issue's Activity thread`,"aria-label":`Open issue activity`,onClick:()=>{nj(`activity`,t.issue.id),e.onOpenIssue()},get children(){return f0()}}),null),P(f,j(Tj,{variant:`ghost`,class:`size-7 px-0`,title:`Copy PR URL`,"aria-label":`Copy PR URL`,onClick:()=>void te(t),get children(){return j(M,{get when(){return x()===t.attachment.id},get fallback(){return _0()},get children(){return p0()}})}}),null),D(e=>{var n=t.attachment.url,i=t.attachment.title;return n!==e.e&&it(r,`href`,e.e=n),i!==e.t&&it(r,`title`,e.t=i),e},{e:void 0,t:void 0}),n})()})),t}})),r})()}rt([`click`]),Br();function b0(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}async function x0(e){let t=b0(crypto.getRandomValues(new Uint8Array(32))),n=await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(t)),r=b0(new Uint8Array(n)),i=b0(crypto.getRandomValues(new Uint8Array(16))),a=chrome.identity.getRedirectURL(),o=new URL(`https://linear.app/oauth/authorize`);o.searchParams.set(`client_id`,e),o.searchParams.set(`redirect_uri`,a),o.searchParams.set(`response_type`,`code`),o.searchParams.set(`scope`,`read,write`),o.searchParams.set(`state`,i),o.searchParams.set(`code_challenge`,r),o.searchParams.set(`code_challenge_method`,`S256`);let s=await chrome.identity.launchWebAuthFlow({url:o.toString(),interactive:!0});if(!s)throw Error(`OAuth flow was cancelled`);let c=new URL(s).searchParams;if(c.get(`state`)!==i)throw Error(`OAuth state mismatch`);let l=c.get(`code`);if(!l)throw Error(c.get(`error_description`)??`No authorization code returned`);let u=await fetch(`https://api.linear.app/oauth/token`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:new URLSearchParams({grant_type:`authorization_code`,code:l,redirect_uri:a,client_id:e,code_verifier:t})}),d=await u.json().catch(()=>null);if(!u.ok||!d?.access_token)throw Error(`Token exchange failed — check the OAuth app callback URL and client id`);await Er({linearAccessToken:d.access_token,linearOauthClientId:e})}async function S0(){await Er({linearAccessToken:void 0,linearApiKey:void 0})}Br(),Sr(),Fx(),gD();var C0=N(`<div class="bg-surface-2 border-border flex rounded-md border p-0.5">`),w0=N(`<span class="text-text-faint text-[10.5px] leading-snug">Cloud: picking an element opens the panel to draft & delegate to the Cursor agent. Local (react-grab style): picking auto-copies the element's context — source, stack, and your skills/memory paths — straight to the clipboard for a local Claude Code or Cursor session; the panel stays out of the way. Both share the same picker; switch anytime.`),T0=N(`<label class="flex cursor-pointer items-center gap-2 select-none"><input type=checkbox class="accent-accent rounded"><span class="text-text text-[12px]">Element screenshots`),E0=N(`<span class="text-text-faint text-[10.5px] leading-snug">Captures a highlighted screenshot of each picked element and attaches it to the issue. Costs a beat on huge pages — with this off, picking is instant (pure react-grab speed).`),D0=N(`<span class=text-text>Connected as <span class=font-medium></span> · <span class=text-text-dim>`),O0=N(`<div class="bg-surface border-border flex items-center justify-between rounded-lg border p-2.5"><span class="text-text text-[12px]">`),k0=N(`<option value>Select a team…`),A0=N(`<option value>No project`),j0=N(`<div class="flex flex-wrap gap-1">`),M0=N(`<label class="flex items-start gap-2"><input type=checkbox class="accent-accent mt-0.5"><span class="flex flex-col gap-0.5"><span class=text-[12px]>Let agents close out Linear themselves</span><span class="text-text-faint text-[10.5px] leading-snug">Embeds your Linear API key + raw GraphQL closeout recipes in every issue's Agent instructions — cloud agent VMs have no authenticated Linear MCP, so without this they can't comment, attach media, or move the issue. The key is visible to anyone who can read the issue.`),N0=N(`<p class="text-text-dim text-[11px]">No agents found — install the Cursor integration in Linear first.`),P0=N(`<span class="text-text-faint text-[10.5px] leading-snug">Empty = the default above (computer-use testing, video demo, PR + review babysitting).`),F0=N(`<div class="flex flex-col gap-1.5">`),I0=N(`<div class="flex flex-col gap-1"><span class="text-text-dim text-[11px] font-medium">Mode</span><div class="bg-surface-2 border-border flex rounded-md border p-0.5"></div><span class="text-text-faint text-[10.5px] leading-snug">Beside page squeezes the app next to the panel, DevTools-style — nothing gets covered. Also toggleable from the dock icon in the panel header.`),L0=N(`<div class="flex flex-col gap-1"><span class="text-text-dim text-[11px] font-medium">Dock side</span><div class="bg-surface-2 border-border flex rounded-md border p-0.5"></div><span class="text-text-faint text-[10.5px] leading-snug">The launcher pill is draggable — park it anywhere it doesn't cover your app.`),R0=N(`<option value>Select a channel…`),z0=N(`<label class="flex cursor-pointer items-center gap-2 select-none"><input type=checkbox class="accent-accent rounded"><span class="text-text text-[12px]">Announce new issues on create`),B0=N(`<span class="text-text-faint text-[10.5px] leading-snug">⚠️ Tokens are embedded in issue Agent-instructions so agents can post the finished demo — everyone who can read the issue can read them. Use single-channel-scoped bots.`),V0=N(`<div class="flex flex-col gap-1"><span class="text-text-dim text-[11px] font-medium">Provider preference</span><div class="bg-surface-2 border-border flex rounded-md border p-0.5"><button>Auto</button><button>OpenAI</button><button>Anthropic`),H0=N(`<p class="text-text-dim text-[11px]">`),U0=N(`<div class=min-h-[2lh]>`),W0=N(`<ol class="text-text-faint flex list-decimal flex-col gap-1 pl-4 text-[11px] leading-relaxed"><li>Pick an element on your running dev app.</li><li>Draft the issue (AI optional).</li><li>Create + delegate — Cursor's cloud agent fixes it and opens a PR.</li><li>Track and steer it from Activity.`),G0=N(`<div class="flex h-full flex-col gap-5 overflow-y-auto pt-3 pb-6 pl-3 pr-4">`),K0=N(`<button>`),q0=N(`<div class="flex gap-1.5">`),J0=N(`<p class="text-text-faint text-center text-[10.5px]">or`),Y0=N(`<span class="text-text-faint text-[10.5px] leading-snug">Register this callback URL in your Linear OAuth app config:<br><span class="font-mono text-[10.5px] break-all">`),X0=N(`<div class="flex flex-col gap-3">`),Z0=N(`<span class=text-text-dim>Connected — verifying…`),Q0=N(`<option> (<!>)`),$0=N(`<option>`),e2=N(`<button type=button><span class="mr-1 inline-block size-2 rounded-full align-middle">`),t2=N(`<option value>Select the agent…`),n2=N(`<option>#`),r2=N(`<p class="text-text-dim text-[11px]">No key set — AI drafting disabled, manual drafting still works.`);function i2(){let e=sr(),t=_r(()=>({queryKey:[`settings`],queryFn:Tr,staleTime:0})),n=k(()=>t.data??{});async function r(t,n=!1){await Er(t),await e.invalidateQueries({queryKey:[`settings`]}),n&&(await e.invalidateQueries({queryKey:[`viewer`]}),await e.invalidateQueries({queryKey:[`teams`]}),await e.invalidateQueries({queryKey:[`agents`]}),await e.invalidateQueries({queryKey:[`my-issues`]}))}let i=k(()=>!!(n().linearApiKey||n().linearAccessToken)),a=_r(()=>({queryKey:[`viewer`],queryFn:lO,enabled:i(),retry:0})),o=_r(()=>({queryKey:[`teams`],queryFn:uO,enabled:i()})),s=_r(()=>({queryKey:[`linear-projects`],queryFn:bO,enabled:i()})),c=_r(()=>({queryKey:[`linear-labels`],queryFn:xO,enabled:i()})),l=_r(()=>({queryKey:[`agents`],queryFn:dO,enabled:i()})),[u,d]=T(``),[f,p]=T(!1),[m,h]=T(``);async function g(){let e=u().trim();if(e){p(!0),h(``);try{await r({linearApiKey:e},!0),await lO(),d(``)}catch{h(`Key rejected — could not verify. Check the key and try again.`),await r({linearApiKey:void 0},!0)}finally{p(!1)}}}let[_,v]=T(``),[y,b]=T(!1),[x,S]=T(``);async function C(){let t=(_()||n().linearOauthClientId||``).trim();if(!t){S(`Enter an OAuth client ID first.`);return}b(!0),S(``);try{await x0(t),await e.invalidateQueries({queryKey:[`settings`]}),await e.invalidateQueries({queryKey:[`viewer`]}),await e.invalidateQueries({queryKey:[`teams`]}),await e.invalidateQueries({queryKey:[`agents`]}),await e.invalidateQueries({queryKey:[`my-issues`]})}catch(e){S(e instanceof Error?e.message:`OAuth flow failed.`)}finally{b(!1)}}let[w,E]=T(!1);async function O(){E(!0);try{await S0(),await e.invalidateQueries({queryKey:[`settings`]}),await e.invalidateQueries({queryKey:[`viewer`]}),await e.invalidateQueries({queryKey:[`teams`]}),await e.invalidateQueries({queryKey:[`agents`]}),await e.invalidateQueries({queryKey:[`my-issues`]})}finally{E(!1)}}let ee=xr?chrome.identity.getRedirectURL():null,te=_r(()=>({queryKey:[`slack-channels`,n().slackToken],queryFn:()=>ZO(n().slackToken),enabled:!!n().slackToken,retry:0,staleTime:6e4})),A=k(()=>Ax(n())),ne=k(()=>{let e=A();return e?`Drafting with ${e} — ${Nx[e].fast} (fast) / ${Nx[e].best} (best)`:null});return(()=>{var e=G0();return P(e,j(Pj,{title:`Workflow`,get children(){return[(()=>{var e=C0();return P(e,j(We,{each:[{id:`cloud`,label:`Cloud · Linear + Cursor`},{id:`local`,label:`Local · clipboard`}],children:e=>(()=>{var t=K0();return t.$$click=()=>void r({workflowMode:e.id}),P(t,()=>e.label),D(()=>st(t,`flex-1 rounded-[5px] px-2 py-1 text-[11.5px] font-medium transition-colors ${(n().workflowMode??`cloud`)===e.id?`bg-surface-3 text-text`:`text-text-dim hover:text-text cursor-pointer`}`)),t})()})),e})(),w0()]}}),null),P(e,j(Pj,{title:`Capture`,get children(){return[(()=>{var e=T0(),t=e.firstChild;return t.addEventListener(`change`,e=>void r({captureShots:e.currentTarget.checked||void 0})),D(()=>t.checked=!!n().captureShots),e})(),E0()]}}),null),P(e,j(Pj,{title:`Linear`,get children(){return j(M,{get when(){return i()},get fallback(){return(()=>{var e=X0();return P(e,j(Nj,{label:`Personal API key`,hint:`Create one at linear.app → Settings → API — fastest path.`,get children(){return[(()=>{var e=q0();return P(e,j(Dj,{type:`password`,placeholder:`lin_api_…`,get value(){return u()},onInput:e=>d(e.currentTarget.value),"on:keydown":e=>{e.key===`Enter`&&g()}}),null),P(e,j(Tj,{variant:`primary`,get loading(){return f()},get disabled(){return!u().trim()},onClick:()=>void g(),class:`shrink-0`,children:`Connect`}),null),e})(),j(M,{get when(){return m()},get children(){return j(Rj,{get message(){return m()}})}})]}}),null),P(e,j(M,{when:xr,get children(){return[J0(),j(Nj,{label:`OAuth client ID`,get children(){return[(()=>{var e=q0();return P(e,j(Dj,{placeholder:`your-client-id`,get value(){return _()||n().linearOauthClientId||``},onInput:e=>v(e.currentTarget.value)}),null),P(e,j(Tj,{variant:`ghost`,get loading(){return y()},onClick:()=>void C(),class:`shrink-0 whitespace-nowrap`,children:`Connect with OAuth`}),null),e})(),j(M,{get when(){return x()},get children(){return j(Rj,{get message(){return x()}})}}),(()=>{var e=Y0(),t=e.firstChild.nextSibling.nextSibling;return P(t,ee),e})()]}})]}}),null),e})()},get children(){var e=O0(),t=e.firstChild;return P(t,j(M,{get when(){return!a.isLoading},get fallback(){return Z0()},get children(){return j(M,{get when(){return a.data},get fallback(){return j(M,{get when(){return a.isError},get fallback(){return Z0()},get children(){return j(Rj,{message:`Key rejected — reconnect`})}})},get children(){var e=D0(),t=e.firstChild.nextSibling,n=t.nextSibling.nextSibling;return P(t,()=>a.data.name),P(n,()=>a.data.email),e}})}})),P(e,j(Tj,{variant:`ghost`,get loading(){return w()},onClick:()=>void O(),class:`ml-2 shrink-0`,children:`Disconnect`}),null),e}})}}),null),P(e,j(M,{get when(){return i()},get children(){return j(Pj,{title:`Workspace`,get children(){return[j(Nj,{label:`Default team`,get children(){return j(kj,{get value(){return n().defaultTeamId??``},onChange:e=>{let t=e.currentTarget.value;r({defaultTeamId:t||void 0})},get disabled(){return o.isLoading},get children(){return[k0(),j(M,{get when(){return o.data},get children(){return j(We,{get each(){return o.data},children:e=>(()=>{var t=Q0(),r=t.firstChild,i=r.nextSibling;return i.nextSibling,P(t,()=>e.name,r),P(t,()=>e.key,i),D(()=>t.selected=e.id===n().defaultTeamId),D(()=>t.value=e.id),t})()})}})]}})}}),j(Nj,{label:`Default project`,hint:`Every issue created from the panel is filed into this project.`,get children(){return j(kj,{get value(){return n().defaultProjectId??``},onChange:e=>void r({defaultProjectId:e.currentTarget.value||void 0}),get disabled(){return s.isLoading},get children(){return[(()=>{var e=A0();return D(()=>e.selected=!n().defaultProjectId),e})(),j(We,{get each(){return s.data??[]},children:e=>(()=>{var t=$0();return P(t,()=>e.name),D(()=>t.selected=e.id===n().defaultProjectId),D(()=>t.value=e.id),t})()})]}})}}),j(Nj,{label:`Default labels`,hint:`Applied to every issue created from the panel.`,get children(){var e=j0();return P(e,j(We,{get each(){return c.data??[]},children:e=>{let t=()=>(n().defaultLabelIds??[]).includes(e.id);return(()=>{var i=e2(),a=i.firstChild;return i.$$click=()=>{let i=n().defaultLabelIds??[];r({defaultLabelIds:t()?i.filter(t=>t!==e.id):[...i,e.id]})},P(i,()=>e.name,null),D(n=>{var r=`h-6 cursor-pointer rounded-full border px-2.5 text-[11px] font-medium transition-colors ${t()?`bg-accent-soft text-accent border-accent/40`:`bg-surface-2 text-text-dim border-border hover:bg-surface-3`}`,o=e.color;return r!==n.e&&st(i,n.e=r),o!==n.t&&dt(a,`background`,n.t=o),n},{e:void 0,t:void 0}),i})()}})),e}}),(()=>{var e=M0(),t=e.firstChild;return t.addEventListener(`change`,e=>void r({shareLinearKey:e.currentTarget.checked})),D(()=>t.checked=!!n().shareLinearKey),e})(),j(Nj,{label:`Staging branch`,hint:`Stage buttons on PRs merge the PR branch here — point your staging domain (e.g. preview.ahmedbanihani.com) at this branch in Vercel.`,get children(){return j(Dj,{get value(){return n().stagingBranch??``},placeholder:`staging`,onChange:e=>void r({stagingBranch:e.currentTarget.value.trim()||void 0})})}}),j(Nj,{label:`Cursor agent`,hint:`App users in your workspace. Pick Cursor — requires the Cursor integration installed in Linear (workspace admin) with usage-based pricing enabled in Cursor.`,get children(){return j(M,{get when(){return $e(()=>!!l.data)()&&l.data.length===0},get fallback(){return j(kj,{get value(){return n().cursorAgentId??``},onChange:e=>{let t=e.currentTarget.value;if(!t){r({cursorAgentId:void 0,cursorAgentName:void 0,cursorAgentUrl:void 0});return}let n=l.data?.find(e=>e.id===t);n&&r({cursorAgentId:n.id,cursorAgentName:n.displayName,cursorAgentUrl:n.url??void 0})},get disabled(){return l.isLoading},get children(){return[t2(),j(M,{get when(){return l.data},get children(){return j(We,{get each(){return l.data},children:e=>(()=>{var t=$0();return P(t,()=>e.displayName),D(()=>t.selected=e.id===n().cursorAgentId),D(()=>t.value=e.id),t})()})}})]}})},get children(){return N0()}})}}),j(Nj,{label:`Default repository`,hint:`Appended to delegated issues as [repo=…] so Cursor picks the right repo.`,get children(){return j(Dj,{placeholder:`owner/repository`,get value(){return n().defaultRepo??``},onBlur:e=>{r({defaultRepo:e.currentTarget.value.trim()||void 0})}})}}),j(Nj,{label:`Cursor cloud model`,hint:`Appended as [model=…] — e.g. claude-opus-4-8, gpt-5.2, composer. Empty = Cursor's default.`,get children(){return j(Dj,{placeholder:`Cursor's default`,get value(){return n().cursorModel??``},onBlur:e=>{r({cursorModel:e.currentTarget.value.trim()||void 0})}})}}),j(Nj,{label:`Agent instructions`,hint:`Appended to every issue as '### Agent instructions' and given to the AI draft. Add demo credentials (username/password) so the agent can log in, test, and record its video. Careful: credentials become visible to everyone who can read the issue.`,get children(){return[j(Oj,{rows:5,placeholder:hD,get value(){return n().issueTemplate??``},onBlur:e=>{r({issueTemplate:e.currentTarget.value.trim()||void 0})}}),P0()]}}),j(Nj,{label:`Dev server log URL`,hint:`Tail of your dev-server log attached to issues (and fed to AI drafts). Serve the log over HTTP: "dev:http": "next dev 2>&1 | tee public/dev-server.log" (gitignore it), then use /dev-server.log here. Empty = disabled.`,get children(){return j(Dj,{placeholder:`/dev-server.log`,get value(){return n().logUrl??``},onBlur:e=>{r({logUrl:e.currentTarget.value.trim()||void 0})}})}}),j(Nj,{label:`Log lines to attach`,hint:`Trailing lines included in the issue (10–500).`,get children(){return j(Dj,{type:`number`,min:`10`,max:`500`,placeholder:`100`,get value(){return n().logLines??``},onBlur:e=>{let t=Number(e.currentTarget.value);r({logLines:Number.isFinite(t)&&t>0?Math.min(500,Math.max(10,Math.round(t))):void 0})}})}}),j(Nj,{label:`Skills & memory paths`,hint:`One path per line. The cloud agent works in a full repo checkout, so committed paths (e.g. .claude/skills/apple-hig-design-principles) are readable directly — every issue gets a MANDATORY-reading section pointing at them. Repo-relative for cloud agents; absolute paths also work when you paste the issue into a local Claude Code session. Per project: these settings live per dev origin.`,get children(){return j(Oj,{rows:4,placeholder:`.claude/skills/apple-hig-design-principles
|
|
265
|
+
`)}</code></pre>`);continue}let i=e.match(/^(#{1,6})\s+(.*)$/);if(i){n.push(`<h4>${r$(i[2])}</h4>`),r++;continue}if(/^\s*[-*]\s+/.test(e)){let e=[];for(;r<t.length&&/^\s*[-*]\s+/.test(t[r]);)e.push(`<li>${r$(t[r].replace(/^\s*[-*]\s+/,``))}</li>`),r++;n.push(`<ul>${e.join(``)}</ul>`);continue}if(/^\s*\d+[.)]\s+/.test(e)){let e=[];for(;r<t.length&&/^\s*\d+[.)]\s+/.test(t[r]);)e.push(`<li>${r$(t[r].replace(/^\s*\d+[.)]\s+/,``))}</li>`),r++;n.push(`<ol>${e.join(``)}</ol>`);continue}let a=[];for(;r<t.length&&t[r].trim()&&!/^(#{1,6}\s|```|\s*[-*]\s+|\s*\d+[.)]\s+)/.test(t[r]);)a.push(t[r]),r++;n.push(`<p>${r$(a.join(`<br />`))}</p>`)}return n.join(``)}Br();var a$=N(`<div class="lg-md text-text text-[12px] leading-relaxed break-words">`),o$=N(`<div class="flex h-full flex-col">`),s$=N(`<span class="tabular-nums text-[10.5px] text-text-faint">live · updated `),c$=N(`<svg aria-hidden width=11 height=11 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M1 4.5A7 7 0 0 1 13.5 3"></path><path d="M15 11.5A7 7 0 0 1 2.5 13"></path><polyline points="1 1 1 5 5 5"></polyline><polyline points="15 11 15 15 11 15">`),l$=N(`<div class="flex-1 overflow-y-auto">`),u$=N(`<div class="min-h-0 flex-1 overflow-y-auto pl-2 pr-3"><div style=position:relative>`),d$=N(`<div class="flex h-full flex-col"><div class="border-border flex shrink-0 items-center justify-between border-b px-3 py-2"><span class="text-text text-[12px] font-semibold">My issues</span><div class="flex items-center gap-2"></div></div><div class="border-border flex shrink-0 items-center gap-1 border-b px-3 py-1.5">`),f$=N(`<button>`),p$=N(`<div style=position:absolute;top:0;left:0;width:100%>`),m$=N(`<button class="w-full cursor-pointer rounded-md px-2 py-1.5 text-left hover:bg-surface-2 transition-colors"><div class="flex items-center gap-1.5 min-w-0"><span class="font-mono text-[11px] text-text-dim shrink-0"></span><span class="truncate text-[12.5px] text-text"></span></div><div class="mt-0.5 flex items-center gap-1.5"><span class="ml-auto tabular-nums text-[10.5px] text-text-faint">`),h$=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden><path d="M10.5 3.5 6 8l4.5 4.5">`),g$=N(`<span class="font-mono text-[11px] text-text-dim shrink-0">`),_$=N(`<span class="truncate text-[12px] font-medium text-text">`),v$=N(`<span class="text-[11.5px] text-text-faint">Loading…`),y$=N(`<div class="flex items-center gap-2"><span class="text-[11px] text-text-dim">`),b$=N(`<div class="flex flex-col gap-2">`),x$=N(`<div class="flex flex-col gap-1"><span class="text-[10.5px] font-semibold uppercase tracking-wide text-text-dim">Attachments</span><div class="flex flex-col gap-1">`),S$=N(`<div class="flex flex-col gap-2.5"><span class="text-[10.5px] font-semibold uppercase tracking-wide text-text-dim">Comments`),C$=N(`<option value=local>Message local Claude Code session`),w$=N(`<option value=new>Start NEW agent (@<!>)`),T$=N(`<option value=comment>Comment only`),E$=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round aria-hidden><circle cx=8 cy=8 r=2.2></circle><path d="M8 1v3M8 12v3M1 8h3M12 8h3">`),D$=N(`<svg width=11 height=11 viewBox="0 0 16 16"fill=currentColor aria-hidden><rect x=3 y=3 width=10 height=10 rx=1.5>`),O$=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden><path d="M13 7.5 8.2 12.3a3.2 3.2 0 0 1-4.5-4.5L8.9 2.6a2.1 2.1 0 0 1 3 3L7.1 10.4a1 1 0 0 1-1.5-1.5l4.3-4.3">`),k$=N(`<span class="inline-block min-w-[4ch] text-left">Send`),A$=N(`<div class="flex h-full flex-col"><div class="border-border flex shrink-0 flex-col gap-1 border-b px-3 py-2"><div class="flex items-center gap-2"></div></div><div class="min-h-0 flex-1 overflow-y-auto pl-3 pr-4 py-3 flex flex-col gap-3"></div><div class="border-border shrink-0 border-t p-2.5 flex flex-col gap-1.5"><div class="flex items-center gap-2">`),j$=N(`<option selected>`),M$=N(`<svg width=10 height=10 viewBox="0 0 16 16"fill=currentColor aria-hidden><rect x=3 y=3 width=10 height=10 rx=1.5>`),N$=N(`<svg width=11 height=11 viewBox="0 0 16 16"fill=currentColor aria-hidden><path d="M4.5 2.8a.8.8 0 0 1 1.22-.68l8 5.2a.8.8 0 0 1 0 1.36l-8 5.2a.8.8 0 0 1-1.22-.68V2.8Z">`),P$=N(`<svg width=11 height=11 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden><path d="m2.5 4 3.5 4-3.5 4M8 12.5h5.5">`),F$=N(`<div class="bg-surface border-border overflow-clip rounded-lg border"><div class="border-border flex h-9 min-w-0 items-center justify-between gap-2 border-b px-3"><div class="flex min-w-0 items-center gap-1.5 text-[11.5px] font-medium"><span aria-hidden class="text-text-dim inline-flex"></span><span class="text-text shrink-0">Local Claude Code</span><span class="text-text-dim shrink-0">started by you</span><span class="text-text-faint shrink-0 tabular-nums">· </span></div></div><div class="flex h-9 items-center gap-1 pr-2"><button class="hover:bg-surface-2 flex h-full min-w-0 flex-1 cursor-pointer items-center gap-2 rounded-md px-3 text-left transition-colors"title="Open the live thread in the Local tab"><span></span><span class="text-text-faint min-w-0 flex-1 truncate text-[11.5px]"></span><svg width=14 height=14 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden class="text-text-dim shrink-0"><path d="m6 3.5 4.5 4.5L6 12.5">`),I$=N(`<option>`),L$=N(`<span class="text-success text-[11px]">✓`),R$=N(`<span class="inline-block min-w-[6ch] text-center">Merge`),z$=N(`<div class="flex min-w-0 items-center gap-1.5"><a target=_blank rel=noreferrer class="text-accent min-w-0 truncate text-[11.5px] hover:underline">`),B$=N(`<svg width=12 height=12 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden><path d="M8 2 14 5.5 8 9 2 5.5 8 2Z"></path><path d="M2 10.5 8 14l6-3.5">`),V$=N(`<div class="flex flex-col gap-0.5"><div class="flex items-center gap-1.5"><span class="text-[11px] font-medium text-text-dim"></span><span class="ml-auto tabular-nums text-[10.5px] text-text-faint">`),H$=N(`<option>Steer running agent<!> · `),U$=N(`<span class="bg-danger inline-block size-2.5 rounded-full"aria-hidden>`),W$=N(`<span class="text-[11px] text-text-dim">`),G$=N(`<svg width=12 height=12 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden class=transition-transform><path d="m3.5 6.5 4.5 4 4.5-4">`),K$=N(`<p class="text-[12px] text-text leading-relaxed whitespace-pre-wrap break-words">`),q$=N(`<div class="border-border mt-0.5 flex flex-col gap-1 overflow-y-auto border-t pt-1.5 pl-0.5 pr-3">`),J$=N(`<div class="bg-surface border-border rounded-lg border p-2.5 flex flex-col gap-1.5"><div class="flex items-center gap-1.5 flex-wrap"><span class="ml-auto tabular-nums text-[10.5px] text-text-faint">`),Y$=N(`<p class="font-mono text-text-faint text-[10.5px] leading-relaxed break-words">→ <!> `),X$=N(`<div>`);function Z$(e){let t=k(()=>i$(e.text));return(()=>{var e=a$();return D(()=>e.innerHTML=t()),e})()}function Q$(){let[e,t]=T(null);return O(()=>{let e=tj();e&&(t(e),ij())}),(()=>{var n=o$();return P(n,j(M,{get when(){return e()===null},get fallback(){return j(t1,{get issueId(){return e()},onBack:()=>t(null)})},get children(){return j($$,{onSelect:e=>t(e)})}})),n})()}function $$(e){let t,n=_r(()=>({queryKey:[`my-issues`],queryFn:fO,refetchInterval:12e3})),r=_r(()=>({queryKey:[`bridge-tasks`],queryFn:NO,refetchInterval:1e4,retry:0})),i=e=>(r.data??[]).some(t=>t.title.startsWith(e.identifier)),a=e=>e.state.type===`started`&&e.attachments?.some(e=>/github\.com\/[^/]+\/[^/]+\/pull\/\d+/i.test(e.url)),o=[{id:`all`,label:`All`},{id:`active`,label:`In Progress`},{id:`review`,label:`Review`},{id:`done`,label:`Done`},{id:`cloud`,label:`Cloud`},{id:`local`,label:`Local`}],[s,c]=br(`issues:filter`,`all`),[l,u]=br(`issues:search`,``),d=k(()=>{let e=l().trim().toLowerCase();return(n.data??[]).filter(t=>{if(e&&!`${t.identifier} ${t.title}`.toLowerCase().includes(e))return!1;switch(s()){case`active`:return t.state.type===`started`;case`review`:return!!a(t);case`done`:return t.state.type===`completed`;case`cloud`:return!!t.delegate;case`local`:return i(t);default:return!0}})}),f=LQ({get count(){return d().length},getScrollElement:()=>t,estimateSize:()=>56,overscan:5});return(()=>{var r=d$(),a=r.firstChild,p=a.firstChild.nextSibling,m=a.nextSibling;return P(p,j(M,{get when(){return n.dataUpdatedAt>0},get children(){var e=s$();return e.firstChild,P(e,()=>Vj(n.dataUpdatedAt),null),e}}),null),P(p,j(Ej,{class:`size-7 px-0`,get loading(){return n.isFetching},onClick:()=>void n.refetch(),title:`Refresh`,"aria-label":`Refresh issues`,get children(){return c$()}}),null),P(m,j(We,{each:o,children:e=>(()=>{var t=f$();return t.$$click=()=>c(e.id),P(t,()=>e.label),D(()=>st(t,`h-6 shrink-0 cursor-pointer rounded-md px-2 text-[11px] font-medium transition-colors ${s()===e.id?`bg-accent-soft text-accent`:`text-text-dim hover:bg-surface-2`}`)),t})()}),null),P(m,j(Oj,{class:`ml-auto h-6 w-28 text-[11px]`,placeholder:`Search…`,get value(){return l()},onInput:e=>u(e.currentTarget.value)}),null),P(r,j(M,{get when(){return n.isError},get children(){var e=l$();return P(e,j(Rj,{title:`Connect Linear in Settings`,get children(){return n.error?.message??`Unable to load issues.`}})),e}}),null),P(r,j(M,{get when(){return $e(()=>!n.isError&&!n.isPending)()&&d().length===0},get children(){var e=l$();return P(e,j(Rj,{title:`No issues found`,children:`Issues you create will appear here.`})),e}}),null),P(r,j(M,{get when(){return $e(()=>!n.isError)()&&d().length>0},get children(){var n=u$(),r=n.firstChild,a=t;return typeof a==`function`?pt(a,n):t=n,P(r,j(We,{get each(){return f.getVirtualItems()},children:t=>{let n=k(()=>d()[t.index]);return j(M,{get when(){return n()},get children(){var r=p$();return P(r,j(e1,{get issue(){return n()},get local(){return i(n())},get onSelect(){return e.onSelect}})),D(e=>dt(r,`transform`,`translateY(${t.start}px)`)),r}})}})),D(e=>dt(r,`height`,`${f.getTotalSize()}px`)),n}}),null),r})()}function e1(e){return(()=>{var t=m$(),n=t.firstChild,r=n.firstChild,i=r.nextSibling,a=n.nextSibling,o=a.firstChild;return t.$$click=()=>e.onSelect(e.issue.id),P(n,j(Lj,{get color(){return e.issue.state.color}}),r),P(r,()=>e.issue.identifier),P(i,()=>e.issue.title),P(a,j(Ij,{get children(){return e.issue.state.name}}),o),P(a,j(M,{get when(){return e.issue.delegate},get children(){return j(Ij,{class:`text-accent`,get children(){return[j(jj,{}),` `,$e(()=>e.issue.delegate.displayName)]}})}}),o),P(a,j(M,{get when(){return e.local},get children(){return j(Ij,{class:`text-accent`,get children(){return[j(Mj,{}),` local`]}})}}),o),P(a,j(M,{get when(){return $e(()=>!!(e.issue.state.type===`started`&&e.issue.delegate))()&&e.issue.attachments?.some(e=>/github\.com\/[^/]+\/[^/]+\/pull\/\d+/i.test(e.url))},get children(){return j(Ij,{color:`var(--color-warn)`,children:`needs review`})}}),o),P(o,()=>Vj(e.issue.updatedAt)),t})()}function t1(e){let t=sr(),n=_r(()=>({queryKey:[`issue`,e.issueId],queryFn:()=>pO(e.issueId),refetchInterval:8e3,enabled:!!e.issueId})),r=_r(()=>({queryKey:[`sessions`,e.issueId],queryFn:()=>hO(e.issueId),refetchInterval:8e3,enabled:!!e.issueId})),i=_r(()=>({queryKey:[`settings`],queryFn:Tr})),a=_r(()=>({queryKey:[`bridge-tasks`],queryFn:NO,refetchInterval:5e3,retry:0})),o=[{id:``,label:`Default model`},{id:`fable`,label:`Fable 5`},{id:`opus`,label:`Opus`},{id:`sonnet`,label:`Sonnet`},{id:`haiku`,label:`Haiku`}],s=vr(()=>({mutationFn:e=>LO(e.id,e.model),onSuccess:e=>{t.setQueryData([`bridge-tasks`],t=>t?.map(t=>t.id===e.id?e:t))}})),c=vr(()=>({mutationFn:e=>IO(e,`Continue where you left off. If the work is already complete, finish any remaining closeout steps (PR, Linear update, announcement).`),onSuccess:()=>void t.invalidateQueries({queryKey:[`bridge-tasks`]})})),l=vr(()=>({mutationFn:e=>RO(e),onSuccess:()=>void t.invalidateQueries({queryKey:[`bridge-tasks`]})})),[u,d]=T(!1),f=async e=>{try{await navigator.clipboard.writeText(qO(e)),d(!0),setTimeout(()=>d(!1),1800)}catch{}},p=k(()=>{let e=n.data?.identifier;return e?a.data?.find(t=>t.title.startsWith(e)):void 0}),m=e=>e.status===`running`?{word:`Working…`,cls:`text-accent`}:e.status===`done`?{word:`Finished`,cls:`text-success`}:e.status===`stopped`?{word:`Stopped`,cls:`text-warn`}:{word:`Error`,cls:`text-danger`},[h,g]=br(`activity-reply:${e.issueId}`,``),[_,v]=T(null),[y,b]=T(0),x=_r(()=>({queryKey:[`grab`],queryFn:Dr,enabled:aj()===`composer`})),[S,C]=T(!1),w=async()=>{C(!0),v(null);try{let e=await JQ();e?g(t=>`${t?`${t}\n`:``}${e}\n`):v(`Nothing captured yet — pick an element, capture a region, or record first.`)}catch(e){v(e instanceof Error?e.message:`Attach failed.`)}finally{C(!1)}},E=()=>{if(aj()===`composer`){sj(`capture`);return}b(Date.now()),sj(`composer`),UZ().catch(()=>sj(`capture`))};O(()=>{if(aj()!==`composer`)return;let e=(x.data??[]).filter(e=>e.grabbedAt>y());if(!e.length)return;let t=e.map(e=>{let t=e.source?.filePath?` — \`${e.source.filePath}${e.source.lineNumber==null?``:`:${e.source.lineNumber}`}\``:``;return`- \`<${e.componentName??e.tagName??`element`}>\`${t}`}).join(`
|
|
266
|
+
`);g(e=>`${e?`${e}\n`:``}${t}\n`),b(Math.max(...e.map(e=>e.grabbedAt)))});let[ee,te]=T(HD());ae(UD(te));let A=!1;O(()=>{ee().phase===`ready`&&A&&(A=!1,w())});let ne=()=>{ee().phase===`recording`?eO():(A=!0,$D())},re=/github\.com\/[^/]+\/[^/]+\/pull\/\d+/i,ie=k(()=>(n.data?.attachments??[]).map(e=>e.url).filter(e=>re.test(e))),oe=_r(()=>({queryKey:[`pr-status`,ie().sort().join(`|`)],queryFn:()=>HO(ie()),refetchInterval:3e4,retry:0,enabled:ie().length>0})),se=e=>ge().has(e)?`MERGED`:oe.data?.statuses[e],[ce,le]=T(null),ue=()=>i.data?.stagingBranch?.trim()||`staging`,[de,fe]=T(null),[pe,me]=T(new Set),he=async e=>{fe(e);try{await UO(e,ue()),me(t=>new Set(t).add(e))}catch{}finally{fe(null)}},[ge,_e]=T(new Set),[ve,ye]=T(null),be=async n=>{ye(null),le(n);try{await GO(n),_e(e=>new Set(e).add(n)),t.invalidateQueries({queryKey:[`issue`,e.issueId]}),t.invalidateQueries({queryKey:[`my-issues`]}),WQ()}catch(e){ye(e instanceof Error?`${e.message} (bridge must be running; gh needs merge rights)`:`Merge failed.`)}finally{le(null)}},xe=k(()=>{let e=n.data?TO(n.data.comments):[],t=new Set(e.map(e=>e.id));return[...(r.data??[]).filter(e=>e.comment?.id&&!t.has(e.comment.id)).map(e=>({id:e.comment.id,createdAt:e.updatedAt,body:``,user:{displayName:e.appUser?.displayName??`agent`,app:!0},parent:null})),...e]}),[Se,Ce]=T(`comment`),we=!1,Te=!1;O(()=>{if(Te||!n.data||!i.data)return;Te=!0;let e=xe();e.length?Ce(`thread:${e[0].id}`):n.data.delegate&&i.data.cursorAgentId&&Ce(`new`)}),O(()=>{we||p()&&(Se()===`comment`||Se()===`new`)&&Ce(`local`)}),O(()=>{if(we)return;let e=xe();e.length&&(Se()===`comment`||Se()===`new`)&&Ce(`thread:${e[0].id}`)});let Ee=vr(()=>({mutationFn:async()=>{let t=h().trim();if(!t)throw Error(`Message is empty`);let n=i.data??{},r=Se();if(r===`local`){let n=p();if(!n)throw Error(`Local session not found — is the bridge running?`);await IO(n.id,t),await CO(e.issueId,`🖥️ **→ local agent:** ${t}`).catch(()=>{})}else r.startsWith(`thread:`)?await CO(e.issueId,t,r.slice(7)):r===`new`&&n.cursorAgentId?await wO(e.issueId,t,{name:n.cursorAgentName,displayName:n.cursorAgentName??`Cursor`,url:n.cursorAgentUrl}):await CO(e.issueId,t)},onSuccess:()=>{g(``),v(null),sj(`capture`),t.invalidateQueries({queryKey:[`issue`,e.issueId]}),WQ()},onError:e=>{v(e.message??`Failed to send`)}})),De=k(()=>n.data),Oe=k(()=>r.data??[]);return(()=>{var t=A$(),r=t.firstChild,a=r.firstChild,d=r.nextSibling,v=d.nextSibling,y=v.firstChild;return P(a,j(Ej,{variant:`ghost`,class:`size-7 shrink-0 px-0`,title:`Back to issues`,"aria-label":`Back to issues`,"data-tip-pos":`right bottom`,get onClick(){return e.onBack},get children(){return h$()}}),null),P(a,j(M,{get when(){return De()},get children(){return[(()=>{var e=g$();return P(e,()=>De().identifier),e})(),(()=>{var e=_$();return P(e,()=>De().title),e})()]}}),null),P(a,j(M,{get when(){return $e(()=>!!n.isPending)()&&!De()},get children(){return v$()}}),null),P(r,j(M,{get when(){return De()},get children(){var e=y$(),t=e.firstChild;return P(e,j(Lj,{get color(){return De().state.color}}),t),P(t,()=>De().state.name),P(e,j(Nj,{get href(){return De().url},class:`ml-auto shrink-0`,children:`Open in Linear`}),null),e}}),null),P(d,j(M,{get when(){return p()},children:e=>{let t=()=>m(e());return(()=>{var n=F$(),r=n.firstChild,i=r.firstChild.firstChild,a=i.nextSibling.nextSibling.nextSibling;a.firstChild;var d=r.nextSibling,p=d.firstChild,m=p.firstChild,h=m.nextSibling;return P(i,j(Mj,{size:12})),P(a,()=>Vj(e().startedAt),null),P(r,j(Aj,{class:`h-6 w-auto max-w-[110px] shrink-0 text-[10.5px]`,get value(){return e().pendingModel??e().model??``},onChange:t=>s.mutate({id:e().id,model:t.currentTarget.value}),title:`Model — applies from the next message`,get children(){return[j(We,{each:o,children:t=>(()=>{var n=I$();return P(n,()=>t.label),D(()=>n.selected=(e().pendingModel??e().model??``)===t.id),D(()=>n.value=t.id),n})()}),j(M,{get when(){return!o.some(t=>t.id===(e().pendingModel??e().model??``))},get children(){var t=j$();return P(t,()=>e().pendingModel??e().model),D(()=>t.value=e().pendingModel??e().model??``),t}})]}}),null),p.$$click=()=>rj(`local`),P(p,j(M,{get when(){return e().status===`running`},get children(){return j(Dj,{size:12})}}),m),P(m,()=>t().word),P(h,(()=>{var t=$e(()=>e().status===`done`);return()=>t()?e().result??e().lastText:e().lastText})()),P(d,j(M,{get when(){return e().status===`running`},get children(){return j(Ej,{variant:`danger`,class:`size-6 shrink-0 px-0`,get loading(){return l.isPending},title:`Stop the session — resumable afterwards`,"aria-label":`Stop session`,onClick:()=>l.mutate(e().id),get children(){return M$()}})}}),null),P(d,j(M,{get when(){return $e(()=>e().status!==`running`)()&&e().sessionId},get children(){return j(Ej,{variant:`ghost`,class:`size-6 shrink-0 px-0`,get loading(){return c.isPending},get title(){return`Run again — resumes this session${e().pendingModel?` on ${e().pendingModel}`:``}`},"aria-label":`Resume session`,onClick:()=>c.mutate(e().id),get children(){return N$()}})}}),null),P(d,j(M,{get when(){return e().sessionId},get children(){return j(Ej,{variant:`ghost`,class:`size-6 shrink-0 px-0`,get title(){return u()?`Copied!`:`Copy terminal resume command (claude --resume …)`},"aria-label":`Copy resume command`,onClick:()=>void f(e()),get children(){return P$()}})}}),null),D(()=>st(m,`shrink-0 text-[11.5px] font-medium ${t().cls}`)),n})()}}),null),P(d,j(M,{get when(){return Oe().length>0},get children(){var e=b$();return P(e,j(We,{get each(){return Oe()},children:e=>j(n1,{session:e})})),e}}),null),P(d,j(M,{get when(){return $e(()=>!!De())()&&De().attachments.length>0},get children(){var e=x$(),t=e.firstChild.nextSibling;return P(t,j(We,{get each(){return De().attachments},children:e=>{let t=/github\.com\/[^/]+\/[^/]+\/pull\/\d+/i.test(e.url);return(()=>{var n=z$(),r=n.firstChild;return P(r,()=>e.title),P(n,j(M,{get when(){return t&&oe.data?.previews[e.url]},get children(){return j(Nj,{get href(){return oe.data.previews[e.url]},class:`shrink-0`,title:`Vercel deploy preview of this PR's branch`,children:`Preview`})}}),null),P(n,j(M,{get when(){return $e(()=>!!(t&&se(e.url)))()&&se(e.url)!==`OPEN`},get children(){return j(Ij,{get class(){return`ml-auto shrink-0 ${se(e.url)===`MERGED`?`text-success`:`text-text-faint`}`},get children(){return se(e.url)===`MERGED`?`✓ merged`:`closed`}})}}),null),P(n,j(M,{get when(){return t&&(!se(e.url)||se(e.url)===`OPEN`)},get children(){return[j(Ej,{variant:`ghost`,class:`ml-auto size-6 shrink-0 px-0`,get loading(){return de()===e.url},get disabled(){return pe().has(e.url)},get title(){return $e(()=>!!pe().has(e.url))()?`On ${ue()} — staging preview deploying`:`Merge into ${ue()} — deploys the staging preview domain`},"aria-label":`Merge to staging`,onClick:()=>void he(e.url),get children(){return j(M,{get when(){return pe().has(e.url)},get fallback(){return B$()},get children(){return L$()}})}}),j(M,{get when(){return pe().has(e.url)},get children(){return j(r1,{get url(){return e.url},get base(){return ue()}})}}),j(Ej,{variant:`primary`,class:`h-6 shrink-0 px-2 text-[11px]`,get loading(){return ce()===e.url},get title(){return oe.isError?`PR state unknown — restart the bridge (npx linear-grab-bridge) for live merge status`:`Squash-merge this PR via the bridge gh — reviewed the demo? Ship it.`},onClick:()=>void be(e.url),get children(){return R$()}})]}}),null),D(t=>{var n=e.url,i=e.title;return n!==t.e&&it(r,`href`,t.e=n),i!==t.t&&it(r,`title`,t.t=i),t},{e:void 0,t:void 0}),n})()}}),null),P(t,j(M,{get when(){return ve()},get children(){return j(zj,{get message(){return ve()}})}}),null),e}}),null),P(d,j(M,{get when(){return $e(()=>!!De())()&&De().comments.length>0},get children(){var e=S$();return e.firstChild,P(e,j(Ge,{get each(){return De().comments},children:e=>{let t=e();return(()=>{var e=V$(),n=e.firstChild,r=n.firstChild,i=r.nextSibling;return P(r,()=>t.user?.displayName??t.user?.name??`Unknown`),P(n,j(M,{get when(){return t.user?.app},get children(){return j(Ij,{children:`agent`})}}),i),P(i,()=>Vj(t.createdAt)),P(e,j(Z$,{get text(){return t.body}}),null),e})()}}),null),e}}),null),P(d,j(M,{get when(){return $e(()=>!!(De()&&De().comments.length===0))()&&Oe().length===0},get children(){return j(Rj,{title:`No activity yet`,children:`Comments and agent sessions will appear here.`})}}),null),P(d,j(M,{get when(){return $e(()=>!!n.isError)()&&!De()},get children(){return j(Rj,{title:`Failed to load issue`,get children(){return n.error?.message??`Unknown error`}})}}),null),P(v,j(M,{get when(){return _()},get children(){return j(zj,{get message(){return _()}})}}),y),P(v,j(kj,{rows:2,placeholder:`Reply — steer the agent or add context…`,get value(){return h()},onInput:e=>g(e.target.value),get disabled(){return Ee.isPending}}),y),P(y,j(Aj,{class:`min-w-0 flex-1`,get value(){return Se()},onChange:e=>{we=!0,Ce(e.currentTarget.value)},get children(){return[j(M,{get when(){return p()},get children(){var e=C$();return D(()=>e.selected=Se()===`local`),e}}),j(We,{get each(){return xe()},children:(e,t)=>(()=>{var n=H$(),r=n.firstChild.nextSibling;return r.nextSibling,P(n,(()=>{var e=$e(()=>xe().length>1);return()=>e()?` #${t()+1}`:``})(),r),P(n,()=>Vj(e.createdAt),null),D(()=>n.selected=Se()===`thread:${e.id}`),D(()=>n.value=`thread:${e.id}`),n})()}),j(M,{get when(){return i.data?.cursorAgentId},get children(){var e=w$(),t=e.firstChild.nextSibling;return t.nextSibling,P(e,()=>i.data?.cursorAgentName??`Cursor`,t),D(()=>e.selected=Se()===`new`),e}}),(()=>{var e=T$();return D(()=>e.selected=Se()===`comment`),e})()]}}),null),P(y,j(Ej,{variant:`ghost`,get class(){return`size-7 shrink-0 px-0 ${aj()===`composer`?`text-accent`:``}`},get title(){return aj()===`composer`?`Pick mode ON — every pick appends here. Click to stop.`:`Pick elements — refs append to this reply (stays on until toggled off or sent)`},"aria-label":`Pick element for reply`,onClick:E,get children(){return E$()}}),null),P(y,j(Ej,{variant:`ghost`,get class(){return`size-7 shrink-0 px-0 ${ee().phase===`recording`?`text-danger`:``}`},get title(){return ee().phase===`recording`?`Stop recording — the GIF auto-attaches to this reply`:`Record a GIF from this thread (auto-attaches when done)`},"aria-label":`Record GIF`,onClick:ne,get children(){return j(M,{get when(){return ee().phase===`recording`},get fallback(){return U$()},get children(){return D$()}})}}),null),P(y,j(Ej,{variant:`ghost`,class:`size-7 shrink-0 px-0`,get loading(){return S()},title:`Attach captures — element refs, screenshots, region shots, recording GIF`,"aria-label":`Attach captures`,onClick:()=>void w(),get children(){return O$()}}),null),P(y,j(Ej,{class:`min-w-[52px] shrink-0`,variant:`primary`,get loading(){return Ee.isPending},get disabled(){return h().trim().length===0},onClick:()=>Ee.mutate(),get children(){return k$()}}),null),t})()}function n1(e){let t=k(()=>{let t=e.session.status;return/complete|done/i.test(t)?`var(--color-success)`:/await|pending|elicit/i.test(t)?`var(--color-warn)`:`var(--color-accent)`}),n=k(()=>{let t=e.session.status;return/active/i.test(t)?`Working…`:/awaitingInput|elicit/i.test(t)?`Needs input`:/complete/i.test(t)?`Complete`:/error/i.test(t)?`Error`:/pending/i.test(t)?`Queued`:t}),r=k(()=>e.session.activities.filter(e=>e.content?.body||e.content?.action).slice(-15)),[i,a]=T(!1),o,s=!0,c=()=>{o&&(s=o.scrollTop+o.clientHeight>=o.scrollHeight-40)};return O(()=>{let e=r().length;!o||!e||!s||requestAnimationFrame(()=>{o&&(o.scrollTop=o.scrollHeight)})}),(()=>{var s=J$(),l=s.firstChild,u=l.firstChild;return P(l,j(M,{get when(){return/active|pending/i.test(e.session.status)},get children(){return j(Dj,{size:12})}}),u),P(l,j(Ij,{get color(){return t()},get children(){return n()}}),u),P(l,j(M,{get when(){return e.session.appUser?.displayName},get children(){var t=W$();return P(t,()=>e.session.appUser.displayName),t}}),u),P(u,()=>Vj(e.session.updatedAt)),P(l,j(M,{get when(){return e.session.externalLinks?.[0]},children:e=>j(Nj,{get href(){return e().url},class:`shrink-0`,title:`Open this run on the agent's site`,get children(){return e().label||`Cursor`}})}),null),P(l,j(Ej,{variant:`ghost`,class:`size-6 shrink-0 px-0`,get title(){return i()?`Collapse to a window`:`Expand — show the whole session feed`},get"aria-label"(){return i()?`Collapse feed`:`Expand feed`},onClick:()=>a(e=>!e),get children(){var e=G$();return D(t=>dt(e,`transform`,i()?`rotate(180deg)`:`none`)),e}}),null),P(s,j(M,{get when(){return e.session.summary},get children(){var t=K$();return P(t,()=>e.session.summary),t}}),null),P(s,j(M,{get when(){return r().length>0},get children(){var e=q$();e.addEventListener(`scroll`,c);var t=o;return typeof t==`function`?pt(t,e):o=e,P(e,j(Ge,{get each(){return r()},children:e=>j(M,{get when(){return e().content.action},get fallback(){return(()=>{var t=X$();return P(t,j(Z$,{get text(){return e().content.body??``}})),D(()=>st(t,`lg-md text-[11.5px] leading-relaxed break-words ${e().content.__typename===`AgentActivityErrorContent`?`text-danger`:`text-text`}`)),t})()},get children(){var t=Y$(),n=t.firstChild.nextSibling;return n.nextSibling,P(t,()=>e().content.action,n),P(t,()=>e().content.parameter,null),t}})})),D(()=>e.classList.toggle(`max-h-64`,!i())),e}}),null),s})()}function r1(e){let t=_r(()=>({queryKey:[`stage-status`,e.url,e.base],queryFn:()=>WO(e.url,e.base),refetchInterval:e=>e.state.data?.state===`success`||e.state.data?.state===`failure`?!1:8e3,retry:0}));return j(M,{get when(){return t.data},get fallback(){return j(Dj,{size:11})},children:e=>j(M,{get when(){return e().state===`success`},get fallback(){return j(M,{get when(){return e().state===`failure`||e().state===`error`},get fallback(){return j(Ij,{get title(){return`Staging deploy ${e().state}`},get children(){return[j(Dj,{size:10}),` staging…`]}})},get children(){return j(Ij,{class:`text-danger`,title:`Staging deploy failed — check Vercel`,children:`staging failed`})}})},get children(){return j(M,{get when(){return e().url},get fallback(){return j(Ij,{class:`text-success`,children:`staging ready`})},get children(){return j(Nj,{get href(){return e().url},class:`shrink-0`,title:`Open the staging deployment`,children:`staging ready`})}})}})})}rt([`click`]);var i1=N(`<svg aria-hidden width=11 height=11 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M1 4.5A7 7 0 0 1 13.5 3"></path><path d="M15 11.5A7 7 0 0 1 2.5 13"></path><polyline points="1 1 1 5 5 5"></polyline><polyline points="15 11 15 15 11 15">`),a1=N(`<div class="flex flex-col gap-1.5">`),o1=N(`<div class="flex h-full flex-col"><div class="border-border flex shrink-0 items-center justify-between border-b px-3 py-2"><span class="text-text inline-flex items-center gap-1.5 text-[12px] font-semibold"> Cloud agents</span><span class="text-text-faint text-[10.5px] tabular-nums"> working · updated </span></div><div class="border-border flex shrink-0 items-center gap-1 border-b px-3 py-1.5"></div><div class="min-h-0 flex-1 overflow-y-auto pt-2 pb-3 pl-2 pr-3">`),s1=N(`<button>`),c1=N(`<div class="grid place-items-center py-10">`),l1=N(`<button class="flex min-w-0 flex-1 cursor-pointer items-center gap-1.5 text-left"title="View the thread here"><span class="font-mono text-text-dim shrink-0 text-[11px]"></span><span class="text-text hover:text-accent min-w-0 truncate text-[12.5px] font-medium transition-colors">`),u1=N(`<p class="text-text-dim line-clamp-2 cursor-pointer text-[11.5px] leading-snug break-words">`),d1=N(`<span class="text-text-dim text-[11px]">`),f1=N(`<svg width=12 height=12 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 aria-hidden><circle cx=8 cy=8 r=6></circle><circle cx=8 cy=8 r=1.6 fill=currentColor stroke=none>`),p1=N(`<div class="bg-surface border-border flex flex-col gap-1.5 rounded-lg border p-2.5"><div class="flex min-w-0 items-center gap-1.5"><span class="text-text-faint ml-auto shrink-0 text-[10.5px] tabular-nums"></span></div><div class="flex min-w-0 items-center gap-1.5"><span class=ml-auto>`),m1=N(`<span aria-hidden class="size-2 shrink-0 rounded-full">`),h1=N(`<span class="text-text-dim text-[12.5px]">Conversation session`);function g1(){let e=_r(()=>({queryKey:[`cloud-sessions`],queryFn:gO,refetchInterval:12e3})),t=[{id:`all`,label:`All`},{id:`working`,label:`Working`},{id:`input`,label:`Needs input`},{id:`done`,label:`Done`}],[n,r]=br(`cloud:filter`,`all`),i=k(()=>(e.data??[]).filter(e=>{switch(n()){case`working`:return/active|pending/i.test(e.status);case`input`:return/awaitingInput|elicit/i.test(e.status);case`done`:return/complete/i.test(e.status);default:return!0}})),a=e=>/active/i.test(e)?{word:`Working…`,color:`var(--color-accent)`}:/awaitingInput|elicit/i.test(e)?{word:`Needs input`,color:`var(--color-warn)`}:/complete/i.test(e)?{word:`Complete`,color:`var(--color-success)`}:/error/i.test(e)?{word:`Error`,color:`var(--color-danger)`}:{word:e,color:`var(--color-text-dim)`},o=e=>{let t=[...e.activities].reverse().find(e=>e.content?.body||e.content?.action);return t?t.content.action?`→ ${t.content.action} ${t.content.parameter??``}`:t.content.body??``:e.summary??``},s=k(()=>(e.data??[]).filter(e=>/active|pending/i.test(e.status)).length),[c,l]=T(null);return j(M,{get when(){return!c()},get fallback(){return j(t1,{get issueId(){return c()},onBack:()=>l(null)})},get children(){var c=o1(),u=c.firstChild,d=u.firstChild,f=d.firstChild,p=d.nextSibling,m=p.firstChild,h=u.nextSibling,g=h.nextSibling;return P(d,j(jj,{size:13}),f),P(p,s,m),P(p,()=>Vj(e.dataUpdatedAt||Date.now()),null),P(h,j(We,{each:t,children:e=>(()=>{var t=s1();return t.$$click=()=>r(e.id),P(t,()=>e.label),D(()=>st(t,`h-6 shrink-0 cursor-pointer rounded-md px-2 text-[11px] font-medium transition-colors ${n()===e.id?`bg-accent-soft text-accent`:`text-text-dim hover:bg-surface-2`}`)),t})()}),null),P(h,j(Ej,{class:`ml-auto size-6 px-0`,get loading(){return e.isFetching},title:`Refresh`,"aria-label":`Refresh sessions`,onClick:()=>void e.refetch(),get children(){return i1()}}),null),P(g,j(M,{get when(){return i().length>0},get fallback(){return j(M,{get when(){return!e.isPending},get fallback(){return(()=>{var e=c1();return P(e,j(Dj,{})),e})()},get children(){return j(Rj,{title:`No cloud agent sessions`,children:`Delegate an issue to Cursor from the Draft tab and its live session appears here.`})}})},get children(){var e=a1();return P(e,j(Ge,{get each(){return i()},children:e=>(()=>{var t=p1(),n=t.firstChild,r=n.firstChild,i=n.nextSibling,s=i.firstChild;return P(n,j(M,{get when(){return/active|pending/i.test(e().status)},get fallback(){return(()=>{var t=m1();return D(n=>dt(t,`background`,a(e().status).color)),t})()},get children(){return j(Dj,{})}}),r),P(n,j(M,{get when(){return e().issue},get fallback(){return h1()},get children(){var t=l1(),n=t.firstChild,r=n.nextSibling;return t.$$click=()=>l(e().issue.id),P(n,()=>e().issue.identifier),P(r,()=>e().issue.title),t}}),r),P(r,()=>Vj(e().updatedAt)),P(t,j(M,{get when(){return o(e())},get children(){var t=u1();return t.$$click=()=>e().issue&&l(e().issue.id),P(t,()=>o(e())),t}}),i),P(i,j(Ij,{get color(){return a(e().status).color},get children(){return a(e().status).word}}),s),P(i,j(M,{get when(){return e().issue},get children(){return[j(Lj,{get color(){return e().issue.state.color}}),(()=>{var t=d1();return P(t,()=>e().issue.state.name),t})()]}}),s),P(i,j(M,{get when(){return e().issue},get children(){return[j(Ej,{variant:`ghost`,class:`size-6 shrink-0 px-0`,title:`Open the thread — steer this agent`,"aria-label":`Open thread`,onClick:()=>l(e().issue.id),get children(){return f1()}}),j(Nj,{get href(){return e().issue.url},class:`shrink-0`,children:`Linear`})]}}),null),t})()})),e}})),c}})}rt([`click`]);var _1=N(`<div class="flex flex-col gap-1.5">`),v1=N(`<div class="flex h-full flex-col"><div class="border-border flex shrink-0 items-center justify-between border-b px-3 py-2"><span class="text-text text-[12px] font-semibold">Running now</span><span class="text-text-faint text-[10.5px] tabular-nums"> agent<!> active</span></div><div class="min-h-0 flex-1 overflow-y-auto pt-2 pb-3 pl-2 pr-3">`),y1=N(`<span class="font-mono text-text-dim shrink-0 text-[11px]">`),b1=N(`<svg width=12 height=12 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 aria-hidden><circle cx=8 cy=8 r=6></circle><circle cx=8 cy=8 r=1.6 fill=currentColor stroke=none>`),x1=N(`<div class="bg-surface border-border flex flex-col gap-1.5 rounded-lg border p-2.5"><div class="flex min-w-0 items-center gap-1.5"><button class="flex min-w-0 flex-1 cursor-pointer items-center gap-1.5 text-left"><span class="text-text hover:text-accent min-w-0 truncate text-[12.5px] font-medium transition-colors"></span></button><span class="text-text-faint ml-auto shrink-0 text-[10.5px] tabular-nums"></span></div><p class="text-text-dim line-clamp-2 text-[11.5px] leading-snug break-words"></p><div class="flex min-w-0 items-center gap-1.5"><span class=ml-auto>`);function S1(){let e=_r(()=>({queryKey:[`cloud-sessions`],queryFn:gO,refetchInterval:12e3})),t=_r(()=>({queryKey:[`bridge-tasks`],queryFn:NO,refetchInterval:5e3,retry:0})),n=_r(()=>({queryKey:[`my-issues`],queryFn:fO,refetchInterval:3e4})),r=k(()=>{let r=(e.data??[]).filter(e=>/active|pending|awaitingInput|elicit/i.test(e.status)).map(e=>({kind:`cloud`,at:Date.parse(e.updatedAt),session:e})),i=(t.data??[]).filter(e=>e.status===`running`).map(e=>({kind:`local`,at:e.startedAt,task:e,issueId:(n.data??[]).find(t=>e.title.startsWith(t.identifier))?.id}));return[...r,...i].sort((e,t)=>t.at-e.at)}),[i,a]=T(null),o=e=>/awaitingInput|elicit/i.test(e)?{word:`Needs input`,color:`var(--color-warn)`}:{word:`Working…`,color:`var(--color-accent)`},s=e=>{let t=[...e.activities].reverse().find(e=>e.content?.body||e.content?.action);return t?t.content.action?`→ ${t.content.action} ${t.content.parameter??``}`:t.content.body??``:e.summary??``};return j(M,{get when(){return!i()},get fallback(){return j(t1,{get issueId(){return i()},onBack:()=>a(null)})},get children(){var e=v1(),t=e.firstChild,n=t.firstChild.nextSibling,i=n.firstChild,c=i.nextSibling;c.nextSibling;var l=t.nextSibling;return P(n,()=>r().length,i),P(n,()=>r().length===1?``:`s`,c),P(l,j(M,{get when(){return r().length>0},get fallback(){return j(Rj,{title:`Nothing running`,children:`Delegate an issue from the Draft tab — cloud (Cursor) and local (Claude Code) agents working right now appear here together.`})},get children(){var e=_1();return P(e,j(Ge,{get each(){return r()},children:e=>(()=>{var t=x1(),n=t.firstChild,r=n.firstChild,i=r.firstChild,c=r.nextSibling,l=n.nextSibling,u=l.nextSibling,d=u.firstChild;return P(n,j(Dj,{size:12}),r),P(n,j(Ij,{get title(){return e().kind===`cloud`?`Cursor cloud agent`:`Local Claude Code`},get children(){return[$e(()=>$e(()=>e().kind===`cloud`)()?j(jj,{}):j(Mj,{})),$e(()=>e().kind===`cloud`?`cloud`:`local`)]}}),r),r.$$click=()=>{let t=e();t.kind===`cloud`&&t.session.issue?a(t.session.issue.id):t.kind===`local`&&rj(`local`)},P(r,j(M,{get when(){return e().kind===`cloud`},get children(){var t=y1();return P(t,()=>e().session.issue?.identifier),t}}),i),P(i,(()=>{var t=$e(()=>e().kind===`cloud`);return()=>t()?e().session.issue?.title??`Conversation session`:e().task.title})()),P(c,()=>Vj(e().at)),P(l,(()=>{var t=$e(()=>e().kind===`cloud`);return()=>t()?s(e().session):e().task.lastText})()),P(u,j(M,{get when(){return e().kind===`cloud`},get fallback(){return j(Ij,{color:`var(--color-accent)`,children:`Working…`})},get children(){return j(Ij,{get color(){return o(e().session.status).color},get children(){return o(e().session.status).word}})}}),d),P(u,j(Ej,{variant:`ghost`,class:`size-6 shrink-0 px-0`,get title(){return e().kind===`cloud`?`Open the thread — steer this agent`:`Open the live session in the Local tab`},"aria-label":`Open thread`,onClick:()=>{let t=e();t.kind===`cloud`&&t.session.issue?a(t.session.issue.id):t.kind===`local`&&rj(`local`)},get children(){return b1()}}),null),D(()=>it(r,`title`,e().kind===`cloud`?`View the thread here`:`Open the Local tab`)),t})()})),e}})),e}})}rt([`click`]),Br();var C1=N(`<div class="border-accent/40 bg-accent-soft self-end rounded-lg border px-2.5 py-1.5"><p class="text-accent mb-0.5 text-[9.5px] font-semibold tracking-wide uppercase">You</p><div class="lg-md text-text text-[11.5px] leading-relaxed break-words">`),w1=N(`<div><p></p><div class="lg-md text-text text-[11.5px] leading-relaxed break-words">`),T1=N(`<p>`),E1=N(`<span class="text-text-faint max-w-[55%] truncate text-[10.5px] tabular-nums"> running · `),D1=N(`<div class="flex flex-col gap-1.5">`),O1=N(`<div class="flex h-full flex-col"><div class="border-border flex shrink-0 items-center justify-between border-b px-3 py-2"><span class="text-text text-[12px] font-semibold">Local Claude Code</span></div><div class="min-h-0 flex-1 overflow-y-auto pt-2 pb-3 pl-2 pr-3">`),k1=N(`<span class="bg-surface-2 border-border font-mono mt-2 block rounded-md border px-2 py-1.5 text-[11px] select-all">npx linear-grab-bridge`),A1=N(`<span class="text-text-faint text-[10.5px] tabular-nums">ctx <!> · out `),j1=N(`<div class="flex min-w-0 items-center gap-1.5"><span class="font-mono text-text-faint min-w-0 truncate text-[10.5px]">`),M1=N(`<option selected>`),N1=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=currentColor aria-hidden><path d="M4.5 2.8a.8.8 0 0 1 1.22-.68l8 5.2a.8.8 0 0 1 0 1.36l-8 5.2a.8.8 0 0 1-1.22-.68V2.8Z">`),P1=N(`<span class="text-success text-[12px] leading-none">✓`),F1=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linejoin=round aria-hidden><path d="M14 10a2 2 0 0 1-2 2H6l-3.5 2.5V4a2 2 0 0 1 2-2H12a2 2 0 0 1 2 2v6Z">`),I1=N(`<svg width=11 height=11 viewBox="0 0 16 16"fill=currentColor aria-hidden><rect x=3 y=3 width=10 height=10 rx=1.5>`),L1=N(`<span class="font-mono text-text-faint min-w-0 truncate text-[10.5px]">`),R1=N(`<div class="border-border bg-bg flex flex-col gap-1 rounded-md border p-2"><div class="flex min-w-0 items-center gap-1.5"><span class="text-text-dim text-[10.5px] font-semibold tracking-wide uppercase">Changes</span><span class="ml-auto shrink-0 text-[10.5px] tabular-nums"><span class=text-success>+</span> <span class=text-danger>−`),z1=N(`<div class="border-border bg-bg flex max-h-80 flex-col gap-1.5 overflow-y-auto rounded-md border py-2 pl-2 pr-3">`),B1=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round aria-hidden><circle cx=8 cy=8 r=2.2></circle><path d="M8 1v3M8 12v3M1 8h3M12 8h3">`),V1=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden><path d="M13 7.5 8.2 12.3a3.2 3.2 0 0 1-4.5-4.5L8.9 2.6a2.1 2.1 0 0 1 3 3L7.1 10.4a1 1 0 0 1-1.5-1.5l4.3-4.3">`),H1=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round aria-hidden><path d="M8 2v4M8 10v4M2 8h4M10 8h4M4.5 4.5 6 6M11.5 11.5 10 10M11.5 4.5 10 6M4.5 11.5 6 10">`),U1=N(`<span class="inline-block min-w-[4ch] text-center">Send`),W1=N(`<div class="flex flex-col gap-1.5"><div class="flex items-center gap-1"><span class="text-text-faint min-w-0 flex-1 truncate text-[10.5px]">`),G1=N(`<div class="bg-surface border-border flex flex-col gap-1.5 rounded-lg border p-2.5"><div class="flex min-w-0 items-center gap-1.5"><span class="text-text min-w-0 truncate text-[12.5px] font-medium"></span><span class="text-text-faint ml-auto shrink-0 text-[10.5px] tabular-nums"></span></div><p class="text-text-dim text-[11.5px] leading-snug break-words"></p><div class="flex flex-wrap items-center gap-1.5"></div><div class="flex items-center gap-1">`),K1=N(`<span aria-hidden class="size-2 shrink-0 rounded-full">`),q1=N(`<div class="flex min-w-0 items-center gap-1.5">`),J1=N(`<option>`),Y1=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 aria-hidden><circle cx=8 cy=8 r=6></circle><circle cx=8 cy=8 r=1.6 fill=currentColor stroke=none>`),X1=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden><path d="M2.5 3.5 6 7 2.5 10.5M7.5 12.5h6">`),Z1=N(`<span class=text-success>+`),Q1=N(`<span class=text-danger>−`),$1=N(`<div class="flex min-w-0 items-center gap-1.5"><span class="font-mono text-text-dim min-w-0 flex-1 truncate text-[10.5px]"></span><span class="shrink-0 text-[10px] tabular-nums">`),e0=N(`<span class=text-text-faint>bin`),t0=N(`<div class="flex min-w-0 items-center gap-1.5"><span class="font-mono text-text-dim min-w-0 flex-1 truncate text-[10.5px]"></span><span class="text-success shrink-0 text-[10px]">new`),n0=N(`<div class="flex min-w-0 items-center gap-1.5 pt-0.5"><a target=_blank rel=noreferrer class="text-accent min-w-0 truncate text-[11px] hover:underline">`),r0=N(`<p class="text-text-faint text-[11px]">Waiting for output…`),i0=[{id:``,label:`Default model`},{id:`fable`,label:`Fable 5`},{id:`opus`,label:`Opus`},{id:`sonnet`,label:`Sonnet`},{id:`haiku`,label:`Haiku`}];function a0(e,t){let n=e.split(`.`).map(Number),r=t.split(`.`).map(Number);for(let e=0;e<3;e++)if((n[e]??0)!==(r[e]??0))return(n[e]??0)<(r[e]??0);return!1}var o0=e=>e==null?`–`:e>=1e3?`${(e/1e3).toFixed(e>=1e5?0:1)}k`:String(e);function s0(){let e=sr(),t=_r(()=>({queryKey:[`bridge-health`],queryFn:MO,refetchInterval:5e3,retry:0})),n=_r(()=>({queryKey:[`bridge-tasks`],queryFn:NO,refetchInterval:3e3,enabled:!!t.data?.ok})),[r,i]=T(null),a=_r(()=>({queryKey:[`my-issues`],queryFn:fO,staleTime:15e3})),o=e=>{let t=e.title.match(/^([A-Z][A-Z0-9]*-\d+)/)?.[1];return t?a.data?.find(e=>e.identifier===t):void 0},s=_r(()=>({queryKey:[`bridge-task`,r()],queryFn:()=>PO(r()),refetchInterval:1500,enabled:!!r()&&!!t.data?.ok})),c=_r(()=>({queryKey:[`bridge-diff`,r()],queryFn:()=>BO(r()),refetchInterval:6e3,enabled:!!r()&&!!t.data?.ok})),l=()=>{e.invalidateQueries({queryKey:[`bridge-tasks`]}),e.invalidateQueries({queryKey:[`bridge-task`,r()]})},u=vr(()=>({mutationFn:e=>RO(e),onSuccess:l})),[d,f]=br(`local:message`,``),[p,m]=T(!1),[h,g]=T(0),_=_r(()=>({queryKey:[`grab`],queryFn:Dr,enabled:aj()===`local`})),v=()=>{g(Date.now()),sj(`local`),UZ().catch(()=>sj(`capture`))};O(()=>{if(aj()!==`local`)return;let e=(_.data??[]).filter(e=>e.grabbedAt>=h());if(!e.length)return;let t=e.map(e=>{let t=e.source?.filePath?` — \`${e.source.filePath}${e.source.lineNumber==null?``:`:${e.source.lineNumber}`}\``:``;return`- \`<${e.componentName??e.tagName??`element`}>\`${t}`}).join(`
|
|
267
|
+
`);f(e=>`${e?`${e}\n`:``}${t}\n`),sj(`capture`)});let y=async()=>{m(!0);try{let e=await JQ();e&&f(t=>`${t?`${t}\n`:``}${e}\n`)}finally{m(!1)}},b=vr(()=>({mutationFn:e=>IO(e.id,e.text),onSuccess:()=>{f(``),l()}})),x=vr(()=>({mutationFn:e=>LO(e.id,e.model),onSuccess:t=>{e.setQueryData([`bridge-tasks`],e=>e?.map(e=>e.id===t.id?t:e)),l()}})),S=vr(()=>({mutationFn:e=>zO(e),onSuccess:l})),C,w=!0,E=()=>{C&&(w=C.scrollTop+C.clientHeight>=C.scrollHeight-48)};O(()=>{let e=s.data?.tail?.length??0;r(),!(!C||!e||!w)&&requestAnimationFrame(()=>{C&&(C.scrollTop=C.scrollHeight)})});let[ee,te]=T(null),A=async e=>{try{await navigator.clipboard.writeText(qO(e)),te(e.id),setTimeout(()=>te(null),1800)}catch{}},ne=e=>e===`running`?`var(--color-accent)`:e===`done`?`var(--color-success)`:e===`stopped`?`var(--color-warn)`:`var(--color-danger)`,re=e=>{let t=e.line.kind,n=k(()=>i$(e.line.text));return t===`user`?(()=>{var e=C1(),t=e.firstChild.nextSibling;return D(()=>t.innerHTML=n()),e})():t===`assistant`||t===`result`?(()=>{var e=w1(),r=e.firstChild,i=r.nextSibling;return st(e,`bg-surface rounded-lg border px-2.5 py-1.5 ${t===`result`?`border-success/40`:`border-border`}`),st(r,`mb-0.5 text-[9.5px] font-semibold tracking-wide uppercase ${t===`result`?`text-success`:`text-text-faint`}`),P(r,t===`result`?`Result`:`Claude`),D(()=>i.innerHTML=n()),e})():(()=>{var n=T1();return st(n,`font-mono px-1 text-[10px] leading-relaxed break-words ${t===`subagent`?`text-warn`:t===`stderr`?`text-danger`:`text-text-faint`}`),P(n,()=>e.line.text),n})()};return(()=>{var e=O1(),a=e.firstChild;a.firstChild;var l=a.nextSibling;return P(a,j(M,{get when(){return t.data?.ok},get fallback(){return j(Ij,{class:`text-danger`,children:`bridge offline`})},get children(){return[j(M,{get when(){return a0(t.data.version,`0.15.1`)},get children(){return j(Ij,{class:`text-warn`,title:`Ctrl+C the old process, then: npx linear-grab-bridge`,get children(){return[`v`,$e(()=>t.data.version),` outdated — restart`]}})}}),(()=>{var e=E1(),n=e.firstChild;return P(e,()=>t.data.active,n),P(e,()=>t.data.cwd.split(`/`).slice(-2).join(`/`),null),D(()=>it(e,`title`,t.data?.cwd)),e})()]}}),null),P(l,j(M,{get when(){return t.data?.ok},get fallback(){return j(Rj,{title:`Bridge not running`,get children(){return[`Start it in your repo's terminal:`,k1(),`Then delegate from the Draft tab ("Local Claude Code") or watch tasks here. Sessions stay interactive — send follow-ups, switch models, interrupt, resume in your terminal. History persists across restarts.`]}})},get children(){return j(M,{get when(){return(n.data??[]).length>0},get fallback(){return j(Rj,{title:`No local tasks yet`,children:`Create an issue in Draft with "Delegate to → Local Claude Code", and it appears here with live status and a conversation view.`})},get children(){var e=D1();return P(e,j(Ge,{get each(){return n.data},children:e=>(()=>{var t=G1(),n=t.firstChild,a=n.firstChild,l=a.nextSibling,m=n.nextSibling,h=m.nextSibling,g=h.nextSibling;return P(n,j(M,{get when(){return e().status===`running`},get fallback(){return(()=>{var t=K1();return D(n=>dt(t,`background`,ne(e().status))),t})()},get children(){return j(Dj,{})}}),a),P(a,()=>e().title),P(l,()=>Vj(e().startedAt)),P(m,()=>e().lastText),P(h,j(Ij,{get color(){return ne(e().status)},get children(){return e().status}}),null),P(h,j(Ij,{get children(){return e().model??`default model`}}),null),P(h,j(M,{get when(){return e().pendingModel},get children(){return j(Ij,{class:`text-warn`,get children(){return[`→ `,$e(()=>e().pendingModel),` next msg`]}})}}),null),P(h,j(M,{get when(){return e().subagents>0},get children(){return j(Ij,{class:`text-warn`,get children(){return[`⛓ `,$e(()=>e().subagents),` subagents`]}})}}),null),P(h,j(M,{get when(){return e().usage},get children(){var t=A1(),n=t.firstChild.nextSibling;return n.nextSibling,P(t,()=>o0(e().usage.contextTokens),n),P(t,()=>o0(e().usage.outputTokens),null),P(t,(()=>{var t=$e(()=>!!e().usage.costUsd);return()=>t()?` · $${e().usage.costUsd.toFixed(2)}`:``})(),null),t}}),null),P(t,j(M,{get when(){return o(e())},children:e=>(()=>{var t=q1();return P(t,j(Ij,{get children(){return e().state.name}}),null),P(t,j(Nj,{get href(){return e().url},children:`Open in Linear`}),null),t})()}),g),P(t,j(M,{get when(){return $e(()=>!!e().worktree)()&&!e().worktree.removed},get children(){var t=j1(),n=t.firstChild;return P(t,j(Ij,{class:`text-warn`,children:`⎇ worktree`}),n),P(n,()=>e().worktree.branch),P(t,j(M,{get when(){return e().status!==`running`},get children(){return j(Ej,{variant:`ghost`,class:`ml-auto h-6 shrink-0 px-2 text-[11px]`,get loading(){return S.isPending},get title(){return`Remove the worktree at ${e().worktree.path} — the branch (and PR) survive`},onClick:()=>S.mutate(e().id),children:`Remove`})}}),null),D(()=>it(n,`title`,e().worktree.path)),t}}),g),P(g,j(Aj,{class:`h-7 w-auto min-w-0 flex-1 text-[11px]`,get value(){return e().pendingModel??e().model??``},onChange:t=>x.mutate({id:e().id,model:t.currentTarget.value}),title:`Model — applies from the next message`,get children(){return[j(We,{each:i0,children:t=>(()=>{var n=J1();return P(n,()=>t.label),D(()=>n.selected=(e().pendingModel??e().model??``)===t.id),D(()=>n.value=t.id),n})()}),j(M,{get when(){return!i0.some(t=>t.id===(e().pendingModel??e().model??``))},get children(){var t=M1();return P(t,()=>e().pendingModel??e().model),D(()=>t.value=e().pendingModel??e().model??``),t}})]}}),null),P(g,j(M,{get when(){return $e(()=>e().status!==`running`)()&&e().sessionId},get children(){return j(Ej,{variant:`ghost`,class:`size-7 px-0`,get loading(){return b.isPending},get title(){return`Resume — continues this session${e().pendingModel?` on ${e().pendingModel}`:``}`},"aria-label":`Resume session`,onClick:()=>b.mutate({id:e().id,text:`Continue where you left off. If the work is already complete, finish any remaining closeout steps (PR, Linear update, announcement).`}),get children(){return N1()}})}}),null),P(g,j(M,{get when(){return o(e())},children:e=>j(Ej,{variant:`ghost`,class:`size-7 px-0`,title:`Open the issue's Activity thread`,onClick:()=>rj(`activity`,e().id),get children(){return Y1()}})}),null),P(g,j(Ej,{variant:`ghost`,class:`size-7 px-0`,get disabled(){return!e().sessionId},get title(){return $e(()=>!!e().sessionId)()?`Copy resume command · session ${e().sessionId.slice(0,8)}…`:`No session yet`},onClick:()=>void A(e()),get children(){return j(M,{get when(){return ee()===e().id},get fallback(){return X1()},get children(){return P1()}})}}),null),P(g,j(Ej,{variant:`ghost`,class:`size-7 px-0`,get title(){return r()===e().id?`Hide thread`:`Open thread — chat & changes`},onClick:()=>i(r()===e().id?null:e().id),get children(){return F1()}}),null),P(g,j(M,{get when(){return e().status===`running`},get children(){return j(Ej,{variant:`danger`,class:`size-7 px-0`,get loading(){return u.isPending},title:`Interrupt — the session stays resumable`,onClick:()=>u.mutate(e().id),get children(){return I1()}})}}),null),P(t,j(M,{get when(){return r()===e().id},get children(){return[j(M,{get when(){return $e(()=>!!c.data)()&&(c.data.files.length||c.data.untracked.length||c.data.prs.length)},get children(){var e=R1(),t=e.firstChild,n=t.firstChild.nextSibling,r=n.firstChild;r.firstChild;var i=r.nextSibling.nextSibling;return i.firstChild,P(t,j(M,{get when(){return c.data.branch},get children(){var e=L1();return P(e,()=>c.data.branch),e}}),n),P(r,()=>c.data.totalAdded,null),P(i,()=>c.data.totalDeleted,null),P(e,j(We,{get each(){return c.data.files},children:e=>(()=>{var t=$1(),n=t.firstChild,r=n.nextSibling;return P(n,()=>e.path),P(r,j(M,{get when(){return!e.binary},get fallback(){return e0()},get children(){return[(()=>{var t=Z1();return t.firstChild,P(t,()=>e.added,null),t})(),` `,(()=>{var t=Q1();return t.firstChild,P(t,()=>e.deleted,null),t})()]}})),D(()=>it(n,`title`,e.path)),t})()}),null),P(e,j(We,{get each(){return c.data.untracked},children:e=>(()=>{var t=t0(),n=t.firstChild;return it(n,`title`,e),P(n,e),t})()}),null),P(e,j(We,{get each(){return c.data.prs},children:e=>(()=>{var t=n0(),n=t.firstChild;return P(t,j(Ij,{class:`text-accent`,get children(){return[`PR · `,$e(()=>e.state.toLowerCase())]}}),n),P(n,()=>e.title),D(t=>{var r=e.url,i=e.title;return r!==t.e&&it(n,`href`,t.e=r),i!==t.t&&it(n,`title`,t.t=i),t},{e:void 0,t:void 0}),t})()}),null),e}}),(()=>{var e=z1();return e.addEventListener(`scroll`,E),pt(e=>{C=e,w=!0},e),P(e,j(M,{get when(){return(s.data?.tail??[]).length>0},get fallback(){return r0()},get children(){return j(Ge,{get each(){return s.data?.tail??[]},children:e=>j(re,{get line(){return e()}})})}})),e})(),(()=>{var t=W1(),n=t.firstChild,r=n.firstChild;return P(t,j(kj,{rows:2,get placeholder(){return e().status===`running`?`Message the working agent — it queues into the live session…`:`Follow-up — resumes the session…`},get value(){return d()},onInput:e=>f(e.currentTarget.value)}),n),P(r,(()=>{var t=$e(()=>!!e().alive);return()=>t()?`live session`:e().sessionId?`resumes on send`:`no session`})()),P(n,j(Ej,{variant:`ghost`,class:`size-7 shrink-0 px-0`,title:`Pick elements on the page — refs drop into this message`,"aria-label":`Pick element`,onClick:v,get children(){return B1()}}),null),P(n,j(Ej,{variant:`ghost`,class:`size-7 shrink-0 px-0`,get loading(){return p()},title:`Attach captures — element refs, screenshots, region shots, recording GIF`,"aria-label":`Attach captures`,onClick:()=>void y(),get children(){return V1()}}),null),P(n,j(Ej,{variant:`ghost`,class:`size-7 shrink-0 px-0`,get disabled(){return $e(()=>!e().alive)()&&!e().sessionId},title:`Compact the session — frees context (sends /compact)`,"aria-label":`Compact session`,onClick:()=>b.mutate({id:e().id,text:`/compact`}),get children(){return H1()}}),null),P(n,j(Ej,{variant:`primary`,class:`shrink-0`,get loading(){return b.isPending},get disabled(){return!d().trim()||!e().alive&&!e().sessionId},onClick:()=>b.mutate({id:e().id,text:d().trim()}),get children(){return U1()}}),null),t})()]}}),null),t})()})),e}})}})),e})()}Br();var c0=N(`<span class="text-text-faint text-[10.5px] tabular-nums">/<!> from your issues`),l0=N(`<div class="flex flex-col gap-1.5">`),u0=N(`<div class="flex h-full flex-col"><div class="border-border flex shrink-0 items-center justify-between border-b px-3 py-2"><span class="text-text text-[12px] font-semibold">Pull requests</span></div><div class="border-border flex shrink-0 items-center gap-1.5 border-b px-3 py-1.5"><div class="bg-surface-2 border-border flex shrink-0 rounded-md border p-0.5"></div></div><div class="min-h-0 flex-1 overflow-y-auto pt-2 pb-3 pl-2 pr-3">`),d0=N(`<span class="text-warn text-[10.5px]"title="Merge states come from gh via the bridge">states unknown — restart the bridge`),f0=N(`<button>`),p0=N(`<span class="text-success text-[11px]">✓`),m0=N(`<span class="text-[12px] leading-none">✓`),h0=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round aria-hidden><circle cx=8 cy=8 r=6></circle><circle cx=8 cy=8 r=1.6 fill=currentColor stroke=none>`),g0=N(`<span class="text-success text-[12px] leading-none">✓`),_0=N(`<div class="bg-surface border-border flex flex-col gap-1.5 rounded-lg border p-2.5"><a target=_blank rel=noreferrer class="text-accent truncate text-[12.5px] font-medium hover:underline"></a><div class="flex min-w-0 items-center gap-1.5"><span class="font-mono text-text-dim shrink-0 text-[11px]"></span><span class="text-text-dim truncate text-[11.5px]"></span><span class="text-text-faint ml-auto shrink-0 text-[10.5px] tabular-nums"></span></div><div class="flex min-w-0 flex-wrap items-center gap-1.5"><div class="ml-auto flex shrink-0 items-center gap-1">`),v0=N(`<svg width=12 height=12 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden><path d="M8 2 14 5.5 8 9 2 5.5 8 2Z"></path><path d="M2 10.5 8 14l6-3.5">`),y0=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round aria-hidden><circle cx=4 cy=3.5 r=1.5></circle><circle cx=4 cy=12.5 r=1.5></circle><circle cx=12 cy=8 r=1.5></circle><path d="M4 5v6M4 6.5c0 2 2 3 4.5 3h2">`),b0=N(`<svg width=13 height=13 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 stroke-linejoin=round aria-hidden><rect x=5.5 y=5.5 width=9 height=9 rx=1.5></rect><path d="M10.5 5.5v-2a2 2 0 0 0-2-2h-5a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h2">`),x0=/github\.com\/[^/]+\/[^/]+\/pull\/\d+/i;function S0(e){let t=_r(()=>({queryKey:[`my-issues`],queryFn:fO,refetchInterval:15e3})),n=k(()=>(t.data??[]).flatMap(e=>(e.attachments??[]).filter(e=>x0.test(e.url)).map(t=>({issue:e,attachment:t})))),r=_r(()=>({queryKey:[`bridge-tasks`],queryFn:NO,refetchInterval:1e4,retry:0})),i=_r(()=>({queryKey:[`pr-status`,n().map(e=>e.attachment.url).sort().join(`|`)],queryFn:()=>HO(n().map(e=>e.attachment.url)),refetchInterval:3e4,retry:0,enabled:n().length>0})),a=e=>E().has(e.attachment.url)?`MERGED`:i.data?.statuses[e.attachment.url],o=e=>!!r.data?.some(t=>t.title.startsWith(e.issue.identifier)),[s,c]=T(`all`),[l,u]=T(``),d=k(()=>{let e=l().trim().toLowerCase();return n().filter(t=>{let n=t.issue.state.type,r=a(t);return!(s()===`review`&&(n!==`started`||r===`MERGED`||r===`CLOSED`)||s()===`open`&&(r===`MERGED`||r===`CLOSED`||!(n===`started`||n===`unstarted`||n===`backlog`))||s()===`done`&&!(n===`completed`||r===`MERGED`||r===`CLOSED`)||e&&![t.attachment.title,t.issue.title,t.issue.identifier].join(` `).toLowerCase().includes(e))})}),f=_r(()=>({queryKey:[`settings`],queryFn:Tr})),p=()=>f.data?.stagingBranch?.trim()||`staging`,[m,h]=T(null),[g,_]=T(new Set),[v,y]=T(null),b=async e=>{h(e),y(null);try{await UO(e,p()),_(t=>new Set(t).add(e))}catch(e){y(e instanceof Error?e.message:String(e))}finally{h(null)}},[x,S]=T(null),[C,w]=T(null),[E,O]=T(new Set),ee=async e=>{w(e);try{await GO(e),O(t=>new Set(t).add(e))}catch{}finally{w(null)}},te=async e=>{try{await navigator.clipboard.writeText(e.attachment.url),S(e.attachment.id),setTimeout(()=>S(null),1500)}catch{}};return(()=>{var r=u0(),f=r.firstChild;f.firstChild;var h=f.nextSibling,_=h.firstChild,v=h.nextSibling;return P(f,j(M,{get when(){return!i.isError},get fallback(){return d0()},get children(){var e=c0(),t=e.firstChild,r=t.nextSibling;return r.nextSibling,P(e,()=>d().length,t),P(e,()=>n().length,r),e}}),null),P(_,j(We,{each:[{id:`all`,label:`All`},{id:`review`,label:`Review`},{id:`open`,label:`Open`},{id:`done`,label:`Done`}],children:e=>(()=>{var t=f0();return t.$$click=()=>c(e.id),P(t,()=>e.label),D(()=>st(t,`rounded-[5px] px-2 py-0.5 text-[11px] font-medium transition-colors ${s()===e.id?`bg-surface-3 text-text`:`text-text-dim hover:text-text cursor-pointer`}`)),t})()})),P(h,j(Oj,{class:`h-6 min-w-0 flex-1 text-[11px]`,placeholder:`Search PRs…`,get value(){return l()},onInput:e=>u(e.currentTarget.value)}),null),P(v,j(M,{get when(){return d().length>0},get fallback(){return j(Rj,{title:`No PRs yet`,get children(){return $e(()=>!!t.isError)()?`Connect Linear in Settings.`:n().length>0?`No PRs match the current filter.`:`PRs opened by delegated agents appear here as soon as they link back to your issues.`}})},get children(){var t=l0();return P(t,j(We,{get each(){return d()},children:t=>(()=>{var n=_0(),r=n.firstChild,s=r.nextSibling,c=s.firstChild,l=c.nextSibling,u=l.nextSibling,d=s.nextSibling,f=d.firstChild;return P(r,()=>t.attachment.title||t.attachment.url),P(n,j(M,{get when(){return i.data?.previews[t.attachment.url]},get children(){return j(Nj,{get href(){return i.data.previews[t.attachment.url]},class:`shrink-0 self-start`,title:`Vercel deploy preview of this PR's branch`,children:`Preview`})}}),s),P(s,j(Lj,{get color(){return t.issue.state.color}}),c),P(c,()=>t.issue.identifier),P(l,()=>t.issue.title),P(u,()=>Vj(t.issue.updatedAt)),P(d,j(Ij,{get children(){return t.issue.state.name}}),f),P(d,j(M,{get when(){return t.issue.delegate},get children(){return j(Ij,{class:`text-accent`,get children(){return[j(jj,{}),` `,$e(()=>t.issue.delegate.displayName)]}})}}),f),P(d,j(M,{get when(){return o(t)},get children(){return j(Ij,{class:`text-warn`,get children(){return[j(Mj,{}),` local`]}})}}),f),P(d,j(Nj,{get href(){return t.issue.url},class:`shrink-0`,title:`Open the issue in Linear`,children:`Linear`}),f),P(f,j(M,{get when(){return $e(()=>!!a(t))()&&a(t)!==`OPEN`},get children(){return j(Ij,{get class(){return a(t)===`MERGED`?`text-success`:`text-text-faint`},get children(){return a(t)===`MERGED`?`✓ merged`:`closed`}})}}),null),P(f,j(Ej,{variant:`ghost`,class:`size-7 shrink-0 px-0`,get loading(){return m()===t.attachment.url},get disabled(){return g().has(t.attachment.url)},get title(){return $e(()=>!!g().has(t.attachment.url))()?`On ${p()} — staging preview deploying`:`Merge into ${p()} — deploys the staging preview domain`},"aria-label":`Merge to staging`,onClick:()=>void b(t.attachment.url),get children(){return j(M,{get when(){return g().has(t.attachment.url)},get fallback(){return v0()},get children(){return p0()}})}}),null),P(f,j(M,{get when(){return g().has(t.attachment.url)},get children(){return j(C0,{get url(){return t.attachment.url},get base(){return p()}})}}),null),P(f,j(Ej,{variant:`primary`,class:`size-7 px-0`,get classList(){return{hidden:!!a(t)&&a(t)!==`OPEN`}},get loading(){return C()===t.attachment.url},get disabled(){return E().has(t.attachment.url)},get title(){return E().has(t.attachment.url)?`Merged`:`Squash-merge this PR (bridge gh)`},"aria-label":`Merge PR`,onClick:()=>void ee(t.attachment.url),get children(){return j(M,{get when(){return E().has(t.attachment.url)},get fallback(){return y0()},get children(){return m0()}})}}),null),P(f,j(Ej,{variant:`ghost`,class:`size-7 px-0`,title:`Open the issue's Activity thread`,"aria-label":`Open issue activity`,onClick:()=>{rj(`activity`,t.issue.id),e.onOpenIssue()},get children(){return h0()}}),null),P(f,j(Ej,{variant:`ghost`,class:`size-7 px-0`,title:`Copy PR URL`,"aria-label":`Copy PR URL`,onClick:()=>void te(t),get children(){return j(M,{get when(){return x()===t.attachment.id},get fallback(){return b0()},get children(){return g0()}})}}),null),D(e=>{var n=t.attachment.url,i=t.attachment.title;return n!==e.e&&it(r,`href`,e.e=n),i!==e.t&&it(r,`title`,e.t=i),e},{e:void 0,t:void 0}),n})()})),t}})),r})()}function C0(e){let t=_r(()=>({queryKey:[`stage-status`,e.url,e.base],queryFn:()=>WO(e.url,e.base),refetchInterval:e=>e.state.data?.state===`success`||e.state.data?.state===`failure`?!1:8e3,retry:0}));return j(M,{get when(){return t.data},get fallback(){return j(Dj,{size:11})},children:e=>j(M,{get when(){return e().state===`success`},get fallback(){return j(M,{get when(){return e().state===`failure`||e().state===`error`},get fallback(){return j(Ij,{get title(){return`Staging deploy ${e().state}`},get children(){return[j(Dj,{size:10}),` staging…`]}})},get children(){return j(Ij,{class:`text-danger`,title:`Staging deploy failed — check Vercel`,children:`staging failed`})}})},get children(){return j(M,{get when(){return e().url},get fallback(){return j(Ij,{class:`text-success`,children:`staging ready`})},get children(){return j(Nj,{get href(){return e().url},class:`shrink-0`,title:`Open the staging deployment`,children:`staging ready`})}})}})})}rt([`click`]),Br();function w0(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}async function T0(e){let t=w0(crypto.getRandomValues(new Uint8Array(32))),n=await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(t)),r=w0(new Uint8Array(n)),i=w0(crypto.getRandomValues(new Uint8Array(16))),a=chrome.identity.getRedirectURL(),o=new URL(`https://linear.app/oauth/authorize`);o.searchParams.set(`client_id`,e),o.searchParams.set(`redirect_uri`,a),o.searchParams.set(`response_type`,`code`),o.searchParams.set(`scope`,`read,write`),o.searchParams.set(`state`,i),o.searchParams.set(`code_challenge`,r),o.searchParams.set(`code_challenge_method`,`S256`);let s=await chrome.identity.launchWebAuthFlow({url:o.toString(),interactive:!0});if(!s)throw Error(`OAuth flow was cancelled`);let c=new URL(s).searchParams;if(c.get(`state`)!==i)throw Error(`OAuth state mismatch`);let l=c.get(`code`);if(!l)throw Error(c.get(`error_description`)??`No authorization code returned`);let u=await fetch(`https://api.linear.app/oauth/token`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:new URLSearchParams({grant_type:`authorization_code`,code:l,redirect_uri:a,client_id:e,code_verifier:t})}),d=await u.json().catch(()=>null);if(!u.ok||!d?.access_token)throw Error(`Token exchange failed — check the OAuth app callback URL and client id`);await Er({linearAccessToken:d.access_token,linearOauthClientId:e})}async function E0(){await Er({linearAccessToken:void 0,linearApiKey:void 0})}Br(),Sr(),Fx(),gD();var D0=N(`<div class="bg-surface-2 border-border flex rounded-md border p-0.5">`),O0=N(`<span class="text-text-faint text-[10.5px] leading-snug">Cloud: picking an element opens the panel to draft & delegate to the Cursor agent. Local (react-grab style): picking auto-copies the element's context — source, stack, and your skills/memory paths — straight to the clipboard for a local Claude Code or Cursor session; the panel stays out of the way. Both share the same picker; switch anytime.`),k0=N(`<label class="flex cursor-pointer items-center gap-2 select-none"><input type=checkbox class="accent-accent rounded"><span class="text-text text-[12px]">Element screenshots`),A0=N(`<span class="text-text-faint text-[10.5px] leading-snug">Captures a highlighted screenshot of each picked element and attaches it to the issue. Costs a beat on huge pages — with this off, picking is instant (pure react-grab speed).`),j0=N(`<span class=text-text>Connected as <span class=font-medium></span> · <span class=text-text-dim>`),M0=N(`<div class="bg-surface border-border flex items-center justify-between rounded-lg border p-2.5"><span class="text-text text-[12px]">`),N0=N(`<option value>Select a team…`),P0=N(`<option value>No project`),F0=N(`<div class="flex flex-wrap gap-1">`),I0=N(`<label class="flex items-start gap-2"><input type=checkbox class="accent-accent mt-0.5"><span class="flex flex-col gap-0.5"><span class=text-[12px]>Let agents close out Linear themselves</span><span class="text-text-faint text-[10.5px] leading-snug">Embeds your Linear API key + raw GraphQL closeout recipes in every issue's Agent instructions — cloud agent VMs have no authenticated Linear MCP, so without this they can't comment, attach media, or move the issue. The key is visible to anyone who can read the issue.`),L0=N(`<p class="text-text-dim text-[11px]">No agents found — install the Cursor integration in Linear first.`),R0=N(`<span class="text-text-faint text-[10.5px] leading-snug">Empty = the default above (computer-use testing, video demo, PR + review babysitting).`),z0=N(`<div class="flex flex-col gap-1.5">`),B0=N(`<div class="flex flex-col gap-1"><span class="text-text-dim text-[11px] font-medium">Mode</span><div class="bg-surface-2 border-border flex rounded-md border p-0.5"></div><span class="text-text-faint text-[10.5px] leading-snug">Beside page squeezes the app next to the panel, DevTools-style — nothing gets covered. Also toggleable from the dock icon in the panel header.`),V0=N(`<div class="flex flex-col gap-1"><span class="text-text-dim text-[11px] font-medium">Dock side</span><div class="bg-surface-2 border-border flex rounded-md border p-0.5"></div><span class="text-text-faint text-[10.5px] leading-snug">The launcher pill is draggable — park it anywhere it doesn't cover your app.`),H0=N(`<option value>Select a channel…`),U0=N(`<label class="flex cursor-pointer items-center gap-2 select-none"><input type=checkbox class="accent-accent rounded"><span class="text-text text-[12px]">Announce new issues on create`),W0=N(`<span class="text-text-faint text-[10.5px] leading-snug">⚠️ Tokens are embedded in issue Agent-instructions so agents can post the finished demo — everyone who can read the issue can read them. Use single-channel-scoped bots.`),G0=N(`<div class="flex flex-col gap-1"><span class="text-text-dim text-[11px] font-medium">Provider preference</span><div class="bg-surface-2 border-border flex rounded-md border p-0.5"><button>Auto</button><button>OpenAI</button><button>Anthropic`),K0=N(`<p class="text-text-dim text-[11px]">`),q0=N(`<div class=min-h-[2lh]>`),J0=N(`<ol class="text-text-faint flex list-decimal flex-col gap-1 pl-4 text-[11px] leading-relaxed"><li>Pick an element on your running dev app.</li><li>Draft the issue (AI optional).</li><li>Create + delegate — Cursor's cloud agent fixes it and opens a PR.</li><li>Track and steer it from Activity.`),Y0=N(`<div class="flex h-full flex-col gap-5 overflow-y-auto pt-3 pb-6 pl-3 pr-4">`),X0=N(`<button>`),Z0=N(`<div class="flex gap-1.5">`),Q0=N(`<p class="text-text-faint text-center text-[10.5px]">or`),$0=N(`<span class="text-text-faint text-[10.5px] leading-snug">Register this callback URL in your Linear OAuth app config:<br><span class="font-mono text-[10.5px] break-all">`),e2=N(`<div class="flex flex-col gap-3">`),t2=N(`<span class=text-text-dim>Connected — verifying…`),n2=N(`<option> (<!>)`),r2=N(`<option>`),i2=N(`<button type=button><span class="mr-1 inline-block size-2 rounded-full align-middle">`),a2=N(`<option value>Select the agent…`),o2=N(`<option>#`),s2=N(`<p class="text-text-dim text-[11px]">No key set — AI drafting disabled, manual drafting still works.`);function c2(){let e=sr(),t=_r(()=>({queryKey:[`settings`],queryFn:Tr,staleTime:0})),n=k(()=>t.data??{});async function r(t,n=!1){await Er(t),await e.invalidateQueries({queryKey:[`settings`]}),n&&(await e.invalidateQueries({queryKey:[`viewer`]}),await e.invalidateQueries({queryKey:[`teams`]}),await e.invalidateQueries({queryKey:[`agents`]}),await e.invalidateQueries({queryKey:[`my-issues`]}))}let i=k(()=>!!(n().linearApiKey||n().linearAccessToken)),a=_r(()=>({queryKey:[`viewer`],queryFn:lO,enabled:i(),retry:0})),o=_r(()=>({queryKey:[`teams`],queryFn:uO,enabled:i()})),s=_r(()=>({queryKey:[`linear-projects`],queryFn:bO,enabled:i()})),c=_r(()=>({queryKey:[`linear-labels`],queryFn:xO,enabled:i()})),l=_r(()=>({queryKey:[`agents`],queryFn:dO,enabled:i()})),[u,d]=T(``),[f,p]=T(!1),[m,h]=T(``);async function g(){let e=u().trim();if(e){p(!0),h(``);try{await r({linearApiKey:e},!0),await lO(),d(``)}catch{h(`Key rejected — could not verify. Check the key and try again.`),await r({linearApiKey:void 0},!0)}finally{p(!1)}}}let[_,v]=T(``),[y,b]=T(!1),[x,S]=T(``);async function C(){let t=(_()||n().linearOauthClientId||``).trim();if(!t){S(`Enter an OAuth client ID first.`);return}b(!0),S(``);try{await T0(t),await e.invalidateQueries({queryKey:[`settings`]}),await e.invalidateQueries({queryKey:[`viewer`]}),await e.invalidateQueries({queryKey:[`teams`]}),await e.invalidateQueries({queryKey:[`agents`]}),await e.invalidateQueries({queryKey:[`my-issues`]})}catch(e){S(e instanceof Error?e.message:`OAuth flow failed.`)}finally{b(!1)}}let[w,E]=T(!1);async function O(){E(!0);try{await E0(),await e.invalidateQueries({queryKey:[`settings`]}),await e.invalidateQueries({queryKey:[`viewer`]}),await e.invalidateQueries({queryKey:[`teams`]}),await e.invalidateQueries({queryKey:[`agents`]}),await e.invalidateQueries({queryKey:[`my-issues`]})}finally{E(!1)}}let ee=xr?chrome.identity.getRedirectURL():null,te=_r(()=>({queryKey:[`slack-channels`,n().slackToken],queryFn:()=>QO(n().slackToken),enabled:!!n().slackToken,retry:0,staleTime:6e4})),A=k(()=>Ax(n())),ne=k(()=>{let e=A();return e?`Drafting with ${e} — ${Nx[e].fast} (fast) / ${Nx[e].best} (best)`:null});return(()=>{var e=Y0();return P(e,j(Fj,{title:`Workflow`,get children(){return[(()=>{var e=D0();return P(e,j(We,{each:[{id:`cloud`,label:`Cloud · Linear + Cursor`},{id:`local`,label:`Local · clipboard`}],children:e=>(()=>{var t=X0();return t.$$click=()=>void r({workflowMode:e.id}),P(t,()=>e.label),D(()=>st(t,`flex-1 rounded-[5px] px-2 py-1 text-[11.5px] font-medium transition-colors ${(n().workflowMode??`cloud`)===e.id?`bg-surface-3 text-text`:`text-text-dim hover:text-text cursor-pointer`}`)),t})()})),e})(),O0()]}}),null),P(e,j(Fj,{title:`Capture`,get children(){return[(()=>{var e=k0(),t=e.firstChild;return t.addEventListener(`change`,e=>void r({captureShots:e.currentTarget.checked||void 0})),D(()=>t.checked=!!n().captureShots),e})(),A0()]}}),null),P(e,j(Fj,{title:`Linear`,get children(){return j(M,{get when(){return i()},get fallback(){return(()=>{var e=e2();return P(e,j(Pj,{label:`Personal API key`,hint:`Create one at linear.app → Settings → API — fastest path.`,get children(){return[(()=>{var e=Z0();return P(e,j(Oj,{type:`password`,placeholder:`lin_api_…`,get value(){return u()},onInput:e=>d(e.currentTarget.value),"on:keydown":e=>{e.key===`Enter`&&g()}}),null),P(e,j(Ej,{variant:`primary`,get loading(){return f()},get disabled(){return!u().trim()},onClick:()=>void g(),class:`shrink-0`,children:`Connect`}),null),e})(),j(M,{get when(){return m()},get children(){return j(zj,{get message(){return m()}})}})]}}),null),P(e,j(M,{when:xr,get children(){return[Q0(),j(Pj,{label:`OAuth client ID`,get children(){return[(()=>{var e=Z0();return P(e,j(Oj,{placeholder:`your-client-id`,get value(){return _()||n().linearOauthClientId||``},onInput:e=>v(e.currentTarget.value)}),null),P(e,j(Ej,{variant:`ghost`,get loading(){return y()},onClick:()=>void C(),class:`shrink-0 whitespace-nowrap`,children:`Connect with OAuth`}),null),e})(),j(M,{get when(){return x()},get children(){return j(zj,{get message(){return x()}})}}),(()=>{var e=$0(),t=e.firstChild.nextSibling.nextSibling;return P(t,ee),e})()]}})]}}),null),e})()},get children(){var e=M0(),t=e.firstChild;return P(t,j(M,{get when(){return!a.isLoading},get fallback(){return t2()},get children(){return j(M,{get when(){return a.data},get fallback(){return j(M,{get when(){return a.isError},get fallback(){return t2()},get children(){return j(zj,{message:`Key rejected — reconnect`})}})},get children(){var e=j0(),t=e.firstChild.nextSibling,n=t.nextSibling.nextSibling;return P(t,()=>a.data.name),P(n,()=>a.data.email),e}})}})),P(e,j(Ej,{variant:`ghost`,get loading(){return w()},onClick:()=>void O(),class:`ml-2 shrink-0`,children:`Disconnect`}),null),e}})}}),null),P(e,j(M,{get when(){return i()},get children(){return j(Fj,{title:`Workspace`,get children(){return[j(Pj,{label:`Default team`,get children(){return j(Aj,{get value(){return n().defaultTeamId??``},onChange:e=>{let t=e.currentTarget.value;r({defaultTeamId:t||void 0})},get disabled(){return o.isLoading},get children(){return[N0(),j(M,{get when(){return o.data},get children(){return j(We,{get each(){return o.data},children:e=>(()=>{var t=n2(),r=t.firstChild,i=r.nextSibling;return i.nextSibling,P(t,()=>e.name,r),P(t,()=>e.key,i),D(()=>t.selected=e.id===n().defaultTeamId),D(()=>t.value=e.id),t})()})}})]}})}}),j(Pj,{label:`Default project`,hint:`Every issue created from the panel is filed into this project.`,get children(){return j(Aj,{get value(){return n().defaultProjectId??``},onChange:e=>void r({defaultProjectId:e.currentTarget.value||void 0}),get disabled(){return s.isLoading},get children(){return[(()=>{var e=P0();return D(()=>e.selected=!n().defaultProjectId),e})(),j(We,{get each(){return s.data??[]},children:e=>(()=>{var t=r2();return P(t,()=>e.name),D(()=>t.selected=e.id===n().defaultProjectId),D(()=>t.value=e.id),t})()})]}})}}),j(Pj,{label:`Default labels`,hint:`Applied to every issue created from the panel.`,get children(){var e=F0();return P(e,j(We,{get each(){return c.data??[]},children:e=>{let t=()=>(n().defaultLabelIds??[]).includes(e.id);return(()=>{var i=i2(),a=i.firstChild;return i.$$click=()=>{let i=n().defaultLabelIds??[];r({defaultLabelIds:t()?i.filter(t=>t!==e.id):[...i,e.id]})},P(i,()=>e.name,null),D(n=>{var r=`h-6 cursor-pointer rounded-full border px-2.5 text-[11px] font-medium transition-colors ${t()?`bg-accent-soft text-accent border-accent/40`:`bg-surface-2 text-text-dim border-border hover:bg-surface-3`}`,o=e.color;return r!==n.e&&st(i,n.e=r),o!==n.t&&dt(a,`background`,n.t=o),n},{e:void 0,t:void 0}),i})()}})),e}}),(()=>{var e=I0(),t=e.firstChild;return t.addEventListener(`change`,e=>void r({shareLinearKey:e.currentTarget.checked})),D(()=>t.checked=!!n().shareLinearKey),e})(),j(Pj,{label:`Staging branch`,hint:`Stage buttons on PRs merge the PR branch here — point your staging domain (e.g. preview.ahmedbanihani.com) at this branch in Vercel.`,get children(){return j(Oj,{get value(){return n().stagingBranch??``},placeholder:`staging`,onChange:e=>void r({stagingBranch:e.currentTarget.value.trim()||void 0})})}}),j(Pj,{label:`Cursor agent`,hint:`App users in your workspace. Pick Cursor — requires the Cursor integration installed in Linear (workspace admin) with usage-based pricing enabled in Cursor.`,get children(){return j(M,{get when(){return $e(()=>!!l.data)()&&l.data.length===0},get fallback(){return j(Aj,{get value(){return n().cursorAgentId??``},onChange:e=>{let t=e.currentTarget.value;if(!t){r({cursorAgentId:void 0,cursorAgentName:void 0,cursorAgentUrl:void 0});return}let n=l.data?.find(e=>e.id===t);n&&r({cursorAgentId:n.id,cursorAgentName:n.displayName,cursorAgentUrl:n.url??void 0})},get disabled(){return l.isLoading},get children(){return[a2(),j(M,{get when(){return l.data},get children(){return j(We,{get each(){return l.data},children:e=>(()=>{var t=r2();return P(t,()=>e.displayName),D(()=>t.selected=e.id===n().cursorAgentId),D(()=>t.value=e.id),t})()})}})]}})},get children(){return L0()}})}}),j(Pj,{label:`Default repository`,hint:`Appended to delegated issues as [repo=…] so Cursor picks the right repo.`,get children(){return j(Oj,{placeholder:`owner/repository`,get value(){return n().defaultRepo??``},onBlur:e=>{r({defaultRepo:e.currentTarget.value.trim()||void 0})}})}}),j(Pj,{label:`Cursor cloud model`,hint:`Appended as [model=…] — e.g. claude-opus-4-8, gpt-5.2, composer. Empty = Cursor's default.`,get children(){return j(Oj,{placeholder:`Cursor's default`,get value(){return n().cursorModel??``},onBlur:e=>{r({cursorModel:e.currentTarget.value.trim()||void 0})}})}}),j(Pj,{label:`Agent instructions`,hint:`Appended to every issue as '### Agent instructions' and given to the AI draft. Add demo credentials (username/password) so the agent can log in, test, and record its video. Careful: credentials become visible to everyone who can read the issue.`,get children(){return[j(kj,{rows:5,placeholder:hD,get value(){return n().issueTemplate??``},onBlur:e=>{r({issueTemplate:e.currentTarget.value.trim()||void 0})}}),R0()]}}),j(Pj,{label:`Dev server log URL`,hint:`Tail of your dev-server log attached to issues (and fed to AI drafts). Serve the log over HTTP: "dev:http": "next dev 2>&1 | tee public/dev-server.log" (gitignore it), then use /dev-server.log here. Empty = disabled.`,get children(){return j(Oj,{placeholder:`/dev-server.log`,get value(){return n().logUrl??``},onBlur:e=>{r({logUrl:e.currentTarget.value.trim()||void 0})}})}}),j(Pj,{label:`Log lines to attach`,hint:`Trailing lines included in the issue (10–500).`,get children(){return j(Oj,{type:`number`,min:`10`,max:`500`,placeholder:`100`,get value(){return n().logLines??``},onBlur:e=>{let t=Number(e.currentTarget.value);r({logLines:Number.isFinite(t)&&t>0?Math.min(500,Math.max(10,Math.round(t))):void 0})}})}}),j(Pj,{label:`Skills & memory paths`,hint:`One path per line. The cloud agent works in a full repo checkout, so committed paths (e.g. .claude/skills/apple-hig-design-principles) are readable directly — every issue gets a MANDATORY-reading section pointing at them. Repo-relative for cloud agents; absolute paths also work when you paste the issue into a local Claude Code session. Per project: these settings live per dev origin.`,get children(){return j(kj,{rows:4,placeholder:`.claude/skills/apple-hig-design-principles
|
|
268
268
|
.claude/CLAUDE.md
|
|
269
|
-
docs/design-tokens.md`,get value(){return n().skillPaths??``},onBlur:e=>{r({skillPaths:e.currentTarget.value.trim()||void 0})}})}}),j(Nj,{label:`Test account`,hint:`The cloud agent logs into the app with this while testing and recording its demo. Added to every issue's Agent instructions. Use a throwaway account — it's visible to everyone who can read the issue.`,get children(){var e=F0();return P(e,j(Dj,{placeholder:`Username or email (e.g. demo@yourapp.com)`,get value(){return n().testUsername??``},onBlur:e=>{r({testUsername:e.currentTarget.value.trim()||void 0})}}),null),P(e,j(Dj,{type:`password`,placeholder:`Password`,get value(){return n().testPassword??``},onBlur:e=>{r({testPassword:e.currentTarget.value.trim()||void 0})}}),null),e}})]}})}}),null),P(e,j(M,{when:!xr,get children(){return j(Pj,{title:`Panel`,get children(){return[(()=>{var e=I0(),t=e.firstChild.nextSibling;return P(t,j(We,{each:[{id:`overlay`,label:`Overlay`},{id:`pinned`,label:`Beside page`}],children:e=>(()=>{var t=K0();return t.$$click=()=>void r({panelMode:e.id,panelPos:void 0}),P(t,()=>e.label),D(()=>st(t,`flex-1 rounded-[5px] px-2 py-0.5 text-[11.5px] font-medium transition-colors ${(n().panelMode??`overlay`)===e.id?`bg-surface-3 text-text`:`text-text-dim hover:text-text cursor-pointer`}`)),t})()})),e})(),(()=>{var e=L0(),t=e.firstChild.nextSibling;return P(t,j(We,{each:[`left`,`right`],children:e=>(()=>{var t=K0();return t.$$click=()=>void r({panelSide:e}),P(t,e===`left`?`Left`:`Right`),D(()=>st(t,`flex-1 rounded-[5px] px-2 py-0.5 text-[11.5px] font-medium transition-colors ${(n().panelSide??`right`)===e?`bg-surface-3 text-text`:`text-text-dim hover:text-text cursor-pointer`}`)),t})()})),e})()]}})}}),null),P(e,j(Pj,{title:`Local Claude Code`,get children(){return j(Nj,{label:`Bridge URL`,hint:'Run `npx linear-grab-bridge` in your repo\'s terminal (binds localhost only). Enables "Delegate to → Local Claude Code" in Draft, the Local tab, and relays blocked uploads to Linear storage.',get children(){return j(Dj,{placeholder:`http://localhost:4577`,get value(){return n().bridgeUrl??``},onBlur:e=>{r({bridgeUrl:e.currentTarget.value.trim()||void 0})}})}})}}),null),P(e,j(Pj,{title:`Asset uploads`,get children(){return[j(Nj,{label:`GitHub token`,hint:`Linear's storage blocks browser uploads in some browsers (Safari). With this set, GIFs/screenshots upload to your GitHub repo instead and embed automatically. Fine-grained PAT with Contents read/write on the assets repo.`,get children(){return j(Dj,{type:`password`,placeholder:`github_pat_…`,get value(){return n().githubToken??``},onBlur:e=>{r({githubToken:e.currentTarget.value.trim()||void 0})}})}}),j(Nj,{label:`Assets repository`,hint:`owner/repo — must be PUBLIC so Linear (and agents) can render the images. Files land under linear-grab/.`,get children(){return j(Dj,{placeholder:`ahmedbanihanibh/linear-grab-assets`,get value(){return n().githubAssetsRepo??``},onBlur:e=>{r({githubAssetsRepo:e.currentTarget.value.trim()||void 0})}})}})]}}),null),P(e,j(Pj,{title:`Notifications`,get children(){return[j(Nj,{label:`Slack bot token`,hint:`Bot token (xoxb-…) with chat:write + channels:read + files:write. New issues get announced with links + demo, and the AGENT receives the token to post its finished demo video itself.`,get children(){return j(Dj,{type:`password`,placeholder:`xoxb-…`,get value(){return n().slackToken??``},onBlur:e=>{r({slackToken:e.currentTarget.value.trim()||void 0})}})}}),j(M,{get when(){return n().slackToken},get children(){return j(Nj,{label:`Slack channel`,get children(){return j(M,{get when(){return!te.isError},get fallback(){return j(Rj,{message:`Couldn't list channels — check the token scopes (channels:read).`})},get children(){return j(kj,{get value(){return n().slackChannelId??``},get disabled(){return te.isLoading},onChange:e=>{let t=e.currentTarget.value,n=te.data?.find(e=>e.id===t);r({slackChannelId:t||void 0,slackChannelName:n?.name})},get children(){return[R0(),j(We,{get each(){return te.data??[]},children:e=>(()=>{var t=n2();return t.firstChild,P(t,()=>e.name,null),D(()=>t.selected=e.id===n().slackChannelId),D(()=>t.value=e.id),t})()})]}})}})}})}}),j(Nj,{label:`Telegram bot token`,hint:`From @BotFather. The agent also receives it to send the demo video (sendVideo).`,get children(){return j(Dj,{type:`password`,placeholder:`123456:ABC-…`,get value(){return n().telegramToken??``},onBlur:e=>{r({telegramToken:e.currentTarget.value.trim()||void 0})}})}}),j(M,{get when(){return n().telegramToken},get children(){return j(Nj,{label:`Telegram chat ID`,hint:`Add the bot to your group/channel, send a message, then read the chat id from api.telegram.org/bot<token>/getUpdates.`,get children(){return j(Dj,{placeholder:`-1001234567890`,get value(){return n().telegramChatId??``},onBlur:e=>{r({telegramChatId:e.currentTarget.value.trim()||void 0})}})}})}}),(()=>{var e=z0(),t=e.firstChild;return t.addEventListener(`change`,e=>void r({notifyOnCreate:e.currentTarget.checked?void 0:!1})),D(()=>t.checked=n().notifyOnCreate!==!1),e})(),B0()]}}),null),P(e,j(Pj,{title:`AI providers`,get children(){return[j(Nj,{label:`OpenAI API key`,get children(){return j(Dj,{type:`password`,placeholder:`sk-…`,get value(){return n().openaiKey??``},onBlur:e=>{r({openaiKey:e.currentTarget.value.trim()||void 0})}})}}),j(Nj,{label:`Anthropic API key`,get children(){return j(Dj,{type:`password`,placeholder:`sk-ant-…`,get value(){return n().anthropicKey??``},onBlur:e=>{r({anthropicKey:e.currentTarget.value.trim()||void 0})}})}}),(()=>{var e=V0(),t=e.firstChild.nextSibling.firstChild,i=t.nextSibling,a=i.nextSibling;return t.$$click=()=>void r({preferredProvider:void 0}),i.$$click=()=>void r({preferredProvider:`openai`}),a.$$click=()=>void r({preferredProvider:`anthropic`}),D(e=>{var r=`flex-1 rounded-[5px] px-2 py-0.5 text-[11.5px] font-medium transition-colors ${n().preferredProvider===void 0?`bg-surface-3 text-text`:`text-text-dim hover:text-text cursor-pointer`}`,o=`flex-1 rounded-[5px] px-2 py-0.5 text-[11.5px] font-medium transition-colors disabled:cursor-not-allowed ${n().preferredProvider===`openai`?`bg-surface-3 text-text`:`text-text-dim hover:text-text cursor-pointer disabled:text-text-faint`}`,s=!n().openaiKey,c=`flex-1 rounded-[5px] px-2 py-0.5 text-[11.5px] font-medium transition-colors disabled:cursor-not-allowed ${n().preferredProvider===`anthropic`?`bg-surface-3 text-text`:`text-text-dim hover:text-text cursor-pointer disabled:text-text-faint`}`,l=!n().anthropicKey;return r!==e.e&&st(t,e.e=r),o!==e.t&&st(i,e.t=o),s!==e.a&&(i.disabled=e.a=s),c!==e.o&&st(a,e.o=c),l!==e.i&&(a.disabled=e.i=l),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),e})(),(()=>{var e=U0();return P(e,j(M,{get when(){return ne()},get fallback(){return r2()},get children(){var e=H0();return P(e,ne),e}})),e})()]}}),null),P(e,j(Pj,{title:`How it works`,get children(){return W0()}}),null),e})()}rt([`click`]);var a2=`linear-grab`,o2=`queries`,s2=[`my-issues`,`issue`,`sessions`,`teams`,`agents`];function c2(){return new Promise(e=>{try{let t=indexedDB.open(a2,1);t.onupgradeneeded=()=>t.result.createObjectStore(o2),t.onsuccess=()=>e(t.result),t.onerror=()=>e(null)}catch{e(null)}})}function l2(e){return typeof e[0]==`string`&&s2.includes(e[0])}async function u2(e){let t=await c2();if(!t)return()=>{};await new Promise(n=>{try{let r=t.transaction(o2,`readonly`).objectStore(o2).openCursor();r.onsuccess=()=>{let t=r.result;if(!t)return n();try{let{queryKey:n,data:r}=t.value;l2(n)&&e.getQueryData(n)===void 0&&e.setQueryData(n,r,{updatedAt:0})}catch{}t.continue()},r.onerror=()=>n()}catch{n()}});let n=new Map,r=e.getQueryCache().subscribe(r=>{if(r.type!==`updated`||r.action.type!==`success`)return;let{queryKey:i,queryHash:a}=r.query;if(!l2(i))return;let o=n.get(a);o&&clearTimeout(o),n.set(a,setTimeout(()=>{n.delete(a);try{let n=e.getQueryData(i);if(n===void 0)return;t.transaction(o2,`readwrite`).objectStore(o2).put({queryKey:i,data:n},a)}catch{}},400))});return()=>{r();for(let e of n.values())clearTimeout(e);t.close()}}Br();var d2=N(`<svg viewBox="0 0 100 100"fill=currentColor aria-hidden><path d="M1.22541 61.5228c-.2225-.9485.90748-1.5459 1.59638-.857L39.3342 97.1782c.6889.6889.0915 1.8189-.857 1.5964C20.0515 94.4522 5.54779 79.9485 1.22541 61.5228ZM.00189135 46.8891c-.01764375.2833.08887215.5599.28957165.7606L52.3503 99.7085c.2007.2007.4773.3075.7606.2896 2.3692-.1476 4.6938-.46 6.9624-.9259.7645-.157 1.0301-1.0963.4782-1.6481L2.57595 39.4485c-.55186-.5519-1.49117-.2863-1.648174.4782-.465915 2.2686-.77832 4.5932-.92588465 6.9624ZM4.21093 29.7054c-.16649.3738-.08169.8106.20765 1.1l64.77602 64.776c.2894.2894.7262.3742 1.1.2077 1.7861-.7956 3.5171-1.6927 5.1855-2.684.5521-.328.6373-1.0867.1832-1.5407L8.43566 24.3367c-.45409-.4541-1.21271-.3689-1.54074.1832-.99132 1.6684-1.88843 3.3994-2.68399 5.1855ZM12.6587 18.074c-.3701-.3701-.393-.9637-.0443-1.3541C21.7795 6.45931 35.1114 0 49.9519 0 77.5927 0 100 22.4073 100 50.0481c0 14.8405-6.4593 28.1724-16.7199 37.3375-.3903.3487-.984.3258-1.3541-.0443L12.6587 18.074Z">`),f2=N(`<button><svg width=12 height=12 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 aria-hidden><rect x=1.5 y=2.5 width=13 height=11 rx=1.5></rect><path d="M10 2.5v11">`),p2=N(`<button aria-label="Minimize to launcher"title="Minimize to launcher"class="text-text-dim hover:text-text hover:bg-surface-3 grid size-6 shrink-0 cursor-pointer place-items-center rounded-md text-[15px] leading-none transition-colors">–`),m2=N(`<div class="bg-bg text-text flex h-full flex-col"><header><span class="text-accent mr-0.5 inline-flex shrink-0"title="Linear Grab"></span><div class="no-scrollbar flex min-w-0 flex-1 items-center gap-1 overflow-x-auto"></div></header><main class="min-h-0 flex-1"><div class=h-full></div><div class=h-full></div><div class=h-full></div><div class=h-full></div><div class=h-full></div><div class=h-full></div><div class=h-full></div><div class=h-full>`),h2=N(`<button>`),g2=[{id:`draft`,label:`Draft`},{id:`capture`,label:`Capture`},{id:`activity`,label:`Activity`},{id:`running`,label:`Running`},{id:`cloud`,label:`Cloud`},{id:`local`,label:`Local`},{id:`prs`,label:`PRs`},{id:`settings`,label:`Settings`}],_2=new gr({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});function v2(e){return(()=>{var t=d2();return D(n=>{var r=e.size??14,i=e.size??14;return r!==n.e&&it(t,`width`,n.e=r),i!==n.t&&it(t,`height`,n.t=i),n},{e:void 0,t:void 0}),t})()}function y2(e){let[t,n]=T(`draft`),r=()=>{_2.invalidateQueries({queryKey:[`grab`]}),ij()===`capture`&&n(`capture`),e.onGrab?.()};return O(()=>{let e=QA();e&&n(e)}),ie(()=>{let e=u2(_2),t=UZ(r),n=()=>{GO().then(e$),VO()};n();let i=Mr(e=>{e===`settings`&&(_2.invalidateQueries({queryKey:[`settings`]}),n()),e===`grab`&&r()});ae(()=>{t(),i(),e.then(e=>e())})}),j(cr,{client:_2,get children(){var r=m2(),i=r.firstChild,a=i.firstChild,o=a.nextSibling,s=i.nextSibling.firstChild,c=s.nextSibling,l=c.nextSibling,u=l.nextSibling,d=u.nextSibling,f=d.nextSibling,p=f.nextSibling,m=p.nextSibling;return i.$$pointerdown=t=>e.onHeaderPointerDown?.(t),P(a,j(v2,{size:14})),P(o,j(We,{each:g2,children:e=>(()=>{var r=h2();return r.$$click=()=>n(e.id),P(r,()=>e.label),D(()=>st(r,`h-6 shrink-0 rounded-md px-2 text-[12px] font-medium whitespace-nowrap transition-colors ${t()===e.id?`bg-surface-3 text-text`:`text-text-dim hover:text-text cursor-pointer`}`)),r})()})),P(i,j(M,{get when(){return e.onTogglePin},get children(){var t=f2();return t.$$click=()=>e.onTogglePin?.(),D(n=>{var r=e.pinned?`Switch to overlay`:`Dock beside page`,i=e.pinned?`Overlay the page`:`Dock beside page (squeezes the app, DevTools-style)`,a=`hover:bg-surface-3 grid size-6 shrink-0 cursor-pointer place-items-center rounded-md transition-colors ${e.pinned?`text-accent`:`text-text-dim hover:text-text`}`;return r!==n.e&&it(t,`aria-label`,n.e=r),i!==n.t&&it(t,`title`,n.t=i),a!==n.a&&st(t,n.a=a),n},{e:void 0,t:void 0,a:void 0}),t}}),null),P(i,j(M,{get when(){return e.onClose},get children(){var t=p2();return t.$$click=()=>e.onClose?.(),t}}),null),P(s,j(vM,{onCreated:()=>n(`activity`)})),P(c,j(pQ,{})),P(l,j(X$,{})),P(u,j(y1,{})),P(d,j(p1,{})),P(f,j(i0,{})),P(p,j(y0,{onOpenIssue:()=>n(`activity`)})),P(m,j(i2,{})),D(n=>{var r=`border-border bg-surface flex shrink-0 items-center gap-1 border-b px-2 py-1.5 select-none ${e.onHeaderPointerDown?`cursor-grab active:cursor-grabbing`:``}`,a=t()!==`draft`,o=t()!==`capture`,h=t()!==`activity`,g=t()!==`running`,_=t()!==`cloud`,v=t()!==`local`,y=t()!==`prs`,b=t()!==`settings`;return r!==n.e&&st(i,n.e=r),a!==n.t&&s.classList.toggle(`hidden`,n.t=a),o!==n.a&&c.classList.toggle(`hidden`,n.a=o),h!==n.o&&l.classList.toggle(`hidden`,n.o=h),g!==n.i&&u.classList.toggle(`hidden`,n.i=g),_!==n.n&&d.classList.toggle(`hidden`,n.n=_),v!==n.s&&f.classList.toggle(`hidden`,n.s=v),y!==n.h&&p.classList.toggle(`hidden`,n.h=y),b!==n.r&&m.classList.toggle(`hidden`,n.r=b),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0}),r}})}rt([`pointerdown`,`click`]);var b2=`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */
|
|
270
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--font-serif:ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;--font-mono:ui-monospace, "SF Mono", Menlo, monospace;--color-red-500:oklch(63.7% .237 25.331);--color-white:#fff;--spacing:.25rem;--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-wide:.025em;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:4px;--radius-md:6px;--radius-lg:10px;--radius-xl:.75rem;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-bg:#0b0c0e;--color-surface:#141517;--color-surface-2:#1c1d21;--color-surface-3:#24262b;--color-border:#26282d;--color-border-strong:#34363d;--color-text:#e8e9eb;--color-text-dim:#8b8e98;--color-text-faint:#5c5f6a;--color-accent:#5e6ad2;--color-accent-hover:#6e79e0;--color-accent-soft:#5e6ad226;--color-success:#4cb782;--color-warn:#f2c94c;--color-danger:#eb5757;--color-danger-soft:#eb575726}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.inset-y-0{inset-block:0}.top-0{top:0}.top-0\\.5{top:calc(var(--spacing) * .5)}.top-1{top:var(--spacing)}.top-1\\/2{top:50%}.top-\\[2px\\]{top:2px}.top-full{top:100%}.right-0{right:0}.right-0\\.5{right:calc(var(--spacing) * .5)}.right-4{right:calc(var(--spacing) * 4)}.right-full{right:100%}.bottom-0{bottom:0}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-\\[2px\\]{bottom:2px}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:var(--spacing)}.left-1\\/2{left:50%}.left-full{left:100%}.z-1{z-index:1}.z-10{z-index:10}.z-\\[2147483645\\]{z-index:2147483645}.z-\\[2147483646\\]{z-index:2147483646}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.-m-0{margin:0}.-m-0\\.5{margin:calc(var(--spacing) * -.5)}.-m-4{margin:calc(var(--spacing) * -4)}.m-0{margin:0}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.-my-1{margin-block:calc(var(--spacing) * -1)}.-my-1\\.5{margin-block:calc(var(--spacing) * -1.5)}.mt-0{margin-top:0}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-px{margin-top:1px}.mr-0{margin-right:0}.mr-0\\.5{margin-right:calc(var(--spacing) * .5)}.mr-1{margin-right:var(--spacing)}.mr-1\\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-2\\.5{margin-right:calc(var(--spacing) * 2.5)}.-mb-4{margin-bottom:calc(var(--spacing) * -4)}.mb-0{margin-bottom:0}.mb-0\\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\\.5{margin-bottom:calc(var(--spacing) * 2.5)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-2\\.5{margin-left:calc(var(--spacing) * 2.5)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.ml-px{margin-left:1px}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-5{-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.list-item{display:list-item}.table{display:table}.size-0{width:0;height:0}.size-1{width:var(--spacing);height:var(--spacing)}.size-1\\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-\\[12px\\]{width:12px;height:12px}.size-\\[16px\\]{width:16px;height:16px}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-16{height:calc(var(--spacing) * 16)}.h-\\[8px\\]{height:8px}.h-\\[17px\\]{height:17px}.h-\\[18px\\]{height:18px}.h-\\[20px\\]{height:20px}.h-\\[24px\\]{height:24px}.h-fit{height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-44{max-height:calc(var(--spacing) * 44)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\\[var\\(--rg-edit-list-max-h\\)\\]{max-height:var(--rg-edit-list-max-h)}.min-h-0{min-height:0}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-\\[2lh\\]{min-height:2lh}.min-h-\\[28px\\]{min-height:28px}.w-1{width:var(--spacing)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-16{width:calc(var(--spacing) * 16)}.w-28{width:calc(var(--spacing) * 28)}.w-72{width:calc(var(--spacing) * 72)}.w-\\[2px\\]{width:2px}.w-\\[calc\\(100\\%\\+16px\\)\\]{width:calc(100% + 16px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.max-w-\\[55\\%\\]{max-width:55%}.max-w-\\[100vw\\]{max-width:100vw}.max-w-\\[110px\\]{max-width:110px}.max-w-\\[280px\\]{max-width:280px}.max-w-full{max-width:100%}.min-w-0{min-width:0}.min-w-\\[3\\.5ch\\]{min-width:3.5ch}.min-w-\\[4ch\\]{min-width:4ch}.min-w-\\[5ch\\]{min-width:5ch}.min-w-\\[6ch\\]{min-width:6ch}.min-w-\\[12ch\\]{min-width:12ch}.min-w-\\[36px\\]{min-width:36px}.min-w-\\[52px\\]{min-width:52px}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[150px\\]{min-width:150px}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-rotate-90{rotate:-90deg}.rotate-0{rotate:0deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.list-decimal{list-style-type:decimal}.grid-cols-\\[0fr\\]{grid-template-columns:0fr}.grid-cols-\\[1fr\\]{grid-template-columns:1fr}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:0}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-\\[5px\\]{gap:5px}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-clip{overflow:clip}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[5px\\]{border-radius:5px}.rounded-\\[6px\\]{border-radius:6px}.rounded-\\[13px\\]{border-radius:13px}.rounded-\\[14px\\]{border-radius:14px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-\\[10px\\]{border-top-left-radius:10px;border-bottom-left-radius:10px}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-r-\\[10px\\]{border-top-right-radius:10px;border-bottom-right-radius:10px}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-\\[6px\\]{border-bottom-right-radius:6px;border-bottom-left-radius:6px}.rounded-b-\\[10px\\]{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.\\[border-width\\:0\\.5px\\]{border-width:.5px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-4{border-top-style:var(--tw-border-style);border-top-width:4px}.\\[border-top-width\\:0\\.5px\\]{border-top-width:.5px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-dotted{--tw-border-style:dotted;border-style:dotted}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-\\[var\\(--rg-border-button\\)\\]{border-color:var(--rg-border-button)}.border-accent{border-color:var(--color-accent)}.border-accent\\/40{border-color:#5e6ad266}@supports (color:color-mix(in lab, red, red)){.border-accent\\/40{border-color:color-mix(in oklab, var(--color-accent) 40%, transparent)}}.border-border{border-color:var(--color-border)}.border-success{border-color:var(--color-success)}.border-success\\/40{border-color:#4cb78266}@supports (color:color-mix(in lab, red, red)){.border-success\\/40{border-color:color-mix(in oklab, var(--color-success) 40%, transparent)}}.border-text-dim{border-color:var(--color-text-dim)}.border-transparent{border-color:#0000}.border-warn{border-color:var(--color-warn)}.border-warn\\/40{border-color:#f2c94c66}@supports (color:color-mix(in lab, red, red)){.border-warn\\/40{border-color:color-mix(in oklab, var(--color-warn) 40%, transparent)}}.border-t-\\[var\\(--rg-border-subtle\\)\\]{border-top-color:var(--rg-border-subtle)}.border-t-transparent{border-top-color:#0000}.bg-\\[var\\(--rg-error-bg\\)\\]{background-color:var(--rg-error-bg)}.bg-\\[var\\(--rg-panel-bg\\)\\]{background-color:var(--rg-panel-bg)}.bg-\\[var\\(--rg-submit-bg\\)\\]{background-color:var(--rg-submit-bg)}.bg-\\[var\\(--rg-surface-active\\)\\]{background-color:var(--rg-surface-active)}.bg-\\[var\\(--rg-surface-hover\\)\\]{background-color:var(--rg-surface-hover)}.bg-\\[var\\(--rg-text-primary\\)\\]{background-color:var(--rg-text-primary)}.bg-\\[var\\(--rg-text-secondary\\)\\]{background-color:var(--rg-text-secondary)}.bg-accent{background-color:var(--color-accent)}.bg-accent-soft{background-color:var(--color-accent-soft)}.bg-bg{background-color:var(--color-bg)}.bg-bg\\/80{background-color:#0b0c0ecc}@supports (color:color-mix(in lab, red, red)){.bg-bg\\/80{background-color:color-mix(in oklab, var(--color-bg) 80%, transparent)}}.bg-border{background-color:var(--color-border)}.bg-current{background-color:currentColor}.bg-danger{background-color:var(--color-danger)}.bg-danger-soft{background-color:var(--color-danger-soft)}.bg-red-500{background-color:var(--color-red-500)}.bg-success{background-color:var(--color-success)}.bg-surface{background-color:var(--color-surface)}.bg-surface-2{background-color:var(--color-surface-2)}.bg-surface-3{background-color:var(--color-surface-3)}.bg-text-faint{background-color:var(--color-text-faint)}.bg-transparent{background-color:#0000}.bg-warn{background-color:var(--color-warn)}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:0}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-6{padding:calc(var(--spacing) * 6)}.px-0{padding-inline:0}.px-0\\.25{padding-inline:calc(var(--spacing) * .25)}.px-1{padding-inline:var(--spacing)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-\\[3px\\]{padding-inline:3px}.py-0{padding-block:0}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-0\\.25{padding-block:calc(var(--spacing) * .25)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-px{padding-block:1px}.pt-0{padding-top:0}.pt-0\\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pb-1{padding-bottom:var(--spacing)}.pb-1\\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pl-0{padding-left:0}.pl-0\\.5{padding-left:calc(var(--spacing) * .5)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-2\\.5{padding-left:calc(var(--spacing) * 2.5)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-end{text-align:end}.text-justify{text-align:justify}.text-left{text-align:left}.text-right{text-align:right}.text-start{text-align:start}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-serif{font-family:var(--font-serif)}.text-\\[9\\.5px\\]{font-size:9.5px}.text-\\[9px\\]{font-size:9px}.text-\\[10\\.5px\\]{font-size:10.5px}.text-\\[10px\\]{font-size:10px}.text-\\[11\\.5px\\]{font-size:11.5px}.text-\\[11px\\]{font-size:11px}.text-\\[12\\.5px\\]{font-size:12.5px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[15px\\]{font-size:15px}.leading-3{--tw-leading:calc(var(--spacing) * 3);line-height:calc(var(--spacing) * 3)}.leading-3\\.5{--tw-leading:calc(var(--spacing) * 3.5);line-height:calc(var(--spacing) * 3.5)}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-extralight{--tw-font-weight:var(--font-weight-extralight);font-weight:var(--font-weight-extralight)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.font-thin{--tw-font-weight:var(--font-weight-thin);font-weight:var(--font-weight-thin)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-normal{overflow-wrap:normal;word-break:normal}.break-words,.wrap-break-word{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.text-ellipsis{text-overflow:ellipsis}.whitespace-break-spaces{white-space:break-spaces}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[var\\(--rg-error-text\\)\\]{color:var(--rg-error-text)}.text-\\[var\\(--rg-submit-fg\\)\\]{color:var(--rg-submit-fg)}.text-\\[var\\(--rg-text-primary\\)\\]{color:var(--rg-text-primary)}.text-\\[var\\(--rg-text-primary-85\\)\\]{color:var(--rg-text-primary-85)}.text-\\[var\\(--rg-text-secondary\\)\\]{color:var(--rg-text-secondary)}.text-accent{color:var(--color-accent)}.text-danger{color:var(--color-danger)}.text-success{color:var(--color-success)}.text-text{color:var(--color-text)}.text-text-dim{color:var(--color-text-dim)}.text-text-faint{color:var(--color-text-faint)}.text-warn{color:var(--color-warn)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.accent-accent{accent-color:var(--color-accent)}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.\\[box-shadow\\:var\\(--rg-shadow\\)\\]{box-shadow:var(--rg-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.\\[filter\\:var\\(--rg-drop-shadow\\)\\]{filter:var(--rg-drop-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-columns\\]{transition-property:grid-template-columns;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\]{transition-property:grid-template-rows;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[padding\\,border-radius\\,transform\\]{transition-property:padding,border-radius,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[top\\,left\\,width\\,height\\,opacity\\,border-radius\\]{transition-property:top,left,width,height,opacity,border-radius;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,color\\]{transition-property:transform,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.delay-\\[80ms\\]{transition-delay:80ms}.duration-60{--tw-duration:60ms;transition-duration:60ms}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-120{--tw-duration:.12s;transition-duration:.12s}.duration-140{--tw-duration:.14s;transition-duration:.14s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-180{--tw-duration:.18s;transition-duration:.18s}.duration-220{--tw-duration:.22s;transition-duration:.22s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-400{--tw-duration:.4s;transition-duration:.4s}.ease-\\[cubic-bezier\\(0\\,0\\,0\\.2\\,1\\)\\]{--tw-ease:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-\\[opacity\\,transform\\]{will-change:opacity,transform}.will-change-transform{will-change:transform}.contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,) var(--tw-contain-layout,) var(--tw-contain-paint,) var(--tw-contain-style,)}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.\\[corner-shape\\:superellipse\\(1\\.25\\)\\]{corner-shape:superellipse(1.25)}.\\[font-synthesis\\:none\\]{font-synthesis:none}.group-open\\:rotate-90:is(:where(.group):is([open],:popover-open,:open) *){rotate:90deg}@media (hover:hover){.group-hover\\:text-\\[var\\(--rg-text-primary\\)\\]:is(:where(.group):hover *){color:var(--rg-text-primary)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\\:text-text-faint::placeholder{color:var(--color-text-faint)}@media (hover:hover){.hover\\:bg-\\[var\\(--rg-error-bg-hover\\)\\]:hover{background-color:var(--rg-error-bg-hover)}.hover\\:bg-\\[var\\(--rg-surface-active\\)\\]:hover{background-color:var(--rg-surface-active)}.hover\\:bg-\\[var\\(--rg-surface-hover\\)\\]:hover{background-color:var(--rg-surface-hover)}.hover\\:bg-accent-hover:hover{background-color:var(--color-accent-hover)}.hover\\:bg-accent\\/50:hover{background-color:#5e6ad280}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/50:hover{background-color:color-mix(in oklab, var(--color-accent) 50%, transparent)}}.hover\\:bg-danger\\/30:hover{background-color:#eb57574d}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger\\/30:hover{background-color:color-mix(in oklab, var(--color-danger) 30%, transparent)}}.hover\\:bg-surface-2:hover{background-color:var(--color-surface-2)}.hover\\:bg-surface-3:hover{background-color:var(--color-surface-3)}.hover\\:text-\\[var\\(--rg-text-primary\\)\\]:hover{color:var(--rg-text-primary)}.hover\\:text-accent:hover{color:var(--color-accent)}.hover\\:text-danger:hover{color:var(--color-danger)}.hover\\:text-text:hover{color:var(--color-text)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-80:hover{opacity:.8}}.focus\\:border-accent:focus{border-color:var(--color-accent)}.active\\:cursor-grabbing:active{cursor:grabbing}.active\\:bg-accent:active{background-color:var(--color-accent)}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-surface-3:disabled{background-color:var(--color-surface-3)}.disabled\\:text-text-faint:disabled{color:var(--color-text-faint)}.disabled\\:opacity-40:disabled{opacity:.4}@media (hover:hover){.disabled\\:hover\\:bg-surface-2:disabled:hover{background-color:var(--color-surface-2)}}}:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}[data-theme=light],:host([data-theme=light]){--color-bg:#fbfbfc;--color-surface:#fff;--color-surface-2:#f4f4f6;--color-surface-3:#e9e9ee;--color-border:#e2e2e8;--color-border-strong:#cfcfd8;--color-text:#1b1c20;--color-text-dim:#5c5f6a;--color-text-faint:#9a9da8;--color-accent-soft:#5e6ad21f;--color-danger-soft:#eb57571a;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:light){:root:not([data-theme=dark]){--color-bg:#fbfbfc;--color-surface:#fff;--color-surface-2:#f4f4f6;--color-surface-3:#e9e9ee;--color-border:#e2e2e8;--color-border-strong:#cfcfd8;--color-text:#1b1c20;--color-text-dim:#5c5f6a;--color-text-faint:#9a9da8;--color-accent-soft:#5e6ad21f;--color-danger-soft:#eb57571a;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}}body{background-color:var(--color-bg);font-family:var(--font-sans);color:var(--color-text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;min-width:320px;margin:0;font-size:13px}@keyframes geist-spinner-fade{0%{opacity:1}to{opacity:.15}}[data-tip]{position:relative}[data-tip]:hover:after{content:attr(data-tip);color:#fff;white-space:nowrap;text-overflow:ellipsis;pointer-events:none;z-index:60;background:#1b1c20;border-radius:6px;max-width:260px;padding:3px 8px;font-size:10.5px;font-weight:500;line-height:1.35;position:absolute;bottom:calc(100% + 6px);left:50%;overflow:hidden;transform:translate(-50%);box-shadow:0 4px 12px #0000004d}[data-tip][data-tip-pos~=right]:hover:after{left:0;transform:none}[data-tip][data-tip-pos~=left]:hover:after{left:auto;right:0;transform:none}[data-tip][data-tip-pos~=bottom]:hover:after{top:calc(100% + 6px);bottom:auto}.no-scrollbar{scrollbar-width:none}.no-scrollbar::-webkit-scrollbar{display:none}.lg-md p{margin:0 0 6px}.lg-md p:last-child{margin-bottom:0}.lg-md a{color:var(--color-accent);word-break:break-all;text-decoration:none}.lg-md a:hover{text-decoration:underline}.lg-md code{background:var(--color-surface-2);border:1px solid var(--color-border);font-family:var(--font-mono);border-radius:4px;padding:0 4px;font-size:11px}.lg-md pre{background:var(--color-surface-2);border:1px solid var(--color-border);border-radius:6px;margin:6px 0;padding:8px;overflow-x:auto}.lg-md pre code{white-space:pre;background:0 0;border:none;padding:0;font-size:11px}.lg-md ul,.lg-md ol{flex-direction:column;gap:2px;margin:4px 0 6px;padding-left:18px;display:flex}.lg-md ul{list-style:outside}.lg-md ol{list-style:decimal}.lg-md h4{margin:8px 0 4px;font-size:12px;font-weight:600}.lg-md lg-media{display:block}.lg-md lg-media img,.lg-md lg-media video{border:1px solid var(--color-border);border-radius:6px;max-width:100%;margin:4px 0}.lg-md video{border:1px solid var(--color-border);background:#000;border-radius:6px;max-width:100%;margin:4px 0}.lg-md img{border:1px solid var(--color-border);border-radius:6px;max-width:100%;margin:4px 0}.lg-md strong{font-weight:600}*{scrollbar-width:thin;scrollbar-color:var(--color-border-strong) transparent}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:var(--color-border-strong);border-radius:4px}::-webkit-scrollbar-track{background:0 0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}`;Br();var x2=N(`<span aria-hidden class="bg-danger size-2 shrink-0 animate-pulse rounded-full">`),S2=N(`<span class="text-text min-w-[5ch] text-[11px] font-medium tabular-nums">`),C2=N(`<button class="bg-accent hover:bg-accent-hover h-7 cursor-pointer rounded-full px-2.5 text-[11px] font-medium text-white transition-colors"><span class="inline-block min-w-[4ch] text-center">Stop`),w2=N(`<p class="text-warn px-1.5 pt-1 pb-1.5 text-[10.5px] font-semibold tracking-wide uppercase">Needs review`),T2=N(`<div><p class="text-text-dim px-1.5 pt-1 pb-1.5 text-[10.5px] font-semibold tracking-wide uppercase">Running agents`),E2=N(`<div class="fixed z-[2147483646] select-none"><div class="bg-surface border-border text-text flex h-9 cursor-grab items-center gap-1 rounded-full border py-1 pr-1 pl-2.5 font-sans shadow-lg active:cursor-grabbing">`),D2=N(`<div><div title="Drag to resize">`),O2=N(`<button title="Open Linear Grab"aria-label="Open Linear Grab"class="text-accent hover:opacity-80 inline-flex cursor-pointer items-center gap-1.5">`),k2=N(`<span class="bg-border h-4 w-px"aria-hidden>`),A2=N(`<span aria-hidden class="bg-warn size-2 rounded-full">`),j2=N(`<span class="text-warn min-w-[3.5ch] text-left text-[11px] font-medium tabular-nums"> rev`),M2=N(`<button title="Running agents"aria-label="Running agents"class="hover:bg-surface-2 flex h-7 cursor-pointer items-center gap-1.5 rounded-full px-2 transition-colors"><span aria-hidden></span><span>`),N2=N(`<p class="text-text-faint px-1.5 pb-1.5 text-[11.5px]">No agents running right now.`),P2=N(`<button class="hover:bg-surface-2 flex w-full cursor-pointer flex-col gap-0.5 rounded-md px-1.5 py-1.5 text-left transition-colors"><span class="flex min-w-0 items-center gap-1.5"><span aria-hidden class="size-1.5 shrink-0 rounded-full"></span><span class="font-mono text-text-dim shrink-0 text-[10.5px]"></span><span class="text-text truncate text-[11.5px]"></span></span><span class="text-text-faint pl-3 text-[10.5px] tabular-nums"> · <!> · `);function F2(e={}){if(typeof window>`u`||window.__LINEAR_GRAB_PAGE__)return;window.__LINEAR_GRAB_PAGE__=!0;let t=()=>{ok(),VZ();let t=document.createElement(`div`);t.id=`linear-grab-root`,document.body.appendChild(t);let n=e=>{let n=e.composedPath();if(!n.includes(t))return;e.stopImmediatePropagation();let r=n[0];e instanceof KeyboardEvent&&r&&r!==t&&r.dispatchEvent(new KeyboardEvent(e.type,{key:e.key,code:e.code,location:e.location,repeat:e.repeat,isComposing:e.isComposing,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,bubbles:!1,cancelable:!1}))};for(let e of[`keydown`,`keyup`,`keypress`])window.addEventListener(e,n,{capture:!0});let r=t.attachShadow({mode:`open`}),i=document.createElement(`style`);i.textContent=b2,r.appendChild(i);let a=document.createElement(`div`);r.appendChild(a);let o=()=>a.setAttribute(`data-theme`,I2());o(),matchMedia(`(prefers-color-scheme: light)`).addEventListener(`change`,o),nt(()=>j(H2,{get defaultOpen(){return e.defaultOpen??!1}}),a)};document.body?t():document.addEventListener(`DOMContentLoaded`,t,{once:!0})}function I2(){try{let e=[document.body,document.documentElement];for(let t of e){let e=getComputedStyle(t).backgroundColor.match(/rgba?\(([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:[,\s/]+([\d.]+))?/);if(!(!e||e[4]!==void 0&&Number(e[4])===0))return .2126*e[1]+.7152*e[2]+.0722*e[3]>140?`light`:`dark`}}catch{}return matchMedia(`(prefers-color-scheme: light)`).matches?`light`:`dark`}var L2=130,R2=36,z2=380,B2=280,V2=720;function H2(e){let[t,n]=T(e.defaultOpen),[r,i]=T(`right`),[a,o]=T({x:Math.max(8,window.innerWidth-L2-24),y:Math.max(8,window.innerHeight-R2-20)}),[s,c]=T({running:[],review:[]}),l=()=>s().running,u=()=>s().review,[d,f]=T(!1),[p,m]=T(HD().phase),[h,g]=T(0);ie(()=>{let e=setInterval(()=>{p()===`recording`&&g(Date.now()-(HD().startedAt??Date.now()))},250);ae(()=>clearInterval(e))});let _=e=>{let t=Math.floor(e/1e3);return`${Math.floor(t/60)}:${String(t%60).padStart(2,`0`)}`},[v,y]=T(null),b=e=>({x:Math.min(Math.max(8,e.x),window.innerWidth-L2-8),y:Math.min(Math.max(8,e.y),window.innerHeight-R2-8)}),x=e=>({x:Math.min(Math.max(8-(te()-80),e.x),window.innerWidth-80),y:Math.min(Math.max(0,e.y),window.innerHeight-80)}),[S,C]=T(!1),[w,E]=T(`cloud`),[k,ee]=T(!1),[te,A]=T(z2),ne=e=>Math.min(V2,Math.max(B2,Math.min(e,window.innerWidth-60)));O(()=>{let e=document.documentElement,n=t()&&S();e.style.transition=`margin 0.2s ease`,e.style.marginRight=n&&r()===`right`?`${te()}px`:``,e.style.marginLeft=n&&r()===`left`?`${te()}px`:``}),ae(()=>{document.documentElement.style.marginRight=``,document.documentElement.style.marginLeft=``});let re=()=>{let e=!S();C(e),e&&y(null),Er({panelMode:e?`pinned`:`overlay`,panelPos:void 0})};ie(()=>{Tr().then(e=>{e.panelSide&&i(e.panelSide),e.launcherPos&&o(b(e.launcherPos)),e.panelPos&&y(x(e.panelPos)),e.panelWidth&&A(ne(e.panelWidth)),C(e.panelMode===`pinned`),E(e.workflowMode??`cloud`)});let e=Mr(e=>{e===`settings`&&Tr().then(e=>{i(e.panelSide??`right`),C(e.panelMode===`pinned`),E(e.workflowMode??`cloud`)}),e===`grab`&&w()!==`local`&&n(!0)}),t=()=>{ee(!0),setTimeout(()=>ee(!1),1600)};window.addEventListener(NZ,t);let r=()=>{f(!1),S()||n(!1)};window.addEventListener(PZ,r),ae(()=>{window.removeEventListener(NZ,t),window.removeEventListener(PZ,r)});let s=HQ(c),l=HD().phase,u=UD(e=>{m(e.phase),e.phase===`recording`&&l!==`recording`&&!S()&&n(!1),e.phase===`ready`&&l!==`ready`&&(nj(`capture`),n(!0)),l=e.phase}),d=()=>{o(b(a()));let e=v();e&&y(x(e))};window.addEventListener(`resize`,d),ae(()=>{e(),s(),u(),window.removeEventListener(`resize`,d)})});let oe=!1,se=e=>{if(e.button!==0)return;let t={x:e.clientX,y:e.clientY},n=a();oe=!1;let r=e=>{let r=e.clientX-t.x,i=e.clientY-t.y;Math.abs(r)+Math.abs(i)>4&&(oe=!0),oe&&o(b({x:n.x+r,y:n.y+i}))},i=()=>{window.removeEventListener(`pointermove`,r),window.removeEventListener(`pointerup`,i),oe&&Er({launcherPos:a()})};window.addEventListener(`pointermove`,r),window.addEventListener(`pointerup`,i)},ce=()=>a().y>260,le=e=>{f(!1),nj(`activity`,e),n(!0)},ue=e=>{if(e.button!==0)return;e.preventDefault(),e.stopPropagation();let t=e.clientX,n=te(),i=v(),a=e=>{let a=e.clientX-t,o=r()===`right`?-a:a,s=ne(n+o);A(s),i&&r()===`right`&&y(x({x:i.x+(n-s),y:i.y}))},o=()=>{window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,o),Er({panelWidth:te(),...v()?{panelPos:v()}:{}})};window.addEventListener(`pointermove`,a),window.addEventListener(`pointerup`,o)},de=e=>{if(e.button!==0)return;if(e.detail===2){y(null),Er({panelPos:void 0});return}let t={x:e.clientX,y:e.clientY},n=v()??{x:r()===`right`?window.innerWidth-te():0,y:0},i=!1,a=e=>{let r=e.clientX-t.x,a=e.clientY-t.y;Math.abs(r)+Math.abs(a)>4&&(i=!0),i&&y(x({x:n.x+r,y:n.y+a}))},o=()=>{window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,o);let e=v();i&&e&&Er({panelPos:e})};window.addEventListener(`pointermove`,a),window.addEventListener(`pointerup`,o)};return[j(M,{get when(){return!t()},get children(){var e=E2(),t=e.firstChild;return t.$$pointerdown=se,P(t,j(M,{get when(){return p()===`recording`},get fallback(){return[(()=>{var e=O2();return e.$$click=()=>{oe||(f(!1),n(!0))},P(e,j(v2,{size:13})),e})(),k2(),(()=>{var e=M2(),t=e.firstChild,n=t.nextSibling;return e.$$click=()=>{oe||f(e=>!e)},P(n,(()=>{var e=$e(()=>!!k());return()=>e()?`Copied ✓`:`${l().length} run`})()),P(e,j(M,{get when(){return $e(()=>!k())()&&u().length>0},get children(){return[A2(),(()=>{var e=j2(),t=e.firstChild;return P(e,()=>u().length,t),e})()]}}),null),D(e=>{var r=`size-2 rounded-full ${k()?`bg-success`:l().length?`bg-success animate-pulse`:`bg-text-faint`}`,i=`min-w-[3.5ch] text-left text-[11px] font-medium tabular-nums ${k()?`text-success`:`text-text-dim`}`;return r!==e.e&&st(t,e.e=r),i!==e.t&&st(n,e.t=i),e},{e:void 0,t:void 0}),e})()]},get children(){return[x2(),(()=>{var e=S2();return P(e,()=>_(h())),e})(),(()=>{var e=C2();return e.$$click=()=>{oe||eO()},e})()]}})),P(e,j(M,{get when(){return d()},get children(){var e=T2(),t=e.firstChild;return P(e,j(M,{get when(){return u().length>0},get children(){return[w2(),j(We,{get each(){return u()},children:e=>j(U2,{agent:e,review:!0,onOpen:le})})]}}),t),P(e,j(M,{get when(){return l().length>0},get fallback(){return N2()},get children(){return j(We,{get each(){return l()},children:e=>j(U2,{agent:e,onOpen:le})})}}),null),D(()=>st(e,`bg-surface border-border absolute w-72 rounded-lg border p-1.5 font-sans shadow-2xl ${ce()?`bottom-full mb-2`:`top-full mt-2`} ${a().x>window.innerWidth-300?`right-0`:`left-0`}`)),e}}),null),D(t=>{var n=`${a().x}px`,r=`${a().y}px`;return n!==t.e&&dt(e,`left`,t.e=n),r!==t.t&&dt(e,`top`,t.t=r),t},{e:void 0,t:void 0}),e}}),j(M,{get when(){return t()},get children(){var e=D2(),t=e.firstChild;return t.$$pointerdown=ue,P(e,j(y2,{onGrab:()=>n(!0),onClose:()=>n(!1),get onHeaderPointerDown(){return S()?void 0:de},get pinned(){return S()},onTogglePin:re}),null),D(n=>{var i=`bg-bg text-text border-border fixed z-[2147483645] flex max-w-[100vw] flex-col overflow-hidden font-sans text-[13px] antialiased ${S()?``:`shadow-2xl`} ${!S()&&v()?`rounded-xl border`:r()===`right`?`top-0 right-0 h-screen border-l`:`top-0 left-0 h-screen border-r`}`,a={width:`${te()}px`,...!S()&&v()?{left:`${v().x}px`,top:`${v().y}px`,height:`${Math.min(680,window.innerHeight-16)}px`}:{}},o=`hover:bg-accent/50 active:bg-accent absolute top-0 z-10 h-full w-1 cursor-col-resize transition-colors ${r()===`right`?`left-0`:`right-0`}`;return i!==n.e&&st(e,n.e=i),n.t=ut(e,a,n.t),o!==n.a&&st(t,n.a=o),n},{e:void 0,t:void 0,a:void 0}),e}})]}function U2(e){return(()=>{var t=P2(),n=t.firstChild,r=n.firstChild,i=r.nextSibling,a=i.nextSibling,o=n.nextSibling,s=o.firstChild,c=s.nextSibling;return c.nextSibling,t.$$click=()=>e.onOpen(e.agent.id),P(i,()=>e.agent.identifier),P(a,()=>e.agent.title),P(o,(()=>{var t=$e(()=>!!e.review);return()=>t()?`PR ready · needs review`:e.agent.stateName})(),s),P(o,()=>e.agent.delegateName,c),P(o,()=>W2(e.agent.updatedAt),null),D(t=>dt(r,`background`,e.review?`var(--color-warn)`:e.agent.stateColor)),t})()}function W2(e){let t=Math.max(0,Math.floor((Date.now()-Date.parse(e))/1e3));return t<60?`now`:t<3600?`${Math.floor(t/60)}m`:t<86400?`${Math.floor(t/3600)}h`:`${Math.floor(t/86400)}d`}rt([`pointerdown`,`click`]),F2()})();
|
|
269
|
+
docs/design-tokens.md`,get value(){return n().skillPaths??``},onBlur:e=>{r({skillPaths:e.currentTarget.value.trim()||void 0})}})}}),j(Pj,{label:`Test account`,hint:`The cloud agent logs into the app with this while testing and recording its demo. Added to every issue's Agent instructions. Use a throwaway account — it's visible to everyone who can read the issue.`,get children(){var e=z0();return P(e,j(Oj,{placeholder:`Username or email (e.g. demo@yourapp.com)`,get value(){return n().testUsername??``},onBlur:e=>{r({testUsername:e.currentTarget.value.trim()||void 0})}}),null),P(e,j(Oj,{type:`password`,placeholder:`Password`,get value(){return n().testPassword??``},onBlur:e=>{r({testPassword:e.currentTarget.value.trim()||void 0})}}),null),e}})]}})}}),null),P(e,j(M,{when:!xr,get children(){return j(Fj,{title:`Panel`,get children(){return[(()=>{var e=B0(),t=e.firstChild.nextSibling;return P(t,j(We,{each:[{id:`overlay`,label:`Overlay`},{id:`pinned`,label:`Beside page`}],children:e=>(()=>{var t=X0();return t.$$click=()=>void r({panelMode:e.id,panelPos:void 0}),P(t,()=>e.label),D(()=>st(t,`flex-1 rounded-[5px] px-2 py-0.5 text-[11.5px] font-medium transition-colors ${(n().panelMode??`overlay`)===e.id?`bg-surface-3 text-text`:`text-text-dim hover:text-text cursor-pointer`}`)),t})()})),e})(),(()=>{var e=V0(),t=e.firstChild.nextSibling;return P(t,j(We,{each:[`left`,`right`],children:e=>(()=>{var t=X0();return t.$$click=()=>void r({panelSide:e}),P(t,e===`left`?`Left`:`Right`),D(()=>st(t,`flex-1 rounded-[5px] px-2 py-0.5 text-[11.5px] font-medium transition-colors ${(n().panelSide??`right`)===e?`bg-surface-3 text-text`:`text-text-dim hover:text-text cursor-pointer`}`)),t})()})),e})()]}})}}),null),P(e,j(Fj,{title:`Local Claude Code`,get children(){return j(Pj,{label:`Bridge URL`,hint:'Run `npx linear-grab-bridge` in your repo\'s terminal (binds localhost only). Enables "Delegate to → Local Claude Code" in Draft, the Local tab, and relays blocked uploads to Linear storage.',get children(){return j(Oj,{placeholder:`http://localhost:4577`,get value(){return n().bridgeUrl??``},onBlur:e=>{r({bridgeUrl:e.currentTarget.value.trim()||void 0})}})}})}}),null),P(e,j(Fj,{title:`Asset uploads`,get children(){return[j(Pj,{label:`GitHub token`,hint:`Linear's storage blocks browser uploads in some browsers (Safari). With this set, GIFs/screenshots upload to your GitHub repo instead and embed automatically. Fine-grained PAT with Contents read/write on the assets repo.`,get children(){return j(Oj,{type:`password`,placeholder:`github_pat_…`,get value(){return n().githubToken??``},onBlur:e=>{r({githubToken:e.currentTarget.value.trim()||void 0})}})}}),j(Pj,{label:`Assets repository`,hint:`owner/repo — must be PUBLIC so Linear (and agents) can render the images. Files land under linear-grab/.`,get children(){return j(Oj,{placeholder:`ahmedbanihanibh/linear-grab-assets`,get value(){return n().githubAssetsRepo??``},onBlur:e=>{r({githubAssetsRepo:e.currentTarget.value.trim()||void 0})}})}})]}}),null),P(e,j(Fj,{title:`Notifications`,get children(){return[j(Pj,{label:`Slack bot token`,hint:`Bot token (xoxb-…) with chat:write + channels:read + files:write. New issues get announced with links + demo, and the AGENT receives the token to post its finished demo video itself.`,get children(){return j(Oj,{type:`password`,placeholder:`xoxb-…`,get value(){return n().slackToken??``},onBlur:e=>{r({slackToken:e.currentTarget.value.trim()||void 0})}})}}),j(M,{get when(){return n().slackToken},get children(){return j(Pj,{label:`Slack channel`,get children(){return j(M,{get when(){return!te.isError},get fallback(){return j(zj,{message:`Couldn't list channels — check the token scopes (channels:read).`})},get children(){return j(Aj,{get value(){return n().slackChannelId??``},get disabled(){return te.isLoading},onChange:e=>{let t=e.currentTarget.value,n=te.data?.find(e=>e.id===t);r({slackChannelId:t||void 0,slackChannelName:n?.name})},get children(){return[H0(),j(We,{get each(){return te.data??[]},children:e=>(()=>{var t=o2();return t.firstChild,P(t,()=>e.name,null),D(()=>t.selected=e.id===n().slackChannelId),D(()=>t.value=e.id),t})()})]}})}})}})}}),j(Pj,{label:`Telegram bot token`,hint:`From @BotFather. The agent also receives it to send the demo video (sendVideo).`,get children(){return j(Oj,{type:`password`,placeholder:`123456:ABC-…`,get value(){return n().telegramToken??``},onBlur:e=>{r({telegramToken:e.currentTarget.value.trim()||void 0})}})}}),j(M,{get when(){return n().telegramToken},get children(){return j(Pj,{label:`Telegram chat ID`,hint:`Add the bot to your group/channel, send a message, then read the chat id from api.telegram.org/bot<token>/getUpdates.`,get children(){return j(Oj,{placeholder:`-1001234567890`,get value(){return n().telegramChatId??``},onBlur:e=>{r({telegramChatId:e.currentTarget.value.trim()||void 0})}})}})}}),(()=>{var e=U0(),t=e.firstChild;return t.addEventListener(`change`,e=>void r({notifyOnCreate:e.currentTarget.checked?void 0:!1})),D(()=>t.checked=n().notifyOnCreate!==!1),e})(),W0()]}}),null),P(e,j(Fj,{title:`AI providers`,get children(){return[j(Pj,{label:`OpenAI API key`,get children(){return j(Oj,{type:`password`,placeholder:`sk-…`,get value(){return n().openaiKey??``},onBlur:e=>{r({openaiKey:e.currentTarget.value.trim()||void 0})}})}}),j(Pj,{label:`Anthropic API key`,get children(){return j(Oj,{type:`password`,placeholder:`sk-ant-…`,get value(){return n().anthropicKey??``},onBlur:e=>{r({anthropicKey:e.currentTarget.value.trim()||void 0})}})}}),(()=>{var e=G0(),t=e.firstChild.nextSibling.firstChild,i=t.nextSibling,a=i.nextSibling;return t.$$click=()=>void r({preferredProvider:void 0}),i.$$click=()=>void r({preferredProvider:`openai`}),a.$$click=()=>void r({preferredProvider:`anthropic`}),D(e=>{var r=`flex-1 rounded-[5px] px-2 py-0.5 text-[11.5px] font-medium transition-colors ${n().preferredProvider===void 0?`bg-surface-3 text-text`:`text-text-dim hover:text-text cursor-pointer`}`,o=`flex-1 rounded-[5px] px-2 py-0.5 text-[11.5px] font-medium transition-colors disabled:cursor-not-allowed ${n().preferredProvider===`openai`?`bg-surface-3 text-text`:`text-text-dim hover:text-text cursor-pointer disabled:text-text-faint`}`,s=!n().openaiKey,c=`flex-1 rounded-[5px] px-2 py-0.5 text-[11.5px] font-medium transition-colors disabled:cursor-not-allowed ${n().preferredProvider===`anthropic`?`bg-surface-3 text-text`:`text-text-dim hover:text-text cursor-pointer disabled:text-text-faint`}`,l=!n().anthropicKey;return r!==e.e&&st(t,e.e=r),o!==e.t&&st(i,e.t=o),s!==e.a&&(i.disabled=e.a=s),c!==e.o&&st(a,e.o=c),l!==e.i&&(a.disabled=e.i=l),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),e})(),(()=>{var e=q0();return P(e,j(M,{get when(){return ne()},get fallback(){return s2()},get children(){var e=K0();return P(e,ne),e}})),e})()]}}),null),P(e,j(Fj,{title:`How it works`,get children(){return J0()}}),null),e})()}rt([`click`]);var l2=`linear-grab`,u2=`queries`,d2=[`my-issues`,`issue`,`sessions`,`teams`,`agents`];function f2(){return new Promise(e=>{try{let t=indexedDB.open(l2,1);t.onupgradeneeded=()=>t.result.createObjectStore(u2),t.onsuccess=()=>e(t.result),t.onerror=()=>e(null)}catch{e(null)}})}function p2(e){return typeof e[0]==`string`&&d2.includes(e[0])}async function m2(e){let t=await f2();if(!t)return()=>{};await new Promise(n=>{try{let r=t.transaction(u2,`readonly`).objectStore(u2).openCursor();r.onsuccess=()=>{let t=r.result;if(!t)return n();try{let{queryKey:n,data:r}=t.value;p2(n)&&e.getQueryData(n)===void 0&&e.setQueryData(n,r,{updatedAt:0})}catch{}t.continue()},r.onerror=()=>n()}catch{n()}});let n=new Map,r=e.getQueryCache().subscribe(r=>{if(r.type!==`updated`||r.action.type!==`success`)return;let{queryKey:i,queryHash:a}=r.query;if(!p2(i))return;let o=n.get(a);o&&clearTimeout(o),n.set(a,setTimeout(()=>{n.delete(a);try{let n=e.getQueryData(i);if(n===void 0)return;t.transaction(u2,`readwrite`).objectStore(u2).put({queryKey:i,data:n},a)}catch{}},400))});return()=>{r();for(let e of n.values())clearTimeout(e);t.close()}}Br();var h2=N(`<svg viewBox="0 0 100 100"fill=currentColor aria-hidden><path d="M1.22541 61.5228c-.2225-.9485.90748-1.5459 1.59638-.857L39.3342 97.1782c.6889.6889.0915 1.8189-.857 1.5964C20.0515 94.4522 5.54779 79.9485 1.22541 61.5228ZM.00189135 46.8891c-.01764375.2833.08887215.5599.28957165.7606L52.3503 99.7085c.2007.2007.4773.3075.7606.2896 2.3692-.1476 4.6938-.46 6.9624-.9259.7645-.157 1.0301-1.0963.4782-1.6481L2.57595 39.4485c-.55186-.5519-1.49117-.2863-1.648174.4782-.465915 2.2686-.77832 4.5932-.92588465 6.9624ZM4.21093 29.7054c-.16649.3738-.08169.8106.20765 1.1l64.77602 64.776c.2894.2894.7262.3742 1.1.2077 1.7861-.7956 3.5171-1.6927 5.1855-2.684.5521-.328.6373-1.0867.1832-1.5407L8.43566 24.3367c-.45409-.4541-1.21271-.3689-1.54074.1832-.99132 1.6684-1.88843 3.3994-2.68399 5.1855ZM12.6587 18.074c-.3701-.3701-.393-.9637-.0443-1.3541C21.7795 6.45931 35.1114 0 49.9519 0 77.5927 0 100 22.4073 100 50.0481c0 14.8405-6.4593 28.1724-16.7199 37.3375-.3903.3487-.984.3258-1.3541-.0443L12.6587 18.074Z">`),g2=N(`<button><svg width=12 height=12 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.5 aria-hidden><rect x=1.5 y=2.5 width=13 height=11 rx=1.5></rect><path d="M10 2.5v11">`),_2=N(`<button aria-label="Minimize to launcher"title="Minimize to launcher"class="text-text-dim hover:text-text hover:bg-surface-3 grid size-6 shrink-0 cursor-pointer place-items-center rounded-md text-[15px] leading-none transition-colors">–`),v2=N(`<div class="bg-bg text-text flex h-full flex-col"><header><span class="text-accent mr-0.5 inline-flex shrink-0"title="Linear Grab"></span><div class="no-scrollbar flex min-w-0 flex-1 items-center gap-1 overflow-x-auto"></div></header><main class="min-h-0 flex-1"><div class=h-full></div><div class=h-full></div><div class=h-full></div><div class=h-full></div><div class=h-full></div><div class=h-full></div><div class=h-full></div><div class=h-full>`),y2=N(`<button>`),b2=[{id:`draft`,label:`Draft`},{id:`capture`,label:`Capture`},{id:`activity`,label:`Activity`},{id:`running`,label:`Running`},{id:`cloud`,label:`Cloud`},{id:`local`,label:`Local`},{id:`prs`,label:`PRs`},{id:`settings`,label:`Settings`}],x2=new gr({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:5e3}}});function S2(e){return(()=>{var t=h2();return D(n=>{var r=e.size??14,i=e.size??14;return r!==n.e&&it(t,`width`,n.e=r),i!==n.t&&it(t,`height`,n.t=i),n},{e:void 0,t:void 0}),t})()}function C2(e){let[t,n]=T(`draft`),r=()=>{x2.invalidateQueries({queryKey:[`grab`]}),aj()===`capture`&&n(`capture`),e.onGrab?.()};return O(()=>{let e=$A();e&&n(e)}),ie(()=>{let e=m2(x2),t=WZ(r),n=()=>{KO().then(t$),VO()};n();let i=Mr(e=>{e===`settings`&&(x2.invalidateQueries({queryKey:[`settings`]}),n()),e===`grab`&&r()});ae(()=>{t(),i(),e.then(e=>e())})}),j(cr,{client:x2,get children(){var r=v2(),i=r.firstChild,a=i.firstChild,o=a.nextSibling,s=i.nextSibling.firstChild,c=s.nextSibling,l=c.nextSibling,u=l.nextSibling,d=u.nextSibling,f=d.nextSibling,p=f.nextSibling,m=p.nextSibling;return i.$$pointerdown=t=>e.onHeaderPointerDown?.(t),P(a,j(S2,{size:14})),P(o,j(We,{each:b2,children:e=>(()=>{var r=y2();return r.$$click=()=>n(e.id),P(r,()=>e.label),D(()=>st(r,`h-6 shrink-0 rounded-md px-2 text-[12px] font-medium whitespace-nowrap transition-colors ${t()===e.id?`bg-surface-3 text-text`:`text-text-dim hover:text-text cursor-pointer`}`)),r})()})),P(i,j(M,{get when(){return e.onTogglePin},get children(){var t=g2();return t.$$click=()=>e.onTogglePin?.(),D(n=>{var r=e.pinned?`Switch to overlay`:`Dock beside page`,i=e.pinned?`Overlay the page`:`Dock beside page (squeezes the app, DevTools-style)`,a=`hover:bg-surface-3 grid size-6 shrink-0 cursor-pointer place-items-center rounded-md transition-colors ${e.pinned?`text-accent`:`text-text-dim hover:text-text`}`;return r!==n.e&&it(t,`aria-label`,n.e=r),i!==n.t&&it(t,`title`,n.t=i),a!==n.a&&st(t,n.a=a),n},{e:void 0,t:void 0,a:void 0}),t}}),null),P(i,j(M,{get when(){return e.onClose},get children(){var t=_2();return t.$$click=()=>e.onClose?.(),t}}),null),P(s,j(yM,{onCreated:()=>n(`activity`)})),P(c,j(mQ,{})),P(l,j(Q$,{})),P(u,j(S1,{})),P(d,j(g1,{})),P(f,j(s0,{})),P(p,j(S0,{onOpenIssue:()=>n(`activity`)})),P(m,j(c2,{})),D(n=>{var r=`border-border bg-surface flex shrink-0 items-center gap-1 border-b px-2 py-1.5 select-none ${e.onHeaderPointerDown?`cursor-grab active:cursor-grabbing`:``}`,a=t()!==`draft`,o=t()!==`capture`,h=t()!==`activity`,g=t()!==`running`,_=t()!==`cloud`,v=t()!==`local`,y=t()!==`prs`,b=t()!==`settings`;return r!==n.e&&st(i,n.e=r),a!==n.t&&s.classList.toggle(`hidden`,n.t=a),o!==n.a&&c.classList.toggle(`hidden`,n.a=o),h!==n.o&&l.classList.toggle(`hidden`,n.o=h),g!==n.i&&u.classList.toggle(`hidden`,n.i=g),_!==n.n&&d.classList.toggle(`hidden`,n.n=_),v!==n.s&&f.classList.toggle(`hidden`,n.s=v),y!==n.h&&p.classList.toggle(`hidden`,n.h=y),b!==n.r&&m.classList.toggle(`hidden`,n.r=b),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0}),r}})}rt([`pointerdown`,`click`]);var w2=`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */
|
|
270
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--font-serif:ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;--font-mono:ui-monospace, "SF Mono", Menlo, monospace;--color-red-500:oklch(63.7% .237 25.331);--color-white:#fff;--spacing:.25rem;--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-wide:.025em;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:4px;--radius-md:6px;--radius-lg:10px;--radius-xl:.75rem;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-bg:#0b0c0e;--color-surface:#141517;--color-surface-2:#1c1d21;--color-surface-3:#24262b;--color-border:#26282d;--color-border-strong:#34363d;--color-text:#e8e9eb;--color-text-dim:#8b8e98;--color-text-faint:#5c5f6a;--color-accent:#5e6ad2;--color-accent-hover:#6e79e0;--color-accent-soft:#5e6ad226;--color-success:#4cb782;--color-warn:#f2c94c;--color-danger:#eb5757;--color-danger-soft:#eb575726}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.inset-y-0{inset-block:0}.top-0{top:0}.top-0\\.5{top:calc(var(--spacing) * .5)}.top-1{top:var(--spacing)}.top-1\\/2{top:50%}.top-\\[2px\\]{top:2px}.top-full{top:100%}.right-0{right:0}.right-0\\.5{right:calc(var(--spacing) * .5)}.right-4{right:calc(var(--spacing) * 4)}.right-full{right:100%}.bottom-0{bottom:0}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-\\[2px\\]{bottom:2px}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:var(--spacing)}.left-1\\/2{left:50%}.left-full{left:100%}.z-1{z-index:1}.z-10{z-index:10}.z-\\[2147483645\\]{z-index:2147483645}.z-\\[2147483646\\]{z-index:2147483646}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.-m-0{margin:0}.-m-0\\.5{margin:calc(var(--spacing) * -.5)}.-m-4{margin:calc(var(--spacing) * -4)}.m-0{margin:0}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.-my-1{margin-block:calc(var(--spacing) * -1)}.-my-1\\.5{margin-block:calc(var(--spacing) * -1.5)}.mt-0{margin-top:0}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-px{margin-top:1px}.mr-0{margin-right:0}.mr-0\\.5{margin-right:calc(var(--spacing) * .5)}.mr-1{margin-right:var(--spacing)}.mr-1\\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-2\\.5{margin-right:calc(var(--spacing) * 2.5)}.-mb-4{margin-bottom:calc(var(--spacing) * -4)}.mb-0{margin-bottom:0}.mb-0\\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\\.5{margin-bottom:calc(var(--spacing) * 2.5)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-2\\.5{margin-left:calc(var(--spacing) * 2.5)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.ml-px{margin-left:1px}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-5{-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.list-item{display:list-item}.table{display:table}.size-0{width:0;height:0}.size-1{width:var(--spacing);height:var(--spacing)}.size-1\\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-\\[12px\\]{width:12px;height:12px}.size-\\[16px\\]{width:16px;height:16px}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-16{height:calc(var(--spacing) * 16)}.h-\\[8px\\]{height:8px}.h-\\[17px\\]{height:17px}.h-\\[18px\\]{height:18px}.h-\\[20px\\]{height:20px}.h-\\[24px\\]{height:24px}.h-fit{height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-44{max-height:calc(var(--spacing) * 44)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\\[var\\(--rg-edit-list-max-h\\)\\]{max-height:var(--rg-edit-list-max-h)}.min-h-0{min-height:0}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-\\[2lh\\]{min-height:2lh}.min-h-\\[28px\\]{min-height:28px}.w-1{width:var(--spacing)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-16{width:calc(var(--spacing) * 16)}.w-28{width:calc(var(--spacing) * 28)}.w-72{width:calc(var(--spacing) * 72)}.w-\\[2px\\]{width:2px}.w-\\[calc\\(100\\%\\+16px\\)\\]{width:calc(100% + 16px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.max-w-\\[55\\%\\]{max-width:55%}.max-w-\\[100vw\\]{max-width:100vw}.max-w-\\[110px\\]{max-width:110px}.max-w-\\[280px\\]{max-width:280px}.max-w-full{max-width:100%}.min-w-0{min-width:0}.min-w-\\[3\\.5ch\\]{min-width:3.5ch}.min-w-\\[4ch\\]{min-width:4ch}.min-w-\\[5ch\\]{min-width:5ch}.min-w-\\[6ch\\]{min-width:6ch}.min-w-\\[12ch\\]{min-width:12ch}.min-w-\\[36px\\]{min-width:36px}.min-w-\\[52px\\]{min-width:52px}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[150px\\]{min-width:150px}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-rotate-90{rotate:-90deg}.rotate-0{rotate:0deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.list-decimal{list-style-type:decimal}.grid-cols-\\[0fr\\]{grid-template-columns:0fr}.grid-cols-\\[1fr\\]{grid-template-columns:1fr}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:0}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-\\[5px\\]{gap:5px}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-clip{overflow:clip}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[5px\\]{border-radius:5px}.rounded-\\[6px\\]{border-radius:6px}.rounded-\\[13px\\]{border-radius:13px}.rounded-\\[14px\\]{border-radius:14px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-\\[10px\\]{border-top-left-radius:10px;border-bottom-left-radius:10px}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-r-\\[10px\\]{border-top-right-radius:10px;border-bottom-right-radius:10px}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-\\[6px\\]{border-bottom-right-radius:6px;border-bottom-left-radius:6px}.rounded-b-\\[10px\\]{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.\\[border-width\\:0\\.5px\\]{border-width:.5px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-4{border-top-style:var(--tw-border-style);border-top-width:4px}.\\[border-top-width\\:0\\.5px\\]{border-top-width:.5px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-dotted{--tw-border-style:dotted;border-style:dotted}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-\\[var\\(--rg-border-button\\)\\]{border-color:var(--rg-border-button)}.border-accent{border-color:var(--color-accent)}.border-accent\\/40{border-color:#5e6ad266}@supports (color:color-mix(in lab, red, red)){.border-accent\\/40{border-color:color-mix(in oklab, var(--color-accent) 40%, transparent)}}.border-border{border-color:var(--color-border)}.border-success{border-color:var(--color-success)}.border-success\\/40{border-color:#4cb78266}@supports (color:color-mix(in lab, red, red)){.border-success\\/40{border-color:color-mix(in oklab, var(--color-success) 40%, transparent)}}.border-text-dim{border-color:var(--color-text-dim)}.border-transparent{border-color:#0000}.border-warn{border-color:var(--color-warn)}.border-warn\\/40{border-color:#f2c94c66}@supports (color:color-mix(in lab, red, red)){.border-warn\\/40{border-color:color-mix(in oklab, var(--color-warn) 40%, transparent)}}.border-t-\\[var\\(--rg-border-subtle\\)\\]{border-top-color:var(--rg-border-subtle)}.border-t-transparent{border-top-color:#0000}.bg-\\[var\\(--rg-error-bg\\)\\]{background-color:var(--rg-error-bg)}.bg-\\[var\\(--rg-panel-bg\\)\\]{background-color:var(--rg-panel-bg)}.bg-\\[var\\(--rg-submit-bg\\)\\]{background-color:var(--rg-submit-bg)}.bg-\\[var\\(--rg-surface-active\\)\\]{background-color:var(--rg-surface-active)}.bg-\\[var\\(--rg-surface-hover\\)\\]{background-color:var(--rg-surface-hover)}.bg-\\[var\\(--rg-text-primary\\)\\]{background-color:var(--rg-text-primary)}.bg-\\[var\\(--rg-text-secondary\\)\\]{background-color:var(--rg-text-secondary)}.bg-accent{background-color:var(--color-accent)}.bg-accent-soft{background-color:var(--color-accent-soft)}.bg-bg{background-color:var(--color-bg)}.bg-bg\\/80{background-color:#0b0c0ecc}@supports (color:color-mix(in lab, red, red)){.bg-bg\\/80{background-color:color-mix(in oklab, var(--color-bg) 80%, transparent)}}.bg-border{background-color:var(--color-border)}.bg-current{background-color:currentColor}.bg-danger{background-color:var(--color-danger)}.bg-danger-soft{background-color:var(--color-danger-soft)}.bg-red-500{background-color:var(--color-red-500)}.bg-success{background-color:var(--color-success)}.bg-surface{background-color:var(--color-surface)}.bg-surface-2{background-color:var(--color-surface-2)}.bg-surface-3{background-color:var(--color-surface-3)}.bg-text-faint{background-color:var(--color-text-faint)}.bg-transparent{background-color:#0000}.bg-warn{background-color:var(--color-warn)}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:0}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-6{padding:calc(var(--spacing) * 6)}.px-0{padding-inline:0}.px-0\\.25{padding-inline:calc(var(--spacing) * .25)}.px-1{padding-inline:var(--spacing)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-\\[3px\\]{padding-inline:3px}.py-0{padding-block:0}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-0\\.25{padding-block:calc(var(--spacing) * .25)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-px{padding-block:1px}.pt-0{padding-top:0}.pt-0\\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pb-1{padding-bottom:var(--spacing)}.pb-1\\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pl-0{padding-left:0}.pl-0\\.5{padding-left:calc(var(--spacing) * .5)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-2\\.5{padding-left:calc(var(--spacing) * 2.5)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-end{text-align:end}.text-justify{text-align:justify}.text-left{text-align:left}.text-right{text-align:right}.text-start{text-align:start}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-serif{font-family:var(--font-serif)}.text-\\[9\\.5px\\]{font-size:9.5px}.text-\\[9px\\]{font-size:9px}.text-\\[10\\.5px\\]{font-size:10.5px}.text-\\[10px\\]{font-size:10px}.text-\\[11\\.5px\\]{font-size:11.5px}.text-\\[11px\\]{font-size:11px}.text-\\[12\\.5px\\]{font-size:12.5px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[15px\\]{font-size:15px}.leading-3{--tw-leading:calc(var(--spacing) * 3);line-height:calc(var(--spacing) * 3)}.leading-3\\.5{--tw-leading:calc(var(--spacing) * 3.5);line-height:calc(var(--spacing) * 3.5)}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-extralight{--tw-font-weight:var(--font-weight-extralight);font-weight:var(--font-weight-extralight)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.font-thin{--tw-font-weight:var(--font-weight-thin);font-weight:var(--font-weight-thin)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-normal{overflow-wrap:normal;word-break:normal}.break-words,.wrap-break-word{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.text-ellipsis{text-overflow:ellipsis}.whitespace-break-spaces{white-space:break-spaces}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[var\\(--rg-error-text\\)\\]{color:var(--rg-error-text)}.text-\\[var\\(--rg-submit-fg\\)\\]{color:var(--rg-submit-fg)}.text-\\[var\\(--rg-text-primary\\)\\]{color:var(--rg-text-primary)}.text-\\[var\\(--rg-text-primary-85\\)\\]{color:var(--rg-text-primary-85)}.text-\\[var\\(--rg-text-secondary\\)\\]{color:var(--rg-text-secondary)}.text-accent{color:var(--color-accent)}.text-danger{color:var(--color-danger)}.text-success{color:var(--color-success)}.text-text{color:var(--color-text)}.text-text-dim{color:var(--color-text-dim)}.text-text-faint{color:var(--color-text-faint)}.text-warn{color:var(--color-warn)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.accent-accent{accent-color:var(--color-accent)}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.\\[box-shadow\\:var\\(--rg-shadow\\)\\]{box-shadow:var(--rg-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.\\[filter\\:var\\(--rg-drop-shadow\\)\\]{filter:var(--rg-drop-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-columns\\]{transition-property:grid-template-columns;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\]{transition-property:grid-template-rows;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[padding\\,border-radius\\,transform\\]{transition-property:padding,border-radius,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[top\\,left\\,width\\,height\\,opacity\\,border-radius\\]{transition-property:top,left,width,height,opacity,border-radius;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,color\\]{transition-property:transform,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.delay-\\[80ms\\]{transition-delay:80ms}.duration-60{--tw-duration:60ms;transition-duration:60ms}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-120{--tw-duration:.12s;transition-duration:.12s}.duration-140{--tw-duration:.14s;transition-duration:.14s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-180{--tw-duration:.18s;transition-duration:.18s}.duration-220{--tw-duration:.22s;transition-duration:.22s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-400{--tw-duration:.4s;transition-duration:.4s}.ease-\\[cubic-bezier\\(0\\,0\\,0\\.2\\,1\\)\\]{--tw-ease:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-\\[opacity\\,transform\\]{will-change:opacity,transform}.will-change-transform{will-change:transform}.contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,) var(--tw-contain-layout,) var(--tw-contain-paint,) var(--tw-contain-style,)}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.\\[corner-shape\\:superellipse\\(1\\.25\\)\\]{corner-shape:superellipse(1.25)}.\\[font-synthesis\\:none\\]{font-synthesis:none}.group-open\\:rotate-90:is(:where(.group):is([open],:popover-open,:open) *){rotate:90deg}@media (hover:hover){.group-hover\\:text-\\[var\\(--rg-text-primary\\)\\]:is(:where(.group):hover *){color:var(--rg-text-primary)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\\:text-text-faint::placeholder{color:var(--color-text-faint)}@media (hover:hover){.hover\\:bg-\\[var\\(--rg-error-bg-hover\\)\\]:hover{background-color:var(--rg-error-bg-hover)}.hover\\:bg-\\[var\\(--rg-surface-active\\)\\]:hover{background-color:var(--rg-surface-active)}.hover\\:bg-\\[var\\(--rg-surface-hover\\)\\]:hover{background-color:var(--rg-surface-hover)}.hover\\:bg-accent-hover:hover{background-color:var(--color-accent-hover)}.hover\\:bg-accent\\/50:hover{background-color:#5e6ad280}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/50:hover{background-color:color-mix(in oklab, var(--color-accent) 50%, transparent)}}.hover\\:bg-danger\\/30:hover{background-color:#eb57574d}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-danger\\/30:hover{background-color:color-mix(in oklab, var(--color-danger) 30%, transparent)}}.hover\\:bg-surface-2:hover{background-color:var(--color-surface-2)}.hover\\:bg-surface-3:hover{background-color:var(--color-surface-3)}.hover\\:text-\\[var\\(--rg-text-primary\\)\\]:hover{color:var(--rg-text-primary)}.hover\\:text-accent:hover{color:var(--color-accent)}.hover\\:text-danger:hover{color:var(--color-danger)}.hover\\:text-text:hover{color:var(--color-text)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-80:hover{opacity:.8}}.focus\\:border-accent:focus{border-color:var(--color-accent)}.active\\:cursor-grabbing:active{cursor:grabbing}.active\\:bg-accent:active{background-color:var(--color-accent)}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-surface-3:disabled{background-color:var(--color-surface-3)}.disabled\\:text-text-faint:disabled{color:var(--color-text-faint)}.disabled\\:opacity-40:disabled{opacity:.4}@media (hover:hover){.disabled\\:hover\\:bg-surface-2:disabled:hover{background-color:var(--color-surface-2)}}}:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}[data-theme=light],:host([data-theme=light]){--color-bg:#fbfbfc;--color-surface:#fff;--color-surface-2:#f4f4f6;--color-surface-3:#e9e9ee;--color-border:#e2e2e8;--color-border-strong:#cfcfd8;--color-text:#1b1c20;--color-text-dim:#5c5f6a;--color-text-faint:#9a9da8;--color-accent-soft:#5e6ad21f;--color-danger-soft:#eb57571a;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:light){:root:not([data-theme=dark]){--color-bg:#fbfbfc;--color-surface:#fff;--color-surface-2:#f4f4f6;--color-surface-3:#e9e9ee;--color-border:#e2e2e8;--color-border-strong:#cfcfd8;--color-text:#1b1c20;--color-text-dim:#5c5f6a;--color-text-faint:#9a9da8;--color-accent-soft:#5e6ad21f;--color-danger-soft:#eb57571a;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}}body{background-color:var(--color-bg);font-family:var(--font-sans);color:var(--color-text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;min-width:320px;margin:0;font-size:13px}@keyframes geist-spinner-fade{0%{opacity:1}to{opacity:.15}}[data-tip]{position:relative}[data-tip]:hover:after{content:attr(data-tip);color:#fff;white-space:nowrap;text-overflow:ellipsis;pointer-events:none;z-index:60;background:#1b1c20;border-radius:6px;max-width:260px;padding:3px 8px;font-size:10.5px;font-weight:500;line-height:1.35;position:absolute;bottom:calc(100% + 6px);left:50%;overflow:hidden;transform:translate(-50%);box-shadow:0 4px 12px #0000004d}[data-tip][data-tip-pos~=right]:hover:after{left:0;transform:none}[data-tip][data-tip-pos~=left]:hover:after{left:auto;right:0;transform:none}[data-tip][data-tip-pos~=bottom]:hover:after{top:calc(100% + 6px);bottom:auto}.no-scrollbar{scrollbar-width:none}.no-scrollbar::-webkit-scrollbar{display:none}.lg-md p{margin:0 0 6px}.lg-md p:last-child{margin-bottom:0}.lg-md a{color:var(--color-accent);word-break:break-all;text-decoration:none}.lg-md a:hover{text-decoration:underline}.lg-md code{background:var(--color-surface-2);border:1px solid var(--color-border);font-family:var(--font-mono);border-radius:4px;padding:0 4px;font-size:11px}.lg-md pre{background:var(--color-surface-2);border:1px solid var(--color-border);border-radius:6px;margin:6px 0;padding:8px;overflow-x:auto}.lg-md pre code{white-space:pre;background:0 0;border:none;padding:0;font-size:11px}.lg-md ul,.lg-md ol{flex-direction:column;gap:2px;margin:4px 0 6px;padding-left:18px;display:flex}.lg-md ul{list-style:outside}.lg-md ol{list-style:decimal}.lg-md h4{margin:8px 0 4px;font-size:12px;font-weight:600}.lg-md lg-media{display:block}.lg-md lg-media img,.lg-md lg-media video{border:1px solid var(--color-border);border-radius:6px;max-width:100%;margin:4px 0}.lg-md video{border:1px solid var(--color-border);background:#000;border-radius:6px;max-width:100%;margin:4px 0}.lg-md img{border:1px solid var(--color-border);border-radius:6px;max-width:100%;margin:4px 0}.lg-md strong{font-weight:600}*{scrollbar-width:thin;scrollbar-color:var(--color-border-strong) transparent}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:var(--color-border-strong);border-radius:4px}::-webkit-scrollbar-track{background:0 0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}`;Br();var T2=N(`<span aria-hidden class="bg-danger size-2 shrink-0 animate-pulse rounded-full">`),E2=N(`<span class="text-text min-w-[5ch] text-[11px] font-medium tabular-nums">`),D2=N(`<button class="bg-accent hover:bg-accent-hover h-7 cursor-pointer rounded-full px-2.5 text-[11px] font-medium text-white transition-colors"><span class="inline-block min-w-[4ch] text-center">Stop`),O2=N(`<p class="text-warn px-1.5 pt-1 pb-1.5 text-[10.5px] font-semibold tracking-wide uppercase">Needs review`),k2=N(`<div><p class="text-text-dim px-1.5 pt-1 pb-1.5 text-[10.5px] font-semibold tracking-wide uppercase">Running agents`),A2=N(`<div class="fixed z-[2147483646] select-none"><div class="bg-surface border-border text-text flex h-9 cursor-grab items-center gap-1 rounded-full border py-1 pr-1 pl-2.5 font-sans shadow-lg active:cursor-grabbing">`),j2=N(`<div><div title="Drag to resize">`),M2=N(`<button title="Open Linear Grab"aria-label="Open Linear Grab"class="text-accent hover:opacity-80 inline-flex cursor-pointer items-center gap-1.5">`),N2=N(`<span class="bg-border h-4 w-px"aria-hidden>`),P2=N(`<span aria-hidden class="bg-warn size-2 rounded-full">`),F2=N(`<span class="text-warn min-w-[3.5ch] text-left text-[11px] font-medium tabular-nums"> rev`),I2=N(`<button title="Running agents"aria-label="Running agents"class="hover:bg-surface-2 flex h-7 cursor-pointer items-center gap-1.5 rounded-full px-2 transition-colors"><span aria-hidden></span><span>`),L2=N(`<p class="text-text-faint px-1.5 pb-1.5 text-[11.5px]">No agents running right now.`),R2=N(`<button class="hover:bg-surface-2 flex w-full cursor-pointer flex-col gap-0.5 rounded-md px-1.5 py-1.5 text-left transition-colors"><span class="flex min-w-0 items-center gap-1.5"><span aria-hidden class="size-1.5 shrink-0 rounded-full"></span><span class="font-mono text-text-dim shrink-0 text-[10.5px]"></span><span class="text-text truncate text-[11.5px]"></span></span><span class="text-text-faint pl-3 text-[10.5px] tabular-nums"> · <!> · `);function z2(e={}){if(typeof window>`u`||window.__LINEAR_GRAB_PAGE__)return;window.__LINEAR_GRAB_PAGE__=!0;let t=()=>{sk(),HZ();let t=document.createElement(`div`);t.id=`linear-grab-root`,document.body.appendChild(t);let n=e=>{let n=e.composedPath();if(!n.includes(t))return;e.stopImmediatePropagation();let r=n[0];e instanceof KeyboardEvent&&r&&r!==t&&r.dispatchEvent(new KeyboardEvent(e.type,{key:e.key,code:e.code,location:e.location,repeat:e.repeat,isComposing:e.isComposing,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,bubbles:!1,cancelable:!1}))};for(let e of[`keydown`,`keyup`,`keypress`])window.addEventListener(e,n,{capture:!0});let r=t.attachShadow({mode:`open`}),i=document.createElement(`style`);i.textContent=w2,r.appendChild(i);let a=document.createElement(`div`);r.appendChild(a);let o=()=>a.setAttribute(`data-theme`,B2());o(),matchMedia(`(prefers-color-scheme: light)`).addEventListener(`change`,o),nt(()=>j(K2,{get defaultOpen(){return e.defaultOpen??!1}}),a)};document.body?t():document.addEventListener(`DOMContentLoaded`,t,{once:!0})}function B2(){try{let e=[document.body,document.documentElement];for(let t of e){let e=getComputedStyle(t).backgroundColor.match(/rgba?\(([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:[,\s/]+([\d.]+))?/);if(!(!e||e[4]!==void 0&&Number(e[4])===0))return .2126*e[1]+.7152*e[2]+.0722*e[3]>140?`light`:`dark`}}catch{}return matchMedia(`(prefers-color-scheme: light)`).matches?`light`:`dark`}var V2=130,H2=36,U2=380,W2=280,G2=720;function K2(e){let[t,n]=T(e.defaultOpen),[r,i]=T(`right`),[a,o]=T({x:Math.max(8,window.innerWidth-V2-24),y:Math.max(8,window.innerHeight-H2-20)}),[s,c]=T({running:[],review:[]}),l=()=>s().running,u=()=>s().review,[d,f]=T(!1),[p,m]=T(HD().phase),[h,g]=T(0);ie(()=>{let e=setInterval(()=>{p()===`recording`&&g(Date.now()-(HD().startedAt??Date.now()))},250);ae(()=>clearInterval(e))});let _=e=>{let t=Math.floor(e/1e3);return`${Math.floor(t/60)}:${String(t%60).padStart(2,`0`)}`},[v,y]=T(null),b=e=>({x:Math.min(Math.max(8,e.x),window.innerWidth-V2-8),y:Math.min(Math.max(8,e.y),window.innerHeight-H2-8)}),x=e=>({x:Math.min(Math.max(8-(te()-80),e.x),window.innerWidth-80),y:Math.min(Math.max(0,e.y),window.innerHeight-80)}),[S,C]=T(!1),[w,E]=T(`cloud`),[k,ee]=T(!1),[te,A]=T(U2),ne=e=>Math.min(G2,Math.max(W2,Math.min(e,window.innerWidth-60)));O(()=>{let e=document.documentElement,n=t()&&S();e.style.transition=`margin 0.2s ease`,e.style.marginRight=n&&r()===`right`?`${te()}px`:``,e.style.marginLeft=n&&r()===`left`?`${te()}px`:``}),ae(()=>{document.documentElement.style.marginRight=``,document.documentElement.style.marginLeft=``});let re=()=>{let e=!S();C(e),e&&y(null),Er({panelMode:e?`pinned`:`overlay`,panelPos:void 0})};ie(()=>{Tr().then(e=>{e.panelSide&&i(e.panelSide),e.launcherPos&&o(b(e.launcherPos)),e.panelPos&&y(x(e.panelPos)),e.panelWidth&&A(ne(e.panelWidth)),C(e.panelMode===`pinned`),E(e.workflowMode??`cloud`)});let e=Mr(e=>{e===`settings`&&Tr().then(e=>{i(e.panelSide??`right`),C(e.panelMode===`pinned`),E(e.workflowMode??`cloud`)}),e===`grab`&&w()!==`local`&&n(!0)}),t=()=>{ee(!0),setTimeout(()=>ee(!1),1600)};window.addEventListener(PZ,t);let r=()=>{f(!1),S()||n(!1)};window.addEventListener(FZ,r),ae(()=>{window.removeEventListener(PZ,t),window.removeEventListener(FZ,r)});let s=UQ(c),l=HD().phase,u=UD(e=>{m(e.phase),e.phase===`recording`&&l!==`recording`&&!S()&&n(!1),e.phase===`ready`&&l!==`ready`&&(rj(`capture`),n(!0)),l=e.phase}),d=()=>{o(b(a()));let e=v();e&&y(x(e))};window.addEventListener(`resize`,d),ae(()=>{e(),s(),u(),window.removeEventListener(`resize`,d)})});let oe=!1,se=e=>{if(e.button!==0)return;let t={x:e.clientX,y:e.clientY},n=a();oe=!1;let r=e=>{let r=e.clientX-t.x,i=e.clientY-t.y;Math.abs(r)+Math.abs(i)>4&&(oe=!0),oe&&o(b({x:n.x+r,y:n.y+i}))},i=()=>{window.removeEventListener(`pointermove`,r),window.removeEventListener(`pointerup`,i),oe&&Er({launcherPos:a()})};window.addEventListener(`pointermove`,r),window.addEventListener(`pointerup`,i)},ce=()=>a().y>260,le=e=>{f(!1),rj(`activity`,e),n(!0)},ue=e=>{if(e.button!==0)return;e.preventDefault(),e.stopPropagation();let t=e.clientX,n=te(),i=v(),a=e=>{let a=e.clientX-t,o=r()===`right`?-a:a,s=ne(n+o);A(s),i&&r()===`right`&&y(x({x:i.x+(n-s),y:i.y}))},o=()=>{window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,o),Er({panelWidth:te(),...v()?{panelPos:v()}:{}})};window.addEventListener(`pointermove`,a),window.addEventListener(`pointerup`,o)},de=e=>{if(e.button!==0)return;if(e.detail===2){y(null),Er({panelPos:void 0});return}let t={x:e.clientX,y:e.clientY},n=v()??{x:r()===`right`?window.innerWidth-te():0,y:0},i=!1,a=e=>{let r=e.clientX-t.x,a=e.clientY-t.y;Math.abs(r)+Math.abs(a)>4&&(i=!0),i&&y(x({x:n.x+r,y:n.y+a}))},o=()=>{window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,o);let e=v();i&&e&&Er({panelPos:e})};window.addEventListener(`pointermove`,a),window.addEventListener(`pointerup`,o)};return[j(M,{get when(){return!t()},get children(){var e=A2(),t=e.firstChild;return t.$$pointerdown=se,P(t,j(M,{get when(){return p()===`recording`},get fallback(){return[(()=>{var e=M2();return e.$$click=()=>{oe||(f(!1),n(!0))},P(e,j(S2,{size:13})),e})(),N2(),(()=>{var e=I2(),t=e.firstChild,n=t.nextSibling;return e.$$click=()=>{oe||f(e=>!e)},P(n,(()=>{var e=$e(()=>!!k());return()=>e()?`Copied ✓`:`${l().length} run`})()),P(e,j(M,{get when(){return $e(()=>!k())()&&u().length>0},get children(){return[P2(),(()=>{var e=F2(),t=e.firstChild;return P(e,()=>u().length,t),e})()]}}),null),D(e=>{var r=`size-2 rounded-full ${k()?`bg-success`:l().length?`bg-success animate-pulse`:`bg-text-faint`}`,i=`min-w-[3.5ch] text-left text-[11px] font-medium tabular-nums ${k()?`text-success`:`text-text-dim`}`;return r!==e.e&&st(t,e.e=r),i!==e.t&&st(n,e.t=i),e},{e:void 0,t:void 0}),e})()]},get children(){return[T2(),(()=>{var e=E2();return P(e,()=>_(h())),e})(),(()=>{var e=D2();return e.$$click=()=>{oe||eO()},e})()]}})),P(e,j(M,{get when(){return d()},get children(){var e=k2(),t=e.firstChild;return P(e,j(M,{get when(){return u().length>0},get children(){return[O2(),j(We,{get each(){return u()},children:e=>j(q2,{agent:e,review:!0,onOpen:le})})]}}),t),P(e,j(M,{get when(){return l().length>0},get fallback(){return L2()},get children(){return j(We,{get each(){return l()},children:e=>j(q2,{agent:e,onOpen:le})})}}),null),D(()=>st(e,`bg-surface border-border absolute w-72 rounded-lg border p-1.5 font-sans shadow-2xl ${ce()?`bottom-full mb-2`:`top-full mt-2`} ${a().x>window.innerWidth-300?`right-0`:`left-0`}`)),e}}),null),D(t=>{var n=`${a().x}px`,r=`${a().y}px`;return n!==t.e&&dt(e,`left`,t.e=n),r!==t.t&&dt(e,`top`,t.t=r),t},{e:void 0,t:void 0}),e}}),j(M,{get when(){return t()},get children(){var e=j2(),t=e.firstChild;return t.$$pointerdown=ue,P(e,j(C2,{onGrab:()=>n(!0),onClose:()=>n(!1),get onHeaderPointerDown(){return S()?void 0:de},get pinned(){return S()},onTogglePin:re}),null),D(n=>{var i=`bg-bg text-text border-border fixed z-[2147483645] flex max-w-[100vw] flex-col overflow-hidden font-sans text-[13px] antialiased ${S()?``:`shadow-2xl`} ${!S()&&v()?`rounded-xl border`:r()===`right`?`top-0 right-0 h-screen border-l`:`top-0 left-0 h-screen border-r`}`,a={width:`${te()}px`,...!S()&&v()?{left:`${v().x}px`,top:`${v().y}px`,height:`${Math.min(680,window.innerHeight-16)}px`}:{}},o=`hover:bg-accent/50 active:bg-accent absolute top-0 z-10 h-full w-1 cursor-col-resize transition-colors ${r()===`right`?`left-0`:`right-0`}`;return i!==n.e&&st(e,n.e=i),n.t=ut(e,a,n.t),o!==n.a&&st(t,n.a=o),n},{e:void 0,t:void 0,a:void 0}),e}})]}function q2(e){return(()=>{var t=R2(),n=t.firstChild,r=n.firstChild,i=r.nextSibling,a=i.nextSibling,o=n.nextSibling,s=o.firstChild,c=s.nextSibling;return c.nextSibling,t.$$click=()=>e.onOpen(e.agent.id),P(i,()=>e.agent.identifier),P(a,()=>e.agent.title),P(o,(()=>{var t=$e(()=>!!e.review);return()=>t()?`PR ready · needs review`:e.agent.stateName})(),s),P(o,()=>e.agent.delegateName,c),P(o,()=>J2(e.agent.updatedAt),null),D(t=>dt(r,`background`,e.review?`var(--color-warn)`:e.agent.stateColor)),t})()}function J2(e){let t=Math.max(0,Math.floor((Date.now()-Date.parse(e))/1e3));return t<60?`now`:t<3600?`${Math.floor(t/60)}m`:t<86400?`${Math.floor(t/3600)}h`:`${Math.floor(t/86400)}d`}rt([`pointerdown`,`click`]),z2()})();
|