@buoy-gg/shared-ui 7.0.44 → 7.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/license/index.js +1 -1
- package/lib/commonjs/license/licenseModule.js +1 -1
- package/lib/commonjs/stores/ignoredPatternsStore.shared.js +1 -1
- package/lib/commonjs/sync/settingsSync.js +1 -0
- package/lib/commonjs/utils/persistentStorage.js +1 -1
- package/lib/commonjs/utils/persistentStorage.web.js +1 -1
- package/lib/commonjs/utils/storageWrites.js +1 -0
- package/lib/module/index.js +1 -1
- package/lib/module/license/index.js +1 -1
- package/lib/module/license/licenseModule.js +1 -1
- package/lib/module/stores/ignoredPatternsStore.shared.js +1 -1
- package/lib/module/sync/settingsSync.js +1 -0
- package/lib/module/utils/persistentStorage.js +1 -1
- package/lib/module/utils/persistentStorage.web.js +1 -1
- package/lib/module/utils/storageWrites.js +1 -0
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/index.d.ts +3 -1
- package/lib/typescript/commonjs/license/index.d.ts +1 -1
- package/lib/typescript/commonjs/license/licenseModule.d.ts +10 -0
- package/lib/typescript/commonjs/stores/ignoredPatternsStore.shared.d.ts +16 -1
- package/lib/typescript/commonjs/sync/settingsSync.d.ts +78 -0
- package/lib/typescript/commonjs/utils/storageWrites.d.ts +10 -0
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/index.d.ts +3 -1
- package/lib/typescript/module/license/index.d.ts +1 -1
- package/lib/typescript/module/license/licenseModule.d.ts +10 -0
- package/lib/typescript/module/stores/ignoredPatternsStore.shared.d.ts +16 -1
- package/lib/typescript/module/sync/settingsSync.d.ts +78 -0
- package/lib/typescript/module/utils/storageWrites.d.ts +10 -0
- package/lib/web/chunks/chunk-2Q3SDPH2.mjs +3 -3
- package/lib/web/chunks/chunk-46CXXOQB.mjs +1 -1
- package/lib/web/chunks/chunk-552W4COI.mjs +1 -1
- package/lib/web/chunks/chunk-56TTTMX4.mjs +1 -1
- package/lib/web/chunks/chunk-5LOQZINQ.mjs +3 -3
- package/lib/web/chunks/chunk-5NOIO6ZM.mjs +1 -1
- package/lib/web/chunks/chunk-7PRKERDN.mjs +1 -1
- package/lib/web/chunks/chunk-A7KJCK4R.mjs +3 -3
- package/lib/web/chunks/chunk-AEXGGXS7.mjs +1 -1
- package/lib/web/chunks/chunk-ASEPWYDC.mjs +14 -0
- package/lib/web/chunks/chunk-ASTM35HG.mjs +1 -1
- package/lib/web/chunks/chunk-B2V2UDCU.mjs +1 -1
- package/lib/web/chunks/chunk-BFGKGTAC.mjs +1 -1
- package/lib/web/chunks/chunk-CLLTZQGD.mjs +1 -1
- package/lib/web/chunks/chunk-D4RXBAOO.mjs +1 -1
- package/lib/web/chunks/chunk-DEEKIG2L.mjs +1 -0
- package/lib/web/chunks/chunk-DZDTNXXK.mjs +1 -1
- package/lib/web/chunks/chunk-HXPTZMAZ.mjs +1 -1
- package/lib/web/chunks/chunk-K4EGHHD6.mjs +1 -1
- package/lib/web/chunks/chunk-K7CGIEFU.mjs +1 -1
- package/lib/web/chunks/chunk-KBTYK5YE.mjs +1 -1
- package/lib/web/chunks/chunk-KHP6CSSM.mjs +1 -1
- package/lib/web/chunks/chunk-MKJKS3IG.mjs +1 -1
- package/lib/web/chunks/chunk-NK3OISOL.mjs +3 -3
- package/lib/web/chunks/chunk-OZB3VKZE.mjs +1 -1
- package/lib/web/chunks/chunk-QCD6T6L4.mjs +1 -1
- package/lib/web/chunks/chunk-QQTJ463K.mjs +1 -1
- package/lib/web/chunks/chunk-T7RZZG4A.mjs +15 -0
- package/lib/web/chunks/chunk-U2BTZZID.mjs +14 -0
- package/lib/web/chunks/chunk-UCKELQSM.mjs +1 -1
- package/lib/web/chunks/chunk-UNYQJZET.mjs +1 -1
- package/lib/web/chunks/chunk-W4BGMPJO.mjs +1 -1
- package/lib/web/chunks/chunk-WIFX6XNL.mjs +1 -1
- package/lib/web/chunks/chunk-WLGUP3KY.mjs +1 -1
- package/lib/web/chunks/chunk-XD2BEYMM.mjs +2 -2
- package/lib/web/chunks/chunk-XMDNJJS5.mjs +6 -6
- package/lib/web/chunks/chunk-YG6DIKQD.mjs +1 -1
- package/lib/web/chunks/chunk-YIZFMU66.mjs +1 -1
- package/lib/web/chunks/persistentStorage.web-56ENKXFJ.mjs +1 -0
- package/lib/web/dataViewer.mjs +2 -2
- package/lib/web/hooks.mjs +1 -1
- package/lib/web/index.mjs +3 -3
- package/lib/web/ui.mjs +1 -1
- package/lib/web/utils.mjs +1 -1
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{c as W}from"./chunk-GBUZCZE4.mjs";import{A as Y,G as $,H as r,W as te,p as C,q as m,s as A,u as I,x as R,z as L}from"./chunk-UCKELQSM.mjs";import{useCallback as ae,useEffect as
|
|
1
|
+
"use client";import{c as W}from"./chunk-GBUZCZE4.mjs";import{A as Y,G as $,H as r,W as te,p as C,q as m,s as A,u as I,x as R,z as L}from"./chunk-UCKELQSM.mjs";import{useCallback as ae,useEffect as ne,useRef as j,useState as q}from"react";var T=new Map;function se(e){try{return JSON.parse(e)}catch{return}}function ie(e,t,a={}){let[i,l]=q(()=>T.has(e)?T.get(e):t),[y,g]=q(()=>T.has(e)),c=j(e);c.current=e;let d=j(a);d.current=a,ne(()=>{if(T.has(e)){l(T.get(e)),g(true);return}let o=false,S=d.current.storage??W,p=d.current.parse??se;return S.getItem(e).then(h=>{if(!o){if(h!=null){let u;try{u=p(h)}catch{}u!==void 0&&(T.set(e,u),l(u))}g(true)}}).catch(()=>{o||g(true)}),()=>{o=true}},[e]);let v=ae(o=>{l(S=>{let p=typeof o=="function"?o(S):o;T.set(c.current,p);let h=d.current.storage??W,u=d.current.serialize??JSON.stringify;try{h.setItem(c.current,u(p)).catch(()=>{})}catch{}return p})},[]);return[i,v,y]}function re(){T.clear()}import{useCallback as P,useEffect as z,useMemo as le,useState as O}from"react";function oe(e,t={}){let[a,i]=O(()=>e.getAll()),[l,y]=O(()=>t.initialFilter??{}),[g,c]=O(()=>e.getEnabled());z(()=>e.subscribe(i),[e]);let d=t.filterItems,v=le(()=>d?d(a,l):a,[a,l,d]),o=P(()=>{e.clear()},[e]),S=P(()=>{let h=!g;e.setEnabled(h),c(h)},[e,g]),p=P(h=>e.getById(h),[e]);return{items:a,filteredItems:v,filter:l,setFilter:y,isEnabled:g,toggleCapture:S,clear:o,getById:p}}function ce(e,t){let[a,i]=O(e);return z(()=>t(i),[t]),a}import{useCallback as de,useEffect as ue,useState as K}from"react";function fe(e,t={}){let{enabled:a=true,maxEvents:i=500,select:l}=t,[y,g]=K([]),[c,d]=K(a);ue(()=>{if(!a){d(false);return}let o=null,S=null,p=e.subscribeToEvents(h=>{S=h,o==null&&(o=requestAnimationFrame(()=>{if(o=null,!S)return;let u=S;S=null,l&&(u=l(u)),u.length>i&&(u=u.slice(0,i)),g(u)}))});return d(true),()=>{p(),o!=null&&cancelAnimationFrame(o)}},[e,a,i,l]);let v=de(()=>{e.clearEvents()},[e]);return{events:y,clearEvents:v,isActive:c}}import{useState as b,useEffect as w,useCallback as ge}from"react";async function U(){let[e,t,a]=await Promise.all([m.isScreenReaderEnabled(),m.isReduceMotionEnabled(),m.isReduceTransparencyEnabled()]),i={isScreenReaderEnabled:e,isReduceMotionEnabled:t,isReduceTransparencyEnabled:a};if(r.OS==="ios"){let[l,y,g,c,d]=await Promise.all([m.isBoldTextEnabled?.()??Promise.resolve(false),m.isGrayscaleEnabled?.()??Promise.resolve(false),m.isInvertColorsEnabled?.()??Promise.resolve(false),m.isDarkerSystemColorsEnabled?.()??Promise.resolve(false),m.prefersCrossFadeTransitions?.()??Promise.resolve(false)]);i.isBoldTextEnabled=l,i.isGrayscaleEnabled=y,i.isInvertColorsEnabled=g,i.isDarkerSystemColorsEnabled=c,i.prefersCrossFadeTransitions=d}if(r.OS==="android"){let l=await m.isHighTextContrastEnabled?.()??false;i.isHighTextContrastEnabled=l}return i}function k(){let e=r.constants,t={os:r.OS,version:r.Version,reactNativeVersion:e.reactNativeVersion,isTesting:r.isTesting??false,isDisableAnimations:e.isDisableAnimations??false};return r.OS==="ios"?{...t,osVersion:e.osVersion,systemName:e.systemName,interfaceIdiom:e.interfaceIdiom,isPad:r.isPad,isTV:r.isTV,isVision:r.isVision??false,isMacCatalyst:r.isMacCatalyst??false,forceTouchAvailable:e.forceTouchAvailable}:r.OS==="android"?{...t,apiLevel:e.Version,release:e.Release,brand:e.Brand,manufacturer:e.Manufacturer,model:e.Model,fingerprint:e.Fingerprint,serial:e.Serial,uiMode:e.uiMode}:t}function M(){let e=R.get("window"),t=R.get("screen"),a={window:{width:e.width,height:e.height,scale:e.scale,fontScale:e.fontScale},screen:{width:t.width,height:t.height,scale:t.scale,fontScale:t.fontScale},pixelRatio:$.get(),fontScale:$.getFontScale(),isLandscape:e.width>e.height,isPortrait:e.height>e.width};if(r.OS==="ios")try{let i=C.DeviceInfo?.getConstants?.();a.isIPhoneNotched=i?.isIPhoneX_deprecated??false}catch{a.isIPhoneNotched=false}if(r.OS==="android")try{let i=C.DeviceInfo?.getConstants?.();a.isEdgeToEdge=i?.isEdgeToEdge??false,a.densityDpi=Math.round(e.scale*160)}catch{}return a}async function X(){return new Promise(e=>{let t=false;r.OS==="ios"?C.StatusBarManager?.getHeight?.(a=>{t||(t=true,e(a?.height??null))})??e(null):r.OS==="android"?(t=true,e(te.currentHeight??null)):(t=true,e(null)),setTimeout(()=>{t||(t=true,e(null))},100)})}function N(){let e={isRTL:L.isRTL,doLeftAndRightSwapInRTL:L.doLeftAndRightSwapInRTL};return r.OS==="android"&&(e.localeIdentifier=L.localeIdentifier),e}function V(){if(r.OS==="ios")try{return{userDefaults:C.SettingsManager?.getConstants?.()?.settings??{}}}catch{return{}}return{}}function B(){let e={};if(r.OS==="android"){let t=r.constants;e.serial=t.Serial,e.fingerprint=t.Fingerprint;try{let a=C.PlatformConstants;a?.getAndroidID&&(e.androidId=a.getAndroidID())}catch{}}return e}function he(e){let t=[e.platform.os,e.platform.version,e.display.window.width,e.display.window.height,e.display.pixelRatio,e.platform.interfaceIdiom??"",e.platform.forceTouchAvailable??false,e.display.isIPhoneNotched??false,e.platform.model??"",e.platform.brand??"",e.platform.manufacturer??"",e.platform.uiMode??""].join("|"),a=0;for(let i=0;i<t.length;i++){let l=t.charCodeAt(i);a=(a<<5)-a+l,a=a&a}return Math.abs(a).toString(16).padStart(8,"0")}function me(){let[e,t]=b(true),[a,i]=b(k()),[l,y]=b(M()),[g,c]=b({isScreenReaderEnabled:false,isReduceMotionEnabled:false,isReduceTransparencyEnabled:false}),[d,v]=b(()=>{let f=A.getColorScheme()??null;return{colorScheme:f,prefersDarkMode:f==="dark"}}),[o,S]=b(N()),[p,h]=b({height:null,isVisible:true}),[u,F]=b({isVisible:false,height:0,animationDuration:0}),[J,_]=b({currentState:I.currentState,isActive:I.currentState==="active"}),[x,Q]=b(B()),[H,Z]=b(V()),[G,ee]=b(Date.now()),D=ge(async()=>{t(true);let[f,n]=await Promise.all([U(),X()]);i(k()),y(M()),c(f);let s=A.getColorScheme()??null;v({colorScheme:s,prefersDarkMode:s==="dark"}),S(N()),h(E=>({...E,height:n})),Q(B()),Z(V()),ee(Date.now()),t(false)},[]);return w(()=>{D()},[D]),w(()=>{let f=R.addEventListener("change",({window:n,screen:s})=>{y(E=>({...E,window:{width:n.width,height:n.height,scale:n.scale,fontScale:n.fontScale},screen:{width:s.width,height:s.height,scale:s.scale,fontScale:s.fontScale},isLandscape:n.width>n.height,isPortrait:n.height>n.width}))});return()=>f.remove()},[]),w(()=>{let f=A.addChangeListener(({colorScheme:n})=>{let s=n??null;v({colorScheme:s,prefersDarkMode:s==="dark"})});return()=>f.remove()},[]),w(()=>{let f=Y.addListener(r.OS==="ios"?"keyboardWillShow":"keyboardDidShow",s=>{F({isVisible:true,height:s.endCoordinates.height,animationDuration:s.duration??0})}),n=Y.addListener(r.OS==="ios"?"keyboardWillHide":"keyboardDidHide",s=>{F({isVisible:false,height:0,animationDuration:s.duration??0})});return()=>{f.remove(),n.remove()}},[]),w(()=>{let f=I.addEventListener("change",n=>{_({currentState:n,isActive:n==="active"})});return()=>f.remove()},[]),w(()=>{let f=[m.addEventListener("screenReaderChanged",n=>{c(s=>({...s,isScreenReaderEnabled:n}))}),m.addEventListener("reduceMotionChanged",n=>{c(s=>({...s,isReduceMotionEnabled:n}))}),m.addEventListener("reduceTransparencyChanged",n=>{c(s=>({...s,isReduceTransparencyEnabled:n}))})];if(r.OS==="ios"){let n=(s,E)=>m.addEventListener(s,E);f.push(n("boldTextChanged",s=>{c(E=>({...E,isBoldTextEnabled:s}))}),n("grayscaleChanged",s=>{c(E=>({...E,isGrayscaleEnabled:s}))}),n("invertColorsChanged",s=>{c(E=>({...E,isInvertColorsEnabled:s}))}))}return()=>{f.forEach(n=>n.remove())}},[]),{platform:a,display:l,accessibility:g,appearance:d,locale:o,statusBar:p,keyboard:u,appState:J,identifiers:x,settings:H,timestamp:G,isLoading:e,refresh:D,generateFingerprint:()=>he({platform:a,display:l,accessibility:g,appearance:d,locale:o,statusBar:p,keyboard:u,appState:J,identifiers:x,settings:H,timestamp:G,isLoading:e})}}async function Se(){let[e,t]=await Promise.all([U(),X()]),a=A.getColorScheme()??null;return{platform:k(),display:M(),accessibility:e,appearance:{colorScheme:a,prefersDarkMode:a==="dark"},locale:N(),statusBar:{height:t,isVisible:true},keyboard:{isVisible:false,height:0,animationDuration:0},appState:{currentState:I.currentState,isActive:I.currentState==="active"},identifiers:B(),settings:V(),timestamp:Date.now(),isLoading:false}}function pe(e){console.log(`
|
|
2
2
|
========================================`),console.log(" DEVICE INFO REPORT"),console.log(`========================================
|
|
3
3
|
`),console.log("--- PLATFORM ---"),console.log(JSON.stringify(e.platform,null,2)),console.log(`
|
|
4
4
|
--- DISPLAY ---`),console.log(JSON.stringify(e.display,null,2)),console.log(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{c as Y}from"./chunk-GBUZCZE4.mjs";import{P as te,d as C,e as m,g as O,i as I,l as R,n as L,o as $,u as j,v as r}from"./chunk-K4LXMO4D.mjs";import{useCallback as ae,useEffect as
|
|
1
|
+
"use client";import{c as Y}from"./chunk-GBUZCZE4.mjs";import{P as te,d as C,e as m,g as O,i as I,l as R,n as L,o as $,u as j,v as r}from"./chunk-K4LXMO4D.mjs";import{useCallback as ae,useEffect as ne,useRef as W,useState as q}from"react";var T=new Map;function se(e){try{return JSON.parse(e)}catch{return}}function ie(e,t,a={}){let[i,l]=q(()=>T.has(e)?T.get(e):t),[y,g]=q(()=>T.has(e)),c=W(e);c.current=e;let d=W(a);d.current=a,ne(()=>{if(T.has(e)){l(T.get(e)),g(true);return}let o=false,S=d.current.storage??Y,p=d.current.parse??se;return S.getItem(e).then(h=>{if(!o){if(h!=null){let u;try{u=p(h)}catch{}u!==void 0&&(T.set(e,u),l(u))}g(true)}}).catch(()=>{o||g(true)}),()=>{o=true}},[e]);let v=ae(o=>{l(S=>{let p=typeof o=="function"?o(S):o;T.set(c.current,p);let h=d.current.storage??Y,u=d.current.serialize??JSON.stringify;try{h.setItem(c.current,u(p)).catch(()=>{})}catch{}return p})},[]);return[i,v,y]}function re(){T.clear()}import{useCallback as P,useEffect as z,useMemo as le,useState as A}from"react";function oe(e,t={}){let[a,i]=A(()=>e.getAll()),[l,y]=A(()=>t.initialFilter??{}),[g,c]=A(()=>e.getEnabled());z(()=>e.subscribe(i),[e]);let d=t.filterItems,v=le(()=>d?d(a,l):a,[a,l,d]),o=P(()=>{e.clear()},[e]),S=P(()=>{let h=!g;e.setEnabled(h),c(h)},[e,g]),p=P(h=>e.getById(h),[e]);return{items:a,filteredItems:v,filter:l,setFilter:y,isEnabled:g,toggleCapture:S,clear:o,getById:p}}function ce(e,t){let[a,i]=A(e);return z(()=>t(i),[t]),a}import{useCallback as de,useEffect as ue,useState as K}from"react";function fe(e,t={}){let{enabled:a=true,maxEvents:i=500,select:l}=t,[y,g]=K([]),[c,d]=K(a);ue(()=>{if(!a){d(false);return}let o=null,S=null,p=e.subscribeToEvents(h=>{S=h,o==null&&(o=requestAnimationFrame(()=>{if(o=null,!S)return;let u=S;S=null,l&&(u=l(u)),u.length>i&&(u=u.slice(0,i)),g(u)}))});return d(true),()=>{p(),o!=null&&cancelAnimationFrame(o)}},[e,a,i,l]);let v=de(()=>{e.clearEvents()},[e]);return{events:y,clearEvents:v,isActive:c}}import{useState as b,useEffect as w,useCallback as ge}from"react";async function U(){let[e,t,a]=await Promise.all([m.isScreenReaderEnabled(),m.isReduceMotionEnabled(),m.isReduceTransparencyEnabled()]),i={isScreenReaderEnabled:e,isReduceMotionEnabled:t,isReduceTransparencyEnabled:a};if(r.OS==="ios"){let[l,y,g,c,d]=await Promise.all([m.isBoldTextEnabled?.()??Promise.resolve(false),m.isGrayscaleEnabled?.()??Promise.resolve(false),m.isInvertColorsEnabled?.()??Promise.resolve(false),m.isDarkerSystemColorsEnabled?.()??Promise.resolve(false),m.prefersCrossFadeTransitions?.()??Promise.resolve(false)]);i.isBoldTextEnabled=l,i.isGrayscaleEnabled=y,i.isInvertColorsEnabled=g,i.isDarkerSystemColorsEnabled=c,i.prefersCrossFadeTransitions=d}if(r.OS==="android"){let l=await m.isHighTextContrastEnabled?.()??false;i.isHighTextContrastEnabled=l}return i}function k(){let e=r.constants,t={os:r.OS,version:r.Version,reactNativeVersion:e.reactNativeVersion,isTesting:r.isTesting??false,isDisableAnimations:e.isDisableAnimations??false};return r.OS==="ios"?{...t,osVersion:e.osVersion,systemName:e.systemName,interfaceIdiom:e.interfaceIdiom,isPad:r.isPad,isTV:r.isTV,isVision:r.isVision??false,isMacCatalyst:r.isMacCatalyst??false,forceTouchAvailable:e.forceTouchAvailable}:r.OS==="android"?{...t,apiLevel:e.Version,release:e.Release,brand:e.Brand,manufacturer:e.Manufacturer,model:e.Model,fingerprint:e.Fingerprint,serial:e.Serial,uiMode:e.uiMode}:t}function M(){let e=R.get("window"),t=R.get("screen"),a={window:{width:e.width,height:e.height,scale:e.scale,fontScale:e.fontScale},screen:{width:t.width,height:t.height,scale:t.scale,fontScale:t.fontScale},pixelRatio:j.get(),fontScale:j.getFontScale(),isLandscape:e.width>e.height,isPortrait:e.height>e.width};if(r.OS==="ios")try{let i=C.DeviceInfo?.getConstants?.();a.isIPhoneNotched=i?.isIPhoneX_deprecated??false}catch{a.isIPhoneNotched=false}if(r.OS==="android")try{let i=C.DeviceInfo?.getConstants?.();a.isEdgeToEdge=i?.isEdgeToEdge??false,a.densityDpi=Math.round(e.scale*160)}catch{}return a}async function X(){return new Promise(e=>{let t=false;r.OS==="ios"?C.StatusBarManager?.getHeight?.(a=>{t||(t=true,e(a?.height??null))})??e(null):r.OS==="android"?(t=true,e(te.currentHeight??null)):(t=true,e(null)),setTimeout(()=>{t||(t=true,e(null))},100)})}function N(){let e={isRTL:L.isRTL,doLeftAndRightSwapInRTL:L.doLeftAndRightSwapInRTL};return r.OS==="android"&&(e.localeIdentifier=L.localeIdentifier),e}function V(){if(r.OS==="ios")try{return{userDefaults:C.SettingsManager?.getConstants?.()?.settings??{}}}catch{return{}}return{}}function B(){let e={};if(r.OS==="android"){let t=r.constants;e.serial=t.Serial,e.fingerprint=t.Fingerprint;try{let a=C.PlatformConstants;a?.getAndroidID&&(e.androidId=a.getAndroidID())}catch{}}return e}function he(e){let t=[e.platform.os,e.platform.version,e.display.window.width,e.display.window.height,e.display.pixelRatio,e.platform.interfaceIdiom??"",e.platform.forceTouchAvailable??false,e.display.isIPhoneNotched??false,e.platform.model??"",e.platform.brand??"",e.platform.manufacturer??"",e.platform.uiMode??""].join("|"),a=0;for(let i=0;i<t.length;i++){let l=t.charCodeAt(i);a=(a<<5)-a+l,a=a&a}return Math.abs(a).toString(16).padStart(8,"0")}function me(){let[e,t]=b(true),[a,i]=b(k()),[l,y]=b(M()),[g,c]=b({isScreenReaderEnabled:false,isReduceMotionEnabled:false,isReduceTransparencyEnabled:false}),[d,v]=b(()=>{let f=O.getColorScheme()??null;return{colorScheme:f,prefersDarkMode:f==="dark"}}),[o,S]=b(N()),[p,h]=b({height:null,isVisible:true}),[u,F]=b({isVisible:false,height:0,animationDuration:0}),[J,_]=b({currentState:I.currentState,isActive:I.currentState==="active"}),[x,Q]=b(B()),[H,Z]=b(V()),[G,ee]=b(Date.now()),D=ge(async()=>{t(true);let[f,n]=await Promise.all([U(),X()]);i(k()),y(M()),c(f);let s=O.getColorScheme()??null;v({colorScheme:s,prefersDarkMode:s==="dark"}),S(N()),h(E=>({...E,height:n})),Q(B()),Z(V()),ee(Date.now()),t(false)},[]);return w(()=>{D()},[D]),w(()=>{let f=R.addEventListener("change",({window:n,screen:s})=>{y(E=>({...E,window:{width:n.width,height:n.height,scale:n.scale,fontScale:n.fontScale},screen:{width:s.width,height:s.height,scale:s.scale,fontScale:s.fontScale},isLandscape:n.width>n.height,isPortrait:n.height>n.width}))});return()=>f.remove()},[]),w(()=>{let f=O.addChangeListener(({colorScheme:n})=>{let s=n??null;v({colorScheme:s,prefersDarkMode:s==="dark"})});return()=>f.remove()},[]),w(()=>{let f=$.addListener(r.OS==="ios"?"keyboardWillShow":"keyboardDidShow",s=>{F({isVisible:true,height:s.endCoordinates.height,animationDuration:s.duration??0})}),n=$.addListener(r.OS==="ios"?"keyboardWillHide":"keyboardDidHide",s=>{F({isVisible:false,height:0,animationDuration:s.duration??0})});return()=>{f.remove(),n.remove()}},[]),w(()=>{let f=I.addEventListener("change",n=>{_({currentState:n,isActive:n==="active"})});return()=>f.remove()},[]),w(()=>{let f=[m.addEventListener("screenReaderChanged",n=>{c(s=>({...s,isScreenReaderEnabled:n}))}),m.addEventListener("reduceMotionChanged",n=>{c(s=>({...s,isReduceMotionEnabled:n}))}),m.addEventListener("reduceTransparencyChanged",n=>{c(s=>({...s,isReduceTransparencyEnabled:n}))})];if(r.OS==="ios"){let n=(s,E)=>m.addEventListener(s,E);f.push(n("boldTextChanged",s=>{c(E=>({...E,isBoldTextEnabled:s}))}),n("grayscaleChanged",s=>{c(E=>({...E,isGrayscaleEnabled:s}))}),n("invertColorsChanged",s=>{c(E=>({...E,isInvertColorsEnabled:s}))}))}return()=>{f.forEach(n=>n.remove())}},[]),{platform:a,display:l,accessibility:g,appearance:d,locale:o,statusBar:p,keyboard:u,appState:J,identifiers:x,settings:H,timestamp:G,isLoading:e,refresh:D,generateFingerprint:()=>he({platform:a,display:l,accessibility:g,appearance:d,locale:o,statusBar:p,keyboard:u,appState:J,identifiers:x,settings:H,timestamp:G,isLoading:e})}}async function Se(){let[e,t]=await Promise.all([U(),X()]),a=O.getColorScheme()??null;return{platform:k(),display:M(),accessibility:e,appearance:{colorScheme:a,prefersDarkMode:a==="dark"},locale:N(),statusBar:{height:t,isVisible:true},keyboard:{isVisible:false,height:0,animationDuration:0},appState:{currentState:I.currentState,isActive:I.currentState==="active"},identifiers:B(),settings:V(),timestamp:Date.now(),isLoading:false}}function pe(e){console.log(`
|
|
2
2
|
========================================`),console.log(" DEVICE INFO REPORT"),console.log(`========================================
|
|
3
3
|
`),console.log("--- PLATFORM ---"),console.log(JSON.stringify(e.platform,null,2)),console.log(`
|
|
4
4
|
--- DISPLAY ---`),console.log(JSON.stringify(e.display,null,2)),console.log(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Ob as le,Pb as se,Q as _,Qb as P,R as ce,Ub as de,Wb as M,Zb as $,ld as y}from"./chunk-JG4QSK5B.mjs";import{d as n}from"./chunk-CE5U3CSQ.mjs";import{J as D,a as c,b as f,d as G,r as O,y as U}from"./chunk-QPIZURPZ.mjs";var ue="[Circular]",H="[...]";function fe(e,t,o={}){let{depthLimit:s=Number.MAX_SAFE_INTEGER,edgesLimit:p=Number.MAX_SAFE_INTEGER}=o,d=[];function a(i,l,g,r,w,A){if(A+=1,typeof i=="object"&&i!==null){for(let v=0;v<r.length;v++)if(r[v]===i){m(ue,i,l,w);return}if(A>s){m(H,i,l,w);return}if(g+1>p){m(H,i,l,w);return}if(r.push(i),Array.isArray(i)){let v=i;for(let I=0;I<i.length;I++)a(i[I],I,I,r,v,A)}else if(i instanceof Map||i instanceof Set||i instanceof RegExp||i instanceof Date||i instanceof Error){r.pop();return}else{let v=i,I=Object.keys(v);for(let B=0;B<I.length;B++){let E=I[B];a(v[E],E,B,r,v,A)}}r.pop()}}function m(i,l,g,r){if(!r)return;let w=Object.getOwnPropertyDescriptor(r,g);if(w?.get!==void 0)if(w.configurable)Object.defineProperty(r,g,{value:i}),d.push([r,g,l,w]);else return;else r[g]=i,d.push([r,g,l])}let C=(i,l)=>{if(typeof l=="bigint")return`${l.toString()}n`;if(typeof l=="symbol")return l.toString();if(typeof l>"u")return"undefined";if(typeof l=="function")return`[Function: ${l.name||"anonymous"}]`;if(typeof l=="number"){if(l===1/0)return"Infinity";if(l===-1/0)return"-Infinity";if(Number.isNaN(l))return"NaN"}if(l instanceof Error){let g={name:l.name,message:l.message,stack:l.stack};return Object.getOwnPropertyNames(l).forEach(r=>{if(!["name","message","stack"].includes(r))try{let w=l[r];w!==void 0&&(g[r]=w)}catch{}}),g}if(l instanceof Date)return l.toISOString();if(l instanceof RegExp)return l.toString();if(l instanceof Map)try{return{__type:"Map",entries:Array.from(l.entries()).map(([g,r])=>[String(g),r])}}catch{return{__type:"Map",entries:"[Map iteration failed]"}}if(l instanceof Set)try{return{__type:"Set",values:Array.from(l)}}catch{return{__type:"Set",values:"[Set iteration failed]"}}return l};try{return a(e,"",0,[],null,0),JSON.stringify(e,C,t)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;d.length!==0;){let i=d.pop();if(i&&i.length===4){let[l,g,,r]=i;l&&typeof l=="object"&&r&&Object.defineProperty(l,g,r)}else if(i){let[l,g,r]=i;l&&typeof l=="object"&&(typeof g=="string"||typeof g=="number")&&(l[g]=r)}}}}var pe=e=>typeof e>"u",ge=e=>typeof e!="object"||e===null||e===Object.prototype?false:Object.getPrototypeOf(e)===null?true:Object.getPrototypeOf(e)===Object.prototype,z=e=>Array.isArray(e),ye=e=>typeof e=="boolean"||e===null||typeof e>"u"||typeof e=="number"||typeof e=="string"||typeof e=="symbol",he=e=>e instanceof Date&&!isNaN(e.valueOf()),J=e=>e instanceof Error,me=e=>e instanceof RegExp,Y=e=>e instanceof Set,K=e=>e instanceof Map,be=e=>typeof e=="bigint",X=e=>typeof e=="number"&&isNaN(e),Se=e=>e===1/0||e===-1/0,we=e=>e===0&&1/e===-1/0,xe=e=>e instanceof URL,Ce=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),Ae={Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray},q=[{isApplicable:pe,annotation:"undefined",transform:()=>null,untransform:()=>{}},{isApplicable:be,annotation:"bigint",transform:e=>e.toString(),untransform:e=>typeof BigInt<"u"?BigInt(e):(console.error("BigInt is not supported in this environment"),e)},{isApplicable:he,annotation:"Date",transform:e=>e.toISOString(),untransform:e=>new Date(e)},{isApplicable:J,annotation:"Error",transform:e=>({name:e.name,message:e.message,stack:e.stack,cause:"cause"in e?e.cause:void 0}),untransform:e=>{let t=new Error(e.message);return t.name=e.name,t.stack=e.stack,e.cause!==void 0&&(t.cause=e.cause),t}},{isApplicable:me,annotation:"regexp",transform:e=>""+e,untransform:e=>{let t=e.slice(1,e.lastIndexOf("/")),o=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,o)}},{isApplicable:Y,annotation:"set",transform:e=>[...e.values()],untransform:e=>new Set(e)},{isApplicable:K,annotation:"map",transform:e=>[...e.entries()],untransform:e=>new Map(e)},{isApplicable:e=>X(e)||Se(e),annotation:"number",transform:e=>X(e)?"NaN":e>0?"Infinity":"-Infinity",untransform:e=>Number(e)},{isApplicable:we,annotation:"number",transform:()=>"-0",untransform:()=>-0},{isApplicable:xe,annotation:"URL",transform:e=>e.toString(),untransform:e=>new URL(e)},{isApplicable:Ce,annotation:e=>["typed-array",e.constructor.name],transform:e=>[...e],untransform:(e,t)=>{let o=Array.isArray(t)?t[1]:"Uint8Array",s=Ae[o];if(!s)throw new Error(`Unknown typed array: ${o}`);return new s(e)}}];function j(e){for(let t of q)if(t.isApplicable(e)){let o=typeof t.annotation=="function"?t.annotation(e):t.annotation;return{value:t.transform(e),type:o}}}function Q(e,t){for(let o of q){let s=typeof o.annotation=="function"?Array.isArray(t)?t[0]:t:o.annotation;if(Array.isArray(t)&&Array.isArray(s)?t[0]===s[0]:s===t)return o.untransform(e,t)}throw new Error(`Unknown transformation: ${t}`)}var Z=e=>ge(e)||z(e)||K(e)||Y(e)||J(e);function V(e){return e.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function ee(e,t=[],o=[]){let s=ye(e);if(!s&&!Z(e)){let i=j(e);return i?{transformedValue:i.value,annotations:{[t.map(String).map(V).join(".")]:i.type}}:{transformedValue:e}}if(!s&&o.indexOf(e)!==-1)return{transformedValue:null};if(!Z(e)){let i=j(e);return i?{transformedValue:i.value,annotations:t.length>0?{[t.map(String).map(V).join(".")]:i.type}:{"":i.type}}:{transformedValue:e}}let p=j(e),d=p?.value??e,a=z(d)?[]:{},m={};if(p){let i=t.length>0?t.map(String).map(V).join("."):"";m[i]=p.type}let C=z(d)?d.map((i,l)=>[l,i]):Object.entries(d);for(let[i,l]of C){let g=String(i);if(g==="__proto__"||g==="constructor"||g==="prototype")throw new Error(`Detected property ${g}. This is a prototype pollution risk, please remove it from your object.`);let r=ee(l,[...t,i],[...o,e]);a[i]=r.transformedValue,r.annotations&&Object.assign(m,r.annotations)}return{transformedValue:a,annotations:Object.keys(m).length>0?m:void 0}}function ve(e){if(e==="")return[];let t=[],o="";for(let s=0;s<e.length;s++){let p=e.charAt(s);if(p==="\\"){let d=e.charAt(s+1);if(d==="\\"){o+="\\",s++;continue}else if(d==="."){o+=".",s++;continue}}if(p==="."){t.push(o),o="";continue}o+=p}return o&&t.push(o),t}function Ie(e,t,o){if(t.length===0)return;let s=e;for(let p=0;p<t.length-1;p++)s=s[t[p]];s[t[t.length-1]]=o}function Re(e,t){let o=e;for(let s of t)o=o[s];return o}function te(e){let t=ee(e),o={json:t.transformedValue};return t.annotations&&(o.meta={values:t.annotations}),o}function re(e){let{json:t,meta:o}=e;if(!o?.values)return t;let s=z(t)?[...t]:{...t},p=Object.entries(o.values).map(([d,a])=>({pathString:d,type:a,path:ve(d)})).sort((d,a)=>a.path.length-d.path.length);for(let{type:d,path:a}of p)if(a.length===0)s=Q(s,d);else{let m=Re(s,a),C=Q(m,d);Ie(s,a,C)}return s}var Te=(e,t=false)=>{let{json:o}=te(e);return JSON.stringify(o,null,t?2:void 0)},Oe=e=>{try{let t=JSON.parse(e);return re({json:t,meta:void 0})}catch{return JSON.parse(e)}};import{jsx as N,jsxs as L}from"react/jsx-runtime";function ke({icon:e,iconColor:t,title:o,count:s,subtitle:p,expanded:d,onToggle:a,children:m,style:C,titleStyle:i}){return L(c,{style:[F.container,C],children:[L(G,{onPress:a,activeOpacity:.7,style:F.headerTouchable,children:[L(c,{style:F.header,children:[L(c,{style:F.headerLeft,children:[N(e,{size:14,color:t}),N(f,{style:[F.title,i],children:o}),N(c,{style:[F.badge,{backgroundColor:t+"20"}],children:N(f,{style:[F.badgeText,{color:t}],children:s})})]}),d?N($,{size:14,color:n.muted}):N(M,{size:14,color:n.muted})]}),N(f,{style:F.subtitle,children:p})]}),d&&N(O.View,{style:{opacity:1},children:m})]})}var F=D.create({container:{marginBottom:20},headerTouchable:{marginBottom:12},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:4,paddingHorizontal:4},headerLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1},title:{fontSize:11,color:n.primary,fontFamily:y,fontWeight:"700",letterSpacing:2,opacity:.9},subtitle:{fontSize:9,color:n.secondary,fontFamily:y,paddingHorizontal:4,marginTop:2,opacity:.7},badge:{paddingHorizontal:8,paddingVertical:2,borderRadius:10},badgeText:{fontSize:10,fontFamily:y,fontWeight:"700"}});var oe={position:"absolute",top:0,left:0,right:0,bottom:0};import{jsx as k,jsxs as W}from"react/jsx-runtime";function Ne({alertConfig:e,badgeText:t,animatedStyle:o,style:s,indicatorCount:p=3}){let d=e.icon;return W(O.View,{style:[R.container,{borderColor:e.color+"40"},s,o],children:[k(c,{style:[R.glow,{backgroundColor:e.color+"10"}]}),W(c,{style:R.content,children:[k(c,{style:[R.iconWrapper,{backgroundColor:e.color+"15"}],children:k(d,{size:20,color:e.color})}),W(c,{style:R.textContainer,children:[k(f,{style:[R.label,{color:e.color}],children:e.label}),k(f,{style:R.subtitle,children:e.subtitle})]}),k(c,{style:[R.badge,{backgroundColor:e.color+"20"}],children:k(f,{style:[R.badgeText,{color:e.color}],children:t})})]}),k(c,{style:R.indicators,children:[...Array(p)].map((a,m)=>k(c,{style:[R.indicatorDot,{backgroundColor:e.color,opacity:e.pulse?m===0?1:.5-m*.2:.3-m*.1}]},m))})]})}var R=D.create({container:{backgroundColor:n.panel,borderRadius:12,borderWidth:1,padding:16,marginBottom:16,position:"relative",overflow:"hidden"},glow:{...oe,opacity:.5},content:{flexDirection:"row",alignItems:"center",gap:12},iconWrapper:{width:36,height:36,borderRadius:8,justifyContent:"center",alignItems:"center"},textContainer:{flex:1,gap:2},label:{fontSize:13,fontWeight:"700",fontFamily:y,letterSpacing:1.5,textShadowOffset:{width:0,height:0},textShadowRadius:8},subtitle:{fontSize:10,color:n.secondary,fontFamily:y},badge:{paddingHorizontal:8,paddingVertical:4,borderRadius:4},badgeText:{fontSize:9,fontWeight:"700",fontFamily:y,letterSpacing:1},indicators:{position:"absolute",top:8,right:8,flexDirection:"row",gap:3},indicatorDot:{width:4,height:4,borderRadius:2}});import{Fragment as Fe}from"react";import{jsx as b,jsxs as x}from"react/jsx-runtime";function Be({statsConfig:e,totalCount:t,header:o,bottomStats:s,style:p,hideInactive:d=true}){return x(c,{style:[u.container,p],children:[o&&x(c,{style:u.header,children:[x(c,{style:u.headerLeft,children:[b(f,{style:u.headerTitle,children:o.title}),b(f,{style:u.headerSubtitle,children:o.subtitle})]}),o.healthPercentage!==void 0&&b(c,{style:u.headerRight,children:x(c,{style:u.statusIndicator,children:[b(c,{style:[u.statusDot,{backgroundColor:o.healthColor||n.success}]}),b(f,{style:[u.statusText,{color:o.healthColor||n.success}],children:o.healthStatus||"OPTIMAL"})]})})]}),o?.healthPercentage!==void 0&&x(c,{style:u.healthSection,children:[b(f,{style:u.healthLabel,children:"SYSTEM HEALTH"}),b(c,{style:u.healthBarWrapper,children:b(c,{style:u.healthBarBg,children:b(O.View,{style:[u.healthBarFill,{width:`${o.healthPercentage}%`,backgroundColor:o.healthColor||n.success}]})})}),x(f,{style:[u.healthPercentage,{color:o.healthColor||n.success}],children:[o.healthPercentage,"%"]})]}),b(c,{style:u.statsGrid,children:e.map(a=>{let m=a.value>0;if(d&&!m)return null;let C=a.icon,i=t?a.value/t*100:0;return x(O.View,{style:[u.statCard,{borderColor:a.color+"30"}],children:[x(c,{style:u.cardContent,children:[b(c,{style:[u.iconBadge,{backgroundColor:a.color+"1A",borderColor:a.color+"33"}],children:b(C,{size:12,color:a.color})}),x(c,{style:u.cardInfo,children:[b(f,{style:u.cardLabel,children:a.label}),b(f,{style:u.cardSubtitle,children:a.subtitle})]}),x(c,{style:u.valueBlock,children:[b(f,{style:[u.statNumber,{color:a.color}],children:a.value.toString().padStart(2,"0")}),t?x(f,{style:u.percentText,children:[Math.round(i),"%"]}):null]})]}),a.showBar!==false&&t&&b(c,{style:[u.statBar,{backgroundColor:a.color+"10"}],children:b(c,{style:[u.statBarFill,{width:`${i}%`,backgroundColor:a.color}]})})]},a.key)})}),s&&s.length>0&&b(c,{style:u.bottomBar,children:s.map((a,m)=>x(Fe,{children:[x(c,{style:u.bottomStat,children:[b(f,{style:u.bottomStatLabel,children:a.label}),b(f,{style:[u.bottomStatValue,a.color&&{color:a.color}],children:a.value})]}),m<s.length-1&&b(c,{style:u.bottomDivider})]},a.label))})]})}var u=D.create({container:{backgroundColor:n.panel,borderRadius:12,padding:12,marginBottom:12,borderWidth:1,borderColor:n.border+"40",overflow:"hidden",position:"relative"},header:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8,paddingBottom:8,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.1)"},headerLeft:{gap:1},headerRight:{alignItems:"flex-end"},headerTitle:{fontSize:11,fontWeight:"700",color:n.primary,fontFamily:y,letterSpacing:1.5},headerSubtitle:{fontSize:8,color:n.secondary,fontFamily:y,opacity:.7},statusIndicator:{flexDirection:"row",alignItems:"center",gap:4},statusDot:{width:5,height:5,borderRadius:2.5},statusText:{fontSize:9,fontWeight:"600",fontFamily:y,letterSpacing:.5},healthSection:{flexDirection:"row",alignItems:"center",marginBottom:10,gap:8},healthLabel:{fontSize:8,color:n.secondary,fontFamily:y,letterSpacing:.5},healthBarWrapper:{flex:1},healthBarBg:{height:4,backgroundColor:"rgba(128, 128, 128, 0.1)",borderRadius:2,overflow:"hidden"},healthBarFill:{height:"100%",borderRadius:2},healthPercentage:{fontSize:11,fontWeight:"700",fontFamily:y},statsGrid:{gap:6,marginBottom:8},statCard:{backgroundColor:n.blackTint2,borderRadius:8,borderWidth:1,borderColor:n.border,padding:10,marginBottom:4},cardContent:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:4},cardInfo:{flex:1},cardLabel:{fontSize:11,fontWeight:"700",fontFamily:y,letterSpacing:.5,color:n.primary},cardSubtitle:{fontSize:8,color:n.secondary,fontFamily:y,opacity:.7},statNumber:{fontSize:16,fontWeight:"700",fontFamily:y,minWidth:28},valueBlock:{alignItems:"flex-end"},percentText:{fontSize:9,color:n.secondary,fontFamily:y},statBar:{height:3,borderRadius:1.5,overflow:"hidden"},statBarFill:{height:"100%",borderRadius:1.5},bottomBar:{flexDirection:"row",alignItems:"center",paddingTop:8,borderTopWidth:1,borderTopColor:n.border+"40"},bottomStat:{flex:1,alignItems:"center"},bottomStatLabel:{fontSize:7,color:n.muted,fontFamily:y,letterSpacing:.5,marginBottom:1},bottomStatValue:{fontSize:11,fontWeight:"700",color:n.primary,fontFamily:y},bottomDivider:{width:1,height:16,backgroundColor:n.border+"40"},iconBadge:{width:24,height:24,borderRadius:6,borderWidth:1,alignItems:"center",justifyContent:"center"}});import{useState as De,useCallback as ze}from"react";import{jsx as S,jsxs as T}from"react/jsx-runtime";function Le({issues:e,onIssueClick:t,hintText:o="Tap any issue to view details",style:s,expandable:p=true,statusLabels:d={missing:"Not found",wrong_type:"Type error",wrong_value:"Invalid value"}}){let[a,m]=De(new Set),C=ze(r=>{p&&m(w=>{let A=new Set(w);return A.has(r)?A.delete(r):A.add(r),A})},[p]),i=r=>r==="missing"?n.warning:n.info,l=r=>r==="missing"?_:P,g=r=>{switch(r.status){case"missing":return`\u2022 ${d.missing}`;case"wrong_type":return`\u2022 ${d.wrong_type}${r.expectedType?`: Expected ${r.expectedType}`:""}`;case"wrong_value":return`\u2022 ${d.wrong_value}${r.value?`: ${String(r.value).substring(0,20)}`:""}`;default:return""}};return e.length===0?null:T(c,{style:[h.container,s],children:[e.map((r,w)=>{let A=i(r.status),v=l(r.status),I=a.has(r.key),B=I?$:M;return T(c,{children:[T(G,{onPress:()=>{p&&C(r.key),t?.(r)},style:h.issueRow,activeOpacity:.7,children:[S(v,{size:14,color:A}),T(c,{style:h.issueContent,children:[S(f,{style:[h.issueKey,{color:n.primary}],children:r.key}),S(f,{style:h.issueDesc,children:g(r)})]}),p&&S(B,{size:12,color:n.muted})]}),p&&I&&T(O.View,{style:h.issueDetails,children:[T(c,{style:h.detailRow,children:[S(f,{style:h.detailLabel,children:"Status:"}),T(f,{style:[h.detailValue,{color:n.primary,fontWeight:"600"}],children:[r.status==="missing"&&"MISSING",r.status==="wrong_type"&&"TYPE ERROR",r.status==="wrong_value"&&"INVALID VALUE"]})]}),r.value!==void 0&&r.status!=="missing"&&T(c,{style:h.detailRow,children:[S(f,{style:h.detailLabel,children:"Current:"}),S(f,{style:[h.detailValue,{color:n.warning}],children:`"${String(r.value)}"`})]}),r.expectedType&&r.status==="wrong_type"&&T(c,{style:h.detailRow,children:[S(f,{style:h.detailLabel,children:"Expected:"}),S(f,{style:[h.detailValue,{color:n.success}],children:r.expectedType})]}),r.expectedValue&&r.status==="wrong_value"&&T(c,{style:h.detailRow,children:[S(f,{style:h.detailLabel,children:"Expected:"}),S(f,{style:[h.detailValue,{color:n.success}],children:`"${r.expectedValue}"`})]}),r.description&&S(c,{style:h.descSection,children:S(f,{style:h.descText,children:r.description})}),r.fixSuggestion&&T(c,{style:h.fixSection,children:[S(f,{style:h.fixLabel,children:"HOW TO FIX"}),S(f,{style:h.fixText,children:r.fixSuggestion})]})]})]},`${r.key}-${w}`)}),o&&S(f,{style:h.hint,children:o})]})}var h=D.create({container:{backgroundColor:n.panel,borderRadius:8,padding:8,borderWidth:1,borderColor:n.warning+"33"},issueRow:{flexDirection:"row",alignItems:"center",paddingVertical:8,paddingHorizontal:8,borderRadius:6,marginBottom:4},issueContent:{flex:1,marginLeft:8,flexDirection:"row",alignItems:"center",gap:8},issueKey:{fontSize:11,fontWeight:"600",fontFamily:y},issueDesc:{fontSize:10,color:n.secondary,fontFamily:y,flex:1},hint:{fontSize:9,color:n.muted,fontFamily:y,textAlign:"center",marginTop:8,paddingTop:8,borderTopWidth:1,borderTopColor:n.primary+"0D"},issueDetails:{marginTop:8,marginLeft:22,marginRight:8,paddingLeft:12,paddingRight:8,paddingTop:8,paddingBottom:8,backgroundColor:n.background+"4D",borderLeftWidth:2,borderLeftColor:n.primary+"1A",borderRadius:4},detailRow:{flexDirection:"row",marginTop:8,alignItems:"flex-start"},detailLabel:{fontSize:10,color:n.secondary,fontFamily:y,fontWeight:"600",width:70},detailValue:{fontSize:11,color:n.primary,fontFamily:y,flex:1,lineHeight:16},fixSection:{marginTop:12,padding:10,backgroundColor:n.info+"14",borderRadius:6,borderWidth:1,borderColor:n.info+"33"},fixLabel:{fontSize:10,color:n.info,fontFamily:y,fontWeight:"700",marginBottom:6,letterSpacing:.5},fixText:{fontSize:11,color:n.primary,fontFamily:y,lineHeight:18,backgroundColor:n.background+"66",padding:8,borderRadius:4,overflow:"hidden"},descSection:{marginTop:10,paddingTop:10,borderTopWidth:1,borderTopColor:n.primary+"0D"},descText:{fontSize:10,color:n.secondary,fontFamily:y,marginTop:4,lineHeight:14}});import{useMemo as ne,useEffect as je,useRef as ie}from"react";var ae={OPTIMAL:{icon:de,color:n.success,label:"CONFIG OK",subtitle:"All requirements met",pulse:false},WARNING:{icon:P,color:n.warning,label:"CONFIG WARNING",subtitle:"Check values and types",pulse:false},ERROR:{icon:se,color:n.error,label:"CONFIG ERROR",subtitle:"Missing required data",pulse:false},CRITICAL:{icon:_,color:n.critical,label:"CONFIG FAILURE",subtitle:"Multiple critical issues",pulse:false},LOADING:{icon:le,color:n.info,label:"LOADING",subtitle:"Reading configuration...",pulse:true},EMPTY:{icon:ce,color:n.muted,label:"NO DATA",subtitle:"No configuration found",pulse:false}};function Ve(e,t){let o=ne(()=>({...ae,...t}),[t]),s=ne(()=>e.totalCount===0?"EMPTY":e.missingCount>2||e.wrongTypeCount>2?"CRITICAL":e.missingCount>0?"ERROR":e.wrongValueCount>0||e.wrongTypeCount>0?"WARNING":"OPTIMAL",[e]),p=o[s],d=ie(new O.Value(1)).current,a=ie(new O.Value(1)).current;return je(()=>{d.setValue(0),a.setValue(.95),O.parallel([O.timing(d,{toValue:1,duration:300,useNativeDriver:true}),O.timing(a,{toValue:1,duration:300,easing:U.out(U.ease),useNativeDriver:true})]).start()},[s,d,a]),{alertState:s,alertConfig:p,alertAnimatedStyle:{transform:[{scale:a}],opacity:d},alertOpacity:d,alertScale:a}}export{fe as a,te as b,re as c,Te as d,Oe as e,ke as f,oe as g,Ne as h,Be as i,Le as j,ae as k,Ve as l};
|
|
1
|
+
"use client";import{Ob as le,Pb as se,Q as _,Qb as P,R as ce,Ub as de,Wb as M,Zb as $,ld as y}from"./chunk-JG4QSK5B.mjs";import{d as n}from"./chunk-CE5U3CSQ.mjs";import{J as z,a as c,b as f,d as G,r as O,y as U}from"./chunk-QPIZURPZ.mjs";var ue="[Circular]",H="[...]";function fe(e,t,o={}){let{depthLimit:s=Number.MAX_SAFE_INTEGER,edgesLimit:p=Number.MAX_SAFE_INTEGER}=o,d=[];function a(i,l,g,r,w,A){if(A+=1,typeof i=="object"&&i!==null){for(let v=0;v<r.length;v++)if(r[v]===i){m(ue,i,l,w);return}if(A>s){m(H,i,l,w);return}if(g+1>p){m(H,i,l,w);return}if(r.push(i),Array.isArray(i)){let v=i;for(let I=0;I<i.length;I++)a(i[I],I,I,r,v,A)}else if(i instanceof Map||i instanceof Set||i instanceof RegExp||i instanceof Date||i instanceof Error){r.pop();return}else{let v=i,I=Object.keys(v);for(let B=0;B<I.length;B++){let E=I[B];a(v[E],E,B,r,v,A)}}r.pop()}}function m(i,l,g,r){if(!r)return;let w=Object.getOwnPropertyDescriptor(r,g);if(w?.get!==void 0)if(w.configurable)Object.defineProperty(r,g,{value:i}),d.push([r,g,l,w]);else return;else r[g]=i,d.push([r,g,l])}let C=(i,l)=>{if(typeof l=="bigint")return`${l.toString()}n`;if(typeof l=="symbol")return l.toString();if(typeof l>"u")return"undefined";if(typeof l=="function")return`[Function: ${l.name||"anonymous"}]`;if(typeof l=="number"){if(l===1/0)return"Infinity";if(l===-1/0)return"-Infinity";if(Number.isNaN(l))return"NaN"}if(l instanceof Error){let g={name:l.name,message:l.message,stack:l.stack};return Object.getOwnPropertyNames(l).forEach(r=>{if(!["name","message","stack"].includes(r))try{let w=l[r];w!==void 0&&(g[r]=w)}catch{}}),g}if(l instanceof Date)return l.toISOString();if(l instanceof RegExp)return l.toString();if(l instanceof Map)try{return{__type:"Map",entries:Array.from(l.entries()).map(([g,r])=>[String(g),r])}}catch{return{__type:"Map",entries:"[Map iteration failed]"}}if(l instanceof Set)try{return{__type:"Set",values:Array.from(l)}}catch{return{__type:"Set",values:"[Set iteration failed]"}}return l};try{return a(e,"",0,[],null,0),JSON.stringify(e,C,t)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;d.length!==0;){let i=d.pop();if(i&&i.length===4){let[l,g,,r]=i;l&&typeof l=="object"&&r&&Object.defineProperty(l,g,r)}else if(i){let[l,g,r]=i;l&&typeof l=="object"&&(typeof g=="string"||typeof g=="number")&&(l[g]=r)}}}}var pe=e=>typeof e>"u",ge=e=>typeof e!="object"||e===null||e===Object.prototype?false:Object.getPrototypeOf(e)===null?true:Object.getPrototypeOf(e)===Object.prototype,D=e=>Array.isArray(e),ye=e=>typeof e=="boolean"||e===null||typeof e>"u"||typeof e=="number"||typeof e=="string"||typeof e=="symbol",he=e=>e instanceof Date&&!isNaN(e.valueOf()),J=e=>e instanceof Error,me=e=>e instanceof RegExp,Y=e=>e instanceof Set,K=e=>e instanceof Map,be=e=>typeof e=="bigint",X=e=>typeof e=="number"&&isNaN(e),Se=e=>e===1/0||e===-1/0,we=e=>e===0&&1/e===-1/0,xe=e=>e instanceof URL,Ce=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),Ae={Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray},q=[{isApplicable:pe,annotation:"undefined",transform:()=>null,untransform:()=>{}},{isApplicable:be,annotation:"bigint",transform:e=>e.toString(),untransform:e=>typeof BigInt<"u"?BigInt(e):(console.error("BigInt is not supported in this environment"),e)},{isApplicable:he,annotation:"Date",transform:e=>e.toISOString(),untransform:e=>new Date(e)},{isApplicable:J,annotation:"Error",transform:e=>({name:e.name,message:e.message,stack:e.stack,cause:"cause"in e?e.cause:void 0}),untransform:e=>{let t=new Error(e.message);return t.name=e.name,t.stack=e.stack,e.cause!==void 0&&(t.cause=e.cause),t}},{isApplicable:me,annotation:"regexp",transform:e=>""+e,untransform:e=>{let t=e.slice(1,e.lastIndexOf("/")),o=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,o)}},{isApplicable:Y,annotation:"set",transform:e=>[...e.values()],untransform:e=>new Set(e)},{isApplicable:K,annotation:"map",transform:e=>[...e.entries()],untransform:e=>new Map(e)},{isApplicable:e=>X(e)||Se(e),annotation:"number",transform:e=>X(e)?"NaN":e>0?"Infinity":"-Infinity",untransform:e=>Number(e)},{isApplicable:we,annotation:"number",transform:()=>"-0",untransform:()=>-0},{isApplicable:xe,annotation:"URL",transform:e=>e.toString(),untransform:e=>new URL(e)},{isApplicable:Ce,annotation:e=>["typed-array",e.constructor.name],transform:e=>[...e],untransform:(e,t)=>{let o=Array.isArray(t)?t[1]:"Uint8Array",s=Ae[o];if(!s)throw new Error(`Unknown typed array: ${o}`);return new s(e)}}];function j(e){for(let t of q)if(t.isApplicable(e)){let o=typeof t.annotation=="function"?t.annotation(e):t.annotation;return{value:t.transform(e),type:o}}}function Q(e,t){for(let o of q){let s=typeof o.annotation=="function"?Array.isArray(t)?t[0]:t:o.annotation;if(Array.isArray(t)&&Array.isArray(s)?t[0]===s[0]:s===t)return o.untransform(e,t)}throw new Error(`Unknown transformation: ${t}`)}var Z=e=>ge(e)||D(e)||K(e)||Y(e)||J(e);function V(e){return e.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function ee(e,t=[],o=[]){let s=ye(e);if(!s&&!Z(e)){let i=j(e);return i?{transformedValue:i.value,annotations:{[t.map(String).map(V).join(".")]:i.type}}:{transformedValue:e}}if(!s&&o.indexOf(e)!==-1)return{transformedValue:null};if(!Z(e)){let i=j(e);return i?{transformedValue:i.value,annotations:t.length>0?{[t.map(String).map(V).join(".")]:i.type}:{"":i.type}}:{transformedValue:e}}let p=j(e),d=p?.value??e,a=D(d)?[]:{},m={};if(p){let i=t.length>0?t.map(String).map(V).join("."):"";m[i]=p.type}let C=D(d)?d.map((i,l)=>[l,i]):Object.entries(d);for(let[i,l]of C){let g=String(i);if(g==="__proto__"||g==="constructor"||g==="prototype")throw new Error(`Detected property ${g}. This is a prototype pollution risk, please remove it from your object.`);let r=ee(l,[...t,i],[...o,e]);a[i]=r.transformedValue,r.annotations&&Object.assign(m,r.annotations)}return{transformedValue:a,annotations:Object.keys(m).length>0?m:void 0}}function ve(e){if(e==="")return[];let t=[],o="";for(let s=0;s<e.length;s++){let p=e.charAt(s);if(p==="\\"){let d=e.charAt(s+1);if(d==="\\"){o+="\\",s++;continue}else if(d==="."){o+=".",s++;continue}}if(p==="."){t.push(o),o="";continue}o+=p}return o&&t.push(o),t}function Ie(e,t,o){if(t.length===0)return;let s=e;for(let p=0;p<t.length-1;p++)s=s[t[p]];s[t[t.length-1]]=o}function Re(e,t){let o=e;for(let s of t)o=o[s];return o}function te(e){let t=ee(e),o={json:t.transformedValue};return t.annotations&&(o.meta={values:t.annotations}),o}function re(e){let{json:t,meta:o}=e;if(!o?.values)return t;let s=D(t)?[...t]:{...t},p=Object.entries(o.values).map(([d,a])=>({pathString:d,type:a,path:ve(d)})).sort((d,a)=>a.path.length-d.path.length);for(let{type:d,path:a}of p)if(a.length===0)s=Q(s,d);else{let m=Re(s,a),C=Q(m,d);Ie(s,a,C)}return s}var Te=(e,t=false)=>{let{json:o}=te(e);return JSON.stringify(o,null,t?2:void 0)},Oe=e=>{try{let t=JSON.parse(e);return re({json:t,meta:void 0})}catch{return JSON.parse(e)}};import{jsx as N,jsxs as L}from"react/jsx-runtime";function ke({icon:e,iconColor:t,title:o,count:s,subtitle:p,expanded:d,onToggle:a,children:m,style:C,titleStyle:i}){return L(c,{style:[F.container,C],children:[L(G,{onPress:a,activeOpacity:.7,style:F.headerTouchable,children:[L(c,{style:F.header,children:[L(c,{style:F.headerLeft,children:[N(e,{size:14,color:t}),N(f,{style:[F.title,i],children:o}),N(c,{style:[F.badge,{backgroundColor:t+"20"}],children:N(f,{style:[F.badgeText,{color:t}],children:s})})]}),d?N($,{size:14,color:n.muted}):N(M,{size:14,color:n.muted})]}),N(f,{style:F.subtitle,children:p})]}),d&&N(O.View,{style:{opacity:1},children:m})]})}var F=z.create({container:{marginBottom:20},headerTouchable:{marginBottom:12},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:4,paddingHorizontal:4},headerLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1},title:{fontSize:11,color:n.primary,fontFamily:y,fontWeight:"700",letterSpacing:2,opacity:.9},subtitle:{fontSize:9,color:n.secondary,fontFamily:y,paddingHorizontal:4,marginTop:2,opacity:.7},badge:{paddingHorizontal:8,paddingVertical:2,borderRadius:10},badgeText:{fontSize:10,fontFamily:y,fontWeight:"700"}});var oe={position:"absolute",top:0,left:0,right:0,bottom:0};import{jsx as k,jsxs as W}from"react/jsx-runtime";function Ne({alertConfig:e,badgeText:t,animatedStyle:o,style:s,indicatorCount:p=3}){let d=e.icon;return W(O.View,{style:[R.container,{borderColor:e.color+"40"},s,o],children:[k(c,{style:[R.glow,{backgroundColor:e.color+"10"}]}),W(c,{style:R.content,children:[k(c,{style:[R.iconWrapper,{backgroundColor:e.color+"15"}],children:k(d,{size:20,color:e.color})}),W(c,{style:R.textContainer,children:[k(f,{style:[R.label,{color:e.color}],children:e.label}),k(f,{style:R.subtitle,children:e.subtitle})]}),k(c,{style:[R.badge,{backgroundColor:e.color+"20"}],children:k(f,{style:[R.badgeText,{color:e.color}],children:t})})]}),k(c,{style:R.indicators,children:[...Array(p)].map((a,m)=>k(c,{style:[R.indicatorDot,{backgroundColor:e.color,opacity:e.pulse?m===0?1:.5-m*.2:.3-m*.1}]},m))})]})}var R=z.create({container:{backgroundColor:n.panel,borderRadius:12,borderWidth:1,padding:16,marginBottom:16,position:"relative",overflow:"hidden"},glow:{...oe,opacity:.5},content:{flexDirection:"row",alignItems:"center",gap:12},iconWrapper:{width:36,height:36,borderRadius:8,justifyContent:"center",alignItems:"center"},textContainer:{flex:1,gap:2},label:{fontSize:13,fontWeight:"700",fontFamily:y,letterSpacing:1.5,textShadowOffset:{width:0,height:0},textShadowRadius:8},subtitle:{fontSize:10,color:n.secondary,fontFamily:y},badge:{paddingHorizontal:8,paddingVertical:4,borderRadius:4},badgeText:{fontSize:9,fontWeight:"700",fontFamily:y,letterSpacing:1},indicators:{position:"absolute",top:8,right:8,flexDirection:"row",gap:3},indicatorDot:{width:4,height:4,borderRadius:2}});import{Fragment as Fe}from"react";import{jsx as b,jsxs as x}from"react/jsx-runtime";function Be({statsConfig:e,totalCount:t,header:o,bottomStats:s,style:p,hideInactive:d=true}){return x(c,{style:[u.container,p],children:[o&&x(c,{style:u.header,children:[x(c,{style:u.headerLeft,children:[b(f,{style:u.headerTitle,children:o.title}),b(f,{style:u.headerSubtitle,children:o.subtitle})]}),o.healthPercentage!==void 0&&b(c,{style:u.headerRight,children:x(c,{style:u.statusIndicator,children:[b(c,{style:[u.statusDot,{backgroundColor:o.healthColor||n.success}]}),b(f,{style:[u.statusText,{color:o.healthColor||n.success}],children:o.healthStatus||"OPTIMAL"})]})})]}),o?.healthPercentage!==void 0&&x(c,{style:u.healthSection,children:[b(f,{style:u.healthLabel,children:"SYSTEM HEALTH"}),b(c,{style:u.healthBarWrapper,children:b(c,{style:u.healthBarBg,children:b(O.View,{style:[u.healthBarFill,{width:`${o.healthPercentage}%`,backgroundColor:o.healthColor||n.success}]})})}),x(f,{style:[u.healthPercentage,{color:o.healthColor||n.success}],children:[o.healthPercentage,"%"]})]}),b(c,{style:u.statsGrid,children:e.map(a=>{let m=a.value>0;if(d&&!m)return null;let C=a.icon,i=t?a.value/t*100:0;return x(O.View,{style:[u.statCard,{borderColor:a.color+"30"}],children:[x(c,{style:u.cardContent,children:[b(c,{style:[u.iconBadge,{backgroundColor:a.color+"1A",borderColor:a.color+"33"}],children:b(C,{size:12,color:a.color})}),x(c,{style:u.cardInfo,children:[b(f,{style:u.cardLabel,children:a.label}),b(f,{style:u.cardSubtitle,children:a.subtitle})]}),x(c,{style:u.valueBlock,children:[b(f,{style:[u.statNumber,{color:a.color}],children:a.value.toString().padStart(2,"0")}),t?x(f,{style:u.percentText,children:[Math.round(i),"%"]}):null]})]}),a.showBar!==false&&t&&b(c,{style:[u.statBar,{backgroundColor:a.color+"10"}],children:b(c,{style:[u.statBarFill,{width:`${i}%`,backgroundColor:a.color}]})})]},a.key)})}),s&&s.length>0&&b(c,{style:u.bottomBar,children:s.map((a,m)=>x(Fe,{children:[x(c,{style:u.bottomStat,children:[b(f,{style:u.bottomStatLabel,children:a.label}),b(f,{style:[u.bottomStatValue,a.color&&{color:a.color}],children:a.value})]}),m<s.length-1&&b(c,{style:u.bottomDivider})]},a.label))})]})}var u=z.create({container:{backgroundColor:n.panel,borderRadius:12,padding:12,marginBottom:12,borderWidth:1,borderColor:n.border+"40",overflow:"hidden",position:"relative"},header:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8,paddingBottom:8,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.1)"},headerLeft:{gap:1},headerRight:{alignItems:"flex-end"},headerTitle:{fontSize:11,fontWeight:"700",color:n.primary,fontFamily:y,letterSpacing:1.5},headerSubtitle:{fontSize:8,color:n.secondary,fontFamily:y,opacity:.7},statusIndicator:{flexDirection:"row",alignItems:"center",gap:4},statusDot:{width:5,height:5,borderRadius:2.5},statusText:{fontSize:9,fontWeight:"600",fontFamily:y,letterSpacing:.5},healthSection:{flexDirection:"row",alignItems:"center",marginBottom:10,gap:8},healthLabel:{fontSize:8,color:n.secondary,fontFamily:y,letterSpacing:.5},healthBarWrapper:{flex:1},healthBarBg:{height:4,backgroundColor:"rgba(128, 128, 128, 0.1)",borderRadius:2,overflow:"hidden"},healthBarFill:{height:"100%",borderRadius:2},healthPercentage:{fontSize:11,fontWeight:"700",fontFamily:y},statsGrid:{gap:6,marginBottom:8},statCard:{backgroundColor:n.blackTint2,borderRadius:8,borderWidth:1,borderColor:n.border,padding:10,marginBottom:4},cardContent:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:4},cardInfo:{flex:1},cardLabel:{fontSize:11,fontWeight:"700",fontFamily:y,letterSpacing:.5,color:n.primary},cardSubtitle:{fontSize:8,color:n.secondary,fontFamily:y,opacity:.7},statNumber:{fontSize:16,fontWeight:"700",fontFamily:y,minWidth:28},valueBlock:{alignItems:"flex-end"},percentText:{fontSize:9,color:n.secondary,fontFamily:y},statBar:{height:3,borderRadius:1.5,overflow:"hidden"},statBarFill:{height:"100%",borderRadius:1.5},bottomBar:{flexDirection:"row",alignItems:"center",paddingTop:8,borderTopWidth:1,borderTopColor:n.border+"40"},bottomStat:{flex:1,alignItems:"center"},bottomStatLabel:{fontSize:7,color:n.muted,fontFamily:y,letterSpacing:.5,marginBottom:1},bottomStatValue:{fontSize:11,fontWeight:"700",color:n.primary,fontFamily:y},bottomDivider:{width:1,height:16,backgroundColor:n.border+"40"},iconBadge:{width:24,height:24,borderRadius:6,borderWidth:1,alignItems:"center",justifyContent:"center"}});import{useState as ze,useCallback as De}from"react";import{jsx as S,jsxs as T}from"react/jsx-runtime";function Le({issues:e,onIssueClick:t,hintText:o="Tap any issue to view details",style:s,expandable:p=true,statusLabels:d={missing:"Not found",wrong_type:"Type error",wrong_value:"Invalid value"}}){let[a,m]=ze(new Set),C=De(r=>{p&&m(w=>{let A=new Set(w);return A.has(r)?A.delete(r):A.add(r),A})},[p]),i=r=>r==="missing"?n.warning:n.info,l=r=>r==="missing"?_:P,g=r=>{switch(r.status){case"missing":return`\u2022 ${d.missing}`;case"wrong_type":return`\u2022 ${d.wrong_type}${r.expectedType?`: Expected ${r.expectedType}`:""}`;case"wrong_value":return`\u2022 ${d.wrong_value}${r.value?`: ${String(r.value).substring(0,20)}`:""}`;default:return""}};return e.length===0?null:T(c,{style:[h.container,s],children:[e.map((r,w)=>{let A=i(r.status),v=l(r.status),I=a.has(r.key),B=I?$:M;return T(c,{children:[T(G,{onPress:()=>{p&&C(r.key),t?.(r)},style:h.issueRow,activeOpacity:.7,children:[S(v,{size:14,color:A}),T(c,{style:h.issueContent,children:[S(f,{style:[h.issueKey,{color:n.primary}],children:r.key}),S(f,{style:h.issueDesc,children:g(r)})]}),p&&S(B,{size:12,color:n.muted})]}),p&&I&&T(O.View,{style:h.issueDetails,children:[T(c,{style:h.detailRow,children:[S(f,{style:h.detailLabel,children:"Status:"}),T(f,{style:[h.detailValue,{color:n.primary,fontWeight:"600"}],children:[r.status==="missing"&&"MISSING",r.status==="wrong_type"&&"TYPE ERROR",r.status==="wrong_value"&&"INVALID VALUE"]})]}),r.value!==void 0&&r.status!=="missing"&&T(c,{style:h.detailRow,children:[S(f,{style:h.detailLabel,children:"Current:"}),S(f,{style:[h.detailValue,{color:n.warning}],children:`"${String(r.value)}"`})]}),r.expectedType&&r.status==="wrong_type"&&T(c,{style:h.detailRow,children:[S(f,{style:h.detailLabel,children:"Expected:"}),S(f,{style:[h.detailValue,{color:n.success}],children:r.expectedType})]}),r.expectedValue&&r.status==="wrong_value"&&T(c,{style:h.detailRow,children:[S(f,{style:h.detailLabel,children:"Expected:"}),S(f,{style:[h.detailValue,{color:n.success}],children:`"${r.expectedValue}"`})]}),r.description&&S(c,{style:h.descSection,children:S(f,{style:h.descText,children:r.description})}),r.fixSuggestion&&T(c,{style:h.fixSection,children:[S(f,{style:h.fixLabel,children:"HOW TO FIX"}),S(f,{style:h.fixText,children:r.fixSuggestion})]})]})]},`${r.key}-${w}`)}),o&&S(f,{style:h.hint,children:o})]})}var h=z.create({container:{backgroundColor:n.panel,borderRadius:8,padding:8,borderWidth:1,borderColor:n.warning+"33"},issueRow:{flexDirection:"row",alignItems:"center",paddingVertical:8,paddingHorizontal:8,borderRadius:6,marginBottom:4},issueContent:{flex:1,marginLeft:8,flexDirection:"row",alignItems:"center",gap:8},issueKey:{fontSize:11,fontWeight:"600",fontFamily:y},issueDesc:{fontSize:10,color:n.secondary,fontFamily:y,flex:1},hint:{fontSize:9,color:n.muted,fontFamily:y,textAlign:"center",marginTop:8,paddingTop:8,borderTopWidth:1,borderTopColor:n.primary+"0D"},issueDetails:{marginTop:8,marginLeft:22,marginRight:8,paddingLeft:12,paddingRight:8,paddingTop:8,paddingBottom:8,backgroundColor:n.background+"4D",borderLeftWidth:2,borderLeftColor:n.primary+"1A",borderRadius:4},detailRow:{flexDirection:"row",marginTop:8,alignItems:"flex-start"},detailLabel:{fontSize:10,color:n.secondary,fontFamily:y,fontWeight:"600",width:70},detailValue:{fontSize:11,color:n.primary,fontFamily:y,flex:1,lineHeight:16},fixSection:{marginTop:12,padding:10,backgroundColor:n.info+"14",borderRadius:6,borderWidth:1,borderColor:n.info+"33"},fixLabel:{fontSize:10,color:n.info,fontFamily:y,fontWeight:"700",marginBottom:6,letterSpacing:.5},fixText:{fontSize:11,color:n.primary,fontFamily:y,lineHeight:18,backgroundColor:n.background+"66",padding:8,borderRadius:4,overflow:"hidden"},descSection:{marginTop:10,paddingTop:10,borderTopWidth:1,borderTopColor:n.primary+"0D"},descText:{fontSize:10,color:n.secondary,fontFamily:y,marginTop:4,lineHeight:14}});import{useMemo as ne,useEffect as je,useRef as ie}from"react";var ae={OPTIMAL:{icon:de,color:n.success,label:"CONFIG OK",subtitle:"All requirements met",pulse:false},WARNING:{icon:P,color:n.warning,label:"CONFIG WARNING",subtitle:"Check values and types",pulse:false},ERROR:{icon:se,color:n.error,label:"CONFIG ERROR",subtitle:"Missing required data",pulse:false},CRITICAL:{icon:_,color:n.critical,label:"CONFIG FAILURE",subtitle:"Multiple critical issues",pulse:false},LOADING:{icon:le,color:n.info,label:"LOADING",subtitle:"Reading configuration...",pulse:true},EMPTY:{icon:ce,color:n.muted,label:"NO DATA",subtitle:"No configuration found",pulse:false}};function Ve(e,t){let o=ne(()=>({...ae,...t}),[t]),s=ne(()=>e.totalCount===0?"EMPTY":e.missingCount>2||e.wrongTypeCount>2?"CRITICAL":e.missingCount>0?"ERROR":e.wrongValueCount>0||e.wrongTypeCount>0?"WARNING":"OPTIMAL",[e]),p=o[s],d=ie(new O.Value(1)).current,a=ie(new O.Value(1)).current;return je(()=>{d.setValue(0),a.setValue(.95),O.parallel([O.timing(d,{toValue:1,duration:300,useNativeDriver:true}),O.timing(a,{toValue:1,duration:300,easing:U.out(U.ease),useNativeDriver:true})]).start()},[s,d,a]),{alertState:s,alertConfig:p,alertAnimatedStyle:{transform:[{scale:a}],opacity:d},alertOpacity:d,alertScale:a}}export{fe as a,te as b,re as c,Te as d,Oe as e,ke as f,oe as g,Ne as h,Be as i,Le as j,ae as k,Ve as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{night as k}from"./chunk-XRNB2MHO.mjs";var J=-40;var Q=20;var Z=10;function ee(){return window.innerHeight/2}function te(){const e=130;return ee()-e}function ne(){const e=te();const n=e+J;const i=n-Q;return i-Z}import{useState as ie,useRef as S,useCallback as F,useEffect as w,useMemo as oe,Children as re}from"react";import{useFloatingTools as he,FloatingToolsProvider as be,useFloatingToolsContext as we,interleaveWithDividers as ve,floatingToolsColors as p,withAlpha as P,getUserStatusConfig as ye,getGripIconLayout as xe,interpolatePosition as Se,easing as Te,VISIBLE_HANDLE_WIDTH as se,ANIMATION_DURATION as Pe}from"@buoy-gg/floating-tools-react/web/floating";import{jsx as c,jsxs as O}from"react/jsx-runtime";var W={getItem:e=>localStorage.getItem(e),setItem:(e,n)=>localStorage.setItem(e,n)};var ae="#A0A0A0";function Ce({size:e=24,color:n=P(ae,"CC")}){const i=xe(e);return c("div",{style:{width:e,height:e,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},children:[0,1].map(a=>c("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",marginLeft:i.columnGap/2,marginRight:i.columnGap/2},children:[0,1,2].map(f=>c("div",{style:{width:i.dotSize,height:i.dotSize,borderRadius:i.dotSize/2,backgroundColor:n,marginTop:i.rowGap/2,marginBottom:i.rowGap/2}},f))},a))})}function le(){return c("div",{style:{width:1,height:12,backgroundColor:P(p.muted,"66"),flexShrink:0}})}var De={success:p.success,optional:p.optional,muted:p.muted,secondary:ae};function Ie({userRole:e,onPress:n}){const{isDragging:i}=we();const a=ye(e,De);const f=g=>{if(!i&&n){g.stopPropagation();n()}};return O("button",{role:"button","aria-label":`User status: ${a.label}`,onClick:f,style:{display:"flex",flexDirection:"row",alignItems:"center",paddingTop:6,paddingBottom:6,paddingLeft:8,paddingRight:8,flexShrink:0,cursor:n&&!i?"pointer":"default",background:"none",border:"none",margin:0},children:[c("div",{style:{width:6,height:6,borderRadius:3,backgroundColor:a.dotColor,marginRight:4}}),c("span",{style:{fontSize:10,fontWeight:500,color:a.textColor,letterSpacing:.3,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',lineHeight:"normal"},children:a.label})]})}function Re(){const e=S(null);const[n,i]=ie({x:0,y:0});const a=F((f,g,T)=>{if(e.current){cancelAnimationFrame(e.current)}const C=performance.now();const l=v=>{const z=v-C;const D=Math.min(z/Pe,1);const R=Se(f,g,D,Te.easeOutCubic);i(R);if(D<1){e.current=requestAnimationFrame(l)}else{i(g);T?.()}};e.current=requestAnimationFrame(l)},[]);w(()=>{return()=>{if(e.current){cancelAnimationFrame(e.current)}}},[]);return{position:n,setPosition:i,animateTo:a}}var ce=null;function Ae(){return ce}function He({id:e,revealToken:n,variant:i="bubble",dragFromSurface:a=false,accessibilityLabel:f="Drag handle",accessory:g,handleAdornment:T,enablePositionPersistence:C=true,children:l,pushToSide:v=false,suspendPointerEvents:z=false,centerOnboarding:D=false,minimizedStack:R,hasMinimizedStack:X=false}){const y=S(null);const ue=oe(()=>e?{getItem:t=>W.getItem(`@buoy/floating-tool/${e}/${t}`),setItem:(t,r)=>W.setItem(`@buoy/floating-tool/${e}/${t}`,r)}:W,[e]);const{state:o,actions:s,isInitialized:u}=he({screenSize:{width:window.innerWidth,height:window.innerHeight},enablePositionPersistence:C,storage:ue});const{position:x,setPosition:A,animateTo:h}=Re();w(()=>{if(u){A(o.position)}},[u,o.position,A]);w(()=>{if(!e)ce={x:x.x,y:x.y}},[x,e]);w(()=>{if(!u)return;const t=()=>{const m=y.current?.getBoundingClientRect();if(m&&m.width>0&&m.height>0)s.setBubbleSize({width:m.width,height:m.height})};const r=()=>{s.setScreenSize(window.innerWidth,window.innerHeight);t()};t();const b=typeof ResizeObserver!=="undefined"?new ResizeObserver(t):null;if(y.current)b?.observe(y.current);window.addEventListener("resize",r);return()=>{b?.disconnect();window.removeEventListener("resize",r)}},[s,u]);w(()=>{const t=document.createElement("div");t.style.cssText="position:fixed;top:env(safe-area-inset-top);left:env(safe-area-inset-left);visibility:hidden;pointer-events:none";document.body.appendChild(t);const r=t.getBoundingClientRect();document.body.removeChild(t);if(r.top>0||r.left>0){s.setMinPosition({x:Math.max(r.left,10),y:Math.max(r.top,10)})}},[s]);const[N,U]=ie(false);const j=F(t=>{t.stopPropagation();t.preventDefault();U(true);s.handleDragStart({clientX:t.clientX,clientY:t.clientY})},[s]);const L=S(false);const fe=t=>{if(t.button!==0||!(t.target instanceof Element))return;if(t.target.closest('button, a, input, select, textarea, [role="button"], [role="switch"], [role="slider"], [role="checkbox"], [role="radio"], [contenteditable="true"], [data-floating-accessory]'))return;L.current=true;j(t)};const B=F(t=>{const r=s.handleDragMove({clientX:t.clientX,clientY:t.clientY});if(r.isDragging){A(r.position)}},[s,A]);const I=F(t=>{U(false);const r=s.handleDragEnd({clientX:t.clientX,clientY:t.clientY});const b=L.current;L.current=false;if(r.wasTap&&!b){const m=s.toggleHideShow();h(o.position,m.targetPosition,()=>{s.commitPosition(m.targetPosition)})}else if(r.shouldHide){h(o.position,r.position,()=>{s.commitPosition(r.position)})}},[s,h,o.position]);w(()=>{if(N){window.addEventListener("pointermove",B);window.addEventListener("pointerup",I);window.addEventListener("pointercancel",I);return()=>{window.removeEventListener("pointermove",B);window.removeEventListener("pointerup",I);window.removeEventListener("pointercancel",I)}}},[N,B,I]);const H=S(o.position);H.current=o.position;const M=S(o.isHidden);M.current=o.isHidden;const E=S(false);w(()=>{if(!u)return;if(v&&!E.current){if(M.current)return;E.current=true;const{targetPosition:t}=s.forceHide();h(H.current,t,()=>{})}else if(!v&&E.current){E.current=false;if(!M.current)return;const{targetPosition:t}=s.forceShow();const r=y.current?.getBoundingClientRect().width??100;const b={x:Math.max(10,Math.min(t.x,window.innerWidth-r-10)),y:t.y};h(H.current,b,()=>{s.commitPosition(b)})}},[v,u]);w(()=>{if(!D||!u)return;const t=y.current?.getBoundingClientRect().width??100;const r=y.current?.getBoundingClientRect().height??32;const b=ne();const m={x:(window.innerWidth-t)/2,y:window.innerHeight-b-r};h(H.current,m,()=>{})},[D,u]);const q=S(void 0);w(()=>{if(!u||q.current===n)return;q.current=n;if(n!==void 0&&n>0&&o.isHidden){const{targetPosition:t}=s.forceShow();h(o.position,t,()=>s.commitPosition(t))}},[n,u,o.isHidden,o.position,s,h]);const me=oe(()=>i==="strip"?re.toArray(l):ve(re.toArray(l),t=>c(le,{},t)),[l,i]);if(!u){return null}const K=Math.max(0,x.y-8);const V=Math.max(0,window.innerHeight-x.y-o.bubbleSize.height-8);const pe=K>V;return O("div",{ref:y,"data-testid":e??"buoy-floating-tool",role:"toolbar","aria-label":"Floating Tools",onPointerDown:a?fe:void 0,style:{position:"fixed",left:x.x,top:x.y,zIndex:9999,display:"flex",flexDirection:"row",alignItems:"center",backgroundColor:p.panel,borderTopLeftRadius:X?0:6,borderTopRightRadius:6,borderBottomLeftRadius:6,borderBottomRightRadius:6,borderWidth:o.isDragging?2:1,borderTopWidth:o.isDragging?2:X?0:1,borderStyle:"solid",borderColor:o.isDragging?p.dragActive:P(p.muted,"66"),boxShadow:o.isDragging?`0 6px 12px ${P(p.dragActive,.36)}`:"0 4px 8px rgba(0, 0, 0, 0.3)",cursor:a?o.isDragging?"grabbing":"grab":void 0,userSelect:"none",touchAction:"none",pointerEvents:z?"none":"auto",...i==="strip"?{borderRadius:k.radius.card,minHeight:48,backgroundColor:k.color.surface,borderColor:o.isDragging?k.color.accentBorderStrong:k.color.separator,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.24)"}:{}},children:[R&&c("div",{style:{position:"absolute",bottom:"100%",left:-1,width:se,overflow:"visible",zIndex:1001},children:R}),O("div",{role:"button","aria-label":f,"data-testid":e?`${e}-grip`:"buoy-floating-grip",tabIndex:0,onPointerDown:j,onKeyDown:t=>{if(t.key!=="Enter"&&t.key!==" ")return;t.preventDefault();const r=s.toggleHideShow();h(o.position,r.targetPosition,()=>s.commitPosition(r.targetPosition))},style:{touchAction:"none",paddingLeft:6,paddingRight:6,paddingTop:6,paddingBottom:6,backgroundColor:P(p.muted,"1A"),display:"flex",alignItems:"center",justifyContent:"center",width:se,boxSizing:"border-box",borderRight:`1px solid ${P(p.muted,"66")}`,cursor:o.isDragging?"grabbing":"grab",...i==="strip"?{minHeight:48,backgroundColor:"transparent",borderRight:"none",flexDirection:"column"}:{}},children:[c(Ce,{size:i==="strip"?20:12}),T]}),c(be,{value:{isDragging:o.isDragging,isHidden:o.isHidden},children:c("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:6,paddingRight:8},children:me})}),!o.isHidden&&g&&c("div",{"data-floating-accessory":true,style:{position:"absolute",...pe?{bottom:"100%"}:{top:"100%"},left:0,width:"100%",maxHeight:Math.max(K,V),overflowY:"auto",zIndex:1002},children:g})]})}var d=[];var Ee=0;var $=new Set;var G=()=>$.forEach(e=>e());var Y=()=>d;var _=e=>{$.add(e);return()=>{$.delete(e)}};function ke(e){if(!e.id.trim())throw new Error("Floating tools need a non-empty id");const n={...e,revealToken:++Ee};d=d.some(i=>i.id===e.id)?d.map(i=>i.id===e.id?n:i):[...d,n];G()}function de(e){if(!d.some(n=>n.id===e))return;d=d.filter(n=>n.id!==e);G()}function Fe(e,n){if(!e.id.trim())throw new Error("Floating tools need a non-empty id");const i=`@buoy/floating-tool/${e.id}/open`;let a=false;let f=false;let g=d.some(l=>l.id===e.id);let T=Promise.resolve();const C=_(()=>{const l=d.some(v=>v.id===e.id);if(l===g)return;g=l;f=true;T=T.then(()=>n.setItem(i,l?"1":"0")).then(()=>{},()=>{})});void n.getItem(i).then(l=>{if(a||f||g||l!=="1")return;d=[...d,{...e,revealToken:0}];G()}).catch(()=>{});return()=>{a=true;C()}}import{Fragment as ze,useSyncExternalStore as Le}from"react";import{jsx as ge}from"react/jsx-runtime";function Be(){const e=Le(_,Y,Y);return ge("div",{style:{position:"fixed",inset:0,pointerEvents:"none",zIndex:1e4},children:e.map(n=>ge(ze,{children:n.render({id:n.id,revealToken:n.revealToken,dismiss:()=>de(n.id)})},n.id))})}export{J as ARROW_BOTTOM_OFFSET,Q as ARROW_HEIGHT,Z as SPACING_GAP,ee as getScreenCenterY,te as calculateTooltipPosition,ne as calculateTargetPosition,le as Divider,Ie as UserStatus,Ae as getBubbleAnchorPosition,He as FloatingTool,Y as getFloatingTools,_ as subscribeFloatingTools,ke as openFloatingTool,de as dismissFloatingTool,Fe as registerPersistentFloatingTool,Be as FloatingToolHost};
|
|
1
|
+
"use client";import{night as k}from"./chunk-XRNB2MHO.mjs";var J=-40;var Q=20;var Z=10;function ee(){return window.innerHeight/2}function te(){const e=130;return ee()-e}function ne(){const e=te();const n=e+J;const o=n-Q;return o-Z}import{useState as oe,useRef as S,useCallback as F,useEffect as w,useMemo as ie,Children as re}from"react";import{useFloatingTools as he,FloatingToolsProvider as be,useFloatingToolsContext as we,interleaveWithDividers as ve,floatingToolsColors as p,withAlpha as P,getUserStatusConfig as ye,getGripIconLayout as xe,interpolatePosition as Se,easing as Te,VISIBLE_HANDLE_WIDTH as se,ANIMATION_DURATION as Pe}from"@buoy-gg/floating-tools-react/web/floating";import{jsx as c,jsxs as O}from"react/jsx-runtime";var W={getItem:e=>localStorage.getItem(e),setItem:(e,n)=>localStorage.setItem(e,n)};var ae="#A0A0A0";function Ce({size:e=24,color:n=P(ae,"CC")}){const o=xe(e);return c("div",{style:{width:e,height:e,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},children:[0,1].map(a=>c("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",marginLeft:o.columnGap/2,marginRight:o.columnGap/2},children:[0,1,2].map(f=>c("div",{style:{width:o.dotSize,height:o.dotSize,borderRadius:o.dotSize/2,backgroundColor:n,marginTop:o.rowGap/2,marginBottom:o.rowGap/2}},f))},a))})}function le(){return c("div",{style:{width:1,height:12,backgroundColor:P(p.muted,"66"),flexShrink:0}})}var De={success:p.success,optional:p.optional,muted:p.muted,secondary:ae};function Ie({userRole:e,onPress:n}){const{isDragging:o}=we();const a=ye(e,De);const f=g=>{if(!o&&n){g.stopPropagation();n()}};return O("button",{role:"button","aria-label":`User status: ${a.label}`,onClick:f,style:{display:"flex",flexDirection:"row",alignItems:"center",paddingTop:6,paddingBottom:6,paddingLeft:8,paddingRight:8,flexShrink:0,cursor:n&&!o?"pointer":"default",background:"none",border:"none",margin:0},children:[c("div",{style:{width:6,height:6,borderRadius:3,backgroundColor:a.dotColor,marginRight:4}}),c("span",{style:{fontSize:10,fontWeight:500,color:a.textColor,letterSpacing:.3,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',lineHeight:"normal"},children:a.label})]})}function Re(){const e=S(null);const[n,o]=oe({x:0,y:0});const a=F((f,g,T)=>{if(e.current){cancelAnimationFrame(e.current)}const C=performance.now();const l=v=>{const z=v-C;const D=Math.min(z/Pe,1);const R=Se(f,g,D,Te.easeOutCubic);o(R);if(D<1){e.current=requestAnimationFrame(l)}else{o(g);T?.()}};e.current=requestAnimationFrame(l)},[]);w(()=>{return()=>{if(e.current){cancelAnimationFrame(e.current)}}},[]);return{position:n,setPosition:o,animateTo:a}}var ce=null;function Ae(){return ce}function He({id:e,revealToken:n,variant:o="bubble",dragFromSurface:a=false,accessibilityLabel:f="Drag handle",accessory:g,handleAdornment:T,enablePositionPersistence:C=true,children:l,pushToSide:v=false,suspendPointerEvents:z=false,centerOnboarding:D=false,minimizedStack:R,hasMinimizedStack:X=false}){const y=S(null);const ue=ie(()=>e?{getItem:t=>W.getItem(`@buoy/floating-tool/${e}/${t}`),setItem:(t,r)=>W.setItem(`@buoy/floating-tool/${e}/${t}`,r)}:W,[e]);const{state:i,actions:s,isInitialized:u}=he({screenSize:{width:window.innerWidth,height:window.innerHeight},enablePositionPersistence:C,storage:ue});const{position:x,setPosition:A,animateTo:h}=Re();w(()=>{if(u){A(i.position)}},[u,i.position,A]);w(()=>{if(!e)ce={x:x.x,y:x.y}},[x,e]);w(()=>{if(!u)return;const t=()=>{const m=y.current?.getBoundingClientRect();if(m&&m.width>0&&m.height>0)s.setBubbleSize({width:m.width,height:m.height})};const r=()=>{s.setScreenSize(window.innerWidth,window.innerHeight);t()};t();const b=typeof ResizeObserver!=="undefined"?new ResizeObserver(t):null;if(y.current)b?.observe(y.current);window.addEventListener("resize",r);return()=>{b?.disconnect();window.removeEventListener("resize",r)}},[s,u]);w(()=>{const t=document.createElement("div");t.style.cssText="position:fixed;top:env(safe-area-inset-top);left:env(safe-area-inset-left);visibility:hidden;pointer-events:none";document.body.appendChild(t);const r=t.getBoundingClientRect();document.body.removeChild(t);if(r.top>0||r.left>0){s.setMinPosition({x:Math.max(r.left,10),y:Math.max(r.top,10)})}},[s]);const[N,U]=oe(false);const j=F(t=>{t.stopPropagation();t.preventDefault();U(true);s.handleDragStart({clientX:t.clientX,clientY:t.clientY})},[s]);const L=S(false);const fe=t=>{if(t.button!==0||!(t.target instanceof Element))return;if(t.target.closest('button, a, input, select, textarea, [role="button"], [role="switch"], [role="slider"], [role="checkbox"], [role="radio"], [contenteditable="true"], [data-floating-accessory]'))return;L.current=true;j(t)};const B=F(t=>{const r=s.handleDragMove({clientX:t.clientX,clientY:t.clientY});if(r.isDragging){A(r.position)}},[s,A]);const I=F(t=>{U(false);const r=s.handleDragEnd({clientX:t.clientX,clientY:t.clientY});const b=L.current;L.current=false;if(r.wasTap&&!b){const m=s.toggleHideShow();h(i.position,m.targetPosition,()=>{s.commitPosition(m.targetPosition)})}else if(r.shouldHide){h(i.position,r.position,()=>{s.commitPosition(r.position)})}},[s,h,i.position]);w(()=>{if(N){window.addEventListener("pointermove",B);window.addEventListener("pointerup",I);window.addEventListener("pointercancel",I);return()=>{window.removeEventListener("pointermove",B);window.removeEventListener("pointerup",I);window.removeEventListener("pointercancel",I)}}},[N,B,I]);const H=S(i.position);H.current=i.position;const M=S(i.isHidden);M.current=i.isHidden;const E=S(false);w(()=>{if(!u)return;if(v&&!E.current){if(M.current)return;E.current=true;const{targetPosition:t}=s.forceHide();h(H.current,t,()=>{})}else if(!v&&E.current){E.current=false;if(!M.current)return;const{targetPosition:t}=s.forceShow();const r=y.current?.getBoundingClientRect().width??100;const b={x:Math.max(10,Math.min(t.x,window.innerWidth-r-10)),y:t.y};h(H.current,b,()=>{s.commitPosition(b)})}},[v,u]);w(()=>{if(!D||!u)return;const t=y.current?.getBoundingClientRect().width??100;const r=y.current?.getBoundingClientRect().height??32;const b=ne();const m={x:(window.innerWidth-t)/2,y:window.innerHeight-b-r};h(H.current,m,()=>{})},[D,u]);const q=S(void 0);w(()=>{if(!u||q.current===n)return;q.current=n;if(n!==void 0&&n>0&&i.isHidden){const{targetPosition:t}=s.forceShow();h(i.position,t,()=>s.commitPosition(t))}},[n,u,i.isHidden,i.position,s,h]);const me=ie(()=>o==="strip"?re.toArray(l):ve(re.toArray(l),t=>c(le,{},t)),[l,o]);if(!u){return null}const K=Math.max(0,x.y-8);const V=Math.max(0,window.innerHeight-x.y-i.bubbleSize.height-8);const pe=K>V;return O("div",{ref:y,"data-testid":e??"buoy-floating-tool",role:"toolbar","aria-label":"Floating Tools",onPointerDown:a?fe:void 0,style:{position:"fixed",left:x.x,top:x.y,zIndex:9999,display:"flex",flexDirection:"row",alignItems:"center",backgroundColor:p.panel,borderTopLeftRadius:X?0:6,borderTopRightRadius:6,borderBottomLeftRadius:6,borderBottomRightRadius:6,borderWidth:i.isDragging?2:1,borderTopWidth:i.isDragging?2:X?0:1,borderStyle:"solid",borderColor:i.isDragging?p.dragActive:P(p.muted,"66"),boxShadow:i.isDragging?`0 6px 12px ${P(p.dragActive,.36)}`:"0 4px 8px rgba(0, 0, 0, 0.3)",cursor:a?i.isDragging?"grabbing":"grab":void 0,userSelect:"none",touchAction:"none",pointerEvents:z?"none":"auto",...o==="strip"?{borderRadius:k.radius.card,minHeight:48,backgroundColor:k.color.surface,borderColor:i.isDragging?k.color.accentBorderStrong:k.color.separator,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.24)"}:{}},children:[R&&c("div",{style:{position:"absolute",bottom:"100%",left:-1,width:se,overflow:"visible",zIndex:1001},children:R}),O("div",{role:"button","aria-label":f,"data-testid":e?`${e}-grip`:"buoy-floating-grip",tabIndex:0,onPointerDown:j,onKeyDown:t=>{if(t.key!=="Enter"&&t.key!==" ")return;t.preventDefault();const r=s.toggleHideShow();h(i.position,r.targetPosition,()=>s.commitPosition(r.targetPosition))},style:{touchAction:"none",paddingLeft:6,paddingRight:6,paddingTop:6,paddingBottom:6,backgroundColor:P(p.muted,"1A"),display:"flex",alignItems:"center",justifyContent:"center",width:se,boxSizing:"border-box",borderRight:`1px solid ${P(p.muted,"66")}`,cursor:i.isDragging?"grabbing":"grab",...o==="strip"?{minHeight:48,backgroundColor:"transparent",borderRight:"none",flexDirection:"column"}:{}},children:[c(Ce,{size:o==="strip"?20:12}),T]}),c(be,{value:{isDragging:i.isDragging,isHidden:i.isHidden},children:c("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:6,paddingRight:8},children:me})}),!i.isHidden&&g&&c("div",{"data-floating-accessory":true,style:{position:"absolute",...pe?{bottom:"100%"}:{top:"100%"},left:0,width:"100%",maxHeight:Math.max(K,V),overflowY:"auto",zIndex:1002},children:g})]})}var d=[];var Ee=0;var $=new Set;var G=()=>$.forEach(e=>e());var Y=()=>d;var _=e=>{$.add(e);return()=>{$.delete(e)}};function ke(e){if(!e.id.trim())throw new Error("Floating tools need a non-empty id");const n={...e,revealToken:++Ee};d=d.some(o=>o.id===e.id)?d.map(o=>o.id===e.id?n:o):[...d,n];G()}function de(e){if(!d.some(n=>n.id===e))return;d=d.filter(n=>n.id!==e);G()}function Fe(e,n){if(!e.id.trim())throw new Error("Floating tools need a non-empty id");const o=`@buoy/floating-tool/${e.id}/open`;let a=false;let f=false;let g=d.some(l=>l.id===e.id);let T=Promise.resolve();const C=_(()=>{const l=d.some(v=>v.id===e.id);if(l===g)return;g=l;f=true;T=T.then(()=>n.setItem(o,l?"1":"0")).then(()=>{},()=>{})});void n.getItem(o).then(l=>{if(a||f||g||l!=="1")return;d=[...d,{...e,revealToken:0}];G()}).catch(()=>{});return()=>{a=true;C()}}import{Fragment as ze,useSyncExternalStore as Le}from"react";import{jsx as ge}from"react/jsx-runtime";function Be(){const e=Le(_,Y,Y);return ge("div",{style:{position:"fixed",inset:0,pointerEvents:"none",zIndex:1e4},children:e.map(n=>ge(ze,{children:n.render({id:n.id,revealToken:n.revealToken,dismiss:()=>de(n.id)})},n.id))})}export{J as ARROW_BOTTOM_OFFSET,Q as ARROW_HEIGHT,Z as SPACING_GAP,ee as getScreenCenterY,te as calculateTooltipPosition,ne as calculateTargetPosition,le as Divider,Ie as UserStatus,Ae as getBubbleAnchorPosition,He as FloatingTool,Y as getFloatingTools,_ as subscribeFloatingTools,ke as openFloatingTool,de as dismissFloatingTool,Fe as registerPersistentFloatingTool,Be as FloatingToolHost};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{c as W}from"./chunk-5KWAGM5V.mjs";import{A as Y,G as $,H as r,W as te,p as C,q as m,s as A,u as I,x as R,z as L}from"./chunk-3UTMGIUG.mjs";import{useCallback as ae,useEffect as
|
|
1
|
+
"use client";import{c as W}from"./chunk-5KWAGM5V.mjs";import{A as Y,G as $,H as r,W as te,p as C,q as m,s as A,u as I,x as R,z as L}from"./chunk-3UTMGIUG.mjs";import{useCallback as ae,useEffect as ne,useRef as j,useState as q}from"react";var T=new Map;function se(e){try{return JSON.parse(e)}catch{return}}function ie(e,t,a={}){let[i,l]=q(()=>T.has(e)?T.get(e):t),[y,g]=q(()=>T.has(e)),c=j(e);c.current=e;let d=j(a);d.current=a,ne(()=>{if(T.has(e)){l(T.get(e)),g(true);return}let o=false,S=d.current.storage??W,p=d.current.parse??se;return S.getItem(e).then(h=>{if(!o){if(h!=null){let u;try{u=p(h)}catch{}u!==void 0&&(T.set(e,u),l(u))}g(true)}}).catch(()=>{o||g(true)}),()=>{o=true}},[e]);let v=ae(o=>{l(S=>{let p=typeof o=="function"?o(S):o;T.set(c.current,p);let h=d.current.storage??W,u=d.current.serialize??JSON.stringify;try{h.setItem(c.current,u(p)).catch(()=>{})}catch{}return p})},[]);return[i,v,y]}function re(){T.clear()}import{useCallback as P,useEffect as z,useMemo as le,useState as O}from"react";function oe(e,t={}){let[a,i]=O(()=>e.getAll()),[l,y]=O(()=>t.initialFilter??{}),[g,c]=O(()=>e.getEnabled());z(()=>e.subscribe(i),[e]);let d=t.filterItems,v=le(()=>d?d(a,l):a,[a,l,d]),o=P(()=>{e.clear()},[e]),S=P(()=>{let h=!g;e.setEnabled(h),c(h)},[e,g]),p=P(h=>e.getById(h),[e]);return{items:a,filteredItems:v,filter:l,setFilter:y,isEnabled:g,toggleCapture:S,clear:o,getById:p}}function ce(e,t){let[a,i]=O(e);return z(()=>t(i),[t]),a}import{useCallback as de,useEffect as ue,useState as K}from"react";function fe(e,t={}){let{enabled:a=true,maxEvents:i=500,select:l}=t,[y,g]=K([]),[c,d]=K(a);ue(()=>{if(!a){d(false);return}let o=null,S=null,p=e.subscribeToEvents(h=>{S=h,o==null&&(o=requestAnimationFrame(()=>{if(o=null,!S)return;let u=S;S=null,l&&(u=l(u)),u.length>i&&(u=u.slice(0,i)),g(u)}))});return d(true),()=>{p(),o!=null&&cancelAnimationFrame(o)}},[e,a,i,l]);let v=de(()=>{e.clearEvents()},[e]);return{events:y,clearEvents:v,isActive:c}}import{useState as b,useEffect as w,useCallback as ge}from"react";async function U(){let[e,t,a]=await Promise.all([m.isScreenReaderEnabled(),m.isReduceMotionEnabled(),m.isReduceTransparencyEnabled()]),i={isScreenReaderEnabled:e,isReduceMotionEnabled:t,isReduceTransparencyEnabled:a};if(r.OS==="ios"){let[l,y,g,c,d]=await Promise.all([m.isBoldTextEnabled?.()??Promise.resolve(false),m.isGrayscaleEnabled?.()??Promise.resolve(false),m.isInvertColorsEnabled?.()??Promise.resolve(false),m.isDarkerSystemColorsEnabled?.()??Promise.resolve(false),m.prefersCrossFadeTransitions?.()??Promise.resolve(false)]);i.isBoldTextEnabled=l,i.isGrayscaleEnabled=y,i.isInvertColorsEnabled=g,i.isDarkerSystemColorsEnabled=c,i.prefersCrossFadeTransitions=d}if(r.OS==="android"){let l=await m.isHighTextContrastEnabled?.()??false;i.isHighTextContrastEnabled=l}return i}function k(){let e=r.constants,t={os:r.OS,version:r.Version,reactNativeVersion:e.reactNativeVersion,isTesting:r.isTesting??false,isDisableAnimations:e.isDisableAnimations??false};return r.OS==="ios"?{...t,osVersion:e.osVersion,systemName:e.systemName,interfaceIdiom:e.interfaceIdiom,isPad:r.isPad,isTV:r.isTV,isVision:r.isVision??false,isMacCatalyst:r.isMacCatalyst??false,forceTouchAvailable:e.forceTouchAvailable}:r.OS==="android"?{...t,apiLevel:e.Version,release:e.Release,brand:e.Brand,manufacturer:e.Manufacturer,model:e.Model,fingerprint:e.Fingerprint,serial:e.Serial,uiMode:e.uiMode}:t}function M(){let e=R.get("window"),t=R.get("screen"),a={window:{width:e.width,height:e.height,scale:e.scale,fontScale:e.fontScale},screen:{width:t.width,height:t.height,scale:t.scale,fontScale:t.fontScale},pixelRatio:$.get(),fontScale:$.getFontScale(),isLandscape:e.width>e.height,isPortrait:e.height>e.width};if(r.OS==="ios")try{let i=C.DeviceInfo?.getConstants?.();a.isIPhoneNotched=i?.isIPhoneX_deprecated??false}catch{a.isIPhoneNotched=false}if(r.OS==="android")try{let i=C.DeviceInfo?.getConstants?.();a.isEdgeToEdge=i?.isEdgeToEdge??false,a.densityDpi=Math.round(e.scale*160)}catch{}return a}async function X(){return new Promise(e=>{let t=false;r.OS==="ios"?C.StatusBarManager?.getHeight?.(a=>{t||(t=true,e(a?.height??null))})??e(null):r.OS==="android"?(t=true,e(te.currentHeight??null)):(t=true,e(null)),setTimeout(()=>{t||(t=true,e(null))},100)})}function N(){let e={isRTL:L.isRTL,doLeftAndRightSwapInRTL:L.doLeftAndRightSwapInRTL};return r.OS==="android"&&(e.localeIdentifier=L.localeIdentifier),e}function V(){if(r.OS==="ios")try{return{userDefaults:C.SettingsManager?.getConstants?.()?.settings??{}}}catch{return{}}return{}}function B(){let e={};if(r.OS==="android"){let t=r.constants;e.serial=t.Serial,e.fingerprint=t.Fingerprint;try{let a=C.PlatformConstants;a?.getAndroidID&&(e.androidId=a.getAndroidID())}catch{}}return e}function he(e){let t=[e.platform.os,e.platform.version,e.display.window.width,e.display.window.height,e.display.pixelRatio,e.platform.interfaceIdiom??"",e.platform.forceTouchAvailable??false,e.display.isIPhoneNotched??false,e.platform.model??"",e.platform.brand??"",e.platform.manufacturer??"",e.platform.uiMode??""].join("|"),a=0;for(let i=0;i<t.length;i++){let l=t.charCodeAt(i);a=(a<<5)-a+l,a=a&a}return Math.abs(a).toString(16).padStart(8,"0")}function me(){let[e,t]=b(true),[a,i]=b(k()),[l,y]=b(M()),[g,c]=b({isScreenReaderEnabled:false,isReduceMotionEnabled:false,isReduceTransparencyEnabled:false}),[d,v]=b(()=>{let f=A.getColorScheme()??null;return{colorScheme:f,prefersDarkMode:f==="dark"}}),[o,S]=b(N()),[p,h]=b({height:null,isVisible:true}),[u,F]=b({isVisible:false,height:0,animationDuration:0}),[J,_]=b({currentState:I.currentState,isActive:I.currentState==="active"}),[x,Q]=b(B()),[H,Z]=b(V()),[G,ee]=b(Date.now()),D=ge(async()=>{t(true);let[f,n]=await Promise.all([U(),X()]);i(k()),y(M()),c(f);let s=A.getColorScheme()??null;v({colorScheme:s,prefersDarkMode:s==="dark"}),S(N()),h(E=>({...E,height:n})),Q(B()),Z(V()),ee(Date.now()),t(false)},[]);return w(()=>{D()},[D]),w(()=>{let f=R.addEventListener("change",({window:n,screen:s})=>{y(E=>({...E,window:{width:n.width,height:n.height,scale:n.scale,fontScale:n.fontScale},screen:{width:s.width,height:s.height,scale:s.scale,fontScale:s.fontScale},isLandscape:n.width>n.height,isPortrait:n.height>n.width}))});return()=>f.remove()},[]),w(()=>{let f=A.addChangeListener(({colorScheme:n})=>{let s=n??null;v({colorScheme:s,prefersDarkMode:s==="dark"})});return()=>f.remove()},[]),w(()=>{let f=Y.addListener(r.OS==="ios"?"keyboardWillShow":"keyboardDidShow",s=>{F({isVisible:true,height:s.endCoordinates.height,animationDuration:s.duration??0})}),n=Y.addListener(r.OS==="ios"?"keyboardWillHide":"keyboardDidHide",s=>{F({isVisible:false,height:0,animationDuration:s.duration??0})});return()=>{f.remove(),n.remove()}},[]),w(()=>{let f=I.addEventListener("change",n=>{_({currentState:n,isActive:n==="active"})});return()=>f.remove()},[]),w(()=>{let f=[m.addEventListener("screenReaderChanged",n=>{c(s=>({...s,isScreenReaderEnabled:n}))}),m.addEventListener("reduceMotionChanged",n=>{c(s=>({...s,isReduceMotionEnabled:n}))}),m.addEventListener("reduceTransparencyChanged",n=>{c(s=>({...s,isReduceTransparencyEnabled:n}))})];if(r.OS==="ios"){let n=(s,E)=>m.addEventListener(s,E);f.push(n("boldTextChanged",s=>{c(E=>({...E,isBoldTextEnabled:s}))}),n("grayscaleChanged",s=>{c(E=>({...E,isGrayscaleEnabled:s}))}),n("invertColorsChanged",s=>{c(E=>({...E,isInvertColorsEnabled:s}))}))}return()=>{f.forEach(n=>n.remove())}},[]),{platform:a,display:l,accessibility:g,appearance:d,locale:o,statusBar:p,keyboard:u,appState:J,identifiers:x,settings:H,timestamp:G,isLoading:e,refresh:D,generateFingerprint:()=>he({platform:a,display:l,accessibility:g,appearance:d,locale:o,statusBar:p,keyboard:u,appState:J,identifiers:x,settings:H,timestamp:G,isLoading:e})}}async function Se(){let[e,t]=await Promise.all([U(),X()]),a=A.getColorScheme()??null;return{platform:k(),display:M(),accessibility:e,appearance:{colorScheme:a,prefersDarkMode:a==="dark"},locale:N(),statusBar:{height:t,isVisible:true},keyboard:{isVisible:false,height:0,animationDuration:0},appState:{currentState:I.currentState,isActive:I.currentState==="active"},identifiers:B(),settings:V(),timestamp:Date.now(),isLoading:false}}function pe(e){console.log(`
|
|
2
2
|
========================================`),console.log(" DEVICE INFO REPORT"),console.log(`========================================
|
|
3
3
|
`),console.log("--- PLATFORM ---"),console.log(JSON.stringify(e.platform,null,2)),console.log(`
|
|
4
4
|
--- DISPLAY ---`),console.log(JSON.stringify(e.display,null,2)),console.log(`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";var e={base:"@react_buoy",bubble:{root:()=>`${e.base}_bubble`,settings:()=>`${e.bubble.root()}_settings`,userPreferences:()=>`${e.bubble.root()}_user_preferences`,position:()=>`${e.bubble.root()}_position`},modal:{root:()=>`${e.base}_modal`,state:()=>`${e.modal.root()}_state`,position:()=>`${e.modal.root()}_position`,dimensions:()=>`${e.modal.root()}_dimensions`,hintAcknowledged:()=>`${e.modal.root()}_hint_acknowledged`},custom:t=>{let o=`${e.base}_custom_${t}`;return{root:()=>o,modal:()=>`${o}_modal`,settings:()=>`${o}_settings`,key:r=>`${o}_${r}`}},settings:{root:()=>`${e.base}_settings`,theme:()=>`${e.settings.root()}_theme`,preferences:()=>`${e.settings.root()}_preferences`,wifiEnabled:()=>`${e.settings.root()}_wifi_enabled`,global:()=>`${e.settings.root()}_global`,activeTab:()=>`${e.settings.root()}_active_tab`,modalOpen:()=>`${e.settings.root()}_modal_open`},dial:{root:()=>`${e.base}_dial`,isOpen:()=>`${e.dial.root()}_is_open`,usage:()=>`${e.dial.root()}_usage`},clipboard:{root:()=>`${e.base}_clipboard`,hintAcknowledged:()=>`${e.clipboard.root()}_hint_acknowledged`},env:{root:()=>`${e.base}_env`,modal:()=>`${e.env.root()}_modal`,currentEnv:()=>`${e.env.root()}_current`,overrides:()=>`${e.env.root()}_overrides`},sentry:{root:()=>`${e.base}_sentry`,modal:()=>`${e.sentry.root()}_modal`,filters:()=>`${e.sentry.root()}_filters`,preferences:()=>`${e.sentry.root()}_preferences`},storage:{root:()=>`${e.base}_storage`,modal:()=>`${e.storage.root()}_modal`,eventsModal:()=>`${e.storage.root()}_events_modal`,filters:()=>`${e.storage.root()}_filters`,eventFilters:()=>`${e.storage.root()}_event_filters`,keyFilters:()=>`${e.storage.root()}_key_filters`,pinnedKeys:()=>`${e.storage.root()}_pinned_keys`,preferences:()=>`${e.storage.root()}_preferences`,activeTab:()=>`${e.storage.root()}_active_tab`,isMonitoring:()=>`${e.storage.root()}_is_monitoring`,diffViewerMode:()=>`${e.storage.root()}_diff_viewer_mode`},clock:{root:()=>`${e.base}_clock`,state:()=>`${e.clock.root()}_state`},permissions:{root:()=>`${e.base}_permissions`,state:()=>`${e.permissions.root()}_state`},lifecycle:{root:()=>`${e.base}_lifecycle`,state:()=>`${e.lifecycle.root()}_state`},location:{root:()=>`${e.base}_location`,state:()=>`${e.location.root()}_state`},timeMachine:{root:()=>`${e.base}_time_machine`,diffViewerMode:()=>`${e.timeMachine.root()}_diff_viewer_mode`,armedPoint:()=>`${e.timeMachine.root()}_armed_point`,barReloadMode:()=>`${e.timeMachine.root()}_bar_reload_mode`,disabledSources:()=>`${e.timeMachine.root()}_disabled_sources`},scenarios:{root:()=>`${e.base}_scenarios`,modal:()=>`${e.scenarios.root()}_modal`,library:()=>`${e.scenarios.root()}_library`,active:()=>`${e.scenarios.root()}_active`},reactQuery:{root:()=>`${e.base}_rq`,modal:()=>`${e.reactQuery.root()}_modal`,browserModal:()=>`${e.reactQuery.root()}_browser_modal`,mutationModal:()=>`${e.reactQuery.root()}_mutation_modal`,filters:()=>`${e.reactQuery.root()}_filters`,ignoredPatterns:()=>`${e.reactQuery.root()}_ignored_patterns`,includedPatterns:()=>`${e.reactQuery.root()}_included_patterns`,preferences:()=>`${e.reactQuery.root()}_preferences`},network:{root:()=>`${e.base}_network`,modal:()=>`${e.network.root()}_modal`,copyModal:()=>`${e.network.root()}_copy_modal`,filters:()=>`${e.network.root()}_filters`,ignoredDomains:()=>`${e.network.root()}_ignored_domains`,ignoredUrls:()=>`${e.network.root()}_ignored_urls`,preferences:()=>`${e.network.root()}_preferences`,copyOptions:()=>`${e.network.root()}_copy_options`,saved:()=>`${e.network.root()}_saved`,overrides:()=>`${e.network.root()}_overrides`},routeEvents:{root:()=>`${e.base}_route_events`,modal:()=>`${e.routeEvents.root()}_modal`,eventFilters:()=>`${e.routeEvents.root()}_event_filters`,activeTab:()=>`${e.routeEvents.root()}_active_tab`,isMonitoring:()=>`${e.routeEvents.root()}_is_monitoring`,detailView:()=>`${e.routeEvents.root()}_detail_view`,diffViewerMode:()=>`${e.routeEvents.root()}_diff_viewer_mode`},highlightUpdates:{root:()=>`${e.base}_highlight_updates`,modal:()=>`${e.highlightUpdates.root()}_modal`,isTracking:()=>`${e.highlightUpdates.root()}_is_tracking`,filters:()=>`${e.highlightUpdates.root()}_filters`,settings:()=>`${e.highlightUpdates.root()}_settings`,copySettings:()=>`${e.highlightUpdates.root()}_copy_settings`},benchmark:{root:()=>`${e.base}_benchmark`,modal:()=>`${e.benchmark.root()}_modal`,isRecording:()=>`${e.benchmark.root()}_is_recording`,activeTab:()=>`${e.benchmark.root()}_active_tab`,settings:()=>`${e.benchmark.root()}_settings`,selectedReports:()=>`${e.benchmark.root()}_selected_reports`},debugBorders:{root:()=>`${e.base}_debug_borders`,infoModal:()=>`${e.debugBorders.root()}_info_modal`},events:{root:()=>`${e.base}_events`,modal:()=>`${e.events.root()}_modal`,enabledSources:()=>`${e.events.root()}_enabled_sources`,isCapturing:()=>`${e.events.root()}_is_capturing`,pausedAt:()=>`${e.events.root()}_paused_at`,copySettings:()=>`${e.events.root()}_copy_settings`},sync:{root:()=>`${e.base}_sync`,deviceId:()=>`${e.sync.root()}_device_id`}},d=["@devtools","@dev_tools_","@modal_state_","@react_query_browser_modal","@react_query_modal","@react_query_mutation_modal","@sentry_logs_modal","@floating_rn_better_dev_tools_","@floating_tools_","@apphost_","@bubble_settings_","@env_vars_modal","@storage_modal","@floating_@devtools_","dev_last_route"];function c(t){if(!t)return false;if(t.startsWith(e.base)||t.startsWith("buoy-")||t.startsWith("@buoy"))return true;for(let o of d)if(t.startsWith(o))return true;return false}var i=new Set;function $(t){return i.add(t),()=>i.delete(t)}function l(t,o){for(let r of[...i])try{r(t,o)}catch{}}var s=new Map;function a(){try{return typeof window>"u"?null:window.localStorage}catch{return null}}var n={async getItem(t){if(s.has(t))return s.get(t)??null;try{return a()?.getItem(t)??null}catch{return null}},async setItem(t,o){s.set(t,o);try{let r=a();r&&(r.setItem(t,o),s.delete(t))}catch{}l(t,o)},async removeItem(t){s.set(t,null);try{let o=a();o&&(o.removeItem(t),s.delete(t))}catch{}l(t,null)},async getAllKeys(){let t=new Set;try{let o=a();if(o)for(let r=0;r<o.length;r++){let _=o.key(r);_?.startsWith(e.base)&&t.add(_)}}catch{}for(let[o,r]of s)o.startsWith(e.base)&&(r===null?t.delete(o):t.add(o));return[...t]},async multiGet(t){return Promise.all(t.map(async o=>[o,await n.getItem(o)]))},async multiRemove(t){await Promise.all(t.map(o=>n.removeItem(o)))},async clear(){await n.multiRemove(await n.getAllKeys())}};async function m(){return a()!==null}async function u(){return a()?"localstorage":"memory"}export{e as a,c as b,$ as c,n as d,m as e,u as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Ob as le,Pb as se,Q as _,Qb as P,R as ce,Ub as de,Wb as M,Zb as $,ld as y}from"./chunk-IVCT27JB.mjs";import{d as n}from"./chunk-CE5U3CSQ.mjs";import{J as D,a as c,b as f,d as G,r as O,y as U}from"./chunk-3UTMGIUG.mjs";var ue="[Circular]",H="[...]";function fe(e,t,o={}){let{depthLimit:s=Number.MAX_SAFE_INTEGER,edgesLimit:p=Number.MAX_SAFE_INTEGER}=o,d=[];function a(i,l,g,r,w,A){if(A+=1,typeof i=="object"&&i!==null){for(let v=0;v<r.length;v++)if(r[v]===i){m(ue,i,l,w);return}if(A>s){m(H,i,l,w);return}if(g+1>p){m(H,i,l,w);return}if(r.push(i),Array.isArray(i)){let v=i;for(let I=0;I<i.length;I++)a(i[I],I,I,r,v,A)}else if(i instanceof Map||i instanceof Set||i instanceof RegExp||i instanceof Date||i instanceof Error){r.pop();return}else{let v=i,I=Object.keys(v);for(let B=0;B<I.length;B++){let E=I[B];a(v[E],E,B,r,v,A)}}r.pop()}}function m(i,l,g,r){if(!r)return;let w=Object.getOwnPropertyDescriptor(r,g);if(w?.get!==void 0)if(w.configurable)Object.defineProperty(r,g,{value:i}),d.push([r,g,l,w]);else return;else r[g]=i,d.push([r,g,l])}let C=(i,l)=>{if(typeof l=="bigint")return`${l.toString()}n`;if(typeof l=="symbol")return l.toString();if(typeof l>"u")return"undefined";if(typeof l=="function")return`[Function: ${l.name||"anonymous"}]`;if(typeof l=="number"){if(l===1/0)return"Infinity";if(l===-1/0)return"-Infinity";if(Number.isNaN(l))return"NaN"}if(l instanceof Error){let g={name:l.name,message:l.message,stack:l.stack};return Object.getOwnPropertyNames(l).forEach(r=>{if(!["name","message","stack"].includes(r))try{let w=l[r];w!==void 0&&(g[r]=w)}catch{}}),g}if(l instanceof Date)return l.toISOString();if(l instanceof RegExp)return l.toString();if(l instanceof Map)try{return{__type:"Map",entries:Array.from(l.entries()).map(([g,r])=>[String(g),r])}}catch{return{__type:"Map",entries:"[Map iteration failed]"}}if(l instanceof Set)try{return{__type:"Set",values:Array.from(l)}}catch{return{__type:"Set",values:"[Set iteration failed]"}}return l};try{return a(e,"",0,[],null,0),JSON.stringify(e,C,t)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;d.length!==0;){let i=d.pop();if(i&&i.length===4){let[l,g,,r]=i;l&&typeof l=="object"&&r&&Object.defineProperty(l,g,r)}else if(i){let[l,g,r]=i;l&&typeof l=="object"&&(typeof g=="string"||typeof g=="number")&&(l[g]=r)}}}}var pe=e=>typeof e>"u",ge=e=>typeof e!="object"||e===null||e===Object.prototype?false:Object.getPrototypeOf(e)===null?true:Object.getPrototypeOf(e)===Object.prototype,z=e=>Array.isArray(e),ye=e=>typeof e=="boolean"||e===null||typeof e>"u"||typeof e=="number"||typeof e=="string"||typeof e=="symbol",he=e=>e instanceof Date&&!isNaN(e.valueOf()),J=e=>e instanceof Error,me=e=>e instanceof RegExp,Y=e=>e instanceof Set,K=e=>e instanceof Map,be=e=>typeof e=="bigint",X=e=>typeof e=="number"&&isNaN(e),Se=e=>e===1/0||e===-1/0,we=e=>e===0&&1/e===-1/0,xe=e=>e instanceof URL,Ce=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),Ae={Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray},q=[{isApplicable:pe,annotation:"undefined",transform:()=>null,untransform:()=>{}},{isApplicable:be,annotation:"bigint",transform:e=>e.toString(),untransform:e=>typeof BigInt<"u"?BigInt(e):(console.error("BigInt is not supported in this environment"),e)},{isApplicable:he,annotation:"Date",transform:e=>e.toISOString(),untransform:e=>new Date(e)},{isApplicable:J,annotation:"Error",transform:e=>({name:e.name,message:e.message,stack:e.stack,cause:"cause"in e?e.cause:void 0}),untransform:e=>{let t=new Error(e.message);return t.name=e.name,t.stack=e.stack,e.cause!==void 0&&(t.cause=e.cause),t}},{isApplicable:me,annotation:"regexp",transform:e=>""+e,untransform:e=>{let t=e.slice(1,e.lastIndexOf("/")),o=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,o)}},{isApplicable:Y,annotation:"set",transform:e=>[...e.values()],untransform:e=>new Set(e)},{isApplicable:K,annotation:"map",transform:e=>[...e.entries()],untransform:e=>new Map(e)},{isApplicable:e=>X(e)||Se(e),annotation:"number",transform:e=>X(e)?"NaN":e>0?"Infinity":"-Infinity",untransform:e=>Number(e)},{isApplicable:we,annotation:"number",transform:()=>"-0",untransform:()=>-0},{isApplicable:xe,annotation:"URL",transform:e=>e.toString(),untransform:e=>new URL(e)},{isApplicable:Ce,annotation:e=>["typed-array",e.constructor.name],transform:e=>[...e],untransform:(e,t)=>{let o=Array.isArray(t)?t[1]:"Uint8Array",s=Ae[o];if(!s)throw new Error(`Unknown typed array: ${o}`);return new s(e)}}];function j(e){for(let t of q)if(t.isApplicable(e)){let o=typeof t.annotation=="function"?t.annotation(e):t.annotation;return{value:t.transform(e),type:o}}}function Q(e,t){for(let o of q){let s=typeof o.annotation=="function"?Array.isArray(t)?t[0]:t:o.annotation;if(Array.isArray(t)&&Array.isArray(s)?t[0]===s[0]:s===t)return o.untransform(e,t)}throw new Error(`Unknown transformation: ${t}`)}var Z=e=>ge(e)||z(e)||K(e)||Y(e)||J(e);function V(e){return e.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function ee(e,t=[],o=[]){let s=ye(e);if(!s&&!Z(e)){let i=j(e);return i?{transformedValue:i.value,annotations:{[t.map(String).map(V).join(".")]:i.type}}:{transformedValue:e}}if(!s&&o.indexOf(e)!==-1)return{transformedValue:null};if(!Z(e)){let i=j(e);return i?{transformedValue:i.value,annotations:t.length>0?{[t.map(String).map(V).join(".")]:i.type}:{"":i.type}}:{transformedValue:e}}let p=j(e),d=p?.value??e,a=z(d)?[]:{},m={};if(p){let i=t.length>0?t.map(String).map(V).join("."):"";m[i]=p.type}let C=z(d)?d.map((i,l)=>[l,i]):Object.entries(d);for(let[i,l]of C){let g=String(i);if(g==="__proto__"||g==="constructor"||g==="prototype")throw new Error(`Detected property ${g}. This is a prototype pollution risk, please remove it from your object.`);let r=ee(l,[...t,i],[...o,e]);a[i]=r.transformedValue,r.annotations&&Object.assign(m,r.annotations)}return{transformedValue:a,annotations:Object.keys(m).length>0?m:void 0}}function ve(e){if(e==="")return[];let t=[],o="";for(let s=0;s<e.length;s++){let p=e.charAt(s);if(p==="\\"){let d=e.charAt(s+1);if(d==="\\"){o+="\\",s++;continue}else if(d==="."){o+=".",s++;continue}}if(p==="."){t.push(o),o="";continue}o+=p}return o&&t.push(o),t}function Ie(e,t,o){if(t.length===0)return;let s=e;for(let p=0;p<t.length-1;p++)s=s[t[p]];s[t[t.length-1]]=o}function Re(e,t){let o=e;for(let s of t)o=o[s];return o}function te(e){let t=ee(e),o={json:t.transformedValue};return t.annotations&&(o.meta={values:t.annotations}),o}function re(e){let{json:t,meta:o}=e;if(!o?.values)return t;let s=z(t)?[...t]:{...t},p=Object.entries(o.values).map(([d,a])=>({pathString:d,type:a,path:ve(d)})).sort((d,a)=>a.path.length-d.path.length);for(let{type:d,path:a}of p)if(a.length===0)s=Q(s,d);else{let m=Re(s,a),C=Q(m,d);Ie(s,a,C)}return s}var Te=(e,t=false)=>{let{json:o}=te(e);return JSON.stringify(o,null,t?2:void 0)},Oe=e=>{try{let t=JSON.parse(e);return re({json:t,meta:void 0})}catch{return JSON.parse(e)}};import{jsx as N,jsxs as L}from"react/jsx-runtime";function ke({icon:e,iconColor:t,title:o,count:s,subtitle:p,expanded:d,onToggle:a,children:m,style:C,titleStyle:i}){return L(c,{style:[F.container,C],children:[L(G,{onPress:a,activeOpacity:.7,style:F.headerTouchable,children:[L(c,{style:F.header,children:[L(c,{style:F.headerLeft,children:[N(e,{size:14,color:t}),N(f,{style:[F.title,i],children:o}),N(c,{style:[F.badge,{backgroundColor:t+"20"}],children:N(f,{style:[F.badgeText,{color:t}],children:s})})]}),d?N($,{size:14,color:n.muted}):N(M,{size:14,color:n.muted})]}),N(f,{style:F.subtitle,children:p})]}),d&&N(O.View,{style:{opacity:1},children:m})]})}var F=D.create({container:{marginBottom:20},headerTouchable:{marginBottom:12},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:4,paddingHorizontal:4},headerLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1},title:{fontSize:11,color:n.primary,fontFamily:y,fontWeight:"700",letterSpacing:2,opacity:.9},subtitle:{fontSize:9,color:n.secondary,fontFamily:y,paddingHorizontal:4,marginTop:2,opacity:.7},badge:{paddingHorizontal:8,paddingVertical:2,borderRadius:10},badgeText:{fontSize:10,fontFamily:y,fontWeight:"700"}});var oe={position:"absolute",top:0,left:0,right:0,bottom:0};import{jsx as k,jsxs as W}from"react/jsx-runtime";function Ne({alertConfig:e,badgeText:t,animatedStyle:o,style:s,indicatorCount:p=3}){let d=e.icon;return W(O.View,{style:[R.container,{borderColor:e.color+"40"},s,o],children:[k(c,{style:[R.glow,{backgroundColor:e.color+"10"}]}),W(c,{style:R.content,children:[k(c,{style:[R.iconWrapper,{backgroundColor:e.color+"15"}],children:k(d,{size:20,color:e.color})}),W(c,{style:R.textContainer,children:[k(f,{style:[R.label,{color:e.color}],children:e.label}),k(f,{style:R.subtitle,children:e.subtitle})]}),k(c,{style:[R.badge,{backgroundColor:e.color+"20"}],children:k(f,{style:[R.badgeText,{color:e.color}],children:t})})]}),k(c,{style:R.indicators,children:[...Array(p)].map((a,m)=>k(c,{style:[R.indicatorDot,{backgroundColor:e.color,opacity:e.pulse?m===0?1:.5-m*.2:.3-m*.1}]},m))})]})}var R=D.create({container:{backgroundColor:n.panel,borderRadius:12,borderWidth:1,padding:16,marginBottom:16,position:"relative",overflow:"hidden"},glow:{...oe,opacity:.5},content:{flexDirection:"row",alignItems:"center",gap:12},iconWrapper:{width:36,height:36,borderRadius:8,justifyContent:"center",alignItems:"center"},textContainer:{flex:1,gap:2},label:{fontSize:13,fontWeight:"700",fontFamily:y,letterSpacing:1.5,textShadowOffset:{width:0,height:0},textShadowRadius:8},subtitle:{fontSize:10,color:n.secondary,fontFamily:y},badge:{paddingHorizontal:8,paddingVertical:4,borderRadius:4},badgeText:{fontSize:9,fontWeight:"700",fontFamily:y,letterSpacing:1},indicators:{position:"absolute",top:8,right:8,flexDirection:"row",gap:3},indicatorDot:{width:4,height:4,borderRadius:2}});import{Fragment as Fe}from"react";import{jsx as b,jsxs as x}from"react/jsx-runtime";function Be({statsConfig:e,totalCount:t,header:o,bottomStats:s,style:p,hideInactive:d=true}){return x(c,{style:[u.container,p],children:[o&&x(c,{style:u.header,children:[x(c,{style:u.headerLeft,children:[b(f,{style:u.headerTitle,children:o.title}),b(f,{style:u.headerSubtitle,children:o.subtitle})]}),o.healthPercentage!==void 0&&b(c,{style:u.headerRight,children:x(c,{style:u.statusIndicator,children:[b(c,{style:[u.statusDot,{backgroundColor:o.healthColor||n.success}]}),b(f,{style:[u.statusText,{color:o.healthColor||n.success}],children:o.healthStatus||"OPTIMAL"})]})})]}),o?.healthPercentage!==void 0&&x(c,{style:u.healthSection,children:[b(f,{style:u.healthLabel,children:"SYSTEM HEALTH"}),b(c,{style:u.healthBarWrapper,children:b(c,{style:u.healthBarBg,children:b(O.View,{style:[u.healthBarFill,{width:`${o.healthPercentage}%`,backgroundColor:o.healthColor||n.success}]})})}),x(f,{style:[u.healthPercentage,{color:o.healthColor||n.success}],children:[o.healthPercentage,"%"]})]}),b(c,{style:u.statsGrid,children:e.map(a=>{let m=a.value>0;if(d&&!m)return null;let C=a.icon,i=t?a.value/t*100:0;return x(O.View,{style:[u.statCard,{borderColor:a.color+"30"}],children:[x(c,{style:u.cardContent,children:[b(c,{style:[u.iconBadge,{backgroundColor:a.color+"1A",borderColor:a.color+"33"}],children:b(C,{size:12,color:a.color})}),x(c,{style:u.cardInfo,children:[b(f,{style:u.cardLabel,children:a.label}),b(f,{style:u.cardSubtitle,children:a.subtitle})]}),x(c,{style:u.valueBlock,children:[b(f,{style:[u.statNumber,{color:a.color}],children:a.value.toString().padStart(2,"0")}),t?x(f,{style:u.percentText,children:[Math.round(i),"%"]}):null]})]}),a.showBar!==false&&t&&b(c,{style:[u.statBar,{backgroundColor:a.color+"10"}],children:b(c,{style:[u.statBarFill,{width:`${i}%`,backgroundColor:a.color}]})})]},a.key)})}),s&&s.length>0&&b(c,{style:u.bottomBar,children:s.map((a,m)=>x(Fe,{children:[x(c,{style:u.bottomStat,children:[b(f,{style:u.bottomStatLabel,children:a.label}),b(f,{style:[u.bottomStatValue,a.color&&{color:a.color}],children:a.value})]}),m<s.length-1&&b(c,{style:u.bottomDivider})]},a.label))})]})}var u=D.create({container:{backgroundColor:n.panel,borderRadius:12,padding:12,marginBottom:12,borderWidth:1,borderColor:n.border+"40",overflow:"hidden",position:"relative"},header:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8,paddingBottom:8,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.1)"},headerLeft:{gap:1},headerRight:{alignItems:"flex-end"},headerTitle:{fontSize:11,fontWeight:"700",color:n.primary,fontFamily:y,letterSpacing:1.5},headerSubtitle:{fontSize:8,color:n.secondary,fontFamily:y,opacity:.7},statusIndicator:{flexDirection:"row",alignItems:"center",gap:4},statusDot:{width:5,height:5,borderRadius:2.5},statusText:{fontSize:9,fontWeight:"600",fontFamily:y,letterSpacing:.5},healthSection:{flexDirection:"row",alignItems:"center",marginBottom:10,gap:8},healthLabel:{fontSize:8,color:n.secondary,fontFamily:y,letterSpacing:.5},healthBarWrapper:{flex:1},healthBarBg:{height:4,backgroundColor:"rgba(128, 128, 128, 0.1)",borderRadius:2,overflow:"hidden"},healthBarFill:{height:"100%",borderRadius:2},healthPercentage:{fontSize:11,fontWeight:"700",fontFamily:y},statsGrid:{gap:6,marginBottom:8},statCard:{backgroundColor:n.blackTint2,borderRadius:8,borderWidth:1,borderColor:n.border,padding:10,marginBottom:4},cardContent:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:4},cardInfo:{flex:1},cardLabel:{fontSize:11,fontWeight:"700",fontFamily:y,letterSpacing:.5,color:n.primary},cardSubtitle:{fontSize:8,color:n.secondary,fontFamily:y,opacity:.7},statNumber:{fontSize:16,fontWeight:"700",fontFamily:y,minWidth:28},valueBlock:{alignItems:"flex-end"},percentText:{fontSize:9,color:n.secondary,fontFamily:y},statBar:{height:3,borderRadius:1.5,overflow:"hidden"},statBarFill:{height:"100%",borderRadius:1.5},bottomBar:{flexDirection:"row",alignItems:"center",paddingTop:8,borderTopWidth:1,borderTopColor:n.border+"40"},bottomStat:{flex:1,alignItems:"center"},bottomStatLabel:{fontSize:7,color:n.muted,fontFamily:y,letterSpacing:.5,marginBottom:1},bottomStatValue:{fontSize:11,fontWeight:"700",color:n.primary,fontFamily:y},bottomDivider:{width:1,height:16,backgroundColor:n.border+"40"},iconBadge:{width:24,height:24,borderRadius:6,borderWidth:1,alignItems:"center",justifyContent:"center"}});import{useState as De,useCallback as ze}from"react";import{jsx as S,jsxs as T}from"react/jsx-runtime";function Le({issues:e,onIssueClick:t,hintText:o="Tap any issue to view details",style:s,expandable:p=true,statusLabels:d={missing:"Not found",wrong_type:"Type error",wrong_value:"Invalid value"}}){let[a,m]=De(new Set),C=ze(r=>{p&&m(w=>{let A=new Set(w);return A.has(r)?A.delete(r):A.add(r),A})},[p]),i=r=>r==="missing"?n.warning:n.info,l=r=>r==="missing"?_:P,g=r=>{switch(r.status){case"missing":return`\u2022 ${d.missing}`;case"wrong_type":return`\u2022 ${d.wrong_type}${r.expectedType?`: Expected ${r.expectedType}`:""}`;case"wrong_value":return`\u2022 ${d.wrong_value}${r.value?`: ${String(r.value).substring(0,20)}`:""}`;default:return""}};return e.length===0?null:T(c,{style:[h.container,s],children:[e.map((r,w)=>{let A=i(r.status),v=l(r.status),I=a.has(r.key),B=I?$:M;return T(c,{children:[T(G,{onPress:()=>{p&&C(r.key),t?.(r)},style:h.issueRow,activeOpacity:.7,children:[S(v,{size:14,color:A}),T(c,{style:h.issueContent,children:[S(f,{style:[h.issueKey,{color:n.primary}],children:r.key}),S(f,{style:h.issueDesc,children:g(r)})]}),p&&S(B,{size:12,color:n.muted})]}),p&&I&&T(O.View,{style:h.issueDetails,children:[T(c,{style:h.detailRow,children:[S(f,{style:h.detailLabel,children:"Status:"}),T(f,{style:[h.detailValue,{color:n.primary,fontWeight:"600"}],children:[r.status==="missing"&&"MISSING",r.status==="wrong_type"&&"TYPE ERROR",r.status==="wrong_value"&&"INVALID VALUE"]})]}),r.value!==void 0&&r.status!=="missing"&&T(c,{style:h.detailRow,children:[S(f,{style:h.detailLabel,children:"Current:"}),S(f,{style:[h.detailValue,{color:n.warning}],children:`"${String(r.value)}"`})]}),r.expectedType&&r.status==="wrong_type"&&T(c,{style:h.detailRow,children:[S(f,{style:h.detailLabel,children:"Expected:"}),S(f,{style:[h.detailValue,{color:n.success}],children:r.expectedType})]}),r.expectedValue&&r.status==="wrong_value"&&T(c,{style:h.detailRow,children:[S(f,{style:h.detailLabel,children:"Expected:"}),S(f,{style:[h.detailValue,{color:n.success}],children:`"${r.expectedValue}"`})]}),r.description&&S(c,{style:h.descSection,children:S(f,{style:h.descText,children:r.description})}),r.fixSuggestion&&T(c,{style:h.fixSection,children:[S(f,{style:h.fixLabel,children:"HOW TO FIX"}),S(f,{style:h.fixText,children:r.fixSuggestion})]})]})]},`${r.key}-${w}`)}),o&&S(f,{style:h.hint,children:o})]})}var h=D.create({container:{backgroundColor:n.panel,borderRadius:8,padding:8,borderWidth:1,borderColor:n.warning+"33"},issueRow:{flexDirection:"row",alignItems:"center",paddingVertical:8,paddingHorizontal:8,borderRadius:6,marginBottom:4},issueContent:{flex:1,marginLeft:8,flexDirection:"row",alignItems:"center",gap:8},issueKey:{fontSize:11,fontWeight:"600",fontFamily:y},issueDesc:{fontSize:10,color:n.secondary,fontFamily:y,flex:1},hint:{fontSize:9,color:n.muted,fontFamily:y,textAlign:"center",marginTop:8,paddingTop:8,borderTopWidth:1,borderTopColor:n.primary+"0D"},issueDetails:{marginTop:8,marginLeft:22,marginRight:8,paddingLeft:12,paddingRight:8,paddingTop:8,paddingBottom:8,backgroundColor:n.background+"4D",borderLeftWidth:2,borderLeftColor:n.primary+"1A",borderRadius:4},detailRow:{flexDirection:"row",marginTop:8,alignItems:"flex-start"},detailLabel:{fontSize:10,color:n.secondary,fontFamily:y,fontWeight:"600",width:70},detailValue:{fontSize:11,color:n.primary,fontFamily:y,flex:1,lineHeight:16},fixSection:{marginTop:12,padding:10,backgroundColor:n.info+"14",borderRadius:6,borderWidth:1,borderColor:n.info+"33"},fixLabel:{fontSize:10,color:n.info,fontFamily:y,fontWeight:"700",marginBottom:6,letterSpacing:.5},fixText:{fontSize:11,color:n.primary,fontFamily:y,lineHeight:18,backgroundColor:n.background+"66",padding:8,borderRadius:4,overflow:"hidden"},descSection:{marginTop:10,paddingTop:10,borderTopWidth:1,borderTopColor:n.primary+"0D"},descText:{fontSize:10,color:n.secondary,fontFamily:y,marginTop:4,lineHeight:14}});import{useMemo as ne,useEffect as je,useRef as ie}from"react";var ae={OPTIMAL:{icon:de,color:n.success,label:"CONFIG OK",subtitle:"All requirements met",pulse:false},WARNING:{icon:P,color:n.warning,label:"CONFIG WARNING",subtitle:"Check values and types",pulse:false},ERROR:{icon:se,color:n.error,label:"CONFIG ERROR",subtitle:"Missing required data",pulse:false},CRITICAL:{icon:_,color:n.critical,label:"CONFIG FAILURE",subtitle:"Multiple critical issues",pulse:false},LOADING:{icon:le,color:n.info,label:"LOADING",subtitle:"Reading configuration...",pulse:true},EMPTY:{icon:ce,color:n.muted,label:"NO DATA",subtitle:"No configuration found",pulse:false}};function Ve(e,t){let o=ne(()=>({...ae,...t}),[t]),s=ne(()=>e.totalCount===0?"EMPTY":e.missingCount>2||e.wrongTypeCount>2?"CRITICAL":e.missingCount>0?"ERROR":e.wrongValueCount>0||e.wrongTypeCount>0?"WARNING":"OPTIMAL",[e]),p=o[s],d=ie(new O.Value(1)).current,a=ie(new O.Value(1)).current;return je(()=>{d.setValue(0),a.setValue(.95),O.parallel([O.timing(d,{toValue:1,duration:300,useNativeDriver:true}),O.timing(a,{toValue:1,duration:300,easing:U.out(U.ease),useNativeDriver:true})]).start()},[s,d,a]),{alertState:s,alertConfig:p,alertAnimatedStyle:{transform:[{scale:a}],opacity:d},alertOpacity:d,alertScale:a}}export{fe as a,te as b,re as c,Te as d,Oe as e,ke as f,oe as g,Ne as h,Be as i,Le as j,ae as k,Ve as l};
|
|
1
|
+
"use client";import{Ob as le,Pb as se,Q as _,Qb as P,R as ce,Ub as de,Wb as M,Zb as $,ld as y}from"./chunk-IVCT27JB.mjs";import{d as n}from"./chunk-CE5U3CSQ.mjs";import{J as z,a as c,b as f,d as G,r as O,y as U}from"./chunk-3UTMGIUG.mjs";var ue="[Circular]",H="[...]";function fe(e,t,o={}){let{depthLimit:s=Number.MAX_SAFE_INTEGER,edgesLimit:p=Number.MAX_SAFE_INTEGER}=o,d=[];function a(i,l,g,r,w,A){if(A+=1,typeof i=="object"&&i!==null){for(let v=0;v<r.length;v++)if(r[v]===i){m(ue,i,l,w);return}if(A>s){m(H,i,l,w);return}if(g+1>p){m(H,i,l,w);return}if(r.push(i),Array.isArray(i)){let v=i;for(let I=0;I<i.length;I++)a(i[I],I,I,r,v,A)}else if(i instanceof Map||i instanceof Set||i instanceof RegExp||i instanceof Date||i instanceof Error){r.pop();return}else{let v=i,I=Object.keys(v);for(let B=0;B<I.length;B++){let E=I[B];a(v[E],E,B,r,v,A)}}r.pop()}}function m(i,l,g,r){if(!r)return;let w=Object.getOwnPropertyDescriptor(r,g);if(w?.get!==void 0)if(w.configurable)Object.defineProperty(r,g,{value:i}),d.push([r,g,l,w]);else return;else r[g]=i,d.push([r,g,l])}let C=(i,l)=>{if(typeof l=="bigint")return`${l.toString()}n`;if(typeof l=="symbol")return l.toString();if(typeof l>"u")return"undefined";if(typeof l=="function")return`[Function: ${l.name||"anonymous"}]`;if(typeof l=="number"){if(l===1/0)return"Infinity";if(l===-1/0)return"-Infinity";if(Number.isNaN(l))return"NaN"}if(l instanceof Error){let g={name:l.name,message:l.message,stack:l.stack};return Object.getOwnPropertyNames(l).forEach(r=>{if(!["name","message","stack"].includes(r))try{let w=l[r];w!==void 0&&(g[r]=w)}catch{}}),g}if(l instanceof Date)return l.toISOString();if(l instanceof RegExp)return l.toString();if(l instanceof Map)try{return{__type:"Map",entries:Array.from(l.entries()).map(([g,r])=>[String(g),r])}}catch{return{__type:"Map",entries:"[Map iteration failed]"}}if(l instanceof Set)try{return{__type:"Set",values:Array.from(l)}}catch{return{__type:"Set",values:"[Set iteration failed]"}}return l};try{return a(e,"",0,[],null,0),JSON.stringify(e,C,t)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;d.length!==0;){let i=d.pop();if(i&&i.length===4){let[l,g,,r]=i;l&&typeof l=="object"&&r&&Object.defineProperty(l,g,r)}else if(i){let[l,g,r]=i;l&&typeof l=="object"&&(typeof g=="string"||typeof g=="number")&&(l[g]=r)}}}}var pe=e=>typeof e>"u",ge=e=>typeof e!="object"||e===null||e===Object.prototype?false:Object.getPrototypeOf(e)===null?true:Object.getPrototypeOf(e)===Object.prototype,D=e=>Array.isArray(e),ye=e=>typeof e=="boolean"||e===null||typeof e>"u"||typeof e=="number"||typeof e=="string"||typeof e=="symbol",he=e=>e instanceof Date&&!isNaN(e.valueOf()),J=e=>e instanceof Error,me=e=>e instanceof RegExp,Y=e=>e instanceof Set,K=e=>e instanceof Map,be=e=>typeof e=="bigint",X=e=>typeof e=="number"&&isNaN(e),Se=e=>e===1/0||e===-1/0,we=e=>e===0&&1/e===-1/0,xe=e=>e instanceof URL,Ce=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),Ae={Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray},q=[{isApplicable:pe,annotation:"undefined",transform:()=>null,untransform:()=>{}},{isApplicable:be,annotation:"bigint",transform:e=>e.toString(),untransform:e=>typeof BigInt<"u"?BigInt(e):(console.error("BigInt is not supported in this environment"),e)},{isApplicable:he,annotation:"Date",transform:e=>e.toISOString(),untransform:e=>new Date(e)},{isApplicable:J,annotation:"Error",transform:e=>({name:e.name,message:e.message,stack:e.stack,cause:"cause"in e?e.cause:void 0}),untransform:e=>{let t=new Error(e.message);return t.name=e.name,t.stack=e.stack,e.cause!==void 0&&(t.cause=e.cause),t}},{isApplicable:me,annotation:"regexp",transform:e=>""+e,untransform:e=>{let t=e.slice(1,e.lastIndexOf("/")),o=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,o)}},{isApplicable:Y,annotation:"set",transform:e=>[...e.values()],untransform:e=>new Set(e)},{isApplicable:K,annotation:"map",transform:e=>[...e.entries()],untransform:e=>new Map(e)},{isApplicable:e=>X(e)||Se(e),annotation:"number",transform:e=>X(e)?"NaN":e>0?"Infinity":"-Infinity",untransform:e=>Number(e)},{isApplicable:we,annotation:"number",transform:()=>"-0",untransform:()=>-0},{isApplicable:xe,annotation:"URL",transform:e=>e.toString(),untransform:e=>new URL(e)},{isApplicable:Ce,annotation:e=>["typed-array",e.constructor.name],transform:e=>[...e],untransform:(e,t)=>{let o=Array.isArray(t)?t[1]:"Uint8Array",s=Ae[o];if(!s)throw new Error(`Unknown typed array: ${o}`);return new s(e)}}];function j(e){for(let t of q)if(t.isApplicable(e)){let o=typeof t.annotation=="function"?t.annotation(e):t.annotation;return{value:t.transform(e),type:o}}}function Q(e,t){for(let o of q){let s=typeof o.annotation=="function"?Array.isArray(t)?t[0]:t:o.annotation;if(Array.isArray(t)&&Array.isArray(s)?t[0]===s[0]:s===t)return o.untransform(e,t)}throw new Error(`Unknown transformation: ${t}`)}var Z=e=>ge(e)||D(e)||K(e)||Y(e)||J(e);function V(e){return e.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function ee(e,t=[],o=[]){let s=ye(e);if(!s&&!Z(e)){let i=j(e);return i?{transformedValue:i.value,annotations:{[t.map(String).map(V).join(".")]:i.type}}:{transformedValue:e}}if(!s&&o.indexOf(e)!==-1)return{transformedValue:null};if(!Z(e)){let i=j(e);return i?{transformedValue:i.value,annotations:t.length>0?{[t.map(String).map(V).join(".")]:i.type}:{"":i.type}}:{transformedValue:e}}let p=j(e),d=p?.value??e,a=D(d)?[]:{},m={};if(p){let i=t.length>0?t.map(String).map(V).join("."):"";m[i]=p.type}let C=D(d)?d.map((i,l)=>[l,i]):Object.entries(d);for(let[i,l]of C){let g=String(i);if(g==="__proto__"||g==="constructor"||g==="prototype")throw new Error(`Detected property ${g}. This is a prototype pollution risk, please remove it from your object.`);let r=ee(l,[...t,i],[...o,e]);a[i]=r.transformedValue,r.annotations&&Object.assign(m,r.annotations)}return{transformedValue:a,annotations:Object.keys(m).length>0?m:void 0}}function ve(e){if(e==="")return[];let t=[],o="";for(let s=0;s<e.length;s++){let p=e.charAt(s);if(p==="\\"){let d=e.charAt(s+1);if(d==="\\"){o+="\\",s++;continue}else if(d==="."){o+=".",s++;continue}}if(p==="."){t.push(o),o="";continue}o+=p}return o&&t.push(o),t}function Ie(e,t,o){if(t.length===0)return;let s=e;for(let p=0;p<t.length-1;p++)s=s[t[p]];s[t[t.length-1]]=o}function Re(e,t){let o=e;for(let s of t)o=o[s];return o}function te(e){let t=ee(e),o={json:t.transformedValue};return t.annotations&&(o.meta={values:t.annotations}),o}function re(e){let{json:t,meta:o}=e;if(!o?.values)return t;let s=D(t)?[...t]:{...t},p=Object.entries(o.values).map(([d,a])=>({pathString:d,type:a,path:ve(d)})).sort((d,a)=>a.path.length-d.path.length);for(let{type:d,path:a}of p)if(a.length===0)s=Q(s,d);else{let m=Re(s,a),C=Q(m,d);Ie(s,a,C)}return s}var Te=(e,t=false)=>{let{json:o}=te(e);return JSON.stringify(o,null,t?2:void 0)},Oe=e=>{try{let t=JSON.parse(e);return re({json:t,meta:void 0})}catch{return JSON.parse(e)}};import{jsx as N,jsxs as L}from"react/jsx-runtime";function ke({icon:e,iconColor:t,title:o,count:s,subtitle:p,expanded:d,onToggle:a,children:m,style:C,titleStyle:i}){return L(c,{style:[F.container,C],children:[L(G,{onPress:a,activeOpacity:.7,style:F.headerTouchable,children:[L(c,{style:F.header,children:[L(c,{style:F.headerLeft,children:[N(e,{size:14,color:t}),N(f,{style:[F.title,i],children:o}),N(c,{style:[F.badge,{backgroundColor:t+"20"}],children:N(f,{style:[F.badgeText,{color:t}],children:s})})]}),d?N($,{size:14,color:n.muted}):N(M,{size:14,color:n.muted})]}),N(f,{style:F.subtitle,children:p})]}),d&&N(O.View,{style:{opacity:1},children:m})]})}var F=z.create({container:{marginBottom:20},headerTouchable:{marginBottom:12},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:4,paddingHorizontal:4},headerLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1},title:{fontSize:11,color:n.primary,fontFamily:y,fontWeight:"700",letterSpacing:2,opacity:.9},subtitle:{fontSize:9,color:n.secondary,fontFamily:y,paddingHorizontal:4,marginTop:2,opacity:.7},badge:{paddingHorizontal:8,paddingVertical:2,borderRadius:10},badgeText:{fontSize:10,fontFamily:y,fontWeight:"700"}});var oe={position:"absolute",top:0,left:0,right:0,bottom:0};import{jsx as k,jsxs as W}from"react/jsx-runtime";function Ne({alertConfig:e,badgeText:t,animatedStyle:o,style:s,indicatorCount:p=3}){let d=e.icon;return W(O.View,{style:[R.container,{borderColor:e.color+"40"},s,o],children:[k(c,{style:[R.glow,{backgroundColor:e.color+"10"}]}),W(c,{style:R.content,children:[k(c,{style:[R.iconWrapper,{backgroundColor:e.color+"15"}],children:k(d,{size:20,color:e.color})}),W(c,{style:R.textContainer,children:[k(f,{style:[R.label,{color:e.color}],children:e.label}),k(f,{style:R.subtitle,children:e.subtitle})]}),k(c,{style:[R.badge,{backgroundColor:e.color+"20"}],children:k(f,{style:[R.badgeText,{color:e.color}],children:t})})]}),k(c,{style:R.indicators,children:[...Array(p)].map((a,m)=>k(c,{style:[R.indicatorDot,{backgroundColor:e.color,opacity:e.pulse?m===0?1:.5-m*.2:.3-m*.1}]},m))})]})}var R=z.create({container:{backgroundColor:n.panel,borderRadius:12,borderWidth:1,padding:16,marginBottom:16,position:"relative",overflow:"hidden"},glow:{...oe,opacity:.5},content:{flexDirection:"row",alignItems:"center",gap:12},iconWrapper:{width:36,height:36,borderRadius:8,justifyContent:"center",alignItems:"center"},textContainer:{flex:1,gap:2},label:{fontSize:13,fontWeight:"700",fontFamily:y,letterSpacing:1.5,textShadowOffset:{width:0,height:0},textShadowRadius:8},subtitle:{fontSize:10,color:n.secondary,fontFamily:y},badge:{paddingHorizontal:8,paddingVertical:4,borderRadius:4},badgeText:{fontSize:9,fontWeight:"700",fontFamily:y,letterSpacing:1},indicators:{position:"absolute",top:8,right:8,flexDirection:"row",gap:3},indicatorDot:{width:4,height:4,borderRadius:2}});import{Fragment as Fe}from"react";import{jsx as b,jsxs as x}from"react/jsx-runtime";function Be({statsConfig:e,totalCount:t,header:o,bottomStats:s,style:p,hideInactive:d=true}){return x(c,{style:[u.container,p],children:[o&&x(c,{style:u.header,children:[x(c,{style:u.headerLeft,children:[b(f,{style:u.headerTitle,children:o.title}),b(f,{style:u.headerSubtitle,children:o.subtitle})]}),o.healthPercentage!==void 0&&b(c,{style:u.headerRight,children:x(c,{style:u.statusIndicator,children:[b(c,{style:[u.statusDot,{backgroundColor:o.healthColor||n.success}]}),b(f,{style:[u.statusText,{color:o.healthColor||n.success}],children:o.healthStatus||"OPTIMAL"})]})})]}),o?.healthPercentage!==void 0&&x(c,{style:u.healthSection,children:[b(f,{style:u.healthLabel,children:"SYSTEM HEALTH"}),b(c,{style:u.healthBarWrapper,children:b(c,{style:u.healthBarBg,children:b(O.View,{style:[u.healthBarFill,{width:`${o.healthPercentage}%`,backgroundColor:o.healthColor||n.success}]})})}),x(f,{style:[u.healthPercentage,{color:o.healthColor||n.success}],children:[o.healthPercentage,"%"]})]}),b(c,{style:u.statsGrid,children:e.map(a=>{let m=a.value>0;if(d&&!m)return null;let C=a.icon,i=t?a.value/t*100:0;return x(O.View,{style:[u.statCard,{borderColor:a.color+"30"}],children:[x(c,{style:u.cardContent,children:[b(c,{style:[u.iconBadge,{backgroundColor:a.color+"1A",borderColor:a.color+"33"}],children:b(C,{size:12,color:a.color})}),x(c,{style:u.cardInfo,children:[b(f,{style:u.cardLabel,children:a.label}),b(f,{style:u.cardSubtitle,children:a.subtitle})]}),x(c,{style:u.valueBlock,children:[b(f,{style:[u.statNumber,{color:a.color}],children:a.value.toString().padStart(2,"0")}),t?x(f,{style:u.percentText,children:[Math.round(i),"%"]}):null]})]}),a.showBar!==false&&t&&b(c,{style:[u.statBar,{backgroundColor:a.color+"10"}],children:b(c,{style:[u.statBarFill,{width:`${i}%`,backgroundColor:a.color}]})})]},a.key)})}),s&&s.length>0&&b(c,{style:u.bottomBar,children:s.map((a,m)=>x(Fe,{children:[x(c,{style:u.bottomStat,children:[b(f,{style:u.bottomStatLabel,children:a.label}),b(f,{style:[u.bottomStatValue,a.color&&{color:a.color}],children:a.value})]}),m<s.length-1&&b(c,{style:u.bottomDivider})]},a.label))})]})}var u=z.create({container:{backgroundColor:n.panel,borderRadius:12,padding:12,marginBottom:12,borderWidth:1,borderColor:n.border+"40",overflow:"hidden",position:"relative"},header:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8,paddingBottom:8,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.1)"},headerLeft:{gap:1},headerRight:{alignItems:"flex-end"},headerTitle:{fontSize:11,fontWeight:"700",color:n.primary,fontFamily:y,letterSpacing:1.5},headerSubtitle:{fontSize:8,color:n.secondary,fontFamily:y,opacity:.7},statusIndicator:{flexDirection:"row",alignItems:"center",gap:4},statusDot:{width:5,height:5,borderRadius:2.5},statusText:{fontSize:9,fontWeight:"600",fontFamily:y,letterSpacing:.5},healthSection:{flexDirection:"row",alignItems:"center",marginBottom:10,gap:8},healthLabel:{fontSize:8,color:n.secondary,fontFamily:y,letterSpacing:.5},healthBarWrapper:{flex:1},healthBarBg:{height:4,backgroundColor:"rgba(128, 128, 128, 0.1)",borderRadius:2,overflow:"hidden"},healthBarFill:{height:"100%",borderRadius:2},healthPercentage:{fontSize:11,fontWeight:"700",fontFamily:y},statsGrid:{gap:6,marginBottom:8},statCard:{backgroundColor:n.blackTint2,borderRadius:8,borderWidth:1,borderColor:n.border,padding:10,marginBottom:4},cardContent:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:4},cardInfo:{flex:1},cardLabel:{fontSize:11,fontWeight:"700",fontFamily:y,letterSpacing:.5,color:n.primary},cardSubtitle:{fontSize:8,color:n.secondary,fontFamily:y,opacity:.7},statNumber:{fontSize:16,fontWeight:"700",fontFamily:y,minWidth:28},valueBlock:{alignItems:"flex-end"},percentText:{fontSize:9,color:n.secondary,fontFamily:y},statBar:{height:3,borderRadius:1.5,overflow:"hidden"},statBarFill:{height:"100%",borderRadius:1.5},bottomBar:{flexDirection:"row",alignItems:"center",paddingTop:8,borderTopWidth:1,borderTopColor:n.border+"40"},bottomStat:{flex:1,alignItems:"center"},bottomStatLabel:{fontSize:7,color:n.muted,fontFamily:y,letterSpacing:.5,marginBottom:1},bottomStatValue:{fontSize:11,fontWeight:"700",color:n.primary,fontFamily:y},bottomDivider:{width:1,height:16,backgroundColor:n.border+"40"},iconBadge:{width:24,height:24,borderRadius:6,borderWidth:1,alignItems:"center",justifyContent:"center"}});import{useState as ze,useCallback as De}from"react";import{jsx as S,jsxs as T}from"react/jsx-runtime";function Le({issues:e,onIssueClick:t,hintText:o="Tap any issue to view details",style:s,expandable:p=true,statusLabels:d={missing:"Not found",wrong_type:"Type error",wrong_value:"Invalid value"}}){let[a,m]=ze(new Set),C=De(r=>{p&&m(w=>{let A=new Set(w);return A.has(r)?A.delete(r):A.add(r),A})},[p]),i=r=>r==="missing"?n.warning:n.info,l=r=>r==="missing"?_:P,g=r=>{switch(r.status){case"missing":return`\u2022 ${d.missing}`;case"wrong_type":return`\u2022 ${d.wrong_type}${r.expectedType?`: Expected ${r.expectedType}`:""}`;case"wrong_value":return`\u2022 ${d.wrong_value}${r.value?`: ${String(r.value).substring(0,20)}`:""}`;default:return""}};return e.length===0?null:T(c,{style:[h.container,s],children:[e.map((r,w)=>{let A=i(r.status),v=l(r.status),I=a.has(r.key),B=I?$:M;return T(c,{children:[T(G,{onPress:()=>{p&&C(r.key),t?.(r)},style:h.issueRow,activeOpacity:.7,children:[S(v,{size:14,color:A}),T(c,{style:h.issueContent,children:[S(f,{style:[h.issueKey,{color:n.primary}],children:r.key}),S(f,{style:h.issueDesc,children:g(r)})]}),p&&S(B,{size:12,color:n.muted})]}),p&&I&&T(O.View,{style:h.issueDetails,children:[T(c,{style:h.detailRow,children:[S(f,{style:h.detailLabel,children:"Status:"}),T(f,{style:[h.detailValue,{color:n.primary,fontWeight:"600"}],children:[r.status==="missing"&&"MISSING",r.status==="wrong_type"&&"TYPE ERROR",r.status==="wrong_value"&&"INVALID VALUE"]})]}),r.value!==void 0&&r.status!=="missing"&&T(c,{style:h.detailRow,children:[S(f,{style:h.detailLabel,children:"Current:"}),S(f,{style:[h.detailValue,{color:n.warning}],children:`"${String(r.value)}"`})]}),r.expectedType&&r.status==="wrong_type"&&T(c,{style:h.detailRow,children:[S(f,{style:h.detailLabel,children:"Expected:"}),S(f,{style:[h.detailValue,{color:n.success}],children:r.expectedType})]}),r.expectedValue&&r.status==="wrong_value"&&T(c,{style:h.detailRow,children:[S(f,{style:h.detailLabel,children:"Expected:"}),S(f,{style:[h.detailValue,{color:n.success}],children:`"${r.expectedValue}"`})]}),r.description&&S(c,{style:h.descSection,children:S(f,{style:h.descText,children:r.description})}),r.fixSuggestion&&T(c,{style:h.fixSection,children:[S(f,{style:h.fixLabel,children:"HOW TO FIX"}),S(f,{style:h.fixText,children:r.fixSuggestion})]})]})]},`${r.key}-${w}`)}),o&&S(f,{style:h.hint,children:o})]})}var h=z.create({container:{backgroundColor:n.panel,borderRadius:8,padding:8,borderWidth:1,borderColor:n.warning+"33"},issueRow:{flexDirection:"row",alignItems:"center",paddingVertical:8,paddingHorizontal:8,borderRadius:6,marginBottom:4},issueContent:{flex:1,marginLeft:8,flexDirection:"row",alignItems:"center",gap:8},issueKey:{fontSize:11,fontWeight:"600",fontFamily:y},issueDesc:{fontSize:10,color:n.secondary,fontFamily:y,flex:1},hint:{fontSize:9,color:n.muted,fontFamily:y,textAlign:"center",marginTop:8,paddingTop:8,borderTopWidth:1,borderTopColor:n.primary+"0D"},issueDetails:{marginTop:8,marginLeft:22,marginRight:8,paddingLeft:12,paddingRight:8,paddingTop:8,paddingBottom:8,backgroundColor:n.background+"4D",borderLeftWidth:2,borderLeftColor:n.primary+"1A",borderRadius:4},detailRow:{flexDirection:"row",marginTop:8,alignItems:"flex-start"},detailLabel:{fontSize:10,color:n.secondary,fontFamily:y,fontWeight:"600",width:70},detailValue:{fontSize:11,color:n.primary,fontFamily:y,flex:1,lineHeight:16},fixSection:{marginTop:12,padding:10,backgroundColor:n.info+"14",borderRadius:6,borderWidth:1,borderColor:n.info+"33"},fixLabel:{fontSize:10,color:n.info,fontFamily:y,fontWeight:"700",marginBottom:6,letterSpacing:.5},fixText:{fontSize:11,color:n.primary,fontFamily:y,lineHeight:18,backgroundColor:n.background+"66",padding:8,borderRadius:4,overflow:"hidden"},descSection:{marginTop:10,paddingTop:10,borderTopWidth:1,borderTopColor:n.primary+"0D"},descText:{fontSize:10,color:n.secondary,fontFamily:y,marginTop:4,lineHeight:14}});import{useMemo as ne,useEffect as je,useRef as ie}from"react";var ae={OPTIMAL:{icon:de,color:n.success,label:"CONFIG OK",subtitle:"All requirements met",pulse:false},WARNING:{icon:P,color:n.warning,label:"CONFIG WARNING",subtitle:"Check values and types",pulse:false},ERROR:{icon:se,color:n.error,label:"CONFIG ERROR",subtitle:"Missing required data",pulse:false},CRITICAL:{icon:_,color:n.critical,label:"CONFIG FAILURE",subtitle:"Multiple critical issues",pulse:false},LOADING:{icon:le,color:n.info,label:"LOADING",subtitle:"Reading configuration...",pulse:true},EMPTY:{icon:ce,color:n.muted,label:"NO DATA",subtitle:"No configuration found",pulse:false}};function Ve(e,t){let o=ne(()=>({...ae,...t}),[t]),s=ne(()=>e.totalCount===0?"EMPTY":e.missingCount>2||e.wrongTypeCount>2?"CRITICAL":e.missingCount>0?"ERROR":e.wrongValueCount>0||e.wrongTypeCount>0?"WARNING":"OPTIMAL",[e]),p=o[s],d=ie(new O.Value(1)).current,a=ie(new O.Value(1)).current;return je(()=>{d.setValue(0),a.setValue(.95),O.parallel([O.timing(d,{toValue:1,duration:300,useNativeDriver:true}),O.timing(a,{toValue:1,duration:300,easing:U.out(U.ease),useNativeDriver:true})]).start()},[s,d,a]),{alertState:s,alertConfig:p,alertAnimatedStyle:{transform:[{scale:a}],opacity:d},alertOpacity:d,alertScale:a}}export{fe as a,te as b,re as c,Te as d,Oe as e,ke as f,oe as g,Ne as h,Be as i,Le as j,ae as k,Ve as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Ob as fe,Pb as pe,Q as U,Qb as H,R as ge,Ub as he,Wb as J,Zb as Y,jd as p}from"./chunk-VKONO6MI.mjs";import{d as n}from"./chunk-CE5U3CSQ.mjs";var ye="[Circular]",K="[...]";function me(e,t,o={}){let{depthLimit:s=Number.MAX_SAFE_INTEGER,edgesLimit:u=Number.MAX_SAFE_INTEGER}=o,c=[];function i(a,l,f,r,S,v){if(v+=1,typeof a=="object"&&a!==null){for(let A=0;A<r.length;A++)if(r[A]===a){h(ye,a,l,S);return}if(v>s){h(K,a,l,S);return}if(f+1>u){h(K,a,l,S);return}if(r.push(a),Array.isArray(a)){let A=a;for(let T=0;T<a.length;T++)i(a[T],T,T,r,A,v)}else if(a instanceof Map||a instanceof Set||a instanceof RegExp||a instanceof Date||a instanceof Error){r.pop();return}else{let A=a,T=Object.keys(A);for(let V=0;V<T.length;V++){let G=T[V];i(A[G],G,V,r,A,v)}}r.pop()}}function h(a,l,f,r){if(!r)return;let S=Object.getOwnPropertyDescriptor(r,f);if(S?.get!==void 0)if(S.configurable)Object.defineProperty(r,f,{value:a}),c.push([r,f,l,S]);else return;else r[f]=a,c.push([r,f,l])}let C=(a,l)=>{if(typeof l=="bigint")return`${l.toString()}n`;if(typeof l=="symbol")return l.toString();if(typeof l>"u")return"undefined";if(typeof l=="function")return`[Function: ${l.name||"anonymous"}]`;if(typeof l=="number"){if(l===1/0)return"Infinity";if(l===-1/0)return"-Infinity";if(Number.isNaN(l))return"NaN"}if(l instanceof Error){let f={name:l.name,message:l.message,stack:l.stack};return Object.getOwnPropertyNames(l).forEach(r=>{if(!["name","message","stack"].includes(r))try{let S=l[r];S!==void 0&&(f[r]=S)}catch{}}),f}if(l instanceof Date)return l.toISOString();if(l instanceof RegExp)return l.toString();if(l instanceof Map)try{return{__type:"Map",entries:Array.from(l.entries()).map(([f,r])=>[String(f),r])}}catch{return{__type:"Map",entries:"[Map iteration failed]"}}if(l instanceof Set)try{return{__type:"Set",values:Array.from(l)}}catch{return{__type:"Set",values:"[Set iteration failed]"}}return l};try{return i(e,"",0,[],null,0),JSON.stringify(e,C,t)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;c.length!==0;){let a=c.pop();if(a&&a.length===4){let[l,f,,r]=a;l&&typeof l=="object"&&r&&Object.defineProperty(l,f,r)}else if(a){let[l,f,r]=a;l&&typeof l=="object"&&(typeof f=="string"||typeof f=="number")&&(l[f]=r)}}}}var be=e=>typeof e>"u",Se=e=>typeof e!="object"||e===null||e===Object.prototype?false:Object.getPrototypeOf(e)===null?true:Object.getPrototypeOf(e)===Object.prototype,D=e=>Array.isArray(e),we=e=>typeof e=="boolean"||e===null||typeof e>"u"||typeof e=="number"||typeof e=="string"||typeof e=="symbol",xe=e=>e instanceof Date&&!isNaN(e.valueOf()),X=e=>e instanceof Error,Ce=e=>e instanceof RegExp,q=e=>e instanceof Set,Q=e=>e instanceof Map,ve=e=>typeof e=="bigint",Z=e=>typeof e=="number"&&isNaN(e),Ae=e=>e===1/0||e===-1/0,Te=e=>e===0&&1/e===-1/0,Ie=e=>e instanceof URL,Re=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),Oe={Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray},ee=[{isApplicable:be,annotation:"undefined",transform:()=>null,untransform:()=>{}},{isApplicable:ve,annotation:"bigint",transform:e=>e.toString(),untransform:e=>typeof BigInt<"u"?BigInt(e):(console.error("BigInt is not supported in this environment"),e)},{isApplicable:xe,annotation:"Date",transform:e=>e.toISOString(),untransform:e=>new Date(e)},{isApplicable:X,annotation:"Error",transform:e=>({name:e.name,message:e.message,stack:e.stack,cause:"cause"in e?e.cause:void 0}),untransform:e=>{let t=new Error(e.message);return t.name=e.name,t.stack=e.stack,e.cause!==void 0&&(t.cause=e.cause),t}},{isApplicable:Ce,annotation:"regexp",transform:e=>""+e,untransform:e=>{let t=e.slice(1,e.lastIndexOf("/")),o=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,o)}},{isApplicable:q,annotation:"set",transform:e=>[...e.values()],untransform:e=>new Set(e)},{isApplicable:Q,annotation:"map",transform:e=>[...e.entries()],untransform:e=>new Map(e)},{isApplicable:e=>Z(e)||Ae(e),annotation:"number",transform:e=>Z(e)?"NaN":e>0?"Infinity":"-Infinity",untransform:e=>Number(e)},{isApplicable:Te,annotation:"number",transform:()=>"-0",untransform:()=>-0},{isApplicable:Ie,annotation:"URL",transform:e=>e.toString(),untransform:e=>new URL(e)},{isApplicable:Re,annotation:e=>["typed-array",e.constructor.name],transform:e=>[...e],untransform:(e,t)=>{let o=Array.isArray(t)?t[1]:"Uint8Array",s=Oe[o];if(!s)throw new Error(`Unknown typed array: ${o}`);return new s(e)}}];function W(e){for(let t of ee)if(t.isApplicable(e)){let o=typeof t.annotation=="function"?t.annotation(e):t.annotation;return{value:t.transform(e),type:o}}}function te(e,t){for(let o of ee){let s=typeof o.annotation=="function"?Array.isArray(t)?t[0]:t:o.annotation;if(Array.isArray(t)&&Array.isArray(s)?t[0]===s[0]:s===t)return o.untransform(e,t)}throw new Error(`Unknown transformation: ${t}`)}var re=e=>Se(e)||D(e)||Q(e)||q(e)||X(e);function _(e){return e.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function oe(e,t=[],o=[]){let s=we(e);if(!s&&!re(e)){let a=W(e);return a?{transformedValue:a.value,annotations:{[t.map(String).map(_).join(".")]:a.type}}:{transformedValue:e}}if(!s&&o.indexOf(e)!==-1)return{transformedValue:null};if(!re(e)){let a=W(e);return a?{transformedValue:a.value,annotations:t.length>0?{[t.map(String).map(_).join(".")]:a.type}:{"":a.type}}:{transformedValue:e}}let u=W(e),c=u?.value??e,i=D(c)?[]:{},h={};if(u){let a=t.length>0?t.map(String).map(_).join("."):"";h[a]=u.type}let C=D(c)?c.map((a,l)=>[l,a]):Object.entries(c);for(let[a,l]of C){let f=String(a);if(f==="__proto__"||f==="constructor"||f==="prototype")throw new Error(`Detected property ${f}. This is a prototype pollution risk, please remove it from your object.`);let r=oe(l,[...t,a],[...o,e]);i[a]=r.transformedValue,r.annotations&&Object.assign(h,r.annotations)}return{transformedValue:i,annotations:Object.keys(h).length>0?h:void 0}}function ke(e){if(e==="")return[];let t=[],o="";for(let s=0;s<e.length;s++){let u=e.charAt(s);if(u==="\\"){let c=e.charAt(s+1);if(c==="\\"){o+="\\",s++;continue}else if(c==="."){o+=".",s++;continue}}if(u==="."){t.push(o),o="";continue}o+=u}return o&&t.push(o),t}function Ne(e,t,o){if(t.length===0)return;let s=e;for(let u=0;u<t.length-1;u++)s=s[t[u]];s[t[t.length-1]]=o}function Fe(e,t){let o=e;for(let s of t)o=o[s];return o}function ne(e){let t=oe(e),o={json:t.transformedValue};return t.annotations&&(o.meta={values:t.annotations}),o}function ae(e){let{json:t,meta:o}=e;if(!o?.values)return t;let s=D(t)?[...t]:{...t},u=Object.entries(o.values).map(([c,i])=>({pathString:c,type:i,path:ke(c)})).sort((c,i)=>i.path.length-c.path.length);for(let{type:c,path:i}of u)if(i.length===0)s=te(s,c);else{let h=Fe(s,i),C=te(h,c);Ne(s,i,C)}return s}var je=(e,t=false)=>{let{json:o}=ne(e);return JSON.stringify(o,null,t?2:void 0)},Be=e=>{try{let t=JSON.parse(e);return ae({json:t,meta:void 0})}catch{return JSON.parse(e)}};import{StyleSheet as Ve,Text as P,View as L,TouchableOpacity as ze,Animated as De}from"react-native-web";import{jsx as F,jsxs as E}from"react/jsx-runtime";function Le({icon:e,iconColor:t,title:o,count:s,subtitle:u,expanded:c,onToggle:i,children:h,style:C,titleStyle:a}){return E(L,{style:[j.container,C],children:[E(ze,{onPress:i,activeOpacity:.7,style:j.headerTouchable,children:[E(L,{style:j.header,children:[E(L,{style:j.headerLeft,children:[F(e,{size:14,color:t}),F(P,{style:[j.title,a],children:o}),F(L,{style:[j.badge,{backgroundColor:t+"20"}],children:F(P,{style:[j.badgeText,{color:t}],children:s})})]}),c?F(Y,{size:14,color:n.muted}):F(J,{size:14,color:n.muted})]}),F(P,{style:j.subtitle,children:u})]}),c&&F(De.View,{style:{opacity:1},children:h})]})}var j=Ve.create({container:{marginBottom:20},headerTouchable:{marginBottom:12},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:4,paddingHorizontal:4},headerLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1},title:{fontSize:11,color:n.primary,fontFamily:p,fontWeight:"700",letterSpacing:2,opacity:.9},subtitle:{fontSize:9,color:n.secondary,fontFamily:p,paddingHorizontal:4,marginTop:2,opacity:.7},badge:{paddingHorizontal:8,paddingVertical:2,borderRadius:10},badgeText:{fontSize:10,fontFamily:p,fontWeight:"700"}});var ie={position:"absolute",top:0,left:0,right:0,bottom:0};import{StyleSheet as Ee,Text as M,View as B,Animated as We}from"react-native-web";import{jsx as k,jsxs as $}from"react/jsx-runtime";function _e({alertConfig:e,badgeText:t,animatedStyle:o,style:s,indicatorCount:u=3}){let c=e.icon;return $(We.View,{style:[I.container,{borderColor:e.color+"40"},s,o],children:[k(B,{style:[I.glow,{backgroundColor:e.color+"10"}]}),$(B,{style:I.content,children:[k(B,{style:[I.iconWrapper,{backgroundColor:e.color+"15"}],children:k(c,{size:20,color:e.color})}),$(B,{style:I.textContainer,children:[k(M,{style:[I.label,{color:e.color}],children:e.label}),k(M,{style:I.subtitle,children:e.subtitle})]}),k(B,{style:[I.badge,{backgroundColor:e.color+"20"}],children:k(M,{style:[I.badgeText,{color:e.color}],children:t})})]}),k(B,{style:I.indicators,children:[...Array(u)].map((i,h)=>k(B,{style:[I.indicatorDot,{backgroundColor:e.color,opacity:e.pulse?h===0?1:.5-h*.2:.3-h*.1}]},h))})]})}var I=Ee.create({container:{backgroundColor:n.panel,borderRadius:12,borderWidth:1,padding:16,marginBottom:16,position:"relative",overflow:"hidden"},glow:{...ie,opacity:.5},content:{flexDirection:"row",alignItems:"center",gap:12},iconWrapper:{width:36,height:36,borderRadius:8,justifyContent:"center",alignItems:"center"},textContainer:{flex:1,gap:2},label:{fontSize:13,fontWeight:"700",fontFamily:p,letterSpacing:1.5,textShadowOffset:{width:0,height:0},textShadowRadius:8},subtitle:{fontSize:10,color:n.secondary,fontFamily:p},badge:{paddingHorizontal:8,paddingVertical:4,borderRadius:4},badgeText:{fontSize:9,fontWeight:"700",fontFamily:p,letterSpacing:1},indicators:{position:"absolute",top:8,right:8,flexDirection:"row",gap:3},indicatorDot:{width:4,height:4,borderRadius:2}});import{Fragment as Pe}from"react";import{StyleSheet as Me,Text as R,View as m,Animated as le}from"react-native-web";import{jsx as y,jsxs as x}from"react/jsx-runtime";function $e({statsConfig:e,totalCount:t,header:o,bottomStats:s,style:u,hideInactive:c=true}){return x(m,{style:[d.container,u],children:[o&&x(m,{style:d.header,children:[x(m,{style:d.headerLeft,children:[y(R,{style:d.headerTitle,children:o.title}),y(R,{style:d.headerSubtitle,children:o.subtitle})]}),o.healthPercentage!==void 0&&y(m,{style:d.headerRight,children:x(m,{style:d.statusIndicator,children:[y(m,{style:[d.statusDot,{backgroundColor:o.healthColor||n.success}]}),y(R,{style:[d.statusText,{color:o.healthColor||n.success}],children:o.healthStatus||"OPTIMAL"})]})})]}),o?.healthPercentage!==void 0&&x(m,{style:d.healthSection,children:[y(R,{style:d.healthLabel,children:"SYSTEM HEALTH"}),y(m,{style:d.healthBarWrapper,children:y(m,{style:d.healthBarBg,children:y(le.View,{style:[d.healthBarFill,{width:`${o.healthPercentage}%`,backgroundColor:o.healthColor||n.success}]})})}),x(R,{style:[d.healthPercentage,{color:o.healthColor||n.success}],children:[o.healthPercentage,"%"]})]}),y(m,{style:d.statsGrid,children:e.map(i=>{let h=i.value>0;if(c&&!h)return null;let C=i.icon,a=t?i.value/t*100:0;return x(le.View,{style:[d.statCard,{borderColor:i.color+"30"}],children:[x(m,{style:d.cardContent,children:[y(m,{style:[d.iconBadge,{backgroundColor:i.color+"1A",borderColor:i.color+"33"}],children:y(C,{size:12,color:i.color})}),x(m,{style:d.cardInfo,children:[y(R,{style:d.cardLabel,children:i.label}),y(R,{style:d.cardSubtitle,children:i.subtitle})]}),x(m,{style:d.valueBlock,children:[y(R,{style:[d.statNumber,{color:i.color}],children:i.value.toString().padStart(2,"0")}),t?x(R,{style:d.percentText,children:[Math.round(a),"%"]}):null]})]}),i.showBar!==false&&t&&y(m,{style:[d.statBar,{backgroundColor:i.color+"10"}],children:y(m,{style:[d.statBarFill,{width:`${a}%`,backgroundColor:i.color}]})})]},i.key)})}),s&&s.length>0&&y(m,{style:d.bottomBar,children:s.map((i,h)=>x(Pe,{children:[x(m,{style:d.bottomStat,children:[y(R,{style:d.bottomStatLabel,children:i.label}),y(R,{style:[d.bottomStatValue,i.color&&{color:i.color}],children:i.value})]}),h<s.length-1&&y(m,{style:d.bottomDivider})]},i.label))})]})}var d=Me.create({container:{backgroundColor:n.panel,borderRadius:12,padding:12,marginBottom:12,borderWidth:1,borderColor:n.border+"40",overflow:"hidden",position:"relative"},header:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8,paddingBottom:8,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.1)"},headerLeft:{gap:1},headerRight:{alignItems:"flex-end"},headerTitle:{fontSize:11,fontWeight:"700",color:n.primary,fontFamily:p,letterSpacing:1.5},headerSubtitle:{fontSize:8,color:n.secondary,fontFamily:p,opacity:.7},statusIndicator:{flexDirection:"row",alignItems:"center",gap:4},statusDot:{width:5,height:5,borderRadius:2.5},statusText:{fontSize:9,fontWeight:"600",fontFamily:p,letterSpacing:.5},healthSection:{flexDirection:"row",alignItems:"center",marginBottom:10,gap:8},healthLabel:{fontSize:8,color:n.secondary,fontFamily:p,letterSpacing:.5},healthBarWrapper:{flex:1},healthBarBg:{height:4,backgroundColor:"rgba(128, 128, 128, 0.1)",borderRadius:2,overflow:"hidden"},healthBarFill:{height:"100%",borderRadius:2},healthPercentage:{fontSize:11,fontWeight:"700",fontFamily:p},statsGrid:{gap:6,marginBottom:8},statCard:{backgroundColor:n.blackTint2,borderRadius:8,borderWidth:1,borderColor:n.border,padding:10,marginBottom:4},cardContent:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:4},cardInfo:{flex:1},cardLabel:{fontSize:11,fontWeight:"700",fontFamily:p,letterSpacing:.5,color:n.primary},cardSubtitle:{fontSize:8,color:n.secondary,fontFamily:p,opacity:.7},statNumber:{fontSize:16,fontWeight:"700",fontFamily:p,minWidth:28},valueBlock:{alignItems:"flex-end"},percentText:{fontSize:9,color:n.secondary,fontFamily:p},statBar:{height:3,borderRadius:1.5,overflow:"hidden"},statBarFill:{height:"100%",borderRadius:1.5},bottomBar:{flexDirection:"row",alignItems:"center",paddingTop:8,borderTopWidth:1,borderTopColor:n.border+"40"},bottomStat:{flex:1,alignItems:"center"},bottomStatLabel:{fontSize:7,color:n.muted,fontFamily:p,letterSpacing:.5,marginBottom:1},bottomStatValue:{fontSize:11,fontWeight:"700",color:n.primary,fontFamily:p},bottomDivider:{width:1,height:16,backgroundColor:n.border+"40"},iconBadge:{width:24,height:24,borderRadius:6,borderWidth:1,alignItems:"center",justifyContent:"center"}});import{useState as Ge,useCallback as Ue}from"react";import{StyleSheet as He,Text as w,View as N,TouchableOpacity as Je,Animated as Ye}from"react-native-web";import{jsx as b,jsxs as O}from"react/jsx-runtime";function Ke({issues:e,onIssueClick:t,hintText:o="Tap any issue to view details",style:s,expandable:u=true,statusLabels:c={missing:"Not found",wrong_type:"Type error",wrong_value:"Invalid value"}}){let[i,h]=Ge(new Set),C=Ue(r=>{u&&h(S=>{let v=new Set(S);return v.has(r)?v.delete(r):v.add(r),v})},[u]),a=r=>r==="missing"?n.warning:n.info,l=r=>r==="missing"?U:H,f=r=>{switch(r.status){case"missing":return`\u2022 ${c.missing}`;case"wrong_type":return`\u2022 ${c.wrong_type}${r.expectedType?`: Expected ${r.expectedType}`:""}`;case"wrong_value":return`\u2022 ${c.wrong_value}${r.value?`: ${String(r.value).substring(0,20)}`:""}`;default:return""}};return e.length===0?null:O(N,{style:[g.container,s],children:[e.map((r,S)=>{let v=a(r.status),A=l(r.status),T=i.has(r.key),V=T?Y:J;return O(N,{children:[O(Je,{onPress:()=>{u&&C(r.key),t?.(r)},style:g.issueRow,activeOpacity:.7,children:[b(A,{size:14,color:v}),O(N,{style:g.issueContent,children:[b(w,{style:[g.issueKey,{color:n.primary}],children:r.key}),b(w,{style:g.issueDesc,children:f(r)})]}),u&&b(V,{size:12,color:n.muted})]}),u&&T&&O(Ye.View,{style:g.issueDetails,children:[O(N,{style:g.detailRow,children:[b(w,{style:g.detailLabel,children:"Status:"}),O(w,{style:[g.detailValue,{color:n.primary,fontWeight:"600"}],children:[r.status==="missing"&&"MISSING",r.status==="wrong_type"&&"TYPE ERROR",r.status==="wrong_value"&&"INVALID VALUE"]})]}),r.value!==void 0&&r.status!=="missing"&&O(N,{style:g.detailRow,children:[b(w,{style:g.detailLabel,children:"Current:"}),b(w,{style:[g.detailValue,{color:n.warning}],children:`"${String(r.value)}"`})]}),r.expectedType&&r.status==="wrong_type"&&O(N,{style:g.detailRow,children:[b(w,{style:g.detailLabel,children:"Expected:"}),b(w,{style:[g.detailValue,{color:n.success}],children:r.expectedType})]}),r.expectedValue&&r.status==="wrong_value"&&O(N,{style:g.detailRow,children:[b(w,{style:g.detailLabel,children:"Expected:"}),b(w,{style:[g.detailValue,{color:n.success}],children:`"${r.expectedValue}"`})]}),r.description&&b(N,{style:g.descSection,children:b(w,{style:g.descText,children:r.description})}),r.fixSuggestion&&O(N,{style:g.fixSection,children:[b(w,{style:g.fixLabel,children:"HOW TO FIX"}),b(w,{style:g.fixText,children:r.fixSuggestion})]})]})]},`${r.key}-${S}`)}),o&&b(w,{style:g.hint,children:o})]})}var g=He.create({container:{backgroundColor:n.panel,borderRadius:8,padding:8,borderWidth:1,borderColor:n.warning+"33"},issueRow:{flexDirection:"row",alignItems:"center",paddingVertical:8,paddingHorizontal:8,borderRadius:6,marginBottom:4},issueContent:{flex:1,marginLeft:8,flexDirection:"row",alignItems:"center",gap:8},issueKey:{fontSize:11,fontWeight:"600",fontFamily:p},issueDesc:{fontSize:10,color:n.secondary,fontFamily:p,flex:1},hint:{fontSize:9,color:n.muted,fontFamily:p,textAlign:"center",marginTop:8,paddingTop:8,borderTopWidth:1,borderTopColor:n.primary+"0D"},issueDetails:{marginTop:8,marginLeft:22,marginRight:8,paddingLeft:12,paddingRight:8,paddingTop:8,paddingBottom:8,backgroundColor:n.background+"4D",borderLeftWidth:2,borderLeftColor:n.primary+"1A",borderRadius:4},detailRow:{flexDirection:"row",marginTop:8,alignItems:"flex-start"},detailLabel:{fontSize:10,color:n.secondary,fontFamily:p,fontWeight:"600",width:70},detailValue:{fontSize:11,color:n.primary,fontFamily:p,flex:1,lineHeight:16},fixSection:{marginTop:12,padding:10,backgroundColor:n.info+"14",borderRadius:6,borderWidth:1,borderColor:n.info+"33"},fixLabel:{fontSize:10,color:n.info,fontFamily:p,fontWeight:"700",marginBottom:6,letterSpacing:.5},fixText:{fontSize:11,color:n.primary,fontFamily:p,lineHeight:18,backgroundColor:n.background+"66",padding:8,borderRadius:4,overflow:"hidden"},descSection:{marginTop:10,paddingTop:10,borderTopWidth:1,borderTopColor:n.primary+"0D"},descText:{fontSize:10,color:n.secondary,fontFamily:p,marginTop:4,lineHeight:14}});import{useMemo as se,useEffect as Xe,useRef as ce}from"react";import{Animated as z,Easing as de}from"react-native-web";var ue={OPTIMAL:{icon:he,color:n.success,label:"CONFIG OK",subtitle:"All requirements met",pulse:false},WARNING:{icon:H,color:n.warning,label:"CONFIG WARNING",subtitle:"Check values and types",pulse:false},ERROR:{icon:pe,color:n.error,label:"CONFIG ERROR",subtitle:"Missing required data",pulse:false},CRITICAL:{icon:U,color:n.critical,label:"CONFIG FAILURE",subtitle:"Multiple critical issues",pulse:false},LOADING:{icon:fe,color:n.info,label:"LOADING",subtitle:"Reading configuration...",pulse:true},EMPTY:{icon:ge,color:n.muted,label:"NO DATA",subtitle:"No configuration found",pulse:false}};function qe(e,t){let o=se(()=>({...ue,...t}),[t]),s=se(()=>e.totalCount===0?"EMPTY":e.missingCount>2||e.wrongTypeCount>2?"CRITICAL":e.missingCount>0?"ERROR":e.wrongValueCount>0||e.wrongTypeCount>0?"WARNING":"OPTIMAL",[e]),u=o[s],c=ce(new z.Value(1)).current,i=ce(new z.Value(1)).current;return Xe(()=>{c.setValue(0),i.setValue(.95),z.parallel([z.timing(c,{toValue:1,duration:300,useNativeDriver:true}),z.timing(i,{toValue:1,duration:300,easing:de.out(de.ease),useNativeDriver:true})]).start()},[s,c,i]),{alertState:s,alertConfig:u,alertAnimatedStyle:{transform:[{scale:i}],opacity:c},alertOpacity:c,alertScale:i}}export{me as a,ne as b,ae as c,je as d,Be as e,Le as f,ie as g,_e as h,$e as i,Ke as j,ue as k,qe as l};
|
|
1
|
+
"use client";import{Ob as fe,Pb as pe,Q as U,Qb as H,R as ge,Ub as he,Wb as J,Zb as Y,jd as p}from"./chunk-VKONO6MI.mjs";import{d as n}from"./chunk-CE5U3CSQ.mjs";var ye="[Circular]",K="[...]";function me(e,t,o={}){let{depthLimit:s=Number.MAX_SAFE_INTEGER,edgesLimit:u=Number.MAX_SAFE_INTEGER}=o,c=[];function i(a,l,f,r,S,v){if(v+=1,typeof a=="object"&&a!==null){for(let T=0;T<r.length;T++)if(r[T]===a){h(ye,a,l,S);return}if(v>s){h(K,a,l,S);return}if(f+1>u){h(K,a,l,S);return}if(r.push(a),Array.isArray(a)){let T=a;for(let A=0;A<a.length;A++)i(a[A],A,A,r,T,v)}else if(a instanceof Map||a instanceof Set||a instanceof RegExp||a instanceof Date||a instanceof Error){r.pop();return}else{let T=a,A=Object.keys(T);for(let V=0;V<A.length;V++){let G=A[V];i(T[G],G,V,r,T,v)}}r.pop()}}function h(a,l,f,r){if(!r)return;let S=Object.getOwnPropertyDescriptor(r,f);if(S?.get!==void 0)if(S.configurable)Object.defineProperty(r,f,{value:a}),c.push([r,f,l,S]);else return;else r[f]=a,c.push([r,f,l])}let C=(a,l)=>{if(typeof l=="bigint")return`${l.toString()}n`;if(typeof l=="symbol")return l.toString();if(typeof l>"u")return"undefined";if(typeof l=="function")return`[Function: ${l.name||"anonymous"}]`;if(typeof l=="number"){if(l===1/0)return"Infinity";if(l===-1/0)return"-Infinity";if(Number.isNaN(l))return"NaN"}if(l instanceof Error){let f={name:l.name,message:l.message,stack:l.stack};return Object.getOwnPropertyNames(l).forEach(r=>{if(!["name","message","stack"].includes(r))try{let S=l[r];S!==void 0&&(f[r]=S)}catch{}}),f}if(l instanceof Date)return l.toISOString();if(l instanceof RegExp)return l.toString();if(l instanceof Map)try{return{__type:"Map",entries:Array.from(l.entries()).map(([f,r])=>[String(f),r])}}catch{return{__type:"Map",entries:"[Map iteration failed]"}}if(l instanceof Set)try{return{__type:"Set",values:Array.from(l)}}catch{return{__type:"Set",values:"[Set iteration failed]"}}return l};try{return i(e,"",0,[],null,0),JSON.stringify(e,C,t)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;c.length!==0;){let a=c.pop();if(a&&a.length===4){let[l,f,,r]=a;l&&typeof l=="object"&&r&&Object.defineProperty(l,f,r)}else if(a){let[l,f,r]=a;l&&typeof l=="object"&&(typeof f=="string"||typeof f=="number")&&(l[f]=r)}}}}var be=e=>typeof e>"u",Se=e=>typeof e!="object"||e===null||e===Object.prototype?false:Object.getPrototypeOf(e)===null?true:Object.getPrototypeOf(e)===Object.prototype,D=e=>Array.isArray(e),we=e=>typeof e=="boolean"||e===null||typeof e>"u"||typeof e=="number"||typeof e=="string"||typeof e=="symbol",xe=e=>e instanceof Date&&!isNaN(e.valueOf()),X=e=>e instanceof Error,Ce=e=>e instanceof RegExp,q=e=>e instanceof Set,Q=e=>e instanceof Map,ve=e=>typeof e=="bigint",Z=e=>typeof e=="number"&&isNaN(e),Te=e=>e===1/0||e===-1/0,Ae=e=>e===0&&1/e===-1/0,Ie=e=>e instanceof URL,Re=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),Oe={Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray},ee=[{isApplicable:be,annotation:"undefined",transform:()=>null,untransform:()=>{}},{isApplicable:ve,annotation:"bigint",transform:e=>e.toString(),untransform:e=>typeof BigInt<"u"?BigInt(e):(console.error("BigInt is not supported in this environment"),e)},{isApplicable:xe,annotation:"Date",transform:e=>e.toISOString(),untransform:e=>new Date(e)},{isApplicable:X,annotation:"Error",transform:e=>({name:e.name,message:e.message,stack:e.stack,cause:"cause"in e?e.cause:void 0}),untransform:e=>{let t=new Error(e.message);return t.name=e.name,t.stack=e.stack,e.cause!==void 0&&(t.cause=e.cause),t}},{isApplicable:Ce,annotation:"regexp",transform:e=>""+e,untransform:e=>{let t=e.slice(1,e.lastIndexOf("/")),o=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,o)}},{isApplicable:q,annotation:"set",transform:e=>[...e.values()],untransform:e=>new Set(e)},{isApplicable:Q,annotation:"map",transform:e=>[...e.entries()],untransform:e=>new Map(e)},{isApplicable:e=>Z(e)||Te(e),annotation:"number",transform:e=>Z(e)?"NaN":e>0?"Infinity":"-Infinity",untransform:e=>Number(e)},{isApplicable:Ae,annotation:"number",transform:()=>"-0",untransform:()=>-0},{isApplicable:Ie,annotation:"URL",transform:e=>e.toString(),untransform:e=>new URL(e)},{isApplicable:Re,annotation:e=>["typed-array",e.constructor.name],transform:e=>[...e],untransform:(e,t)=>{let o=Array.isArray(t)?t[1]:"Uint8Array",s=Oe[o];if(!s)throw new Error(`Unknown typed array: ${o}`);return new s(e)}}];function W(e){for(let t of ee)if(t.isApplicable(e)){let o=typeof t.annotation=="function"?t.annotation(e):t.annotation;return{value:t.transform(e),type:o}}}function te(e,t){for(let o of ee){let s=typeof o.annotation=="function"?Array.isArray(t)?t[0]:t:o.annotation;if(Array.isArray(t)&&Array.isArray(s)?t[0]===s[0]:s===t)return o.untransform(e,t)}throw new Error(`Unknown transformation: ${t}`)}var re=e=>Se(e)||D(e)||Q(e)||q(e)||X(e);function _(e){return e.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function oe(e,t=[],o=[]){let s=we(e);if(!s&&!re(e)){let a=W(e);return a?{transformedValue:a.value,annotations:{[t.map(String).map(_).join(".")]:a.type}}:{transformedValue:e}}if(!s&&o.indexOf(e)!==-1)return{transformedValue:null};if(!re(e)){let a=W(e);return a?{transformedValue:a.value,annotations:t.length>0?{[t.map(String).map(_).join(".")]:a.type}:{"":a.type}}:{transformedValue:e}}let u=W(e),c=u?.value??e,i=D(c)?[]:{},h={};if(u){let a=t.length>0?t.map(String).map(_).join("."):"";h[a]=u.type}let C=D(c)?c.map((a,l)=>[l,a]):Object.entries(c);for(let[a,l]of C){let f=String(a);if(f==="__proto__"||f==="constructor"||f==="prototype")throw new Error(`Detected property ${f}. This is a prototype pollution risk, please remove it from your object.`);let r=oe(l,[...t,a],[...o,e]);i[a]=r.transformedValue,r.annotations&&Object.assign(h,r.annotations)}return{transformedValue:i,annotations:Object.keys(h).length>0?h:void 0}}function ke(e){if(e==="")return[];let t=[],o="";for(let s=0;s<e.length;s++){let u=e.charAt(s);if(u==="\\"){let c=e.charAt(s+1);if(c==="\\"){o+="\\",s++;continue}else if(c==="."){o+=".",s++;continue}}if(u==="."){t.push(o),o="";continue}o+=u}return o&&t.push(o),t}function Ne(e,t,o){if(t.length===0)return;let s=e;for(let u=0;u<t.length-1;u++)s=s[t[u]];s[t[t.length-1]]=o}function Fe(e,t){let o=e;for(let s of t)o=o[s];return o}function ne(e){let t=oe(e),o={json:t.transformedValue};return t.annotations&&(o.meta={values:t.annotations}),o}function ae(e){let{json:t,meta:o}=e;if(!o?.values)return t;let s=D(t)?[...t]:{...t},u=Object.entries(o.values).map(([c,i])=>({pathString:c,type:i,path:ke(c)})).sort((c,i)=>i.path.length-c.path.length);for(let{type:c,path:i}of u)if(i.length===0)s=te(s,c);else{let h=Fe(s,i),C=te(h,c);Ne(s,i,C)}return s}var je=(e,t=false)=>{let{json:o}=ne(e);return JSON.stringify(o,null,t?2:void 0)},Be=e=>{try{let t=JSON.parse(e);return ae({json:t,meta:void 0})}catch{return JSON.parse(e)}};import{StyleSheet as Ve,Text as P,View as L,TouchableOpacity as ze,Animated as De}from"react-native-web";import{jsx as F,jsxs as E}from"react/jsx-runtime";function Le({icon:e,iconColor:t,title:o,count:s,subtitle:u,expanded:c,onToggle:i,children:h,style:C,titleStyle:a}){return E(L,{style:[j.container,C],children:[E(ze,{onPress:i,activeOpacity:.7,style:j.headerTouchable,children:[E(L,{style:j.header,children:[E(L,{style:j.headerLeft,children:[F(e,{size:14,color:t}),F(P,{style:[j.title,a],children:o}),F(L,{style:[j.badge,{backgroundColor:t+"20"}],children:F(P,{style:[j.badgeText,{color:t}],children:s})})]}),c?F(Y,{size:14,color:n.muted}):F(J,{size:14,color:n.muted})]}),F(P,{style:j.subtitle,children:u})]}),c&&F(De.View,{style:{opacity:1},children:h})]})}var j=Ve.create({container:{marginBottom:20},headerTouchable:{marginBottom:12},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:4,paddingHorizontal:4},headerLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1},title:{fontSize:11,color:n.primary,fontFamily:p,fontWeight:"700",letterSpacing:2,opacity:.9},subtitle:{fontSize:9,color:n.secondary,fontFamily:p,paddingHorizontal:4,marginTop:2,opacity:.7},badge:{paddingHorizontal:8,paddingVertical:2,borderRadius:10},badgeText:{fontSize:10,fontFamily:p,fontWeight:"700"}});var ie={position:"absolute",top:0,left:0,right:0,bottom:0};import{StyleSheet as Ee,Text as M,View as B,Animated as We}from"react-native-web";import{jsx as k,jsxs as $}from"react/jsx-runtime";function _e({alertConfig:e,badgeText:t,animatedStyle:o,style:s,indicatorCount:u=3}){let c=e.icon;return $(We.View,{style:[I.container,{borderColor:e.color+"40"},s,o],children:[k(B,{style:[I.glow,{backgroundColor:e.color+"10"}]}),$(B,{style:I.content,children:[k(B,{style:[I.iconWrapper,{backgroundColor:e.color+"15"}],children:k(c,{size:20,color:e.color})}),$(B,{style:I.textContainer,children:[k(M,{style:[I.label,{color:e.color}],children:e.label}),k(M,{style:I.subtitle,children:e.subtitle})]}),k(B,{style:[I.badge,{backgroundColor:e.color+"20"}],children:k(M,{style:[I.badgeText,{color:e.color}],children:t})})]}),k(B,{style:I.indicators,children:[...Array(u)].map((i,h)=>k(B,{style:[I.indicatorDot,{backgroundColor:e.color,opacity:e.pulse?h===0?1:.5-h*.2:.3-h*.1}]},h))})]})}var I=Ee.create({container:{backgroundColor:n.panel,borderRadius:12,borderWidth:1,padding:16,marginBottom:16,position:"relative",overflow:"hidden"},glow:{...ie,opacity:.5},content:{flexDirection:"row",alignItems:"center",gap:12},iconWrapper:{width:36,height:36,borderRadius:8,justifyContent:"center",alignItems:"center"},textContainer:{flex:1,gap:2},label:{fontSize:13,fontWeight:"700",fontFamily:p,letterSpacing:1.5,textShadowOffset:{width:0,height:0},textShadowRadius:8},subtitle:{fontSize:10,color:n.secondary,fontFamily:p},badge:{paddingHorizontal:8,paddingVertical:4,borderRadius:4},badgeText:{fontSize:9,fontWeight:"700",fontFamily:p,letterSpacing:1},indicators:{position:"absolute",top:8,right:8,flexDirection:"row",gap:3},indicatorDot:{width:4,height:4,borderRadius:2}});import{Fragment as Pe}from"react";import{StyleSheet as Me,Text as R,View as m,Animated as le}from"react-native-web";import{jsx as y,jsxs as x}from"react/jsx-runtime";function $e({statsConfig:e,totalCount:t,header:o,bottomStats:s,style:u,hideInactive:c=true}){return x(m,{style:[d.container,u],children:[o&&x(m,{style:d.header,children:[x(m,{style:d.headerLeft,children:[y(R,{style:d.headerTitle,children:o.title}),y(R,{style:d.headerSubtitle,children:o.subtitle})]}),o.healthPercentage!==void 0&&y(m,{style:d.headerRight,children:x(m,{style:d.statusIndicator,children:[y(m,{style:[d.statusDot,{backgroundColor:o.healthColor||n.success}]}),y(R,{style:[d.statusText,{color:o.healthColor||n.success}],children:o.healthStatus||"OPTIMAL"})]})})]}),o?.healthPercentage!==void 0&&x(m,{style:d.healthSection,children:[y(R,{style:d.healthLabel,children:"SYSTEM HEALTH"}),y(m,{style:d.healthBarWrapper,children:y(m,{style:d.healthBarBg,children:y(le.View,{style:[d.healthBarFill,{width:`${o.healthPercentage}%`,backgroundColor:o.healthColor||n.success}]})})}),x(R,{style:[d.healthPercentage,{color:o.healthColor||n.success}],children:[o.healthPercentage,"%"]})]}),y(m,{style:d.statsGrid,children:e.map(i=>{let h=i.value>0;if(c&&!h)return null;let C=i.icon,a=t?i.value/t*100:0;return x(le.View,{style:[d.statCard,{borderColor:i.color+"30"}],children:[x(m,{style:d.cardContent,children:[y(m,{style:[d.iconBadge,{backgroundColor:i.color+"1A",borderColor:i.color+"33"}],children:y(C,{size:12,color:i.color})}),x(m,{style:d.cardInfo,children:[y(R,{style:d.cardLabel,children:i.label}),y(R,{style:d.cardSubtitle,children:i.subtitle})]}),x(m,{style:d.valueBlock,children:[y(R,{style:[d.statNumber,{color:i.color}],children:i.value.toString().padStart(2,"0")}),t?x(R,{style:d.percentText,children:[Math.round(a),"%"]}):null]})]}),i.showBar!==false&&t&&y(m,{style:[d.statBar,{backgroundColor:i.color+"10"}],children:y(m,{style:[d.statBarFill,{width:`${a}%`,backgroundColor:i.color}]})})]},i.key)})}),s&&s.length>0&&y(m,{style:d.bottomBar,children:s.map((i,h)=>x(Pe,{children:[x(m,{style:d.bottomStat,children:[y(R,{style:d.bottomStatLabel,children:i.label}),y(R,{style:[d.bottomStatValue,i.color&&{color:i.color}],children:i.value})]}),h<s.length-1&&y(m,{style:d.bottomDivider})]},i.label))})]})}var d=Me.create({container:{backgroundColor:n.panel,borderRadius:12,padding:12,marginBottom:12,borderWidth:1,borderColor:n.border+"40",overflow:"hidden",position:"relative"},header:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8,paddingBottom:8,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.1)"},headerLeft:{gap:1},headerRight:{alignItems:"flex-end"},headerTitle:{fontSize:11,fontWeight:"700",color:n.primary,fontFamily:p,letterSpacing:1.5},headerSubtitle:{fontSize:8,color:n.secondary,fontFamily:p,opacity:.7},statusIndicator:{flexDirection:"row",alignItems:"center",gap:4},statusDot:{width:5,height:5,borderRadius:2.5},statusText:{fontSize:9,fontWeight:"600",fontFamily:p,letterSpacing:.5},healthSection:{flexDirection:"row",alignItems:"center",marginBottom:10,gap:8},healthLabel:{fontSize:8,color:n.secondary,fontFamily:p,letterSpacing:.5},healthBarWrapper:{flex:1},healthBarBg:{height:4,backgroundColor:"rgba(128, 128, 128, 0.1)",borderRadius:2,overflow:"hidden"},healthBarFill:{height:"100%",borderRadius:2},healthPercentage:{fontSize:11,fontWeight:"700",fontFamily:p},statsGrid:{gap:6,marginBottom:8},statCard:{backgroundColor:n.blackTint2,borderRadius:8,borderWidth:1,borderColor:n.border,padding:10,marginBottom:4},cardContent:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:4},cardInfo:{flex:1},cardLabel:{fontSize:11,fontWeight:"700",fontFamily:p,letterSpacing:.5,color:n.primary},cardSubtitle:{fontSize:8,color:n.secondary,fontFamily:p,opacity:.7},statNumber:{fontSize:16,fontWeight:"700",fontFamily:p,minWidth:28},valueBlock:{alignItems:"flex-end"},percentText:{fontSize:9,color:n.secondary,fontFamily:p},statBar:{height:3,borderRadius:1.5,overflow:"hidden"},statBarFill:{height:"100%",borderRadius:1.5},bottomBar:{flexDirection:"row",alignItems:"center",paddingTop:8,borderTopWidth:1,borderTopColor:n.border+"40"},bottomStat:{flex:1,alignItems:"center"},bottomStatLabel:{fontSize:7,color:n.muted,fontFamily:p,letterSpacing:.5,marginBottom:1},bottomStatValue:{fontSize:11,fontWeight:"700",color:n.primary,fontFamily:p},bottomDivider:{width:1,height:16,backgroundColor:n.border+"40"},iconBadge:{width:24,height:24,borderRadius:6,borderWidth:1,alignItems:"center",justifyContent:"center"}});import{useState as Ge,useCallback as Ue}from"react";import{StyleSheet as He,Text as w,View as N,TouchableOpacity as Je,Animated as Ye}from"react-native-web";import{jsx as b,jsxs as O}from"react/jsx-runtime";function Ke({issues:e,onIssueClick:t,hintText:o="Tap any issue to view details",style:s,expandable:u=true,statusLabels:c={missing:"Not found",wrong_type:"Type error",wrong_value:"Invalid value"}}){let[i,h]=Ge(new Set),C=Ue(r=>{u&&h(S=>{let v=new Set(S);return v.has(r)?v.delete(r):v.add(r),v})},[u]),a=r=>r==="missing"?n.warning:n.info,l=r=>r==="missing"?U:H,f=r=>{switch(r.status){case"missing":return`\u2022 ${c.missing}`;case"wrong_type":return`\u2022 ${c.wrong_type}${r.expectedType?`: Expected ${r.expectedType}`:""}`;case"wrong_value":return`\u2022 ${c.wrong_value}${r.value?`: ${String(r.value).substring(0,20)}`:""}`;default:return""}};return e.length===0?null:O(N,{style:[g.container,s],children:[e.map((r,S)=>{let v=a(r.status),T=l(r.status),A=i.has(r.key),V=A?Y:J;return O(N,{children:[O(Je,{onPress:()=>{u&&C(r.key),t?.(r)},style:g.issueRow,activeOpacity:.7,children:[b(T,{size:14,color:v}),O(N,{style:g.issueContent,children:[b(w,{style:[g.issueKey,{color:n.primary}],children:r.key}),b(w,{style:g.issueDesc,children:f(r)})]}),u&&b(V,{size:12,color:n.muted})]}),u&&A&&O(Ye.View,{style:g.issueDetails,children:[O(N,{style:g.detailRow,children:[b(w,{style:g.detailLabel,children:"Status:"}),O(w,{style:[g.detailValue,{color:n.primary,fontWeight:"600"}],children:[r.status==="missing"&&"MISSING",r.status==="wrong_type"&&"TYPE ERROR",r.status==="wrong_value"&&"INVALID VALUE"]})]}),r.value!==void 0&&r.status!=="missing"&&O(N,{style:g.detailRow,children:[b(w,{style:g.detailLabel,children:"Current:"}),b(w,{style:[g.detailValue,{color:n.warning}],children:`"${String(r.value)}"`})]}),r.expectedType&&r.status==="wrong_type"&&O(N,{style:g.detailRow,children:[b(w,{style:g.detailLabel,children:"Expected:"}),b(w,{style:[g.detailValue,{color:n.success}],children:r.expectedType})]}),r.expectedValue&&r.status==="wrong_value"&&O(N,{style:g.detailRow,children:[b(w,{style:g.detailLabel,children:"Expected:"}),b(w,{style:[g.detailValue,{color:n.success}],children:`"${r.expectedValue}"`})]}),r.description&&b(N,{style:g.descSection,children:b(w,{style:g.descText,children:r.description})}),r.fixSuggestion&&O(N,{style:g.fixSection,children:[b(w,{style:g.fixLabel,children:"HOW TO FIX"}),b(w,{style:g.fixText,children:r.fixSuggestion})]})]})]},`${r.key}-${S}`)}),o&&b(w,{style:g.hint,children:o})]})}var g=He.create({container:{backgroundColor:n.panel,borderRadius:8,padding:8,borderWidth:1,borderColor:n.warning+"33"},issueRow:{flexDirection:"row",alignItems:"center",paddingVertical:8,paddingHorizontal:8,borderRadius:6,marginBottom:4},issueContent:{flex:1,marginLeft:8,flexDirection:"row",alignItems:"center",gap:8},issueKey:{fontSize:11,fontWeight:"600",fontFamily:p},issueDesc:{fontSize:10,color:n.secondary,fontFamily:p,flex:1},hint:{fontSize:9,color:n.muted,fontFamily:p,textAlign:"center",marginTop:8,paddingTop:8,borderTopWidth:1,borderTopColor:n.primary+"0D"},issueDetails:{marginTop:8,marginLeft:22,marginRight:8,paddingLeft:12,paddingRight:8,paddingTop:8,paddingBottom:8,backgroundColor:n.background+"4D",borderLeftWidth:2,borderLeftColor:n.primary+"1A",borderRadius:4},detailRow:{flexDirection:"row",marginTop:8,alignItems:"flex-start"},detailLabel:{fontSize:10,color:n.secondary,fontFamily:p,fontWeight:"600",width:70},detailValue:{fontSize:11,color:n.primary,fontFamily:p,flex:1,lineHeight:16},fixSection:{marginTop:12,padding:10,backgroundColor:n.info+"14",borderRadius:6,borderWidth:1,borderColor:n.info+"33"},fixLabel:{fontSize:10,color:n.info,fontFamily:p,fontWeight:"700",marginBottom:6,letterSpacing:.5},fixText:{fontSize:11,color:n.primary,fontFamily:p,lineHeight:18,backgroundColor:n.background+"66",padding:8,borderRadius:4,overflow:"hidden"},descSection:{marginTop:10,paddingTop:10,borderTopWidth:1,borderTopColor:n.primary+"0D"},descText:{fontSize:10,color:n.secondary,fontFamily:p,marginTop:4,lineHeight:14}});import{useMemo as se,useEffect as Xe,useRef as ce}from"react";import{Animated as z,Easing as de}from"react-native-web";var ue={OPTIMAL:{icon:he,color:n.success,label:"CONFIG OK",subtitle:"All requirements met",pulse:false},WARNING:{icon:H,color:n.warning,label:"CONFIG WARNING",subtitle:"Check values and types",pulse:false},ERROR:{icon:pe,color:n.error,label:"CONFIG ERROR",subtitle:"Missing required data",pulse:false},CRITICAL:{icon:U,color:n.critical,label:"CONFIG FAILURE",subtitle:"Multiple critical issues",pulse:false},LOADING:{icon:fe,color:n.info,label:"LOADING",subtitle:"Reading configuration...",pulse:true},EMPTY:{icon:ge,color:n.muted,label:"NO DATA",subtitle:"No configuration found",pulse:false}};function qe(e,t){let o=se(()=>({...ue,...t}),[t]),s=se(()=>e.totalCount===0?"EMPTY":e.missingCount>2||e.wrongTypeCount>2?"CRITICAL":e.missingCount>0?"ERROR":e.wrongValueCount>0||e.wrongTypeCount>0?"WARNING":"OPTIMAL",[e]),u=o[s],c=ce(new z.Value(1)).current,i=ce(new z.Value(1)).current;return Xe(()=>{c.setValue(0),i.setValue(.95),z.parallel([z.timing(c,{toValue:1,duration:300,useNativeDriver:true}),z.timing(i,{toValue:1,duration:300,easing:de.out(de.ease),useNativeDriver:true})]).start()},[s,c,i]),{alertState:s,alertConfig:u,alertAnimatedStyle:{transform:[{scale:i}],opacity:c},alertOpacity:c,alertScale:i}}export{me as a,ne as b,ae as c,je as d,Be as e,Le as f,ie as g,_e as h,$e as i,Ke as j,ue as k,qe as l};
|