@buoy-gg/react-query 7.0.48 → 7.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.QueryFilterViewV3=QueryFilterViewV3;var _react=require("react");var _sharedUi=require("@buoy-gg/shared-ui");var _getQueryStatusLabel=require("../utils/getQueryStatusLabel");var _jsxRuntime=require("react/jsx-runtime");function QueryFilterViewV3({queries:o,activeFilter:i,onFilterChange:d,ignoredPatterns:a,onPatternToggle:c,includedPatterns:n,onIncludedPatternToggle:y}){const l=(0,_react.useMemo)(()=>{const e={all:o.length,disabled:0,fresh:0,stale:0,fetching:0,paused:0,inactive:0,error:0};o.forEach(t=>{const r=(0,_getQueryStatusLabel.getQueryStatusLabel)(t);if(r==="disabled")e.disabled++;else if(r==="error")e.error++;else if(r==="fresh")e.fresh++;else if(r==="stale")e.stale++;else if(r==="fetching")e.fetching++;else if(r==="paused")e.paused++;else if(r==="inactive")e.inactive++});return e},[o]);const f=(0,_react.useMemo)(()=>{const e=new Set;o.forEach(t=>{if(!t?.queryKey)return;const r=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];r.forEach(u=>{if(u!=null){const s=String(u);if(!/^\d+$/.test(s)){e.add(s)}}})});return Array.from(e).sort().slice(0,50)},[o]);const h=(0,_react.useMemo)(()=>{return f},[f]);const b=(0,_react.useMemo)(()=>{let e=o;if(n.size>0){e=e.filter(t=>{if(!t?.queryKey)return false;const r=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];const u=r.filter(s=>s!=null).map(s=>String(s)).join(" ").toLowerCase();return Array.from(n).some(s=>u.includes(s.toLowerCase()))})}if(a.size>0){e=e.filter(t=>{if(!t?.queryKey)return true;const r=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];const u=r.filter(s=>s!=null).map(s=>String(s)).join(" ").toLowerCase();return!Array.from(a).some(s=>u.includes(s.toLowerCase()))})}return e.length},[o,n,a]);const p=(0,_react.useMemo)(()=>{return{filterSummarySection:{enabled:true,totalCount:o.length,filteredCount:b,includePatterns:n,excludePatterns:a},sections:[{id:"status",title:"Status",type:"status",data:[{id:"status::all",label:"All",count:l.all,icon:_sharedUi.Globe,color:_sharedUi.buoyColors.primary,isActive:!i||i==="all"},{id:"status::disabled",label:"Disabled",count:l.disabled,icon:_sharedUi.XCircle,color:_sharedUi.buoyColors.textMuted,isActive:i==="disabled"},{id:"status::fresh",label:"Fresh",count:l.fresh,icon:_sharedUi.Zap,color:_sharedUi.buoyColors.success,isActive:i==="fresh"},{id:"status::stale",label:"Stale",count:l.stale,icon:_sharedUi.Clock,color:_sharedUi.buoyColors.warning,isActive:i==="stale"},{id:"status::fetching",label:"Fetching",count:l.fetching,icon:_sharedUi.RefreshCw,color:_sharedUi.buoyColors.primary,isActive:i==="fetching"},{id:"status::paused",label:"Paused",count:l.paused,icon:_sharedUi.Clock,color:_sharedUi.buoyColors.textMuted,isActive:i==="paused"},{id:"status::inactive",label:"Inactive",count:l.inactive,icon:_sharedUi.Clock,color:_sharedUi.buoyColors.textSecondary,isActive:i==="inactive"},{id:"status::error",label:"Error",count:l.error,icon:_sharedUi.XCircle,color:_sharedUi.buoyColors.error,isActive:i==="error"}]}],addFilterSection:{enabled:true,placeholder:"Enter pattern to exclude...",title:"EXCLUDE FILTERS",icon:_sharedUi.Filter},includeOnlySection:{enabled:true,title:"INCLUDE ONLY FILTERS",description:"Show ONLY queries matching these patterns. All non-matching queries will be hidden.",placeholder:"Enter pattern to include...",icon:_sharedUi.Eye,patterns:n,onPatternToggle:y,onPatternAdd:y},availableItemsSection:{enabled:true,title:"AVAILABLE QUERY KEYS",emptyMessage:"No queries found. Query keys will appear here once queries are active.",items:h},howItWorksSection:{enabled:true,title:"HOW QUERY FILTERS WORK",description:"There are two types of query key filters:",examples:["","INCLUDE ONLY (green):","\u2022 Shows ONLY queries matching the pattern","\u2022 Example: 'rewards' \u2192 shows only reward queries","\u2022 When active, non-matching queries are hidden","","EXCLUDE (blue):","\u2022 Hides queries matching the pattern","\u2022 Example: 'analytics' \u2192 hides analytics queries","","Filters are case-insensitive and match partial keys."]},activePatterns:a}},[l,i,a,n,h,y,o.length,b]);const m=e=>{const[t,r]=e.split("::");if(t==="status"){if(r==="all"||i===r){d(null)}else{d(r)}}else if(t==="suggestion"){c(r)}};return(0,_jsxRuntime.jsx)(_sharedUi.DynamicFilterView,{...p,onFilterChange:m,onPatternToggle:c,onPatternAdd:c})}
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.QueryFilterViewV3=QueryFilterViewV3;var _react=require("react");var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _getQueryStatusLabel=require("../utils/getQueryStatusLabel");var _jsxRuntime=require("react/jsx-runtime");const noTeamPatterns=()=>false;function QueryFilterViewV3({queries:i,activeFilter:o,onFilterChange:f,ignoredPatterns:l,onPatternToggle:u,includedPatterns:n,onIncludedPatternToggle:y,isTeamPattern:h=noTeamPatterns}){const d=(0,_react.useCallback)(e=>h(e)?(0,_jsxRuntime.jsx)(_reactNative.View,{accessibilityLabel:"Set by your team on buoy.gg",style:[styles.teamBadge,{borderColor:`${_sharedUi.night.color.accent}60`,backgroundColor:`${_sharedUi.night.color.accent}15`}],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.teamBadgeText,{color:_sharedUi.night.color.accent}],children:"TEAM"})}):null,[h]);const a=(0,_react.useMemo)(()=>{const e={all:i.length,disabled:0,fresh:0,stale:0,fetching:0,paused:0,inactive:0,error:0};i.forEach(t=>{const r=(0,_getQueryStatusLabel.getQueryStatusLabel)(t);if(r==="disabled")e.disabled++;else if(r==="error")e.error++;else if(r==="fresh")e.fresh++;else if(r==="stale")e.stale++;else if(r==="fetching")e.fetching++;else if(r==="paused")e.paused++;else if(r==="inactive")e.inactive++});return e},[i]);const b=(0,_react.useMemo)(()=>{const e=new Set;i.forEach(t=>{if(!t?.queryKey)return;const r=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];r.forEach(c=>{if(c!=null){const s=String(c);if(!/^\d+$/.test(s)){e.add(s)}}})});return Array.from(e).sort().slice(0,50)},[i]);const g=(0,_react.useMemo)(()=>{return b},[b]);const m=(0,_react.useMemo)(()=>{let e=i;if(n.size>0){e=e.filter(t=>{if(!t?.queryKey)return false;const r=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];const c=r.filter(s=>s!=null).map(s=>String(s)).join(" ").toLowerCase();return Array.from(n).some(s=>c.includes(s.toLowerCase()))})}if(l.size>0){e=e.filter(t=>{if(!t?.queryKey)return true;const r=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];const c=r.filter(s=>s!=null).map(s=>String(s)).join(" ").toLowerCase();return!Array.from(l).some(s=>c.includes(s.toLowerCase()))})}return e.length},[i,n,l]);const p=(0,_react.useMemo)(()=>{return{filterSummarySection:{enabled:true,totalCount:i.length,filteredCount:m,includePatterns:n,excludePatterns:l},sections:[{id:"status",title:"Status",type:"status",data:[{id:"status::all",label:"All",count:a.all,icon:_sharedUi.Globe,color:_sharedUi.buoyColors.primary,isActive:!o||o==="all"},{id:"status::disabled",label:"Disabled",count:a.disabled,icon:_sharedUi.XCircle,color:_sharedUi.buoyColors.textMuted,isActive:o==="disabled"},{id:"status::fresh",label:"Fresh",count:a.fresh,icon:_sharedUi.Zap,color:_sharedUi.buoyColors.success,isActive:o==="fresh"},{id:"status::stale",label:"Stale",count:a.stale,icon:_sharedUi.Clock,color:_sharedUi.buoyColors.warning,isActive:o==="stale"},{id:"status::fetching",label:"Fetching",count:a.fetching,icon:_sharedUi.RefreshCw,color:_sharedUi.buoyColors.primary,isActive:o==="fetching"},{id:"status::paused",label:"Paused",count:a.paused,icon:_sharedUi.Clock,color:_sharedUi.buoyColors.textMuted,isActive:o==="paused"},{id:"status::inactive",label:"Inactive",count:a.inactive,icon:_sharedUi.Clock,color:_sharedUi.buoyColors.textSecondary,isActive:o==="inactive"},{id:"status::error",label:"Error",count:a.error,icon:_sharedUi.XCircle,color:_sharedUi.buoyColors.error,isActive:o==="error"}]}],addFilterSection:{enabled:true,placeholder:"Enter pattern to exclude...",title:"EXCLUDE FILTERS",icon:_sharedUi.Filter},includeOnlySection:{enabled:true,title:"INCLUDE ONLY FILTERS",description:"Show ONLY queries matching these patterns. All non-matching queries will be hidden.",placeholder:"Enter pattern to include...",icon:_sharedUi.Eye,patterns:n,onPatternToggle:y,onPatternAdd:y,renderPatternMeta:d},availableItemsSection:{enabled:true,title:"AVAILABLE QUERY KEYS",emptyMessage:"No queries found. Query keys will appear here once queries are active.",items:g},howItWorksSection:{enabled:true,title:"HOW QUERY FILTERS WORK",description:"There are two types of query key filters:",examples:["","INCLUDE ONLY (green):","\u2022 Shows ONLY queries matching the pattern","\u2022 Example: 'rewards' \u2192 shows only reward queries","\u2022 When active, non-matching queries are hidden","","EXCLUDE (blue):","\u2022 Hides queries matching the pattern","\u2022 Example: 'analytics' \u2192 hides analytics queries","","Filters are case-insensitive and match partial keys."]},activePatterns:l,renderPatternMeta:d}},[a,o,l,n,g,y,i.length,m,d]);const S=e=>{const[t,r]=e.split("::");if(t==="status"){if(r==="all"||o===r){f(null)}else{f(r)}}else if(t==="suggestion"){u(r)}};return(0,_jsxRuntime.jsx)(_sharedUi.DynamicFilterView,{...p,onFilterChange:S,onPatternToggle:u,onPatternAdd:u})}const styles=_reactNative.StyleSheet.create({teamBadge:{paddingHorizontal:8,paddingVertical:3,borderRadius:6,borderWidth:1},teamBadgeText:{fontSize:9,fontFamily:_sharedUi.monoFont,fontWeight:"700",letterSpacing:.5}});
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.QueryBrowserModal=QueryBrowserModal;var _reactQuery=require("@tanstack/react-query");var _sharedUi=require("@buoy-gg/shared-ui");var _useSelectedQuery=require("../../hooks/useSelectedQuery");var _ReactQueryModalHeader=require("./ReactQueryModalHeader");var _QueryBrowserMode=require("../QueryBrowserMode");var _QueryBrowserFooter=require("./QueryBrowserFooter");var _QueryFilterViewV=require("../QueryFilterViewV3");var _react=require("react");var _reactNative=require("react-native");var _useAllQueries=_interopRequireDefault(require("../../hooks/useAllQueries"));var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}function QueryBrowserModal({visible:s,selectedQueryKey:v,onQuerySelect:c,onClose:Q,onMinimize:F,activeFilter:w,onFilterChange:b,enableSharedModalDimensions:C=false,onTabChange:M,searchText:u="",onSearchChange:P}){const d=(0,_reactQuery.useQueryClient)();const y=(0,_useSelectedQuery.useGetQueryByQueryKey)(v);const p=(0,_useAllQueries.default)();const x=(0,_react.useCallback)(()=>{d.getQueryCache().clear()},[d]);const[m,q]=(0,_react.useState)(null);const i=w??m;const g=b??q;const[a,l]=(0,_react.useState)(false);const[o,f]=(0,_react.useState)(new Set);const[n,h]=(0,_react.useState)(new Set);(0,_react.useEffect)(()=>{const t=async()=>{try{const e=await _sharedUi.persistentStorage.getItem(_sharedUi.devToolsStorageKeys.reactQuery.ignoredPatterns());if(e){const r=JSON.parse(e);if(Array.isArray(r)){f(new Set(r))}}}catch(e){console.error("Failed to load ignored patterns:",e)}};t()},[]);(0,_react.useEffect)(()=>{const t=async()=>{try{const e=await _sharedUi.persistentStorage.getItem(_sharedUi.devToolsStorageKeys.reactQuery.includedPatterns());if(e){const r=JSON.parse(e);if(Array.isArray(r)){h(new Set(r))}}}catch(e){console.error("Failed to load included patterns:",e)}};t()},[]);(0,_react.useEffect)(()=>{const t=async()=>{try{const e=Array.from(o);await _sharedUi.persistentStorage.setItem(_sharedUi.devToolsStorageKeys.reactQuery.ignoredPatterns(),JSON.stringify(e))}catch(e){console.error("Failed to save ignored patterns:",e)}};t()},[o]);(0,_react.useEffect)(()=>{const t=async()=>{try{const e=Array.from(n);await _sharedUi.persistentStorage.setItem(_sharedUi.devToolsStorageKeys.reactQuery.includedPatterns(),JSON.stringify(e))}catch(e){console.error("Failed to save included patterns:",e)}};t()},[n]);const T=(0,_react.useCallback)(t=>{f(e=>{const r=new Set(e);if(r.has(t)){r.delete(t)}else{r.add(t)}return r})},[]);const _=(0,_react.useCallback)(t=>{h(e=>{const r=new Set(e);if(r.has(t)){r.delete(t)}else{r.add(t)}return r})},[]);const[S,j]=(0,_react.useState)("bottomSheet");const A=C?_sharedUi.devToolsStorageKeys.reactQuery.modal():_sharedUi.devToolsStorageKeys.reactQuery.browserModal();const B=(0,_react.useCallback)(t=>{j(t)},[]);const k=(0,_sharedUi.useSafeAreaInsets)({minBottom:16});const I=S==="floating"?56:48+k.bottom;if(!s)return null;const H=()=>{if(a){const t=[{key:"filters",label:"Filters"}];return(0,_jsxRuntime.jsxs)(_sharedUi.ModalHeader,{children:[(0,_jsxRuntime.jsx)(_sharedUi.ModalHeader.Navigation,{onBack:()=>l(false)}),(0,_jsxRuntime.jsx)(_sharedUi.ModalHeader.Content,{title:"",noMargin:true,children:(0,_jsxRuntime.jsx)(_sharedUi.TabSelector,{tabs:t,activeTab:"filters",testIDPrefix:"buoy-rq-filterview-tab",onTabChange:()=>{}})})]})}return(0,_jsxRuntime.jsx)(_ReactQueryModalHeader.ReactQueryModalHeader,{selectedQuery:y,activeTab:"queries",onTabChange:M,onBack:()=>c(void 0),searchText:u,onSearchChange:P,onFilterPress:()=>l(true),hasActiveFilters:i!==null||o.size>0||n.size>0,onClearCache:x})};const V=(0,_jsxRuntime.jsx)(_QueryBrowserFooter.QueryBrowserFooter,{activeFilter:i,onFilterChange:g,isFloatingMode:S==="floating"});return(0,_jsxRuntime.jsx)(_sharedUi.JsModal,{visible:s,onClose:Q,onMinimize:F,persistenceKey:A,header:{customContent:H(),showToggleButton:true},onModeChange:B,enablePersistence:true,initialMode:"bottomSheet",enableGlitchEffects:true,disableScrollWrapper:!a,styles:{},footer:!a?V:void 0,footerHeight:!a?I:void 0,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.container,children:a?(0,_jsxRuntime.jsx)(_QueryFilterViewV.QueryFilterViewV3,{queries:p,activeFilter:i,onFilterChange:g,ignoredPatterns:o,onPatternToggle:T,includedPatterns:n,onIncludedPatternToggle:_}):(0,_jsxRuntime.jsx)(_QueryBrowserMode.QueryBrowserMode,{selectedQuery:y,onQuerySelect:c,activeFilter:i,searchText:u,ignoredPatterns:o,includedPatterns:n,onFilterPress:()=>l(true)})})})}const styles=_reactNative.StyleSheet.create({container:{flex:1,backgroundColor:"transparent"}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.QueryBrowserModal=QueryBrowserModal;var _reactQuery=require("@tanstack/react-query");var _sharedUi=require("@buoy-gg/shared-ui");var _useSelectedQuery=require("../../hooks/useSelectedQuery");var _ReactQueryModalHeader=require("./ReactQueryModalHeader");var _QueryBrowserMode=require("../QueryBrowserMode");var _QueryBrowserFooter=require("./QueryBrowserFooter");var _QueryFilterViewV=require("../QueryFilterViewV3");var _react=require("react");var _reactNative=require("react-native");var _useAllQueries=_interopRequireDefault(require("../../hooks/useAllQueries"));var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}function QueryBrowserModal({visible:s,selectedQueryKey:P,onQuerySelect:h,onClose:b,onMinimize:C,activeFilter:T,onFilterChange:x,enableSharedModalDimensions:q=false,onTabChange:_,searchText:S="",onSearchChange:j}){const v=(0,_reactQuery.useQueryClient)();const w=(0,_useSelectedQuery.useGetQueryByQueryKey)(P);const A=(0,_useAllQueries.default)();const I=(0,_react.useCallback)(()=>{v.getQueryCache().clear()},[v]);const[B,k]=(0,_react.useState)(null);const d=T??B;const Q=x??k;const[l,y]=(0,_react.useState)(false);const[n,F]=(0,_react.useState)(new Set);const[o,m]=(0,_react.useState)(new Set);const c=(0,_react.useRef)(null);const u=(0,_react.useRef)(null);(0,_react.useEffect)(()=>{const e=async()=>{try{const r=await _sharedUi.persistentStorage.getItem(_sharedUi.devToolsStorageKeys.reactQuery.ignoredPatterns());if(r){const t=JSON.parse(r);if(Array.isArray(t)){c.current=JSON.stringify(Array.from(new Set(t)));F(new Set(t))}}}catch(r){console.error("Failed to load ignored patterns:",r)}finally{c.current??="[]"}};e()},[]);(0,_react.useEffect)(()=>{const e=async()=>{try{const r=await _sharedUi.persistentStorage.getItem(_sharedUi.devToolsStorageKeys.reactQuery.includedPatterns());if(r){const t=JSON.parse(r);if(Array.isArray(t)){u.current=JSON.stringify(Array.from(new Set(t)));m(new Set(t))}}}catch(r){console.error("Failed to load included patterns:",r)}finally{u.current??="[]"}};e()},[]);(0,_react.useEffect)(()=>{const e=JSON.stringify(Array.from(n));if(c.current===null||c.current===e)return;c.current=e;const r=async()=>{try{await _sharedUi.persistentStorage.setItem(_sharedUi.devToolsStorageKeys.reactQuery.ignoredPatterns(),e)}catch(t){console.error("Failed to save ignored patterns:",t)}};r()},[n]);(0,_react.useEffect)(()=>{const e=JSON.stringify(Array.from(o));if(u.current===null||u.current===e)return;u.current=e;const r=async()=>{try{await _sharedUi.persistentStorage.setItem(_sharedUi.devToolsStorageKeys.reactQuery.includedPatterns(),e)}catch(t){console.error("Failed to save included patterns:",t)}};r()},[o]);const a=(0,_sharedUi.useTeamList)(_sharedUi.devToolsStorageKeys.reactQuery.ignoredPatterns());const i=(0,_sharedUi.useTeamList)(_sharedUi.devToolsStorageKeys.reactQuery.includedPatterns());const g=(0,_react.useMemo)(()=>a.length?new Set([...n,...a]):n,[n,a]);const f=(0,_react.useMemo)(()=>i.length?new Set([...o,...i]):o,[o,i]);const K=(0,_react.useCallback)(e=>a.includes(e)&&!n.has(e)||i.includes(e)&&!o.has(e),[a,i,n,o]);const H=(0,_react.useCallback)(e=>{F(r=>{if(!r.has(e)&&a.includes(e))return r;const t=new Set(r);if(t.has(e)){t.delete(e)}else{t.add(e)}return t})},[a]);const N=(0,_react.useCallback)(e=>{m(r=>{if(!r.has(e)&&i.includes(e))return r;const t=new Set(r);if(t.has(e)){t.delete(e)}else{t.add(e)}return t})},[i]);const[M,V]=(0,_react.useState)("bottomSheet");const J=q?_sharedUi.devToolsStorageKeys.reactQuery.modal():_sharedUi.devToolsStorageKeys.reactQuery.browserModal();const O=(0,_react.useCallback)(e=>{V(e)},[]);const R=(0,_sharedUi.useSafeAreaInsets)({minBottom:16});const p=M==="floating"?56:48+R.bottom;if(!s)return null;const E=()=>{if(l){const e=[{key:"filters",label:"Filters"}];return(0,_jsxRuntime.jsxs)(_sharedUi.ModalHeader,{children:[(0,_jsxRuntime.jsx)(_sharedUi.ModalHeader.Navigation,{onBack:()=>y(false)}),(0,_jsxRuntime.jsx)(_sharedUi.ModalHeader.Content,{title:"",noMargin:true,children:(0,_jsxRuntime.jsx)(_sharedUi.TabSelector,{tabs:e,activeTab:"filters",testIDPrefix:"buoy-rq-filterview-tab",onTabChange:()=>{}})})]})}return(0,_jsxRuntime.jsx)(_ReactQueryModalHeader.ReactQueryModalHeader,{selectedQuery:w,activeTab:"queries",onTabChange:_,onBack:()=>h(void 0),searchText:S,onSearchChange:j,onFilterPress:()=>y(true),hasActiveFilters:d!==null||g.size>0||f.size>0,onClearCache:I})};const z=(0,_jsxRuntime.jsx)(_QueryBrowserFooter.QueryBrowserFooter,{activeFilter:d,onFilterChange:Q,isFloatingMode:M==="floating"});return(0,_jsxRuntime.jsx)(_sharedUi.JsModal,{visible:s,onClose:b,onMinimize:C,persistenceKey:J,header:{customContent:E(),showToggleButton:true},onModeChange:O,enablePersistence:true,initialMode:"bottomSheet",enableGlitchEffects:true,disableScrollWrapper:!l,styles:{},footer:!l?z:void 0,footerHeight:!l?p:void 0,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.container,children:l?(0,_jsxRuntime.jsx)(_QueryFilterViewV.QueryFilterViewV3,{queries:A,activeFilter:d,onFilterChange:Q,ignoredPatterns:g,onPatternToggle:H,includedPatterns:f,onIncludedPatternToggle:N,isTeamPattern:K}):(0,_jsxRuntime.jsx)(_QueryBrowserMode.QueryBrowserMode,{selectedQuery:w,onQuerySelect:h,activeFilter:d,searchText:S,ignoredPatterns:g,includedPatterns:f,onFilterPress:()=>y(true)})})})}const styles=_reactNative.StyleSheet.create({container:{flex:1,backgroundColor:"transparent"}});
@@ -1 +1 @@
1
- "use strict";import{useMemo as f}from"react";import{DynamicFilterView as w,buoyColors as l}from"@buoy-gg/shared-ui";import{XCircle as S,Clock as h,RefreshCw as L,Globe as C,Zap as K,Filter as v,Eye as x}from"@buoy-gg/shared-ui";import{getQueryStatusLabel as k}from"../utils/getQueryStatusLabel";import{jsx as I}from"react/jsx-runtime";export function QueryFilterViewV3({queries:o,activeFilter:i,onFilterChange:p,ignoredPatterns:n,onPatternToggle:y,includedPatterns:c,onIncludedPatternToggle:d}){const a=f(()=>{const e={all:o.length,disabled:0,fresh:0,stale:0,fetching:0,paused:0,inactive:0,error:0};o.forEach(t=>{const r=k(t);if(r==="disabled")e.disabled++;else if(r==="error")e.error++;else if(r==="fresh")e.fresh++;else if(r==="stale")e.stale++;else if(r==="fetching")e.fetching++;else if(r==="paused")e.paused++;else if(r==="inactive")e.inactive++});return e},[o]);const m=f(()=>{const e=new Set;o.forEach(t=>{if(!t?.queryKey)return;const r=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];r.forEach(u=>{if(u!=null){const s=String(u);if(!/^\d+$/.test(s)){e.add(s)}}})});return Array.from(e).sort().slice(0,50)},[o]);const b=f(()=>{return m},[m]);const A=f(()=>{let e=o;if(c.size>0){e=e.filter(t=>{if(!t?.queryKey)return false;const r=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];const u=r.filter(s=>s!=null).map(s=>String(s)).join(" ").toLowerCase();return Array.from(c).some(s=>u.includes(s.toLowerCase()))})}if(n.size>0){e=e.filter(t=>{if(!t?.queryKey)return true;const r=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];const u=r.filter(s=>s!=null).map(s=>String(s)).join(" ").toLowerCase();return!Array.from(n).some(s=>u.includes(s.toLowerCase()))})}return e.length},[o,c,n]);const E=f(()=>{return{filterSummarySection:{enabled:true,totalCount:o.length,filteredCount:A,includePatterns:c,excludePatterns:n},sections:[{id:"status",title:"Status",type:"status",data:[{id:"status::all",label:"All",count:a.all,icon:C,color:l.primary,isActive:!i||i==="all"},{id:"status::disabled",label:"Disabled",count:a.disabled,icon:S,color:l.textMuted,isActive:i==="disabled"},{id:"status::fresh",label:"Fresh",count:a.fresh,icon:K,color:l.success,isActive:i==="fresh"},{id:"status::stale",label:"Stale",count:a.stale,icon:h,color:l.warning,isActive:i==="stale"},{id:"status::fetching",label:"Fetching",count:a.fetching,icon:L,color:l.primary,isActive:i==="fetching"},{id:"status::paused",label:"Paused",count:a.paused,icon:h,color:l.textMuted,isActive:i==="paused"},{id:"status::inactive",label:"Inactive",count:a.inactive,icon:h,color:l.textSecondary,isActive:i==="inactive"},{id:"status::error",label:"Error",count:a.error,icon:S,color:l.error,isActive:i==="error"}]}],addFilterSection:{enabled:true,placeholder:"Enter pattern to exclude...",title:"EXCLUDE FILTERS",icon:v},includeOnlySection:{enabled:true,title:"INCLUDE ONLY FILTERS",description:"Show ONLY queries matching these patterns. All non-matching queries will be hidden.",placeholder:"Enter pattern to include...",icon:x,patterns:c,onPatternToggle:d,onPatternAdd:d},availableItemsSection:{enabled:true,title:"AVAILABLE QUERY KEYS",emptyMessage:"No queries found. Query keys will appear here once queries are active.",items:b},howItWorksSection:{enabled:true,title:"HOW QUERY FILTERS WORK",description:"There are two types of query key filters:",examples:["","INCLUDE ONLY (green):","\u2022 Shows ONLY queries matching the pattern","\u2022 Example: 'rewards' \u2192 shows only reward queries","\u2022 When active, non-matching queries are hidden","","EXCLUDE (blue):","\u2022 Hides queries matching the pattern","\u2022 Example: 'analytics' \u2192 hides analytics queries","","Filters are case-insensitive and match partial keys."]},activePatterns:n}},[a,i,n,c,b,d,o.length,A]);const g=e=>{const[t,r]=e.split("::");if(t==="status"){if(r==="all"||i===r){p(null)}else{p(r)}}else if(t==="suggestion"){y(r)}};return I(w,{...E,onFilterChange:g,onPatternToggle:y,onPatternAdd:y})}
1
+ "use strict";import{useCallback as k,useMemo as d}from"react";import{StyleSheet as v,Text as I,View as R}from"react-native";import{DynamicFilterView as N,buoyColors as n,monoFont as O,night as m}from"@buoy-gg/shared-ui";import{XCircle as w,Clock as p,RefreshCw as Y,Globe as q,Zap as D,Filter as M,Eye as Q}from"@buoy-gg/shared-ui";import{getQueryStatusLabel as T}from"../utils/getQueryStatusLabel";import{jsx as b}from"react/jsx-runtime";const U=()=>false;export function QueryFilterViewV3({queries:o,activeFilter:i,onFilterChange:g,ignoredPatterns:l,onPatternToggle:y,includedPatterns:c,onIncludedPatternToggle:f,isTeamPattern:S=U}){const h=k(e=>S(e)?b(R,{accessibilityLabel:"Set by your team on buoy.gg",style:[L.teamBadge,{borderColor:`${m.color.accent}60`,backgroundColor:`${m.color.accent}15`}],children:b(I,{style:[L.teamBadgeText,{color:m.color.accent}],children:"TEAM"})}):null,[S]);const a=d(()=>{const e={all:o.length,disabled:0,fresh:0,stale:0,fetching:0,paused:0,inactive:0,error:0};o.forEach(t=>{const r=T(t);if(r==="disabled")e.disabled++;else if(r==="error")e.error++;else if(r==="fresh")e.fresh++;else if(r==="stale")e.stale++;else if(r==="fetching")e.fetching++;else if(r==="paused")e.paused++;else if(r==="inactive")e.inactive++});return e},[o]);const A=d(()=>{const e=new Set;o.forEach(t=>{if(!t?.queryKey)return;const r=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];r.forEach(u=>{if(u!=null){const s=String(u);if(!/^\d+$/.test(s)){e.add(s)}}})});return Array.from(e).sort().slice(0,50)},[o]);const E=d(()=>{return A},[A]);const C=d(()=>{let e=o;if(c.size>0){e=e.filter(t=>{if(!t?.queryKey)return false;const r=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];const u=r.filter(s=>s!=null).map(s=>String(s)).join(" ").toLowerCase();return Array.from(c).some(s=>u.includes(s.toLowerCase()))})}if(l.size>0){e=e.filter(t=>{if(!t?.queryKey)return true;const r=Array.isArray(t.queryKey)?t.queryKey:[t.queryKey];const u=r.filter(s=>s!=null).map(s=>String(s)).join(" ").toLowerCase();return!Array.from(l).some(s=>u.includes(s.toLowerCase()))})}return e.length},[o,c,l]);const K=d(()=>{return{filterSummarySection:{enabled:true,totalCount:o.length,filteredCount:C,includePatterns:c,excludePatterns:l},sections:[{id:"status",title:"Status",type:"status",data:[{id:"status::all",label:"All",count:a.all,icon:q,color:n.primary,isActive:!i||i==="all"},{id:"status::disabled",label:"Disabled",count:a.disabled,icon:w,color:n.textMuted,isActive:i==="disabled"},{id:"status::fresh",label:"Fresh",count:a.fresh,icon:D,color:n.success,isActive:i==="fresh"},{id:"status::stale",label:"Stale",count:a.stale,icon:p,color:n.warning,isActive:i==="stale"},{id:"status::fetching",label:"Fetching",count:a.fetching,icon:Y,color:n.primary,isActive:i==="fetching"},{id:"status::paused",label:"Paused",count:a.paused,icon:p,color:n.textMuted,isActive:i==="paused"},{id:"status::inactive",label:"Inactive",count:a.inactive,icon:p,color:n.textSecondary,isActive:i==="inactive"},{id:"status::error",label:"Error",count:a.error,icon:w,color:n.error,isActive:i==="error"}]}],addFilterSection:{enabled:true,placeholder:"Enter pattern to exclude...",title:"EXCLUDE FILTERS",icon:M},includeOnlySection:{enabled:true,title:"INCLUDE ONLY FILTERS",description:"Show ONLY queries matching these patterns. All non-matching queries will be hidden.",placeholder:"Enter pattern to include...",icon:Q,patterns:c,onPatternToggle:f,onPatternAdd:f,renderPatternMeta:h},availableItemsSection:{enabled:true,title:"AVAILABLE QUERY KEYS",emptyMessage:"No queries found. Query keys will appear here once queries are active.",items:E},howItWorksSection:{enabled:true,title:"HOW QUERY FILTERS WORK",description:"There are two types of query key filters:",examples:["","INCLUDE ONLY (green):","\u2022 Shows ONLY queries matching the pattern","\u2022 Example: 'rewards' \u2192 shows only reward queries","\u2022 When active, non-matching queries are hidden","","EXCLUDE (blue):","\u2022 Hides queries matching the pattern","\u2022 Example: 'analytics' \u2192 hides analytics queries","","Filters are case-insensitive and match partial keys."]},activePatterns:l,renderPatternMeta:h}},[a,i,l,c,E,f,o.length,C,h]);const x=e=>{const[t,r]=e.split("::");if(t==="status"){if(r==="all"||i===r){g(null)}else{g(r)}}else if(t==="suggestion"){y(r)}};return b(N,{...K,onFilterChange:x,onPatternToggle:y,onPatternAdd:y})}const L=v.create({teamBadge:{paddingHorizontal:8,paddingVertical:3,borderRadius:6,borderWidth:1},teamBadgeText:{fontSize:9,fontFamily:O,fontWeight:"700",letterSpacing:.5}});
@@ -1 +1 @@
1
- "use strict";import{useQueryClient as D}from"@tanstack/react-query";import{JsModal as R,useSafeAreaInsets as W,ModalHeader as g,TabSelector as L}from"@buoy-gg/shared-ui";import{useGetQueryByQueryKey as U}from"../../hooks/useSelectedQuery";import{ReactQueryModalHeader as X}from"./ReactQueryModalHeader";import{QueryBrowserMode as Y}from"../QueryBrowserMode";import{QueryBrowserFooter as Z}from"./QueryBrowserFooter";import{QueryFilterViewV3 as $}from"../QueryFilterViewV3";import{useState as l,useCallback as d,useEffect as u}from"react";import{View as ee,StyleSheet as te}from"react-native";import{devToolsStorageKeys as n,persistentStorage as f}from"@buoy-gg/shared-ui";import re from"../../hooks/useAllQueries";import{jsx as o,jsxs as oe}from"react/jsx-runtime";export function QueryBrowserModal({visible:m,selectedQueryKey:b,onQuerySelect:h,onClose:v,onMinimize:M,activeFilter:A,onFilterChange:T,enableSharedModalDimensions:I=false,onTabChange:x,searchText:F="",onSearchChange:B}){const p=D();const w=U(b);const N=re();const k=d(()=>{p.getQueryCache().clear()},[p]);const[H,J]=l(null);const c=A??H;const S=T??J;const[s,y]=l(false);const[a,C]=l(new Set);const[i,P]=l(new Set);u(()=>{const t=async()=>{try{const e=await f.getItem(n.reactQuery.ignoredPatterns());if(e){const r=JSON.parse(e);if(Array.isArray(r)){C(new Set(r))}}}catch(e){console.error("Failed to load ignored patterns:",e)}};t()},[]);u(()=>{const t=async()=>{try{const e=await f.getItem(n.reactQuery.includedPatterns());if(e){const r=JSON.parse(e);if(Array.isArray(r)){P(new Set(r))}}}catch(e){console.error("Failed to load included patterns:",e)}};t()},[]);u(()=>{const t=async()=>{try{const e=Array.from(a);await f.setItem(n.reactQuery.ignoredPatterns(),JSON.stringify(e))}catch(e){console.error("Failed to save ignored patterns:",e)}};t()},[a]);u(()=>{const t=async()=>{try{const e=Array.from(i);await f.setItem(n.reactQuery.includedPatterns(),JSON.stringify(e))}catch(e){console.error("Failed to save included patterns:",e)}};t()},[i]);const V=d(t=>{C(e=>{const r=new Set(e);if(r.has(t)){r.delete(t)}else{r.add(t)}return r})},[]);const j=d(t=>{P(e=>{const r=new Set(e);if(r.has(t)){r.delete(t)}else{r.add(t)}return r})},[]);const[Q,q]=l("bottomSheet");const O=I?n.reactQuery.modal():n.reactQuery.browserModal();const z=d(t=>{q(t)},[]);const K=W({minBottom:16});const E=Q==="floating"?56:48+K.bottom;if(!m)return null;const G=()=>{if(s){const t=[{key:"filters",label:"Filters"}];return oe(g,{children:[o(g.Navigation,{onBack:()=>y(false)}),o(g.Content,{title:"",noMargin:true,children:o(L,{tabs:t,activeTab:"filters",testIDPrefix:"buoy-rq-filterview-tab",onTabChange:()=>{}})})]})}return o(X,{selectedQuery:w,activeTab:"queries",onTabChange:x,onBack:()=>h(void 0),searchText:F,onSearchChange:B,onFilterPress:()=>y(true),hasActiveFilters:c!==null||a.size>0||i.size>0,onClearCache:k})};const _=o(Z,{activeFilter:c,onFilterChange:S,isFloatingMode:Q==="floating"});return o(R,{visible:m,onClose:v,onMinimize:M,persistenceKey:O,header:{customContent:G(),showToggleButton:true},onModeChange:z,enablePersistence:true,initialMode:"bottomSheet",enableGlitchEffects:true,disableScrollWrapper:!s,styles:{},footer:!s?_:void 0,footerHeight:!s?E:void 0,children:o(ee,{style:ne.container,children:s?o($,{queries:N,activeFilter:c,onFilterChange:S,ignoredPatterns:a,onPatternToggle:V,includedPatterns:i,onIncludedPatternToggle:j}):o(Y,{selectedQuery:w,onQuerySelect:h,activeFilter:c,searchText:F,ignoredPatterns:a,includedPatterns:i,onFilterPress:()=>y(true)})})})}const ne=te.create({container:{flex:1,backgroundColor:"transparent"}});
1
+ "use strict";import{useQueryClient as te}from"@tanstack/react-query";import{JsModal as re,useSafeAreaInsets as ne,ModalHeader as P,TabSelector as oe}from"@buoy-gg/shared-ui";import{useGetQueryByQueryKey as se}from"../../hooks/useSelectedQuery";import{ReactQueryModalHeader as ae}from"./ReactQueryModalHeader";import{QueryBrowserMode as ie}from"../QueryBrowserMode";import{QueryBrowserFooter as le}from"./QueryBrowserFooter";import{QueryFilterViewV3 as ce}from"../QueryFilterViewV3";import{useState as f,useCallback as y,useEffect as m,useMemo as x,useRef as B}from"react";import{View as de,StyleSheet as ue}from"react-native";import{devToolsStorageKeys as o,persistentStorage as h,useTeamList as N}from"@buoy-gg/shared-ui";import fe from"../../hooks/useAllQueries";import{jsx as n,jsxs as ye}from"react/jsx-runtime";export function QueryBrowserModal({visible:Q,selectedQueryKey:J,onQuerySelect:C,onClose:j,onMinimize:O,activeFilter:k,onFilterChange:H,enableSharedModalDimensions:V=false,onTabChange:q,searchText:b="",onSearchChange:z}){const v=te();const M=se(J);const K=fe();const E=y(()=>{v.getQueryCache().clear()},[v]);const[G,R]=f(null);const g=k??G;const I=H??R;const[c,S]=f(false);const[s,T]=f(new Set);const[a,A]=f(new Set);const d=B(null);const u=B(null);m(()=>{const e=async()=>{try{const t=await h.getItem(o.reactQuery.ignoredPatterns());if(t){const r=JSON.parse(t);if(Array.isArray(r)){d.current=JSON.stringify(Array.from(new Set(r)));T(new Set(r))}}}catch(t){console.error("Failed to load ignored patterns:",t)}finally{d.current??="[]"}};e()},[]);m(()=>{const e=async()=>{try{const t=await h.getItem(o.reactQuery.includedPatterns());if(t){const r=JSON.parse(t);if(Array.isArray(r)){u.current=JSON.stringify(Array.from(new Set(r)));A(new Set(r))}}}catch(t){console.error("Failed to load included patterns:",t)}finally{u.current??="[]"}};e()},[]);m(()=>{const e=JSON.stringify(Array.from(s));if(d.current===null||d.current===e)return;d.current=e;const t=async()=>{try{await h.setItem(o.reactQuery.ignoredPatterns(),e)}catch(r){console.error("Failed to save ignored patterns:",r)}};t()},[s]);m(()=>{const e=JSON.stringify(Array.from(a));if(u.current===null||u.current===e)return;u.current=e;const t=async()=>{try{await h.setItem(o.reactQuery.includedPatterns(),e)}catch(r){console.error("Failed to save included patterns:",r)}};t()},[a]);const i=N(o.reactQuery.ignoredPatterns());const l=N(o.reactQuery.includedPatterns());const w=x(()=>i.length?new Set([...s,...i]):s,[s,i]);const F=x(()=>l.length?new Set([...a,...l]):a,[a,l]);const _=y(e=>i.includes(e)&&!s.has(e)||l.includes(e)&&!a.has(e),[i,l,s,a]);const D=y(e=>{T(t=>{if(!t.has(e)&&i.includes(e))return t;const r=new Set(t);if(r.has(e)){r.delete(e)}else{r.add(e)}return r})},[i]);const L=y(e=>{A(t=>{if(!t.has(e)&&l.includes(e))return t;const r=new Set(t);if(r.has(e)){r.delete(e)}else{r.add(e)}return r})},[l]);const[p,W]=f("bottomSheet");const U=V?o.reactQuery.modal():o.reactQuery.browserModal();const X=y(e=>{W(e)},[]);const Y=ne({minBottom:16});const Z=p==="floating"?56:48+Y.bottom;if(!Q)return null;const $=()=>{if(c){const e=[{key:"filters",label:"Filters"}];return ye(P,{children:[n(P.Navigation,{onBack:()=>S(false)}),n(P.Content,{title:"",noMargin:true,children:n(oe,{tabs:e,activeTab:"filters",testIDPrefix:"buoy-rq-filterview-tab",onTabChange:()=>{}})})]})}return n(ae,{selectedQuery:M,activeTab:"queries",onTabChange:q,onBack:()=>C(void 0),searchText:b,onSearchChange:z,onFilterPress:()=>S(true),hasActiveFilters:g!==null||w.size>0||F.size>0,onClearCache:E})};const ee=n(le,{activeFilter:g,onFilterChange:I,isFloatingMode:p==="floating"});return n(re,{visible:Q,onClose:j,onMinimize:O,persistenceKey:U,header:{customContent:$(),showToggleButton:true},onModeChange:X,enablePersistence:true,initialMode:"bottomSheet",enableGlitchEffects:true,disableScrollWrapper:!c,styles:{},footer:!c?ee:void 0,footerHeight:!c?Z:void 0,children:n(de,{style:ge.container,children:c?n(ce,{queries:K,activeFilter:g,onFilterChange:I,ignoredPatterns:w,onPatternToggle:D,includedPatterns:F,onIncludedPatternToggle:L,isTeamPattern:_}):n(ie,{selectedQuery:M,onQuerySelect:C,activeFilter:g,searchText:b,ignoredPatterns:w,includedPatterns:F,onFilterPress:()=>S(true)})})})}const ge=ue.create({container:{flex:1,backgroundColor:"transparent"}});
@@ -7,11 +7,13 @@ interface QueryFilterViewV3Props {
7
7
  onPatternToggle: (pattern: string) => void;
8
8
  includedPatterns: Set<string>;
9
9
  onIncludedPatternToggle: (pattern: string) => void;
10
+ /** Patterns from the team list on buoy.gg: shown with a TEAM badge. */
11
+ isTeamPattern?: (pattern: string) => boolean;
10
12
  }
