@yakocloud/state-vocab 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/state-vocab.cjs.js +8 -6
- package/dist/state-vocab.es.js +219 -201
- package/package.json +1 -1
package/dist/state-vocab.cjs.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("react"),De=Symbol("state-def"),B=Symbol("state-path");function
|
|
2
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("react"),De=Symbol("state-def"),B=Symbol("state-path");function gr(v,i,u){if(!i)return v;const f=i.split(".");let c=v;for(const b of f)if(c!==null&&typeof c=="object"&&b in c)c=c[b];else return u;return c===void 0?u:c}function br(v,i,u){const f=i.replace(/\[(\d+)\]/g,".$1").split(".");let c=v;for(let b=0;b<f.length-1;b++){const m=f[b],y=f[b+1];(c[m]===void 0||c[m]===null)&&(c[m]=/^\d+$/.test(y)?[]:{}),c=c[m]}return c[f[f.length-1]]=u,v}function hr(v,i=0){let u;return function(...f){u!==void 0&&clearTimeout(u),u=setTimeout(()=>{u=void 0,v.apply(this,f)},i)}}function mr(v,i,u=[]){return D.useMemo(()=>hr(v,i),u)}function Er(v){const i=JSON.stringify(v,null,2).split(`
|
|
2
|
+
`),u=[],f=[];for(const c of i){const b=c.match(/^(\s*)"([^"]+)"(\s*:\s*)(.+)$/);if(b){const[,m,y,l,p]=b;u.push(`${m}%c"${y}"%c${l}%c${p}`),f.push("color: #9cdcfe; font-weight: bold","color: #cccccc","color: #ce9178")}else u.push(`%c${c}`),f.push("color: #cccccc")}console.log(u.join(`
|
|
3
|
+
`),...f,v)}var K={exports:{}},Y={};var Ce;function Rr(){if(Ce)return Y;Ce=1;var v=D,i=Symbol.for("react.element"),u=Symbol.for("react.fragment"),f=Object.prototype.hasOwnProperty,c=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,b={key:!0,ref:!0,__self:!0,__source:!0};function m(y,l,p){var g,_={},w=null,k=null;p!==void 0&&(w=""+p),l.key!==void 0&&(w=""+l.key),l.ref!==void 0&&(k=l.ref);for(g in l)f.call(l,g)&&!b.hasOwnProperty(g)&&(_[g]=l[g]);if(y&&y.defaultProps)for(g in l=y.defaultProps,l)_[g]===void 0&&(_[g]=l[g]);return{$$typeof:i,type:y,key:w,ref:k,props:_,_owner:c.current}}return Y.Fragment=u,Y.jsx=m,Y.jsxs=m,Y}var L={};var we;function _r(){return we||(we=1,process.env.NODE_ENV!=="production"&&(function(){var v=D,i=Symbol.for("react.element"),u=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),y=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),j=Symbol.iterator,P="@@iterator";function R(e){if(e===null||typeof e!="object")return null;var r=j&&e[j]||e[P];return typeof r=="function"?r:null}var S=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function T(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Ie("error",e,t)}}function Ie(e,r,t){{var n=S.ReactDebugCurrentFrame,s=n.getStackAddendum();s!==""&&(r+="%s",t=t.concat([s]));var d=t.map(function(o){return String(o)});d.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,d)}}var $e=!1,Ve=!1,We=!1,Me=!1,Ye=!1,te;te=Symbol.for("react.module.reference");function Le(e){return!!(typeof e=="string"||typeof e=="function"||e===f||e===b||Ye||e===c||e===p||e===g||Me||e===k||$e||Ve||We||typeof e=="object"&&e!==null&&(e.$$typeof===w||e.$$typeof===_||e.$$typeof===m||e.$$typeof===y||e.$$typeof===l||e.$$typeof===te||e.getModuleId!==void 0))}function Ne(e,r,t){var n=e.displayName;if(n)return n;var s=r.displayName||r.name||"";return s!==""?t+"("+s+")":t}function ne(e){return e.displayName||"Context"}function A(e){if(e==null)return null;if(typeof e.tag=="number"&&T("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 f:return"Fragment";case u:return"Portal";case b:return"Profiler";case c:return"StrictMode";case p:return"Suspense";case g:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case y:var r=e;return ne(r)+".Consumer";case m:var t=e;return ne(t._context)+".Provider";case l:return Ne(e,e.render,"ForwardRef");case _:var n=e.displayName||null;return n!==null?n:A(e.type)||"Memo";case w:{var s=e,d=s._payload,o=s._init;try{return A(o(d))}catch{return null}}}return null}var F=Object.assign,W=0,ae,oe,ie,ue,se,ce,fe;function le(){}le.__reactDisabledLog=!0;function Ue(){{if(W===0){ae=console.log,oe=console.info,ie=console.warn,ue=console.error,se=console.group,ce=console.groupCollapsed,fe=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})}W++}}function Je(){{if(W--,W===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},e,{value:ae}),info:F({},e,{value:oe}),warn:F({},e,{value:ie}),error:F({},e,{value:ue}),group:F({},e,{value:se}),groupCollapsed:F({},e,{value:ce}),groupEnd:F({},e,{value:fe})})}W<0&&T("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var z=S.ReactCurrentDispatcher,G;function N(e,r,t){{if(G===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);G=n&&n[1]||""}return`
|
|
4
|
+
`+G+e}}var X=!1,U;{var qe=typeof WeakMap=="function"?WeakMap:Map;U=new qe}function de(e,r){if(!e||X)return"";{var t=U.get(e);if(t!==void 0)return t}var n;X=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var d;d=z.current,z.current=null,Ue();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(C){n=C}Reflect.construct(e,[],o)}else{try{o.call()}catch(C){n=C}e.call(o.prototype)}}else{try{throw Error()}catch(C){n=C}e()}}catch(C){if(C&&n&&typeof C.stack=="string"){for(var a=C.stack.split(`
|
|
3
5
|
`),O=n.stack.split(`
|
|
4
|
-
`),
|
|
5
|
-
`+a[
|
|
6
|
+
`),h=a.length-1,E=O.length-1;h>=1&&E>=0&&a[h]!==O[E];)E--;for(;h>=1&&E>=0;h--,E--)if(a[h]!==O[E]){if(h!==1||E!==1)do if(h--,E--,E<0||a[h]!==O[E]){var x=`
|
|
7
|
+
`+a[h].replace(" at new "," at ");return e.displayName&&x.includes("<anonymous>")&&(x=x.replace("<anonymous>",e.displayName)),typeof e=="function"&&U.set(e,x),x}while(h>=1&&E>=0);break}}}finally{X=!1,z.current=d,Je(),Error.prepareStackTrace=s}var V=e?e.displayName||e.name:"",I=V?N(V):"";return typeof e=="function"&&U.set(e,I),I}function Ke(e,r,t){return de(e,!1)}function Be(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function J(e,r,t){if(e==null)return"";if(typeof e=="function")return de(e,Be(e));if(typeof e=="string")return N(e);switch(e){case p:return N("Suspense");case g:return N("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return Ke(e.render);case _:return J(e.type,r,t);case w:{var n=e,s=n._payload,d=n._init;try{return J(d(s),r,t)}catch{}}}return""}var M=Object.prototype.hasOwnProperty,ve={},pe=S.ReactDebugCurrentFrame;function q(e){if(e){var r=e._owner,t=J(e.type,e._source,r?r.type:null);pe.setExtraStackFrame(t)}else pe.setExtraStackFrame(null)}function ze(e,r,t,n,s){{var d=Function.call.bind(M);for(var o in e)if(d(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var O=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 O.name="Invariant Violation",O}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(h){a=h}a&&!(a instanceof Error)&&(q(s),T("%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),q(null)),a instanceof Error&&!(a.message in ve)&&(ve[a.message]=!0,q(s),T("Failed %s type: %s",t,a.message),q(null))}}}var Ge=Array.isArray;function H(e){return Ge(e)}function Xe(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function He(e){try{return ye(e),!1}catch{return!0}}function ye(e){return""+e}function ge(e){if(He(e))return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xe(e)),ye(e)}var be=S.ReactCurrentOwner,Ze={key:!0,ref:!0,__self:!0,__source:!0},he,me;function Qe(e){if(M.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function er(e){if(M.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function rr(e,r){typeof e.ref=="string"&&be.current}function tr(e,r){{var t=function(){he||(he=!0,T("%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 nr(e,r){{var t=function(){me||(me=!0,T("%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 ar=function(e,r,t,n,s,d,o){var a={$$typeof:i,type:e,key:r,ref:t,props:o,_owner:d};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:s}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function or(e,r,t,n,s){{var d,o={},a=null,O=null;t!==void 0&&(ge(t),a=""+t),er(r)&&(ge(r.key),a=""+r.key),Qe(r)&&(O=r.ref,rr(r,s));for(d in r)M.call(r,d)&&!Ze.hasOwnProperty(d)&&(o[d]=r[d]);if(e&&e.defaultProps){var h=e.defaultProps;for(d in h)o[d]===void 0&&(o[d]=h[d])}if(a||O){var E=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&tr(o,E),O&&nr(o,E)}return ar(e,a,O,s,n,be.current,o)}}var Z=S.ReactCurrentOwner,Ee=S.ReactDebugCurrentFrame;function $(e){if(e){var r=e._owner,t=J(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(t)}else Ee.setExtraStackFrame(null)}var Q;Q=!1;function ee(e){return typeof e=="object"&&e!==null&&e.$$typeof===i}function Re(){{if(Z.current){var e=A(Z.current.type);if(e)return`
|
|
6
8
|
|
|
7
9
|
Check the render method of \``+e+"`."}return""}}function ir(e){return""}var _e={};function ur(e){{var r=Re();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
8
10
|
|
|
9
|
-
Check the top-level render call using <`+t+">.")}return r}}function Se(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ur(r);if(_e[t])return;_e[t]=!0;var n="";e&&e._owner&&e._owner!==Z.current&&(n=" It was passed a child from "+A(e._owner.type)+".")
|
|
11
|
+
Check the top-level render call using <`+t+">.")}return r}}function Se(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ur(r);if(_e[t])return;_e[t]=!0;var n="";e&&e._owner&&e._owner!==Z.current&&(n=" It was passed a child from "+A(e._owner.type)+"."),$(e),T('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),$(null)}}function Te(e,r){{if(typeof e!="object")return;if(H(e))for(var t=0;t<e.length;t++){var n=e[t];ee(n)&&Se(n,r)}else if(ee(e))e._store&&(e._store.validated=!0);else if(e){var s=R(e);if(typeof s=="function"&&s!==e.entries)for(var d=s.call(e),o;!(o=d.next()).done;)ee(o.value)&&Se(o.value,r)}}}function sr(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===l||r.$$typeof===_))t=r.propTypes;else return;if(t){var n=A(r);ze(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!Q){Q=!0;var s=A(r);T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function cr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){$(e),T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),$(null);break}}e.ref!==null&&($(e),T("Invalid attribute `ref` supplied to `React.Fragment`."),$(null))}}var Oe={};function Pe(e,r,t,n,s,d){{var o=Le(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 O=ir();O?a+=O:a+=Re();var h;e===null?h="null":H(e)?h="array":e!==void 0&&e.$$typeof===i?(h="<"+(A(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):h=typeof e,T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",h,a)}var E=or(e,r,t,s,d);if(E==null)return E;if(o){var x=r.children;if(x!==void 0)if(n)if(H(x)){for(var V=0;V<x.length;V++)Te(x[V],e);Object.freeze&&Object.freeze(x)}else T("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 Te(x,e)}if(M.call(r,"key")){var I=A(e),C=Object.keys(r).filter(function(yr){return yr!=="key"}),re=C.length>0?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}";if(!Oe[I+re]){var pr=C.length>0?"{"+C.join(": ..., ")+": ...}":"{}";T(`A props object containing a "key" prop is being spread into JSX:
|
|
10
12
|
let props = %s;
|
|
11
13
|
<%s {...props} />
|
|
12
14
|
React keys must be passed directly to JSX without using spread:
|
|
13
15
|
let props = %s;
|
|
14
|
-
<%s key={someKey} {...props} />`,re,I,pr,I),Oe[I+re]=!0}}return e===
|
|
16
|
+
<%s key={someKey} {...props} />`,re,I,pr,I),Oe[I+re]=!0}}return e===f?cr(E):sr(E),E}}function fr(e,r,t){return Pe(e,r,t,!0)}function lr(e,r,t){return Pe(e,r,t,!1)}var dr=lr,vr=fr;L.Fragment=f,L.jsx=dr,L.jsxs=vr})()),L}var xe;function Sr(){return xe||(xe=1,process.env.NODE_ENV==="production"?K.exports=Rr():K.exports=_r()),K.exports}var Tr=Sr();const Ae=D.createContext({stateVocab:{},setStateVocab:()=>{}});function Or(){return D.useContext(Ae)}const Pr=v=>{const{children:i,verbose:u}=v,[f,c]=D.useState({});return u&&Er(f),Tr.jsx(Ae.Provider,{value:{stateVocab:f,setStateVocab:c},children:i})};function Cr(v={}){const{storage:i,serialize:u=JSON.stringify,deserialize:f=JSON.parse,defaultValue:c}=v;return{[De]:!0,[B]:"",useState(b,m){m??={};const y=mr(m.onSet??(()=>{}),m.delayedSet,[]),l=Or(),p=this[B],g=()=>typeof b=="function"?b():b??c,_=D.useMemo(()=>{if(!i)return;const P=i.getItem(p);let R;if(P===null){const S=g();if(typeof S>"u")return;R=S}else R=f(P);return R},[p]),w=D.useMemo(()=>gr(l.stateVocab,p,_??g()),[l.stateVocab,_,p]),k=P=>R=>{const S={...R};return br(S,p,P),S};D.useEffect(()=>{!i||typeof _>"u"||l.setStateVocab(k(_))},[_]);const j=D.useRef(w);return[w,function(R){const S=typeof R=="function"?R(j.current):R;l.setStateVocab(k(S)),y(S,j.current),i&&i.setItem(p,u(S)),j.current=S},function(){const R=g();if(typeof R>"u"){i?.removeItem(p);return}l.setStateVocab(k(R)),y(R,j.current),j.current=R,i&&i.setItem(p,u(R))}]},toString(){return this[B]}}}const je=new WeakMap,ke=new WeakMap;function Fe(v,i=""){let u=je.get(v);u||(u=new Map,je.set(v,u));const f=u.get(i);if(f)return f;const c=new Proxy(v,{get(b,m){const y=b[m],l=i?`${i}.${String(m)}`:String(m);if(y&&typeof y=="object"&&De in y){const p=y;let g=ke.get(p);g||(g=new Map,ke.set(p,g));const _=g.get(l);if(_)return _;const w=Reflect.ownKeys(p).filter(P=>typeof p[P]=="function"),k=Object.fromEntries(w.map(P=>[P,(...R)=>p[P].call({...p,[B]:l},...R)])),j={...p,...k};return g.set(l,j),j}return y&&typeof y=="object"?Fe(y,l):y}});return u.set(i,c),c}function wr(v){return Fe(v)}exports.StorageProvider=Pr;exports.defineState=Cr;exports.setupStorage=wr;
|
package/dist/state-vocab.es.js
CHANGED
|
@@ -1,89 +1,107 @@
|
|
|
1
|
-
import De, { useMemo as re, createContext as br, useState as hr, useContext as
|
|
1
|
+
import De, { useMemo as re, createContext as br, useState as hr, useContext as mr, useEffect as Er, useRef as Rr } from "react";
|
|
2
2
|
const Ae = Symbol("state-def"), K = Symbol("state-path");
|
|
3
|
-
function _r(
|
|
3
|
+
function _r(v, i, u) {
|
|
4
4
|
if (!i)
|
|
5
|
-
return
|
|
6
|
-
const
|
|
7
|
-
let
|
|
8
|
-
for (const
|
|
9
|
-
if (
|
|
10
|
-
|
|
5
|
+
return v;
|
|
6
|
+
const f = i.split(".");
|
|
7
|
+
let c = v;
|
|
8
|
+
for (const b of f)
|
|
9
|
+
if (c !== null && typeof c == "object" && b in c)
|
|
10
|
+
c = c[b];
|
|
11
11
|
else
|
|
12
|
-
return
|
|
13
|
-
return
|
|
12
|
+
return u;
|
|
13
|
+
return c === void 0 ? u : c;
|
|
14
14
|
}
|
|
15
|
-
function Sr(
|
|
16
|
-
const
|
|
17
|
-
let
|
|
18
|
-
for (let
|
|
19
|
-
const
|
|
20
|
-
(
|
|
15
|
+
function Sr(v, i, u) {
|
|
16
|
+
const f = i.replace(/\[(\d+)\]/g, ".$1").split(".");
|
|
17
|
+
let c = v;
|
|
18
|
+
for (let b = 0; b < f.length - 1; b++) {
|
|
19
|
+
const m = f[b], y = f[b + 1];
|
|
20
|
+
(c[m] === void 0 || c[m] === null) && (c[m] = /^\d+$/.test(y) ? [] : {}), c = c[m];
|
|
21
21
|
}
|
|
22
|
-
return
|
|
22
|
+
return c[f[f.length - 1]] = u, v;
|
|
23
23
|
}
|
|
24
|
-
function Tr(
|
|
25
|
-
let
|
|
26
|
-
return function(...
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
function Tr(v, i = 0) {
|
|
25
|
+
let u;
|
|
26
|
+
return function(...f) {
|
|
27
|
+
u !== void 0 && clearTimeout(u), u = setTimeout(() => {
|
|
28
|
+
u = void 0, v.apply(this, f);
|
|
29
29
|
}, i);
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function Or(
|
|
32
|
+
function Or(v, i, u = []) {
|
|
33
33
|
return re(
|
|
34
|
-
() => Tr(
|
|
34
|
+
() => Tr(v, i),
|
|
35
35
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
36
|
-
|
|
36
|
+
u
|
|
37
37
|
);
|
|
38
38
|
}
|
|
39
|
+
function Pr(v) {
|
|
40
|
+
const i = JSON.stringify(v, null, 2).split(`
|
|
41
|
+
`), u = [], f = [];
|
|
42
|
+
for (const c of i) {
|
|
43
|
+
const b = c.match(/^(\s*)"([^"]+)"(\s*:\s*)(.+)$/);
|
|
44
|
+
if (b) {
|
|
45
|
+
const [, m, y, l, p] = b;
|
|
46
|
+
u.push(`${m}%c"${y}"%c${l}%c${p}`), f.push(
|
|
47
|
+
"color: #9cdcfe; font-weight: bold",
|
|
48
|
+
"color: #cccccc",
|
|
49
|
+
"color: #ce9178"
|
|
50
|
+
);
|
|
51
|
+
} else
|
|
52
|
+
u.push(`%c${c}`), f.push("color: #cccccc");
|
|
53
|
+
}
|
|
54
|
+
console.log(u.join(`
|
|
55
|
+
`), ...f, v);
|
|
56
|
+
}
|
|
39
57
|
var q = { exports: {} }, Y = {};
|
|
40
58
|
var Ce;
|
|
41
|
-
function
|
|
59
|
+
function Cr() {
|
|
42
60
|
if (Ce) return Y;
|
|
43
61
|
Ce = 1;
|
|
44
|
-
var
|
|
45
|
-
function
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
for (
|
|
49
|
-
if (y && y.defaultProps) for (
|
|
50
|
-
return { $$typeof: i, type: y, key: w, ref: k, props: _, _owner:
|
|
62
|
+
var v = De, i = Symbol.for("react.element"), u = Symbol.for("react.fragment"), f = Object.prototype.hasOwnProperty, c = v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
63
|
+
function m(y, l, p) {
|
|
64
|
+
var g, _ = {}, w = null, k = null;
|
|
65
|
+
p !== void 0 && (w = "" + p), l.key !== void 0 && (w = "" + l.key), l.ref !== void 0 && (k = l.ref);
|
|
66
|
+
for (g in l) f.call(l, g) && !b.hasOwnProperty(g) && (_[g] = l[g]);
|
|
67
|
+
if (y && y.defaultProps) for (g in l = y.defaultProps, l) _[g] === void 0 && (_[g] = l[g]);
|
|
68
|
+
return { $$typeof: i, type: y, key: w, ref: k, props: _, _owner: c.current };
|
|
51
69
|
}
|
|
52
|
-
return Y.Fragment =
|
|
70
|
+
return Y.Fragment = u, Y.jsx = m, Y.jsxs = m, Y;
|
|
53
71
|
}
|
|
54
72
|
var M = {};
|
|
55
73
|
var we;
|
|
56
|
-
function
|
|
74
|
+
function wr() {
|
|
57
75
|
return we || (we = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
58
|
-
var
|
|
59
|
-
function
|
|
76
|
+
var v = De, i = Symbol.for("react.element"), u = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), m = Symbol.for("react.provider"), y = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), k = Symbol.for("react.offscreen"), j = Symbol.iterator, P = "@@iterator";
|
|
77
|
+
function R(e) {
|
|
60
78
|
if (e === null || typeof e != "object")
|
|
61
79
|
return null;
|
|
62
80
|
var r = j && e[j] || e[P];
|
|
63
81
|
return typeof r == "function" ? r : null;
|
|
64
82
|
}
|
|
65
|
-
var S =
|
|
83
|
+
var S = v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
66
84
|
function T(e) {
|
|
67
85
|
{
|
|
68
86
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
69
87
|
t[n - 1] = arguments[n];
|
|
70
|
-
|
|
88
|
+
$e("error", e, t);
|
|
71
89
|
}
|
|
72
90
|
}
|
|
73
|
-
function
|
|
91
|
+
function $e(e, r, t) {
|
|
74
92
|
{
|
|
75
|
-
var n = S.ReactDebugCurrentFrame,
|
|
76
|
-
|
|
77
|
-
var
|
|
93
|
+
var n = S.ReactDebugCurrentFrame, s = n.getStackAddendum();
|
|
94
|
+
s !== "" && (r += "%s", t = t.concat([s]));
|
|
95
|
+
var d = t.map(function(o) {
|
|
78
96
|
return String(o);
|
|
79
97
|
});
|
|
80
|
-
|
|
98
|
+
d.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, d);
|
|
81
99
|
}
|
|
82
100
|
}
|
|
83
|
-
var
|
|
101
|
+
var Ve = !1, We = !1, Ye = !1, Me = !1, Le = !1, te;
|
|
84
102
|
te = Symbol.for("react.module.reference");
|
|
85
103
|
function Ne(e) {
|
|
86
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
104
|
+
return !!(typeof e == "string" || typeof e == "function" || e === f || e === b || Le || e === c || e === p || e === g || Me || e === k || Ve || We || Ye || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === _ || e.$$typeof === m || e.$$typeof === y || e.$$typeof === l || // This needs to include all possible module reference object
|
|
87
105
|
// types supported by any Flight configuration anywhere since
|
|
88
106
|
// we don't know which Flight build this will end up being used
|
|
89
107
|
// with.
|
|
@@ -93,8 +111,8 @@ function Cr() {
|
|
|
93
111
|
var n = e.displayName;
|
|
94
112
|
if (n)
|
|
95
113
|
return n;
|
|
96
|
-
var
|
|
97
|
-
return
|
|
114
|
+
var s = r.displayName || r.name || "";
|
|
115
|
+
return s !== "" ? t + "(" + s + ")" : t;
|
|
98
116
|
}
|
|
99
117
|
function ne(e) {
|
|
100
118
|
return e.displayName || "Context";
|
|
@@ -107,17 +125,17 @@ function Cr() {
|
|
|
107
125
|
if (typeof e == "string")
|
|
108
126
|
return e;
|
|
109
127
|
switch (e) {
|
|
110
|
-
case
|
|
128
|
+
case f:
|
|
111
129
|
return "Fragment";
|
|
112
|
-
case
|
|
130
|
+
case u:
|
|
113
131
|
return "Portal";
|
|
114
|
-
case
|
|
132
|
+
case b:
|
|
115
133
|
return "Profiler";
|
|
116
|
-
case
|
|
134
|
+
case c:
|
|
117
135
|
return "StrictMode";
|
|
118
|
-
case v:
|
|
119
|
-
return "Suspense";
|
|
120
136
|
case p:
|
|
137
|
+
return "Suspense";
|
|
138
|
+
case g:
|
|
121
139
|
return "SuspenseList";
|
|
122
140
|
}
|
|
123
141
|
if (typeof e == "object")
|
|
@@ -125,18 +143,18 @@ function Cr() {
|
|
|
125
143
|
case y:
|
|
126
144
|
var r = e;
|
|
127
145
|
return ne(r) + ".Consumer";
|
|
128
|
-
case
|
|
146
|
+
case m:
|
|
129
147
|
var t = e;
|
|
130
148
|
return ne(t._context) + ".Provider";
|
|
131
|
-
case
|
|
149
|
+
case l:
|
|
132
150
|
return Ue(e, e.render, "ForwardRef");
|
|
133
151
|
case _:
|
|
134
152
|
var n = e.displayName || null;
|
|
135
153
|
return n !== null ? n : D(e.type) || "Memo";
|
|
136
154
|
case w: {
|
|
137
|
-
var
|
|
155
|
+
var s = e, d = s._payload, o = s._init;
|
|
138
156
|
try {
|
|
139
|
-
return D(o(
|
|
157
|
+
return D(o(d));
|
|
140
158
|
} catch {
|
|
141
159
|
return null;
|
|
142
160
|
}
|
|
@@ -144,13 +162,13 @@ function Cr() {
|
|
|
144
162
|
}
|
|
145
163
|
return null;
|
|
146
164
|
}
|
|
147
|
-
var A = Object.assign,
|
|
165
|
+
var A = Object.assign, V = 0, ae, oe, ie, ue, se, ce, fe;
|
|
148
166
|
function le() {
|
|
149
167
|
}
|
|
150
168
|
le.__reactDisabledLog = !0;
|
|
151
169
|
function Je() {
|
|
152
170
|
{
|
|
153
|
-
if (
|
|
171
|
+
if (V === 0) {
|
|
154
172
|
ae = console.log, oe = console.info, ie = console.warn, ue = console.error, se = console.group, ce = console.groupCollapsed, fe = console.groupEnd;
|
|
155
173
|
var e = {
|
|
156
174
|
configurable: !0,
|
|
@@ -168,12 +186,12 @@ function Cr() {
|
|
|
168
186
|
groupEnd: e
|
|
169
187
|
});
|
|
170
188
|
}
|
|
171
|
-
|
|
189
|
+
V++;
|
|
172
190
|
}
|
|
173
191
|
}
|
|
174
192
|
function qe() {
|
|
175
193
|
{
|
|
176
|
-
if (
|
|
194
|
+
if (V--, V === 0) {
|
|
177
195
|
var e = {
|
|
178
196
|
configurable: !0,
|
|
179
197
|
enumerable: !0,
|
|
@@ -203,7 +221,7 @@ function Cr() {
|
|
|
203
221
|
})
|
|
204
222
|
});
|
|
205
223
|
}
|
|
206
|
-
|
|
224
|
+
V < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
207
225
|
}
|
|
208
226
|
}
|
|
209
227
|
var B = S.ReactCurrentDispatcher, z;
|
|
@@ -212,8 +230,8 @@ function Cr() {
|
|
|
212
230
|
if (z === void 0)
|
|
213
231
|
try {
|
|
214
232
|
throw Error();
|
|
215
|
-
} catch (
|
|
216
|
-
var n =
|
|
233
|
+
} catch (s) {
|
|
234
|
+
var n = s.stack.trim().match(/\n( *(at )?)/);
|
|
217
235
|
z = n && n[1] || "";
|
|
218
236
|
}
|
|
219
237
|
return `
|
|
@@ -235,10 +253,10 @@ function Cr() {
|
|
|
235
253
|
}
|
|
236
254
|
var n;
|
|
237
255
|
G = !0;
|
|
238
|
-
var
|
|
256
|
+
var s = Error.prepareStackTrace;
|
|
239
257
|
Error.prepareStackTrace = void 0;
|
|
240
|
-
var
|
|
241
|
-
|
|
258
|
+
var d;
|
|
259
|
+
d = B.current, B.current = null, Je();
|
|
242
260
|
try {
|
|
243
261
|
if (r) {
|
|
244
262
|
var o = function() {
|
|
@@ -275,25 +293,25 @@ function Cr() {
|
|
|
275
293
|
if (C && n && typeof C.stack == "string") {
|
|
276
294
|
for (var a = C.stack.split(`
|
|
277
295
|
`), O = n.stack.split(`
|
|
278
|
-
`),
|
|
279
|
-
|
|
280
|
-
for (;
|
|
281
|
-
if (a[
|
|
282
|
-
if (
|
|
296
|
+
`), h = a.length - 1, E = O.length - 1; h >= 1 && E >= 0 && a[h] !== O[E]; )
|
|
297
|
+
E--;
|
|
298
|
+
for (; h >= 1 && E >= 0; h--, E--)
|
|
299
|
+
if (a[h] !== O[E]) {
|
|
300
|
+
if (h !== 1 || E !== 1)
|
|
283
301
|
do
|
|
284
|
-
if (
|
|
302
|
+
if (h--, E--, E < 0 || a[h] !== O[E]) {
|
|
285
303
|
var x = `
|
|
286
|
-
` + a[
|
|
304
|
+
` + a[h].replace(" at new ", " at ");
|
|
287
305
|
return e.displayName && x.includes("<anonymous>") && (x = x.replace("<anonymous>", e.displayName)), typeof e == "function" && N.set(e, x), x;
|
|
288
306
|
}
|
|
289
|
-
while (
|
|
307
|
+
while (h >= 1 && E >= 0);
|
|
290
308
|
break;
|
|
291
309
|
}
|
|
292
310
|
}
|
|
293
311
|
} finally {
|
|
294
|
-
G = !1, B.current =
|
|
312
|
+
G = !1, B.current = d, qe(), Error.prepareStackTrace = s;
|
|
295
313
|
}
|
|
296
|
-
var
|
|
314
|
+
var $ = e ? e.displayName || e.name : "", F = $ ? L($) : "";
|
|
297
315
|
return typeof e == "function" && N.set(e, F), F;
|
|
298
316
|
}
|
|
299
317
|
function Be(e, r, t) {
|
|
@@ -311,21 +329,21 @@ function Cr() {
|
|
|
311
329
|
if (typeof e == "string")
|
|
312
330
|
return L(e);
|
|
313
331
|
switch (e) {
|
|
314
|
-
case v:
|
|
315
|
-
return L("Suspense");
|
|
316
332
|
case p:
|
|
333
|
+
return L("Suspense");
|
|
334
|
+
case g:
|
|
317
335
|
return L("SuspenseList");
|
|
318
336
|
}
|
|
319
337
|
if (typeof e == "object")
|
|
320
338
|
switch (e.$$typeof) {
|
|
321
|
-
case
|
|
339
|
+
case l:
|
|
322
340
|
return Be(e.render);
|
|
323
341
|
case _:
|
|
324
342
|
return U(e.type, r, t);
|
|
325
343
|
case w: {
|
|
326
|
-
var n = e,
|
|
344
|
+
var n = e, s = n._payload, d = n._init;
|
|
327
345
|
try {
|
|
328
|
-
return U(s
|
|
346
|
+
return U(d(s), r, t);
|
|
329
347
|
} catch {
|
|
330
348
|
}
|
|
331
349
|
}
|
|
@@ -340,11 +358,11 @@ function Cr() {
|
|
|
340
358
|
} else
|
|
341
359
|
pe.setExtraStackFrame(null);
|
|
342
360
|
}
|
|
343
|
-
function Ge(e, r, t, n,
|
|
361
|
+
function Ge(e, r, t, n, s) {
|
|
344
362
|
{
|
|
345
|
-
var
|
|
363
|
+
var d = Function.call.bind(W);
|
|
346
364
|
for (var o in e)
|
|
347
|
-
if (
|
|
365
|
+
if (d(e, o)) {
|
|
348
366
|
var a = void 0;
|
|
349
367
|
try {
|
|
350
368
|
if (typeof e[o] != "function") {
|
|
@@ -352,10 +370,10 @@ function Cr() {
|
|
|
352
370
|
throw O.name = "Invariant Violation", O;
|
|
353
371
|
}
|
|
354
372
|
a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
355
|
-
} catch (
|
|
356
|
-
a =
|
|
373
|
+
} catch (h) {
|
|
374
|
+
a = h;
|
|
357
375
|
}
|
|
358
|
-
a && !(a instanceof Error) && (J(
|
|
376
|
+
a && !(a instanceof Error) && (J(s), T("%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), J(null)), a instanceof Error && !(a.message in ve) && (ve[a.message] = !0, J(s), T("Failed %s type: %s", t, a.message), J(null));
|
|
359
377
|
}
|
|
360
378
|
}
|
|
361
379
|
}
|
|
@@ -371,24 +389,24 @@ function Cr() {
|
|
|
371
389
|
}
|
|
372
390
|
function Ze(e) {
|
|
373
391
|
try {
|
|
374
|
-
return
|
|
392
|
+
return ye(e), !1;
|
|
375
393
|
} catch {
|
|
376
394
|
return !0;
|
|
377
395
|
}
|
|
378
396
|
}
|
|
379
|
-
function
|
|
397
|
+
function ye(e) {
|
|
380
398
|
return "" + e;
|
|
381
399
|
}
|
|
382
|
-
function
|
|
400
|
+
function ge(e) {
|
|
383
401
|
if (Ze(e))
|
|
384
|
-
return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", He(e)),
|
|
402
|
+
return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", He(e)), ye(e);
|
|
385
403
|
}
|
|
386
404
|
var be = S.ReactCurrentOwner, Qe = {
|
|
387
405
|
key: !0,
|
|
388
406
|
ref: !0,
|
|
389
407
|
__self: !0,
|
|
390
408
|
__source: !0
|
|
391
|
-
}, he,
|
|
409
|
+
}, he, me;
|
|
392
410
|
function er(e) {
|
|
393
411
|
if (W.call(e, "ref")) {
|
|
394
412
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
@@ -422,7 +440,7 @@ function Cr() {
|
|
|
422
440
|
function ar(e, r) {
|
|
423
441
|
{
|
|
424
442
|
var t = function() {
|
|
425
|
-
|
|
443
|
+
me || (me = !0, T("%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));
|
|
426
444
|
};
|
|
427
445
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
428
446
|
get: t,
|
|
@@ -430,7 +448,7 @@ function Cr() {
|
|
|
430
448
|
});
|
|
431
449
|
}
|
|
432
450
|
}
|
|
433
|
-
var or = function(e, r, t, n,
|
|
451
|
+
var or = function(e, r, t, n, s, d, o) {
|
|
434
452
|
var a = {
|
|
435
453
|
// This tag allows us to uniquely identify this as a React Element
|
|
436
454
|
$$typeof: i,
|
|
@@ -440,7 +458,7 @@ function Cr() {
|
|
|
440
458
|
ref: t,
|
|
441
459
|
props: o,
|
|
442
460
|
// Record the component responsible for creating this element.
|
|
443
|
-
_owner:
|
|
461
|
+
_owner: d
|
|
444
462
|
};
|
|
445
463
|
return a._store = {}, Object.defineProperty(a._store, "validated", {
|
|
446
464
|
configurable: !1,
|
|
@@ -456,34 +474,34 @@ function Cr() {
|
|
|
456
474
|
configurable: !1,
|
|
457
475
|
enumerable: !1,
|
|
458
476
|
writable: !1,
|
|
459
|
-
value:
|
|
477
|
+
value: s
|
|
460
478
|
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
461
479
|
};
|
|
462
|
-
function ir(e, r, t, n,
|
|
480
|
+
function ir(e, r, t, n, s) {
|
|
463
481
|
{
|
|
464
|
-
var
|
|
465
|
-
t !== void 0 && (
|
|
466
|
-
for (
|
|
467
|
-
W.call(r,
|
|
482
|
+
var d, o = {}, a = null, O = null;
|
|
483
|
+
t !== void 0 && (ge(t), a = "" + t), rr(r) && (ge(r.key), a = "" + r.key), er(r) && (O = r.ref, tr(r, s));
|
|
484
|
+
for (d in r)
|
|
485
|
+
W.call(r, d) && !Qe.hasOwnProperty(d) && (o[d] = r[d]);
|
|
468
486
|
if (e && e.defaultProps) {
|
|
469
|
-
var
|
|
470
|
-
for (
|
|
471
|
-
o[
|
|
487
|
+
var h = e.defaultProps;
|
|
488
|
+
for (d in h)
|
|
489
|
+
o[d] === void 0 && (o[d] = h[d]);
|
|
472
490
|
}
|
|
473
491
|
if (a || O) {
|
|
474
|
-
var
|
|
475
|
-
a && nr(o,
|
|
492
|
+
var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
493
|
+
a && nr(o, E), O && ar(o, E);
|
|
476
494
|
}
|
|
477
|
-
return or(e, a, O,
|
|
495
|
+
return or(e, a, O, s, n, be.current, o);
|
|
478
496
|
}
|
|
479
497
|
}
|
|
480
|
-
var H = S.ReactCurrentOwner,
|
|
498
|
+
var H = S.ReactCurrentOwner, Ee = S.ReactDebugCurrentFrame;
|
|
481
499
|
function I(e) {
|
|
482
500
|
if (e) {
|
|
483
501
|
var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
|
|
484
|
-
|
|
502
|
+
Ee.setExtraStackFrame(t);
|
|
485
503
|
} else
|
|
486
|
-
|
|
504
|
+
Ee.setExtraStackFrame(null);
|
|
487
505
|
}
|
|
488
506
|
var Z;
|
|
489
507
|
Z = !1;
|
|
@@ -543,9 +561,9 @@ Check the top-level render call using <` + t + ">.");
|
|
|
543
561
|
else if (Q(e))
|
|
544
562
|
e._store && (e._store.validated = !0);
|
|
545
563
|
else if (e) {
|
|
546
|
-
var
|
|
547
|
-
if (typeof
|
|
548
|
-
for (var
|
|
564
|
+
var s = R(e);
|
|
565
|
+
if (typeof s == "function" && s !== e.entries)
|
|
566
|
+
for (var d = s.call(e), o; !(o = d.next()).done; )
|
|
549
567
|
Q(o.value) && Se(o.value, r);
|
|
550
568
|
}
|
|
551
569
|
}
|
|
@@ -558,7 +576,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
558
576
|
var t;
|
|
559
577
|
if (typeof r == "function")
|
|
560
578
|
t = r.propTypes;
|
|
561
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
579
|
+
else if (typeof r == "object" && (r.$$typeof === l || // Note: Memo only checks outer props here.
|
|
562
580
|
// Inner props are checked in the reconciler.
|
|
563
581
|
r.$$typeof === _))
|
|
564
582
|
t = r.propTypes;
|
|
@@ -569,8 +587,8 @@ Check the top-level render call using <` + t + ">.");
|
|
|
569
587
|
Ge(t, e.props, "prop", n, e);
|
|
570
588
|
} else if (r.PropTypes !== void 0 && !Z) {
|
|
571
589
|
Z = !0;
|
|
572
|
-
var
|
|
573
|
-
T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
590
|
+
var s = D(r);
|
|
591
|
+
T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
|
|
574
592
|
}
|
|
575
593
|
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
576
594
|
}
|
|
@@ -588,7 +606,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
588
606
|
}
|
|
589
607
|
}
|
|
590
608
|
var Oe = {};
|
|
591
|
-
function Pe(e, r, t, n,
|
|
609
|
+
function Pe(e, r, t, n, s, d) {
|
|
592
610
|
{
|
|
593
611
|
var o = Ne(e);
|
|
594
612
|
if (!o) {
|
|
@@ -596,19 +614,19 @@ Check the top-level render call using <` + t + ">.");
|
|
|
596
614
|
(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.");
|
|
597
615
|
var O = ur();
|
|
598
616
|
O ? a += O : a += Re();
|
|
599
|
-
var
|
|
600
|
-
e === null ?
|
|
617
|
+
var h;
|
|
618
|
+
e === null ? h = "null" : X(e) ? h = "array" : e !== void 0 && e.$$typeof === i ? (h = "<" + (D(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : h = typeof e, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", h, a);
|
|
601
619
|
}
|
|
602
|
-
var
|
|
603
|
-
if (
|
|
604
|
-
return
|
|
620
|
+
var E = ir(e, r, t, s, d);
|
|
621
|
+
if (E == null)
|
|
622
|
+
return E;
|
|
605
623
|
if (o) {
|
|
606
624
|
var x = r.children;
|
|
607
625
|
if (x !== void 0)
|
|
608
626
|
if (n)
|
|
609
627
|
if (X(x)) {
|
|
610
|
-
for (var
|
|
611
|
-
Te(x[
|
|
628
|
+
for (var $ = 0; $ < x.length; $++)
|
|
629
|
+
Te(x[$], e);
|
|
612
630
|
Object.freeze && Object.freeze(x);
|
|
613
631
|
} else
|
|
614
632
|
T("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
@@ -616,20 +634,20 @@ Check the top-level render call using <` + t + ">.");
|
|
|
616
634
|
Te(x, e);
|
|
617
635
|
}
|
|
618
636
|
if (W.call(r, "key")) {
|
|
619
|
-
var F = D(e), C = Object.keys(r).filter(function(
|
|
620
|
-
return
|
|
637
|
+
var F = D(e), C = Object.keys(r).filter(function(gr) {
|
|
638
|
+
return gr !== "key";
|
|
621
639
|
}), ee = C.length > 0 ? "{key: someKey, " + C.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
622
640
|
if (!Oe[F + ee]) {
|
|
623
|
-
var
|
|
641
|
+
var yr = C.length > 0 ? "{" + C.join(": ..., ") + ": ...}" : "{}";
|
|
624
642
|
T(`A props object containing a "key" prop is being spread into JSX:
|
|
625
643
|
let props = %s;
|
|
626
644
|
<%s {...props} />
|
|
627
645
|
React keys must be passed directly to JSX without using spread:
|
|
628
646
|
let props = %s;
|
|
629
|
-
<%s key={someKey} {...props} />`, ee, F,
|
|
647
|
+
<%s key={someKey} {...props} />`, ee, F, yr, F), Oe[F + ee] = !0;
|
|
630
648
|
}
|
|
631
649
|
}
|
|
632
|
-
return e ===
|
|
650
|
+
return e === f ? fr(E) : cr(E), E;
|
|
633
651
|
}
|
|
634
652
|
}
|
|
635
653
|
function lr(e, r, t) {
|
|
@@ -639,81 +657,81 @@ React keys must be passed directly to JSX without using spread:
|
|
|
639
657
|
return Pe(e, r, t, !1);
|
|
640
658
|
}
|
|
641
659
|
var vr = dr, pr = lr;
|
|
642
|
-
M.Fragment =
|
|
660
|
+
M.Fragment = f, M.jsx = vr, M.jsxs = pr;
|
|
643
661
|
})()), M;
|
|
644
662
|
}
|
|
645
663
|
var xe;
|
|
646
|
-
function
|
|
647
|
-
return xe || (xe = 1, process.env.NODE_ENV === "production" ? q.exports =
|
|
664
|
+
function xr() {
|
|
665
|
+
return xe || (xe = 1, process.env.NODE_ENV === "production" ? q.exports = Cr() : q.exports = wr()), q.exports;
|
|
648
666
|
}
|
|
649
|
-
var
|
|
667
|
+
var jr = xr();
|
|
650
668
|
const Fe = br({
|
|
651
669
|
stateVocab: {},
|
|
652
670
|
setStateVocab: () => {
|
|
653
671
|
}
|
|
654
672
|
});
|
|
655
|
-
function
|
|
656
|
-
return
|
|
673
|
+
function kr() {
|
|
674
|
+
return mr(Fe);
|
|
657
675
|
}
|
|
658
|
-
const
|
|
659
|
-
const
|
|
660
|
-
return
|
|
676
|
+
const Ar = (v) => {
|
|
677
|
+
const { children: i, verbose: u } = v, [f, c] = hr({});
|
|
678
|
+
return u && Pr(f), /* @__PURE__ */ jr.jsx(Fe.Provider, { value: { stateVocab: f, setStateVocab: c }, children: i });
|
|
661
679
|
};
|
|
662
|
-
function
|
|
680
|
+
function Fr(v = {}) {
|
|
663
681
|
const {
|
|
664
682
|
storage: i,
|
|
665
|
-
serialize:
|
|
666
|
-
deserialize:
|
|
667
|
-
defaultValue:
|
|
668
|
-
} =
|
|
683
|
+
serialize: u = JSON.stringify,
|
|
684
|
+
deserialize: f = JSON.parse,
|
|
685
|
+
defaultValue: c
|
|
686
|
+
} = v;
|
|
669
687
|
return {
|
|
670
688
|
[Ae]: !0,
|
|
671
689
|
// marks this object as a leaf in the router tree
|
|
672
690
|
[K]: "",
|
|
673
691
|
// placeholder; injected at runtime by injectPaths()
|
|
674
|
-
useState(
|
|
675
|
-
|
|
692
|
+
useState(b, m) {
|
|
693
|
+
m ??= {};
|
|
676
694
|
const y = Or(
|
|
677
|
-
|
|
695
|
+
m.onSet ?? (() => {
|
|
678
696
|
}),
|
|
679
|
-
|
|
697
|
+
m.delayedSet,
|
|
680
698
|
[]
|
|
681
|
-
),
|
|
699
|
+
), l = kr(), p = this[K], g = () => typeof b == "function" ? b() : b ?? c, _ = re(
|
|
682
700
|
() => {
|
|
683
701
|
if (!i)
|
|
684
702
|
return;
|
|
685
|
-
const P = i.getItem(
|
|
686
|
-
let
|
|
703
|
+
const P = i.getItem(p);
|
|
704
|
+
let R;
|
|
687
705
|
if (P === null) {
|
|
688
|
-
const S =
|
|
706
|
+
const S = g();
|
|
689
707
|
if (typeof S > "u")
|
|
690
708
|
return;
|
|
691
|
-
|
|
709
|
+
R = S;
|
|
692
710
|
} else
|
|
693
|
-
|
|
694
|
-
return
|
|
711
|
+
R = f(P);
|
|
712
|
+
return R;
|
|
695
713
|
},
|
|
696
714
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
697
|
-
[
|
|
715
|
+
[p]
|
|
698
716
|
), w = re(
|
|
699
717
|
() => _r(
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
_ ??
|
|
718
|
+
l.stateVocab,
|
|
719
|
+
p,
|
|
720
|
+
_ ?? g()
|
|
703
721
|
),
|
|
704
722
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
705
723
|
[
|
|
706
|
-
|
|
724
|
+
l.stateVocab,
|
|
707
725
|
_,
|
|
708
|
-
|
|
726
|
+
p
|
|
709
727
|
]
|
|
710
|
-
), k = (P) => (
|
|
711
|
-
const S = { ...
|
|
712
|
-
return Sr(S,
|
|
728
|
+
), k = (P) => (R) => {
|
|
729
|
+
const S = { ...R };
|
|
730
|
+
return Sr(S, p, P), S;
|
|
713
731
|
};
|
|
714
|
-
|
|
732
|
+
Er(
|
|
715
733
|
() => {
|
|
716
|
-
!i ||
|
|
734
|
+
!i || typeof _ > "u" || l.setStateVocab(k(_));
|
|
717
735
|
},
|
|
718
736
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
719
737
|
[_]
|
|
@@ -721,17 +739,17 @@ function Ar(d = {}) {
|
|
|
721
739
|
const j = Rr(w);
|
|
722
740
|
return [
|
|
723
741
|
w,
|
|
724
|
-
function(
|
|
725
|
-
const S = typeof
|
|
726
|
-
|
|
742
|
+
function(R) {
|
|
743
|
+
const S = typeof R == "function" ? R(j.current) : R;
|
|
744
|
+
l.setStateVocab(k(S)), y(S, j.current), i && i.setItem(p, u(S)), j.current = S;
|
|
727
745
|
},
|
|
728
746
|
function() {
|
|
729
|
-
const
|
|
730
|
-
if (typeof
|
|
731
|
-
i?.removeItem(
|
|
747
|
+
const R = g();
|
|
748
|
+
if (typeof R > "u") {
|
|
749
|
+
i?.removeItem(p);
|
|
732
750
|
return;
|
|
733
751
|
}
|
|
734
|
-
|
|
752
|
+
l.setStateVocab(k(R)), y(R, j.current), j.current = R, i && i.setItem(p, u(R));
|
|
735
753
|
}
|
|
736
754
|
];
|
|
737
755
|
},
|
|
@@ -742,45 +760,45 @@ function Ar(d = {}) {
|
|
|
742
760
|
};
|
|
743
761
|
}
|
|
744
762
|
const je = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap();
|
|
745
|
-
function Ie(
|
|
746
|
-
let
|
|
747
|
-
|
|
748
|
-
const
|
|
749
|
-
if (
|
|
750
|
-
return
|
|
751
|
-
const
|
|
752
|
-
get(
|
|
753
|
-
const y = m
|
|
763
|
+
function Ie(v, i = "") {
|
|
764
|
+
let u = je.get(v);
|
|
765
|
+
u || (u = /* @__PURE__ */ new Map(), je.set(v, u));
|
|
766
|
+
const f = u.get(i);
|
|
767
|
+
if (f)
|
|
768
|
+
return f;
|
|
769
|
+
const c = new Proxy(v, {
|
|
770
|
+
get(b, m) {
|
|
771
|
+
const y = b[m], l = i ? `${i}.${String(m)}` : String(m);
|
|
754
772
|
if (y && typeof y == "object" && Ae in y) {
|
|
755
|
-
const
|
|
756
|
-
let
|
|
757
|
-
|
|
758
|
-
const _ =
|
|
773
|
+
const p = y;
|
|
774
|
+
let g = ke.get(p);
|
|
775
|
+
g || (g = /* @__PURE__ */ new Map(), ke.set(p, g));
|
|
776
|
+
const _ = g.get(l);
|
|
759
777
|
if (_)
|
|
760
778
|
return _;
|
|
761
|
-
const w = Reflect.ownKeys(
|
|
762
|
-
(P) => typeof
|
|
779
|
+
const w = Reflect.ownKeys(p).filter(
|
|
780
|
+
(P) => typeof p[P] == "function"
|
|
763
781
|
), k = Object.fromEntries(
|
|
764
782
|
w.map((P) => [
|
|
765
783
|
P,
|
|
766
|
-
(...
|
|
767
|
-
{ ...
|
|
768
|
-
...
|
|
784
|
+
(...R) => p[P].call(
|
|
785
|
+
{ ...p, [K]: l },
|
|
786
|
+
...R
|
|
769
787
|
)
|
|
770
788
|
])
|
|
771
|
-
), j = { ...
|
|
772
|
-
return
|
|
789
|
+
), j = { ...p, ...k };
|
|
790
|
+
return g.set(l, j), j;
|
|
773
791
|
}
|
|
774
|
-
return y && typeof y == "object" ? Ie(y,
|
|
792
|
+
return y && typeof y == "object" ? Ie(y, l) : y;
|
|
775
793
|
}
|
|
776
794
|
});
|
|
777
|
-
return
|
|
795
|
+
return u.set(i, c), c;
|
|
778
796
|
}
|
|
779
|
-
function
|
|
780
|
-
return Ie(
|
|
797
|
+
function Ir(v) {
|
|
798
|
+
return Ie(v);
|
|
781
799
|
}
|
|
782
800
|
export {
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
801
|
+
Ar as StorageProvider,
|
|
802
|
+
Fr as defineState,
|
|
803
|
+
Ir as setupStorage
|
|
786
804
|
};
|