@buoy-gg/core 7.0.42 → 7.0.44
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/floatingMenu/BrowserToolRuntime.js +1 -1
- package/lib/commonjs/floatingMenu/FloatingDevTools.js +1 -1
- package/lib/commonjs/floatingMenu/FloatingMenu.js +1 -1
- package/lib/commonjs/floatingMenu/ToolHost.js +1 -1
- package/lib/commonjs/floatingMenu/autoDiscoverPresets.js +1 -1
- package/lib/commonjs/floatingMenu/autoExternalSync.js +1 -1
- package/lib/commonjs/floatingMenu/dial/DialIcon.js +1 -1
- package/lib/commonjs/floatingMenu/externalSyncGate.js +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/floatingMenu/BrowserToolRuntime.js +1 -1
- package/lib/module/floatingMenu/FloatingDevTools.js +1 -1
- package/lib/module/floatingMenu/FloatingMenu.js +1 -1
- package/lib/module/floatingMenu/ToolHost.js +1 -1
- package/lib/module/floatingMenu/autoDiscoverPresets.js +1 -1
- package/lib/module/floatingMenu/autoExternalSync.js +1 -1
- package/lib/module/floatingMenu/dial/DialIcon.js +1 -1
- package/lib/module/floatingMenu/externalSyncGate.js +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/floatingMenu/ToolOpenerBridge.d.ts +2 -1
- package/lib/typescript/commonjs/floatingMenu/autoExternalSync.d.ts +16 -0
- package/lib/typescript/commonjs/floatingMenu/defaultConfig.d.ts +1 -1
- package/lib/typescript/commonjs/floatingMenu/externalSyncGate.d.ts +27 -0
- package/lib/typescript/commonjs/version.d.ts +1 -1
- package/lib/typescript/module/floatingMenu/ToolOpenerBridge.d.ts +2 -1
- package/lib/typescript/module/floatingMenu/autoExternalSync.d.ts +16 -0
- package/lib/typescript/module/floatingMenu/defaultConfig.d.ts +1 -1
- package/lib/typescript/module/floatingMenu/externalSyncGate.d.ts +27 -0
- package/lib/typescript/module/version.d.ts +1 -1
- package/lib/web/chunks/chunk-5NZOQR6Q.mjs +1 -0
- package/lib/web/chunks/chunk-CGDSLLZF.mjs +1 -0
- package/lib/web/chunks/chunk-DCJDUSNR.mjs +1 -0
- package/lib/web/chunks/chunk-IDSHFS6G.mjs +1 -0
- package/lib/web/chunks/chunk-JOAMJGCS.mjs +1 -0
- package/lib/web/chunks/chunk-KYKZ2N52.mjs +1 -0
- package/lib/web/chunks/chunk-NGM7JGGS.mjs +1 -0
- package/lib/web/chunks/chunk-Z3XWDDIO.mjs +1 -0
- package/lib/web/chunks/chunk-ZTGQ6TTY.mjs +1 -0
- package/lib/web/index.mjs +2 -2
- package/package.json +6 -9
package/lib/web/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{$ as
|
|
1
|
+
"use client";import{$ as kn,A as In,Aa as Mn,B as Rn,Ba as An,C as Dn,Ca as En,D as On,Da as Bn,E as Fn,Ea as Ln,F as Pn,Fa as $n,G as Hn,Ga as jn,H as Wn,Ha as Nn,I as Un,Ia as Kn,J as Vn,Ja as Gn,K as _n,Ka as qn,L as Jn,La as Xn,M as Yn,Ma as Qn,N as Zn,Na as ea,O as ta,Oa as oa,P as na,Pa as aa,Q as ia,Qa as ra,R as sa,Ra as la,S as ca,Sa as da,T as ua,Ta as pa,U as ma,Ua as ga,V as fa,Va as ha,W as ya,Wa as ba,X as Sa,Xa as va,Y as wa,Ya as xa,Z as Ca,_ as Ta,a as W,aa as za,b as U,ba as ka,c as Ze,ca as Ia,d as jt,da as Ma,e as Kl,ea as Ra,f as xe,fa as Aa,g as Wt,ga as Da,h as Oe,ha as Ea,i as Nt,ia as Oa,j as Ba,ja as Fa,k as La,ka as Pa,l as $a,la as Ha,m as ja,ma as Wa,n as Na,na as Ua,o as Ka,oa as Va,p as Ga,pa as _a,q as qa,qa as Ja,r as Xa,ra as Ya,s as Qa,sa as Za,t as ei,ta as ti,u as oi,ua as ni,v as ai,va as ii,w as ri,wa as si,x as li,xa as ci,y as di,ya as ui,z as pi,za as mi}from"./chunks/chunk-QZDVCMCT.mjs";import{b as gi,c as fi}from"./chunks/chunk-5SGL6QL4.mjs";import{a as Ut,d as et}from"./chunks/chunk-R7RGRTY5.mjs";import{FloatingToolHost as hi}from"@buoy-gg/shared-ui/web/floating";import{LicenseManager as yi,useLicense as bi}from"@buoy-gg/license/web";import{AccountSetup as Si}from"@buoy-gg/shared-ui/web";import{useState as vt,useMemo as Be,useCallback as Fe,useEffect as de,useRef as vi}from"react";import{useSettings as wi,getToolLabel as tt,getToolDescription as xi,getToolColor as Kt}from"@buoy-gg/floating-tools-react/web";import{persistentStorage as Ce,devToolsStorageKeys as ot,EnvironmentIndicator as Ci,EnvironmentSelectorInline as Ti}from"@buoy-gg/shared-ui/web";var zi=[];function ki(){return[]}function Vt(e=[]){return[...new Map(e.map(t=>[t.id,t])).values()]}function wt(e,t){return e.filter(o=>{let a=o.slot||"both";return a==="both"||a===t})}function Ii(e,t){let o=t instanceof Set?t:new Set(t);return e.filter(a=>o.has(a.id))}import{FloatingTool as Gt,FloatingToolDivider as Mi,FloatingToolUserStatus as _t,getBubbleAnchorPosition as Ri}from"@buoy-gg/shared-ui/web/floating";import{useState as Q,useEffect as Te,useMemo as nt,useRef as at,useCallback as it}from"react";import{getDialLayout as Ai,getAllIconPositions as Di,getGridLineRotations as Ei,getIconStaggerInputRange as Oi,MAX_DIAL_SLOTS as We,DIAL_ICON_SIZE as Bi,dialAnimationConfig as qt,getDialCSSKeyframesString as Fi,getDialCSSAnimationStyles as Li,dialColors as F,dialStyles as S,withAlpha as Jt,floatingToolsColors as Pi}from"@buoy-gg/floating-tools-react/web";import{persistentStorage as Xt,monoFont as Yt,ToolBackground as $i,useToolBackground as Hi}from"@buoy-gg/shared-ui/web";import{memo as ji}from"react";import{RasterLayer as Wi,scatter as Ni,useLoop as Ui,withBgAlpha as Ki}from"@buoy-gg/shared-ui/web";import{Fragment as Vi,jsx as Ne}from"react/jsx-runtime";var Gi=.94,_i=6,qi=2400,rt=3,Qt=16,Ji=Array.from({length:rt},(e,t)=>Ni(22343^t*40503,Qt*4)),Zt=["#FFFFFF","#B3D9FF","#8CB3FF"],eo=Math.PI/3,to=14*Math.PI/180;function Xi(e){let t=Math.min(5,Math.floor(e*6)),o=e*6-t;return t*eo+to/2+o*(eo-to)}function Yi(e){return Math.min(_i,1/(1-e*Gi))}function Qi(e){let t=.15+.85*e*e;return e<.06?t*=e/.06:e>.94&&(t*=(1-e)/.06),Math.min(.7,t)}function Zi(e){let t=e/rt,o=[],a=12;for(let d=0;d<=a;d++)o.push(d/a);let n=(1-t)%1;n>.001&&n<1-.001&&o.push(n-1e-4,n+1e-4),o.sort((d,p)=>d-p);let i=[],l=[],u=[];for(let d of o){let p=t===0&&d===1?1:(d+t)%1;i.push(d),l.push(Yi(p)),u.push(Qi(p))}return{input:i,scale:l,opacity:u}}var er=Array.from({length:rt},(e,t)=>Zi(t)),tr=ji(function({size:e}){let t=Ui(qi),o=e/2,a=[];for(let n=0;n<rt;n++){let i=Ji[n],l=er[n],u=[];for(let d=0;d<Qt;d++){let p=Xi(i[d*4]),m=(.15+.85*Math.sqrt(i[d*4+1]))*.5*o,x=Zt[Math.floor(i[d*4+3]*Zt.length)%3],g=o+Math.cos(p)*m,R=o+Math.sin(p)*m,v=.6,I=v*2.4;u.push(Ne(W,{style:{position:"absolute",left:g-I/2,top:R-I/2,width:I,height:I,borderRadius:I/2,backgroundColor:Ki(x,.3)}},`${d}-h`),Ne(W,{style:{position:"absolute",left:g-v/2,top:R-v/2,width:v,height:v,borderRadius:v/2,backgroundColor:x}},d))}a.push(Ne(xe.View,{style:{position:"absolute",left:0,top:0,width:e,height:e,opacity:t.interpolate({inputRange:l.input,outputRange:l.opacity}),transform:[{scale:t.interpolate({inputRange:l.input,outputRange:l.scale})}]},pointerEvents:"none",children:Ne(Wi,{style:{width:e,height:e},raster:false,children:u})},n))}return Ne(Vi,{children:a})});import{useEffect as or,useState as oo}from"react";import{dialColors as Le,withAlpha as no}from"@buoy-gg/floating-tools-react/web";import{ARROW_BOTTOM_OFFSET as nr,ARROW_HEIGHT as ar,SPACING_GAP as cc,getScreenCenterY as dc,calculateTooltipPosition as ir,calculateTargetPosition as uc}from"@buoy-gg/shared-ui/web/floating";import{monoFont as ao}from"@buoy-gg/shared-ui/web";import{jsx as Pe,jsxs as io}from"react/jsx-runtime";var ro=false;function rr(){if(ro||typeof document>"u")return;let e=document.createElement("style");e.textContent=`
|
|
2
2
|
@keyframes buoyOnboardPulse {
|
|
3
3
|
0%, 100% { transform: scale(1); }
|
|
4
4
|
50% { transform: scale(1.02); }
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
0%, 100% { transform: translateY(0); }
|
|
8
8
|
50% { transform: translateY(-8px); }
|
|
9
9
|
}
|
|
10
|
-
`,document.head.appendChild(e),io=true}var xt=Pe.accent;function ro({title:e,message:t,onDismiss:o,showArrow:a=true}){let[n,i]=to(false),[l,u]=to(false);Zi(()=>{nr();let p=requestAnimationFrame(()=>i(true));return()=>cancelAnimationFrame(p)},[]);let d={fontFamily:no,textTransform:"uppercase"};return Le("div",{style:{position:"fixed",left:"50%",bottom:or(),transform:`translateX(-50%) scale(${n?1:.8})`,opacity:n?1:0,transition:"transform 300ms cubic-bezier(0.34, 1.3, 0.64, 1), opacity 300ms ease",zIndex:10002,pointerEvents:"auto"},children:ao("div",{style:{position:"relative",animation:n?"buoyOnboardPulse 3s ease-in-out infinite":"none"},children:[Le("div",{style:{position:"absolute",inset:-4,borderRadius:18,backgroundColor:"#FFFFFF",opacity:.06}}),ao("div",{style:{position:"relative",maxWidth:280,backgroundColor:Pe.dialBackground,borderRadius:16,border:`1px solid ${Pe.dialBorder}`,padding:20,boxShadow:`0 0 20px ${oo(Pe.dialShadow,.6)}`,display:"flex",flexDirection:"column",alignItems:"center",gap:8},children:[Le("span",{style:{...d,fontSize:16,fontWeight:900,letterSpacing:1,color:xt,textAlign:"center"},children:e}),Le("span",{style:{fontFamily:no,fontSize:13,lineHeight:"20px",color:Pe.centerText,textAlign:"center"},children:t}),Le("button",{onClick:o,onMouseDown:()=>u(true),onMouseUp:()=>u(false),onMouseLeave:()=>u(false),style:{...d,marginTop:8,borderRadius:8,border:"none",backgroundColor:xt,padding:"10px 24px",fontSize:14,fontWeight:900,letterSpacing:1.5,color:"#000000",cursor:"pointer",opacity:l?.7:1,transform:l?"scale(0.96)":"scale(1)",transition:"transform 100ms ease, opacity 100ms ease"},children:"Got it!"})]}),a&&Le("div",{style:{position:"absolute",left:"50%",bottom:er,marginLeft:-12,width:0,height:0,borderLeft:"12px solid transparent",borderRight:"12px solid transparent",borderTop:`${tr}px solid ${xt}`,filter:`drop-shadow(0 0 10px ${oo(Pe.dialShadow,.5)})`,animation:n?"buoyOnboardArrowBounce 1.6s ease-in-out infinite":"none"}})]})})}import{Fragment as ar,jsx as E,jsxs as ge}from"react/jsx-runtime";var ir={x:.5,y:.5},so="@react_buoy_settings_tooltip_shown",lo=false;function rr(){if(lo||typeof document>"u")return;let e=document.createElement("style");e.textContent=Ei(),document.head.appendChild(e),lo=true}var $e=e=>1-Math.pow(1-e,3),Ct=e=>e*e*e;function sr({icon:e,index:t,totalIcons:o,position:a,progress:n,onPress:i}){let[l,u]=Q(false),[d,p]=Q(false),m=!e.icon&&e.id.startsWith("empty-"),C=!m&&e.unavailable===true,g=!m&&!C,{icons:k}=qt,y=Ai(t,o),S=0;n<=y[1]?S=0:n<=y[2]?S=(n-y[1])/(y[2]-y[1]):S=1,S=Math.max(0,Math.min(1,S));let T=Oi,M=k.pressIn.scale,B=S*(d?M:l?1.1:1),_=0;S<=0?_=0:S<=.3?_=S:_=.3+(S-.3)*(.7/.7);let x=a.x*S,z=a.y*S;return E("button",{role:"menuitem","aria-label":m?"Empty slot":e.name,"aria-disabled":!g,tabIndex:g?0:-1,onClick:g?i:void 0,onMouseEnter:()=>g&&u(true),onMouseLeave:()=>{u(false),p(false)},onMouseDown:()=>g&&p(true),onMouseUp:()=>p(false),style:{position:"absolute",left:"50%",top:"50%",width:T,height:T,marginLeft:-T/2,marginTop:-T/2,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:g?"pointer":"default",transform:`translate(${x}px, ${z}px) scale(${B})`,opacity:_,transition:l||d?"transform 100ms ease":"none",background:"none",border:"none",padding:0},children:m?E("div",{style:{width:v.emptySlot.dotSize,height:v.emptySlot.dotSize,borderRadius:v.emptySlot.dotSize/2,backgroundColor:D.emptyDotBackground,border:`${v.emptySlot.borderWidth}px solid ${D.emptyDotBorder}`}}):ge(ar,{children:[E("div",{style:{position:"absolute",width:`${v.icon.gradientBgSizePercent}%`,height:`${v.icon.gradientBgSizePercent}%`,borderRadius:v.icon.gradientBgBorderRadius,backgroundColor:"rgba(0, 0, 0, 0.2)",opacity:v.icon.gradientBgOpacity}}),E("div",{style:{position:"absolute",width:`${v.icon.innerGlowSizePercent}%`,height:`${v.icon.innerGlowSizePercent}%`,borderRadius:v.icon.innerGlowBorderRadius,backgroundColor:"rgba(255, 255, 255, 0.02)",opacity:v.icon.innerGlowOpacity}}),E("div",{style:{marginBottom:v.icon.wrapperMarginBottom,display:"flex",alignItems:"center",justifyContent:"center",fontSize:32,filter:l?"brightness(1.2)":"none"},children:e.icon}),E("span",{style:{fontSize:e.name.length>8?Math.max(v.icon.label.fontSize*.7,v.icon.label.fontSize*8/e.name.length):v.icon.label.fontSize,fontWeight:v.icon.label.fontWeight,fontFamily:v.icon.label.fontFamily,color:D.iconLabel,letterSpacing:v.icon.label.letterSpacing,marginTop:v.icon.label.marginTop,textTransform:"uppercase",whiteSpace:"nowrap"},children:e.name}),C&&E("span",{style:{fontSize:v.icon.label.fontSize-1,fontWeight:v.icon.label.fontWeight,fontFamily:v.icon.label.fontFamily,letterSpacing:v.icon.label.letterSpacing,color:Bi.muted,textTransform:"uppercase",whiteSpace:"nowrap"},children:"Unavailable"})]})})}function co({side:e,color:t}){return E("svg",{width:18,height:18,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(e==="prev"?[[15,18,9,12],[9,12,15,6]]:[[9,18,15,12],[15,12,9,6]]).map(([o,a,n,i],l)=>E("line",{x1:o,y1:a,x2:n,y2:i,stroke:t,strokeWidth:2},l))})}function uo({side:e,disabled:t,onClick:o}){let[a,n]=Q(false),i=t?D.emptyDotBorder:D.accent;return ge("button",{type:"button","aria-label":`${e==="prev"?"Previous":"Next"} dial page`,disabled:t,onClick:o,onMouseDown:()=>!t&&n(true),onMouseUp:()=>n(false),onMouseLeave:()=>n(false),style:{display:"flex",alignItems:"center",gap:4,padding:"10px 16px",borderRadius:10,border:`1px solid ${D.dialBorder}`,backgroundColor:D.dialBackground,color:t?D.iconLabelMuted:D.centerText,fontSize:12,fontWeight:900,fontFamily:Xt,letterSpacing:1.5,textTransform:"uppercase",cursor:t?"default":"pointer",opacity:t?.4:1,boxShadow:t?"none":`0 0 8px ${Gt(D.dialShadow,.4)}`,transform:a?"scale(0.92)":"scale(1)",transition:"transform 100ms ease"},children:[e==="prev"&&E(co,{side:"prev",color:i}),e==="prev"?"PREV":"NEXT",e==="next"&&E(co,{side:"next",color:i})]})}function po({icons:e,onClose:t,centerLabel:o="MENU",onCenterPress:a,settingsOpen:n=false,hintsDisabled:i=false}){let{id:l}=Pi(),[u,d]=Q(0),[p,m]=Q(0),[C,g]=Q(0),[k,y]=Q(0),[S,T]=Q(0),[M,B]=Q(1),[_,x]=Q(false),[z,P]=Q(false),[I,R]=Q(false),oe=at(null),Z=at(null),G=at(null),le=at(false),{entrance:K,exit:ne,interaction:J}=qt,Se=Di(),[me,ve]=Q(()=>({width:window.innerWidth,height:window.innerHeight}));Te(()=>{let A=()=>ve({width:window.innerWidth,height:window.innerHeight});return window.addEventListener("resize",A),()=>window.removeEventListener("resize",A)},[]);let L=nt(()=>ki({screenWidth:me.width,maxCircleSize:Math.max(120,Math.min(320,me.height-96))}),[me]),Re=nt(()=>Ri(),[]),fe=nt(()=>Mi(He,L.iconRadius),[L.iconRadius]),[re,we]=Q(0),ae=Math.max(1,Math.ceil(e.length/He)),r=Math.min(re,ae-1),F=nt(()=>{let A=r*He,w=[...e.slice(A,A+He)];for(;w.length<He;)w.push({id:`empty-${w.length}`,name:"",icon:null,onPress:()=>{}});return w},[e,r]);Te(()=>{rr()},[]),Te(()=>{let A=K.backdrop.duration,w=K.dial.rotation.duration,X=K.centerButton.delay,H=K.icons.delay,q=K.icons.duration,U=performance.now(),ee=ce=>{let s=ce-U;d(Math.min(1,s/A));let f=Math.min(1,s/400),O=$e(f)*1.1;f>.7&&(O-=(f-.7)*.33),f>=1&&(O=1),m(Math.max(0,Math.min(1.05,O)));let Y=Math.min(1,s/w);if(g($e(Y)*360),s>=X){let ye=Math.min(1,(s-X)/300),Ee=$e(ye)*1.15;ye>.6&&(Ee-=(ye-.6)*.375),ye>=1&&(Ee=1),y(Math.max(0,Math.min(1.05,Ee)))}if(s>=H){let ye=Math.min(1,(s-H)/q);T($e(ye))}let he=H+q;s<he?G.current=requestAnimationFrame(ee):(d(1),m(1),g(360),y(1),T(1),R(true))};return G.current=requestAnimationFrame(ee),()=>{G.current&&cancelAnimationFrame(G.current)}},[]);let W=it(()=>{if(le.current)return;le.current=true,P(true),G.current&&cancelAnimationFrame(G.current);let A=performance.now(),w=ne.icons.duration,X=ne.centerButton.duration,H=ne.dialScale.duration,q=Math.max(X,H),U=ne.backdrop.duration,ee=ce=>{let s=ce-A;if(s<w){let Y=Ct(s/w);T(1-Y),G.current=requestAnimationFrame(ee);return}let f=w;if(s<f+q){T(0);let Y=Math.min(1,(s-f)/X),he=Math.min(1,(s-f)/H);y(1-Ct(Y)),m(1-Ct(he)),G.current=requestAnimationFrame(ee);return}let O=f+q;if(s<O+U){m(0),y(0);let Y=(s-O)/U;d(1-Y),G.current=requestAnimationFrame(ee);return}d(0),t()};G.current=requestAnimationFrame(ee)},[ne,t]);Te(()=>{let A=document.activeElement,w=oe.current;return()=>{A?.isConnected&&(document.activeElement===document.body||w?.contains(document.activeElement))&&A.focus()}},[]),Te(()=>{if(n)return;Z.current?.focus();let A=w=>{let X=oe.current;if(X){if(w.key==="Escape")w.preventDefault(),W();else if(w.key==="Tab"){let H=Array.from(X.querySelectorAll('button:not(:disabled):not([aria-disabled="true"]), [tabindex="0"]')).filter(ee=>ee.getClientRects().length>0),q=H[0],U=H[H.length-1];(!X.contains(document.activeElement)||(w.shiftKey?document.activeElement===q:document.activeElement===U))&&(w.preventDefault(),(w.shiftKey?U:q)?.focus())}else if(["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(w.key)){let H=Array.from(X.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')),q=H.indexOf(document.activeElement);if(q<0||!H.length)return;w.preventDefault();let U=w.key==="Home"?0:w.key==="End"?H.length-1:(q+(w.key==="ArrowRight"||w.key==="ArrowDown"?1:-1)+H.length)%H.length;H[U].focus()}}};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[W,n]);let[je,Je]=Q(false);Te(()=>{if(i)return;let A=false,w=setTimeout(async()=>{let X=await Jt.getItem(so);!A&&!X&&Je(true)},1200);return()=>{A=true,clearTimeout(w)}},[i]);let Ae=it(()=>{Je(false),Jt.setItem(so,"true")},[]);Te(()=>{n&&je&&Ae()},[n,je,Ae]);let Xe=it(A=>{if(A.id.startsWith("empty-")||le.current)return;let[w,X]=J.iconSelect.pulse,H=performance.now(),q=150,U=ee=>{let ce=ee-H;if(ce<q){let s=$e(ce/q);B(1-(1-w.scale)*s),requestAnimationFrame(U)}else if(ce<q*2){let s=$e((ce-q)/q);B(w.scale+(X.scale-w.scale)*s),requestAnimationFrame(U)}else B(1)};requestAnimationFrame(U),setTimeout(()=>{A.onPress(),W()},J.iconSelect.actionDelay)},[J.iconSelect,W]),Ye=it(A=>{if(le.current)return;let w=Math.max(0,Math.min(A,ae-1));w!==r&&we(w)},[ae,r]),Oe=L.buttonSize*v.centerButton.containerRatio,Qe=L.buttonSize*v.centerButton.borderRatio,bt=L.buttonSize*v.centerButton.containerRatio/2+6,St=I&&!z;return ge("div",{ref:oe,role:"dialog","aria-label":"Dial Menu","aria-modal":"true",style:{position:"fixed",inset:0,zIndex:1e4},children:[E("button",{type:"button","aria-label":"Close dial menu",tabIndex:0,onClick:W,style:{position:"absolute",inset:0,border:0,padding:0,backgroundColor:D.dialBackdrop,opacity:u}}),ge("div",{style:{position:"absolute",left:"50%",marginLeft:-L.circleSize/2,bottom:80,width:L.circleSize,height:L.circleSize,borderRadius:"50%",backgroundColor:D.dialBackground,border:`${v.circle.borderWidth}px solid ${D.dialBorder}`,boxShadow:`0 0 ${v.circle.shadowRadius}px ${Gt(D.dialShadow,v.circle.shadowOpacity)}`,transform:`scale(${p}) rotate(${C}deg)`,opacity:p>.01?1:0,overflow:"hidden"},children:[E("div",{style:{position:"absolute",inset:0,borderRadius:"50%",backgroundColor:D.dialGradient1,opacity:v.gradientLayers[0].opacity}}),E("div",{style:{position:"absolute",inset:0,top:"30%",left:"30%",borderRadius:"50%",backgroundColor:D.dialGradient2,opacity:v.gradientLayers[1].opacity}}),E("div",{style:{position:"absolute",inset:0,top:"50%",left:"50%",borderRadius:"50%",backgroundColor:D.dialGradient3,opacity:v.gradientLayers[2].opacity}}),Re.map(A=>E("div",{style:{position:"absolute",top:"50%",left:0,right:0,height:v.grid.lineHeight,transform:`rotate(${A}deg)`,transformOrigin:"center"},children:["left","right"].map(w=>E("div",{style:{position:"absolute",top:0,[w]:0,width:`calc(50% - ${bt}px)`,height:v.grid.lineHeight,backgroundColor:D.dialGridLine}},w))},A)),E("div",{"data-testid":"dial-background","data-background":l,style:{position:"absolute",inset:0,pointerEvents:"none"},children:l==="hyperspace"?E(Qi,{size:L.circleSize}):E(Fi,{focus:ir})}),F.map((A,w)=>E(sr,{icon:A,index:w,totalIcons:F.length,position:fe[w],progress:S,onPress:()=>Xe(A)},w)),ge("div",{style:{position:"absolute",left:"50%",top:"50%",width:Oe,height:Oe,marginLeft:-Oe/2,marginTop:-Oe/2,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:D.hubHalo,borderRadius:L.buttonSize,overflow:"hidden",transform:`scale(${k*M})`,opacity:k>.01?1:0},children:[E("div",{style:{position:"absolute",inset:0,backgroundColor:D.dialGradient1,opacity:.5,borderRadius:L.buttonSize}}),E("div",{style:{position:"absolute",inset:0,top:"20%",left:"20%",backgroundColor:D.dialGradient2,opacity:.3,borderRadius:L.buttonSize}}),E("div",{style:{position:"absolute",inset:0,top:"40%",left:"40%",backgroundColor:D.dialGradient3,opacity:.2,borderRadius:L.buttonSize}}),E("div",{style:{width:Qe,height:Qe,borderRadius:L.buttonSize*v.centerButton.borderRadiusRatio,backgroundColor:D.hubFill,display:"flex",alignItems:"center",justifyContent:"center"},children:E("button",{ref:Z,type:"button","aria-label":n?"Close settings":"Open settings",disabled:!a,onClick:a,onMouseEnter:()=>x(true),onMouseLeave:()=>x(false),style:{border:0,padding:0,background:"transparent",width:L.buttonSize,height:L.buttonSize,borderRadius:L.buttonSize/2,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:a?"pointer":"default",transform:_?`scale(${J.centerHover.scale})`:"scale(1)",transition:`transform ${J.centerHover.duration}ms ease`,animation:St&&!_?Se.pulse:"none"},children:n?ge("span",{style:{display:"flex",flexDirection:"column",alignItems:"center",fontSize:v.centerButton.text.fontSize-2,fontWeight:v.centerButton.text.fontWeight,fontFamily:v.centerButton.text.fontFamily,color:D.centerText,letterSpacing:v.centerButton.text.letterSpacing,textAlign:"center",textShadow:`0 0 4px ${D.centerTextGlow}`,textTransform:"uppercase",lineHeight:1.2},children:[E("span",{style:{marginBottom:-2},children:"CLOSE"}),E("span",{style:{marginTop:-2},children:"SETTINGS"})]}):E("span",{style:{fontSize:v.centerButton.text.fontSize,fontWeight:v.centerButton.text.fontWeight,fontFamily:v.centerButton.text.fontFamily,color:D.centerText,letterSpacing:v.centerButton.text.letterSpacing,textAlign:"center",textShadow:`0 0 4px ${D.centerTextGlow}`,textTransform:"uppercase"},children:o})})})]})]}),ae>1&&ge("div",{style:{position:"absolute",left:"50%",marginLeft:-L.circleSize/2,top:"calc(100% - 64px)",width:L.circleSize,display:"flex",alignItems:"center",justifyContent:"space-between",opacity:Math.min(1,p),transform:`scale(${Math.min(1,p)})`},children:[E(uo,{side:"prev",disabled:r<=0,onClick:()=>Ye(r-1)}),ge("span",{style:{padding:"6px 12px",fontSize:13,fontWeight:900,fontFamily:Xt,letterSpacing:2,color:D.centerText,textShadow:`0 0 6px ${D.centerTextGlow}`},children:[String(r+1).padStart(2,"0"),ge("span",{style:{color:D.iconLabelMuted,textShadow:"none"},children:[" / ",String(ae).padStart(2,"0")]})]}),E(uo,{side:"next",disabled:r>=ae-1,onClick:()=>Ye(r+1)})]}),je&&!n&&E(ro,{title:"Welcome to Buoy!",message:"Tap the center button to configure and add tools to your dial menu.",onDismiss:Ae,showArrow:false})]})}import{persistentStorage as mo,devToolsStorageKeys as lr}from"@buoy-gg/shared-ui/web";import{recordUsage as cr,pruneUsage as dr}from"@buoy-gg/floating-tools-core/web";var go=lr.dial.usage(),We={},fo=false,Tt=null;function ho(){return Tt||(Tt=(async()=>{try{let e=await mo.getItem(go);if(e){let t=JSON.parse(e);t&&typeof t=="object"&&(We=t)}}catch{}finally{fo=true}})(),Tt)}ho();function ur(e){return e.map((t,o)=>({id:t,index:o,lastUsed:We[t]?.lastUsed??0})).sort((t,o)=>o.lastUsed-t.lastUsed||t.index-o.index).map(({id:t})=>t)}async function pr(e){if(!e)return;fo||await ho();let t=Math.max(Date.now(),...Object.values(We).map(o=>o.lastUsed+1));We=dr(cr(We,e,t),t);try{await mo.setItem(go,JSON.stringify(We))}catch{}}import{useCallback as mr,useMemo as yo}from"react";import{persistentStorage as gr}from"@buoy-gg/shared-ui/web";import{useState as te,useEffect as Ie,useCallback as st,useMemo as lt}from"react";import{settingsEventBus as ct}from"@buoy-gg/floating-tools-core/web";import{useSyncExternalStore as fr}from"react";import{getRegisteredToolModule as hr}from"@buoy-gg/shared-ui/web";var yr=()=>()=>{},br=()=>null;function Sr(){let e=hr("@buoy-gg/external-sync");return fr(e?.subscribeSyncStatus??yr,()=>e?.getSyncStatus?.()??null,br)}import{SentryIcon as vr,WifiCircuitIcon as wr,ImageOverlayIcon as xr,RenderCountIcon as Cr,Info as It,Layers as Tr,ChevronRightIcon as bo,ChevronDown as So,getStorageBackendType as Ir,getUseLicense as zr,persistentStorage as ze,Trash2 as kr,CheckCircle2 as vo,LicenseEntryModal as Mr,BackgroundSwitcher as Rr,night as h,NightCard as ke,NightRows as zt,NightSectionLabel as Ar,NightFootnote as wo,NightSwitch as xo,NightButton as Co,NightSegmented as Or,NightBadge as ue,NightSeparator as Er,monoFont as To}from"@buoy-gg/shared-ui/web";import{EnvIcon as Io,StorageIcon as Dr,RoutesIcon as Br,NetworkIcon as Fr,QueryIcon as Pr,HighlighterIcon as Lr,ReduxIcon as $r,EventsIcon as Wr}from"@buoy-gg/floating-tools-core/web";import jr,{createContext as Hr,useContext as Nr}from"react";import{jsx as Kr}from"react/jsx-runtime";var zo=Hr({});function Ur({children:e,defaultFloatingTools:t,defaultDialTools:o}){let a=jr.useMemo(()=>({defaultFloatingTools:t,defaultDialTools:o}),[t,o]);return Kr(zo.Provider,{value:a,children:e})}function ko(){return Nr(zo)}import Vr from"react";import{toolTheme as _r}from"@buoy-gg/shared-ui/web";import{jsx as Mo}from"react/jsx-runtime";function qr({label:e,size:t,color:o=_r.colors.text}){let a=Math.max(Array.from(e.replace(/[\uFE00-\uFE0F\u200D]/g,"")).length,1),n=a<=2?t:t*1.6,i=Math.max(7,Math.min(t*(a===1?.7:.62),n/(.62*a)));return Mo("span",{style:{display:"inline-flex",minWidth:t,maxWidth:n,height:t,alignItems:"center",justifyContent:"center",color:o,fontSize:i,fontWeight:800,letterSpacing:.5,whiteSpace:"nowrap",overflow:"hidden"},children:e})}function Ro(e,t){return e==null?e:typeof e=="function"?Vr.createElement(e,{slot:t.slot,size:t.size,state:t.state,actions:t.actions}):typeof e=="string"||typeof e=="number"?Mo(qr,{label:String(e),size:t.size,color:t.color}):e}import{JsModal as Gr,devToolsStorageKeys as kt}from"@buoy-gg/shared-ui/web";import{useSafeAreaInsets as Jr}from"@buoy-gg/shared-ui/web";import{Fragment as Ke,jsx as c,jsxs as $}from"react/jsx-runtime";var dt="@react_buoy_dev_tools_settings",Xr=6,ut=e=>{let t=Xr,o={};for(let[a,n]of Object.entries(e))n&&t>0?(o[a]=true,t-=1):o[a]=false;return o},Yr=(e,t)=>{let{userStatus:o,environment:a,...n}=e,i=t?Object.entries(n).filter(([l])=>t.includes(l)):Object.entries(n);return{...Object.fromEntries(i),environment:a??false}},Ao=(e,t,o)=>{if(!t)return e;let a={...e.dialTools,...t.dialTools??{}},n=o?.allowedDialKeys?Object.entries(a).filter(([i])=>o.allowedDialKeys?.includes(i)):Object.entries(a);return{dialTools:ut(Object.fromEntries(n)),floatingTools:Yr({...e.floatingTools,...t.floatingTools??{}},o?.allowedFloatingKeys),globalSettings:{enableSharedModalDimensions:false,expandableWindowControls:true,...t.globalSettings??{}}}},Qr=(e=[],t,o)=>{let a={},n={},i=new Set(t??[]),l=new Set(o??[]),u=!o||o.length===0;for(let d of e){let{id:p,slot:m="both"}=d;(m==="dial"||m==="both")&&(a[p]=u?true:l.has(p)),(m==="row"||m==="both")&&(n[p]=i.has(p))}return{dialTools:ut(a),floatingTools:{...n,environment:i.has("environment")},globalSettings:{enableSharedModalDimensions:false,expandableWindowControls:true}}},Zr=({visible:e,onClose:t,onSettingsChange:o,initialSettings:a,availableApps:n=[],storage:i=ze,zIndex:l})=>{let{defaultFloatingTools:u,defaultDialTools:d}=ko(),p=lt(()=>Qr(n,u,d),[n,u,d]),m=lt(()=>Object.keys(p.dialTools),[p]),C=lt(()=>Object.keys(p.floatingTools).filter(s=>s!=="environment"),[p]),[g,k]=te(a||Ue||p),[y,S]=te(Mt??"floating"),[T,M]=te(Mt!==null),[B,_]=te(new Set),[x,z]=te(false),[P,I]=te(false);Ie(()=>{let s=requestAnimationFrame(()=>I(true));return()=>cancelAnimationFrame(s)},[]);let R=Sr();Ie(()=>{(async()=>{try{let s=await ze.getItem(kt.settings.activeTab());if(s&&["floating","settings","pro"].includes(s)){let f=s;Mt=f,S(O=>O===f?O:f)}}catch{}finally{M(true)}})()},[]),Ie(()=>{T&&ze.setItem(kt.settings.activeTab(),y).catch(s=>{console.warn("Failed to save settings active tab:",s)})},[y,T]);let oe=zr()?.(),Z=oe?.isPro??false,G=!Z&&oe?.licenseKey?oe.error:null,le=oe?.errorKind==="transport",[K,ne]=te(Oo),[J,Se]=te(false),[me,ve]=te(false),[L,Re]=te(false),[fe,re]=te([]),[we,ae]=te(false),r=Jr(),F=jt.get("window").height,W=jt.get("window").width,je=Math.floor(F*.33),Je=Math.min(W-32,400),Ae=st(async()=>{try{let s=await i.getItem(dt);if(s){let f=JSON.parse(s),O=Ao(p,f,{allowedDialKeys:m,allowedFloatingKeys:C});Ue=O,k(Y=>Eo(Y,O)?Y:O);return}Ue=p,k(f=>Eo(f,p)?f:p)}catch(s){console.error("Failed to load dev tools settings:",s),k(p)}},[p,m,C,i]);Ie(()=>{Ae()},[Ae]),Ie(()=>{Ir().then(s=>{Oo=s,ne(f=>f===s?f:s)})},[]),Ie(()=>{L&&(ae(true),ze.getAllKeys().then(s=>{re(s.sort())}).catch(()=>{re([])}).finally(()=>{ae(false)}))},[L]);let Xe=async s=>{try{let f={...s,dialTools:ut(s.dialTools)};await i.setItem(dt,JSON.stringify(f)),Ue=f,k(f),o?.(f),ct.emit(f)}catch(f){console.error("Failed to save dev tools settings:",f)}},Ye=s=>{let f={...g,floatingTools:{...g.floatingTools,[s]:!g.floatingTools[s]}};Xe(f)},Oe=s=>{let f={...g,globalSettings:{...g.globalSettings,[s]:!g.globalSettings?.[s]}};Xe(f)},Qe=async()=>{Se(true),ve(false);try{await ze.clear(),ve(true),k(p),i!==ze&&await i.setItem(dt,JSON.stringify(p)),o?.(p),ct.emit(p),setTimeout(()=>ve(false),2e3)}catch(s){console.error("Failed to clear storage:",s)}finally{Se(false)}},bt=st(s=>{},[]),St=s=>{let f=n.find(O=>O.id===s);return f?.description?f.description:s==="environment"?"Environment badge.":""},A=s=>s==="environment"?"Env Badge":n.find(f=>f.id===s)?.name??s.toUpperCase().replace(/_/g," "),w=s=>{if(!P)return null;switch(s){case"query":return c(Pr,{size:18});case"env":return c(Io,{size:18});case"sentry":return c(vr,{size:18,color:"#9945FF"});case"storage":return c(Dr,{size:18,bgColor:h.color.surface});case"wifi":case"query-wifi-toggle":return c(wr,{size:18,colorPreset:"green",strength:4,noBackground:true});case"route-events":return c(Br,{size:18,bgColor:h.color.surface});case"network":return c(Fr,{size:18});case"environment":return c(Io,{size:18});case"debug-borders":return c(Tr,{size:18,color:h.color.accent});case"highlight-updates":return c(Cr,{size:18,color:h.color.accent});case"highlight-updates-modal":return c(Lr,{size:18});case"redux":return c($r,{size:18});case"image-overlay":return c(xr,{size:18});case"events":return c(Wr,{size:18});case"zustand":try{let{ZustandIcon:f}=Nt("@buoy-gg/zustand/web");return c(f,{size:18})}catch{return c(It,{size:18,color:h.color.textSecondary})}case"jotai":try{let{JotaiIcon:f}=Nt("@buoy-gg/jotai/web");return c(f,{size:18})}catch{return c(It,{size:18,color:h.color.textSecondary})}default:{let f=n.find(O=>O.id===s);return f?.icon!=null?Ro(f.icon,{slot:"row",size:18,color:f.color}):c(It,{size:18,color:h.color.textSecondary})}}},X=(s,f,O,Y)=>{let he=St(s);return $(Ze,{activeOpacity:O?1:.7,onPress:()=>!O&&Y(),accessibilityLabel:A(s),accessibilityRole:"button",style:[b.toolRow,O&&b.rowDisabled],children:[c(j,{style:b.toolIconSlot,children:w(s)}),$(j,{style:b.rowInfo,children:[$(N,{style:b.rowLabel,children:[A(s),O?" \xB7 max 6":""]}),he?c(N,{style:b.rowCaption,numberOfLines:1,children:he}):null]}),c(xo,{value:f,disabled:O,onValueChange:()=>Y()})]},s)},H=s=>{_(f=>{let O=new Set(f);return O.has(s)?O.delete(s):O.add(s),O})},q=(s,f,O,Y,he)=>{let ye=g.globalSettings?.[s]??false,Ee=B.has(s);return $(j,{children:[$(Ze,{activeOpacity:.7,onPress:()=>H(s),accessibilityLabel:f,style:b.settingRow,children:[$(j,{style:b.rowInfo,children:[c(N,{style:b.rowLabel,children:f}),c(N,{style:b.rowCaption,numberOfLines:Ee?0:1,children:O})]}),c(xo,{value:ye,onValueChange:()=>Oe(s)})]}),Ee&&$(j,{style:b.settingRowBody,children:[c(N,{style:b.settingRowBodyText,children:Y}),c(N,{style:b.settingRowBodyHint,children:he})]})]},s)},U=(s,f,O)=>$(j,{children:[c(Ar,{children:s}),f,O]}),ee=K==="filesystem"?c(ue,{label:"File System",tone:"accent"}):K==="asyncstorage"?c(ue,{label:"Async Storage",tone:"warning"}):K==="localstorage"?c(ue,{label:"Local Storage",tone:"accent"}):K==="memory"?c(ue,{label:"Memory",tone:"danger"}):c(ue,{label:"Loading\u2026",tone:"neutral"}),ce=()=>$(j,{style:b.container,children:[$(Wt,{style:b.scrollContent,showsVerticalScrollIndicator:false,contentContainerStyle:b.scrollContainer,children:[y==="floating"&&c(Ke,{children:U("Floating Tools",c(ke,{glass:true,children:c(zt,{children:Object.entries(g.floatingTools).map(([s,f])=>X(s,f,false,()=>Ye(s)))})}),c(wo,{children:"Tools switched on here appear in the floating bubble row."}))}),y==="settings"&&$(Ke,{children:[U("Background",c(ke,{glass:true,padded:true,children:c(Rr,{embedded:true})})),U("Storage",$(ke,{glass:true,children:[$(Ze,{activeOpacity:.7,onPress:()=>Re(!L),accessibilityLabel:"Storage Type",style:b.settingRow,children:[c(j,{style:b.rowInfo,children:c(N,{style:b.rowLabel,children:"Storage Type"})}),ee,L?c(So,{size:16,color:h.color.textTertiary}):c(bo,{size:16,color:h.color.textTertiary})]}),L&&$(Ke,{children:[$(j,{style:b.settingRowBody,children:[c(N,{style:b.settingRowBodyText,children:K==="filesystem"?"Settings persist independently and survive AsyncStorage.clear() calls during logout.":K==="asyncstorage"?"Settings may be lost if AsyncStorage is cleared during logout.":K==="localstorage"?"Settings are saved in this browser. Clearing site data removes them.":K==="memory"?"Settings are stored in memory only and will be lost on app restart.":"Checking storage backend\u2026"}),K==="asyncstorage"&&c(N,{style:[b.settingRowBodyText,b.bodyWarning],children:"Install expo-file-system to persist settings through logout flows."}),K==="memory"&&c(N,{style:[b.settingRowBodyText,b.bodyDanger],children:"No persistent storage available \u2014 install expo-file-system (best) or @react-native-async-storage/async-storage."})]}),c(Er,{}),$(j,{style:b.storageExpanded,children:[$(j,{style:b.storageExpandedHeader,children:[c(N,{style:b.storageExpandedTitle,children:"SAVED SETTINGS"}),c(N,{style:b.storageExpandedCount,children:we?"\u2026":`${fe.length} keys`})]}),we?c(N,{style:b.storageKeyEmpty,children:"Loading\u2026"}):fe.length===0?c(N,{style:b.storageKeyEmpty,children:"No settings saved yet"}):c(Wt,{style:b.storageKeysList,nestedScrollEnabled:true,showsVerticalScrollIndicator:true,children:fe.map(s=>c(j,{style:b.storageKeyItem,children:c(N,{style:b.storageKeyText,numberOfLines:1,children:s.replace("@react_buoy_","")})},s))})]}),c(j,{style:b.cardButtonWrap,children:c(Co,{label:me?"Cleared":J?"Clearing\u2026":"Clear All Settings",variant:me?"secondary":"destructive",size:"md",disabled:J,onPress:Qe,icon:me?c(vo,{size:15,color:h.color.accent}):c(kr,{size:15,color:J?h.color.textTertiary:h.color.danger})})})]})]})),R&&R.state!=="idle"&&U("Desktop Sync",$(ke,{glass:true,children:[$(Ze,{activeOpacity:.7,onPress:()=>H("desktopSync"),accessibilityLabel:"Buoy Desktop",style:b.settingRow,children:[c(j,{style:b.rowInfo,children:c(N,{style:b.rowLabel,children:"Buoy Desktop"})}),R.state==="connected"?c(ue,{label:"Connected",tone:"accent"}):R.state==="connecting"?c(ue,{label:"Connecting\u2026",tone:"neutral"}):c(ue,{label:"Retrying",tone:"warning"}),B.has("desktopSync")?c(So,{size:16,color:h.color.textTertiary}):c(bo,{size:16,color:h.color.textTertiary})]}),B.has("desktopSync")&&$(j,{style:b.settingRowBody,children:[$(N,{style:b.settingRowBodyText,children:[R.state==="connected"?"Streaming tool data to Buoy Desktop at ":"Trying to reach Buoy Desktop at ",c(N,{style:b.footnoteMono,children:R.targetURL??"(unknown URL)"}),R.state!=="connected"&&" \u2014 is the desktop app running? Override with the externalSync socketURL option if it runs elsewhere."]}),R.state==="retrying"&&R.lastError&&$(N,{style:[b.settingRowBodyText,b.bodyWarning],children:["Last error: ",R.lastError]})]})]})),U("Modal Behavior",c(ke,{glass:true,children:$(zt,{children:[q("enableSharedModalDimensions","Shared Modal Size","Sync dimensions across all tools","When enabled, all tool modals will share the same size and position. Resizing one modal will affect all others. When disabled, each tool remembers its own size and position independently.","Keep OFF for the best experience. This allows you to customize each tool's modal size separately."),De.OS!=="web"?q("expandableWindowControls","Expand Controls","iPad-style expandable window buttons","When enabled, the window control buttons (minimize, toggle mode, close) start as small dots and expand into larger, easy-to-tap buttons when pressed. When disabled, buttons are directly tappable at their small size.","Keep ON for touch devices where the small buttons are hard to press. Turn OFF if you prefer direct single-tap access."):null]})}))]}),y==="pro"&&$(Ke,{children:[U("License",c(ke,{glass:true,children:$(j,{style:b.settingRow,children:[c(j,{style:b.rowInfo,children:c(N,{style:b.rowLabel,children:"License Status"})}),c(j,{testID:"buoy-settings-license-status",accessibilityLabel:Z?"License: Active":"License: Free",children:Z?c(ue,{label:"Active",tone:"accent"}):c(ue,{label:"Free",tone:"neutral"})})]})}),c(wo,{children:Z?"You have full access to all Buoy DevTools features.":G?le?`Couldn't reach the license server (${G}). A VPN or corporate proxy can block buoy.gg \u2014 turn it off and reload. Your key hasn't been rejected.`:`License check failed: ${G}.`:"Upgrade to Pro to unlock all features and support development."})),!Z&&$(Ke,{children:[U("Pro Features",c(ke,{glass:true,children:c(zt,{children:["Advanced Settings","Priority Support"].map(s=>$(j,{style:b.featureRow,children:[c(vo,{size:16,color:h.color.accent}),c(N,{style:b.rowLabel,children:s})]},s))})})),c(Co,{label:"Upgrade to Pro",variant:"primary",size:"lg",onPress:()=>z(true)})]})]})]}),c(Mr,{visible:x,onClose:()=>z(false),onSuccess:()=>z(false)})]});return c(Gr,{visible:e,onClose:t,zIndex:l,variant:"night",header:{showToggleButton:false,customContent:c(j,{style:b.headerRow,children:c(Or,{glass:true,tabs:[{key:"floating",label:"Floating"},{key:"settings",label:"Settings"},{key:"pro",label:"Pro"}],activeKey:y,onChange:s=>S(s)})})},initialMode:"bottomSheet",onModeChange:bt,persistenceKey:kt.settings.root(),enablePersistence:true,maxHeight:F-r.top,initialHeight:je,initialFloatingPosition:{x:(W-Je)/2,y:r.top+20},enableGlitchEffects:true,children:ce()})},es={dialTools:{},floatingTools:{environment:false},globalSettings:{enableSharedModalDimensions:false}},ts=(e,t)=>{let o=new Set(e??[]),a=new Set(t??[]),n={};for(let l of a)n[l]=true;let i={environment:o.has("environment")};for(let l of o)l!=="environment"&&(i[l]=true);return{dialTools:ut(n),floatingTools:i,globalSettings:{enableSharedModalDimensions:false}}},Ue=null,Mt=null,Oo=null,Eo=(e,t)=>JSON.stringify(e)===JSON.stringify(t);ct.addListener(e=>{e&&(Ue=e)});var os=()=>{let{defaultFloatingTools:e,defaultDialTools:t}=ko(),o=lt(()=>!e&&!t?es:ts(e,t),[e,t]),[a,n]=te(o),i=st(async()=>{try{let u=await ze.getItem(dt);if(u){let d=JSON.parse(u),p=Ao(o,d);n(p);return}n(o)}catch(u){console.error("Failed to load dev tools settings:",u),n(o)}},[o]);Ie(()=>{i();let u=ct.addListener(d=>{try{d&&n(d)}catch{}});return()=>{u()}},[i]);let l=st(()=>{i()},[i]);return{settings:a,refreshSettings:l}},b=Ht.create({container:{flex:1,backgroundColor:"transparent"},headerRow:{flexDirection:"row",alignItems:"center",paddingLeft:h.gutter,paddingRight:h.gutter,paddingBottom:8},scrollContent:{flex:1},scrollContainer:{paddingHorizontal:h.gutter,paddingTop:8,paddingBottom:24,gap:h.groupGap},toolRow:{flexDirection:"row",alignItems:"center",gap:12,paddingHorizontal:h.rowPadH,paddingVertical:12},settingRow:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:h.rowPadH,paddingVertical:h.rowPadV,minHeight:52},featureRow:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:h.rowPadH,paddingVertical:12},rowDisabled:{opacity:.4},toolIconSlot:{width:24,alignItems:"center"},rowInfo:{flex:1,gap:2},rowLabel:{color:h.color.text,fontSize:h.font.row,fontWeight:"500"},rowCaption:{color:h.color.textTertiary,fontSize:h.font.label},settingRowBody:{paddingHorizontal:h.rowPadH,paddingBottom:h.rowPadV,gap:6},settingRowBodyText:{color:h.color.textSecondary,fontSize:h.font.caption,lineHeight:h.font.caption*1.45},settingRowBodyHint:{color:h.color.textTertiary,fontSize:h.font.caption,lineHeight:h.font.caption*1.45},bodyWarning:{color:h.color.warning},bodyDanger:{color:h.color.danger},cardButtonWrap:{paddingHorizontal:h.cardPad,paddingTop:10,paddingBottom:h.cardPad},storageExpanded:{paddingHorizontal:h.rowPadH,paddingVertical:12,gap:8},storageExpandedHeader:{flexDirection:"row",alignItems:"center"},storageExpandedTitle:{flex:1,color:h.color.textSecondary,fontSize:h.font.micro,fontWeight:"600",letterSpacing:.5},storageExpandedCount:{color:h.color.textTertiary,fontSize:h.font.micro},storageKeysList:{maxHeight:150},storageKeyItem:{backgroundColor:h.color.glassElevated,borderRadius:h.radius.segment,paddingHorizontal:10,paddingVertical:7,marginBottom:4},storageKeyText:{color:h.color.textSecondary,fontSize:h.font.micro,fontFamily:To},storageKeyEmpty:{color:h.color.textTertiary,fontSize:h.font.caption,fontStyle:"italic"},footnoteMono:{fontFamily:To,fontSize:h.font.label,color:h.color.textSecondary}});import{jsx as Do}from"react/jsx-runtime";var ns=[];function Bo({visible:e,onClose:t,availableTools:o=ns,defaultFloatingTools:a,defaultDialTools:n,storage:i=gr,onSettingsChange:l}){let u=yo(()=>({getItem:async m=>i.getItem(m),setItem:async(m,C)=>i.setItem(m,C)}),[i]),d=yo(()=>o.map(m=>({...m,name:m.name??m.id,icon:typeof m.icon=="function"?C=>m.icon(C.size):m.icon})),[o]),p=mr(m=>{l?.(m)},[l]);return Do(Ur,{defaultFloatingTools:a,defaultDialTools:n,children:Do(Zr,{visible:e,onClose:t,zIndex:11e3,availableApps:d,storage:u,onSettingsChange:p})})}import{persistentStorage as Fo}from"@buoy-gg/shared-ui/web";import{createContext as as,useCallback as be,useContext as is,useEffect as Rt,useMemo as rs,useRef as Ve,useState as Po}from"react";var ss=(e,t,o)=>{if(t.singleton){let n=e.find(i=>i.id===t.id);if(n){let i=n.minimized??false;return{instanceId:n.instanceId,wasMinimized:i,apps:[...e.filter(l=>l.instanceId!==n.instanceId),{...n,minimized:false}]}}}let a=o();return{instanceId:a,wasMinimized:false,apps:[...e,{...t,instanceId:a}]}};import{createContext as ls,useCallback as Lo,useContext as cs,useEffect as pt,useMemo as ds,useRef as $o,useState as mt}from"react";import{JsModal as us,ModalHeader as _e,HeaderSearchButton as ps,TickProvider as ms,devToolsStorageKeys as Wo,buoyColors as jo,gameUIColors as At}from"@buoy-gg/shared-ui/web";import{jsx as se,jsxs as gt}from"react/jsx-runtime";var qe=()=>{},gs={search:"",isSearchActive:false,clearSearch:qe,close:qe,minimize:qe,showToast:qe,setHeaderOverride:qe},Ho=ls(null);function No(){return cs(Ho)??gs}function fs(e,t){let{setHeaderOverride:o}=No();pt(()=>(o(e),()=>o(null)),t)}var Ko=2200,hs={success:At.success,error:At.error,info:At.info};function ys({message:e,type:t,nonce:o}){let a=$o(new xe.Value(0)).current;pt(()=>{a.setValue(0),xe.sequence([xe.timing(a,{toValue:1,duration:150,useNativeDriver:true}),xe.delay(Ko-450),xe.timing(a,{toValue:0,duration:300,useNativeDriver:true})]).start()},[o,a]);let n=hs[t];return gt(xe.View,{pointerEvents:"none",style:[ft.toast,{opacity:a,borderColor:n+"60"}],children:[se(j,{style:[ft.toastDot,{backgroundColor:n}]}),se(N,{style:ft.toastText,numberOfLines:2,children:e})]})}function bs({app:e,config:t,visible:o,zIndex:a,onClose:n,onMinimize:i,initialModalState:l,enableSharedModalDimensions:u,bodyProps:d}){let p=e.component,[m,C]=mt(false),[g,k]=mt(""),[y,S]=mt(null),[T,M]=mt(null),B=$o(null),_=Lo(()=>{C(false),k("")},[]),x=Lo((K,ne="info")=>{B.current&&clearTimeout(B.current),M(J=>({message:K,type:ne,nonce:(J?.nonce??0)+1})),B.current=setTimeout(()=>M(null),Ko)},[]);pt(()=>()=>{B.current&&clearTimeout(B.current)},[]);let z=ds(()=>({search:m?g:"",isSearchActive:m,clearSearch:_,close:n,minimize:()=>i(),showToast:x,setHeaderOverride:S,instanceId:e.instanceId}),[g,m,_,n,i,x,e.instanceId]),P=y?.title??t.title??e.title??e.id,I=y?.subtitle??t.subtitle,R=y?.onBack,oe=y?.actions??t.headerActions,Z=y?.searchable??t.searchable;pt(()=>{!Z&&m&&_()},[Z,m,_]);let G=u?Wo.modal.root():Wo.custom(e.id).modal(),le=gt(_e,{children:[R&&!m&&se(_e.Navigation,{onBack:R}),m?se(_e.Search,{value:g,onChangeText:k,onCancel:_,placeholder:t.searchPlaceholder,testID:`tool-search-field-${e.id}`}):se(_e.Content,{title:P,subtitle:I}),gt(_e.Actions,{children:[!m&&oe,Z&&!m&&se(ps,{variant:"chip",testID:`tool-search-${e.id}`,onPress:()=>C(true)})]})]});return se(Ho.Provider,{value:z,children:se(us,{visible:o,onClose:n,onBack:R,onMinimize:i,initialModalState:l,zIndex:a,persistenceKey:G,enablePersistence:true,initialMode:t.initialMode??"bottomSheet",header:{customContent:le,showToggleButton:true},disableScrollWrapper:true,styles:{},children:gt(j,{style:ft.bodyRoot,children:[se(ms,{children:se(p,{...d})}),T&&se(ys,{message:T.message,type:T.type,nonce:T.nonce})]})})})}var ft=Ht.create({bodyRoot:{flex:1,minHeight:0,backgroundColor:"transparent"},toast:{position:"absolute",bottom:16,alignSelf:"center",flexDirection:"row",alignItems:"center",gap:8,maxWidth:"86%",backgroundColor:jo.card,borderWidth:1,borderRadius:8,paddingHorizontal:12,paddingVertical:8,shadowColor:"#000",shadowOpacity:.4,shadowRadius:8,shadowOffset:{width:0,height:2},elevation:6},toastDot:{width:6,height:6,borderRadius:3},toastText:{flex:1,fontSize:12,color:jo.text}});import{Fragment as Ss,jsx as pe}from"react/jsx-runtime";var Uo=as(null),Vo="@react_buoy_open_apps",Ot=44,vs=12,ws=100,xs=16,Cs=e=>({x:window.innerWidth-Ot-xs,y:window.innerHeight-ws-Ot-e*(Ot+vs)}),_o=({children:e})=>{let[t,o]=Po([]),[a,n]=Po(false),i=Ve([]),l=Ve(null),u=Ve(false),d=Ve(false),p=Ve(false),m=be(x=>{let z="";return o(P=>{let{apps:I,instanceId:R}=ss(P,x,()=>`${x.id}-${Date.now()}-${Math.random().toString(36).slice(2)}`);return z=R,I}),z},[]),C=be(()=>{if(u.current||!d.current||!p.current)return;u.current=true;let x=l.current;if(!x||x.length===0){n(true);return}l.current=null,x.forEach(({id:z,minimized:P})=>{let I=i.current.find(R=>R.id===z);if(I&&I.component){let R=Ro(I.icon,{slot:"dial",size:20,color:I.color});m({id:I.id,title:I.name,component:I.component,props:I.props,modal:I.modal,launchMode:I.launchMode||"self-modal",singleton:I.singleton??true,icon:R,color:I.color,minimized:P})}}),n(true)},[m]);Rt(()=>{let x=false;return(async()=>{try{let z=await Fo.getItem(Vo);if(x)return;if(z){let P=JSON.parse(z),I;Array.isArray(P)&&P.length>0&&(typeof P[0]=="string"?I=P.map(R=>({id:R,minimized:false})):I=P.filter(R=>typeof R=="object"&&R!==null&&typeof R.id=="string"),I.length&&(l.current=I))}}catch{}x||(d.current=true,C())})(),()=>{x=true}},[C]),Rt(()=>{if(!a)return;let x=t.map(z=>({id:z.id,minimized:z.minimized??false}));Fo.setItem(Vo,JSON.stringify(x))},[t,a]);let g=be(x=>{i.current=x,p.current=true,C()},[C]),k=be(x=>{o(z=>z.length?x?z.filter(P=>P.instanceId!==x):z.slice(0,-1):z)},[]),y=be(()=>o([]),[]),S=be((x,z)=>{o(P=>P.map(I=>I.instanceId===x?{...I,minimized:true,restoreState:z}:I))},[]),T=be((x,z)=>{o(P=>P.map(I=>I.instanceId===x?{...I,minimized:false,restoreState:z??I.restoreState}:I))},[]),M=be(x=>t.find(z=>z.instanceId===x)?.minimized??false,[t]),B=t.some(x=>x.launchMode!=="toggle-only"&&!x.minimized);Rt(()=>{if(!B)return;let x=z=>{if(z.key!=="Escape"||z.defaultPrevented)return;let P=[...t].reverse().find(I=>I.launchMode!=="toggle-only"&&!I.minimized);P&&k(P.instanceId)};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[B,k,t]);let _=rs(()=>({openApps:t,isAnyOpen:B,open:m,close:k,closeAll:y,registerApps:g,minimize:S,restore:T,isMinimized:M}),[t,B,m,k,y,g,S,T,M]);return pe(Uo.Provider,{value:_,children:e})},ht=()=>{let e=is(Uo);return e||{openApps:[],isAnyOpen:false,open:()=>"",close:()=>{},closeAll:()=>{},registerApps:()=>{},minimize:()=>{},restore:()=>{},isMinimized:()=>false}},Ts=9e3,Is={position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.28)",display:"flex",alignItems:"center",justifyContent:"center"},zs={maxHeight:"90%",width:"94%",borderRadius:12,backgroundColor:"white",overflow:"hidden"},ks=({app:e,zIndex:t,onClose:o,onMinimize:a,minimizeTargetPosition:n,enableSharedModalDimensions:i})=>{let l=e.component,u=!e.minimized,d={...e.props??{},...i?{enableSharedModalDimensions:true}:{}};return e.modal&&(!e.launchMode||e.launchMode==="self-modal")?pe(bs,{app:e,config:e.modal,visible:u,zIndex:t,onClose:o,onMinimize:a,initialModalState:e.restoreState,enableSharedModalDimensions:i,bodyProps:d}):e.launchMode==="self-modal"?pe(l,{...d,visible:u,onClose:o,onRequestClose:o,onMinimize:a,minimizeTargetPosition:n,instanceId:e.instanceId,zIndex:t,initialModalState:e.restoreState}):e.launchMode==="inline"?u?pe("div",{style:{position:"fixed",inset:0,zIndex:t,pointerEvents:"none"},children:pe(l,{...d,onClose:o,onMinimize:a,minimizeTargetPosition:n,instanceId:e.instanceId})}):null:pe("div",{style:{...Is,zIndex:t,display:u?"flex":"none"},children:pe("div",{style:zs,children:pe(l,{...d,onClose:o,onMinimize:a,minimizeTargetPosition:n,instanceId:e.instanceId})})})},qo=()=>{let{openApps:e,close:t,minimize:o}=ht(),{settings:a}=os(),n=e.filter(u=>u.launchMode!=="toggle-only");if(n.length===0)return null;let i=n.filter(u=>u.minimized).length,l=zi()??Cs(i);return pe(Ss,{children:n.map((u,d)=>pe(ks,{app:u,zIndex:Ts+d,onClose:()=>t(u.instanceId),onMinimize:p=>o(u.instanceId,p),enableSharedModalDimensions:a.globalSettings?.enableSharedModalDimensions===true,minimizeTargetPosition:l},u.instanceId))})};import{useCallback as Ms,useEffect as Et,useRef as Rs,useState as Go,useSyncExternalStore as Jo}from"react";import{persistentStorage as Xo,getToolAttention as Dt,subscribeToolAttention as Yo}from"@buoy-gg/shared-ui/web";import{jsx as ie,jsxs as yt}from"react/jsx-runtime";function As(e){return Jo(Yo,()=>Dt(e),()=>Dt(e))}var Qo={needsInput:"#FF8329",done:"#20C997",failed:"#FF3B30"},Zo={needsInput:3,failed:2,done:1},en=new Map;function tn(e){let t=null;for(let a of e?e.split("|"):[]){let n=Dt(a);n&&(!t||Zo[n.kind]>Zo[t.kind])&&(t=n)}let o=en.get(e);return o&&t&&o.kind===t.kind&&o.label===t.label?o:!o&&!t?null:(en.set(e,t),t)}function Os(e){let t=e.join("|");return Jo(Yo,()=>tn(t),()=>tn(t))}var on=28,Bt=32,Ft=6,nn=8,an=24,rn="@react_buoy_minimized_stack_expanded",Es=80,sn=2e3,Ds=6e3,Bs="#1A1A1A",Ge="#888888";function ln({down:e=false}){return ie("svg",{width:12,height:12,viewBox:"0 0 24 24","aria-hidden":"true",style:{transform:e?"rotate(180deg)":void 0},children:ie("path",{d:"M18 15l-6-6-6 6",fill:"none",stroke:Ge,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Fs({id:e,title:t,icon:o,index:a,onPress:n}){let i=As(e),l=Rs(null);return Et(()=>{let u=true,d,p=()=>{l.current?.animate([{transform:"translateX(0) scale(1)",opacity:1,offset:0},{transform:"translateX(3px) scale(1.05)",opacity:.4,offset:.2},{transform:"translateX(-3px) scale(1.1)",opacity:1,offset:.4},{transform:"translateX(2px) scale(1.0)",opacity:.6,offset:.6},{transform:"translateX(-1px) scale(0.95)",opacity:1,offset:.8},{transform:"translateX(0) scale(1)",opacity:1,offset:1}],{duration:Es,easing:"linear"})},m=C=>{let g=C?500+Math.random()*1500+a*200:sn+Math.random()*(Ds-sn)+a*300;d=setTimeout(()=>{u&&(p(),m(false))},g)};return m(true),()=>{u=false,clearTimeout(d)}},[a]),yt("button",{type:"button","aria-label":i?`${t} \u2014 ${i.label}. Restore`:`Restore ${t}`,onClick:n,style:{width:Bt,height:Bt,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",padding:0,cursor:"pointer",position:"relative"},children:[ie("div",{ref:l,style:{display:"flex",alignItems:"center",justifyContent:"center"},children:o}),i?ie("span",{"aria-hidden":true,"data-testid":`buoy-dock-badge-${e}-${i.kind}`,style:{position:"absolute",top:0,right:0,minWidth:12,height:12,borderRadius:6,padding:"0 2px",boxSizing:"border-box",background:Qo[i.kind],border:"1.5px solid #0C0C0C",color:"#000",fontSize:8,fontWeight:800,lineHeight:"9px",display:"flex",alignItems:"center",justifyContent:"center"},children:i.kind==="needsInput"?"!":""}):null]})}function Ps({containerWidth:e=32}){let{openApps:t,restore:o}=ht(),a=t.filter(g=>g.minimized&&g.launchMode!=="toggle-only"),[n,i]=Go(false),[l,u]=Go(false),d=Os(a.map(g=>g.id));Et(()=>{let g=false;return(async()=>{let k=await Xo.getItem(rn);!g&&k==="true"&&i(true),g||u(true)})(),()=>{g=true}},[]),Et(()=>{l&&Xo.setItem(rn,n?"true":"false")},[n,l]);let p=Ms(g=>{o(g)},[o]);if(a.length===0)return null;let m=nn+a.length*Bt+(a.length-1)*Ft+Ft+an+4,C={backgroundColor:Bs,borderTopLeftRadius:6,borderTopRightRadius:6,borderTop:`1px solid ${Ge}66`,borderLeft:`1px solid ${Ge}66`,borderRight:`1px solid ${Ge}66`,borderBottom:"none",boxSizing:"border-box"};return yt("div",{style:{height:on,overflow:"visible",position:"relative"},children:[ie("div",{style:{position:"absolute",bottom:"var(--buoy-stack-bottom, 0px)",top:"var(--buoy-stack-top, auto)",left:0,width:e,maxHeight:"var(--buoy-stack-space, calc(100vh - 48px))",visibility:n?"visible":"hidden",height:n?m:0,opacity:n?1:0,overflowY:"auto",overflowX:"hidden",transition:"height 200ms ease, opacity 200ms ease",pointerEvents:n?"auto":"none",...C},children:yt("div",{style:{height:m,display:"flex",flexDirection:"column",alignItems:"center",paddingTop:nn,gap:Ft,boxSizing:"border-box"},children:[[...a].reverse().map((g,k)=>ie(Fs,{id:g.id,title:g.title||g.id,icon:g.icon??ie("span",{style:{color:"#fff",fontSize:13},children:(g.title||g.id).slice(0,1).toUpperCase()}),index:k,onPress:()=>p(g.instanceId)},g.instanceId)),ie("button",{type:"button","aria-label":"Collapse",onClick:()=>i(false),style:{width:"100%",height:an,marginTop:3,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",cursor:"pointer",padding:0},children:ie(ln,{down:true})})]})}),yt("button",{type:"button","aria-label":`Show ${a.length} minimized tools`,tabIndex:n?-1:0,"aria-hidden":n,onClick:()=>i(true),style:{position:"absolute",bottom:0,left:0,width:e,height:on,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:2,cursor:"pointer",padding:0,opacity:n?0:1,transform:n?"scale(0.9)":"scale(1)",transition:"opacity 200ms ease, transform 200ms ease",pointerEvents:n?"none":"auto",...C},children:[ie(ln,{}),d?ie("span",{"aria-hidden":true,"data-testid":"buoy-dock-peek-attention",style:{position:"absolute",top:2,right:2,minWidth:11,height:11,borderRadius:6,padding:"0 2px",boxSizing:"border-box",background:Qo[d.kind],border:"1.5px solid #0C0C0C",color:"#000",fontSize:8,fontWeight:800,lineHeight:"9px",display:"flex",alignItems:"center",justifyContent:"center"},children:d.kind==="needsInput"?"!":""}):null,a.length>1&&ie("span",{style:{fontSize:9,fontWeight:600,color:Ge,marginLeft:1},children:a.length})]})]})}import{registerToolModules as Ls}from"@buoy-gg/shared-ui/web";import{createElement as $s}from"react";function cn(e){let t=e.icon;return{...e,icon:typeof t=="function"?o=>$s(t,{size:o,slot:e.slot??"both",color:e.color}):()=>t}}import{createContext as Ws,useContext as js,useState as dn,useMemo as un}from"react";import{jsx as Hs}from"react/jsx-runtime";var pn=Ws(null);function mn({children:e}){let[t,o]=dn(false),[a,n]=dn(false),i=un(()=>t||a,[t,a]),l=un(()=>({isDialOpen:t,isToolOpen:a,isDevToolsActive:i,setDialOpen:o,setToolOpen:n}),[t,a,i]);return Hs(pn.Provider,{value:l,children:e})}function Pt(){let e=js(pn);return e||{isDialOpen:false,isToolOpen:false,isDevToolsActive:false,setDialOpen:()=>{},setToolOpen:()=>{}}}import*as Ns from"@buoy-gg/license/web";import*as Ks from"@buoy-gg/shared-ui/web";import*as Us from"@buoy-gg/shared-ui/web/dataViewer";function gn(e){Ls({core:{useDevToolsVisibility:Pt},license:Ns,"shared-ui":Ks,"shared-ui/dataViewer":Us,...e});let t=new Set;return Object.values(e).flatMap(o=>Object.entries(o).flatMap(([a,n])=>!a.endsWith("Preset")||!n||typeof n.id!="string"||!n.component||t.has(n.id)?[]:(t.add(n.id),[cn(n)])))}import{useEffect as Lt,useMemo as fn,useRef as Vs}from"react";import{LicenseManager as _s,useLicense as qs}from"@buoy-gg/license/web";import{registerToolAdapters as Gs}from"@buoy-gg/shared-ui/web";function hn(e){return typeof e=="object"&&e!==null?e:void 0}function Js({isDevelopment:e,isLicensed:t,externalSync:o,isAvailable:a}){return o===false||!a?false:e?true:t&&hn(o)?.enableInRelease===true}import{useEffect as Xs,useMemo as Ys,useState as Qs}from"react";import{devToolsStorageKeys as Zs,persistentStorage as el}from"@buoy-gg/shared-ui/web";var tl=8;function ol(){let e="";for(;e.length<tl;)e+=(Math.random()*16|0).toString(16);return e}function nl(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function al({appName:e,hardwareName:t,platform:o,installId:a,deviceId:n}){let i=nl(e??"buoy")||"buoy",l=e??"Buoy Device",u=t?.trim()||o;return n?{deviceId:n,deviceName:`${l} (${u})`}:{deviceId:`${i}-${o}-${a}`,deviceName:`${l} (${u} \xB7 ${a.slice(-4)})`}}function il(){let e=globalThis;try{return e.sessionStorage??null}catch{return null}}async function rl({platform:e=De.OS,store:t,mint:o=ol}={}){let a=Zs.sync.deviceId(),n=t===void 0?e==="web"?il():el:t;if(!n)return o();try{let i=await n.getItem(a);if(i&&i.length>0)return i;let l=o();return await n.setItem(a,l),l}catch{return o()}}var $t=null;function sl(){return $t||($t=rl()),$t}function ll(e,t){let o=e?.deviceId,a=e?.deviceName,n=t.loadId??sl,i=t.platform??De.OS,[l,u]=Qs(null);return Xs(()=>{if(o)return;let d=false;return n().then(p=>{d||u(p)}),()=>{d=true}},[o,n]),Ys(()=>{if(!o&&!l)return null;let d=al({appName:t.appName,hardwareName:t.hardwareName,platform:i,installId:l??"",deviceId:o});return a?{...d,deviceName:a}:d},[o,a,l,t.appName,t.hardwareName,i])}import{getDevServerOrigin as cl,resolveReloadStrategy as dl,scheduleReloadApp as ul}from"@buoy-gg/shared-ui/web";var yn=Date.now(),bn=cl(),pl={platform:De.OS,isTV:De.isTV===true,isTVOS:De.isTVOS===true},Sn={version:3,getSnapshot:()=>{let e=dl("auto");return{startedAt:yn,devServerOrigin:bn,device:pl,reload:{available:e!==null,strategy:e}}},subscribe:e=>()=>{},actions:{ping:()=>({ok:true,startedAt:yn,devServerOrigin:bn}),reloadApp:e=>{let t=e??{},{strategy:o,delayMs:a}=ul({strategy:t.strategy,delayMs:t.delayMs});return{scheduled:true,strategy:o,delayMs:a}}}};import{Fragment as ml,jsx as Me,jsxs as gl}from"react/jsx-runtime";var fl=["ConsoleRoot","RouteTracker","ReactQueryTracker","ReduxAutoInstrument","PerfMonitorRoot","AutomationResumer","ImagesRoot"],hl=["DebugBordersStandaloneOverlay","HighlightUpdatesOverlay","ImageOverlayStandalone","PerfMonitorOverlay","JsTopHudOverlay","ImpersonateOverlay","ScenariosOverlay"];function yl(e){let t=fn(()=>Object.fromEntries(Object.entries(e.modules).map(([a,n])=>[a.replace(/^@buoy-gg\//,"").replace(/\/web$/,""),n])),[e.modules]),o=t["react-query"];return o?.useReactQuerySyncAdapter?Me(bl,{...e,modules:t,query:o}):Me(vn,{...e,modules:t})}function bl(e){let t=e.query.useReactQuerySyncAdapter();return Me(vn,{...e,queryAdapter:t})}function vn({modules:e,apps:t,requiredEnvVars:o,externalSync:a,headless:n,sentryGetClient:i,queryAdapter:l}){let{isPro:u,tier:d}=qs(),p=fn(()=>{let y={app:Sn};for(let[S,T]of Object.entries(e))for(let[M,B]of Object.entries(T))M.endsWith("SyncAdapter")&&B&&typeof B=="object"&&(y[S]=B);l&&(y.query=l),e.env?.createEnvSyncAdapter&&(y.env=e.env.createEnvSyncAdapter(o??[]));for(let S of t??[])S.sync&&(y[`custom:${S.id}`]=S.sync);return y},[e,t,o,l]),m=Vs(p);m.current=p,Lt(()=>Gs(()=>m.current),[]),Lt(()=>{let y=[],S=T=>{let M=T?.();typeof M=="function"&&y.push(M)};return S(e.network?.startNetworkCapture),S(e.storage?.startBrowserStorageCapture),S(e.assets?.startBrowserAssetCapture),e.storage?.storageSyncAdapter?.subscribe&&S(()=>e.storage.storageSyncAdapter.subscribe(()=>{})),e["focus-inspector"]?.focusInspectorSyncAdapter?.subscribe&&S(()=>e["focus-inspector"].focusInspectorSyncAdapter.subscribe(()=>{})),()=>{for(let T of y.reverse())T()}},[e]);let C=e["external-sync"],g=Js({isDevelopment:typeof et<"u"?et:process.env.NODE_ENV!=="production",isLicensed:u,externalSync:a,isAvailable:!!C}),k=e.sentry?.SentryRoot;return gl(ml,{children:[Object.entries(e).flatMap(([y,S])=>fl.map(T=>{let M=S[T];return M?Me(M,{},`${y}:${T}`):null})),k&&Me(k,{getClient:i}),Object.entries(e).flatMap(([y,S])=>hl.map(T=>{let M=S[T];return M&&(!n||T==="ScenariosOverlay"||T==="ImpersonateOverlay")?Me(M,{},`${y}:${T}`):null})),g&&Me(Sl,{module:C,tools:p,options:hn(a),isPro:u,tier:d})]})}function Sl({module:e,tools:t,options:o,isPro:a,tier:n}){let i=ll(o,{appName:typeof document>"u"?null:document.title||location.hostname,hardwareName:"Browser",platform:"web"}),{socket:l}=e.useExternalSyncSocket({deviceName:i?.deviceName??"Buoy Browser",socketURL:o?.socketURL??e.getDefaultSocketURL(),persistentDeviceId:i?.deviceId??null,platform:"web",enableLogs:o?.enableLogs});return Lt(()=>{if(!l)return;let u=()=>{l.connected&&_s.hasAccountAccess()&&l.emit("device-license",{isPro:a?"1":"0",tier:n})};return u(),l.on("connect",u),()=>{l.off("connect",u)}},[l,a,n]),e.useExternalSync({tools:t,socket:l,deviceId:i?.deviceId??null,enableLogs:o?.enableLogs}),null}import{jsx as V,jsxs as wn}from"react/jsx-runtime";var vl={},xn="@react_buoy_floating_menu_tooltip_shown",wl=Ce;function xl({size:e=14,color:t="#20C997"}){let o=Math.max(2,e/4),a=Math.max(1,e/16);return V("div",{style:{display:"grid",gridTemplateColumns:`repeat(3, ${o}px)`,gap:a,width:e,height:e,alignContent:"center",justifyContent:"center"},children:Array.from({length:9}).map((n,i)=>V("div",{style:{width:o,height:o,borderRadius:o/2,backgroundColor:t}},i))})}function Cl(e){return V(mn,{children:V(_o,{children:V(Tl,{...e})})})}function Tl({environment:e,userRole:t,availableEnvironments:o,onEnvironmentSwitch:a,apps:n,modules:i=vl,externalSync:l,requiredEnvVars:u,sentryGetClient:d,disableHints:p=false,headless:m=false}){let[C,g]=vt(false),[k,y]=vt(false),S=yi(false),T=ht(),M=Be(()=>Ut([...gn(i),...n??[]]),[n,i]),B=Pt(),_=T.openApps.some(r=>!r.minimized);de(()=>{B.setDialOpen(C)},[C,B.setDialOpen]),de(()=>{B.setToolOpen(_||k)},[_,k,B.setToolOpen]);let{registerApps:x}=T;de(()=>{x(M.map(r=>{let F=r.icon;return{...r,icon:typeof F=="function"?({size:W})=>F(W):F}}))},[x,M]);let z=Be(()=>M.map(r=>({id:r.id,name:r.name,description:r.description,slot:r.slot})),[M]),{settings:P}=bi({availableTools:z,storage:wl});de(()=>{let r=false;return(async()=>{let[F,W]=await Promise.all([Ce.getItem(ot.dial.isOpen()),Ce.getItem(ot.settings.modalOpen())]);r||(F==="true"&&g(true),W==="true"&&(g(true),y(true)),S.current=true)})(),()=>{r=true}},[]),de(()=>{S.current&&Ce.setItem(ot.dial.isOpen(),C?"true":"false")},[C]),de(()=>{S.current&&Ce.setItem(ot.settings.modalOpen(),k?"true":"false")},[k]);let I=Fe(r=>{if(pr(r.id),r.launchMode==="toggle-only"){r.onPress?.();return}if(r.component){let F=typeof r.icon=="function"?r.icon(20):r.icon;T.open({id:r.id,title:r.name||tt(r.id),component:r.component,props:r.props,modal:r.modal,launchMode:r.launchMode||"self-modal",singleton:r.singleton??true,icon:F,color:r.color||Kt(r.id)})}else r.onPress?.()},[T]),R=Be(()=>wt(M,"dial").map(r=>{let F=r.color||Kt(r.id),W;return typeof r.icon=="string"?W=r.icon:typeof r.icon=="function"?W=r.icon(32):W=null,{id:r.id,name:r.name||tt(r.id),icon:W,unavailable:!r.component&&!r.onPress,color:F,onPress:()=>{I(r),g(false)}}}),[M,I]),oe=Be(()=>{if(!C)return R;let r=new Map(R.map(F=>[F.id,F]));return ur(R.map(F=>F.id)).map(F=>r.get(F)).filter(F=>!!F)},[C,R]),Z=Be(()=>wt(M,"row").filter(r=>P.floatingTools[r.id]===true&&(r.component||r.onPress)),[M,P.floatingTools]),G=Be(()=>M.map(r=>({id:r.id,name:r.name||tt(r.id),description:r.description||Si(r.id),slot:r.slot,icon:r.icon,color:r.color})),[M]),[le,K]=vt(false),ne=T.openApps.some(r=>!r.minimized);de(()=>{if(p)return;let r=false,F=setTimeout(async()=>{let W=await Ce.getItem(xn);!r&&!W&&K(true)},1e3);return()=>{r=true,clearTimeout(F)}},[p]);let J=Fe(()=>{K(false),Ce.setItem(xn,"true")},[]),Se=Fe(()=>{J(),g(true)},[J]),me=Fe(()=>{g(false),y(false)},[]),ve=Fe(()=>{y(r=>!r)},[]),L=Fe(()=>y(false),[]),Re=!!(o?.length&&a),fe=P.floatingTools.environment!==false,re=le&&!C&&!ne;de(()=>{if(!re)return;let r=W=>{(!(W.target instanceof Element)||!W.target.closest("[data-buoy-root]"))&&J()},F=W=>{W.key==="Escape"&&J()};return document.addEventListener("pointerdown",r,true),document.addEventListener("keydown",F),()=>{document.removeEventListener("pointerdown",r,true),document.removeEventListener("keydown",F)}},[re,J]);let we=T.openApps.some(r=>r.minimized&&r.launchMode!=="toggle-only"),ae=V(yl,{modules:i,apps:n,requiredEnvVars:u,externalSync:l,headless:m,sentryGetClient:d});return m?ae:wn("div",{"data-buoy-root":"",style:{display:"contents"},children:[ae,re&&V("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.85)",zIndex:1e4,pointerEvents:"none"}}),wn(Vt,{enablePositionPersistence:!re,pushToSide:C||ne,suspendPointerEvents:C,centerOnboarding:re,minimizedStack:we?V(Ps,{}):void 0,hasMinimizedStack:we,children:[e&&fe&&!Re&&V(vi,{environment:e}),Re&&fe&&V(wi,{currentEnvironment:e??"local",availableEnvironments:o,onSelect:a}),t?V(_t,{userRole:t,onPress:Se}):V("button",{"aria-label":"Open dev tools",onClick:Se,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px 8px",background:"none",border:"none",cursor:"pointer"},children:V(xl,{})}),Z.map(r=>V("button",{"aria-label":r.name||tt(r.id),title:r.description,onClick:()=>I(r),style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"4px 6px",borderRadius:6,background:"none",border:"none",cursor:"pointer"},children:typeof r.icon=="function"?r.icon(16):r.icon},r.id))]}),re&&V(ro,{title:"Welcome to Buoy!",message:"Grab and position this menu wherever you want, then tap the icon to open your tools.",onDismiss:J}),C&&V(po,{icons:oe,onClose:me,centerLabel:"BUOY",onCenterPress:ve,settingsOpen:k,hintsDisabled:p}),V(Bo,{visible:k,onClose:L,availableTools:G,onSettingsChange:r=>{}}),V(qo,{}),V(mi,{})]})}function Il(e){let{access:t,isPro:o,licenseKey:a}=fi();de(()=>{gi.configure(e.licenseKey)},[e.licenseKey]);let n=e.licenseKey===void 0||e.licenseKey.trim().toUpperCase()===(a??""),i=typeof et<"u"?et:process.env.NODE_ENV!=="production",l=n&&t.status==="admitted";return de(()=>{!i&&o&&l&&ui()},[i,o,l]),!i&&!o?null:l?V(Cl,{...e}):e.headless?null:V(hi,{})}import{useSettings as zl,useFloatingTools as kl,getToolLabel as Ml,getToolDescription as Rl,getToolColor as Al,settingsColors as Ol,settingsStyles as El,dialColors as Dl,dialStyles as Bl}from"@buoy-gg/floating-tools-react/web";export{oa as Activity,di as AlertCircle,aa as AlertTriangle,_o as AppHostProvider,qo as AppOverlay,La as Badge,In as BarChart3,An as BaseEventStore,kn as Bookmark,ra as Bug,qa as Button,ti as Card,la as Check,da as CheckCircle,ca as CheckSquare,pa as ChevronDown,ga as ChevronLeft,ha as ChevronRight,ba as ChevronUp,va as Clock,Rn as Cloud,ii as CollapsibleSection,wa as Copy,Ja as CopyButton,Mn as DataViewer,Cn as Database,mn as DevToolsVisibilityProvider,po as DialMenu,Ka as DiffViewer,Ii as Divider,On as Download,Dn as Edit3,ci as EmptyState,zn as EventStepperFooter,xa as Eye,Ca as EyeOff,Ta as FileJson,Ia as FileText,za as Filter,ka as FlaskConical,Il as FloatingDevTools,Vt as FloatingTools,Fn as GitBranch,Ma as Globe,Ln as HardDrive,Ra as Hash,Wn as HelpCircle,Hn as Home,Kn as Image,Aa as Info,Ha as InfoRow,ea as JsModal,Ea as Key,Ba as Layers,Vn as Link,Pa as Lock,qn as Maximize2,Jn as Minus,Yn as Palette,$a as Pause,Zn as Pin,ja as Play,Na as Plus,Ua as Power,Ya as PowerToggle,_a as RefreshCw,En as RelativeTime,ta as Route,Za as Row,Ga as Search,Tn as SearchBar,ni as SectionHeader,na as Server,Xa as Settings,Bo as SettingsModal,Qa as Shield,ia as Smartphone,sa as Square,Wa as StatusDot,si as TabSelector,ua as Timer,ei as Trash2,ma as Unlock,fa as Upload,oi as User,_t as UserStatus,ya as Users,ai as Wifi,ri as X,Sa as XCircle,li as Zap,Sn as appSyncAdapter,Ci as autoDiscoverWebPresets,Ut as autoDiscoverWithCustom,pi as clearReleaseOptIn,Qn as copyToClipboard,cn as createWebTool,gn as createWebTools,xi as defaultToolPresets,Gn as devToolsStorageKeys,Dl as dialColors,Bl as dialStyles,Bn as formatBytes,Pn as formatDuration,$n as formatNumber,Ti as getEnabledTools,Al as getToolColor,Rl as getToolDescription,Ml as getToolLabel,wt as getToolsBySlot,Da as methodColor,_n as persistentStorage,Nn as safeStringify,Ol as settingsColors,El as settingsStyles,Oa as statusColor,Va as toolTheme,jn as truncateMiddle,Fa as typeColor,ht as useAppHost,Pt as useDevToolsVisibility,kl as useFloatingTools,Un as usePersistedState,Xn as useSafeAreaInsets,zl as useSettings,fs as useToolHeader,No as useToolHost};
|
|
10
|
+
`,document.head.appendChild(e),ro=true}var xt=Le.accent;function so({title:e,message:t,onDismiss:o,showArrow:a=true}){let[n,i]=oo(false),[l,u]=oo(false);or(()=>{rr();let p=requestAnimationFrame(()=>i(true));return()=>cancelAnimationFrame(p)},[]);let d={fontFamily:ao,textTransform:"uppercase"};return Pe("div",{style:{position:"fixed",left:"50%",bottom:ir(),transform:`translateX(-50%) scale(${n?1:.8})`,opacity:n?1:0,transition:"transform 300ms cubic-bezier(0.34, 1.3, 0.64, 1), opacity 300ms ease",zIndex:10002,pointerEvents:"auto"},children:io("div",{style:{position:"relative",animation:n?"buoyOnboardPulse 3s ease-in-out infinite":"none"},children:[Pe("div",{style:{position:"absolute",inset:-4,borderRadius:18,backgroundColor:"#FFFFFF",opacity:.06}}),io("div",{style:{position:"relative",maxWidth:280,backgroundColor:Le.dialBackground,borderRadius:16,border:`1px solid ${Le.dialBorder}`,padding:20,boxShadow:`0 0 20px ${no(Le.dialShadow,.6)}`,display:"flex",flexDirection:"column",alignItems:"center",gap:8},children:[Pe("span",{style:{...d,fontSize:16,fontWeight:900,letterSpacing:1,color:xt,textAlign:"center"},children:e}),Pe("span",{style:{fontFamily:ao,fontSize:13,lineHeight:"20px",color:Le.centerText,textAlign:"center"},children:t}),Pe("button",{onClick:o,onMouseDown:()=>u(true),onMouseUp:()=>u(false),onMouseLeave:()=>u(false),style:{...d,marginTop:8,borderRadius:8,border:"none",backgroundColor:xt,padding:"10px 24px",fontSize:14,fontWeight:900,letterSpacing:1.5,color:"#000000",cursor:"pointer",opacity:l?.7:1,transform:l?"scale(0.96)":"scale(1)",transition:"transform 100ms ease, opacity 100ms ease"},children:"Got it!"})]}),a&&Pe("div",{style:{position:"absolute",left:"50%",bottom:nr,marginLeft:-12,width:0,height:0,borderLeft:"12px solid transparent",borderRight:"12px solid transparent",borderTop:`${ar}px solid ${xt}`,filter:`drop-shadow(0 0 10px ${no(Le.dialShadow,.5)})`,animation:n?"buoyOnboardArrowBounce 1.6s ease-in-out infinite":"none"}})]})})}import{Fragment as sr,jsx as O,jsxs as ge}from"react/jsx-runtime";var lr={x:.5,y:.5},lo="@react_buoy_settings_tooltip_shown",co=false;function cr(){if(co||typeof document>"u")return;let e=document.createElement("style");e.textContent=Fi(),document.head.appendChild(e),co=true}var $e=e=>1-Math.pow(1-e,3),Ct=e=>e*e*e;function dr({icon:e,index:t,totalIcons:o,position:a,progress:n,onPress:i}){let[l,u]=Q(false),[d,p]=Q(false),m=!e.icon&&e.id.startsWith("empty-"),x=!m&&e.unavailable===true,g=!m&&!x,{icons:R}=qt,v=Oi(t,o),I=0;n<=v[1]?I=0:n<=v[2]?I=(n-v[1])/(v[2]-v[1]):I=1,I=Math.max(0,Math.min(1,I));let T=Bi,k=R.pressIn.scale,z=I*(d?k:l?1.1:1),B=0;I<=0?B=0:I<=.3?B=I:B=.3+(I-.3)*(.7/.7);let b=a.x*I,M=a.y*I;return O("button",{role:"menuitem","aria-label":m?"Empty slot":e.name,"aria-disabled":!g,tabIndex:g?0:-1,onClick:g?i:void 0,onMouseEnter:()=>g&&u(true),onMouseLeave:()=>{u(false),p(false)},onMouseDown:()=>g&&p(true),onMouseUp:()=>p(false),style:{position:"absolute",left:"50%",top:"50%",width:T,height:T,marginLeft:-T/2,marginTop:-T/2,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:g?"pointer":"default",transform:`translate(${b}px, ${M}px) scale(${z})`,opacity:B,transition:l||d?"transform 100ms ease":"none",background:"none",border:"none",padding:0},children:m?O("div",{style:{width:S.emptySlot.dotSize,height:S.emptySlot.dotSize,borderRadius:S.emptySlot.dotSize/2,backgroundColor:F.emptyDotBackground,border:`${S.emptySlot.borderWidth}px solid ${F.emptyDotBorder}`}}):ge(sr,{children:[O("div",{style:{position:"absolute",width:`${S.icon.gradientBgSizePercent}%`,height:`${S.icon.gradientBgSizePercent}%`,borderRadius:S.icon.gradientBgBorderRadius,backgroundColor:"rgba(0, 0, 0, 0.2)",opacity:S.icon.gradientBgOpacity}}),O("div",{style:{position:"absolute",width:`${S.icon.innerGlowSizePercent}%`,height:`${S.icon.innerGlowSizePercent}%`,borderRadius:S.icon.innerGlowBorderRadius,backgroundColor:"rgba(255, 255, 255, 0.02)",opacity:S.icon.innerGlowOpacity}}),O("div",{style:{marginBottom:S.icon.wrapperMarginBottom,display:"flex",alignItems:"center",justifyContent:"center",fontSize:32,filter:l?"brightness(1.2)":"none"},children:e.icon}),O("span",{style:{fontSize:e.name.length>8?Math.max(S.icon.label.fontSize*.7,S.icon.label.fontSize*8/e.name.length):S.icon.label.fontSize,fontWeight:S.icon.label.fontWeight,fontFamily:S.icon.label.fontFamily,color:F.iconLabel,letterSpacing:S.icon.label.letterSpacing,marginTop:S.icon.label.marginTop,textTransform:"uppercase",whiteSpace:"nowrap"},children:e.name}),x&&O("span",{style:{fontSize:S.icon.label.fontSize-1,fontWeight:S.icon.label.fontWeight,fontFamily:S.icon.label.fontFamily,letterSpacing:S.icon.label.letterSpacing,color:Pi.muted,textTransform:"uppercase",whiteSpace:"nowrap"},children:"Unavailable"})]})})}function uo({side:e,color:t}){return O("svg",{width:18,height:18,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(e==="prev"?[[15,18,9,12],[9,12,15,6]]:[[9,18,15,12],[15,12,9,6]]).map(([o,a,n,i],l)=>O("line",{x1:o,y1:a,x2:n,y2:i,stroke:t,strokeWidth:2},l))})}function po({side:e,disabled:t,onClick:o}){let[a,n]=Q(false),i=t?F.emptyDotBorder:F.accent;return ge("button",{type:"button","aria-label":`${e==="prev"?"Previous":"Next"} dial page`,disabled:t,onClick:o,onMouseDown:()=>!t&&n(true),onMouseUp:()=>n(false),onMouseLeave:()=>n(false),style:{display:"flex",alignItems:"center",gap:4,padding:"10px 16px",borderRadius:10,border:`1px solid ${F.dialBorder}`,backgroundColor:F.dialBackground,color:t?F.iconLabelMuted:F.centerText,fontSize:12,fontWeight:900,fontFamily:Yt,letterSpacing:1.5,textTransform:"uppercase",cursor:t?"default":"pointer",opacity:t?.4:1,boxShadow:t?"none":`0 0 8px ${Jt(F.dialShadow,.4)}`,transform:a?"scale(0.92)":"scale(1)",transition:"transform 100ms ease"},children:[e==="prev"&&O(uo,{side:"prev",color:i}),e==="prev"?"PREV":"NEXT",e==="next"&&O(uo,{side:"next",color:i})]})}function mo({icons:e,onClose:t,centerLabel:o="MENU",onCenterPress:a,settingsOpen:n=false,hintsDisabled:i=false}){let{id:l}=Hi(),[u,d]=Q(0),[p,m]=Q(0),[x,g]=Q(0),[R,v]=Q(0),[I,T]=Q(0),[k,z]=Q(1),[B,b]=Q(false),[M,P]=Q(false),[C,A]=Q(false),oe=at(null),Z=at(null),q=at(null),le=at(false),{entrance:K,exit:ne,interaction:J}=qt,Se=Li(),[me,ve]=Q(()=>({width:window.innerWidth,height:window.innerHeight}));Te(()=>{let D=()=>ve({width:window.innerWidth,height:window.innerHeight});return window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)},[]);let $=nt(()=>Ai({screenWidth:me.width,maxCircleSize:Math.max(120,Math.min(320,me.height-96))}),[me]),Re=nt(()=>Ei(),[]),fe=nt(()=>Di(We,$.iconRadius),[$.iconRadius]),[se,we]=Q(0),ae=Math.max(1,Math.ceil(e.length/We)),r=Math.min(se,ae-1),L=nt(()=>{let D=r*We,w=[...e.slice(D,D+We)];for(;w.length<We;)w.push({id:`empty-${w.length}`,name:"",icon:null,onPress:()=>{}});return w},[e,r]);Te(()=>{cr()},[]),Te(()=>{let D=K.backdrop.duration,w=K.dial.rotation.duration,X=K.centerButton.delay,N=K.icons.delay,_=K.icons.duration,V=performance.now(),ee=ce=>{let s=ce-V;d(Math.min(1,s/D));let f=Math.min(1,s/400),E=$e(f)*1.1;f>.7&&(E-=(f-.7)*.33),f>=1&&(E=1),m(Math.max(0,Math.min(1.05,E)));let Y=Math.min(1,s/w);if(g($e(Y)*360),s>=X){let ye=Math.min(1,(s-X)/300),Ee=$e(ye)*1.15;ye>.6&&(Ee-=(ye-.6)*.375),ye>=1&&(Ee=1),v(Math.max(0,Math.min(1.05,Ee)))}if(s>=N){let ye=Math.min(1,(s-N)/_);T($e(ye))}let he=N+_;s<he?q.current=requestAnimationFrame(ee):(d(1),m(1),g(360),v(1),T(1),A(true))};return q.current=requestAnimationFrame(ee),()=>{q.current&&cancelAnimationFrame(q.current)}},[]);let j=it(()=>{if(le.current)return;le.current=true,P(true),q.current&&cancelAnimationFrame(q.current);let D=performance.now(),w=ne.icons.duration,X=ne.centerButton.duration,N=ne.dialScale.duration,_=Math.max(X,N),V=ne.backdrop.duration,ee=ce=>{let s=ce-D;if(s<w){let Y=Ct(s/w);T(1-Y),q.current=requestAnimationFrame(ee);return}let f=w;if(s<f+_){T(0);let Y=Math.min(1,(s-f)/X),he=Math.min(1,(s-f)/N);v(1-Ct(Y)),m(1-Ct(he)),q.current=requestAnimationFrame(ee);return}let E=f+_;if(s<E+V){m(0),v(0);let Y=(s-E)/V;d(1-Y),q.current=requestAnimationFrame(ee);return}d(0),t()};q.current=requestAnimationFrame(ee)},[ne,t]);Te(()=>{let D=document.activeElement,w=oe.current;return()=>{D?.isConnected&&(document.activeElement===document.body||w?.contains(document.activeElement))&&D.focus()}},[]),Te(()=>{if(n)return;Z.current?.focus();let D=w=>{let X=oe.current;if(X){if(w.key==="Escape")w.preventDefault(),j();else if(w.key==="Tab"){let N=Array.from(X.querySelectorAll('button:not(:disabled):not([aria-disabled="true"]), [tabindex="0"]')).filter(ee=>ee.getClientRects().length>0),_=N[0],V=N[N.length-1];(!X.contains(document.activeElement)||(w.shiftKey?document.activeElement===_:document.activeElement===V))&&(w.preventDefault(),(w.shiftKey?V:_)?.focus())}else if(["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(w.key)){let N=Array.from(X.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')),_=N.indexOf(document.activeElement);if(_<0||!N.length)return;w.preventDefault();let V=w.key==="Home"?0:w.key==="End"?N.length-1:(_+(w.key==="ArrowRight"||w.key==="ArrowDown"?1:-1)+N.length)%N.length;N[V].focus()}}};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[j,n]);let[je,Je]=Q(false);Te(()=>{if(i)return;let D=false,w=setTimeout(async()=>{let X=await Xt.getItem(lo);!D&&!X&&Je(true)},1200);return()=>{D=true,clearTimeout(w)}},[i]);let Ae=it(()=>{Je(false),Xt.setItem(lo,"true")},[]);Te(()=>{n&&je&&Ae()},[n,je,Ae]);let Xe=it(D=>{if(D.id.startsWith("empty-")||le.current)return;let[w,X]=J.iconSelect.pulse,N=performance.now(),_=150,V=ee=>{let ce=ee-N;if(ce<_){let s=$e(ce/_);z(1-(1-w.scale)*s),requestAnimationFrame(V)}else if(ce<_*2){let s=$e((ce-_)/_);z(w.scale+(X.scale-w.scale)*s),requestAnimationFrame(V)}else z(1)};requestAnimationFrame(V),setTimeout(()=>{D.onPress(),j()},J.iconSelect.actionDelay)},[J.iconSelect,j]),Ye=it(D=>{if(le.current)return;let w=Math.max(0,Math.min(D,ae-1));w!==r&&we(w)},[ae,r]),De=$.buttonSize*S.centerButton.containerRatio,Qe=$.buttonSize*S.centerButton.borderRatio,bt=$.buttonSize*S.centerButton.containerRatio/2+6,St=C&&!M;return ge("div",{ref:oe,role:"dialog","aria-label":"Dial Menu","aria-modal":"true",style:{position:"fixed",inset:0,zIndex:1e4},children:[O("button",{type:"button","aria-label":"Close dial menu",tabIndex:0,onClick:j,style:{position:"absolute",inset:0,border:0,padding:0,backgroundColor:F.dialBackdrop,opacity:u}}),ge("div",{style:{position:"absolute",left:"50%",marginLeft:-$.circleSize/2,bottom:80,width:$.circleSize,height:$.circleSize,borderRadius:"50%",backgroundColor:F.dialBackground,border:`${S.circle.borderWidth}px solid ${F.dialBorder}`,boxShadow:`0 0 ${S.circle.shadowRadius}px ${Jt(F.dialShadow,S.circle.shadowOpacity)}`,transform:`scale(${p}) rotate(${x}deg)`,opacity:p>.01?1:0,overflow:"hidden"},children:[O("div",{style:{position:"absolute",inset:0,borderRadius:"50%",backgroundColor:F.dialGradient1,opacity:S.gradientLayers[0].opacity}}),O("div",{style:{position:"absolute",inset:0,top:"30%",left:"30%",borderRadius:"50%",backgroundColor:F.dialGradient2,opacity:S.gradientLayers[1].opacity}}),O("div",{style:{position:"absolute",inset:0,top:"50%",left:"50%",borderRadius:"50%",backgroundColor:F.dialGradient3,opacity:S.gradientLayers[2].opacity}}),Re.map(D=>O("div",{style:{position:"absolute",top:"50%",left:0,right:0,height:S.grid.lineHeight,transform:`rotate(${D}deg)`,transformOrigin:"center"},children:["left","right"].map(w=>O("div",{style:{position:"absolute",top:0,[w]:0,width:`calc(50% - ${bt}px)`,height:S.grid.lineHeight,backgroundColor:F.dialGridLine}},w))},D)),O("div",{"data-testid":"dial-background","data-background":l,style:{position:"absolute",inset:0,pointerEvents:"none"},children:l==="hyperspace"?O(tr,{size:$.circleSize}):O($i,{focus:lr})}),L.map((D,w)=>O(dr,{icon:D,index:w,totalIcons:L.length,position:fe[w],progress:I,onPress:()=>Xe(D)},w)),ge("div",{style:{position:"absolute",left:"50%",top:"50%",width:De,height:De,marginLeft:-De/2,marginTop:-De/2,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:F.hubHalo,borderRadius:$.buttonSize,overflow:"hidden",transform:`scale(${R*k})`,opacity:R>.01?1:0},children:[O("div",{style:{position:"absolute",inset:0,backgroundColor:F.dialGradient1,opacity:.5,borderRadius:$.buttonSize}}),O("div",{style:{position:"absolute",inset:0,top:"20%",left:"20%",backgroundColor:F.dialGradient2,opacity:.3,borderRadius:$.buttonSize}}),O("div",{style:{position:"absolute",inset:0,top:"40%",left:"40%",backgroundColor:F.dialGradient3,opacity:.2,borderRadius:$.buttonSize}}),O("div",{style:{width:Qe,height:Qe,borderRadius:$.buttonSize*S.centerButton.borderRadiusRatio,backgroundColor:F.hubFill,display:"flex",alignItems:"center",justifyContent:"center"},children:O("button",{ref:Z,type:"button","aria-label":n?"Close settings":"Open settings",disabled:!a,onClick:a,onMouseEnter:()=>b(true),onMouseLeave:()=>b(false),style:{border:0,padding:0,background:"transparent",width:$.buttonSize,height:$.buttonSize,borderRadius:$.buttonSize/2,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:a?"pointer":"default",transform:B?`scale(${J.centerHover.scale})`:"scale(1)",transition:`transform ${J.centerHover.duration}ms ease`,animation:St&&!B?Se.pulse:"none"},children:n?ge("span",{style:{display:"flex",flexDirection:"column",alignItems:"center",fontSize:S.centerButton.text.fontSize-2,fontWeight:S.centerButton.text.fontWeight,fontFamily:S.centerButton.text.fontFamily,color:F.centerText,letterSpacing:S.centerButton.text.letterSpacing,textAlign:"center",textShadow:`0 0 4px ${F.centerTextGlow}`,textTransform:"uppercase",lineHeight:1.2},children:[O("span",{style:{marginBottom:-2},children:"CLOSE"}),O("span",{style:{marginTop:-2},children:"SETTINGS"})]}):O("span",{style:{fontSize:S.centerButton.text.fontSize,fontWeight:S.centerButton.text.fontWeight,fontFamily:S.centerButton.text.fontFamily,color:F.centerText,letterSpacing:S.centerButton.text.letterSpacing,textAlign:"center",textShadow:`0 0 4px ${F.centerTextGlow}`,textTransform:"uppercase"},children:o})})})]})]}),ae>1&&ge("div",{style:{position:"absolute",left:"50%",marginLeft:-$.circleSize/2,top:"calc(100% - 64px)",width:$.circleSize,display:"flex",alignItems:"center",justifyContent:"space-between",opacity:Math.min(1,p),transform:`scale(${Math.min(1,p)})`},children:[O(po,{side:"prev",disabled:r<=0,onClick:()=>Ye(r-1)}),ge("span",{style:{padding:"6px 12px",fontSize:13,fontWeight:900,fontFamily:Yt,letterSpacing:2,color:F.centerText,textShadow:`0 0 6px ${F.centerTextGlow}`},children:[String(r+1).padStart(2,"0"),ge("span",{style:{color:F.iconLabelMuted,textShadow:"none"},children:[" / ",String(ae).padStart(2,"0")]})]}),O(po,{side:"next",disabled:r>=ae-1,onClick:()=>Ye(r+1)})]}),je&&!n&&O(so,{title:"Welcome to Buoy!",message:"Tap the center button to configure and add tools to your dial menu.",onDismiss:Ae,showArrow:false})]})}import{persistentStorage as go,devToolsStorageKeys as ur}from"@buoy-gg/shared-ui/web";import{recordUsage as pr,pruneUsage as mr}from"@buoy-gg/floating-tools-core/web";var fo=ur.dial.usage(),He={},ho=false,Tt=null;function yo(){return Tt||(Tt=(async()=>{try{let e=await go.getItem(fo);if(e){let t=JSON.parse(e);t&&typeof t=="object"&&(He=t)}}catch{}finally{ho=true}})(),Tt)}yo();function gr(e){return e.map((t,o)=>({id:t,index:o,lastUsed:He[t]?.lastUsed??0})).sort((t,o)=>o.lastUsed-t.lastUsed||t.index-o.index).map(({id:t})=>t)}async function fr(e){if(!e)return;ho||await yo();let t=Math.max(Date.now(),...Object.values(He).map(o=>o.lastUsed+1));He=mr(pr(He,e,t),t);try{await go.setItem(fo,JSON.stringify(He))}catch{}}import{useCallback as hr,useMemo as bo}from"react";import{persistentStorage as yr}from"@buoy-gg/shared-ui/web";import{useState as te,useEffect as ze,useCallback as st,useMemo as lt}from"react";import{settingsEventBus as ct}from"@buoy-gg/floating-tools-core/web";import{useSyncExternalStore as br}from"react";import{getRegisteredToolModule as Sr}from"@buoy-gg/shared-ui/web";var vr=()=>()=>{},wr=()=>null;function xr(){let e=Sr("@buoy-gg/external-sync");return br(e?.subscribeSyncStatus??vr,()=>e?.getSyncStatus?.()??null,wr)}import{SentryIcon as Cr,WifiCircuitIcon as Tr,ImageOverlayIcon as zr,RenderCountIcon as kr,Info as zt,Layers as Ir,ChevronRightIcon as So,ChevronDown as vo,getStorageBackendType as Mr,getUseLicense as Rr,persistentStorage as ke,Trash2 as Ar,CheckCircle2 as wo,LicenseEntryModal as Dr,BackgroundSwitcher as Er,night as h,NightCard as Ie,NightRows as kt,NightSectionLabel as Or,NightFootnote as xo,NightSwitch as Co,NightButton as To,NightSegmented as Br,NightBadge as ue,NightSeparator as Fr,monoFont as zo}from"@buoy-gg/shared-ui/web";import{EnvIcon as ko,StorageIcon as Lr,RoutesIcon as Pr,NetworkIcon as $r,QueryIcon as Hr,HighlighterIcon as jr,ReduxIcon as Wr,EventsIcon as Nr}from"@buoy-gg/floating-tools-core/web";import Ur,{createContext as Kr,useContext as Vr}from"react";import{jsx as Gr}from"react/jsx-runtime";var Io=Kr({});function _r({children:e,defaultFloatingTools:t,defaultDialTools:o}){let a=Ur.useMemo(()=>({defaultFloatingTools:t,defaultDialTools:o}),[t,o]);return Gr(Io.Provider,{value:a,children:e})}function Mo(){return Vr(Io)}import qr from"react";import{toolTheme as Jr}from"@buoy-gg/shared-ui/web";import{jsx as Ro}from"react/jsx-runtime";function Xr({label:e,size:t,color:o=Jr.colors.text}){let a=Math.max(Array.from(e.replace(/[\uFE00-\uFE0F\u200D]/g,"")).length,1),n=a<=2?t:t*1.6,i=Math.max(7,Math.min(t*(a===1?.7:.62),n/(.62*a)));return Ro("span",{style:{display:"inline-flex",minWidth:t,maxWidth:n,height:t,alignItems:"center",justifyContent:"center",color:o,fontSize:i,fontWeight:800,letterSpacing:.5,whiteSpace:"nowrap",overflow:"hidden"},children:e})}function Ao(e,t){return e==null?e:typeof e=="function"?qr.createElement(e,{slot:t.slot,size:t.size,state:t.state,actions:t.actions}):typeof e=="string"||typeof e=="number"?Ro(Xr,{label:String(e),size:t.size,color:t.color}):e}import{JsModal as Yr,devToolsStorageKeys as It}from"@buoy-gg/shared-ui/web";import{useSafeAreaInsets as Qr}from"@buoy-gg/shared-ui/web";import{Fragment as Ue,jsx as c,jsxs as H}from"react/jsx-runtime";var dt="@react_buoy_dev_tools_settings",Zr=6,ut=e=>{let t=Zr,o={};for(let[a,n]of Object.entries(e))n&&t>0?(o[a]=true,t-=1):o[a]=false;return o},es=(e,t)=>{let{userStatus:o,environment:a,...n}=e,i=t?Object.entries(n).filter(([l])=>t.includes(l)):Object.entries(n);return{...Object.fromEntries(i),environment:a??false}},Do=(e,t,o)=>{if(!t)return e;let a={...e.dialTools,...t.dialTools??{}},n=o?.allowedDialKeys?Object.entries(a).filter(([i])=>o.allowedDialKeys?.includes(i)):Object.entries(a);return{dialTools:ut(Object.fromEntries(n)),floatingTools:es({...e.floatingTools,...t.floatingTools??{}},o?.allowedFloatingKeys),globalSettings:{enableSharedModalDimensions:false,expandableWindowControls:true,...t.globalSettings??{}}}},ts=(e=[],t,o)=>{let a={},n={},i=new Set(t??[]),l=new Set(o??[]),u=!o||o.length===0;for(let d of e){let{id:p,slot:m="both"}=d;(m==="dial"||m==="both")&&(a[p]=u?true:l.has(p)),(m==="row"||m==="both")&&(n[p]=i.has(p))}return{dialTools:ut(a),floatingTools:{...n,environment:i.has("environment")},globalSettings:{enableSharedModalDimensions:false,expandableWindowControls:true}}},os=({visible:e,onClose:t,onSettingsChange:o,initialSettings:a,availableApps:n=[],storage:i=ke,zIndex:l})=>{let{defaultFloatingTools:u,defaultDialTools:d}=Mo(),p=lt(()=>ts(n,u,d),[n,u,d]),m=lt(()=>Object.keys(p.dialTools),[p]),x=lt(()=>Object.keys(p.floatingTools).filter(s=>s!=="environment"),[p]),[g,R]=te(a||Ke||p),[v,I]=te(Mt??"floating"),[T,k]=te(Mt!==null),[z,B]=te(new Set),[b,M]=te(false),[P,C]=te(false);ze(()=>{let s=requestAnimationFrame(()=>C(true));return()=>cancelAnimationFrame(s)},[]);let A=xr();ze(()=>{(async()=>{try{let s=await ke.getItem(It.settings.activeTab());if(s&&["floating","settings","pro"].includes(s)){let f=s;Mt=f,I(E=>E===f?E:f)}}catch{}finally{k(true)}})()},[]),ze(()=>{T&&ke.setItem(It.settings.activeTab(),v).catch(s=>{console.warn("Failed to save settings active tab:",s)})},[v,T]);let oe=Rr()?.(),Z=oe?.isPro??false,q=!Z&&oe?.licenseKey?oe.error:null,le=oe?.errorKind==="transport",[K,ne]=te(Eo),[J,Se]=te(false),[me,ve]=te(false),[$,Re]=te(false),[fe,se]=te([]),[we,ae]=te(false),r=Qr(),L=Wt.get("window").height,j=Wt.get("window").width,je=Math.floor(L*.33),Je=Math.min(j-32,400),Ae=st(async()=>{try{let s=await i.getItem(dt);if(s){let f=JSON.parse(s),E=Do(p,f,{allowedDialKeys:m,allowedFloatingKeys:x});Ke=E,R(Y=>Oo(Y,E)?Y:E);return}Ke=p,R(f=>Oo(f,p)?f:p)}catch(s){console.error("Failed to load dev tools settings:",s),R(p)}},[p,m,x,i]);ze(()=>{Ae()},[Ae]),ze(()=>{Mr().then(s=>{Eo=s,ne(f=>f===s?f:s)})},[]),ze(()=>{$&&(ae(true),ke.getAllKeys().then(s=>{se(s.sort())}).catch(()=>{se([])}).finally(()=>{ae(false)}))},[$]);let Xe=async s=>{try{let f={...s,dialTools:ut(s.dialTools)};await i.setItem(dt,JSON.stringify(f)),Ke=f,R(f),o?.(f),ct.emit(f)}catch(f){console.error("Failed to save dev tools settings:",f)}},Ye=s=>{let f={...g,floatingTools:{...g.floatingTools,[s]:!g.floatingTools[s]}};Xe(f)},De=s=>{let f={...g,globalSettings:{...g.globalSettings,[s]:!g.globalSettings?.[s]}};Xe(f)},Qe=async()=>{Se(true),ve(false);try{await ke.clear(),ve(true),R(p),i!==ke&&await i.setItem(dt,JSON.stringify(p)),o?.(p),ct.emit(p),setTimeout(()=>ve(false),2e3)}catch(s){console.error("Failed to clear storage:",s)}finally{Se(false)}},bt=st(s=>{},[]),St=s=>{let f=n.find(E=>E.id===s);return f?.description?f.description:s==="environment"?"Environment badge.":""},D=s=>s==="environment"?"Env Badge":n.find(f=>f.id===s)?.name??s.toUpperCase().replace(/_/g," "),w=s=>{if(!P)return null;switch(s){case"query":return c(Hr,{size:18});case"env":return c(ko,{size:18});case"sentry":return c(Cr,{size:18,color:"#9945FF"});case"storage":return c(Lr,{size:18,bgColor:h.color.surface});case"wifi":case"query-wifi-toggle":return c(Tr,{size:18,colorPreset:"green",strength:4,noBackground:true});case"route-events":return c(Pr,{size:18,bgColor:h.color.surface});case"network":return c($r,{size:18});case"environment":return c(ko,{size:18});case"debug-borders":return c(Ir,{size:18,color:h.color.accent});case"highlight-updates":return c(kr,{size:18,color:h.color.accent});case"highlight-updates-modal":return c(jr,{size:18});case"redux":return c(Wr,{size:18});case"image-overlay":return c(zr,{size:18});case"events":return c(Nr,{size:18});case"zustand":try{let{ZustandIcon:f}=Ut("@buoy-gg/zustand/web");return c(f,{size:18})}catch{return c(zt,{size:18,color:h.color.textSecondary})}case"jotai":try{let{JotaiIcon:f}=Ut("@buoy-gg/jotai/web");return c(f,{size:18})}catch{return c(zt,{size:18,color:h.color.textSecondary})}default:{let f=n.find(E=>E.id===s);return f?.icon!=null?Ao(f.icon,{slot:"row",size:18,color:f.color}):c(zt,{size:18,color:h.color.textSecondary})}}},X=(s,f,E,Y)=>{let he=St(s);return H(Ze,{activeOpacity:E?1:.7,onPress:()=>!E&&Y(),accessibilityLabel:D(s),accessibilityRole:"button",style:[y.toolRow,E&&y.rowDisabled],children:[c(W,{style:y.toolIconSlot,children:w(s)}),H(W,{style:y.rowInfo,children:[H(U,{style:y.rowLabel,children:[D(s),E?" \xB7 max 6":""]}),he?c(U,{style:y.rowCaption,numberOfLines:1,children:he}):null]}),c(Co,{value:f,disabled:E,onValueChange:()=>Y()})]},s)},N=s=>{B(f=>{let E=new Set(f);return E.has(s)?E.delete(s):E.add(s),E})},_=(s,f,E,Y,he)=>{let ye=g.globalSettings?.[s]??false,Ee=z.has(s);return H(W,{children:[H(Ze,{activeOpacity:.7,onPress:()=>N(s),accessibilityLabel:f,style:y.settingRow,children:[H(W,{style:y.rowInfo,children:[c(U,{style:y.rowLabel,children:f}),c(U,{style:y.rowCaption,numberOfLines:Ee?0:1,children:E})]}),c(Co,{value:ye,onValueChange:()=>De(s)})]}),Ee&&H(W,{style:y.settingRowBody,children:[c(U,{style:y.settingRowBodyText,children:Y}),c(U,{style:y.settingRowBodyHint,children:he})]})]},s)},V=(s,f,E)=>H(W,{children:[c(Or,{children:s}),f,E]}),ee=K==="filesystem"?c(ue,{label:"File System",tone:"accent"}):K==="asyncstorage"?c(ue,{label:"Async Storage",tone:"warning"}):K==="localstorage"?c(ue,{label:"Local Storage",tone:"accent"}):K==="memory"?c(ue,{label:"Memory",tone:"danger"}):c(ue,{label:"Loading\u2026",tone:"neutral"}),ce=()=>H(W,{style:y.container,children:[H(jt,{style:y.scrollContent,showsVerticalScrollIndicator:false,contentContainerStyle:y.scrollContainer,children:[v==="floating"&&c(Ue,{children:V("Floating Tools",c(Ie,{glass:true,children:c(kt,{children:Object.entries(g.floatingTools).map(([s,f])=>X(s,f,false,()=>Ye(s)))})}),c(xo,{children:"Tools switched on here appear in the floating bubble row."}))}),v==="settings"&&H(Ue,{children:[V("Background",c(Ie,{glass:true,padded:true,children:c(Er,{embedded:true})})),V("Storage",H(Ie,{glass:true,children:[H(Ze,{activeOpacity:.7,onPress:()=>Re(!$),accessibilityLabel:"Storage Type",style:y.settingRow,children:[c(W,{style:y.rowInfo,children:c(U,{style:y.rowLabel,children:"Storage Type"})}),ee,$?c(vo,{size:16,color:h.color.textTertiary}):c(So,{size:16,color:h.color.textTertiary})]}),$&&H(Ue,{children:[H(W,{style:y.settingRowBody,children:[c(U,{style:y.settingRowBodyText,children:K==="filesystem"?"Settings persist independently and survive AsyncStorage.clear() calls during logout.":K==="asyncstorage"?"Settings may be lost if AsyncStorage is cleared during logout.":K==="localstorage"?"Settings are saved in this browser. Clearing site data removes them.":K==="memory"?"Settings are stored in memory only and will be lost on app restart.":"Checking storage backend\u2026"}),K==="asyncstorage"&&c(U,{style:[y.settingRowBodyText,y.bodyWarning],children:"Install expo-file-system to persist settings through logout flows."}),K==="memory"&&c(U,{style:[y.settingRowBodyText,y.bodyDanger],children:"No persistent storage available \u2014 install expo-file-system (best) or @react-native-async-storage/async-storage."})]}),c(Fr,{}),H(W,{style:y.storageExpanded,children:[H(W,{style:y.storageExpandedHeader,children:[c(U,{style:y.storageExpandedTitle,children:"SAVED SETTINGS"}),c(U,{style:y.storageExpandedCount,children:we?"\u2026":`${fe.length} keys`})]}),we?c(U,{style:y.storageKeyEmpty,children:"Loading\u2026"}):fe.length===0?c(U,{style:y.storageKeyEmpty,children:"No settings saved yet"}):c(jt,{style:y.storageKeysList,nestedScrollEnabled:true,showsVerticalScrollIndicator:true,children:fe.map(s=>c(W,{style:y.storageKeyItem,children:c(U,{style:y.storageKeyText,numberOfLines:1,children:s.replace("@react_buoy_","")})},s))})]}),c(W,{style:y.cardButtonWrap,children:c(To,{label:me?"Cleared":J?"Clearing\u2026":"Clear All Settings",variant:me?"secondary":"destructive",size:"md",disabled:J,onPress:Qe,icon:me?c(wo,{size:15,color:h.color.accent}):c(Ar,{size:15,color:J?h.color.textTertiary:h.color.danger})})})]})]})),A&&A.state!=="idle"&&V("Desktop Sync",H(Ie,{glass:true,children:[H(Ze,{activeOpacity:.7,onPress:()=>N("desktopSync"),accessibilityLabel:"Buoy Desktop",style:y.settingRow,children:[c(W,{style:y.rowInfo,children:c(U,{style:y.rowLabel,children:"Buoy Desktop"})}),A.state==="connected"?c(ue,{label:"Connected",tone:"accent"}):A.state==="connecting"?c(ue,{label:"Connecting\u2026",tone:"neutral"}):c(ue,{label:"Retrying",tone:"warning"}),z.has("desktopSync")?c(vo,{size:16,color:h.color.textTertiary}):c(So,{size:16,color:h.color.textTertiary})]}),z.has("desktopSync")&&H(W,{style:y.settingRowBody,children:[H(U,{style:y.settingRowBodyText,children:[A.state==="connected"?"Streaming tool data to Buoy Desktop at ":"Trying to reach Buoy Desktop at ",c(U,{style:y.footnoteMono,children:A.targetURL??"(unknown URL)"}),A.state!=="connected"&&" \u2014 is the desktop app running? Override with the externalSync socketURL option if it runs elsewhere."]}),A.state==="retrying"&&A.lastError&&H(U,{style:[y.settingRowBodyText,y.bodyWarning],children:["Last error: ",A.lastError]})]})]})),V("Modal Behavior",c(Ie,{glass:true,children:H(kt,{children:[_("enableSharedModalDimensions","Shared Modal Size","Sync dimensions across all tools","When enabled, all tool modals will share the same size and position. Resizing one modal will affect all others. When disabled, each tool remembers its own size and position independently.","Keep OFF for the best experience. This allows you to customize each tool's modal size separately."),Oe.OS!=="web"?_("expandableWindowControls","Expand Controls","iPad-style expandable window buttons","When enabled, the window control buttons (minimize, toggle mode, close) start as small dots and expand into larger, easy-to-tap buttons when pressed. When disabled, buttons are directly tappable at their small size.","Keep ON for touch devices where the small buttons are hard to press. Turn OFF if you prefer direct single-tap access."):null]})}))]}),v==="pro"&&H(Ue,{children:[V("License",c(Ie,{glass:true,children:H(W,{style:y.settingRow,children:[c(W,{style:y.rowInfo,children:c(U,{style:y.rowLabel,children:"License Status"})}),c(W,{testID:"buoy-settings-license-status",accessibilityLabel:Z?"License: Active":"License: Free",children:Z?c(ue,{label:"Active",tone:"accent"}):c(ue,{label:"Free",tone:"neutral"})})]})}),c(xo,{children:Z?"You have full access to all Buoy DevTools features.":q?le?`Couldn't reach the license server (${q}). A VPN or corporate proxy can block buoy.gg \u2014 turn it off and reload. Your key hasn't been rejected.`:`License check failed: ${q}.`:"Upgrade to Pro to unlock all features and support development."})),!Z&&H(Ue,{children:[V("Pro Features",c(Ie,{glass:true,children:c(kt,{children:["Advanced Settings","Priority Support"].map(s=>H(W,{style:y.featureRow,children:[c(wo,{size:16,color:h.color.accent}),c(U,{style:y.rowLabel,children:s})]},s))})})),c(To,{label:"Upgrade to Pro",variant:"primary",size:"lg",onPress:()=>M(true)})]})]})]}),c(Dr,{visible:b,onClose:()=>M(false),onSuccess:()=>M(false)})]});return c(Yr,{visible:e,onClose:t,zIndex:l,variant:"night",header:{showToggleButton:false,customContent:c(W,{style:y.headerRow,children:c(Br,{glass:true,tabs:[{key:"floating",label:"Floating"},{key:"settings",label:"Settings"},{key:"pro",label:"Pro"}],activeKey:v,onChange:s=>I(s)})})},initialMode:"bottomSheet",onModeChange:bt,persistenceKey:It.settings.root(),enablePersistence:true,maxHeight:L-r.top,initialHeight:je,initialFloatingPosition:{x:(j-Je)/2,y:r.top+20},enableGlitchEffects:true,children:ce()})},ns={dialTools:{},floatingTools:{environment:false},globalSettings:{enableSharedModalDimensions:false}},as=(e,t)=>{let o=new Set(e??[]),a=new Set(t??[]),n={};for(let l of a)n[l]=true;let i={environment:o.has("environment")};for(let l of o)l!=="environment"&&(i[l]=true);return{dialTools:ut(n),floatingTools:i,globalSettings:{enableSharedModalDimensions:false}}},Ke=null,Mt=null,Eo=null,Oo=(e,t)=>JSON.stringify(e)===JSON.stringify(t);ct.addListener(e=>{e&&(Ke=e)});var is=()=>{let{defaultFloatingTools:e,defaultDialTools:t}=Mo(),o=lt(()=>!e&&!t?ns:as(e,t),[e,t]),[a,n]=te(o),i=st(async()=>{try{let u=await ke.getItem(dt);if(u){let d=JSON.parse(u),p=Do(o,d);n(p);return}n(o)}catch(u){console.error("Failed to load dev tools settings:",u),n(o)}},[o]);ze(()=>{i();let u=ct.addListener(d=>{try{d&&n(d)}catch{}});return()=>{u()}},[i]);let l=st(()=>{i()},[i]);return{settings:a,refreshSettings:l}},y=Nt.create({container:{flex:1,backgroundColor:"transparent"},headerRow:{flexDirection:"row",alignItems:"center",paddingLeft:h.gutter,paddingRight:h.gutter,paddingBottom:8},scrollContent:{flex:1},scrollContainer:{paddingHorizontal:h.gutter,paddingTop:8,paddingBottom:24,gap:h.groupGap},toolRow:{flexDirection:"row",alignItems:"center",gap:12,paddingHorizontal:h.rowPadH,paddingVertical:12},settingRow:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:h.rowPadH,paddingVertical:h.rowPadV,minHeight:52},featureRow:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:h.rowPadH,paddingVertical:12},rowDisabled:{opacity:.4},toolIconSlot:{width:24,alignItems:"center"},rowInfo:{flex:1,gap:2},rowLabel:{color:h.color.text,fontSize:h.font.row,fontWeight:"500"},rowCaption:{color:h.color.textTertiary,fontSize:h.font.label},settingRowBody:{paddingHorizontal:h.rowPadH,paddingBottom:h.rowPadV,gap:6},settingRowBodyText:{color:h.color.textSecondary,fontSize:h.font.caption,lineHeight:h.font.caption*1.45},settingRowBodyHint:{color:h.color.textTertiary,fontSize:h.font.caption,lineHeight:h.font.caption*1.45},bodyWarning:{color:h.color.warning},bodyDanger:{color:h.color.danger},cardButtonWrap:{paddingHorizontal:h.cardPad,paddingTop:10,paddingBottom:h.cardPad},storageExpanded:{paddingHorizontal:h.rowPadH,paddingVertical:12,gap:8},storageExpandedHeader:{flexDirection:"row",alignItems:"center"},storageExpandedTitle:{flex:1,color:h.color.textSecondary,fontSize:h.font.micro,fontWeight:"600",letterSpacing:.5},storageExpandedCount:{color:h.color.textTertiary,fontSize:h.font.micro},storageKeysList:{maxHeight:150},storageKeyItem:{backgroundColor:h.color.glassElevated,borderRadius:h.radius.segment,paddingHorizontal:10,paddingVertical:7,marginBottom:4},storageKeyText:{color:h.color.textSecondary,fontSize:h.font.micro,fontFamily:zo},storageKeyEmpty:{color:h.color.textTertiary,fontSize:h.font.caption,fontStyle:"italic"},footnoteMono:{fontFamily:zo,fontSize:h.font.label,color:h.color.textSecondary}});import{jsx as Bo}from"react/jsx-runtime";var rs=[];function Fo({visible:e,onClose:t,availableTools:o=rs,defaultFloatingTools:a,defaultDialTools:n,storage:i=yr,onSettingsChange:l}){let u=bo(()=>({getItem:async m=>i.getItem(m),setItem:async(m,x)=>i.setItem(m,x)}),[i]),d=bo(()=>o.map(m=>({...m,name:m.name??m.id,icon:typeof m.icon=="function"?x=>m.icon(x.size):m.icon})),[o]),p=hr(m=>{l?.(m)},[l]);return Bo(_r,{defaultFloatingTools:a,defaultDialTools:n,children:Bo(os,{visible:e,onClose:t,zIndex:11e3,availableApps:d,storage:u,onSettingsChange:p})})}import{persistentStorage as Lo}from"@buoy-gg/shared-ui/web";import{createContext as ss,useCallback as be,useContext as ls,useEffect as Rt,useMemo as cs,useRef as Ve,useState as Po}from"react";var ds=(e,t,o)=>{if(t.singleton){let n=e.find(i=>i.id===t.id);if(n){let i=n.minimized??false;return{instanceId:n.instanceId,wasMinimized:i,apps:[...e.filter(l=>l.instanceId!==n.instanceId),{...n,minimized:false}]}}}let a=o();return{instanceId:a,wasMinimized:false,apps:[...e,{...t,instanceId:a}]}};import{createContext as us,useCallback as $o,useContext as ps,useEffect as pt,useMemo as ms,useRef as Ho,useState as mt}from"react";import{JsModal as gs,ModalHeader as Ge,HeaderSearchButton as fs,TickProvider as hs,ToolScreenHeaderContext as ys,devToolsStorageKeys as jo,buoyColors as Wo,gameUIColors as At}from"@buoy-gg/shared-ui/web";import{jsx as ie,jsxs as gt}from"react/jsx-runtime";var _e=()=>{},bs={search:"",isSearchActive:false,clearSearch:_e,close:_e,minimize:_e,showToast:_e,setHeaderOverride:_e},No=us(null);function Uo(){return ps(No)??bs}function Ss(e,t){let{setHeaderOverride:o}=Uo();pt(()=>(o(e),()=>o(null)),t)}var Ko=2200,vs={success:At.success,error:At.error,info:At.info};function ws({message:e,type:t,nonce:o}){let a=Ho(new xe.Value(0)).current;pt(()=>{a.setValue(0),xe.sequence([xe.timing(a,{toValue:1,duration:150,useNativeDriver:true}),xe.delay(Ko-450),xe.timing(a,{toValue:0,duration:300,useNativeDriver:true})]).start()},[o,a]);let n=vs[t];return gt(xe.View,{pointerEvents:"none",style:[ft.toast,{opacity:a,borderColor:n+"60"}],children:[ie(W,{style:[ft.toastDot,{backgroundColor:n}]}),ie(U,{style:ft.toastText,numberOfLines:2,children:e})]})}function xs({app:e,config:t,visible:o,zIndex:a,onClose:n,onMinimize:i,initialModalState:l,enableSharedModalDimensions:u,bodyProps:d}){let p=e.component,[m,x]=mt(false),[g,R]=mt(""),[v,I]=mt(null),[T,k]=mt(null),z=Ho(null),B=$o(()=>{x(false),R("")},[]),b=$o((K,ne="info")=>{z.current&&clearTimeout(z.current),k(J=>({message:K,type:ne,nonce:(J?.nonce??0)+1})),z.current=setTimeout(()=>k(null),Ko)},[]);pt(()=>()=>{z.current&&clearTimeout(z.current)},[]);let M=ms(()=>({search:m?g:"",isSearchActive:m,clearSearch:B,close:n,minimize:()=>i(),showToast:b,setHeaderOverride:I,instanceId:e.instanceId}),[g,m,B,n,i,b,e.instanceId]),P=v?.title??t.title??e.title??e.id,C=v?.subtitle??t.subtitle,A=v?.onBack,oe=v?.actions??t.headerActions,Z=v?.searchable??t.searchable;pt(()=>{!Z&&m&&B()},[Z,m,B]);let q=u?jo.modal.root():jo.custom(e.id).modal(),le=gt(Ge,{children:[A&&!m&&ie(Ge.Navigation,{onBack:A}),m?ie(Ge.Search,{value:g,onChangeText:R,onCancel:B,placeholder:t.searchPlaceholder,testID:`tool-search-field-${e.id}`}):ie(Ge.Content,{title:P,subtitle:C}),gt(Ge.Actions,{children:[!m&&oe,Z&&!m&&ie(fs,{variant:"chip",testID:`tool-search-${e.id}`,onPress:()=>x(true)})]})]});return ie(No.Provider,{value:M,children:ie(gs,{visible:o,onClose:n,onBack:A,onMinimize:i,initialModalState:l,zIndex:a,persistenceKey:q,enablePersistence:true,initialMode:t.initialMode??"bottomSheet",header:{customContent:le,showToggleButton:true},disableScrollWrapper:true,styles:{},children:gt(W,{style:ft.bodyRoot,children:[ie(hs,{children:ie(ys.Provider,{value:I,children:ie(p,{...d})})}),T&&ie(ws,{message:T.message,type:T.type,nonce:T.nonce})]})})})}var ft=Nt.create({bodyRoot:{flex:1,minHeight:0,backgroundColor:"transparent"},toast:{position:"absolute",bottom:16,alignSelf:"center",flexDirection:"row",alignItems:"center",gap:8,maxWidth:"86%",backgroundColor:Wo.card,borderWidth:1,borderRadius:8,paddingHorizontal:12,paddingVertical:8,shadowColor:"#000",shadowOpacity:.4,shadowRadius:8,shadowOffset:{width:0,height:2},elevation:6},toastDot:{width:6,height:6,borderRadius:3},toastText:{flex:1,fontSize:12,color:Wo.text}});import{Fragment as Cs,jsx as pe}from"react/jsx-runtime";var Vo=ss(null),Go="@react_buoy_open_apps",Dt=44,Ts=12,zs=100,ks=16,Is=e=>({x:window.innerWidth-Dt-ks,y:window.innerHeight-zs-Dt-e*(Dt+Ts)}),_o=({children:e})=>{let[t,o]=Po([]),[a,n]=Po(false),i=Ve([]),l=Ve(null),u=Ve(false),d=Ve(false),p=Ve(false),m=be(b=>{let M="";return o(P=>{let{apps:C,instanceId:A}=ds(P,b,()=>`${b.id}-${Date.now()}-${Math.random().toString(36).slice(2)}`);return M=A,C}),M},[]),x=be(()=>{if(u.current||!d.current||!p.current)return;u.current=true;let b=l.current;if(!b||b.length===0){n(true);return}l.current=null,b.forEach(({id:M,minimized:P})=>{let C=i.current.find(A=>A.id===M);if(C&&C.component){let A=Ao(C.icon,{slot:"dial",size:20,color:C.color});m({id:C.id,title:C.name,component:C.component,props:C.props,modal:C.modal,launchMode:C.launchMode||"self-modal",singleton:C.singleton??true,icon:A,color:C.color,minimized:P})}}),n(true)},[m]);Rt(()=>{let b=false;return(async()=>{try{let M=await Lo.getItem(Go);if(b)return;if(M){let P=JSON.parse(M),C;Array.isArray(P)&&P.length>0&&(typeof P[0]=="string"?C=P.map(A=>({id:A,minimized:false})):C=P.filter(A=>typeof A=="object"&&A!==null&&typeof A.id=="string"),C.length&&(l.current=C))}}catch{}b||(d.current=true,x())})(),()=>{b=true}},[x]),Rt(()=>{if(!a)return;let b=t.map(M=>({id:M.id,minimized:M.minimized??false}));Lo.setItem(Go,JSON.stringify(b))},[t,a]);let g=be(b=>{i.current=b,p.current=true,x()},[x]),R=be(b=>{o(M=>M.length?b?M.filter(P=>P.instanceId!==b):M.slice(0,-1):M)},[]),v=be(()=>o([]),[]),I=be((b,M)=>{o(P=>P.map(C=>C.instanceId===b?{...C,minimized:true,restoreState:M}:C))},[]),T=be((b,M)=>{o(P=>P.map(C=>C.instanceId===b?{...C,minimized:false,restoreState:M??C.restoreState}:C))},[]),k=be(b=>t.find(M=>M.instanceId===b)?.minimized??false,[t]),z=t.some(b=>b.launchMode!=="toggle-only"&&!b.minimized);Rt(()=>{if(!z)return;let b=M=>{if(M.key!=="Escape"||M.defaultPrevented)return;let P=[...t].reverse().find(C=>C.launchMode!=="toggle-only"&&!C.minimized);P&&R(P.instanceId)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[z,R,t]);let B=cs(()=>({openApps:t,isAnyOpen:z,open:m,close:R,closeAll:v,registerApps:g,minimize:I,restore:T,isMinimized:k}),[t,z,m,R,v,g,I,T,k]);return pe(Vo.Provider,{value:B,children:e})},ht=()=>{let e=ls(Vo);return e||{openApps:[],isAnyOpen:false,open:()=>"",close:()=>{},closeAll:()=>{},registerApps:()=>{},minimize:()=>{},restore:()=>{},isMinimized:()=>false}},Ms=9e3,Rs={position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.28)",display:"flex",alignItems:"center",justifyContent:"center"},As={maxHeight:"90%",width:"94%",borderRadius:12,backgroundColor:"white",overflow:"hidden"},Ds=({app:e,zIndex:t,onClose:o,onMinimize:a,minimizeTargetPosition:n,enableSharedModalDimensions:i})=>{let l=e.component,u=!e.minimized,d={...e.props??{},...i?{enableSharedModalDimensions:true}:{}};return e.modal&&(!e.launchMode||e.launchMode==="self-modal")?pe(xs,{app:e,config:e.modal,visible:u,zIndex:t,onClose:o,onMinimize:a,initialModalState:e.restoreState,enableSharedModalDimensions:i,bodyProps:d}):e.launchMode==="self-modal"?pe(l,{...d,visible:u,onClose:o,onRequestClose:o,onMinimize:a,minimizeTargetPosition:n,instanceId:e.instanceId,zIndex:t,initialModalState:e.restoreState}):e.launchMode==="inline"?u?pe("div",{style:{position:"fixed",inset:0,zIndex:t,pointerEvents:"none"},children:pe(l,{...d,onClose:o,onMinimize:a,minimizeTargetPosition:n,instanceId:e.instanceId})}):null:pe("div",{style:{...Rs,zIndex:t,display:u?"flex":"none"},children:pe("div",{style:As,children:pe(l,{...d,onClose:o,onMinimize:a,minimizeTargetPosition:n,instanceId:e.instanceId})})})},qo=()=>{let{openApps:e,close:t,minimize:o}=ht(),{settings:a}=is(),n=e.filter(u=>u.launchMode!=="toggle-only");if(n.length===0)return null;let i=n.filter(u=>u.minimized).length,l=Ri()??Is(i);return pe(Cs,{children:n.map((u,d)=>pe(Ds,{app:u,zIndex:Ms+d,onClose:()=>t(u.instanceId),onMinimize:p=>o(u.instanceId,p),enableSharedModalDimensions:a.globalSettings?.enableSharedModalDimensions===true,minimizeTargetPosition:l},u.instanceId))})};import{useCallback as Es,useEffect as Et,useRef as Os,useState as Jo,useSyncExternalStore as Xo}from"react";import{persistentStorage as Yo,getToolAttention as Ot,subscribeToolAttention as Qo}from"@buoy-gg/shared-ui/web";import{jsx as re,jsxs as yt}from"react/jsx-runtime";function Bs(e){return Xo(Qo,()=>Ot(e),()=>Ot(e))}var Zo={needsInput:"#FF8329",done:"#20C997",failed:"#FF3B30"},en={needsInput:3,failed:2,done:1},tn=new Map;function on(e){let t=null;for(let a of e?e.split("|"):[]){let n=Ot(a);n&&(!t||en[n.kind]>en[t.kind])&&(t=n)}let o=tn.get(e);return o&&t&&o.kind===t.kind&&o.label===t.label?o:!o&&!t?null:(tn.set(e,t),t)}function Fs(e){let t=e.join("|");return Xo(Qo,()=>on(t),()=>on(t))}var nn=28,Bt=32,Ft=6,an=8,rn=24,sn="@react_buoy_minimized_stack_expanded",Ls=80,ln=2e3,Ps=6e3,$s="#1A1A1A",qe="#888888";function cn({down:e=false}){return re("svg",{width:12,height:12,viewBox:"0 0 24 24","aria-hidden":"true",style:{transform:e?"rotate(180deg)":void 0},children:re("path",{d:"M18 15l-6-6-6 6",fill:"none",stroke:qe,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Hs({id:e,title:t,icon:o,index:a,onPress:n}){let i=Bs(e),l=Os(null);return Et(()=>{let u=true,d,p=()=>{l.current?.animate([{transform:"translateX(0) scale(1)",opacity:1,offset:0},{transform:"translateX(3px) scale(1.05)",opacity:.4,offset:.2},{transform:"translateX(-3px) scale(1.1)",opacity:1,offset:.4},{transform:"translateX(2px) scale(1.0)",opacity:.6,offset:.6},{transform:"translateX(-1px) scale(0.95)",opacity:1,offset:.8},{transform:"translateX(0) scale(1)",opacity:1,offset:1}],{duration:Ls,easing:"linear"})},m=x=>{let g=x?500+Math.random()*1500+a*200:ln+Math.random()*(Ps-ln)+a*300;d=setTimeout(()=>{u&&(p(),m(false))},g)};return m(true),()=>{u=false,clearTimeout(d)}},[a]),yt("button",{type:"button","aria-label":i?`${t} \u2014 ${i.label}. Restore`:`Restore ${t}`,onClick:n,style:{width:Bt,height:Bt,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",padding:0,cursor:"pointer",position:"relative"},children:[re("div",{ref:l,style:{display:"flex",alignItems:"center",justifyContent:"center"},children:o}),i?re("span",{"aria-hidden":true,"data-testid":`buoy-dock-badge-${e}-${i.kind}`,style:{position:"absolute",top:0,right:0,minWidth:12,height:12,borderRadius:6,padding:"0 2px",boxSizing:"border-box",background:Zo[i.kind],border:"1.5px solid #0C0C0C",color:"#000",fontSize:8,fontWeight:800,lineHeight:"9px",display:"flex",alignItems:"center",justifyContent:"center"},children:i.kind==="needsInput"?"!":""}):null]})}function js({containerWidth:e=32}){let{openApps:t,restore:o}=ht(),a=t.filter(g=>g.minimized&&g.launchMode!=="toggle-only"),[n,i]=Jo(false),[l,u]=Jo(false),d=Fs(a.map(g=>g.id));Et(()=>{let g=false;return(async()=>{let R=await Yo.getItem(sn);!g&&R==="true"&&i(true),g||u(true)})(),()=>{g=true}},[]),Et(()=>{l&&Yo.setItem(sn,n?"true":"false")},[n,l]);let p=Es(g=>{o(g)},[o]);if(a.length===0)return null;let m=an+a.length*Bt+(a.length-1)*Ft+Ft+rn+4,x={backgroundColor:$s,borderTopLeftRadius:6,borderTopRightRadius:6,borderTop:`1px solid ${qe}66`,borderLeft:`1px solid ${qe}66`,borderRight:`1px solid ${qe}66`,borderBottom:"none",boxSizing:"border-box"};return yt("div",{style:{height:nn,overflow:"visible",position:"relative"},children:[re("div",{style:{position:"absolute",bottom:"var(--buoy-stack-bottom, 0px)",top:"var(--buoy-stack-top, auto)",left:0,width:e,maxHeight:"var(--buoy-stack-space, calc(100vh - 48px))",visibility:n?"visible":"hidden",height:n?m:0,opacity:n?1:0,overflowY:"auto",overflowX:"hidden",transition:"height 200ms ease, opacity 200ms ease",pointerEvents:n?"auto":"none",...x},children:yt("div",{style:{height:m,display:"flex",flexDirection:"column",alignItems:"center",paddingTop:an,gap:Ft,boxSizing:"border-box"},children:[[...a].reverse().map((g,R)=>re(Hs,{id:g.id,title:g.title||g.id,icon:g.icon??re("span",{style:{color:"#fff",fontSize:13},children:(g.title||g.id).slice(0,1).toUpperCase()}),index:R,onPress:()=>p(g.instanceId)},g.instanceId)),re("button",{type:"button","aria-label":"Collapse",onClick:()=>i(false),style:{width:"100%",height:rn,marginTop:3,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",cursor:"pointer",padding:0},children:re(cn,{down:true})})]})}),yt("button",{type:"button","aria-label":`Show ${a.length} minimized tools`,tabIndex:n?-1:0,"aria-hidden":n,onClick:()=>i(true),style:{position:"absolute",bottom:0,left:0,width:e,height:nn,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:2,cursor:"pointer",padding:0,opacity:n?0:1,transform:n?"scale(0.9)":"scale(1)",transition:"opacity 200ms ease, transform 200ms ease",pointerEvents:n?"none":"auto",...x},children:[re(cn,{}),d?re("span",{"aria-hidden":true,"data-testid":"buoy-dock-peek-attention",style:{position:"absolute",top:2,right:2,minWidth:11,height:11,borderRadius:6,padding:"0 2px",boxSizing:"border-box",background:Zo[d.kind],border:"1.5px solid #0C0C0C",color:"#000",fontSize:8,fontWeight:800,lineHeight:"9px",display:"flex",alignItems:"center",justifyContent:"center"},children:d.kind==="needsInput"?"!":""}):null,a.length>1&&re("span",{style:{fontSize:9,fontWeight:600,color:qe,marginLeft:1},children:a.length})]})]})}import{registerToolModules as Ws}from"@buoy-gg/shared-ui/web";import{createElement as Ns}from"react";function dn(e){let t=e.icon;return{...e,icon:typeof t=="function"?o=>Ns(t,{size:o,slot:e.slot??"both",color:e.color}):()=>t}}import{createContext as Us,useContext as Ks,useState as un,useMemo as pn}from"react";import{jsx as Vs}from"react/jsx-runtime";var mn=Us(null);function gn({children:e}){let[t,o]=un(false),[a,n]=un(false),i=pn(()=>t||a,[t,a]),l=pn(()=>({isDialOpen:t,isToolOpen:a,isDevToolsActive:i,setDialOpen:o,setToolOpen:n}),[t,a,i]);return Vs(mn.Provider,{value:l,children:e})}function Lt(){let e=Ks(mn);return e||{isDialOpen:false,isToolOpen:false,isDevToolsActive:false,setDialOpen:()=>{},setToolOpen:()=>{}}}import*as Gs from"@buoy-gg/license/web";import*as _s from"@buoy-gg/shared-ui/web";import*as qs from"@buoy-gg/shared-ui/web/dataViewer";function fn(e){Ws({core:{useDevToolsVisibility:Lt},license:Gs,"shared-ui":_s,"shared-ui/dataViewer":qs,...e});let t=new Set;return Object.values(e).flatMap(o=>Object.entries(o).flatMap(([a,n])=>!a.endsWith("Preset")||!n||typeof n.id!="string"||!n.component||t.has(n.id)?[]:(t.add(n.id),[dn(n)])))}import{useEffect as Pt,useMemo as $t,useRef as Js}from"react";import{LicenseManager as Xs,useLicense as Ys}from"@buoy-gg/license/web";import{registerToolAdapters as Qs}from"@buoy-gg/shared-ui/web";function hn(e){return typeof e=="object"&&e!==null?e:void 0}function Zs({isDevelopment:e,isLicensed:t,externalSync:o,isAvailable:a}){if(o===false||!a)return false;if(e)return true;let n=hn(o);return t&&n?.enableInRelease===true&&bn(n.socketURL,n)===null}var yn="http://localhost:42831";function el(e){return e==="localhost"||e.endsWith(".localhost")||/^127\.\d+\.\d+\.\d+$/.test(e)||e==="[::1]"||e==="::1"||e==="10.0.2.2"}function bn(e,t){let o=e??yn;if(t?.allowInsecureNetwork===true)return null;let a;try{a=new URL(o)}catch{return`[Buoy] externalSync.socketURL "${o}" isn't a valid URL, so this release build won't connect to Buoy Desktop.`}return a.protocol==="https:"||a.protocol==="wss:"||el(a.hostname)?null:`[Buoy] This release build won't connect to ${o}: release sync carries real user data, and plain http to another machine is readable by anyone on the same network. Use a simulator, an emulator or adb reverse (localhost), an https:// broker, or set externalSync.allowInsecureNetwork: true for a network you trust.`}var tl={impersonate:["searchUsers","startImpersonation","resumeImpersonation","updateSettings","removeFromHistory","clearHistory"]};function ol(e,t,o){if(t)return e;let a=null;for(let[n,i]of Object.entries(tl)){if(o?.includes(n))continue;let l=e[n];if(!l?.actions)continue;let u={...l.actions};for(let d of i)d in u&&(u[d]=()=>{throw new Error(`${n}.${d} is off in release builds. To allow it from Buoy Desktop and the MCP, pass externalSync={{ enableInRelease: true, releaseActions: ["${n}"] }}.`)});a??(a={...e}),a[n]={...l,actions:u}}return a??e}import{useEffect as nl,useMemo as al,useState as il}from"react";import{devToolsStorageKeys as rl,persistentStorage as sl}from"@buoy-gg/shared-ui/web";var ll=8;function cl(){let e="";for(;e.length<ll;)e+=(Math.random()*16|0).toString(16);return e}function dl(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function ul({appName:e,hardwareName:t,platform:o,installId:a,deviceId:n}){let i=dl(e??"buoy")||"buoy",l=e??"Buoy Device",u=t?.trim()||o;return n?{deviceId:n,deviceName:`${l} (${u})`}:{deviceId:`${i}-${o}-${a}`,deviceName:`${l} (${u} \xB7 ${a.slice(-4)})`}}function pl(){let e=globalThis;try{return e.sessionStorage??null}catch{return null}}async function ml({platform:e=Oe.OS,store:t,mint:o=cl}={}){let a=rl.sync.deviceId(),n=t===void 0?e==="web"?pl():sl:t;if(!n)return o();try{let i=await n.getItem(a);if(i&&i.length>0)return i;let l=o();return await n.setItem(a,l),l}catch{return o()}}var Ht=null;function gl(){return Ht||(Ht=ml()),Ht}function fl(e,t){let o=e?.deviceId,a=e?.deviceName,n=t.loadId??gl,i=t.platform??Oe.OS,[l,u]=il(null);return nl(()=>{if(o)return;let d=false;return n().then(p=>{d||u(p)}),()=>{d=true}},[o,n]),al(()=>{if(!o&&!l)return null;let d=ul({appName:t.appName,hardwareName:t.hardwareName,platform:i,installId:l??"",deviceId:o});return a?{...d,deviceName:a}:d},[o,a,l,t.appName,t.hardwareName,i])}import{getDevServerOrigin as hl,resolveReloadStrategy as yl,scheduleReloadApp as bl}from"@buoy-gg/shared-ui/web";var Sn=Date.now(),vn=hl(),Sl={platform:Oe.OS,isTV:Oe.isTV===true,isTVOS:Oe.isTVOS===true},wn={version:3,getSnapshot:()=>{let e=yl("auto");return{startedAt:Sn,devServerOrigin:vn,device:Sl,reload:{available:e!==null,strategy:e}}},subscribe:e=>()=>{},actions:{ping:()=>({ok:true,startedAt:Sn,devServerOrigin:vn}),reloadApp:e=>{let t=e??{},{strategy:o,delayMs:a}=bl({strategy:t.strategy,delayMs:t.delayMs});return{scheduled:true,strategy:o,delayMs:a}}}};import{Fragment as vl,jsx as Me,jsxs as wl}from"react/jsx-runtime";var xl=["ConsoleRoot","RouteTracker","ReactQueryTracker","ReduxAutoInstrument","PerfMonitorRoot","AutomationResumer","ImagesRoot"],Cl=["DebugBordersStandaloneOverlay","HighlightUpdatesOverlay","ImageOverlayStandalone","PerfMonitorOverlay","JsTopHudOverlay","ImpersonateOverlay","ScenariosOverlay"];function Tl(e){let t=$t(()=>Object.fromEntries(Object.entries(e.modules).map(([a,n])=>[a.replace(/^@buoy-gg\//,"").replace(/\/web$/,""),n])),[e.modules]),o=t["react-query"];return o?.useReactQuerySyncAdapter?Me(zl,{...e,modules:t,query:o}):Me(xn,{...e,modules:t})}function zl(e){let t=e.query.useReactQuerySyncAdapter();return Me(xn,{...e,queryAdapter:t})}function xn({modules:e,apps:t,requiredEnvVars:o,externalSync:a,headless:n,sentryGetClient:i,queryAdapter:l}){let{isPro:u,tier:d}=Ys(),p=$t(()=>{let T={app:wn};for(let[k,z]of Object.entries(e))for(let[B,b]of Object.entries(z))B.endsWith("SyncAdapter")&&b&&typeof b=="object"&&(T[k]=b);l&&(T.query=l),e.env?.createEnvSyncAdapter&&(T.env=e.env.createEnvSyncAdapter(o??[]));for(let k of t??[])k.sync&&(T[`custom:${k.id}`]=k.sync);return T},[e,t,o,l]),m=Js(p);m.current=p,Pt(()=>Qs(()=>m.current),[]),Pt(()=>{let T=[],k=z=>{let B=z?.();typeof B=="function"&&T.push(B)};return k(e.network?.startNetworkCapture),k(e.storage?.startBrowserStorageCapture),k(e.assets?.startBrowserAssetCapture),e.storage?.storageSyncAdapter?.subscribe&&k(()=>e.storage.storageSyncAdapter.subscribe(()=>{})),e["focus-inspector"]?.focusInspectorSyncAdapter?.subscribe&&k(()=>e["focus-inspector"].focusInspectorSyncAdapter.subscribe(()=>{})),()=>{for(let z of T.reverse())z()}},[e]);let x=e["external-sync"],g=typeof et<"u"?et:process.env.NODE_ENV!=="production",R=Zs({isDevelopment:g,isLicensed:u,externalSync:a,isAvailable:!!x}),v=hn(a);!g&&v?.enableInRelease&&kl(bn(v.socketURL,v));let I=e.sentry?.SentryRoot;return wl(vl,{children:[Object.entries(e).flatMap(([T,k])=>xl.map(z=>{let B=k[z];return B?Me(B,{},`${T}:${z}`):null})),I&&Me(I,{getClient:i}),Object.entries(e).flatMap(([T,k])=>Cl.map(z=>{let B=k[z];return B&&(!n||z==="ScenariosOverlay"||z==="ImpersonateOverlay")?Me(B,{},`${T}:${z}`):null})),R&&Me(Il,{module:x,tools:p,options:v,isPro:u,tier:d,dev:g})]})}var Cn=null;function kl(e){!e||e===Cn||(Cn=e,console.warn(e))}function Il({module:e,tools:t,options:o,isPro:a,tier:n,dev:i}){let l=fl(o,{appName:typeof document>"u"?null:document.title||location.hostname,hardwareName:"Browser",platform:"web"}),{socket:u}=e.useExternalSyncSocket({deviceName:l?.deviceName??"Buoy Browser",socketURL:o?.socketURL??(i?e.getDefaultSocketURL():yn),persistentDeviceId:l?.deviceId??null,platform:"web",enableLogs:o?.enableLogs});Pt(()=>{if(!u)return;let m=()=>{u.connected&&Xs.hasAccountAccess()&&u.emit("device-license",{isPro:a?"1":"0",tier:n})};return m(),u.on("connect",m),()=>{u.off("connect",m)}},[u,a,n]);let d=o?.releaseActions?.join(",")??"",p=$t(()=>ol(t,i,d?d.split(","):void 0),[t,i,d]);return e.useExternalSync({tools:p,socket:u,deviceId:l?.deviceId??null,enableLogs:o?.enableLogs}),null}import{jsx as G,jsxs as Tn}from"react/jsx-runtime";var Ml={},zn="@react_buoy_floating_menu_tooltip_shown",Rl=Ce;function Al({size:e=14,color:t="#20C997"}){let o=Math.max(2,e/4),a=Math.max(1,e/16);return G("div",{style:{display:"grid",gridTemplateColumns:`repeat(3, ${o}px)`,gap:a,width:e,height:e,alignContent:"center",justifyContent:"center"},children:Array.from({length:9}).map((n,i)=>G("div",{style:{width:o,height:o,borderRadius:o/2,backgroundColor:t}},i))})}function Dl(e){return G(gn,{children:G(_o,{children:G(El,{...e})})})}function El({environment:e,userRole:t,availableEnvironments:o,onEnvironmentSwitch:a,apps:n,modules:i=Ml,externalSync:l,requiredEnvVars:u,sentryGetClient:d,disableHints:p=false,headless:m=false}){let[x,g]=vt(false),[R,v]=vt(false),I=vi(false),T=ht(),k=Be(()=>Vt([...fn(i),...n??[]]),[n,i]),z=Lt(),B=T.openApps.some(r=>!r.minimized);de(()=>{z.setDialOpen(x)},[x,z.setDialOpen]),de(()=>{z.setToolOpen(B||R)},[B,R,z.setToolOpen]);let{registerApps:b}=T;de(()=>{b(k.map(r=>{let L=r.icon;return{...r,icon:typeof L=="function"?({size:j})=>L(j):L}}))},[b,k]);let M=Be(()=>k.map(r=>({id:r.id,name:r.name,description:r.description,slot:r.slot})),[k]),{settings:P}=wi({availableTools:M,storage:Rl});de(()=>{let r=false;return(async()=>{let[L,j]=await Promise.all([Ce.getItem(ot.dial.isOpen()),Ce.getItem(ot.settings.modalOpen())]);r||(L==="true"&&g(true),j==="true"&&(g(true),v(true)),I.current=true)})(),()=>{r=true}},[]),de(()=>{I.current&&Ce.setItem(ot.dial.isOpen(),x?"true":"false")},[x]),de(()=>{I.current&&Ce.setItem(ot.settings.modalOpen(),R?"true":"false")},[R]);let C=Fe(r=>{if(fr(r.id),r.launchMode==="toggle-only"){r.onPress?.();return}if(r.component){let L=typeof r.icon=="function"?r.icon(20):r.icon;T.open({id:r.id,title:r.name||tt(r.id),component:r.component,props:r.props,modal:r.modal,launchMode:r.launchMode||"self-modal",singleton:r.singleton??true,icon:L,color:r.color||Kt(r.id)})}else r.onPress?.()},[T]),A=Be(()=>wt(k,"dial").map(r=>{let L=r.color||Kt(r.id),j;return typeof r.icon=="string"?j=r.icon:typeof r.icon=="function"?j=r.icon(32):j=null,{id:r.id,name:r.name||tt(r.id),icon:j,unavailable:!r.component&&!r.onPress,color:L,onPress:()=>{C(r),g(false)}}}),[k,C]),oe=Be(()=>{if(!x)return A;let r=new Map(A.map(L=>[L.id,L]));return gr(A.map(L=>L.id)).map(L=>r.get(L)).filter(L=>!!L)},[x,A]),Z=Be(()=>wt(k,"row").filter(r=>P.floatingTools[r.id]===true&&(r.component||r.onPress)),[k,P.floatingTools]),q=Be(()=>k.map(r=>({id:r.id,name:r.name||tt(r.id),description:r.description||xi(r.id),slot:r.slot,icon:r.icon,color:r.color})),[k]),[le,K]=vt(false),ne=T.openApps.some(r=>!r.minimized);de(()=>{if(p)return;let r=false,L=setTimeout(async()=>{let j=await Ce.getItem(zn);!r&&!j&&K(true)},1e3);return()=>{r=true,clearTimeout(L)}},[p]);let J=Fe(()=>{K(false),Ce.setItem(zn,"true")},[]),Se=Fe(()=>{J(),g(true)},[J]),me=Fe(()=>{g(false),v(false)},[]),ve=Fe(()=>{v(r=>!r)},[]),$=Fe(()=>v(false),[]),Re=!!(o?.length&&a),fe=P.floatingTools.environment!==false,se=le&&!x&&!ne;de(()=>{if(!se)return;let r=j=>{(!(j.target instanceof Element)||!j.target.closest("[data-buoy-root]"))&&J()},L=j=>{j.key==="Escape"&&J()};return document.addEventListener("pointerdown",r,true),document.addEventListener("keydown",L),()=>{document.removeEventListener("pointerdown",r,true),document.removeEventListener("keydown",L)}},[se,J]);let we=T.openApps.some(r=>r.minimized&&r.launchMode!=="toggle-only"),ae=G(Tl,{modules:i,apps:n,requiredEnvVars:u,externalSync:l,headless:m,sentryGetClient:d});return m?ae:Tn("div",{"data-buoy-root":"",style:{display:"contents"},children:[ae,se&&G("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.85)",zIndex:1e4,pointerEvents:"none"}}),Tn(Gt,{enablePositionPersistence:!se,pushToSide:x||ne,suspendPointerEvents:x,centerOnboarding:se,minimizedStack:we?G(js,{}):void 0,hasMinimizedStack:we,children:[e&&fe&&!Re&&G(Ci,{environment:e}),Re&&fe&&G(Ti,{currentEnvironment:e??"local",availableEnvironments:o,onSelect:a}),t?G(_t,{userRole:t,onPress:Se}):G("button",{"aria-label":"Open dev tools",onClick:Se,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px 8px",background:"none",border:"none",cursor:"pointer"},children:G(Al,{})}),Z.map(r=>G("button",{"aria-label":r.name||tt(r.id),title:r.description,onClick:()=>C(r),style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"4px 6px",borderRadius:6,background:"none",border:"none",cursor:"pointer"},children:typeof r.icon=="function"?r.icon(16):r.icon},r.id))]}),se&&G(so,{title:"Welcome to Buoy!",message:"Grab and position this menu wherever you want, then tap the icon to open your tools.",onDismiss:J}),x&&G(mo,{icons:oe,onClose:me,centerLabel:"BUOY",onCenterPress:ve,settingsOpen:R,hintsDisabled:p}),G(Fo,{visible:R,onClose:$,availableTools:q,onSettingsChange:r=>{}}),G(qo,{}),G(hi,{})]})}function Ol(e){let{access:t,isPro:o,licenseKey:a}=bi();de(()=>{yi.configure(e.licenseKey)},[e.licenseKey]);let n=e.licenseKey===void 0||e.licenseKey.trim().toUpperCase()===(a??""),i=typeof et<"u"?et:process.env.NODE_ENV!=="production",l=n&&t.status==="admitted";return de(()=>{!i&&o&&l&&gi()},[i,o,l]),!i&&!o?null:l?G(Dl,{...e}):e.headless?null:G(Si,{})}import{useSettings as Bl,useFloatingTools as Fl,getToolLabel as Ll,getToolDescription as Pl,getToolColor as $l,settingsColors as Hl,settingsStyles as jl,dialColors as Wl,dialStyles as Nl}from"@buoy-gg/floating-tools-react/web";export{ia as Activity,mi as AlertCircle,sa as AlertTriangle,_o as AppHostProvider,qo as AppOverlay,ja as Badge,Mn as BarChart3,On as BaseEventStore,An as Bookmark,ca as Bug,Xa as Button,ai as Card,ua as Check,ma as CheckCircle,pa as CheckSquare,fa as ChevronDown,ya as ChevronLeft,Sa as ChevronRight,wa as ChevronUp,Ca as Clock,En as Cloud,li as CollapsibleSection,Ta as Copy,Qa as CopyButton,Dn as DataViewer,kn as Database,gn as DevToolsVisibilityProvider,mo as DialMenu,Ga as DiffViewer,Mi as Divider,Bn as Download,Ln as Edit3,pi as EmptyState,Rn as EventStepperFooter,za as Eye,ka as EyeOff,Ia as FileJson,Ma as FileText,Ra as Filter,Aa as FlaskConical,Ol as FloatingDevTools,Gt as FloatingTools,$n as GitBranch,Da as Globe,jn as HardDrive,Ea as Hash,Nn as HelpCircle,Kn as Home,Gn as Image,Oa as Info,Ka as InfoRow,na as JsModal,Fa as Key,Pa as Layers,qn as Link,Ha as Lock,Xn as Maximize2,Qn as Minus,ea as Palette,Wa as Pause,oa as Pin,Ua as Play,Va as Plus,_a as Power,ei as PowerToggle,Ja as RefreshCw,Fn as RelativeTime,aa as Route,oi as Row,Ya as Search,In as SearchBar,ri as SectionHeader,ra as Server,Za as Settings,Fo as SettingsModal,ti as Shield,la as Smartphone,da as Square,Na as StatusDot,di as TabSelector,ga as Timer,ni as Trash2,ha as Unlock,ba as Upload,ii as User,_t as UserStatus,va as Users,si as Wifi,ci as X,xa as XCircle,ui as Zap,wn as appSyncAdapter,ki as autoDiscoverWebPresets,Vt as autoDiscoverWithCustom,fi as clearReleaseOptIn,ta as copyToClipboard,dn as createWebTool,fn as createWebTools,zi as defaultToolPresets,Yn as devToolsStorageKeys,Wl as dialColors,Nl as dialStyles,Pn as formatBytes,Hn as formatDuration,Wn as formatNumber,Ii as getEnabledTools,$l as getToolColor,Pl as getToolDescription,Ll as getToolLabel,wt as getToolsBySlot,La as methodColor,Jn as persistentStorage,Vn as safeStringify,Hl as settingsColors,jl as settingsStyles,Ba as statusColor,qa as toolTheme,Un as truncateMiddle,$a as typeColor,ht as useAppHost,Lt as useDevToolsVisibility,Fl as useFloatingTools,_n as usePersistedState,Zn as useSafeAreaInsets,Bl as useSettings,Ss as useToolHeader,Uo as useToolHost};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/core",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.44",
|
|
4
4
|
"description": "Floating developer menu and account setup for React Native. Add tool packages and configure Desktop or MCP connections separately.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -61,16 +61,13 @@
|
|
|
61
61
|
],
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"react-devtools-core": "6.1.5",
|
|
64
|
-
"@buoy-gg/
|
|
65
|
-
"@buoy-gg/floating-tools-
|
|
66
|
-
"@buoy-gg/license": "^7.0.
|
|
67
|
-
"@buoy-gg/
|
|
64
|
+
"@buoy-gg/shared-ui": "^7.0.44",
|
|
65
|
+
"@buoy-gg/floating-tools-core": "^7.0.44",
|
|
66
|
+
"@buoy-gg/license": "^7.0.44",
|
|
67
|
+
"@buoy-gg/floating-tools-react": "^7.0.44"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"react": "*"
|
|
71
|
-
"react-dom": ">=18",
|
|
72
|
-
"react-native": "*",
|
|
73
|
-
"react-native-web": "^0.21.0"
|
|
70
|
+
"react": "*"
|
|
74
71
|
},
|
|
75
72
|
"react-native-builder-bob": {
|
|
76
73
|
"source": "src",
|