@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 +7 -7
- package/dist/index.js +267 -241
- package/package.json +1 -1
- package/src/QoboBanner.jsx +54 -43
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
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
|
|
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
|
|
18
|
-
`+
|
|
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"&&
|
|
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!==
|
|
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} />`,
|
|
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
|
|
2
|
-
var Q = { exports: {} },
|
|
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
|
|
14
|
+
if (xe) return Y;
|
|
15
15
|
xe = 1;
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
var c,
|
|
19
|
-
|
|
20
|
-
for (c in f)
|
|
21
|
-
if (
|
|
22
|
-
return { $$typeof: _, type:
|
|
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
|
|
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
|
|
36
|
+
var Se;
|
|
37
37
|
function vr() {
|
|
38
|
-
return
|
|
39
|
-
var
|
|
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 =
|
|
43
|
+
var r = D && e[D] || e[Pe];
|
|
44
44
|
return typeof r == "function" ? r : null;
|
|
45
45
|
}
|
|
46
|
-
var
|
|
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 =
|
|
57
|
-
|
|
58
|
-
var s = t.map(function(
|
|
59
|
-
return String(
|
|
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,
|
|
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 ===
|
|
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
|
|
73
|
+
function We(e, r, t) {
|
|
74
74
|
var n = e.displayName;
|
|
75
75
|
if (n)
|
|
76
76
|
return n;
|
|
77
|
-
var
|
|
78
|
-
return
|
|
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
|
|
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
|
|
91
|
+
case E:
|
|
92
92
|
return "Fragment";
|
|
93
|
-
case
|
|
93
|
+
case A:
|
|
94
94
|
return "Portal";
|
|
95
|
-
case
|
|
95
|
+
case m:
|
|
96
96
|
return "Profiler";
|
|
97
|
-
case
|
|
97
|
+
case P:
|
|
98
98
|
return "StrictMode";
|
|
99
|
-
case
|
|
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
|
|
106
|
+
case w:
|
|
107
107
|
var r = e;
|
|
108
108
|
return ee(r) + ".Consumer";
|
|
109
|
-
case
|
|
109
|
+
case R:
|
|
110
110
|
var t = e;
|
|
111
111
|
return ee(t._context) + ".Provider";
|
|
112
112
|
case f:
|
|
113
|
-
return
|
|
114
|
-
case
|
|
113
|
+
return We(e, e.render, "ForwardRef");
|
|
114
|
+
case h:
|
|
115
115
|
var n = e.displayName || null;
|
|
116
|
-
return n !== null ? n :
|
|
117
|
-
case
|
|
118
|
-
var
|
|
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
|
|
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,
|
|
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
|
|
132
|
+
function Ye() {
|
|
133
133
|
{
|
|
134
|
-
if (
|
|
135
|
-
re = console.log, te = console.info, ne = console.warn, ae = console.error,
|
|
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
|
-
|
|
152
|
+
$++;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
function Be() {
|
|
156
156
|
{
|
|
157
|
-
if (
|
|
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:
|
|
177
|
+
value: ie
|
|
178
178
|
}),
|
|
179
179
|
groupCollapsed: x({}, e, {
|
|
180
|
-
value:
|
|
180
|
+
value: oe
|
|
181
181
|
}),
|
|
182
182
|
groupEnd: x({}, e, {
|
|
183
183
|
value: se
|
|
184
184
|
})
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
|
|
187
|
+
$ < 0 && d("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
var
|
|
191
|
-
function
|
|
190
|
+
var U = C.ReactCurrentDispatcher, q;
|
|
191
|
+
function V(e, r, t) {
|
|
192
192
|
{
|
|
193
|
-
if (
|
|
193
|
+
if (q === void 0)
|
|
194
194
|
try {
|
|
195
195
|
throw Error();
|
|
196
|
-
} catch (
|
|
197
|
-
var n =
|
|
198
|
-
|
|
196
|
+
} catch (o) {
|
|
197
|
+
var n = o.stack.trim().match(/\n( *(at )?)/);
|
|
198
|
+
q = n && n[1] || "";
|
|
199
199
|
}
|
|
200
200
|
return `
|
|
201
|
-
` +
|
|
201
|
+
` + q + e;
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
var
|
|
204
|
+
var K = !1, L;
|
|
205
205
|
{
|
|
206
206
|
var Ve = typeof WeakMap == "function" ? WeakMap : Map;
|
|
207
|
-
|
|
207
|
+
L = new Ve();
|
|
208
208
|
}
|
|
209
209
|
function le(e, r) {
|
|
210
|
-
if (!e ||
|
|
210
|
+
if (!e || K)
|
|
211
211
|
return "";
|
|
212
212
|
{
|
|
213
|
-
var t =
|
|
213
|
+
var t = L.get(e);
|
|
214
214
|
if (t !== void 0)
|
|
215
215
|
return t;
|
|
216
216
|
}
|
|
217
217
|
var n;
|
|
218
|
-
|
|
219
|
-
var
|
|
218
|
+
K = !0;
|
|
219
|
+
var o = Error.prepareStackTrace;
|
|
220
220
|
Error.prepareStackTrace = void 0;
|
|
221
221
|
var s;
|
|
222
|
-
s =
|
|
222
|
+
s = U.current, U.current = null, Ye();
|
|
223
223
|
try {
|
|
224
224
|
if (r) {
|
|
225
|
-
var
|
|
225
|
+
var i = function() {
|
|
226
226
|
throw Error();
|
|
227
227
|
};
|
|
228
|
-
if (Object.defineProperty(
|
|
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(
|
|
234
|
+
Reflect.construct(i, []);
|
|
235
235
|
} catch (p) {
|
|
236
236
|
n = p;
|
|
237
237
|
}
|
|
238
|
-
Reflect.construct(e, [],
|
|
238
|
+
Reflect.construct(e, [], i);
|
|
239
239
|
} else {
|
|
240
240
|
try {
|
|
241
|
-
|
|
241
|
+
i.call();
|
|
242
242
|
} catch (p) {
|
|
243
243
|
n = p;
|
|
244
244
|
}
|
|
245
|
-
e.call(
|
|
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
|
|
266
|
+
var g = `
|
|
267
267
|
` + a[u].replace(" at new ", " at ");
|
|
268
|
-
return e.displayName &&
|
|
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
|
-
|
|
275
|
+
K = !1, U.current = s, Be(), Error.prepareStackTrace = o;
|
|
276
276
|
}
|
|
277
|
-
var
|
|
278
|
-
return typeof e == "function" &&
|
|
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
|
|
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
|
|
293
|
+
return V(e);
|
|
294
294
|
switch (e) {
|
|
295
|
-
case
|
|
296
|
-
return
|
|
295
|
+
case b:
|
|
296
|
+
return V("Suspense");
|
|
297
297
|
case c:
|
|
298
|
-
return
|
|
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
|
|
305
|
-
return
|
|
306
|
-
case
|
|
307
|
-
var n = e,
|
|
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
|
|
309
|
+
return M(s(o), r, t);
|
|
310
310
|
} catch {
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
return "";
|
|
315
315
|
}
|
|
316
|
-
var
|
|
317
|
-
function
|
|
316
|
+
var W = Object.prototype.hasOwnProperty, fe = {}, ce = C.ReactDebugCurrentFrame;
|
|
317
|
+
function N(e) {
|
|
318
318
|
if (e) {
|
|
319
|
-
var r = e._owner, t =
|
|
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
|
|
324
|
+
function Ne(e, r, t, n, o) {
|
|
325
325
|
{
|
|
326
|
-
var s = Function.call.bind(
|
|
327
|
-
for (var
|
|
328
|
-
if (s(e,
|
|
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[
|
|
332
|
-
var v = Error((n || "React class") + ": " + t + " type `" +
|
|
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[
|
|
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) && (
|
|
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
|
|
344
|
-
function
|
|
345
|
-
return
|
|
343
|
+
var Ue = Array.isArray;
|
|
344
|
+
function J(e) {
|
|
345
|
+
return Ue(e);
|
|
346
346
|
}
|
|
347
|
-
function
|
|
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
|
|
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 (
|
|
365
|
-
return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
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 =
|
|
367
|
+
var pe = C.ReactCurrentOwner, Je = {
|
|
368
368
|
key: !0,
|
|
369
369
|
ref: !0,
|
|
370
370
|
__self: !0,
|
|
371
371
|
__source: !0
|
|
372
|
-
},
|
|
373
|
-
function
|
|
374
|
-
if (
|
|
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
|
|
382
|
-
if (
|
|
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
|
|
392
|
+
function He(e, r) {
|
|
393
393
|
{
|
|
394
394
|
var t = function() {
|
|
395
|
-
|
|
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
|
|
403
|
+
function Qe(e, r) {
|
|
404
404
|
{
|
|
405
405
|
var t = function() {
|
|
406
|
-
|
|
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,
|
|
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:
|
|
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:
|
|
440
|
+
value: o
|
|
441
441
|
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
442
442
|
};
|
|
443
|
-
function er(e, r, t, n,
|
|
443
|
+
function er(e, r, t, n, o) {
|
|
444
444
|
{
|
|
445
|
-
var s,
|
|
446
|
-
t !== void 0 && (ve(t), a = "" + t),
|
|
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
|
-
|
|
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
|
-
|
|
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 &&
|
|
456
|
+
a && He(i, l), v && Qe(i, l);
|
|
457
457
|
}
|
|
458
|
-
return Ze(e, a, v,
|
|
458
|
+
return Ze(e, a, v, o, n, pe.current, i);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
var
|
|
462
|
-
function
|
|
461
|
+
var G = C.ReactCurrentOwner, be = C.ReactDebugCurrentFrame;
|
|
462
|
+
function j(e) {
|
|
463
463
|
if (e) {
|
|
464
|
-
var r = e._owner, t =
|
|
465
|
-
|
|
464
|
+
var r = e._owner, t = M(e.type, e._source, r ? r.type : null);
|
|
465
|
+
be.setExtraStackFrame(t);
|
|
466
466
|
} else
|
|
467
|
-
|
|
467
|
+
be.setExtraStackFrame(null);
|
|
468
468
|
}
|
|
469
|
-
var
|
|
470
|
-
|
|
471
|
-
function
|
|
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 (
|
|
477
|
-
var e =
|
|
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 !==
|
|
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 (
|
|
519
|
+
if (J(e))
|
|
520
520
|
for (var t = 0; t < e.length; t++) {
|
|
521
521
|
var n = e[t];
|
|
522
|
-
|
|
522
|
+
X(n) && _e(n, r);
|
|
523
523
|
}
|
|
524
|
-
else if (
|
|
524
|
+
else if (X(e))
|
|
525
525
|
e._store && (e._store.validated = !0);
|
|
526
526
|
else if (e) {
|
|
527
|
-
var
|
|
528
|
-
if (typeof
|
|
529
|
-
for (var s =
|
|
530
|
-
|
|
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 ===
|
|
544
|
+
r.$$typeof === h))
|
|
545
545
|
t = r.propTypes;
|
|
546
546
|
else
|
|
547
547
|
return;
|
|
548
548
|
if (t) {
|
|
549
|
-
var n =
|
|
550
|
-
|
|
551
|
-
} else if (r.PropTypes !== void 0 && !
|
|
552
|
-
|
|
553
|
-
var
|
|
554
|
-
d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
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
|
-
|
|
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 && (
|
|
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
|
|
572
|
+
function we(e, r, t, n, o, s) {
|
|
573
573
|
{
|
|
574
|
-
var
|
|
575
|
-
if (!
|
|
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" :
|
|
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,
|
|
583
|
+
var l = er(e, r, t, o, s);
|
|
584
584
|
if (l == null)
|
|
585
585
|
return l;
|
|
586
|
-
if (
|
|
587
|
-
var
|
|
588
|
-
if (
|
|
586
|
+
if (i) {
|
|
587
|
+
var g = r.children;
|
|
588
|
+
if (g !== void 0)
|
|
589
589
|
if (n)
|
|
590
|
-
if (
|
|
591
|
-
for (var
|
|
592
|
-
me(
|
|
593
|
-
Object.freeze && Object.freeze(
|
|
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(
|
|
597
|
+
me(g, e);
|
|
598
598
|
}
|
|
599
|
-
if (
|
|
600
|
-
var
|
|
599
|
+
if (W.call(r, "key")) {
|
|
600
|
+
var S = T(e), p = Object.keys(r).filter(function(fr) {
|
|
601
601
|
return fr !== "key";
|
|
602
|
-
}),
|
|
603
|
-
if (!Re[
|
|
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} />`,
|
|
610
|
+
<%s key={someKey} {...props} />`, H, S, lr, S), Re[S + H] = !0;
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
return e ===
|
|
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
|
|
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 =
|
|
623
|
-
|
|
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
|
|
628
|
-
function
|
|
629
|
-
const [
|
|
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
|
|
632
|
+
var f;
|
|
633
633
|
try {
|
|
634
|
-
const
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
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
|
-
|
|
656
|
+
m(!1);
|
|
641
657
|
}
|
|
642
658
|
})();
|
|
643
|
-
}, []), !
|
|
644
|
-
"div",
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
"
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
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
|
-
|
|
700
|
-
|
|
725
|
+
hr as QoboBanner,
|
|
726
|
+
hr as default
|
|
701
727
|
};
|
package/package.json
CHANGED
package/src/QoboBanner.jsx
CHANGED
|
@@ -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]
|
|
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
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
-
|
|
85
|
+
padding: '12px 16px',
|
|
86
|
+
textAlign: 'center',
|
|
87
|
+
fontSize: '0.95rem',
|
|
106
88
|
fontWeight: '600',
|
|
107
|
-
|
|
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
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
|