11
13
  /**
12
14
  * Comprehensive filter control panel for React Query DevTools matching the Network DevTools
13
15
  * filter UI pattern. Provides status filtering and query key pattern-based filtering.
14
16
  */
15
- export declare function QueryFilterViewV3({ queries, activeFilter, onFilterChange, ignoredPatterns, onPatternToggle, includedPatterns, onIncludedPatternToggle, }: QueryFilterViewV3Props): import("react").JSX.Element;
17
+ export declare function QueryFilterViewV3({ queries, activeFilter, onFilterChange, ignoredPatterns, onPatternToggle, includedPatterns, onIncludedPatternToggle, isTeamPattern, }: QueryFilterViewV3Props): import("react").JSX.Element;
16
18
  export {};
17
19
  //# sourceMappingURL=QueryFilterViewV3.d.ts.map
package/lib/web/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
- "use client";var pr=Object.defineProperty;var Pa=Object.getOwnPropertyDescriptor;var Oa=Object.getOwnPropertyNames;var za=Object.prototype.hasOwnProperty;var Ka=(e,t)=>{for(var r in t)pr(e,r,{get:t[r],enumerable:true})},br=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Oa(t))!za.call(e,a)&&a!==r&&pr(e,a,{get:()=>t[a],enumerable:!(o=Pa(t,a))||o.enumerable});return e},La=(e,t,r)=>(br(e,t,"default"),r&&br(r,t,"default"));typeof window<"u"&&typeof globalThis.global>"u"&&(globalThis.global=globalThis);import"@tanstack/react-query";import{QueryIcon as vr}from"@buoy-gg/floating-tools-core/web";import{Wifi as Sr}from"@buoy-gg/shared-ui/web";import{useCallback as Re,useState as Ye,useEffect as Ba}from"react";import{useQueryClient as Ha}from"@tanstack/react-query";import{TickProvider as Wa}from"@buoy-gg/shared-ui/web";import{useQueryClient as ja}from"@tanstack/react-query";import{JsModal as Va,useSafeAreaInsets as $a,ModalHeader as Lt,TabSelector as Na}from"@buoy-gg/shared-ui/web";import{useEffect as Ua,useState as _a,useRef as Ja}from"react";import{useQueryClient as Ga}from"@tanstack/react-query";function Cr(e){let{query:t}=Bt(e);return t}function Bt(e){let t=Ga(),[r,o]=_a({query:void 0,version:0}),a=Ja(void 0);return Ua(()=>{if(!e){o({query:void 0,version:0}),a.current=void 0;return}let n=t.getQueryCache().find({queryKey:e,exact:true});o({query:n,version:0});let s=JSON.stringify(e);a.current=s;let i=t.getQueryCache().subscribe(l=>{(l.type==="updated"||l.type==="added"||l.type==="removed")&&"query"in l&&l.query&&JSON.stringify(l.query.queryKey)===a.current&&(l.type==="removed"?o({query:void 0,version:0}):o(u=>({query:l.query,version:u.version+1})))});return()=>i()},[t,e]),r}import{ModalHeader as Ie,TabSelector as xr,Search as Ya,Filter as Xa,Trash as Za,night as Le}from"@buoy-gg/shared-ui/web";import{useState as en,useRef as wr,useEffect as tn}from"react";var qr={};Ka(qr,{AccessibilityInfo:()=>nn,ActivityIndicator:()=>Jn,Alert:()=>Xn,Animated:()=>X,AppRegistry:()=>ln,AppState:()=>un,Appearance:()=>sn,BackHandler:()=>cn,Button:()=>Gn,CheckBox:()=>qn,Clipboard:()=>dn,DeviceEventEmitter:()=>Ln,Dimensions:()=>Tr,Easing:()=>yn,FlatList:()=>Wt,I18nManager:()=>hn,Image:()=>Tn,ImageBackground:()=>Mn,InteractionManager:()=>mn,Keyboard:()=>fn,KeyboardAvoidingView:()=>An,LayoutAnimation:()=>gn,Linking:()=>pn,LogBox:()=>Kn,Modal:()=>Ar,NativeEventEmitter:()=>bn,NativeModules:()=>an,PanResponder:()=>Ht,Picker:()=>Dn,PixelRatio:()=>vn,Platform:()=>Sn,Pressable:()=>Mr,ProgressBar:()=>Qn,RefreshControl:()=>Rn,SafeAreaView:()=>In,ScrollView:()=>me,SectionList:()=>kn,Share:()=>Cn,StatusBar:()=>En,StyleSheet:()=>M,Switch:()=>_n,Text:()=>p,TextInput:()=>$n,Touchable:()=>Fn,TouchableHighlight:()=>Nn,TouchableNativeFeedback:()=>Pn,TouchableOpacity:()=>V,TouchableWithoutFeedback:()=>Un,UIManager:()=>xn,Vibration:()=>wn,View:()=>f,VirtualizedList:()=>On,YellowBox:()=>zn,findNodeHandle:()=>Yn,unstable_createElement:()=>on,useColorScheme:()=>Bn,useLocaleContext:()=>Hn,useWindowDimensions:()=>Wn});La(qr,rn);import*as rn from"react-native-web";import{unstable_createElement as on,NativeModules as an,AccessibilityInfo as nn,Animated as X,Appearance as sn,AppRegistry as ln,AppState as un,BackHandler as cn,Clipboard as dn,Dimensions as Tr,Easing as yn,I18nManager as hn,Keyboard as fn,InteractionManager as mn,LayoutAnimation as gn,Linking as pn,NativeEventEmitter as bn,PanResponder as Ht,PixelRatio as vn,Platform as Sn,Share as Cn,StyleSheet as M,UIManager as xn,Vibration as wn,CheckBox as qn,FlatList as Wt,Image as Tn,ImageBackground as Mn,KeyboardAvoidingView as An,Picker as Dn,ProgressBar as Qn,RefreshControl as Rn,SafeAreaView as In,SectionList as kn,StatusBar as En,Touchable as Fn,TouchableNativeFeedback as Pn,VirtualizedList as On,YellowBox as zn,LogBox as Kn,DeviceEventEmitter as Ln,useColorScheme as Bn,useLocaleContext as Hn,useWindowDimensions as Wn}from"react-native-web";import*as W from"react-native-web";import{createElement as jn,forwardRef as Vn}from"react";function j(e){let t=Vn((o,a)=>{let{accessibilityState:n,accessibilityValue:s,...i}=o;for(let l of["busy","checked","disabled","expanded","selected"])n?.[l]!==void 0&&i[`aria-${l}`]===void 0&&(i[`aria-${l}`]=n[l]);for(let[l,u]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))s?.[l]!==void 0&&i[`aria-${u}`]===void 0&&(i[`aria-${u}`]=s[l]);return jn(e,{...i,ref:a})}),r=e.State;return r&&Object.assign(t,{State:r}),t.displayName=e.displayName??e.name??"NativeWebView",t}var f=j(W.View),p=j(W.Text),$n=j(W.TextInput),V=j(W.TouchableOpacity),Nn=j(W.TouchableHighlight),Un=j(W.TouchableWithoutFeedback),Mr=j(W.Pressable),me=j(W.ScrollView),Ar=j(W.Modal),_n=j(W.Switch),Jn=j(W.ActivityIndicator),Gn=j(W.Button),Yn=W.findNodeHandle,Xn={alert(e,t,r,o){if(typeof document>"u")return;let a=document.createElement("dialog");a.dataset.buoyRoot="",a.setAttribute("aria-label",e),a.style.cssText="position:fixed;inset:0;margin:auto;width:min(440px,90vw);padding:24px;border:1px solid #475569;border-radius:14px;background:#17212e;color:#f1f5f9;font:14px system-ui;box-shadow:0 20px 80px #0008;z-index:2147483647";let n=document.createElement("h2");if(n.textContent=e,n.style.cssText="font-size:18px;margin:0 0 12px",a.appendChild(n),t){let u=document.createElement("p");u.textContent=t,u.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",a.appendChild(u)}let s=document.createElement("div");s.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let i=r?.length?r:[{text:"OK"}],l=()=>{a.close?.(),a.remove()};for(let u of i){let c=document.createElement("button");c.type="button",c.textContent=u.text??"OK",c.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${u.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,c.onclick=()=>{l(),u.onPress?.()},s.appendChild(c)}a.addEventListener("cancel",u=>{u.preventDefault(),o?.cancelable!==false&&(l(),o?.onDismiss?.())}),a.appendChild(s),document.body.appendChild(a),a.showModal?a.showModal():a.setAttribute("open","")}};import{Wifi as Dr}from"@buoy-gg/shared-ui/web";import{useEffect as Qr,useState as Zn,useRef as ei}from"react";import{onlineManager as yt}from"@tanstack/react-query";import{devToolsStorageKeys as Rr,persistentStorage as Ir}from"@buoy-gg/shared-ui/web";function kr(){let[e,t]=Zn(()=>yt.isOnline()),r=ei(false);Qr(()=>{if(r.current)return;(async()=>{try{let n=await Ir.getItem(Rr.settings.wifiEnabled());if(n!==null){let s=n==="true";t(s),yt.setOnline(s)}r.current=true}catch{}})()},[]);let o=async n=>{try{await Ir.setItem(Rr.settings.wifiEnabled(),n.toString())}catch{}},a=()=>{let n=!e;t(n),yt.setOnline(n),o(n)};return Qr(()=>yt.subscribe(n=>{t(n),r.current&&o(n)}),[]),{isOnline:e,handleWifiToggle:a}}import{jsx as jt}from"react/jsx-runtime";function Er({size:e=16,testID:t}){let{isOnline:r,handleWifiToggle:o}=kr();return jt(V,{"sentry-label":`ignore toggle WiFi ${r?"On":"Off"}`,testID:t,accessibilityRole:"button",accessibilityLabel:`WiFi ${r?"On":"Off"}`,accessibilityHint:`Tap to turn WiFi ${r?"off":"on"} for React Query`,onPress:o,hitSlop:{top:10,bottom:10,left:10,right:10},activeOpacity:.7,style:{alignItems:"center",justifyContent:"center",width:14,flexShrink:0},children:r?jt(Dr,{size:e,color:"#10B981"}):jt(Dr,{size:e,color:"#DC2626"})})}import{jsx as L,jsxs as ht}from"react/jsx-runtime";function Xe({selectedQuery:e,selectedMutation:t,activeTab:r,onTabChange:o,onBack:a,searchText:n="",onSearchChange:s,onFilterPress:i,hasActiveFilters:l=false,onClearCache:u,showWifiToggle:c=false}){let[d,h]=en(false),g=wr(false),y=wr(null);tn(()=>{d&&y.current&&y.current.focus()},[d]);let m=()=>{h(!d),d&&s&&s("")},C=S=>{s&&s(S)},v=S=>S?.queryKey&&(Array.isArray(S.queryKey)?S.queryKey:[S.queryKey]).filter(w=>w!=null).map(w=>String(w)).join(" \u203A ")||"Unknown Query",b=S=>"queryKey"in S?v(S):S.options.mutationKey?(Array.isArray(S.options.mutationKey)?S.options.mutationKey:[S.options.mutationKey]).filter(w=>w!=null).map(w=>String(w)).join(" \u203A ")||`Mutation #${S.mutationId}`:`Mutation #${S.mutationId}`,x=[{key:"queries",label:"Queries"},{key:"mutations",label:"Mutations"}];return e||t?ht(Ie,{children:[L(Ie.Navigation,{onBack:a}),L(Ie.Content,{title:b(e??t),testID:"buoy-rq-detail-title"})]}):ht(Ie,{children:[L(Ie.Content,{title:"",noMargin:true,children:d?L(Ie.Search,{value:n,onChangeText:C,onCancel:()=>{C(""),h(false)},onDismiss:()=>h(false),dismissOnBlur:true,clearOnlyWhenText:true,placeholder:"Search query keys...",accessibilityLabel:"Search queries and mutations",iconSize:14,testID:"buoy-rq-search",containerTestID:"buoy-rq-search-field",clearTestID:"buoy-rq-search-clear",inputProps:{"sentry-label":"ignore react query search header"}}):c?ht(f,{style:ke.tabRow,children:[L(f,{style:ke.tabSelectorWrap,children:L(xr,{tabs:x,activeTab:r,testIDPrefix:"buoy-rq-tab",onTabChange:S=>o(S)})}),L(Er,{size:16,testID:"buoy-rq-wifi"})]}):L(xr,{tabs:x,activeTab:r,testIDPrefix:"buoy-rq-tab",onTabChange:S=>o(S)})}),ht(Ie.Actions,{children:[L(V,{"sentry-label":"ignore open search",testID:"buoy-rq-search-open",accessibilityRole:"button",accessibilityLabel:"Search queries and mutations",onPress:m,style:ke.headerActionButton,children:L(Ya,{size:14,color:Le.color.textSecondary})}),i&&L(V,{"sentry-label":"ignore open filter",testID:"buoy-rq-filters",accessibilityRole:"button",accessibilityLabel:l?"Filters, active":"Filters",onPress:i,style:[ke.headerActionButton,l&&ke.activeFilterButton],children:L(Xa,{size:14,color:l?Le.color.accent:Le.color.textSecondary})}),u&&L(V,{"sentry-label":"ignore clear cache",testID:"buoy-rq-clear-cache",accessibilityRole:"button",onPress:u,style:[ke.headerActionButton,ke.clearCacheButton],accessibilityLabel:`Clear ${r} cache`,children:L(Za,{size:14,color:Le.color.warning})})]})]})}var ke=M.create({tabRow:{flex:1,flexDirection:"row",alignItems:"center",gap:12},tabSelectorWrap:{flex:1},headerActionButton:{padding:6,borderRadius:4},activeFilterButton:{backgroundColor:Le.color.accentSoft},clearCacheButton:{backgroundColor:Le.color.warningSoft}});import{resolveListEmptyState as ti}from"@buoy-gg/shared-ui/web";import{useMemo as ri}from"react";import{useMemo as oi}from"react";import{useQueryClient as ai}from"@tanstack/react-query";var Be=(e,t,r)=>{if(t.length===0)return r;if(e instanceof Map){let o=new Map(e);if(t.length===1)return o.set(t[0],r),o;let[a,...n]=t,s=o.get(a);return o.set(a,Be(s??null,n,r)),o}if(e instanceof Set){let o=Be(Array.from(e),t,r);return new Set(Array.isArray(o)?o:[])}if(Array.isArray(e)){let o=[...e];if(t.length===1)return o[t[0]]=r,o;let[a,...n]=t;return o[a]=Be(o[a],n,r),o}if(e instanceof Object){let o={...e};if(t.length===1)return o[t[0]]=r,o;let[a,...n]=t;return o[a]=Be(o[a],n,r),o}return e};var He=(e,t)=>{if(e instanceof Map){let r=new Map(e);if(t.length===1)return r.delete(t[0]),r;let[o,...a]=t;return r.set(o,He(r.get(o),a)),r}if(e instanceof Set){let r=He(Array.from(e),t);return new Set(r)}if(Array.isArray(e)){let r=[...e];if(t.length===1)return r.filter((n,s)=>s.toString()!==t[0]);let[o,...a]=t;return r[o]=He(r[o],a),r}if(e instanceof Object){let r={...e};if(t.length===1)return delete r[t[0]],r;let[o,...a]=t;return r[o]=He(r[o],a),r}return e};function Fr({activeQuery:e,dataPath:t,queryClient:r}){if(!t)return;let o=e.state.data,a=He(o,t),n=JSON.parse(JSON.stringify(a));r.setQueryData(e.queryKey,n)}function Pr(e){return String(e).toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function Or(e){return(Array.isArray(e)?e:[e]).filter(t=>t!=null).map(Pr).filter(Boolean).join("-")||"unkeyed"}function ni(e){return`buoy-rq-query-row-${Or(e)}`}function ii(e,t){return e==null?`buoy-rq-mutation-row-id-${t}`:`buoy-rq-mutation-row-${Or(e)}`}function si(e){return e.length===0?"buoy-rq-explorer-root":`buoy-rq-explorer-${e.map(Pr).filter(Boolean).join("-")}`}import{LiveExplorer as li}from"@buoy-gg/shared-ui/web/dataViewer";import{jsx as ui}from"react/jsx-runtime";function ce({editable:e,label:t,value:r,defaultExpanded:o,activeQuery:a,dataPath:n,itemsDeletable:s,dataVersion:i=0}){let l=ai(),u=oi(()=>{if(a)return{update:(c,d)=>{let h=a.state.data,g=Be(h,c,d);l.setQueryData(a.queryKey,g)},remove:c=>{Fr({queryClient:l,activeQuery:a,dataPath:c})}}},[l,a]);return ui(li,{editable:e,label:t,value:r,defaultExpanded:o,writer:u,dataPath:n,itemsDeletable:s,dataVersion:i,testIDForPath:si,debounceMs:0})}import{useMemo as ci,useCallback as di}from"react";import{memo as yi}from"react";function oe(e){return e.isDisabled()?"disabled":e.state.fetchStatus==="fetching"?"fetching":e.state.status==="error"?"error":e.getObserversCount()?e.state.fetchStatus==="paused"?"paused":e.isStale()?"stale":"fresh":"inactive"}import{CompactRow as hi,buoyColors as ge,useRelativeTime as fi}from"@buoy-gg/shared-ui/web";import{jsx as mi}from"react/jsx-runtime";var gi=e=>e?.queryKey&&(Array.isArray(e.queryKey)?e.queryKey:[e.queryKey]).filter(t=>t!=null).map(t=>String(t)).join(" \u203A ")||"Unknown Query",pi=yi(function({query:e,isSelected:t,onSelect:r}){let o=g=>{switch(g){case"disabled":return ge.textMuted+"80";case"error":return ge.error;case"fresh":return ge.success;case"stale":return ge.warning;case"inactive":return ge.textMuted;case"fetching":return ge.primary;case"paused":return ge.textMuted;default:return ge.textSecondary}},a=oe(e),n=e.getObserversCount(),s=e.isDisabled(),i=gi(e),l=(()=>{if(s)return null;if(e.state.dataUpdatedAt&&e.state.dataUpdatedAt>0)return e.state.dataUpdatedAt;let g=e.state;return g.fetchedAt&&g.fetchedAt>0?g.fetchedAt:null})(),u=fi(l),c=s?"Disabled":u||(e.state.dataUpdatedAt===0?"Not fetched":`N/A (${e.state.dataUpdatedAt||0})`),d=ni(e.queryKey),h=`${n} observer${n!==1?"s":""}`;return mi(hi,{testID:d,statusTestID:`${d}-status`,statusSublabelTestID:`${d}-observers`,accessibilityLabel:`${i}, ${a}, ${h}`,statusDotColor:o(a),statusLabel:a.charAt(0).toUpperCase()+a.slice(1),statusSublabel:h,primaryText:i,bottomRightText:c,badgeText:n,badgeColor:o(a),isSelected:t,onPress:()=>r(e)})}),zr=pi;import{useEffect as bi,useState as vi,useRef as Kr,useMemo as Si,useCallback as Lr}from"react";import{useQueryClient as Ci}from"@tanstack/react-query";import{buoyColors as ft}from"@buoy-gg/shared-ui/web";var ae={base:()=>["#storage"],mmkv:{root:()=>[...ae.base(),"mmkv"],key:e=>[...ae.mmkv.root(),e],all:()=>[...ae.mmkv.root(),"all"]},async:{root:()=>[...ae.base(),"async"],key:e=>[...ae.async.root(),e],all:()=>[...ae.async.root(),"all"]},secure:{root:()=>[...ae.base(),"secure"],key:e=>[...ae.secure.root(),e],all:()=>[...ae.secure.root(),"all"]}};function pe(e){return!Array.isArray(e)||e.length===0?false:e[0]==="#storage"}function Br(e){if(!pe(e)||e.length<2)return null;let t=e[1];return t==="mmkv"||t==="async"||t==="secure"?t:null}function Hr(e){switch(e){case"mmkv":return"MMKV";case"async":return"Async";case"secure":return"Secure";default:return e}}function Wr(e){switch(e){case"mmkv":return"purple";case"async":return"blue";case"secure":return"green";default:return"gray"}}function xi(e){switch(e){case"mmkv":return ft.primary;case"async":return ft.warning;case"secure":return ft.success;default:return ft.textMuted}}function jr(e){return!pe(e)||e.length<3?"Unknown Storage Key":e.slice(2).filter(t=>t!=null).map(t=>String(t)).join(" \u203A ")||"Unknown Storage Key"}var mt=e=>e.state.fetchStatus!=="idle"?0:e.getObserversCount()?e.isStale()?2:1:3,wi=(e,t)=>e.state.dataUpdatedAt<t.state.dataUpdatedAt?1:-1,Vr=(e,t)=>mt(e)===mt(t)?wi(e,t):mt(e)>mt(t)?1:-1;function qi(){let e=Ci(),[t,r]=vi(()=>e.getQueryCache().getAll().filter(i=>!pe(i.queryKey)).sort(Vr)),o=Kr(new Map),a=Kr(void 0),n=Lr(i=>{let l=o.current;if(i.length!==l.size)return true;for(let u of i){let c=l.get(u.queryHash);if(!c||c.dataUpdatedAt!==u.state.dataUpdatedAt||c.errorUpdatedAt!==u.state.errorUpdatedAt||c.fetchStatus!==u.state.fetchStatus||c.status!==u.state.status||c.isInvalidated!==u.state.isInvalidated)return true}return false},[]),s=Lr(()=>{let i=e.getQueryCache().getAll().filter(l=>!pe(l.queryKey));if(n(i)){let l=new Map;i.forEach(c=>{l.set(c.queryHash,c.state)}),o.current=l;let u=[...i].sort(Vr);r(u)}},[e,n]);return bi(()=>{s();let i=e.getQueryCache().subscribe(l=>{if(l.type==="added"||l.type==="removed"||l.type==="updated"){if("query"in l&&l.query&&pe(l.query.queryKey))return;a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{s()},10)}});return()=>{i(),a.current&&clearTimeout(a.current)}},[e,s]),Si(()=>t,[t])}var gt=qi;import{night as Vt,ToolEmptyState as Ti,EVENT_LIST_PRESET as Mi,monoFont as Ai}from"@buoy-gg/shared-ui/web";import{jsx as $t}from"react/jsx-runtime";function $r({selectedQuery:e,onQuerySelect:t,activeFilter:r,emptyStateMessage:o,emptyState:a,contentContainerStyle:n,queries:s,searchText:i="",ignoredPatterns:l=new Set,includedPatterns:u=new Set}){let c=gt(),d=s??c,h=ci(()=>{let y=d;if(r&&(y=y.filter(m=>oe(m)===r)),i){let m=i.toLowerCase();y=y.filter(C=>C?.queryKey?(Array.isArray(C.queryKey)?C.queryKey:[C.queryKey]).filter(v=>v!=null).map(v=>String(v)).join(" ").toLowerCase().includes(m):false)}return u.size>0&&(y=y.filter(m=>{if(!m?.queryKey)return false;let C=(Array.isArray(m.queryKey)?m.queryKey:[m.queryKey]).filter(v=>v!=null).map(v=>String(v)).join(" ").toLowerCase();return Array.from(u).some(v=>C.includes(v.toLowerCase()))})),l.size>0&&(y=y.filter(m=>{if(!m?.queryKey)return true;let C=(Array.isArray(m.queryKey)?m.queryKey:[m.queryKey]).filter(v=>v!=null).map(v=>String(v)).join(" ").toLowerCase();return!Array.from(l).some(v=>C.includes(v.toLowerCase()))})),y.sort((m,C)=>{let v=m.state.dataUpdatedAt||0;return(C.state.dataUpdatedAt||0)-v}),y},[d,r,i,u,l]),g=di(y=>{if(e?.queryHash===y.queryHash){t(void 0);return}t(y)},[e?.queryHash,t]);return h.length===0?$t(Ti,{testID:"buoy-rq-empty",...a??{otto:"empty",title:"No queries found",message:o||(r?`No ${r} queries found`:"No queries found")}}):$t(Wt,{testID:"buoy-rq-query-list",style:Nr.listWrapper,contentContainerStyle:n||Nr.listContent,data:h,keyExtractor:Di,renderItem:({item:y})=>$t(zr,{query:y,stateSig:Qi(y),isSelected:e?.queryHash===y.queryHash,onSelect:g}),showsVerticalScrollIndicator:true,...Mi})}var Di=e=>e.queryHash;function Qi(e){let t=0,r=false;try{t=e.getObserversCount(),r=e.isStale()}catch{}return`${e.state.dataUpdatedAt}|${e.state.fetchStatus}|${e.state.status}|${t}|${r}`}var Nr=M.create({listWrapper:{flexGrow:1},listContent:{paddingBottom:16,backgroundColor:"transparent"},emptyContainer:{flex:1,justifyContent:"center",alignItems:"center",padding:32,backgroundColor:Vt.color.surface,margin:16,borderRadius:8,borderWidth:1,borderColor:Vt.color.border},emptyText:{color:Vt.color.textTertiary,fontSize:14,textAlign:"center",fontFamily:Ai,letterSpacing:.5}});import{buoyColors as D,monoFont as Ri}from"@buoy-gg/shared-ui/web";import{jsx as Ur}from"react/jsx-runtime";var Ii={fresh:D.success+"15",stale:D.warning+"15",fetching:D.primary+"15",paused:D.textMuted+"1A",noObserver:D.textMuted+"1A",error:D.error+"15",inactive:D.textMuted+"1A"},ki={fresh:D.success+"33",stale:D.warning+"33",fetching:D.primary+"33",paused:D.textMuted+"33",noObserver:D.textMuted+"33",error:D.error+"33",inactive:D.textMuted+"33"},Ei={fresh:D.success,stale:D.warning,fetching:D.primary,paused:D.textMuted,noObserver:D.textMuted,error:D.error,inactive:D.textMuted};function _r({query:e,testID:t}){let r=oe(e),o=Ii[r],a=ki[r],n=Ei[r];return Ur(f,{style:[Jr.container,{backgroundColor:o,borderColor:a}],children:Ur(p,{testID:t,style:[Jr.text,{color:n}],children:r})})}var Jr=M.create({container:{paddingHorizontal:8,paddingVertical:4,borderWidth:1,borderRadius:6,alignSelf:"flex-start"},text:{fontSize:11,fontWeight:"600",textTransform:"uppercase",letterSpacing:.5,fontFamily:Ri}});import{displayValue as Fi,night as $,monoFont as pt}from"@buoy-gg/shared-ui/web";import{jsx as be,jsxs as bt}from"react/jsx-runtime";function Nt({query:e}){if(e===void 0)return null;let t=new Date(e.state.dataUpdatedAt).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:true});return bt(f,{style:Z.minWidth,children:[be(p,{style:Z.headerText,children:"Query Details"}),bt(f,{style:Z.row,children:[be(me,{"sentry-label":"ignore devtools query details scroll",horizontal:true,style:Z.flexOne,children:be(p,{testID:"buoy-rq-detail-key",style:Z.queryKeyText,children:Fi(e.queryKey,true)})}),be(_r,{query:e,testID:"buoy-rq-detail-status"})]}),bt(f,{style:Z.row,children:[be(p,{style:Z.labelText,children:"Observers:"}),be(p,{testID:"buoy-rq-detail-observers",style:Z.valueText,children:`${e.getObserversCount()}`})]}),bt(f,{style:Z.row,children:[be(p,{style:Z.labelText,children:"Last Updated:"}),be(p,{testID:"buoy-rq-detail-updated",style:Z.valueText,children:`${t}`})]})]})}var Z=M.create({minWidth:{minWidth:200,backgroundColor:$.color.surface,borderRadius:6,borderWidth:1,borderColor:$.color.accent+"4D",overflow:"hidden",shadowColor:$.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},headerText:{backgroundColor:$.color.accent+"15",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:$.color.accent,borderBottomWidth:1,borderBottomColor:$.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:pt},row:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingHorizontal:12,paddingVertical:10,borderBottomWidth:1,borderBottomColor:$.color.separator},flexOne:{flex:1,marginRight:8},queryKeyText:{fontSize:12,color:$.color.text,fontFamily:pt,lineHeight:18,flexShrink:1,backgroundColor:$.color.accent+"15",paddingHorizontal:8,paddingVertical:4,borderRadius:4,borderWidth:1,borderColor:$.color.accent+"4D"},labelText:{fontSize:10,color:$.color.textSecondary,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase",fontFamily:pt},valueText:{fontSize:12,color:$.color.text,fontWeight:"500",fontVariant:["tabular-nums"],fontFamily:pt}});import{useQueryClient as Pi}from"@tanstack/react-query";import{night as Q}from"@buoy-gg/shared-ui/web";import{jsx as Gr,jsxs as Oi}from"react/jsx-runtime";var zi={refetch:{dotColor:Q.color.accent,textColor:Q.color.text,borderColor:Q.color.border},invalidate:{dotColor:Q.color.warning,textColor:Q.color.text,borderColor:Q.color.border},reset:{dotColor:Q.color.textSecondary,textColor:Q.color.text,borderColor:Q.color.border},remove:{dotColor:Q.color.danger,textColor:Q.color.danger,borderColor:Q.color.danger+"40"},triggerLoading:{dotColor:Q.color.info,textColor:Q.color.info,borderColor:Q.color.info+"40"},triggerError:{dotColor:Q.color.danger,textColor:Q.color.danger,borderColor:Q.color.danger+"40"}};function ne({onClick:e,text:t,variant:r,disabled:o,testID:a}){let n=zi[r];return Oi(V,{"sentry-label":"ignore devtools action button",testID:a,disabled:o,onPress:e,style:[Ut.button,{borderColor:o?Q.color.border:n.borderColor,opacity:o?.4:1}],activeOpacity:.7,accessibilityRole:"button",accessibilityLabel:t,accessibilityState:{disabled:o},children:[Gr(f,{style:[Ut.dot,{backgroundColor:o?Q.color.textTertiary:n.dotColor}]}),Gr(p,{style:[Ut.text,{color:o?Q.color.textTertiary:n.textColor}],children:t})]})}var Ut=M.create({button:{flexDirection:"row",alignItems:"center",justifyContent:"center",borderRadius:4,borderWidth:1,paddingHorizontal:8,paddingVertical:4,backgroundColor:"transparent"},dot:{width:6,height:6,borderRadius:3,marginRight:6},text:{fontSize:12,fontWeight:"500"}});var Ki="@tanstack/query-devtools-event";function ve(e,t){try{let r=globalThis;if(typeof r.dispatchEvent!="function"||typeof r.CustomEvent!="function")return;r.dispatchEvent(new r.CustomEvent(Ki,{detail:{type:e,queryHash:t},bubbles:true,cancelable:true}))}catch{}}function _t({query:e}){if(e.state.data===void 0){ve("RESTORE_LOADING",e.queryHash);let t=e.state,r=e.state.fetchMeta?e.state.fetchMeta.__previousQueryOptions:null;e.cancel({silent:true}),e.setState({...t,fetchStatus:"idle",fetchMeta:null}),r&&e.fetch(r)}else{ve("TRIGGER_LOADING",e.queryHash);let t=e.options;e.fetch({...t,queryFn:()=>new Promise(()=>{}),gcTime:-1}),e.setState({data:void 0,status:"pending",fetchMeta:{...e.state.fetchMeta,__previousQueryOptions:t}})}}function Jt({query:e}){ve("REFETCH",e.queryHash),e.fetch().catch(()=>{})}function Yr({query:e,queryClient:t}){ve("RESET",e.queryHash),t.resetQueries({queryKey:e.queryKey,exact:true})}function Xr({query:e,queryClient:t}){ve("REMOVE",e.queryHash),t.removeQueries(e)}function Zr({query:e,queryClient:t}){ve("INVALIDATE",e.queryHash),t.invalidateQueries(e)}function Gt({query:e,queryClient:t}){if(e.state.status!=="error"){ve("TRIGGER_ERROR",e.queryHash);let r=new Error("Unknown error from devtools"),o=e.options;e.setState({status:"error",error:r,fetchMeta:{...e.state.fetchMeta,__previousQueryOptions:o}})}else ve("RESTORE_ERROR",e.queryHash),t.resetQueries(e)}import{night as Li}from"@buoy-gg/shared-ui/web";import{jsx as Se,jsxs as Ze}from"react/jsx-runtime";function eo({query:e,setSelectedQuery:t}){let r=Pi();if(e===void 0)return null;let o=e.state.status,a=oe(e)==="fetching";return Ze(f,{style:Ee.container,children:[Ze(f,{style:Ee.section,children:[Se(p,{style:Ee.sectionLabel,children:"Actions"}),Ze(f,{style:Ee.buttonsRow,children:[Se(ne,{disabled:a,onClick:()=>Jt({query:e}),variant:"refetch",text:"Refetch"}),Se(ne,{disabled:o==="pending",onClick:()=>Zr({query:e,queryClient:r}),variant:"invalidate",text:"Invalidate"}),Se(ne,{disabled:o==="pending",onClick:()=>Yr({queryClient:r,query:e}),variant:"reset",text:"Reset"}),Se(ne,{disabled:a,onClick:()=>{Xr({queryClient:r,query:e}),t(void 0)},variant:"remove",text:"Remove"})]})]}),Ze(f,{style:Ee.section,children:[Se(p,{style:Ee.sectionLabel,children:"Triggers"}),Ze(f,{style:Ee.buttonsRow,children:[Se(ne,{disabled:false,onClick:()=>_t({query:e}),variant:"triggerLoading",text:e.state.fetchStatus==="fetching"?"Restore Loading":"Trigger Loading"}),Se(ne,{disabled:o==="pending",onClick:()=>Gt({query:e,queryClient:r}),variant:"triggerError",text:o==="error"?"Restore Error":"Trigger Error"})]})]})]})}var Ee=M.create({container:{gap:16},section:{gap:8},sectionLabel:{fontSize:11,fontWeight:"600",color:Li.color.textTertiary,textTransform:"uppercase",letterSpacing:.5},buttonsRow:{flexDirection:"row",flexWrap:"wrap",gap:8}});import{night as Yt}from"@buoy-gg/shared-ui/web";import{jsx as ie,jsxs as Xt}from"react/jsx-runtime";function Bi({selectedQuery:e,setSelectedQuery:t}){return Xt(me,{"sentry-label":"ignore devtools query info scroll",style:se.flexOne,contentContainerStyle:se.scrollContent,children:[ie(f,{style:se.section,children:ie(Nt,{query:e})}),ie(f,{style:se.section,children:ie(eo,{query:e,setSelectedQuery:t})}),Xt(f,{style:se.section,children:[ie(p,{style:se.headerText,children:"Data Explorer"}),ie(f,{style:se.contentView,children:ie(ce,{editable:true,label:"Data",value:e?.state.data,defaultExpanded:["Data"],activeQuery:e})})]}),Xt(f,{style:se.section,children:[ie(p,{style:se.headerText,children:"Query Explorer"}),ie(f,{style:se.contentView,children:ie(ce,{label:"Query",value:e,defaultExpanded:["Query","queryKey"],activeQuery:e})})]})]})}var se=M.create({flexOne:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingBottom:16,paddingHorizontal:8},section:{marginBottom:16},headerText:{fontSize:16,fontWeight:"600",color:Yt.color.text,marginBottom:8,textAlign:"left"},contentView:{backgroundColor:Yt.color.surface,borderRadius:12,borderWidth:1,borderColor:Yt.color.border,padding:16}});import{buoyColors as E,night as ee}from"@buoy-gg/shared-ui/web";import{jsx as Zt,jsxs as Hi}from"react/jsx-runtime";var Wi=({label:e,color:t,count:r,showLabel:o=true,isActive:a=false,onPress:n,onTouchStart:s,size:i="default",testID:l})=>{let u=i==="large",c=(d=>{let h={green:{bg:E.success+"15",border:E.success+"40",dot:E.success,text:E.success},yellow:{bg:E.warning+"15",border:E.warning+"40",dot:E.warning,text:E.warning},blue:{bg:E.primary+"15",border:E.primary+"40",dot:E.primary,text:E.primary},purple:{bg:ee.color.fillSecondary,border:ee.color.fillTertiary,dot:ee.color.textTertiary,text:ee.color.textTertiary},red:{bg:E.error+"15",border:E.error+"40",dot:E.error,text:E.error},gray:{bg:ee.color.fillSecondary,border:ee.color.fillTertiary,dot:ee.color.textTertiary,text:ee.color.textTertiary}};return h[d]||h.gray})(t);return Hi(V,{"sentry-label":"ignore devtools query status",testID:l,accessibilityRole:"button",accessibilityLabel:`${e}, ${r}${a?", selected":""}`,accessibilityState:{selected:a},style:[Ce.queryStatusTag,u&&Ce.queryStatusTagLarge,a&&{backgroundColor:c.bg,borderColor:c.border}],disabled:!n,onPress:n,onPressIn:s,activeOpacity:.7,children:[Zt(f,{style:[Ce.dot,u&&Ce.dotLarge,{backgroundColor:c.dot}]}),o&&Zt(p,{style:[Ce.label,u&&Ce.labelLarge,a&&{color:c.text}],numberOfLines:1,ellipsizeMode:"tail",children:e}),r>0&&Zt(p,{testID:l?`${l}-count`:void 0,style:[Ce.count,u&&Ce.countLarge,{color:c.dot}],numberOfLines:1,children:r})]})},Ce=M.create({queryStatusTag:{flexDirection:"row",alignItems:"center",backgroundColor:ee.color.buttonSurface,borderRadius:13,paddingHorizontal:10,paddingVertical:5,height:26,gap:6,borderWidth:1,borderColor:ee.color.border},queryStatusTagLarge:{borderRadius:16,paddingHorizontal:13,paddingVertical:6,height:32,gap:7},dot:{width:6,height:6,borderRadius:3},dotLarge:{width:8,height:8,borderRadius:4},label:{fontSize:11,fontWeight:"500",color:ee.color.textSecondary,fontFamily:"system"},labelLarge:{fontSize:13,fontWeight:"600",letterSpacing:.2,fontFamily:'"SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},count:{fontSize:11,fontVariant:["tabular-nums"],fontWeight:"600",marginLeft:"auto",fontFamily:"system"},countLarge:{fontSize:13,fontWeight:"700",fontFamily:'"SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'}}),te=Wi;import{ChipStrip as ji,useChipTap as Vi}from"@buoy-gg/shared-ui/web";import{useEffect as to,useState as ro}from"react";import{useQueryClient as oo}from"@tanstack/react-query";function $i(){let e=oo(),[t,r]=ro({fresh:0,stale:0,fetching:0,paused:0,inactive:0,error:0,disabled:0});return to(()=>{let o=()=>{let n=e.getQueryCache().getAll().reduce((s,i)=>{let l=oe(i);return s[l]=(s[l]||0)+1,s},{fresh:0,stale:0,fetching:0,paused:0,inactive:0,error:0,disabled:0});setTimeout(()=>r(n),0)};o();let a=e.getQueryCache().subscribe(o);return()=>a()},[e]),t}var ao=$i;function Ni(){let e=oo(),[t,r]=ro({pending:0,success:0,error:0,paused:0,idle:0});return to(()=>{let o=()=>{let n=e.getMutationCache().getAll().reduce((s,i)=>{let l=i.state.status;if(i.state.isPaused)s.paused++;else switch(l){case"idle":s.idle++;break;case"pending":s.pending++;break;case"success":s.success++;break;case"error":s.error++;break}return s},{pending:0,success:0,error:0,paused:0,idle:0});setTimeout(()=>r(n),0)};o();let a=e.getMutationCache().subscribe(o);return()=>a()},[e]),t}import{jsx as et,jsxs as Ui}from"react/jsx-runtime";var _i=({activeFilter:e,onFilterChange:t,size:r="default"})=>{let{fresh:o,stale:a,fetching:n,paused:s,inactive:i}=ao(),{scrollProps:l,onTouchStart:u,isTap:c}=Vi(),d=(h,g)=>{c(g)&&t&&t(e===h?null:h)};return Ui(ji,{scrollProps:l,sentryLabel:"ignore devtools query status count scroll",children:[et(te,{label:"Fresh",color:"green",count:o,isActive:e==="fresh",onPress:h=>d("fresh",h),onTouchStart:u,testID:"buoy-rq-status-fresh",showLabel:true,size:r}),et(te,{label:"Loading",color:"blue",count:n,isActive:e==="fetching",onPress:h=>d("fetching",h),onTouchStart:u,testID:"buoy-rq-status-fetching",showLabel:true,size:r}),et(te,{label:"Paused",color:"purple",count:s,isActive:e==="paused",onPress:h=>d("paused",h),onTouchStart:u,testID:"buoy-rq-status-paused",showLabel:true,size:r}),et(te,{label:"Stale",color:"yellow",count:a,isActive:e==="stale",onPress:h=>d("stale",h),onTouchStart:u,testID:"buoy-rq-status-stale",showLabel:true,size:r}),et(te,{label:"Idle",color:"gray",count:i,isActive:e==="inactive",onPress:h=>d("inactive",h),onTouchStart:u,testID:"buoy-rq-status-inactive",showLabel:true,size:r})]})},no=_i;import{useState as Ji,useRef as er,useMemo as Gi,useCallback as Yi}from"react";import{QueryIcon as Xi,CheckCircle as Zi,Activity as es,Pause as ts,XCircle as rs,buoyColors as vt}from"@buoy-gg/shared-ui/web";import{jsx as tt}from"react/jsx-runtime";function os({size:e=24}){return tt(Xi,{size:e})}function as({size:e=14,color:t=vt.success,strokeWidth:r=2}){return tt(Zi,{size:e,color:t,strokeWidth:r})}function ns({size:e=14,color:t=vt.warning,strokeWidth:r=2}){return tt(es,{size:e,color:t,strokeWidth:r})}function is({size:e=14,color:t=vt.textMuted,strokeWidth:r=2}){return tt(ts,{size:e,color:t,strokeWidth:r})}function ss({size:e=14,color:t=vt.error,strokeWidth:r=2}){return tt(rs,{size:e,color:t,strokeWidth:r})}import{buoyColors as rt,night as Fe,useRelativeTime as ls,monoFont as io}from"@buoy-gg/shared-ui/web";import{jsx as re,jsxs as St}from"react/jsx-runtime";var us=e=>e.options.mutationKey&&(Array.isArray(e.options.mutationKey)?e.options.mutationKey:[e.options.mutationKey]).filter(t=>t!=null).map(t=>String(t)).join(" \u203A ")||"Anonymous Mutation";function so({mutation:e,setSelectedMutation:t,selected:r}){let o=new Date(e.state.submittedAt).toLocaleTimeString(),a=(()=>{if(e.state.submittedAt&&e.state.submittedAt>0)return e.state.submittedAt;let u=e.state;return u.updatedAt&&u.updatedAt>0?u.updatedAt:null})(),n=ls(a)||`N/A (${e.state.submittedAt||0})`,s=(()=>{if(e.state.isPaused)return{status:"Paused",color:rt.textMuted,icon:re(is,{})};switch(e.state.status){case"success":return{status:"Success",color:rt.success,icon:re(as,{})};case"error":return{status:"Error",color:rt.error,icon:re(ss,{})};case"pending":return{status:"Loading",color:rt.primary,icon:re(ns,{})};default:return{status:"Idle",color:rt.textMuted,icon:null}}})(),i=us(e),l=ii(e.options.mutationKey,e.mutationId);return St(V,{"sentry-label":"ignore devtools mutation button",testID:l,accessibilityRole:"button",accessibilityLabel:`${i}, ${s.status}`,onPress:()=>t(e===r?void 0:e),style:[N.button,r?.mutationId===e.mutationId&&N.selected],children:[St(f,{style:N.rowContent,children:[St(f,{style:N.statusSection,children:[re(f,{style:[N.statusDot,{backgroundColor:s.color}]}),St(f,{style:N.statusInfo,children:[re(p,{testID:`${l}-status`,style:[N.statusLabel,{color:s.color}],children:s.status}),re(p,{style:N.submittedText,children:o})]})]}),re(f,{style:N.mutationSection,children:re(p,{testID:`${l}-key`,style:N.mutationKey,children:i})})]}),re(f,{style:N.bottomRightContainer,children:re(p,{style:N.bottomRightText,children:n})})]})}var N=M.create({button:{backgroundColor:Fe.color.surface,borderRadius:8,borderWidth:1,borderColor:Fe.color.border,marginHorizontal:8,marginVertical:3,padding:12},selected:{backgroundColor:Fe.color.accentSoft,borderColor:Fe.color.accentBorderStrong},rowContent:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},statusSection:{flexDirection:"row",alignItems:"center",gap:8,flex:1},statusDot:{width:8,height:8,borderRadius:4},statusInfo:{flex:1},statusLabel:{fontSize:11,fontWeight:"600",lineHeight:14},submittedText:{fontSize:10,color:Fe.color.textTertiary,marginTop:1},mutationSection:{flex:2,paddingHorizontal:12},mutationKey:{fontFamily:io,fontSize:12,color:Fe.color.text,lineHeight:16},bottomRightContainer:{position:"absolute",bottom:4,right:8},bottomRightText:{fontSize:9,color:Fe.color.textTertiary,fontFamily:io}});import{displayValue as cs,night as U,monoFont as Ct}from"@buoy-gg/shared-ui/web";import{buoyColors as _,monoFont as ds}from"@buoy-gg/shared-ui/web";import{jsx as lo}from"react/jsx-runtime";var ys={success:_.success+"15",error:_.error+"15",pending:_.primary+"15",idle:_.textMuted+"1A"},hs={success:_.success+"33",error:_.error+"33",pending:_.primary+"33",idle:_.textMuted+"33"},fs={success:_.success,error:_.error,pending:_.primary,idle:_.textMuted};function uo({status:e,testID:t}){let r=e,o=ys[r],a=hs[r],n=fs[r];return lo(f,{style:[co.container,{backgroundColor:o,borderColor:a}],children:lo(p,{testID:t,style:[co.text,{color:n}],children:e})})}var co=M.create({container:{paddingHorizontal:8,paddingVertical:4,borderWidth:1,borderRadius:6,alignSelf:"flex-start"},text:{fontSize:11,fontWeight:"600",textTransform:"uppercase",letterSpacing:.5,fontFamily:ds}});import{jsx as We,jsxs as tr}from"react/jsx-runtime";function rr({selectedMutation:e}){if(e===void 0)return null;let t=new Date(e.state.submittedAt).toLocaleTimeString();return tr(f,{style:xe.minWidth,children:[We(p,{style:xe.headerText,children:"Mutation Details"}),tr(f,{style:xe.row,children:[We(me,{"sentry-label":"ignore devtools mutation details scroll",horizontal:true,style:xe.flex1,children:We(p,{testID:"buoy-rq-mutation-detail-key",style:xe.flexWrap,children:`${e.options.mutationKey?cs(e.options.mutationKey,true):"No mutationKey found"}`})}),We(uo,{status:e.state.status,testID:"buoy-rq-mutation-detail-status"})]}),tr(f,{style:xe.row,children:[We(p,{style:xe.labelText,children:"Submitted At:"}),We(p,{style:xe.valueText,children:t})]})]})}var xe=M.create({minWidth:{minWidth:200,backgroundColor:U.color.surface,borderRadius:6,borderWidth:1,borderColor:U.color.accent+"4D",overflow:"hidden",shadowColor:U.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},headerText:{backgroundColor:U.color.accent+"15",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:U.color.accent,borderBottomWidth:1,borderBottomColor:U.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:Ct},row:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingHorizontal:12,paddingVertical:10,borderBottomWidth:1,borderBottomColor:U.color.separator},flex1:{flex:1,marginRight:8},flexWrap:{fontSize:12,color:U.color.text,fontFamily:Ct,lineHeight:18,flexShrink:1,backgroundColor:U.color.accent+"15",paddingHorizontal:8,paddingVertical:4,borderRadius:4,borderWidth:1,borderColor:U.color.accent+"4D"},labelText:{fontSize:10,color:U.color.textSecondary,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase",fontFamily:Ct},valueText:{fontSize:12,color:U.color.text,fontWeight:"500",fontVariant:["tabular-nums"],fontFamily:Ct}});import{night as ot,monoFont as ms}from"@buoy-gg/shared-ui/web";import{jsx as B,jsxs as at}from"react/jsx-runtime";function yo({selectedMutation:e}){return at(me,{"sentry-label":"ignore devtools mutation information scroll",style:P.flex1,contentContainerStyle:P.scrollContent,children:[B(f,{style:P.section,children:B(rr,{selectedMutation:e})}),at(f,{style:P.section,children:[B(p,{style:P.textHeader,children:"Variables Details"}),B(f,{style:P.padding,children:B(ce,{label:"Variables",value:e?.state.variables,defaultExpanded:["Variables"]})})]}),at(f,{style:P.section,children:[B(p,{style:P.textHeader,children:"Context Details"}),B(f,{style:P.padding,children:B(ce,{label:"Context",value:e?.state.context,defaultExpanded:["Context"]})})]}),at(f,{style:P.section,children:[B(p,{style:P.textHeader,children:"Data Explorer"}),B(f,{style:P.padding,children:B(ce,{label:"Data",defaultExpanded:["Data"],value:e?.state.data})})]}),at(f,{style:P.section,children:[B(p,{style:P.textHeader,children:"Mutations Explorer"}),B(f,{style:P.padding,children:B(ce,{label:"Mutation",defaultExpanded:["Mutation"],value:e})})]})]})}var P=M.create({flex1:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingBottom:16,paddingHorizontal:8},section:{marginBottom:16},textHeader:{textAlign:"left",backgroundColor:ot.color.accent+"15",padding:12,fontSize:12,fontWeight:"700",color:ot.color.accent,borderTopLeftRadius:8,borderTopRightRadius:8,borderBottomWidth:1,borderBottomColor:ot.color.accent+"33",fontFamily:ms,letterSpacing:1,textTransform:"uppercase"},padding:{padding:12,backgroundColor:ot.color.surface,borderBottomLeftRadius:8,borderBottomRightRadius:8,borderWidth:1,borderColor:ot.color.border,borderTopWidth:0}});import{useCallback as ho,useEffect as gs,useRef as fo,useState as ps}from"react";import{useQueryClient as bs}from"@tanstack/react-query";function vs(){let e=bs(),[t,r]=ps(()=>e.getMutationCache().getAll()),o=fo(new Map),a=fo(void 0),n=ho(i=>{let l=o.current;if(i.length!==l.size)return true;for(let u of i){let c=l.get(u.mutationId);if(!c||c.status!==u.state.status||c.submittedAt!==u.state.submittedAt||c.isPaused!==u.state.isPaused)return true}return false},[]),s=ho(()=>{let i=e.getMutationCache().getAll();if(n(i)){let l=new Map;i.forEach(u=>{l.set(u.mutationId,u.state)}),o.current=l,r(i)}},[e,n]);return gs(()=>{s();let i=e.getMutationCache().subscribe(l=>{(l.type==="added"||l.type==="removed"||l.type==="updated")&&(a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{s()},10))});return()=>{i(),a.current&&clearTimeout(a.current)}},[e,s]),{mutations:t}}var mo=vs;import{night as Pe,ToolEmptyState as Ss,monoFont as Cs}from"@buoy-gg/shared-ui/web";import{jsx as we,jsxs as go}from"react/jsx-runtime";function po({selectedMutation:e,setSelectedMutation:t,activeFilter:r,hideInfoPanel:o=false,contentContainerStyle:a,searchText:n=""}){let{mutations:s}=mo(),i=b=>b.state.isPaused?"paused":b.state.status,l=Gi(()=>{let b=s;if(r&&(b=b.filter(x=>i(x)===r)),n){let x=n.toLowerCase();b=b.filter(S=>{let w=S.options.mutationKey;return w?(Array.isArray(w)?w:[w]).filter(A=>A!=null).map(A=>String(A)).join(" ").toLowerCase().includes(x):false})}return b},[s,r,n]),u=Tr.get("window").height,c=u*.4,d=150,h=u*.7,g=er(new X.Value(c)).current,[,y]=Ji(c),m=er(c),C=er(Ht.create({onMoveShouldSetPanResponder:(b,x)=>Math.abs(x.dy)>Math.abs(x.dx)&&Math.abs(x.dy)>10,onPanResponderGrant:()=>{g.stopAnimation(b=>{y(b),m.current=b,g.setValue(b)})},onPanResponderMove:(b,x)=>{let S=m.current-x.dy,w=Math.max(d,Math.min(h,S));g.setValue(w)},onPanResponderRelease:(b,x)=>{let S=Math.max(d,Math.min(h,m.current-x.dy));y(S),m.current=S,X.timing(g,{toValue:S,duration:200,useNativeDriver:false}).start(()=>{g.setValue(S),y(S),m.current=S})}})).current,v=Yi(({item:b})=>we(so,{selected:e,setSelectedMutation:t,mutation:b}),[e,t]);return go(f,{style:Oe.container,children:[l.length>0?we(f,{style:Oe.listWrapper,children:we(Wt,{"sentry-label":"ignore devtools mutations list",testID:"buoy-rq-mutation-list",data:l,renderItem:v,keyExtractor:(b,x)=>`${b.mutationId}-${b.state.submittedAt}-${b.state.status}-${x}`,inverted:true,showsVerticalScrollIndicator:true,removeClippedSubviews:!(typeof process<"u"&&process.env?.EXPO_PUBLIC_E2E),contentContainerStyle:a||Oe.listContent,initialNumToRender:10,maxToRenderPerBatch:10,windowSize:10,scrollEnabled:false})}):we(Ss,{testID:"buoy-rq-mutations-empty",otto:r?"filtering":"scanning",title:"No mutations found",message:r?`No ${r} mutations. Pick another status to see the rest.`:"Mutations run through useMutation will appear here."}),e&&!o&&go(X.View,{style:[Oe.mutationInfo,{height:g}],children:[we(f,{style:Oe.dragHandle,...C.panHandlers,children:we(f,{style:Oe.dragIndicator})}),we(f,{style:Oe.mutationInfoContent,children:we(yo,{selectedMutation:e})})]})]})}var Oe=M.create({container:{flex:1,backgroundColor:"transparent"},listWrapper:{flex:1},listContent:{backgroundColor:"transparent",paddingHorizontal:8,paddingTop:8},mutationInfo:{borderTopWidth:1,borderTopColor:Pe.color.border,backgroundColor:"transparent"},dragHandle:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:Pe.color.surface,borderBottomWidth:1,borderBottomColor:Pe.color.border},dragIndicator:{width:40,height:4,backgroundColor:Pe.color.placeholder,borderRadius:2},mutationInfoContent:{flex:1,backgroundColor:"transparent"},emptyContainer:{flex:1,justifyContent:"center",alignItems:"center",padding:32,backgroundColor:Pe.color.surface,margin:16,borderRadius:8,borderWidth:1,borderColor:Pe.color.border},emptyText:{color:Pe.color.textTertiary,fontSize:14,textAlign:"center",fontFamily:Cs,letterSpacing:.5}});import{ChipStrip as xs,useChipTap as ws}from"@buoy-gg/shared-ui/web";import{jsx as xt,jsxs as qs}from"react/jsx-runtime";var Ts=({activeFilter:e,onFilterChange:t,size:r="default"})=>{let{pending:o,success:a,error:n,paused:s}=Ni(),{scrollProps:i,onTouchStart:l,isTap:u}=ws(),c=(d,h)=>{u(h)&&t&&t(e===d?null:d)};return qs(xs,{scrollProps:i,sentryLabel:"ignore devtools mutation status count scroll",children:[xt(te,{label:"Pending",color:"blue",count:o,isActive:e==="pending",onPress:d=>c("pending",d),onTouchStart:l,testID:"buoy-rq-mstatus-pending",showLabel:true,size:r}),xt(te,{label:"Success",color:"green",count:a,isActive:e==="success",onPress:d=>c("success",d),onTouchStart:l,testID:"buoy-rq-mstatus-success",showLabel:true,size:r}),xt(te,{label:"Error",color:"red",count:n,isActive:e==="error",onPress:d=>c("error",d),onTouchStart:l,testID:"buoy-rq-mstatus-error",showLabel:true,size:r}),xt(te,{label:"Paused",color:"purple",count:s,isActive:e==="paused",onPress:d=>c("paused",d),onTouchStart:l,testID:"buoy-rq-mstatus-paused",showLabel:true,size:r})]})},bo=Ts;import{Trash as Ms,night as je}from"@buoy-gg/shared-ui/web";import{jsx as vo}from"react/jsx-runtime";var As=({type:e,onClear:t,disabled:r=false})=>vo(V,{"sentry-label":"ignore devtools clear cache button",style:[So.button,r&&So.disabledButton],onPress:t,disabled:r,activeOpacity:.7,accessibilityLabel:`Clear ${e} cache`,accessibilityRole:"button",accessibilityState:{disabled:r},children:vo(Ms,{size:16,strokeWidth:2,color:r?je.color.textTertiary:je.color.warning})}),So=M.create({button:{width:32,height:32,borderRadius:6,backgroundColor:je.color.warningSoft,justifyContent:"center",alignItems:"center",borderWidth:1,borderColor:je.color.warning+"33"},disabledButton:{opacity:.5,backgroundColor:je.color.fill,borderColor:je.color.border}}),Ds=As;import{Wifi as Co,buoyColors as xo}from"@buoy-gg/shared-ui/web";import{jsx as or}from"react/jsx-runtime";var Qs=({isOffline:e,onToggle:t})=>or(V,{"sentry-label":"ignore devtools network toggle button",style:[wo.button,e&&wo.offlineButton],onPress:t,activeOpacity:.7,accessibilityLabel:e?"Unset offline mocking behavior":"Mock offline behavior",accessibilityRole:"button",accessibilityState:{selected:e},children:e?or(Co,{size:16,color:xo.error,strokeWidth:2}):or(Co,{size:16,color:xo.success,strokeWidth:2})}),wo=M.create({button:{width:32,height:32,borderRadius:6,backgroundColor:"rgba(16, 185, 129, 0.1)",justifyContent:"center",alignItems:"center",borderWidth:1,borderColor:"rgba(16, 185, 129, 0.2)"},offlineButton:{backgroundColor:"rgba(239, 68, 68, 0.1)",borderColor:"rgba(239, 68, 68, 0.2)"}}),Rs=Qs;import{ChipStrip as Is,useChipTap as ks}from"@buoy-gg/shared-ui/web";import{jsx as qo}from"react/jsx-runtime";var To=["mmkv","async","secure"],Es=({activeStorageTypes:e=new Set(To),onStorageTypesChange:t,counts:r})=>{let{scrollProps:o,onTouchStart:a,isTap:n}=ks(),s=(i,l)=>{if(n(l)&&t){let u=new Set(e);u.has(i)?u.delete(i):u.add(i),t(u)}};return qo(Is,{scrollProps:o,sentryLabel:"ignore devtools storage status count scroll",children:To.map(i=>{let l=r?.[i]??0;return qo(te,{label:Hr(i),color:Wr(i),count:l,isActive:e.has(i),onPress:u=>s(i,u),onTouchStart:a,showLabel:true},i)})})},Fs=Es;import{night as Ps,monoFont as Os}from"@buoy-gg/shared-ui/web";import{jsx as Mo,jsxs as zs}from"react/jsx-runtime";function Ks({totalCount:e,filteredCount:t,onPress:r}){if(t===e)return null;let o=Mo(f,{style:Ao.container,children:zs(p,{testID:"buoy-rq-filter-badge",style:Ao.text,children:["Showing ",t," of ",e]})});return r?Mo(V,{testID:"buoy-rq-filter-badge-button",accessibilityRole:"button",accessibilityLabel:`Showing ${t} of ${e}, open filters`,onPress:r,activeOpacity:.7,children:o}):o}var Ao=M.create({container:{flexDirection:"row",alignItems:"center",justifyContent:"center",paddingVertical:2},text:{fontSize:9,color:Ps.color.textTertiary,fontFamily:Os}});import{jsx as Do,jsxs as Ls}from"react/jsx-runtime";function Qo({selectedQuery:e,onQuerySelect:t,activeFilter:r,searchText:o="",ignoredPatterns:a=new Set,includedPatterns:n=new Set,onFilterPress:s}){let i=n.size>0,l=a.size>0,u=gt(),c=ri(()=>{let d=u;return n.size>0&&(d=d.filter(h=>{if(!h?.queryKey)return false;let g=(Array.isArray(h.queryKey)?h.queryKey:[h.queryKey]).filter(y=>y!=null).map(y=>String(y)).join(" ").toLowerCase();return Array.from(n).some(y=>g.includes(y.toLowerCase()))})),a.size>0&&(d=d.filter(h=>{if(!h?.queryKey)return true;let g=(Array.isArray(h.queryKey)?h.queryKey:[h.queryKey]).filter(y=>y!=null).map(y=>String(y)).join(" ").toLowerCase();return!Array.from(a).some(y=>g.includes(y.toLowerCase()))})),d.length},[u,n,a]);return Ls(f,{style:Ro.queryListContainer,children:[(i||l)&&Do(Ks,{totalCount:u.length,filteredCount:c,onPress:s}),Do($r,{selectedQuery:e,onQuerySelect:t,activeFilter:r,searchText:o,ignoredPatterns:a,includedPatterns:n,emptyState:ti({subject:"queries",verb:"active",search:o,total:u.length,blocked:r?`No ${r} queries. Pick another status to see the rest.`:i?`No queries match your "include only" filters. ${n.size} pattern(s) active.`:l?`No queries match the current filters. ${a.size} pattern(s) excluded.`:void 0,waiting:{otto:"scanning",title:"No queries found",message:`No React Query queries are currently active.
1
+ "use client";var vr=Object.defineProperty;var _o=Object.getOwnPropertyDescriptor;var Jo=Object.getOwnPropertyNames;var Go=Object.prototype.hasOwnProperty;var Yo=(e,t)=>{for(var r in t)vr(e,r,{get:t[r],enumerable:true})},Sr=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Jo(t))!Go.call(e,o)&&o!==r&&vr(e,o,{get:()=>t[o],enumerable:!(a=_o(t,o))||a.enumerable});return e},Xo=(e,t,r)=>(Sr(e,t,"default"),r&&Sr(r,t,"default"));typeof window<"u"&&typeof globalThis.global>"u"&&(globalThis.global=globalThis);import"@tanstack/react-query";import{QueryIcon as Cr}from"@buoy-gg/floating-tools-core/web";import{Wifi as xr}from"@buoy-gg/shared-ui/web";import{useCallback as Fe,useState as Ze,useEffect as Zo}from"react";import{useQueryClient as en}from"@tanstack/react-query";import{TickProvider as tn}from"@buoy-gg/shared-ui/web";import{useQueryClient as rn}from"@tanstack/react-query";import{JsModal as an,useSafeAreaInsets as on,ModalHeader as Lt,TabSelector as nn}from"@buoy-gg/shared-ui/web";import{useEffect as sn,useState as ln,useRef as un}from"react";import{useQueryClient as cn}from"@tanstack/react-query";function wr(e){let{query:t}=Bt(e);return t}function Bt(e){let t=cn(),[r,a]=ln({query:void 0,version:0}),o=un(void 0);return sn(()=>{if(!e){a({query:void 0,version:0}),o.current=void 0;return}let n=t.getQueryCache().find({queryKey:e,exact:true});a({query:n,version:0});let i=JSON.stringify(e);o.current=i;let l=t.getQueryCache().subscribe(s=>{(s.type==="updated"||s.type==="added"||s.type==="removed")&&"query"in s&&s.query&&JSON.stringify(s.query.queryKey)===o.current&&(s.type==="removed"?a({query:void 0,version:0}):a(u=>({query:s.query,version:u.version+1})))});return()=>l()},[t,e]),r}import{ModalHeader as Pe,TabSelector as qr,Search as dn,Filter as yn,Trash as hn,night as je}from"@buoy-gg/shared-ui/web";import{useState as fn,useRef as Mr,useEffect as mn}from"react";var Tr={};Yo(Tr,{AccessibilityInfo:()=>vn,ActivityIndicator:()=>li,Alert:()=>di,Animated:()=>Z,AppRegistry:()=>Cn,AppState:()=>xn,Appearance:()=>Sn,BackHandler:()=>wn,Button:()=>ui,CheckBox:()=>On,Clipboard:()=>qn,DeviceEventEmitter:()=>Xn,Dimensions:()=>Ar,Easing:()=>Mn,FlatList:()=>Wt,I18nManager:()=>Tn,Image:()=>Kn,ImageBackground:()=>Ln,InteractionManager:()=>Dn,Keyboard:()=>An,KeyboardAvoidingView:()=>Bn,LayoutAnimation:()=>Rn,Linking:()=>Qn,LogBox:()=>Yn,Modal:()=>Rr,NativeEventEmitter:()=>In,NativeModules:()=>bn,PanResponder:()=>Ht,Picker:()=>Hn,PixelRatio:()=>kn,Platform:()=>En,Pressable:()=>Dr,ProgressBar:()=>Wn,RefreshControl:()=>jn,SafeAreaView:()=>Vn,ScrollView:()=>be,SectionList:()=>$n,Share:()=>Fn,StatusBar:()=>Nn,StyleSheet:()=>T,Switch:()=>si,Text:()=>v,TextInput:()=>oi,Touchable:()=>Un,TouchableHighlight:()=>ni,TouchableNativeFeedback:()=>_n,TouchableOpacity:()=>N,TouchableWithoutFeedback:()=>ii,UIManager:()=>Pn,Vibration:()=>zn,View:()=>h,VirtualizedList:()=>Jn,YellowBox:()=>Gn,findNodeHandle:()=>ci,unstable_createElement:()=>pn,useColorScheme:()=>Zn,useLocaleContext:()=>ei,useWindowDimensions:()=>ti});Xo(Tr,gn);import*as gn from"react-native-web";import{unstable_createElement as pn,NativeModules as bn,AccessibilityInfo as vn,Animated as Z,Appearance as Sn,AppRegistry as Cn,AppState as xn,BackHandler as wn,Clipboard as qn,Dimensions as Ar,Easing as Mn,I18nManager as Tn,Keyboard as An,InteractionManager as Dn,LayoutAnimation as Rn,Linking as Qn,NativeEventEmitter as In,PanResponder as Ht,PixelRatio as kn,Platform as En,Share as Fn,StyleSheet as T,UIManager as Pn,Vibration as zn,CheckBox as On,FlatList as Wt,Image as Kn,ImageBackground as Ln,KeyboardAvoidingView as Bn,Picker as Hn,ProgressBar as Wn,RefreshControl as jn,SafeAreaView as Vn,SectionList as $n,StatusBar as Nn,Touchable as Un,TouchableNativeFeedback as _n,VirtualizedList as Jn,YellowBox as Gn,LogBox as Yn,DeviceEventEmitter as Xn,useColorScheme as Zn,useLocaleContext as ei,useWindowDimensions as ti}from"react-native-web";import*as V from"react-native-web";import{createElement as ri,forwardRef as ai}from"react";function $(e){let t=ai((a,o)=>{let{accessibilityState:n,accessibilityValue:i,...l}=a;for(let s of["busy","checked","disabled","expanded","selected"])n?.[s]!==void 0&&l[`aria-${s}`]===void 0&&(l[`aria-${s}`]=n[s]);for(let[s,u]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))i?.[s]!==void 0&&l[`aria-${u}`]===void 0&&(l[`aria-${u}`]=i[s]);return ri(e,{...l,ref:o})}),r=e.State;return r&&Object.assign(t,{State:r}),t.displayName=e.displayName??e.name??"NativeWebView",t}var h=$(V.View),v=$(V.Text),oi=$(V.TextInput),N=$(V.TouchableOpacity),ni=$(V.TouchableHighlight),ii=$(V.TouchableWithoutFeedback),Dr=$(V.Pressable),be=$(V.ScrollView),Rr=$(V.Modal),si=$(V.Switch),li=$(V.ActivityIndicator),ui=$(V.Button),ci=V.findNodeHandle,di={alert(e,t,r,a){if(typeof document>"u")return;let o=document.createElement("dialog");o.dataset.buoyRoot="",o.setAttribute("aria-label",e),o.style.cssText="position:fixed;inset:0;margin:auto;width:min(440px,90vw);padding:24px;border:1px solid #475569;border-radius:14px;background:#17212e;color:#f1f5f9;font:14px system-ui;box-shadow:0 20px 80px #0008;z-index:2147483647";let n=document.createElement("h2");if(n.textContent=e,n.style.cssText="font-size:18px;margin:0 0 12px",o.appendChild(n),t){let u=document.createElement("p");u.textContent=t,u.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",o.appendChild(u)}let i=document.createElement("div");i.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let l=r?.length?r:[{text:"OK"}],s=()=>{o.close?.(),o.remove()};for(let u of l){let c=document.createElement("button");c.type="button",c.textContent=u.text??"OK",c.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${u.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,c.onclick=()=>{s(),u.onPress?.()},i.appendChild(c)}o.addEventListener("cancel",u=>{u.preventDefault(),a?.cancelable!==false&&(s(),a?.onDismiss?.())}),o.appendChild(i),document.body.appendChild(o),o.showModal?o.showModal():o.setAttribute("open","")}};import{Wifi as Qr}from"@buoy-gg/shared-ui/web";import{useEffect as Ir,useState as yi,useRef as hi}from"react";import{onlineManager as mt}from"@tanstack/react-query";import{devToolsStorageKeys as kr,persistentStorage as Er}from"@buoy-gg/shared-ui/web";function Fr(){let[e,t]=yi(()=>mt.isOnline()),r=hi(false);Ir(()=>{if(r.current)return;(async()=>{try{let n=await Er.getItem(kr.settings.wifiEnabled());if(n!==null){let i=n==="true";t(i),mt.setOnline(i)}r.current=true}catch{}})()},[]);let a=async n=>{try{await Er.setItem(kr.settings.wifiEnabled(),n.toString())}catch{}},o=()=>{let n=!e;t(n),mt.setOnline(n),a(n)};return Ir(()=>mt.subscribe(n=>{t(n),r.current&&a(n)}),[]),{isOnline:e,handleWifiToggle:o}}import{jsx as jt}from"react/jsx-runtime";function Pr({size:e=16,testID:t}){let{isOnline:r,handleWifiToggle:a}=Fr();return jt(N,{"sentry-label":`ignore toggle WiFi ${r?"On":"Off"}`,testID:t,accessibilityRole:"button",accessibilityLabel:`WiFi ${r?"On":"Off"}`,accessibilityHint:`Tap to turn WiFi ${r?"off":"on"} for React Query`,onPress:a,hitSlop:{top:10,bottom:10,left:10,right:10},activeOpacity:.7,style:{alignItems:"center",justifyContent:"center",width:14,flexShrink:0},children:r?jt(Qr,{size:e,color:"#10B981"}):jt(Qr,{size:e,color:"#DC2626"})})}import{jsx as B,jsxs as gt}from"react/jsx-runtime";function et({selectedQuery:e,selectedMutation:t,activeTab:r,onTabChange:a,onBack:o,searchText:n="",onSearchChange:i,onFilterPress:l,hasActiveFilters:s=false,onClearCache:u,showWifiToggle:c=false}){let[d,f]=fn(false),b=Mr(false),y=Mr(null);mn(()=>{d&&y.current&&y.current.focus()},[d]);let m=()=>{f(!d),d&&i&&i("")},p=C=>{i&&i(C)},g=C=>C?.queryKey&&(Array.isArray(C.queryKey)?C.queryKey:[C.queryKey]).filter(q=>q!=null).map(q=>String(q)).join(" \u203A ")||"Unknown Query",S=C=>"queryKey"in C?g(C):C.options.mutationKey?(Array.isArray(C.options.mutationKey)?C.options.mutationKey:[C.options.mutationKey]).filter(q=>q!=null).map(q=>String(q)).join(" \u203A ")||`Mutation #${C.mutationId}`:`Mutation #${C.mutationId}`,w=[{key:"queries",label:"Queries"},{key:"mutations",label:"Mutations"}];return e||t?gt(Pe,{children:[B(Pe.Navigation,{onBack:o}),B(Pe.Content,{title:S(e??t),testID:"buoy-rq-detail-title"})]}):gt(Pe,{children:[B(Pe.Content,{title:"",noMargin:true,children:d?B(Pe.Search,{value:n,onChangeText:p,onCancel:()=>{p(""),f(false)},onDismiss:()=>f(false),dismissOnBlur:true,clearOnlyWhenText:true,placeholder:"Search query keys...",accessibilityLabel:"Search queries and mutations",iconSize:14,testID:"buoy-rq-search",containerTestID:"buoy-rq-search-field",clearTestID:"buoy-rq-search-clear",inputProps:{"sentry-label":"ignore react query search header"}}):c?gt(h,{style:ze.tabRow,children:[B(h,{style:ze.tabSelectorWrap,children:B(qr,{tabs:w,activeTab:r,testIDPrefix:"buoy-rq-tab",onTabChange:C=>a(C)})}),B(Pr,{size:16,testID:"buoy-rq-wifi"})]}):B(qr,{tabs:w,activeTab:r,testIDPrefix:"buoy-rq-tab",onTabChange:C=>a(C)})}),gt(Pe.Actions,{children:[B(N,{"sentry-label":"ignore open search",testID:"buoy-rq-search-open",accessibilityRole:"button",accessibilityLabel:"Search queries and mutations",onPress:m,style:ze.headerActionButton,children:B(dn,{size:14,color:je.color.textSecondary})}),l&&B(N,{"sentry-label":"ignore open filter",testID:"buoy-rq-filters",accessibilityRole:"button",accessibilityLabel:s?"Filters, active":"Filters",onPress:l,style:[ze.headerActionButton,s&&ze.activeFilterButton],children:B(yn,{size:14,color:s?je.color.accent:je.color.textSecondary})}),u&&B(N,{"sentry-label":"ignore clear cache",testID:"buoy-rq-clear-cache",accessibilityRole:"button",onPress:u,style:[ze.headerActionButton,ze.clearCacheButton],accessibilityLabel:`Clear ${r} cache`,children:B(hn,{size:14,color:je.color.warning})})]})]})}var ze=T.create({tabRow:{flex:1,flexDirection:"row",alignItems:"center",gap:12},tabSelectorWrap:{flex:1},headerActionButton:{padding:6,borderRadius:4},activeFilterButton:{backgroundColor:je.color.accentSoft},clearCacheButton:{backgroundColor:je.color.warningSoft}});import{resolveListEmptyState as fi}from"@buoy-gg/shared-ui/web";import{useMemo as mi}from"react";import{useMemo as gi}from"react";import{useQueryClient as pi}from"@tanstack/react-query";var Ve=(e,t,r)=>{if(t.length===0)return r;if(e instanceof Map){let a=new Map(e);if(t.length===1)return a.set(t[0],r),a;let[o,...n]=t,i=a.get(o);return a.set(o,Ve(i??null,n,r)),a}if(e instanceof Set){let a=Ve(Array.from(e),t,r);return new Set(Array.isArray(a)?a:[])}if(Array.isArray(e)){let a=[...e];if(t.length===1)return a[t[0]]=r,a;let[o,...n]=t;return a[o]=Ve(a[o],n,r),a}if(e instanceof Object){let a={...e};if(t.length===1)return a[t[0]]=r,a;let[o,...n]=t;return a[o]=Ve(a[o],n,r),a}return e};var $e=(e,t)=>{if(e instanceof Map){let r=new Map(e);if(t.length===1)return r.delete(t[0]),r;let[a,...o]=t;return r.set(a,$e(r.get(a),o)),r}if(e instanceof Set){let r=$e(Array.from(e),t);return new Set(r)}if(Array.isArray(e)){let r=[...e];if(t.length===1)return r.filter((n,i)=>i.toString()!==t[0]);let[a,...o]=t;return r[a]=$e(r[a],o),r}if(e instanceof Object){let r={...e};if(t.length===1)return delete r[t[0]],r;let[a,...o]=t;return r[a]=$e(r[a],o),r}return e};function zr({activeQuery:e,dataPath:t,queryClient:r}){if(!t)return;let a=e.state.data,o=$e(a,t),n=JSON.parse(JSON.stringify(o));r.setQueryData(e.queryKey,n)}function Or(e){return String(e).toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function Kr(e){return(Array.isArray(e)?e:[e]).filter(t=>t!=null).map(Or).filter(Boolean).join("-")||"unkeyed"}function bi(e){return`buoy-rq-query-row-${Kr(e)}`}function vi(e,t){return e==null?`buoy-rq-mutation-row-id-${t}`:`buoy-rq-mutation-row-${Kr(e)}`}function Si(e){return e.length===0?"buoy-rq-explorer-root":`buoy-rq-explorer-${e.map(Or).filter(Boolean).join("-")}`}import{LiveExplorer as Ci}from"@buoy-gg/shared-ui/web/dataViewer";import{jsx as xi}from"react/jsx-runtime";function me({editable:e,label:t,value:r,defaultExpanded:a,activeQuery:o,dataPath:n,itemsDeletable:i,dataVersion:l=0}){let s=pi(),u=gi(()=>{if(o)return{update:(c,d)=>{let f=o.state.data,b=Ve(f,c,d);s.setQueryData(o.queryKey,b)},remove:c=>{zr({queryClient:s,activeQuery:o,dataPath:c})}}},[s,o]);return xi(Ci,{editable:e,label:t,value:r,defaultExpanded:a,writer:u,dataPath:n,itemsDeletable:i,dataVersion:l,testIDForPath:Si,debounceMs:0})}import{useMemo as wi,useCallback as qi}from"react";import{memo as Mi}from"react";function se(e){return e.isDisabled()?"disabled":e.state.fetchStatus==="fetching"?"fetching":e.state.status==="error"?"error":e.getObserversCount()?e.state.fetchStatus==="paused"?"paused":e.isStale()?"stale":"fresh":"inactive"}import{CompactRow as Ti,buoyColors as ve,useRelativeTime as Ai}from"@buoy-gg/shared-ui/web";import{jsx as Di}from"react/jsx-runtime";var Ri=e=>e?.queryKey&&(Array.isArray(e.queryKey)?e.queryKey:[e.queryKey]).filter(t=>t!=null).map(t=>String(t)).join(" \u203A ")||"Unknown Query",Qi=Mi(function({query:e,isSelected:t,onSelect:r}){let a=b=>{switch(b){case"disabled":return ve.textMuted+"80";case"error":return ve.error;case"fresh":return ve.success;case"stale":return ve.warning;case"inactive":return ve.textMuted;case"fetching":return ve.primary;case"paused":return ve.textMuted;default:return ve.textSecondary}},o=se(e),n=e.getObserversCount(),i=e.isDisabled(),l=Ri(e),s=(()=>{if(i)return null;if(e.state.dataUpdatedAt&&e.state.dataUpdatedAt>0)return e.state.dataUpdatedAt;let b=e.state;return b.fetchedAt&&b.fetchedAt>0?b.fetchedAt:null})(),u=Ai(s),c=i?"Disabled":u||(e.state.dataUpdatedAt===0?"Not fetched":`N/A (${e.state.dataUpdatedAt||0})`),d=bi(e.queryKey),f=`${n} observer${n!==1?"s":""}`;return Di(Ti,{testID:d,statusTestID:`${d}-status`,statusSublabelTestID:`${d}-observers`,accessibilityLabel:`${l}, ${o}, ${f}`,statusDotColor:a(o),statusLabel:o.charAt(0).toUpperCase()+o.slice(1),statusSublabel:f,primaryText:l,bottomRightText:c,badgeText:n,badgeColor:a(o),isSelected:t,onPress:()=>r(e)})}),Lr=Qi;import{useEffect as Ii,useState as ki,useRef as Br,useMemo as Ei,useCallback as Hr}from"react";import{useQueryClient as Fi}from"@tanstack/react-query";import{buoyColors as pt}from"@buoy-gg/shared-ui/web";var le={base:()=>["#storage"],mmkv:{root:()=>[...le.base(),"mmkv"],key:e=>[...le.mmkv.root(),e],all:()=>[...le.mmkv.root(),"all"]},async:{root:()=>[...le.base(),"async"],key:e=>[...le.async.root(),e],all:()=>[...le.async.root(),"all"]},secure:{root:()=>[...le.base(),"secure"],key:e=>[...le.secure.root(),e],all:()=>[...le.secure.root(),"all"]}};function Se(e){return!Array.isArray(e)||e.length===0?false:e[0]==="#storage"}function Wr(e){if(!Se(e)||e.length<2)return null;let t=e[1];return t==="mmkv"||t==="async"||t==="secure"?t:null}function jr(e){switch(e){case"mmkv":return"MMKV";case"async":return"Async";case"secure":return"Secure";default:return e}}function Vr(e){switch(e){case"mmkv":return"purple";case"async":return"blue";case"secure":return"green";default:return"gray"}}function Pi(e){switch(e){case"mmkv":return pt.primary;case"async":return pt.warning;case"secure":return pt.success;default:return pt.textMuted}}function $r(e){return!Se(e)||e.length<3?"Unknown Storage Key":e.slice(2).filter(t=>t!=null).map(t=>String(t)).join(" \u203A ")||"Unknown Storage Key"}var bt=e=>e.state.fetchStatus!=="idle"?0:e.getObserversCount()?e.isStale()?2:1:3,zi=(e,t)=>e.state.dataUpdatedAt<t.state.dataUpdatedAt?1:-1,Nr=(e,t)=>bt(e)===bt(t)?zi(e,t):bt(e)>bt(t)?1:-1;function Oi(){let e=Fi(),[t,r]=ki(()=>e.getQueryCache().getAll().filter(l=>!Se(l.queryKey)).sort(Nr)),a=Br(new Map),o=Br(void 0),n=Hr(l=>{let s=a.current;if(l.length!==s.size)return true;for(let u of l){let c=s.get(u.queryHash);if(!c||c.dataUpdatedAt!==u.state.dataUpdatedAt||c.errorUpdatedAt!==u.state.errorUpdatedAt||c.fetchStatus!==u.state.fetchStatus||c.status!==u.state.status||c.isInvalidated!==u.state.isInvalidated)return true}return false},[]),i=Hr(()=>{let l=e.getQueryCache().getAll().filter(s=>!Se(s.queryKey));if(n(l)){let s=new Map;l.forEach(c=>{s.set(c.queryHash,c.state)}),a.current=s;let u=[...l].sort(Nr);r(u)}},[e,n]);return Ii(()=>{i();let l=e.getQueryCache().subscribe(s=>{if(s.type==="added"||s.type==="removed"||s.type==="updated"){if("query"in s&&s.query&&Se(s.query.queryKey))return;o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{i()},10)}});return()=>{l(),o.current&&clearTimeout(o.current)}},[e,i]),Ei(()=>t,[t])}var vt=Oi;import{night as Vt,ToolEmptyState as Ki,EVENT_LIST_PRESET as Li,monoFont as Bi}from"@buoy-gg/shared-ui/web";import{jsx as $t}from"react/jsx-runtime";function Ur({selectedQuery:e,onQuerySelect:t,activeFilter:r,emptyStateMessage:a,emptyState:o,contentContainerStyle:n,queries:i,searchText:l="",ignoredPatterns:s=new Set,includedPatterns:u=new Set}){let c=vt(),d=i??c,f=wi(()=>{let y=d;if(r&&(y=y.filter(m=>se(m)===r)),l){let m=l.toLowerCase();y=y.filter(p=>p?.queryKey?(Array.isArray(p.queryKey)?p.queryKey:[p.queryKey]).filter(g=>g!=null).map(g=>String(g)).join(" ").toLowerCase().includes(m):false)}return u.size>0&&(y=y.filter(m=>{if(!m?.queryKey)return false;let p=(Array.isArray(m.queryKey)?m.queryKey:[m.queryKey]).filter(g=>g!=null).map(g=>String(g)).join(" ").toLowerCase();return Array.from(u).some(g=>p.includes(g.toLowerCase()))})),s.size>0&&(y=y.filter(m=>{if(!m?.queryKey)return true;let p=(Array.isArray(m.queryKey)?m.queryKey:[m.queryKey]).filter(g=>g!=null).map(g=>String(g)).join(" ").toLowerCase();return!Array.from(s).some(g=>p.includes(g.toLowerCase()))})),y.sort((m,p)=>{let g=m.state.dataUpdatedAt||0;return(p.state.dataUpdatedAt||0)-g}),y},[d,r,l,u,s]),b=qi(y=>{if(e?.queryHash===y.queryHash){t(void 0);return}t(y)},[e?.queryHash,t]);return f.length===0?$t(Ki,{testID:"buoy-rq-empty",...o??{otto:"empty",title:"No queries found",message:a||(r?`No ${r} queries found`:"No queries found")}}):$t(Wt,{testID:"buoy-rq-query-list",style:_r.listWrapper,contentContainerStyle:n||_r.listContent,data:f,keyExtractor:Hi,renderItem:({item:y})=>$t(Lr,{query:y,stateSig:Wi(y),isSelected:e?.queryHash===y.queryHash,onSelect:b}),showsVerticalScrollIndicator:true,...Li})}var Hi=e=>e.queryHash;function Wi(e){let t=0,r=false;try{t=e.getObserversCount(),r=e.isStale()}catch{}return`${e.state.dataUpdatedAt}|${e.state.fetchStatus}|${e.state.status}|${t}|${r}`}var _r=T.create({listWrapper:{flexGrow:1},listContent:{paddingBottom:16,backgroundColor:"transparent"},emptyContainer:{flex:1,justifyContent:"center",alignItems:"center",padding:32,backgroundColor:Vt.color.surface,margin:16,borderRadius:8,borderWidth:1,borderColor:Vt.color.border},emptyText:{color:Vt.color.textTertiary,fontSize:14,textAlign:"center",fontFamily:Bi,letterSpacing:.5}});import{buoyColors as D,monoFont as ji}from"@buoy-gg/shared-ui/web";import{jsx as Jr}from"react/jsx-runtime";var Vi={fresh:D.success+"15",stale:D.warning+"15",fetching:D.primary+"15",paused:D.textMuted+"1A",noObserver:D.textMuted+"1A",error:D.error+"15",inactive:D.textMuted+"1A"},$i={fresh:D.success+"33",stale:D.warning+"33",fetching:D.primary+"33",paused:D.textMuted+"33",noObserver:D.textMuted+"33",error:D.error+"33",inactive:D.textMuted+"33"},Ni={fresh:D.success,stale:D.warning,fetching:D.primary,paused:D.textMuted,noObserver:D.textMuted,error:D.error,inactive:D.textMuted};function Gr({query:e,testID:t}){let r=se(e),a=Vi[r],o=$i[r],n=Ni[r];return Jr(h,{style:[Yr.container,{backgroundColor:a,borderColor:o}],children:Jr(v,{testID:t,style:[Yr.text,{color:n}],children:r})})}var Yr=T.create({container:{paddingHorizontal:8,paddingVertical:4,borderWidth:1,borderRadius:6,alignSelf:"flex-start"},text:{fontSize:11,fontWeight:"600",textTransform:"uppercase",letterSpacing:.5,fontFamily:ji}});import{displayValue as Ui,night as U,monoFont as St}from"@buoy-gg/shared-ui/web";import{jsx as Ce,jsxs as Ct}from"react/jsx-runtime";function Nt({query:e}){if(e===void 0)return null;let t=new Date(e.state.dataUpdatedAt).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:true});return Ct(h,{style:ee.minWidth,children:[Ce(v,{style:ee.headerText,children:"Query Details"}),Ct(h,{style:ee.row,children:[Ce(be,{"sentry-label":"ignore devtools query details scroll",horizontal:true,style:ee.flexOne,children:Ce(v,{testID:"buoy-rq-detail-key",style:ee.queryKeyText,children:Ui(e.queryKey,true)})}),Ce(Gr,{query:e,testID:"buoy-rq-detail-status"})]}),Ct(h,{style:ee.row,children:[Ce(v,{style:ee.labelText,children:"Observers:"}),Ce(v,{testID:"buoy-rq-detail-observers",style:ee.valueText,children:`${e.getObserversCount()}`})]}),Ct(h,{style:ee.row,children:[Ce(v,{style:ee.labelText,children:"Last Updated:"}),Ce(v,{testID:"buoy-rq-detail-updated",style:ee.valueText,children:`${t}`})]})]})}var ee=T.create({minWidth:{minWidth:200,backgroundColor:U.color.surface,borderRadius:6,borderWidth:1,borderColor:U.color.accent+"4D",overflow:"hidden",shadowColor:U.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},headerText:{backgroundColor:U.color.accent+"15",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:U.color.accent,borderBottomWidth:1,borderBottomColor:U.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:St},row:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingHorizontal:12,paddingVertical:10,borderBottomWidth:1,borderBottomColor:U.color.separator},flexOne:{flex:1,marginRight:8},queryKeyText:{fontSize:12,color:U.color.text,fontFamily:St,lineHeight:18,flexShrink:1,backgroundColor:U.color.accent+"15",paddingHorizontal:8,paddingVertical:4,borderRadius:4,borderWidth:1,borderColor:U.color.accent+"4D"},labelText:{fontSize:10,color:U.color.textSecondary,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase",fontFamily:St},valueText:{fontSize:12,color:U.color.text,fontWeight:"500",fontVariant:["tabular-nums"],fontFamily:St}});import{useQueryClient as _i}from"@tanstack/react-query";import{night as R}from"@buoy-gg/shared-ui/web";import{jsx as Xr,jsxs as Ji}from"react/jsx-runtime";var Gi={refetch:{dotColor:R.color.accent,textColor:R.color.text,borderColor:R.color.border},invalidate:{dotColor:R.color.warning,textColor:R.color.text,borderColor:R.color.border},reset:{dotColor:R.color.textSecondary,textColor:R.color.text,borderColor:R.color.border},remove:{dotColor:R.color.danger,textColor:R.color.danger,borderColor:R.color.danger+"40"},triggerLoading:{dotColor:R.color.info,textColor:R.color.info,borderColor:R.color.info+"40"},triggerError:{dotColor:R.color.danger,textColor:R.color.danger,borderColor:R.color.danger+"40"}};function ue({onClick:e,text:t,variant:r,disabled:a,testID:o}){let n=Gi[r];return Ji(N,{"sentry-label":"ignore devtools action button",testID:o,disabled:a,onPress:e,style:[Ut.button,{borderColor:a?R.color.border:n.borderColor,opacity:a?.4:1}],activeOpacity:.7,accessibilityRole:"button",accessibilityLabel:t,accessibilityState:{disabled:a},children:[Xr(h,{style:[Ut.dot,{backgroundColor:a?R.color.textTertiary:n.dotColor}]}),Xr(v,{style:[Ut.text,{color:a?R.color.textTertiary:n.textColor}],children:t})]})}var Ut=T.create({button:{flexDirection:"row",alignItems:"center",justifyContent:"center",borderRadius:4,borderWidth:1,paddingHorizontal:8,paddingVertical:4,backgroundColor:"transparent"},dot:{width:6,height:6,borderRadius:3,marginRight:6},text:{fontSize:12,fontWeight:"500"}});var Yi="@tanstack/query-devtools-event";function xe(e,t){try{let r=globalThis;if(typeof r.dispatchEvent!="function"||typeof r.CustomEvent!="function")return;r.dispatchEvent(new r.CustomEvent(Yi,{detail:{type:e,queryHash:t},bubbles:true,cancelable:true}))}catch{}}function _t({query:e}){if(e.state.data===void 0){xe("RESTORE_LOADING",e.queryHash);let t=e.state,r=e.state.fetchMeta?e.state.fetchMeta.__previousQueryOptions:null;e.cancel({silent:true}),e.setState({...t,fetchStatus:"idle",fetchMeta:null}),r&&e.fetch(r)}else{xe("TRIGGER_LOADING",e.queryHash);let t=e.options;e.fetch({...t,queryFn:()=>new Promise(()=>{}),gcTime:-1}),e.setState({data:void 0,status:"pending",fetchMeta:{...e.state.fetchMeta,__previousQueryOptions:t}})}}function Jt({query:e}){xe("REFETCH",e.queryHash),e.fetch().catch(()=>{})}function Zr({query:e,queryClient:t}){xe("RESET",e.queryHash),t.resetQueries({queryKey:e.queryKey,exact:true})}function ea({query:e,queryClient:t}){xe("REMOVE",e.queryHash),t.removeQueries(e)}function ta({query:e,queryClient:t}){xe("INVALIDATE",e.queryHash),t.invalidateQueries(e)}function Gt({query:e,queryClient:t}){if(e.state.status!=="error"){xe("TRIGGER_ERROR",e.queryHash);let r=new Error("Unknown error from devtools"),a=e.options;e.setState({status:"error",error:r,fetchMeta:{...e.state.fetchMeta,__previousQueryOptions:a}})}else xe("RESTORE_ERROR",e.queryHash),t.resetQueries(e)}import{night as Xi}from"@buoy-gg/shared-ui/web";import{jsx as we,jsxs as tt}from"react/jsx-runtime";function ra({query:e,setSelectedQuery:t}){let r=_i();if(e===void 0)return null;let a=e.state.status,o=se(e)==="fetching";return tt(h,{style:Oe.container,children:[tt(h,{style:Oe.section,children:[we(v,{style:Oe.sectionLabel,children:"Actions"}),tt(h,{style:Oe.buttonsRow,children:[we(ue,{disabled:o,onClick:()=>Jt({query:e}),variant:"refetch",text:"Refetch"}),we(ue,{disabled:a==="pending",onClick:()=>ta({query:e,queryClient:r}),variant:"invalidate",text:"Invalidate"}),we(ue,{disabled:a==="pending",onClick:()=>Zr({queryClient:r,query:e}),variant:"reset",text:"Reset"}),we(ue,{disabled:o,onClick:()=>{ea({queryClient:r,query:e}),t(void 0)},variant:"remove",text:"Remove"})]})]}),tt(h,{style:Oe.section,children:[we(v,{style:Oe.sectionLabel,children:"Triggers"}),tt(h,{style:Oe.buttonsRow,children:[we(ue,{disabled:false,onClick:()=>_t({query:e}),variant:"triggerLoading",text:e.state.fetchStatus==="fetching"?"Restore Loading":"Trigger Loading"}),we(ue,{disabled:a==="pending",onClick:()=>Gt({query:e,queryClient:r}),variant:"triggerError",text:a==="error"?"Restore Error":"Trigger Error"})]})]})]})}var Oe=T.create({container:{gap:16},section:{gap:8},sectionLabel:{fontSize:11,fontWeight:"600",color:Xi.color.textTertiary,textTransform:"uppercase",letterSpacing:.5},buttonsRow:{flexDirection:"row",flexWrap:"wrap",gap:8}});import{night as Yt}from"@buoy-gg/shared-ui/web";import{jsx as ce,jsxs as Xt}from"react/jsx-runtime";function Zi({selectedQuery:e,setSelectedQuery:t}){return Xt(be,{"sentry-label":"ignore devtools query info scroll",style:de.flexOne,contentContainerStyle:de.scrollContent,children:[ce(h,{style:de.section,children:ce(Nt,{query:e})}),ce(h,{style:de.section,children:ce(ra,{query:e,setSelectedQuery:t})}),Xt(h,{style:de.section,children:[ce(v,{style:de.headerText,children:"Data Explorer"}),ce(h,{style:de.contentView,children:ce(me,{editable:true,label:"Data",value:e?.state.data,defaultExpanded:["Data"],activeQuery:e})})]}),Xt(h,{style:de.section,children:[ce(v,{style:de.headerText,children:"Query Explorer"}),ce(h,{style:de.contentView,children:ce(me,{label:"Query",value:e,defaultExpanded:["Query","queryKey"],activeQuery:e})})]})]})}var de=T.create({flexOne:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingBottom:16,paddingHorizontal:8},section:{marginBottom:16},headerText:{fontSize:16,fontWeight:"600",color:Yt.color.text,marginBottom:8,textAlign:"left"},contentView:{backgroundColor:Yt.color.surface,borderRadius:12,borderWidth:1,borderColor:Yt.color.border,padding:16}});import{buoyColors as F,night as te}from"@buoy-gg/shared-ui/web";import{jsx as Zt,jsxs as es}from"react/jsx-runtime";var ts=({label:e,color:t,count:r,showLabel:a=true,isActive:o=false,onPress:n,onTouchStart:i,size:l="default",testID:s})=>{let u=l==="large",c=(d=>{let f={green:{bg:F.success+"15",border:F.success+"40",dot:F.success,text:F.success},yellow:{bg:F.warning+"15",border:F.warning+"40",dot:F.warning,text:F.warning},blue:{bg:F.primary+"15",border:F.primary+"40",dot:F.primary,text:F.primary},purple:{bg:te.color.fillSecondary,border:te.color.fillTertiary,dot:te.color.textTertiary,text:te.color.textTertiary},red:{bg:F.error+"15",border:F.error+"40",dot:F.error,text:F.error},gray:{bg:te.color.fillSecondary,border:te.color.fillTertiary,dot:te.color.textTertiary,text:te.color.textTertiary}};return f[d]||f.gray})(t);return es(N,{"sentry-label":"ignore devtools query status",testID:s,accessibilityRole:"button",accessibilityLabel:`${e}, ${r}${o?", selected":""}`,accessibilityState:{selected:o},style:[qe.queryStatusTag,u&&qe.queryStatusTagLarge,o&&{backgroundColor:c.bg,borderColor:c.border}],disabled:!n,onPress:n,onPressIn:i,activeOpacity:.7,children:[Zt(h,{style:[qe.dot,u&&qe.dotLarge,{backgroundColor:c.dot}]}),a&&Zt(v,{style:[qe.label,u&&qe.labelLarge,o&&{color:c.text}],numberOfLines:1,ellipsizeMode:"tail",children:e}),r>0&&Zt(v,{testID:s?`${s}-count`:void 0,style:[qe.count,u&&qe.countLarge,{color:c.dot}],numberOfLines:1,children:r})]})},qe=T.create({queryStatusTag:{flexDirection:"row",alignItems:"center",backgroundColor:te.color.buttonSurface,borderRadius:13,paddingHorizontal:10,paddingVertical:5,height:26,gap:6,borderWidth:1,borderColor:te.color.border},queryStatusTagLarge:{borderRadius:16,paddingHorizontal:13,paddingVertical:6,height:32,gap:7},dot:{width:6,height:6,borderRadius:3},dotLarge:{width:8,height:8,borderRadius:4},label:{fontSize:11,fontWeight:"500",color:te.color.textSecondary,fontFamily:"system"},labelLarge:{fontSize:13,fontWeight:"600",letterSpacing:.2,fontFamily:'"SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},count:{fontSize:11,fontVariant:["tabular-nums"],fontWeight:"600",marginLeft:"auto",fontFamily:"system"},countLarge:{fontSize:13,fontWeight:"700",fontFamily:'"SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'}}),re=ts;import{ChipStrip as rs,useChipTap as as}from"@buoy-gg/shared-ui/web";import{useEffect as aa,useState as oa}from"react";import{useQueryClient as na}from"@tanstack/react-query";function os(){let e=na(),[t,r]=oa({fresh:0,stale:0,fetching:0,paused:0,inactive:0,error:0,disabled:0});return aa(()=>{let a=()=>{let n=e.getQueryCache().getAll().reduce((i,l)=>{let s=se(l);return i[s]=(i[s]||0)+1,i},{fresh:0,stale:0,fetching:0,paused:0,inactive:0,error:0,disabled:0});setTimeout(()=>r(n),0)};a();let o=e.getQueryCache().subscribe(a);return()=>o()},[e]),t}var ia=os;function ns(){let e=na(),[t,r]=oa({pending:0,success:0,error:0,paused:0,idle:0});return aa(()=>{let a=()=>{let n=e.getMutationCache().getAll().reduce((i,l)=>{let s=l.state.status;if(l.state.isPaused)i.paused++;else switch(s){case"idle":i.idle++;break;case"pending":i.pending++;break;case"success":i.success++;break;case"error":i.error++;break}return i},{pending:0,success:0,error:0,paused:0,idle:0});setTimeout(()=>r(n),0)};a();let o=e.getMutationCache().subscribe(a);return()=>o()},[e]),t}import{jsx as rt,jsxs as is}from"react/jsx-runtime";var ss=({activeFilter:e,onFilterChange:t,size:r="default"})=>{let{fresh:a,stale:o,fetching:n,paused:i,inactive:l}=ia(),{scrollProps:s,onTouchStart:u,isTap:c}=as(),d=(f,b)=>{c(b)&&t&&t(e===f?null:f)};return is(rs,{scrollProps:s,sentryLabel:"ignore devtools query status count scroll",children:[rt(re,{label:"Fresh",color:"green",count:a,isActive:e==="fresh",onPress:f=>d("fresh",f),onTouchStart:u,testID:"buoy-rq-status-fresh",showLabel:true,size:r}),rt(re,{label:"Loading",color:"blue",count:n,isActive:e==="fetching",onPress:f=>d("fetching",f),onTouchStart:u,testID:"buoy-rq-status-fetching",showLabel:true,size:r}),rt(re,{label:"Paused",color:"purple",count:i,isActive:e==="paused",onPress:f=>d("paused",f),onTouchStart:u,testID:"buoy-rq-status-paused",showLabel:true,size:r}),rt(re,{label:"Stale",color:"yellow",count:o,isActive:e==="stale",onPress:f=>d("stale",f),onTouchStart:u,testID:"buoy-rq-status-stale",showLabel:true,size:r}),rt(re,{label:"Idle",color:"gray",count:l,isActive:e==="inactive",onPress:f=>d("inactive",f),onTouchStart:u,testID:"buoy-rq-status-inactive",showLabel:true,size:r})]})},sa=ss;import{useState as ls,useRef as er,useMemo as us,useCallback as cs}from"react";import{QueryIcon as ds,CheckCircle as ys,Activity as hs,Pause as fs,XCircle as ms,buoyColors as xt}from"@buoy-gg/shared-ui/web";import{jsx as at}from"react/jsx-runtime";function gs({size:e=24}){return at(ds,{size:e})}function ps({size:e=14,color:t=xt.success,strokeWidth:r=2}){return at(ys,{size:e,color:t,strokeWidth:r})}function bs({size:e=14,color:t=xt.warning,strokeWidth:r=2}){return at(hs,{size:e,color:t,strokeWidth:r})}function vs({size:e=14,color:t=xt.textMuted,strokeWidth:r=2}){return at(fs,{size:e,color:t,strokeWidth:r})}function Ss({size:e=14,color:t=xt.error,strokeWidth:r=2}){return at(ms,{size:e,color:t,strokeWidth:r})}import{buoyColors as ot,night as Ke,useRelativeTime as Cs,monoFont as la}from"@buoy-gg/shared-ui/web";import{jsx as ae,jsxs as wt}from"react/jsx-runtime";var xs=e=>e.options.mutationKey&&(Array.isArray(e.options.mutationKey)?e.options.mutationKey:[e.options.mutationKey]).filter(t=>t!=null).map(t=>String(t)).join(" \u203A ")||"Anonymous Mutation";function ua({mutation:e,setSelectedMutation:t,selected:r}){let a=new Date(e.state.submittedAt).toLocaleTimeString(),o=(()=>{if(e.state.submittedAt&&e.state.submittedAt>0)return e.state.submittedAt;let u=e.state;return u.updatedAt&&u.updatedAt>0?u.updatedAt:null})(),n=Cs(o)||`N/A (${e.state.submittedAt||0})`,i=(()=>{if(e.state.isPaused)return{status:"Paused",color:ot.textMuted,icon:ae(vs,{})};switch(e.state.status){case"success":return{status:"Success",color:ot.success,icon:ae(ps,{})};case"error":return{status:"Error",color:ot.error,icon:ae(Ss,{})};case"pending":return{status:"Loading",color:ot.primary,icon:ae(bs,{})};default:return{status:"Idle",color:ot.textMuted,icon:null}}})(),l=xs(e),s=vi(e.options.mutationKey,e.mutationId);return wt(N,{"sentry-label":"ignore devtools mutation button",testID:s,accessibilityRole:"button",accessibilityLabel:`${l}, ${i.status}`,onPress:()=>t(e===r?void 0:e),style:[_.button,r?.mutationId===e.mutationId&&_.selected],children:[wt(h,{style:_.rowContent,children:[wt(h,{style:_.statusSection,children:[ae(h,{style:[_.statusDot,{backgroundColor:i.color}]}),wt(h,{style:_.statusInfo,children:[ae(v,{testID:`${s}-status`,style:[_.statusLabel,{color:i.color}],children:i.status}),ae(v,{style:_.submittedText,children:a})]})]}),ae(h,{style:_.mutationSection,children:ae(v,{testID:`${s}-key`,style:_.mutationKey,children:l})})]}),ae(h,{style:_.bottomRightContainer,children:ae(v,{style:_.bottomRightText,children:n})})]})}var _=T.create({button:{backgroundColor:Ke.color.surface,borderRadius:8,borderWidth:1,borderColor:Ke.color.border,marginHorizontal:8,marginVertical:3,padding:12},selected:{backgroundColor:Ke.color.accentSoft,borderColor:Ke.color.accentBorderStrong},rowContent:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},statusSection:{flexDirection:"row",alignItems:"center",gap:8,flex:1},statusDot:{width:8,height:8,borderRadius:4},statusInfo:{flex:1},statusLabel:{fontSize:11,fontWeight:"600",lineHeight:14},submittedText:{fontSize:10,color:Ke.color.textTertiary,marginTop:1},mutationSection:{flex:2,paddingHorizontal:12},mutationKey:{fontFamily:la,fontSize:12,color:Ke.color.text,lineHeight:16},bottomRightContainer:{position:"absolute",bottom:4,right:8},bottomRightText:{fontSize:9,color:Ke.color.textTertiary,fontFamily:la}});import{displayValue as ws,night as J,monoFont as qt}from"@buoy-gg/shared-ui/web";import{buoyColors as G,monoFont as qs}from"@buoy-gg/shared-ui/web";import{jsx as ca}from"react/jsx-runtime";var Ms={success:G.success+"15",error:G.error+"15",pending:G.primary+"15",idle:G.textMuted+"1A"},Ts={success:G.success+"33",error:G.error+"33",pending:G.primary+"33",idle:G.textMuted+"33"},As={success:G.success,error:G.error,pending:G.primary,idle:G.textMuted};function da({status:e,testID:t}){let r=e,a=Ms[r],o=Ts[r],n=As[r];return ca(h,{style:[ya.container,{backgroundColor:a,borderColor:o}],children:ca(v,{testID:t,style:[ya.text,{color:n}],children:e})})}var ya=T.create({container:{paddingHorizontal:8,paddingVertical:4,borderWidth:1,borderRadius:6,alignSelf:"flex-start"},text:{fontSize:11,fontWeight:"600",textTransform:"uppercase",letterSpacing:.5,fontFamily:qs}});import{jsx as Ne,jsxs as tr}from"react/jsx-runtime";function rr({selectedMutation:e}){if(e===void 0)return null;let t=new Date(e.state.submittedAt).toLocaleTimeString();return tr(h,{style:Me.minWidth,children:[Ne(v,{style:Me.headerText,children:"Mutation Details"}),tr(h,{style:Me.row,children:[Ne(be,{"sentry-label":"ignore devtools mutation details scroll",horizontal:true,style:Me.flex1,children:Ne(v,{testID:"buoy-rq-mutation-detail-key",style:Me.flexWrap,children:`${e.options.mutationKey?ws(e.options.mutationKey,true):"No mutationKey found"}`})}),Ne(da,{status:e.state.status,testID:"buoy-rq-mutation-detail-status"})]}),tr(h,{style:Me.row,children:[Ne(v,{style:Me.labelText,children:"Submitted At:"}),Ne(v,{style:Me.valueText,children:t})]})]})}var Me=T.create({minWidth:{minWidth:200,backgroundColor:J.color.surface,borderRadius:6,borderWidth:1,borderColor:J.color.accent+"4D",overflow:"hidden",shadowColor:J.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},headerText:{backgroundColor:J.color.accent+"15",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:J.color.accent,borderBottomWidth:1,borderBottomColor:J.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:qt},row:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingHorizontal:12,paddingVertical:10,borderBottomWidth:1,borderBottomColor:J.color.separator},flex1:{flex:1,marginRight:8},flexWrap:{fontSize:12,color:J.color.text,fontFamily:qt,lineHeight:18,flexShrink:1,backgroundColor:J.color.accent+"15",paddingHorizontal:8,paddingVertical:4,borderRadius:4,borderWidth:1,borderColor:J.color.accent+"4D"},labelText:{fontSize:10,color:J.color.textSecondary,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase",fontFamily:qt},valueText:{fontSize:12,color:J.color.text,fontWeight:"500",fontVariant:["tabular-nums"],fontFamily:qt}});import{night as nt,monoFont as Ds}from"@buoy-gg/shared-ui/web";import{jsx as H,jsxs as it}from"react/jsx-runtime";function ha({selectedMutation:e}){return it(be,{"sentry-label":"ignore devtools mutation information scroll",style:z.flex1,contentContainerStyle:z.scrollContent,children:[H(h,{style:z.section,children:H(rr,{selectedMutation:e})}),it(h,{style:z.section,children:[H(v,{style:z.textHeader,children:"Variables Details"}),H(h,{style:z.padding,children:H(me,{label:"Variables",value:e?.state.variables,defaultExpanded:["Variables"]})})]}),it(h,{style:z.section,children:[H(v,{style:z.textHeader,children:"Context Details"}),H(h,{style:z.padding,children:H(me,{label:"Context",value:e?.state.context,defaultExpanded:["Context"]})})]}),it(h,{style:z.section,children:[H(v,{style:z.textHeader,children:"Data Explorer"}),H(h,{style:z.padding,children:H(me,{label:"Data",defaultExpanded:["Data"],value:e?.state.data})})]}),it(h,{style:z.section,children:[H(v,{style:z.textHeader,children:"Mutations Explorer"}),H(h,{style:z.padding,children:H(me,{label:"Mutation",defaultExpanded:["Mutation"],value:e})})]})]})}var z=T.create({flex1:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingBottom:16,paddingHorizontal:8},section:{marginBottom:16},textHeader:{textAlign:"left",backgroundColor:nt.color.accent+"15",padding:12,fontSize:12,fontWeight:"700",color:nt.color.accent,borderTopLeftRadius:8,borderTopRightRadius:8,borderBottomWidth:1,borderBottomColor:nt.color.accent+"33",fontFamily:Ds,letterSpacing:1,textTransform:"uppercase"},padding:{padding:12,backgroundColor:nt.color.surface,borderBottomLeftRadius:8,borderBottomRightRadius:8,borderWidth:1,borderColor:nt.color.border,borderTopWidth:0}});import{useCallback as fa,useEffect as Rs,useRef as ma,useState as Qs}from"react";import{useQueryClient as Is}from"@tanstack/react-query";function ks(){let e=Is(),[t,r]=Qs(()=>e.getMutationCache().getAll()),a=ma(new Map),o=ma(void 0),n=fa(l=>{let s=a.current;if(l.length!==s.size)return true;for(let u of l){let c=s.get(u.mutationId);if(!c||c.status!==u.state.status||c.submittedAt!==u.state.submittedAt||c.isPaused!==u.state.isPaused)return true}return false},[]),i=fa(()=>{let l=e.getMutationCache().getAll();if(n(l)){let s=new Map;l.forEach(u=>{s.set(u.mutationId,u.state)}),a.current=s,r(l)}},[e,n]);return Rs(()=>{i();let l=e.getMutationCache().subscribe(s=>{(s.type==="added"||s.type==="removed"||s.type==="updated")&&(o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{i()},10))});return()=>{l(),o.current&&clearTimeout(o.current)}},[e,i]),{mutations:t}}var ga=ks;import{night as Le,ToolEmptyState as Es,monoFont as Fs}from"@buoy-gg/shared-ui/web";import{jsx as Te,jsxs as pa}from"react/jsx-runtime";function ba({selectedMutation:e,setSelectedMutation:t,activeFilter:r,hideInfoPanel:a=false,contentContainerStyle:o,searchText:n=""}){let{mutations:i}=ga(),l=S=>S.state.isPaused?"paused":S.state.status,s=us(()=>{let S=i;if(r&&(S=S.filter(w=>l(w)===r)),n){let w=n.toLowerCase();S=S.filter(C=>{let q=C.options.mutationKey;return q?(Array.isArray(q)?q:[q]).filter(A=>A!=null).map(A=>String(A)).join(" ").toLowerCase().includes(w):false})}return S},[i,r,n]),u=Ar.get("window").height,c=u*.4,d=150,f=u*.7,b=er(new Z.Value(c)).current,[,y]=ls(c),m=er(c),p=er(Ht.create({onMoveShouldSetPanResponder:(S,w)=>Math.abs(w.dy)>Math.abs(w.dx)&&Math.abs(w.dy)>10,onPanResponderGrant:()=>{b.stopAnimation(S=>{y(S),m.current=S,b.setValue(S)})},onPanResponderMove:(S,w)=>{let C=m.current-w.dy,q=Math.max(d,Math.min(f,C));b.setValue(q)},onPanResponderRelease:(S,w)=>{let C=Math.max(d,Math.min(f,m.current-w.dy));y(C),m.current=C,Z.timing(b,{toValue:C,duration:200,useNativeDriver:false}).start(()=>{b.setValue(C),y(C),m.current=C})}})).current,g=cs(({item:S})=>Te(ua,{selected:e,setSelectedMutation:t,mutation:S}),[e,t]);return pa(h,{style:Be.container,children:[s.length>0?Te(h,{style:Be.listWrapper,children:Te(Wt,{"sentry-label":"ignore devtools mutations list",testID:"buoy-rq-mutation-list",data:s,renderItem:g,keyExtractor:(S,w)=>`${S.mutationId}-${S.state.submittedAt}-${S.state.status}-${w}`,inverted:true,showsVerticalScrollIndicator:true,removeClippedSubviews:!(typeof process<"u"&&process.env?.EXPO_PUBLIC_E2E),contentContainerStyle:o||Be.listContent,initialNumToRender:10,maxToRenderPerBatch:10,windowSize:10,scrollEnabled:false})}):Te(Es,{testID:"buoy-rq-mutations-empty",otto:r?"filtering":"scanning",title:"No mutations found",message:r?`No ${r} mutations. Pick another status to see the rest.`:"Mutations run through useMutation will appear here."}),e&&!a&&pa(Z.View,{style:[Be.mutationInfo,{height:b}],children:[Te(h,{style:Be.dragHandle,...p.panHandlers,children:Te(h,{style:Be.dragIndicator})}),Te(h,{style:Be.mutationInfoContent,children:Te(ha,{selectedMutation:e})})]})]})}var Be=T.create({container:{flex:1,backgroundColor:"transparent"},listWrapper:{flex:1},listContent:{backgroundColor:"transparent",paddingHorizontal:8,paddingTop:8},mutationInfo:{borderTopWidth:1,borderTopColor:Le.color.border,backgroundColor:"transparent"},dragHandle:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:Le.color.surface,borderBottomWidth:1,borderBottomColor:Le.color.border},dragIndicator:{width:40,height:4,backgroundColor:Le.color.placeholder,borderRadius:2},mutationInfoContent:{flex:1,backgroundColor:"transparent"},emptyContainer:{flex:1,justifyContent:"center",alignItems:"center",padding:32,backgroundColor:Le.color.surface,margin:16,borderRadius:8,borderWidth:1,borderColor:Le.color.border},emptyText:{color:Le.color.textTertiary,fontSize:14,textAlign:"center",fontFamily:Fs,letterSpacing:.5}});import{ChipStrip as Ps,useChipTap as zs}from"@buoy-gg/shared-ui/web";import{jsx as Mt,jsxs as Os}from"react/jsx-runtime";var Ks=({activeFilter:e,onFilterChange:t,size:r="default"})=>{let{pending:a,success:o,error:n,paused:i}=ns(),{scrollProps:l,onTouchStart:s,isTap:u}=zs(),c=(d,f)=>{u(f)&&t&&t(e===d?null:d)};return Os(Ps,{scrollProps:l,sentryLabel:"ignore devtools mutation status count scroll",children:[Mt(re,{label:"Pending",color:"blue",count:a,isActive:e==="pending",onPress:d=>c("pending",d),onTouchStart:s,testID:"buoy-rq-mstatus-pending",showLabel:true,size:r}),Mt(re,{label:"Success",color:"green",count:o,isActive:e==="success",onPress:d=>c("success",d),onTouchStart:s,testID:"buoy-rq-mstatus-success",showLabel:true,size:r}),Mt(re,{label:"Error",color:"red",count:n,isActive:e==="error",onPress:d=>c("error",d),onTouchStart:s,testID:"buoy-rq-mstatus-error",showLabel:true,size:r}),Mt(re,{label:"Paused",color:"purple",count:i,isActive:e==="paused",onPress:d=>c("paused",d),onTouchStart:s,testID:"buoy-rq-mstatus-paused",showLabel:true,size:r})]})},va=Ks;import{Trash as Ls,night as Ue}from"@buoy-gg/shared-ui/web";import{jsx as Sa}from"react/jsx-runtime";var Bs=({type:e,onClear:t,disabled:r=false})=>Sa(N,{"sentry-label":"ignore devtools clear cache button",style:[Ca.button,r&&Ca.disabledButton],onPress:t,disabled:r,activeOpacity:.7,accessibilityLabel:`Clear ${e} cache`,accessibilityRole:"button",accessibilityState:{disabled:r},children:Sa(Ls,{size:16,strokeWidth:2,color:r?Ue.color.textTertiary:Ue.color.warning})}),Ca=T.create({button:{width:32,height:32,borderRadius:6,backgroundColor:Ue.color.warningSoft,justifyContent:"center",alignItems:"center",borderWidth:1,borderColor:Ue.color.warning+"33"},disabledButton:{opacity:.5,backgroundColor:Ue.color.fill,borderColor:Ue.color.border}}),Hs=Bs;import{Wifi as xa,buoyColors as wa}from"@buoy-gg/shared-ui/web";import{jsx as ar}from"react/jsx-runtime";var Ws=({isOffline:e,onToggle:t})=>ar(N,{"sentry-label":"ignore devtools network toggle button",style:[qa.button,e&&qa.offlineButton],onPress:t,activeOpacity:.7,accessibilityLabel:e?"Unset offline mocking behavior":"Mock offline behavior",accessibilityRole:"button",accessibilityState:{selected:e},children:e?ar(xa,{size:16,color:wa.error,strokeWidth:2}):ar(xa,{size:16,color:wa.success,strokeWidth:2})}),qa=T.create({button:{width:32,height:32,borderRadius:6,backgroundColor:"rgba(16, 185, 129, 0.1)",justifyContent:"center",alignItems:"center",borderWidth:1,borderColor:"rgba(16, 185, 129, 0.2)"},offlineButton:{backgroundColor:"rgba(239, 68, 68, 0.1)",borderColor:"rgba(239, 68, 68, 0.2)"}}),js=Ws;import{ChipStrip as Vs,useChipTap as $s}from"@buoy-gg/shared-ui/web";import{jsx as Ma}from"react/jsx-runtime";var Ta=["mmkv","async","secure"],Ns=({activeStorageTypes:e=new Set(Ta),onStorageTypesChange:t,counts:r})=>{let{scrollProps:a,onTouchStart:o,isTap:n}=$s(),i=(l,s)=>{if(n(s)&&t){let u=new Set(e);u.has(l)?u.delete(l):u.add(l),t(u)}};return Ma(Vs,{scrollProps:a,sentryLabel:"ignore devtools storage status count scroll",children:Ta.map(l=>{let s=r?.[l]??0;return Ma(re,{label:jr(l),color:Vr(l),count:s,isActive:e.has(l),onPress:u=>i(l,u),onTouchStart:o,showLabel:true},l)})})},Us=Ns;import{night as _s,monoFont as Js}from"@buoy-gg/shared-ui/web";import{jsx as Aa,jsxs as Gs}from"react/jsx-runtime";function Ys({totalCount:e,filteredCount:t,onPress:r}){if(t===e)return null;let a=Aa(h,{style:Da.container,children:Gs(v,{testID:"buoy-rq-filter-badge",style:Da.text,children:["Showing ",t," of ",e]})});return r?Aa(N,{testID:"buoy-rq-filter-badge-button",accessibilityRole:"button",accessibilityLabel:`Showing ${t} of ${e}, open filters`,onPress:r,activeOpacity:.7,children:a}):a}var Da=T.create({container:{flexDirection:"row",alignItems:"center",justifyContent:"center",paddingVertical:2},text:{fontSize:9,color:_s.color.textTertiary,fontFamily:Js}});import{jsx as Ra,jsxs as Xs}from"react/jsx-runtime";function Qa({selectedQuery:e,onQuerySelect:t,activeFilter:r,searchText:a="",ignoredPatterns:o=new Set,includedPatterns:n=new Set,onFilterPress:i}){let l=n.size>0,s=o.size>0,u=vt(),c=mi(()=>{let d=u;return n.size>0&&(d=d.filter(f=>{if(!f?.queryKey)return false;let b=(Array.isArray(f.queryKey)?f.queryKey:[f.queryKey]).filter(y=>y!=null).map(y=>String(y)).join(" ").toLowerCase();return Array.from(n).some(y=>b.includes(y.toLowerCase()))})),o.size>0&&(d=d.filter(f=>{if(!f?.queryKey)return true;let b=(Array.isArray(f.queryKey)?f.queryKey:[f.queryKey]).filter(y=>y!=null).map(y=>String(y)).join(" ").toLowerCase();return!Array.from(o).some(y=>b.includes(y.toLowerCase()))})),d.length},[u,n,o]);return Xs(h,{style:Ia.queryListContainer,children:[(l||s)&&Ra(Ys,{totalCount:u.length,filteredCount:c,onPress:i}),Ra(Ur,{selectedQuery:e,onQuerySelect:t,activeFilter:r,searchText:a,ignoredPatterns:o,includedPatterns:n,emptyState:fi({subject:"queries",verb:"active",search:a,total:u.length,blocked:r?`No ${r} queries. Pick another status to see the rest.`:l?`No queries match your "include only" filters. ${n.size} pattern(s) active.`:s?`No queries match the current filters. ${o.size} pattern(s) excluded.`:void 0,waiting:{otto:"scanning",title:"No queries found",message:`No React Query queries are currently active.
2
2
 
3
3
  To see queries here:
4
4
  \u2022 Make API calls using useQuery
5
5
  \u2022 Ensure queries are within QueryClientProvider
6
- \u2022 Check console for debugging info`}}),contentContainerStyle:Ro.queryListContent})]})}var Ro=M.create({queryListContainer:{flex:1,backgroundColor:"transparent"},queryListContent:{padding:8,backgroundColor:"transparent",flexGrow:1}});import{ToolFooter as Bs,useSafeAreaInsets as Hs}from"@buoy-gg/shared-ui/web";import{jsx as ar}from"react/jsx-runtime";function Io({activeFilter:e,onFilterChange:t,isFloatingMode:r=true,size:o="default"}){let a=Hs({minBottom:16});return ar(Bs,{floating:r,safeArea:false,paddingBottom:r?0:a.bottom,style:ko.filterFooter,children:ar(f,{style:ko.filterContainer,children:ar(no,{activeFilter:e,onFilterChange:t,size:o})})})}var ko=M.create({filterFooter:{paddingTop:8,paddingHorizontal:0},filterContainer:{minHeight:32,justifyContent:"center"}});import{useMemo as nt}from"react";import{DynamicFilterView as Ws,buoyColors as qe}from"@buoy-gg/shared-ui/web";import{XCircle as Eo,Clock as nr,RefreshCw as js,Globe as Vs,Zap as $s,Filter as Ns,Eye as Us}from"@buoy-gg/shared-ui/web";import{jsx as _s}from"react/jsx-runtime";function Js({queries:e,activeFilter:t,onFilterChange:r,ignoredPatterns:o,onPatternToggle:a,includedPatterns:n,onIncludedPatternToggle:s}){let i=nt(()=>{let h={all:e.length,disabled:0,fresh:0,stale:0,fetching:0,paused:0,inactive:0,error:0};return e.forEach(g=>{let y=oe(g);y==="disabled"?h.disabled++:y==="error"?h.error++:y==="fresh"?h.fresh++:y==="stale"?h.stale++:y==="fetching"?h.fetching++:y==="paused"?h.paused++:y==="inactive"&&h.inactive++}),h},[e]),l=nt(()=>{let h=new Set;return e.forEach(g=>{if(!g?.queryKey)return;(Array.isArray(g.queryKey)?g.queryKey:[g.queryKey]).forEach(y=>{if(y!=null){let m=String(y);/^\d+$/.test(m)||h.add(m)}})}),Array.from(h).sort().slice(0,50)},[e]),u=nt(()=>l,[l]),c=nt(()=>{let h=e;return n.size>0&&(h=h.filter(g=>{if(!g?.queryKey)return false;let y=(Array.isArray(g.queryKey)?g.queryKey:[g.queryKey]).filter(m=>m!=null).map(m=>String(m)).join(" ").toLowerCase();return Array.from(n).some(m=>y.includes(m.toLowerCase()))})),o.size>0&&(h=h.filter(g=>{if(!g?.queryKey)return true;let y=(Array.isArray(g.queryKey)?g.queryKey:[g.queryKey]).filter(m=>m!=null).map(m=>String(m)).join(" ").toLowerCase();return!Array.from(o).some(m=>y.includes(m.toLowerCase()))})),h.length},[e,n,o]),d=nt(()=>({filterSummarySection:{enabled:true,totalCount:e.length,filteredCount:c,includePatterns:n,excludePatterns:o},sections:[{id:"status",title:"Status",type:"status",data:[{id:"status::all",label:"All",count:i.all,icon:Vs,color:qe.primary,isActive:!t||t==="all"},{id:"status::disabled",label:"Disabled",count:i.disabled,icon:Eo,color:qe.textMuted,isActive:t==="disabled"},{id:"status::fresh",label:"Fresh",count:i.fresh,icon:$s,color:qe.success,isActive:t==="fresh"},{id:"status::stale",label:"Stale",count:i.stale,icon:nr,color:qe.warning,isActive:t==="stale"},{id:"status::fetching",label:"Fetching",count:i.fetching,icon:js,color:qe.primary,isActive:t==="fetching"},{id:"status::paused",label:"Paused",count:i.paused,icon:nr,color:qe.textMuted,isActive:t==="paused"},{id:"status::inactive",label:"Inactive",count:i.inactive,icon:nr,color:qe.textSecondary,isActive:t==="inactive"},{id:"status::error",label:"Error",count:i.error,icon:Eo,color:qe.error,isActive:t==="error"}]}],addFilterSection:{enabled:true,placeholder:"Enter pattern to exclude...",title:"EXCLUDE FILTERS",icon:Ns},includeOnlySection:{enabled:true,title:"INCLUDE ONLY FILTERS",description:"Show ONLY queries matching these patterns. All non-matching queries will be hidden.",placeholder:"Enter pattern to include...",icon:Us,patterns:n,onPatternToggle:s,onPatternAdd:s},availableItemsSection:{enabled:true,title:"AVAILABLE QUERY KEYS",emptyMessage:"No queries found. Query keys will appear here once queries are active.",items:u},howItWorksSection:{enabled:true,title:"HOW QUERY FILTERS WORK",description:"There are two types of query key filters:",examples:["","INCLUDE ONLY (green):","\u2022 Shows ONLY queries matching the pattern","\u2022 Example: 'rewards' \u2192 shows only reward queries","\u2022 When active, non-matching queries are hidden","","EXCLUDE (blue):","\u2022 Hides queries matching the pattern","\u2022 Example: 'analytics' \u2192 hides analytics queries","","Filters are case-insensitive and match partial keys."]},activePatterns:o}),[i,t,o,n,u,s,e.length,c]);return _s(Ws,{...d,onFilterChange:h=>{let[g,y]=h.split("::");g==="status"?r(y==="all"||t===y?null:y):g==="suggestion"&&a(y)},onPatternToggle:a,onPatternAdd:a})}import{useState as it,useCallback as wt,useEffect as qt}from"react";import{devToolsStorageKeys as Ve,persistentStorage as Tt}from"@buoy-gg/shared-ui/web";import{jsx as de,jsxs as Gs}from"react/jsx-runtime";function Fo({visible:e,selectedQueryKey:t,onQuerySelect:r,onClose:o,onMinimize:a,activeFilter:n,onFilterChange:s,enableSharedModalDimensions:i=false,onTabChange:l,searchText:u="",onSearchChange:c}){let d=ja(),h=Cr(t),g=gt(),y=wt(()=>{d.getQueryCache().clear()},[d]),[m,C]=it(null),v=n??m,b=s??C,[x,S]=it(false),[w,A]=it(new Set),[Y,Qe]=it(new Set);qt(()=>{(async()=>{try{let q=await Tt.getItem(Ve.reactQuery.ignoredPatterns());if(q){let le=JSON.parse(q);Array.isArray(le)&&A(new Set(le))}}catch(q){console.error("Failed to load ignored patterns:",q)}})()},[]),qt(()=>{(async()=>{try{let q=await Tt.getItem(Ve.reactQuery.includedPatterns());if(q){let le=JSON.parse(q);Array.isArray(le)&&Qe(new Set(le))}}catch(q){console.error("Failed to load included patterns:",q)}})()},[]),qt(()=>{(async()=>{try{let q=Array.from(w);await Tt.setItem(Ve.reactQuery.ignoredPatterns(),JSON.stringify(q))}catch(q){console.error("Failed to save ignored patterns:",q)}})()},[w]),qt(()=>{(async()=>{try{let q=Array.from(Y);await Tt.setItem(Ve.reactQuery.includedPatterns(),JSON.stringify(q))}catch(q){console.error("Failed to save included patterns:",q)}})()},[Y]);let T=wt(q=>{A(le=>{let ue=new Set(le);return ue.has(q)?ue.delete(q):ue.add(q),ue})},[]),Ge=wt(q=>{Qe(le=>{let ue=new Set(le);return ue.has(q)?ue.delete(q):ue.add(q),ue})},[]),[ut,Ot]=it("bottomSheet"),he=i?Ve.reactQuery.modal():Ve.reactQuery.browserModal(),fe=wt(q=>{Ot(q)},[]),ct=$a({minBottom:16}),dt=ut==="floating"?56:48+ct.bottom;if(!e)return null;let zt=()=>{if(x){let q=[{key:"filters",label:"Filters"}];return Gs(Lt,{children:[de(Lt.Navigation,{onBack:()=>S(false)}),de(Lt.Content,{title:"",noMargin:true,children:de(Na,{tabs:q,activeTab:"filters",testIDPrefix:"buoy-rq-filterview-tab",onTabChange:()=>{}})})]})}return de(Xe,{selectedQuery:h,activeTab:"queries",onTabChange:l,onBack:()=>r(void 0),searchText:u,onSearchChange:c,onFilterPress:()=>S(true),hasActiveFilters:v!==null||w.size>0||Y.size>0,onClearCache:y})},Kt=de(Io,{activeFilter:v,onFilterChange:b,isFloatingMode:ut==="floating"});return de(Va,{visible:e,onClose:o,onMinimize:a,persistenceKey:he,header:{customContent:zt(),showToggleButton:true},onModeChange:fe,enablePersistence:true,initialMode:"bottomSheet",enableGlitchEffects:true,disableScrollWrapper:!x,styles:{},footer:x?void 0:Kt,footerHeight:x?void 0:dt,children:de(f,{style:Ys.container,children:x?de(Js,{queries:g,activeFilter:v,onFilterChange:b,ignoredPatterns:w,onPatternToggle:T,includedPatterns:Y,onIncludedPatternToggle:Ge}):de(Qo,{selectedQuery:h,onQuerySelect:r,activeFilter:v,searchText:u,ignoredPatterns:w,includedPatterns:Y,onFilterPress:()=>S(true)})})})}var Ys=M.create({container:{flex:1,backgroundColor:"transparent"}});import{JsModal as Xs,devToolsStorageKeys as Po,useSafeAreaInsets as Zs}from"@buoy-gg/shared-ui/web";import{useQueryClient as Oo}from"@tanstack/react-query";import{useSafeAreaInsets as zo,night as O,monoFont as Ko}from"@buoy-gg/shared-ui/web";import{useMemo as el}from"react";function ir(e,t,r){return el(()=>{let o=e.state.status;return[{label:"Refetch",variant:"refetch",disabled:oe(e)==="fetching",onPress:()=>Jt({query:e})},{label:e.state.fetchStatus==="fetching"?"Restore Loading":"Trigger Loading",variant:"triggerLoading",disabled:false,onPress:()=>_t({query:e})},{label:o==="error"?"Restore Error":"Trigger Error",variant:"triggerError",disabled:o==="pending",onPress:()=>Gt({query:e,queryClient:t})}]},[e,t,r])}import{DataViewer as tl}from"@buoy-gg/shared-ui/web/dataViewer";import{Fragment as rl,jsx as R,jsxs as $e}from"react/jsx-runtime";function Lo({selectedQuery:e,isFloatingMode:t,disableInternalFooter:r=false,queryVersion:o}){let a=zo({minBottom:16}),n=Oo(),s=ir(e,n,o);return $e(rl,{children:[$e(me,{testID:"buoy-rq-detail-scroll",accessibilityLabel:"Data editor mode",accessibilityHint:"View data editor mode","sentry-label":"ignore data editor mode",style:I.explorerScrollContainer,contentContainerStyle:[I.explorerScrollContent,!r&&{paddingBottom:72}],children:[$e(f,{style:I.section,children:[R(al,{visible:!!e.state.data,selectedQuery:e,queryVersion:o}),R(nl,{visible:!e.state.data,selectedQuery:e})]}),R(f,{style:I.section,children:R(Nt,{query:e})}),R(f,{style:I.section,children:$e(f,{style:I.queryExplorerContainer,children:[R(p,{testID:"buoy-rq-query-explorer-header",style:I.queryExplorerHeader,children:"Query Explorer"}),R(f,{style:I.queryExplorerContent,children:R(tl,{title:"",data:e,maxDepth:10,rawMode:true,showTypeFilter:true,initialExpanded:false})})]})})]}),!r&&R(f,{style:[I.actionFooter,{paddingBottom:t?0:a.bottom+8}],children:R(f,{style:I.actionsRow,children:s.map((i,l)=>R(ne,{testID:`buoy-rq-action-${i.variant}`,onClick:i.onPress,text:i.label,variant:i.variant,disabled:i.disabled},l))})})]})}function ol({selectedQuery:e,isFloatingMode:t,queryVersion:r}){let o=zo({minBottom:16}),a=Oo(),n=ir(e,a,r);return R(f,{style:[I.actionFooter,{paddingBottom:t?0:o.bottom+8}],children:R(f,{style:I.actionsRow,children:n.map((s,i)=>R(ne,{testID:`buoy-rq-action-${s.variant}`,onClick:s.onPress,text:s.label,variant:s.variant,disabled:s.disabled},i))})})}function al({visible:e,selectedQuery:t,queryVersion:r=0}){return e?$e(f,{style:I.dataContainer,children:[R(p,{testID:"buoy-rq-data-header",style:I.dataHeader,children:"Data Editor"}),R(f,{style:I.dataContent,children:R(ce,{editable:true,label:"Data",value:t.state.data,defaultExpanded:["Data"],activeQuery:t,dataVersion:r})})]}):null}function nl({visible:e,selectedQuery:t}){if(!e)return null;let r=()=>t.isDisabled()?{title:"Query Disabled",description:"This query is disabled and won't automatically fetch. Enable the query or manually trigger a fetch to load data."}:t.state.status==="pending"||oe(t)==="fetching"?{title:t.state.status==="pending"?"Loading...":"Refetching...",description:"Please wait while the query is being executed."}:t.state.status==="error"?{title:"Query Error",description:t.state.error?.message||"An error occurred while fetching data."}:{title:"No Data Available",description:"This query has no data to edit. Try refetching the query first."},{title:o,description:a}=r();return $e(f,{style:I.emptyState,children:[R(p,{testID:"buoy-rq-detail-empty-title",style:I.emptyTitle,children:o}),R(p,{testID:"buoy-rq-detail-empty-description",style:I.emptyDescription,children:a})]})}var I=M.create({explorerScrollContainer:{flex:1},explorerScrollContent:{paddingBottom:16,paddingHorizontal:8,flexGrow:1},section:{marginBottom:16},emptyState:{flex:1,justifyContent:"center",alignItems:"center",padding:32},emptyTitle:{color:O.color.text,fontSize:18,fontWeight:"600",marginBottom:8,textAlign:"center"},emptyDescription:{color:O.color.textSecondary,fontSize:14,textAlign:"center",lineHeight:20,maxWidth:280},actionFooter:{borderTopWidth:1,borderTopColor:O.color.border,paddingTop:8,paddingHorizontal:12,backgroundColor:"transparent",borderBottomLeftRadius:14,borderBottomRightRadius:14},actionsRow:{flexDirection:"row",alignItems:"center",gap:8},queryExplorerContainer:{minWidth:200,backgroundColor:O.color.surface,borderRadius:6,borderWidth:1,borderColor:O.color.accent+"4D",overflow:"hidden",shadowColor:O.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},queryExplorerHeader:{backgroundColor:O.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:O.color.accent,borderBottomWidth:1,borderBottomColor:O.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:Ko},queryExplorerContent:{padding:8},dataContainer:{minWidth:200,backgroundColor:O.color.surface,borderRadius:6,borderWidth:1,borderColor:O.color.accent+"4D",overflow:"hidden",shadowColor:O.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6,marginTop:8},dataHeader:{backgroundColor:O.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:O.color.accent,borderBottomWidth:1,borderBottomColor:O.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:Ko},dataContent:{padding:8}});import{useState as il,useCallback as sl,useEffect as ll,useRef as ul}from"react";import{jsx as Mt}from"react/jsx-runtime";function Bo({visible:e,selectedQueryKey:t,onQuerySelect:r,onClose:o,onMinimize:a,enableSharedModalDimensions:n=false,onTabChange:s}){let{query:i,version:l}=Bt(t),[u,c]=il("bottomSheet"),d=t?JSON.stringify(t):void 0,h=ul(void 0);ll(()=>{if(i){h.current=d;return}e&&h.current!==void 0&&h.current===d&&(h.current=void 0,r(void 0))},[e,i,d,r]);let g=sl(x=>{c(x)},[]),y=Zs({minBottom:16}),m=u==="floating"?72:80+y.bottom,C=()=>Mt(Xe,{selectedQuery:i,activeTab:"queries",onTabChange:s,onBack:()=>r(void 0)}),v=n?Po.reactQuery.modal():`${Po.reactQuery.modal()}_data_editor`;if(!e||!i)return null;let b=Mt(ol,{selectedQuery:i,isFloatingMode:u==="floating",queryVersion:l},`footer-${l}`);return Mt(Xs,{visible:e,onClose:o,onMinimize:a,persistenceKey:v,header:{customContent:C(),showToggleButton:true},onModeChange:g,enablePersistence:true,initialMode:"bottomSheet",enableGlitchEffects:true,styles:{},footer:b,footerHeight:m,children:Mt(Lo,{selectedQuery:i,isFloatingMode:u==="floating",disableInternalFooter:true,queryVersion:l})})}import{useQueryClient as cl}from"@tanstack/react-query";import{useCallback as sr,useState as Ho,useRef as Wo}from"react";import{useEffect as dl,useState as yl}from"react";import{useQueryClient as hl}from"@tanstack/react-query";function lr(e){let t=hl(),[r,o]=yl(void 0);return dl(()=>{let a=()=>{if(e!==void 0){let s=t.getMutationCache().getAll().find(i=>i.mutationId===e);o(s)}else o(void 0)};setTimeout(a,0);let n=t.getMutationCache().subscribe(a);return()=>n()},[t,e]),r}import{jsx as jo}from"react/jsx-runtime";function Vo({selectedMutation:e,onMutationSelect:t,activeFilter:r,searchText:o=""}){let a=n=>{t(typeof n=="function"?n(e):n)};return jo(f,{style:$o.mutationListContainer,children:jo(po,{selectedMutation:e,setSelectedMutation:a,activeFilter:r,searchText:o,hideInfoPanel:true,contentContainerStyle:$o.mutationListContent})})}var $o=M.create({mutationListContainer:{flex:1,backgroundColor:"transparent"},mutationListContent:{padding:8,backgroundColor:"transparent"}});import{ToolFooter as fl,useSafeAreaInsets as ml}from"@buoy-gg/shared-ui/web";import{useMemo as gl}from"react";import{jsx as ur}from"react/jsx-runtime";function No({activeFilter:e,onFilterChange:t,modalMode:r,size:o="default"}){let a=r==="floating",n=ml({minBottom:16}),s=gl(()=>a?0:n.bottom,[a,n.bottom]);return ur(fl,{floating:a,safeArea:false,paddingBottom:s,style:Uo.filterFooter,children:ur(f,{style:Uo.filterContainer,children:ur(bo,{activeFilter:e,onFilterChange:t,size:o})})},`footer-${a?"floating":"docked"}`)}var Uo=M.create({filterFooter:{paddingTop:8,paddingHorizontal:0},filterContainer:{minHeight:32,justifyContent:"center"}});import{JsModal as pl,useSafeAreaInsets as bl}from"@buoy-gg/shared-ui/web";import{absoluteFill as vl}from"@buoy-gg/shared-ui/web";import{useMemo as H}from"react";import{ChevronLeft as Sl,ChevronRight as Cl,night as At}from"@buoy-gg/shared-ui/web";import{jsx as Ne,jsxs as xl}from"react/jsx-runtime";var ze=32,_o=6,Jo=ze,wl=120,Dt=.95,Go=1.15;function Yo({translationX:e,maxTranslation:t=wl,canSwipeLeft:r=true,canSwipeRight:o=true}){let a=H(()=>e.interpolate({inputRange:[0,t],outputRange:[0,1],extrapolate:"clamp"}),[e,t]),n=H(()=>a.interpolate({inputRange:[0,1],outputRange:[_o,Jo]}),[a]),s=H(()=>a.interpolate({inputRange:[0,Dt,1],outputRange:[1,1,Go]}),[a]),i=H(()=>a.interpolate({inputRange:[0,.99,1],outputRange:[0,0,16]}),[a]),l=H(()=>a.interpolate({inputRange:[0,.01],outputRange:[0,1],extrapolate:"clamp"}),[a]),u=H(()=>a.interpolate({inputRange:[0,.5,1],outputRange:[0,0,1],extrapolate:"clamp"}),[a]),c=H(()=>a.interpolate({inputRange:[0,.5,Dt,1],outputRange:[.8,.8,1,1.2]}),[a]),d=H(()=>e.interpolate({inputRange:[-t,0],outputRange:[1,0],extrapolate:"clamp"}),[e,t]),h=H(()=>d.interpolate({inputRange:[0,1],outputRange:[_o,Jo]}),[d]),g=H(()=>d.interpolate({inputRange:[0,Dt,1],outputRange:[1,1,Go]}),[d]),y=H(()=>d.interpolate({inputRange:[0,.99,1],outputRange:[0,0,-16]}),[d]),m=H(()=>d.interpolate({inputRange:[0,.01],outputRange:[0,1],extrapolate:"clamp"}),[d]),C=H(()=>d.interpolate({inputRange:[0,.5,1],outputRange:[0,0,1],extrapolate:"clamp"}),[d]),v=H(()=>d.interpolate({inputRange:[0,.5,Dt,1],outputRange:[.8,.8,1,1.2]}),[d]);return xl(f,{style:cr.container,pointerEvents:"none",children:[o&&Ne(X.View,{style:[cr.leftWrapper,{width:n,height:ze,borderRadius:ze/2,backgroundColor:At.color.text+"E6",justifyContent:"center",alignItems:"center",opacity:l,transform:[{scale:s},{translateX:i}]}],children:Ne(X.View,{style:{opacity:u,transform:[{scale:c}]},children:Ne(Sl,{size:ze*.6,color:At.color.accent,strokeWidth:3})})}),r&&Ne(X.View,{style:[cr.rightWrapper,{width:h,height:ze,borderRadius:ze/2,backgroundColor:At.color.text+"E6",justifyContent:"center",alignItems:"center",opacity:m,transform:[{scale:g},{translateX:y}]}],children:Ne(X.View,{style:{opacity:C,transform:[{scale:v}]},children:Ne(Cl,{size:ze*.6,color:At.color.accent,strokeWidth:3})})})]})}var cr=M.create({container:{...vl,zIndex:1e3,justifyContent:"center",alignItems:"center"},leftWrapper:{position:"absolute",left:16},rightWrapper:{position:"absolute",right:16}});import{devToolsStorageKeys as Xo}from"@buoy-gg/shared-ui/web";import{jsx as Ue,jsxs as ql}from"react/jsx-runtime";function Zo({visible:e,selectedMutationId:t,onMutationSelect:r,onClose:o,onMinimize:a,activeFilter:n,onFilterChange:s,onTabChange:i,enableSharedModalDimensions:l=false,searchText:u="",onSearchChange:c}){let d=cl(),h=lr(t),[g,y]=Ho(null),m=n??g,C=s??y,v=sr(()=>{d.getMutationCache().clear(),r(void 0)},[d,r]),[b,x]=Ho("bottomSheet"),S=l?Xo.reactQuery.modal():Xo.reactQuery.mutationModal(),w=Wo(new X.Value(0)).current,A=sr(he=>{he==="right"&&i("queries")},[i]),Y=sr(he=>{x(he)},[]),Qe=bl({minBottom:16}),T=b==="floating"?56:48+Qe.bottom,Ge=Wo(Ht.create({onStartShouldSetPanResponder:()=>false,onMoveShouldSetPanResponder:(he,fe)=>Math.abs(fe.dx)>5&&Math.abs(fe.dy)<10,onPanResponderMove:(he,fe)=>{w.setValue(fe.dx)},onPanResponderRelease:(he,fe)=>{let{dx:ct,vx:dt}=fe,zt=80,Kt=.5;X.spring(w,{toValue:0,useNativeDriver:true}).start(),(Math.abs(ct)>zt||Math.abs(dt)>Kt)&&(ct>0||dt>0?A("right"):A("left"))},onPanResponderTerminate:()=>{X.spring(w,{toValue:0,useNativeDriver:true}).start()}})).current;if(!e)return null;let ut=()=>Ue(Xe,{selectedMutation:h,activeTab:"mutations",onTabChange:i,onBack:()=>r(void 0),searchText:u,onSearchChange:c,onClearCache:v}),Ot=Ue(No,{activeFilter:m,onFilterChange:C,modalMode:b});return Ue(pl,{visible:e,onClose:o,onMinimize:a,persistenceKey:S,header:{customContent:ut(),showToggleButton:true},onModeChange:Y,enablePersistence:true,initialMode:"bottomSheet",enableGlitchEffects:true,styles:{},footer:Ot,footerHeight:T,children:Ue(f,{style:{flex:1},children:ql(f,{...Ge.panHandlers,style:{flex:1},children:[Ue(Yo,{translationX:w,canSwipeLeft:false,canSwipeRight:true}),Ue(Vo,{selectedMutation:h,onMutationSelect:r,activeFilter:m,searchText:u})]})})})}import{JsModal as Tl,useSafeAreaInsets as Ml,devToolsStorageKeys as ea}from"@buoy-gg/shared-ui/web";import{useSafeAreaInsets as Al,night as z,monoFont as ta}from"@buoy-gg/shared-ui/web";import{useMemo as Dl}from"react";import{useQueryClient as Ql}from"@tanstack/react-query";function ra(e){let t=Ql();return Dl(()=>[{label:"Remove",variant:"remove",disabled:false,onPress:()=>t.getMutationCache().remove(e)}],[e,t])}import{DataViewer as Rl}from"@buoy-gg/shared-ui/web/dataViewer";import{Fragment as Il,jsx as k,jsxs as _e}from"react/jsx-runtime";function oa({selectedMutation:e,isFloatingMode:t,disableInternalFooter:r=false}){return _e(Il,{children:[_e(me,{testID:"buoy-rq-mutation-detail-scroll",accessibilityLabel:"Mutation editor mode",accessibilityHint:"View mutation editor mode","sentry-label":"ignore mutation editor mode",style:F.explorerScrollContainer,contentContainerStyle:F.explorerScrollContent,children:[_e(f,{style:F.section,children:[k(kl,{visible:!!e.state.data,selectedMutation:e}),k(El,{visible:!e.state.data,selectedMutation:e})]}),k(f,{style:F.section,children:k(rr,{selectedMutation:e})}),k(f,{style:F.section,children:_e(f,{style:F.mutationExplorerContainer,children:[k(p,{style:F.mutationExplorerHeader,children:"Mutation Explorer"}),k(f,{style:F.mutationExplorerContent,children:k(Rl,{title:"",data:e,maxDepth:10,rawMode:true,showTypeFilter:true,initialExpanded:false})})]})})]}),!r&&k(aa,{selectedMutation:e,isFloatingMode:t})]})}function aa({selectedMutation:e,isFloatingMode:t}){let r=Al({minBottom:16}),o=ra(e);return k(f,{style:[F.actionFooter,{paddingBottom:t?0:r.bottom+8}],children:k(f,{style:F.actionsGrid,children:o.map((a,n)=>k(ne,{testID:`buoy-rq-action-${a.variant}`,onClick:a.onPress,text:a.label,variant:a.variant,disabled:a.disabled},n))})})}function kl({visible:e,selectedMutation:t}){return e?_e(f,{style:F.dataContainer,children:[k(p,{style:F.dataHeader,children:"Data Editor"}),k(f,{style:F.dataContent,children:k(ce,{editable:true,label:"Data",value:t.state.data,defaultExpanded:["Data"]},t.mutationId)})]}):null}function El({visible:e,selectedMutation:t}){if(!e)return null;let r=()=>t.state.status==="pending"?{title:"Pending...",description:"The mutation is in progress."}:t.state.status==="error"?{title:"Mutation Error",description:t.state.error?.message||"An error occurred."}:{title:"No Data Available",description:"This mutation has no data."},{title:o,description:a}=r();return _e(f,{style:F.emptyState,children:[k(p,{testID:"buoy-rq-mutation-detail-empty-title",style:F.emptyTitle,children:o}),k(p,{testID:"buoy-rq-mutation-detail-empty-description",style:F.emptyDescription,children:a})]})}var F=M.create({explorerScrollContainer:{flex:1},explorerScrollContent:{paddingBottom:16,paddingHorizontal:8,flexGrow:1},section:{marginBottom:16},emptyState:{flex:1,justifyContent:"center",alignItems:"center",padding:32},emptyTitle:{color:z.color.text,fontSize:18,fontWeight:"600",marginBottom:8,textAlign:"center"},emptyDescription:{color:z.color.textSecondary,fontSize:14,textAlign:"center",lineHeight:20,maxWidth:280},actionFooter:{borderTopWidth:1,borderTopColor:z.color.border,paddingVertical:8,paddingHorizontal:12,backgroundColor:"transparent",borderBottomLeftRadius:14,borderBottomRightRadius:14},actionsGrid:{flexDirection:"row",flexWrap:"wrap",gap:6,justifyContent:"space-between"},mutationExplorerContainer:{minWidth:200,backgroundColor:z.color.surface,borderRadius:6,borderWidth:1,borderColor:z.color.accent+"4D",overflow:"hidden",shadowColor:z.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},mutationExplorerHeader:{backgroundColor:z.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:z.color.accent,borderBottomWidth:1,borderBottomColor:z.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:ta},mutationExplorerContent:{padding:8},dataContainer:{minWidth:200,backgroundColor:z.color.surface,borderRadius:6,borderWidth:1,borderColor:z.color.accent+"4D",overflow:"hidden",shadowColor:z.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},dataHeader:{backgroundColor:z.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:z.color.accent,borderBottomWidth:1,borderBottomColor:z.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:ta},dataContent:{padding:8}});import{useState as Fl,useCallback as Pl,useEffect as Ol,useRef as zl}from"react";import{jsx as Qt}from"react/jsx-runtime";function na({visible:e,selectedMutationId:t,onMutationSelect:r,onClose:o,onMinimize:a,onTabChange:n,enableSharedModalDimensions:s=false}){let i=lr(t),[l,u]=Fl("bottomSheet"),c=zl(void 0);Ol(()=>{if(i){c.current=i.mutationId;return}e&&c.current!==void 0&&c.current===t&&(c.current=void 0,r(void 0))},[e,i,t,r]);let d=Pl(v=>{u(v)},[]),h=Ml({minBottom:16}),g=l==="floating"?72:80+h.bottom,y=()=>Qt(Xe,{selectedMutation:i,activeTab:"mutations",onTabChange:n,onBack:()=>r(void 0)}),m=s?ea.reactQuery.modal():ea.reactQuery.mutationModal();if(!e||!i)return null;let C=Qt(aa,{selectedMutation:i,isFloatingMode:l==="floating"});return Qt(Tl,{visible:e,onClose:o,onMinimize:a,persistenceKey:m,header:{customContent:y(),showToggleButton:true},onModeChange:d,enablePersistence:true,initialMode:"bottomSheet",enableGlitchEffects:true,styles:{},footer:C,footerHeight:g,children:Qt(oa,{selectedMutation:i,isFloatingMode:l==="floating",disableInternalFooter:true})})}import{Fragment as Kl,jsx as Rt,jsxs as Ll}from"react/jsx-runtime";function ia({visible:e,selectedQueryKey:t,selectedMutationId:r,onQuerySelect:o,onMutationSelect:a,onClose:n,onMinimize:s,activeFilter:i,onFilterChange:l,activeTab:u,onTabChange:c,enableSharedModalDimensions:d=false,searchText:h="",onSearchChange:g}){let y=!!t||!!r,m=u==="queries",C=u==="mutations",v={onClose:n,onMinimize:s,activeFilter:i,onFilterChange:l,enableSharedModalDimensions:d},b=e&&!y&&m,x=e&&!y&&C,S=e&&y&&m&&!!t,w=e&&y&&C&&!!r;return Ll(Kl,{children:[Rt(Fo,{visible:b,selectedQueryKey:t,onQuerySelect:o,onTabChange:c,searchText:h,onSearchChange:g,...v}),Rt(Zo,{visible:x,selectedMutationId:r,onMutationSelect:a,onTabChange:c,searchText:h,onSearchChange:g,...v}),Rt(Bo,{visible:S,selectedQueryKey:t,onQuerySelect:o,onTabChange:c,...v}),Rt(na,{visible:w,selectedMutationId:r,onMutationSelect:a,onTabChange:c,...v})]})}import{ChangeLog as Bl}from"@buoy-gg/shared-ui/web";var Hl=0;function Te(){return`rq-${Date.now()}-${++Hl}`}var Wl=class extends Bl{constructor(){super({max:200});this.queryClient=null;this.queryUnsubscribe=null;this.mutationUnsubscribe=null;this.fetchStartTimes=new Map;this.mutationStartTimes=new Map;this.lastQueryStates=new Map;this.lastMutationStates=new Map}setQueryClient(e){this.disconnect(),this.queryClient=e,this.queryUnsubscribe=e.getQueryCache().subscribe(t=>{t.type==="updated"&&t.query&&this.handleQueryUpdate(t.query)}),this.mutationUnsubscribe=e.getMutationCache().subscribe(t=>{t.type==="updated"&&t.mutation&&this.handleMutationUpdate(t.mutation)})}disconnect(){this.queryUnsubscribe&&(this.queryUnsubscribe(),this.queryUnsubscribe=null),this.mutationUnsubscribe&&(this.mutationUnsubscribe(),this.mutationUnsubscribe=null),this.queryClient=null,this.lastQueryStates.clear(),this.lastMutationStates.clear(),this.fetchStartTimes.clear(),this.mutationStartTimes.clear()}handleQueryUpdate(e){if(pe(e.queryKey))return;let t=e.queryHash,r={fetchStatus:e.state.fetchStatus,status:e.state.status},o=this.lastQueryStates.get(t);if(!o)r.fetchStatus==="fetching"&&(this.fetchStartTimes.set(t,Date.now()),this.addEvent({id:Te(),type:"query-fetch-start",timestamp:Date.now(),queryKey:e.queryKey,queryHash:t,query:e}));else{let a=o.fetchStatus==="fetching",n=r.fetchStatus==="fetching";if(!a&&n&&(this.fetchStartTimes.set(t,Date.now()),this.addEvent({id:Te(),type:"query-fetch-start",timestamp:Date.now(),queryKey:e.queryKey,queryHash:t,query:e})),a&&!n){let s=this.fetchStartTimes.get(t),i=s?Date.now()-s:void 0;this.fetchStartTimes.delete(t),r.status==="error"?this.addEvent({id:Te(),type:"query-fetch-error",timestamp:Date.now(),queryKey:e.queryKey,queryHash:t,queryError:e.state.error,duration:i,query:e}):this.addEvent({id:Te(),type:"query-fetch-success",timestamp:Date.now(),queryKey:e.queryKey,queryHash:t,queryData:e.state.data,duration:i,query:e})}!o.status&&e.state.isInvalidated&&this.addEvent({id:Te(),type:"query-invalidated",timestamp:Date.now(),queryKey:e.queryKey,queryHash:t,query:e})}this.lastQueryStates.set(t,r)}handleMutationUpdate(e){let t=e.mutationId,r=e.state.status,o=this.lastMutationStates.get(t);if(o!==r){if(r==="pending"&&o!=="pending")this.mutationStartTimes.set(t,Date.now()),this.addEvent({id:Te(),type:"mutation-start",timestamp:Date.now(),mutationId:t,mutationKey:e.options.mutationKey,mutationVariables:e.state.variables,mutation:e});else if(r==="success"&&o==="pending"){let a=this.mutationStartTimes.get(t),n=a?Date.now()-a:void 0;this.mutationStartTimes.delete(t),this.addEvent({id:Te(),type:"mutation-success",timestamp:Date.now(),mutationId:t,mutationKey:e.options.mutationKey,mutationVariables:e.state.variables,mutationData:e.state.data,duration:n,mutation:e})}else if(r==="error"&&o==="pending"){let a=this.mutationStartTimes.get(t),n=a?Date.now()-a:void 0;this.mutationStartTimes.delete(t),this.addEvent({id:Te(),type:"mutation-error",timestamp:Date.now(),mutationId:t,mutationKey:e.options.mutationKey,mutationVariables:e.state.variables,mutationError:e.state.error,duration:n,mutation:e})}}this.lastMutationStates.set(t,r)}addEvent(e){this.record(e)}getEvents(){return this.items}subscribe(e){let t=super.subscribe(e);return e(this.items),t}clearEvents(){this.clear()}isConnected(){return this.queryClient!==null}},Ke=new Wl,jl=e=>Ke.setQueryClient(e),Vl=()=>Ke.disconnect();import{jsx as sa}from"react/jsx-runtime";function dr({visible:e,onClose:t,onMinimize:r,enableSharedModalDimensions:o=true}){let a=Ha();Ba(()=>{Ke.isConnected()||Ke.setQueryClient(a)},[a]);let[n,s]=Ye(void 0),[i,l]=Ye(void 0),[u,c]=Ye(null),[d,h]=Ye("queries"),[g,y]=Ye(""),m=Re(()=>{s(void 0),l(void 0),c(null),h("queries"),y("")},[]),C=Re(()=>{m(),t()},[t,m]),v=Re(A=>{s(A?.queryKey)},[]),b=Re(A=>{l(A?.mutationId)},[]),x=Re(A=>{c(A)},[]),S=Re(A=>{h(A),c(null),s(void 0),l(void 0),y("")},[]),w=Re(A=>{y(A)},[]);return e?sa(Wa,{children:sa(ia,{visible:e,selectedQueryKey:n,selectedMutationId:i,onQuerySelect:v,onMutationSelect:b,onClose:C,onMinimize:r,activeFilter:u,onFilterChange:x,activeTab:d,onTabChange:S,searchText:g,onSearchChange:w,enableSharedModalDimensions:o})}):null}import{onlineManager as ye}from"@tanstack/react-query";import{devToolsStorageKeys as la,persistentStorage as ua}from"@buoy-gg/shared-ui/web";import{useState as ca,useEffect as da}from"react";import{jsx as It}from"react/jsx-runtime";var ya=()=>null,ha=async e=>{try{await ua.setItem(la.settings.wifiEnabled(),e.toString())}catch{}},$l=async()=>{try{let e=await ua.getItem(la.settings.wifiEnabled());e!==null&&ye.setOnline(e==="true")}catch{}};$l();function Nl({size:e}){let[t,r]=ca(()=>ye.isOnline());return da(()=>ye.subscribe(o=>{r(o)}),[]),It(Sr,{size:e,color:t?"#10B981":"#DC2626"})}var Ul={id:"query",name:"QUERY",description:"React Query inspector",slot:"both",icon:({size:e})=>It(vr,{size:e}),component:dr,props:{enableSharedModalDimensions:false}};function _l(e){return{id:e?.id||"query",name:e?.name||"QUERY",description:e?.description||"React Query inspector",slot:"both",icon:({size:t})=>It(vr,{size:t}),component:dr,props:{enableSharedModalDimensions:e?.enableSharedModalDimensions!==void 0?e.enableSharedModalDimensions:false}}}var Jl={id:"query-wifi-toggle",name:"WIFI",description:"Toggle React Query online/offline state",slot:"row",icon:Nl,component:ya,props:{},launchMode:"toggle-only",onPress:()=>{let e=!ye.isOnline();ye.setOnline(e),ha(e)}};function Gl(e){let t=e?.onColor||"#10B981",r=e?.offColor||"#DC2626",o=({size:a})=>{let[n,s]=ca(()=>ye.isOnline());return da(()=>ye.subscribe(i=>{s(i)}),[]),It(Sr,{size:a,color:n?t:r})};return{id:e?.id||"query-wifi-toggle",name:e?.name||"WIFI",description:e?.description||"Toggle React Query online/offline state",slot:"row",icon:o,component:ya,props:{},launchMode:"toggle-only",onPress:()=>{let a=!ye.isOnline();ye.setOnline(a),ha(a)}}}import{expandKeyedArrays as Yl,patchFromPath as Xl,readPath as Zl,refusalText as eu,shapeSummary as kt,suggestedPatch as tu,typedEditViolations as ru,unshapedLists as ou}from"@buoy-gg/shared-ui/web";import{onlineManager as yr}from"@tanstack/react-query";import{isJsonSerializable as fa,isOverWireBudget as ma}from"@buoy-gg/shared-ui/web";var au=Object.freeze({__buoyDataOnDevice:true,note:"Query data stays on the device \u2014 fetched on demand via getQueryData."}),ga=Object.freeze({__buoyUnserializable:true,note:"Query data is not JSON-serializable (circular or bigint) and stayed on the device."}),nu=16*1024,pa=8*1024*1024;function iu(e){return!!e&&typeof e=="object"&&e.__buoyDataOnDevice===true}function su(e){return!!e&&typeof e=="object"&&e.__buoyUnserializable===true}function ba(e){return iu(e)||su(e)}function Me(e){if(e!==void 0)return ma(e,nu)?fa(e)?au:ga:e}function Et(e){if(e==null)return e;if(typeof e=="object"){let t=e,r=typeof t.name=="string"?t.name:void 0,o=typeof t.message=="string"?t.message:void 0;if(r!==void 0||o!==void 0)return Me({...r!==void 0?{name:r}:{},...o!==void 0?{message:o}:{}})}return Me(e)}function lu(e){return ma(e,pa)?fa(e)?{__buoyTruncated:true,note:`Exceeds the ${pa/(1024*1024)}MB detail limit \u2014 inspect it on-device.`}:ga:e}function uu(e){let t=e.getMutationCache().getAll().map(o=>cu(o)),r=e.getQueryCache().getAll().map(o=>yu(o));return{mutations:t,queries:r}}function cu(e){let t=e.state;return{mutationId:e.mutationId,mutationKey:e.options.mutationKey,state:{...t,data:Me(t.data),variables:Me(t.variables),error:Et(t.error),failureReason:Et(t.failureReason)},...e.options.scope&&{scope:e.options.scope},...e.meta&&{meta:Me(e.meta)}}}function du(e){let{queryFn:t,select:r,persister:o,initialData:a,placeholderData:n,...s}=e;return{...s,queryFn:void 0,...e.meta?{meta:Me(e.meta)}:{}}}function yu(e){let t=e.observers.map(r=>({queryHash:e.queryHash,options:du(r.options)}));return{state:{...e.state,...e.state.data!==void 0&&{data:Me(e.state.data)},error:Et(e.state.error),fetchFailureReason:Et(e.state.fetchFailureReason)},queryKey:e.queryKey,queryHash:e.queryHash,...e.meta&&{meta:Me(e.meta)},observers:t}}function hu(e,t){let r=e;for(let o of t.split(".")){if(!r||typeof r!="object"||Array.isArray(r)||!(o in r))return false;r=r[o]}return Array.isArray(r)?r.length>0:!!r&&typeof r=="object"}var st=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function va(e){return Array.isArray(e)?"array":e===null?"null":typeof e=="object"?"object":typeof e}function Sa(e,t,r="",o={shrunk:[],breaks:[]}){if(Array.isArray(e)&&Array.isArray(t))return t.length>0&&t.length<e.length&&o.shrunk.push({path:r||"(root)",have:e.length,sent:t.length}),t;if(!st(e)||!st(t))return t;let a={...e};for(let[n,s]of Object.entries(t)){let i=r?`${r}.${n}`:n;if(n in e){let l=va(e[n]),u=va(s);(l==="array"||l==="object")&&l!==u&&o.breaks.push({path:i,from:l,to:u}),a[n]=Sa(e[n],s,i,o)}else a[n]=s}return a}function fu(e){let t=e.trim();try{let r=JSON.parse(t);if(Array.isArray(r))return r.map(o=>typeof o=="object"&&o!==null?JSON.stringify(o):String(o))}catch{}return t.includes(",")&&!t.startsWith("[")?t.split(",").map(r=>r.trim().replace(/^["']|["']$/g,"")):null}function mu(e){let t;for(let r of e.observers??[]){let o=r.options?.refetchInterval,a=o;if(typeof o=="function")try{a=o(e)}catch{a=void 0}typeof a=="number"&&a>0&&(t=t===void 0?a:Math.min(t,a))}return t}function Ca(e){let t=r=>{let{queryHash:o}=r,a=e.getQueryCache(),n=o?a.get(o):void 0;if(!n&&typeof o=="string"){let s=fu(o);s&&(n=a.getAll().find(i=>{let l=i.queryKey.map(u=>typeof u=="object"?JSON.stringify(u):String(u));return l.length===s.length&&l.every((u,c)=>u===s[c])}))}if(!n)throw new Error(`Query with hash "${o}" not found`);return n};return{version:2,getSnapshot:()=>({dehydratedState:uu(e),isOnlineManagerOnline:yr.isOnline()}),subscribe:r=>{let o=e.getQueryCache().subscribe(r),a=e.getMutationCache().subscribe(r),n=yr.subscribe(r);return()=>{o(),a(),n()}},actions:{getQueryData:r=>{let{queryHash:o,path:a}=r??{};if(!o)return{found:false,reason:"missing queryHash"};let n=e.getQueryCache().get(o);if(!n)return{found:false,reason:"unknown queryHash"};if(a){let i=Zl(n.state.data,a);return i.ok?{found:true,queryHash:o,path:a,shape:kt(i.value),data:i.value}:{found:false,reason:i.error}}if(n.state.data===void 0){let i=n.state.status,l=n.state.error;return{found:true,queryHash:o,hasData:false,status:i,fetchStatus:n.state.fetchStatus,...l?{error:l instanceof Error?l.message:String(l)}:{},reason:i==="error"?"This query has no data because it FAILED. Report the error, not an empty result.":n.state.fetchStatus==="fetching"?"No data yet \u2014 this query is still fetching.":"This query has never resolved (it may be disabled, or never enabled). It is not empty \u2014 it has nothing."}}let s=kt(n.state.data);return{found:true,queryHash:o,hasData:true,...s?{shape:s}:{},data:lu(n.state.data)}},listQueries:r=>{let{includeData:o=false,staleOnly:a=false,limit:n}=r??{},s=e.getQueryCache().getAll(),i=[...a?s.filter(u=>u.isStale()):s].sort((u,c)=>{let d=+(c.getObserversCount()>0)-+(u.getObserversCount()>0);return d!==0?d:(c.state.dataUpdatedAt??0)-(u.state.dataUpdatedAt??0)}),l=(typeof n=="number"&&n>0?i.slice(0,n):i).map(u=>{let c=u.state.error,d=mu(u);return{queryHash:u.queryHash,queryKey:u.queryKey,status:oe(u),fetchStatus:u.state.fetchStatus,isStale:u.isStale(),observers:u.getObserversCount(),updatedAt:u.state.dataUpdatedAt,...d?{refetchEveryMs:d}:{},error:c?c.message??String(c):void 0,...o?{data:u.state.data}:{},...kt(u.state.data)?{shape:kt(u.state.data)}:{}}});return{queries:l,total:s.length,returned:l.length,includedData:o}},refetch:r=>t(r).fetch().catch(()=>{}),invalidate:r=>e.invalidateQueries(t(r)),reset:r=>e.resetQueries(t(r)),remove:r=>{let o=t(r),a=e.getQueryCache().findAll(o).some(n=>n.getObserversCount()>0);return e.removeQueries(o),{ok:true,...a?{note:"Removed \u2014 but a screen is still watching this query, and React Query leaves that screen rendering its LAST value (including anything written into the cache before this) until something refetches. Nothing on screen will change on its own. Use `reset` instead when you want the screen to go back to loading and fetch again."}:{}}},setQueryData:r=>{let{data:o,merge:a,force:n,path:s,value:i}=r,{queryKey:l,queryHash:u}=r,c=l;if(c===void 0&&typeof u=="string"){let y=e.getQueryCache().get(u);if(!y)return{ok:false,error:`Refused: no query with hash ${u} is in the cache. Read listQueries for the current hashes \u2014 a query that has been removed or whose key includes changing params (a search term, a cart payload) will not match an older hash.`};c=y.queryKey}if(c===void 0)return{ok:false,error:"Refused: no query was named. Send `queryKey` (the array from listQueries) or `queryHash` (its string form)."};let d=e.getQueryData(c),h=e.getQueryCache().find({queryKey:c,exact:true});if(d===void 0&&h&&(o!==void 0||s!==void 0)){let y=h,m=y?.state.status;return{ok:false,error:`Refused: this query has no data to edit \u2014 ${m==="error"?`it FAILED${y?.state.error?` (${y.state.error instanceof Error?y.state.error.message:String(y.state.error)})`:""}`:m==="pending"?"it has never resolved (it may be disabled, or still loading)":"it holds no data"}. There is nothing to merge into. Fix the cause first (restoreError, or let it fetch), or send force:true with the COMPLETE value if you mean to seed the cache from nothing.`,status:m}}if(o===void 0&&s===void 0)return{ok:false,error:"Refused: no change was described. Send `data` (with merge:true for a partial edit), or `path` and `value` to set one value."};let g=o;if(s!==void 0){if(i===void 0)return{ok:false,error:`Refused: sent \`path\` without \`value\`. Say what to set "${s}" to; if you mean to clear it, send value:null and the field must already be nullable.`};let y=Xl(d,s,i);if(!y.ok)return{ok:false,error:`Refused: ${y.error}`};g=y.patch}if(a||s!==void 0){let y=n?{patch:g,notes:[],error:void 0}:Yl(d,g);if(y.error)return{ok:false,error:`Refused: ${y.error}`};let m=y.patch;if(!n){let b=ru(d,m,{noun:"data"});if(b.length>0){let x=tu(m,b);return{ok:false,error:eu(b,"data",x),violations:b,...x?{suggestedData:x}:{}}}}let C=Sa(d,m),v=ou(d).filter(b=>hu(m,b));return e.setQueryData(c,C,{updatedAt:Date.now()}),{ok:true,mode:"merge",...s!==void 0?{path:s}:{},changedKeys:st(m)?Object.keys(m):void 0,...y.notes.length?{keyed:y.notes}:{},...v.length?{unchecked:v.map(b=>`\`${b}\` was empty, so nothing in the app knows what its items look like and the shape of what you added was NOT checked. If the screen renders a field you left out, it will render undefined \u2014 read the query back and compare against how the screen uses it.`)}:{}}}if(!n&&st(d)&&st(o)){let y=Object.keys(d).filter(m=>!(m in o));if(y.length>0)return{ok:false,error:`Refused: the new value drops ${y.length} top-level field(s) the cached value has (${y.slice(0,8).join(", ")}${y.length>8?", \u2026":""}). A screen rendering those fields would crash. To change some fields, send merge:true with ONLY the fields that change. To really replace the whole value, send force:true.`,missingKeys:y}}return e.setQueryData(c,o,{updatedAt:Date.now()}),{ok:true,mode:"replace"}},triggerError:r=>{let o=t(r),a=o.options;o.setState({status:"error",error:new Error("Unknown error from devtools"),fetchMeta:{...o.state.fetchMeta,__previousQueryOptions:a}})},restoreError:r=>e.resetQueries(t(r)),triggerLoading:r=>{let o=t(r),a=o.options;o.fetch({...a,queryFn:()=>new Promise(()=>{}),gcTime:-1}).catch(()=>{}),o.setState({data:void 0,status:"pending",fetchMeta:{...o.state.fetchMeta,__previousQueryOptions:a}})},restoreLoading:r=>{let o=t(r),a=o.state,n=o.state.fetchMeta?o.state.fetchMeta.__previousQueryOptions:null;o.cancel({silent:true}),o.setState({...a,fetchStatus:"idle",fetchMeta:null}),n&&o.fetch(n).catch(()=>{})},clearQueryCache:()=>{let r=e.getQueryCache().getAll().filter(o=>o.getObserversCount()>0).length;return e.getQueryCache().clear(),{ok:true,cleared:true,...r?{note:`Cleared \u2014 but ${r} quer${r===1?"y is":"ies are"} still being watched by a screen, and React Query leaves those screens rendering their LAST value until something refetches. The cache is empty; the app on screen is not. Use \`reset\` on a query when you want its screen to reload.`}:{}}},clearMutationCache:()=>{e.getMutationCache().clear()},setOnline:r=>{let{online:o}=r;yr.setOnline(o)}}}}import{useEffect as gu,useMemo as pu}from"react";import{useQueryClient as bu}from"@tanstack/react-query";import{classifyPreviewItem as vu,createRestoreScope as Su,emptyRestoreResult as Cu,failedRestore as xu,registerStateSnapshotProvider as wu,superJsonSerialize as qu}from"@buoy-gg/shared-ui/web";function xa(e){return{...e,fetchStatus:"idle",fetchMeta:null}}function hr(e){return{status:e.state.status,error:e.state.error??null,data:e.state.data}}function fr(e,t){try{let r=JSON.stringify(e);return r.length>60?`${r.slice(0,57)}\u2026`:r}catch{return t}}function wa(e){if(e==null)return e??null;if(typeof e=="object"){let t=e,r=typeof t.name=="string"?t.name:void 0,o=typeof t.message=="string"?t.message:void 0;if(r!==void 0||o!==void 0)return{...r!==void 0?{name:r}:{},...o!==void 0?{message:o}:{}}}return e}function qa(e){if(e===void 0)return true;try{return qu(e),true}catch{return false}}function Ta(e){let t=[],r=[];for(let o of e.getQueryCache().getAll()){let a=fr(o.queryKey,o.queryHash);if(!qa(o.state.data)){t.push(`query ${a}: data can't be serialized (circular reference?) \u2014 not captured`);continue}r.push({queryKey:o.queryKey,queryHash:o.queryHash,...o.meta&&qa(o.meta)?{meta:o.meta}:{},state:xa({...o.state,error:wa(o.state.error),fetchFailureReason:wa(o.state.fetchFailureReason)})})}return{queries:r,warnings:t}}function Tu(e){return{id:"query",label:"React Query",status:()=>({canCapture:true,canRestore:true}),async capture(){let{queries:t,warnings:r}=Ta(e),o=e.getMutationCache().getAll().length;return o>0&&r.push(`${o} mutation(s) not captured (mutation functions cannot be restored)`),{data:{queries:t},warnings:r}},async restore(t,r){let o=t,a=Su(r),n=Cu();if(!o?.queries)return xu("empty query snapshot");let s=e.getQueryCache(),i=new Set(o.queries.map(c=>c.queryHash));for(let c of o.queries)if(a.allows(c.queryHash)){if(ba(c.state.data)){n.skipped.push({id:c.queryHash,reason:"captured as an on-device placeholder by an older Buoy \u2014 re-capture this restore point"});continue}try{let d=xa(c.state),h=s.get(c.queryHash);h?h.setState(d):s.build(e,{queryKey:c.queryKey,queryHash:c.queryHash,...c.meta&&{meta:c.meta}},d),n.applied+=1}catch(d){n.skipped.push({id:c.queryHash,reason:String(d)}),n.ok=false}}for(let c of s.getAll().slice())if(a.allows(c.queryHash)&&!i.has(c.queryHash))try{s.remove(c),n.applied+=1}catch(d){n.skipped.push({id:c.queryHash,reason:String(d)})}let l=e.getMutationCache().getAll().length;l>0&&(e.getMutationCache().clear(),n.warnings.push(`mutation cache cleared (${l} mutation(s))`));let u=a.excludedWarning("quer(y/ies)");return u&&n.warnings.push(u),n},async previewItems(t,r){let o=t?.queries??[],a=r===void 0,n=a?Ta(e).queries:r?.queries??[],s=new Map(n.map(c=>[c.queryHash,c])),i=new Map(o.map(c=>[c.queryHash,c])),l=[],u=[];for(let c of o){let d=fr(c.queryKey,c.queryHash);if(ba(c.state.data)){l.push({key:c.queryHash,label:d,verdict:"wont-apply",reason:"data stayed on the device when this was captured (older Buoy) \u2014 re-capture this restore point"});continue}let h=s.get(c.queryHash);l.push(vu({key:c.queryHash,label:d,oldValue:h?hr(h):void 0,newValue:hr(c),inOld:h!==void 0,inNew:true},{tooLargeReason:"query data too large to render a diff \u2014 restore still applies it"}))}for(let c of n)i.has(c.queryHash)||l.push({key:c.queryHash,label:fr(c.queryKey,c.queryHash),verdict:"removed",oldValue:hr(c)});if(a){let c=e.getMutationCache().getAll().length;c>0&&u.push(`${c} in-memory mutation record(s) will be cleared`)}return{items:l,notes:u}}}}function Mu(e){return wu(Tu(e))}function Au(){let e;try{e=bu()}catch{e=null}return gu(()=>{if(e)return Mu(e)},[e]),pu(()=>e?Ca(e):null,[e])}function Ma({queryState:e,observerCount:t,isStale:r}){return e.fetchStatus==="fetching"?"blue":e.status==="error"?"red":t?e.fetchStatus==="paused"?"purple":r?"yellow":"green":"gray"}import{useQueryClient as Du}from"@tanstack/react-query";import{jsx as Ft,jsxs as Ae}from"react/jsx-runtime";function Aa(){try{let e=Du(),t=e.getQueryCache().getAll(),r=e.getMutationCache().getAll();return Ae(f,{style:J.container,children:[Ft(p,{style:J.title,children:"Debug Info"}),Ft(p,{style:J.info,children:"QueryClient: \u2705 Available"}),Ae(p,{style:J.info,children:["Queries: ",t.length]}),Ae(p,{style:J.info,children:["Mutations: ",r.length]}),t.length>0&&Ae(f,{style:J.queriesList,children:[Ft(p,{style:J.subtitle,children:"Query Keys:"}),t.slice(0,3).map((o,a)=>Ae(p,{style:J.queryKey,children:["\u2022"," ",Array.isArray(o.queryKey)?o.queryKey.join(" - "):String(o.queryKey)]},a)),t.length>3&&Ae(p,{style:J.more,children:["... and ",t.length-3," more"]})]})]})}catch(e){return Ae(f,{style:J.container,children:[Ft(p,{style:J.title,children:"Debug Info"}),Ae(p,{style:J.error,children:["\u274C QueryClient Error: ",String(e)]})]})}}var J=M.create({container:{padding:16,backgroundColor:"rgba(0, 0, 0, 0.3)",borderRadius:8,margin:16,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.1)"},title:{color:"#FFFFFF",fontSize:14,fontWeight:"600",marginBottom:8},subtitle:{color:"#E5E7EB",fontSize:12,fontWeight:"500",marginTop:8,marginBottom:4},info:{color:"#9CA3AF",fontSize:12,marginBottom:4},error:{color:"#EF4444",fontSize:12,marginBottom:4},queriesList:{marginTop:4},queryKey:{color:"#60A5FA",fontSize:11,marginLeft:8,marginBottom:2},more:{color:"#9CA3AF",fontSize:11,fontStyle:"italic",marginLeft:8}});import{jsx as De,jsxs as Je}from"react/jsx-runtime";function Qu({queries:e,selectedQuery:t,isOpen:r,onClose:o,onSelect:a}){let n=s=>Array.isArray(s.queryKey)?s.queryKey.join(" - "):String(s.queryKey);return De(Ar,{accessibilityLabel:"Query selector",accessibilityHint:"View query selector","sentry-label":"ignore query selector",visible:r,transparent:true,animationType:"fade",onRequestClose:o,children:De(Mr,{accessibilityLabel:"Query selector overlay",accessibilityHint:"View query selector overlay","sentry-label":"ignore query selector overlay",style:K.modalOverlay,onPress:o,children:Je(f,{accessibilityLabel:"Query selector content",accessibilityHint:"View query selector content","sentry-label":"ignore query selector content",style:K.modalContent,children:[Je(f,{style:K.modalHeader,children:[De(p,{style:K.modalTitle,children:"Select Query"}),Je(p,{style:K.modalSubtitle,children:[e.length," ",e.length===1?"query":"queries"," ","available"]})]}),De(me,{accessibilityLabel:"Query selector scroll view",accessibilityHint:"View query selector scroll view","sentry-label":"ignore query selector scroll view",style:K.scrollView,contentContainerStyle:K.scrollViewContent,showsVerticalScrollIndicator:true,children:e.length===0?Je(f,{style:K.emptyState,children:[De(p,{style:K.emptyTitle,children:"No Queries Found"}),Je(p,{style:K.emptyDescription,children:["No React Query queries are currently active.",`
6
+ \u2022 Check console for debugging info`}}),contentContainerStyle:Ia.queryListContent})]})}var Ia=T.create({queryListContainer:{flex:1,backgroundColor:"transparent"},queryListContent:{padding:8,backgroundColor:"transparent",flexGrow:1}});import{ToolFooter as Zs,useSafeAreaInsets as el}from"@buoy-gg/shared-ui/web";import{jsx as or}from"react/jsx-runtime";function ka({activeFilter:e,onFilterChange:t,isFloatingMode:r=true,size:a="default"}){let o=el({minBottom:16});return or(Zs,{floating:r,safeArea:false,paddingBottom:r?0:o.bottom,style:Ea.filterFooter,children:or(h,{style:Ea.filterContainer,children:or(sa,{activeFilter:e,onFilterChange:t,size:a})})})}var Ea=T.create({filterFooter:{paddingTop:8,paddingHorizontal:0},filterContainer:{minHeight:32,justifyContent:"center"}});import{useCallback as tl,useMemo as st}from"react";import{DynamicFilterView as rl,buoyColors as Ae,monoFont as al,night as nr}from"@buoy-gg/shared-ui/web";import{XCircle as Fa,Clock as ir,RefreshCw as ol,Globe as nl,Zap as il,Filter as sl,Eye as ll}from"@buoy-gg/shared-ui/web";import{jsx as sr}from"react/jsx-runtime";var ul=()=>false;function cl({queries:e,activeFilter:t,onFilterChange:r,ignoredPatterns:a,onPatternToggle:o,includedPatterns:n,onIncludedPatternToggle:i,isTeamPattern:l=ul}){let s=tl(y=>l(y)?sr(h,{accessibilityLabel:"Set by your team on buoy.gg",style:[Pa.teamBadge,{borderColor:`${nr.color.accent}60`,backgroundColor:`${nr.color.accent}15`}],children:sr(v,{style:[Pa.teamBadgeText,{color:nr.color.accent}],children:"TEAM"})}):null,[l]),u=st(()=>{let y={all:e.length,disabled:0,fresh:0,stale:0,fetching:0,paused:0,inactive:0,error:0};return e.forEach(m=>{let p=se(m);p==="disabled"?y.disabled++:p==="error"?y.error++:p==="fresh"?y.fresh++:p==="stale"?y.stale++:p==="fetching"?y.fetching++:p==="paused"?y.paused++:p==="inactive"&&y.inactive++}),y},[e]),c=st(()=>{let y=new Set;return e.forEach(m=>{if(!m?.queryKey)return;(Array.isArray(m.queryKey)?m.queryKey:[m.queryKey]).forEach(p=>{if(p!=null){let g=String(p);/^\d+$/.test(g)||y.add(g)}})}),Array.from(y).sort().slice(0,50)},[e]),d=st(()=>c,[c]),f=st(()=>{let y=e;return n.size>0&&(y=y.filter(m=>{if(!m?.queryKey)return false;let p=(Array.isArray(m.queryKey)?m.queryKey:[m.queryKey]).filter(g=>g!=null).map(g=>String(g)).join(" ").toLowerCase();return Array.from(n).some(g=>p.includes(g.toLowerCase()))})),a.size>0&&(y=y.filter(m=>{if(!m?.queryKey)return true;let p=(Array.isArray(m.queryKey)?m.queryKey:[m.queryKey]).filter(g=>g!=null).map(g=>String(g)).join(" ").toLowerCase();return!Array.from(a).some(g=>p.includes(g.toLowerCase()))})),y.length},[e,n,a]),b=st(()=>({filterSummarySection:{enabled:true,totalCount:e.length,filteredCount:f,includePatterns:n,excludePatterns:a},sections:[{id:"status",title:"Status",type:"status",data:[{id:"status::all",label:"All",count:u.all,icon:nl,color:Ae.primary,isActive:!t||t==="all"},{id:"status::disabled",label:"Disabled",count:u.disabled,icon:Fa,color:Ae.textMuted,isActive:t==="disabled"},{id:"status::fresh",label:"Fresh",count:u.fresh,icon:il,color:Ae.success,isActive:t==="fresh"},{id:"status::stale",label:"Stale",count:u.stale,icon:ir,color:Ae.warning,isActive:t==="stale"},{id:"status::fetching",label:"Fetching",count:u.fetching,icon:ol,color:Ae.primary,isActive:t==="fetching"},{id:"status::paused",label:"Paused",count:u.paused,icon:ir,color:Ae.textMuted,isActive:t==="paused"},{id:"status::inactive",label:"Inactive",count:u.inactive,icon:ir,color:Ae.textSecondary,isActive:t==="inactive"},{id:"status::error",label:"Error",count:u.error,icon:Fa,color:Ae.error,isActive:t==="error"}]}],addFilterSection:{enabled:true,placeholder:"Enter pattern to exclude...",title:"EXCLUDE FILTERS",icon:sl},includeOnlySection:{enabled:true,title:"INCLUDE ONLY FILTERS",description:"Show ONLY queries matching these patterns. All non-matching queries will be hidden.",placeholder:"Enter pattern to include...",icon:ll,patterns:n,onPatternToggle:i,onPatternAdd:i,renderPatternMeta:s},availableItemsSection:{enabled:true,title:"AVAILABLE QUERY KEYS",emptyMessage:"No queries found. Query keys will appear here once queries are active.",items:d},howItWorksSection:{enabled:true,title:"HOW QUERY FILTERS WORK",description:"There are two types of query key filters:",examples:["","INCLUDE ONLY (green):","\u2022 Shows ONLY queries matching the pattern","\u2022 Example: 'rewards' \u2192 shows only reward queries","\u2022 When active, non-matching queries are hidden","","EXCLUDE (blue):","\u2022 Hides queries matching the pattern","\u2022 Example: 'analytics' \u2192 hides analytics queries","","Filters are case-insensitive and match partial keys."]},activePatterns:a,renderPatternMeta:s}),[u,t,a,n,d,i,e.length,f,s]);return sr(rl,{...b,onFilterChange:y=>{let[m,p]=y.split("::");m==="status"?r(p==="all"||t===p?null:p):m==="suggestion"&&o(p)},onPatternToggle:o,onPatternAdd:o})}var Pa=T.create({teamBadge:{paddingHorizontal:8,paddingVertical:3,borderRadius:6,borderWidth:1},teamBadgeText:{fontSize:9,fontFamily:al,fontWeight:"700",letterSpacing:.5}});import{useState as lt,useCallback as ut,useEffect as Tt,useMemo as za,useRef as Oa}from"react";import{devToolsStorageKeys as De,persistentStorage as At,useTeamList as Ka}from"@buoy-gg/shared-ui/web";import{jsx as ge,jsxs as dl}from"react/jsx-runtime";function La({visible:e,selectedQueryKey:t,onQuerySelect:r,onClose:a,onMinimize:o,activeFilter:n,onFilterChange:i,enableSharedModalDimensions:l=false,onTabChange:s,searchText:u="",onSearchChange:c}){let d=rn(),f=wr(t),b=vt(),y=ut(()=>{d.getQueryCache().clear()},[d]),[m,p]=lt(null),g=n??m,S=i??p,[w,C]=lt(false),[q,A]=lt(new Set),[j,Ee]=lt(new Set),M=Oa(null),oe=Oa(null);Tt(()=>{(async()=>{try{let x=await At.getItem(De.reactQuery.ignoredPatterns());if(x){let Q=JSON.parse(x);Array.isArray(Q)&&(M.current=JSON.stringify(Array.from(new Set(Q))),A(new Set(Q)))}}catch(x){console.error("Failed to load ignored patterns:",x)}finally{M.current??(M.current="[]")}})()},[]),Tt(()=>{(async()=>{try{let x=await At.getItem(De.reactQuery.includedPatterns());if(x){let Q=JSON.parse(x);Array.isArray(Q)&&(oe.current=JSON.stringify(Array.from(new Set(Q))),Ee(new Set(Q)))}}catch(x){console.error("Failed to load included patterns:",x)}finally{oe.current??(oe.current="[]")}})()},[]),Tt(()=>{let x=JSON.stringify(Array.from(q));if(M.current===null||M.current===x)return;M.current=x,(async()=>{try{await At.setItem(De.reactQuery.ignoredPatterns(),x)}catch(Q){console.error("Failed to save ignored patterns:",Q)}})()},[q]),Tt(()=>{let x=JSON.stringify(Array.from(j));if(oe.current===null||oe.current===x)return;oe.current=x,(async()=>{try{await At.setItem(De.reactQuery.includedPatterns(),x)}catch(Q){console.error("Failed to save included patterns:",Q)}})()},[j]);let ye=Ka(De.reactQuery.ignoredPatterns()),he=Ka(De.reactQuery.includedPatterns()),ne=za(()=>ye.length?new Set([...q,...ye]):q,[q,ye]),ie=za(()=>he.length?new Set([...j,...he]):j,[j,he]),yt=ut(x=>ye.includes(x)&&!q.has(x)||he.includes(x)&&!j.has(x),[ye,he,q,j]),ht=ut(x=>{A(Q=>{if(!Q.has(x)&&ye.includes(x))return Q;let fe=new Set(Q);return fe.has(x)?fe.delete(x):fe.add(x),fe})},[ye]),Kt=ut(x=>{Ee(Q=>{if(!Q.has(x)&&he.includes(x))return Q;let fe=new Set(Q);return fe.has(x)?fe.delete(x):fe.add(x),fe})},[he]),[ft,Ho]=lt("bottomSheet"),Wo=l?De.reactQuery.modal():De.reactQuery.browserModal(),jo=ut(x=>{Ho(x)},[]),Vo=on({minBottom:16}),$o=ft==="floating"?56:48+Vo.bottom;if(!e)return null;let No=()=>{if(w){let x=[{key:"filters",label:"Filters"}];return dl(Lt,{children:[ge(Lt.Navigation,{onBack:()=>C(false)}),ge(Lt.Content,{title:"",noMargin:true,children:ge(nn,{tabs:x,activeTab:"filters",testIDPrefix:"buoy-rq-filterview-tab",onTabChange:()=>{}})})]})}return ge(et,{selectedQuery:f,activeTab:"queries",onTabChange:s,onBack:()=>r(void 0),searchText:u,onSearchChange:c,onFilterPress:()=>C(true),hasActiveFilters:g!==null||ne.size>0||ie.size>0,onClearCache:y})},Uo=ge(ka,{activeFilter:g,onFilterChange:S,isFloatingMode:ft==="floating"});return ge(an,{visible:e,onClose:a,onMinimize:o,persistenceKey:Wo,header:{customContent:No(),showToggleButton:true},onModeChange:jo,enablePersistence:true,initialMode:"bottomSheet",enableGlitchEffects:true,disableScrollWrapper:!w,styles:{},footer:w?void 0:Uo,footerHeight:w?void 0:$o,children:ge(h,{style:yl.container,children:w?ge(cl,{queries:b,activeFilter:g,onFilterChange:S,ignoredPatterns:ne,onPatternToggle:ht,includedPatterns:ie,onIncludedPatternToggle:Kt,isTeamPattern:yt}):ge(Qa,{selectedQuery:f,onQuerySelect:r,activeFilter:g,searchText:u,ignoredPatterns:ne,includedPatterns:ie,onFilterPress:()=>C(true)})})})}var yl=T.create({container:{flex:1,backgroundColor:"transparent"}});import{JsModal as hl,devToolsStorageKeys as Ba,useSafeAreaInsets as fl}from"@buoy-gg/shared-ui/web";import{useQueryClient as Ha}from"@tanstack/react-query";import{useSafeAreaInsets as Wa,night as O,monoFont as ja}from"@buoy-gg/shared-ui/web";import{useMemo as ml}from"react";function lr(e,t,r){return ml(()=>{let a=e.state.status;return[{label:"Refetch",variant:"refetch",disabled:se(e)==="fetching",onPress:()=>Jt({query:e})},{label:e.state.fetchStatus==="fetching"?"Restore Loading":"Trigger Loading",variant:"triggerLoading",disabled:false,onPress:()=>_t({query:e})},{label:a==="error"?"Restore Error":"Trigger Error",variant:"triggerError",disabled:a==="pending",onPress:()=>Gt({query:e,queryClient:t})}]},[e,t,r])}import{DataViewer as gl}from"@buoy-gg/shared-ui/web/dataViewer";import{Fragment as pl,jsx as I,jsxs as _e}from"react/jsx-runtime";function Va({selectedQuery:e,isFloatingMode:t,disableInternalFooter:r=false,queryVersion:a}){let o=Wa({minBottom:16}),n=Ha(),i=lr(e,n,a);return _e(pl,{children:[_e(be,{testID:"buoy-rq-detail-scroll",accessibilityLabel:"Data editor mode",accessibilityHint:"View data editor mode","sentry-label":"ignore data editor mode",style:k.explorerScrollContainer,contentContainerStyle:[k.explorerScrollContent,!r&&{paddingBottom:72}],children:[_e(h,{style:k.section,children:[I(vl,{visible:!!e.state.data,selectedQuery:e,queryVersion:a}),I(Sl,{visible:!e.state.data,selectedQuery:e})]}),I(h,{style:k.section,children:I(Nt,{query:e})}),I(h,{style:k.section,children:_e(h,{style:k.queryExplorerContainer,children:[I(v,{testID:"buoy-rq-query-explorer-header",style:k.queryExplorerHeader,children:"Query Explorer"}),I(h,{style:k.queryExplorerContent,children:I(gl,{title:"",data:e,maxDepth:10,rawMode:true,showTypeFilter:true,initialExpanded:false})})]})})]}),!r&&I(h,{style:[k.actionFooter,{paddingBottom:t?0:o.bottom+8}],children:I(h,{style:k.actionsRow,children:i.map((l,s)=>I(ue,{testID:`buoy-rq-action-${l.variant}`,onClick:l.onPress,text:l.label,variant:l.variant,disabled:l.disabled},s))})})]})}function bl({selectedQuery:e,isFloatingMode:t,queryVersion:r}){let a=Wa({minBottom:16}),o=Ha(),n=lr(e,o,r);return I(h,{style:[k.actionFooter,{paddingBottom:t?0:a.bottom+8}],children:I(h,{style:k.actionsRow,children:n.map((i,l)=>I(ue,{testID:`buoy-rq-action-${i.variant}`,onClick:i.onPress,text:i.label,variant:i.variant,disabled:i.disabled},l))})})}function vl({visible:e,selectedQuery:t,queryVersion:r=0}){return e?_e(h,{style:k.dataContainer,children:[I(v,{testID:"buoy-rq-data-header",style:k.dataHeader,children:"Data Editor"}),I(h,{style:k.dataContent,children:I(me,{editable:true,label:"Data",value:t.state.data,defaultExpanded:["Data"],activeQuery:t,dataVersion:r})})]}):null}function Sl({visible:e,selectedQuery:t}){if(!e)return null;let r=()=>t.isDisabled()?{title:"Query Disabled",description:"This query is disabled and won't automatically fetch. Enable the query or manually trigger a fetch to load data."}:t.state.status==="pending"||se(t)==="fetching"?{title:t.state.status==="pending"?"Loading...":"Refetching...",description:"Please wait while the query is being executed."}:t.state.status==="error"?{title:"Query Error",description:t.state.error?.message||"An error occurred while fetching data."}:{title:"No Data Available",description:"This query has no data to edit. Try refetching the query first."},{title:a,description:o}=r();return _e(h,{style:k.emptyState,children:[I(v,{testID:"buoy-rq-detail-empty-title",style:k.emptyTitle,children:a}),I(v,{testID:"buoy-rq-detail-empty-description",style:k.emptyDescription,children:o})]})}var k=T.create({explorerScrollContainer:{flex:1},explorerScrollContent:{paddingBottom:16,paddingHorizontal:8,flexGrow:1},section:{marginBottom:16},emptyState:{flex:1,justifyContent:"center",alignItems:"center",padding:32},emptyTitle:{color:O.color.text,fontSize:18,fontWeight:"600",marginBottom:8,textAlign:"center"},emptyDescription:{color:O.color.textSecondary,fontSize:14,textAlign:"center",lineHeight:20,maxWidth:280},actionFooter:{borderTopWidth:1,borderTopColor:O.color.border,paddingTop:8,paddingHorizontal:12,backgroundColor:"transparent",borderBottomLeftRadius:14,borderBottomRightRadius:14},actionsRow:{flexDirection:"row",alignItems:"center",gap:8},queryExplorerContainer:{minWidth:200,backgroundColor:O.color.surface,borderRadius:6,borderWidth:1,borderColor:O.color.accent+"4D",overflow:"hidden",shadowColor:O.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},queryExplorerHeader:{backgroundColor:O.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:O.color.accent,borderBottomWidth:1,borderBottomColor:O.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:ja},queryExplorerContent:{padding:8},dataContainer:{minWidth:200,backgroundColor:O.color.surface,borderRadius:6,borderWidth:1,borderColor:O.color.accent+"4D",overflow:"hidden",shadowColor:O.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6,marginTop:8},dataHeader:{backgroundColor:O.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:O.color.accent,borderBottomWidth:1,borderBottomColor:O.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:ja},dataContent:{padding:8}});import{useState as Cl,useCallback as xl,useEffect as wl,useRef as ql}from"react";import{jsx as Dt}from"react/jsx-runtime";function $a({visible:e,selectedQueryKey:t,onQuerySelect:r,onClose:a,onMinimize:o,enableSharedModalDimensions:n=false,onTabChange:i}){let{query:l,version:s}=Bt(t),[u,c]=Cl("bottomSheet"),d=t?JSON.stringify(t):void 0,f=ql(void 0);wl(()=>{if(l){f.current=d;return}e&&f.current!==void 0&&f.current===d&&(f.current=void 0,r(void 0))},[e,l,d,r]);let b=xl(w=>{c(w)},[]),y=fl({minBottom:16}),m=u==="floating"?72:80+y.bottom,p=()=>Dt(et,{selectedQuery:l,activeTab:"queries",onTabChange:i,onBack:()=>r(void 0)}),g=n?Ba.reactQuery.modal():`${Ba.reactQuery.modal()}_data_editor`;if(!e||!l)return null;let S=Dt(bl,{selectedQuery:l,isFloatingMode:u==="floating",queryVersion:s},`footer-${s}`);return Dt(hl,{visible:e,onClose:a,onMinimize:o,persistenceKey:g,header:{customContent:p(),showToggleButton:true},onModeChange:b,enablePersistence:true,initialMode:"bottomSheet",enableGlitchEffects:true,styles:{},footer:S,footerHeight:m,children:Dt(Va,{selectedQuery:l,isFloatingMode:u==="floating",disableInternalFooter:true,queryVersion:s})})}import{useQueryClient as Ml}from"@tanstack/react-query";import{useCallback as ur,useState as Na,useRef as Ua}from"react";import{useEffect as Tl,useState as Al}from"react";import{useQueryClient as Dl}from"@tanstack/react-query";function cr(e){let t=Dl(),[r,a]=Al(void 0);return Tl(()=>{let o=()=>{if(e!==void 0){let i=t.getMutationCache().getAll().find(l=>l.mutationId===e);a(i)}else a(void 0)};setTimeout(o,0);let n=t.getMutationCache().subscribe(o);return()=>n()},[t,e]),r}import{jsx as _a}from"react/jsx-runtime";function Ja({selectedMutation:e,onMutationSelect:t,activeFilter:r,searchText:a=""}){let o=n=>{t(typeof n=="function"?n(e):n)};return _a(h,{style:Ga.mutationListContainer,children:_a(ba,{selectedMutation:e,setSelectedMutation:o,activeFilter:r,searchText:a,hideInfoPanel:true,contentContainerStyle:Ga.mutationListContent})})}var Ga=T.create({mutationListContainer:{flex:1,backgroundColor:"transparent"},mutationListContent:{padding:8,backgroundColor:"transparent"}});import{ToolFooter as Rl,useSafeAreaInsets as Ql}from"@buoy-gg/shared-ui/web";import{useMemo as Il}from"react";import{jsx as dr}from"react/jsx-runtime";function Ya({activeFilter:e,onFilterChange:t,modalMode:r,size:a="default"}){let o=r==="floating",n=Ql({minBottom:16}),i=Il(()=>o?0:n.bottom,[o,n.bottom]);return dr(Rl,{floating:o,safeArea:false,paddingBottom:i,style:Xa.filterFooter,children:dr(h,{style:Xa.filterContainer,children:dr(va,{activeFilter:e,onFilterChange:t,size:a})})},`footer-${o?"floating":"docked"}`)}var Xa=T.create({filterFooter:{paddingTop:8,paddingHorizontal:0},filterContainer:{minHeight:32,justifyContent:"center"}});import{JsModal as kl,useSafeAreaInsets as El}from"@buoy-gg/shared-ui/web";import{absoluteFill as Fl}from"@buoy-gg/shared-ui/web";import{useMemo as W}from"react";import{ChevronLeft as Pl,ChevronRight as zl,night as Rt}from"@buoy-gg/shared-ui/web";import{jsx as Je,jsxs as Ol}from"react/jsx-runtime";var He=32,Za=6,eo=He,Kl=120,Qt=.95,to=1.15;function ro({translationX:e,maxTranslation:t=Kl,canSwipeLeft:r=true,canSwipeRight:a=true}){let o=W(()=>e.interpolate({inputRange:[0,t],outputRange:[0,1],extrapolate:"clamp"}),[e,t]),n=W(()=>o.interpolate({inputRange:[0,1],outputRange:[Za,eo]}),[o]),i=W(()=>o.interpolate({inputRange:[0,Qt,1],outputRange:[1,1,to]}),[o]),l=W(()=>o.interpolate({inputRange:[0,.99,1],outputRange:[0,0,16]}),[o]),s=W(()=>o.interpolate({inputRange:[0,.01],outputRange:[0,1],extrapolate:"clamp"}),[o]),u=W(()=>o.interpolate({inputRange:[0,.5,1],outputRange:[0,0,1],extrapolate:"clamp"}),[o]),c=W(()=>o.interpolate({inputRange:[0,.5,Qt,1],outputRange:[.8,.8,1,1.2]}),[o]),d=W(()=>e.interpolate({inputRange:[-t,0],outputRange:[1,0],extrapolate:"clamp"}),[e,t]),f=W(()=>d.interpolate({inputRange:[0,1],outputRange:[Za,eo]}),[d]),b=W(()=>d.interpolate({inputRange:[0,Qt,1],outputRange:[1,1,to]}),[d]),y=W(()=>d.interpolate({inputRange:[0,.99,1],outputRange:[0,0,-16]}),[d]),m=W(()=>d.interpolate({inputRange:[0,.01],outputRange:[0,1],extrapolate:"clamp"}),[d]),p=W(()=>d.interpolate({inputRange:[0,.5,1],outputRange:[0,0,1],extrapolate:"clamp"}),[d]),g=W(()=>d.interpolate({inputRange:[0,.5,Qt,1],outputRange:[.8,.8,1,1.2]}),[d]);return Ol(h,{style:yr.container,pointerEvents:"none",children:[a&&Je(Z.View,{style:[yr.leftWrapper,{width:n,height:He,borderRadius:He/2,backgroundColor:Rt.color.text+"E6",justifyContent:"center",alignItems:"center",opacity:s,transform:[{scale:i},{translateX:l}]}],children:Je(Z.View,{style:{opacity:u,transform:[{scale:c}]},children:Je(Pl,{size:He*.6,color:Rt.color.accent,strokeWidth:3})})}),r&&Je(Z.View,{style:[yr.rightWrapper,{width:f,height:He,borderRadius:He/2,backgroundColor:Rt.color.text+"E6",justifyContent:"center",alignItems:"center",opacity:m,transform:[{scale:b},{translateX:y}]}],children:Je(Z.View,{style:{opacity:p,transform:[{scale:g}]},children:Je(zl,{size:He*.6,color:Rt.color.accent,strokeWidth:3})})})]})}var yr=T.create({container:{...Fl,zIndex:1e3,justifyContent:"center",alignItems:"center"},leftWrapper:{position:"absolute",left:16},rightWrapper:{position:"absolute",right:16}});import{devToolsStorageKeys as ao}from"@buoy-gg/shared-ui/web";import{jsx as Ge,jsxs as Ll}from"react/jsx-runtime";function oo({visible:e,selectedMutationId:t,onMutationSelect:r,onClose:a,onMinimize:o,activeFilter:n,onFilterChange:i,onTabChange:l,enableSharedModalDimensions:s=false,searchText:u="",onSearchChange:c}){let d=Ml(),f=cr(t),[b,y]=Na(null),m=n??b,p=i??y,g=ur(()=>{d.getMutationCache().clear(),r(void 0)},[d,r]),[S,w]=Na("bottomSheet"),C=s?ao.reactQuery.modal():ao.reactQuery.mutationModal(),q=Ua(new Z.Value(0)).current,A=ur(ne=>{ne==="right"&&l("queries")},[l]),j=ur(ne=>{w(ne)},[]),Ee=El({minBottom:16}),M=S==="floating"?56:48+Ee.bottom,oe=Ua(Ht.create({onStartShouldSetPanResponder:()=>false,onMoveShouldSetPanResponder:(ne,ie)=>Math.abs(ie.dx)>5&&Math.abs(ie.dy)<10,onPanResponderMove:(ne,ie)=>{q.setValue(ie.dx)},onPanResponderRelease:(ne,ie)=>{let{dx:yt,vx:ht}=ie,Kt=80,ft=.5;Z.spring(q,{toValue:0,useNativeDriver:true}).start(),(Math.abs(yt)>Kt||Math.abs(ht)>ft)&&(yt>0||ht>0?A("right"):A("left"))},onPanResponderTerminate:()=>{Z.spring(q,{toValue:0,useNativeDriver:true}).start()}})).current;if(!e)return null;let ye=()=>Ge(et,{selectedMutation:f,activeTab:"mutations",onTabChange:l,onBack:()=>r(void 0),searchText:u,onSearchChange:c,onClearCache:g}),he=Ge(Ya,{activeFilter:m,onFilterChange:p,modalMode:S});return Ge(kl,{visible:e,onClose:a,onMinimize:o,persistenceKey:C,header:{customContent:ye(),showToggleButton:true},onModeChange:j,enablePersistence:true,initialMode:"bottomSheet",enableGlitchEffects:true,styles:{},footer:he,footerHeight:M,children:Ge(h,{style:{flex:1},children:Ll(h,{...oe.panHandlers,style:{flex:1},children:[Ge(ro,{translationX:q,canSwipeLeft:false,canSwipeRight:true}),Ge(Ja,{selectedMutation:f,onMutationSelect:r,activeFilter:m,searchText:u})]})})})}import{JsModal as Bl,useSafeAreaInsets as Hl,devToolsStorageKeys as no}from"@buoy-gg/shared-ui/web";import{useSafeAreaInsets as Wl,night as K,monoFont as io}from"@buoy-gg/shared-ui/web";import{useMemo as jl}from"react";import{useQueryClient as Vl}from"@tanstack/react-query";function so(e){let t=Vl();return jl(()=>[{label:"Remove",variant:"remove",disabled:false,onPress:()=>t.getMutationCache().remove(e)}],[e,t])}import{DataViewer as $l}from"@buoy-gg/shared-ui/web/dataViewer";import{Fragment as Nl,jsx as E,jsxs as Ye}from"react/jsx-runtime";function lo({selectedMutation:e,isFloatingMode:t,disableInternalFooter:r=false}){return Ye(Nl,{children:[Ye(be,{testID:"buoy-rq-mutation-detail-scroll",accessibilityLabel:"Mutation editor mode",accessibilityHint:"View mutation editor mode","sentry-label":"ignore mutation editor mode",style:P.explorerScrollContainer,contentContainerStyle:P.explorerScrollContent,children:[Ye(h,{style:P.section,children:[E(Ul,{visible:!!e.state.data,selectedMutation:e}),E(_l,{visible:!e.state.data,selectedMutation:e})]}),E(h,{style:P.section,children:E(rr,{selectedMutation:e})}),E(h,{style:P.section,children:Ye(h,{style:P.mutationExplorerContainer,children:[E(v,{style:P.mutationExplorerHeader,children:"Mutation Explorer"}),E(h,{style:P.mutationExplorerContent,children:E($l,{title:"",data:e,maxDepth:10,rawMode:true,showTypeFilter:true,initialExpanded:false})})]})})]}),!r&&E(uo,{selectedMutation:e,isFloatingMode:t})]})}function uo({selectedMutation:e,isFloatingMode:t}){let r=Wl({minBottom:16}),a=so(e);return E(h,{style:[P.actionFooter,{paddingBottom:t?0:r.bottom+8}],children:E(h,{style:P.actionsGrid,children:a.map((o,n)=>E(ue,{testID:`buoy-rq-action-${o.variant}`,onClick:o.onPress,text:o.label,variant:o.variant,disabled:o.disabled},n))})})}function Ul({visible:e,selectedMutation:t}){return e?Ye(h,{style:P.dataContainer,children:[E(v,{style:P.dataHeader,children:"Data Editor"}),E(h,{style:P.dataContent,children:E(me,{editable:true,label:"Data",value:t.state.data,defaultExpanded:["Data"]},t.mutationId)})]}):null}function _l({visible:e,selectedMutation:t}){if(!e)return null;let r=()=>t.state.status==="pending"?{title:"Pending...",description:"The mutation is in progress."}:t.state.status==="error"?{title:"Mutation Error",description:t.state.error?.message||"An error occurred."}:{title:"No Data Available",description:"This mutation has no data."},{title:a,description:o}=r();return Ye(h,{style:P.emptyState,children:[E(v,{testID:"buoy-rq-mutation-detail-empty-title",style:P.emptyTitle,children:a}),E(v,{testID:"buoy-rq-mutation-detail-empty-description",style:P.emptyDescription,children:o})]})}var P=T.create({explorerScrollContainer:{flex:1},explorerScrollContent:{paddingBottom:16,paddingHorizontal:8,flexGrow:1},section:{marginBottom:16},emptyState:{flex:1,justifyContent:"center",alignItems:"center",padding:32},emptyTitle:{color:K.color.text,fontSize:18,fontWeight:"600",marginBottom:8,textAlign:"center"},emptyDescription:{color:K.color.textSecondary,fontSize:14,textAlign:"center",lineHeight:20,maxWidth:280},actionFooter:{borderTopWidth:1,borderTopColor:K.color.border,paddingVertical:8,paddingHorizontal:12,backgroundColor:"transparent",borderBottomLeftRadius:14,borderBottomRightRadius:14},actionsGrid:{flexDirection:"row",flexWrap:"wrap",gap:6,justifyContent:"space-between"},mutationExplorerContainer:{minWidth:200,backgroundColor:K.color.surface,borderRadius:6,borderWidth:1,borderColor:K.color.accent+"4D",overflow:"hidden",shadowColor:K.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},mutationExplorerHeader:{backgroundColor:K.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:K.color.accent,borderBottomWidth:1,borderBottomColor:K.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:io},mutationExplorerContent:{padding:8},dataContainer:{minWidth:200,backgroundColor:K.color.surface,borderRadius:6,borderWidth:1,borderColor:K.color.accent+"4D",overflow:"hidden",shadowColor:K.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:6},dataHeader:{backgroundColor:K.color.accent+"1A",paddingHorizontal:12,paddingVertical:10,fontWeight:"600",fontSize:12,color:K.color.accent,borderBottomWidth:1,borderBottomColor:K.color.accent+"33",letterSpacing:.5,textTransform:"uppercase",fontFamily:io},dataContent:{padding:8}});import{useState as Jl,useCallback as Gl,useEffect as Yl,useRef as Xl}from"react";import{jsx as It}from"react/jsx-runtime";function co({visible:e,selectedMutationId:t,onMutationSelect:r,onClose:a,onMinimize:o,onTabChange:n,enableSharedModalDimensions:i=false}){let l=cr(t),[s,u]=Jl("bottomSheet"),c=Xl(void 0);Yl(()=>{if(l){c.current=l.mutationId;return}e&&c.current!==void 0&&c.current===t&&(c.current=void 0,r(void 0))},[e,l,t,r]);let d=Gl(g=>{u(g)},[]),f=Hl({minBottom:16}),b=s==="floating"?72:80+f.bottom,y=()=>It(et,{selectedMutation:l,activeTab:"mutations",onTabChange:n,onBack:()=>r(void 0)}),m=i?no.reactQuery.modal():no.reactQuery.mutationModal();if(!e||!l)return null;let p=It(uo,{selectedMutation:l,isFloatingMode:s==="floating"});return It(Bl,{visible:e,onClose:a,onMinimize:o,persistenceKey:m,header:{customContent:y(),showToggleButton:true},onModeChange:d,enablePersistence:true,initialMode:"bottomSheet",enableGlitchEffects:true,styles:{},footer:p,footerHeight:b,children:It(lo,{selectedMutation:l,isFloatingMode:s==="floating",disableInternalFooter:true})})}import{Fragment as Zl,jsx as kt,jsxs as eu}from"react/jsx-runtime";function yo({visible:e,selectedQueryKey:t,selectedMutationId:r,onQuerySelect:a,onMutationSelect:o,onClose:n,onMinimize:i,activeFilter:l,onFilterChange:s,activeTab:u,onTabChange:c,enableSharedModalDimensions:d=false,searchText:f="",onSearchChange:b}){let y=!!t||!!r,m=u==="queries",p=u==="mutations",g={onClose:n,onMinimize:i,activeFilter:l,onFilterChange:s,enableSharedModalDimensions:d},S=e&&!y&&m,w=e&&!y&&p,C=e&&y&&m&&!!t,q=e&&y&&p&&!!r;return eu(Zl,{children:[kt(La,{visible:S,selectedQueryKey:t,onQuerySelect:a,onTabChange:c,searchText:f,onSearchChange:b,...g}),kt(oo,{visible:w,selectedMutationId:r,onMutationSelect:o,onTabChange:c,searchText:f,onSearchChange:b,...g}),kt($a,{visible:C,selectedQueryKey:t,onQuerySelect:a,onTabChange:c,...g}),kt(co,{visible:q,selectedMutationId:r,onMutationSelect:o,onTabChange:c,...g})]})}import{ChangeLog as tu}from"@buoy-gg/shared-ui/web";var ru=0;function Re(){return`rq-${Date.now()}-${++ru}`}var au=class extends tu{constructor(){super({max:200});this.queryClient=null;this.queryUnsubscribe=null;this.mutationUnsubscribe=null;this.fetchStartTimes=new Map;this.mutationStartTimes=new Map;this.lastQueryStates=new Map;this.lastMutationStates=new Map}setQueryClient(e){this.disconnect(),this.queryClient=e,this.queryUnsubscribe=e.getQueryCache().subscribe(t=>{t.type==="updated"&&t.query&&this.handleQueryUpdate(t.query)}),this.mutationUnsubscribe=e.getMutationCache().subscribe(t=>{t.type==="updated"&&t.mutation&&this.handleMutationUpdate(t.mutation)})}disconnect(){this.queryUnsubscribe&&(this.queryUnsubscribe(),this.queryUnsubscribe=null),this.mutationUnsubscribe&&(this.mutationUnsubscribe(),this.mutationUnsubscribe=null),this.queryClient=null,this.lastQueryStates.clear(),this.lastMutationStates.clear(),this.fetchStartTimes.clear(),this.mutationStartTimes.clear()}handleQueryUpdate(e){if(Se(e.queryKey))return;let t=e.queryHash,r={fetchStatus:e.state.fetchStatus,status:e.state.status},a=this.lastQueryStates.get(t);if(!a)r.fetchStatus==="fetching"&&(this.fetchStartTimes.set(t,Date.now()),this.addEvent({id:Re(),type:"query-fetch-start",timestamp:Date.now(),queryKey:e.queryKey,queryHash:t,query:e}));else{let o=a.fetchStatus==="fetching",n=r.fetchStatus==="fetching";if(!o&&n&&(this.fetchStartTimes.set(t,Date.now()),this.addEvent({id:Re(),type:"query-fetch-start",timestamp:Date.now(),queryKey:e.queryKey,queryHash:t,query:e})),o&&!n){let i=this.fetchStartTimes.get(t),l=i?Date.now()-i:void 0;this.fetchStartTimes.delete(t),r.status==="error"?this.addEvent({id:Re(),type:"query-fetch-error",timestamp:Date.now(),queryKey:e.queryKey,queryHash:t,queryError:e.state.error,duration:l,query:e}):this.addEvent({id:Re(),type:"query-fetch-success",timestamp:Date.now(),queryKey:e.queryKey,queryHash:t,queryData:e.state.data,duration:l,query:e})}!a.status&&e.state.isInvalidated&&this.addEvent({id:Re(),type:"query-invalidated",timestamp:Date.now(),queryKey:e.queryKey,queryHash:t,query:e})}this.lastQueryStates.set(t,r)}handleMutationUpdate(e){let t=e.mutationId,r=e.state.status,a=this.lastMutationStates.get(t);if(a!==r){if(r==="pending"&&a!=="pending")this.mutationStartTimes.set(t,Date.now()),this.addEvent({id:Re(),type:"mutation-start",timestamp:Date.now(),mutationId:t,mutationKey:e.options.mutationKey,mutationVariables:e.state.variables,mutation:e});else if(r==="success"&&a==="pending"){let o=this.mutationStartTimes.get(t),n=o?Date.now()-o:void 0;this.mutationStartTimes.delete(t),this.addEvent({id:Re(),type:"mutation-success",timestamp:Date.now(),mutationId:t,mutationKey:e.options.mutationKey,mutationVariables:e.state.variables,mutationData:e.state.data,duration:n,mutation:e})}else if(r==="error"&&a==="pending"){let o=this.mutationStartTimes.get(t),n=o?Date.now()-o:void 0;this.mutationStartTimes.delete(t),this.addEvent({id:Re(),type:"mutation-error",timestamp:Date.now(),mutationId:t,mutationKey:e.options.mutationKey,mutationVariables:e.state.variables,mutationError:e.state.error,duration:n,mutation:e})}}this.lastMutationStates.set(t,r)}addEvent(e){this.record(e)}getEvents(){return this.items}subscribe(e){let t=super.subscribe(e);return e(this.items),t}clearEvents(){this.clear()}isConnected(){return this.queryClient!==null}},We=new au,ou=e=>We.setQueryClient(e),nu=()=>We.disconnect();import{jsx as ho}from"react/jsx-runtime";function hr({visible:e,onClose:t,onMinimize:r,enableSharedModalDimensions:a=true}){let o=en();Zo(()=>{We.isConnected()||We.setQueryClient(o)},[o]);let[n,i]=Ze(void 0),[l,s]=Ze(void 0),[u,c]=Ze(null),[d,f]=Ze("queries"),[b,y]=Ze(""),m=Fe(()=>{i(void 0),s(void 0),c(null),f("queries"),y("")},[]),p=Fe(()=>{m(),t()},[t,m]),g=Fe(A=>{i(A?.queryKey)},[]),S=Fe(A=>{s(A?.mutationId)},[]),w=Fe(A=>{c(A)},[]),C=Fe(A=>{f(A),c(null),i(void 0),s(void 0),y("")},[]),q=Fe(A=>{y(A)},[]);return e?ho(tn,{children:ho(yo,{visible:e,selectedQueryKey:n,selectedMutationId:l,onQuerySelect:g,onMutationSelect:S,onClose:p,onMinimize:r,activeFilter:u,onFilterChange:w,activeTab:d,onTabChange:C,searchText:b,onSearchChange:q,enableSharedModalDimensions:a})}):null}import{onlineManager as pe}from"@tanstack/react-query";import{devToolsStorageKeys as fo,persistentStorage as mo}from"@buoy-gg/shared-ui/web";import{useState as go,useEffect as po}from"react";import{jsx as Et}from"react/jsx-runtime";var bo=()=>null,vo=async e=>{try{await mo.setItem(fo.settings.wifiEnabled(),e.toString())}catch{}},iu=async()=>{try{let e=await mo.getItem(fo.settings.wifiEnabled());e!==null&&pe.setOnline(e==="true")}catch{}};iu();function su({size:e}){let[t,r]=go(()=>pe.isOnline());return po(()=>pe.subscribe(a=>{r(a)}),[]),Et(xr,{size:e,color:t?"#10B981":"#DC2626"})}var lu={id:"query",name:"QUERY",description:"React Query inspector",slot:"both",icon:({size:e})=>Et(Cr,{size:e}),component:hr,props:{enableSharedModalDimensions:false}};function uu(e){return{id:e?.id||"query",name:e?.name||"QUERY",description:e?.description||"React Query inspector",slot:"both",icon:({size:t})=>Et(Cr,{size:t}),component:hr,props:{enableSharedModalDimensions:e?.enableSharedModalDimensions!==void 0?e.enableSharedModalDimensions:false}}}var cu={id:"query-wifi-toggle",name:"WIFI",description:"Toggle React Query online/offline state",slot:"row",icon:su,component:bo,props:{},launchMode:"toggle-only",onPress:()=>{let e=!pe.isOnline();pe.setOnline(e),vo(e)}};function du(e){let t=e?.onColor||"#10B981",r=e?.offColor||"#DC2626",a=({size:o})=>{let[n,i]=go(()=>pe.isOnline());return po(()=>pe.subscribe(l=>{i(l)}),[]),Et(xr,{size:o,color:n?t:r})};return{id:e?.id||"query-wifi-toggle",name:e?.name||"WIFI",description:e?.description||"Toggle React Query online/offline state",slot:"row",icon:a,component:bo,props:{},launchMode:"toggle-only",onPress:()=>{let o=!pe.isOnline();pe.setOnline(o),vo(o)}}}import{expandKeyedArrays as yu,patchFromPath as hu,readPath as fu,refusalText as mu,shapeSummary as Ft,suggestedPatch as gu,typedEditViolations as pu,unshapedLists as bu}from"@buoy-gg/shared-ui/web";import{onlineManager as fr}from"@tanstack/react-query";import{isJsonSerializable as So,isOverWireBudget as Co}from"@buoy-gg/shared-ui/web";var vu=Object.freeze({__buoyDataOnDevice:true,note:"Query data stays on the device \u2014 fetched on demand via getQueryData."}),xo=Object.freeze({__buoyUnserializable:true,note:"Query data is not JSON-serializable (circular or bigint) and stayed on the device."}),Su=16*1024,wo=8*1024*1024;function Cu(e){return!!e&&typeof e=="object"&&e.__buoyDataOnDevice===true}function xu(e){return!!e&&typeof e=="object"&&e.__buoyUnserializable===true}function qo(e){return Cu(e)||xu(e)}function Qe(e){if(e!==void 0)return Co(e,Su)?So(e)?vu:xo:e}function Pt(e){if(e==null)return e;if(typeof e=="object"){let t=e,r=typeof t.name=="string"?t.name:void 0,a=typeof t.message=="string"?t.message:void 0;if(r!==void 0||a!==void 0)return Qe({...r!==void 0?{name:r}:{},...a!==void 0?{message:a}:{}})}return Qe(e)}function wu(e){return Co(e,wo)?So(e)?{__buoyTruncated:true,note:`Exceeds the ${wo/(1024*1024)}MB detail limit \u2014 inspect it on-device.`}:xo:e}function qu(e){let t=e.getMutationCache().getAll().map(a=>Mu(a)),r=e.getQueryCache().getAll().map(a=>Au(a));return{mutations:t,queries:r}}function Mu(e){let t=e.state;return{mutationId:e.mutationId,mutationKey:e.options.mutationKey,state:{...t,data:Qe(t.data),variables:Qe(t.variables),error:Pt(t.error),failureReason:Pt(t.failureReason)},...e.options.scope&&{scope:e.options.scope},...e.meta&&{meta:Qe(e.meta)}}}function Tu(e){let{queryFn:t,select:r,persister:a,initialData:o,placeholderData:n,...i}=e;return{...i,queryFn:void 0,...e.meta?{meta:Qe(e.meta)}:{}}}function Au(e){let t=e.observers.map(r=>({queryHash:e.queryHash,options:Tu(r.options)}));return{state:{...e.state,...e.state.data!==void 0&&{data:Qe(e.state.data)},error:Pt(e.state.error),fetchFailureReason:Pt(e.state.fetchFailureReason)},queryKey:e.queryKey,queryHash:e.queryHash,...e.meta&&{meta:Qe(e.meta)},observers:t}}function Du(e,t){let r=e;for(let a of t.split(".")){if(!r||typeof r!="object"||Array.isArray(r)||!(a in r))return false;r=r[a]}return Array.isArray(r)?r.length>0:!!r&&typeof r=="object"}var ct=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function Mo(e){return Array.isArray(e)?"array":e===null?"null":typeof e=="object"?"object":typeof e}function To(e,t,r="",a={shrunk:[],breaks:[]}){if(Array.isArray(e)&&Array.isArray(t))return t.length>0&&t.length<e.length&&a.shrunk.push({path:r||"(root)",have:e.length,sent:t.length}),t;if(!ct(e)||!ct(t))return t;let o={...e};for(let[n,i]of Object.entries(t)){let l=r?`${r}.${n}`:n;if(n in e){let s=Mo(e[n]),u=Mo(i);(s==="array"||s==="object")&&s!==u&&a.breaks.push({path:l,from:s,to:u}),o[n]=To(e[n],i,l,a)}else o[n]=i}return o}function Ru(e){let t=e.trim();try{let r=JSON.parse(t);if(Array.isArray(r))return r.map(a=>typeof a=="object"&&a!==null?JSON.stringify(a):String(a))}catch{}return t.includes(",")&&!t.startsWith("[")?t.split(",").map(r=>r.trim().replace(/^["']|["']$/g,"")):null}function Qu(e){let t;for(let r of e.observers??[]){let a=r.options?.refetchInterval,o=a;if(typeof a=="function")try{o=a(e)}catch{o=void 0}typeof o=="number"&&o>0&&(t=t===void 0?o:Math.min(t,o))}return t}function Ao(e){let t=r=>{let{queryHash:a}=r,o=e.getQueryCache(),n=a?o.get(a):void 0;if(!n&&typeof a=="string"){let i=Ru(a);i&&(n=o.getAll().find(l=>{let s=l.queryKey.map(u=>typeof u=="object"?JSON.stringify(u):String(u));return s.length===i.length&&s.every((u,c)=>u===i[c])}))}if(!n)throw new Error(`Query with hash "${a}" not found`);return n};return{version:2,getSnapshot:()=>({dehydratedState:qu(e),isOnlineManagerOnline:fr.isOnline()}),subscribe:r=>{let a=e.getQueryCache().subscribe(r),o=e.getMutationCache().subscribe(r),n=fr.subscribe(r);return()=>{a(),o(),n()}},actions:{getQueryData:r=>{let{queryHash:a,path:o}=r??{};if(!a)return{found:false,reason:"missing queryHash"};let n=e.getQueryCache().get(a);if(!n)return{found:false,reason:"unknown queryHash"};if(o){let l=fu(n.state.data,o);return l.ok?{found:true,queryHash:a,path:o,shape:Ft(l.value),data:l.value}:{found:false,reason:l.error}}if(n.state.data===void 0){let l=n.state.status,s=n.state.error;return{found:true,queryHash:a,hasData:false,status:l,fetchStatus:n.state.fetchStatus,...s?{error:s instanceof Error?s.message:String(s)}:{},reason:l==="error"?"This query has no data because it FAILED. Report the error, not an empty result.":n.state.fetchStatus==="fetching"?"No data yet \u2014 this query is still fetching.":"This query has never resolved (it may be disabled, or never enabled). It is not empty \u2014 it has nothing."}}let i=Ft(n.state.data);return{found:true,queryHash:a,hasData:true,...i?{shape:i}:{},data:wu(n.state.data)}},listQueries:r=>{let{includeData:a=false,staleOnly:o=false,limit:n}=r??{},i=e.getQueryCache().getAll(),l=[...o?i.filter(u=>u.isStale()):i].sort((u,c)=>{let d=+(c.getObserversCount()>0)-+(u.getObserversCount()>0);return d!==0?d:(c.state.dataUpdatedAt??0)-(u.state.dataUpdatedAt??0)}),s=(typeof n=="number"&&n>0?l.slice(0,n):l).map(u=>{let c=u.state.error,d=Qu(u);return{queryHash:u.queryHash,queryKey:u.queryKey,status:se(u),fetchStatus:u.state.fetchStatus,isStale:u.isStale(),observers:u.getObserversCount(),updatedAt:u.state.dataUpdatedAt,...d?{refetchEveryMs:d}:{},error:c?c.message??String(c):void 0,...a?{data:u.state.data}:{},...Ft(u.state.data)?{shape:Ft(u.state.data)}:{}}});return{queries:s,total:i.length,returned:s.length,includedData:a}},refetch:r=>t(r).fetch().catch(()=>{}),invalidate:r=>e.invalidateQueries(t(r)),reset:r=>e.resetQueries(t(r)),remove:r=>{let a=t(r),o=e.getQueryCache().findAll(a).some(n=>n.getObserversCount()>0);return e.removeQueries(a),{ok:true,...o?{note:"Removed \u2014 but a screen is still watching this query, and React Query leaves that screen rendering its LAST value (including anything written into the cache before this) until something refetches. Nothing on screen will change on its own. Use `reset` instead when you want the screen to go back to loading and fetch again."}:{}}},setQueryData:r=>{let{data:a,merge:o,force:n,path:i,value:l}=r,{queryKey:s,queryHash:u}=r,c=s;if(c===void 0&&typeof u=="string"){let y=e.getQueryCache().get(u);if(!y)return{ok:false,error:`Refused: no query with hash ${u} is in the cache. Read listQueries for the current hashes \u2014 a query that has been removed or whose key includes changing params (a search term, a cart payload) will not match an older hash.`};c=y.queryKey}if(c===void 0)return{ok:false,error:"Refused: no query was named. Send `queryKey` (the array from listQueries) or `queryHash` (its string form)."};let d=e.getQueryData(c),f=e.getQueryCache().find({queryKey:c,exact:true});if(d===void 0&&f&&(a!==void 0||i!==void 0)){let y=f,m=y?.state.status;return{ok:false,error:`Refused: this query has no data to edit \u2014 ${m==="error"?`it FAILED${y?.state.error?` (${y.state.error instanceof Error?y.state.error.message:String(y.state.error)})`:""}`:m==="pending"?"it has never resolved (it may be disabled, or still loading)":"it holds no data"}. There is nothing to merge into. Fix the cause first (restoreError, or let it fetch), or send force:true with the COMPLETE value if you mean to seed the cache from nothing.`,status:m}}if(a===void 0&&i===void 0)return{ok:false,error:"Refused: no change was described. Send `data` (with merge:true for a partial edit), or `path` and `value` to set one value."};let b=a;if(i!==void 0){if(l===void 0)return{ok:false,error:`Refused: sent \`path\` without \`value\`. Say what to set "${i}" to; if you mean to clear it, send value:null and the field must already be nullable.`};let y=hu(d,i,l);if(!y.ok)return{ok:false,error:`Refused: ${y.error}`};b=y.patch}if(o||i!==void 0){let y=n?{patch:b,notes:[],error:void 0}:yu(d,b);if(y.error)return{ok:false,error:`Refused: ${y.error}`};let m=y.patch;if(!n){let S=pu(d,m,{noun:"data"});if(S.length>0){let w=gu(m,S);return{ok:false,error:mu(S,"data",w),violations:S,...w?{suggestedData:w}:{}}}}let p=To(d,m),g=bu(d).filter(S=>Du(m,S));return e.setQueryData(c,p,{updatedAt:Date.now()}),{ok:true,mode:"merge",...i!==void 0?{path:i}:{},changedKeys:ct(m)?Object.keys(m):void 0,...y.notes.length?{keyed:y.notes}:{},...g.length?{unchecked:g.map(S=>`\`${S}\` was empty, so nothing in the app knows what its items look like and the shape of what you added was NOT checked. If the screen renders a field you left out, it will render undefined \u2014 read the query back and compare against how the screen uses it.`)}:{}}}if(!n&&ct(d)&&ct(a)){let y=Object.keys(d).filter(m=>!(m in a));if(y.length>0)return{ok:false,error:`Refused: the new value drops ${y.length} top-level field(s) the cached value has (${y.slice(0,8).join(", ")}${y.length>8?", \u2026":""}). A screen rendering those fields would crash. To change some fields, send merge:true with ONLY the fields that change. To really replace the whole value, send force:true.`,missingKeys:y}}return e.setQueryData(c,a,{updatedAt:Date.now()}),{ok:true,mode:"replace"}},triggerError:r=>{let a=t(r),o=a.options;a.setState({status:"error",error:new Error("Unknown error from devtools"),fetchMeta:{...a.state.fetchMeta,__previousQueryOptions:o}})},restoreError:r=>e.resetQueries(t(r)),triggerLoading:r=>{let a=t(r),o=a.options;a.fetch({...o,queryFn:()=>new Promise(()=>{}),gcTime:-1}).catch(()=>{}),a.setState({data:void 0,status:"pending",fetchMeta:{...a.state.fetchMeta,__previousQueryOptions:o}})},restoreLoading:r=>{let a=t(r),o=a.state,n=a.state.fetchMeta?a.state.fetchMeta.__previousQueryOptions:null;a.cancel({silent:true}),a.setState({...o,fetchStatus:"idle",fetchMeta:null}),n&&a.fetch(n).catch(()=>{})},clearQueryCache:()=>{let r=e.getQueryCache().getAll().filter(a=>a.getObserversCount()>0).length;return e.getQueryCache().clear(),{ok:true,cleared:true,...r?{note:`Cleared \u2014 but ${r} quer${r===1?"y is":"ies are"} still being watched by a screen, and React Query leaves those screens rendering their LAST value until something refetches. The cache is empty; the app on screen is not. Use \`reset\` on a query when you want its screen to reload.`}:{}}},clearMutationCache:()=>{e.getMutationCache().clear()},setOnline:r=>{let{online:a}=r;fr.setOnline(a)}}}}import{useEffect as Iu,useMemo as ku}from"react";import{useQueryClient as Eu}from"@tanstack/react-query";import{classifyPreviewItem as Fu,createRestoreScope as Pu,emptyRestoreResult as zu,failedRestore as Ou,registerStateSnapshotProvider as Ku,superJsonSerialize as Lu}from"@buoy-gg/shared-ui/web";function Do(e){return{...e,fetchStatus:"idle",fetchMeta:null}}function mr(e){return{status:e.state.status,error:e.state.error??null,data:e.state.data}}function gr(e,t){try{let r=JSON.stringify(e);return r.length>60?`${r.slice(0,57)}\u2026`:r}catch{return t}}function Ro(e){if(e==null)return e??null;if(typeof e=="object"){let t=e,r=typeof t.name=="string"?t.name:void 0,a=typeof t.message=="string"?t.message:void 0;if(r!==void 0||a!==void 0)return{...r!==void 0?{name:r}:{},...a!==void 0?{message:a}:{}}}return e}function Qo(e){if(e===void 0)return true;try{return Lu(e),true}catch{return false}}function Io(e){let t=[],r=[];for(let a of e.getQueryCache().getAll()){let o=gr(a.queryKey,a.queryHash);if(!Qo(a.state.data)){t.push(`query ${o}: data can't be serialized (circular reference?) \u2014 not captured`);continue}r.push({queryKey:a.queryKey,queryHash:a.queryHash,...a.meta&&Qo(a.meta)?{meta:a.meta}:{},state:Do({...a.state,error:Ro(a.state.error),fetchFailureReason:Ro(a.state.fetchFailureReason)})})}return{queries:r,warnings:t}}function Bu(e){return{id:"query",label:"React Query",status:()=>({canCapture:true,canRestore:true}),async capture(){let{queries:t,warnings:r}=Io(e),a=e.getMutationCache().getAll().length;return a>0&&r.push(`${a} mutation(s) not captured (mutation functions cannot be restored)`),{data:{queries:t},warnings:r}},async restore(t,r){let a=t,o=Pu(r),n=zu();if(!a?.queries)return Ou("empty query snapshot");let i=e.getQueryCache(),l=new Set(a.queries.map(c=>c.queryHash));for(let c of a.queries)if(o.allows(c.queryHash)){if(qo(c.state.data)){n.skipped.push({id:c.queryHash,reason:"captured as an on-device placeholder by an older Buoy \u2014 re-capture this restore point"});continue}try{let d=Do(c.state),f=i.get(c.queryHash);f?f.setState(d):i.build(e,{queryKey:c.queryKey,queryHash:c.queryHash,...c.meta&&{meta:c.meta}},d),n.applied+=1}catch(d){n.skipped.push({id:c.queryHash,reason:String(d)}),n.ok=false}}for(let c of i.getAll().slice())if(o.allows(c.queryHash)&&!l.has(c.queryHash))try{i.remove(c),n.applied+=1}catch(d){n.skipped.push({id:c.queryHash,reason:String(d)})}let s=e.getMutationCache().getAll().length;s>0&&(e.getMutationCache().clear(),n.warnings.push(`mutation cache cleared (${s} mutation(s))`));let u=o.excludedWarning("quer(y/ies)");return u&&n.warnings.push(u),n},async previewItems(t,r){let a=t?.queries??[],o=r===void 0,n=o?Io(e).queries:r?.queries??[],i=new Map(n.map(c=>[c.queryHash,c])),l=new Map(a.map(c=>[c.queryHash,c])),s=[],u=[];for(let c of a){let d=gr(c.queryKey,c.queryHash);if(qo(c.state.data)){s.push({key:c.queryHash,label:d,verdict:"wont-apply",reason:"data stayed on the device when this was captured (older Buoy) \u2014 re-capture this restore point"});continue}let f=i.get(c.queryHash);s.push(Fu({key:c.queryHash,label:d,oldValue:f?mr(f):void 0,newValue:mr(c),inOld:f!==void 0,inNew:true},{tooLargeReason:"query data too large to render a diff \u2014 restore still applies it"}))}for(let c of n)l.has(c.queryHash)||s.push({key:c.queryHash,label:gr(c.queryKey,c.queryHash),verdict:"removed",oldValue:mr(c)});if(o){let c=e.getMutationCache().getAll().length;c>0&&u.push(`${c} in-memory mutation record(s) will be cleared`)}return{items:s,notes:u}}}}function Hu(e){return Ku(Bu(e))}function Wu(){let e;try{e=Eu()}catch{e=null}return Iu(()=>{if(e)return Hu(e)},[e]),ku(()=>e?Ao(e):null,[e])}function ko({queryState:e,observerCount:t,isStale:r}){return e.fetchStatus==="fetching"?"blue":e.status==="error"?"red":t?e.fetchStatus==="paused"?"purple":r?"yellow":"green":"gray"}import{useQueryClient as ju}from"@tanstack/react-query";import{jsx as zt,jsxs as Ie}from"react/jsx-runtime";function Eo(){try{let e=ju(),t=e.getQueryCache().getAll(),r=e.getMutationCache().getAll();return Ie(h,{style:Y.container,children:[zt(v,{style:Y.title,children:"Debug Info"}),zt(v,{style:Y.info,children:"QueryClient: \u2705 Available"}),Ie(v,{style:Y.info,children:["Queries: ",t.length]}),Ie(v,{style:Y.info,children:["Mutations: ",r.length]}),t.length>0&&Ie(h,{style:Y.queriesList,children:[zt(v,{style:Y.subtitle,children:"Query Keys:"}),t.slice(0,3).map((a,o)=>Ie(v,{style:Y.queryKey,children:["\u2022"," ",Array.isArray(a.queryKey)?a.queryKey.join(" - "):String(a.queryKey)]},o)),t.length>3&&Ie(v,{style:Y.more,children:["... and ",t.length-3," more"]})]})]})}catch(e){return Ie(h,{style:Y.container,children:[zt(v,{style:Y.title,children:"Debug Info"}),Ie(v,{style:Y.error,children:["\u274C QueryClient Error: ",String(e)]})]})}}var Y=T.create({container:{padding:16,backgroundColor:"rgba(0, 0, 0, 0.3)",borderRadius:8,margin:16,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.1)"},title:{color:"#FFFFFF",fontSize:14,fontWeight:"600",marginBottom:8},subtitle:{color:"#E5E7EB",fontSize:12,fontWeight:"500",marginTop:8,marginBottom:4},info:{color:"#9CA3AF",fontSize:12,marginBottom:4},error:{color:"#EF4444",fontSize:12,marginBottom:4},queriesList:{marginTop:4},queryKey:{color:"#60A5FA",fontSize:11,marginLeft:8,marginBottom:2},more:{color:"#9CA3AF",fontSize:11,fontStyle:"italic",marginLeft:8}});import{jsx as ke,jsxs as Xe}from"react/jsx-runtime";function Vu({queries:e,selectedQuery:t,isOpen:r,onClose:a,onSelect:o}){let n=i=>Array.isArray(i.queryKey)?i.queryKey.join(" - "):String(i.queryKey);return ke(Rr,{accessibilityLabel:"Query selector",accessibilityHint:"View query selector","sentry-label":"ignore query selector",visible:r,transparent:true,animationType:"fade",onRequestClose:a,children:ke(Dr,{accessibilityLabel:"Query selector overlay",accessibilityHint:"View query selector overlay","sentry-label":"ignore query selector overlay",style:L.modalOverlay,onPress:a,children:Xe(h,{accessibilityLabel:"Query selector content",accessibilityHint:"View query selector content","sentry-label":"ignore query selector content",style:L.modalContent,children:[Xe(h,{style:L.modalHeader,children:[ke(v,{style:L.modalTitle,children:"Select Query"}),Xe(v,{style:L.modalSubtitle,children:[e.length," ",e.length===1?"query":"queries"," ","available"]})]}),ke(be,{accessibilityLabel:"Query selector scroll view",accessibilityHint:"View query selector scroll view","sentry-label":"ignore query selector scroll view",style:L.scrollView,contentContainerStyle:L.scrollViewContent,showsVerticalScrollIndicator:true,children:e.length===0?Xe(h,{style:L.emptyState,children:[ke(v,{style:L.emptyTitle,children:"No Queries Found"}),Xe(v,{style:L.emptyDescription,children:["No React Query queries are currently active.",`
7
7
 
8
8
  `,"To see queries here:",`
9
9
  `,"\u2022 Make API calls using useQuery",`
10
10
  `,"\u2022 Ensure queries are within QueryClientProvider",`
11
- `,"\u2022 Check console for debugging info"]}),De(Aa,{})]}):e.map((s,i)=>{let l=n(s),u=Ma({queryState:s.state,observerCount:s.getObserversCount(),isStale:s.isStale()}),c={blue:"#3B82F6",gray:"#6B7280",purple:"#8B5CF6",yellow:"#F59E0B",green:"#10B981",red:"#EF4444"}[u]||"#6B7280",d=s===t;return Je(V,{accessibilityLabel:`Query ${l}`,accessibilityHint:`View query ${l}`,"sentry-label":`ignore query ${l}`,style:[K.queryItem,d&&K.selectedQueryItem],onPress:()=>a(s),children:[De(f,{style:[K.statusDot,{backgroundColor:c}]}),De(p,{style:[K.queryText,d&&K.selectedQueryText],numberOfLines:1,children:l})]},`${s.queryHash}-${i}`)})})]})})})}var K=M.create({modalOverlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center"},modalContent:{backgroundColor:"#1F1F1F",borderRadius:8,width:"80%",maxHeight:"80%",minHeight:"50%",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.1)",flex:0},modalHeader:{padding:16,borderBottomWidth:1,borderBottomColor:"rgba(255, 255, 255, 0.1)"},modalTitle:{color:"#FFFFFF",fontSize:16,fontWeight:"600",marginBottom:4},modalSubtitle:{color:"#9CA3AF",fontSize:12},scrollView:{flex:1},scrollViewContent:{padding:8,flexGrow:1},emptyState:{padding:32,alignItems:"center",justifyContent:"center"},emptyTitle:{color:"#E5E7EB",fontSize:16,fontWeight:"500",marginBottom:8,textAlign:"center"},emptyDescription:{color:"#9CA3AF",fontSize:14,textAlign:"center",lineHeight:20},queryItem:{flexDirection:"row",alignItems:"center",padding:8,borderRadius:4},selectedQueryItem:{backgroundColor:"rgba(255, 255, 255, 0.1)"},statusDot:{width:8,height:8,borderRadius:4,marginRight:8},queryText:{color:"#E5E7EB",fontSize:14,flex:1},selectedQueryText:{color:"#FFFFFF",fontWeight:"500"},trigger:{flexDirection:"row",alignItems:"center",backgroundColor:"rgba(255, 255, 255, 0.05)",borderRadius:4,paddingHorizontal:8,paddingVertical:6,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.1)",minWidth:120,maxWidth:200},triggerText:{color:"#E5E7EB",fontSize:12,flex:1,marginHorizontal:6}});import{CyberpunkSectionButton as Ru,buoyColors as Da}from"@buoy-gg/shared-ui/web";import{jsx as mr}from"react/jsx-runtime";var Iu=()=>mr(f,{style:{width:24,height:24},children:mr(os,{})});function ku({onPress:e,getReactBuoySubtitle:t}){return mr(Ru,{id:"react-buoy-dev-tools",title:"QUERY",subtitle:(()=>{let r=t().match(/(\d+) queries • (\d+) mutations/);return r?`${r[1]}Q \u2022 ${r[2]}M`:"No data"})(),icon:Iu,iconColor:Da.error,iconBackgroundColor:Da.error+"1A",onPress:e,index:1})}import{useContext as Eu,useEffect as Fu}from"react";import{QueryClientContext as Pu}from"@tanstack/react-query";function Ou(){let e=Eu(Pu);return Fu(()=>{e&&(Ke.isConnected()||Ke.setQueryClient(e))},[e]),null}import{VirtualizedDataExplorer as zu,DataViewer as Ku,TypeLegend as Lu}from"@buoy-gg/shared-ui/web/dataViewer";import{useMemo as Bu}from"react";import{useQueryClient as Hu}from"@tanstack/react-query";import{isDevToolsStorageKey as Wu}from"@buoy-gg/shared-ui/web";function Qa(e){let t={mmkv:0,async:0,secure:0,total:0};return e.filter(r=>pe(r.queryKey)).forEach(r=>{let o=Br(r.queryKey);if(o){let a=jr(r.queryKey);Wu(a)||(t[o]++,t.total++)}}),t}function ju(){let e=Hu();return Bu(()=>{let t=e.getQueryCache().getAll();return Qa(t)},[e])}function Vu(e){return{getReactBuoySubtitle:()=>{try{let t=e.getQueryCache().getAll(),r=e.getMutationCache().getAll();return`${t.length} queries \u2022 ${r.length} mutations`}catch{return"Data management & cache inspector"}}}}import{useState as G,useEffect as $u}from"react";import{useEffect as Nu,useCallback as gr}from"react";import{persistentStorage as Ra}from"@buoy-gg/shared-ui/web";var lt=async(e,t)=>{await Ra.setItem(e,t)},Pt=async e=>Ra.getItem(e),Uu=async(e,t)=>{try{await lt(`${e}_panel_dimensions`,JSON.stringify(t))}catch{}},_u=async(e,t)=>{try{await lt(`${e}_panel_height`,t.toString())}catch{}},Ju=async(e,t)=>{try{await lt(`${e}_is_floating_mode`,t.toString())}catch{}},Gu=async e=>{try{let[t,r,o]=await Promise.all([Pt(`${e}_panel_dimensions`),Pt(`${e}_panel_height`),Pt(`${e}_is_floating_mode`)]),a=t?JSON.parse(t):null,n=r?parseInt(r,10):null;return{dimensions:a,height:n,isFloating:o?o==="true":null}}catch{return{dimensions:null,height:null,isFloating:null}}},Ia=async(e,t)=>{try{let r=JSON.stringify(t);await lt(e,r)}catch{}},ka=async e=>{try{let t=await Pt(e);return t&&t!==""?JSON.parse(t):null}catch{return null}},Ea=async e=>{try{await lt(e,"")}catch{}};function Fa({storagePrefix:e,isModalOpen:t,isDebugModalOpen:r,isEnvModalOpen:o=false,isSentryModalOpen:a=false,isStorageModalOpen:n=false,isNetworkModalOpen:s=false,selectedQueryKey:i,selectedSection:l,activeFilter:u,activeTab:c,selectedMutationId:d,isStateRestored:h}){let g=gr(async()=>{let C={isModalOpen:t,isDebugModalOpen:r,isEnvModalOpen:o,isSentryModalOpen:a,isStorageModalOpen:n,isNetworkModalOpen:s,selectedQueryKey:i?JSON.stringify(i):void 0,selectedSection:l||void 0,activeFilter:u||void 0,activeTab:c||void 0,selectedMutationId:d?.toString()||void 0};await Ia(e,C)},[e,t,r,o,a,n,s,i,l,u,c,d]),y=gr(async()=>await ka(e),[e]),m=gr(async()=>{await Ea(e)},[e]);return Nu(()=>{h&&(t||r||o||a||n||s?g():m())},[t,r,o,a,n,s,i,l,u,c,d,h,g,m]),{saveCurrentState:g,loadSavedState:y,clearSavedState:m}}import{devToolsStorageKeys as Yu}from"@buoy-gg/shared-ui/web";function Xu(){let[e,t]=G(false),[r,o]=G(false),[a,n]=G(false),[s,i]=G(false),[l,u]=G(false),[c,d]=G(false),[h,g]=G(void 0),[y,m]=G(null),[C,v]=G(null),[b,x]=G(false),[S,w]=G("queries"),[A,Y]=G(void 0),{loadSavedState:Qe}=Fa({storagePrefix:Yu.modal.state(),isModalOpen:e,isDebugModalOpen:r,isEnvModalOpen:a,isSentryModalOpen:s,isStorageModalOpen:l,isNetworkModalOpen:c,selectedQueryKey:h,selectedSection:y,activeFilter:C,activeTab:S,selectedMutationId:A,isStateRestored:b});return $u(()=>{(async()=>{if(!b)try{let T=await Qe();if(T){if(t(T.isModalOpen),o(T.isDebugModalOpen),n(T.isEnvModalOpen||false),i(T.isSentryModalOpen||false),u(T.isStorageModalOpen||false),d(T.isNetworkModalOpen||false),T.selectedQueryKey)try{let Ge=JSON.parse(T.selectedQueryKey);g(Ge)}catch{}T.selectedSection&&m(T.selectedSection),T.activeFilter&&v(T.activeFilter),T.activeTab&&w(T.activeTab),T.selectedMutationId&&Y(Number(T.selectedMutationId))}}catch{}finally{x(true)}})()},[b,Qe]),{isModalOpen:e,isDebugModalOpen:r,isEnvModalOpen:a,isSentryModalOpen:s,isStorageModalOpen:l,isNetworkModalOpen:c,selectedQueryKey:h,selectedSection:y,activeFilter:C,isStateRestored:b,activeTab:S,selectedMutationId:A,setSelectedSection:m,setActiveFilter:v,setActiveTab:w,handleModalDismiss:()=>{t(false),g(void 0)},handleDebugModalDismiss:()=>{o(false),m(null)},handleEnvModalDismiss:()=>{n(false)},handleSentryModalDismiss:()=>{i(false)},handleStorageModalDismiss:()=>{u(false)},handleNetworkModalDismiss:()=>{d(false)},handleQuerySelect:T=>{g(T?.queryKey)},handleQueryPress:()=>{t(true)},handleStatusPress:()=>{o(true)},handleEnvPress:()=>{n(true)},handleSentryPress:()=>{i(true)},handleStoragePress:()=>{u(true)},handleNetworkPress:()=>{d(true)},handleTabChange:T=>{T!==S&&(g(void 0),Y(void 0),v(null)),w(T)},handleMutationSelect:T=>{Y(T?.mutationId)}}}import{safeStringify as Zu,displayValue as ec,parseDisplayValue as tc}from"@buoy-gg/shared-ui/web";function rc(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof Date)&&!(e instanceof Error)&&!(e instanceof Map)&&!(e instanceof Set)&&!(e instanceof RegExp)&&typeof e!="function"}export{ne as ActionButton,Ds as ClearCacheButton,Bo as DataEditorModal,Lo as DataEditorMode,Ku as DataViewer,ce as Explorer,No as MutationBrowserFooter,Zo as MutationBrowserModal,Vo as MutationBrowserMode,so as MutationButton,rr as MutationDetails,uo as MutationDetailsChips,na as MutationEditorModal,oa as MutationEditorMode,yo as MutationInformation,bo as MutationStatusCount,po as MutationsList,Rs as NetworkToggleButton,eo as QueryActions,$r as QueryBrowser,Io as QueryBrowserFooter,Fo as QueryBrowserModal,Qo as QueryBrowserMode,Aa as QueryDebugInfo,Nt as QueryDetails,_r as QueryDetailsChip,Bi as QueryInformation,zr as QueryRow,Qu as QuerySelector,te as QueryStatus,no as QueryStatusCount,dr as ReactQueryDevToolsModal,ia as ReactQueryModal,Xe as ReactQueryModalHeader,ku as ReactQuerySection,Ou as ReactQueryTracker,Fs as StorageStatusCount,Yo as SwipeIndicator,Lu as TypeLegend,zu as VirtualizedDataExplorer,Er as WifiToggle,Ea as clearModalVisibilityState,Ca as createReactQuerySyncAdapter,_l as createReactQueryTool,Gl as createWifiToggleTool,Fr as deleteItem,He as deleteNestedDataByPath,Vl as disconnectQueryClient,ec as displayValue,jr as getCleanStorageKey,Ma as getQueryStatusColor,oe as getQueryStatusLabel,Qa as getStorageQueryCounts,Br as getStorageType,Wr as getStorageTypeColor,xi as getStorageTypeHexColor,Hr as getStorageTypeLabel,Zr as invalidate,rc as isPlainObject,pe as isStorageQuery,ka as loadModalVisibilityState,Gu as loadPanelState,tc as parseDisplayValue,Ke as reactQueryEventStore,Ul as reactQueryToolPreset,Jt as refetch,Xr as remove,Yr as reset,Zu as safeStringify,Ju as saveFloatingMode,Ia as saveModalVisibilityState,Uu as savePanelDimensions,_u as savePanelHeight,jl as setQueryClient,ae as storageQueryKeys,Gt as triggerError,_t as triggerLoading,Be as updateNestedDataByPath,ir as useActionButtons,mo as useAllMutations,gt as useAllQueries,lr as useGetMutationById,Cr as useGetQueryByQueryKey,Bt as useGetQueryByQueryKeyWithVersion,Xu as useModalManager,Fa as useModalPersistence,ra as useMutationActionButtons,ao as useQueryStatusCounts,Vu as useReactQueryState,Au as useReactQuerySyncAdapter,ju as useStorageQueryCounts,kr as useWifiState,Jl as wifiTogglePreset};
11
+ `,"\u2022 Check console for debugging info"]}),ke(Eo,{})]}):e.map((i,l)=>{let s=n(i),u=ko({queryState:i.state,observerCount:i.getObserversCount(),isStale:i.isStale()}),c={blue:"#3B82F6",gray:"#6B7280",purple:"#8B5CF6",yellow:"#F59E0B",green:"#10B981",red:"#EF4444"}[u]||"#6B7280",d=i===t;return Xe(N,{accessibilityLabel:`Query ${s}`,accessibilityHint:`View query ${s}`,"sentry-label":`ignore query ${s}`,style:[L.queryItem,d&&L.selectedQueryItem],onPress:()=>o(i),children:[ke(h,{style:[L.statusDot,{backgroundColor:c}]}),ke(v,{style:[L.queryText,d&&L.selectedQueryText],numberOfLines:1,children:s})]},`${i.queryHash}-${l}`)})})]})})})}var L=T.create({modalOverlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center"},modalContent:{backgroundColor:"#1F1F1F",borderRadius:8,width:"80%",maxHeight:"80%",minHeight:"50%",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.1)",flex:0},modalHeader:{padding:16,borderBottomWidth:1,borderBottomColor:"rgba(255, 255, 255, 0.1)"},modalTitle:{color:"#FFFFFF",fontSize:16,fontWeight:"600",marginBottom:4},modalSubtitle:{color:"#9CA3AF",fontSize:12},scrollView:{flex:1},scrollViewContent:{padding:8,flexGrow:1},emptyState:{padding:32,alignItems:"center",justifyContent:"center"},emptyTitle:{color:"#E5E7EB",fontSize:16,fontWeight:"500",marginBottom:8,textAlign:"center"},emptyDescription:{color:"#9CA3AF",fontSize:14,textAlign:"center",lineHeight:20},queryItem:{flexDirection:"row",alignItems:"center",padding:8,borderRadius:4},selectedQueryItem:{backgroundColor:"rgba(255, 255, 255, 0.1)"},statusDot:{width:8,height:8,borderRadius:4,marginRight:8},queryText:{color:"#E5E7EB",fontSize:14,flex:1},selectedQueryText:{color:"#FFFFFF",fontWeight:"500"},trigger:{flexDirection:"row",alignItems:"center",backgroundColor:"rgba(255, 255, 255, 0.05)",borderRadius:4,paddingHorizontal:8,paddingVertical:6,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.1)",minWidth:120,maxWidth:200},triggerText:{color:"#E5E7EB",fontSize:12,flex:1,marginHorizontal:6}});import{CyberpunkSectionButton as $u,buoyColors as Fo}from"@buoy-gg/shared-ui/web";import{jsx as pr}from"react/jsx-runtime";var Nu=()=>pr(h,{style:{width:24,height:24},children:pr(gs,{})});function Uu({onPress:e,getReactBuoySubtitle:t}){return pr($u,{id:"react-buoy-dev-tools",title:"QUERY",subtitle:(()=>{let r=t().match(/(\d+) queries • (\d+) mutations/);return r?`${r[1]}Q \u2022 ${r[2]}M`:"No data"})(),icon:Nu,iconColor:Fo.error,iconBackgroundColor:Fo.error+"1A",onPress:e,index:1})}import{useContext as _u,useEffect as Ju}from"react";import{QueryClientContext as Gu}from"@tanstack/react-query";function Yu(){let e=_u(Gu);return Ju(()=>{e&&(We.isConnected()||We.setQueryClient(e))},[e]),null}import{VirtualizedDataExplorer as Xu,DataViewer as Zu,TypeLegend as ec}from"@buoy-gg/shared-ui/web/dataViewer";import{useMemo as tc}from"react";import{useQueryClient as rc}from"@tanstack/react-query";import{isDevToolsStorageKey as ac}from"@buoy-gg/shared-ui/web";function Po(e){let t={mmkv:0,async:0,secure:0,total:0};return e.filter(r=>Se(r.queryKey)).forEach(r=>{let a=Wr(r.queryKey);if(a){let o=$r(r.queryKey);ac(o)||(t[a]++,t.total++)}}),t}function oc(){let e=rc();return tc(()=>{let t=e.getQueryCache().getAll();return Po(t)},[e])}function nc(e){return{getReactBuoySubtitle:()=>{try{let t=e.getQueryCache().getAll(),r=e.getMutationCache().getAll();return`${t.length} queries \u2022 ${r.length} mutations`}catch{return"Data management & cache inspector"}}}}import{useState as X,useEffect as ic}from"react";import{useEffect as sc,useCallback as br}from"react";import{persistentStorage as zo}from"@buoy-gg/shared-ui/web";var dt=async(e,t)=>{await zo.setItem(e,t)},Ot=async e=>zo.getItem(e),lc=async(e,t)=>{try{await dt(`${e}_panel_dimensions`,JSON.stringify(t))}catch{}},uc=async(e,t)=>{try{await dt(`${e}_panel_height`,t.toString())}catch{}},cc=async(e,t)=>{try{await dt(`${e}_is_floating_mode`,t.toString())}catch{}},dc=async e=>{try{let[t,r,a]=await Promise.all([Ot(`${e}_panel_dimensions`),Ot(`${e}_panel_height`),Ot(`${e}_is_floating_mode`)]),o=t?JSON.parse(t):null,n=r?parseInt(r,10):null;return{dimensions:o,height:n,isFloating:a?a==="true":null}}catch{return{dimensions:null,height:null,isFloating:null}}},Oo=async(e,t)=>{try{let r=JSON.stringify(t);await dt(e,r)}catch{}},Ko=async e=>{try{let t=await Ot(e);return t&&t!==""?JSON.parse(t):null}catch{return null}},Lo=async e=>{try{await dt(e,"")}catch{}};function Bo({storagePrefix:e,isModalOpen:t,isDebugModalOpen:r,isEnvModalOpen:a=false,isSentryModalOpen:o=false,isStorageModalOpen:n=false,isNetworkModalOpen:i=false,selectedQueryKey:l,selectedSection:s,activeFilter:u,activeTab:c,selectedMutationId:d,isStateRestored:f}){let b=br(async()=>{let p={isModalOpen:t,isDebugModalOpen:r,isEnvModalOpen:a,isSentryModalOpen:o,isStorageModalOpen:n,isNetworkModalOpen:i,selectedQueryKey:l?JSON.stringify(l):void 0,selectedSection:s||void 0,activeFilter:u||void 0,activeTab:c||void 0,selectedMutationId:d?.toString()||void 0};await Oo(e,p)},[e,t,r,a,o,n,i,l,s,u,c,d]),y=br(async()=>await Ko(e),[e]),m=br(async()=>{await Lo(e)},[e]);return sc(()=>{f&&(t||r||a||o||n||i?b():m())},[t,r,a,o,n,i,l,s,u,c,d,f,b,m]),{saveCurrentState:b,loadSavedState:y,clearSavedState:m}}import{devToolsStorageKeys as yc}from"@buoy-gg/shared-ui/web";function hc(){let[e,t]=X(false),[r,a]=X(false),[o,n]=X(false),[i,l]=X(false),[s,u]=X(false),[c,d]=X(false),[f,b]=X(void 0),[y,m]=X(null),[p,g]=X(null),[S,w]=X(false),[C,q]=X("queries"),[A,j]=X(void 0),{loadSavedState:Ee}=Bo({storagePrefix:yc.modal.state(),isModalOpen:e,isDebugModalOpen:r,isEnvModalOpen:o,isSentryModalOpen:i,isStorageModalOpen:s,isNetworkModalOpen:c,selectedQueryKey:f,selectedSection:y,activeFilter:p,activeTab:C,selectedMutationId:A,isStateRestored:S});return ic(()=>{(async()=>{if(!S)try{let M=await Ee();if(M){if(t(M.isModalOpen),a(M.isDebugModalOpen),n(M.isEnvModalOpen||false),l(M.isSentryModalOpen||false),u(M.isStorageModalOpen||false),d(M.isNetworkModalOpen||false),M.selectedQueryKey)try{let oe=JSON.parse(M.selectedQueryKey);b(oe)}catch{}M.selectedSection&&m(M.selectedSection),M.activeFilter&&g(M.activeFilter),M.activeTab&&q(M.activeTab),M.selectedMutationId&&j(Number(M.selectedMutationId))}}catch{}finally{w(true)}})()},[S,Ee]),{isModalOpen:e,isDebugModalOpen:r,isEnvModalOpen:o,isSentryModalOpen:i,isStorageModalOpen:s,isNetworkModalOpen:c,selectedQueryKey:f,selectedSection:y,activeFilter:p,isStateRestored:S,activeTab:C,selectedMutationId:A,setSelectedSection:m,setActiveFilter:g,setActiveTab:q,handleModalDismiss:()=>{t(false),b(void 0)},handleDebugModalDismiss:()=>{a(false),m(null)},handleEnvModalDismiss:()=>{n(false)},handleSentryModalDismiss:()=>{l(false)},handleStorageModalDismiss:()=>{u(false)},handleNetworkModalDismiss:()=>{d(false)},handleQuerySelect:M=>{b(M?.queryKey)},handleQueryPress:()=>{t(true)},handleStatusPress:()=>{a(true)},handleEnvPress:()=>{n(true)},handleSentryPress:()=>{l(true)},handleStoragePress:()=>{u(true)},handleNetworkPress:()=>{d(true)},handleTabChange:M=>{M!==C&&(b(void 0),j(void 0),g(null)),q(M)},handleMutationSelect:M=>{j(M?.mutationId)}}}import{safeStringify as fc,displayValue as mc,parseDisplayValue as gc}from"@buoy-gg/shared-ui/web";function pc(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof Date)&&!(e instanceof Error)&&!(e instanceof Map)&&!(e instanceof Set)&&!(e instanceof RegExp)&&typeof e!="function"}export{ue as ActionButton,Hs as ClearCacheButton,$a as DataEditorModal,Va as DataEditorMode,Zu as DataViewer,me as Explorer,Ya as MutationBrowserFooter,oo as MutationBrowserModal,Ja as MutationBrowserMode,ua as MutationButton,rr as MutationDetails,da as MutationDetailsChips,co as MutationEditorModal,lo as MutationEditorMode,ha as MutationInformation,va as MutationStatusCount,ba as MutationsList,js as NetworkToggleButton,ra as QueryActions,Ur as QueryBrowser,ka as QueryBrowserFooter,La as QueryBrowserModal,Qa as QueryBrowserMode,Eo as QueryDebugInfo,Nt as QueryDetails,Gr as QueryDetailsChip,Zi as QueryInformation,Lr as QueryRow,Vu as QuerySelector,re as QueryStatus,sa as QueryStatusCount,hr as ReactQueryDevToolsModal,yo as ReactQueryModal,et as ReactQueryModalHeader,Uu as ReactQuerySection,Yu as ReactQueryTracker,Us as StorageStatusCount,ro as SwipeIndicator,ec as TypeLegend,Xu as VirtualizedDataExplorer,Pr as WifiToggle,Lo as clearModalVisibilityState,Ao as createReactQuerySyncAdapter,uu as createReactQueryTool,du as createWifiToggleTool,zr as deleteItem,$e as deleteNestedDataByPath,nu as disconnectQueryClient,mc as displayValue,$r as getCleanStorageKey,ko as getQueryStatusColor,se as getQueryStatusLabel,Po as getStorageQueryCounts,Wr as getStorageType,Vr as getStorageTypeColor,Pi as getStorageTypeHexColor,jr as getStorageTypeLabel,ta as invalidate,pc as isPlainObject,Se as isStorageQuery,Ko as loadModalVisibilityState,dc as loadPanelState,gc as parseDisplayValue,We as reactQueryEventStore,lu as reactQueryToolPreset,Jt as refetch,ea as remove,Zr as reset,fc as safeStringify,cc as saveFloatingMode,Oo as saveModalVisibilityState,lc as savePanelDimensions,uc as savePanelHeight,ou as setQueryClient,le as storageQueryKeys,Gt as triggerError,_t as triggerLoading,Ve as updateNestedDataByPath,lr as useActionButtons,ga as useAllMutations,vt as useAllQueries,cr as useGetMutationById,wr as useGetQueryByQueryKey,Bt as useGetQueryByQueryKeyWithVersion,hc as useModalManager,Bo as useModalPersistence,so as useMutationActionButtons,ia as useQueryStatusCounts,nc as useReactQueryState,Wu as useReactQuerySyncAdapter,oc as useStorageQueryCounts,Fr as useWifiState,cu as wifiTogglePreset};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buoy-gg/react-query",
3
- "version": "7.0.48",
3
+ "version": "7.0.50",
4
4
  "description": "TanStack Query devtools inside your React Native app — cache inspection, refetch & invalidate, offline toggle. Part of Buoy devtools.",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -39,8 +39,8 @@
39
39
  "**/checkPeer.*"
40
40
  ],
41
41
  "dependencies": {
42
- "@buoy-gg/floating-tools-core": "^7.0.48",
43
- "@buoy-gg/shared-ui": "^7.0.48"
42
+ "@buoy-gg/floating-tools-core": "^7.0.50",
43
+ "@buoy-gg/shared-ui": "^7.0.50"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@tanstack/react-query": ">=5.0.0",