react-native-react-query-devtools
Version:
React Query Dev Tools for React Native
1 lines • 60.6 kB
JavaScript
"use strict";var Yt=Object.create;var Ae=Object.defineProperty;var eo=Object.getOwnPropertyDescriptor;var to=Object.getOwnPropertyNames;var oo=Object.getPrototypeOf,ro=Object.prototype.hasOwnProperty;var no=(e,n)=>{for(var r in n)Ae(e,r,{get:n[r],enumerable:!0})},gt=(e,n,r,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of to(n))!ro.call(e,a)&&a!==r&&Ae(e,a,{get:()=>n[a],enumerable:!(i=eo(n,a))||i.enumerable});return e};var be=(e,n,r)=>(r=e!=null?Yt(oo(e)):{},gt(n||!e||!e.__esModule?Ae(r,"default",{value:e,enumerable:!0}):r,e)),io=e=>gt(Ae({},"__esModule",{value:!0}),e);var Bo={};no(Bo,{DevToolsBubble:()=>Jt});module.exports=io(Bo);var ee=be(require("react")),R=require("react-native"),_t=require("@tanstack/react-query");var me=be(require("react")),Ce=require("react-native"),pt=require("@tanstack/react-query");var Se=require("react"),w=require("react-native");var j=require("react-native");function te(e){return e.state.fetchStatus==="fetching"?"fetching":e.getObserversCount()?e.state.fetchStatus==="paused"?"paused":e.isStale()?"stale":"fresh":"inactive"}var G=(e,n=!1)=>JSON.stringify(e,(()=>{let i=new WeakSet;return(a,l)=>{if(typeof l=="object"&&l!==null){if(i.has(l))return"[Circular]";i.add(l)}return l}})(),n?2:void 0);var ie=require("react/jsx-runtime"),ao=({query:e,isSelected:n,onSelect:r})=>{let i=A=>{switch(A){case"fresh":return"green";case"stale":case"inactive":return"yellow";case"fetching":return"blue";case"paused":return"purple";default:return"gray"}},a=(A,b)=>({green:{200:"#bbf7d0",300:"#86efac",700:"#15803d",800:"#166534",900:"#14532d"},yellow:{200:"#fef08a",300:"#fde047",700:"#a16207",800:"#854d0e",900:"#713f12"},gray:{200:"#e5e7eb",300:"#d1d5db",700:"#374151",800:"#1f2937",900:"#111827"},blue:{200:"#bfdbfe",300:"#93c5fd",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},purple:{200:"#e9d5ff",300:"#d8b4fe",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},red:{200:"#fecaca",300:"#fca5a5",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"}})[A][b],l=te(e),u=i(l),c=e.getObserversCount(),C=e.isDisabled(),h=G(e.queryKey,!1),x=()=>u==="gray"?{backgroundColor:a(u,"200"),color:a(u,"700")}:{backgroundColor:a(u,"200"),color:a(u,"800")};return(0,ie.jsxs)(j.TouchableOpacity,{style:[ye.queryRow,n&&ye.selectedQueryRow],onPress:()=>r(e),activeOpacity:.7,accessibilityLabel:`Query key ${h}`,children:[(0,ie.jsx)(j.View,{style:[ye.observerCount,x()],children:(0,ie.jsx)(j.Text,{style:[ye.observerCountText,{color:x().color}],children:c})}),(0,ie.jsx)(j.Text,{style:ye.queryHash,numberOfLines:1,ellipsizeMode:"middle",children:h}),C&&(0,ie.jsx)(j.View,{style:ye.disabledIndicator,children:(0,ie.jsx)(j.Text,{style:ye.disabledText,children:"disabled"})})]})},ye=j.StyleSheet.create({queryRow:{flexDirection:"row",alignItems:"stretch",borderBottomWidth:1,borderBottomColor:"#e5e7eb",backgroundColor:"#ffffff"},selectedQueryRow:{backgroundColor:"#f3f4f6"},observerCount:{width:32,justifyContent:"center",alignItems:"center",marginRight:0},observerCountText:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},queryHash:{flex:1,fontFamily:"monospace",fontSize:14,color:"#1f2937",paddingVertical:8,paddingHorizontal:12,textAlignVertical:"center"},disabledIndicator:{backgroundColor:"#f3f4f6",borderRadius:4,paddingHorizontal:6,paddingVertical:2,marginLeft:8,alignSelf:"center"},disabledText:{fontSize:12,color:"#6b7280"}}),ht=ao;var De=require("react"),mt=require("@tanstack/react-query");function so(){let e=(0,mt.useQueryClient)(),[n,r]=(0,De.useState)([]);return(0,De.useEffect)(()=>{let i=()=>{let l=e.getQueryCache().findAll();setTimeout(()=>{r(l)},1)};i();let a=e.getQueryCache().subscribe(i);return()=>a()},[e]),n}var Ct=so;var xe=require("react-native"),je=require("react/jsx-runtime"),lo={fresh:"#D1FADF",stale:"#FEF0C7",fetching:"#D1E9FF",paused:"#EBE9FE",noObserver:"#F2F4F7"},uo={fresh:"#32D583",stale:"#FDB022",fetching:"#53B1FD",paused:"#9B8AFB",noObserver:"#344054"},co={fresh:"#027A48",stale:"#B54708",fetching:"#175CD3",paused:"#5925DC",noObserver:"#344054"};function Ne({query:e}){let n=te(e),r=lo[n],i=uo[n],a=co[n];return(0,je.jsx)(xe.View,{style:[bt.container,{backgroundColor:r,borderColor:i}],children:(0,je.jsx)(xe.Text,{style:[bt.text,{color:a}],children:n})})}var bt=xe.StyleSheet.create({container:{padding:8,borderWidth:1,borderRadius:4,margin:4},text:{fontSize:12}});var F=require("react-native");var I=require("react/jsx-runtime");function Ke({query:e}){if(e===void 0)return null;let n=new Date(e.state.dataUpdatedAt).toLocaleTimeString();return(0,I.jsxs)(F.View,{style:ge.minWidth,children:[(0,I.jsx)(F.Text,{style:ge.headerText,children:"Query Details"}),(0,I.jsxs)(F.View,{style:ge.row,children:[(0,I.jsx)(F.ScrollView,{horizontal:!0,style:ge.flexOne,children:(0,I.jsx)(F.Text,{style:ge.queryKeyText,children:G(e.queryKey,!0)})}),(0,I.jsx)(Ne,{query:e})]}),(0,I.jsxs)(F.View,{style:ge.row,children:[(0,I.jsx)(F.Text,{children:" Observers:"}),(0,I.jsx)(F.Text,{children:`${e.getObserversCount()}`})]}),(0,I.jsxs)(F.View,{style:ge.row,children:[(0,I.jsx)(F.Text,{children:" Last Updated:"}),(0,I.jsx)(F.Text,{children:`${n}`})]})]})}var ge=F.StyleSheet.create({minWidth:{minWidth:200,fontSize:12,backgroundColor:"#FFFFFF",borderRadius:4},headerText:{textAlign:"left",backgroundColor:"#EAECF0",padding:8,fontWeight:"500"},row:{flexDirection:"row",justifyContent:"space-between",padding:8,borderBottomWidth:1,borderBottomColor:"#F3F4F6"},flexOne:{flex:1},queryKeyText:{flexWrap:"wrap",alignItems:"center",marginRight:8}});var wt=require("@tanstack/react-query");var ae=require("react-native"),Fe=require("react/jsx-runtime"),fo={btnRefetch:"#1570EF",btnInvalidate:"#DC6803",btnReset:"#475467",btnRemove:"#db2777",btnTriggerLoading:"#0891b2",btnTriggerLoadiError:"#ef4444"},po={btnRefetch:"#1570EF",btnInvalidate:"#DC6803",btnReset:"#475467",btnRemove:"#db2777",btnTriggerLoading:"#0891b2",btnTriggerLoadiError:"#ef4444"};function se({onClick:e,text:n,textColorClass:r,bgColorClass:i,disabled:a}){let l=fo[i],u=po[r]||"#FFFFFF";return(0,Fe.jsxs)(ae.TouchableOpacity,{disabled:a,onPress:e,style:[qe.button,{opacity:a?.6:1}],children:[(0,Fe.jsx)(ae.View,{style:[qe.dot,{backgroundColor:u}]}),(0,Fe.jsx)(ae.Text,{style:[qe.text,{color:u,opacity:a?.6:1}],children:n})]})}var qe=ae.StyleSheet.create({button:{flexDirection:"row",alignItems:"center",justifyContent:"center",borderRadius:4,borderWidth:1,borderColor:"#d0d5dd",backgroundColor:"#f2f4f7",height:32,paddingHorizontal:10,paddingVertical:6},dot:{width:6,height:6,borderRadius:999,marginRight:6},text:{fontSize:12,fontWeight:"400"}});function $e({query:e}){if(e.state.data===void 0){let n=e.state,r=e.state.fetchMeta?e.state.fetchMeta.__previousQueryOptions:null;e.cancel({silent:!0}),e.setState({...n,fetchStatus:"idle",fetchMeta:null}),r&&e.fetch(r)}else{let n=e.options;e.fetch({...n,queryFn:()=>new Promise(()=>{}),gcTime:-1}),e.setState({data:void 0,status:"pending",fetchMeta:{...e.state.fetchMeta,__previousQueryOptions:n}})}}function Ze({query:e}){e.fetch().catch(r=>{console.error("Refetch error for query:",r)})}function _e({query:e,queryClient:n}){n.resetQueries({queryKey:e.queryKey,exact:!0})}function Je({query:e,queryClient:n}){n.removeQueries(e)}function Xe({query:e,queryClient:n}){n.invalidateQueries(e)}function Ye({query:e,queryClient:n}){if(e.state.status!=="error"){let r=new Error("Unknown error from devtools"),i=e.options;e.setState({status:"error",error:r,fetchMeta:{...e.state.fetchMeta,__previousQueryOptions:i}})}else n.resetQueries(e)}var we=require("react-native"),q=require("react/jsx-runtime");function et({query:e,setSelectedQuery:n}){let r=(0,wt.useQueryClient)();if(e===void 0)return null;let i=e.state.status;return(0,q.jsxs)(we.View,{style:xt.container,children:[(0,q.jsx)(we.Text,{style:xt.headerText,children:"Actions"}),(0,q.jsx)(se,{disabled:te(e)==="fetching",onClick:()=>{Ze({query:e})},bgColorClass:"btnRefetch",text:"Refetch",textColorClass:"btnRefetch"}),(0,q.jsx)(se,{disabled:i==="pending",onClick:()=>{Xe({query:e,queryClient:r})},bgColorClass:"btnInvalidate",text:"Invalidate",textColorClass:"btnInvalidate"}),(0,q.jsx)(se,{disabled:i==="pending",onClick:()=>{_e({queryClient:r,query:e})},bgColorClass:"btnReset",text:"Reset",textColorClass:"btnReset"}),(0,q.jsx)(se,{disabled:te(e)==="fetching",onClick:()=>{Je({queryClient:r,query:e}),n(void 0)},bgColorClass:"btnRemove",text:"Remove",textColorClass:"btnRemove"}),(0,q.jsx)(se,{disabled:!1,onClick:()=>{$e({query:e})},bgColorClass:"btnTriggerLoading",text:e.state.data===void 0?"Restore Loading":"Trigger Loading",textColorClass:"btnTriggerLoading"}),(0,q.jsx)(se,{disabled:i==="pending",onClick:()=>{Ye({query:e,queryClient:r})},bgColorClass:"btnTriggerLoadiError",text:i==="error"?"Restore":"Trigger Error",textColorClass:"btnTriggerLoadiError"})]})}var xt=we.StyleSheet.create({container:{minWidth:50,fontSize:12,flexDirection:"row",flexWrap:"wrap",backgroundColor:"#FFFFFF",borderRadius:4,gap:8,padding:8},headerText:{textAlign:"left",backgroundColor:"#EAECF0",padding:8,width:"100%",fontWeight:"500",marginBottom:8}});var le=require("react"),Ve=require("@tanstack/react-query");var t=be(require("react-native-svg")),o=require("react/jsx-runtime");function kt(){return(0,o.jsx)(t.default,{width:16,height:16,viewBox:"0 0 24 24",fill:"none",children:(0,o.jsx)(t.Path,{d:"M9 3h6M3 6h18m-2 0l-.701 10.52c-.105 1.578-.158 2.367-.499 2.965a3 3 0 01-1.298 1.215c-.62.3-1.41.3-2.993.3h-3.018c-1.582 0-2.373 0-2.993-.3A3 3 0 016.2 19.485c-.34-.598-.394-1.387-.499-2.966L5 6m5 4.5v5m4-5v5",stroke:"#667085"})})}function St(){return(0,o.jsx)(t.default,{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:(0,o.jsx)(t.Path,{d:"M8 8V5.2C8 4.0799 8 3.51984 8.21799 3.09202C8.40973 2.71569 8.71569 2.40973 9.09202 2.21799C9.51984 2 10.0799 2 11.2 2H18.8C19.9201 2 20.4802 2 20.908 2.21799C21.2843 2.40973 21.5903 2.71569 21.782 3.09202C22 3.51984 22 4.0799 22 5.2V12.8C22 13.9201 22 14.4802 21.782 14.908C21.5903 15.2843 21.2843 15.5903 20.908 15.782C20.4802 16 19.9201 16 18.8 16H16M5.2 22H12.8C13.9201 22 14.4802 22 14.908 21.782C15.2843 21.5903 15.5903 21.2843 15.782 20.908C16 20.4802 16 19.9201 16 18.8V11.2C16 10.0799 16 9.51984 15.782 9.09202C15.5903 8.71569 15.2843 8.40973 14.908 8.21799C14.4802 8 13.9201 8 12.8 8H5.2C4.0799 8 3.51984 8 3.09202 8.21799C2.71569 8.40973 2.40973 8.71569 2.21799 9.09202C2 9.51984 2 10.0799 2 11.2V18.8C2 19.9201 2 20.4802 2.21799 20.908C2.40973 21.2843 2.71569 21.5903 3.09202 21.782C3.51984 22 4.07989 22 5.2 22Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",stroke:"#667085"})})}function Tt(e){return(0,o.jsx)(t.default,{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:(0,o.jsx)(t.Path,{d:"M7.5 12L10.5 15L16.5 9M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z",stroke:e.theme==="dark"?"#12B76A":"#027A48",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function vt(){return(0,o.jsx)(t.default,{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:(0,o.jsx)(t.Path,{d:"M9 9L15 15M15 9L9 15M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z",stroke:"#F04438",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Mt(){return(0,o.jsxs)(t.default,{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#667085",strokeWidth:"2",children:[(0,o.jsx)(t.Rect,{width:"20",height:"20",y:"2",x:"2",rx:"2"}),(0,o.jsx)(t.Line,{y1:"7",y2:"7",x1:"6",x2:"18"}),(0,o.jsx)(t.Line,{y2:"12",y1:"12",x1:"6",x2:"18"}),(0,o.jsx)(t.Line,{y1:"17",y2:"17",x1:"6",x2:"18"})]})}function Lt(e){return(0,o.jsx)(o.Fragment,{children:e.checked?(0,o.jsx)(t.default,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,o.jsx)(t.Path,{d:"M7.5 12L10.5 15L16.5 9M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z",stroke:e.theme==="dark"?"#9B8AFB":"#6938EF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,o.jsx)(t.default,{viewBox:"0 0 24 24",height:"20",width:"20",fill:"none",children:(0,o.jsx)(t.Path,{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z",stroke:e.theme==="dark"?"#9B8AFB":"#6938EF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}function Rt(){return(0,o.jsx)(t.default,{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:(0,o.jsx)(t.Path,{d:"M7.5 12L10.5 15L16.5 9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"#027A48",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ft(){return(0,o.jsx)(t.default,{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:(0,o.jsx)(t.Path,{d:"M12 2V6M12 18V22M6 12H2M22 12H18M19.0784 19.0784L16.25 16.25M19.0784 4.99994L16.25 7.82837M4.92157 19.0784L7.75 16.25M4.92157 4.99994L7.75 7.82837",stroke:"#B54708",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Vt(){return(0,o.jsx)(t.default,{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:(0,o.jsx)(t.Path,{d:"M15 9L9 15M9 9L15 15M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"#b91c1c",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Bt(){return(0,o.jsx)(t.default,{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:(0,o.jsx)(t.Path,{d:"M9.5 15V9M14.5 15V9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"#5925DC",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function At(){return(0,o.jsxs)(t.default,{height:"100%",width:"100%",style:{position:"absolute"},viewBox:"0 0 633 633",children:[(0,o.jsxs)(t.LinearGradient,{x1:-666.45,x2:-666.45,y1:163.28,y2:163.99,gradientTransform:"matrix(633 0 0 633 422177 -103358)",gradientUnits:"userSpaceOnUse",id:"a",children:[(0,o.jsx)(t.Stop,{stopColor:"#6BDAFF",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#F9FFB5",offset:.32}),(0,o.jsx)(t.Stop,{stopColor:"#FFA770",offset:.71}),(0,o.jsx)(t.Stop,{stopColor:"#FF7373",offset:1})]}),(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"url(#a)"}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:-137.5,y:412,width:454,height:396.9,maskUnits:"userSpaceOnUse",id:"c",children:(0,o.jsx)(t.G,{filter:"url(#b)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsx)(t.G,{mask:"url(#c)",children:(0,o.jsx)(t.Ellipse,{cx:89.5,cy:610.5,rx:214.5,ry:186,fill:"#015064",stroke:"#00CFE2",strokeWidth:25})}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:316.5,y:412,width:454,height:396.9,maskUnits:"userSpaceOnUse",id:"e",children:(0,o.jsx)(t.G,{filter:"url(#d)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsx)(t.G,{mask:"url(#e)",children:(0,o.jsx)(t.Ellipse,{cx:543.5,cy:610.5,rx:214.5,ry:186,fill:"#015064",stroke:"#00CFE2",strokeWidth:25})}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:-137.5,y:450,width:454,height:396.9,maskUnits:"userSpaceOnUse",id:"g",children:(0,o.jsx)(t.G,{filter:"url(#f)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsx)(t.G,{mask:"url(#g)",children:(0,o.jsx)(t.Ellipse,{cx:89.5,cy:648.5,rx:214.5,ry:186,fill:"#015064",stroke:"#00A8B8",strokeWidth:25})}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:316.5,y:450,width:454,height:396.9,maskUnits:"userSpaceOnUse",id:"i",children:(0,o.jsx)(t.G,{filter:"url(#h)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsx)(t.G,{mask:"url(#i)",children:(0,o.jsx)(t.Ellipse,{cx:543.5,cy:648.5,rx:214.5,ry:186,fill:"#015064",stroke:"#00A8B8",strokeWidth:25})}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:-137.5,y:486,width:454,height:396.9,maskUnits:"userSpaceOnUse",id:"k",children:(0,o.jsx)(t.G,{filter:"url(#j)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsx)(t.G,{mask:"url(#k)",children:(0,o.jsx)(t.Ellipse,{cx:89.5,cy:684.5,rx:214.5,ry:186,fill:"#015064",stroke:"#007782",strokeWidth:25})}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:316.5,y:486,width:454,height:396.9,maskUnits:"userSpaceOnUse",id:"m",children:(0,o.jsx)(t.G,{filter:"url(#l)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsx)(t.G,{mask:"url(#m)",children:(0,o.jsx)(t.Ellipse,{cx:543.5,cy:684.5,rx:214.5,ry:186,fill:"#015064",stroke:"#007782",strokeWidth:25})}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:272.2,y:308,width:176.9,height:129.3,maskUnits:"userSpaceOnUse",id:"o",children:(0,o.jsx)(t.G,{filter:"url(#n)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsxs)(t.G,{mask:"url(#o)",children:[(0,o.jsx)(t.Path,{fill:"none",stroke:"#000",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:11,d:"M436 403.2L431 431.8"}),(0,o.jsx)(t.Path,{fill:"none",stroke:"#000",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:11,d:"M291 341.5L280 403.5"}),(0,o.jsx)(t.Path,{fill:"none",stroke:"#000",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:11,d:"M332.9 384.1L328.6 411.2"}),(0,o.jsxs)(t.LinearGradient,{x1:-670.75,x2:-671.59,y1:164.4,y2:164.49,gradientTransform:"matrix(-184.16 -32.472 -11.461 64.997 -121359 -32126)",gradientUnits:"userSpaceOnUse",id:"p",children:[(0,o.jsx)(t.Stop,{stopColor:"#EE2700",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF008E",offset:1})]}),(0,o.jsx)(t.Path,{d:"M344.1 363l97.7 17.2c5.8 2.1 8.2 6.1 7.1 12.1s-4.7 9.2-11 9.9l-106-18.7-57.5-59.2c-3.2-4.8-2.9-9.1.8-12.8s8.3-4.4 13.7-2.1l55.2 53.6z",clipRule:"evenodd",fillRule:"evenodd",fill:"url(#p)"}),(0,o.jsx)(t.Path,{fill:"none",stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:7,d:"M428.2 384.5L429.1 378"}),(0,o.jsx)(t.Path,{fill:"none",stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:7,d:"M395.2 379.5L396.1 373"}),(0,o.jsx)(t.Path,{fill:"none",stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:7,d:"M362.2 373.5L363.1 367.4"}),(0,o.jsx)(t.Path,{fill:"none",stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:7,d:"M324.2 351.3L328.4 347.4"}),(0,o.jsx)(t.Path,{fill:"none",stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:7,d:"M303.2 331.3L307.4 327.4"})]}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:73.2,y:113.8,width:280.6,height:317.4,maskUnits:"userSpaceOnUse",id:"r",children:(0,o.jsx)(t.G,{filter:"url(#q)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsxs)(t.G,{mask:"url(#r)",children:[(0,o.jsxs)(t.LinearGradient,{x1:-672.16,x2:-672.16,y1:165.03,y2:166.03,gradientTransform:"matrix(-100.18 48.861 97.976 200.88 -83342 -93.059)",gradientUnits:"userSpaceOnUse",id:"s",children:[(0,o.jsx)(t.Stop,{stopColor:"#A17500",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#5D2100",offset:1})]}),(0,o.jsx)(t.Path,{d:"M192.3 203c8.1 37.3 14 73.6 17.8 109.1 3.8 35.4 2.8 75.1-3 119.2l61.2-16.7c-15.6-59-25.2-97.9-28.6-116.6s-10.8-51.9-22.1-99.6l-25.3 4.6",clipRule:"evenodd",fillRule:"evenodd",fill:"url(#s)"}),(0,o.jsxs)(t.G,{stroke:"#2F8A00",children:[(0,o.jsxs)(t.LinearGradient,{x1:-660.23,x2:-660.23,y1:166.72,y2:167.72,gradientTransform:"matrix(92.683 4.8573 -2.0259 38.657 61680 -3088.6)",gradientUnits:"userSpaceOnUse",id:"t",children:[(0,o.jsx)(t.Stop,{stopColor:"#2F8A00",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#90FF57",offset:1})]}),(0,o.jsx)(t.Path,{d:"M195 183.9s-12.6-22.1-36.5-29.9c-15.9-5.2-34.4-1.5-55.5 11.1 15.9 14.3 29.5 22.6 40.7 24.9 16.8 3.6 51.3-6.1 51.3-6.1z",clipRule:"evenodd",fillRule:"evenodd",strokeWidth:13,fill:"url(#t)"}),(0,o.jsxs)(t.LinearGradient,{x1:-661.36,x2:-661.36,y1:164.18,y2:165.18,gradientTransform:"matrix(110 5.7648 -6.3599 121.35 73933 -15933)",gradientUnits:"userSpaceOnUse",id:"u",children:[(0,o.jsx)(t.Stop,{stopColor:"#2F8A00",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#90FF57",offset:1})]}),(0,o.jsx)(t.Path,{d:"M194.9 184.5s-47.5-8.5-83.2 15.7c-23.8 16.2-34.3 49.3-31.6 99.4 30.3-27.8 52.1-48.5 65.2-61.9 19.8-20.2 49.6-53.2 49.6-53.2z",clipRule:"evenodd",fillRule:"evenodd",strokeWidth:13,fill:"url(#u)"}),(0,o.jsxs)(t.LinearGradient,{x1:-656.79,x2:-656.79,y1:165.15,y2:166.15,gradientTransform:"matrix(62.954 3.2993 -3.5023 66.828 42156 -8754.1)",gradientUnits:"userSpaceOnUse",id:"v",children:[(0,o.jsx)(t.Stop,{stopColor:"#2F8A00",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#90FF57",offset:1})]}),(0,o.jsx)(t.Path,{d:"M195 183.9c-.8-21.9 6-38 20.6-48.2s29.8-15.4 45.5-15.3c-6.1 21.4-14.5 35.8-25.2 43.4S211.5 178 195 183.9z",clipRule:"evenodd",fillRule:"evenodd",strokeWidth:13,fill:"url(#v)"}),(0,o.jsxs)(t.LinearGradient,{x1:-663.07,x2:-663.07,y1:165.44,y2:166.44,gradientTransform:"matrix(152.47 7.9907 -3.0936 59.029 101884 -4318.7)",gradientUnits:"userSpaceOnUse",id:"w",children:[(0,o.jsx)(t.Stop,{stopColor:"#2F8A00",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#90FF57",offset:1})]}),(0,o.jsx)(t.Path,{d:"M194.9 184.5c31.9-30 64.1-39.7 96.7-29s50.8 30.4 54.6 59.1c-35.2-5.5-60.4-9.6-75.8-12.1-15.3-2.6-40.5-8.6-75.5-18z",clipRule:"evenodd",fillRule:"evenodd",strokeWidth:13,fill:"url(#w)"}),(0,o.jsxs)(t.LinearGradient,{x1:-662.57,x2:-662.57,y1:164.44,y2:165.44,gradientTransform:"matrix(136.46 7.1517 -5.2163 99.533 91536 -11442)",gradientUnits:"userSpaceOnUse",id:"x",children:[(0,o.jsx)(t.Stop,{stopColor:"#2F8A00",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#90FF57",offset:1})]}),(0,o.jsx)(t.Path,{d:"M194.9 184.5c35.8-7.6 65.6-.2 89.2 22s37.7 49 42.3 80.3c-39.8-9.7-68.3-23.8-85.5-42.4s-32.5-38.5-46-59.9z",clipRule:"evenodd",fillRule:"evenodd",strokeWidth:13,fill:"url(#x)"}),(0,o.jsxs)(t.LinearGradient,{x1:-656.43,x2:-656.43,y1:163.86,y2:164.86,gradientTransform:"matrix(60.866 3.1899 -8.7773 167.48 41560 -25168)",gradientUnits:"userSpaceOnUse",id:"y",children:[(0,o.jsx)(t.Stop,{stopColor:"#2F8A00",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#90FF57",offset:1})]}),(0,o.jsx)(t.Path,{d:"M194.9 184.5c-33.6 13.8-53.6 35.7-60.1 65.6s-3.6 63.1 8.7 99.6c27.4-40.3 43.2-69.6 47.4-88s5.6-44.1 4-77.2z",clipRule:"evenodd",fillRule:"evenodd",strokeWidth:13,fill:"url(#y)"}),(0,o.jsx)(t.Path,{d:"M196.5 182.3c-14.8 21.6-25.1 41.4-30.8 59.4s-9.5 33-11.1 45.1",fill:"none",strokeLinecap:"round",strokeWidth:8}),(0,o.jsx)(t.Path,{d:"M194.9 185.7c-24.4 1.7-43.8 9-58.1 21.8s-24.7 25.4-31.3 37.8M204.5 176.4c29.7-6.7 52-8.4 67-5.1s26.9 8.6 35.8 15.9M196.5 181.4c20.3 9.9 38.2 20.5 53.9 31.9s27.4 22.1 35.1 32",fill:"none",strokeLinecap:"round",strokeWidth:8})]})]}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:50.5,y:399,width:532,height:633,maskUnits:"userSpaceOnUse",id:"A",children:(0,o.jsx)(t.G,{filter:"url(#z)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsxs)(t.G,{mask:"url(#A)",children:[(0,o.jsxs)(t.LinearGradient,{x1:-666.06,x2:-666.23,y1:163.36,y2:163.75,gradientTransform:"matrix(532 0 0 633 354760 -102959)",gradientUnits:"userSpaceOnUse",id:"B",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFF400",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#3C8700",offset:1})]}),(0,o.jsx)(t.Ellipse,{cx:316.5,cy:715.5,rx:266,ry:316.5,fill:"url(#B)"})]}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:391,y:-24,width:288,height:283,maskUnits:"userSpaceOnUse",id:"D",children:(0,o.jsx)(t.G,{filter:"url(#C)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsxs)(t.G,{mask:"url(#D)",children:[(0,o.jsxs)(t.LinearGradient,{x1:-664.56,x2:-664.56,y1:163.79,y2:164.79,gradientTransform:"matrix(227 0 0 227 151421 -37204)",gradientUnits:"userSpaceOnUse",id:"E",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFDF00",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF9D00",offset:1})]}),(0,o.jsx)(t.Circle,{cx:565.5,cy:89.5,r:113.5,fill:"url(#E)"}),(0,o.jsxs)(t.LinearGradient,{x1:-644.5,x2:-645.77,y1:342,y2:342,gradientTransform:"matrix(30 0 0 1 19770 -253)",gradientUnits:"userSpaceOnUse",id:"F",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFA400",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF5E00",offset:1})]}),(0,o.jsx)(t.Path,{fill:"none",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:12,stroke:"url(#F)",d:"M427 89L397 89"}),(0,o.jsxs)(t.LinearGradient,{x1:-641.56,x2:-642.83,y1:196.02,y2:196.07,gradientTransform:"matrix(26.5 0 0 5.5 17439 -1025.5)",gradientUnits:"userSpaceOnUse",id:"G",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFA400",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF5E00",offset:1})]}),(0,o.jsx)(t.Path,{fill:"none",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:12,stroke:"url(#G)",d:"M430.5 55.5L404 50"}),(0,o.jsxs)(t.LinearGradient,{x1:-643.73,x2:-645,y1:185.83,y2:185.9,gradientTransform:"matrix(29 0 0 8 19107 -1361)",gradientUnits:"userSpaceOnUse",id:"H",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFA400",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF5E00",offset:1})]}),(0,o.jsx)(t.Path,{fill:"none",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:12,stroke:"url(#H)",d:"M431 122L402 130"}),(0,o.jsxs)(t.LinearGradient,{x1:-638.94,x2:-640.22,y1:177.09,y2:177.39,gradientTransform:"matrix(24 0 0 13 15783 -2145)",gradientUnits:"userSpaceOnUse",id:"I",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFA400",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF5E00",offset:1})]}),(0,o.jsx)(t.Path,{fill:"none",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:12,stroke:"url(#I)",d:"M442 153L418 166"}),(0,o.jsxs)(t.LinearGradient,{x1:-633.42,x2:-634.7,y1:172.41,y2:173.31,gradientTransform:"matrix(20 0 0 19 13137 -3096)",gradientUnits:"userSpaceOnUse",id:"J",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFA400",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF5E00",offset:1})]}),(0,o.jsx)(t.Path,{fill:"none",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:12,stroke:"url(#J)",d:"M464 180L444 199"}),(0,o.jsxs)(t.LinearGradient,{x1:-619.05,x2:-619.52,y1:170.82,y2:171.82,gradientTransform:"matrix(13.83 0 0 22.85 9050 -3703.4)",gradientUnits:"userSpaceOnUse",id:"K",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFA400",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF5E00",offset:1})]}),(0,o.jsx)(t.Path,{fill:"none",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:12,stroke:"url(#K)",d:"M491.4 203L477.5 225.9"}),(0,o.jsxs)(t.LinearGradient,{x1:-578.5,x2:-578.63,y1:170.31,y2:171.31,gradientTransform:"matrix(7.5 0 0 24.5 4860 -3953)",gradientUnits:"userSpaceOnUse",id:"L",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFA400",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF5E00",offset:1})]}),(0,o.jsx)(t.Path,{fill:"none",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:12,stroke:"url(#L)",d:"M524.5 219.5L517 244"}),(0,o.jsxs)(t.LinearGradient,{x1:666.5,x2:666.5,y1:170.31,y2:171.31,gradientTransform:"matrix(.5 0 0 24.5 231.5 -3944)",gradientUnits:"userSpaceOnUse",id:"M",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFA400",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF5E00",offset:1})]}),(0,o.jsx)(t.Path,{fill:"none",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:12,stroke:"url(#M)",d:"M564.5 228.5L565 253"})]})]})}var $=(e,n,r)=>{if(n.length===0)return r;if(e instanceof Map){let i=new Map(e);if(n.length===1)return i.set(n[0],r),i;let[a,...l]=n;return i.set(a,$(i.get(a),l,r)),i}if(e instanceof Set){let i=$(Array.from(e),n,r);return new Set(i)}if(Array.isArray(e)){let i=[...e];if(n.length===1)return i[n[0]]=r,i;let[a,...l]=n;return i[a]=$(i[a],l,r),i}if(e instanceof Object){let i={...e};if(n.length===1)return i[n[0]]=r,i;let[a,...l]=n;return i[a]=$(i[a],l,r),i}return e};var ke=(e,n)=>{if(e instanceof Map){let r=new Map(e);if(n.length===1)return r.delete(n[0]),r;let[i,...a]=n;return r.set(i,ke(r.get(i),a)),r}if(e instanceof Set){let r=ke(Array.from(e),n);return new Set(r)}if(Array.isArray(e)){let r=[...e];if(n.length===1)return r.filter((l,u)=>u.toString()!==n[0]);let[i,...a]=n;return r[i]=ke(r[i],a),r}if(e instanceof Object){let r={...e};if(n.length===1)return delete r[n[0]],r;let[i,...a]=n;return r[i]=ke(r[i],a),r}return e};function tt({activeQuery:e,dataPath:n,queryClient:r}){if(!n){console.error("delete item data path is missing!");return}let i=e.state.data,a=ke(i,n);r.setQueryData(e.queryKey,a)}var de=be(require("react-native-svg")),f=require("react-native");var Qe=require("react"),ot=(0,Qe.createContext)({}),Dt=()=>(0,Qe.useContext)(ot);var s=require("react/jsx-runtime");function Qt(e){return Symbol.iterator in e}function yo(e,n){if(n<1)return[];let r=0,i=[];for(;r<e.length;)i.push(e.slice(r,r+n)),r=r+n;return i}var Pt=({expanded:e})=>(0,s.jsx)(f.View,{style:[e?m.expanded:m.collapsed],children:(0,s.jsx)(de.default,{width:16,height:16,viewBox:"0 0 16 16",fill:"#98A2B3",children:(0,s.jsx)(de.Path,{d:"M6 12l4-4-4-4"})})}),go=({value:e})=>{let[n,r]=(0,le.useState)("NoCopy"),{onCopy:i}=Dt(),a=async()=>{if(!i){f.Alert.alert("Warning","Copy functionality is not configured. Please add a copy function to DevToolsBubble. See documentation for setup instructions.");return}try{await i(JSON.stringify(e))?(r("SuccessCopy"),setTimeout(()=>r("NoCopy"),1500)):(r("ErrorCopy"),setTimeout(()=>r("NoCopy"),1500))}catch(l){console.error("Copy failed:",l),r("ErrorCopy"),setTimeout(()=>r("NoCopy"),1500)}};return(0,s.jsxs)(f.TouchableOpacity,{style:m.buttonStyle,"aria-label":n==="NoCopy"?"Copy object to clipboard":n==="SuccessCopy"?"Object copied to clipboard":"Error copying object to clipboard",onPress:n==="NoCopy"?a:void 0,children:[n==="NoCopy"&&(0,s.jsx)(St,{}),n==="SuccessCopy"&&(0,s.jsx)(Tt,{theme:"light"}),n==="ErrorCopy"&&(0,s.jsx)(vt,{})]})},It=({dataPath:e,activeQuery:n})=>{let r=(0,Ve.useQueryClient)();return n?(0,s.jsx)(f.TouchableOpacity,{onPress:()=>{tt({queryClient:r,activeQuery:n,dataPath:e})},style:m.buttonStyle1,accessibilityLabel:"Delete item",children:(0,s.jsx)(kt,{})}):null},ho=({dataPath:e,activeQuery:n})=>{let r=(0,Ve.useQueryClient)();if(!n)return null;let i=()=>{let a=n.state.data,l=$(a,e,[]);r.setQueryData(n.queryKey,l)};return(0,s.jsx)(f.TouchableOpacity,{style:m.buttonStyle2,"aria-label":"Remove all items",onPress:i,children:(0,s.jsx)(Mt,{})})},mo=({dataPath:e,activeQuery:n,value:r})=>{let i=(0,Ve.useQueryClient)();if(!n)return null;let a=()=>{let l=n.state.data,u=$(l,e,!r);i.setQueryData(n.queryKey,u)};return(0,s.jsx)(f.TouchableOpacity,{style:m.buttonStyle3,"aria-label":"Toggle value",onPress:a,children:(0,s.jsx)(Lt,{checked:r,theme:"light"})})};function N({editable:e,label:n,value:r,defaultExpanded:i,activeQuery:a,dataPath:l,itemsDeletable:u}){let c=(0,Ve.useQueryClient)(),[C,h]=(0,le.useState)((i||[]).includes(n)),x=()=>h(y=>!y),[A,b]=(0,le.useState)([]),k=(0,le.useMemo)(()=>Array.isArray(r)?r.map((y,p)=>({label:p.toString(),value:y})):r!==null&&typeof r=="object"&&Qt(r)?r instanceof Map?Array.from(r,([y,p])=>({label:y.toString(),value:p})):Array.from(r,(y,p)=>({label:p.toString(),value:y})):typeof r=="object"&&r!==null?Object.entries(r).map(([y,p])=>({label:y,value:p})):[],[r]),d=(0,le.useMemo)(()=>Array.isArray(r)?"array":r!==null&&typeof r=="object"&&Qt(r)&&typeof r[Symbol.iterator]=="function"?"Iterable":typeof r=="object"&&r!==null?"object":typeof r,[r]),g=(0,le.useMemo)(()=>yo(k,100),[k]),T=l??[],P=(y,p)=>{if(!a)return null;let H=a.state.data;if(y&&isNaN(Number(p)))return;let Ge=d==="number"?Number(p):p,Xt=$(H,T,Ge);c.setQueryData(a.queryKey,Xt)};return(0,s.jsx)(f.View,{style:m.minWidthWrapper,children:(0,s.jsxs)(f.View,{style:m.fullWidthMarginRight,children:[g.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(f.View,{style:m.flexRowItemsCenterGap,children:[(0,s.jsxs)(f.TouchableOpacity,{style:m.expanderButton,onPress:()=>x(),children:[(0,s.jsx)(Pt,{expanded:C}),(0,s.jsx)(f.Text,{children:n}),(0,s.jsx)(f.Text,{style:m.textGray500,children:`${String(d).toLowerCase()==="iterable"?"(Iterable) ":""}${k.length} ${k.length>1?"items":"item"}`})]}),e&&(0,s.jsxs)(f.View,{style:m.flexRowGapItemsCenter,children:[(0,s.jsx)(go,{value:r}),u&&a!==void 0&&(0,s.jsx)(It,{activeQuery:a,dataPath:T}),d==="array"&&a!==void 0&&(0,s.jsx)(ho,{activeQuery:a,dataPath:T})]})]}),C&&(0,s.jsxs)(s.Fragment,{children:[g.length===1&&(0,s.jsx)(f.View,{style:m.singleEntryContainer,children:k.map((y,p)=>(0,s.jsx)(N,{defaultExpanded:i,label:y.label,value:y.value,editable:e,dataPath:[...T,y.label],activeQuery:a,itemsDeletable:d==="array"||d==="Iterable"||d==="object"},y.label+p))}),g.length>1&&(0,s.jsx)(f.View,{style:m.multiEntryContainer,children:g.map((y,p)=>(0,s.jsx)(f.View,{children:(0,s.jsxs)(f.View,{style:m.relativeOutlineNone,children:[(0,s.jsxs)(f.TouchableOpacity,{onPress:()=>b(H=>H.includes(p)?H.filter(Ge=>Ge!==p):[...H,p]),style:m.pageExpanderButton,children:[(0,s.jsx)(Pt,{expanded:A.includes(p)}),(0,s.jsxs)(f.Text,{children:["[",p*100,"...",p*100+99,"]"]})]}),A.includes(p)&&(0,s.jsx)(f.View,{style:m.entriesContainer,children:y.map(H=>(0,s.jsx)(N,{defaultExpanded:i,label:H.label,value:H.value,editable:e,dataPath:[...T,H.label],activeQuery:a},H.label))})]})},p))})]})]}),g.length===0&&(0,s.jsxs)(f.View,{style:m.flexRowGapFullWidth,children:[(0,s.jsxs)(f.Text,{style:m.text344054,children:[n,":"]}),e&&a!==void 0&&(d==="string"||d==="number"||d==="boolean")?(0,s.jsxs)(s.Fragment,{children:[e&&a&&(d==="string"||d==="number")&&(0,s.jsxs)(f.View,{style:m.inputContainer,children:[(0,s.jsx)(f.TextInput,{style:[m.textInput,d==="number"?m.textNumber:m.textString],keyboardType:d==="number"?"numeric":"default",value:r.toString(),onChangeText:y=>P(d==="number",y)}),d==="number"&&(0,s.jsxs)(f.View,{style:m.numberInputButtons,children:[(0,s.jsx)(f.TouchableOpacity,{style:m.touchableButton,onPressIn:()=>{let y=a.state.data,p=$(y,T,r+1);c.setQueryData(a.queryKey,p)},children:(0,s.jsx)(de.default,{fill:"none",viewBox:"0 0 24 24",stroke:"#6938EF",children:(0,s.jsx)(de.Path,{d:"M4.5 15.75l7.5-7.5 7.5 7.5"})})}),(0,s.jsx)(f.TouchableOpacity,{style:m.touchableButton,onPressIn:()=>{let y=a.state.data,p=$(y,T,r-1);c.setQueryData(a.queryKey,p)},children:(0,s.jsx)(de.default,{fill:"none",viewBox:"0 0 24 24",stroke:"#6938EF",children:(0,s.jsx)(de.Path,{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]})]}),d==="boolean"&&(0,s.jsxs)(f.View,{style:m.booleanContainer,children:[(0,s.jsx)(mo,{activeQuery:a,dataPath:T,value:r}),(0,s.jsx)(f.Text,{style:m.booleanText,children:G(r)})]})]}):(0,s.jsx)(f.Text,{style:m.displayValueText,children:G(r)}),e&&u&&a!==void 0&&(0,s.jsx)(It,{activeQuery:a,dataPath:T})]})]})})}var m=f.StyleSheet.create({buttonStyle3:{backgroundColor:"transparent",flexDirection:"row",alignItems:"center",justifyContent:"center",width:16,height:16,position:"relative",zIndex:10},buttonStyle2:{backgroundColor:"transparent",flexDirection:"row",padding:0,alignItems:"center",justifyContent:"center",width:12,height:12,position:"relative",zIndex:10},buttonStyle1:{backgroundColor:"transparent",borderColor:"none",borderWidth:0,padding:0,alignItems:"center",justifyContent:"center",width:24,height:24,position:"relative"},buttonStyle:{backgroundColor:"transparent",color:"#6B7280",borderWidth:0,flexDirection:"row",alignItems:"center",justifyContent:"center",width:12,height:12,position:"relative"},expanded:{transform:[{rotate:"90deg"}]},collapsed:{transform:[{rotate:"0deg"}]},minWidthWrapper:{minWidth:200,fontSize:12,flexDirection:"row",flexWrap:"wrap",width:"100%"},fullWidthMarginRight:{position:"relative",width:"100%",marginRight:1},flexRowItemsCenterGap:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:4},expanderButton:{flexDirection:"row",alignItems:"center",height:24,backgroundColor:"transparent",borderWidth:0,padding:2},textGray500:{color:"#6B7280",fontSize:12,marginLeft:4},flexRowGapItemsCenter:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:4},singleEntryContainer:{marginLeft:12,paddingLeft:16,borderLeftWidth:2,borderColor:"#D1D5DB"},multiEntryContainer:{marginLeft:12,paddingLeft:16,borderLeftWidth:2,borderColor:"#D1D5DB"},relativeOutlineNone:{position:"relative"},pageExpanderButton:{flexDirection:"row",alignItems:"center",backgroundColor:"transparent",borderWidth:0,padding:0},entriesContainer:{marginLeft:12,paddingLeft:16,borderLeftWidth:2,borderColor:"#D1D5DB"},flexRowGapFullWidth:{flexDirection:"row",width:"100%",alignItems:"center",marginVertical:6,lineHeight:44},text344054:{color:"#344054",height:"100%",marginRight:4},inputContainer:{flexDirection:"row",justifyContent:"space-between",borderWidth:0,height:28,margin:2,paddingVertical:4,paddingLeft:8,paddingRight:6,borderRadius:4,backgroundColor:"#EAECF0",flex:1},textNumber:{color:"#6938EF"},textInput:{flex:1,marginRight:8,paddingBottom:2,paddingTop:2},textString:{},numberInputButtons:{flexDirection:"row"},touchableButton:{width:24},booleanContainer:{flexDirection:"row",alignItems:"center",padding:6,borderRadius:4,backgroundColor:"#F3F4F6",flex:1},booleanText:{marginLeft:8,color:"#6938EF"},displayValueText:{flex:1,color:"#6938EF",height:"100%"}});var W=require("react-native"),D=require("react/jsx-runtime");function rt({selectedQuery:e,setSelectedQuery:n}){return(0,D.jsxs)(W.ScrollView,{style:Z.flexOne,contentContainerStyle:Z.scrollContent,children:[(0,D.jsx)(W.View,{style:Z.section,children:(0,D.jsx)(Ke,{query:e})}),(0,D.jsx)(W.View,{style:Z.section,children:(0,D.jsx)(et,{query:e,setSelectedQuery:n})}),(0,D.jsxs)(W.View,{style:Z.section,children:[(0,D.jsx)(W.Text,{style:Z.headerText,children:"Data Explorer"}),(0,D.jsx)(W.View,{style:Z.contentView,children:(0,D.jsx)(N,{editable:!0,label:"Data",value:e?.state.data,defaultExpanded:["Data"],activeQuery:e})})]}),(0,D.jsxs)(W.View,{style:Z.section,children:[(0,D.jsx)(W.Text,{style:Z.headerText,children:"Query Explorer"}),(0,D.jsx)(W.View,{style:Z.contentView,children:(0,D.jsx)(N,{label:"Query",value:e,defaultExpanded:["Query","queryKey"],activeQuery:e})})]})]})}var Z=W.StyleSheet.create({flexOne:{flex:1},scrollContent:{paddingBottom:16},section:{marginBottom:12},headerText:{textAlign:"left",backgroundColor:"#EAECF0",padding:8,width:"100%",fontSize:12,fontWeight:"500"},contentView:{padding:8,backgroundColor:"#FAFAFA"}});var E=require("react/jsx-runtime");function nt({selectedQuery:e,setSelectedQuery:n}){let r=Ct(),i=w.Dimensions.get("window").height,a=i*.4,l=150,u=i*.7,c=(0,Se.useRef)(new w.Animated.Value(a)).current,[C,h]=(0,Se.useState)(a),x=(0,Se.useRef)(a),A=(0,Se.useRef)(w.PanResponder.create({onMoveShouldSetPanResponder:(d,g)=>Math.abs(g.dy)>Math.abs(g.dx)&&Math.abs(g.dy)>10,onPanResponderGrant:()=>{c.stopAnimation(d=>{h(d),x.current=d,c.setValue(d)})},onPanResponderMove:(d,g)=>{let T=x.current-g.dy,P=Math.max(l,Math.min(u,T));c.setValue(P)},onPanResponderRelease:(d,g)=>{let T=Math.max(l,Math.min(u,x.current-g.dy));h(T),x.current=T,w.Animated.timing(c,{toValue:T,duration:200,useNativeDriver:!1}).start(()=>{c.setValue(T),h(T),x.current=T})}})).current,b=d=>{if(d===e){n(void 0);return}n(d)},k=({item:d})=>(0,E.jsx)(ht,{query:d,isSelected:e===d,onSelect:b});return(0,E.jsxs)(w.SafeAreaView,{style:oe.container,children:[(0,E.jsx)(w.View,{style:oe.listContainer,children:r.length>0?(0,E.jsx)(w.FlatList,{data:r,renderItem:k,keyExtractor:(d,g)=>`${JSON.stringify(d.queryKey)}-${g}`,contentContainerStyle:oe.listContent}):(0,E.jsx)(w.View,{style:oe.emptyContainer,children:(0,E.jsx)(w.Text,{style:oe.emptyText,children:"No queries found"})})}),e&&(0,E.jsxs)(w.Animated.View,{style:[oe.queryInformation,{height:c}],children:[(0,E.jsx)(w.View,{style:oe.dragHandle,...A.panHandlers,children:(0,E.jsx)(w.View,{style:oe.dragIndicator})}),(0,E.jsx)(w.View,{style:oe.queryInfoContent,children:(0,E.jsx)(rt,{selectedQuery:e,setSelectedQuery:n})})]})]})}var oe=w.StyleSheet.create({container:{flex:1,width:"100%"},listContainer:{flex:1,width:"100%",backgroundColor:"#ffffff"},listContent:{flexGrow:1},emptyContainer:{flex:1,justifyContent:"center",alignItems:"center",padding:20},emptyText:{color:"#6b7280",fontSize:16},queryInformation:{borderTopWidth:2,borderTopColor:"#d0d5dd",backgroundColor:"#ffffff"},dragHandle:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:"#f8f9fa",borderBottomWidth:1,borderBottomColor:"#e5e7eb"},dragIndicator:{width:50,height:4,backgroundColor:"#98a2b3",borderRadius:2,opacity:.8},queryInfoContent:{flex:1}});var ze=be(require("react-native-svg"));var Le=require("react"),L=require("react-native");var ue=require("react-native");var _={purpleMutation:"#D9D6FE",purpleMutationText:"#5925DC",redMutation:"#fecaca",redMutationText:"#b91c1c",yellowMutation:"#FEDF89",yellowMutationText:"#B54708",greenMutation:"#A6F4C5",greenMutationText:"#027A48",grayMutation:"#eaecf0",grayMutationText:"#344054"},Wt=({status:e,isPaused:n})=>{let r,i;return n?(r=_.purpleMutation,i=_.purpleMutationText):e==="error"?(r=_.redMutation,i=_.redMutationText):e==="pending"?(r=_.yellowMutation,i=_.yellowMutationText):e==="success"?(r=_.greenMutation,i=_.greenMutationText):(r=_.grayMutation,i=_.grayMutationText),{backgroundColor:r,textColor:i}};var re=require("react/jsx-runtime");function it({mutation:e,setSelectedMutation:n,selected:r}){let i=e.options.mutationKey?JSON.stringify(G(e.options.mutationKey,!1))+" - ":"",a=new Date(e.state.submittedAt).toLocaleString(),l=`${i}${a}`,{backgroundColor:u,textColor:c}=Wt({isPaused:e.state.isPaused,status:e.state.status});return(0,re.jsxs)(ue.TouchableOpacity,{onPress:()=>n(e===r?void 0:e),style:[Pe.button,r?.mutationId===e.mutationId&&Pe.selected],children:[(0,re.jsxs)(ue.View,{style:[Pe.iconContainer,{backgroundColor:u}],children:[e.state.isPaused&&(0,re.jsx)(Bt,{}),e.state.status==="success"&&(0,re.jsx)(Rt,{}),e.state.status==="error"&&(0,re.jsx)(Vt,{}),e.state.status==="pending"&&(0,re.jsx)(Ft,{})]}),(0,re.jsx)(ue.Text,{style:[Pe.text],children:l})]})}var Pe=ue.StyleSheet.create({button:{flexDirection:"row",alignItems:"center",justifyContent:"flex-start",borderBottomWidth:1,borderBottomColor:"#d0d5dd",backgroundColor:"white"},selected:{backgroundColor:"#eaecf0"},iconContainer:{padding:8,paddingVertical:6},text:{marginLeft:8,fontSize:12,minWidth:18}});var v=require("react-native");var O=require("react-native");var Te=require("react-native"),at=require("react/jsx-runtime"),Co={fresh:"#D1FADF",stale:"#FEF0C7",fetching:"#D1E9FF",paused:"#EBE9FE",inactive:"#F2F4F7"},bo={fresh:"#32D583",stale:"#FDB022",fetching:"#53B1FD",paused:"#9B8AFB",inactive:"#344054"},xo={fresh:"#027A48",stale:"#B54708",fetching:"#175CD3",paused:"#5925DC",inactive:"#344054"};function st({status:e}){let n=e==="pending"?"fetching":e==="idle"?"inactive":e==="error"?"stale":"fresh",r=Co[n],i=bo[n],a=xo[n];return(0,at.jsx)(Te.View,{style:[Et.container,{backgroundColor:r,borderColor:i}],children:(0,at.jsx)(Te.Text,{style:[Et.text,{color:a}],children:e})})}var Et=Te.StyleSheet.create({container:{padding:8,borderWidth:1,borderRadius:4,margin:4},text:{fontSize:12}});var K=require("react/jsx-runtime");function lt({selectedMutation:e}){if(e===void 0)return null;let n=new Date(e.state.submittedAt).toLocaleTimeString();return(0,K.jsxs)(O.View,{style:z.container,children:[(0,K.jsx)(O.Text,{style:[z.mutationDetailsText,z.bgEAECF0,z.p1],children:"Mutation Details"}),(0,K.jsxs)(O.View,{style:[z.flexRow,z.justifyBetween,z.p1],children:[(0,K.jsx)(O.ScrollView,{horizontal:!0,style:z.flex1,children:(0,K.jsx)(O.Text,{style:z.flexWrap,children:`${e.options.mutationKey?G(e.options.mutationKey,!0):"No mutationKey found"}`})}),(0,K.jsx)(st,{status:e.state.status})]}),(0,K.jsxs)(O.View,{style:[z.flexRow,z.justifyBetween,z.p1],children:[(0,K.jsx)(O.Text,{children:"Submitted At:"}),(0,K.jsx)(O.Text,{children:n})]})]})}var z=O.StyleSheet.create({container:{minWidth:200,fontSize:12,backgroundColor:"#FFFFFF",borderRadius:4},mutationDetailsText:{textAlign:"left",backgroundColor:"#EAECF0",padding:8,fontWeight:"500"},flexRow:{flexDirection:"row",justifyContent:"space-between",padding:8,borderBottomWidth:1,borderBottomColor:"#F3F4F6"},justifyBetween:{justifyContent:"space-between"},p1:{padding:8},flex1:{flex:1},flexWrap:{flexWrap:"wrap",alignItems:"center",marginRight:8},bgEAECF0:{backgroundColor:"#EAECF0"}});var S=require("react/jsx-runtime");function dt({selectedMutation:e}){return(0,S.jsxs)(v.ScrollView,{style:Q.flex1,contentContainerStyle:Q.scrollContent,children:[(0,S.jsx)(v.View,{style:Q.section,children:(0,S.jsx)(lt,{selectedMutation:e})}),(0,S.jsxs)(v.View,{style:Q.section,children:[(0,S.jsx)(v.Text,{style:Q.textHeader,children:"Variables Details"}),(0,S.jsx)(v.View,{style:Q.padding,children:(0,S.jsx)(N,{label:"Variables",value:e?.state.variables,defaultExpanded:["Variables"]})})]}),(0,S.jsxs)(v.View,{style:Q.section,children:[(0,S.jsx)(v.Text,{style:Q.textHeader,children:"Context Details"}),(0,S.jsx)(v.View,{style:Q.padding,children:(0,S.jsx)(N,{label:"Context",value:e?.state.context,defaultExpanded:["Context"]})})]}),(0,S.jsxs)(v.View,{style:Q.section,children:[(0,S.jsx)(v.Text,{style:Q.textHeader,children:"Data Explorer"}),(0,S.jsx)(v.View,{style:Q.padding,children:(0,S.jsx)(N,{label:"Data",defaultExpanded:["Data"],value:e?.state.data})})]}),(0,S.jsxs)(v.View,{style:Q.section,children:[(0,S.jsx)(v.Text,{style:Q.textHeader,children:"Mutations Explorer"}),(0,S.jsx)(v.View,{style:Q.padding,children:(0,S.jsx)(N,{label:"Mutation",defaultExpanded:["Mutation"],value:e})})]})]})}var Q=v.StyleSheet.create({flex1:{flex:1},scrollContent:{paddingBottom:16},section:{marginBottom:12},textHeader:{textAlign:"left",backgroundColor:"#EAECF0",padding:8,width:"100%",fontSize:12,fontWeight:"500"},padding:{padding:8,backgroundColor:"#FAFAFA"}});var ve=require("react"),Ot=require("@tanstack/react-query"),Ht=be(require("fast-deep-equal"));function wo(){let e=(0,Ot.useQueryClient)(),[n,r]=(0,ve.useState)([]),i=(0,ve.useRef)([]);return(0,ve.useEffect)(()=>{let a=()=>{setTimeout(()=>{let u=[...e.getMutationCache().getAll()],c=u.map(C=>C.state);(0,Ht.default)(i.current,c)||(i.current=c,r(u))},1)};a();let l=e.getMutationCache().subscribe(a);return()=>l()},[e]),{mutations:n}}var zt=wo;var J=require("react/jsx-runtime");function ut({selectedMutation:e,setSelectedMutation:n}){let{mutations:r}=zt(),i=L.Dimensions.get("window").height,a=i*.4,l=150,u=i*.7,c=(0,Le.useRef)(new L.Animated.Value(a)).current,[C,h]=(0,Le.useState)(a),x=(0,Le.useRef)(a),A=(0,Le.useRef)(L.PanResponder.create({onMoveShouldSetPanResponder:(b,k)=>Math.abs(k.dy)>Math.abs(k.dx)&&Math.abs(k.dy)>10,onPanResponderGrant:()=>{c.stopAnimation(b=>{h(b),x.current=b,c.setValue(b)})},onPanResponderMove:(b,k)=>{let d=x.current-k.dy,g=Math.max(l,Math.min(u,d));c.setValue(g)},onPanResponderRelease:(b,k)=>{let d=Math.max(l,Math.min(u,x.current-k.dy));h(d),x.current=d,L.Animated.timing(c,{toValue:d,duration:200,useNativeDriver:!1}).start(()=>{c.setValue(d),h(d),x.current=d})}})).current;return(0,J.jsxs)(L.View,{style:Me.container,children:[(0,J.jsx)(L.ScrollView,{style:Me.scrollView,children:r.map((b,k)=>(0,J.jsx)(it,{selected:e,setSelectedMutation:n,mutation:b},k))}),e&&(0,J.jsxs)(L.Animated.View,{style:[Me.mutationInfo,{height:c}],children:[(0,J.jsx)(L.View,{style:Me.dragHandle,...A.panHandlers,children:(0,J.jsx)(L.View,{style:Me.dragIndicator})}),(0,J.jsx)(L.View,{style:Me.mutationInfoContent,children:(0,J.jsx)(dt,{selectedMutation:e})})]})]})}var Me=L.StyleSheet.create({container:{flex:1,flexDirection:"column",width:"100%"},scrollView:{flex:1,flexDirection:"column"},mutationInfo:{borderTopWidth:2,borderTopColor:"#d0d5dd",backgroundColor:"#ffffff"},dragHandle:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:"#f8f9fa",borderBottomWidth:1,borderBottomColor:"#e5e7eb"},dragIndicator:{width:50,height:4,backgroundColor:"#98a2b3",borderRadius:2,opacity:.8},mutationInfoContent:{flex:1}});var B=require("react-native");var We=require("react-native");var Ut=require("react"),U=require("react-native"),ne=require("react/jsx-runtime"),ko=({label:e,color:n,count:r,showLabel:i=!0})=>{let[a,l]=(0,Ut.useState)(!1),u=(c,C)=>({green:{100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",700:"#15803d",900:"#14532d"},yellow:{100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",700:"#a16207",900:"#713f12"},gray:{100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",700:"#374151",900:"#111827"},blue:{100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",700:"#1d4ed8",900:"#1e3a8a"},purple:{100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",700:"#7e22ce",900:"#581c87"},red:{100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",700:"#b91c1c",900:"#7f1d1d"}})[c]?.[C]||"#000000";return(0,ne.jsxs)(U.TouchableOpacity,{style:[ce.queryStatusTag,!i&&ce.clickable],disabled:i,onPressIn:()=>l(!0),onPressOut:()=>l(!1),activeOpacity:.7,children:[!i&&a&&(0,ne.jsx)(U.View,{style:ce.tooltip,children:(0,ne.jsx)(U.Text,{style:ce.tooltipText,children:e})}),(0,ne.jsx)(U.View,{style:[ce.dot,{backgroundColor:u(n,"500")}]}),i&&(0,ne.jsx)(U.Text,{sty