@qobo/banner 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Y=require("react");var H={exports:{}},I={};/**
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const V=require("react");var Z={exports:{}},W={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Se;function cr(){if(Se)return I;Se=1;var j=Y,_=Symbol.for("react.element"),k=Symbol.for("react.fragment"),h=Object.prototype.hasOwnProperty,F=j.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,T={key:!0,ref:!0,__self:!0,__source:!0};function m(y,f,E){var c,b={},w=null,W=null;E!==void 0&&(w=""+E),f.key!==void 0&&(w=""+f.key),f.ref!==void 0&&(W=f.ref);for(c in f)h.call(f,c)&&!T.hasOwnProperty(c)&&(b[c]=f[c]);if(y&&y.defaultProps)for(c in f=y.defaultProps,f)b[c]===void 0&&(b[c]=f[c]);return{$$typeof:_,type:y,key:w,ref:W,props:b,_owner:F.current}}return I.Fragment=k,I.jsx=m,I.jsxs=m,I}var $={};/**
9
+ */var xe;function cr(){if(xe)return W;xe=1;var O=V,_=Symbol.for("react.element"),A=Symbol.for("react.fragment"),E=Object.prototype.hasOwnProperty,P=O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,m={key:!0,ref:!0,__self:!0,__source:!0};function R(T,f,b){var c,h={},y=null,I=null;b!==void 0&&(y=""+b),f.key!==void 0&&(y=""+f.key),f.ref!==void 0&&(I=f.ref);for(c in f)E.call(f,c)&&!m.hasOwnProperty(c)&&(h[c]=f[c]);if(T&&T.defaultProps)for(c in f=T.defaultProps,f)h[c]===void 0&&(h[c]=f[c]);return{$$typeof:_,type:T,key:y,ref:I,props:h,_owner:P.current}}return W.Fragment=A,W.jsx=R,W.jsxs=R,W}var Y={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,17 +14,17 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Pe;function dr(){return Pe||(Pe=1,process.env.NODE_ENV!=="production"&&function(){var j=Y,_=Symbol.for("react.element"),k=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),y=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),W=Symbol.for("react.offscreen"),Z=Symbol.iterator,xe="@@iterator";function Ce(e){if(e===null||typeof e!="object")return null;var r=Z&&e[Z]||e[xe];return typeof r=="function"?r:null}var O=j.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function d(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];je("error",e,t)}}function je(e,r,t){{var n=O.ReactDebugCurrentFrame,i=n.getStackAddendum();i!==""&&(r+="%s",t=t.concat([i]));var s=t.map(function(o){return String(o)});s.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,s)}}var ke=!1,Fe=!1,Ae=!1,De=!1,Ie=!1,ee;ee=Symbol.for("react.module.reference");function $e(e){return!!(typeof e=="string"||typeof e=="function"||e===h||e===T||Ie||e===F||e===E||e===c||De||e===W||ke||Fe||Ae||typeof e=="object"&&e!==null&&(e.$$typeof===w||e.$$typeof===b||e.$$typeof===m||e.$$typeof===y||e.$$typeof===f||e.$$typeof===ee||e.getModuleId!==void 0))}function Ye(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function re(e){return e.displayName||"Context"}function R(e){if(e==null)return null;if(typeof e.tag=="number"&&d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case h:return"Fragment";case k:return"Portal";case T:return"Profiler";case F:return"StrictMode";case E:return"Suspense";case c:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case y:var r=e;return re(r)+".Consumer";case m:var t=e;return re(t._context)+".Provider";case f:return Ye(e,e.render,"ForwardRef");case b:var n=e.displayName||null;return n!==null?n:R(e.type)||"Memo";case w:{var i=e,s=i._payload,o=i._init;try{return R(o(s))}catch{return null}}}return null}var S=Object.assign,A=0,te,ne,ae,oe,ie,se,ue;function le(){}le.__reactDisabledLog=!0;function We(){{if(A===0){te=console.log,ne=console.info,ae=console.warn,oe=console.error,ie=console.group,se=console.groupCollapsed,ue=console.groupEnd;var e={configurable:!0,enumerable:!0,value:le,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}A++}}function Be(){{if(A--,A===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:S({},e,{value:te}),info:S({},e,{value:ne}),warn:S({},e,{value:ae}),error:S({},e,{value:oe}),group:S({},e,{value:ie}),groupCollapsed:S({},e,{value:se}),groupEnd:S({},e,{value:ue})})}A<0&&d("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var U=O.ReactCurrentDispatcher,N;function B(e,r,t){{if(N===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);N=n&&n[1]||""}return`
18
- `+N+e}}var K=!1,V;{var Ve=typeof WeakMap=="function"?WeakMap:Map;V=new Ve}function fe(e,r){if(!e||K)return"";{var t=V.get(e);if(t!==void 0)return t}var n;K=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var s;s=U.current,U.current=null,We();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(p){n=p}Reflect.construct(e,[],o)}else{try{o.call()}catch(p){n=p}e.call(o.prototype)}}else{try{throw Error()}catch(p){n=p}e()}}catch(p){if(p&&n&&typeof p.stack=="string"){for(var a=p.stack.split(`
17
+ */var Se;function dr(){return Se||(Se=1,process.env.NODE_ENV!=="production"&&function(){var O=V,_=Symbol.for("react.element"),A=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),T=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),D=Symbol.iterator,Pe="@@iterator";function Ce(e){if(e===null||typeof e!="object")return null;var r=D&&e[D]||e[Pe];return typeof r=="function"?r:null}var C=O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function d(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];je("error",e,t)}}function je(e,r,t){{var n=C.ReactDebugCurrentFrame,i=n.getStackAddendum();i!==""&&(r+="%s",t=t.concat([i]));var s=t.map(function(o){return String(o)});s.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,s)}}var ke=!1,Fe=!1,Ae=!1,Ie=!1,De=!1,ee;ee=Symbol.for("react.module.reference");function $e(e){return!!(typeof e=="string"||typeof e=="function"||e===E||e===m||De||e===P||e===b||e===c||Ie||e===I||ke||Fe||Ae||typeof e=="object"&&e!==null&&(e.$$typeof===y||e.$$typeof===h||e.$$typeof===R||e.$$typeof===T||e.$$typeof===f||e.$$typeof===ee||e.getModuleId!==void 0))}function Be(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function re(e){return e.displayName||"Context"}function w(e){if(e==null)return null;if(typeof e.tag=="number"&&d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case A:return"Portal";case m:return"Profiler";case P:return"StrictMode";case b:return"Suspense";case c:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case T:var r=e;return re(r)+".Consumer";case R:var t=e;return re(t._context)+".Provider";case f:return Be(e,e.render,"ForwardRef");case h:var n=e.displayName||null;return n!==null?n:w(e.type)||"Memo";case y:{var i=e,s=i._payload,o=i._init;try{return w(o(s))}catch{return null}}}return null}var x=Object.assign,$=0,te,ne,ae,oe,ie,se,ue;function le(){}le.__reactDisabledLog=!0;function We(){{if($===0){te=console.log,ne=console.info,ae=console.warn,oe=console.error,ie=console.group,se=console.groupCollapsed,ue=console.groupEnd;var e={configurable:!0,enumerable:!0,value:le,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}$++}}function Ye(){{if($--,$===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:x({},e,{value:te}),info:x({},e,{value:ne}),warn:x({},e,{value:ae}),error:x({},e,{value:oe}),group:x({},e,{value:ie}),groupCollapsed:x({},e,{value:se}),groupEnd:x({},e,{value:ue})})}$<0&&d("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=C.ReactCurrentDispatcher,K;function L(e,r,t){{if(K===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);K=n&&n[1]||""}return`
18
+ `+K+e}}var J=!1,M;{var Ve=typeof WeakMap=="function"?WeakMap:Map;M=new Ve}function fe(e,r){if(!e||J)return"";{var t=M.get(e);if(t!==void 0)return t}var n;J=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var s;s=q.current,q.current=null,We();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(p){n=p}Reflect.construct(e,[],o)}else{try{o.call()}catch(p){n=p}e.call(o.prototype)}}else{try{throw Error()}catch(p){n=p}e()}}catch(p){if(p&&n&&typeof p.stack=="string"){for(var a=p.stack.split(`
19
19
  `),v=n.stack.split(`
20
20
  `),u=a.length-1,l=v.length-1;u>=1&&l>=0&&a[u]!==v[l];)l--;for(;u>=1&&l>=0;u--,l--)if(a[u]!==v[l]){if(u!==1||l!==1)do if(u--,l--,l<0||a[u]!==v[l]){var g=`
21
- `+a[u].replace(" at new "," at ");return e.displayName&&g.includes("<anonymous>")&&(g=g.replace("<anonymous>",e.displayName)),typeof e=="function"&&V.set(e,g),g}while(u>=1&&l>=0);break}}}finally{K=!1,U.current=s,Be(),Error.prepareStackTrace=i}var C=e?e.displayName||e.name:"",P=C?B(C):"";return typeof e=="function"&&V.set(e,P),P}function Le(e,r,t){return fe(e,!1)}function Me(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function L(e,r,t){if(e==null)return"";if(typeof e=="function")return fe(e,Me(e));if(typeof e=="string")return B(e);switch(e){case E:return B("Suspense");case c:return B("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case f:return Le(e.render);case b:return L(e.type,r,t);case w:{var n=e,i=n._payload,s=n._init;try{return L(s(i),r,t)}catch{}}}return""}var D=Object.prototype.hasOwnProperty,ce={},de=O.ReactDebugCurrentFrame;function M(e){if(e){var r=e._owner,t=L(e.type,e._source,r?r.type:null);de.setExtraStackFrame(t)}else de.setExtraStackFrame(null)}function Ue(e,r,t,n,i){{var s=Function.call.bind(D);for(var o in e)if(s(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var v=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw v.name="Invariant Violation",v}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(u){a=u}a&&!(a instanceof Error)&&(M(i),d("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,o,typeof a),M(null)),a instanceof Error&&!(a.message in ce)&&(ce[a.message]=!0,M(i),d("Failed %s type: %s",t,a.message),M(null))}}}var Ne=Array.isArray;function q(e){return Ne(e)}function Ke(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function qe(e){try{return ve(e),!1}catch{return!0}}function ve(e){return""+e}function pe(e){if(qe(e))return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ke(e)),ve(e)}var be=O.ReactCurrentOwner,Je={key:!0,ref:!0,__self:!0,__source:!0},ge,he;function ze(e){if(D.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Ge(e){if(D.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Qe(e,r){typeof e.ref=="string"&&be.current}function Xe(e,r){{var t=function(){ge||(ge=!0,d("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function He(e,r){{var t=function(){he||(he=!0,d("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var Ze=function(e,r,t,n,i,s,o){var a={$$typeof:_,type:e,key:r,ref:t,props:o,_owner:s};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function er(e,r,t,n,i){{var s,o={},a=null,v=null;t!==void 0&&(pe(t),a=""+t),Ge(r)&&(pe(r.key),a=""+r.key),ze(r)&&(v=r.ref,Qe(r,i));for(s in r)D.call(r,s)&&!Je.hasOwnProperty(s)&&(o[s]=r[s]);if(e&&e.defaultProps){var u=e.defaultProps;for(s in u)o[s]===void 0&&(o[s]=u[s])}if(a||v){var l=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&Xe(o,l),v&&He(o,l)}return Ze(e,a,v,i,n,be.current,o)}}var J=O.ReactCurrentOwner,ye=O.ReactDebugCurrentFrame;function x(e){if(e){var r=e._owner,t=L(e.type,e._source,r?r.type:null);ye.setExtraStackFrame(t)}else ye.setExtraStackFrame(null)}var z;z=!1;function G(e){return typeof e=="object"&&e!==null&&e.$$typeof===_}function Ee(){{if(J.current){var e=R(J.current.type);if(e)return`
21
+ `+a[u].replace(" at new "," at ");return e.displayName&&g.includes("<anonymous>")&&(g=g.replace("<anonymous>",e.displayName)),typeof e=="function"&&M.set(e,g),g}while(u>=1&&l>=0);break}}}finally{J=!1,q.current=s,Ye(),Error.prepareStackTrace=i}var k=e?e.displayName||e.name:"",S=k?L(k):"";return typeof e=="function"&&M.set(e,S),S}function Le(e,r,t){return fe(e,!1)}function Me(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function N(e,r,t){if(e==null)return"";if(typeof e=="function")return fe(e,Me(e));if(typeof e=="string")return L(e);switch(e){case b:return L("Suspense");case c:return L("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case f:return Le(e.render);case h:return N(e.type,r,t);case y:{var n=e,i=n._payload,s=n._init;try{return N(s(i),r,t)}catch{}}}return""}var B=Object.prototype.hasOwnProperty,ce={},de=C.ReactDebugCurrentFrame;function U(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);de.setExtraStackFrame(t)}else de.setExtraStackFrame(null)}function Ne(e,r,t,n,i){{var s=Function.call.bind(B);for(var o in e)if(s(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var v=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw v.name="Invariant Violation",v}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(u){a=u}a&&!(a instanceof Error)&&(U(i),d("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,o,typeof a),U(null)),a instanceof Error&&!(a.message in ce)&&(ce[a.message]=!0,U(i),d("Failed %s type: %s",t,a.message),U(null))}}}var Ue=Array.isArray;function G(e){return Ue(e)}function qe(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Ke(e){try{return ve(e),!1}catch{return!0}}function ve(e){return""+e}function pe(e){if(Ke(e))return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",qe(e)),ve(e)}var he=C.ReactCurrentOwner,Je={key:!0,ref:!0,__self:!0,__source:!0},ge,be;function Ge(e){if(B.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function ze(e){if(B.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Qe(e,r){typeof e.ref=="string"&&he.current}function Xe(e,r){{var t=function(){ge||(ge=!0,d("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function He(e,r){{var t=function(){be||(be=!0,d("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var Ze=function(e,r,t,n,i,s,o){var a={$$typeof:_,type:e,key:r,ref:t,props:o,_owner:s};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function er(e,r,t,n,i){{var s,o={},a=null,v=null;t!==void 0&&(pe(t),a=""+t),ze(r)&&(pe(r.key),a=""+r.key),Ge(r)&&(v=r.ref,Qe(r,i));for(s in r)B.call(r,s)&&!Je.hasOwnProperty(s)&&(o[s]=r[s]);if(e&&e.defaultProps){var u=e.defaultProps;for(s in u)o[s]===void 0&&(o[s]=u[s])}if(a||v){var l=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&Xe(o,l),v&&He(o,l)}return Ze(e,a,v,i,n,he.current,o)}}var z=C.ReactCurrentOwner,ye=C.ReactDebugCurrentFrame;function j(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);ye.setExtraStackFrame(t)}else ye.setExtraStackFrame(null)}var Q;Q=!1;function X(e){return typeof e=="object"&&e!==null&&e.$$typeof===_}function Ee(){{if(z.current){var e=w(z.current.type);if(e)return`
22
22
 
23
23
  Check the render method of \``+e+"`."}return""}}function rr(e){return""}var _e={};function tr(e){{var r=Ee();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
24
24
 
25
- Check the top-level render call using <`+t+">.")}return r}}function me(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=tr(r);if(_e[t])return;_e[t]=!0;var n="";e&&e._owner&&e._owner!==J.current&&(n=" It was passed a child from "+R(e._owner.type)+"."),x(e),d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),x(null)}}function Re(e,r){{if(typeof e!="object")return;if(q(e))for(var t=0;t<e.length;t++){var n=e[t];G(n)&&me(n,r)}else if(G(e))e._store&&(e._store.validated=!0);else if(e){var i=Ce(e);if(typeof i=="function"&&i!==e.entries)for(var s=i.call(e),o;!(o=s.next()).done;)G(o.value)&&me(o.value,r)}}}function nr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===f||r.$$typeof===b))t=r.propTypes;else return;if(t){var n=R(r);Ue(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!z){z=!0;var i=R(r);d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ar(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){x(e),d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),x(null);break}}e.ref!==null&&(x(e),d("Invalid attribute `ref` supplied to `React.Fragment`."),x(null))}}var Te={};function we(e,r,t,n,i,s){{var o=$e(e);if(!o){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var v=rr();v?a+=v:a+=Ee();var u;e===null?u="null":q(e)?u="array":e!==void 0&&e.$$typeof===_?(u="<"+(R(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):u=typeof e,d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",u,a)}var l=er(e,r,t,i,s);if(l==null)return l;if(o){var g=r.children;if(g!==void 0)if(n)if(q(g)){for(var C=0;C<g.length;C++)Re(g[C],e);Object.freeze&&Object.freeze(g)}else d("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Re(g,e)}if(D.call(r,"key")){var P=R(e),p=Object.keys(r).filter(function(fr){return fr!=="key"}),Q=p.length>0?"{key: someKey, "+p.join(": ..., ")+": ...}":"{key: someKey}";if(!Te[P+Q]){var lr=p.length>0?"{"+p.join(": ..., ")+": ...}":"{}";d(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+t+">.")}return r}}function me(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=tr(r);if(_e[t])return;_e[t]=!0;var n="";e&&e._owner&&e._owner!==z.current&&(n=" It was passed a child from "+w(e._owner.type)+"."),j(e),d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),j(null)}}function Re(e,r){{if(typeof e!="object")return;if(G(e))for(var t=0;t<e.length;t++){var n=e[t];X(n)&&me(n,r)}else if(X(e))e._store&&(e._store.validated=!0);else if(e){var i=Ce(e);if(typeof i=="function"&&i!==e.entries)for(var s=i.call(e),o;!(o=s.next()).done;)X(o.value)&&me(o.value,r)}}}function nr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===f||r.$$typeof===h))t=r.propTypes;else return;if(t){var n=w(r);Ne(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!Q){Q=!0;var i=w(r);d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ar(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){j(e),d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),j(null);break}}e.ref!==null&&(j(e),d("Invalid attribute `ref` supplied to `React.Fragment`."),j(null))}}var Te={};function we(e,r,t,n,i,s){{var o=$e(e);if(!o){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var v=rr();v?a+=v:a+=Ee();var u;e===null?u="null":G(e)?u="array":e!==void 0&&e.$$typeof===_?(u="<"+(w(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):u=typeof e,d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",u,a)}var l=er(e,r,t,i,s);if(l==null)return l;if(o){var g=r.children;if(g!==void 0)if(n)if(G(g)){for(var k=0;k<g.length;k++)Re(g[k],e);Object.freeze&&Object.freeze(g)}else d("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Re(g,e)}if(B.call(r,"key")){var S=w(e),p=Object.keys(r).filter(function(fr){return fr!=="key"}),H=p.length>0?"{key: someKey, "+p.join(": ..., ")+": ...}":"{key: someKey}";if(!Te[S+H]){var lr=p.length>0?"{"+p.join(": ..., ")+": ...}":"{}";d(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,Q,P,lr,P),Te[P+Q]=!0}}return e===h?ar(l):nr(l),l}}function or(e,r,t){return we(e,r,t,!0)}function ir(e,r,t){return we(e,r,t,!1)}var sr=ir,ur=or;$.Fragment=h,$.jsx=sr,$.jsxs=ur}()),$}process.env.NODE_ENV==="production"?H.exports=cr():H.exports=dr();var X=H.exports;function Oe(){const[j,_]=Y.useState(!0),[k,h]=Y.useState(!0);return Y.useEffect(()=>{(async()=>{var T;try{const y="https://api.qobo.dev";console.warn("[QoboBanner] VITE_API_KEY not set, defaulting to visible"),h(!1);return}catch(m){console.warn("[QoboBanner] Error fetching banner visibility, defaulting to visible:",m.message),_(!0)}finally{h(!1)}})()},[]),!j&&!k?null:X.jsxs("div",{className:"w-full bg-gradient-to-r from-cyan-400 to-blue-500 text-white py-2 px-4 text-center text-sm font-medium shadow-md",style:{position:"sticky",top:0,zIndex:9999,minHeight:"50px",background:"linear-gradient(90deg, #FF7A2F 0%, #46C6B9 100%)",color:"#F1F5F9",padding:"12px 16px",textAlign:"center",fontSize:"0.875rem",fontWeight:"500",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)",transition:"all 0.3s ease"},children:["Made with"," ",X.jsx("span",{style:{color:"#FF1744",display:"inline-block",margin:"0 0.25rem"},children:"❤️"})," ","by"," ",X.jsx("a",{href:"https://qobo.dev",target:"_blank",rel:"noopener noreferrer",style:{color:"#F1F5F9",textDecoration:"underline",fontWeight:"600",cursor:"pointer"},className:"hover:text-cyan-100 transition-colors",children:"qobo.dev"})]})}exports.QoboBanner=Oe;exports.default=Oe;
30
+ <%s key={someKey} {...props} />`,H,S,lr,S),Te[S+H]=!0}}return e===E?ar(l):nr(l),l}}function or(e,r,t){return we(e,r,t,!0)}function ir(e,r,t){return we(e,r,t,!1)}var sr=ir,ur=or;Y.Fragment=E,Y.jsx=sr,Y.jsxs=ur}()),Y}process.env.NODE_ENV==="production"?Z.exports=cr():Z.exports=dr();var F=Z.exports;function Oe({apiKey:O,apiBaseUrl:_}){const[A,E]=V.useState(!0),[P,m]=V.useState(!0),R=50;return V.useEffect(()=>{(async()=>{var f;try{const b=O||void 0||void 0,c=_||void 0||void 0||"https://api.qobo.dev";if(!b){console.warn("[QoboBanner] API key not set (pass apiKey prop or set VITE_API_KEY), defaulting to visible"),m(!1);return}const h=await fetch(`${c}/api/v1/show-banner`,{method:"GET",headers:{"Content-Type":"application/json","X-API-Key":b},cache:"no-store"});if(!h.ok){console.warn(`[QoboBanner] Failed to fetch banner visibility (${h.status}), defaulting to visible`),m(!1);return}const y=await h.json(),D=(y.showBanner??((f=y.data)==null?void 0:f.showBanner)??"true")==="true";E(D),console.log(`[QoboBanner] Banner visibility: ${D}`)}catch(b){console.warn("[QoboBanner] Error fetching banner visibility, defaulting to visible:",b.message),E(!0)}finally{m(!1)}})()},[O,_]),!A&&!P?null:F.jsxs(F.Fragment,{children:[F.jsx("div",{"aria-hidden":"true",style:{height:`${R}px`,width:"100%"}}),F.jsxs("div",{className:"w-full bg-gradient-to-r from-cyan-400 to-blue-500 text-white py-2 px-4 text-center text-sm font-medium shadow-md",style:{position:"fixed",top:0,left:0,right:0,zIndex:9999,height:`${R}px`,background:"linear-gradient(90deg, #FF7A2F 0%, #46C6B9 100%)",color:"#F1F5F9",padding:"12px 16px",textAlign:"center",fontSize:"0.95rem",fontWeight:"600",letterSpacing:"0.01em",fontFamily:'"Inter", "Segoe UI", system-ui, -apple-system, sans-serif',boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)",transition:"all 0.3s ease",display:"flex",alignItems:"center",justifyContent:"center"},children:["Made with"," ",F.jsx("span",{style:{color:"#FF1744",display:"inline-block",margin:"0 0.35rem"},children:"❤️"})," ","by"," ",F.jsx("a",{href:"https://qobo.dev",target:"_blank",rel:"noopener noreferrer",style:{color:"#F1F5F9",textDecoration:"underline",fontWeight:"700",cursor:"pointer"},className:"hover:text-cyan-100 transition-colors",children:"qobo.dev"})]})]})}exports.QoboBanner=Oe;exports.default=Oe;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import Oe, { useState as we, useEffect as cr } from "react";
2
- var Q = { exports: {} }, I = {};
1
+ import Oe, { useState as Te, useEffect as cr } from "react";
2
+ var Q = { exports: {} }, Y = {};
3
3
  /**
4
4
  * @license React
5
5
  * react-jsx-runtime.production.min.js
@@ -11,19 +11,19 @@ var Q = { exports: {} }, I = {};
11
11
  */
12
12
  var xe;
13
13
  function dr() {
14
- if (xe) return I;
14
+ if (xe) return Y;
15
15
  xe = 1;
16
- var j = Oe, _ = Symbol.for("react.element"), k = Symbol.for("react.fragment"), g = Object.prototype.hasOwnProperty, F = j.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, T = { key: !0, ref: !0, __self: !0, __source: !0 };
17
- function m(y, f, E) {
18
- var c, b = {}, w = null, Y = null;
19
- E !== void 0 && (w = "" + E), f.key !== void 0 && (w = "" + f.key), f.ref !== void 0 && (Y = f.ref);
20
- for (c in f) g.call(f, c) && !T.hasOwnProperty(c) && (b[c] = f[c]);
21
- if (y && y.defaultProps) for (c in f = y.defaultProps, f) b[c] === void 0 && (b[c] = f[c]);
22
- return { $$typeof: _, type: y, key: w, ref: Y, props: b, _owner: F.current };
16
+ var O = Oe, _ = Symbol.for("react.element"), A = Symbol.for("react.fragment"), E = Object.prototype.hasOwnProperty, P = O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, m = { key: !0, ref: !0, __self: !0, __source: !0 };
17
+ function R(w, f, b) {
18
+ var c, h = {}, y = null, I = null;
19
+ b !== void 0 && (y = "" + b), f.key !== void 0 && (y = "" + f.key), f.ref !== void 0 && (I = f.ref);
20
+ for (c in f) E.call(f, c) && !m.hasOwnProperty(c) && (h[c] = f[c]);
21
+ if (w && w.defaultProps) for (c in f = w.defaultProps, f) h[c] === void 0 && (h[c] = f[c]);
22
+ return { $$typeof: _, type: w, key: y, ref: I, props: h, _owner: P.current };
23
23
  }
24
- return I.Fragment = k, I.jsx = m, I.jsxs = m, I;
24
+ return Y.Fragment = A, Y.jsx = R, Y.jsxs = R, Y;
25
25
  }
26
- var $ = {};
26
+ var B = {};
27
27
  /**
28
28
  * @license React
29
29
  * react-jsx-runtime.development.js
@@ -33,17 +33,17 @@ var $ = {};
33
33
  * This source code is licensed under the MIT license found in the
34
34
  * LICENSE file in the root directory of this source tree.
35
35
  */
36
- var Pe;
36
+ var Se;
37
37
  function vr() {
38
- return Pe || (Pe = 1, process.env.NODE_ENV !== "production" && function() {
39
- var j = Oe, _ = Symbol.for("react.element"), k = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), F = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), m = Symbol.for("react.provider"), y = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), H = Symbol.iterator, Se = "@@iterator";
38
+ return Se || (Se = 1, process.env.NODE_ENV !== "production" && function() {
39
+ var O = Oe, _ = Symbol.for("react.element"), A = Symbol.for("react.portal"), E = Symbol.for("react.fragment"), P = Symbol.for("react.strict_mode"), m = Symbol.for("react.profiler"), R = Symbol.for("react.provider"), w = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), D = Symbol.iterator, Pe = "@@iterator";
40
40
  function Ce(e) {
41
41
  if (e === null || typeof e != "object")
42
42
  return null;
43
- var r = H && e[H] || e[Se];
43
+ var r = D && e[D] || e[Pe];
44
44
  return typeof r == "function" ? r : null;
45
45
  }
46
- var O = j.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
46
+ var C = O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
47
  function d(e) {
48
48
  {
49
49
  for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
@@ -53,34 +53,34 @@ function vr() {
53
53
  }
54
54
  function je(e, r, t) {
55
55
  {
56
- var n = O.ReactDebugCurrentFrame, i = n.getStackAddendum();
57
- i !== "" && (r += "%s", t = t.concat([i]));
58
- var s = t.map(function(o) {
59
- return String(o);
56
+ var n = C.ReactDebugCurrentFrame, o = n.getStackAddendum();
57
+ o !== "" && (r += "%s", t = t.concat([o]));
58
+ var s = t.map(function(i) {
59
+ return String(i);
60
60
  });
61
61
  s.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, s);
62
62
  }
63
63
  }
64
- var ke = !1, Fe = !1, Ae = !1, De = !1, Ie = !1, Z;
64
+ var ke = !1, Fe = !1, Ae = !1, Ie = !1, De = !1, Z;
65
65
  Z = Symbol.for("react.module.reference");
66
66
  function $e(e) {
67
- return !!(typeof e == "string" || typeof e == "function" || e === g || e === T || Ie || e === F || e === E || e === c || De || e === Y || ke || Fe || Ae || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === b || e.$$typeof === m || e.$$typeof === y || e.$$typeof === f || // This needs to include all possible module reference object
67
+ return !!(typeof e == "string" || typeof e == "function" || e === E || e === m || De || e === P || e === b || e === c || Ie || e === I || ke || Fe || Ae || typeof e == "object" && e !== null && (e.$$typeof === y || e.$$typeof === h || e.$$typeof === R || e.$$typeof === w || e.$$typeof === f || // This needs to include all possible module reference object
68
68
  // types supported by any Flight configuration anywhere since
69
69
  // we don't know which Flight build this will end up being used
70
70
  // with.
71
71
  e.$$typeof === Z || e.getModuleId !== void 0));
72
72
  }
73
- function Ye(e, r, t) {
73
+ function We(e, r, t) {
74
74
  var n = e.displayName;
75
75
  if (n)
76
76
  return n;
77
- var i = r.displayName || r.name || "";
78
- return i !== "" ? t + "(" + i + ")" : t;
77
+ var o = r.displayName || r.name || "";
78
+ return o !== "" ? t + "(" + o + ")" : t;
79
79
  }
80
80
  function ee(e) {
81
81
  return e.displayName || "Context";
82
82
  }
83
- function R(e) {
83
+ function T(e) {
84
84
  if (e == null)
85
85
  return null;
86
86
  if (typeof e.tag == "number" && d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
@@ -88,36 +88,36 @@ function vr() {
88
88
  if (typeof e == "string")
89
89
  return e;
90
90
  switch (e) {
91
- case g:
91
+ case E:
92
92
  return "Fragment";
93
- case k:
93
+ case A:
94
94
  return "Portal";
95
- case T:
95
+ case m:
96
96
  return "Profiler";
97
- case F:
97
+ case P:
98
98
  return "StrictMode";
99
- case E:
99
+ case b:
100
100
  return "Suspense";
101
101
  case c:
102
102
  return "SuspenseList";
103
103
  }
104
104
  if (typeof e == "object")
105
105
  switch (e.$$typeof) {
106
- case y:
106
+ case w:
107
107
  var r = e;
108
108
  return ee(r) + ".Consumer";
109
- case m:
109
+ case R:
110
110
  var t = e;
111
111
  return ee(t._context) + ".Provider";
112
112
  case f:
113
- return Ye(e, e.render, "ForwardRef");
114
- case b:
113
+ return We(e, e.render, "ForwardRef");
114
+ case h:
115
115
  var n = e.displayName || null;
116
- return n !== null ? n : R(e.type) || "Memo";
117
- case w: {
118
- var i = e, s = i._payload, o = i._init;
116
+ return n !== null ? n : T(e.type) || "Memo";
117
+ case y: {
118
+ var o = e, s = o._payload, i = o._init;
119
119
  try {
120
- return R(o(s));
120
+ return T(i(s));
121
121
  } catch {
122
122
  return null;
123
123
  }
@@ -125,14 +125,14 @@ function vr() {
125
125
  }
126
126
  return null;
127
127
  }
128
- var x = Object.assign, A = 0, re, te, ne, ae, oe, ie, se;
128
+ var x = Object.assign, $ = 0, re, te, ne, ae, ie, oe, se;
129
129
  function ue() {
130
130
  }
131
131
  ue.__reactDisabledLog = !0;
132
- function We() {
132
+ function Ye() {
133
133
  {
134
- if (A === 0) {
135
- re = console.log, te = console.info, ne = console.warn, ae = console.error, oe = console.group, ie = console.groupCollapsed, se = console.groupEnd;
134
+ if ($ === 0) {
135
+ re = console.log, te = console.info, ne = console.warn, ae = console.error, ie = console.group, oe = console.groupCollapsed, se = console.groupEnd;
136
136
  var e = {
137
137
  configurable: !0,
138
138
  enumerable: !0,
@@ -149,12 +149,12 @@ function vr() {
149
149
  groupEnd: e
150
150
  });
151
151
  }
152
- A++;
152
+ $++;
153
153
  }
154
154
  }
155
155
  function Be() {
156
156
  {
157
- if (A--, A === 0) {
157
+ if ($--, $ === 0) {
158
158
  var e = {
159
159
  configurable: !0,
160
160
  enumerable: !0,
@@ -174,75 +174,75 @@ function vr() {
174
174
  value: ae
175
175
  }),
176
176
  group: x({}, e, {
177
- value: oe
177
+ value: ie
178
178
  }),
179
179
  groupCollapsed: x({}, e, {
180
- value: ie
180
+ value: oe
181
181
  }),
182
182
  groupEnd: x({}, e, {
183
183
  value: se
184
184
  })
185
185
  });
186
186
  }
187
- A < 0 && d("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
187
+ $ < 0 && d("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
188
  }
189
189
  }
190
- var M = O.ReactCurrentDispatcher, U;
191
- function W(e, r, t) {
190
+ var U = C.ReactCurrentDispatcher, q;
191
+ function V(e, r, t) {
192
192
  {
193
- if (U === void 0)
193
+ if (q === void 0)
194
194
  try {
195
195
  throw Error();
196
- } catch (i) {
197
- var n = i.stack.trim().match(/\n( *(at )?)/);
198
- U = n && n[1] || "";
196
+ } catch (o) {
197
+ var n = o.stack.trim().match(/\n( *(at )?)/);
198
+ q = n && n[1] || "";
199
199
  }
200
200
  return `
201
- ` + U + e;
201
+ ` + q + e;
202
202
  }
203
203
  }
204
- var N = !1, B;
204
+ var K = !1, L;
205
205
  {
206
206
  var Ve = typeof WeakMap == "function" ? WeakMap : Map;
207
- B = new Ve();
207
+ L = new Ve();
208
208
  }
209
209
  function le(e, r) {
210
- if (!e || N)
210
+ if (!e || K)
211
211
  return "";
212
212
  {
213
- var t = B.get(e);
213
+ var t = L.get(e);
214
214
  if (t !== void 0)
215
215
  return t;
216
216
  }
217
217
  var n;
218
- N = !0;
219
- var i = Error.prepareStackTrace;
218
+ K = !0;
219
+ var o = Error.prepareStackTrace;
220
220
  Error.prepareStackTrace = void 0;
221
221
  var s;
222
- s = M.current, M.current = null, We();
222
+ s = U.current, U.current = null, Ye();
223
223
  try {
224
224
  if (r) {
225
- var o = function() {
225
+ var i = function() {
226
226
  throw Error();
227
227
  };
228
- if (Object.defineProperty(o.prototype, "props", {
228
+ if (Object.defineProperty(i.prototype, "props", {
229
229
  set: function() {
230
230
  throw Error();
231
231
  }
232
232
  }), typeof Reflect == "object" && Reflect.construct) {
233
233
  try {
234
- Reflect.construct(o, []);
234
+ Reflect.construct(i, []);
235
235
  } catch (p) {
236
236
  n = p;
237
237
  }
238
- Reflect.construct(e, [], o);
238
+ Reflect.construct(e, [], i);
239
239
  } else {
240
240
  try {
241
- o.call();
241
+ i.call();
242
242
  } catch (p) {
243
243
  n = p;
244
244
  }
245
- e.call(o.prototype);
245
+ e.call(i.prototype);
246
246
  }
247
247
  } else {
248
248
  try {
@@ -263,19 +263,19 @@ function vr() {
263
263
  if (u !== 1 || l !== 1)
264
264
  do
265
265
  if (u--, l--, l < 0 || a[u] !== v[l]) {
266
- var h = `
266
+ var g = `
267
267
  ` + a[u].replace(" at new ", " at ");
268
- return e.displayName && h.includes("<anonymous>") && (h = h.replace("<anonymous>", e.displayName)), typeof e == "function" && B.set(e, h), h;
268
+ return e.displayName && g.includes("<anonymous>") && (g = g.replace("<anonymous>", e.displayName)), typeof e == "function" && L.set(e, g), g;
269
269
  }
270
270
  while (u >= 1 && l >= 0);
271
271
  break;
272
272
  }
273
273
  }
274
274
  } finally {
275
- N = !1, M.current = s, Be(), Error.prepareStackTrace = i;
275
+ K = !1, U.current = s, Be(), Error.prepareStackTrace = o;
276
276
  }
277
- var C = e ? e.displayName || e.name : "", P = C ? W(C) : "";
278
- return typeof e == "function" && B.set(e, P), P;
277
+ var k = e ? e.displayName || e.name : "", S = k ? V(k) : "";
278
+ return typeof e == "function" && L.set(e, S), S;
279
279
  }
280
280
  function Le(e, r, t) {
281
281
  return le(e, !1);
@@ -284,73 +284,73 @@ function vr() {
284
284
  var r = e.prototype;
285
285
  return !!(r && r.isReactComponent);
286
286
  }
287
- function V(e, r, t) {
287
+ function M(e, r, t) {
288
288
  if (e == null)
289
289
  return "";
290
290
  if (typeof e == "function")
291
291
  return le(e, Me(e));
292
292
  if (typeof e == "string")
293
- return W(e);
293
+ return V(e);
294
294
  switch (e) {
295
- case E:
296
- return W("Suspense");
295
+ case b:
296
+ return V("Suspense");
297
297
  case c:
298
- return W("SuspenseList");
298
+ return V("SuspenseList");
299
299
  }
300
300
  if (typeof e == "object")
301
301
  switch (e.$$typeof) {
302
302
  case f:
303
303
  return Le(e.render);
304
- case b:
305
- return V(e.type, r, t);
306
- case w: {
307
- var n = e, i = n._payload, s = n._init;
304
+ case h:
305
+ return M(e.type, r, t);
306
+ case y: {
307
+ var n = e, o = n._payload, s = n._init;
308
308
  try {
309
- return V(s(i), r, t);
309
+ return M(s(o), r, t);
310
310
  } catch {
311
311
  }
312
312
  }
313
313
  }
314
314
  return "";
315
315
  }
316
- var D = Object.prototype.hasOwnProperty, fe = {}, ce = O.ReactDebugCurrentFrame;
317
- function L(e) {
316
+ var W = Object.prototype.hasOwnProperty, fe = {}, ce = C.ReactDebugCurrentFrame;
317
+ function N(e) {
318
318
  if (e) {
319
- var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
319
+ var r = e._owner, t = M(e.type, e._source, r ? r.type : null);
320
320
  ce.setExtraStackFrame(t);
321
321
  } else
322
322
  ce.setExtraStackFrame(null);
323
323
  }
324
- function Ue(e, r, t, n, i) {
324
+ function Ne(e, r, t, n, o) {
325
325
  {
326
- var s = Function.call.bind(D);
327
- for (var o in e)
328
- if (s(e, o)) {
326
+ var s = Function.call.bind(W);
327
+ for (var i in e)
328
+ if (s(e, i)) {
329
329
  var a = void 0;
330
330
  try {
331
- if (typeof e[o] != "function") {
332
- var v = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
331
+ if (typeof e[i] != "function") {
332
+ var v = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
333
  throw v.name = "Invariant Violation", v;
334
334
  }
335
- a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
335
+ a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
336
336
  } catch (u) {
337
337
  a = u;
338
338
  }
339
- a && !(a instanceof Error) && (L(i), d("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof a), L(null)), a instanceof Error && !(a.message in fe) && (fe[a.message] = !0, L(i), d("Failed %s type: %s", t, a.message), L(null));
339
+ a && !(a instanceof Error) && (N(o), d("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, i, typeof a), N(null)), a instanceof Error && !(a.message in fe) && (fe[a.message] = !0, N(o), d("Failed %s type: %s", t, a.message), N(null));
340
340
  }
341
341
  }
342
342
  }
343
- var Ne = Array.isArray;
344
- function K(e) {
345
- return Ne(e);
343
+ var Ue = Array.isArray;
344
+ function J(e) {
345
+ return Ue(e);
346
346
  }
347
- function Ke(e) {
347
+ function qe(e) {
348
348
  {
349
349
  var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
350
350
  return t;
351
351
  }
352
352
  }
353
- function qe(e) {
353
+ function Ke(e) {
354
354
  try {
355
355
  return de(e), !1;
356
356
  } catch {
@@ -361,25 +361,25 @@ function vr() {
361
361
  return "" + e;
362
362
  }
363
363
  function ve(e) {
364
- if (qe(e))
365
- return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ke(e)), de(e);
364
+ if (Ke(e))
365
+ return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", qe(e)), de(e);
366
366
  }
367
- var pe = O.ReactCurrentOwner, Je = {
367
+ var pe = C.ReactCurrentOwner, Je = {
368
368
  key: !0,
369
369
  ref: !0,
370
370
  __self: !0,
371
371
  __source: !0
372
- }, be, he;
373
- function ze(e) {
374
- if (D.call(e, "ref")) {
372
+ }, he, ge;
373
+ function Ge(e) {
374
+ if (W.call(e, "ref")) {
375
375
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
376
376
  if (r && r.isReactWarning)
377
377
  return !1;
378
378
  }
379
379
  return e.ref !== void 0;
380
380
  }
381
- function Ge(e) {
382
- if (D.call(e, "key")) {
381
+ function ze(e) {
382
+ if (W.call(e, "key")) {
383
383
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
384
384
  if (r && r.isReactWarning)
385
385
  return !1;
@@ -389,10 +389,10 @@ function vr() {
389
389
  function Xe(e, r) {
390
390
  typeof e.ref == "string" && pe.current;
391
391
  }
392
- function Qe(e, r) {
392
+ function He(e, r) {
393
393
  {
394
394
  var t = function() {
395
- be || (be = !0, d("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
395
+ he || (he = !0, d("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
396
396
  };
397
397
  t.isReactWarning = !0, Object.defineProperty(e, "key", {
398
398
  get: t,
@@ -400,10 +400,10 @@ function vr() {
400
400
  });
401
401
  }
402
402
  }
403
- function He(e, r) {
403
+ function Qe(e, r) {
404
404
  {
405
405
  var t = function() {
406
- he || (he = !0, d("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
406
+ ge || (ge = !0, d("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
407
407
  };
408
408
  t.isReactWarning = !0, Object.defineProperty(e, "ref", {
409
409
  get: t,
@@ -411,7 +411,7 @@ function vr() {
411
411
  });
412
412
  }
413
413
  }
414
- var Ze = function(e, r, t, n, i, s, o) {
414
+ var Ze = function(e, r, t, n, o, s, i) {
415
415
  var a = {
416
416
  // This tag allows us to uniquely identify this as a React Element
417
417
  $$typeof: _,
@@ -419,7 +419,7 @@ function vr() {
419
419
  type: e,
420
420
  key: r,
421
421
  ref: t,
422
- props: o,
422
+ props: i,
423
423
  // Record the component responsible for creating this element.
424
424
  _owner: s
425
425
  };
@@ -437,44 +437,44 @@ function vr() {
437
437
  configurable: !1,
438
438
  enumerable: !1,
439
439
  writable: !1,
440
- value: i
440
+ value: o
441
441
  }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
442
442
  };
443
- function er(e, r, t, n, i) {
443
+ function er(e, r, t, n, o) {
444
444
  {
445
- var s, o = {}, a = null, v = null;
446
- t !== void 0 && (ve(t), a = "" + t), Ge(r) && (ve(r.key), a = "" + r.key), ze(r) && (v = r.ref, Xe(r, i));
445
+ var s, i = {}, a = null, v = null;
446
+ t !== void 0 && (ve(t), a = "" + t), ze(r) && (ve(r.key), a = "" + r.key), Ge(r) && (v = r.ref, Xe(r, o));
447
447
  for (s in r)
448
- D.call(r, s) && !Je.hasOwnProperty(s) && (o[s] = r[s]);
448
+ W.call(r, s) && !Je.hasOwnProperty(s) && (i[s] = r[s]);
449
449
  if (e && e.defaultProps) {
450
450
  var u = e.defaultProps;
451
451
  for (s in u)
452
- o[s] === void 0 && (o[s] = u[s]);
452
+ i[s] === void 0 && (i[s] = u[s]);
453
453
  }
454
454
  if (a || v) {
455
455
  var l = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
456
- a && Qe(o, l), v && He(o, l);
456
+ a && He(i, l), v && Qe(i, l);
457
457
  }
458
- return Ze(e, a, v, i, n, pe.current, o);
458
+ return Ze(e, a, v, o, n, pe.current, i);
459
459
  }
460
460
  }
461
- var q = O.ReactCurrentOwner, ge = O.ReactDebugCurrentFrame;
462
- function S(e) {
461
+ var G = C.ReactCurrentOwner, be = C.ReactDebugCurrentFrame;
462
+ function j(e) {
463
463
  if (e) {
464
- var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
465
- ge.setExtraStackFrame(t);
464
+ var r = e._owner, t = M(e.type, e._source, r ? r.type : null);
465
+ be.setExtraStackFrame(t);
466
466
  } else
467
- ge.setExtraStackFrame(null);
467
+ be.setExtraStackFrame(null);
468
468
  }
469
- var J;
470
- J = !1;
471
- function z(e) {
469
+ var z;
470
+ z = !1;
471
+ function X(e) {
472
472
  return typeof e == "object" && e !== null && e.$$typeof === _;
473
473
  }
474
474
  function ye() {
475
475
  {
476
- if (q.current) {
477
- var e = R(q.current.type);
476
+ if (G.current) {
477
+ var e = T(G.current.type);
478
478
  if (e)
479
479
  return `
480
480
 
@@ -509,25 +509,25 @@ Check the top-level render call using <` + t + ">.");
509
509
  return;
510
510
  Ee[t] = !0;
511
511
  var n = "";
512
- e && e._owner && e._owner !== q.current && (n = " It was passed a child from " + R(e._owner.type) + "."), S(e), d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), S(null);
512
+ e && e._owner && e._owner !== G.current && (n = " It was passed a child from " + T(e._owner.type) + "."), j(e), d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), j(null);
513
513
  }
514
514
  }
515
515
  function me(e, r) {
516
516
  {
517
517
  if (typeof e != "object")
518
518
  return;
519
- if (K(e))
519
+ if (J(e))
520
520
  for (var t = 0; t < e.length; t++) {
521
521
  var n = e[t];
522
- z(n) && _e(n, r);
522
+ X(n) && _e(n, r);
523
523
  }
524
- else if (z(e))
524
+ else if (X(e))
525
525
  e._store && (e._store.validated = !0);
526
526
  else if (e) {
527
- var i = Ce(e);
528
- if (typeof i == "function" && i !== e.entries)
529
- for (var s = i.call(e), o; !(o = s.next()).done; )
530
- z(o.value) && _e(o.value, r);
527
+ var o = Ce(e);
528
+ if (typeof o == "function" && o !== e.entries)
529
+ for (var s = o.call(e), i; !(i = s.next()).done; )
530
+ X(i.value) && _e(i.value, r);
531
531
  }
532
532
  }
533
533
  }
@@ -541,17 +541,17 @@ Check the top-level render call using <` + t + ">.");
541
541
  t = r.propTypes;
542
542
  else if (typeof r == "object" && (r.$$typeof === f || // Note: Memo only checks outer props here.
543
543
  // Inner props are checked in the reconciler.
544
- r.$$typeof === b))
544
+ r.$$typeof === h))
545
545
  t = r.propTypes;
546
546
  else
547
547
  return;
548
548
  if (t) {
549
- var n = R(r);
550
- Ue(t, e.props, "prop", n, e);
551
- } else if (r.PropTypes !== void 0 && !J) {
552
- J = !0;
553
- var i = R(r);
554
- d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
549
+ var n = T(r);
550
+ Ne(t, e.props, "prop", n, e);
551
+ } else if (r.PropTypes !== void 0 && !z) {
552
+ z = !0;
553
+ var o = T(r);
554
+ d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o || "Unknown");
555
555
  }
556
556
  typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
557
557
  }
@@ -561,141 +561,167 @@ Check the top-level render call using <` + t + ">.");
561
561
  for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
562
562
  var n = r[t];
563
563
  if (n !== "children" && n !== "key") {
564
- S(e), d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), S(null);
564
+ j(e), d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), j(null);
565
565
  break;
566
566
  }
567
567
  }
568
- e.ref !== null && (S(e), d("Invalid attribute `ref` supplied to `React.Fragment`."), S(null));
568
+ e.ref !== null && (j(e), d("Invalid attribute `ref` supplied to `React.Fragment`."), j(null));
569
569
  }
570
570
  }
571
571
  var Re = {};
572
- function Te(e, r, t, n, i, s) {
572
+ function we(e, r, t, n, o, s) {
573
573
  {
574
- var o = $e(e);
575
- if (!o) {
574
+ var i = $e(e);
575
+ if (!i) {
576
576
  var a = "";
577
577
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
578
578
  var v = rr();
579
579
  v ? a += v : a += ye();
580
580
  var u;
581
- e === null ? u = "null" : K(e) ? u = "array" : e !== void 0 && e.$$typeof === _ ? (u = "<" + (R(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : u = typeof e, d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", u, a);
581
+ e === null ? u = "null" : J(e) ? u = "array" : e !== void 0 && e.$$typeof === _ ? (u = "<" + (T(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : u = typeof e, d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", u, a);
582
582
  }
583
- var l = er(e, r, t, i, s);
583
+ var l = er(e, r, t, o, s);
584
584
  if (l == null)
585
585
  return l;
586
- if (o) {
587
- var h = r.children;
588
- if (h !== void 0)
586
+ if (i) {
587
+ var g = r.children;
588
+ if (g !== void 0)
589
589
  if (n)
590
- if (K(h)) {
591
- for (var C = 0; C < h.length; C++)
592
- me(h[C], e);
593
- Object.freeze && Object.freeze(h);
590
+ if (J(g)) {
591
+ for (var k = 0; k < g.length; k++)
592
+ me(g[k], e);
593
+ Object.freeze && Object.freeze(g);
594
594
  } else
595
595
  d("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
596
596
  else
597
- me(h, e);
597
+ me(g, e);
598
598
  }
599
- if (D.call(r, "key")) {
600
- var P = R(e), p = Object.keys(r).filter(function(fr) {
599
+ if (W.call(r, "key")) {
600
+ var S = T(e), p = Object.keys(r).filter(function(fr) {
601
601
  return fr !== "key";
602
- }), G = p.length > 0 ? "{key: someKey, " + p.join(": ..., ") + ": ...}" : "{key: someKey}";
603
- if (!Re[P + G]) {
602
+ }), H = p.length > 0 ? "{key: someKey, " + p.join(": ..., ") + ": ...}" : "{key: someKey}";
603
+ if (!Re[S + H]) {
604
604
  var lr = p.length > 0 ? "{" + p.join(": ..., ") + ": ...}" : "{}";
605
605
  d(`A props object containing a "key" prop is being spread into JSX:
606
606
  let props = %s;
607
607
  <%s {...props} />
608
608
  React keys must be passed directly to JSX without using spread:
609
609
  let props = %s;
610
- <%s key={someKey} {...props} />`, G, P, lr, P), Re[P + G] = !0;
610
+ <%s key={someKey} {...props} />`, H, S, lr, S), Re[S + H] = !0;
611
611
  }
612
612
  }
613
- return e === g ? ar(l) : nr(l), l;
613
+ return e === E ? ar(l) : nr(l), l;
614
614
  }
615
615
  }
616
- function or(e, r, t) {
617
- return Te(e, r, t, !0);
618
- }
619
616
  function ir(e, r, t) {
620
- return Te(e, r, t, !1);
617
+ return we(e, r, t, !0);
618
+ }
619
+ function or(e, r, t) {
620
+ return we(e, r, t, !1);
621
621
  }
622
- var sr = ir, ur = or;
623
- $.Fragment = g, $.jsx = sr, $.jsxs = ur;
624
- }()), $;
622
+ var sr = or, ur = ir;
623
+ B.Fragment = E, B.jsx = sr, B.jsxs = ur;
624
+ }()), B;
625
625
  }
626
626
  process.env.NODE_ENV === "production" ? Q.exports = dr() : Q.exports = vr();
627
- var X = Q.exports;
628
- function br() {
629
- const [j, _] = we(!0), [k, g] = we(!0);
627
+ var F = Q.exports;
628
+ function hr({ apiKey: O, apiBaseUrl: _ }) {
629
+ const [A, E] = Te(!0), [P, m] = Te(!0), R = 50;
630
630
  return cr(() => {
631
631
  (async () => {
632
- var T;
632
+ var f;
633
633
  try {
634
- const y = "https://api.qobo.dev";
635
- console.warn("[QoboBanner] VITE_API_KEY not set, defaulting to visible"), g(!1);
636
- return;
637
- } catch (m) {
638
- console.warn("[QoboBanner] Error fetching banner visibility, defaulting to visible:", m.message), _(!0);
634
+ const b = O || void 0 || void 0, c = _ || void 0 || void 0 || "https://api.qobo.dev";
635
+ if (!b) {
636
+ console.warn("[QoboBanner] API key not set (pass apiKey prop or set VITE_API_KEY), defaulting to visible"), m(!1);
637
+ return;
638
+ }
639
+ const h = await fetch(`${c}/api/v1/show-banner`, {
640
+ method: "GET",
641
+ headers: {
642
+ "Content-Type": "application/json",
643
+ "X-API-Key": b
644
+ },
645
+ cache: "no-store"
646
+ });
647
+ if (!h.ok) {
648
+ console.warn(`[QoboBanner] Failed to fetch banner visibility (${h.status}), defaulting to visible`), m(!1);
649
+ return;
650
+ }
651
+ const y = await h.json(), D = (y.showBanner ?? ((f = y.data) == null ? void 0 : f.showBanner) ?? "true") === "true";
652
+ E(D), console.log(`[QoboBanner] Banner visibility: ${D}`);
653
+ } catch (b) {
654
+ console.warn("[QoboBanner] Error fetching banner visibility, defaulting to visible:", b.message), E(!0);
639
655
  } finally {
640
- g(!1);
656
+ m(!1);
641
657
  }
642
658
  })();
643
- }, []), !j && !k ? null : /* @__PURE__ */ X.jsxs(
644
- "div",
645
- {
646
- className: "w-full bg-gradient-to-r from-cyan-400 to-blue-500 text-white py-2 px-4 text-center text-sm font-medium shadow-md",
647
- style: {
648
- position: "sticky",
649
- top: 0,
650
- zIndex: 9999,
651
- minHeight: "50px",
652
- background: "linear-gradient(90deg, #FF7A2F 0%, #46C6B9 100%)",
653
- color: "#F1F5F9",
654
- padding: "12px 16px",
655
- textAlign: "center",
656
- fontSize: "0.875rem",
657
- fontWeight: "500",
658
- boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)",
659
- transition: "all 0.3s ease"
660
- },
661
- children: [
662
- "Made with",
663
- " ",
664
- /* @__PURE__ */ X.jsx(
665
- "span",
666
- {
667
- style: {
668
- color: "#FF1744",
669
- display: "inline-block",
670
- margin: "0 0.25rem"
671
- },
672
- children: "❤️"
673
- }
674
- ),
675
- " ",
676
- "by",
677
- " ",
678
- /* @__PURE__ */ X.jsx(
679
- "a",
680
- {
681
- href: "https://qobo.dev",
682
- target: "_blank",
683
- rel: "noopener noreferrer",
684
- style: {
685
- color: "#F1F5F9",
686
- textDecoration: "underline",
687
- fontWeight: "600",
688
- cursor: "pointer"
689
- },
690
- className: "hover:text-cyan-100 transition-colors",
691
- children: "qobo.dev"
692
- }
693
- )
694
- ]
695
- }
696
- );
659
+ }, [O, _]), !A && !P ? null : /* @__PURE__ */ F.jsxs(F.Fragment, { children: [
660
+ /* @__PURE__ */ F.jsx("div", { "aria-hidden": "true", style: { height: `${R}px`, width: "100%" } }),
661
+ /* @__PURE__ */ F.jsxs(
662
+ "div",
663
+ {
664
+ className: "w-full bg-gradient-to-r from-cyan-400 to-blue-500 text-white py-2 px-4 text-center text-sm font-medium shadow-md",
665
+ style: {
666
+ position: "fixed",
667
+ top: 0,
668
+ left: 0,
669
+ right: 0,
670
+ zIndex: 9999,
671
+ height: `${R}px`,
672
+ background: "linear-gradient(90deg, #FF7A2F 0%, #46C6B9 100%)",
673
+ color: "#F1F5F9",
674
+ padding: "12px 16px",
675
+ textAlign: "center",
676
+ fontSize: "0.95rem",
677
+ fontWeight: "600",
678
+ letterSpacing: "0.01em",
679
+ fontFamily: '"Inter", "Segoe UI", system-ui, -apple-system, sans-serif',
680
+ boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)",
681
+ transition: "all 0.3s ease",
682
+ display: "flex",
683
+ alignItems: "center",
684
+ justifyContent: "center"
685
+ },
686
+ children: [
687
+ "Made with",
688
+ " ",
689
+ /* @__PURE__ */ F.jsx(
690
+ "span",
691
+ {
692
+ style: {
693
+ color: "#FF1744",
694
+ display: "inline-block",
695
+ margin: "0 0.35rem"
696
+ },
697
+ children: "❤️"
698
+ }
699
+ ),
700
+ " ",
701
+ "by",
702
+ " ",
703
+ /* @__PURE__ */ F.jsx(
704
+ "a",
705
+ {
706
+ href: "https://qobo.dev",
707
+ target: "_blank",
708
+ rel: "noopener noreferrer",
709
+ style: {
710
+ color: "#F1F5F9",
711
+ textDecoration: "underline",
712
+ fontWeight: "700",
713
+ cursor: "pointer"
714
+ },
715
+ className: "hover:text-cyan-100 transition-colors",
716
+ children: "qobo.dev"
717
+ }
718
+ )
719
+ ]
720
+ }
721
+ )
722
+ ] });
697
723
  }
698
724
  export {
699
- br as QoboBanner,
700
- br as default
725
+ hr as QoboBanner,
726
+ hr as default
701
727
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qobo/banner",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Shared Qobo banner component for all generated projects",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -13,20 +13,21 @@ import React, { useState, useEffect } from 'react';
13
13
  * - Links to https://qobo.dev in a new tab
14
14
  * - Has consistent styling across all projects
15
15
  */
16
- export function QoboBanner() {
16
+ export function QoboBanner({ apiKey, apiBaseUrl }) {
17
17
  const [isVisible, setIsVisible] = useState(true); // Default to visible to prevent layout shift
18
18
  const [isLoading, setIsLoading] = useState(true);
19
+ const BANNER_HEIGHT = 50;
19
20
 
20
21
  useEffect(() => {
21
22
  // Fetch banner visibility from backend
22
23
  const fetchBannerVisibility = async () => {
23
24
  try {
24
25
  // Get API key from environment
25
- const API_KEY = import.meta.env.VITE_API_KEY;
26
- const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || 'https://api.qobo.dev';
26
+ const API_KEY = apiKey || import.meta.env.VITE_API_KEY || import.meta.env.REACT_APP_API_KEY;
27
+ const API_BASE_URL = apiBaseUrl || import.meta.env.VITE_API_BASE_URL || import.meta.env.REACT_APP_API_BASE_URL || 'https://api.qobo.dev';
27
28
 
28
29
  if (!API_KEY) {
29
- console.warn('[QoboBanner] VITE_API_KEY not set, defaulting to visible');
30
+ console.warn('[QoboBanner] API key not set (pass apiKey prop or set VITE_API_KEY), defaulting to visible');
30
31
  setIsLoading(false);
31
32
  return;
32
33
  }
@@ -61,56 +62,66 @@ export function QoboBanner() {
61
62
  };
62
63
 
63
64
  fetchBannerVisibility();
64
- }, []);
65
+ }, [apiKey, apiBaseUrl]);
65
66
 
66
67
  if (!isVisible && !isLoading) {
67
68
  return null;
68
69
  }
69
70
 
70
71
  return (
71
- <div
72
- className="w-full bg-gradient-to-r from-cyan-400 to-blue-500 text-white py-2 px-4 text-center text-sm font-medium shadow-md"
73
- style={{
74
- position: 'sticky',
75
- top: 0,
76
- zIndex: 9999,
77
- minHeight: '50px',
78
- background: 'linear-gradient(90deg, #FF7A2F 0%, #46C6B9 100%)',
79
- color: '#F1F5F9',
80
- padding: '12px 16px',
81
- textAlign: 'center',
82
- fontSize: '0.875rem',
83
- fontWeight: '500',
84
- boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)',
85
- transition: 'all 0.3s ease',
86
- }}
87
- >
88
- Made with{' '}
89
- <span
90
- style={{
91
- color: '#FF1744',
92
- display: 'inline-block',
93
- margin: '0 0.25rem',
94
- }}
95
- >
96
- ❤️
97
- </span>{' '}
98
- by{' '}
99
- <a
100
- href="https://qobo.dev"
101
- target="_blank"
102
- rel="noopener noreferrer"
72
+ <>
73
+ <div aria-hidden="true" style={{ height: `${BANNER_HEIGHT}px`, width: '100%' }} />
74
+ <div
75
+ className="w-full bg-gradient-to-r from-cyan-400 to-blue-500 text-white py-2 px-4 text-center text-sm font-medium shadow-md"
103
76
  style={{
77
+ position: 'fixed',
78
+ top: 0,
79
+ left: 0,
80
+ right: 0,
81
+ zIndex: 9999,
82
+ height: `${BANNER_HEIGHT}px`,
83
+ background: 'linear-gradient(90deg, #FF7A2F 0%, #46C6B9 100%)',
104
84
  color: '#F1F5F9',
105
- textDecoration: 'underline',
85
+ padding: '12px 16px',
86
+ textAlign: 'center',
87
+ fontSize: '0.95rem',
106
88
  fontWeight: '600',
107
- cursor: 'pointer',
89
+ letterSpacing: '0.01em',
90
+ fontFamily: '"Inter", "Segoe UI", system-ui, -apple-system, sans-serif',
91
+ boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)',
92
+ transition: 'all 0.3s ease',
93
+ display: 'flex',
94
+ alignItems: 'center',
95
+ justifyContent: 'center',
108
96
  }}
109
- className="hover:text-cyan-100 transition-colors"
110
97
  >
111
- qobo.dev
112
- </a>
113
- </div>
98
+ Made with{' '}
99
+ <span
100
+ style={{
101
+ color: '#FF1744',
102
+ display: 'inline-block',
103
+ margin: '0 0.35rem',
104
+ }}
105
+ >
106
+ ❤️
107
+ </span>{' '}
108
+ by{' '}
109
+ <a
110
+ href="https://qobo.dev"
111
+ target="_blank"
112
+ rel="noopener noreferrer"
113
+ style={{
114
+ color: '#F1F5F9',
115
+ textDecoration: 'underline',
116
+ fontWeight: '700',
117
+ cursor: 'pointer',
118
+ }}
119
+ className="hover:text-cyan-100 transition-colors"
120
+ >
121
+ qobo.dev
122
+ </a>
123
+ </div>
124
+ </>
114
125
  );
115
126
  }
116
127