@moontra/moonui-pro 2.33.13 → 2.33.15

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.
@@ -5,7 +5,7 @@
5
5
  * @license Commercial - https://moonui.dev/license
6
6
  * IMPORTANT: Valid license required for production use
7
7
  */
8
- "use strict";var MoonUIPro=(()=>{var _nt=Object.create;var oB=Object.defineProperty;var Fnt=Object.getOwnPropertyDescriptor;var Bnt=Object.getOwnPropertyNames;var Vnt=Object.getPrototypeOf,Unt=Object.prototype.hasOwnProperty;var Ufe=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var Z8=(e,t)=>()=>(e&&(t=e(e=0)),t);var de=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),rP=(e,t)=>{for(var r in t)oB(e,r,{get:t[r],enumerable:!0})},zfe=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Bnt(t))!Unt.call(e,o)&&o!==r&&oB(e,o,{get:()=>t[o],enumerable:!(n=Fnt(t,o))||n.enumerable});return e};var E=(e,t,r)=>(r=e!=null?_nt(Vnt(e)):{},zfe(t||!e||!e.__esModule?oB(r,"default",{value:e,enumerable:!0}):r,e)),Hfe=e=>zfe(oB({},"__esModule",{value:!0}),e);var jfe=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var co=(e,t,r)=>(jfe(e,t,"read from private field"),r?r.call(e):t.get(e)),aB=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},nP=(e,t,r,n)=>(jfe(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var upe=de(_n=>{"use strict";var gT=Symbol.for("react.element"),yot=Symbol.for("react.portal"),xot=Symbol.for("react.fragment"),bot=Symbol.for("react.strict_mode"),wot=Symbol.for("react.profiler"),Cot=Symbol.for("react.provider"),Sot=Symbol.for("react.context"),Pot=Symbol.for("react.forward_ref"),Iot=Symbol.for("react.suspense"),kot=Symbol.for("react.memo"),Rot=Symbol.for("react.lazy"),Jfe=Symbol.iterator;function Not(e){return e===null||typeof e!="object"?null:(e=Jfe&&e[Jfe]||e["@@iterator"],typeof e=="function"?e:null)}var rpe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},npe=Object.assign,ope={};function sP(e,t,r){this.props=e,this.context=t,this.refs=ope,this.updater=r||rpe}sP.prototype.isReactComponent={};sP.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};sP.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ape(){}ape.prototype=sP.prototype;function r9(e,t,r){this.props=e,this.context=t,this.refs=ope,this.updater=r||rpe}var n9=r9.prototype=new ape;n9.constructor=r9;npe(n9,sP.prototype);n9.isPureReactComponent=!0;var epe=Array.isArray,ipe=Object.prototype.hasOwnProperty,o9={current:null},spe={key:!0,ref:!0,__self:!0,__source:!0};function lpe(e,t,r){var n,o={},a=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)ipe.call(t,n)&&!spe.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(s===1)o.children=r;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)o[n]===void 0&&(o[n]=s[n]);return{$$typeof:gT,type:e,key:a,ref:i,props:o,_owner:o9.current}}function Mot(e,t){return{$$typeof:gT,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function a9(e){return typeof e=="object"&&e!==null&&e.$$typeof===gT}function Tot(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var tpe=/\/+/g;function t9(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Tot(""+e.key):t.toString(36)}function sB(e,t,r,n,o){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case gT:case yot:i=!0}}if(i)return i=e,o=o(i),e=n===""?"."+t9(i,0):n,epe(o)?(r="",e!=null&&(r=e.replace(tpe,"$&/")+"/"),sB(o,t,r,"",function(c){return c})):o!=null&&(a9(o)&&(o=Mot(o,r+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(tpe,"$&/")+"/")+e)),t.push(o)),1;if(i=0,n=n===""?".":n+":",epe(e))for(var s=0;s<e.length;s++){a=e[s];var l=n+t9(a,s);i+=sB(a,t,r,l,o)}else if(l=Not(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=n+t9(a,s++),i+=sB(a,t,r,l,o);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function iB(e,t,r){if(e==null)return e;var n=[],o=0;return sB(e,n,"","",function(a){return t.call(r,a,o++)}),n}function Aot(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Xc={current:null},lB={transition:null},Lot={ReactCurrentDispatcher:Xc,ReactCurrentBatchConfig:lB,ReactCurrentOwner:o9};function cpe(){throw Error("act(...) is not supported in production builds of React.")}_n.Children={map:iB,forEach:function(e,t,r){iB(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return iB(e,function(){t++}),t},toArray:function(e){return iB(e,function(t){return t})||[]},only:function(e){if(!a9(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};_n.Component=sP;_n.Fragment=xot;_n.Profiler=wot;_n.PureComponent=r9;_n.StrictMode=bot;_n.Suspense=Iot;_n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Lot;_n.act=cpe;_n.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=npe({},e.props),o=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=o9.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)ipe.call(t,l)&&!spe.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var c=0;c<l;c++)s[c]=arguments[c+2];n.children=s}return{$$typeof:gT,type:e.type,key:o,ref:a,props:n,_owner:i}};_n.createContext=function(e){return e={$$typeof:Sot,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Cot,_context:e},e.Consumer=e};_n.createElement=lpe;_n.createFactory=function(e){var t=lpe.bind(null,e);return t.type=e,t};_n.createRef=function(){return{current:null}};_n.forwardRef=function(e){return{$$typeof:Pot,render:e}};_n.isValidElement=a9;_n.lazy=function(e){return{$$typeof:Rot,_payload:{_status:-1,_result:e},_init:Aot}};_n.memo=function(e,t){return{$$typeof:kot,type:e,compare:t===void 0?null:t}};_n.startTransition=function(e){var t=lB.transition;lB.transition={};try{e()}finally{lB.transition=t}};_n.unstable_act=cpe;_n.useCallback=function(e,t){return Xc.current.useCallback(e,t)};_n.useContext=function(e){return Xc.current.useContext(e)};_n.useDebugValue=function(){};_n.useDeferredValue=function(e){return Xc.current.useDeferredValue(e)};_n.useEffect=function(e,t){return Xc.current.useEffect(e,t)};_n.useId=function(){return Xc.current.useId()};_n.useImperativeHandle=function(e,t,r){return Xc.current.useImperativeHandle(e,t,r)};_n.useInsertionEffect=function(e,t){return Xc.current.useInsertionEffect(e,t)};_n.useLayoutEffect=function(e,t){return Xc.current.useLayoutEffect(e,t)};_n.useMemo=function(e,t){return Xc.current.useMemo(e,t)};_n.useReducer=function(e,t,r){return Xc.current.useReducer(e,t,r)};_n.useRef=function(e){return Xc.current.useRef(e)};_n.useState=function(e){return Xc.current.useState(e)};_n.useSyncExternalStore=function(e,t,r){return Xc.current.useSyncExternalStore(e,t,r)};_n.useTransition=function(){return Xc.current.useTransition()};_n.version="18.3.1"});var ce=de((wdr,dpe)=>{"use strict";dpe.exports=upe()});var fpe={};rP(fpe,{CLITokenReader:()=>lP,cliTokenReader:()=>cP});var lP,cP,i9=Z8(()=>{"use strict";lP=class{constructor(){this.cachedToken=null;this.lastCheck=0;this.CACHE_DURATION=5*60*1e3}static getInstance(){return this.instance||(this.instance=new lP),this.instance}async getDeviceFingerprint(){try{let t=this.detectBrowserPlatform(),r=process.env.NEXT_PUBLIC_MOONUI_HOSTNAME||(typeof window<"u"?window.location.hostname:"unknown"),n=await this.generateBrowserSpecificUserHash(),o=await this.generateBrowserMachineId(),a=`${t}-${r}-${n}-${o}`;return console.log("[MoonUI Pro] Environment-independent browser fingerprint generated:",{platform:t,hostname:r,browserUserHash:n.substring(0,4)+"***",browserMachineId:o.substring(0,4)+"***",fingerprint:a.substring(0,30)+"***",security:"environment-independent"}),a}catch(t){return console.error("[MoonUI Pro] Device fingerprint generation failed:",t),"browser-fallback-device"}}async generateBrowserSpecificUserHash(){try{let r=[navigator.userAgent,navigator.language,navigator.languages?.join(",")||"",`${screen.width}x${screen.height}x${screen.colorDepth}`,`${window.devicePixelRatio||1}`,`${navigator.hardwareConcurrency||0}`,`${navigator.maxTouchPoints||0}`,Intl.DateTimeFormat().resolvedOptions().timeZone,Intl.DateTimeFormat().resolvedOptions().locale,typeof window.WebGL2RenderingContext<"u"?"webgl2":"webgl1",typeof window.AudioContext<"u"?"audio":"no-audio",typeof navigator.serviceWorker<"u"?"sw":"no-sw"].join("|");return(await this.sha256Hash(r)).substring(0,8)}catch{console.warn("[MoonUI Pro] Browser user hash generation failed, using fallback");let r=`${navigator.userAgent.length}-${screen.width}-${Date.now()%1e4}`;return this.fallbackHash(r)}}detectBrowserPlatform(){if(typeof window>"u")return"unknown";let t=navigator.userAgent.toLowerCase();return t.includes("mac")||t.includes("darwin")?"darwin":t.includes("win")||t.includes("windows")?"win32":t.includes("linux")||t.includes("x11")?"linux":"unknown"}async generateBrowserMachineId(){if(typeof window>"u")return"ssr-fallback";try{let t=[];t.push(`${screen.width}x${screen.height}`),t.push(`${screen.colorDepth}`),t.push(`${window.devicePixelRatio||1}`),t.push(navigator.userAgent),t.push(navigator.language),t.push(`${navigator.hardwareConcurrency||0}`),t.push(`${navigator.maxTouchPoints||0}`),t.push(Intl.DateTimeFormat().resolvedOptions().timeZone);let r=await this.generateCanvasFingerprint();t.push(r);let n=this.generateWebGLFingerprint();t.push(n);let o=await this.generateAudioFingerprint();t.push(o);let a=t.join("|");return(await this.sha256Hash(a)).substring(0,6)}catch(t){console.warn("[MoonUI Pro] Machine ID generation fallback:",t);let r=`${screen.width}-${navigator.userAgent.length}-${navigator.language}`;return(await this.sha256Hash(r)).substring(0,6)}}async generateCanvasFingerprint(){try{let t=document.createElement("canvas"),r=t.getContext("2d");if(!r)return"no-canvas";r.textBaseline="top",r.font="14px Arial",r.fillStyle="#f60",r.fillRect(125,1,62,20),r.fillStyle="#069",r.fillText("MoonUI Browser Fingerprint \u{1F510}",2,15),r.fillStyle="rgba(102, 204, 0, 0.7)",r.fillRect(45,25,80,15);let n=t.toDataURL();return(await this.sha256Hash(n)).substring(0,8)}catch{return"canvas-error"}}generateWebGLFingerprint(){try{let t=document.createElement("canvas"),r=t.getContext("webgl")||t.getContext("experimental-webgl");if(!r)return"no-webgl";let n=r.getExtension("WEBGL_debug_renderer_info"),o=n?r.getParameter(n.UNMASKED_VENDOR_WEBGL):"unknown",a=n?r.getParameter(n.UNMASKED_RENDERER_WEBGL):"unknown";return`${o}-${a}`.replace(/\s+/g,"-").substring(0,16)}catch{return"webgl-error"}}async generateAudioFingerprint(){try{let t=window.AudioContext||window.webkitAudioContext;if(!t)return"no-audio";let r=new t,n=r.createOscillator(),o=r.createGain();n.type="triangle",n.frequency.setValueAtTime(1e3,r.currentTime),o.gain.setValueAtTime(.01,r.currentTime),n.connect(o),o.connect(r.destination);let a=[r.sampleRate.toString(),r.destination.maxChannelCount.toString(),r.destination.channelCount.toString(),r.baseLatency?r.baseLatency.toString():"0",r.outputLatency?r.outputLatency.toString():"0"].join("-");try{r.close()}catch{}return a.substring(0,8)}catch{return"audio-error"}}validateDeviceCompatibility(t,r){let n=t.split("-"),o=r.split("-");if(n.length<3||o.length<3)return{compatible:!1,reason:"Invalid device ID format"};let a=n[0]===o[0],i=n[1]===o[1],s=n[2]===o[2];return a?i?s?{compatible:!0}:{compatible:!1,reason:"User account mismatch"}:{compatible:!1,reason:"Hostname mismatch (different machine)"}:{compatible:!1,reason:"Platform mismatch (different OS)"}}async sha256Hash(t){if(typeof crypto<"u"&&crypto.subtle){let n=new TextEncoder().encode(t),o=await crypto.subtle.digest("SHA-256",n);return Array.from(new Uint8Array(o)).map(s=>s.toString(16).padStart(2,"0")).join("").substring(0,8)}return console.warn("[MoonUI Pro] Using fallback hash - install crypto polyfill for production"),this.fallbackHash(t)}fallbackHash(t){let r=0;for(let n=0;n<t.length;n++){let o=t.charCodeAt(n);r=(r<<5)-r+o,r=r&r}return Math.abs(r).toString(16).padStart(8,"0")}parseToken(t){try{let r=atob(t),n=JSON.parse(r);return!n.token||!n.deviceId?(console.error("[MoonUI Pro] Invalid token format - missing required fields"),null):n}catch(r){return console.error("[MoonUI Pro] Failed to parse token:",r),null}}async validateWithAPI(t,r,n){try{let o=await fetch("https://moonui.dev/api/cli/validate-session",{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({deviceId:r,browserDeviceId:n,timestamp:Date.now(),validationType:"hybrid-strict"})});if(!o.ok){let a=await o.json().catch(()=>({}));return console.error("[MoonUI Pro] Session validation failed:",a.message||"Unknown error"),!1}return!0}catch(o){return console.error("[MoonUI Pro] API validation error:",o),!0}}async getCLIToken(){let t=Date.now();if(this.cachedToken&&t-this.lastCheck<this.CACHE_DURATION)return this.cachedToken.token;let r=process.env.NEXT_PUBLIC_MOONUI_DEV_TOKEN;if(!r)return console.log("[MoonUI Pro] No development token found. Run: moonui init --auth"),null;let n=this.parseToken(r);if(!n)return null;let o=await this.getDeviceFingerprint(),a=n.deviceId;if(console.log("[MoonUI Pro] Hybrid device compatibility check:",{currentDevice:o.substring(0,25)+"***",tokenDevice:a.substring(0,25)+"***"}),a){let s=this.validateDeviceCompatibility(a,o);if(!s.compatible)return console.error("[MoonUI Pro] Device compatibility check failed!"),console.error("[MoonUI Pro] Reason:",s.reason),console.error("[MoonUI Pro] This indicates:"),console.log(" \u2022 Token was created on a different machine or user account"),console.log(" \u2022 .env.local file may have been copied from another device"),console.log(" \u2022 Different hostname or user profile detected"),console.log("[MoonUI Pro] Solutions:"),console.log(' \u2022 Run "moonui login" on this device to create a new session'),console.log(" \u2022 Ensure you are using the correct user account"),console.log(" \u2022 Verify hostname matches the original login device"),console.log(" \u2022 Contact support for multi-device licensing options"),null;console.log("[MoonUI Pro] Device compatibility validated successfully")}return await this.validateWithAPI(n.token,a,o)?(this.cachedToken=n,this.lastCheck=t,console.log("[MoonUI Pro] CLI authentication validated",{user:n.user?.email,plan:n.user?.plan||"free",deviceId:a||o,deviceValidated:!0}),n.token):(console.error("[MoonUI Pro] Device session validation failed"),console.log("[MoonUI Pro] This may happen if:"),console.log(" \u2022 You logged out from CLI (moonui logout)"),console.log(" \u2022 Device limit exceeded"),console.log(" \u2022 Session expired"),console.log(" \u2022 Device was revoked from dashboard"),console.log(" \u2022 Token was copied from another device (strict security)"),console.log(" \u2022 Browser fingerprint doesn't match session"),console.log(' \u2022 Run "moonui login" to create a new session'),null)}clearCache(){this.cachedToken=null,this.lastCheck=0}getCachedAuthInfo(){return this.cachedToken}},cP=lP.getInstance()});var gpe={};rP(gpe,{clearCache:()=>pB,forceRefresh:()=>vT,useSubscription:()=>ct});function mpe(){return typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local"))?5*60*1e3:2*60*60*1e3}function Eot(){return typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local"))?10*60*1e3:4*60*60*1e3}function Dot(){cB.forEach(e=>e())}function sm(e){s9={...s9,...e},Dot()}async function Oot(){let e=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local")||window.location.port==="3000"||window.location.port==="3001"),t=!e;if(console.log("[MoonUI Pro Auth] Getting auth token...",{isDevelopment:e,isProduction:t,hostname:typeof window<"u"?window.location.hostname:"N/A",port:typeof window<"u"?window.location.port:"N/A"}),e){if(console.log("[MoonUI Pro Auth] Development mode - checking CLI authentication..."),typeof window<"u"){let n=localStorage.getItem(dB);if(n)try{let o=JSON.parse(n);if(Date.now()-o.timestamp<ppe){if(console.log("[MoonUI Pro Auth] Using cached CLI auth, plan:",o.plan),o.valid&&(o.plan==="lifetime"||o.plan==="pro_lifetime"))return"cli-authenticated-pro"}else console.log("[MoonUI Pro Auth] CLI cache expired, will revalidate")}catch(o){console.error("[MoonUI Pro Auth] Error parsing CLI auth cache:",o),localStorage.removeItem(dB)}}let r=await cP.getCLIToken();return r?(console.log("[MoonUI Pro Auth] Using validated CLI token"),r):(console.log("[MoonUI Pro Auth] No valid CLI token available"),console.log("[MoonUI Pro Auth] This could happen if:"),console.log(' \u2022 CLI authentication not setup: run "moonui init --auth"'),console.log(" \u2022 Token expired or session revoked"),console.log(" \u2022 Device fingerprint mismatch"),console.log(' \u2022 Login required: run "moonui login"'),null)}if(t){let r=process.env.NEXT_PUBLIC_MOONUI_AUTH_TOKEN||process.env.NEXT_PUBLIC_MOONUI_LICENSE_KEY;if(r&&r.trim()!=="")return console.log("[MoonUI Pro Auth] Found public token in environment"),r;if(typeof window<"u"){let n=localStorage.getItem("moonui_auth_token");if(n)return console.log("[MoonUI Pro Auth] Found token in localStorage"),n}return console.log("[MoonUI Pro Auth] No token found in production"),null}return null}async function uB(){let e=await Oot();if(console.log("[MoonUI Pro Auth] Validating license:",{hasToken:!!e,tokenLength:e?e.length:0,tokenPreview:e?`${e.substring(0,10)}...`:"null"}),!e){console.log("[MoonUI Pro Auth] No token found, clearing cache"),typeof window<"u"&&localStorage.removeItem(Ph),sm({hasProAccess:!1,isAuthenticated:!1,isLoading:!1});return}if(e==="cli-authenticated-pro"){console.log("[MoonUI Pro Auth] Using cached CLI authentication"),sm({hasProAccess:!0,isAuthenticated:!0,subscriptionPlan:"lifetime",subscription:{status:"active",plan:"lifetime"},isLoading:!1});return}try{console.log("[MoonUI Pro Auth] Calling validate API...");let t=await fetch("https://moonui.dev/api/auth/validate",{headers:{Authorization:`Bearer ${e}`}});if(t.ok){let r=await t.json();console.log("[MoonUI Pro Auth] API Response:",{valid:r.valid,hasLifetimeAccess:r.user?.hasLifetimeAccess,features:r.user?.features,plan:r.user?.plan});let n={valid:r.valid,hasLifetimeAccess:r.user?.hasLifetimeAccess||!1,timestamp:Date.now(),cacheUntil:r.cacheUntil?new Date(r.cacheUntil).getTime():void 0,deviceId:cP.getCachedAuthInfo()?.deviceId,sessionId:r.sessionId||`session_${Date.now()}`};typeof window<"u"&&localStorage.setItem(Ph,JSON.stringify(n));let o=r.valid&&(r.user?.hasLifetimeAccess||r.user?.features?.includes("pro_components"));console.log("[MoonUI Pro Auth] Access result:",{hasProAccess:o,isAuthenticated:r.valid}),sm({hasProAccess:o,isAuthenticated:r.valid,subscriptionPlan:o?"lifetime":"free",subscription:{status:o?"active":"inactive",plan:o?"lifetime":"free"},isLoading:!1})}else console.log("[MoonUI Pro Auth] Invalid response:",t.status),typeof window<"u"&&localStorage.removeItem(Ph),sm({hasProAccess:!1,isAuthenticated:!1,isLoading:!1})}catch{if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local"))&&typeof window<"u"){let n=localStorage.getItem(Ph);if(n){let o=JSON.parse(n);if(Date.now()-o.timestamp<Eot()){sm({hasProAccess:o.valid&&o.hasLifetimeAccess,isAuthenticated:o.valid,subscriptionPlan:o.valid&&o.hasLifetimeAccess?"lifetime":"free",subscription:{status:o.valid&&o.hasLifetimeAccess?"active":"inactive",plan:o.valid&&o.hasLifetimeAccess?"lifetime":"free"},isLoading:!1});return}}}sm({hasProAccess:!1,isAuthenticated:!1,isLoading:!1})}}async function hpe(){if(!l9){if(l9=!0,typeof window<"u"){if(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local")){let r=localStorage.getItem(dB);if(r)try{let n=JSON.parse(r);if(Date.now()-n.timestamp<ppe&&(console.log("[MoonUI Pro Auth] Using cached CLI auth from init, plan:",n.plan),n.valid&&(n.plan==="lifetime"||n.plan==="pro_lifetime"))){sm({hasProAccess:!0,isAuthenticated:!0,subscriptionPlan:"lifetime",subscription:{status:"active",plan:"lifetime"},isLoading:!1});return}}catch(n){console.error("[MoonUI Pro Auth] Error parsing CLI auth cache:",n),localStorage.removeItem(dB)}}let t=localStorage.getItem(Ph);if(t){let r=JSON.parse(t);if(Date.now()-r.timestamp<mpe())if(r.deviceId){let a=cP.getCachedAuthInfo()?.deviceId;if(a&&r.deviceId!==a)console.warn("[MoonUI Pro Auth] Device fingerprint mismatch in cache"),console.log("[MoonUI Pro Auth] Cache device:",r.deviceId),console.log("[MoonUI Pro Auth] Current device:",a),localStorage.removeItem(Ph);else{sm({hasProAccess:r.valid&&r.hasLifetimeAccess,isAuthenticated:r.valid,subscriptionPlan:r.valid&&r.hasLifetimeAccess?"lifetime":"free",subscription:{status:r.valid&&r.hasLifetimeAccess?"active":"inactive",plan:r.valid&&r.hasLifetimeAccess?"lifetime":"free"},isLoading:!1});return}}else{sm({hasProAccess:r.valid&&r.hasLifetimeAccess,isAuthenticated:r.valid,subscriptionPlan:r.valid&&r.hasLifetimeAccess?"lifetime":"free",subscription:{status:r.valid&&r.hasLifetimeAccess?"active":"inactive",plan:r.valid&&r.hasLifetimeAccess?"lifetime":"free"},isLoading:!1});return}}}await uB()}}async function vT(){typeof window<"u"&&(localStorage.removeItem(Ph),console.log("[MoonUI Pro] Cache cleared, forcing refresh...")),l9=!1,sm({isLoading:!0,hasProAccess:!1,isAuthenticated:!1}),await hpe()}function pB(){typeof window<"u"&&(localStorage.removeItem(Ph),localStorage.removeItem("moonui_auth_token"),console.log("[MoonUI Pro] Auth cache cleared")),cP.clearCache()}function ct(){let[,e]=(0,fB.useState)({});return(0,fB.useEffect)(()=>{hpe();let t=()=>e({});cB.push(t);let r=async()=>{if(typeof window<"u"){let o=localStorage.getItem(Ph);if(o){let a=JSON.parse(o);Date.now()-a.timestamp>mpe()&&(console.log("[MoonUI Pro] Cache expired on focus, revalidating..."),await uB())}else console.log("[MoonUI Pro] No cache on focus, validating..."),await uB()}},n=async o=>{(o.key==="moonui_auth_token"||o.key===Ph)&&(console.log("[MoonUI Pro] Auth storage changed, revalidating..."),o.newValue?await vT():sm({hasProAccess:!1,isAuthenticated:!1,isLoading:!1}))};return window.addEventListener("focus",r),window.addEventListener("storage",n),()=>{let o=cB.indexOf(t);o>-1&&cB.splice(o,1),window.removeEventListener("focus",r),window.removeEventListener("storage",n)}},[]),{...s9,checkAccess:uB,forceRefresh:vT,clearCache:pB}}var fB,s9,l9,cB,Ph,dB,ppe,_r=Z8(()=>{"use strict";fB=E(ce(),1);i9();s9={isLoading:!0,hasProAccess:!1,isAuthenticated:!1,subscriptionPlan:"free",subscription:{status:"inactive",plan:"free"},isAdmin:!1},l9=!1,cB=[],Ph="moonui_license_cache",dB="moonui_cli_auth_cache",ppe=60*60*1e3});var ype=de(mB=>{"use strict";var _ot=ce(),Fot=Symbol.for("react.element"),Bot=Symbol.for("react.fragment"),Vot=Object.prototype.hasOwnProperty,Uot=_ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,zot={key:!0,ref:!0,__self:!0,__source:!0};function vpe(e,t,r){var n,o={},a=null,i=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)Vot.call(t,n)&&!zot.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:Fot,type:e,key:a,ref:i,props:o,_owner:Uot.current}}mB.Fragment=Bot;mB.jsx=vpe;mB.jsxs=vpe});var ue=de((Pdr,xpe)=>{"use strict";xpe.exports=ype()});var jpe=de(ha=>{"use strict";function g9(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,o=e[n];if(0<yB(o,t))e[n]=t,e[r]=o,r=n;else break e}}function um(e){return e.length===0?null:e[0]}function bB(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,o=e.length,a=o>>>1;n<a;){var i=2*(n+1)-1,s=e[i],l=i+1,c=e[l];if(0>yB(s,r))l<o&&0>yB(c,s)?(e[n]=c,e[l]=r,n=l):(e[n]=s,e[i]=r,n=i);else if(l<o&&0>yB(c,r))e[n]=c,e[l]=r,n=l;else break e}}return t}function yB(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Dpe=performance,ha.unstable_now=function(){return Dpe.now()}):(p9=Date,Ope=p9.now(),ha.unstable_now=function(){return p9.now()-Ope});var Dpe,p9,Ope,kh=[],Ix=[],eat=1,Hf=null,hc=3,wB=!1,Iw=!1,bT=!1,Bpe=typeof setTimeout=="function"?setTimeout:null,Vpe=typeof clearTimeout=="function"?clearTimeout:null,_pe=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v9(e){for(var t=um(Ix);t!==null;){if(t.callback===null)bB(Ix);else if(t.startTime<=e)bB(Ix),t.sortIndex=t.expirationTime,g9(kh,t);else break;t=um(Ix)}}function y9(e){if(bT=!1,v9(e),!Iw)if(um(kh)!==null)Iw=!0,b9(x9);else{var t=um(Ix);t!==null&&w9(y9,t.startTime-e)}}function x9(e,t){Iw=!1,bT&&(bT=!1,Vpe(wT),wT=-1),wB=!0;var r=hc;try{for(v9(t),Hf=um(kh);Hf!==null&&(!(Hf.expirationTime>t)||e&&!Hpe());){var n=Hf.callback;if(typeof n=="function"){Hf.callback=null,hc=Hf.priorityLevel;var o=n(Hf.expirationTime<=t);t=ha.unstable_now(),typeof o=="function"?Hf.callback=o:Hf===um(kh)&&bB(kh),v9(t)}else bB(kh);Hf=um(kh)}if(Hf!==null)var a=!0;else{var i=um(Ix);i!==null&&w9(y9,i.startTime-t),a=!1}return a}finally{Hf=null,hc=r,wB=!1}}var CB=!1,xB=null,wT=-1,Upe=5,zpe=-1;function Hpe(){return!(ha.unstable_now()-zpe<Upe)}function m9(){if(xB!==null){var e=ha.unstable_now();zpe=e;var t=!0;try{t=xB(!0,e)}finally{t?xT():(CB=!1,xB=null)}}else CB=!1}var xT;typeof _pe=="function"?xT=function(){_pe(m9)}:typeof MessageChannel<"u"?(h9=new MessageChannel,Fpe=h9.port2,h9.port1.onmessage=m9,xT=function(){Fpe.postMessage(null)}):xT=function(){Bpe(m9,0)};var h9,Fpe;function b9(e){xB=e,CB||(CB=!0,xT())}function w9(e,t){wT=Bpe(function(){e(ha.unstable_now())},t)}ha.unstable_IdlePriority=5;ha.unstable_ImmediatePriority=1;ha.unstable_LowPriority=4;ha.unstable_NormalPriority=3;ha.unstable_Profiling=null;ha.unstable_UserBlockingPriority=2;ha.unstable_cancelCallback=function(e){e.callback=null};ha.unstable_continueExecution=function(){Iw||wB||(Iw=!0,b9(x9))};ha.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Upe=0<e?Math.floor(1e3/e):5};ha.unstable_getCurrentPriorityLevel=function(){return hc};ha.unstable_getFirstCallbackNode=function(){return um(kh)};ha.unstable_next=function(e){switch(hc){case 1:case 2:case 3:var t=3;break;default:t=hc}var r=hc;hc=t;try{return e()}finally{hc=r}};ha.unstable_pauseExecution=function(){};ha.unstable_requestPaint=function(){};ha.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=hc;hc=e;try{return t()}finally{hc=r}};ha.unstable_scheduleCallback=function(e,t,r){var n=ha.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?n+r:n):r=n,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=r+o,e={id:eat++,callback:t,priorityLevel:e,startTime:r,expirationTime:o,sortIndex:-1},r>n?(e.sortIndex=r,g9(Ix,e),um(kh)===null&&e===um(Ix)&&(bT?(Vpe(wT),wT=-1):bT=!0,w9(y9,r-n))):(e.sortIndex=o,g9(kh,e),Iw||wB||(Iw=!0,b9(x9))),e};ha.unstable_shouldYield=Hpe;ha.unstable_wrapCallback=function(e){var t=hc;return function(){var r=hc;hc=t;try{return e.apply(this,arguments)}finally{hc=r}}}});var qpe=de((Wdr,$pe)=>{"use strict";$pe.exports=jpe()});var Xge=de(Kd=>{"use strict";var tat=ce(),Wd=qpe();function dt(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Qme=new Set,jT={};function Bw(e,t){AP(e,t),AP(e+"Capture",t)}function AP(e,t){for(jT[e]=t,e=0;e<t.length;e++)Qme.add(t[e])}var Sv=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$9=Object.prototype.hasOwnProperty,rat=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Wpe={},Gpe={};function nat(e){return $9.call(Gpe,e)?!0:$9.call(Wpe,e)?!1:rat.test(e)?Gpe[e]=!0:(Wpe[e]=!0,!1)}function oat(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function aat(e,t,r,n){if(t===null||typeof t>"u"||oat(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Qc(e,t,r,n,o,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var $l={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){$l[e]=new Qc(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];$l[t]=new Qc(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){$l[e]=new Qc(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){$l[e]=new Qc(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){$l[e]=new Qc(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){$l[e]=new Qc(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){$l[e]=new Qc(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){$l[e]=new Qc(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){$l[e]=new Qc(e,5,!1,e.toLowerCase(),null,!1,!1)});var _K=/[\-:]([a-z])/g;function FK(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(_K,FK);$l[t]=new Qc(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(_K,FK);$l[t]=new Qc(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(_K,FK);$l[t]=new Qc(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){$l[e]=new Qc(e,1,!1,e.toLowerCase(),null,!1,!1)});$l.xlinkHref=new Qc("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){$l[e]=new Qc(e,1,!1,e.toLowerCase(),null,!0,!0)});function BK(e,t,r,n){var o=$l.hasOwnProperty(t)?$l[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(aat(t,r,o,n)&&(r=null),n||o===null?nat(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(t=o.attributeName,n=o.attributeNamespace,r===null?e.removeAttribute(t):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Rv=tat.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,SB=Symbol.for("react.element"),pP=Symbol.for("react.portal"),mP=Symbol.for("react.fragment"),VK=Symbol.for("react.strict_mode"),q9=Symbol.for("react.profiler"),Jme=Symbol.for("react.provider"),ehe=Symbol.for("react.context"),UK=Symbol.for("react.forward_ref"),W9=Symbol.for("react.suspense"),G9=Symbol.for("react.suspense_list"),zK=Symbol.for("react.memo"),Rx=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var the=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var Kpe=Symbol.iterator;function CT(e){return e===null||typeof e!="object"?null:(e=Kpe&&e[Kpe]||e["@@iterator"],typeof e=="function"?e:null)}var bi=Object.assign,C9;function TT(e){if(C9===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);C9=t&&t[1]||""}return`
8
+ "use strict";var MoonUIPro=(()=>{var _nt=Object.create;var oB=Object.defineProperty;var Fnt=Object.getOwnPropertyDescriptor;var Bnt=Object.getOwnPropertyNames;var Vnt=Object.getPrototypeOf,Unt=Object.prototype.hasOwnProperty;var Ufe=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var Z8=(e,t)=>()=>(e&&(t=e(e=0)),t);var de=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),rP=(e,t)=>{for(var r in t)oB(e,r,{get:t[r],enumerable:!0})},zfe=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Bnt(t))!Unt.call(e,o)&&o!==r&&oB(e,o,{get:()=>t[o],enumerable:!(n=Fnt(t,o))||n.enumerable});return e};var E=(e,t,r)=>(r=e!=null?_nt(Vnt(e)):{},zfe(t||!e||!e.__esModule?oB(r,"default",{value:e,enumerable:!0}):r,e)),Hfe=e=>zfe(oB({},"__esModule",{value:!0}),e);var jfe=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var co=(e,t,r)=>(jfe(e,t,"read from private field"),r?r.call(e):t.get(e)),aB=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},nP=(e,t,r,n)=>(jfe(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var upe=de(_n=>{"use strict";var gT=Symbol.for("react.element"),yot=Symbol.for("react.portal"),xot=Symbol.for("react.fragment"),bot=Symbol.for("react.strict_mode"),wot=Symbol.for("react.profiler"),Cot=Symbol.for("react.provider"),Sot=Symbol.for("react.context"),Pot=Symbol.for("react.forward_ref"),Iot=Symbol.for("react.suspense"),kot=Symbol.for("react.memo"),Rot=Symbol.for("react.lazy"),Jfe=Symbol.iterator;function Not(e){return e===null||typeof e!="object"?null:(e=Jfe&&e[Jfe]||e["@@iterator"],typeof e=="function"?e:null)}var rpe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},npe=Object.assign,ope={};function sP(e,t,r){this.props=e,this.context=t,this.refs=ope,this.updater=r||rpe}sP.prototype.isReactComponent={};sP.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};sP.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ape(){}ape.prototype=sP.prototype;function r9(e,t,r){this.props=e,this.context=t,this.refs=ope,this.updater=r||rpe}var n9=r9.prototype=new ape;n9.constructor=r9;npe(n9,sP.prototype);n9.isPureReactComponent=!0;var epe=Array.isArray,ipe=Object.prototype.hasOwnProperty,o9={current:null},spe={key:!0,ref:!0,__self:!0,__source:!0};function lpe(e,t,r){var n,o={},a=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)ipe.call(t,n)&&!spe.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(s===1)o.children=r;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)o[n]===void 0&&(o[n]=s[n]);return{$$typeof:gT,type:e,key:a,ref:i,props:o,_owner:o9.current}}function Mot(e,t){return{$$typeof:gT,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function a9(e){return typeof e=="object"&&e!==null&&e.$$typeof===gT}function Tot(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var tpe=/\/+/g;function t9(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Tot(""+e.key):t.toString(36)}function sB(e,t,r,n,o){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case gT:case yot:i=!0}}if(i)return i=e,o=o(i),e=n===""?"."+t9(i,0):n,epe(o)?(r="",e!=null&&(r=e.replace(tpe,"$&/")+"/"),sB(o,t,r,"",function(c){return c})):o!=null&&(a9(o)&&(o=Mot(o,r+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(tpe,"$&/")+"/")+e)),t.push(o)),1;if(i=0,n=n===""?".":n+":",epe(e))for(var s=0;s<e.length;s++){a=e[s];var l=n+t9(a,s);i+=sB(a,t,r,l,o)}else if(l=Not(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=n+t9(a,s++),i+=sB(a,t,r,l,o);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function iB(e,t,r){if(e==null)return e;var n=[],o=0;return sB(e,n,"","",function(a){return t.call(r,a,o++)}),n}function Aot(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Xc={current:null},lB={transition:null},Lot={ReactCurrentDispatcher:Xc,ReactCurrentBatchConfig:lB,ReactCurrentOwner:o9};function cpe(){throw Error("act(...) is not supported in production builds of React.")}_n.Children={map:iB,forEach:function(e,t,r){iB(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return iB(e,function(){t++}),t},toArray:function(e){return iB(e,function(t){return t})||[]},only:function(e){if(!a9(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};_n.Component=sP;_n.Fragment=xot;_n.Profiler=wot;_n.PureComponent=r9;_n.StrictMode=bot;_n.Suspense=Iot;_n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Lot;_n.act=cpe;_n.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=npe({},e.props),o=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=o9.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)ipe.call(t,l)&&!spe.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var c=0;c<l;c++)s[c]=arguments[c+2];n.children=s}return{$$typeof:gT,type:e.type,key:o,ref:a,props:n,_owner:i}};_n.createContext=function(e){return e={$$typeof:Sot,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Cot,_context:e},e.Consumer=e};_n.createElement=lpe;_n.createFactory=function(e){var t=lpe.bind(null,e);return t.type=e,t};_n.createRef=function(){return{current:null}};_n.forwardRef=function(e){return{$$typeof:Pot,render:e}};_n.isValidElement=a9;_n.lazy=function(e){return{$$typeof:Rot,_payload:{_status:-1,_result:e},_init:Aot}};_n.memo=function(e,t){return{$$typeof:kot,type:e,compare:t===void 0?null:t}};_n.startTransition=function(e){var t=lB.transition;lB.transition={};try{e()}finally{lB.transition=t}};_n.unstable_act=cpe;_n.useCallback=function(e,t){return Xc.current.useCallback(e,t)};_n.useContext=function(e){return Xc.current.useContext(e)};_n.useDebugValue=function(){};_n.useDeferredValue=function(e){return Xc.current.useDeferredValue(e)};_n.useEffect=function(e,t){return Xc.current.useEffect(e,t)};_n.useId=function(){return Xc.current.useId()};_n.useImperativeHandle=function(e,t,r){return Xc.current.useImperativeHandle(e,t,r)};_n.useInsertionEffect=function(e,t){return Xc.current.useInsertionEffect(e,t)};_n.useLayoutEffect=function(e,t){return Xc.current.useLayoutEffect(e,t)};_n.useMemo=function(e,t){return Xc.current.useMemo(e,t)};_n.useReducer=function(e,t,r){return Xc.current.useReducer(e,t,r)};_n.useRef=function(e){return Xc.current.useRef(e)};_n.useState=function(e){return Xc.current.useState(e)};_n.useSyncExternalStore=function(e,t,r){return Xc.current.useSyncExternalStore(e,t,r)};_n.useTransition=function(){return Xc.current.useTransition()};_n.version="18.3.1"});var ce=de((wdr,dpe)=>{"use strict";dpe.exports=upe()});var fpe={};rP(fpe,{CLITokenReader:()=>lP,cliTokenReader:()=>cP});var lP,cP,i9=Z8(()=>{"use strict";lP=class{constructor(){this.cachedToken=null;this.lastCheck=0;this.CACHE_DURATION=5*60*1e3}static getInstance(){return this.instance||(this.instance=new lP),this.instance}async getDeviceFingerprint(){try{let t=this.detectBrowserPlatform(),r=process.env.NEXT_PUBLIC_MOONUI_HOSTNAME||(typeof window<"u"?window.location.hostname:"unknown"),n=await this.generateBrowserSpecificUserHash(),o=await this.generateBrowserMachineId(),a=`${t}-${r}-${n}-${o}`;return console.log("[MoonUI Pro] Environment-independent browser fingerprint generated:",{platform:t,hostname:r,browserUserHash:n.substring(0,4)+"***",browserMachineId:o.substring(0,4)+"***",fingerprint:a.substring(0,30)+"***",security:"environment-independent"}),a}catch(t){return console.error("[MoonUI Pro] Device fingerprint generation failed:",t),"browser-fallback-device"}}async generateBrowserSpecificUserHash(){try{let r=[navigator.userAgent,navigator.language,navigator.languages?.join(",")||"",`${screen.width}x${screen.height}x${screen.colorDepth}`,`${window.devicePixelRatio||1}`,`${navigator.hardwareConcurrency||0}`,`${navigator.maxTouchPoints||0}`,Intl.DateTimeFormat().resolvedOptions().timeZone,Intl.DateTimeFormat().resolvedOptions().locale,typeof window.WebGL2RenderingContext<"u"?"webgl2":"webgl1",typeof window.AudioContext<"u"?"audio":"no-audio",typeof navigator.serviceWorker<"u"?"sw":"no-sw"].join("|");return(await this.sha256Hash(r)).substring(0,8)}catch{console.warn("[MoonUI Pro] Browser user hash generation failed, using fallback");let r=`${navigator.userAgent.length}-${screen.width}-${navigator.language}`;return this.fallbackHash(r)}}detectBrowserPlatform(){if(typeof window>"u")return"unknown";let t=navigator.userAgent.toLowerCase();return t.includes("mac")||t.includes("darwin")?"darwin":t.includes("win")||t.includes("windows")?"win32":t.includes("linux")||t.includes("x11")?"linux":"unknown"}async generateBrowserMachineId(){if(typeof window>"u")return"ssr-fallback";try{let t=[];t.push(`${screen.width}x${screen.height}`),t.push(`${screen.colorDepth}`),t.push(`${window.devicePixelRatio||1}`),t.push(navigator.userAgent),t.push(navigator.language),t.push(`${navigator.hardwareConcurrency||0}`),t.push(`${navigator.maxTouchPoints||0}`),t.push(Intl.DateTimeFormat().resolvedOptions().timeZone);let r=await this.generateCanvasFingerprint();t.push(r);let n=this.generateWebGLFingerprint();t.push(n);let o=await this.generateAudioFingerprint();t.push(o);let a=t.join("|");return(await this.sha256Hash(a)).substring(0,6)}catch(t){console.warn("[MoonUI Pro] Machine ID generation fallback:",t);let r=`${screen.width}-${navigator.userAgent.length}-${navigator.language}`;return(await this.sha256Hash(r)).substring(0,6)}}async generateCanvasFingerprint(){try{let t=document.createElement("canvas"),r=t.getContext("2d");if(!r)return"no-canvas";r.textBaseline="top",r.font="14px Arial",r.fillStyle="#f60",r.fillRect(125,1,62,20),r.fillStyle="#069",r.fillText("MoonUI Browser Fingerprint \u{1F510}",2,15),r.fillStyle="rgba(102, 204, 0, 0.7)",r.fillRect(45,25,80,15);let n=t.toDataURL();return(await this.sha256Hash(n)).substring(0,8)}catch{return"canvas-error"}}generateWebGLFingerprint(){try{let t=document.createElement("canvas"),r=t.getContext("webgl")||t.getContext("experimental-webgl");if(!r)return"no-webgl";let n=r.getExtension("WEBGL_debug_renderer_info"),o=n?r.getParameter(n.UNMASKED_VENDOR_WEBGL):"unknown",a=n?r.getParameter(n.UNMASKED_RENDERER_WEBGL):"unknown";return`${o}-${a}`.replace(/\s+/g,"-").substring(0,16)}catch{return"webgl-error"}}async generateAudioFingerprint(){try{let t=window.AudioContext||window.webkitAudioContext;if(!t)return"no-audio";let r=new t,n=r.createOscillator(),o=r.createGain();n.type="triangle",n.frequency.setValueAtTime(1e3,r.currentTime),o.gain.setValueAtTime(.01,r.currentTime),n.connect(o),o.connect(r.destination);let a=[r.sampleRate.toString(),r.destination.maxChannelCount.toString(),r.destination.channelCount.toString(),r.baseLatency?r.baseLatency.toString():"0",r.outputLatency?r.outputLatency.toString():"0"].join("-");try{r.close()}catch{}return a.substring(0,8)}catch{return"audio-error"}}validateDeviceCompatibility(t,r){let n=t.split("-"),o=r.split("-");if(n.length<3||o.length<3)return{compatible:!1,requiresAPIValidation:!1,reason:"Invalid device ID format"};let a=n[0]===o[0],i=n[1]===o[1],s=n[2]===o[2];if(console.log("[MoonUI Pro] Device ID comparison:",{platform:{token:n[0],current:o[0],match:a},hostname:{token:n[1],current:o[1],match:i},userHash:{token:n[2],current:o[2],match:s},machineHash:{token:n[3],current:o[3],match:n[3]===o[3]}}),!a)return{compatible:!1,requiresAPIValidation:!1,reason:`Platform mismatch: token=${n[0]}, current=${o[0]}`};if(!i)return{compatible:!1,requiresAPIValidation:!1,reason:`Hostname mismatch: token=${n[1]}, current=${o[1]}`};if(!s)return{compatible:!1,requiresAPIValidation:!1,reason:`User hash mismatch: token=${n[2]}, current=${o[2]}`};let l=n[3]||"",c=o[3]||"";return l===c?{compatible:!0,requiresAPIValidation:!1}:{compatible:!0,requiresAPIValidation:!0}}async sha256Hash(t){if(typeof crypto<"u"&&crypto.subtle){let n=new TextEncoder().encode(t),o=await crypto.subtle.digest("SHA-256",n);return Array.from(new Uint8Array(o)).map(s=>s.toString(16).padStart(2,"0")).join("").substring(0,8)}return console.warn("[MoonUI Pro] Using fallback hash - install crypto polyfill for production"),this.fallbackHash(t)}fallbackHash(t){let r=0;for(let n=0;n<t.length;n++){let o=t.charCodeAt(n);r=(r<<5)-r+o,r=r&r}return Math.abs(r).toString(16).padStart(8,"0")}parseToken(t){try{let r=atob(t),n=JSON.parse(r);return!n.token||!n.deviceId?(console.error("[MoonUI Pro] Invalid token format - missing required fields"),null):n}catch(r){return console.error("[MoonUI Pro] Failed to parse token:",r),null}}async validateWithAPI(t,r,n){try{let o=await fetch("https://moonui.dev/api/cli/validate-session",{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({deviceId:r,browserDeviceId:n,timestamp:Date.now(),validationType:"hybrid-strict"})});if(!o.ok){let a=await o.json().catch(()=>({}));return console.error("[MoonUI Pro] Session validation failed:",a.message||"Unknown error"),!1}return!0}catch(o){return console.error("[MoonUI Pro] API validation error:",o),!0}}async getCLIToken(){let t=Date.now();if(this.cachedToken&&t-this.lastCheck<this.CACHE_DURATION)return this.cachedToken.token;let r=process.env.NEXT_PUBLIC_MOONUI_DEV_TOKEN;if(!r)return console.log("[MoonUI Pro] No development token found. Run: moonui init --auth"),null;let n=this.parseToken(r);if(!n)return null;let o=await this.getDeviceFingerprint(),a=n.deviceId;if(console.log("[MoonUI Pro] Hybrid device compatibility check:",{currentDevice:o.substring(0,25)+"***",tokenDevice:a.substring(0,25)+"***"}),a){let s=this.validateDeviceCompatibility(a,o);if(!s.compatible)return console.error("[MoonUI Pro] Device compatibility check failed!"),console.error("[MoonUI Pro] Reason:",s.reason),console.error("[MoonUI Pro] This indicates:"),console.log(" \u2022 Token was created on a different machine or user account"),console.log(" \u2022 .env.local file may have been copied from another device"),console.log(" \u2022 Different hostname or user profile detected"),console.log("[MoonUI Pro] Solutions:"),console.log(' \u2022 Run "moonui login" on this device to create a new session'),console.log(" \u2022 Ensure you are using the correct user account"),console.log(" \u2022 Verify hostname matches the original login device"),console.log(" \u2022 Contact support for multi-device licensing options"),null;s.requiresAPIValidation?(console.log("[MoonUI Pro] Device hash mismatch detected - performing API validation"),console.log("[MoonUI Pro] This is normal for CLI-Browser authentication")):console.log("[MoonUI Pro] Perfect device match - skipping API validation")}return await this.validateWithAPI(n.token,a,o)?(this.cachedToken=n,this.lastCheck=t,console.log("[MoonUI Pro] CLI authentication validated",{user:n.user?.email,plan:n.user?.plan||"free",deviceId:a||o,deviceValidated:!0}),n.token):(console.error("[MoonUI Pro] Device session validation failed"),console.log("[MoonUI Pro] This may happen if:"),console.log(" \u2022 You logged out from CLI (moonui logout)"),console.log(" \u2022 Device limit exceeded"),console.log(" \u2022 Session expired"),console.log(" \u2022 Device was revoked from dashboard"),console.log(" \u2022 Token was copied from another device (strict security)"),console.log(" \u2022 Browser fingerprint doesn't match session"),console.log(' \u2022 Run "moonui login" to create a new session'),null)}clearCache(){this.cachedToken=null,this.lastCheck=0}getCachedAuthInfo(){return this.cachedToken}},cP=lP.getInstance()});var gpe={};rP(gpe,{clearCache:()=>pB,forceRefresh:()=>vT,useSubscription:()=>ct});function mpe(){return typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local"))?5*60*1e3:2*60*60*1e3}function Eot(){return typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local"))?10*60*1e3:4*60*60*1e3}function Dot(){cB.forEach(e=>e())}function sm(e){s9={...s9,...e},Dot()}async function Oot(){let e=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local")||window.location.port==="3000"||window.location.port==="3001"),t=!e;if(console.log("[MoonUI Pro Auth] Getting auth token...",{isDevelopment:e,isProduction:t,hostname:typeof window<"u"?window.location.hostname:"N/A",port:typeof window<"u"?window.location.port:"N/A"}),e){if(console.log("[MoonUI Pro Auth] Development mode - checking CLI authentication..."),typeof window<"u"){let n=localStorage.getItem(dB);if(n)try{let o=JSON.parse(n);if(Date.now()-o.timestamp<ppe){if(console.log("[MoonUI Pro Auth] Using cached CLI auth, plan:",o.plan),o.valid&&(o.plan==="lifetime"||o.plan==="pro_lifetime"))return"cli-authenticated-pro"}else console.log("[MoonUI Pro Auth] CLI cache expired, will revalidate")}catch(o){console.error("[MoonUI Pro Auth] Error parsing CLI auth cache:",o),localStorage.removeItem(dB)}}let r=await cP.getCLIToken();return r?(console.log("[MoonUI Pro Auth] Using validated CLI token"),r):(console.log("[MoonUI Pro Auth] No valid CLI token available"),console.log("[MoonUI Pro Auth] This could happen if:"),console.log(' \u2022 CLI authentication not setup: run "moonui init --auth"'),console.log(" \u2022 Token expired or session revoked"),console.log(" \u2022 Device fingerprint mismatch"),console.log(' \u2022 Login required: run "moonui login"'),null)}if(t){let r=process.env.NEXT_PUBLIC_MOONUI_AUTH_TOKEN||process.env.NEXT_PUBLIC_MOONUI_LICENSE_KEY;if(r&&r.trim()!=="")return console.log("[MoonUI Pro Auth] Found public token in environment"),r;if(typeof window<"u"){let n=localStorage.getItem("moonui_auth_token");if(n)return console.log("[MoonUI Pro Auth] Found token in localStorage"),n}return console.log("[MoonUI Pro Auth] No token found in production"),null}return null}async function uB(){let e=await Oot();if(console.log("[MoonUI Pro Auth] Validating license:",{hasToken:!!e,tokenLength:e?e.length:0,tokenPreview:e?`${e.substring(0,10)}...`:"null"}),!e){console.log("[MoonUI Pro Auth] No token found, clearing cache"),typeof window<"u"&&localStorage.removeItem(Ph),sm({hasProAccess:!1,isAuthenticated:!1,isLoading:!1});return}if(e==="cli-authenticated-pro"){console.log("[MoonUI Pro Auth] Using cached CLI authentication"),sm({hasProAccess:!0,isAuthenticated:!0,subscriptionPlan:"lifetime",subscription:{status:"active",plan:"lifetime"},isLoading:!1});return}try{console.log("[MoonUI Pro Auth] Calling validate API...");let t=await fetch("https://moonui.dev/api/auth/validate",{headers:{Authorization:`Bearer ${e}`}});if(t.ok){let r=await t.json();console.log("[MoonUI Pro Auth] API Response:",{valid:r.valid,hasLifetimeAccess:r.user?.hasLifetimeAccess,features:r.user?.features,plan:r.user?.plan});let n={valid:r.valid,hasLifetimeAccess:r.user?.hasLifetimeAccess||!1,timestamp:Date.now(),cacheUntil:r.cacheUntil?new Date(r.cacheUntil).getTime():void 0,deviceId:cP.getCachedAuthInfo()?.deviceId,sessionId:r.sessionId||`session_${Date.now()}`};typeof window<"u"&&localStorage.setItem(Ph,JSON.stringify(n));let o=r.valid&&(r.user?.hasLifetimeAccess||r.user?.features?.includes("pro_components"));console.log("[MoonUI Pro Auth] Access result:",{hasProAccess:o,isAuthenticated:r.valid}),sm({hasProAccess:o,isAuthenticated:r.valid,subscriptionPlan:o?"lifetime":"free",subscription:{status:o?"active":"inactive",plan:o?"lifetime":"free"},isLoading:!1})}else console.log("[MoonUI Pro Auth] Invalid response:",t.status),typeof window<"u"&&localStorage.removeItem(Ph),sm({hasProAccess:!1,isAuthenticated:!1,isLoading:!1})}catch{if(typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local"))&&typeof window<"u"){let n=localStorage.getItem(Ph);if(n){let o=JSON.parse(n);if(Date.now()-o.timestamp<Eot()){sm({hasProAccess:o.valid&&o.hasLifetimeAccess,isAuthenticated:o.valid,subscriptionPlan:o.valid&&o.hasLifetimeAccess?"lifetime":"free",subscription:{status:o.valid&&o.hasLifetimeAccess?"active":"inactive",plan:o.valid&&o.hasLifetimeAccess?"lifetime":"free"},isLoading:!1});return}}}sm({hasProAccess:!1,isAuthenticated:!1,isLoading:!1})}}async function hpe(){if(!l9){if(l9=!0,typeof window<"u"){if(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local")){let r=localStorage.getItem(dB);if(r)try{let n=JSON.parse(r);if(Date.now()-n.timestamp<ppe&&(console.log("[MoonUI Pro Auth] Using cached CLI auth from init, plan:",n.plan),n.valid&&(n.plan==="lifetime"||n.plan==="pro_lifetime"))){sm({hasProAccess:!0,isAuthenticated:!0,subscriptionPlan:"lifetime",subscription:{status:"active",plan:"lifetime"},isLoading:!1});return}}catch(n){console.error("[MoonUI Pro Auth] Error parsing CLI auth cache:",n),localStorage.removeItem(dB)}}let t=localStorage.getItem(Ph);if(t){let r=JSON.parse(t);if(Date.now()-r.timestamp<mpe())if(r.deviceId){let a=cP.getCachedAuthInfo()?.deviceId;if(a&&r.deviceId!==a)console.warn("[MoonUI Pro Auth] Device fingerprint mismatch in cache"),console.log("[MoonUI Pro Auth] Cache device:",r.deviceId),console.log("[MoonUI Pro Auth] Current device:",a),localStorage.removeItem(Ph);else{sm({hasProAccess:r.valid&&r.hasLifetimeAccess,isAuthenticated:r.valid,subscriptionPlan:r.valid&&r.hasLifetimeAccess?"lifetime":"free",subscription:{status:r.valid&&r.hasLifetimeAccess?"active":"inactive",plan:r.valid&&r.hasLifetimeAccess?"lifetime":"free"},isLoading:!1});return}}else{sm({hasProAccess:r.valid&&r.hasLifetimeAccess,isAuthenticated:r.valid,subscriptionPlan:r.valid&&r.hasLifetimeAccess?"lifetime":"free",subscription:{status:r.valid&&r.hasLifetimeAccess?"active":"inactive",plan:r.valid&&r.hasLifetimeAccess?"lifetime":"free"},isLoading:!1});return}}}await uB()}}async function vT(){typeof window<"u"&&(localStorage.removeItem(Ph),console.log("[MoonUI Pro] Cache cleared, forcing refresh...")),l9=!1,sm({isLoading:!0,hasProAccess:!1,isAuthenticated:!1}),await hpe()}function pB(){typeof window<"u"&&(localStorage.removeItem(Ph),localStorage.removeItem("moonui_auth_token"),console.log("[MoonUI Pro] Auth cache cleared")),cP.clearCache()}function ct(){let[,e]=(0,fB.useState)({});return(0,fB.useEffect)(()=>{hpe();let t=()=>e({});cB.push(t);let r=async()=>{if(typeof window<"u"){let o=localStorage.getItem(Ph);if(o){let a=JSON.parse(o);Date.now()-a.timestamp>mpe()&&(console.log("[MoonUI Pro] Cache expired on focus, revalidating..."),await uB())}else console.log("[MoonUI Pro] No cache on focus, validating..."),await uB()}},n=async o=>{(o.key==="moonui_auth_token"||o.key===Ph)&&(console.log("[MoonUI Pro] Auth storage changed, revalidating..."),o.newValue?await vT():sm({hasProAccess:!1,isAuthenticated:!1,isLoading:!1}))};return window.addEventListener("focus",r),window.addEventListener("storage",n),()=>{let o=cB.indexOf(t);o>-1&&cB.splice(o,1),window.removeEventListener("focus",r),window.removeEventListener("storage",n)}},[]),{...s9,checkAccess:uB,forceRefresh:vT,clearCache:pB}}var fB,s9,l9,cB,Ph,dB,ppe,_r=Z8(()=>{"use strict";fB=E(ce(),1);i9();s9={isLoading:!0,hasProAccess:!1,isAuthenticated:!1,subscriptionPlan:"free",subscription:{status:"inactive",plan:"free"},isAdmin:!1},l9=!1,cB=[],Ph="moonui_license_cache",dB="moonui_cli_auth_cache",ppe=60*60*1e3});var ype=de(mB=>{"use strict";var _ot=ce(),Fot=Symbol.for("react.element"),Bot=Symbol.for("react.fragment"),Vot=Object.prototype.hasOwnProperty,Uot=_ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,zot={key:!0,ref:!0,__self:!0,__source:!0};function vpe(e,t,r){var n,o={},a=null,i=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)Vot.call(t,n)&&!zot.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:Fot,type:e,key:a,ref:i,props:o,_owner:Uot.current}}mB.Fragment=Bot;mB.jsx=vpe;mB.jsxs=vpe});var ue=de((Pdr,xpe)=>{"use strict";xpe.exports=ype()});var jpe=de(ha=>{"use strict";function g9(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,o=e[n];if(0<yB(o,t))e[n]=t,e[r]=o,r=n;else break e}}function um(e){return e.length===0?null:e[0]}function bB(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,o=e.length,a=o>>>1;n<a;){var i=2*(n+1)-1,s=e[i],l=i+1,c=e[l];if(0>yB(s,r))l<o&&0>yB(c,s)?(e[n]=c,e[l]=r,n=l):(e[n]=s,e[i]=r,n=i);else if(l<o&&0>yB(c,r))e[n]=c,e[l]=r,n=l;else break e}}return t}function yB(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Dpe=performance,ha.unstable_now=function(){return Dpe.now()}):(p9=Date,Ope=p9.now(),ha.unstable_now=function(){return p9.now()-Ope});var Dpe,p9,Ope,kh=[],Ix=[],eat=1,Hf=null,hc=3,wB=!1,Iw=!1,bT=!1,Bpe=typeof setTimeout=="function"?setTimeout:null,Vpe=typeof clearTimeout=="function"?clearTimeout:null,_pe=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v9(e){for(var t=um(Ix);t!==null;){if(t.callback===null)bB(Ix);else if(t.startTime<=e)bB(Ix),t.sortIndex=t.expirationTime,g9(kh,t);else break;t=um(Ix)}}function y9(e){if(bT=!1,v9(e),!Iw)if(um(kh)!==null)Iw=!0,b9(x9);else{var t=um(Ix);t!==null&&w9(y9,t.startTime-e)}}function x9(e,t){Iw=!1,bT&&(bT=!1,Vpe(wT),wT=-1),wB=!0;var r=hc;try{for(v9(t),Hf=um(kh);Hf!==null&&(!(Hf.expirationTime>t)||e&&!Hpe());){var n=Hf.callback;if(typeof n=="function"){Hf.callback=null,hc=Hf.priorityLevel;var o=n(Hf.expirationTime<=t);t=ha.unstable_now(),typeof o=="function"?Hf.callback=o:Hf===um(kh)&&bB(kh),v9(t)}else bB(kh);Hf=um(kh)}if(Hf!==null)var a=!0;else{var i=um(Ix);i!==null&&w9(y9,i.startTime-t),a=!1}return a}finally{Hf=null,hc=r,wB=!1}}var CB=!1,xB=null,wT=-1,Upe=5,zpe=-1;function Hpe(){return!(ha.unstable_now()-zpe<Upe)}function m9(){if(xB!==null){var e=ha.unstable_now();zpe=e;var t=!0;try{t=xB(!0,e)}finally{t?xT():(CB=!1,xB=null)}}else CB=!1}var xT;typeof _pe=="function"?xT=function(){_pe(m9)}:typeof MessageChannel<"u"?(h9=new MessageChannel,Fpe=h9.port2,h9.port1.onmessage=m9,xT=function(){Fpe.postMessage(null)}):xT=function(){Bpe(m9,0)};var h9,Fpe;function b9(e){xB=e,CB||(CB=!0,xT())}function w9(e,t){wT=Bpe(function(){e(ha.unstable_now())},t)}ha.unstable_IdlePriority=5;ha.unstable_ImmediatePriority=1;ha.unstable_LowPriority=4;ha.unstable_NormalPriority=3;ha.unstable_Profiling=null;ha.unstable_UserBlockingPriority=2;ha.unstable_cancelCallback=function(e){e.callback=null};ha.unstable_continueExecution=function(){Iw||wB||(Iw=!0,b9(x9))};ha.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Upe=0<e?Math.floor(1e3/e):5};ha.unstable_getCurrentPriorityLevel=function(){return hc};ha.unstable_getFirstCallbackNode=function(){return um(kh)};ha.unstable_next=function(e){switch(hc){case 1:case 2:case 3:var t=3;break;default:t=hc}var r=hc;hc=t;try{return e()}finally{hc=r}};ha.unstable_pauseExecution=function(){};ha.unstable_requestPaint=function(){};ha.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=hc;hc=e;try{return t()}finally{hc=r}};ha.unstable_scheduleCallback=function(e,t,r){var n=ha.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?n+r:n):r=n,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=r+o,e={id:eat++,callback:t,priorityLevel:e,startTime:r,expirationTime:o,sortIndex:-1},r>n?(e.sortIndex=r,g9(Ix,e),um(kh)===null&&e===um(Ix)&&(bT?(Vpe(wT),wT=-1):bT=!0,w9(y9,r-n))):(e.sortIndex=o,g9(kh,e),Iw||wB||(Iw=!0,b9(x9))),e};ha.unstable_shouldYield=Hpe;ha.unstable_wrapCallback=function(e){var t=hc;return function(){var r=hc;hc=t;try{return e.apply(this,arguments)}finally{hc=r}}}});var qpe=de((Wdr,$pe)=>{"use strict";$pe.exports=jpe()});var Xge=de(Kd=>{"use strict";var tat=ce(),Wd=qpe();function dt(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Qme=new Set,jT={};function Bw(e,t){AP(e,t),AP(e+"Capture",t)}function AP(e,t){for(jT[e]=t,e=0;e<t.length;e++)Qme.add(t[e])}var Sv=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$9=Object.prototype.hasOwnProperty,rat=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Wpe={},Gpe={};function nat(e){return $9.call(Gpe,e)?!0:$9.call(Wpe,e)?!1:rat.test(e)?Gpe[e]=!0:(Wpe[e]=!0,!1)}function oat(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function aat(e,t,r,n){if(t===null||typeof t>"u"||oat(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Qc(e,t,r,n,o,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var $l={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){$l[e]=new Qc(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];$l[t]=new Qc(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){$l[e]=new Qc(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){$l[e]=new Qc(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){$l[e]=new Qc(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){$l[e]=new Qc(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){$l[e]=new Qc(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){$l[e]=new Qc(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){$l[e]=new Qc(e,5,!1,e.toLowerCase(),null,!1,!1)});var _K=/[\-:]([a-z])/g;function FK(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(_K,FK);$l[t]=new Qc(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(_K,FK);$l[t]=new Qc(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(_K,FK);$l[t]=new Qc(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){$l[e]=new Qc(e,1,!1,e.toLowerCase(),null,!1,!1)});$l.xlinkHref=new Qc("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){$l[e]=new Qc(e,1,!1,e.toLowerCase(),null,!0,!0)});function BK(e,t,r,n){var o=$l.hasOwnProperty(t)?$l[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(aat(t,r,o,n)&&(r=null),n||o===null?nat(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(t=o.attributeName,n=o.attributeNamespace,r===null?e.removeAttribute(t):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Rv=tat.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,SB=Symbol.for("react.element"),pP=Symbol.for("react.portal"),mP=Symbol.for("react.fragment"),VK=Symbol.for("react.strict_mode"),q9=Symbol.for("react.profiler"),Jme=Symbol.for("react.provider"),ehe=Symbol.for("react.context"),UK=Symbol.for("react.forward_ref"),W9=Symbol.for("react.suspense"),G9=Symbol.for("react.suspense_list"),zK=Symbol.for("react.memo"),Rx=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var the=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var Kpe=Symbol.iterator;function CT(e){return e===null||typeof e!="object"?null:(e=Kpe&&e[Kpe]||e["@@iterator"],typeof e=="function"?e:null)}var bi=Object.assign,C9;function TT(e){if(C9===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);C9=t&&t[1]||""}return`
9
9
  `+C9+e}var S9=!1;function P9(e,t){if(!e||S9)return"";S9=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var o=c.stack.split(`
10
10
  `),a=n.stack.split(`
11
11
  `),i=o.length-1,s=a.length-1;1<=i&&0<=s&&o[i]!==a[s];)s--;for(;1<=i&&0<=s;i--,s--)if(o[i]!==a[s]){if(i!==1||s!==1)do if(i--,s--,0>s||o[i]!==a[s]){var l=`