@moontra/moonui-pro 2.32.37 → 2.32.38

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 Rnt=Object.create;var rB=Object.defineProperty;var Nnt=Object.getOwnPropertyDescriptor;var Mnt=Object.getOwnPropertyNames;var Tnt=Object.getPrototypeOf,Ant=Object.prototype.hasOwnProperty;var Ffe=(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 K8=(e,t)=>()=>(e&&(t=e(e=0)),t);var de=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),tP=(e,t)=>{for(var r in t)rB(e,r,{get:t[r],enumerable:!0})},Bfe=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Mnt(t))!Ant.call(e,o)&&o!==r&&rB(e,o,{get:()=>t[o],enumerable:!(n=Nnt(t,o))||n.enumerable});return e};var E=(e,t,r)=>(r=e!=null?Rnt(Tnt(e)):{},Bfe(t||!e||!e.__esModule?rB(r,"default",{value:e,enumerable:!0}):r,e)),Vfe=e=>Bfe(rB({},"__esModule",{value:!0}),e);var Ufe=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var co=(e,t,r)=>(Ufe(e,t,"read from private field"),r?r.call(e):t.get(e)),nB=(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)},rP=(e,t,r,n)=>(Ufe(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var spe=de(_n=>{"use strict";var hT=Symbol.for("react.element"),cot=Symbol.for("react.portal"),uot=Symbol.for("react.fragment"),dot=Symbol.for("react.strict_mode"),fot=Symbol.for("react.profiler"),pot=Symbol.for("react.provider"),mot=Symbol.for("react.context"),hot=Symbol.for("react.forward_ref"),got=Symbol.for("react.suspense"),vot=Symbol.for("react.memo"),yot=Symbol.for("react.lazy"),Yfe=Symbol.iterator;function xot(e){return e===null||typeof e!="object"?null:(e=Yfe&&e[Yfe]||e["@@iterator"],typeof e=="function"?e:null)}var Jfe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},epe=Object.assign,tpe={};function iP(e,t,r){this.props=e,this.context=t,this.refs=tpe,this.updater=r||Jfe}iP.prototype.isReactComponent={};iP.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")};iP.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function rpe(){}rpe.prototype=iP.prototype;function J8(e,t,r){this.props=e,this.context=t,this.refs=tpe,this.updater=r||Jfe}var e9=J8.prototype=new rpe;e9.constructor=J8;epe(e9,iP.prototype);e9.isPureReactComponent=!0;var Zfe=Array.isArray,npe=Object.prototype.hasOwnProperty,t9={current:null},ope={key:!0,ref:!0,__self:!0,__source:!0};function ape(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)npe.call(t,n)&&!ope.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:hT,type:e,key:a,ref:i,props:o,_owner:t9.current}}function bot(e,t){return{$$typeof:hT,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function r9(e){return typeof e=="object"&&e!==null&&e.$$typeof===hT}function wot(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Qfe=/\/+/g;function Q8(e,t){return typeof e=="object"&&e!==null&&e.key!=null?wot(""+e.key):t.toString(36)}function aB(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 hT:case cot:i=!0}}if(i)return i=e,o=o(i),e=n===""?"."+Q8(i,0):n,Zfe(o)?(r="",e!=null&&(r=e.replace(Qfe,"$&/")+"/"),aB(o,t,r,"",function(c){return c})):o!=null&&(r9(o)&&(o=bot(o,r+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(Qfe,"$&/")+"/")+e)),t.push(o)),1;if(i=0,n=n===""?".":n+":",Zfe(e))for(var s=0;s<e.length;s++){a=e[s];var l=n+Q8(a,s);i+=aB(a,t,r,l,o)}else if(l=xot(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=n+Q8(a,s++),i+=aB(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 oB(e,t,r){if(e==null)return e;var n=[],o=0;return aB(e,n,"","",function(a){return t.call(r,a,o++)}),n}function Cot(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},iB={transition:null},Sot={ReactCurrentDispatcher:Xc,ReactCurrentBatchConfig:iB,ReactCurrentOwner:t9};function ipe(){throw Error("act(...) is not supported in production builds of React.")}_n.Children={map:oB,forEach:function(e,t,r){oB(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return oB(e,function(){t++}),t},toArray:function(e){return oB(e,function(t){return t})||[]},only:function(e){if(!r9(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};_n.Component=iP;_n.Fragment=uot;_n.Profiler=fot;_n.PureComponent=J8;_n.StrictMode=dot;_n.Suspense=got;_n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Sot;_n.act=ipe;_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=epe({},e.props),o=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=t9.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)npe.call(t,l)&&!ope.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:hT,type:e.type,key:o,ref:a,props:n,_owner:i}};_n.createContext=function(e){return e={$$typeof:mot,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:pot,_context:e},e.Consumer=e};_n.createElement=ape;_n.createFactory=function(e){var t=ape.bind(null,e);return t.type=e,t};_n.createRef=function(){return{current:null}};_n.forwardRef=function(e){return{$$typeof:hot,render:e}};_n.isValidElement=r9;_n.lazy=function(e){return{$$typeof:yot,_payload:{_status:-1,_result:e},_init:Cot}};_n.memo=function(e,t){return{$$typeof:vot,type:e,compare:t===void 0?null:t}};_n.startTransition=function(e){var t=iB.transition;iB.transition={};try{e()}finally{iB.transition=t}};_n.unstable_act=ipe;_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((ddr,lpe)=>{"use strict";lpe.exports=spe()});var cpe={};tP(cpe,{CLITokenReader:()=>sP,cliTokenReader:()=>lP});var sP,lP,n9=K8(()=>{"use strict";sP=class{constructor(){this.cachedToken=null;this.lastCheck=0;this.CACHE_DURATION=5*60*1e3}static getInstance(){return this.instance||(this.instance=new sP),this.instance}async getRealExternalIP(){try{let t=await this.getWebRTCIP();if(t&&t!=="unknown")return t;if(typeof window<"u"){let r=window.location.hostname;if(r!=="localhost"&&r!=="127.0.0.1")return r}return"192.168.1.2"}catch{return console.warn("[MoonUI Pro] External IP detection failed, using fallback"),"192.168.1.2"}}async getWebRTCIP(){return new Promise(t=>{console.log("[MoonUI Pro] WebRTC IP detection starting...");try{let r=new RTCPeerConnection({iceServers:[{urls:"stun:stun.l.google.com:19302"}]});r.createDataChannel("ip-detection");let n=0;r.onicecandidate=o=>{if(n++,console.log(`[MoonUI Pro] WebRTC candidate ${n}:`,o.candidate?.candidate),o.candidate){let i=o.candidate.candidate.match(/(\d+\.\d+\.\d+\.\d+)/);if(i&&i[1]){let s=i[1];if(console.log(`[MoonUI Pro] WebRTC IP found: ${s}`),!s.startsWith("127.")&&!s.startsWith("0.")){console.log(`[MoonUI Pro] WebRTC IP accepted: ${s}`),r.close(),t(s);return}else console.log(`[MoonUI Pro] WebRTC IP rejected (localhost): ${s}`)}}},r.onicecandidateerror=o=>{console.error("[MoonUI Pro] WebRTC ICE candidate error:",o)},r.createOffer().then(o=>(console.log("[MoonUI Pro] WebRTC offer created successfully"),r.setLocalDescription(o))).catch(o=>{console.error("[MoonUI Pro] WebRTC offer creation failed:",o),t("unknown")}),setTimeout(()=>{console.log(`[MoonUI Pro] WebRTC timeout after ${n} candidates`),r.close(),t("unknown")},5e3)}catch(r){console.error("[MoonUI Pro] WebRTC initialization failed:",r),t("unknown")}})}async getDeviceFingerprint(){try{let t=this.detectBrowserPlatform(),r=await this.getRealExternalIP(),n=await this.generateBrowserSpecificUserHash(),o=await this.generateBrowserMachineId(),a=`browser-${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}},lP=sP.getInstance()});var fpe={};tP(fpe,{clearCache:()=>uB,forceRefresh:()=>gT,useSubscription:()=>ct});function upe(){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 Pot(){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 Iot(){sB.forEach(e=>e())}function gv(e){o9={...o9,...e},Iot()}async function kot(){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){console.log("[MoonUI Pro Auth] Development mode - checking CLI authentication...");let r=await lP.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 lB(){let e=await kot();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(Ch),gv({hasProAccess:!1,isAuthenticated:!1,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:lP.getCachedAuthInfo()?.deviceId,sessionId:r.sessionId||`session_${Date.now()}`};typeof window<"u"&&localStorage.setItem(Ch,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}),gv({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(Ch),gv({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(Ch);if(n){let o=JSON.parse(n);if(Date.now()-o.timestamp<Pot()){gv({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}}}gv({hasProAccess:!1,isAuthenticated:!1,isLoading:!1})}}async function dpe(){if(!a9){if(a9=!0,typeof window<"u"){let e=localStorage.getItem(Ch);if(e){let t=JSON.parse(e);if(Date.now()-t.timestamp<upe())if(t.deviceId){let o=lP.getCachedAuthInfo()?.deviceId;if(o&&t.deviceId!==o)console.warn("[MoonUI Pro Auth] Device fingerprint mismatch in cache"),console.log("[MoonUI Pro Auth] Cache device:",t.deviceId),console.log("[MoonUI Pro Auth] Current device:",o),localStorage.removeItem(Ch);else{gv({hasProAccess:t.valid&&t.hasLifetimeAccess,isAuthenticated:t.valid,subscriptionPlan:t.valid&&t.hasLifetimeAccess?"lifetime":"free",subscription:{status:t.valid&&t.hasLifetimeAccess?"active":"inactive",plan:t.valid&&t.hasLifetimeAccess?"lifetime":"free"},isLoading:!1});return}}else{gv({hasProAccess:t.valid&&t.hasLifetimeAccess,isAuthenticated:t.valid,subscriptionPlan:t.valid&&t.hasLifetimeAccess?"lifetime":"free",subscription:{status:t.valid&&t.hasLifetimeAccess?"active":"inactive",plan:t.valid&&t.hasLifetimeAccess?"lifetime":"free"},isLoading:!1});return}}}await lB()}}async function gT(){typeof window<"u"&&(localStorage.removeItem(Ch),console.log("[MoonUI Pro] Cache cleared, forcing refresh...")),a9=!1,gv({isLoading:!0,hasProAccess:!1,isAuthenticated:!1}),await dpe()}function uB(){typeof window<"u"&&(localStorage.removeItem(Ch),localStorage.removeItem("moonui_auth_token"),console.log("[MoonUI Pro] Auth cache cleared")),lP.clearCache()}function ct(){let[,e]=(0,cB.useState)({});return(0,cB.useEffect)(()=>{dpe();let t=()=>e({});sB.push(t);let r=async()=>{if(typeof window<"u"){let o=localStorage.getItem(Ch);if(o){let a=JSON.parse(o);Date.now()-a.timestamp>upe()&&(console.log("[MoonUI Pro] Cache expired on focus, revalidating..."),await lB())}else console.log("[MoonUI Pro] No cache on focus, validating..."),await lB()}},n=async o=>{(o.key==="moonui_auth_token"||o.key===Ch)&&(console.log("[MoonUI Pro] Auth storage changed, revalidating..."),o.newValue?await gT():gv({hasProAccess:!1,isAuthenticated:!1,isLoading:!1}))};return window.addEventListener("focus",r),window.addEventListener("storage",n),()=>{let o=sB.indexOf(t);o>-1&&sB.splice(o,1),window.removeEventListener("focus",r),window.removeEventListener("storage",n)}},[]),{...o9,checkAccess:lB,forceRefresh:gT,clearCache:uB}}var cB,o9,a9,sB,Ch,_r=K8(()=>{"use strict";cB=E(ce(),1);n9();o9={isLoading:!0,hasProAccess:!1,isAuthenticated:!1,subscriptionPlan:"free",subscription:{status:"inactive",plan:"free"},isAdmin:!1},a9=!1,sB=[],Ch="moonui_license_cache"});var hpe=de(fB=>{"use strict";var Rot=ce(),Not=Symbol.for("react.element"),Mot=Symbol.for("react.fragment"),Tot=Object.prototype.hasOwnProperty,Aot=Rot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Lot={key:!0,ref:!0,__self:!0,__source:!0};function mpe(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)Tot.call(t,n)&&!Lot.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:Not,type:e,key:a,ref:i,props:o,_owner:Aot.current}}fB.Fragment=Mot;fB.jsx=mpe;fB.jsxs=mpe});var ue=de((hdr,gpe)=>{"use strict";gpe.exports=hpe()});var Dpe=de(ha=>{"use strict";function p9(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,o=e[n];if(0<hB(o,t))e[n]=t,e[r]=o,r=n;else break e}}function lm(e){return e.length===0?null:e[0]}function vB(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>hB(s,r))l<o&&0>hB(c,s)?(e[n]=c,e[l]=r,n=l):(e[n]=s,e[i]=r,n=i);else if(l<o&&0>hB(c,r))e[n]=c,e[l]=r,n=l;else break e}}return t}function hB(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Ipe=performance,ha.unstable_now=function(){return Ipe.now()}):(u9=Date,kpe=u9.now(),ha.unstable_now=function(){return u9.now()-kpe});var Ipe,u9,kpe,Ph=[],Px=[],$ot=1,Hf=null,hc=3,yB=!1,Pw=!1,yT=!1,Mpe=typeof setTimeout=="function"?setTimeout:null,Tpe=typeof clearTimeout=="function"?clearTimeout:null,Rpe=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m9(e){for(var t=lm(Px);t!==null;){if(t.callback===null)vB(Px);else if(t.startTime<=e)vB(Px),t.sortIndex=t.expirationTime,p9(Ph,t);else break;t=lm(Px)}}function h9(e){if(yT=!1,m9(e),!Pw)if(lm(Ph)!==null)Pw=!0,v9(g9);else{var t=lm(Px);t!==null&&y9(h9,t.startTime-e)}}function g9(e,t){Pw=!1,yT&&(yT=!1,Tpe(xT),xT=-1),yB=!0;var r=hc;try{for(m9(t),Hf=lm(Ph);Hf!==null&&(!(Hf.expirationTime>t)||e&&!Epe());){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===lm(Ph)&&vB(Ph),m9(t)}else vB(Ph);Hf=lm(Ph)}if(Hf!==null)var a=!0;else{var i=lm(Px);i!==null&&y9(h9,i.startTime-t),a=!1}return a}finally{Hf=null,hc=r,yB=!1}}var xB=!1,gB=null,xT=-1,Ape=5,Lpe=-1;function Epe(){return!(ha.unstable_now()-Lpe<Ape)}function d9(){if(gB!==null){var e=ha.unstable_now();Lpe=e;var t=!0;try{t=gB(!0,e)}finally{t?vT():(xB=!1,gB=null)}}else xB=!1}var vT;typeof Rpe=="function"?vT=function(){Rpe(d9)}:typeof MessageChannel<"u"?(f9=new MessageChannel,Npe=f9.port2,f9.port1.onmessage=d9,vT=function(){Npe.postMessage(null)}):vT=function(){Mpe(d9,0)};var f9,Npe;function v9(e){gB=e,xB||(xB=!0,vT())}function y9(e,t){xT=Mpe(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(){Pw||yB||(Pw=!0,v9(g9))};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"):Ape=0<e?Math.floor(1e3/e):5};ha.unstable_getCurrentPriorityLevel=function(){return hc};ha.unstable_getFirstCallbackNode=function(){return lm(Ph)};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:$ot++,callback:t,priorityLevel:e,startTime:r,expirationTime:o,sortIndex:-1},r>n?(e.sortIndex=r,p9(Px,e),lm(Ph)===null&&e===lm(Px)&&(yT?(Tpe(xT),xT=-1):yT=!0,y9(h9,r-n))):(e.sortIndex=o,p9(Ph,e),Pw||yB||(Pw=!0,v9(g9))),e};ha.unstable_shouldYield=Epe;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 _pe=de((Ldr,Ope)=>{"use strict";Ope.exports=Dpe()});var Uge=de(Kd=>{"use strict";var Wot=ce(),qd=_pe();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 jme=new Set,zT={};function Fw(e,t){TP(e,t),TP(e+"Capture",t)}function TP(e,t){for(zT[e]=t,e=0;e<t.length;e++)jme.add(t[e])}var Cv=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),z9=Object.prototype.hasOwnProperty,qot=/^[: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]*$/,Fpe={},Bpe={};function Got(e){return z9.call(Bpe,e)?!0:z9.call(Fpe,e)?!1:qot.test(e)?Bpe[e]=!0:(Fpe[e]=!0,!1)}function Kot(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 Xot(e,t,r,n){if(t===null||typeof t>"u"||Kot(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 EK=/[\-:]([a-z])/g;function DK(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(EK,DK);$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(EK,DK);$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(EK,DK);$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 OK(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")&&(Xot(t,r,o,n)&&(r=null),n||o===null?Got(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 kv=Wot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,bB=Symbol.for("react.element"),fP=Symbol.for("react.portal"),pP=Symbol.for("react.fragment"),_K=Symbol.for("react.strict_mode"),H9=Symbol.for("react.profiler"),$me=Symbol.for("react.provider"),Wme=Symbol.for("react.context"),FK=Symbol.for("react.forward_ref"),j9=Symbol.for("react.suspense"),$9=Symbol.for("react.suspense_list"),BK=Symbol.for("react.memo"),kx=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var qme=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var Vpe=Symbol.iterator;function bT(e){return e===null||typeof e!="object"?null:(e=Vpe&&e[Vpe]||e["@@iterator"],typeof e=="function"?e:null)}var bi=Object.assign,x9;function NT(e){if(x9===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);x9=t&&t[1]||""}return`
8
+ "use strict";var MoonUIPro=(()=>{var Rnt=Object.create;var rB=Object.defineProperty;var Nnt=Object.getOwnPropertyDescriptor;var Mnt=Object.getOwnPropertyNames;var Tnt=Object.getPrototypeOf,Ant=Object.prototype.hasOwnProperty;var Ffe=(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 K8=(e,t)=>()=>(e&&(t=e(e=0)),t);var de=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),tP=(e,t)=>{for(var r in t)rB(e,r,{get:t[r],enumerable:!0})},Bfe=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Mnt(t))!Ant.call(e,o)&&o!==r&&rB(e,o,{get:()=>t[o],enumerable:!(n=Nnt(t,o))||n.enumerable});return e};var E=(e,t,r)=>(r=e!=null?Rnt(Tnt(e)):{},Bfe(t||!e||!e.__esModule?rB(r,"default",{value:e,enumerable:!0}):r,e)),Vfe=e=>Bfe(rB({},"__esModule",{value:!0}),e);var Ufe=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var co=(e,t,r)=>(Ufe(e,t,"read from private field"),r?r.call(e):t.get(e)),nB=(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)},rP=(e,t,r,n)=>(Ufe(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var spe=de(_n=>{"use strict";var hT=Symbol.for("react.element"),cot=Symbol.for("react.portal"),uot=Symbol.for("react.fragment"),dot=Symbol.for("react.strict_mode"),fot=Symbol.for("react.profiler"),pot=Symbol.for("react.provider"),mot=Symbol.for("react.context"),hot=Symbol.for("react.forward_ref"),got=Symbol.for("react.suspense"),vot=Symbol.for("react.memo"),yot=Symbol.for("react.lazy"),Yfe=Symbol.iterator;function xot(e){return e===null||typeof e!="object"?null:(e=Yfe&&e[Yfe]||e["@@iterator"],typeof e=="function"?e:null)}var Jfe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},epe=Object.assign,tpe={};function iP(e,t,r){this.props=e,this.context=t,this.refs=tpe,this.updater=r||Jfe}iP.prototype.isReactComponent={};iP.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")};iP.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function rpe(){}rpe.prototype=iP.prototype;function J8(e,t,r){this.props=e,this.context=t,this.refs=tpe,this.updater=r||Jfe}var e9=J8.prototype=new rpe;e9.constructor=J8;epe(e9,iP.prototype);e9.isPureReactComponent=!0;var Zfe=Array.isArray,npe=Object.prototype.hasOwnProperty,t9={current:null},ope={key:!0,ref:!0,__self:!0,__source:!0};function ape(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)npe.call(t,n)&&!ope.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:hT,type:e,key:a,ref:i,props:o,_owner:t9.current}}function bot(e,t){return{$$typeof:hT,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function r9(e){return typeof e=="object"&&e!==null&&e.$$typeof===hT}function wot(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Qfe=/\/+/g;function Q8(e,t){return typeof e=="object"&&e!==null&&e.key!=null?wot(""+e.key):t.toString(36)}function aB(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 hT:case cot:i=!0}}if(i)return i=e,o=o(i),e=n===""?"."+Q8(i,0):n,Zfe(o)?(r="",e!=null&&(r=e.replace(Qfe,"$&/")+"/"),aB(o,t,r,"",function(c){return c})):o!=null&&(r9(o)&&(o=bot(o,r+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(Qfe,"$&/")+"/")+e)),t.push(o)),1;if(i=0,n=n===""?".":n+":",Zfe(e))for(var s=0;s<e.length;s++){a=e[s];var l=n+Q8(a,s);i+=aB(a,t,r,l,o)}else if(l=xot(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=n+Q8(a,s++),i+=aB(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 oB(e,t,r){if(e==null)return e;var n=[],o=0;return aB(e,n,"","",function(a){return t.call(r,a,o++)}),n}function Cot(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},iB={transition:null},Sot={ReactCurrentDispatcher:Xc,ReactCurrentBatchConfig:iB,ReactCurrentOwner:t9};function ipe(){throw Error("act(...) is not supported in production builds of React.")}_n.Children={map:oB,forEach:function(e,t,r){oB(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return oB(e,function(){t++}),t},toArray:function(e){return oB(e,function(t){return t})||[]},only:function(e){if(!r9(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};_n.Component=iP;_n.Fragment=uot;_n.Profiler=fot;_n.PureComponent=J8;_n.StrictMode=dot;_n.Suspense=got;_n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Sot;_n.act=ipe;_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=epe({},e.props),o=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=t9.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)npe.call(t,l)&&!ope.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:hT,type:e.type,key:o,ref:a,props:n,_owner:i}};_n.createContext=function(e){return e={$$typeof:mot,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:pot,_context:e},e.Consumer=e};_n.createElement=ape;_n.createFactory=function(e){var t=ape.bind(null,e);return t.type=e,t};_n.createRef=function(){return{current:null}};_n.forwardRef=function(e){return{$$typeof:hot,render:e}};_n.isValidElement=r9;_n.lazy=function(e){return{$$typeof:yot,_payload:{_status:-1,_result:e},_init:Cot}};_n.memo=function(e,t){return{$$typeof:vot,type:e,compare:t===void 0?null:t}};_n.startTransition=function(e){var t=iB.transition;iB.transition={};try{e()}finally{iB.transition=t}};_n.unstable_act=ipe;_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((ddr,lpe)=>{"use strict";lpe.exports=spe()});var cpe={};tP(cpe,{CLITokenReader:()=>sP,cliTokenReader:()=>lP});var sP,lP,n9=K8(()=>{"use strict";sP=class{constructor(){this.cachedToken=null;this.lastCheck=0;this.CACHE_DURATION=5*60*1e3}static getInstance(){return this.instance||(this.instance=new sP),this.instance}async getRealExternalIP(){try{console.log("[MoonUI Pro] Starting real external IP detection...");let t=await this.getWebRTCIP();if(console.log("[MoonUI Pro] WebRTC returned IP:",t),t&&t!=="unknown")return console.log("[MoonUI Pro] Using WebRTC IP:",t),t;if(typeof window<"u"){let r=window.location.hostname;if(console.log("[MoonUI Pro] Fallback hostname check:",r),r!=="localhost"&&r!=="127.0.0.1")return console.log("[MoonUI Pro] Using fallback hostname:",r),r}return console.log("[MoonUI Pro] Using last resort IP: 192.168.1.2"),"192.168.1.2"}catch(t){return console.warn("[MoonUI Pro] External IP detection failed, using fallback:",t),"192.168.1.2"}}async getWebRTCIP(){return new Promise(t=>{console.log("[MoonUI Pro] WebRTC IP detection starting...");try{let r=new RTCPeerConnection({iceServers:[{urls:"stun:stun.l.google.com:19302"}]});r.createDataChannel("ip-detection");let n=0;r.onicecandidate=o=>{if(n++,console.log(`[MoonUI Pro] WebRTC candidate ${n}:`,o.candidate?.candidate),o.candidate){let i=o.candidate.candidate.match(/(\d+\.\d+\.\d+\.\d+)/);if(i&&i[1]){let s=i[1];if(console.log(`[MoonUI Pro] WebRTC IP found: ${s}`),!s.startsWith("127.")&&!s.startsWith("0.")&&s!=="0.0.0.0"){console.log(`[MoonUI Pro] WebRTC IP accepted: ${s}`),r.close(),t(s);return}else console.log(`[MoonUI Pro] WebRTC IP rejected (localhost): ${s}`)}}},r.onicecandidateerror=o=>{console.error("[MoonUI Pro] WebRTC ICE candidate error:",o)},r.createOffer().then(o=>(console.log("[MoonUI Pro] WebRTC offer created successfully"),r.setLocalDescription(o))).catch(o=>{console.error("[MoonUI Pro] WebRTC offer creation failed:",o),t("unknown")}),setTimeout(()=>{console.log(`[MoonUI Pro] WebRTC timeout after ${n} candidates`),r.close(),t("unknown")},5e3)}catch(r){console.error("[MoonUI Pro] WebRTC initialization failed:",r),t("unknown")}})}async getDeviceFingerprint(){try{let t=this.detectBrowserPlatform(),r=await this.getRealExternalIP(),n=await this.generateBrowserSpecificUserHash(),o=await this.generateBrowserMachineId(),a=`browser-${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}},lP=sP.getInstance()});var fpe={};tP(fpe,{clearCache:()=>uB,forceRefresh:()=>gT,useSubscription:()=>ct});function upe(){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 Pot(){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 Iot(){sB.forEach(e=>e())}function gv(e){o9={...o9,...e},Iot()}async function kot(){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){console.log("[MoonUI Pro Auth] Development mode - checking CLI authentication...");let r=await lP.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 lB(){let e=await kot();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(Ch),gv({hasProAccess:!1,isAuthenticated:!1,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:lP.getCachedAuthInfo()?.deviceId,sessionId:r.sessionId||`session_${Date.now()}`};typeof window<"u"&&localStorage.setItem(Ch,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}),gv({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(Ch),gv({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(Ch);if(n){let o=JSON.parse(n);if(Date.now()-o.timestamp<Pot()){gv({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}}}gv({hasProAccess:!1,isAuthenticated:!1,isLoading:!1})}}async function dpe(){if(!a9){if(a9=!0,typeof window<"u"){let e=localStorage.getItem(Ch);if(e){let t=JSON.parse(e);if(Date.now()-t.timestamp<upe())if(t.deviceId){let o=lP.getCachedAuthInfo()?.deviceId;if(o&&t.deviceId!==o)console.warn("[MoonUI Pro Auth] Device fingerprint mismatch in cache"),console.log("[MoonUI Pro Auth] Cache device:",t.deviceId),console.log("[MoonUI Pro Auth] Current device:",o),localStorage.removeItem(Ch);else{gv({hasProAccess:t.valid&&t.hasLifetimeAccess,isAuthenticated:t.valid,subscriptionPlan:t.valid&&t.hasLifetimeAccess?"lifetime":"free",subscription:{status:t.valid&&t.hasLifetimeAccess?"active":"inactive",plan:t.valid&&t.hasLifetimeAccess?"lifetime":"free"},isLoading:!1});return}}else{gv({hasProAccess:t.valid&&t.hasLifetimeAccess,isAuthenticated:t.valid,subscriptionPlan:t.valid&&t.hasLifetimeAccess?"lifetime":"free",subscription:{status:t.valid&&t.hasLifetimeAccess?"active":"inactive",plan:t.valid&&t.hasLifetimeAccess?"lifetime":"free"},isLoading:!1});return}}}await lB()}}async function gT(){typeof window<"u"&&(localStorage.removeItem(Ch),console.log("[MoonUI Pro] Cache cleared, forcing refresh...")),a9=!1,gv({isLoading:!0,hasProAccess:!1,isAuthenticated:!1}),await dpe()}function uB(){typeof window<"u"&&(localStorage.removeItem(Ch),localStorage.removeItem("moonui_auth_token"),console.log("[MoonUI Pro] Auth cache cleared")),lP.clearCache()}function ct(){let[,e]=(0,cB.useState)({});return(0,cB.useEffect)(()=>{dpe();let t=()=>e({});sB.push(t);let r=async()=>{if(typeof window<"u"){let o=localStorage.getItem(Ch);if(o){let a=JSON.parse(o);Date.now()-a.timestamp>upe()&&(console.log("[MoonUI Pro] Cache expired on focus, revalidating..."),await lB())}else console.log("[MoonUI Pro] No cache on focus, validating..."),await lB()}},n=async o=>{(o.key==="moonui_auth_token"||o.key===Ch)&&(console.log("[MoonUI Pro] Auth storage changed, revalidating..."),o.newValue?await gT():gv({hasProAccess:!1,isAuthenticated:!1,isLoading:!1}))};return window.addEventListener("focus",r),window.addEventListener("storage",n),()=>{let o=sB.indexOf(t);o>-1&&sB.splice(o,1),window.removeEventListener("focus",r),window.removeEventListener("storage",n)}},[]),{...o9,checkAccess:lB,forceRefresh:gT,clearCache:uB}}var cB,o9,a9,sB,Ch,_r=K8(()=>{"use strict";cB=E(ce(),1);n9();o9={isLoading:!0,hasProAccess:!1,isAuthenticated:!1,subscriptionPlan:"free",subscription:{status:"inactive",plan:"free"},isAdmin:!1},a9=!1,sB=[],Ch="moonui_license_cache"});var hpe=de(fB=>{"use strict";var Rot=ce(),Not=Symbol.for("react.element"),Mot=Symbol.for("react.fragment"),Tot=Object.prototype.hasOwnProperty,Aot=Rot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Lot={key:!0,ref:!0,__self:!0,__source:!0};function mpe(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)Tot.call(t,n)&&!Lot.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:Not,type:e,key:a,ref:i,props:o,_owner:Aot.current}}fB.Fragment=Mot;fB.jsx=mpe;fB.jsxs=mpe});var ue=de((hdr,gpe)=>{"use strict";gpe.exports=hpe()});var Dpe=de(ha=>{"use strict";function p9(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,o=e[n];if(0<hB(o,t))e[n]=t,e[r]=o,r=n;else break e}}function lm(e){return e.length===0?null:e[0]}function vB(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>hB(s,r))l<o&&0>hB(c,s)?(e[n]=c,e[l]=r,n=l):(e[n]=s,e[i]=r,n=i);else if(l<o&&0>hB(c,r))e[n]=c,e[l]=r,n=l;else break e}}return t}function hB(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Ipe=performance,ha.unstable_now=function(){return Ipe.now()}):(u9=Date,kpe=u9.now(),ha.unstable_now=function(){return u9.now()-kpe});var Ipe,u9,kpe,Ph=[],Px=[],$ot=1,Hf=null,hc=3,yB=!1,Pw=!1,yT=!1,Mpe=typeof setTimeout=="function"?setTimeout:null,Tpe=typeof clearTimeout=="function"?clearTimeout:null,Rpe=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m9(e){for(var t=lm(Px);t!==null;){if(t.callback===null)vB(Px);else if(t.startTime<=e)vB(Px),t.sortIndex=t.expirationTime,p9(Ph,t);else break;t=lm(Px)}}function h9(e){if(yT=!1,m9(e),!Pw)if(lm(Ph)!==null)Pw=!0,v9(g9);else{var t=lm(Px);t!==null&&y9(h9,t.startTime-e)}}function g9(e,t){Pw=!1,yT&&(yT=!1,Tpe(xT),xT=-1),yB=!0;var r=hc;try{for(m9(t),Hf=lm(Ph);Hf!==null&&(!(Hf.expirationTime>t)||e&&!Epe());){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===lm(Ph)&&vB(Ph),m9(t)}else vB(Ph);Hf=lm(Ph)}if(Hf!==null)var a=!0;else{var i=lm(Px);i!==null&&y9(h9,i.startTime-t),a=!1}return a}finally{Hf=null,hc=r,yB=!1}}var xB=!1,gB=null,xT=-1,Ape=5,Lpe=-1;function Epe(){return!(ha.unstable_now()-Lpe<Ape)}function d9(){if(gB!==null){var e=ha.unstable_now();Lpe=e;var t=!0;try{t=gB(!0,e)}finally{t?vT():(xB=!1,gB=null)}}else xB=!1}var vT;typeof Rpe=="function"?vT=function(){Rpe(d9)}:typeof MessageChannel<"u"?(f9=new MessageChannel,Npe=f9.port2,f9.port1.onmessage=d9,vT=function(){Npe.postMessage(null)}):vT=function(){Mpe(d9,0)};var f9,Npe;function v9(e){gB=e,xB||(xB=!0,vT())}function y9(e,t){xT=Mpe(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(){Pw||yB||(Pw=!0,v9(g9))};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"):Ape=0<e?Math.floor(1e3/e):5};ha.unstable_getCurrentPriorityLevel=function(){return hc};ha.unstable_getFirstCallbackNode=function(){return lm(Ph)};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:$ot++,callback:t,priorityLevel:e,startTime:r,expirationTime:o,sortIndex:-1},r>n?(e.sortIndex=r,p9(Px,e),lm(Ph)===null&&e===lm(Px)&&(yT?(Tpe(xT),xT=-1):yT=!0,y9(h9,r-n))):(e.sortIndex=o,p9(Ph,e),Pw||yB||(Pw=!0,v9(g9))),e};ha.unstable_shouldYield=Epe;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 _pe=de((Ldr,Ope)=>{"use strict";Ope.exports=Dpe()});var Uge=de(Kd=>{"use strict";var Wot=ce(),qd=_pe();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 jme=new Set,zT={};function Fw(e,t){TP(e,t),TP(e+"Capture",t)}function TP(e,t){for(zT[e]=t,e=0;e<t.length;e++)jme.add(t[e])}var Cv=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),z9=Object.prototype.hasOwnProperty,qot=/^[: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]*$/,Fpe={},Bpe={};function Got(e){return z9.call(Bpe,e)?!0:z9.call(Fpe,e)?!1:qot.test(e)?Bpe[e]=!0:(Fpe[e]=!0,!1)}function Kot(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 Xot(e,t,r,n){if(t===null||typeof t>"u"||Kot(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 EK=/[\-:]([a-z])/g;function DK(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(EK,DK);$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(EK,DK);$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(EK,DK);$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 OK(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")&&(Xot(t,r,o,n)&&(r=null),n||o===null?Got(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 kv=Wot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,bB=Symbol.for("react.element"),fP=Symbol.for("react.portal"),pP=Symbol.for("react.fragment"),_K=Symbol.for("react.strict_mode"),H9=Symbol.for("react.profiler"),$me=Symbol.for("react.provider"),Wme=Symbol.for("react.context"),FK=Symbol.for("react.forward_ref"),j9=Symbol.for("react.suspense"),$9=Symbol.for("react.suspense_list"),BK=Symbol.for("react.memo"),kx=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var qme=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var Vpe=Symbol.iterator;function bT(e){return e===null||typeof e!="object"?null:(e=Vpe&&e[Vpe]||e["@@iterator"],typeof e=="function"?e:null)}var bi=Object.assign,x9;function NT(e){if(x9===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);x9=t&&t[1]||""}return`
9
9
  `+x9+e}var b9=!1;function w9(e,t){if(!e||b9)return"";b9=!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=`