@storyblok/react 4.0.0 → 4.2.0
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/LICENSE +21 -0
- package/README.md +26 -2
- package/dist/client.js +1 -1
- package/dist/common/client.d.ts +3 -0
- package/dist/common/client.d.ts.map +1 -0
- package/dist/{types/common → common}/index.d.ts +2 -1
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/storyblok-component.d.ts +7 -0
- package/dist/common/storyblok-component.d.ts.map +1 -0
- package/dist/common.mjs +2 -2
- package/dist/{types/index.d.ts → index.d.ts} +2 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +4 -4
- package/dist/jsx-runtime.js +2 -0
- package/dist/jsx-runtime.mjs +9 -0
- package/dist/jsx-runtime2.js +1 -0
- package/dist/jsx-runtime2.mjs +4 -0
- package/dist/live-editing.js +1 -1
- package/dist/react-jsx-runtime.development.js +23 -0
- package/dist/react-jsx-runtime.development.mjs +609 -0
- package/dist/react-jsx-runtime.development2.js +1 -0
- package/dist/react-jsx-runtime.development2.mjs +4 -0
- package/dist/react-jsx-runtime.production.min.js +10 -0
- package/dist/react-jsx-runtime.production.min.mjs +29 -0
- package/dist/react-jsx-runtime.production.min2.js +1 -0
- package/dist/react-jsx-runtime.production.min2.mjs +4 -0
- package/dist/{types/rsc → rsc}/common.d.ts +2 -1
- package/dist/rsc/common.d.ts.map +1 -0
- package/dist/{types/rsc → rsc}/index.d.ts +1 -0
- package/dist/rsc/index.d.ts.map +1 -0
- package/dist/{types/rsc → rsc}/live-edit-update-action.d.ts +1 -0
- package/dist/rsc/live-edit-update-action.d.ts.map +1 -0
- package/dist/{types/rsc → rsc}/live-editing.d.ts +1 -0
- package/dist/rsc/live-editing.d.ts.map +1 -0
- package/dist/rsc/server-component.d.ts +7 -0
- package/dist/rsc/server-component.d.ts.map +1 -0
- package/dist/rsc/story.d.ts +8 -0
- package/dist/rsc/story.d.ts.map +1 -0
- package/dist/server-component.js +1 -1
- package/dist/server-component.mjs +21 -15
- package/dist/story.js +1 -1
- package/dist/story.mjs +17 -13
- package/dist/storyblok-component.js +1 -1
- package/dist/storyblok-component.mjs +20 -14
- package/dist/storyblok-js.js +24 -24
- package/dist/storyblok-js.mjs +373 -354
- package/dist/{types/types.d.ts → types.d.ts} +2 -1
- package/dist/types.d.ts.map +1 -0
- package/package.json +52 -45
- package/dist/types/common/client.d.ts +0 -2
- package/dist/types/common/storyblok-component.d.ts +0 -8
- package/dist/types/rsc/server-component.d.ts +0 -8
- package/dist/types/rsc/story.d.ts +0 -9
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Storyblok GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -317,9 +317,27 @@ const bridgeOptions = { resolveRelations: ['article.author'] }
|
|
|
317
317
|
<StoryblokStory story={data.story} bridgeOptions={bridgeOptions} />
|
|
318
318
|
```
|
|
319
319
|
|
|
320
|
-
>
|
|
320
|
+
> [!IMPORTANT]
|
|
321
|
+
> When you render components, you must use `StoryblokServerComponent` exported from `@storyblok/react/rsc` instead of `StoryblokComponent`, even when you declare a client component with `"use client"`. This is because the components are always rendered on the server side.
|
|
321
322
|
|
|
322
|
-
|
|
323
|
+
```jsx
|
|
324
|
+
import { storyblokEditable, StoryblokServerComponent } from '@storyblok/react/rsc';
|
|
325
|
+
|
|
326
|
+
const Page = ({ blok }) => (
|
|
327
|
+
<main {...storyblokEditable(blok)}>
|
|
328
|
+
{blok.body.map(nestedBlok => (
|
|
329
|
+
<StoryblokServerComponent blok={nestedBlok} key={nestedBlok._uid} />
|
|
330
|
+
))}
|
|
331
|
+
</main>
|
|
332
|
+
);
|
|
333
|
+
|
|
334
|
+
export default Page;
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
> [!NOTE]
|
|
338
|
+
> To use this approach (with `getStoryblokApi`), you need to include the `apiPlugin` module when calling `storyblokInit` function. If you don't use `apiPlugin`, you can use your preferred method or function to fetch your data.
|
|
339
|
+
|
|
340
|
+
To try this setup, take a look at the [Next 13 Live Editing Playground](https://github.com/storyblok/storyblok-react/tree/main/playground/next13) in this repo.
|
|
323
341
|
|
|
324
342
|
## Next.js using Pages Router
|
|
325
343
|
|
|
@@ -637,6 +655,12 @@ By using these techniques, you can ensure that only the necessary components and
|
|
|
637
655
|
Please see our [contributing guidelines](https://github.com/storyblok/.github/blob/master/contributing.md) and our [code of conduct](https://www.storyblok.com/trust-center#code-of-conduct?utm_source=github.com&utm_medium=readme&utm_campaign=storyblok-react).
|
|
638
656
|
This project use [semantic-release](https://semantic-release.gitbook.io/semantic-release/) for generate new versions by using commit messages and we use the Angular Convention to naming the commits. Check [this question](https://semantic-release.gitbook.io/semantic-release/support/faq#how-can-i-change-the-type-of-commits-that-trigger-a-release) about it in semantic-release FAQ.
|
|
639
657
|
|
|
658
|
+
Please run `simple-git-hooks` after cloning the repository to enable the pre-commit hooks.
|
|
659
|
+
|
|
660
|
+
```bash
|
|
661
|
+
pnpm simple-git-hook
|
|
662
|
+
```
|
|
663
|
+
|
|
640
664
|
## License
|
|
641
665
|
|
|
642
666
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
package/dist/client.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),b=require("./storyblok-js.js"),f=(e=null,u={})=>{const[d,s]=r.useState(e),o=(e==null?void 0:e.internalId)??(e==null?void 0:e.id)??0,t=typeof window<"u"&&typeof window.storyblokRegisterEvent<"u";return r.useEffect(()=>{s(e),!(!t||!e)&&b.registerStoryblokBridge(o,c=>s(c),u)},[e]),d};exports.useStoryblokState=f;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/common/client.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGlD,eAAO,MAAM,iBAAiB,EAAE,kBAyB/B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SbReactComponentsMap, SbReactSDKOptions, StoryblokClient } from '
|
|
1
|
+
import type { SbReactComponentsMap, SbReactSDKOptions, StoryblokClient } from '@/types';
|
|
2
2
|
export declare const useStoryblokApi: () => StoryblokClient;
|
|
3
3
|
export declare const setComponents: (newComponentsMap: SbReactComponentsMap) => SbReactComponentsMap;
|
|
4
4
|
export declare const getComponent: (componentKey: string) => false | import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>;
|
|
@@ -9,3 +9,4 @@ export * from '../types';
|
|
|
9
9
|
export { useStoryblokApi as getStoryblokApi };
|
|
10
10
|
export { default as StoryblokComponent } from './storyblok-component';
|
|
11
11
|
export { apiPlugin, loadStoryblokBridge, registerStoryblokBridge, renderRichText, RichTextResolver, RichTextSchema, storyblokEditable, useStoryblokBridge, } from '@storyblok/js';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EAChB,MAAM,SAAS,CAAC;AAOjB,eAAO,MAAM,eAAe,QAAO,eAQlC,CAAC;AAEF,eAAO,MAAM,aAAa,qBAAsB,oBAAoB,yBAGnE,CAAC;AAEF,eAAO,MAAM,YAAY,iBAAkB,MAAM,0FAOhD,CAAC;AAEF,eAAO,MAAM,0BAA0B,eAAgC,CAAC;AACxE,eAAO,MAAM,0BAA0B,qFAAgC,CAAC;AAExE,eAAO,MAAM,aAAa,mBAAmB,iBAAiB,SAO7D,CAAC;AAEF,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,eAAe,IAAI,eAAe,EAAE,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SbBlokData } from '@/types';
|
|
2
|
+
interface StoryblokComponentProps {
|
|
3
|
+
blok: SbBlokData;
|
|
4
|
+
}
|
|
5
|
+
declare const StoryblokComponent: import("react").ForwardRefExoticComponent<StoryblokComponentProps & import("react").RefAttributes<HTMLElement>>;
|
|
6
|
+
export default StoryblokComponent;
|
|
7
|
+
//# sourceMappingURL=storyblok-component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyblok-component.d.ts","sourceRoot":"","sources":["../../src/common/storyblok-component.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,UAAU,uBAAuB;IAC/B,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,QAAA,MAAM,kBAAkB,iHAuCvB,CAAC;AAIF,eAAe,kBAAkB,CAAC"}
|
package/dist/common.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { storyblokInit as a } from "./storyblok-js.mjs";
|
|
2
2
|
import { RichTextResolver as g, RichTextSchema as C, apiPlugin as d, loadStoryblokBridge as S, registerStoryblokBridge as h, renderRichText as x, storyblokEditable as F, registerStoryblokBridge as A } from "./storyblok-js.mjs";
|
|
3
|
-
import { default as
|
|
3
|
+
import { default as R } from "./server-component.mjs";
|
|
4
4
|
let e = null;
|
|
5
5
|
const r = /* @__PURE__ */ new Map();
|
|
6
6
|
let n = !1, l = null;
|
|
@@ -18,7 +18,7 @@ const i = () => (e || console.error(
|
|
|
18
18
|
export {
|
|
19
19
|
g as RichTextResolver,
|
|
20
20
|
C as RichTextSchema,
|
|
21
|
-
|
|
21
|
+
R as StoryblokServerComponent,
|
|
22
22
|
d as apiPlugin,
|
|
23
23
|
k as getComponent,
|
|
24
24
|
p as getCustomFallbackComponent,
|
|
@@ -2,5 +2,6 @@ import type { ISbStoriesParams, ISbStoryData, StoryblokBridgeConfigV2 } from './
|
|
|
2
2
|
export declare const useStoryblok: (slug: string, apiOptions?: ISbStoriesParams, bridgeOptions?: StoryblokBridgeConfigV2) => ISbStoryData<import("@storyblok/js").StoryblokComponentType<string> & {
|
|
3
3
|
[index: string]: any;
|
|
4
4
|
}>;
|
|
5
|
-
export * from './common';
|
|
6
5
|
export * from './common/client';
|
|
6
|
+
export * from './common/index';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAIjB,eAAO,MAAM,YAAY,SACjB,MAAM,eACA,gBAAgB,kBACb,uBAAuB;;EAgDvC,CAAC;AAEF,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),e=require("./storyblok-js.js"),o=require("./index2.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),e=require("./storyblok-js.js"),o=require("./index2.js"),c=require("./client.js"),S=require("./storyblok-component.js"),d=(s,r={},t={})=>{const[u,i]=y.useState({}),a=typeof window<"u"&&typeof window.storyblokRegisterEvent<"u",n=o.useStoryblokApi();return y.useEffect(()=>{if(!n){console.error("You can't use useStoryblok if you're not loading apiPlugin.");return}async function b(){const{data:l}=await n.get(`cdn/stories/${s}`,r);i(l.story),a&&l.story.id&&e.registerStoryblokBridge(l.story.id,k=>i(k),t)}b()},[s,JSON.stringify(r),n]),n?(t.resolveRelations=t.resolveRelations??r.resolve_relations,t.resolveLinks=t.resolveLinks??r.resolve_links,u):null};exports.RichTextResolver=e.RichTextResolver;exports.RichTextSchema=e.RichTextSchema;exports.apiPlugin=e.apiPlugin;exports.loadStoryblokBridge=e.loadStoryblokBridge;exports.registerStoryblokBridge=e.registerStoryblokBridge;exports.renderRichText=e.renderRichText;exports.storyblokEditable=e.storyblokEditable;exports.useStoryblokBridge=e.registerStoryblokBridge;exports.getComponent=o.getComponent;exports.getCustomFallbackComponent=o.getCustomFallbackComponent;exports.getEnableFallbackComponent=o.getEnableFallbackComponent;exports.getStoryblokApi=o.useStoryblokApi;exports.setComponents=o.setComponents;exports.storyblokInit=o.storyblokInit;exports.useStoryblokApi=o.useStoryblokApi;exports.useStoryblokState=c.useStoryblokState;exports.StoryblokComponent=S;exports.useStoryblok=d;
|
package/dist/index.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import { registerStoryblokBridge as k } from "./storyblok-js.mjs";
|
|
|
3
3
|
import { RichTextResolver as v, RichTextSchema as x, apiPlugin as R, loadStoryblokBridge as C, renderRichText as w, storyblokEditable as B } from "./storyblok-js.mjs";
|
|
4
4
|
import { useStoryblokApi as c } from "./index2.mjs";
|
|
5
5
|
import { getComponent as h, getCustomFallbackComponent as A, getEnableFallbackComponent as T, setComponents as F, storyblokInit as I } from "./index2.mjs";
|
|
6
|
-
import { useStoryblokState as
|
|
7
|
-
import { default as
|
|
6
|
+
import { useStoryblokState as P } from "./client.mjs";
|
|
7
|
+
import { default as q } from "./storyblok-component.mjs";
|
|
8
8
|
const b = (s, e = {}, o = {}) => {
|
|
9
9
|
const [l, n] = f({}), i = typeof window < "u" && typeof window.storyblokRegisterEvent < "u", t = c();
|
|
10
10
|
return u(() => {
|
|
@@ -31,7 +31,7 @@ const b = (s, e = {}, o = {}) => {
|
|
|
31
31
|
export {
|
|
32
32
|
v as RichTextResolver,
|
|
33
33
|
x as RichTextSchema,
|
|
34
|
-
|
|
34
|
+
q as StoryblokComponent,
|
|
35
35
|
R as apiPlugin,
|
|
36
36
|
h as getComponent,
|
|
37
37
|
A as getCustomFallbackComponent,
|
|
@@ -46,5 +46,5 @@ export {
|
|
|
46
46
|
b as useStoryblok,
|
|
47
47
|
c as useStoryblokApi,
|
|
48
48
|
k as useStoryblokBridge,
|
|
49
|
-
|
|
49
|
+
P as useStoryblokState
|
|
50
50
|
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime2.js"),r=require("./react-jsx-runtime.production.min.js"),t=require("./react-jsx-runtime.development.js");process.env.NODE_ENV==="production"?e.__module.exports=r.__require():e.__module.exports=t.__require();var o=e.__module.exports;exports.jsxRuntimeExports=o;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { __module as e } from "./jsx-runtime2.mjs";
|
|
3
|
+
import { __require as r } from "./react-jsx-runtime.production.min.mjs";
|
|
4
|
+
import { __require as o } from "./react-jsx-runtime.development.mjs";
|
|
5
|
+
process.env.NODE_ENV === "production" ? e.exports = r() : e.exports = o();
|
|
6
|
+
var m = e.exports;
|
|
7
|
+
export {
|
|
8
|
+
m as j
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
|
package/dist/live-editing.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";const
|
|
2
|
+
"use strict";const l=require("./storyblok-js.js"),n=require("react"),o=require("./live-edit-update-action.js"),u=({story:e=null,bridgeOptions:t={}})=>{if(typeof window>"u")return null;const r=i=>{i&&n.startTransition(()=>{o.liveEditUpdateAction({story:i,pathToRevalidate:window.location.pathname})})},d=(e==null?void 0:e.internalId)??(e==null?void 0:e.id)??0;return n.useEffect(()=>{l.registerStoryblokBridge(d,i=>r(i),t)},[]),null};module.exports=u;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("./react-jsx-runtime.development2.js"),or=require("react");/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.development.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var Ee;function ur(){return Ee||(Ee=1,process.env.NODE_ENV!=="production"&&function(){var _e=or,x=Symbol.for("react.element"),Re=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),N=Symbol.for("react.provider"),G=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),me=Symbol.for("react.offscreen"),J=Symbol.iterator,Te="@@iterator";function Se(e){if(e===null||typeof e!="object")return null;var r=J&&e[J]||e[Te];return typeof r=="function"?r:null}var h=_e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Ce("error",e,t)}}function Ce(e,r,t){{var n=h.ReactDebugCurrentFrame,o=n.getStackAddendum();o!==""&&(r+="%s",t=t.concat([o]));var u=t.map(function(i){return String(i)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var Oe=!1,Pe=!1,we=!1,je=!1,ke=!1,z;z=Symbol.for("react.module.reference");function xe(e){return!!(typeof e=="string"||typeof e=="function"||e===S||e===K||ke||e===B||e===A||e===D||je||e===me||Oe||Pe||we||typeof e=="object"&&e!==null&&(e.$$typeof===F||e.$$typeof===O||e.$$typeof===N||e.$$typeof===G||e.$$typeof===C||e.$$typeof===z||e.getModuleId!==void 0))}function Ae(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return o!==""?t+"("+o+")":t}function X(e){return e.displayName||"Context"}function p(e){if(e==null)return null;if(typeof e.tag=="number"&&f("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 S:return"Fragment";case Re:return"Portal";case K:return"Profiler";case B:return"StrictMode";case A:return"Suspense";case D:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case G:var r=e;return X(r)+".Consumer";case N:var t=e;return X(t._context)+".Provider";case C:return Ae(e,e.render,"ForwardRef");case O:var n=e.displayName||null;return n!==null?n:p(e.type)||"Memo";case F:{var o=e,u=o._payload,i=o._init;try{return p(i(u))}catch{return null}}}return null}var g=Object.assign,_=0,H,Z,Q,ee,re,te,ne;function ae(){}ae.__reactDisabledLog=!0;function De(){{if(_===0){H=console.log,Z=console.info,Q=console.warn,ee=console.error,re=console.group,te=console.groupCollapsed,ne=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ae,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}_++}}function Fe(){{if(_--,_===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:g({},e,{value:H}),info:g({},e,{value:Z}),warn:g({},e,{value:Q}),error:g({},e,{value:ee}),group:g({},e,{value:re}),groupCollapsed:g({},e,{value:te}),groupEnd:g({},e,{value:ne})})}_<0&&f("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var I=h.ReactCurrentDispatcher,W;function P(e,r,t){{if(W===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);W=n&&n[1]||""}return`
|
|
11
|
+
`+W+e}}var $=!1,w;{var Ie=typeof WeakMap=="function"?WeakMap:Map;w=new Ie}function ie(e,r){if(!e||$)return"";{var t=w.get(e);if(t!==void 0)return t}var n;$=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=I.current,I.current=null,De();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(v){n=v}Reflect.construct(e,[],i)}else{try{i.call()}catch(v){n=v}e.call(i.prototype)}}else{try{throw Error()}catch(v){n=v}e()}}catch(v){if(v&&n&&typeof v.stack=="string"){for(var a=v.stack.split(`
|
|
12
|
+
`),c=n.stack.split(`
|
|
13
|
+
`),s=a.length-1,l=c.length-1;s>=1&&l>=0&&a[s]!==c[l];)l--;for(;s>=1&&l>=0;s--,l--)if(a[s]!==c[l]){if(s!==1||l!==1)do if(s--,l--,l<0||a[s]!==c[l]){var d=`
|
|
14
|
+
`+a[s].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),typeof e=="function"&&w.set(e,d),d}while(s>=1&&l>=0);break}}}finally{$=!1,I.current=u,Fe(),Error.prepareStackTrace=o}var E=e?e.displayName||e.name:"",b=E?P(E):"";return typeof e=="function"&&w.set(e,b),b}function We(e,r,t){return ie(e,!1)}function $e(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function j(e,r,t){if(e==null)return"";if(typeof e=="function")return ie(e,$e(e));if(typeof e=="string")return P(e);switch(e){case A:return P("Suspense");case D:return P("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case C:return We(e.render);case O:return j(e.type,r,t);case F:{var n=e,o=n._payload,u=n._init;try{return j(u(o),r,t)}catch{}}}return""}var R=Object.prototype.hasOwnProperty,oe={},ue=h.ReactDebugCurrentFrame;function k(e){if(e){var r=e._owner,t=j(e.type,e._source,r?r.type:null);ue.setExtraStackFrame(t)}else ue.setExtraStackFrame(null)}function Ye(e,r,t,n,o){{var u=Function.call.bind(R);for(var i in e)if(u(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var c=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`.");throw c.name="Invariant Violation",c}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){a=s}a&&!(a instanceof Error)&&(k(o),f("%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),k(null)),a instanceof Error&&!(a.message in oe)&&(oe[a.message]=!0,k(o),f("Failed %s type: %s",t,a.message),k(null))}}}var Me=Array.isArray;function Y(e){return Me(e)}function Ve(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Le(e){try{return se(e),!1}catch{return!0}}function se(e){return""+e}function le(e){if(Le(e))return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ve(e)),se(e)}var m=h.ReactCurrentOwner,Ue={key:!0,ref:!0,__self:!0,__source:!0},fe,ce,M;M={};function qe(e){if(R.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Be(e){if(R.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Ke(e,r){if(typeof e.ref=="string"&&m.current&&r&&m.current.stateNode!==r){var t=p(m.current.type);M[t]||(f('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',p(m.current.type),e.ref),M[t]=!0)}}function Ne(e,r){{var t=function(){fe||(fe=!0,f("%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 Ge(e,r){{var t=function(){ce||(ce=!0,f("%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 Je=function(e,r,t,n,o,u,i){var a={$$typeof:x,type:e,key:r,ref:t,props:i,_owner:u};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:o}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function ze(e,r,t,n,o){{var u,i={},a=null,c=null;t!==void 0&&(le(t),a=""+t),Be(r)&&(le(r.key),a=""+r.key),qe(r)&&(c=r.ref,Ke(r,o));for(u in r)R.call(r,u)&&!Ue.hasOwnProperty(u)&&(i[u]=r[u]);if(e&&e.defaultProps){var s=e.defaultProps;for(u in s)i[u]===void 0&&(i[u]=s[u])}if(a||c){var l=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&Ne(i,l),c&&Ge(i,l)}return Je(e,a,c,o,n,m.current,i)}}var V=h.ReactCurrentOwner,ve=h.ReactDebugCurrentFrame;function y(e){if(e){var r=e._owner,t=j(e.type,e._source,r?r.type:null);ve.setExtraStackFrame(t)}else ve.setExtraStackFrame(null)}var L;L=!1;function U(e){return typeof e=="object"&&e!==null&&e.$$typeof===x}function de(){{if(V.current){var e=p(V.current.type);if(e)return`
|
|
15
|
+
|
|
16
|
+
Check the render method of \``+e+"`."}return""}}function Xe(e){return""}var pe={};function He(e){{var r=de();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
17
|
+
|
|
18
|
+
Check the top-level render call using <`+t+">.")}return r}}function ge(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=He(r);if(pe[t])return;pe[t]=!0;var n="";e&&e._owner&&e._owner!==V.current&&(n=" It was passed a child from "+p(e._owner.type)+"."),y(e),f('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),y(null)}}function be(e,r){{if(typeof e!="object")return;if(Y(e))for(var t=0;t<e.length;t++){var n=e[t];U(n)&&ge(n,r)}else if(U(e))e._store&&(e._store.validated=!0);else if(e){var o=Se(e);if(typeof o=="function"&&o!==e.entries)for(var u=o.call(e),i;!(i=u.next()).done;)U(i.value)&&ge(i.value,r)}}}function Ze(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===C||r.$$typeof===O))t=r.propTypes;else return;if(t){var n=p(r);Ye(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!L){L=!0;var o=p(r);f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Qe(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){y(e),f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),y(null);break}}e.ref!==null&&(y(e),f("Invalid attribute `ref` supplied to `React.Fragment`."),y(null))}}var he={};function ye(e,r,t,n,o,u){{var i=xe(e);if(!i){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 c=Xe();c?a+=c:a+=de();var s;e===null?s="null":Y(e)?s="array":e!==void 0&&e.$$typeof===x?(s="<"+(p(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,a)}var l=ze(e,r,t,o,u);if(l==null)return l;if(i){var d=r.children;if(d!==void 0)if(n)if(Y(d)){for(var E=0;E<d.length;E++)be(d[E],e);Object.freeze&&Object.freeze(d)}else f("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 be(d,e)}if(R.call(r,"key")){var b=p(e),v=Object.keys(r).filter(function(ir){return ir!=="key"}),q=v.length>0?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}";if(!he[b+q]){var ar=v.length>0?"{"+v.join(": ..., ")+": ...}":"{}";f(`A props object containing a "key" prop is being spread into JSX:
|
|
19
|
+
let props = %s;
|
|
20
|
+
<%s {...props} />
|
|
21
|
+
React keys must be passed directly to JSX without using spread:
|
|
22
|
+
let props = %s;
|
|
23
|
+
<%s key={someKey} {...props} />`,q,b,ar,b),he[b+q]=!0}}return e===S?Qe(l):Ze(l),l}}function er(e,r,t){return ye(e,r,t,!0)}function rr(e,r,t){return ye(e,r,t,!1)}var tr=rr,nr=er;T.__exports.Fragment=S,T.__exports.jsx=tr,T.__exports.jsxs=nr}()),T.__exports}exports.__require=ur;
|