@buoy-gg/shared-ui 7.0.58 → 7.0.60
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/lib/commonjs/index.js +1 -1
- package/lib/commonjs/license/BuoyUpgradeSheet.js +1 -0
- package/lib/commonjs/license/FeatureGate.js +1 -1
- package/lib/commonjs/license/index.js +1 -1
- package/lib/commonjs/license/licenseModule.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/license/BuoyUpgradeSheet.js +1 -0
- package/lib/module/license/FeatureGate.js +1 -1
- package/lib/module/license/index.js +1 -1
- package/lib/module/license/licenseModule.js +1 -1
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -2
- package/lib/typescript/commonjs/license/BuoyUpgradeSheet.d.ts +27 -0
- package/lib/typescript/commonjs/license/FeatureGate.d.ts +1 -1
- package/lib/typescript/commonjs/license/index.d.ts +2 -2
- package/lib/typescript/commonjs/license/licenseModule.d.ts +25 -0
- package/lib/typescript/commonjs/ui/otto/ottoEngine.d.ts +1 -1
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/index.d.ts +2 -2
- package/lib/typescript/module/license/BuoyUpgradeSheet.d.ts +27 -0
- package/lib/typescript/module/license/FeatureGate.d.ts +1 -1
- package/lib/typescript/module/license/index.d.ts +2 -2
- package/lib/typescript/module/license/licenseModule.d.ts +25 -0
- package/lib/typescript/module/ui/otto/ottoEngine.d.ts +1 -1
- package/lib/web/chunks/chunk-7YVWZ4ZK.mjs +1 -1
- package/lib/web/chunks/chunk-BZTGYXMT.mjs +1 -0
- package/lib/web/chunks/chunk-GF364FIK.mjs +1 -0
- package/lib/web/chunks/chunk-JYM7MCKQ.mjs +1 -1
- package/lib/web/chunks/chunk-L7OYS724.mjs +1 -0
- package/lib/web/chunks/chunk-OPTY6SMO.mjs +1 -1
- package/lib/web/chunks/chunk-PXAINEZK.mjs +6 -6
- package/lib/web/chunks/chunk-SYU4BFQR.mjs +6 -0
- package/lib/web/chunks/chunk-T2SPCEHP.mjs +1 -1
- package/lib/web/chunks/chunk-UYWHGSA7.mjs +1 -0
- package/lib/web/dataViewer.mjs +2 -2
- package/lib/web/history.mjs +1 -1
- package/lib/web/index.mjs +3 -3
- package/lib/web/ui.mjs +1 -1
- package/lib/web/utils.mjs +1 -1
- package/package.json +5 -5
- package/lib/commonjs/license/LicenseEntryModal.js +0 -5
- package/lib/module/license/LicenseEntryModal.js +0 -5
- package/lib/typescript/commonjs/license/LicenseEntryModal.d.ts +0 -22
- package/lib/typescript/module/license/LicenseEntryModal.d.ts +0 -22
package/lib/web/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use client";import{a as is,b as ns,c as ls,d as cs,e as us,f as ds,g as hs,h as gs,i as fs}from"./chunks/chunk-JYM7MCKQ.mjs";import{a as ps,b as ms,c as bs,d as ys,e as vs,f as Ss,g as Cs,h as ws}from"./chunks/chunk-E2MI3FII.mjs";import{$ as xs,A as Ts,B as ks,C as Is,D as Es,E as As,F as Rs,G as Os,J as _s,K as Ps,L as Ls,M as Ms,N as Ns,O as $s,P as Bs,Q as Ds,R as zs,S as Fs,Z as Hs,_ as Ws,a as za,b as js,c as Us,d as We,e as Vs,f as Gs,g as Fa,h as Ys,i as Ks,j as qs,k as Js,l as Xs,m as Bt,n as Qs,o as Zs,p as eo,q as to,r as ao,s as ro,t as so,u as oo,v as io,w as no,x as lo,y as co,z as uo}from"./chunks/chunk-ASHW3TI7.mjs";import"./chunks/chunk-LZ7FZZ7R.mjs";import{a as ho,d as go,f as Dt}from"./chunks/chunk-53J2FMUD.mjs";import{$ as fo,$a as po,$b as mo,A as Ha,Aa as bo,Ab as yo,Ac as vo,B as So,Ba as Co,Bb as wo,Bc as xo,C as To,Ca as ko,Cb as Io,Cc as Eo,D as Ao,Da as Ro,Db as Oo,E as _o,Ea as Po,Eb as Lo,F as Wa,Fa as Mo,Fb as No,G as $o,Ga as Bo,Gb as Do,H as zo,Ha as Fo,Hb as Ho,I as Wo,Ia as jo,Ib as Uo,J as Vo,Ja as Go,Jb as Yo,K as Ko,Ka as qo,Kb as Jo,L as Xo,La as Qo,Lb as Zo,M as ei,Ma as ti,Mb as ai,N as ri,Na as si,Nb as oi,O as ii,Oa as ni,Ob as li,P as ci,Pa as ui,Pb as di,Q as hi,Qa as gi,Qb as fi,R as pi,Ra as mi,Rb as bi,S as yi,Sa as vi,Sb as Si,T as Ci,Ta as wi,Tb as xi,U as Ti,Ua as ki,Ub as Ii,V as Ei,Va as Ai,Vb as Ri,W as Oi,Wa as _i,Wb as Pi,X as Li,Xa as Mi,Xb as Ni,Y as $i,Ya as Bi,Yb as Di,Z as zi,Za as Fi,Zb as Hi,_ as Wi,_a as ji,_b as Ui,a as Vi,aa as Gi,ab as Yi,ac as Ki,b as qi,ba as Ji,bb as Xi,bc as Qi,c as Zi,ca as en,cb as tn,cc as an,d as rn,da as sn,db as on,dc as nn,e as ln,ea as cn,eb as un,ec as dn,f as hn,fa as gn,fb as fn,fc as pn,g as mn,ga as bn,gb as yn,gc as vn,h as Sn,ha as Cn,hb as wn,hc as xn,i as ja,ia as Tn,ib as kn,ic as In,j as En,ja as An,jb as Rn,jc as On,k as _n,ka as Pn,kb as Ln,kc as Mn,l as Nn,la as $n,lb as Bn,lc as Dn,m as zn,ma as Fn,mb as Hn,mc as Wn,n as jn,na as Un,nb as Vn,nc as Gn,o as Yn,oa as Kn,ob as qn,oc as Jn,p as Xn,pa as Qn,pb as Zn,pc as el,q as tl,qa as al,qb as rl,qc as sl,r as ol,ra as il,rb as nl,rc as ll,s as cl,sa as ul,sb as dl,sc as hl,t as gl,ta as fl,tb as pl,tc as ml,u as bl,ua as yl,ub as vl,uc as zt,v as Sl,va as Cl,vb as Ua,vc as wl,w as pe,wa as xl,wb as Tl,wc as kl,x as X,xa as Il,xb as El,xc as Al,y as Re,ya as Rl,yb as Va,yc as Ol,z as je,za as _l,zb as Pl,zc as Ga}from"./chunks/chunk-PXAINEZK.mjs";import{a as Ll}from"./chunks/chunk-OPTY6SMO.mjs";import{a as Ml,b as Nl,c as $l,d as Bl,e as Dl,f as zl,g as Fl,h as Hl,i as Wl,j as jl,k as Ul,l as Vl,m as Gl,n as Yl,o as Kl,p as ql}from"./chunks/chunk-4IM4VIMP.mjs";import{a as u,b as Ya}from"./chunks/chunk-GF5C5DVX.mjs";import{a as Jl,b as Xl}from"./chunks/chunk-NVD5LLXD.mjs";import{a as Ql,b as Zl,c as ec,d as tc,e as ac,f as rc,g as sc,h as oc,i as ic,j as nc,k as lc,l as cc}from"./chunks/chunk-T2SPCEHP.mjs";import{$ as uc,$a as dc,$b as hc,$c as gc,Aa as fc,Ab as pc,Ac as mc,B as bc,Ba as yc,Bb as vc,Bc as Sc,C as Cc,Ca as wc,Cb as xc,Cc as Tc,D as kc,Da as Ic,Db as Ec,Dc as Ac,Ea as Rc,Eb as Oc,Ec as _c,F as Pc,Fa as Lc,Fb as Mc,Fc as Nc,Ga as $c,Gb as Bc,Gc as Dc,Ha as zc,Hb as Fc,Hc,I as Wc,Ib as jc,Ic as Ft,Ja as Uc,Jb as Vc,Jc as Gc,K as Yc,Ka as Kc,Kb as qc,Kc as Jc,La as Xc,Lb as Qc,Lc as Zc,Ma as eu,Mb as tu,Mc as au,Na as ru,Nb as su,Nc as ou,O as iu,Oa as nu,Ob as lu,Oc as cu,P as uu,Pa as du,Pb as hu,Pc as gu,Q as fu,Qa as pu,Qb as mu,Qc as bu,R as yu,Ra as vu,Rb as Su,Rc as Cu,S as wu,Sa as xu,Sb as Tu,Sc as ku,T as Iu,Ta as Eu,Tb as Au,Tc as Ru,U as Ou,Ua as _u,Ub as Pu,Uc as Lu,V as Mu,Va as Nu,Vb as $u,Vc as Bu,W as Du,Wa as zu,Wb as Ka,Wc as Fu,X as Hu,Xa as Wu,Xb as ju,Xc as Uu,Y as Vu,Ya as Gu,Yb as Yu,Yc as Ku,Z as qu,Za as Ju,Zb as Xu,Zc as Qu,_ as Zu,_a as ed,_b as td,_c as ad,a as rd,aa as sd,ab as od,ac as id,ad as nd,b as ld,ba as cd,bb as ud,bc as qa,bd as dd,c as hd,ca as gd,cb as fd,cc as pd,cd as md,d as bd,da as yd,db as vd,dc as Sd,dd as Cd,e as wd,ea as xd,eb as Td,ec as kd,ed as Id,f as Ed,fa as Ad,fb as Rd,fc as Ja,fd as Od,g as _d,ga as Pd,gb as Ld,gc as Md,gd as Nd,h as $d,ha as Bd,hb as Dd,hc as zd,hd as Fd,i as Hd,ia as Wd,ib as jd,ic as Ud,id as Vd,j as Gd,ja as Yd,jb as Kd,jc as qd,jd as Jd,k as Xd,ka as Qd,kb as Zd,kc as eh,kd as th,l as ah,la as rh,lb as sh,lc as oh,ld as ih,m as nh,ma as lh,mb as ch,mc as uh,md as dh,n as hh,na as gh,nb as fh,nc as ph,nd as mh,o as bh,oa as yh,ob as vh,oc as Sh,od as Ch,p as wh,pa as xh,pb as Th,pc as kh,pd as Ih,q as Eh,qa as Ah,qb as Rh,qc as Oh,qd as _h,r as Ph,ra as Lh,rb as Mh,rc as Nh,rd as $h,s as Bh,sa as Dh,sb as zh,sc as Fh,sd as Hh,t as Wh,ta as jh,tb as Uh,tc as Vh,td as Gh,u as Yh,ua as Kh,ub as qh,uc as Jh,ud as Xh,va as Qh,vb as Zh,vc as eg,wa as tg,wb as ag,wc as rg,xa as sg,xb as og,xc as ig,ya as ng,yb as lg,yc as cg,za as ug,zb as dg,zc as hg}from"./chunks/chunk-7YVWZ4ZK.mjs";import{a as ct,d as w,e as gg,f as K,g as fg}from"./chunks/chunk-CE5U3CSQ.mjs";import{a as pg,b as mg,c as bg,d as yg,e as vg}from"./chunks/chunk-QNLAFQET.mjs";import{a as ke,b as Sg,c as Cg,d as W,e as wg,f as xg}from"./chunks/chunk-FP44YK4E.mjs";import{H as Tg,J as Ue,a as T,b as H,d as ut,g as kg,h as Ig,j as Eg,r as Ht}from"./chunks/chunk-3UTMGIUG.mjs";import"./chunks/chunk-L63X3LPR.mjs";var Ag=class extends za{constructor(e){super();this.events=[];this.arrayListeners=new Set;this.captureSuppressed=false;this.clearListeners=new Set;this.maxEvents=e.maxEvents??500,this.storeName=e.storeName,Promise.resolve().then(()=>{let t=()=>{pe().status==="locked"?(this.stopCapturing(),this.events=[],this.notifyArrayListeners()):this.getTotalSubscriberCount()>0&&!this.captureSuppressed&&!this.isCapturing()&&this.startCapturing()};je(t),t()})}onSubscribe(){this.getTotalSubscriberCount()===1&&!this.captureSuppressed&&pe().status!=="locked"&&this.startCapturing(),We(this.storeName)}onUnsubscribe(){this.getTotalSubscriberCount()===0&&this.stopCapturing(),We(this.storeName)}getTotalSubscriberCount(){return this.listeners.size+this.arrayListeners.size}subscribeToEvents(e){let t=this.getTotalSubscriberCount()===0;return this.arrayListeners.add(e),t&&!this.captureSuppressed&&pe().status!=="locked"&&this.startCapturing(),We(this.storeName),e(this.getEvents()),()=>{this.arrayListeners.delete(e),this.getTotalSubscriberCount()===0&&this.stopCapturing(),We(this.storeName)}}onEvent(e){return this.subscribe(e)}addEvent(e){pe().status!=="locked"&&(this.events=[e,...this.events].slice(0,this.maxEvents),X()&&this.notify(e),this.notifyArrayListeners())}notifyArrayListeners(){let e=this.getEvents();this.arrayListeners.forEach(t=>{try{t(e)}catch{}})}getEvents(){return X()?this.events:[]}getEventCount(){return X()?this.events.length:0}clearEvents(){this.events=[],this.notifyArrayListeners(),this.clearListeners.forEach(e=>{try{e()}catch{}})}onClear(e){return this.clearListeners.add(e),()=>{this.clearListeners.delete(e)}}disableCapture(){this.captureSuppressed=true,this.isCapturing()&&this.stopCapturing()}replaceEvents(e){this.events=this.dedupeById(e).slice(0,this.maxEvents),this.notifyArrayListeners()}dedupeById(e){let t=new Set,a=[];for(let r of e){let s=r?.id;if(s==null){a.push(r);continue}t.has(s)||(t.add(s),a.push(r))}return a}setMaxEvents(e){this.maxEvents=e,this.events.length>e&&(this.events=this.events.slice(0,e),this.notifyArrayListeners())}getSubscriberCounts(){return{eventCallbacks:this.listeners.size,arrayListeners:this.arrayListeners.size,total:this.getTotalSubscriberCount()}}};import{useEffect as Rg,useMemo as Og,useState as _g}from"react";var Pg=[{value:"buoy.gg/api/license",mode:"contains"},{value:"api.keygen.sh",mode:"contains"}];function Xa(e,t){let a=e.toLowerCase(),r=t.value.toLowerCase();if(t.mode==="contains")return a.includes(r);try{let s=new URL(e);return r.startsWith("/")?s.pathname.toLowerCase()===r:r.startsWith("http://")||r.startsWith("https://")?`${s.origin}${s.pathname}`.toLowerCase()===r:s.host.toLowerCase()===r}catch{return a===r}}function Lg(e,t){return!e||t.length===0?false:t.some(a=>Xa(e,a))}var Qa=Pg;function Za(e){if(!Array.isArray(e))return[];let t=[];for(let a of e)if(typeof a=="string"&&a.trim())t.push({value:a,mode:"contains"});else if(a&&typeof a=="object"&&typeof a.value=="string"){let r=a;t.push({value:r.value,mode:r.mode==="exact"?"exact":"contains"})}return t}function er(e){let t=[...e];for(let a of Qa)t.some(r=>r.value===a.value)||t.push({...a});return t}var Mg=class{constructor(){this.patterns=er(Qa.map(e=>({...e})));this.teamPatterns=[];this.merged=this.patterns;this.listeners=new Set;this.loaded=false;this.loadPromise=null;this.dirty=false}getPatterns(){return this.merged}isTeamOnly(e){return!this.patterns.some(t=>t.value===e)&&this.teamPatterns.some(t=>t.value===e)}setTeamPatterns(e){this.teamPatterns=Za(e),this.remerge(),this.emit()}reload(){return this.loaded=false,this.loadPromise=null,this.dirty=false,this.ensureLoaded()}remerge(){let e=this.teamPatterns.filter(t=>!this.patterns.some(a=>a.value===t.value));this.merged=e.length>0?[...this.patterns,...e]:this.patterns}subscribe(e){return this.listeners.add(e),this.ensureLoaded(),()=>{this.listeners.delete(e)}}emit(){this.listeners.forEach(e=>e())}ensureLoaded(){return this.loaded?Promise.resolve():this.loadPromise?this.loadPromise:(this.loadPromise=(async()=>{try{let e=await W.getItem(ke.network.ignoredDomains());if(e&&!this.dirty){let t=er(Za(JSON.parse(e)));this.patterns=t,this.remerge()}}catch{}finally{this.loaded=true,this.emit()}})(),this.loadPromise)}persist(){W.setItem(ke.network.ignoredDomains(),JSON.stringify(this.patterns)).catch(()=>{})}commit(e){this.dirty=true,this.patterns=e,this.remerge(),this.emit(),this.persist()}add(e){let t=e.value.trim();t&&(this.patterns.some(a=>a.value===t)||this.commit([...this.patterns,{value:t,mode:e.mode}]))}remove(e){this.patterns.some(t=>t.value===e)&&this.commit(this.patterns.filter(t=>t.value!==e))}toggle(e){let t=e.trim();t&&this.commit(this.patterns.some(a=>a.value===t)?this.patterns.filter(a=>a.value!==t):[...this.patterns,{value:t,mode:"contains"}])}toggleMode(e){this.patterns.some(t=>t.value===e)&&this.commit(this.patterns.map(t=>t.value===e?{...t,mode:t.mode==="contains"?"exact":"contains"}:t))}},ee=new Mg,Ng=e=>ee.add(e),$g=e=>ee.remove(e),Bg=e=>ee.toggle(e),Dg=e=>ee.toggleMode(e),zg=e=>ee.isTeamOnly(e);function Fg(){let[e,t]=_g(()=>ee.getPatterns());Rg(()=>ee.subscribe(()=>{t(ee.getPatterns())}),[]);let a=Og(()=>new Set(e.map(r=>r.value)),[e]);return{patterns:e,values:a,add:Ng,remove:$g,toggle:Bg,toggleMode:Dg,isTeamOnly:zg}}import{useSyncExternalStore as Hg}from"react";var dt={},Wt=new Map,jt=new Set,Ve=[];function Wg(e){if(!e)return Ve;try{let t=JSON.parse(e);if(!Array.isArray(t))return Ve;let a=t.map(r=>typeof r=="string"?r:r&&typeof r.value=="string"?r.value:"").map(r=>r.trim()).filter(Boolean);return a.length?[...new Set(a)]:Ve}catch{return Ve}}var ht={set(e){Object.keys({...dt,...e}).some(t=>dt[t]!==e[t])&&(dt=e,Wt.clear(),jt.forEach(t=>t()))},getList(e){let t=Wt.get(e);return t||(t=Wg(dt[e]),Wt.set(e,t)),t},subscribe(e){return jt.add(e),()=>jt.delete(e)}};function jg(e){return Hg(ht.subscribe,()=>ht.getList(e),()=>Ve)}function Ug(e){typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):setTimeout(e,0)}function Vg(e){let t=e.id,a=e.order??"append",r=e.coalesce??"sync",s=e.flushMinIntervalMs??150,o=e.max,n=[],i=false,l=e.firstId??1,c=0,p=false,b=[],h=false;function m(){h||(h=true,je(()=>{pe().status==="locked"&&(n=[]),J()}))}let v=new Set,I=new Set;function U(){for(let S of v)try{S()}catch{}}function J(){if(r==="sync"){U();return}p||(p=true,Ug(()=>{p=false,U()}))}function B(S){return S.length<=o?S:a==="append"?S.slice(S.length-o):S.slice(0,o)}return{id:t,subscribe(S){return m(),v.add(S),()=>{v.delete(S)}},getSnapshot(){return m(),X()?n:b},size(){return X()?n.length:0},add(S){m(),!(i||pe().status==="locked")&&(a==="append"?n=n.length>=o?[...n.slice(n.length-o+1),S]:[...n,S]:n=n.length>=o?[S,...n.slice(0,o-1)]:[S,...n],J())},set(S){m(),X()&&(n=B(S),J())},update(S){m(),pe().status!=="locked"&&(n=B(S(n)),J())},clear(){for(let S of I)try{S()}catch{}n.length!==0&&(n=[],J())},onClear(S){return I.add(S),()=>{I.delete(S)}},notify(){J()},flushSync(S=false){let ne=Date.now();if(!(!S&&ne-c<s)){c=ne;try{let M=globalThis.__buoyFlushToolSync;if(!M)return;for(let Ze of M)Ze(t)}catch{}}},setPaused(S){i=S},isPaused(){return i},setMax(S){o=S;let ne=B(n);ne!==n&&(n=ne,J())},getMax(){return o},allocId(){return l++},bumpIdAbove(S){S+1>l&&(l=S+1)},listenerCount(){return v.size}}}var Gg=class{constructor(e={}){this.items=[];this.itemListeners=new Set;this.clearListeners=new Set;this.idCounter=0;this.enabled=true;this.captureSuppressed=false;this.max=e.max??200}canRecord(){return this.enabled&&!this.captureSuppressed}nextId(){return`${Date.now()}-${++this.idCounter}`}push(e){this.items=[e,...this.items].slice(0,this.max)}record(e){this.push(e),this.notifyListeners()}setItems(e){this.items=e.slice(0,this.max),this.notifyListeners()}getAll(){return[...this.items]}getById(e){return this.items.find(t=>t.id===e)}get size(){return this.items.length}clear(){this.items=[],this.notifyListeners(),this.clearListeners.forEach(e=>{try{e()}catch{}})}onClear(e){return this.clearListeners.add(e),()=>{this.clearListeners.delete(e)}}disableCapture(){this.captureSuppressed=true}isCaptureSuppressed(){return this.captureSuppressed}replaceAll(e){return this.enabled?(this.setItems(e),true):false}hydrateById(e,t){let a=this.items.findIndex(r=>r.id===e);a!==-1&&(this.items=[...this.items.slice(0,a),{...this.items[a],...t},...this.items.slice(a+1)],this.notifyListeners())}setEnabled(e){this.enabled=e}getEnabled(){return this.enabled}setMax(e){this.max=e,this.items.length>e&&(this.items=this.items.slice(0,e),this.notifyListeners())}getMax(){return this.max}subscribe(e){return this.itemListeners.add(e),()=>{this.itemListeners.delete(e)}}notifyListeners(){let e=this.getAll();this.itemListeners.forEach(t=>t(e))}get listenerCount(){return this.itemListeners.size}};var Ie=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Yg=["id","lineId","key","uuid","_id","slug","name"];function Ut(e){if(!e.length||!e.every(Ie))return;let t=e[0];for(let a of Yg){if(!(a in t))continue;let r=e.map(s=>s[a]);if(r.every(s=>typeof s=="string"||typeof s=="number")&&new Set(r.map(String)).size===r.length)return a}}function Kg(e,t,a,r){let s=r[t];return typeof s=="string"||typeof s=="number"?String(s)!==a?{ok:false,error:`The new item is addressed as \`${a}\` but carries \`${t}\`: ${JSON.stringify(s)}. Use the same value for both \u2014 address it by the id it carries.`}:{ok:true,value:s}:e.every(o=>typeof o[t]=="number")&&a.trim()!==""&&String(Number(a))===a?{ok:true,value:Number(a)}:{ok:true,value:a}}function Vt(e,t,a="",r=[]){if(Array.isArray(e)&&Ie(t)){let s=Ut(e);if(!s)return{patch:t,notes:r};let o=new Map(e.map(p=>[String(p[s]),p])),n=e.slice(),i=0,l=0,c=0;for(let[p,b]of Object.entries(t)){let h=n.findIndex(m=>String(m[s])===p);if(b===null){if(h===-1)return{patch:t,notes:r};n.splice(h,1),i++}else if(h===-1){if(!Ie(b))return{patch:t,notes:r};let m=Kg(e,s,p,b);if(!m.ok)return{patch:t,notes:r,error:m.error};n.push({...b,[s]:m.value}),c++}else{let m=Vt(o.get(p),b,`${a}[${p}]`,r);if(m.error)return{patch:t,notes:r,error:m.error};let v=n[h];n[h]=Ie(v)&&Ie(m.patch)?{...v,...m.patch}:m.patch,l++}}return r.push(`${a||"(root)"}: addressed by \`${s}\` \u2014 ${l} changed, ${c} added, ${i} removed, ${n.length} item(s) remain`),{patch:n,notes:r}}if(Ie(e)&&Ie(t)){let s={};for(let[o,n]of Object.entries(t)){let i=a?`${a}.${o}`:o;if(!(o in e)){s[o]=n;continue}let l=Vt(e[o],n,i,r);if(l.error)return{patch:t,notes:r,error:l.error};s[o]=l.patch}return{patch:s,notes:r}}return{patch:t,notes:r}}var gt=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function Ge(e,t=0){if(e===null)return"null";if(Array.isArray(e)){if(!e.length)return"unknown[]";if(t>=3)return"\u2026[]";let r=Ge(e[0],t+1);return r.includes(" ")||r.endsWith("]")?`(${r})[]`:`${r}[]`}if(gt(e)){if(t>=3)return"{\u2026}";let r=Object.keys(e),s=r.slice(0,24),o=s.map(i=>`${i}: ${Ge(e[i],t+1)}`).join(", "),n=r.length>s.length?`, +${r.length-s.length} more`:"";return`{${o}${n}}`}let a=typeof e;return a==="undefined"?"undefined":a==="function"?"function":a}function Oe(e,t="",a=[],r=0,s={visited:0}){if(r>3||a.length>=40||s.visited>=600)return a;if(Array.isArray(e)){let o=e[0];if(a.push({path:t||"(root)",length:e.length,...e.length?{item:Ge(o)}:{}}),e.length&>(o))for(let[n,i]of Object.entries(o)){if(++s.visited>=600)break;Oe(i,t?`${t}[].${n}`:`[].${n}`,a,r+1,s)}return a}if(gt(e))for(let[o,n]of Object.entries(e)){if(++s.visited>=600)break;Oe(n,t?`${t}.${o}`:o,a,r+1,s)}return a}function qg(e){let t={visited:0};return Oe(e,"",[],0,t).length>=40||t.visited>=600}function Jg(e){return Oe(e).filter(t=>t.item===void 0).map(t=>t.path)}function Xg(e){if(e===void 0)return;let t=Oe(e),a=Ge(e);if(!(!t.length&&!gt(e)&&!Array.isArray(e)))return t.length?{shape:a,lists:t}:{shape:a}}var oe=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function Qg(e,t,a=2e3){let r=[{node:e,path:""}],s=0;for(;r.length&&s<a;){let{node:o,path:n}=r.shift();if(s++,Array.isArray(o))o.slice(0,20).forEach((i,l)=>r.push({node:i,path:`${n}[${l}]`}));else if(oe(o))for(let[i,l]of Object.entries(o)){let c=n?`${n}.${i}`:i;if(i===t)return c;(oe(l)||Array.isArray(l))&&r.push({node:l,path:c})}}}function tr(e,t,a,r,s){let o=Qg(e,s??a),n=r.slice(0,12).join(", ")||"(no fields)";return o?`No field "${a}" at "${t}" \u2014 did you mean path "${o}"? "${t}" has: ${n}.`:`No field "${a}" at "${t}". It has: ${n}.`}function ar(e,t){let a=e;for(let r of t.split(".")){if(!oe(a))return;a=a[r]}return a}function Gt(e){if(!e.trim())return;let t=[],a=0;for(;a<e.length;){if(e[a]==="."){a++;continue}if(e[a]==="["){let o=e.indexOf("]",a);if(o===-1)return;let n=e.slice(a+1,o);if(/^\d+$/.test(n))t.push({kind:"index",index:Number(n)});else{let i=n.indexOf("=");if(i<=0)return;t.push({kind:"match",field:n.slice(0,i).trim(),value:n.slice(i+1).trim()})}a=o+1;continue}let r=a;for(;r<e.length&&e[r]!=="."&&e[r]!=="[";)r++;let s=e.slice(a,r);if(!s)return;t.push({kind:"key",key:s}),a=r}return t.length?t:void 0}function Zg(e,t){let a=Gt(t);if(!a)return{ok:false,error:`Could not read the path "${t}". Use dotted keys with optional [0] or [field=value], like "item.name" or "lines[lineId=seed-1].qty".`};let r=e,s=[];for(let o of a){if(r==null)return{ok:false,error:`"${s.join(".")||"(root)"}" is ${r===null?"null":"not set"}, so there is nothing at "${t}".`};if(o.kind==="key"){if(!oe(r))return{ok:false,error:`"${s.join(".")||"(root)"}" is not an object, so it has no field "${o.key}".`};if(!(o.key in r)){let n=a[a.length-1];return{ok:false,error:tr(e,s.join(".")||"(root)",o.key,Object.keys(r),n?.kind==="key"?n.key:void 0)}}r=r[o.key],s.push(o.key)}else if(o.kind==="index"){if(!Array.isArray(r))return{ok:false,error:`"${s.join(".")||"(root)"}" is not a list, so [${o.index}] means nothing.`};r=r[o.index],s.push(`[${o.index}]`)}else{if(!Array.isArray(r))return{ok:false,error:`"${s.join(".")||"(root)"}" is not a list, so [${o.field}=${o.value}] means nothing.`};let n=r.find(i=>oe(i)&&String(ar(i,o.field))===o.value);if(n===void 0)return{ok:false,error:`No item with ${o.field}="${o.value}" in "${s.join(".")||"(root)"}".`};r=n,s.push(`[${o.field}=${o.value}]`)}}return{ok:true,value:r}}function ef(e,t,a){let r=Gt(t);if(!r)return{ok:false,error:`Could not read the path "${t}". Use dotted keys with optional [0] or [field=value], like "item.name" or "lines[lineId=seed-1].qty".`};if(r[0]?.kind!=="key")return{ok:false,error:`A path must start with a field name, not a list index \u2014 "${t}" does not say which list.`};let s=(n,i)=>{if(i>=r.length)return{ok:true,patch:a};let l=r[i];if(l.kind==="key"){if(oe(n)&&!(l.key in n)&&i+1<r.length){let U=r[r.length-1];return{ok:false,error:tr(e,Ye(r,i),l.key,Object.keys(n),U?.kind==="key"?U.key:void 0)}}let v=oe(n)?n[l.key]:void 0,I=s(v,i+1);return I.ok?{ok:true,patch:{[l.key]:I.patch}}:I}if(!Array.isArray(n))return{ok:false,error:`"${Ye(r,i)}" is not a list, so "${t}" cannot be resolved. Read it first \u2014 \`shape\` on the read says what each field holds.`};let c=l.kind==="index"?l.index:n.findIndex(v=>oe(v)&&String(ar(v,l.field))===l.value),p=c>=0?n[c]:void 0;if(l.kind==="index"?c<0||c>=n.length:c<0)return{ok:false,error:l.kind==="index"?`"${Ye(r,i)}" has ${n.length} item(s), so there is nothing at [${l.index}].`:`No item with ${l.field}="${l.value}" in "${Ye(r,i)}".`};if(!oe(p)){if(i<r.length-1)return{ok:false,error:`"${Ye(r,i)}[${l.kind==="index"?l.index:`${l.field}=${l.value}`}]" holds ${p===null?"null":typeof p}, not an object, so "${t}" cannot go any deeper. Set the item itself.`};let v=n.slice();return v[c]=a,{ok:true,patch:v}}let b=s(p,i+1);if(!b.ok)return b;let h=Ut(n);if(h)return{ok:true,patch:{[String(p[h])]:b.patch}};let m=n.slice();return m[c]=oe(b.patch)?{...p,...b.patch}:b.patch,{ok:true,patch:m}},o=s(e,0);return o.ok?{ok:true,patch:o.patch}:o}function Ye(e,t){return e.slice(0,t).map(a=>a.kind==="key"?a.key:a.kind==="index"?`[${a.index}]`:`[${a.field}=${a.value}]`).join(".").replace(/\.\[/g,"[")||"(root)"}var me=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function Ke(e){return Array.isArray(e)?"array":e===null?"null":typeof e=="object"?"object":typeof e}var rr=["string","number","boolean"];function sr(e,t,a=2e3){let r=[{node:e,path:""}],s=0;for(;r.length&&s<a;){let{node:o,path:n}=r.shift();if(s++,Array.isArray(o))o.slice(0,20).forEach((i,l)=>r.push({node:i,path:`${n}[${l}]`}));else if(me(o))for(let[i,l]of Object.entries(o)){let c=n?`${n}.${i}`:i;if(i===t&&n)return c;(me(l)||Array.isArray(l))&&r.push({node:l,path:c})}}}function Yt(e,t,a={},r=e,s="",o=[]){let n=a.noun??"data",i=s||"(root)";if(Array.isArray(t)){if(!Array.isArray(e))return o.push({path:i,kind:"type-change",detail:`${Ke(e)} \u2192 array`}),o;let h=e.length?e[0]:void 0;return h!==void 0&&(me(h)||Array.isArray(h))&&t.forEach((m,v)=>{let I=`${s}[${v}]`;if(me(h)&&me(m))for(let U of Object.keys(h))U in m||o.push({path:`${I}.${U}`,kind:"missing-key",detail:`list items need \`${U}\` \u2014 the items already in the list have it`});Yt(h,m,a,r,I,o)}),o}if(me(t)){if(!me(e))return o.push({path:i,kind:"type-change",detail:`${Ke(e)} \u2192 object`}),o;for(let[h,m]of Object.entries(t)){let v=s?`${s}.${h}`:h;if(h in e)Yt(e[h],m,a,r,v,o);else{let I=sr(r,h);o.push({path:v,kind:"add-key",detail:I?`no such field here \u2014 did you mean \`${I}\`?`:`no field named \`${h}\` exists in this ${n}`,...I?{movedTo:I}:{}})}}return o}let l=Ke(e),c=Ke(t),p=l==="null"&&rr.includes(c),b=c==="null"&&rr.includes(l);return l!==c&&!p&&!b&&o.push({path:i,kind:"type-change",detail:`${l} \u2192 ${c}`}),o}function tf(e,t){if(!t.length||!t.every(r=>r.kind==="add-key"&&r.movedTo))return;let a={};for(let r of t){let s=af(e,r.path);if(s===void 0||r.movedTo.includes("["))return;let o=a,n=r.movedTo.split(".");n.slice(0,-1).forEach(i=>{o[i]??(o[i]={}),o=o[i]}),o[n[n.length-1]]=s}return a}function af(e,t){let a=e;for(let r of t.split(".")){if(!me(a))return;a=a[r]}return a}function rf(e,t,a){let r=e.slice(0,6).map(o=>`\`${o.path}\`: ${o.detail}`).join("; "),s=e.length>6?`; +${e.length-6} more`:"";return`Refused: this isn't a same-type edit of existing fields (the rule the React Query devtools enforces). ${r}${s}. You can only change the VALUE of a field that already exists, to the same type \u2014 you can't add fields, change a field's type, or null a list/object the screen renders. Clearing a scalar to null is fine. Send just the field(s) you're changing, nested to match the current shape of this ${t}. Use force:true only to deliberately break that.`+(a?` This is the same edit at the right depth \u2014 send it as the patch: ${JSON.stringify(a)}`:"")}function ft(e,t){let a=0,r=false,s=false,o=[e],n=new Set;for(;o.length>0;){if(a>t)return{bytes:a,sawRepeat:r,sawBigInt:s};let i=o.pop();if(i==null)a+=4;else if(typeof i=="string")a+=i.length+2;else if(typeof i=="number")a+=8;else if(typeof i=="boolean")a+=5;else if(typeof i=="object"){if(n.has(i)){r=true;continue}if(n.add(i),Array.isArray(i)){a+=2+i.length;for(let l=0;l<i.length;l++)o.push(i[l])}else{a+=2;for(let l in i)a+=l.length+4,o.push(i[l])}}else typeof i=="bigint"&&(s=true),a+=4}return{bytes:a,sawRepeat:r,sawBigInt:s}}function Kt(e,t){let a=ft(e,t);return a.bytes>t?true:!a.sawRepeat&&!a.sawBigInt?false:!Fa(e)}var or=16*1024,pt=8*1024*1024;function sf(e,t){return Object.freeze({[`__buoy${e}OnDevice`]:true,note:t})}function of(e,t){return typeof e=="object"&&e!==null&&e[`__buoy${t}OnDevice`]===true}function ir(e=pt){return{__buoyTruncated:true,note:`Exceeds the ${e/1048576}MB detail limit \u2014 inspect it on-device.`}}function nf(e,t,a=or){return e===void 0?e:Kt(e,a)?t:e}function nr(e,t=pt){return Kt(e,t)?ir(t):e}function lf(e){let t=new WeakMap;return a=>{let r=t.get(a);if(r!==void 0)return r;let s=e(a);return t.set(a,s),s}}function cf(e,t){let a=[],r=t.baseBytes??16;for(let s=e.length-1;s>=0;s--){let o=t.toWire(e[s]);if(r+o.bytes>t.budget&&a.length>0)break;a.push(o.value),r+=o.bytes}return a.reverse(),a}function uf(e,t,a){let r=ft(e,t);if(r.bytes<=t)return{value:e,bytes:r.bytes};let s=a();return{value:s,bytes:ft(s,t).bytes}}function lr(e){return e??{}}function df(e,t,a=pt){let r=s=>nr(s,a);return s=>{let{id:o}=lr(s);if(!o)return{found:false,reason:"missing id"};let n=e(o);return n?{found:true,id:o,...t(n,r)}:{found:false,reason:"unknown id"}}}function cr(e){return e.length===1?e[0]:t=>{let a=e.map(r=>r(t));return()=>{for(let r of a)r()}}}function hf(e){let t=Array.isArray(e.subscribe)?cr(e.subscribe):e.subscribe;return{version:e.version,getSnapshot:e.getSnapshot,subscribe:t,...e.actions?{actions:e.actions}:{}}}var mt=new Set(["@react_buoy_settings_theme","@react_buoy_settings_preferences","@react_buoy_settings_global","@react_buoy_dev_tools_settings","@react_buoy_settings_tooltip_shown","@react_buoy_modal_hint_acknowledged","@react_buoy_clipboard_hint_acknowledged","@react_buoy_network_filters","@react_buoy_network_preferences","@react_buoy_network_copy_options","@react_buoy_storage_filters","@react_buoy_storage_event_filters","@react_buoy_storage_key_filters","@react_buoy_storage_pinned_keys","@react_buoy_storage_preferences","@react_buoy_storage_diff_viewer_mode","@react_buoy_rq_filters","@react_buoy_rq_preferences","@react_buoy_route_events_event_filters","@react_buoy_route_events_detail_view","@react_buoy_route_events_diff_viewer_mode","@react_buoy_sentry_filters","@react_buoy_sentry_preferences","@react_buoy_highlight_updates_filters","@react_buoy_highlight_updates_settings","@react_buoy_highlight_updates_copy_settings","@react_buoy_events_enabled_sources","@react_buoy_events_copy_settings","@react_buoy_time_machine_diff_viewer_mode","@react_buoy_network_ignored_domains","@react_buoy_network_ignored_urls","@react_buoy_rq_ignored_patterns","@react_buoy_rq_included_patterns"]),ur=new Set(["@react_buoy_network_ignored_domains","@react_buoy_network_ignored_urls","@react_buoy_rq_ignored_patterns","@react_buoy_rq_included_patterns"]),dr="@react_buoy_settings_sync_meta",hr="@react_buoy_network_ignored_domains",gr=2e3,be=3e4,qt=15*6e4,gf=15e3,Jt=new Set;function ff(e){return Jt.add(e),()=>Jt.delete(e)}function pf(e){e.includes(hr)&&ee.reload(),Jt.forEach(t=>{try{t(e)}catch{}})}function mf(){return{storage:W,credential:Ao,fetch:(e,t)=>fetch(e,t),subscribeWrites:Cg,setTimer:(e,t)=>setTimeout(e,t),clearTimer:e=>clearTimeout(e),onTeam:e=>{ee.setTeamPatterns(bf(e[hr])),ht.set(e)},onApplied:pf}}function bf(e){if(!e)return[];try{return JSON.parse(e)}catch{return[]}}var fr=class{constructor(e={}){this.started=false;this.pending=new Map;this.applying=new Set;this.pushTimer=null;this.pullTimer=null;this.unsubscribe=null;this.refusedToken=null;this.deps={...mf(),...e}}start(){this.started||(this.started=true,this.unsubscribe=this.deps.subscribeWrites((e,t)=>this.onWrite(e,t)),this.pull())}stop(){this.started=false,this.unsubscribe?.(),this.unsubscribe=null,this.pushTimer!==null&&this.deps.clearTimer(this.pushTimer),this.pullTimer!==null&&this.deps.clearTimer(this.pullTimer),this.pushTimer=this.pullTimer=null}credential(){let e=this.deps.credential();return e&&e.token!==this.refusedToken?e:null}call(e,t,a){return new Promise((r,s)=>{let o=this.deps.setTimer(()=>s(new Error("timeout")),gf);this.deps.fetch(`${t.origin.replace(/\/$/,"")}${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({access_token:t.token,...a})}).then(n=>{this.deps.clearTimer(o),r(n)},n=>{this.deps.clearTimer(o),s(n)})})}schedulePull(e){this.started&&(this.pullTimer!==null&&this.deps.clearTimer(this.pullTimer),this.pullTimer=this.deps.setTimer(()=>{this.pullTimer=null,this.pull()},e))}async readMeta(){try{let e=await this.deps.storage.getItem(dr),t=e?JSON.parse(e):{};return t&&typeof t=="object"?t:{}}catch{return{}}}async writeMeta(e){await this.deps.storage.setItem(dr,JSON.stringify(e)).catch(()=>{})}async pull(){let e=this.credential();if(!e)return this.schedulePull(be);let t,a;try{let i=await this.call("/api/settings/pull",e,{});t=i.status,a=await i.json().catch(()=>null)}catch{return this.schedulePull(be)}if(t===401||t===403)return this.refusedToken=e.token,this.schedulePull(be);if(t===404)return this.schedulePull(qt);if(t!==200||!a)return this.schedulePull(be);let r=a.personal??{},s=await this.readMeta(),o=[];for(let[i,l]of Object.entries(r))if(!(!mt.has(i)||this.pending.has(i))&&!(typeof l?.value!="string"||!(l.updatedAt>(s[i]??0)))){this.applying.add(i);try{await this.deps.storage.setItem(i,l.value)}finally{this.applying.delete(i)}s[i]=l.updatedAt,o.push(i)}for(let i of mt){if(i in r||i in s||this.pending.has(i))continue;let l=await this.deps.storage.getItem(i).catch(()=>null);l!==null&&this.pending.set(i,l)}await this.writeMeta(s),o.length>0&&this.deps.onApplied(o);let n={};for(let[i,l]of Object.entries(a.team??{}))ur.has(i)&&typeof l?.value=="string"&&(n[i]=l.value);this.deps.onTeam(n),this.pending.size>0&&this.schedulePush(0),this.schedulePull(qt)}onWrite(e,t){!this.started||this.applying.has(e)||!mt.has(e)||(this.pending.set(e,t),this.schedulePush(gr))}schedulePush(e){this.pushTimer!==null&&this.deps.clearTimer(this.pushTimer),this.pushTimer=this.deps.setTimer(()=>{this.pushTimer=null,this.push()},e)}async push(){if(this.pending.size===0)return;let e=this.credential();if(!e)return this.schedulePush(be);let t=new Map(this.pending),a,r;try{let o=await this.call("/api/settings/push",e,{changes:Object.fromEntries(t)});a=o.status,r=await o.json().catch(()=>null)}catch{return this.schedulePush(be)}if(a===401||a===403)return this.refusedToken=e.token,this.schedulePush(be);if(a===404)return this.schedulePush(qt);if(a!==200||!r||typeof r.updatedAt!="number")return this.schedulePush(be);let s=await this.readMeta();for(let[o,n]of t)this.pending.get(o)===n&&this.pending.delete(o),s[o]=r.updatedAt;await this.writeMeta(s),this.pending.size>0&&this.schedulePush(gr)}},qe=null;function yf(e={}){qe??(qe=new fr(e)),qe.start()}function vf(){qe&&qe.pull()}function Sf(e){return e}function Cf(e,t,a){return r=>{let s=r??{},o=e.props===void 0&&!t?void 0:{...e.props??{},...t?t(s):{}};return{...e,id:s.id||e.id,name:s.name||e.name,description:s.description||e.description,...o!==void 0?{props:o}:{},...a?a(s,e):{}}}}var Xt="__buoyToolActionRegistry";function Qt(){let e=globalThis;return e[Xt]||(e[Xt]=new Set),e[Xt]}function wf(e){let t=Qt();t.add(e);let a=false,r=()=>{if(a)return;a=true;let o=e(),n=async(i,l,c)=>{if(!(i==="network"&&l==="deleteOverrideRule"||i==="impersonate"&&l==="stopImpersonation"))throw new Error("Unsupported account-lock cleanup operation");if(i==="impersonate")return o[i]?.dispose?.(n);let p=o[i]?.actions?.[l];if(!p)throw new Error(`Cleanup unavailable for ${i}`);return p(c)};for(let i of Object.values(o))try{Promise.resolve(i.dispose?.(n)).catch(l=>console.warn("[Buoy] Tool cleanup failed",l))}catch(l){console.warn("[Buoy] Tool cleanup failed",l)}},s=je(()=>{X()?a=false:r()});return()=>{s(),t.delete(e),Promise.resolve().then(()=>{t.size===0&&r()})}}function _e(){if(!X())return{};let e={};for(let t of Qt())try{Object.assign(e,t())}catch{}return Object.fromEntries(Object.entries(e).map(([t,a])=>[t,pr(a)]))}function xf(){return Object.keys(_e())}function Tf(){let e={};for(let[t,a]of Object.entries(_e()))e[t]=Object.keys(a.actions??{});return e}function kf(){return Object.entries(_e()).filter(([,e])=>typeof e.getSnapshot=="function").map(([e])=>e)}async function If(e){Re();let t=_e()[e];if(!t)throw new Error(`Unknown tool "${e}"`);if(typeof t.getSnapshot!="function")throw new Error(`Tool "${e}" has no snapshot to read`);return await t.getSnapshot()}function Zt(){return X()&&Qt().size>0}async function Ef(e,t,a){Re();let r=_e()[e],s=r?.actions?.[t];if(!s)throw new Error(r?`Unknown action "${t}" on tool "${e}"`:`Unknown tool "${e}"`);return await s(a)}async function Af(e=2e3){if(Zt())return true;let t=Bt()+e;for(;Bt()<t;)if(await new Promise(a=>setTimeout(a,50)),Zt())return true;return false}function pr(e){let t=a=>(...r)=>{Re();let s=false,o=je(()=>{X()||(s=true)}),n=()=>{if(s)throw new Error("Buoy account access ended while the operation was pending.");Re()};try{let i=a.apply(e,r);return i&&typeof i.then=="function"?Promise.resolve(i).then(l=>(n(),l)).finally(o):(n(),o(),i)}catch(i){throw o(),i}};return{...e,...e.getSnapshot?{getSnapshot:t(e.getSnapshot)}:{},...e.actions?{actions:Object.fromEntries(Object.entries(e.actions).map(([a,r])=>[a,t(r)]))}:{},...e.subscribe?{subscribe:a=>(Re(),e.subscribe(()=>{X()&&a()}))}:{}}}var ea="__buoyToolUiBridge";function ta(){let e=globalThis;return e[ea]||(e[ea]=new Set),e[ea]}function Rf(e){let t=ta();return t.add(e),()=>{t.delete(e)}}function Of(e){for(let t of ta())try{if(t(e))return true}catch{}return false}function _f(){return ta().size>0}var aa="__buoyToolAttention";function ra(){let e=globalThis;return e[aa]||(e[aa]={byTool:new Map,listeners:new Set}),e[aa]}function Pf(e,t){let a=ra(),r=a.byTool.get(e)??null;if(!(r===t||r&&t&&r.kind===t.kind&&r.label===t.label)){t?a.byTool.set(e,t):a.byTool.delete(e);for(let s of a.listeners)try{s()}catch{}}}function Lf(e){return ra().byTool.get(e)??null}function Mf(e){let t=ra();return t.listeners.add(e),()=>{t.listeners.delete(e)}}import{createContext as Nf,useContext as $f,useEffect as Bf}from"react";var mr=Nf(null);function Df(e,t){let a=$f(mr);return Bf(()=>{if(a)return a(e),()=>a(null)},[a,...t]),a!==null}var br=256*1024;function zf(e){let t=new Set(e?.excludeKeys??[]),a=e?.includeKeys?new Set(e.includeKeys):null,r=0,s=o=>!t.has(o)&&(!a||a.has(o));return{touch:s,allows(o){return s(o)?true:(r+=1,false)},countExcluded(o){r+=o},get excludedHits(){return r},excludedWarning(o){return r>0?`${r} ${o} excluded by you`:null}}}function Ff(){return{ok:true,applied:0,skipped:[],warnings:[]}}function Hf(e){return{ok:false,applied:0,skipped:[],warnings:[e]}}function Wf(e,t){return{ok:false,applied:0,skipped:[{id:e,reason:t}],warnings:[]}}function jf(e,t={}){let{key:a,label:r,oldValue:s,newValue:o,inOld:n,inNew:i}=e;if(!i)return{key:a,label:r,verdict:"removed",oldValue:s};if(!n)return{key:a,label:r,verdict:"added",newValue:o};if((t.equal??ho)(s,o))return{key:a,label:r,verdict:"unchanged"};let l=t.tooLarge??(c=>go(c,br));return l(s)||l(o)?{key:a,label:r,verdict:"too-large",reason:t.tooLargeReason??"value too large to render a diff \u2014 restore still applies it"}:{key:a,label:r,verdict:"changed",oldValue:s,newValue:o}}function Uf(e,t){return e.verdict==="unchanged"?e:{...e,verdict:"wont-apply",reason:t}}function Vf(e,t){let a=r=>r===void 0?[]:r instanceof Map?Array.from(r.keys()):Object.keys(r);return new Set([...a(e),...a(t)])}function Gf(e,t={}){let a=e.toLowerCase();if(t[a])return t[a];for(let[m,v]of Object.entries(t))if(a.includes(m))return v;let r=e.split("").reduce((m,v)=>m+v.charCodeAt(0),0)*137%360,s=.7,o=.6,n=(1-Math.abs(2*o-1))*s,i=n*(1-Math.abs(r/60%2-1)),l=o-n/2,c=0,p=0,b=0;r<60?(c=n,p=i):r<120?(c=i,p=n):r<180?(p=n,b=i):r<240?(p=i,b=n):r<300?(c=i,b=n):(c=n,b=i);let h=m=>Math.round((m+l)*255).toString(16).padStart(2,"0");return`#${h(c)}${h(p)}${h(b)}`}function Yf(e,t={}){let a=t.maxLength??40;if(e===void 0)return t.undefinedLabel??"undefined";if(e===null)return"null";try{if(typeof e=="function")return t.functionLabel??"(fn)";if(typeof e=="string")return e.length>a?`"${e.slice(0,a-3)}..."`:`"${e}"`;if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){if(e.length===0)return"[]";let r=JSON.stringify(e);return r.length>a?`[${e.length} items]`:r}if(typeof e=="object"){let r=Object.keys(e);if(r.length===0)return"{}";let s=JSON.stringify(e);return s.length<=a?s:`{ ${r.length} keys }`}return String(e).slice(0,a)}catch{return"[complex]"}}function Kf(e,t){if(e===t)return{summary:"no change",changedKeys:[],changedCount:0};if(typeof e!="object"||typeof t!="object"||e===null||t===null)return{summary:"changed",changedKeys:[],changedCount:0};let a=e,r=t,s=Object.keys(a),o=Object.keys(r),n=o.filter(h=>!s.includes(h)),i=s.filter(h=>!o.includes(h)),l=[];for(let h of s)o.includes(h)&&a[h]!==r[h]&&l.push(h);let c=[...n,...i,...l],p=[];if(n.length>0&&p.push(`+${n.length}`),i.length>0&&p.push(`-${i.length}`),l.length>0&&p.push(`~${l.length}`),p.length===0)return{summary:"nested change",changedKeys:[],changedCount:0};let b=c.length;return{summary:`${p.join(" ")} ${b===1?"key":"keys"}`,changedKeys:c,changedCount:b}}function yr(e){if(e==null)return"N/A";if(e===0)return"0 B";let t=1024,a=["B","KB","MB","GB","TB"],r=Math.floor(Math.log(e)/Math.log(t));return`${(e/Math.pow(t,r)).toFixed(1)} ${a[r]}`}function qf(e){if(e==null)return"N/A";if(e<1e3)return`${e}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;if(e<36e5){let r=Math.floor(e/6e4),s=Math.floor(e%6e4/1e3);return s>0?`${r}m ${s}s`:`${r}m`}let t=Math.floor(e/36e5),a=Math.floor(e%36e5/6e4);return a>0?`${t}h ${a}m`:`${t}h`}function Jf(e){return e.toLocaleString()}var vr=5e4;function Xf(e,t=vr){try{let a=JSON.stringify(e);return a.length>t?`[omitted: ${yr(a.length)} \u2014 too large to copy]`:e}catch{return"[omitted: could not serialize]"}}function Qf(e,t=50,a=20,r=20){if(e.length<=t)return e;let s=e.slice(0,a),o=e.slice(-r);return`${s}...${o}`}function Zf(e){if(e>=100&&e<200)return{text:String(e),color:w.info,meaning:"Informational"};if(e>=200&&e<300){let t={200:"OK",201:"Created",202:"Accepted",204:"No Content",206:"Partial Content"};return{text:String(e),color:w.success,meaning:t[e]||"Success"}}if(e>=300&&e<400){let t={301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",307:"Temporary Redirect",308:"Permanent Redirect"};return{text:String(e),color:w.warning,meaning:t[e]||"Redirect"}}if(e>=400&&e<500){let t={400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",408:"Request Timeout",409:"Conflict",410:"Gone",422:"Unprocessable Entity",429:"Too Many Requests"};return{text:String(e),color:w.error,meaning:t[e]||"Client Error"}}if(e>=500){let t={500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"};return{text:String(e),color:w.error,meaning:t[e]||"Server Error"}}return{text:String(e),color:w.muted,meaning:"Unknown"}}function ep(e){return{GET:w.success,POST:w.info,PUT:w.warning,DELETE:w.error,PATCH:w.network,HEAD:w.muted,OPTIONS:w.secondary,CONNECT:w.critical,TRACE:w.env}[e.toUpperCase()]||w.muted}function tp(e){try{let t=new URL(e);return{protocol:t.protocol.replace(":",""),host:t.hostname,port:t.port||void 0,pathname:t.pathname,search:t.search||void 0,hash:t.hash||void 0}}catch{return null}}var Je=[];function Sr(e){Je.unshift(e),Je=Je.slice(0,500)}function ap(){return Je}function rp(){Je=[]}var sa=(e=>(e.Debug="debug",e.Info="info",e.Log="log",e.Warn="warn",e.Error="error",e))(sa||{}),oa=(e=>(e.Auth="Auth",e.Custom="Custom",e.Debug="Debug",e.Error="Error",e.Generic="Generic",e.HTTPRequest="HTTP Request",e.Navigation="Navigation",e.Replay="Replay",e.State="State",e.System="System",e.Touch="Touch",e.UserAction="User Action",e))(oa||{});var sp=()=>`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,Cr=class{constructor(){this.captureTransaction=e=>(this.logSentryEvent("transaction",e),e);this.captureSpan=e=>(this.logSentryEvent("span",e),e);this.captureEvent=e=>(this.logSentryEvent("event",e),e);this.captureLog=e=>(this.logSentryEvent("console",{message:e.message||"Log entry",level:e.level,category:"console",timestamp:e.timestamp,...e.attributes}),e);this.captureBreadcrumb=e=>{let t="unknown";try{let r=globalThis.getCurrentPathname;r&&(t=r())}catch{}let a=e.category;if(e.message?.toLowerCase().includes("ignore"))return null;if(e.message?.includes("Touch event within element:")&&(e.message=e.message.replace("Touch event within element:","")),a==="navigation"&&e.data?.from&&e.data?.to&&(e.message=`From ${e.data.from} To ${e.data.to}`),a==="touch"&&e.data?.path){e.message&&(e.message=e.message.trim());let r={...e.data,category:a,message:e.message,route:t,timestamp:new Date().toISOString(),path:e.message?[{label:e.message}]:e.data?.path};e.data=r}return this.logSentryEvent("breadcrumb",e),e}}logSentryEvent(e,t){let a="Generic",r=t.category;if(r)switch(r){case"touch":a="Touch";break;case"xhr":case"fetch":case"http":a="HTTP Request";break;case"navigation":a="Navigation";break;case"auth":a="Auth";break;case"console":a="System";break;case"debug":a="Debug";break;default:r.startsWith("ui.")?a="User Action":r.startsWith("replay.")?a="Replay":r.includes("redux")||r.includes("state")?a="State":a="Custom"}let s={id:sp(),timestamp:Date.now(),level:this.getSentryLevel(t),message:this.getSentryMessage(t),metadata:this.getSentryMetadata(t),type:a};Sr(s)}getSentryLevel(e){switch(e.level){case"fatal":case"error":return"error";case"warning":return"warn";case"info":return"info";case"debug":return"debug";default:return"log"}}getSentryMessage(e){let t=e.message;return typeof t=="string"?t:`${e.type||"Unknown"} Event`}getSentryMetadata(e){let{message:t,level:a,type:r,...s}=e;return s}},op=new Cr;import{useState as ia,useEffect as wr}from"react";import{jsx as _,jsxs as Pe}from"react/jsx-runtime";var bt=ke.bubble.settings(),xr=ke.bubble.userPreferences(),na={showEnvironment:true,showQueryButton:true,showWifiToggle:true,showEnvButton:false,showSentryButton:false,showStorageButton:false};function ip({onPress:e}){let[t,a]=ia(na);wr(()=>{r()},[]);let r=async()=>{try{let s=await W.getItem(bt);s&&a(JSON.parse(s))}catch(s){console.error("Failed to load bubble settings:",s)}};return _(Ga,{id:"bubble-settings",title:"SETTINGS",subtitle:`${Object.values(t).filter(Boolean).length}/6 visible`,icon:Ft,iconColor:"#10B981",iconBackgroundColor:"rgba(16, 185, 129, 0.1)",onPress:e||(()=>{}),index:5})}function np({onSettingsChange:e}){let[t,a]=ia(na),[r,s]=ia(true);wr(()=>{o()},[]);let o=async()=>{try{let c=await W.getItem(bt);c&&a(JSON.parse(c))}catch(c){console.error("Failed to load bubble settings:",c)}finally{s(false)}},n=async c=>{try{await W.setItem(bt,JSON.stringify(c)),a(c),e?.(c)}catch(p){console.error("Failed to save bubble settings:",p)}},i=async c=>{let p={...t,[c]:!t[c]};try{let b=await W.getItem(xr),h=b?JSON.parse(b):{},m=c.replace("show","hasSet"),v={...h,[m]:true};await W.setItem(xr,JSON.stringify(v))}catch(b){console.error("Failed to save user preference marker:",b)}n(p)};if(r)return _(T,{style:A.detailContainer,children:_(H,{style:A.loadingText,children:"Loading settings..."})});let l=[{key:"showEnvironment",label:"Environment Indicator",description:"Shows current environment (dev, staging, prod)",icon:_(T,{style:[A.indicator,{backgroundColor:"#10B981"}]})},{key:"showQueryButton",label:"React Query Button",description:"Opens React Query dev tools",icon:_(T,{style:[A.indicator,{backgroundColor:"#F59E0B"}]})},{key:"showWifiToggle",label:"WiFi",description:"Toggle WiFi for testing offline scenarios",icon:_(T,{style:[A.indicator,{backgroundColor:"#8B5CF6"}]})},{key:"showEnvButton",label:"Environment Variables",description:"View and check environment variables",icon:_(Ft,{size:16,color:"#10B981"})},{key:"showSentryButton",label:"Sentry Events",description:"View captured Sentry events and errors",icon:_(T,{style:[A.indicator,{backgroundColor:"#a855f7"}]})},{key:"showStorageButton",label:"Storage Browser",description:"Browse and inspect AsyncStorage data",icon:_(qa,{size:16,color:"#3B82F6"})}];return _(T,{style:A.detailContainer,children:Pe(Ig,{showsVerticalScrollIndicator:false,contentContainerStyle:A.scrollContent,"sentry-label":"ignore bubble settings scroll",children:[Pe(T,{style:A.header,children:[_(H,{style:A.headerTitle,children:"Developer Tools Settings"}),_(H,{style:A.headerDescription,children:"Configure bubble button visibility"})]}),_(T,{style:A.sectionDivider,children:_(H,{style:A.sectionTitle,children:"Bubble Button Visibility"})}),_(T,{style:A.settingsList,children:l.map(c=>Pe(T,{style:A.settingItem,children:[_(T,{style:A.settingIconContainer,children:c.icon}),Pe(T,{style:A.settingContent,children:[_(H,{style:A.settingLabel,children:c.label}),_(H,{style:A.settingDescription,children:c.description})]}),_(Eg,{"sentry-label":"ignore bubble settings section",value:t[c.key],onValueChange:()=>i(c.key),trackColor:{false:"#4B5563",true:"#10B981"},thumbColor:t[c.key]?"#fff":K.textSecondary})]},c.key))}),Pe(T,{style:A.footer,children:[Pe(T,{style:A.noteContainer,children:[_(Ja,{size:16,color:K.textSecondary}),_(H,{style:A.noteText,children:"User status indicator is always visible and cannot be disabled"})]}),_(H,{style:A.restartNote,children:"Changes are saved automatically and will persist across app restarts"})]})]})})}async function lp(){try{let e=await W.getItem(bt);if(e)return JSON.parse(e)}catch(e){console.error("Failed to load bubble settings:",e)}return na}var A=Ue.create({scrollContent:{flexGrow:1},sectionCard:{backgroundColor:K.input,borderRadius:8,padding:16,flexDirection:"row",alignItems:"center",marginBottom:12},iconContainer:{width:36,height:36,borderRadius:8,backgroundColor:"rgba(16, 185, 129, 0.1)",justifyContent:"center",alignItems:"center",marginRight:12},textContainer:{flex:1},title:{color:K.text,fontSize:14,fontWeight:"600",marginBottom:2},subtitle:{color:K.textSecondary,fontSize:12},chevron:{color:ct.text.icon,fontSize:20},detailContainer:{flex:1,backgroundColor:K.card},loadingText:{color:K.textSecondary,fontSize:14,textAlign:"center",marginTop:20},header:{padding:16,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.2)"},headerTitle:{color:K.text,fontSize:16,fontWeight:"600",marginBottom:4},headerDescription:{color:K.textSecondary,fontSize:12},settingsList:{padding:16},settingItem:{flexDirection:"row",alignItems:"center",paddingVertical:12,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.1)"},settingIconContainer:{width:32,height:32,justifyContent:"center",alignItems:"center",marginRight:12},settingContent:{flex:1,marginRight:12},settingLabel:{color:K.text,fontSize:14,fontWeight:"500",marginBottom:2},settingDescription:{color:ct.text.icon,fontSize:11},indicator:{width:8,height:8,borderRadius:4},footer:{padding:16,borderTopWidth:1,borderTopColor:"rgba(128, 128, 128, 0.2)"},noteContainer:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},noteText:{color:K.textSecondary,fontSize:12,flex:1},restartNote:{color:ct.text.icon,fontSize:11,fontStyle:"italic"},sectionDivider:{paddingHorizontal:16,paddingVertical:8,marginTop:8,borderTopWidth:1,borderTopColor:"rgba(128, 128, 128, 0.12)"},sectionTitle:{color:K.textSecondary,fontSize:12,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase"}});function Tr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function cp(e,t,a={}){let r=a.storage??W,s=a.parse??(l=>JSON.parse(l)),o=a.serialize??(l=>JSON.stringify(l));function n(l){let c=Tr(t)&&Tr(l)?{...t,...l}:l;return a.sanitize?a.sanitize(c,l):c}async function i(){try{let l=await r.getItem(e);return l==null||l===""?null:n(s(l))}catch{return null}}return{key:e,defaults:t,loadOrNull:i,async load(){return await i()??t},async save(l){try{await r.setItem(e,o(l))}catch{}},async clear(){try{await r.removeItem(e)}catch{}}}}import{callCapacitorNative as kr,hasCapacitorPlugin as up,isCapacitorNative as dp}from"@buoy-gg/license/web";function hp(){return!dp()||!up("Preferences")?null:{async getAllKeys(){let{keys:e}=await kr("Preferences","keys");return Array.isArray(e)?e:[]},async multiRemove(e){await Promise.all(e.map(t=>kr("Preferences","remove",{key:t})))}}}import{callCapacitorNative as gp,hasCapacitorPlugin as fp,isCapacitorNative as pp}from"@buoy-gg/license/web";import{useEffect as mp,useId as bp,useRef as Ir,useState as yp}from"react";import{createPortal as vp}from"react-dom";import{jsx as Xe,jsxs as Sp}from"react/jsx-runtime";function Er(){let[e,t]=yp(false),a=Ir(null),r=Ir(null),s=bp(),o=(n=true)=>{t(false),n&&a.current?.querySelector('[data-account-launcher] [role="button"]')?.focus({preventScroll:true})};return mp(()=>{if(!e)return;r.current?.focus({preventScroll:true});let n=l=>{l.target instanceof Node&&!a.current?.contains(l.target)&&t(false)},i=l=>{l.key==="Escape"&&(l.preventDefault(),l.stopPropagation(),t(false),a.current?.querySelector('[data-account-launcher] [role="button"]')?.focus({preventScroll:true}))};return document.addEventListener("pointerdown",n),document.addEventListener("keydown",i),()=>{document.removeEventListener("pointerdown",n),document.removeEventListener("keydown",i)}},[e]),typeof document>"u"?null:vp(Sp("div",{ref:a,"data-buoy-account":"",style:{position:"fixed",right:"max(16px, env(safe-area-inset-right))",bottom:"max(20px, env(safe-area-inset-bottom))",zIndex:99999,colorScheme:"dark",fontFamily:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},children:[Xe("style",{children:`
|
|
1
|
+
"use client";import{a as Vr,b as Yr,c as qr,d as Jr,e as Kr,f as Qr,g as Xr,h as Zr,i as es}from"./chunks/chunk-BZTGYXMT.mjs";import{a as ts,b as as,c as rs,d as ss,e as ns,f as os,g as is,h as ls}from"./chunks/chunk-E2MI3FII.mjs";import{$ as cs,A as us,B as ds,C as hs,D as gs,E as ps,F as fs,G as bs,J as ms,K as ys,L as vs,M as Ss,N as Cs,O as ws,P as xs,Q as Ts,R as ks,S as Is,Z as _s,_ as Es,a as Ia,b as Os,c as As,d as $e,e as Rs,f as Ls,g as _a,h as Ps,i as $s,j as Ms,k as Bs,l as Ns,m as It,n as Ds,o as zs,p as Ws,q as js,r as Fs,s as Hs,t as Us,u as Gs,v as Vs,w as Ys,x as qs,y as Js,z as Ks}from"./chunks/chunk-ASHW3TI7.mjs";import"./chunks/chunk-LZ7FZZ7R.mjs";import{a as Qs,d as Xs,f as _t}from"./chunks/chunk-53J2FMUD.mjs";import{$ as Zs,$a as en,$b as tn,A as an,Aa as rn,Ab as sn,Ac as nn,B as on,Ba as ln,Bb as cn,Bc as un,C as dn,Ca as hn,Cb as Ea,Cc as gn,D as pn,Da as fn,Db as bn,Dc as Oa,E as mn,Ea as yn,Eb as vn,Ec as Sn,F as Cn,Fa as wn,Fb as xn,Fc as Tn,G as kn,Ga as In,Gb as _n,Gc as En,H as On,Ha as An,Hb as Rn,I as Ln,Ia as Pn,Ib as $n,J as Aa,Ja as Mn,Jb as Bn,K as Nn,Ka as Dn,Kb as zn,L as Wn,La as jn,Lb as Fn,M as Hn,Ma as Un,Mb as Gn,N as Vn,Na as Yn,Nb as qn,O as Jn,Oa as Kn,Ob as Qn,P as Xn,Pa as Zn,Pb as eo,Q as to,Qa as ao,Qb as ro,R as so,Ra as no,Rb as oo,S as io,Sa as lo,Sb as co,T as uo,Ta as ho,Tb as go,U as po,Ua as fo,Ub as bo,V as mo,Va as yo,Vb as vo,W as So,Wa as Co,Wb as wo,X as xo,Xa as To,Xb as ko,Y as Io,Ya as _o,Yb as Eo,Z as Oo,Za as Ao,Zb as Ro,_ as Lo,_a as Po,_b as $o,a as Mo,aa as Bo,ab as No,ac as Do,b as zo,ba as Wo,bb as jo,bc as Fo,c as Ho,ca as Uo,cb as Go,cc as Vo,d as Yo,da as qo,db as Jo,dc as Ko,e as Qo,ea as Xo,eb as Zo,ec as ei,f as ti,fa as ai,fb as ri,fc as si,g as ni,ga as oi,gb as ii,gc as li,h as ci,ha as ui,hb as di,hc as hi,i as Ra,ia as gi,ib as pi,ic as fi,j as bi,ja as mi,jb as yi,jc as vi,k as Si,ka as Ci,kb as wi,kc as xi,l as Ti,la as ki,lb as Ii,lc as _i,m as Ei,ma as Oi,mb as Ai,mc as Ri,n as Li,na as Pi,nb as $i,nc as Mi,o as Bi,oa as Ni,ob as Di,oc as zi,p as ie,pa as Wi,pb as ji,pc as Fi,q as Y,qa as Hi,qb as Ui,qc as Gi,r as Ce,ra as Vi,rb as Yi,rc as qi,s as Me,sa as Ji,sb as Ki,sc as Qi,t as La,ta as Xi,tb as Zi,tc as el,u as tl,ua as al,ub as rl,uc as sl,v as nl,va as ol,vb as il,vc as ll,w as cl,wa as ul,wb as dl,wc as hl,x as gl,xa as pl,xb as fl,xc as bl,y as ml,ya as yl,yb as vl,yc as Et,z as Sl,za as Cl,zb as Pa,zc as wl}from"./chunks/chunk-SYU4BFQR.mjs";import{a as xl}from"./chunks/chunk-GF364FIK.mjs";import{a as Tl,b as kl,c as Il,d as _l,e as El,f as Ol,g as Al,h as Rl,i as Ll,j as Pl,k as $l,l as Ml,m as Bl,n as Nl,o as Dl,p as zl}from"./chunks/chunk-4IM4VIMP.mjs";import{a as c,b as $a}from"./chunks/chunk-GF5C5DVX.mjs";import{a as Wl,b as jl}from"./chunks/chunk-NVD5LLXD.mjs";import{a as Fl,b as Hl,c as Ul,d as Gl,e as Vl,f as Yl,g as ql,h as Jl,i as Kl,j as Ql,k as Xl,l as Zl}from"./chunks/chunk-UYWHGSA7.mjs";import{$ as ec,$a as tc,$b as Ma,$c as ac,Aa as rc,Ab as sc,Ac as nc,B as oc,Ba as ic,Bb as lc,Bc as cc,C as uc,Ca as dc,Cb as hc,Cc as gc,D as pc,Da as fc,Db as bc,Dc as mc,E as yc,Ea as vc,Eb as Sc,Ec as Cc,Fa as wc,Fb as xc,Fc as Tc,Ga as kc,Gb as Ic,Gc as Ot,H as _c,Ha as Ec,Hb as Oc,Hc as Ac,Ia as Rc,Ib as Lc,Ic as Pc,J as $c,Ja as Mc,Jb as Bc,Jc as Nc,Ka as Dc,Kb as zc,Kc as Wc,La as jc,Lb as Fc,Lc as Hc,Ma as Uc,Mb as Gc,Mc as Vc,N as Yc,Na as qc,Nb as Jc,Nc as Kc,O as Qc,Oa as Xc,Ob as Zc,Oc as eu,P as tu,Pa as au,Pb as ru,Pc as su,Q as nu,Qa as ou,Qb as iu,Qc as lu,R as cu,Ra as uu,Rb as du,Rc as hu,S as gu,Sa as pu,Sb as fu,Sc as bu,T as mu,Ta as yu,Tb as vu,Tc as Su,U as Cu,Ua as wu,Ub as Ba,Uc as xu,V as Tu,Va as ku,Vb as Iu,Vc as _u,W as Eu,Wa as Ou,Wb as Au,Wc as Ru,X as Lu,Xa as Pu,Xb as $u,Xc as Mu,Y as Bu,Ya as Nu,Yb as Du,Yc as zu,Z as Wu,Za as ju,Zb as Fu,Zc as Hu,_ as Uu,_a as Gu,_b as Vu,_c as Yu,a as qu,aa as Ju,ab as Ku,ac as Qu,ad as Xu,b as Zu,ba as ed,bb as td,bc as ad,bd as rd,c as sd,ca as nd,cb as od,cc as id,cd as ld,d as cd,da as ud,db as dd,dc as Na,dd as hd,e as gd,ea as pd,eb as fd,ec as bd,ed as md,f as yd,fa as vd,fb as Sd,fc as Cd,fd as wd,g as xd,ga as Td,gb as kd,gc as Id,gd as _d,h as Ed,ha as Od,hb as Ad,hc as Rd,hd as Ld,i as Pd,ia as $d,ib as Md,ic as Bd,id as Nd,j as Dd,ja as zd,jb as Wd,jc as jd,jd as Fd,k as Hd,ka as Ud,kb as Gd,kc as Vd,kd as Yd,l as qd,la as Jd,lb as Kd,lc as Qd,ld as Xd,m as Zd,ma as eh,mb as th,mc as ah,md as rh,n as sh,na as nh,nb as oh,nc as ih,nd as lh,o as ch,oa as uh,ob as dh,oc as hh,od as gh,p as ph,pa as fh,pb as bh,pc as mh,pd as yh,q as vh,qa as Sh,qb as Ch,qc as wh,qd as xh,r as Th,ra as kh,rb as Ih,rc as _h,rd as Eh,s as Oh,sa as Ah,sb as Rh,sc as Lh,sd as Ph,t as $h,ta as Mh,tb as Bh,tc as Nh,u as Dh,ua as zh,ub as Wh,uc as jh,va as Fh,vb as Hh,vc as Uh,wa as Gh,wb as Vh,wc as Yh,xa as qh,xb as Jh,xc as Kh,ya as Qh,yb as Xh,yc as Zh,za as eg,zb as tg,zc as ag}from"./chunks/chunk-L7OYS724.mjs";import{a as tt,d as w,e as rg,f as G,g as sg}from"./chunks/chunk-CE5U3CSQ.mjs";import{a as ng,b as og,c as ig,d as lg,e as cg}from"./chunks/chunk-QNLAFQET.mjs";import{a as me,b as ug,c as dg,d as W,e as hg,f as gg}from"./chunks/chunk-FP44YK4E.mjs";import{H as pg,J as Be,a as T,b as z,d as at,g as fg,h as bg,j as mg,r as At}from"./chunks/chunk-3UTMGIUG.mjs";import"./chunks/chunk-L63X3LPR.mjs";var yg=class extends Ia{constructor(e){super();this.events=[];this.arrayListeners=new Set;this.captureSuppressed=false;this.clearListeners=new Set;this.maxEvents=e.maxEvents??500,this.storeName=e.storeName,Promise.resolve().then(()=>{let t=()=>{ie().status==="locked"?(this.stopCapturing(),this.events=[],this.notifyArrayListeners()):this.getTotalSubscriberCount()>0&&!this.captureSuppressed&&!this.isCapturing()&&this.startCapturing()};Me(t),t()})}onSubscribe(){this.getTotalSubscriberCount()===1&&!this.captureSuppressed&&ie().status!=="locked"&&this.startCapturing(),$e(this.storeName)}onUnsubscribe(){this.getTotalSubscriberCount()===0&&this.stopCapturing(),$e(this.storeName)}getTotalSubscriberCount(){return this.listeners.size+this.arrayListeners.size}subscribeToEvents(e){let t=this.getTotalSubscriberCount()===0;return this.arrayListeners.add(e),t&&!this.captureSuppressed&&ie().status!=="locked"&&this.startCapturing(),$e(this.storeName),e(this.getEvents()),()=>{this.arrayListeners.delete(e),this.getTotalSubscriberCount()===0&&this.stopCapturing(),$e(this.storeName)}}onEvent(e){return this.subscribe(e)}addEvent(e){ie().status!=="locked"&&(this.events=[e,...this.events].slice(0,this.maxEvents),Y()&&this.notify(e),this.notifyArrayListeners())}notifyArrayListeners(){let e=this.getEvents();this.arrayListeners.forEach(t=>{try{t(e)}catch{}})}getEvents(){return Y()?this.events:[]}getEventCount(){return Y()?this.events.length:0}clearEvents(){this.events=[],this.notifyArrayListeners(),this.clearListeners.forEach(e=>{try{e()}catch{}})}onClear(e){return this.clearListeners.add(e),()=>{this.clearListeners.delete(e)}}disableCapture(){this.captureSuppressed=true,this.isCapturing()&&this.stopCapturing()}replaceEvents(e){this.events=this.dedupeById(e).slice(0,this.maxEvents),this.notifyArrayListeners()}dedupeById(e){let t=new Set,a=[];for(let r of e){let n=r?.id;if(n==null){a.push(r);continue}t.has(n)||(t.add(n),a.push(r))}return a}setMaxEvents(e){this.maxEvents=e,this.events.length>e&&(this.events=this.events.slice(0,e),this.notifyArrayListeners())}getSubscriberCounts(){return{eventCallbacks:this.listeners.size,arrayListeners:this.arrayListeners.size,total:this.getTotalSubscriberCount()}}};import{useEffect as vg,useMemo as Sg,useState as Cg}from"react";var wg=[{value:"buoy.gg/api/license",mode:"contains"},{value:"api.keygen.sh",mode:"contains"}];function Da(e,t){let a=e.toLowerCase(),r=t.value.toLowerCase();if(t.mode==="contains")return a.includes(r);try{let n=new URL(e);return r.startsWith("/")?n.pathname.toLowerCase()===r:r.startsWith("http://")||r.startsWith("https://")?`${n.origin}${n.pathname}`.toLowerCase()===r:n.host.toLowerCase()===r}catch{return a===r}}function xg(e,t){return!e||t.length===0?false:t.some(a=>Da(e,a))}var za=wg;function Wa(e){if(!Array.isArray(e))return[];let t=[];for(let a of e)if(typeof a=="string"&&a.trim())t.push({value:a,mode:"contains"});else if(a&&typeof a=="object"&&typeof a.value=="string"){let r=a;t.push({value:r.value,mode:r.mode==="exact"?"exact":"contains"})}return t}function ja(e){let t=[...e];for(let a of za)t.some(r=>r.value===a.value)||t.push({...a});return t}var Tg=class{constructor(){this.patterns=ja(za.map(e=>({...e})));this.teamPatterns=[];this.merged=this.patterns;this.listeners=new Set;this.loaded=false;this.loadPromise=null;this.dirty=false}getPatterns(){return this.merged}isTeamOnly(e){return!this.patterns.some(t=>t.value===e)&&this.teamPatterns.some(t=>t.value===e)}setTeamPatterns(e){this.teamPatterns=Wa(e),this.remerge(),this.emit()}reload(){return this.loaded=false,this.loadPromise=null,this.dirty=false,this.ensureLoaded()}remerge(){let e=this.teamPatterns.filter(t=>!this.patterns.some(a=>a.value===t.value));this.merged=e.length>0?[...this.patterns,...e]:this.patterns}subscribe(e){return this.listeners.add(e),this.ensureLoaded(),()=>{this.listeners.delete(e)}}emit(){this.listeners.forEach(e=>e())}ensureLoaded(){return this.loaded?Promise.resolve():this.loadPromise?this.loadPromise:(this.loadPromise=(async()=>{try{let e=await W.getItem(me.network.ignoredDomains());if(e&&!this.dirty){let t=ja(Wa(JSON.parse(e)));this.patterns=t,this.remerge()}}catch{}finally{this.loaded=true,this.emit()}})(),this.loadPromise)}persist(){W.setItem(me.network.ignoredDomains(),JSON.stringify(this.patterns)).catch(()=>{})}commit(e){this.dirty=true,this.patterns=e,this.remerge(),this.emit(),this.persist()}add(e){let t=e.value.trim();t&&(this.patterns.some(a=>a.value===t)||this.commit([...this.patterns,{value:t,mode:e.mode}]))}remove(e){this.patterns.some(t=>t.value===e)&&this.commit(this.patterns.filter(t=>t.value!==e))}toggle(e){let t=e.trim();t&&this.commit(this.patterns.some(a=>a.value===t)?this.patterns.filter(a=>a.value!==t):[...this.patterns,{value:t,mode:"contains"}])}toggleMode(e){this.patterns.some(t=>t.value===e)&&this.commit(this.patterns.map(t=>t.value===e?{...t,mode:t.mode==="contains"?"exact":"contains"}:t))}},K=new Tg,kg=e=>K.add(e),Ig=e=>K.remove(e),_g=e=>K.toggle(e),Eg=e=>K.toggleMode(e),Og=e=>K.isTeamOnly(e);function Ag(){let[e,t]=Cg(()=>K.getPatterns());vg(()=>K.subscribe(()=>{t(K.getPatterns())}),[]);let a=Sg(()=>new Set(e.map(r=>r.value)),[e]);return{patterns:e,values:a,add:kg,remove:Ig,toggle:_g,toggleMode:Eg,isTeamOnly:Og}}import{useSyncExternalStore as Rg}from"react";var rt={},Rt=new Map,Lt=new Set,Ne=[];function Lg(e){if(!e)return Ne;try{let t=JSON.parse(e);if(!Array.isArray(t))return Ne;let a=t.map(r=>typeof r=="string"?r:r&&typeof r.value=="string"?r.value:"").map(r=>r.trim()).filter(Boolean);return a.length?[...new Set(a)]:Ne}catch{return Ne}}var st={set(e){Object.keys({...rt,...e}).some(t=>rt[t]!==e[t])&&(rt=e,Rt.clear(),Lt.forEach(t=>t()))},getList(e){let t=Rt.get(e);return t||(t=Lg(rt[e]),Rt.set(e,t)),t},subscribe(e){return Lt.add(e),()=>Lt.delete(e)}};function Pg(e){return Rg(st.subscribe,()=>st.getList(e),()=>Ne)}function $g(e){typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):setTimeout(e,0)}function Mg(e){let t=e.id,a=e.order??"append",r=e.coalesce??"sync",n=e.flushMinIntervalMs??150,s=e.max,o=[],i=false,l=e.firstId??1,d=0,b=false,y=[],p=false;function m(){p||(p=true,Me(()=>{ie().status==="locked"&&(o=[]),V()}))}let S=new Set,_=new Set;function F(){for(let v of S)try{v()}catch{}}function V(){if(r==="sync"){F();return}b||(b=true,$g(()=>{b=false,F()}))}function M(v){return v.length<=s?v:a==="append"?v.slice(v.length-s):v.slice(0,s)}return{id:t,subscribe(v){return m(),S.add(v),()=>{S.delete(v)}},getSnapshot(){return m(),Y()?o:y},size(){return Y()?o.length:0},add(v){m(),!(i||ie().status==="locked")&&(a==="append"?o=o.length>=s?[...o.slice(o.length-s+1),v]:[...o,v]:o=o.length>=s?[v,...o.slice(0,s-1)]:[v,...o],V())},set(v){m(),Y()&&(o=M(v),V())},update(v){m(),ie().status!=="locked"&&(o=M(v(o)),V())},clear(){for(let v of _)try{v()}catch{}o.length!==0&&(o=[],V())},onClear(v){return _.add(v),()=>{_.delete(v)}},notify(){V()},flushSync(v=false){let ae=Date.now();if(!(!v&&ae-d<n)){d=ae;try{let P=globalThis.__buoyFlushToolSync;if(!P)return;for(let Ge of P)Ge(t)}catch{}}},setPaused(v){i=v},isPaused(){return i},setMax(v){s=v;let ae=M(o);ae!==o&&(o=ae,V())},getMax(){return s},allocId(){return l++},bumpIdAbove(v){v+1>l&&(l=v+1)},listenerCount(){return S.size}}}var Bg=class{constructor(e={}){this.items=[];this.itemListeners=new Set;this.clearListeners=new Set;this.idCounter=0;this.enabled=true;this.captureSuppressed=false;this.max=e.max??200}canRecord(){return this.enabled&&!this.captureSuppressed}nextId(){return`${Date.now()}-${++this.idCounter}`}push(e){this.items=[e,...this.items].slice(0,this.max)}record(e){this.push(e),this.notifyListeners()}setItems(e){this.items=e.slice(0,this.max),this.notifyListeners()}getAll(){return[...this.items]}getById(e){return this.items.find(t=>t.id===e)}get size(){return this.items.length}clear(){this.items=[],this.notifyListeners(),this.clearListeners.forEach(e=>{try{e()}catch{}})}onClear(e){return this.clearListeners.add(e),()=>{this.clearListeners.delete(e)}}disableCapture(){this.captureSuppressed=true}isCaptureSuppressed(){return this.captureSuppressed}replaceAll(e){return this.enabled?(this.setItems(e),true):false}hydrateById(e,t){let a=this.items.findIndex(r=>r.id===e);a!==-1&&(this.items=[...this.items.slice(0,a),{...this.items[a],...t},...this.items.slice(a+1)],this.notifyListeners())}setEnabled(e){this.enabled=e}getEnabled(){return this.enabled}setMax(e){this.max=e,this.items.length>e&&(this.items=this.items.slice(0,e),this.notifyListeners())}getMax(){return this.max}subscribe(e){return this.itemListeners.add(e),()=>{this.itemListeners.delete(e)}}notifyListeners(){let e=this.getAll();this.itemListeners.forEach(t=>t(e))}get listenerCount(){return this.itemListeners.size}};var ye=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Ng=["id","lineId","key","uuid","_id","slug","name"];function Pt(e){if(!e.length||!e.every(ye))return;let t=e[0];for(let a of Ng){if(!(a in t))continue;let r=e.map(n=>n[a]);if(r.every(n=>typeof n=="string"||typeof n=="number")&&new Set(r.map(String)).size===r.length)return a}}function Dg(e,t,a,r){let n=r[t];return typeof n=="string"||typeof n=="number"?String(n)!==a?{ok:false,error:`The new item is addressed as \`${a}\` but carries \`${t}\`: ${JSON.stringify(n)}. Use the same value for both \u2014 address it by the id it carries.`}:{ok:true,value:n}:e.every(s=>typeof s[t]=="number")&&a.trim()!==""&&String(Number(a))===a?{ok:true,value:Number(a)}:{ok:true,value:a}}function $t(e,t,a="",r=[]){if(Array.isArray(e)&&ye(t)){let n=Pt(e);if(!n)return{patch:t,notes:r};let s=new Map(e.map(b=>[String(b[n]),b])),o=e.slice(),i=0,l=0,d=0;for(let[b,y]of Object.entries(t)){let p=o.findIndex(m=>String(m[n])===b);if(y===null){if(p===-1)return{patch:t,notes:r};o.splice(p,1),i++}else if(p===-1){if(!ye(y))return{patch:t,notes:r};let m=Dg(e,n,b,y);if(!m.ok)return{patch:t,notes:r,error:m.error};o.push({...y,[n]:m.value}),d++}else{let m=$t(s.get(b),y,`${a}[${b}]`,r);if(m.error)return{patch:t,notes:r,error:m.error};let S=o[p];o[p]=ye(S)&&ye(m.patch)?{...S,...m.patch}:m.patch,l++}}return r.push(`${a||"(root)"}: addressed by \`${n}\` \u2014 ${l} changed, ${d} added, ${i} removed, ${o.length} item(s) remain`),{patch:o,notes:r}}if(ye(e)&&ye(t)){let n={};for(let[s,o]of Object.entries(t)){let i=a?`${a}.${s}`:s;if(!(s in e)){n[s]=o;continue}let l=$t(e[s],o,i,r);if(l.error)return{patch:t,notes:r,error:l.error};n[s]=l.patch}return{patch:n,notes:r}}return{patch:t,notes:r}}var nt=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function De(e,t=0){if(e===null)return"null";if(Array.isArray(e)){if(!e.length)return"unknown[]";if(t>=3)return"\u2026[]";let r=De(e[0],t+1);return r.includes(" ")||r.endsWith("]")?`(${r})[]`:`${r}[]`}if(nt(e)){if(t>=3)return"{\u2026}";let r=Object.keys(e),n=r.slice(0,24),s=n.map(i=>`${i}: ${De(e[i],t+1)}`).join(", "),o=r.length>n.length?`, +${r.length-n.length} more`:"";return`{${s}${o}}`}let a=typeof e;return a==="undefined"?"undefined":a==="function"?"function":a}function we(e,t="",a=[],r=0,n={visited:0}){if(r>3||a.length>=40||n.visited>=600)return a;if(Array.isArray(e)){let s=e[0];if(a.push({path:t||"(root)",length:e.length,...e.length?{item:De(s)}:{}}),e.length&&nt(s))for(let[o,i]of Object.entries(s)){if(++n.visited>=600)break;we(i,t?`${t}[].${o}`:`[].${o}`,a,r+1,n)}return a}if(nt(e))for(let[s,o]of Object.entries(e)){if(++n.visited>=600)break;we(o,t?`${t}.${s}`:s,a,r+1,n)}return a}function zg(e){let t={visited:0};return we(e,"",[],0,t).length>=40||t.visited>=600}function Wg(e){return we(e).filter(t=>t.item===void 0).map(t=>t.path)}function jg(e){if(e===void 0)return;let t=we(e),a=De(e);if(!(!t.length&&!nt(e)&&!Array.isArray(e)))return t.length?{shape:a,lists:t}:{shape:a}}var ee=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function Fg(e,t,a=2e3){let r=[{node:e,path:""}],n=0;for(;r.length&&n<a;){let{node:s,path:o}=r.shift();if(n++,Array.isArray(s))s.slice(0,20).forEach((i,l)=>r.push({node:i,path:`${o}[${l}]`}));else if(ee(s))for(let[i,l]of Object.entries(s)){let d=o?`${o}.${i}`:i;if(i===t)return d;(ee(l)||Array.isArray(l))&&r.push({node:l,path:d})}}}function Fa(e,t,a,r,n){let s=Fg(e,n??a),o=r.slice(0,12).join(", ")||"(no fields)";return s?`No field "${a}" at "${t}" \u2014 did you mean path "${s}"? "${t}" has: ${o}.`:`No field "${a}" at "${t}". It has: ${o}.`}function Ha(e,t){let a=e;for(let r of t.split(".")){if(!ee(a))return;a=a[r]}return a}function Mt(e){if(!e.trim())return;let t=[],a=0;for(;a<e.length;){if(e[a]==="."){a++;continue}if(e[a]==="["){let s=e.indexOf("]",a);if(s===-1)return;let o=e.slice(a+1,s);if(/^\d+$/.test(o))t.push({kind:"index",index:Number(o)});else{let i=o.indexOf("=");if(i<=0)return;t.push({kind:"match",field:o.slice(0,i).trim(),value:o.slice(i+1).trim()})}a=s+1;continue}let r=a;for(;r<e.length&&e[r]!=="."&&e[r]!=="[";)r++;let n=e.slice(a,r);if(!n)return;t.push({kind:"key",key:n}),a=r}return t.length?t:void 0}function Hg(e,t){let a=Mt(t);if(!a)return{ok:false,error:`Could not read the path "${t}". Use dotted keys with optional [0] or [field=value], like "item.name" or "lines[lineId=seed-1].qty".`};let r=e,n=[];for(let s of a){if(r==null)return{ok:false,error:`"${n.join(".")||"(root)"}" is ${r===null?"null":"not set"}, so there is nothing at "${t}".`};if(s.kind==="key"){if(!ee(r))return{ok:false,error:`"${n.join(".")||"(root)"}" is not an object, so it has no field "${s.key}".`};if(!(s.key in r)){let o=a[a.length-1];return{ok:false,error:Fa(e,n.join(".")||"(root)",s.key,Object.keys(r),o?.kind==="key"?o.key:void 0)}}r=r[s.key],n.push(s.key)}else if(s.kind==="index"){if(!Array.isArray(r))return{ok:false,error:`"${n.join(".")||"(root)"}" is not a list, so [${s.index}] means nothing.`};r=r[s.index],n.push(`[${s.index}]`)}else{if(!Array.isArray(r))return{ok:false,error:`"${n.join(".")||"(root)"}" is not a list, so [${s.field}=${s.value}] means nothing.`};let o=r.find(i=>ee(i)&&String(Ha(i,s.field))===s.value);if(o===void 0)return{ok:false,error:`No item with ${s.field}="${s.value}" in "${n.join(".")||"(root)"}".`};r=o,n.push(`[${s.field}=${s.value}]`)}}return{ok:true,value:r}}function Ug(e,t,a){let r=Mt(t);if(!r)return{ok:false,error:`Could not read the path "${t}". Use dotted keys with optional [0] or [field=value], like "item.name" or "lines[lineId=seed-1].qty".`};if(r[0]?.kind!=="key")return{ok:false,error:`A path must start with a field name, not a list index \u2014 "${t}" does not say which list.`};let n=(o,i)=>{if(i>=r.length)return{ok:true,patch:a};let l=r[i];if(l.kind==="key"){if(ee(o)&&!(l.key in o)&&i+1<r.length){let F=r[r.length-1];return{ok:false,error:Fa(e,ze(r,i),l.key,Object.keys(o),F?.kind==="key"?F.key:void 0)}}let S=ee(o)?o[l.key]:void 0,_=n(S,i+1);return _.ok?{ok:true,patch:{[l.key]:_.patch}}:_}if(!Array.isArray(o))return{ok:false,error:`"${ze(r,i)}" is not a list, so "${t}" cannot be resolved. Read it first \u2014 \`shape\` on the read says what each field holds.`};let d=l.kind==="index"?l.index:o.findIndex(S=>ee(S)&&String(Ha(S,l.field))===l.value),b=d>=0?o[d]:void 0;if(l.kind==="index"?d<0||d>=o.length:d<0)return{ok:false,error:l.kind==="index"?`"${ze(r,i)}" has ${o.length} item(s), so there is nothing at [${l.index}].`:`No item with ${l.field}="${l.value}" in "${ze(r,i)}".`};if(!ee(b)){if(i<r.length-1)return{ok:false,error:`"${ze(r,i)}[${l.kind==="index"?l.index:`${l.field}=${l.value}`}]" holds ${b===null?"null":typeof b}, not an object, so "${t}" cannot go any deeper. Set the item itself.`};let S=o.slice();return S[d]=a,{ok:true,patch:S}}let y=n(b,i+1);if(!y.ok)return y;let p=Pt(o);if(p)return{ok:true,patch:{[String(b[p])]:y.patch}};let m=o.slice();return m[d]=ee(y.patch)?{...b,...y.patch}:y.patch,{ok:true,patch:m}},s=n(e,0);return s.ok?{ok:true,patch:s.patch}:s}function ze(e,t){return e.slice(0,t).map(a=>a.kind==="key"?a.key:a.kind==="index"?`[${a.index}]`:`[${a.field}=${a.value}]`).join(".").replace(/\.\[/g,"[")||"(root)"}var le=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function We(e){return Array.isArray(e)?"array":e===null?"null":typeof e=="object"?"object":typeof e}var Ua=["string","number","boolean"];function Ga(e,t,a=2e3){let r=[{node:e,path:""}],n=0;for(;r.length&&n<a;){let{node:s,path:o}=r.shift();if(n++,Array.isArray(s))s.slice(0,20).forEach((i,l)=>r.push({node:i,path:`${o}[${l}]`}));else if(le(s))for(let[i,l]of Object.entries(s)){let d=o?`${o}.${i}`:i;if(i===t&&o)return d;(le(l)||Array.isArray(l))&&r.push({node:l,path:d})}}}function Bt(e,t,a={},r=e,n="",s=[]){let o=a.noun??"data",i=n||"(root)";if(Array.isArray(t)){if(!Array.isArray(e))return s.push({path:i,kind:"type-change",detail:`${We(e)} \u2192 array`}),s;let p=e.length?e[0]:void 0;return p!==void 0&&(le(p)||Array.isArray(p))&&t.forEach((m,S)=>{let _=`${n}[${S}]`;if(le(p)&&le(m))for(let F of Object.keys(p))F in m||s.push({path:`${_}.${F}`,kind:"missing-key",detail:`list items need \`${F}\` \u2014 the items already in the list have it`});Bt(p,m,a,r,_,s)}),s}if(le(t)){if(!le(e))return s.push({path:i,kind:"type-change",detail:`${We(e)} \u2192 object`}),s;for(let[p,m]of Object.entries(t)){let S=n?`${n}.${p}`:p;if(p in e)Bt(e[p],m,a,r,S,s);else{let _=Ga(r,p);s.push({path:S,kind:"add-key",detail:_?`no such field here \u2014 did you mean \`${_}\`?`:`no field named \`${p}\` exists in this ${o}`,..._?{movedTo:_}:{}})}}return s}let l=We(e),d=We(t),b=l==="null"&&Ua.includes(d),y=d==="null"&&Ua.includes(l);return l!==d&&!b&&!y&&s.push({path:i,kind:"type-change",detail:`${l} \u2192 ${d}`}),s}function Gg(e,t){if(!t.length||!t.every(r=>r.kind==="add-key"&&r.movedTo))return;let a={};for(let r of t){let n=Vg(e,r.path);if(n===void 0||r.movedTo.includes("["))return;let s=a,o=r.movedTo.split(".");o.slice(0,-1).forEach(i=>{s[i]??(s[i]={}),s=s[i]}),s[o[o.length-1]]=n}return a}function Vg(e,t){let a=e;for(let r of t.split(".")){if(!le(a))return;a=a[r]}return a}function Yg(e,t,a){let r=e.slice(0,6).map(s=>`\`${s.path}\`: ${s.detail}`).join("; "),n=e.length>6?`; +${e.length-6} more`:"";return`Refused: this isn't a same-type edit of existing fields (the rule the React Query devtools enforces). ${r}${n}. You can only change the VALUE of a field that already exists, to the same type \u2014 you can't add fields, change a field's type, or null a list/object the screen renders. Clearing a scalar to null is fine. Send just the field(s) you're changing, nested to match the current shape of this ${t}. Use force:true only to deliberately break that.`+(a?` This is the same edit at the right depth \u2014 send it as the patch: ${JSON.stringify(a)}`:"")}function ot(e,t){let a=0,r=false,n=false,s=[e],o=new Set;for(;s.length>0;){if(a>t)return{bytes:a,sawRepeat:r,sawBigInt:n};let i=s.pop();if(i==null)a+=4;else if(typeof i=="string")a+=i.length+2;else if(typeof i=="number")a+=8;else if(typeof i=="boolean")a+=5;else if(typeof i=="object"){if(o.has(i)){r=true;continue}if(o.add(i),Array.isArray(i)){a+=2+i.length;for(let l=0;l<i.length;l++)s.push(i[l])}else{a+=2;for(let l in i)a+=l.length+4,s.push(i[l])}}else typeof i=="bigint"&&(n=true),a+=4}return{bytes:a,sawRepeat:r,sawBigInt:n}}function Nt(e,t){let a=ot(e,t);return a.bytes>t?true:!a.sawRepeat&&!a.sawBigInt?false:!_a(e)}var Va=16*1024,it=8*1024*1024;function qg(e,t){return Object.freeze({[`__buoy${e}OnDevice`]:true,note:t})}function Jg(e,t){return typeof e=="object"&&e!==null&&e[`__buoy${t}OnDevice`]===true}function Ya(e=it){return{__buoyTruncated:true,note:`Exceeds the ${e/1048576}MB detail limit \u2014 inspect it on-device.`}}function Kg(e,t,a=Va){return e===void 0?e:Nt(e,a)?t:e}function qa(e,t=it){return Nt(e,t)?Ya(t):e}function Qg(e){let t=new WeakMap;return a=>{let r=t.get(a);if(r!==void 0)return r;let n=e(a);return t.set(a,n),n}}function Xg(e,t){let a=[],r=t.baseBytes??16;for(let n=e.length-1;n>=0;n--){let s=t.toWire(e[n]);if(r+s.bytes>t.budget&&a.length>0)break;a.push(s.value),r+=s.bytes}return a.reverse(),a}function Zg(e,t,a){let r=ot(e,t);if(r.bytes<=t)return{value:e,bytes:r.bytes};let n=a();return{value:n,bytes:ot(n,t).bytes}}function Ja(e){return e??{}}function ep(e,t,a=it){let r=n=>qa(n,a);return n=>{let{id:s}=Ja(n);if(!s)return{found:false,reason:"missing id"};let o=e(s);return o?{found:true,id:s,...t(o,r)}:{found:false,reason:"unknown id"}}}function Ka(e){return e.length===1?e[0]:t=>{let a=e.map(r=>r(t));return()=>{for(let r of a)r()}}}function tp(e){let t=Array.isArray(e.subscribe)?Ka(e.subscribe):e.subscribe;return{version:e.version,getSnapshot:e.getSnapshot,subscribe:t,...e.actions?{actions:e.actions}:{}}}var lt=new Set(["@react_buoy_settings_theme","@react_buoy_settings_preferences","@react_buoy_settings_global","@react_buoy_dev_tools_settings","@react_buoy_settings_tooltip_shown","@react_buoy_modal_hint_acknowledged","@react_buoy_clipboard_hint_acknowledged","@react_buoy_network_filters","@react_buoy_network_preferences","@react_buoy_network_copy_options","@react_buoy_storage_filters","@react_buoy_storage_event_filters","@react_buoy_storage_key_filters","@react_buoy_storage_pinned_keys","@react_buoy_storage_preferences","@react_buoy_storage_diff_viewer_mode","@react_buoy_rq_filters","@react_buoy_rq_preferences","@react_buoy_route_events_event_filters","@react_buoy_route_events_detail_view","@react_buoy_route_events_diff_viewer_mode","@react_buoy_sentry_filters","@react_buoy_sentry_preferences","@react_buoy_highlight_updates_filters","@react_buoy_highlight_updates_settings","@react_buoy_highlight_updates_copy_settings","@react_buoy_events_enabled_sources","@react_buoy_events_copy_settings","@react_buoy_time_machine_diff_viewer_mode","@react_buoy_network_ignored_domains","@react_buoy_network_ignored_urls","@react_buoy_rq_ignored_patterns","@react_buoy_rq_included_patterns"]),Qa=new Set(["@react_buoy_network_ignored_domains","@react_buoy_network_ignored_urls","@react_buoy_rq_ignored_patterns","@react_buoy_rq_included_patterns"]),Xa="@react_buoy_settings_sync_meta",Za="@react_buoy_network_ignored_domains",er=2e3,ce=3e4,Dt=15*6e4,ap=15e3,zt=new Set;function rp(e){return zt.add(e),()=>zt.delete(e)}function sp(e){e.includes(Za)&&K.reload(),zt.forEach(t=>{try{t(e)}catch{}})}function np(){return{storage:W,credential:cl,fetch:(e,t)=>fetch(e,t),subscribeWrites:dg,setTimer:(e,t)=>setTimeout(e,t),clearTimer:e=>clearTimeout(e),onTeam:e=>{K.setTeamPatterns(op(e[Za])),st.set(e)},onApplied:sp}}function op(e){if(!e)return[];try{return JSON.parse(e)}catch{return[]}}var tr=class{constructor(e={}){this.started=false;this.pending=new Map;this.applying=new Set;this.pushTimer=null;this.pullTimer=null;this.unsubscribe=null;this.refusedToken=null;this.deps={...np(),...e}}start(){this.started||(this.started=true,this.unsubscribe=this.deps.subscribeWrites((e,t)=>this.onWrite(e,t)),this.pull())}stop(){this.started=false,this.unsubscribe?.(),this.unsubscribe=null,this.pushTimer!==null&&this.deps.clearTimer(this.pushTimer),this.pullTimer!==null&&this.deps.clearTimer(this.pullTimer),this.pushTimer=this.pullTimer=null}credential(){let e=this.deps.credential();return e&&e.token!==this.refusedToken?e:null}call(e,t,a){return new Promise((r,n)=>{let s=this.deps.setTimer(()=>n(new Error("timeout")),ap);this.deps.fetch(`${t.origin.replace(/\/$/,"")}${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({access_token:t.token,...a})}).then(o=>{this.deps.clearTimer(s),r(o)},o=>{this.deps.clearTimer(s),n(o)})})}schedulePull(e){this.started&&(this.pullTimer!==null&&this.deps.clearTimer(this.pullTimer),this.pullTimer=this.deps.setTimer(()=>{this.pullTimer=null,this.pull()},e))}async readMeta(){try{let e=await this.deps.storage.getItem(Xa),t=e?JSON.parse(e):{};return t&&typeof t=="object"?t:{}}catch{return{}}}async writeMeta(e){await this.deps.storage.setItem(Xa,JSON.stringify(e)).catch(()=>{})}async pull(){let e=this.credential();if(!e)return this.schedulePull(ce);let t,a;try{let i=await this.call("/api/settings/pull",e,{});t=i.status,a=await i.json().catch(()=>null)}catch{return this.schedulePull(ce)}if(t===401||t===403)return this.refusedToken=e.token,this.schedulePull(ce);if(t===404)return this.schedulePull(Dt);if(t!==200||!a)return this.schedulePull(ce);let r=a.personal??{},n=await this.readMeta(),s=[];for(let[i,l]of Object.entries(r))if(!(!lt.has(i)||this.pending.has(i))&&!(typeof l?.value!="string"||!(l.updatedAt>(n[i]??0)))){this.applying.add(i);try{await this.deps.storage.setItem(i,l.value)}finally{this.applying.delete(i)}n[i]=l.updatedAt,s.push(i)}for(let i of lt){if(i in r||i in n||this.pending.has(i))continue;let l=await this.deps.storage.getItem(i).catch(()=>null);l!==null&&this.pending.set(i,l)}await this.writeMeta(n),s.length>0&&this.deps.onApplied(s);let o={};for(let[i,l]of Object.entries(a.team??{}))Qa.has(i)&&typeof l?.value=="string"&&(o[i]=l.value);this.deps.onTeam(o),this.pending.size>0&&this.schedulePush(0),this.schedulePull(Dt)}onWrite(e,t){!this.started||this.applying.has(e)||!lt.has(e)||(this.pending.set(e,t),this.schedulePush(er))}schedulePush(e){this.pushTimer!==null&&this.deps.clearTimer(this.pushTimer),this.pushTimer=this.deps.setTimer(()=>{this.pushTimer=null,this.push()},e)}async push(){if(this.pending.size===0)return;let e=this.credential();if(!e)return this.schedulePush(ce);let t=new Map(this.pending),a,r;try{let s=await this.call("/api/settings/push",e,{changes:Object.fromEntries(t)});a=s.status,r=await s.json().catch(()=>null)}catch{return this.schedulePush(ce)}if(a===401||a===403)return this.refusedToken=e.token,this.schedulePush(ce);if(a===404)return this.schedulePush(Dt);if(a!==200||!r||typeof r.updatedAt!="number")return this.schedulePush(ce);let n=await this.readMeta();for(let[s,o]of t)this.pending.get(s)===o&&this.pending.delete(s),n[s]=r.updatedAt;await this.writeMeta(n),this.pending.size>0&&this.schedulePush(er)}},je=null;function ip(e={}){je??(je=new tr(e)),je.start()}function lp(){je&&je.pull()}function cp(e){return e}function up(e,t,a){return r=>{let n=r??{},s=e.props===void 0&&!t?void 0:{...e.props??{},...t?t(n):{}};return{...e,id:n.id||e.id,name:n.name||e.name,description:n.description||e.description,...s!==void 0?{props:s}:{},...a?a(n,e):{}}}}var Wt="__buoyToolActionRegistry";function jt(){let e=globalThis;return e[Wt]||(e[Wt]=new Set),e[Wt]}function dp(e){let t=jt();t.add(e);let a=false,r=()=>{if(a)return;a=true;let s=e(),o=async(i,l,d)=>{if(!(i==="network"&&l==="deleteOverrideRule"||i==="impersonate"&&l==="stopImpersonation"))throw new Error("Unsupported account-lock cleanup operation");if(i==="impersonate")return s[i]?.dispose?.(o);let b=s[i]?.actions?.[l];if(!b)throw new Error(`Cleanup unavailable for ${i}`);return b(d)};for(let i of Object.values(s))try{Promise.resolve(i.dispose?.(o)).catch(l=>console.warn("[Buoy] Tool cleanup failed",l))}catch(l){console.warn("[Buoy] Tool cleanup failed",l)}},n=Me(()=>{Y()?a=false:r()});return()=>{n(),t.delete(e),Promise.resolve().then(()=>{t.size===0&&r()})}}function xe(){if(!Y())return{};let e={};for(let t of jt())try{Object.assign(e,t())}catch{}return Object.fromEntries(Object.entries(e).map(([t,a])=>[t,ar(a)]))}function hp(){return Object.keys(xe())}function gp(){let e={};for(let[t,a]of Object.entries(xe()))e[t]=Object.keys(a.actions??{});return e}function pp(){return Object.entries(xe()).filter(([,e])=>typeof e.getSnapshot=="function").map(([e])=>e)}async function fp(e){Ce();let t=xe()[e];if(!t)throw new Error(`Unknown tool "${e}"`);if(typeof t.getSnapshot!="function")throw new Error(`Tool "${e}" has no snapshot to read`);return await t.getSnapshot()}function Ft(){return Y()&&jt().size>0}async function bp(e,t,a){Ce();let r=xe()[e],n=r?.actions?.[t];if(!n)throw new Error(r?`Unknown action "${t}" on tool "${e}"`:`Unknown tool "${e}"`);return await n(a)}async function mp(e=2e3){if(Ft())return true;let t=It()+e;for(;It()<t;)if(await new Promise(a=>setTimeout(a,50)),Ft())return true;return false}function ar(e){let t=a=>(...r)=>{Ce();let n=false,s=Me(()=>{Y()||(n=true)}),o=()=>{if(n)throw new Error("Buoy account access ended while the operation was pending.");Ce()};try{let i=a.apply(e,r);return i&&typeof i.then=="function"?Promise.resolve(i).then(l=>(o(),l)).finally(s):(o(),s(),i)}catch(i){throw s(),i}};return{...e,...e.getSnapshot?{getSnapshot:t(e.getSnapshot)}:{},...e.actions?{actions:Object.fromEntries(Object.entries(e.actions).map(([a,r])=>[a,t(r)]))}:{},...e.subscribe?{subscribe:a=>(Ce(),e.subscribe(()=>{Y()&&a()}))}:{}}}var Ht="__buoyToolUiBridge";function Ut(){let e=globalThis;return e[Ht]||(e[Ht]=new Set),e[Ht]}function yp(e){let t=Ut();return t.add(e),()=>{t.delete(e)}}function vp(e){for(let t of Ut())try{if(t(e))return true}catch{}return false}function Sp(){return Ut().size>0}var Gt="__buoyToolAttention";function Vt(){let e=globalThis;return e[Gt]||(e[Gt]={byTool:new Map,listeners:new Set}),e[Gt]}function Cp(e,t){let a=Vt(),r=a.byTool.get(e)??null;if(!(r===t||r&&t&&r.kind===t.kind&&r.label===t.label)){t?a.byTool.set(e,t):a.byTool.delete(e);for(let n of a.listeners)try{n()}catch{}}}function wp(e){return Vt().byTool.get(e)??null}function xp(e){let t=Vt();return t.listeners.add(e),()=>{t.listeners.delete(e)}}import{createContext as Tp,useContext as kp,useEffect as Ip}from"react";var rr=Tp(null);function _p(e,t){let a=kp(rr);return Ip(()=>{if(a)return a(e),()=>a(null)},[a,...t]),a!==null}var sr=256*1024;function Ep(e){let t=new Set(e?.excludeKeys??[]),a=e?.includeKeys?new Set(e.includeKeys):null,r=0,n=s=>!t.has(s)&&(!a||a.has(s));return{touch:n,allows(s){return n(s)?true:(r+=1,false)},countExcluded(s){r+=s},get excludedHits(){return r},excludedWarning(s){return r>0?`${r} ${s} excluded by you`:null}}}function Op(){return{ok:true,applied:0,skipped:[],warnings:[]}}function Ap(e){return{ok:false,applied:0,skipped:[],warnings:[e]}}function Rp(e,t){return{ok:false,applied:0,skipped:[{id:e,reason:t}],warnings:[]}}function Lp(e,t={}){let{key:a,label:r,oldValue:n,newValue:s,inOld:o,inNew:i}=e;if(!i)return{key:a,label:r,verdict:"removed",oldValue:n};if(!o)return{key:a,label:r,verdict:"added",newValue:s};if((t.equal??Qs)(n,s))return{key:a,label:r,verdict:"unchanged"};let l=t.tooLarge??(d=>Xs(d,sr));return l(n)||l(s)?{key:a,label:r,verdict:"too-large",reason:t.tooLargeReason??"value too large to render a diff \u2014 restore still applies it"}:{key:a,label:r,verdict:"changed",oldValue:n,newValue:s}}function Pp(e,t){return e.verdict==="unchanged"?e:{...e,verdict:"wont-apply",reason:t}}function $p(e,t){let a=r=>r===void 0?[]:r instanceof Map?Array.from(r.keys()):Object.keys(r);return new Set([...a(e),...a(t)])}function Mp(e,t={}){let a=e.toLowerCase();if(t[a])return t[a];for(let[m,S]of Object.entries(t))if(a.includes(m))return S;let r=e.split("").reduce((m,S)=>m+S.charCodeAt(0),0)*137%360,n=.7,s=.6,o=(1-Math.abs(2*s-1))*n,i=o*(1-Math.abs(r/60%2-1)),l=s-o/2,d=0,b=0,y=0;r<60?(d=o,b=i):r<120?(d=i,b=o):r<180?(b=o,y=i):r<240?(b=i,y=o):r<300?(d=i,y=o):(d=o,y=i);let p=m=>Math.round((m+l)*255).toString(16).padStart(2,"0");return`#${p(d)}${p(b)}${p(y)}`}function Bp(e,t={}){let a=t.maxLength??40;if(e===void 0)return t.undefinedLabel??"undefined";if(e===null)return"null";try{if(typeof e=="function")return t.functionLabel??"(fn)";if(typeof e=="string")return e.length>a?`"${e.slice(0,a-3)}..."`:`"${e}"`;if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){if(e.length===0)return"[]";let r=JSON.stringify(e);return r.length>a?`[${e.length} items]`:r}if(typeof e=="object"){let r=Object.keys(e);if(r.length===0)return"{}";let n=JSON.stringify(e);return n.length<=a?n:`{ ${r.length} keys }`}return String(e).slice(0,a)}catch{return"[complex]"}}function Np(e,t){if(e===t)return{summary:"no change",changedKeys:[],changedCount:0};if(typeof e!="object"||typeof t!="object"||e===null||t===null)return{summary:"changed",changedKeys:[],changedCount:0};let a=e,r=t,n=Object.keys(a),s=Object.keys(r),o=s.filter(p=>!n.includes(p)),i=n.filter(p=>!s.includes(p)),l=[];for(let p of n)s.includes(p)&&a[p]!==r[p]&&l.push(p);let d=[...o,...i,...l],b=[];if(o.length>0&&b.push(`+${o.length}`),i.length>0&&b.push(`-${i.length}`),l.length>0&&b.push(`~${l.length}`),b.length===0)return{summary:"nested change",changedKeys:[],changedCount:0};let y=d.length;return{summary:`${b.join(" ")} ${y===1?"key":"keys"}`,changedKeys:d,changedCount:y}}function nr(e){if(e==null)return"N/A";if(e===0)return"0 B";let t=1024,a=["B","KB","MB","GB","TB"],r=Math.floor(Math.log(e)/Math.log(t));return`${(e/Math.pow(t,r)).toFixed(1)} ${a[r]}`}function Dp(e){if(e==null)return"N/A";if(e<1e3)return`${e}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;if(e<36e5){let r=Math.floor(e/6e4),n=Math.floor(e%6e4/1e3);return n>0?`${r}m ${n}s`:`${r}m`}let t=Math.floor(e/36e5),a=Math.floor(e%36e5/6e4);return a>0?`${t}h ${a}m`:`${t}h`}function zp(e){return e.toLocaleString()}var or=5e4;function Wp(e,t=or){try{let a=JSON.stringify(e);return a.length>t?`[omitted: ${nr(a.length)} \u2014 too large to copy]`:e}catch{return"[omitted: could not serialize]"}}function jp(e,t=50,a=20,r=20){if(e.length<=t)return e;let n=e.slice(0,a),s=e.slice(-r);return`${n}...${s}`}function Fp(e){if(e>=100&&e<200)return{text:String(e),color:w.info,meaning:"Informational"};if(e>=200&&e<300){let t={200:"OK",201:"Created",202:"Accepted",204:"No Content",206:"Partial Content"};return{text:String(e),color:w.success,meaning:t[e]||"Success"}}if(e>=300&&e<400){let t={301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",307:"Temporary Redirect",308:"Permanent Redirect"};return{text:String(e),color:w.warning,meaning:t[e]||"Redirect"}}if(e>=400&&e<500){let t={400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",408:"Request Timeout",409:"Conflict",410:"Gone",422:"Unprocessable Entity",429:"Too Many Requests"};return{text:String(e),color:w.error,meaning:t[e]||"Client Error"}}if(e>=500){let t={500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"};return{text:String(e),color:w.error,meaning:t[e]||"Server Error"}}return{text:String(e),color:w.muted,meaning:"Unknown"}}function Hp(e){return{GET:w.success,POST:w.info,PUT:w.warning,DELETE:w.error,PATCH:w.network,HEAD:w.muted,OPTIONS:w.secondary,CONNECT:w.critical,TRACE:w.env}[e.toUpperCase()]||w.muted}function Up(e){try{let t=new URL(e);return{protocol:t.protocol.replace(":",""),host:t.hostname,port:t.port||void 0,pathname:t.pathname,search:t.search||void 0,hash:t.hash||void 0}}catch{return null}}var Fe=[];function ir(e){Fe.unshift(e),Fe=Fe.slice(0,500)}function Gp(){return Fe}function Vp(){Fe=[]}var Yt=(e=>(e.Debug="debug",e.Info="info",e.Log="log",e.Warn="warn",e.Error="error",e))(Yt||{}),qt=(e=>(e.Auth="Auth",e.Custom="Custom",e.Debug="Debug",e.Error="Error",e.Generic="Generic",e.HTTPRequest="HTTP Request",e.Navigation="Navigation",e.Replay="Replay",e.State="State",e.System="System",e.Touch="Touch",e.UserAction="User Action",e))(qt||{});var Yp=()=>`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,lr=class{constructor(){this.captureTransaction=e=>(this.logSentryEvent("transaction",e),e);this.captureSpan=e=>(this.logSentryEvent("span",e),e);this.captureEvent=e=>(this.logSentryEvent("event",e),e);this.captureLog=e=>(this.logSentryEvent("console",{message:e.message||"Log entry",level:e.level,category:"console",timestamp:e.timestamp,...e.attributes}),e);this.captureBreadcrumb=e=>{let t="unknown";try{let r=globalThis.getCurrentPathname;r&&(t=r())}catch{}let a=e.category;if(e.message?.toLowerCase().includes("ignore"))return null;if(e.message?.includes("Touch event within element:")&&(e.message=e.message.replace("Touch event within element:","")),a==="navigation"&&e.data?.from&&e.data?.to&&(e.message=`From ${e.data.from} To ${e.data.to}`),a==="touch"&&e.data?.path){e.message&&(e.message=e.message.trim());let r={...e.data,category:a,message:e.message,route:t,timestamp:new Date().toISOString(),path:e.message?[{label:e.message}]:e.data?.path};e.data=r}return this.logSentryEvent("breadcrumb",e),e}}logSentryEvent(e,t){let a="Generic",r=t.category;if(r)switch(r){case"touch":a="Touch";break;case"xhr":case"fetch":case"http":a="HTTP Request";break;case"navigation":a="Navigation";break;case"auth":a="Auth";break;case"console":a="System";break;case"debug":a="Debug";break;default:r.startsWith("ui.")?a="User Action":r.startsWith("replay.")?a="Replay":r.includes("redux")||r.includes("state")?a="State":a="Custom"}let n={id:Yp(),timestamp:Date.now(),level:this.getSentryLevel(t),message:this.getSentryMessage(t),metadata:this.getSentryMetadata(t),type:a};ir(n)}getSentryLevel(e){switch(e.level){case"fatal":case"error":return"error";case"warning":return"warn";case"info":return"info";case"debug":return"debug";default:return"log"}}getSentryMessage(e){let t=e.message;return typeof t=="string"?t:`${e.type||"Unknown"} Event`}getSentryMetadata(e){let{message:t,level:a,type:r,...n}=e;return n}},qp=new lr;import{useState as Jt,useEffect as cr}from"react";import{jsx as A,jsxs as Te}from"react/jsx-runtime";var ct=me.bubble.settings(),ur=me.bubble.userPreferences(),Kt={showEnvironment:true,showQueryButton:true,showWifiToggle:true,showEnvButton:false,showSentryButton:false,showStorageButton:false};function Jp({onPress:e}){let[t,a]=Jt(Kt);cr(()=>{r()},[]);let r=async()=>{try{let n=await W.getItem(ct);n&&a(JSON.parse(n))}catch(n){console.error("Failed to load bubble settings:",n)}};return A(Oa,{id:"bubble-settings",title:"SETTINGS",subtitle:`${Object.values(t).filter(Boolean).length}/6 visible`,icon:Ot,iconColor:"#10B981",iconBackgroundColor:"rgba(16, 185, 129, 0.1)",onPress:e||(()=>{}),index:5})}function Kp({onSettingsChange:e}){let[t,a]=Jt(Kt),[r,n]=Jt(true);cr(()=>{s()},[]);let s=async()=>{try{let d=await W.getItem(ct);d&&a(JSON.parse(d))}catch(d){console.error("Failed to load bubble settings:",d)}finally{n(false)}},o=async d=>{try{await W.setItem(ct,JSON.stringify(d)),a(d),e?.(d)}catch(b){console.error("Failed to save bubble settings:",b)}},i=async d=>{let b={...t,[d]:!t[d]};try{let y=await W.getItem(ur),p=y?JSON.parse(y):{},m=d.replace("show","hasSet"),S={...p,[m]:true};await W.setItem(ur,JSON.stringify(S))}catch(y){console.error("Failed to save user preference marker:",y)}o(b)};if(r)return A(T,{style:I.detailContainer,children:A(z,{style:I.loadingText,children:"Loading settings..."})});let l=[{key:"showEnvironment",label:"Environment Indicator",description:"Shows current environment (dev, staging, prod)",icon:A(T,{style:[I.indicator,{backgroundColor:"#10B981"}]})},{key:"showQueryButton",label:"React Query Button",description:"Opens React Query dev tools",icon:A(T,{style:[I.indicator,{backgroundColor:"#F59E0B"}]})},{key:"showWifiToggle",label:"WiFi",description:"Toggle WiFi for testing offline scenarios",icon:A(T,{style:[I.indicator,{backgroundColor:"#8B5CF6"}]})},{key:"showEnvButton",label:"Environment Variables",description:"View and check environment variables",icon:A(Ot,{size:16,color:"#10B981"})},{key:"showSentryButton",label:"Sentry Events",description:"View captured Sentry events and errors",icon:A(T,{style:[I.indicator,{backgroundColor:"#a855f7"}]})},{key:"showStorageButton",label:"Storage Browser",description:"Browse and inspect AsyncStorage data",icon:A(Ma,{size:16,color:"#3B82F6"})}];return A(T,{style:I.detailContainer,children:Te(bg,{showsVerticalScrollIndicator:false,contentContainerStyle:I.scrollContent,"sentry-label":"ignore bubble settings scroll",children:[Te(T,{style:I.header,children:[A(z,{style:I.headerTitle,children:"Developer Tools Settings"}),A(z,{style:I.headerDescription,children:"Configure bubble button visibility"})]}),A(T,{style:I.sectionDivider,children:A(z,{style:I.sectionTitle,children:"Bubble Button Visibility"})}),A(T,{style:I.settingsList,children:l.map(d=>Te(T,{style:I.settingItem,children:[A(T,{style:I.settingIconContainer,children:d.icon}),Te(T,{style:I.settingContent,children:[A(z,{style:I.settingLabel,children:d.label}),A(z,{style:I.settingDescription,children:d.description})]}),A(mg,{"sentry-label":"ignore bubble settings section",value:t[d.key],onValueChange:()=>i(d.key),trackColor:{false:"#4B5563",true:"#10B981"},thumbColor:t[d.key]?"#fff":G.textSecondary})]},d.key))}),Te(T,{style:I.footer,children:[Te(T,{style:I.noteContainer,children:[A(Na,{size:16,color:G.textSecondary}),A(z,{style:I.noteText,children:"User status indicator is always visible and cannot be disabled"})]}),A(z,{style:I.restartNote,children:"Changes are saved automatically and will persist across app restarts"})]})]})})}async function Qp(){try{let e=await W.getItem(ct);if(e)return JSON.parse(e)}catch(e){console.error("Failed to load bubble settings:",e)}return Kt}var I=Be.create({scrollContent:{flexGrow:1},sectionCard:{backgroundColor:G.input,borderRadius:8,padding:16,flexDirection:"row",alignItems:"center",marginBottom:12},iconContainer:{width:36,height:36,borderRadius:8,backgroundColor:"rgba(16, 185, 129, 0.1)",justifyContent:"center",alignItems:"center",marginRight:12},textContainer:{flex:1},title:{color:G.text,fontSize:14,fontWeight:"600",marginBottom:2},subtitle:{color:G.textSecondary,fontSize:12},chevron:{color:tt.text.icon,fontSize:20},detailContainer:{flex:1,backgroundColor:G.card},loadingText:{color:G.textSecondary,fontSize:14,textAlign:"center",marginTop:20},header:{padding:16,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.2)"},headerTitle:{color:G.text,fontSize:16,fontWeight:"600",marginBottom:4},headerDescription:{color:G.textSecondary,fontSize:12},settingsList:{padding:16},settingItem:{flexDirection:"row",alignItems:"center",paddingVertical:12,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.1)"},settingIconContainer:{width:32,height:32,justifyContent:"center",alignItems:"center",marginRight:12},settingContent:{flex:1,marginRight:12},settingLabel:{color:G.text,fontSize:14,fontWeight:"500",marginBottom:2},settingDescription:{color:tt.text.icon,fontSize:11},indicator:{width:8,height:8,borderRadius:4},footer:{padding:16,borderTopWidth:1,borderTopColor:"rgba(128, 128, 128, 0.2)"},noteContainer:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},noteText:{color:G.textSecondary,fontSize:12,flex:1},restartNote:{color:tt.text.icon,fontSize:11,fontStyle:"italic"},sectionDivider:{paddingHorizontal:16,paddingVertical:8,marginTop:8,borderTopWidth:1,borderTopColor:"rgba(128, 128, 128, 0.12)"},sectionTitle:{color:G.textSecondary,fontSize:12,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase"}});function dr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Xp(e,t,a={}){let r=a.storage??W,n=a.parse??(l=>JSON.parse(l)),s=a.serialize??(l=>JSON.stringify(l));function o(l){let d=dr(t)&&dr(l)?{...t,...l}:l;return a.sanitize?a.sanitize(d,l):d}async function i(){try{let l=await r.getItem(e);return l==null||l===""?null:o(n(l))}catch{return null}}return{key:e,defaults:t,loadOrNull:i,async load(){return await i()??t},async save(l){try{await r.setItem(e,s(l))}catch{}},async clear(){try{await r.removeItem(e)}catch{}}}}import{callCapacitorNative as hr,hasCapacitorPlugin as Zp,isCapacitorNative as ef}from"@buoy-gg/license/web";function tf(){return!ef()||!Zp("Preferences")?null:{async getAllKeys(){let{keys:e}=await hr("Preferences","keys");return Array.isArray(e)?e:[]},async multiRemove(e){await Promise.all(e.map(t=>hr("Preferences","remove",{key:t})))}}}import{callCapacitorNative as af,hasCapacitorPlugin as rf,isCapacitorNative as sf}from"@buoy-gg/license/web";import{useEffect as nf,useId as of,useRef as gr,useState as lf}from"react";import{createPortal as cf}from"react-dom";import{jsx as He,jsxs as uf}from"react/jsx-runtime";function pr(){let[e,t]=lf(false),a=gr(null),r=gr(null),n=of(),s=(o=true)=>{t(false),o&&a.current?.querySelector('[data-account-launcher] [role="button"]')?.focus({preventScroll:true})};return nf(()=>{if(!e)return;r.current?.focus({preventScroll:true});let o=l=>{l.target instanceof Node&&!a.current?.contains(l.target)&&t(false)},i=l=>{l.key==="Escape"&&(l.preventDefault(),l.stopPropagation(),t(false),a.current?.querySelector('[data-account-launcher] [role="button"]')?.focus({preventScroll:true}))};return document.addEventListener("pointerdown",o),document.addEventListener("keydown",i),()=>{document.removeEventListener("pointerdown",o),document.removeEventListener("keydown",i)}},[e]),typeof document>"u"?null:cf(uf("div",{ref:a,"data-buoy-account":"",style:{position:"fixed",right:"max(16px, env(safe-area-inset-right))",bottom:"max(20px, env(safe-area-inset-bottom))",zIndex:99999,colorScheme:"dark",fontFamily:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},children:[He("style",{children:`
|
|
2
2
|
[data-buoy-account] { font-size: 14px; line-height: 1.5; text-align: left; }
|
|
3
3
|
[data-buoy-account] [role="button"], [data-buoy-account] [role="link"] { cursor: pointer; }
|
|
4
|
-
[data-buoy-account] [role="button"]:focus-visible, [data-buoy-account] [role="link"]:focus-visible { outline: 2px solid ${
|
|
4
|
+
[data-buoy-account] [role="button"]:focus-visible, [data-buoy-account] [role="link"]:focus-visible { outline: 2px solid ${c.color.accent}; outline-offset: 3px; }
|
|
5
5
|
[data-buoy-account] [role="link"]:hover { background: rgba(255,255,255,.06); }
|
|
6
6
|
[data-buoy-account] [aria-disabled="true"] { cursor: wait; }
|
|
7
7
|
[data-buoy-account] .buoy-account-panel {
|
|
@@ -11,4 +11,4 @@
|
|
|
11
11
|
box-shadow: 0 18px 60px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.2);
|
|
12
12
|
outline: none;
|
|
13
13
|
}
|
|
14
|
-
`}),Xe("div",{"data-account-launcher":"",children:Xe(Wa,{expanded:e,onPress:()=>t(n=>!n)})}),e&&Xe("section",{ref:r,className:"buoy-account-panel",role:"dialog","aria-labelledby":s,tabIndex:-1,onBlur:n=>{n.relatedTarget instanceof Node&&!a.current?.contains(n.relatedTarget)&&o(false)},children:Xe($o,{titleId:s,onClose:()=>o()})})]}),document.body)}import{useState as te,useRef as D,useEffect as ie,useLayoutEffect as Cp,useCallback as N,memo as la,isValidElement as wp,cloneElement as xp}from"react";var yt=class{static async save(e,t){this.cache.set(e,t);try{await W.setItem(e,JSON.stringify(t))}catch{}}static async load(e){if(this.cache.has(e))return this.cache.get(e);try{let t=await W.getItem(e);if(t){let a=JSON.parse(t);return this.cache.set(e,a),a}}catch{}return null}static saveMinimized(e,t){return this.save(e,{mode:t.mode,panelHeight:t.panelHeight,dimensions:t.floatingDimensions&&t.floatingPosition?{...t.floatingDimensions,top:t.floatingPosition.y,left:t.floatingPosition.x}:void 0,isVisible:false})}};yt.cache=new Map;import{Fragment as Tp,jsx as f,jsxs as z}from"react/jsx-runtime";var L={base:"#121212",card:"#1A1A1A",border:"#333333",textMuted:"#888888",primary:"#20C997"},F={primary:"#F5F5F7",primaryLight:"#F5F5F7",secondary:"#A1A1A6",muted:"#8E8E93",success:"#34C759",info:"#00B8E6"},kp=100,Ip=400,Ar=500,Le=80,vt=()=>typeof window<"u"?window.innerWidth:0,ye=()=>typeof window<"u"?window.innerHeight:0,Rr=e=>1-Math.pow(1-e,3),Qe=e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2;function Ee(e,t,a,r){let s=0,o=false,n=performance.now(),i=l=>{if(o)return;let c=Math.min((l-n)/e,1);a(t(c)),c<1?s=requestAnimationFrame(i):r?.()};return s=requestAnimationFrame(i),()=>{o=true,cancelAnimationFrame(s)}}function Ep(){if(typeof document>"u")return{top:0,left:0,right:0,bottom:0};let e=document.createElement("div");e.style.cssText="position:fixed;top:env(safe-area-inset-top);left:env(safe-area-inset-left);right:env(safe-area-inset-right);bottom:env(safe-area-inset-bottom);visibility:hidden;pointer-events:none",document.body.appendChild(e);let t=e.getBoundingClientRect();return document.body.removeChild(e),{top:Math.max(0,t.top),left:Math.max(0,t.left),right:Math.max(0,window.innerWidth-t.right),bottom:Math.max(0,window.innerHeight-t.bottom)}}function ca(e,t,a=false){let r=Math.max(Le,window.innerWidth-t.left-t.right),s=Math.max(Le,window.innerHeight-t.top-t.bottom),o=Math.min(e.width,r),n=Math.min(e.height,s);return{width:o,height:n,left:Math.max(t.left,Math.min(e.left,window.innerWidth-t.right-o)),top:Math.max(t.top,Math.min(e.top,window.innerHeight-t.bottom-(a?Le:n)))}}var ua=({size:e=24,color:t="currentColor",strokeWidth:a=2})=>z("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[f("line",{x1:18,y1:6,x2:6,y2:18,stroke:t,strokeWidth:a,strokeLinecap:"round"}),f("line",{x1:6,y1:6,x2:18,y2:18,stroke:t,strokeWidth:a,strokeLinecap:"round"})]}),da=({size:e=24,color:t="currentColor",strokeWidth:a=2})=>f("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:f("line",{x1:5,y1:12,x2:19,y2:12,stroke:t,strokeWidth:a,strokeLinecap:"round"})}),Or=({size:e=24,color:t="currentColor",strokeWidth:a=2})=>z("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[f("rect",{x:3,y:3,width:18,height:18,rx:2,stroke:t,strokeWidth:a}),f("rect",{x:3,y:14,width:18,height:7,fill:t})]}),_r=({size:e=24,color:t="currentColor",strokeWidth:a=2})=>z("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[f("rect",{x:3,y:3,width:14,height:14,rx:2,stroke:t,strokeWidth:a}),f("line",{x1:7,y1:17,x2:7,y2:21,stroke:t,strokeWidth:a}),f("line",{x1:7,y1:21,x2:21,y2:21,stroke:t,strokeWidth:a}),f("line",{x1:21,y1:21,x2:21,y2:7,stroke:t,strokeWidth:a}),f("line",{x1:17,y1:7,x2:21,y2:7,stroke:t,strokeWidth:a})]}),ue={close:"#FF5F57",minimize:"#FEBC2E",toggleMode:"#28C840"},ha=24,Ap=2,Me=8,ga=e=>({width:ha,height:ha,borderRadius:ha/2,display:"flex",alignItems:"center",justifyContent:"center",background:`radial-gradient(circle, ${e} 6px, transparent 6px)`,border:"none",padding:0,cursor:"pointer",flexShrink:0});function Rp(e){return vl()&&Ua(true)?f(Mp,{...e}):f(Op,{...e})}function Op({onClose:e,onMinimize:t,onToggleMode:a,mode:r}){let s=r==="floating"?Or:_r,o=r==="floating"?"Dock to bottom sheet":"Make floating window";return z("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:Ap},children:[t&&f("button",{type:"button",onClick:t,style:ga(ue.minimize),"aria-label":"Minimize modal",children:f(da,{size:Me,color:"#7A5A00",strokeWidth:1.5})}),a&&f("button",{type:"button",onClick:a,style:ga(ue.toggleMode),"aria-label":o,children:f(s,{size:Me,color:"#004A1A",strokeWidth:1.5})}),f("button",{type:"button",onClick:e,style:ga(ue.close),"aria-label":"Close modal",children:f(ua,{size:Me,color:"#4A0000",strokeWidth:1.5})})]})}var fa=12,_p=8,St=36,Pp=12,pa=16,Ct=8,Lp=3e3,ma=150,ba=e=>({width:fa,height:fa,borderRadius:fa/2,backgroundColor:e,display:"flex",alignItems:"center",justifyContent:"center"}),ya=(e,t,a,r)=>({width:St,height:St,borderRadius:St/2,display:"flex",alignItems:"center",justifyContent:"center",padding:0,cursor:"pointer",flexShrink:0,backgroundColor:e?a:t,border:e?`1px solid ${r}`:"none"});function Mp({onClose:e,onMinimize:t,onToggleMode:a,mode:r,variant:s="night"}){let o=s==="night",[n,i]=te(false),[l,c]=te(false),p=D(null),b=D(null),h=r==="floating"?Or:_r,m=r==="floating"?"Dock to bottom sheet":"Make floating window",v=N(()=>{p.current&&clearTimeout(p.current),b.current&&clearTimeout(b.current),p.current=null,b.current=null},[]),I=N(()=>{v(),c(false),b.current=setTimeout(()=>i(false),ma)},[v]),U=N(()=>{v(),i(true),requestAnimationFrame(()=>requestAnimationFrame(()=>c(true))),p.current=setTimeout(I,Lp)},[v,I]);ie(()=>v,[v]);let J=B=>{I(),B()};return z(Tp,{children:[z("button",{type:"button",onClick:U,"aria-label":"Open window controls","data-testid":"tool-window-controls",style:{padding:10,margin:-8,border:"none",background:"transparent",cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",gap:_p},children:[t&&f("span",{style:ba(ue.minimize),children:f(da,{size:Me,color:"#7A5A00",strokeWidth:1.5})}),a&&f("span",{style:ba(ue.toggleMode),children:f(h,{size:Me,color:"#004A1A",strokeWidth:1.5})}),f("span",{style:ba(ue.close),children:f(ua,{size:Me,color:"#4A0000",strokeWidth:1.5})})]}),n&&f("div",{style:{position:"absolute",top:-Ct,right:-Ct,zIndex:9999,transform:`scale(${l?1:.3})`,opacity:l?1:0,transition:`transform ${ma}ms ease-out, opacity ${ma}ms ease-out`},children:z("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:Pp,padding:Ct,borderRadius:(St+Ct*2)/2,backgroundColor:o?u.color.surface:L.card,border:`1px solid ${o?u.color.border:L.border}`,boxShadow:"0 4px 12px rgba(0,0,0,0.4)"},children:[t&&f("button",{type:"button",onClick:()=>J(t),"aria-label":"Minimize modal","data-testid":"tool-window-minimize",style:ya(o,ue.minimize,u.color.warningSoft,u.color.warning+"59"),children:f(da,{size:pa,color:o?u.color.warning:"#7A5A00",strokeWidth:2})}),a&&f("button",{type:"button",onClick:()=>J(a),"aria-label":m,"data-testid":"tool-window-mode",style:ya(o,ue.toggleMode,u.color.accentSoft,u.color.accentBorderStrong),children:f(h,{size:pa,color:o?u.color.accent:"#004A1A",strokeWidth:2})}),f("button",{type:"button",onClick:()=>J(e),"aria-label":"Close modal","data-testid":"tool-window-close",style:ya(o,ue.close,u.color.dangerSoft,u.color.danger+"59"),children:f(ua,{size:pa,color:o?u.color.danger:"#4A0000",strokeWidth:2})})]})})]})}var Pr=la(function({isResizing:e,mode:t,hasCustomContent:a=false,variant:r="default"}){let s=t==="floating",o=r==="night";return z("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",position:"relative",justifyContent:a?"center":void 0,minHeight:a?32:void 0,paddingTop:a?0:8,paddingBottom:a?0:8,backgroundColor:"transparent"},children:[f("div",{style:{width:o?36:e?40:s?50:40,height:o||s?5:3,backgroundColor:o?u.color.placeholder:e?L.primary:s?L.textMuted:L.primary,borderRadius:o?2.5:2,boxShadow:o?"none":`0 0 4px ${L.primary}99`}}),e&&t==="bottomSheet"&&f("div",{style:{position:"absolute",display:"flex",flexDirection:"row",gap:2,marginTop:12},children:[0,1,2].map(n=>f("div",{style:{width:12,height:1,backgroundColor:F.success,opacity:.6}},n))})]})}),Np=la(function({onAcknowledge:e}){return f("div",{style:{backgroundColor:`${F.info}15`,borderLeft:`3px solid ${F.info}`,borderRadius:8,margin:"8px 12px 4px",overflow:"hidden",boxShadow:`0 0 8px ${F.info}4D`,flexShrink:0},children:z("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",padding:12,gap:12},children:[z("div",{style:{width:32,height:32,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:[f("div",{style:{position:"absolute",width:20,height:20,borderRadius:10,border:`2px solid ${F.info}`,opacity:.6,transform:"scale(0.8)",boxSizing:"border-box"}}),f("div",{style:{position:"absolute",width:20,height:20,borderRadius:10,border:`2px solid ${F.info}`,boxSizing:"border-box"}})]}),z("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[f("span",{style:{fontSize:13,fontWeight:600,color:F.info,letterSpacing:.3},children:"\u{1F4A1} Pro Tip"}),f("span",{style:{fontSize:12,color:F.primaryLight,lineHeight:"16px"},children:"Double-tap the header to transform this into a floating modal"})]}),f("button",{type:"button",onClick:e,style:{backgroundColor:`${F.info}30`,padding:"6px 12px",borderRadius:6,border:`1px solid ${F.info}50`,fontSize:12,fontWeight:600,color:F.info,cursor:"pointer",fontFamily:"inherit",flexShrink:0},children:"Got it!"})]})})});function Lr({header:e,isResizing:t,mode:a,onMinimize:r,variant:s="default"}){if(e?.customContent){let o=e.customContent;return wp(e.customContent)&&r&&(o=xp(e.customContent,{onMinimize:r})),z("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",minWidth:0},children:[f(Pr,{isResizing:t,mode:a,hasCustomContent:true,variant:s}),o]})}return z("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",position:"relative",minWidth:0},children:[f(Pr,{isResizing:t,mode:a,variant:s}),z("div",{style:{padding:"0 16px",display:"flex",flexDirection:"column",alignItems:"center"},children:[e?.title&&f("span",{style:{fontSize:16,fontWeight:600,color:F.primary},children:e.title}),e?.subtitle&&f("span",{style:{fontSize:12,color:F.secondary,paddingTop:4},children:e.subtitle})]}),f("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:f("span",{style:{fontSize:10,color:F.muted,fontStyle:"italic"},children:"Double tap: Toggle \u2022 Triple tap: Close"})})]})}var $p=({visible:e,onClose:t,children:a,header:r,styles:s={},minHeight:o=kp,maxHeight:n,initialHeight:i=Ip,animatedHeight:l,benchMotion:c,initialMode:p="bottomSheet",onModeChange:b,persistenceKey:h,enablePersistence:m=true,initialFloatingPosition:v,footer:I,footerHeight:U=0,onBack:J,onMinimize:B,minimizeRequest:S=0,minimizeTargetPosition:ne,initialModalState:M,zIndex:Ze,disableScrollWrapper:Wr=false,background:Ta=true,variant:et="night"})=>{let[Q]=te(Ep),[ka,Ia]=te(!m),[P,At]=te(p),tt=D(b);tt.current=b;let[$e,ve]=te(false),[Rt,Be]=te(false),[jr,Ot]=te(i),[le,De]=te(()=>ca({width:vt(),height:Ar,top:v?.y??(ye()-Ar)/2,left:v?.x??0},Q)),[Ur,at]=te(false),[Vr,Ea]=te(false),Gr=ja(),Se=D(i),Z=D(le),V=D({x:le.left,y:le.top}),rt=D(null),_t=D(null),ce=D(null),Ce=D([]),se=N(()=>{Ce.current.forEach(d=>d()),Ce.current=[]},[]);ie(()=>{Z.current=le},[le]),ie(()=>se,[se]);let Aa=n||ye()-Q.top;ie(()=>{if(!m||!h){Ia(true);return}let d=true;return(async()=>{let g=await yt.load(h);if(d&&g&&(g.mode&&(At(g.mode),tt.current?.(g.mode)),g.panelHeight&&(Ot(g.panelHeight),Se.current=g.panelHeight),g.dimensions)){let C=ca(g.dimensions,Q,true);De(C),V.current={x:C.left,y:C.top}}d&&Ia(true)})(),()=>{d=false}},[h,m]),ie(()=>{if(!m||!h||!ka)return;let d=setTimeout(()=>{yt.save(h,{mode:P,panelHeight:Se.current,dimensions:le,isVisible:e})},500);return()=>clearTimeout(d)},[P,jr,le,e,h,m,ka]),ie(()=>{let d=true;return(async()=>{try{let g=ke.modal.hintAcknowledged(),C=await W.getItem(g);d&&(at(C!=="true"),Ea(true))}catch{d&&(at(true),Ea(true))}})(),()=>{d=false}},[]);let Yr=N(async()=>{try{let d=ke.modal.hintAcknowledged();await W.setItem(d,"true"),at(false)}catch{at(false)}},[]),Pt=N(()=>{Be(false),ve(false);let d=P==="bottomSheet"?"floating":"bottomSheet";At(d),tt.current?.(d)},[P]);ie(()=>{Be(false),ve(false)},[P]);let we=N(()=>{if(!B)return;let d={mode:P,panelHeight:Se.current,floatingPosition:{x:Z.current.left,y:Z.current.top},floatingDimensions:{width:Z.current.width,height:Z.current.height}};m&&h&&yt.saveMinimized(h,d);let g=ne?.x??vt()-50,C=ne?.y??ye()-150;if(se(),P==="bottomSheet"){let E=rt.current;if(!E){B(d);return}let k=ye();Ce.current.push(Ee(300,Qe,O=>{E.style.opacity=String(1-O),E.style.transform=`translateY(${O*k}px)`},()=>B(d)))}else{let E=ce.current;if(!E){B(d);return}let k={...V.current};Ce.current.push(Ee(300,Qe,O=>{E.style.opacity=String(1-O);let xe=k.x+(g-k.x)*O,Te=k.y+(C-k.y)*O;E.style.transform=`translate(${xe}px, ${Te}px)`},()=>B(d)))}},[P,B,ne,se,m,h]),Ra=D(S);ie(()=>{Ra.current!==S&&(Ra.current=S,we())},[S,we]),ie(()=>{if(M&&(M.mode&&(At(M.mode),tt.current?.(M.mode)),M.panelHeight&&(Ot(M.panelHeight),Se.current=M.panelHeight),M.floatingDimensions&&M.floatingPosition)){let d={width:M.floatingDimensions.width,height:M.floatingDimensions.height,top:M.floatingPosition.y,left:M.floatingPosition.x};De(d),V.current={x:M.floatingPosition.x,y:M.floatingPosition.y}}},[M]),Cp(()=>{if(e)if(se(),P==="bottomSheet"){let d=rt.current;if(!d)return;let g=ye();d.style.transform=`translateY(${g}px)`,d.style.opacity="0",Ce.current.push(Ee(300,Rr,C=>{d.style.transform=`translateY(${(1-C)*g}px)`}),Ee(200,Qe,C=>{d.style.opacity=String(C)}))}else{let d=ce.current;if(!d)return;V.current={x:Z.current.left,y:Z.current.top},d.style.transform=`translate(${V.current.x}px, ${V.current.y}px)`,d.style.opacity="0",Ce.current.push(Ee(200,Qe,g=>{d.style.opacity=String(g)}))}},[e,P,se]);let Oa=D(0),ze=D(0),Fe=D(null),st=N(()=>{let d=Date.now();d-Oa.current>500&&(ze.current=0),ze.current++,Oa.current=d,Fe.current&&clearTimeout(Fe.current),Fe.current=setTimeout(()=>{ze.current===2?Pt():ze.current>=3&&B&&we(),ze.current=0},300)},[Pt,B,we]);ie(()=>()=>{Fe.current&&clearTimeout(Fe.current)},[]);let ot=D({active:false,resizing:false,startY:0,headerOffsetY:0,samples:[]}),Kr=N(d=>{if(P!=="bottomSheet"||d.button!==0||d.target.closest('button, a, input, textarea, select, [role="button"], [role="tab"], [role="switch"], [contenteditable="true"], [tabindex]'))return;let g=ot.current;g.active=true,g.resizing=false,g.startY=d.clientY;let C=d.currentTarget.getBoundingClientRect();g.headerOffsetY=d.clientY-C.top,g.samples=[{t:performance.now(),y:d.clientY}],d.currentTarget.setPointerCapture(d.pointerId)},[P]),qr=N(d=>{let g=ot.current;if(!g.active)return;let C=d.clientY-g.startY;if(!g.resizing&&Math.abs(C)>3&&(g.resizing=true,se(),ve(true)),!g.resizing)return;let E=d.clientY-g.headerOffsetY,k=ye()-E;k=Math.max(o,Math.min(k,Aa)),Se.current=k,_t.current&&(_t.current.style.height=`${k}px`);let O=performance.now();for(g.samples.push({t:O,y:d.clientY});g.samples.length>2&&O-g.samples[0].t>100;)g.samples.shift()},[o,Aa,se]),Jr=N(d=>{let g=ot.current;if(!g.active)return;if(g.active=false,!g.resizing){st();return}ve(false);let C=Se.current,E=d.clientY-g.startY,k=g.samples[0],O=g.samples[g.samples.length-1];if((O&&k&&O.t>k.t?(O.y-k.y)/(O.t-k.t):0)>.8&&E>50||E>150&&C<=o){let xe=rt.current;if(se(),xe){let Te=ye();Ce.current.push(Ee(200,Qe,G=>{xe.style.opacity=String(1-G)}),Ee(300,Rr,G=>{xe.style.transform=`translateY(${G*Te}px)`},()=>t()))}else t();return}Ot(C)},[o,t,st,se]),Xr=N(()=>{let d=ot.current;d.active&&(d.active=false,d.resizing=false,ve(false))},[]),it=D({active:false,dragging:false,startX:0,startY:0,startPos:{x:0,y:0}}),Qr=N(d=>{if(P!=="floating"||$e||d.button!==0||d.target.closest('button, a, input, textarea, select, [role="button"], [role="tab"], [role="switch"], [contenteditable="true"], [tabindex]'))return;let g=it.current;g.active=true,g.dragging=false,g.startX=d.clientX,g.startY=d.clientY,g.startPos={...V.current},d.currentTarget.setPointerCapture(d.pointerId)},[P,$e]),Zr=N(d=>{let g=it.current;if(!g.active)return;let C=d.clientX-g.startX,E=d.clientY-g.startY;if(!g.dragging&&Math.abs(C)+Math.abs(E)>5&&(g.dragging=true,Be(true)),!g.dragging)return;let k=g.startPos.x+C,O=g.startPos.y+E;V.current={x:k,y:O},ce.current&&(ce.current.style.transform=`translate(${k}px, ${O}px)`)},[]),es=N(()=>{let d=it.current;if(!d.active)return;if(d.active=false,!d.dragging){st();return}Be(false);let g=Z.current,C=ca({...g,left:V.current.x,top:V.current.y},Q),E=C.left,k=C.top;V.current={x:E,y:k},ce.current&&(ce.current.style.transform=`translate(${E}px, ${k}px)`),De(O=>({...O,left:E,top:k}))},[Q,st]),ts=N(()=>{let d=it.current;d.active&&(d.active=false,d.dragging=false,Be(false))},[]),Lt=D({active:false,corner:"bottomRight",startX:0,startY:0,start:{width:0,height:0,top:0,left:0}}),as=N(d=>g=>{if(P!=="floating")return;g.stopPropagation();let C=Lt.current;C.active=true,C.corner=d,C.startX=g.clientX,C.startY=g.clientY,C.start={...Z.current},ve(true),g.currentTarget.setPointerCapture(g.pointerId)},[P]),rs=N(d=>{let g=Lt.current;if(!g.active)return;let C=d.clientX-g.startX,E=d.clientY-g.startY;if(Math.abs(C)<.5&&Math.abs(E)<.5)return;let k=Math.max(0,Q.left),O=ye()-Math.max(0,Q.bottom),xe=vt()-Math.max(0,Q.right),Te=vt()*.25,G=g.start,Mt=G.left+G.width,Nt=G.top+G.height,He=G.left,lt=G.top,Ba=Mt,$t=Nt;g.corner==="bottomLeft"?(He=Math.max(k,Math.min(G.left+C,Mt-Te)),$t=Math.min(O,Math.max(Nt+E,G.top+Le))):(Ba=Math.min(xe,Math.max(Mt+C,G.left+Te)),$t=Math.min(O,Math.max(Nt+E,G.top+Le)));let ss=Math.max(Te,Ba-He),os=Math.max(Le,$t-lt),Da={width:ss,height:os,left:He,top:lt};Z.current=Da,V.current={x:He,y:lt},De(Da),ce.current&&(ce.current.style.transform=`translate(${He}px, ${lt}px)`)},[Q.left,Q.right,Q.bottom]),_a=N(()=>{let d=Lt.current;d.active&&(d.active=false,ve(false),De(Z.current))},[]),nt=!e,Pa=nt?{left:-9999,top:-9999,opacity:0,visibility:"hidden",pointerEvents:"none"}:{},La=r?.title||"Dev tool panel",R=et==="night",Ma=Ta&&R?f("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},"aria-hidden":true,children:f(zt,{})}):null,Na=z("div",{style:{flex:1,minHeight:0,position:"relative",display:"flex",flexDirection:"column",backgroundColor:R?"transparent":L.base,borderBottomLeftRadius:16,borderBottomRightRadius:16,overflow:"hidden",...s.content},children:[Ta&&!R?f(zt,{}):null,Wr?f("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",paddingBottom:U},children:a}):f("div",{style:{flex:1,minHeight:0,overflowY:"auto",paddingBottom:U},children:a}),I?f("div",{style:{position:"absolute",left:0,right:0,bottom:0,backgroundColor:L.base,borderBottomLeftRadius:16,borderBottomRightRadius:16},children:I}):null]}),$a=f("div",{style:{position:"absolute",top:4,right:4,zIndex:10},children:f(Rp,{onClose:t,onMinimize:B?we:void 0,onToggleMode:Pt,mode:P,variant:et})});if(P==="floating"){let d=Rt||$e;return z("div",{ref:ce,role:"dialog","aria-label":La,"aria-hidden":nt||void 0,style:{position:"fixed",pointerEvents:"auto",left:0,top:0,width:le.width,height:le.height,transform:`translate(${V.current.x}px, ${V.current.y}px)`,display:"flex",flexDirection:"column",backgroundColor:R?u.color.bg:L.card,borderRadius:R?u.radius.sheet:6,border:R?`1px solid ${u.color.accent}55`:d?`2px solid ${L.primary}`:`1px solid ${L.border}`,boxShadow:R?`0 0 14px ${u.color.accent}38`:d?`0 0 12px ${L.primary}7A`:`0 0 20px ${L.primary}4D`,...R?{overflow:"hidden"}:null,boxSizing:"border-box",zIndex:Ze??1e3,...s.container,...Pa},children:[Ma,f("div",{onPointerDown:Qr,onPointerMove:Zr,onPointerUp:es,onPointerCancel:ts,style:{borderTopLeftRadius:R?u.radius.sheet:6,borderTopRightRadius:R?u.radius.sheet:6,backgroundColor:R?"transparent":L.card,minHeight:56,border:R?"none":`1px solid ${L.border}`,boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"center",flexShrink:0,touchAction:"none",userSelect:"none",cursor:Rt?"grabbing":"grab",position:"relative"},children:f(Lr,{header:r,isResizing:Rt||$e,mode:P,onMinimize:B?we:void 0,variant:et})}),$a,Na,["bottomLeft","bottomRight"].map(g=>f("div",{onPointerDown:as(g),onPointerMove:rs,onPointerUp:_a,onPointerCancel:_a,style:{position:"absolute",width:30,height:30,bottom:4,...g==="bottomLeft"?{left:4}:{right:4},zIndex:1e3,touchAction:"none",cursor:g==="bottomLeft"?"nesw-resize":"nwse-resize"},children:f("div",{style:{width:20,height:20,borderRadius:10,boxSizing:"border-box",backgroundColor:d?`${F.success}1A`:"transparent",border:d?`2px solid ${F.success}`:"none",boxShadow:d?`0 0 8px ${F.success}99`:"none"}})},g))]},"floating")}return f("div",{"aria-hidden":nt||void 0,style:{position:"fixed",inset:0,zIndex:Ze??1e3,pointerEvents:"none",...nt?{...Pa,inset:"auto",width:"100vw",height:"100vh"}:null},children:f("div",{ref:rt,style:{position:"absolute",bottom:0,left:0,right:0,pointerEvents:"auto"},children:z("div",{ref:_t,role:"dialog","aria-label":La,style:{height:Se.current,display:"flex",flexDirection:"column",backgroundColor:R?u.color.bg:L.card,borderTopLeftRadius:R?u.radius.sheet:6,borderTopRightRadius:R?u.radius.sheet:6,border:R?`1px solid ${u.color.accent}55`:`1px solid ${L.border}`,boxShadow:R?`0 -4px 10px ${u.color.accent}38`:`0 -4px 12px ${L.primary}33`,...R?{overflow:"hidden"}:null,boxSizing:"border-box",position:"relative",...s.container},children:[Ma,f("div",{onPointerDown:Kr,onPointerMove:qr,onPointerUp:Jr,onPointerCancel:Xr,style:{borderTopLeftRadius:R?u.radius.sheet:6,borderTopRightRadius:R?u.radius.sheet:6,backgroundColor:R?"transparent":L.card,minHeight:56,border:R?"none":`1px solid ${L.border}`,boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"center",flexShrink:0,touchAction:"none",userSelect:"none",cursor:"ns-resize",position:"relative"},children:f(Lr,{header:r,isResizing:$e,mode:P,onMinimize:B?we:void 0,variant:et})}),$a,Vr&&Ur&&!Gr&&f(Np,{onAcknowledge:Yr}),Na]})})},"bottomSheet")},Bp=la(e=>Ha()().status!=="admitted"?e.visible?f(Er,{}):null:f($p,{...e}));import{memo as Dp,useMemo as zp}from"react";var de=class Um{constructor(t,a){this.ordinal=t;this.formatBits=a}};de.LOW=new de(0,1),de.MEDIUM=new de(1,0),de.QUARTILE=new de(2,3),de.HIGH=new de(3,2);var wt=de,ae=class Vm{constructor(t,a){this.modeBits=t;this.numBitsCharCount=a}numCharCountBits(t){return this.numBitsCharCount[Math.floor((t+7)/17)]}};ae.NUMERIC=new ae(1,[10,12,14]),ae.ALPHANUMERIC=new ae(2,[9,11,13]),ae.BYTE=new ae(4,[8,16,16]),ae.KANJI=new ae(8,[8,10,12]),ae.ECI=new ae(7,[0,0,0]);var xt=ae,he=class x{constructor(t,a,r,s){this.version=t;this.errorCorrectionLevel=a;this.modules=[];this.isFunction=[];if(t<x.MIN_VERSION||t>x.MAX_VERSION)throw new RangeError("Version value out of range");if(s<-1||s>7)throw new RangeError("Mask value out of range");this.size=t*4+17;let o=[];for(let i=0;i<this.size;i++)o.push(false);for(let i=0;i<this.size;i++)this.modules.push(o.slice()),this.isFunction.push(o.slice());this.drawFunctionPatterns();let n=this.addEccAndInterleave(r);if(this.drawCodewords(n),s==-1){let i=1e9;for(let l=0;l<8;l++){this.applyMask(l),this.drawFormatBits(l);let c=this.getPenaltyScore();c<i&&(s=l,i=c),this.applyMask(l)}}q(0<=s&&s<=7),this.mask=s,this.applyMask(s),this.drawFormatBits(s),this.isFunction=[]}static encodeText(t,a){let r=va.makeSegments(t);return x.encodeSegments(r,a)}static encodeBinary(t,a){let r=va.makeBytes(t);return x.encodeSegments([r],a)}static encodeSegments(t,a,r=1,s=40,o=-1,n=true){if(!(x.MIN_VERSION<=r&&r<=s&&s<=x.MAX_VERSION)||o<-1||o>7)throw new RangeError("Invalid value");let i,l;for(i=r;;i++){let h=x.getNumDataCodewords(i,a)*8,m=va.getTotalBits(t,i);if(m<=h){l=m;break}if(i>=s)throw new RangeError("Data too long")}for(let h of[wt.MEDIUM,wt.QUARTILE,wt.HIGH])n&&l<=x.getNumDataCodewords(i,h)*8&&(a=h);let c=[];for(let h of t){Y(h.mode.modeBits,4,c),Y(h.numChars,h.mode.numCharCountBits(i),c);for(let m of h.getData())c.push(m)}q(c.length==l);let p=x.getNumDataCodewords(i,a)*8;q(c.length<=p),Y(0,Math.min(4,p-c.length),c),Y(0,(8-c.length%8)%8,c),q(c.length%8==0);for(let h=236;c.length<p;h^=253)Y(h,8,c);let b=[];for(;b.length*8<c.length;)b.push(0);return c.forEach((h,m)=>b[m>>>3]|=h<<7-(m&7)),new x(i,a,b,o)}getModule(t,a){return 0<=t&&t<this.size&&0<=a&&a<this.size&&this.modules[a][t]}drawFunctionPatterns(){for(let r=0;r<this.size;r++)this.setFunctionModule(6,r,r%2==0),this.setFunctionModule(r,6,r%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let t=this.getAlignmentPatternPositions(),a=t.length;for(let r=0;r<a;r++)for(let s=0;s<a;s++)r==0&&s==0||r==0&&s==a-1||r==a-1&&s==0||this.drawAlignmentPattern(t[r],t[s]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){let a=this.errorCorrectionLevel.formatBits<<3|t,r=a;for(let o=0;o<10;o++)r=r<<1^(r>>>9)*1335;let s=(a<<10|r)^21522;q(s>>>15==0);for(let o=0;o<=5;o++)this.setFunctionModule(8,o,ge(s,o));this.setFunctionModule(8,7,ge(s,6)),this.setFunctionModule(8,8,ge(s,7)),this.setFunctionModule(7,8,ge(s,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,ge(s,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,ge(s,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,ge(s,o));this.setFunctionModule(8,this.size-8,true)}drawVersion(){if(this.version<7)return;let t=this.version;for(let r=0;r<12;r++)t=t<<1^(t>>>11)*7973;let a=this.version<<12|t;q(a>>>18==0);for(let r=0;r<18;r++){let s=ge(a,r),o=this.size-11+r%3,n=Math.floor(r/3);this.setFunctionModule(o,n,s),this.setFunctionModule(n,o,s)}}drawFinderPattern(t,a){for(let r=-4;r<=4;r++)for(let s=-4;s<=4;s++){let o=Math.max(Math.abs(s),Math.abs(r)),n=t+s,i=a+r;0<=n&&n<this.size&&0<=i&&i<this.size&&this.setFunctionModule(n,i,o!=2&&o!=4)}}drawAlignmentPattern(t,a){for(let r=-2;r<=2;r++)for(let s=-2;s<=2;s++)this.setFunctionModule(t+s,a+r,Math.max(Math.abs(s),Math.abs(r))!=1)}setFunctionModule(t,a,r){this.modules[a][t]=r,this.isFunction[a][t]=true}addEccAndInterleave(t){let a=this.version,r=this.errorCorrectionLevel;if(t.length!=x.getNumDataCodewords(a,r))throw new RangeError("Invalid argument");let s=x.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][a],o=x.ECC_CODEWORDS_PER_BLOCK[r.ordinal][a],n=Math.floor(x.getNumRawDataModules(a)/8),i=s-n%s,l=Math.floor(n/s),c=[],p=x.reedSolomonComputeDivisor(o);for(let h=0,m=0;h<s;h++){let v=t.slice(m,m+l-o+(h<i?0:1));m+=v.length;let I=x.reedSolomonComputeRemainder(v,p);h<i&&v.push(0),c.push(v.concat(I))}let b=[];for(let h=0;h<c[0].length;h++)c.forEach((m,v)=>{(h!=l-o||v>=i)&&b.push(m[h])});return q(b.length==n),b}drawCodewords(t){if(t.length!=Math.floor(x.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let a=0;for(let r=this.size-1;r>=1;r-=2){r==6&&(r=5);for(let s=0;s<this.size;s++)for(let o=0;o<2;o++){let n=r-o,i=(r+1&2)==0?this.size-1-s:s;!this.isFunction[i][n]&&a<t.length*8&&(this.modules[i][n]=ge(t[a>>>3],7-(a&7)),a++)}}q(a==t.length*8)}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let a=0;a<this.size;a++)for(let r=0;r<this.size;r++){let s;switch(t){case 0:s=(r+a)%2==0;break;case 1:s=a%2==0;break;case 2:s=r%3==0;break;case 3:s=(r+a)%3==0;break;case 4:s=(Math.floor(r/3)+Math.floor(a/2))%2==0;break;case 5:s=r*a%2+r*a%3==0;break;case 6:s=(r*a%2+r*a%3)%2==0;break;case 7:s=((r+a)%2+r*a%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[a][r]&&s&&(this.modules[a][r]=!this.modules[a][r])}}getPenaltyScore(){let t=0;for(let o=0;o<this.size;o++){let n=false,i=0,l=[0,0,0,0,0,0,0];for(let c=0;c<this.size;c++)this.modules[o][c]==n?(i++,i==5?t+=x.PENALTY_N1:i>5&&t++):(this.finderPenaltyAddHistory(i,l),n||(t+=this.finderPenaltyCountPatterns(l)*x.PENALTY_N3),n=this.modules[o][c],i=1);t+=this.finderPenaltyTerminateAndCount(n,i,l)*x.PENALTY_N3}for(let o=0;o<this.size;o++){let n=false,i=0,l=[0,0,0,0,0,0,0];for(let c=0;c<this.size;c++)this.modules[c][o]==n?(i++,i==5?t+=x.PENALTY_N1:i>5&&t++):(this.finderPenaltyAddHistory(i,l),n||(t+=this.finderPenaltyCountPatterns(l)*x.PENALTY_N3),n=this.modules[c][o],i=1);t+=this.finderPenaltyTerminateAndCount(n,i,l)*x.PENALTY_N3}for(let o=0;o<this.size-1;o++)for(let n=0;n<this.size-1;n++){let i=this.modules[o][n];i==this.modules[o][n+1]&&i==this.modules[o+1][n]&&i==this.modules[o+1][n+1]&&(t+=x.PENALTY_N2)}let a=0;for(let o of this.modules)a=o.reduce((n,i)=>n+(i?1:0),a);let r=this.size*this.size,s=Math.ceil(Math.abs(a*20-r*10)/r)-1;return q(0<=s&&s<=9),t+=s*x.PENALTY_N4,q(0<=t&&t<=2568888),t}getAlignmentPatternPositions(){if(this.version==1)return[];{let t=Math.floor(this.version/7)+2,a=Math.floor((this.version*8+t*3+5)/(t*4-4))*2,r=[6];for(let s=this.size-7;r.length<t;s-=a)r.splice(1,0,s);return r}}static getNumRawDataModules(t){if(t<x.MIN_VERSION||t>x.MAX_VERSION)throw new RangeError("Version number out of range");let a=(16*t+128)*t+64;if(t>=2){let r=Math.floor(t/7)+2;a-=(25*r-10)*r-55,t>=7&&(a-=36)}return q(208<=a&&a<=29648),a}static getNumDataCodewords(t,a){return Math.floor(x.getNumRawDataModules(t)/8)-x.ECC_CODEWORDS_PER_BLOCK[a.ordinal][t]*x.NUM_ERROR_CORRECTION_BLOCKS[a.ordinal][t]}static reedSolomonComputeDivisor(t){if(t<1||t>255)throw new RangeError("Degree out of range");let a=[];for(let s=0;s<t-1;s++)a.push(0);a.push(1);let r=1;for(let s=0;s<t;s++){for(let o=0;o<a.length;o++)a[o]=x.reedSolomonMultiply(a[o],r),o+1<a.length&&(a[o]^=a[o+1]);r=x.reedSolomonMultiply(r,2)}return a}static reedSolomonComputeRemainder(t,a){let r=a.map(s=>0);for(let s of t){let o=s^r.shift();r.push(0),a.forEach((n,i)=>r[i]^=x.reedSolomonMultiply(n,o))}return r}static reedSolomonMultiply(t,a){if(t>>>8||a>>>8)throw new RangeError("Byte out of range");let r=0;for(let s=7;s>=0;s--)r=r<<1^(r>>>7)*285,r^=(a>>>s&1)*t;return q(r>>>8==0),r}finderPenaltyCountPatterns(t){let a=t[1];q(a<=this.size*3);let r=a>0&&t[2]==a&&t[3]==a*3&&t[4]==a&&t[5]==a;return(r&&t[0]>=a*4&&t[6]>=a?1:0)+(r&&t[6]>=a*4&&t[0]>=a?1:0)}finderPenaltyTerminateAndCount(t,a,r){return t&&(this.finderPenaltyAddHistory(a,r),a=0),a+=this.size,this.finderPenaltyAddHistory(a,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(t,a){a[0]==0&&(t+=this.size),a.pop(),a.unshift(t)}};he.MIN_VERSION=1,he.MAX_VERSION=40,he.PENALTY_N1=3,he.PENALTY_N2=3,he.PENALTY_N3=40,he.PENALTY_N4=10,he.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],he.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];var Fp=he;function Y(e,t,a){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)a.push(e>>>r&1)}function ge(e,t){return(e>>>t&1)!=0}function q(e){if(!e)throw new Error("Assertion error")}var Tt=class ${constructor(t,a,r){this.mode=t;this.numChars=a;this.bitData=r;if(a<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(t){let a=[];for(let r of t)Y(r,8,a);return new $(xt.BYTE,t.length,a)}static makeNumeric(t){if(!$.isNumeric(t))throw new RangeError("String contains non-numeric characters");let a=[];for(let r=0;r<t.length;){let s=Math.min(t.length-r,3);Y(parseInt(t.substring(r,r+s),10),s*3+1,a),r+=s}return new $(xt.NUMERIC,t.length,a)}static makeAlphanumeric(t){if(!$.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let a=[],r;for(r=0;r+2<=t.length;r+=2){let s=$.ALPHANUMERIC_CHARSET.indexOf(t.charAt(r))*45;s+=$.ALPHANUMERIC_CHARSET.indexOf(t.charAt(r+1)),Y(s,11,a)}return r<t.length&&Y($.ALPHANUMERIC_CHARSET.indexOf(t.charAt(r)),6,a),new $(xt.ALPHANUMERIC,t.length,a)}static makeSegments(t){return t==""?[]:$.isNumeric(t)?[$.makeNumeric(t)]:$.isAlphanumeric(t)?[$.makeAlphanumeric(t)]:[$.makeBytes($.toUtf8ByteArray(t))]}static makeEci(t){let a=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)Y(t,8,a);else if(t<16384)Y(2,2,a),Y(t,14,a);else if(t<1e6)Y(6,3,a),Y(t,21,a);else throw new RangeError("ECI assignment value out of range");return new $(xt.ECI,0,a)}static isNumeric(t){return $.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return $.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(t,a){let r=0;for(let s of t){let o=s.mode.numCharCountBits(a);if(s.numChars>=1<<o)return 1/0;r+=4+o+s.bitData.length}return r}static toUtf8ByteArray(t){t=encodeURI(t);let a=[];for(let r=0;r<t.length;r++)t.charAt(r)!="%"?a.push(t.charCodeAt(r)):(a.push(parseInt(t.substring(r+1,r+3),16)),r+=2);return a}};Tt.NUMERIC_REGEX=/^[0-9]*$/,Tt.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,Tt.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";var va=Tt;import{jsx as Sa}from"react/jsx-runtime";var Mr=2,Hp=Dp(function({value:e,size:t,color:a="#000",background:r="#fff"}){let s=zp(()=>{let i=Fp.encodeText(e,wt.MEDIUM),l=[];for(let c=0;c<i.size;c++){let p=[];for(let b=0;b<i.size;b++){let h=i.getModule(b,c),m=p[p.length-1];m&&m.dark===h?m.length+=1:p.push({dark:h,length:1})}l.push(p)}return l},[e]),o=s.length+Mr*2,n=t/o;return Sa(T,{accessibilityRole:"image",accessibilityLabel:"QR code",style:{width:t,height:t,backgroundColor:r,padding:n*Mr},children:s.map((i,l)=>Sa(T,{style:{flexDirection:"row",height:n},children:i.map((c,p)=>Sa(T,{style:{width:c.length*n,height:n,backgroundColor:c.dark?a:r}},p))},l))})});import{Children as Wp,useEffect as jp,useRef as Up}from"react";import{Fragment as Vp,jsx as j,jsxs as kt}from"react/jsx-runtime";function Gp({children:e,style:t}){return j(H,{style:[y.sectionLabel,t],children:e})}function Yp({children:e,centered:t,tone:a="tertiary",style:r}){let s=Ue.flatten(r),o=!!s&&(s.marginHorizontal!=null||s.margin!=null);return j(H,{style:[y.footnote,o?null:y.footnoteInset,a==="secondary"?y.footnoteSecondary:null,a==="warning"?y.footnoteWarning:null,a==="danger"?y.footnoteDanger:null,t?y.footnoteCentered:null,r],children:e})}function Kp({children:e,padded:t,glass:a,style:r}){return j(T,{style:[y.card,a?y.cardGlass:null,t?y.cardPadded:null,r],children:e})}function Nr({inset:e=u.rowPadH}){return j(T,{style:[y.separator,{marginLeft:e}]})}function qp({children:e,inset:t=u.rowPadH}){let a=Wp.toArray(e);return j(Vp,{children:a.map((r,s)=>kt(T,{children:[s>0?j(Nr,{inset:t}):null,r]},r.key??s))})}var $r=56,Br=32,It=22,Dr=5,Jp=$r-It-Dr*2;function Xp({value:e,onValueChange:t,disabled:a,testID:r,accessibilityLabel:s}){let o=Up(new Ht.Value(e?1:0)).current;return jp(()=>{Ht.timing(o,{toValue:e?1:0,duration:200,useNativeDriver:Tg.OS!=="web"}).start()},[e,o]),j(ut,{activeOpacity:.8,disabled:a,onPress:()=>t(!e),testID:r,accessibilityLabel:s,accessibilityRole:"switch",accessibilityState:{checked:e,disabled:a},hitSlop:{top:8,bottom:8,left:8,right:8},style:[y.switchTrack,e?y.switchTrackOn:null,a?y.switchDisabled:null],children:j(Ht.View,{style:[y.switchThumb,e?y.switchThumbOn:null,{transform:[{translateX:o.interpolate({inputRange:[0,1],outputRange:[0,Jp]})}]}]})})}function Qp({label:e,selected:t,onPress:a,disabled:r,icon:s,testID:o}){return kt(ut,{activeOpacity:.7,disabled:r||!a,onPress:a,testID:o,style:[y.chip,t?y.chipSelected:null,r?y.chipDisabled:null],children:[s,j(H,{style:[y.chipText,t?y.chipTextSelected:null],children:e})]})}function Zp({label:e,onPress:t,variant:a="secondary",size:r="lg",icon:s,disabled:o,fullWidth:n=true,testID:i,accessibilityLabel:l}){let c=a==="primary"?u.color.onAccent:a==="tertiary"?u.color.text:a==="destructive"?u.color.danger:u.color.accent;return kt(ut,{activeOpacity:.7,disabled:o,onPress:t,testID:i,accessibilityRole:"button",accessibilityLabel:l??e,accessibilityState:{disabled:!!o},style:[y.button,r==="md"?y.buttonMd:y.buttonLg,a==="primary"?y.buttonPrimary:a==="ghost"?y.buttonGhost:y.buttonPlate,n?y.buttonFullWidth:null,o?y.buttonDisabled:null],children:[s,j(H,{style:[r==="md"?y.buttonTextMd:y.buttonTextLg,{color:c}],children:e})]})}function em({tabs:e,activeKey:t,onChange:a,size:r="md",glass:s,testIDPrefix:o}){let n=r==="sm";return j(T,{style:[y.segmentTrack,s?y.segmentTrackGlass:null],children:e.map(i=>{let l=i.key===t;return kt(ut,{activeOpacity:.7,testID:o?`${o}-${i.key}`:void 0,accessibilityRole:"tab",accessibilityState:{selected:l},accessibilityLabel:i.label,onPress:()=>a(i.key),style:[y.segment,n?y.segmentSm:null,l?s?y.segmentActiveGlass:y.segmentActive:null],children:[j(H,{style:[y.segmentText,n?y.segmentTextSm:null,l?y.segmentTextActive:null],children:i.label}),l?j(T,{style:[y.segmentUnderline,n?y.segmentUnderlineSm:null]}):null]},i.key)})})}function tm({label:e,tone:t="neutral"}){let a=t==="accent"?y.badgeAccent:t==="warning"?y.badgeWarning:t==="danger"?y.badgeDanger:t==="info"?y.badgeInfo:y.badgeNeutral,r=t==="accent"?y.badgeTextAccent:t==="warning"?y.badgeTextWarning:t==="danger"?y.badgeTextDanger:t==="info"?y.badgeTextInfo:y.badgeTextNeutral;return j(T,{style:[y.badge,a],children:j(H,{style:[y.badgeText,r],children:e})})}var y=Ue.create({sectionLabel:{color:u.color.textSecondary,fontSize:u.font.label,fontWeight:"600",letterSpacing:Ya,textTransform:"uppercase",marginBottom:8,marginLeft:u.labelInset},footnote:{color:u.color.textTertiary,fontSize:u.font.caption,fontWeight:"500",lineHeight:u.font.caption*1.4,marginTop:8},footnoteInset:{marginLeft:u.labelInset},footnoteSecondary:{color:u.color.textSecondary},footnoteWarning:{color:u.color.warning},footnoteDanger:{color:u.color.danger},footnoteCentered:{textAlign:"center",marginLeft:0},card:{backgroundColor:u.color.surface,borderRadius:u.radius.card,borderWidth:1,borderColor:u.color.border,overflow:"hidden"},cardGlass:{backgroundColor:u.color.glass,borderColor:u.color.glassBorder},cardPadded:{padding:u.cardPad,gap:10},separator:{height:Ue.hairlineWidth,backgroundColor:u.color.separator},switchTrack:{width:$r,height:Br,borderRadius:Br/2,borderWidth:1,borderColor:u.color.fillTertiary,backgroundColor:u.color.surfaceElevated,paddingHorizontal:Dr,justifyContent:"center",overflow:"hidden"},switchTrackOn:{backgroundColor:u.color.accentFill,borderColor:u.color.accentBorderStrong},switchDisabled:{opacity:.4},switchThumb:{width:It,height:It,borderRadius:It/2,backgroundColor:u.color.knob},switchThumbOn:{backgroundColor:u.color.accent},chip:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:14,paddingVertical:9,borderRadius:u.radius.chip,borderWidth:1.5,backgroundColor:u.color.buttonSurface,borderColor:u.color.fillTertiary},chipSelected:{borderColor:u.color.accentBorderStrong},chipDisabled:{opacity:.4},chipText:{fontSize:u.font.body,fontWeight:"500",color:u.color.textSecondary},chipTextSelected:{color:u.color.accent},button:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8},buttonMd:{height:34,paddingHorizontal:16,borderRadius:17},buttonLg:{height:50,paddingHorizontal:20,borderRadius:25},buttonPrimary:{backgroundColor:u.color.accent},buttonPlate:{backgroundColor:u.color.button},buttonGhost:{backgroundColor:"transparent"},buttonFullWidth:{alignSelf:"stretch"},buttonDisabled:{opacity:.4},buttonTextMd:{fontSize:15,fontWeight:"600"},buttonTextLg:{fontSize:17,fontWeight:"600"},segmentTrack:{flex:1,flexDirection:"row",backgroundColor:u.color.bg,borderRadius:u.radius.row,borderWidth:1,borderColor:u.color.border,padding:3},segment:{flex:1,paddingVertical:8,alignItems:"center",justifyContent:"center",borderRadius:u.radius.segment},segmentTrackGlass:{backgroundColor:u.color.glass,borderColor:u.color.glassBorder},segmentActive:{backgroundColor:u.color.surfaceElevated},segmentActiveGlass:{backgroundColor:u.color.glassElevated},segmentText:{fontSize:u.font.caption,fontWeight:"500",color:u.color.textSecondary},segmentTextActive:{fontWeight:"600",color:u.color.text},segmentUnderline:{position:"absolute",bottom:2,width:24,height:2.5,borderRadius:1.25,backgroundColor:u.color.accent,shadowColor:u.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:6},segmentSm:{paddingVertical:5},segmentTextSm:{fontSize:12},segmentUnderlineSm:{bottom:1.5,width:20,height:2,borderRadius:1},badge:{paddingHorizontal:8,paddingVertical:4,borderRadius:u.radius.badge,alignSelf:"flex-start"},badgeText:{fontSize:u.font.micro,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase"},badgeAccent:{backgroundColor:u.color.accentSoft},badgeTextAccent:{color:u.color.accent},badgeWarning:{backgroundColor:u.color.warningSoft},badgeTextWarning:{color:u.color.warning},badgeDanger:{backgroundColor:u.color.dangerSoft},badgeTextDanger:{color:u.color.danger},badgeInfo:{backgroundColor:u.color.infoSoft},badgeTextInfo:{color:u.color.info},badgeNeutral:{backgroundColor:u.color.fillSecondary},badgeTextNeutral:{color:u.color.textSecondary}});import{jsx as Ne,jsxs as am}from"react/jsx-runtime";function Ca(e){switch(Dt(String(e))){case"dev":return{label:"DEV",backgroundColor:w.warning};case"qa":return{label:"QA",backgroundColor:w.optional};case"staging":return{label:"STAGING",backgroundColor:w.success};case"prod":return{label:"PROD",backgroundColor:w.error};case"local":default:return{label:"LOCAL",backgroundColor:w.info}}}function rm({color:e}){return Ne("svg",{width:12,height:12,viewBox:"0 0 24 24","aria-hidden":"true",children:Ne("path",{d:"M6 9l6 6 6-6",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function sm({environment:e,interactive:t=false,onPress:a}){let r=Ca(e);return am("button",{onClick:t?a:void 0,"aria-label":`Environment: ${r.label}`,style:{display:"flex",flexDirection:"row",alignItems:"center",padding:`6px ${t?4:8}px 6px 8px`,flexShrink:0,background:"none",border:"none",cursor:t?"pointer":"default"},children:[Ne("div",{style:{width:8,height:8,borderRadius:4,backgroundColor:r.backgroundColor,marginRight:6,boxShadow:`0 0 4px ${r.backgroundColor}99`}}),Ne("span",{style:{fontSize:11,fontWeight:600,color:w.primaryLight,letterSpacing:.5},children:r.label}),t&&Ne("span",{style:{marginLeft:2,display:"flex"},children:Ne(rm,{color:"#7A8599"})})]})}import{jsx as Ae,jsxs as wa}from"react/jsx-runtime";var om=140,im=28,zr=44,nm=8,lm=24;function xa(e){switch(Dt(e)){case"local":return{label:"LOCAL",backgroundColor:w.info};case"dev":return{label:"DEV",backgroundColor:w.warning};case"qa":return{label:"QA",backgroundColor:w.optional};case"staging":return{label:"STAGING",backgroundColor:w.success};case"prod":return{label:"PROD",backgroundColor:w.error};default:return{label:"LOCAL",backgroundColor:w.info}}}function cm({environment:e,isSelected:t,onPress:a}){let r=xa(e);return wa(kg,{onPress:a,style:({pressed:s})=>[fe.optionContainer,t&&fe.optionContainerSelected,s&&fe.optionContainerPressed],children:[wa(T,{style:fe.optionLeft,children:[Ae(T,{style:[fe.optionDot,{backgroundColor:r.backgroundColor},{shadowColor:r.backgroundColor,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:4,elevation:2}]}),Ae(H,{style:fe.optionLabel,children:r.label})]}),t&&Ae(Ka,{size:14,color:w.success,strokeWidth:3})]})}function um({hasItems:e,currentEnvironment:t,availableEnvironments:a,onSelect:r,width:s=om,collapsedContent:o}){let n=nm+a.length*zr+lm+4,i=wa(T,{style:fe.collapsedEnvBadge,children:[Ae(T,{style:[fe.collapsedDot,{backgroundColor:xa(t).backgroundColor}]}),Ae(H,{style:fe.collapsedLabel,children:xa(t).label})]});return Ae(Va,{hasItems:e,width:s,expandedHeight:n,peekHeight:im,showCount:false,collapsedContent:o||i,collapsedLabel:`Switch environment from ${t}`,children:a.map(l=>Ae(cm,{environment:l,isSelected:l===t,onPress:()=>r(l)},l))})}var fe=Ue.create({collapsedEnvBadge:{flexDirection:"row",alignItems:"center",gap:6},collapsedDot:{width:8,height:8,borderRadius:4},collapsedLabel:{fontSize:11,fontWeight:"600",color:w.primaryLight,letterSpacing:.5},optionContainer:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,height:zr,width:"100%"},optionContainerSelected:{backgroundColor:"rgba(128, 128, 128, 0.1)"},optionContainerPressed:{backgroundColor:"rgba(128, 128, 128, 0.2)"},optionLeft:{flexDirection:"row",alignItems:"center",flex:1},optionDot:{width:8,height:8,borderRadius:4,marginRight:10},optionLabel:{fontSize:12,fontWeight:"600",color:w.primaryLight,letterSpacing:.5}});import{useState as Fr}from"react";import{jsx as re,jsxs as Et}from"react/jsx-runtime";var Hr=36;function dm({color:e,flipped:t}){return re("svg",{width:10,height:10,viewBox:"0 0 24 24","aria-hidden":"true",style:{transform:t?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms ease"},children:re("path",{d:"M18 15l-6-6-6 6",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function hm(){return re("svg",{width:12,height:12,viewBox:"0 0 24 24","aria-hidden":"true",children:re("path",{d:"M20 6L9 17l-5-5",fill:"none",stroke:"#4AFF9F",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})})}function gm({currentEnvironment:e,availableEnvironments:t,onSelect:a}){let[r,s]=Fr(false),[o,n]=Fr(null),i=Ca(e),l=t.length*Hr;return Et("div",{style:{position:"relative",zIndex:1e3,flexShrink:0},children:[re("div",{style:{position:"absolute",bottom:"100%",left:0,right:0,height:r?l:0,opacity:r?1:0,overflow:"hidden",transition:"height 200ms ease, opacity 200ms ease",backgroundColor:"rgba(8,12,21,0.95)",border:"1px solid #00B8E666",borderBottomWidth:0,borderTopLeftRadius:6,borderTopRightRadius:6,boxShadow:"0 -4px 8px rgba(0,0,0,0.3)"},children:t.map(c=>{let p=Ca(c),b=String(c).toLowerCase()===String(e).toLowerCase();return Et("button",{onClick:()=>{s(false),a(c)},onPointerEnter:h=>h.pointerType==="mouse"&&n(String(c)),onPointerLeave:()=>n(null),style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",height:Hr,padding:"0 10px",background:b?"rgba(128,128,128,0.1)":o===String(c)?"rgba(128,128,128,0.2)":"none",border:"none",cursor:"pointer"},children:[Et("span",{style:{display:"flex",alignItems:"center"},children:[re("span",{style:{width:6,height:6,borderRadius:3,backgroundColor:p.backgroundColor,marginRight:8}}),re("span",{style:{fontSize:10,fontWeight:600,color:w.primaryLight,letterSpacing:.5},children:p.label})]}),b&&re(hm,{})]},String(c))})}),Et("button",{onClick:()=>s(c=>!c),"aria-expanded":r,"aria-label":`Environment: ${i.label}. Click to switch.`,style:{display:"flex",alignItems:"center",gap:6,padding:"6px 6px 6px 8px",borderRadius:6,borderTopLeftRadius:r?0:6,borderTopRightRadius:r?0:6,backgroundColor:r?"rgba(8,12,21,0.95)":"transparent",border:"none",cursor:"pointer"},children:[re("span",{style:{width:8,height:8,borderRadius:4,backgroundColor:i.backgroundColor,boxShadow:`0 0 4px ${i.backgroundColor}99`}}),re("span",{style:{fontSize:11,fontWeight:600,color:w.primaryLight,letterSpacing:.5},children:i.label}),re(dm,{color:"#7A8599",flipped:r})]})]})}export{Ml as ARROW_BOTTOM_OFFSET,Nl as ARROW_HEIGHT,Bc as ASSETS_ICON_COLOR,Er as AccountSetup,Wa as AccountSetupButton,ii as ActionCopyButton,hu as Activity,Iu as ActivityIcon,zi as AddFilterButton,$i as AddFilterInput,mu as AlertCircle,Dd as AlertCircleIcon,yu as AlertOctagon,Su as AlertTriangle,Ou as AlertTriangleIcon,Cd as AskBuoyIcon,Mc as AssetsIcon,Wn as BACKGROUND_PRESETS,ll as BACKGROUND_STORAGE_KEY,Jd as BENCHMARK_ICON_COLOR,mg as BUOY_SYNTHETIC_MARK,Vi as BackButton,wl as BackgroundSwitcher,Gi as Badge,eu as BarChart3,ru as BarChart3Icon,Ag as BaseEventStore,Vd as BenchmarkIcon,Yh as BenchmarkLegacyIcon,Tu as Bookmark,Au as Box,Mu as BoxIcon,np as BubbleSettingsDetail,ip as BubbleSettingsSection,Pu as Bug,vd as BugIcon,bo as CELLS,vo as CLIP_OFFSCREEN_CELLS,mh as CLOCK_TOOL_ICON_COLOR,pc as CONSOLE_ICON_COLOR,vr as COPY_PAYLOAD_MAX_BYTES,gc as CameraIcon,Gg as ChangeLog,li as ChangeRow,Ka as Check,$u as CheckCircle,zc as CheckCircle2,jd as CheckCircle2Icon,Hu as CheckCircleIcon,Du as CheckIcon,uu as CheckSquare,Lc as CheckSquareIcon,ju as ChevronDown,Vu as ChevronDownIcon,Yu as ChevronLeft,qu as ChevronLeftIcon,Xu as ChevronRight,Zu as ChevronRightIcon,td as ChevronUp,uc as ChevronUpIcon,Di as ChipStrip,mn as ClipboardHintBanner,hc as Clock,sd as ClockIcon,dh as ClockToolIcon,nu as Cloud,du as CloudIcon,Zn as CollapsibleSection,fo as CompactFilterChips,Ll as CompactRow,Lo as CompareBar,dg as ConsoleIcon,id as Copy,Xo as CopyButton,cd as CopyIcon,en as CountBadge,Ga as CyberpunkSectionButton,Gn as DEFAULT_BACKGROUND,An as DEVTOOLS_CARD_CONSTANTS,rl as DataInspector,qa as Database,Td as DatabaseIcon,Al as DaylightTunable,vn as DeepFieldTunable,Hn as DetailView,Uo as DetailViewToggle,Pn as DevToolsCard,Oo as DiffModeTabs,pd as DockBottom,Sd as Download,ch as DownloadIcon,Vn as DraggableHeader,dl as DynamicFilterView,lg as ENV_ICON_COLOR,xo as EVENT_LIST_PRESET,kd as Edit3,gd as Edit3Icon,un as EmptyState,Ri as EntityFilterView,og as EnvIcon,$d as EnvLaptopIcon,sm as EnvironmentIndicator,um as EnvironmentSelector,gm as EnvironmentSelectorInline,No as EventHistoryViewer,Cn as EventListItem,Do as EventPickerModal,El as EventStepperFooter,Bu as EventsIcon,Va as ExpandablePopover,yo as ExpandedInfoRow,Ui as ExportPreview,Md as Eye,yd as EyeIcon,Ja as EyeOff,xd as EyeOffIcon,Yn as FeatureGate,Cc as FileCode,Ad as FileCodeIcon,zd as FileJson,Th as FileJsonIcon,Ud as FileText,Pd as FileTextIcon,qd as Film,pu as FilmIcon,eh as Filter,Li as FilterBadge,Bd as FilterIcon,Wi as FilterList,Oi as FilterSection,oh as FlaskConical,Wd as FlaskConicalIcon,uh as FloatWindow,jl as FloatingTool,Fl as FloatingToolDivider,ql as FloatingToolHost,Hl as FloatingToolUserStatus,Ii as FooterButton,Si as FooterCaption,xi as FooterMessage,bi as FooterRow,zo as FreeAccountPrompt,lc as GAME_UI_ALERT_STATES,rc as GameUICollapsibleSection,ic as GameUICompactStats,nc as GameUIIssuesList,oc as GameUIStatusHeader,ph as GitBranch,Yd as GitBranchIcon,Sh as Globe,Rd as GlobeIcon,qn as GripVerticalIcon,Uc as Hand,Mh as HandIcon,kc as HardDrive,Qd as HardDriveIcon,kh as Hash,rh as HashIcon,$n as HeaderSearchButton,wu as HelpCircle,nd as HighlightIcon,Bh as HighlightUpdatesIcon,Id as HighlighterIcon,Sn as HintsProvider,hs as HistoryEntryRow,gs as HistoryList,is as HistoryProvider,Oh as Home,Wc as HomeIcon,Oc as IMAGES_ICON_COLOR,qc as IMAGE_OVERLAY_ICON_COLOR,jc as IMPERSONATE_ICON_COLOR,_d as IconBackground,ld as IconCircle,rd as IconContainer,bd as IconLine,hd as IconRect,Nh as Image,vu as ImageIcon,Vc as ImageOverlayIcon,Ec as ImagesIcon,Fc as ImpersonateIcon,Fh as Info,lh as InfoIcon,Ho as InfoRow,ei as InlineCopyButton,lu as JOTAI_ICON_COLOR,su as JotaiIcon,Bp as JsModal,Vh as Key,gh as KeyIcon,$h as LIFECYCLE_TOOL_ICON_COLOR,Gh as LOCATION_TOOL_ICON_COLOR,_o as LOGIN_COMMAND,Eo as LOG_LIST_PRESET,Hd as LaptopIcon,Jh as Layers,yh as LayersIcon,_n as LicenseEntryModal,_h as LifecycleToolIcon,pn as LinearFade,eg as Link,Rh as LinkIcon,Ei as ListItem,Dn as LiveSkyTunable,Hh as LocationToolIcon,rg as Lock,fh as LockIcon,sa as LogLevel,sa as LogLevelEnum,oa as LogType,oa as LogTypeEnum,Bo as MAX_PERIOD,Pc as Maximize2,xh as Maximize2Icon,cn as MethodBadge,ig as Minus,Ah as MinusIcon,yi as ModalHeader,Ci as ModalHintBanner,kl as MoonlightTunable,cg as Music,xu as MusicIcon,ag as NETWORK_ICON_COLOR,Ya as NIGHT_LABEL_TRACKING,ih as NOTIFICATIONS_ICON_COLOR,hg as Navigation,wh as NavigationIcon,Ed as NetworkGlobeIcon,Zh as NetworkIcon,tm as NightBadge,Zp as NightButton,Kp as NightCard,Qp as NightChip,Yp as NightFootnote,qp as NightRows,Gp as NightSectionLabel,em as NightSegmented,Nr as NightSeparator,Xp as NightSwitch,fn as NoDataEmptyState,yn as NoResultsEmptyState,wn as NoSearchResultsEmptyState,th as NotificationsIcon,al as OTTO_ANCHORS,il as OTTO_ANCHOR_SIZE,Fn as OTTO_GRID,yl as OTTO_GROUPS,ul as OTTO_NOTES,Un as OTTO_PALETTE,xl as OTTO_REEL,po as OTTO_SCENES,Yi as OTTO_SCENE_BY_ID,Xi as OTTO_SCENE_CROP_H,_i as OTTO_SCENE_H,Mi as OTTO_SCENE_OTTO,ki as OTTO_SCENE_PALETTE,Ai as OTTO_SCENE_W,Qn as OTTO_STATES,fl as OTTO_STATE_NAMES,Cl as OTTO_USES,wi as Otto,mi as OttoMotionView,ni as OttoPixels,tn as OttoSceneFrame,on as OttoSceneStill,ui as OttoStill,Ih as PERMISSIONS_ICON_COLOR,mt as PERSONAL_SETTING_KEYS,br as PREVIEW_ITEM_RENDER_BYTE_LIMIT,mc as Palette,Lh as PaletteIcon,Sc as Pause,Dh as PauseIcon,Ch as PermissionsIcon,Eu as Phone,_u as PhoneIcon,di as Pill,wo as PillBadge,bc as Pin,Tc as Play,jh as PlayIcon,Ac as Plus,Kh as PlusIcon,_c as Power,Zd as PowerIcon,Pl as PowerToggleButton,wd as PrimitiveGlobeIcon,Nn as ProBadge,tl as ProFeatureBanner,zn as ProUpgradeModal,Hp as QrCodeView,Od as QueryIcon,Es as REMOTE_RELOAD_DELAY_MS,dn as RadialGlow,nn as RasterLayer,Gd as ReactQueryIcon,dd as ReduxIcon,Nc as RefreshCw,Qh as RefreshCwIcon,oi as RelativeTime,Wh as RenderCountIcon,Ph as RenderPulseIcon,Kc as Route,Qu as RouteDotIcon,bh as RouteIcon,hh as RouteMapIcon,Ku as RoutePathIcon,Uu as RoutePinIcon,ad as RouteTwoPinsIcon,Fu as RoutesIcon,$l as SPACING_GAP,Nd as ScenariosIcon,Dc as Search,nl as SearchBar,tg as SearchIcon,Ti as SectionHeader,Xd as SentryBugIcon,Lu as SentryIcon,Cr as SentryLogger,Hc as Server,Kd as ServerIcon,Ft as Settings,sg as SettingsIcon,Gc as SettingsSolid,fr as SettingsSync,Jc as Shield,ng as ShieldIcon,Nu as Smartphone,zu as SmartphoneIcon,iu as Square,fu as SquareDashed,$c as SquareDashedIcon,Rc as SquareIcon,Eh as StackPulseIcon,fs as StandaloneHistoryList,Tn as StatsCard,Ji as StatusBadge,Ln as StatusIndicator,md as StorageIcon,ah as StorageStackIcon,Zi as StorageTypeBadge,za as Subscribable,ur as TEAM_SETTING_KEYS,Wo as TIER_LIMITS,xc as TIME_MACHINE_ICON_COLOR,Mo as TRANSPARENT,gn as TabSelector,Yc as TestTube2,ug as TestTube2Icon,Jo as TickProvider,Bn as TimeDisplay,vc as TimeMachineIcon,Wu as Timer,Gu as TimerIcon,Pi as ToggleRow,zt as ToolBackground,bn as ToolButton,kn as ToolEmptyState,fi as ToolFooter,mr as ToolScreenHeaderContext,ci as ToolbarClearButton,ri as ToolbarCopyButton,Ju as Touchpad,ed as TouchpadIcon,au as Trash,Zc as Trash2,fc as Trash2Icon,zh as TrashIcon,Xc as TriangleAlert,Uh as TriangleAlertIcon,sn as TypeBadge,ou as Unlock,vh as UnlockIcon,ol as UpgradeModal,jn as UpgradePrompt,cu as Upload,sh as UploadIcon,gu as User,qh as UserIcon,dc as Users,od as UsersIcon,qi as ValueTypeBadge,Io as ViewToggleCards,ud as Volume,fd as VolumeIcon,Ro as WATER_CELLS,Po as WATER_FRAMES,Co as WATER_ROW0,ko as WATER_ROWS,pt as WIRE_DETAIL_LIMIT_BYTES,or as WIRE_INLINE_LIMIT_BYTES,bu as Wifi,Fd as WifiBifIcon,nh as WifiCircuitIcon,Ld as WifiIcon,Tl as WindowControls,xn as Wormhole,ku as X,Cu as XCircle,wc as XCircleIcon,yc as XIcon,tu as ZUSTAND_ICON_COLOR,Ru as Zap,Ic as ZapIcon,Qc as ZustandIcon,sc as absoluteFill,Sr as add,ft as approxJsonSize,Re as assertAccountAccess,hl as backgroundStore,Ps as browserRouter,K as buoyColors,zl as calculateTargetPosition,Dl as calculateTooltipPosition,gp as callCapacitorNative,_f as canOpenBuoyTools,nr as capDetail,jf as classifyPreviewItem,rp as clearEntries,hn as copyToClipboard,bg as countBuoyListener,rn as createAutoDetectedClipboard,zf as createRestoreScope,hf as createSyncAdapter,Cf as createToolFactory,Vg as createToolStore,qo as cycleIndexes,cp as definePersistedSetting,Sf as defineToolPreset,df as detailByIdAction,ke as devToolsStorageKeys,fg as dialColors,Yl as dismissFloatingTool,Ef as dispatchToolAction,tc as displayValue,Ff as emptyRestoreResult,Gf as entityColor,Vt as expandKeyedArrays,Ua as expandableWindowControlsSupported,Hf as failedRestore,sr as findKeyPath,jo as flatColors,ao as flattenObject,yr as formatBytes,qf as formatDuration,Zf as formatHttpStatus,Jf as formatNumber,ro as formatPath,Yo as formatRelativeTime,Zs as formatValue,Yf as formatValuePreview,w as gameUIColors,pe as getAccountAccess,ln as getAutoDetectedClipboard,Wl as getBubbleAnchorPosition,lp as getBubbleVisibilitySettings,oo as getCachedOptionalModule,hp as getCapacitorAppStorage,Ks as getConstructorName,Rs as getDevServerOrigin,Cs as getDeviceInfo,ap as getEntries,Ul as getFloatingTools,ep as getMethodColor,sl as getPreset,yg as getRealAppState,Ws as getRegisteredToolModule,no as getRenderCaptureProvider,pg as getSafeAreaInsets,Ds as getSafeCurrentPathname,zs as getSafeCurrentRoute,Bs as getSafeRouter,Bl as getScreenCenterY,In as getSkyScrub,uo as getStateSnapshotProvider,co as getStateSnapshotProviders,xg as getStorageBackendType,_e as getToolAdapters,Lf as getToolAttention,xs as getToolModuleVersion,eo as getTypeColor,Ha as getUseAccountAccess,cl as getUseIsPro,gl as getUseLicense,bl as getUseTier,Js as getValueSize,Vs as getValueType,Fo as gridKey,pr as guardToolAdapter,X as hasAccountAccess,fp as hasCapacitorPlugin,Ut as identityField,ee as ignoredPatternsStore,pp as isCapacitorNative,Sg as isDevToolsStorageKey,qs as isEmpty,Fs as isExpoRouterAvailable,Fa as isJsonSerializable,of as isOnDeviceMarker,Kt as isOverWireBudget,Xs as isPlainObjectUtil,Gs as isPrimitive,Sl as isProNow,Zt as isToolRegistryReady,Lg as isUrlIgnored,wg as isUsingPersistentStorage,Ys as isValidJson,Oe as listShapes,kf as listSnapshotToolIds,Tf as listToolActions,xf as listToolIds,so as loadOptionalModule,ws as logDeviceInfo,ct as macOSColors,lf as memoByIdentity,cr as mergeChangeSources,Xh as monoFont,si as motionUnits,cf as newestFitting,u as night,pi as noWindowDragProps,Dt as normalizeEnvironment,We as notifySubscriberCountChange,sf as onDeviceMarker,ff as onSettingsApplied,Of as openBuoyTool,Gl as openFloatingTool,Go as ottoCycle,Il as ottoReel,_l as ottoRuns,ji as ottoSceneBounds,Fi as ottoSceneRuns,ti as ottoSheets,Kn as ottoWaterRows,ac as parseDisplayValue,Gt as parsePath,tp as parseUrl,Qs as parseValue,ef as patchFromPath,W as persistentStorage,el as presetAt,Jn as presetIndex,lr as readParams,Zg as readPath,If as readToolSnapshot,Bt as realNow,Qo as rectsOf,gg as refreshGameUIColors,rf as refusalText,Os as registerBrowserRouter,Kl as registerPersistentFloatingTool,lo as registerStateSnapshotProvider,wf as registerToolAdapters,Hs as registerToolModules,Rf as registerToolOpener,Is as reloadApp,Rl as renderOttoFrame,Bi as renderOttoScene,ms as resetPersistedStateCache,Vo as resolveEffectiveTier,Rn as resolveListEmptyState,ks as resolveReloadStrategy,So as retryAccountAccess,Ql as safeStringify,mo as scatter,As as scheduleReloadApp,op as sentryLogger,pl as setExpandableWindowControls,io as setRenderCaptureProvider,On as setSkyScrub,Pf as setToolAttention,Kf as shallowDiffSummary,Ke as shapeKind,Ge as shapeOf,Xg as shapeSummary,qg as shapesWereTruncated,To as signOutOfBuoy,uf as sizeOrStub,Hi as sizeWarningLevel,Wf as skippedRestore,yf as startSettingsSync,je as subscribeAccountAccess,_s as subscribeBrowserNavigation,Vl as subscribeFloatingTools,vg as subscribeRealAppState,Ts as subscribeToStateSnapshotProviders,Us as subscribeToSubscriberCountChanges,Mf as subscribeToolAttention,js as subscriberCountNotifier,tf as suggestedPatch,ec as superJsonDeserialize,Zl as superJsonSerialize,vf as syncSettingsNow,ht as teamSettingsStore,nf as toWire,Ol as toolTheme,Qf as truncateMiddle,Xf as truncatePayload,to as truncateText,ir as truncatedNote,Yt as typedEditViolations,Vf as unionKeys,Jg as unshapedLists,Xa as urlMatchesIgnoredPattern,us as useAllHistoryEntries,bs as useChangeLog,Ni as useChipTap,Ss as useDeviceInfo,vs as useEventStoreEvents,Xn as useFeatureGate,Jl as useFilterManager,cc as useGameUIAlertState,En as useHintsContext,ja as useHintsDisabled,cs as useHistoryAdapter,ls as useHistoryAdapters,ns as useHistoryContext,ds as useHistoryEntryCounts,Fg as useIgnoredPatterns,Ko as useLimit,Qi as useLoop,vi as useOttoAnchorMotion,gi as useOttoReel,ps as usePersistedState,an as usePulse,ai as useRelativeTime,Xl as useSafeAreaInsets,$s as useSafeGlobalSearchParams,Ms as useSafePathname,Ls as useSafeRouter,Ns as useSafeSegments,Mn as useSkyScrub,ys as useSubscribedValue,jg as useTeamList,Zo as useTick,ml as useToolBackground,Df as useToolScreenHeader,Af as waitForToolRegistry,hi as windowDragProps,Ki as withBgAlpha,Uf as wontApply};
|
|
14
|
+
`}),He("div",{"data-account-launcher":"",children:He(Aa,{expanded:e,onPress:()=>t(o=>!o)})}),e&&He("section",{ref:r,className:"buoy-account-panel",role:"dialog","aria-labelledby":n,tabIndex:-1,onBlur:o=>{o.relatedTarget instanceof Node&&!a.current?.contains(o.relatedTarget)&&s(false)},children:He(Nn,{titleId:n,onClose:()=>s()})})]}),document.body)}import{useState as Q,useRef as B,useEffect as te,useLayoutEffect as df,useCallback as $,memo as Qt,isValidElement as hf,cloneElement as gf}from"react";var ut=class{static async save(e,t){this.cache.set(e,t);try{await W.setItem(e,JSON.stringify(t))}catch{}}static async load(e){if(this.cache.has(e))return this.cache.get(e);try{let t=await W.getItem(e);if(t){let a=JSON.parse(t);return this.cache.set(e,a),a}}catch{}return null}static saveMinimized(e,t){return this.save(e,{mode:t.mode,panelHeight:t.panelHeight,dimensions:t.floatingDimensions&&t.floatingPosition?{...t.floatingDimensions,top:t.floatingPosition.y,left:t.floatingPosition.x}:void 0,isVisible:false})}};ut.cache=new Map;import{Fragment as pf,jsx as g,jsxs as N}from"react/jsx-runtime";var L={base:"#121212",card:"#1A1A1A",border:"#333333",textMuted:"#888888",primary:"#20C997"},D={primary:"#F5F5F7",primaryLight:"#F5F5F7",secondary:"#A1A1A6",muted:"#8E8E93",success:"#34C759",info:"#00B8E6"},ff=100,bf=400,fr=500,ke=80,dt=()=>typeof window<"u"?window.innerWidth:0,ue=()=>typeof window<"u"?window.innerHeight:0,br=e=>1-Math.pow(1-e,3),Ue=e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2;function ve(e,t,a,r){let n=0,s=false,o=performance.now(),i=l=>{if(s)return;let d=Math.min((l-o)/e,1);a(t(d)),d<1?n=requestAnimationFrame(i):r?.()};return n=requestAnimationFrame(i),()=>{s=true,cancelAnimationFrame(n)}}function mf(){if(typeof document>"u")return{top:0,left:0,right:0,bottom:0};let e=document.createElement("div");e.style.cssText="position:fixed;top:env(safe-area-inset-top);left:env(safe-area-inset-left);right:env(safe-area-inset-right);bottom:env(safe-area-inset-bottom);visibility:hidden;pointer-events:none",document.body.appendChild(e);let t=e.getBoundingClientRect();return document.body.removeChild(e),{top:Math.max(0,t.top),left:Math.max(0,t.left),right:Math.max(0,window.innerWidth-t.right),bottom:Math.max(0,window.innerHeight-t.bottom)}}function Xt(e,t,a=false){let r=Math.max(ke,window.innerWidth-t.left-t.right),n=Math.max(ke,window.innerHeight-t.top-t.bottom),s=Math.min(e.width,r),o=Math.min(e.height,n);return{width:s,height:o,left:Math.max(t.left,Math.min(e.left,window.innerWidth-t.right-s)),top:Math.max(t.top,Math.min(e.top,window.innerHeight-t.bottom-(a?ke:o)))}}var Zt=({size:e=24,color:t="currentColor",strokeWidth:a=2})=>N("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[g("line",{x1:18,y1:6,x2:6,y2:18,stroke:t,strokeWidth:a,strokeLinecap:"round"}),g("line",{x1:6,y1:6,x2:18,y2:18,stroke:t,strokeWidth:a,strokeLinecap:"round"})]}),ea=({size:e=24,color:t="currentColor",strokeWidth:a=2})=>g("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:g("line",{x1:5,y1:12,x2:19,y2:12,stroke:t,strokeWidth:a,strokeLinecap:"round"})}),mr=({size:e=24,color:t="currentColor",strokeWidth:a=2})=>N("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[g("rect",{x:3,y:3,width:18,height:18,rx:2,stroke:t,strokeWidth:a}),g("rect",{x:3,y:14,width:18,height:7,fill:t})]}),yr=({size:e=24,color:t="currentColor",strokeWidth:a=2})=>N("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[g("rect",{x:3,y:3,width:14,height:14,rx:2,stroke:t,strokeWidth:a}),g("line",{x1:7,y1:17,x2:7,y2:21,stroke:t,strokeWidth:a}),g("line",{x1:7,y1:21,x2:21,y2:21,stroke:t,strokeWidth:a}),g("line",{x1:21,y1:21,x2:21,y2:7,stroke:t,strokeWidth:a}),g("line",{x1:17,y1:7,x2:21,y2:7,stroke:t,strokeWidth:a})]}),ne={close:"#FF5F57",minimize:"#FEBC2E",toggleMode:"#28C840"},ta=24,yf=2,Ie=8,aa=e=>({width:ta,height:ta,borderRadius:ta/2,display:"flex",alignItems:"center",justifyContent:"center",background:`radial-gradient(circle, ${e} 6px, transparent 6px)`,border:"none",padding:0,cursor:"pointer",flexShrink:0});function vf(e){return vl()&&Pa(true)?g(Tf,{...e}):g(Sf,{...e})}function Sf({onClose:e,onMinimize:t,onToggleMode:a,mode:r}){let n=r==="floating"?mr:yr,s=r==="floating"?"Dock to bottom sheet":"Make floating window";return N("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:yf},children:[t&&g("button",{type:"button",onClick:t,style:aa(ne.minimize),"aria-label":"Minimize modal",children:g(ea,{size:Ie,color:"#7A5A00",strokeWidth:1.5})}),a&&g("button",{type:"button",onClick:a,style:aa(ne.toggleMode),"aria-label":s,children:g(n,{size:Ie,color:"#004A1A",strokeWidth:1.5})}),g("button",{type:"button",onClick:e,style:aa(ne.close),"aria-label":"Close modal",children:g(Zt,{size:Ie,color:"#4A0000",strokeWidth:1.5})})]})}var ra=12,Cf=8,ht=36,wf=12,sa=16,gt=8,xf=3e3,na=150,oa=e=>({width:ra,height:ra,borderRadius:ra/2,backgroundColor:e,display:"flex",alignItems:"center",justifyContent:"center"}),ia=(e,t,a,r)=>({width:ht,height:ht,borderRadius:ht/2,display:"flex",alignItems:"center",justifyContent:"center",padding:0,cursor:"pointer",flexShrink:0,backgroundColor:e?a:t,border:e?`1px solid ${r}`:"none"});function Tf({onClose:e,onMinimize:t,onToggleMode:a,mode:r,variant:n="night"}){let s=n==="night",[o,i]=Q(false),[l,d]=Q(false),b=B(null),y=B(null),p=r==="floating"?mr:yr,m=r==="floating"?"Dock to bottom sheet":"Make floating window",S=$(()=>{b.current&&clearTimeout(b.current),y.current&&clearTimeout(y.current),b.current=null,y.current=null},[]),_=$(()=>{S(),d(false),y.current=setTimeout(()=>i(false),na)},[S]),F=$(()=>{S(),i(true),requestAnimationFrame(()=>requestAnimationFrame(()=>d(true))),b.current=setTimeout(_,xf)},[S,_]);te(()=>S,[S]);let V=M=>{_(),M()};return N(pf,{children:[N("button",{type:"button",onClick:F,"aria-label":"Open window controls","data-testid":"tool-window-controls",style:{padding:10,margin:-8,border:"none",background:"transparent",cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",gap:Cf},children:[t&&g("span",{style:oa(ne.minimize),children:g(ea,{size:Ie,color:"#7A5A00",strokeWidth:1.5})}),a&&g("span",{style:oa(ne.toggleMode),children:g(p,{size:Ie,color:"#004A1A",strokeWidth:1.5})}),g("span",{style:oa(ne.close),children:g(Zt,{size:Ie,color:"#4A0000",strokeWidth:1.5})})]}),o&&g("div",{style:{position:"absolute",top:-gt,right:-gt,zIndex:9999,transform:`scale(${l?1:.3})`,opacity:l?1:0,transition:`transform ${na}ms ease-out, opacity ${na}ms ease-out`},children:N("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:wf,padding:gt,borderRadius:(ht+gt*2)/2,backgroundColor:s?c.color.surface:L.card,border:`1px solid ${s?c.color.border:L.border}`,boxShadow:"0 4px 12px rgba(0,0,0,0.4)"},children:[t&&g("button",{type:"button",onClick:()=>V(t),"aria-label":"Minimize modal","data-testid":"tool-window-minimize",style:ia(s,ne.minimize,c.color.warningSoft,c.color.warning+"59"),children:g(ea,{size:sa,color:s?c.color.warning:"#7A5A00",strokeWidth:2})}),a&&g("button",{type:"button",onClick:()=>V(a),"aria-label":m,"data-testid":"tool-window-mode",style:ia(s,ne.toggleMode,c.color.accentSoft,c.color.accentBorderStrong),children:g(p,{size:sa,color:s?c.color.accent:"#004A1A",strokeWidth:2})}),g("button",{type:"button",onClick:()=>V(e),"aria-label":"Close modal","data-testid":"tool-window-close",style:ia(s,ne.close,c.color.dangerSoft,c.color.danger+"59"),children:g(Zt,{size:sa,color:s?c.color.danger:"#4A0000",strokeWidth:2})})]})})]})}var vr=Qt(function({isResizing:e,mode:t,hasCustomContent:a=false,variant:r="default"}){let n=t==="floating",s=r==="night";return N("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",position:"relative",justifyContent:a?"center":void 0,minHeight:a?32:void 0,paddingTop:a?0:8,paddingBottom:a?0:8,backgroundColor:"transparent"},children:[g("div",{style:{width:s?36:e?40:n?50:40,height:s||n?5:3,backgroundColor:s?c.color.placeholder:e?L.primary:n?L.textMuted:L.primary,borderRadius:s?2.5:2,boxShadow:s?"none":`0 0 4px ${L.primary}99`}}),e&&t==="bottomSheet"&&g("div",{style:{position:"absolute",display:"flex",flexDirection:"row",gap:2,marginTop:12},children:[0,1,2].map(o=>g("div",{style:{width:12,height:1,backgroundColor:D.success,opacity:.6}},o))})]})}),kf=Qt(function({onAcknowledge:e}){return g("div",{style:{backgroundColor:`${D.info}15`,borderLeft:`3px solid ${D.info}`,borderRadius:8,margin:"8px 12px 4px",overflow:"hidden",boxShadow:`0 0 8px ${D.info}4D`,flexShrink:0},children:N("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",padding:12,gap:12},children:[N("div",{style:{width:32,height:32,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:[g("div",{style:{position:"absolute",width:20,height:20,borderRadius:10,border:`2px solid ${D.info}`,opacity:.6,transform:"scale(0.8)",boxSizing:"border-box"}}),g("div",{style:{position:"absolute",width:20,height:20,borderRadius:10,border:`2px solid ${D.info}`,boxSizing:"border-box"}})]}),N("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[g("span",{style:{fontSize:13,fontWeight:600,color:D.info,letterSpacing:.3},children:"\u{1F4A1} Pro Tip"}),g("span",{style:{fontSize:12,color:D.primaryLight,lineHeight:"16px"},children:"Double-tap the header to transform this into a floating modal"})]}),g("button",{type:"button",onClick:e,style:{backgroundColor:`${D.info}30`,padding:"6px 12px",borderRadius:6,border:`1px solid ${D.info}50`,fontSize:12,fontWeight:600,color:D.info,cursor:"pointer",fontFamily:"inherit",flexShrink:0},children:"Got it!"})]})})});function Sr({header:e,isResizing:t,mode:a,onMinimize:r,variant:n="default"}){if(e?.customContent){let s=e.customContent;return hf(e.customContent)&&r&&(s=gf(e.customContent,{onMinimize:r})),N("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",minWidth:0},children:[g(vr,{isResizing:t,mode:a,hasCustomContent:true,variant:n}),s]})}return N("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",position:"relative",minWidth:0},children:[g(vr,{isResizing:t,mode:a,variant:n}),N("div",{style:{padding:"0 16px",display:"flex",flexDirection:"column",alignItems:"center"},children:[e?.title&&g("span",{style:{fontSize:16,fontWeight:600,color:D.primary},children:e.title}),e?.subtitle&&g("span",{style:{fontSize:12,color:D.secondary,paddingTop:4},children:e.subtitle})]}),g("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:g("span",{style:{fontSize:10,color:D.muted,fontStyle:"italic"},children:"Double tap: Toggle \u2022 Triple tap: Close"})})]})}var If=({visible:e,onClose:t,children:a,header:r,styles:n={},minHeight:s=ff,maxHeight:o,initialHeight:i=bf,animatedHeight:l,benchMotion:d,initialMode:b="bottomSheet",onModeChange:y,persistenceKey:p,enablePersistence:m=true,initialFloatingPosition:S,footer:_,footerHeight:F=0,onBack:V,onMinimize:M,minimizeRequest:v=0,minimizeTargetPosition:ae,initialModalState:P,zIndex:Ge,disableScrollWrapper:Er=false,background:da=true,variant:Ve="night"})=>{let[q]=Q(mf),[ha,ga]=Q(!m),[R,mt]=Q(b),Ye=B(y);Ye.current=y;let[Ee,de]=Q(false),[yt,Oe]=Q(false),[Or,vt]=Q(i),[re,Ae]=Q(()=>Xt({width:dt(),height:fr,top:S?.y??(ue()-fr)/2,left:S?.x??0},q)),[Ar,qe]=Q(false),[Rr,pa]=Q(false),Lr=Ra(),he=B(i),J=B(re),H=B({x:re.left,y:re.top}),Je=B(null),St=B(null),se=B(null),ge=B([]),Z=$(()=>{ge.current.forEach(u=>u()),ge.current=[]},[]);te(()=>{J.current=re},[re]),te(()=>Z,[Z]);let fa=o||ue()-q.top;te(()=>{if(!m||!p){ga(true);return}let u=true;return(async()=>{let h=await ut.load(p);if(u&&h&&(h.mode&&(mt(h.mode),Ye.current?.(h.mode)),h.panelHeight&&(vt(h.panelHeight),he.current=h.panelHeight),h.dimensions)){let C=Xt(h.dimensions,q,true);Ae(C),H.current={x:C.left,y:C.top}}u&&ga(true)})(),()=>{u=false}},[p,m]),te(()=>{if(!m||!p||!ha)return;let u=setTimeout(()=>{ut.save(p,{mode:R,panelHeight:he.current,dimensions:re,isVisible:e})},500);return()=>clearTimeout(u)},[R,Or,re,e,p,m,ha]),te(()=>{let u=true;return(async()=>{try{let h=me.modal.hintAcknowledged(),C=await W.getItem(h);u&&(qe(C!=="true"),pa(true))}catch{u&&(qe(true),pa(true))}})(),()=>{u=false}},[]);let Pr=$(async()=>{try{let u=me.modal.hintAcknowledged();await W.setItem(u,"true"),qe(false)}catch{qe(false)}},[]),Ct=$(()=>{Oe(false),de(false);let u=R==="bottomSheet"?"floating":"bottomSheet";mt(u),Ye.current?.(u)},[R]);te(()=>{Oe(false),de(false)},[R]);let pe=$(()=>{if(!M)return;let u={mode:R,panelHeight:he.current,floatingPosition:{x:J.current.left,y:J.current.top},floatingDimensions:{width:J.current.width,height:J.current.height}};m&&p&&ut.saveMinimized(p,u);let h=ae?.x??dt()-50,C=ae?.y??ue()-150;if(Z(),R==="bottomSheet"){let k=Je.current;if(!k){M(u);return}let x=ue();ge.current.push(ve(300,Ue,O=>{k.style.opacity=String(1-O),k.style.transform=`translateY(${O*x}px)`},()=>M(u)))}else{let k=se.current;if(!k){M(u);return}let x={...H.current};ge.current.push(ve(300,Ue,O=>{k.style.opacity=String(1-O);let fe=x.x+(h-x.x)*O,be=x.y+(C-x.y)*O;k.style.transform=`translate(${fe}px, ${be}px)`},()=>M(u)))}},[R,M,ae,Z,m,p]),ba=B(v);te(()=>{ba.current!==v&&(ba.current=v,pe())},[v,pe]),te(()=>{if(P&&(P.mode&&(mt(P.mode),Ye.current?.(P.mode)),P.panelHeight&&(vt(P.panelHeight),he.current=P.panelHeight),P.floatingDimensions&&P.floatingPosition)){let u={width:P.floatingDimensions.width,height:P.floatingDimensions.height,top:P.floatingPosition.y,left:P.floatingPosition.x};Ae(u),H.current={x:P.floatingPosition.x,y:P.floatingPosition.y}}},[P]),df(()=>{if(e)if(Z(),R==="bottomSheet"){let u=Je.current;if(!u)return;let h=ue();u.style.transform=`translateY(${h}px)`,u.style.opacity="0",ge.current.push(ve(300,br,C=>{u.style.transform=`translateY(${(1-C)*h}px)`}),ve(200,Ue,C=>{u.style.opacity=String(C)}))}else{let u=se.current;if(!u)return;H.current={x:J.current.left,y:J.current.top},u.style.transform=`translate(${H.current.x}px, ${H.current.y}px)`,u.style.opacity="0",ge.current.push(ve(200,Ue,h=>{u.style.opacity=String(h)}))}},[e,R,Z]);let ma=B(0),Re=B(0),Le=B(null),Ke=$(()=>{let u=Date.now();u-ma.current>500&&(Re.current=0),Re.current++,ma.current=u,Le.current&&clearTimeout(Le.current),Le.current=setTimeout(()=>{Re.current===2?Ct():Re.current>=3&&M&&pe(),Re.current=0},300)},[Ct,M,pe]);te(()=>()=>{Le.current&&clearTimeout(Le.current)},[]);let Qe=B({active:false,resizing:false,startY:0,headerOffsetY:0,samples:[]}),$r=$(u=>{if(R!=="bottomSheet"||u.button!==0||u.target.closest('button, a, input, textarea, select, [role="button"], [role="tab"], [role="switch"], [contenteditable="true"], [tabindex]'))return;let h=Qe.current;h.active=true,h.resizing=false,h.startY=u.clientY;let C=u.currentTarget.getBoundingClientRect();h.headerOffsetY=u.clientY-C.top,h.samples=[{t:performance.now(),y:u.clientY}],u.currentTarget.setPointerCapture(u.pointerId)},[R]),Mr=$(u=>{let h=Qe.current;if(!h.active)return;let C=u.clientY-h.startY;if(!h.resizing&&Math.abs(C)>3&&(h.resizing=true,Z(),de(true)),!h.resizing)return;let k=u.clientY-h.headerOffsetY,x=ue()-k;x=Math.max(s,Math.min(x,fa)),he.current=x,St.current&&(St.current.style.height=`${x}px`);let O=performance.now();for(h.samples.push({t:O,y:u.clientY});h.samples.length>2&&O-h.samples[0].t>100;)h.samples.shift()},[s,fa,Z]),Br=$(u=>{let h=Qe.current;if(!h.active)return;if(h.active=false,!h.resizing){Ke();return}de(false);let C=he.current,k=u.clientY-h.startY,x=h.samples[0],O=h.samples[h.samples.length-1];if((O&&x&&O.t>x.t?(O.y-x.y)/(O.t-x.t):0)>.8&&k>50||k>150&&C<=s){let fe=Je.current;if(Z(),fe){let be=ue();ge.current.push(ve(200,Ue,U=>{fe.style.opacity=String(1-U)}),ve(300,br,U=>{fe.style.transform=`translateY(${U*be}px)`},()=>t()))}else t();return}vt(C)},[s,t,Ke,Z]),Nr=$(()=>{let u=Qe.current;u.active&&(u.active=false,u.resizing=false,de(false))},[]),Xe=B({active:false,dragging:false,startX:0,startY:0,startPos:{x:0,y:0}}),Dr=$(u=>{if(R!=="floating"||Ee||u.button!==0||u.target.closest('button, a, input, textarea, select, [role="button"], [role="tab"], [role="switch"], [contenteditable="true"], [tabindex]'))return;let h=Xe.current;h.active=true,h.dragging=false,h.startX=u.clientX,h.startY=u.clientY,h.startPos={...H.current},u.currentTarget.setPointerCapture(u.pointerId)},[R,Ee]),zr=$(u=>{let h=Xe.current;if(!h.active)return;let C=u.clientX-h.startX,k=u.clientY-h.startY;if(!h.dragging&&Math.abs(C)+Math.abs(k)>5&&(h.dragging=true,Oe(true)),!h.dragging)return;let x=h.startPos.x+C,O=h.startPos.y+k;H.current={x,y:O},se.current&&(se.current.style.transform=`translate(${x}px, ${O}px)`)},[]),Wr=$(()=>{let u=Xe.current;if(!u.active)return;if(u.active=false,!u.dragging){Ke();return}Oe(false);let h=J.current,C=Xt({...h,left:H.current.x,top:H.current.y},q),k=C.left,x=C.top;H.current={x:k,y:x},se.current&&(se.current.style.transform=`translate(${k}px, ${x}px)`),Ae(O=>({...O,left:k,top:x}))},[q,Ke]),jr=$(()=>{let u=Xe.current;u.active&&(u.active=false,u.dragging=false,Oe(false))},[]),wt=B({active:false,corner:"bottomRight",startX:0,startY:0,start:{width:0,height:0,top:0,left:0}}),Fr=$(u=>h=>{if(R!=="floating")return;h.stopPropagation();let C=wt.current;C.active=true,C.corner=u,C.startX=h.clientX,C.startY=h.clientY,C.start={...J.current},de(true),h.currentTarget.setPointerCapture(h.pointerId)},[R]),Hr=$(u=>{let h=wt.current;if(!h.active)return;let C=u.clientX-h.startX,k=u.clientY-h.startY;if(Math.abs(C)<.5&&Math.abs(k)<.5)return;let x=Math.max(0,q.left),O=ue()-Math.max(0,q.bottom),fe=dt()-Math.max(0,q.right),be=dt()*.25,U=h.start,xt=U.left+U.width,Tt=U.top+U.height,Pe=U.left,et=U.top,Ta=xt,kt=Tt;h.corner==="bottomLeft"?(Pe=Math.max(x,Math.min(U.left+C,xt-be)),kt=Math.min(O,Math.max(Tt+k,U.top+ke))):(Ta=Math.min(fe,Math.max(xt+C,U.left+be)),kt=Math.min(O,Math.max(Tt+k,U.top+ke)));let Ur=Math.max(be,Ta-Pe),Gr=Math.max(ke,kt-et),ka={width:Ur,height:Gr,left:Pe,top:et};J.current=ka,H.current={x:Pe,y:et},Ae(ka),se.current&&(se.current.style.transform=`translate(${Pe}px, ${et}px)`)},[q.left,q.right,q.bottom]),ya=$(()=>{let u=wt.current;u.active&&(u.active=false,de(false),Ae(J.current))},[]),Ze=!e,va=Ze?{left:-9999,top:-9999,opacity:0,visibility:"hidden",pointerEvents:"none"}:{},Sa=r?.title||"Dev tool panel",E=Ve==="night",Ca=da&&E?g("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},"aria-hidden":true,children:g(Et,{})}):null,wa=N("div",{style:{flex:1,minHeight:0,position:"relative",display:"flex",flexDirection:"column",backgroundColor:E?"transparent":L.base,borderBottomLeftRadius:16,borderBottomRightRadius:16,overflow:"hidden",...n.content},children:[da&&!E?g(Et,{}):null,Er?g("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",paddingBottom:F},children:a}):g("div",{style:{flex:1,minHeight:0,overflowY:"auto",paddingBottom:F},children:a}),_?g("div",{style:{position:"absolute",left:0,right:0,bottom:0,backgroundColor:L.base,borderBottomLeftRadius:16,borderBottomRightRadius:16},children:_}):null]}),xa=g("div",{style:{position:"absolute",top:4,right:4,zIndex:10},children:g(vf,{onClose:t,onMinimize:M?pe:void 0,onToggleMode:Ct,mode:R,variant:Ve})});if(R==="floating"){let u=yt||Ee;return N("div",{ref:se,role:"dialog","aria-label":Sa,"aria-hidden":Ze||void 0,style:{position:"fixed",pointerEvents:"auto",left:0,top:0,width:re.width,height:re.height,transform:`translate(${H.current.x}px, ${H.current.y}px)`,display:"flex",flexDirection:"column",backgroundColor:E?c.color.bg:L.card,borderRadius:E?c.radius.sheet:6,border:E?`1px solid ${c.color.accent}55`:u?`2px solid ${L.primary}`:`1px solid ${L.border}`,boxShadow:E?`0 0 14px ${c.color.accent}38`:u?`0 0 12px ${L.primary}7A`:`0 0 20px ${L.primary}4D`,...E?{overflow:"hidden"}:null,boxSizing:"border-box",zIndex:Ge??1e3,...n.container,...va},children:[Ca,g("div",{onPointerDown:Dr,onPointerMove:zr,onPointerUp:Wr,onPointerCancel:jr,style:{borderTopLeftRadius:E?c.radius.sheet:6,borderTopRightRadius:E?c.radius.sheet:6,backgroundColor:E?"transparent":L.card,minHeight:56,border:E?"none":`1px solid ${L.border}`,boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"center",flexShrink:0,touchAction:"none",userSelect:"none",cursor:yt?"grabbing":"grab",position:"relative"},children:g(Sr,{header:r,isResizing:yt||Ee,mode:R,onMinimize:M?pe:void 0,variant:Ve})}),xa,wa,["bottomLeft","bottomRight"].map(h=>g("div",{onPointerDown:Fr(h),onPointerMove:Hr,onPointerUp:ya,onPointerCancel:ya,style:{position:"absolute",width:30,height:30,bottom:4,...h==="bottomLeft"?{left:4}:{right:4},zIndex:1e3,touchAction:"none",cursor:h==="bottomLeft"?"nesw-resize":"nwse-resize"},children:g("div",{style:{width:20,height:20,borderRadius:10,boxSizing:"border-box",backgroundColor:u?`${D.success}1A`:"transparent",border:u?`2px solid ${D.success}`:"none",boxShadow:u?`0 0 8px ${D.success}99`:"none"}})},h))]},"floating")}return g("div",{"aria-hidden":Ze||void 0,style:{position:"fixed",inset:0,zIndex:Ge??1e3,pointerEvents:"none",...Ze?{...va,inset:"auto",width:"100vw",height:"100vh"}:null},children:g("div",{ref:Je,style:{position:"absolute",bottom:0,left:0,right:0,pointerEvents:"auto"},children:N("div",{ref:St,role:"dialog","aria-label":Sa,style:{height:he.current,display:"flex",flexDirection:"column",backgroundColor:E?c.color.bg:L.card,borderTopLeftRadius:E?c.radius.sheet:6,borderTopRightRadius:E?c.radius.sheet:6,border:E?`1px solid ${c.color.accent}55`:`1px solid ${L.border}`,boxShadow:E?`0 -4px 10px ${c.color.accent}38`:`0 -4px 12px ${L.primary}33`,...E?{overflow:"hidden"}:null,boxSizing:"border-box",position:"relative",...n.container},children:[Ca,g("div",{onPointerDown:$r,onPointerMove:Mr,onPointerUp:Br,onPointerCancel:Nr,style:{borderTopLeftRadius:E?c.radius.sheet:6,borderTopRightRadius:E?c.radius.sheet:6,backgroundColor:E?"transparent":L.card,minHeight:56,border:E?"none":`1px solid ${L.border}`,boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"center",flexShrink:0,touchAction:"none",userSelect:"none",cursor:"ns-resize",position:"relative"},children:g(Sr,{header:r,isResizing:Ee,mode:R,onMinimize:M?pe:void 0,variant:Ve})}),xa,Rr&&Ar&&!Lr&&g(kf,{onAcknowledge:Pr}),wa]})})},"bottomSheet")},_f=Qt(e=>La()().status!=="admitted"?e.visible?g(pr,{}):null:g(If,{...e}));import{Children as Ef,useEffect as Of,useRef as Af}from"react";import{Fragment as Rf,jsx as j,jsxs as pt}from"react/jsx-runtime";function Lf({children:e,style:t}){return j(z,{style:[f.sectionLabel,t],children:e})}function Pf({children:e,centered:t,tone:a="tertiary",style:r}){let n=Be.flatten(r),s=!!n&&(n.marginHorizontal!=null||n.margin!=null);return j(z,{style:[f.footnote,s?null:f.footnoteInset,a==="secondary"?f.footnoteSecondary:null,a==="warning"?f.footnoteWarning:null,a==="danger"?f.footnoteDanger:null,t?f.footnoteCentered:null,r],children:e})}function $f({children:e,padded:t,glass:a,style:r}){return j(T,{style:[f.card,a?f.cardGlass:null,t?f.cardPadded:null,r],children:e})}function Cr({inset:e=c.rowPadH}){return j(T,{style:[f.separator,{marginLeft:e}]})}function Mf({children:e,inset:t=c.rowPadH}){let a=Ef.toArray(e);return j(Rf,{children:a.map((r,n)=>pt(T,{children:[n>0?j(Cr,{inset:t}):null,r]},r.key??n))})}var wr=56,xr=32,ft=22,Tr=5,Bf=wr-ft-Tr*2;function Nf({value:e,onValueChange:t,disabled:a,testID:r,accessibilityLabel:n}){let s=Af(new At.Value(e?1:0)).current;return Of(()=>{At.timing(s,{toValue:e?1:0,duration:200,useNativeDriver:pg.OS!=="web"}).start()},[e,s]),j(at,{activeOpacity:.8,disabled:a,onPress:()=>t(!e),testID:r,accessibilityLabel:n,accessibilityRole:"switch",accessibilityState:{checked:e,disabled:a},hitSlop:{top:8,bottom:8,left:8,right:8},style:[f.switchTrack,e?f.switchTrackOn:null,a?f.switchDisabled:null],children:j(At.View,{style:[f.switchThumb,e?f.switchThumbOn:null,{transform:[{translateX:s.interpolate({inputRange:[0,1],outputRange:[0,Bf]})}]}]})})}function Df({label:e,selected:t,onPress:a,disabled:r,icon:n,testID:s}){return pt(at,{activeOpacity:.7,disabled:r||!a,onPress:a,testID:s,style:[f.chip,t?f.chipSelected:null,r?f.chipDisabled:null],children:[n,j(z,{style:[f.chipText,t?f.chipTextSelected:null],children:e})]})}function zf({label:e,onPress:t,variant:a="secondary",size:r="lg",icon:n,disabled:s,fullWidth:o=true,testID:i,accessibilityLabel:l}){let d=a==="primary"?c.color.onAccent:a==="tertiary"?c.color.text:a==="destructive"?c.color.danger:c.color.accent;return pt(at,{activeOpacity:.7,disabled:s,onPress:t,testID:i,accessibilityRole:"button",accessibilityLabel:l??e,accessibilityState:{disabled:!!s},style:[f.button,r==="md"?f.buttonMd:f.buttonLg,a==="primary"?f.buttonPrimary:a==="ghost"?f.buttonGhost:f.buttonPlate,o?f.buttonFullWidth:null,s?f.buttonDisabled:null],children:[n,j(z,{style:[r==="md"?f.buttonTextMd:f.buttonTextLg,{color:d}],children:e})]})}function Wf({tabs:e,activeKey:t,onChange:a,size:r="md",glass:n,testIDPrefix:s}){let o=r==="sm";return j(T,{style:[f.segmentTrack,n?f.segmentTrackGlass:null],children:e.map(i=>{let l=i.key===t;return pt(at,{activeOpacity:.7,testID:s?`${s}-${i.key}`:void 0,accessibilityRole:"tab",accessibilityState:{selected:l},accessibilityLabel:i.label,onPress:()=>a(i.key),style:[f.segment,o?f.segmentSm:null,l?n?f.segmentActiveGlass:f.segmentActive:null],children:[j(z,{style:[f.segmentText,o?f.segmentTextSm:null,l?f.segmentTextActive:null],children:i.label}),l?j(T,{style:[f.segmentUnderline,o?f.segmentUnderlineSm:null]}):null]},i.key)})})}function jf({label:e,tone:t="neutral"}){let a=t==="accent"?f.badgeAccent:t==="warning"?f.badgeWarning:t==="danger"?f.badgeDanger:t==="info"?f.badgeInfo:f.badgeNeutral,r=t==="accent"?f.badgeTextAccent:t==="warning"?f.badgeTextWarning:t==="danger"?f.badgeTextDanger:t==="info"?f.badgeTextInfo:f.badgeTextNeutral;return j(T,{style:[f.badge,a],children:j(z,{style:[f.badgeText,r],children:e})})}var f=Be.create({sectionLabel:{color:c.color.textSecondary,fontSize:c.font.label,fontWeight:"600",letterSpacing:$a,textTransform:"uppercase",marginBottom:8,marginLeft:c.labelInset},footnote:{color:c.color.textTertiary,fontSize:c.font.caption,fontWeight:"500",lineHeight:c.font.caption*1.4,marginTop:8},footnoteInset:{marginLeft:c.labelInset},footnoteSecondary:{color:c.color.textSecondary},footnoteWarning:{color:c.color.warning},footnoteDanger:{color:c.color.danger},footnoteCentered:{textAlign:"center",marginLeft:0},card:{backgroundColor:c.color.surface,borderRadius:c.radius.card,borderWidth:1,borderColor:c.color.border,overflow:"hidden"},cardGlass:{backgroundColor:c.color.glass,borderColor:c.color.glassBorder},cardPadded:{padding:c.cardPad,gap:10},separator:{height:Be.hairlineWidth,backgroundColor:c.color.separator},switchTrack:{width:wr,height:xr,borderRadius:xr/2,borderWidth:1,borderColor:c.color.fillTertiary,backgroundColor:c.color.surfaceElevated,paddingHorizontal:Tr,justifyContent:"center",overflow:"hidden"},switchTrackOn:{backgroundColor:c.color.accentFill,borderColor:c.color.accentBorderStrong},switchDisabled:{opacity:.4},switchThumb:{width:ft,height:ft,borderRadius:ft/2,backgroundColor:c.color.knob},switchThumbOn:{backgroundColor:c.color.accent},chip:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:14,paddingVertical:9,borderRadius:c.radius.chip,borderWidth:1.5,backgroundColor:c.color.buttonSurface,borderColor:c.color.fillTertiary},chipSelected:{borderColor:c.color.accentBorderStrong},chipDisabled:{opacity:.4},chipText:{fontSize:c.font.body,fontWeight:"500",color:c.color.textSecondary},chipTextSelected:{color:c.color.accent},button:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8},buttonMd:{height:34,paddingHorizontal:16,borderRadius:17},buttonLg:{height:50,paddingHorizontal:20,borderRadius:25},buttonPrimary:{backgroundColor:c.color.accent},buttonPlate:{backgroundColor:c.color.button},buttonGhost:{backgroundColor:"transparent"},buttonFullWidth:{alignSelf:"stretch"},buttonDisabled:{opacity:.4},buttonTextMd:{fontSize:15,fontWeight:"600"},buttonTextLg:{fontSize:17,fontWeight:"600"},segmentTrack:{flex:1,flexDirection:"row",backgroundColor:c.color.bg,borderRadius:c.radius.row,borderWidth:1,borderColor:c.color.border,padding:3},segment:{flex:1,paddingVertical:8,alignItems:"center",justifyContent:"center",borderRadius:c.radius.segment},segmentTrackGlass:{backgroundColor:c.color.glass,borderColor:c.color.glassBorder},segmentActive:{backgroundColor:c.color.surfaceElevated},segmentActiveGlass:{backgroundColor:c.color.glassElevated},segmentText:{fontSize:c.font.caption,fontWeight:"500",color:c.color.textSecondary},segmentTextActive:{fontWeight:"600",color:c.color.text},segmentUnderline:{position:"absolute",bottom:2,width:24,height:2.5,borderRadius:1.25,backgroundColor:c.color.accent,shadowColor:c.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:6},segmentSm:{paddingVertical:5},segmentTextSm:{fontSize:12},segmentUnderlineSm:{bottom:1.5,width:20,height:2,borderRadius:1},badge:{paddingHorizontal:8,paddingVertical:4,borderRadius:c.radius.badge,alignSelf:"flex-start"},badgeText:{fontSize:c.font.micro,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase"},badgeAccent:{backgroundColor:c.color.accentSoft},badgeTextAccent:{color:c.color.accent},badgeWarning:{backgroundColor:c.color.warningSoft},badgeTextWarning:{color:c.color.warning},badgeDanger:{backgroundColor:c.color.dangerSoft},badgeTextDanger:{color:c.color.danger},badgeInfo:{backgroundColor:c.color.infoSoft},badgeTextInfo:{color:c.color.info},badgeNeutral:{backgroundColor:c.color.fillSecondary},badgeTextNeutral:{color:c.color.textSecondary}});import{jsx as _e,jsxs as Ff}from"react/jsx-runtime";function la(e){switch(_t(String(e))){case"dev":return{label:"DEV",backgroundColor:w.warning};case"qa":return{label:"QA",backgroundColor:w.optional};case"staging":return{label:"STAGING",backgroundColor:w.success};case"prod":return{label:"PROD",backgroundColor:w.error};case"local":default:return{label:"LOCAL",backgroundColor:w.info}}}function Hf({color:e}){return _e("svg",{width:12,height:12,viewBox:"0 0 24 24","aria-hidden":"true",children:_e("path",{d:"M6 9l6 6 6-6",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Uf({environment:e,interactive:t=false,onPress:a}){let r=la(e);return Ff("button",{onClick:t?a:void 0,"aria-label":`Environment: ${r.label}`,style:{display:"flex",flexDirection:"row",alignItems:"center",padding:`6px ${t?4:8}px 6px 8px`,flexShrink:0,background:"none",border:"none",cursor:t?"pointer":"default"},children:[_e("div",{style:{width:8,height:8,borderRadius:4,backgroundColor:r.backgroundColor,marginRight:6,boxShadow:`0 0 4px ${r.backgroundColor}99`}}),_e("span",{style:{fontSize:11,fontWeight:600,color:w.primaryLight,letterSpacing:.5},children:r.label}),t&&_e("span",{style:{marginLeft:2,display:"flex"},children:_e(Hf,{color:"#7A8599"})})]})}import{jsx as Se,jsxs as ca}from"react/jsx-runtime";var Gf=140,Vf=28,kr=44,Yf=8,qf=24;function ua(e){switch(_t(e)){case"local":return{label:"LOCAL",backgroundColor:w.info};case"dev":return{label:"DEV",backgroundColor:w.warning};case"qa":return{label:"QA",backgroundColor:w.optional};case"staging":return{label:"STAGING",backgroundColor:w.success};case"prod":return{label:"PROD",backgroundColor:w.error};default:return{label:"LOCAL",backgroundColor:w.info}}}function Jf({environment:e,isSelected:t,onPress:a}){let r=ua(e);return ca(fg,{onPress:a,style:({pressed:n})=>[oe.optionContainer,t&&oe.optionContainerSelected,n&&oe.optionContainerPressed],children:[ca(T,{style:oe.optionLeft,children:[Se(T,{style:[oe.optionDot,{backgroundColor:r.backgroundColor},{shadowColor:r.backgroundColor,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:4,elevation:2}]}),Se(z,{style:oe.optionLabel,children:r.label})]}),t&&Se(Ba,{size:14,color:w.success,strokeWidth:3})]})}function Kf({hasItems:e,currentEnvironment:t,availableEnvironments:a,onSelect:r,width:n=Gf,collapsedContent:s}){let o=Yf+a.length*kr+qf+4,i=ca(T,{style:oe.collapsedEnvBadge,children:[Se(T,{style:[oe.collapsedDot,{backgroundColor:ua(t).backgroundColor}]}),Se(z,{style:oe.collapsedLabel,children:ua(t).label})]});return Se(Ea,{hasItems:e,width:n,expandedHeight:o,peekHeight:Vf,showCount:false,collapsedContent:s||i,collapsedLabel:`Switch environment from ${t}`,children:a.map(l=>Se(Jf,{environment:l,isSelected:l===t,onPress:()=>r(l)},l))})}var oe=Be.create({collapsedEnvBadge:{flexDirection:"row",alignItems:"center",gap:6},collapsedDot:{width:8,height:8,borderRadius:4},collapsedLabel:{fontSize:11,fontWeight:"600",color:w.primaryLight,letterSpacing:.5},optionContainer:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,height:kr,width:"100%"},optionContainerSelected:{backgroundColor:"rgba(128, 128, 128, 0.1)"},optionContainerPressed:{backgroundColor:"rgba(128, 128, 128, 0.2)"},optionLeft:{flexDirection:"row",alignItems:"center",flex:1},optionDot:{width:8,height:8,borderRadius:4,marginRight:10},optionLabel:{fontSize:12,fontWeight:"600",color:w.primaryLight,letterSpacing:.5}});import{useState as Ir}from"react";import{jsx as X,jsxs as bt}from"react/jsx-runtime";var _r=36;function Qf({color:e,flipped:t}){return X("svg",{width:10,height:10,viewBox:"0 0 24 24","aria-hidden":"true",style:{transform:t?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms ease"},children:X("path",{d:"M18 15l-6-6-6 6",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Xf(){return X("svg",{width:12,height:12,viewBox:"0 0 24 24","aria-hidden":"true",children:X("path",{d:"M20 6L9 17l-5-5",fill:"none",stroke:"#4AFF9F",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})})}function Zf({currentEnvironment:e,availableEnvironments:t,onSelect:a}){let[r,n]=Ir(false),[s,o]=Ir(null),i=la(e),l=t.length*_r;return bt("div",{style:{position:"relative",zIndex:1e3,flexShrink:0},children:[X("div",{style:{position:"absolute",bottom:"100%",left:0,right:0,height:r?l:0,opacity:r?1:0,overflow:"hidden",transition:"height 200ms ease, opacity 200ms ease",backgroundColor:"rgba(8,12,21,0.95)",border:"1px solid #00B8E666",borderBottomWidth:0,borderTopLeftRadius:6,borderTopRightRadius:6,boxShadow:"0 -4px 8px rgba(0,0,0,0.3)"},children:t.map(d=>{let b=la(d),y=String(d).toLowerCase()===String(e).toLowerCase();return bt("button",{onClick:()=>{n(false),a(d)},onPointerEnter:p=>p.pointerType==="mouse"&&o(String(d)),onPointerLeave:()=>o(null),style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",height:_r,padding:"0 10px",background:y?"rgba(128,128,128,0.1)":s===String(d)?"rgba(128,128,128,0.2)":"none",border:"none",cursor:"pointer"},children:[bt("span",{style:{display:"flex",alignItems:"center"},children:[X("span",{style:{width:6,height:6,borderRadius:3,backgroundColor:b.backgroundColor,marginRight:8}}),X("span",{style:{fontSize:10,fontWeight:600,color:w.primaryLight,letterSpacing:.5},children:b.label})]}),y&&X(Xf,{})]},String(d))})}),bt("button",{onClick:()=>n(d=>!d),"aria-expanded":r,"aria-label":`Environment: ${i.label}. Click to switch.`,style:{display:"flex",alignItems:"center",gap:6,padding:"6px 6px 6px 8px",borderRadius:6,borderTopLeftRadius:r?0:6,borderTopRightRadius:r?0:6,backgroundColor:r?"rgba(8,12,21,0.95)":"transparent",border:"none",cursor:"pointer"},children:[X("span",{style:{width:8,height:8,borderRadius:4,backgroundColor:i.backgroundColor,boxShadow:`0 0 4px ${i.backgroundColor}99`}}),X("span",{style:{fontSize:11,fontWeight:600,color:w.primaryLight,letterSpacing:.5},children:i.label}),X(Qf,{color:"#7A8599",flipped:r})]})]})}export{Tl as ARROW_BOTTOM_OFFSET,kl as ARROW_HEIGHT,Sc as ASSETS_ICON_COLOR,pr as AccountSetup,Aa as AccountSetupButton,io as ActionCopyButton,Jc as Activity,gu as ActivityIcon,Wo as AddFilterButton,Bo as AddFilterInput,Zc as AlertCircle,Sd as AlertCircleIcon,nu as AlertOctagon,ru as AlertTriangle,mu as AlertTriangleIcon,rd as AskBuoyIcon,bc as AssetsIcon,Gi as BACKGROUND_PRESETS,ll as BACKGROUND_STORAGE_KEY,Ld as BENCHMARK_ICON_COLOR,og as BUOY_SYNTHETIC_MARK,Mo as BackButton,wl as BackgroundSwitcher,Xo as Badge,Dc as BarChart3,jc as BarChart3Icon,yg as BaseEventStore,_d as BenchmarkIcon,Dh as BenchmarkLegacyIcon,iu as Bookmark,du as Box,Cu as BoxIcon,Kp as BubbleSettingsDetail,Jp as BubbleSettingsSection,fu as Bug,td as BugIcon,Sl as BuoyNeedsPlanCard,ml as BuoySignInCard,an as BuoyUpgradeSheet,yn as CELLS,Sn as CLIP_OFFSCREEN_CELLS,Xd as CLOCK_TOOL_ICON_COLOR,Xh as CONSOLE_ICON_COLOR,or as COPY_PAYLOAD_MAX_BYTES,Hu as CameraIcon,Bg as ChangeLog,co as ChangeRow,Ba as Check,vu as CheckCircle,kc as CheckCircle2,kd as CheckCircle2Icon,Eu as CheckCircleIcon,Tu as CheckIcon,Qc as CheckSquare,vc as CheckSquareIcon,Iu as ChevronDown,Lu as ChevronDownIcon,Au as ChevronLeft,Bu as ChevronLeftIcon,$u as ChevronRight,Wu as ChevronRightIcon,Du as ChevronUp,Uu as ChevronUpIcon,Do as ChipStrip,ni as ClipboardHintBanner,Fu as Clock,ec as ClockIcon,Yd as ClockToolIcon,Uc as Cloud,qc as CloudIcon,Zi as CollapsibleSection,qo as CompactFilterChips,xl as CompactRow,$n as CompareBar,Jh as ConsoleIcon,Vu as Copy,Xn as CopyButton,Ju as CopyIcon,oi as CountBadge,Oa as CyberpunkSectionButton,qi as DEFAULT_BACKGROUND,Pi as DEVTOOLS_CARD_CONSTANTS,rl as DataInspector,Ma as Database,od as DatabaseIcon,un as DaylightTunable,xi as DeepFieldTunable,Ui as DetailView,Gn as DetailViewToggle,Ni as DevToolsCard,Rn as DiffModeTabs,Qu as DockBottom,ad as Download,Gd as DownloadIcon,Yi as DraggableHeader,dl as DynamicFilterView,Vh as ENV_ICON_COLOR,Tn as EVENT_LIST_PRESET,id as Edit3,ed as Edit3Icon,pi as EmptyState,Ro as EntityFilterView,Hh as EnvIcon,Ed as EnvLaptopIcon,Uf as EnvironmentIndicator,Kf as EnvironmentSelector,Zf as EnvironmentSelectorInline,Bn as EventHistoryViewer,ki as EventListItem,zn as EventPickerModal,cn as EventStepperFooter,Su as EventsIcon,Ea as ExpandablePopover,vn as ExpandedInfoRow,Vo as ExportPreview,bd as Eye,nd as EyeIcon,Na as EyeOff,ud as EyeOffIcon,mn as FeatureGate,uc as FileCode,pd as FileCodeIcon,Cd as FileJson,oh as FileJsonIcon,Id as FileText,vd as FileTextIcon,Rd as Film,Xc as FilmIcon,Bd as Filter,Zs as FilterBadge,Td as FilterIcon,Uo as FilterList,Lo as FilterSection,jd as FlaskConical,Od as FlaskConicalIcon,Vd as FloatWindow,Pl as FloatingTool,Al as FloatingToolDivider,zl as FloatingToolHost,Rl as FloatingToolUserStatus,Eo as FooterButton,wo as FooterCaption,ko as FooterMessage,vo as FooterRow,Wn as FreeAccountPrompt,Xl as GAME_UI_ALERT_STATES,Yl as GameUICollapsibleSection,Kl as GameUICompactStats,Ql as GameUIIssuesList,Jl as GameUIStatusHeader,Qd as GitBranch,$d as GitBranchIcon,ah as Globe,dd as GlobeIcon,Ki as GripVerticalIcon,Ec as Hand,bh as HandIcon,pc as HardDrive,zd as HardDriveIcon,ih as Hash,Ud as HashIcon,Wi as HeaderSearchButton,cu as HelpCircle,Yu as HighlightIcon,Oh as HighlightUpdatesIcon,ld as HighlighterIcon,ci as HintsProvider,Xr as HistoryEntryRow,Zr as HistoryList,Vr as HistoryProvider,hh as Home,_c as HomeIcon,hc as IMAGES_ICON_COLOR,Lc as IMAGE_OVERLAY_ICON_COLOR,Ic as IMPERSONATE_ICON_COLOR,xd as IconBackground,Zu as IconCircle,qu as IconContainer,cd as IconLine,sd as IconRect,mh as Image,au as ImageIcon,Oc as ImageOverlayIcon,lc as ImagesIcon,xc as ImpersonateIcon,wh as Info,Jd as InfoIcon,Fn as InfoRow,to as InlineCopyButton,Gc as JOTAI_ICON_COLOR,Fc as JotaiIcon,_f as JsModal,_h as Key,eh as KeyIcon,yh as LIFECYCLE_TOOL_ICON_COLOR,Eh as LOCATION_TOOL_ICON_COLOR,Ln as LOGIN_COMMAND,En as LOG_LIST_PRESET,Pd as LaptopIcon,Lh as Layers,nh as LayersIcon,gh as LifecycleToolIcon,vi as LinearFade,Nh as Link,dh as LinkIcon,Oo as ListItem,Fi as LiveSkyTunable,xh as LocationToolIcon,jh as Lock,Kd as LockIcon,Yt as LogLevel,Yt as LogLevelEnum,qt as LogType,qt as LogTypeEnum,Dn as MAX_PERIOD,yc as Maximize2,uh as Maximize2Icon,gi as MethodBadge,Uh as Minus,fh as MinusIcon,So as ModalHeader,xo as ModalHintBanner,nn as MoonlightTunable,Yh as Music,ou as MusicIcon,Wh as NETWORK_ICON_COLOR,$a as NIGHT_LABEL_TRACKING,Fd as NOTIFICATIONS_ICON_COLOR,Kh as Navigation,ph as NavigationIcon,yd as NetworkGlobeIcon,Bh as NetworkIcon,jf as NightBadge,zf as NightButton,$f as NightCard,Df as NightChip,Pf as NightFootnote,Mf as NightRows,Lf as NightSectionLabel,Wf as NightSegmented,Cr as NightSeparator,Nf as NightSwitch,yi as NoDataEmptyState,wi as NoResultsEmptyState,Ii as NoSearchResultsEmptyState,Nd as NotificationsIcon,al as OTTO_ANCHORS,ol as OTTO_ANCHOR_SIZE,Hi as OTTO_GRID,yl as OTTO_GROUPS,ul as OTTO_NOTES,Vi as OTTO_PALETTE,rn as OTTO_REEL,Jo as OTTO_SCENES,Zo as OTTO_SCENE_BY_ID,ri as OTTO_SCENE_CROP_H,Po as OTTO_SCENE_H,en as OTTO_SCENE_OTTO,_o as OTTO_SCENE_PALETTE,Ao as OTTO_SCENE_W,Xi as OTTO_STATES,pl as OTTO_STATE_NAMES,Cl as OTTO_USES,To as Otto,yo as OttoMotionView,lo as OttoPixels,ii as OttoSceneFrame,di as OttoSceneStill,ho as OttoStill,lh as PERMISSIONS_ICON_COLOR,lt as PERSONAL_SETTING_KEYS,sr as PREVIEW_ITEM_RENDER_BYTE_LIMIT,Zh as Palette,Sh as PaletteIcon,ag as Pause,kh as PauseIcon,rh as PermissionsIcon,uu as Phone,pu as PhoneIcon,go as Pill,xn as PillBadge,oc as Pin,nc as Play,Ah as PlayIcon,cc as Plus,Mh as PlusIcon,gc as Power,Md as PowerIcon,bn as PowerToggleButton,gd as PrimitiveGlobeIcon,on as ProBadge,kn as ProFeatureBanner,dn as ProUpgradeModal,Si as QrCodeView,hd as QueryIcon,gs as REMOTE_RELOAD_DELAY_MS,fi as RadialGlow,hi as RasterLayer,Dd as ReactQueryIcon,ac as ReduxIcon,mc as RefreshCw,zh as RefreshCwIcon,oo as RelativeTime,$h as RenderCountIcon,Th as RenderPulseIcon,Rc as Route,Mu as RouteDotIcon,ch as RouteIcon,sh as RouteMapIcon,Ru as RoutePathIcon,_u as RoutePinIcon,zu as RouteTwoPinsIcon,xu as RoutesIcon,Il as SPACING_GAP,md as ScenariosIcon,Cc as Search,il as SearchBar,Fh as SearchIcon,Io as SectionHeader,Hd as SentryBugIcon,bu as SentryIcon,lr as SentryLogger,Tc as Server,Ad as ServerIcon,Ot as Settings,Gh as SettingsIcon,Ac as SettingsSolid,tr as SettingsSync,Pc as Shield,qh as ShieldIcon,yu as Smartphone,wu as SmartphoneIcon,Yc as Square,tu as SquareDashed,wc as SquareDashedIcon,fc as SquareIcon,vh as StackPulseIcon,es as StandaloneHistoryList,Oi as StatsCard,ai as StatusBadge,Di as StatusIndicator,Xu as StorageIcon,qd as StorageStackIcon,Ho as StorageTypeBadge,Ia as Subscribable,Qa as TEAM_SETTING_KEYS,Hn as TIER_LIMITS,sc as TIME_MACHINE_ICON_COLOR,Mn as TRANSPARENT,mi as TabSelector,$c as TestTube2,Qh as TestTube2Icon,Qn as TickProvider,ji as TimeDisplay,tg as TimeMachineIcon,ku as Timer,Ou as TimerIcon,$o as ToggleRow,Et as ToolBackground,Ci as ToolButton,Ai as ToolEmptyState,bo as ToolFooter,rr as ToolScreenHeaderContext,uo as ToolbarClearButton,so as ToolbarCopyButton,Pu as Touchpad,Nu as TouchpadIcon,Wc as Trash,Nc as Trash2,eg as Trash2Icon,Ch as TrashIcon,Mc as TriangleAlert,Ih as TriangleAlertIcon,ui as TypeBadge,Hc as Unlock,th as UnlockIcon,On as UpgradeModal,pn as UpgradePrompt,Vc as Upload,Wd as UploadIcon,Kc as User,Rh as UserIcon,ju as Users,Gu as UsersIcon,zo as ValueTypeBadge,_n as ViewToggleCards,tc as Volume,Ku as VolumeIcon,An as WATER_CELLS,Pn as WATER_FRAMES,wn as WATER_ROW0,In as WATER_ROWS,it as WIRE_DETAIL_LIMIT_BYTES,Va as WIRE_INLINE_LIMIT_BYTES,eu as Wifi,wd as WifiBifIcon,Zd as WifiCircuitIcon,fd as WifiIcon,sn as WindowControls,_i as Wormhole,lu as X,su as XCircle,ic as XCircleIcon,rc as XIcon,zc as ZUSTAND_ICON_COLOR,hu as Zap,dc as ZapIcon,Bc as ZustandIcon,ql as absoluteFill,ir as add,ot as approxJsonSize,Ce as assertAccountAccess,hl as backgroundStore,ys as browserRouter,G as buoyColors,Ol as calculateTargetPosition,El as calculateTooltipPosition,af as callCapacitorNative,Sp as canOpenBuoyTools,qa as capDetail,Lp as classifyPreviewItem,Vp as clearEntries,ti as copyToClipboard,ig as countBuoyListener,Yo as createAutoDetectedClipboard,Ep as createRestoreScope,tp as createSyncAdapter,up as createToolFactory,Mg as createToolStore,Kn as cycleIndexes,Xp as definePersistedSetting,cp as defineToolPreset,ep as detailByIdAction,me as devToolsStorageKeys,sg as dialColors,Nl as dismissFloatingTool,bp as dispatchToolAction,Gl as displayValue,Op as emptyRestoreResult,Mp as entityColor,$t as expandKeyedArrays,Pa as expandableWindowControlsSupported,Ap as failedRestore,Ga as findKeyPath,Un as flatColors,Fs as flattenObject,nr as formatBytes,Dp as formatDuration,Fp as formatHttpStatus,zp as formatNumber,Hs as formatPath,qn as formatRelativeTime,zs as formatValue,Bp as formatValuePreview,w as gameUIColors,ie as getAccountAccess,Qo as getAutoDetectedClipboard,Ll as getBubbleAnchorPosition,Qp as getBubbleVisibilitySettings,Gs as getCachedOptionalModule,tf as getCapacitorAppStorage,$s as getConstructorName,fs as getDevServerOrigin,is as getDeviceInfo,Gp as getEntries,$l as getFloatingTools,Hp as getMethodColor,sl as getPreset,lg as getRealAppState,Es as getRegisteredToolModule,Ys as getRenderCaptureProvider,ng as getSafeAreaInsets,Ts as getSafeCurrentPathname,ks as getSafeCurrentRoute,xs as getSafeRouter,_l as getScreenCenterY,Ri as getSkyScrub,Ks as getStateSnapshotProvider,Js as getStateSnapshotProviders,gg as getStorageBackendType,xe as getToolAdapters,wp as getToolAttention,cs as getToolModuleVersion,Ws as getTypeColor,La as getUseAccountAccess,Ti as getUseIsPro,Ei as getUseLicense,Li as getUseTier,Bs as getValueSize,Rs as getValueType,jn as gridKey,ar as guardToolAdapter,Y as hasAccountAccess,rf as hasCapacitorPlugin,Pt as identityField,K as ignoredPatternsStore,sf as isCapacitorNative,ug as isDevToolsStorageKey,Ms as isEmpty,Is as isExpoRouterAvailable,_a as isJsonSerializable,Jg as isOnDeviceMarker,Nt as isOverWireBudget,Ns as isPlainObjectUtil,Ls as isPrimitive,Bi as isProNow,Ft as isToolRegistryReady,xg as isUrlIgnored,hg as isUsingPersistentStorage,Ps as isValidJson,we as listShapes,pp as listSnapshotToolIds,gp as listToolActions,hp as listToolIds,Us as loadOptionalModule,ls as logDeviceInfo,tt as macOSColors,Qg as memoByIdentity,Ka as mergeChangeSources,Ph as monoFont,no as motionUnits,Xg as newestFitting,c as night,mo as noWindowDragProps,_t as normalizeEnvironment,$e as notifySubscriberCountChange,qg as onDeviceMarker,rp as onSettingsApplied,vp as openBuoyTool,Bl as openFloatingTool,Yn as ottoCycle,ln as ottoReel,fn as ottoRuns,Go as ottoSceneBounds,jo as ottoSceneRuns,ao as ottoSheets,Ji as ottoWaterRows,Vl as parseDisplayValue,Mt as parsePath,Up as parseUrl,Ds as parseValue,Ug as patchFromPath,W as persistentStorage,el as presetAt,Qi as presetIndex,Ja as readParams,Hg as readPath,fp as readToolSnapshot,It as realNow,Zn as rectsOf,rg as refreshGameUIColors,Yg as refusalText,bs as registerBrowserRouter,Dl as registerPersistentFloatingTool,qs as registerStateSnapshotProvider,dp as registerToolAdapters,_s as registerToolModules,yp as registerToolOpener,hs as reloadApp,hn as renderOttoFrame,No as renderOttoScene,as as resetPersistedStateCache,Vn as resolveEffectiveTier,$i as resolveListEmptyState,ds as resolveReloadStrategy,tl as retryAccountAccess,Fl as safeStringify,Ko as scatter,ps as scheduleReloadApp,qp as sentryLogger,fl as setExpandableWindowControls,Vs as setRenderCaptureProvider,Mi as setSkyScrub,Cp as setToolAttention,Np as shallowDiffSummary,We as shapeKind,De as shapeOf,jg as shapeSummary,zg as shapesWereTruncated,nl as signOutOfBuoy,Zg as sizeOrStub,Fo as sizeWarningLevel,Rp as skippedRestore,ip as startSettingsSync,Me as subscribeAccountAccess,ms as subscribeBrowserNavigation,Ml as subscribeFloatingTools,cg as subscribeRealAppState,us as subscribeToStateSnapshotProviders,As as subscribeToSubscriberCountChanges,xp as subscribeToolAttention,Os as subscriberCountNotifier,Gg as suggestedPatch,Ul as superJsonDeserialize,Hl as superJsonSerialize,lp as syncSettingsNow,st as teamSettingsStore,Kg as toWire,gn as toolTheme,jp as truncateMiddle,Wp as truncatePayload,js as truncateText,Ya as truncatedNote,Bt as typedEditViolations,$p as unionKeys,Wg as unshapedLists,Da as urlMatchesIgnoredPattern,Kr as useAllHistoryEntries,rs as useChangeLog,tn as useChipTap,os as useDeviceInfo,ns as useEventStoreEvents,Cn as useFeatureGate,Wl as useFilterManager,Zl as useGameUIAlertState,bi as useHintsContext,Ra as useHintsDisabled,Jr as useHistoryAdapter,qr as useHistoryAdapters,Yr as useHistoryContext,Qr as useHistoryEntryCounts,Ag as useIgnoredPatterns,Jn as useLimit,si as useLoop,Co as useOttoAnchorMotion,fo as useOttoReel,ts as usePersistedState,li as usePulse,ro as useRelativeTime,jl as useSafeAreaInsets,ws as useSafeGlobalSearchParams,Ss as useSafePathname,vs as useSafeRouter,Cs as useSafeSegments,gl as useSignInState,zi as useSkyScrub,ss as useSubscribedValue,Pg as useTeamList,eo as useTick,bl as useToolBackground,_p as useToolScreenHeader,mp as waitForToolRegistry,po as windowDragProps,ei as withBgAlpha,Pp as wontApply};
|