2024-06-16 17:30:30 +02:00
try {
2024-07-31 10:01:28 +02:00
( ( ) => { var ke = ( t => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy ( t , { get : ( e , r ) => ( typeof require < "u" ? require : e ) [ r ] } ) : t ) ( function ( t ) { if ( typeof require < "u" ) return require . apply ( this , arguments ) ; throw Error ( 'Dynamic require of "' + t + '" is not supported' ) } ) ; var x = _ _REACT _ _ , { Children : Cm , Component : Om , Fragment : Er , Profiler : _m , PureComponent : Im , StrictMode : Tm , Suspense : Rm , _ _SECRET _INTERNALS _DO _NOT _USE _OR _YOU _WILL _BE _FIRED : Dm , cloneElement : Fm , createContext : Pm , createElement : se , createFactory : jm , createRef : Bm , forwardRef : km , isValidElement : Nm , lazy : Mm , memo : Sr , startTransition : Lm , unstable _act : $m , useCallback : $o , useContext : zm , useDebugValue : qm , useDeferredValue : Um , useEffect : ct , useId : Hm , useImperativeHandle : Wm , useInsertionEffect : Vm , useLayoutEffect : Gm , useMemo : zo , useReducer : Ym , useRef : Ar , useState : We , useSyncExternalStore : Km , useTransition : Jm , version : Xm } = _ _REACT _ _ ; var ty = _ _STORYBOOK _API _ _ , { ActiveTabs : ry , Consumer : qo , ManagerContext : ny , Provider : oy , RequestResponseError : ay , addons : sn , combineParameters : iy , controlOrMetaKey : sy , controlOrMetaSymbol : uy , eventMatchesShortcut : ly , eventToShortcut : cy , experimental _requestResponse : py , isMacLike : fy , isShortcutTaken : dy , keyToSymbol : hy , merge : my , mockChannel : yy , optionOrAltSymbol : gy , shortcutMatchesShortcut : by , shortcutToHumanString : vy , types : Uo , useAddonState : un , useArgTypes : Ey , useArgs : Sy , useChannel : Ho , useGlobalTypes : Ay , useGlobals : wy , useParameter : Wo , useSharedState : xy , useStoryPrepared : Cy , useStorybookApi : Vo , useStorybookState : Oy } = _ _STORYBOOK _API _ _ ; var Dy = _ _STORYBOOK _COMPONENTS _ _ , { A : Fy , ActionBar : Py , AddonPanel : Go , Badge : Yo , Bar : Ko , Blockquote : jy , Button : Jo , ClipboardCode : By , Code : ky , DL : Ny , Div : My , DocumentWrapper : Ly , EmptyTabContent : Xo , ErrorFormatter : $y , FlexBar : zy , Form : qy , H1 : Uy , H2 : Hy , H3 : Wy , H4 : Vy , H5 : Gy , H6 : Yy , HR : Ky , IconButton : ln , IconButtonSkeleton : Jy , Icons : Xy , Img : Qy , LI : Zy , Link : cn , ListItem : eg , Loader : tg , Modal : rg , OL : ng , P : Qo , Placeholder : og , Pre : ag , ResetWrapper : ig , ScrollArea : sg , Separator : Zo , Spaced : ea , Span : ug , StorybookIcon : lg , StorybookLogo : cg , Symbols : pg , SyntaxHighlighter : fg , TT : dg , TabBar : hg , TabButton : mg , TabWrapper : yg , Table : gg , Tabs : bg , TabsState : vg , TooltipLinkList : Eg , TooltipMessage : Sg , TooltipNote : pn , UL : Ag , WithTooltip : vt , WithTooltipPure : wg , Zoom : xg , codeCommon : Cg , components : Og , createCopyToClipboardFunction : _g , getStoryHref : Ig , icons : Tg , interleaveSeparators : Rg , nameSpaceClassNames : Dg , resetComponents : Fg , withReset : Pg } = _ _STORYBOOK _COMPONENTS _ _ ; var Mg = _ _STORYBOOK _CHANNELS _ _ , { Channel : ta , PostMessageTransport : Lg , WebsocketTransport : $g , createBrowserChannel : zg } = _ _STORYBOOK _CHANNELS _ _ ; var Vg = _ _STORYBOOK _CLIENT _LOGGER _ _ , { deprecate : rt , logger : Se , once : pt , pretty : Gg } = _ _STORYBOOK _CLIENT _LOGGER _ _ ; var Qg = _ _STORYBOOK _CORE _EVENTS _ _ , { ARGTYPES _INFO _REQUEST : ra , ARGTYPES _INFO _RESPONSE : fn , CHANNEL _CREATED : Zg , CHANNEL _WS _DISCONNECT : eb , CONFIG _ERROR : na , CREATE _NEW _STORYFILE _REQUEST : tb , CREATE _NEW _STORYFILE _RESPONSE : rb , CURRENT _STORY _WAS _SET : dn , DOCS _PREPARED : oa , DOCS _RENDERED : wr , FILE _COMPONENT _SEARCH _REQUEST : nb , FILE _COMPONENT _SEARCH _RESPONSE : ob , FORCE _REMOUNT : Xt , FORCE _RE _RENDER : xr , GLOBALS _UPDATED : aa , NAVIGATE _URL : ab , PLAY _FUNCTION _THREW _EXCEPTION : Cr , PRELOAD _ENTRIES : ia , PREVIEW _BUILDER _PROGRESS : ib , PREVIEW _KEYDOWN : sa , REGISTER _SUBSCRIPTION : sb , REQUEST _WHATS _NEW _DATA : ub , RESET _STORY _ARGS : Or , RESULT _WHATS _NEW _DATA : lb , SAVE _STORY _REQUEST : cb , SAVE _STORY _RESPONSE : pb , SELECT _STORY : fb , SET _CONFIG : db , SET _CURRENT _STORY : hn , SET _GLOBALS : ua , SET _INDEX : hb , SET _STORIES : mb , SET _WHATS _NEW _CACHE : yb , SHARED _STATE _CHANGED : gb , SHARED _STATE _SET : bb , STORIES _COLLAPSE _ALL : vb , STORIES _EXPAND _ALL : Eb , STORY _ARGS _UPDATED : la , STORY _CHANGED : ca , STORY _ERRORED : pa , STORY _INDEX _INVALIDATED : fa , STORY _MISSING : mn , STORY _PREPARED : da , STORY _RENDERED : Qt , STORY _RENDER _PHASE _CHANGED : nt , STORY _SPECIFIED : ha , STORY _THREW _EXCEPTION : _r , STORY _UNCHANGED : ma , TELEMETRY _ERROR : Sb , TOGGLE _WHATS _NEW _NOTIFICATIONS : Ab , UNHANDLED _ERRORS _WHILE _PLAYING : Ir , UPDATE _GLOBALS : Tr , UPDATE _QUERY _PARAMS : ya , UPDATE _STORY _ARGS : Rr } = _ _STORYBOOK _CORE _EVENTS _ _ ; var Mu = Object . defineProperty , xe = ( t , e ) => Mu ( t , "name" , { value : e , configurable : ! 0 } ) ; function Ce ( t ) { for ( var e = [ ] , r = 1 ; r < arguments . length ; r ++ ) e [ r - 1 ] = arguments [ r ] ; var n = Array . from ( typeof t == "string" ? [ t ] : t ) ; n [ n . length - 1 ] = n [ n . length - 1 ] . replace ( /\r?\n([\t ]*)$/ , "" ) ; var o =
[ ] { ` +Math.min.apply(Math,o)+"}","g");n=n.map(function(s){return s.replace(a, `
` )})}n[0]=n[0].replace(/^ \r ? \n /,"");var i=n[0];return e.forEach(function(s,u){var c=i.match(/(?:^| \n )( *) $ /),p=c?c[1]:"",d=s;typeof s=="string"&&s.includes( `
` )&&(d=String(s).split( `
` ).map(function(f,g){return g===0?f:""+p+f}).join( `
` )),i+=d+n[u+1]}),i}xe(Ce,"dedent");function yn({code:t,category:e}){let r=String(t).padStart(4,"0");return ` SB _$ { e } _$ { r } ` }xe(yn,"parseErrorCode");var ga=class ba extends Error{category;code;data={};documentation;fromStorybook=!0;get fullErrorCode(){return yn({code:this.code,category:this.category})}get name(){let e=this.constructor.name;return ` $ { this . fullErrorCode } ( $ { e } ) ` }constructor(e){super(ba.getFullMessage(e)),this.category=e.category,this.documentation=e.documentation??!1,this.code=e.code}static getFullMessage({documentation:e,code:r,category:n,message:o}){let a;return e===!0?a= ` https : //storybook.js.org/error/${yn({code:r,category:n})}`:typeof e=="string"?a=e:Array.isArray(e)&&(a=`
$ { e . map ( i => ` - ${ i } ` ) . join ( `
` )} ` ) , ` ${ o } ${ a != null ? `
More info : $ { a }
` :""} ` } } ; xe ( ga , "StorybookError" ) ; var Ie = ga , Lu = ( t => ( t . BLOCKS = "BLOCKS" , t . DOCS _TOOLS = "DOCS-TOOLS" , t . PREVIEW _CLIENT _LOGGER = "PREVIEW_CLIENT-LOGGER" , t . PREVIEW _CHANNELS = "PREVIEW_CHANNELS" , t . PREVIEW _CORE _EVENTS = "PREVIEW_CORE-EVENTS" , t . PREVIEW _INSTRUMENTER = "PREVIEW_INSTRUMENTER" , t . PREVIEW _API = "PREVIEW_API" , t . PREVIEW _REACT _DOM _SHIM = "PREVIEW_REACT-DOM-SHIM" , t . PREVIEW _ROUTER = "PREVIEW_ROUTER" , t . PREVIEW _THEMING = "PREVIEW_THEMING" , t . RENDERER _HTML = "RENDERER_HTML" , t . RENDERER _PREACT = "RENDERER_PREACT" , t . RENDERER _REACT = "RENDERER_REACT" , t . RENDERER _SERVER = "RENDERER_SERVER" , t . RENDERER _SVELTE = "RENDERER_SVELTE" , t . RENDERER _VUE = "RENDERER_VUE" , t . RENDERER _VUE3 = "RENDERER_VUE3" , t . RENDERER _WEB _COMPONENTS = "RENDERER_WEB-COMPONENTS" , t . FRAMEWORK _NEXTJS = "FRAMEWORK_NEXTJS" , t ) ) ( Lu || { } ) , va = class extends Ie { constructor ( e ) { super ( { category : "PREVIEW_API" , code : 1 , message : Ce `
Couldn 't find story matching id ' $ { e . storyId } ' after HMR .
- Did you just rename a story ?
- Did you remove it from your CSF file ?
- Are you sure a story with the id '${e.storyId}' exists ?
- Please check the values in the stories field of your main . js config and see if they would match your CSF File .
- Also check the browser console and terminal for potential error messages . ` }),this.data=e}};xe(va,"MissingStoryAfterHmrError");var Ea=va, $ u=class extends Ie{constructor(e){super({category:"PREVIEW_API",code:2,documentation:"https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#using-implicit-actions-during-rendering-is-deprecated-for-example-in-the-play-function",message:Ce `
We detected that you use an implicit action arg while $ { e . phase } of your story .
$ { e . deprecated ? `
This is deprecated and won ' t work in Storybook 8 anymore .
` :""}
Please provide an explicit spy to your args like this :
import { fn } from '@storybook/test' ;
...
args : {
$ { e . name } : fn ( )
} ` }),this.data=e}};xe( $ u,"ImplicitActionsDuringRendering");var Sa=class extends Ie{constructor(){super({category:"PREVIEW_API",code:3,message:Ce `
Cannot call \ ` storyStore.extract() \` without calling \` storyStore.cacheAllCsfFiles() \` first.
You probably meant to call \ ` await preview.extract() \` which does the above for you. ` } ) } } ; xe ( Sa , "CalledExtractOnStoreError" ) ; var Aa = Sa , wa = class extends Ie { constructor ( ) { super ( { category : "PREVIEW_API" , code : 4 , message : Ce `
Expected your framework ' s preset to export a \ ` renderToCanvas \` field.
Perhaps it needs to be upgraded for Storybook 7.0 ? ` ,documentation:"https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mainjs-framework-field"})}};xe(wa,"MissingRenderToCanvasError");var xa=wa,Ca=class extends Ie{constructor(e){super({category:"PREVIEW_API",code:5,message:Ce `
Called \ ` Preview. ${ e . methodName } () \` before initialization.
The preview needs to load the story index before most methods can be called . If you want
to call \ ` ${ e . methodName } \` , try \` await preview.initializationPromise; \` first.
If you didn ' t call the above code , then likely it was called by an addon that needs to
do the above . ` }),this.data=e}};xe(Ca,"CalledPreviewMethodBeforeInitializationError");var Ne=Ca,Oa=class extends Ie{constructor(e){super({category:"PREVIEW_API",code:6,message:Ce `
Error fetching \ ` /index.json \` :
$ { e . text }
If you are in development , this likely indicates a problem with your Storybook process ,
check the terminal for errors .
If you are in a deployed Storybook , there may have been an issue deploying the full Storybook
build . ` }),this.data=e}};xe(Oa,"StoryIndexFetchError");var _a=Oa,Ia=class extends Ie{constructor(e){super({category:"PREVIEW_API",code:7,message:Ce `
Tried to render docs entry $ { e . storyId } but it is a MDX file that has no CSF
references , or autodocs for a CSF file that some doesn ' t refer to itself .
This likely is an internal error in Storybook 's indexing, or you' ve attached the
\ ` attached-mdx \` tag to an MDX file that is not attached. ` } ) , this . data = e } } ; xe ( Ia , "MdxFileWithNoCsfReferencesError" ) ; var Ta = Ia , Ra = class extends Ie { constructor ( ) { super ( { category : "PREVIEW_API" , code : 8 , message : Ce `
Couldn ' t find any stories in your Storybook .
- Please check your stories field of your main . js config : does it match correctly ?
- Also check the browser console and terminal for error messages . ` })}};xe(Ra,"EmptyIndexError");var Da=Ra,Fa=class extends Ie{constructor(e){super({category:"PREVIEW_API",code:9,message:Ce `
Couldn 't find story matching ' $ { e . storySpecifier } ' .
- Are you sure a story with that id exists ?
- Please check your stories field of your main . js config .
- Also check the browser console and terminal for error messages . ` }),this.data=e}};xe(Fa,"NoStoryMatchError");var Pa=Fa,ja=class extends Ie{constructor(e){super({category:"PREVIEW_API",code:10,message:Ce `
Couldn 't find story matching id ' $ { e . storyId } ' after importing a CSF file .
The file was indexed as if the story was there , but then after importing the file in the browser
we didn ' t find the story . Possible reasons :
- You are using a custom story indexer that is misbehaving .
- You have a custom file loader that is removing or renaming exports .
Please check your browser console and terminal for errors that may explain the issue . ` }),this.data=e}};xe(ja,"MissingStoryFromCsfFileError");var Ba=ja,ka=class extends Ie{constructor(){super({category:"PREVIEW_API",code:11,message:Ce `
Cannot access the Story Store until the index is ready .
It is not recommended to use methods directly on the Story Store anyway , in Storybook 9 we will
remove access to the store entirely ` })}};xe(ka,"StoryStoreAccessedBeforeInitializationError");var Na=ka,Ma=class extends Ie{constructor(e){super({category:"PREVIEW_API",code:12,message:Ce `
Incorrect use of mount in the play function .
To use mount in the play function , you must satisfy the following two requirements :
1. You * must * destructure the mount property from the \ ` context \` (the argument passed to your play function).
This makes sure that Storybook does not start rendering the story before the play function begins .
2. Your Storybook framework or builder must be configured to transpile to ES2017 or newer .
This is because destructuring statements and async / await usages are otherwise transpiled away ,
which prevents Storybook from recognizing your usage of \ ` mount \` .
Note that Angular is not supported . As async / await is transpiled to support the zone . js polyfill .
More info : https : //storybook.js.org/docs/writing-tests/interaction-testing#run-code-before-the-component-gets-rendered
Received the following play function :
$ { e . playFunction } ` }),this.data=e}};xe(Ma,"MountMustBeDestructuredError");var Dr=Ma,zu=class extends Ie{constructor(){super({category:"PREVIEW_API",code:13,message:Ce `
You must configure testingLibraryRender to use play in portable stories .
import { render } from '@testing-library/[renderer]' ;
setProjectAnnotations ( {
testingLibraryRender : render ,
} ) ;
For other testing renderers , you can configure \ ` renderToCanvas \` like so:
import { render } from 'your-test-renderer' ;
setProjectAnnotations ( {
renderToCanvas : ( { storyFn } ) => {
const Story = storyFn ( ) ;
// Svelte
render ( Story . Component , Story . props ) ;
// Vue
render ( Story ) ;
// or for React
render ( < Story / > ) ;
} ,
} ) ; ` })}};xe(zu,"TestingLibraryMustBeConfiguredError");var La=class extends Ie{constructor(e){super({category:"PREVIEW_API",code:14,message:Ce `
No render function available for storyId '${e.id}'
` }),this.data=e}};xe(La,"NoRenderFunctionError");var $ a=La,za=class extends Ie{constructor(){super({category:"PREVIEW_API",code:15,message:Ce `
No component is mounted in your story .
This usually occurs when you destructure mount in the play function , but forget to call it .
For example :
async play ( { mount , canvasElement } ) {
// 👈 mount should be called: await mount();
const canvas = within ( canvasElement ) ;
const button = await canvas . findByRole ( 'button' ) ;
await userEvent . click ( button ) ;
} ;
Make sure to either remove it or call mount in your play function .
` })}};xe(za,"NoStoryMountedError");var qa=za,qu=class extends Ie{constructor(){super({category:"FRAMEWORK_NEXTJS",code:1,documentation:"https://storybook.js.org/docs/get-started/nextjs#faq",message:Ce `
You are importing avif images , but you don ' t have sharp installed .
You have to install sharp in order to use image optimization features in Next . js .
` })}};xe(qu,"NextJsSharpError");var Uu=class extends Ie{constructor(e){super({category:"FRAMEWORK_NEXTJS",code:2,message:Ce `
Tried to access router mocks from "${e.importType}" but they were not created yet . You might be running code in an unsupported environment .
` }),this.data=e}};xe(Uu,"NextjsRouterMocksNotAvailable");var Hu=class extends Ie{constructor(e){super({category:"DOCS-TOOLS",code:1,documentation:"https://github.com/storybookjs/storybook/issues/26606",message:Ce `
There was a failure when generating detailed ArgTypes in $ { e . language } for :
$ { JSON . stringify ( e . type , null , 2 ) }
Storybook will fall back to use a generic type description instead .
This type is either not supported or it is a bug in the docgen generation in Storybook .
If you think this is a bug , please detail it as much as possible in the Github issue .
` }),this.data=e}};xe(Hu,"UnknownArgTypesError");var Wu=Object.create,Va=Object.defineProperty,Vu=Object.getOwnPropertyDescriptor,Gu=Object.getOwnPropertyNames,Yu=Object.getPrototypeOf,Ku=Object.prototype.hasOwnProperty,Ju=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Xu=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Gu(e))!Ku.call(t,o)&&o!==r&&Va(t,o,{get:()=>e[o],enumerable:!(n=Vu(e,o))||n.enumerable});return t},Qu=(t,e,r)=>(r=t!=null?Wu(Yu(t)):{},Xu(e||!t||!t.__esModule?Va(r,"default",{value:t,enumerable:!0}):r,t)),Zu=Ju(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isEqual=function(){var e=Object.prototype.toString,r=Object.getPrototypeOf,n=Object.getOwnPropertySymbols?function(o){return Object.keys(o).concat(Object.getOwnPropertySymbols(o))}:Object.keys;return function(o,a){return function i(s,u,c){var p,d,f,g=e.call(s),h=e.call(u);if(s===u)return!0;if(s==null||u==null)return!1;if(c.indexOf(s)>-1&&c.indexOf(u)>-1)return!0;if(c.push(s,u),g!=h||(p=n(s),d=n(u),p.length!=d.length||p.some(function(b){return!i(s[b],u[b],c)})))return!1;switch(g.slice(8,-1)){case"Symbol":return s.valueOf()==u.valueOf();case"Date":case"Number":return+s==+u||+s!=+s&&+u!=+u;case"RegExp":case"Function":case"String":case"Boolean":return""+s==""+u;case"Set":case"Map":p=s.entries(),d=u.entries();do if(!i((f=p.next()).value,d.next().value,c))return!1;while(!f.done);return!0;case"ArrayBuffer":s=new Uint8Array(s),u=new Uint8Array(u);case"DataView":s=new Uint8Array(s.buffer),u=new Uint8Array(u.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(s.length!=u.length)return!1;for(f=0;f<s.length;f++)if((f in s||f in u)&&(f in s!=f in u||!i(s[f],u[f],c)))return!1;return!0;case"Object":return i(r(s),r(u),c);default:return!1}}(o,a,[])}}()});function el(t){return t.replace(/_/g," ").replace(/-/g," ").replace(/ \. /g," ").replace(/([^ \n ])([A-Z])([a-z])/g,(e,r,n,o)=> ` $ { r } $ { n } $ { o } ` ).replace(/([a-z])([A-Z])/g,(e,r,n)=> ` $ { r } $ { n } ` ).replace(/([a-z])([0-9])/gi,(e,r,n)=> ` $ { r } $ { n } ` ).replace(/([0-9])([a-z])/gi,(e,r,n)=> ` $ { r } $ { n } ` ).replace(/( \s |^)( \w )/g,(e,r,n)=> ` $ { r } $ { n . toUpperCase ( ) } ` ).replace(/ +/g," ").trim()}var Ua=Qu(Zu()),Ga=t=>t.map(e=>typeof e<"u").filter(Boolean).length,tl=(t,e)=>{let{exists:r,eq:n,neq:o,truthy:a}=t;if(Ga([r,n,o,a])>1)throw new Error( ` Invalid conditional test $ { JSON . stringify ( { exists : r , eq : n , neq : o } ) } ` );if(typeof n<"u")return(0,Ua.isEqual)(e,n);if(typeof o<"u")return!(0,Ua.isEqual)(e,o);if(typeof r<"u"){let i=typeof e<"u";return r?i:!i}return typeof a>"u"||a?!!e:!e},Ya=(t,e,r)=>{if(!t.if)return!0;let{arg:n,global:o}=t.if;if(Ga([n,o])!==1)throw new Error( ` Invalid conditional value $ { JSON . stringify ( { arg : n , global : o } ) } ` );let a=n?e[n]:r[o];return tl(t.if,a)},gn=t=>t.toLowerCase().replace(/[ ’–—―′¿' ` ~ ! @ # $ % ^ & * ( ) _ | + \ -= ? ; : '",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),Ha=(t,e)=>{let r=gn(t);if(r==="")throw new Error(`Invalid ${e} ' $ { t } ', must include alphanumeric characters`);return r},Ka=(t,e)=>`${Ha(t,"kind")}${e?`--${Ha(e,"name")}`:""}`,Ja=t=>el(t);function Wa(t,e){return Array.isArray(e)?e.includes(t):t.match(e)}function Fr(t,{includeStories:e,excludeStories:r}){return t!=="__esModule"&&(!e||Wa(t,e))&&(!r||!Wa(t,r))}var Xa=(...t)=>{let e=t.reduce((r,n)=>(n.startsWith("!")?r.delete(n.slice(1)):r.add(n),r),new Set);return Array.from(e)};var rl=Object.create,Nn=Object.defineProperty,nl=Object.getOwnPropertyDescriptor,ol=Object.getOwnPropertyNames,al=Object.getPrototypeOf,il=Object.prototype.hasOwnProperty,l=(t,e)=>Nn(t,"name",{value:e,configurable:!0}),Pr=(t=>typeof ke<"u"?ke:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof ke<"u"?ke:e)[r]}):t)(function(t){if(typeof ke<"u")return ke.apply(this,arguments);throw Error(' Dynamic require of "'+t+'" is not supported ' ) } ) , T = ( t , e ) => ( ) => ( e || t ( ( e = { exports : { } } ) . exports , e ) , e . exports ) , sl = ( t , e , r , n ) => { if ( e && typeof e == "object" || typeof e == "function" ) for ( let o of ol ( e ) ) ! il . call
` )>=0)return!1;return!0}l(Gt,"singleLineValues");function gr(P,N){var pe;if(P.indent===" ")pe=" ";else if(typeof P.indent=="number"&&P.indent>0)pe=z.call(Array(P.indent+1)," ");else return null;return{base:pe,prev:z.call(Array(N+1),pe)}}l(gr,"getIndent");function Rt(P,N){if(P.length===0)return"";var pe= `
` +N.prev+N.base;return pe+z.call(P,","+pe)+ `
` +N.prev}l(Rt,"indentedJoin");function Ye(P,N){var pe=le(P),S=[];if(pe){S.length=P.length;for(var O=0;O<P.length;O++)S[O]=ee(P,O)?N(P[O],P):""}var k=typeof _=="function"?_(P):[],Y;if(B){Y={};for(var X=0;X<k.length;X++)Y[" $ "+k[X]]=k[X]}for(var Z in P)ee(P,Z)&&(pe&&String(Number(Z))===Z&&Z<P.length||B&&Y[" $ "+Z]instanceof Symbol||(E.call(/[^ \w $ ]/,Z)?S.push(N(Z,P)+": "+N(P[Z],P)):S.push(Z+": "+N(P[Z],P))));if(typeof _=="function")for(var ie=0;ie<k.length;ie++) $ .call(P,k[ie])&&S.push("["+N(k[ie])+"]: "+N(P[k[ie]],P));return S}l(Ye,"arrObjKeys")}),lp=T((t,e)=>{"use strict";var r=zt(),n=ip(),o=up(),a=ar(),i=r("%WeakMap%",!0),s=r("%Map%",!0),u=n("WeakMap.prototype.get",!0),c=n("WeakMap.prototype.set",!0),p=n("WeakMap.prototype.has",!0),d=n("Map.prototype.get",!0),f=n("Map.prototype.set",!0),g=n("Map.prototype.has",!0),h=l(function(y,A){for(var w=y,C;(C=w.next)!==null;w=C)if(C.key===A)return w.next=C.next,C.next=y.next,y.next=C,C},"listGetNode"),b=l(function(y,A){var w=h(y,A);return w&&w.value},"listGet"),v=l(function(y,A,w){var C=h(y,A);C?C.value=w:y.next={key:A,next:y.next,value:w}},"listSet"),m=l(function(y,A){return!!h(y,A)},"listHas");e.exports=l(function(){var y,A,w,C={assert:l(function(I){if(!C.has(I))throw new a("Side channel does not contain "+o(I))},"assert"),get:l(function(I){if(i&&I&&(typeof I=="object"||typeof I=="function")){if(y)return u(y,I)}else if(s){if(A)return d(A,I)}else if(w)return b(w,I)},"get"),has:l(function(I){if(i&&I&&(typeof I=="object"||typeof I=="function")){if(y)return p(y,I)}else if(s){if(A)return g(A,I)}else if(w)return m(w,I);return!1},"has"),set:l(function(I,D){i&&I&&(typeof I=="object"||typeof I=="function")?(y||(y=new i),c(y,I,D)):s?(A||(A=new s),f(A,I,D)):(w||(w={key:{},next:null}),v(w,I,D))},"set")};return C},"getSideChannel")}),Qn=T((t,e)=>{"use strict";var r=String.prototype.replace,n=/%20/g,o={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports={default:o.RFC3986,formatters:{RFC1738:l(function(a){return r.call(a,n,"+")},"RFC1738"),RFC3986:l(function(a){return String(a)},"RFC3986")},RFC1738:o.RFC1738,RFC3986:o.RFC3986}}),qi=T((t,e)=>{"use strict";var r=Qn(),n=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var y=[],A=0;A<256;++A)y.push("%"+((A<16?"0":"")+A.toString(16)).toUpperCase());return y}(),i=l(function(y){for(;y.length>1;){var A=y.pop(),w=A.obj[A.prop];if(o(w)){for(var C=[],I=0;I<w.length;++I)typeof w[I]<"u"&&C.push(w[I]);A.obj[A.prop]=C}}},"compactQueue"),s=l(function(y,A){for(var w=A&&A.plainObjects?Object.create(null):{},C=0;C<y.length;++C)typeof y[C]<"u"&&(w[C]=y[C]);return w},"arrayToObject"),u=l(function y(A,w,C){if(!w)return A;if(typeof w!="object"){if(o(A))A.push(w);else if(A&&typeof A=="object")(C&&(C.plainObjects||C.allowPrototypes)||!n.call(Object.prototype,w))&&(A[w]=!0);else return[A,w];return A}if(!A||typeof A!="object")return[A].concat(w);var I=A;return o(A)&&!o(w)&&(I=s(A,C)),o(A)&&o(w)?(w.forEach(function(D,E){if(n.call(A,E)){var j=A[E];j&&typeof j=="object"&&D&&typeof D=="object"?A[E]=y(j,D,C):A.push(D)}else A[E]=D}),A):Object.keys(w).reduce(function(D,E){var j=w[E];return n.call(D,E)?D[E]=y(D[E],j,C):D[E]=j,D},I)},"merge"),c=l(function(y,A){return Object.keys(A).reduce(function(w,C){return w[C]=A[C],w},y)},"assignSingleSource"),p=l(function(y,A,w){var C=y.replace(/ \+ /g," ");if(w==="iso-8859-1")return C.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(C)}catch{return C}},"decode"),d=1024,f=l(function(y,A,w,C,I){if(y.length===0)return y;var D=y;if(typeof y=="symbol"?D=Symbol.prototype.toString.call(y):typeof y!="string"&&(D=String(y)),w==="iso-8859-1")return escape(D).replace(/%u[0-9a-f]{4}/gi,function(_){return"%26%23"+parseInt(_.slice(2),16)+"%3B"});for(var E="",j=0;j<D.length;j+=d){for(var z=D.length>=d?D.slice(j,j+d):D,q=[],G=0;G<z.length;++G){var L=z.charCodeAt(G);if(L===45||L===46||L===95||L===126||L>=48&&L<=57||L>=65&&L<=90||L>=97&&L<=122||I===r.RFC1738&&(L===40||L===41)){q[q.length]=z.charAt(G);continue}if(L<128){q[q.length]=a[L];continue}if(L<2048){q[q.length]=a[192|L>>6]+a[128|L&63];continue}if(L<55296||L>=57344){q[q.length]=a[
` ,nexist:" \u 2204",nexists:" \u 2204",Nfr:" \u {1D511}",nfr:" \u {1D52B}",ngE:" \u 2267 \u 0338",nge:" \u 2271",ngeq:" \u 2271",ngeqq:" \u 2267 \u 0338",ngeqslant:" \u 2A7E \u 0338",nges:" \u 2A7E \u 0338",nGg:" \u 22D9 \u 0338",ngsim:" \u 2275",nGt:" \u 226B \u 20D2",ngt:" \u 226F",ngtr:" \u 226F",nGtv:" \u 226B \u 0338",nharr:" \u 21AE",nhArr:" \u 21CE",nhpar:" \u 2AF2",ni:" \u 220B",nis:" \u 22FC",nisd:" \u 22FA",niv:" \u 220B",NJcy:" \u 040A",njcy:" \u 045A",nlarr:" \u 219A",nlArr:" \u 21CD",nldr:" \u 2025",nlE:" \u 2266 \u 0338",nle:" \u 2270",nleftarrow:" \u 219A",nLeftarrow:" \u 21CD",nleftrightarrow:" \u 21AE",nLeftrightarrow:" \u 21CE",nleq:" \u 2270",nleqq:" \u 2266 \u 0338",nleqslant:" \u 2A7D \u 0338",nles:" \u 2A7D \u 0338",nless:" \u 226E",nLl:" \u 22D8 \u 0338",nlsim:" \u 2274",nLt:" \u 226A \u 20D2",nlt:" \u 226E",nltri:" \u 22EA",nltrie:" \u 22EC",nLtv:" \u 226A \u 0338",nmid:" \u 2224",NoBreak:" \u 2060",NonBreakingSpace:" \x A0",nopf:" \u {1D55F}",Nopf:" \u 2115",Not:" \u 2AEC",not:" \x AC",NotCongruent:" \u 2262",NotCupCap:" \u 226D",NotDoubleVerticalBar:" \u 2226",NotElement:" \u 2209",NotEqual:" \u 2260",NotEqualTilde:" \u 2242 \u 0338",NotExists:" \u 2204",NotGreater:" \u 226F",NotGreaterEqual:" \u 2271",NotGreaterFullEqual:" \u 2267 \u 0338",NotGreaterGreater:" \u 226B \u 0338",NotGreaterLess:" \u 2279",NotGreaterSlantEqual:" \u 2A7E \u 0338",NotGreaterTilde:" \u 2275",NotHumpDownHump:" \u 224E \u 0338",NotHumpEqual:" \u 224F \u 0338",notin:" \u 2209",notindot:" \u 22F5 \u 0338",notinE:" \u 22F9 \u 0338",notinva:" \u 2209",notinvb:" \u 22F7",notinvc:" \u 22F6",NotLeftTriangleBar:" \u 29CF \u 0338",NotLeftTriangle:" \u 22EA",NotLeftTriangleEqual:" \u 22EC",NotLess:" \u 226E",NotLessEqual:" \u 2270",NotLessGreater:" \u 2278",NotLessLess:" \u 226A \u 0338",NotLessSlantEqual:" \u 2A7D \u 0338",NotLessTilde:" \u 2274",NotNestedGreaterGreater:" \u 2AA2 \u 0338",NotNestedLessLess:" \u 2AA1 \u 0338",notni:" \u 220C",notniva:" \u 220C",notnivb:" \u 22FE",notnivc:" \u 22FD",NotPrecedes:" \u 2280",NotPrecedesEqual:" \u 2AAF \u 0338",NotPrecedesSlantEqual:" \u 22E0",NotReverseElement:" \u 220C",NotRightTriangleBar:" \u 29D0 \u 0338",NotRightTriangle:" \u 22EB",NotRightTriangleEqual:" \u 22ED",NotSquareSubset:" \u 228F \u 0338",NotSquareSubsetEqual:" \u 22E2",NotSquareSuperset:" \u 2290 \u 0338",NotSquareSupersetEqual:" \u 22E3",NotSubset:" \u 2282 \u 20D2",NotSubsetEqual:" \u 2288",NotSucceeds:" \u 2281",NotSucceedsEqual:" \u 2AB0 \u 0338",NotSucceedsSlantEqual:" \u 22E1",NotSucceedsTilde:" \u 227F \u 0338",NotSuperset:" \u 2283 \u 20D2",NotSupersetEqual:" \u 2289",NotTilde:" \u 2241",NotTildeEqual:" \u 2244",NotTildeFullEqual:" \u 2247",NotTildeTilde:" \u 2249",NotVerticalBar:" \u 2224",nparallel:" \u 2226",npar:" \u 2226",nparsl:" \u 2AFD \u 20E5",npart:" \u 2202 \u 0338",npolint:" \u 2A14",npr:" \u 2280",nprcue:" \u 22E0",nprec:" \u 2280",npreceq:" \u 2AAF \u 0338",npre:" \u 2AAF \u 0338",nrarrc:" \u 2933 \u 0338",nrarr:" \u 219B",nrArr:" \u 21CF",nrarrw:" \u 219D \u 0338",nrightarrow:" \u 219B",nRightarrow:" \u 21CF",nrtri:" \u 22EB",nrtrie:" \u 22ED",nsc:" \u 2281",nsccue:" \u 22E1",nsce:" \u 2AB0 \u 0338",Nscr:" \u {1D4A9}",nscr:" \u {1D4C3}",nshortmid:" \u 2224",nshortparallel:" \u 2226",nsim:" \u 2241",nsime:" \u 2244",nsimeq:" \u 2244",nsmid:" \u 2224",nspar:" \u 2226",nsqsube:" \u 22E2",nsqsupe:" \u 22E3",nsub:" \u 2284",nsubE:" \u 2AC5 \u 0338",nsube:" \u 2288",nsubset:" \u 2282 \u 20D2",nsubseteq:" \u 2288",nsubseteqq:" \u 2AC5 \u 0338",nsucc:" \u 2281",nsucceq:" \u 2AB0 \u 0338",nsup:" \u 2285",nsupE:" \u 2AC6 \u 0338",nsupe:" \u 2289",nsupset:" \u 2283 \u 20D2",nsupseteq:" \u 2289",nsupseteqq:" \u 2AC6 \u 0338",ntgl:" \u 2279",Ntilde:" \x D1",ntilde:" \x F1",ntlg:" \u 2278",ntriangleleft:" \u 22EA",ntrianglelefteq:" \u 22EC",ntriangleright:" \u 22EB",ntrianglerighteq:" \u 22ED",Nu:" \u 039D",nu:" \u 03BD",num:"#",numero:" \u 2116",numsp:" \u 2007",nvap:" \u 224D \u 20D2",nvdash:" \u 22AC",nvDash:" \u 22AD",nVdash:" \u 22AE",nVDash:" \u 22AF",nvge:" \u 2265 \u 20D2",nvgt:"> \u 20D2",nvHarr:" \u 2904",nvinfin:" \u 29DE",nvlArr:" \u 2902",nvle:" \u 2264 \u 20D2",nvlt:"< \u 20D2",nvltrie:" \u 22B4 \u 20D2",nvrArr:" \u 2903",nvrtrie:" \u 22B5 \u 20D2",nvsim:" \u 223C \u 20D2",nwarhk:" \u 2923",nwarr:" \u 2196",nwArr:" \u 21D6",nwarrow:" \u 2196",nwnear:" \u 2927",Oacute:" \x D3",oacute:" \x F3",oast:" \u 229B",Ocirc:" \x D4",ocirc:" \x F4",ocir:" \u 229A",Ocy:" \u 041E",ocy:" \u 043E",odash:" \u 229D",Odblac:" \u 0150",odblac:" \u 0151",odiv:" \u 2A38",odot:" \u 2299",odsold:" \u 29BC",OElig:" \u 0152",oelig:" \u 01
In order to be iterable , non - array objects must have a [ Symbol . iterator ] ( ) method . ` )}var U=!0,M=!1,V;return{s:l(function(){B=B.call(_)},"s"),n:l(function(){var J=B.next();return U=J.done,J},"n"),e:l(function(J){M=!0,V=J},"e"),f:l(function(){try{!U&&B.return!=null&&B.return()}finally{if(M)throw V}},"f")}}l(a,"_createForOfIteratorHelper");function i(_,F){if(_){if(typeof _=="string")return s(_,F);var B=Object.prototype.toString.call(_).slice(8,-1);if(B==="Object"&&_.constructor&&(B=_.constructor.name),B==="Map"||B==="Set")return Array.from(_);if(B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array $ /.test(B))return s(_,F)}}l(i,"_unsupportedIterableToArray");function s(_,F){(F==null||F>_.length)&&(F=_.length);for(var B=0,H=new Array(F);B<F;B++)H[B]=_[B];return H}l(s,"_arrayLikeToArray");var u=mp(),c={fg:"#FFF",bg:"#000",newline:!1,escapeXML:!1,stream:!1,colors:p()};function p(){var _={0:"#000",1:"#A00",2:"#0A0",3:"#A50",4:"#00A",5:"#A0A",6:"#0AA",7:"#AAA",8:"#555",9:"#F55",10:"#5F5",11:"#FF5",12:"#55F",13:"#F5F",14:"#5FF",15:"#FFF"};return y(0,5).forEach(function(F){y(0,5).forEach(function(B){y(0,5).forEach(function(H){return d(F,B,H,_)})})}),y(0,23).forEach(function(F){var B=F+232,H=f(F*10+8);_[B]="#"+H+H+H}),_}l(p,"getDefaultColors");function d(_,F,B,H){var $ =16+_*36+F*6+B,U=_>0?_*40+55:0,M=F>0?F*40+55:0,V=B>0?B*40+55:0;H[ $ ]=g([U,M,V])}l(d,"setStyleColor");function f(_){for(var F=_.toString(16);F.length<2;)F="0"+F;return F}l(f,"toHexString");function g(_){var F=[],B=a(_),H;try{for(B.s();!(H=B.n()).done;){var $ =H.value;F.push(f( $ ))}}catch(U){B.e(U)}finally{B.f()}return"#"+F.join("")}l(g,"toColorHexString");function h(_,F,B,H){var $ ;return F==="text"? $ =C(B,H):F==="display"? $ =v(_,B,H):F==="xterm256Foreground"? $ =E(_,H.colors[B]):F==="xterm256Background"? $ =j(_,H.colors[B]):F==="rgb"&&( $ =b(_,B)), $ }l(h,"generateOutput");function b(_,F){F=F.substring(2).slice(0,-1);var B=+F.substr(0,2),H=F.substring(5).split(";"), $ =H.map(function(U){return("0"+Number(U).toString(16)).substr(-2)}).join("");return D(_,(B===38?"color:#":"background-color:#")+ $ )}l(b,"handleRgb");function v(_,F,B){F=parseInt(F,10);var H={"-1":l(function(){return"<br/>"},"_"),0:l(function(){return _.length&&m(_)},"_"),1:l(function(){return I(_,"b")},"_"),3:l(function(){return I(_,"i")},"_"),4:l(function(){return I(_,"u")},"_"),8:l(function(){return D(_,"display:none")},"_"),9:l(function(){return I(_,"strike")},"_"),22:l(function(){return D(_,"font-weight:normal;text-decoration:none;font-style:normal")},"_"),23:l(function(){return z(_,"i")},"_"),24:l(function(){return z(_,"u")},"_"),39:l(function(){return E(_,B.fg)},"_"),49:l(function(){return j(_,B.bg)},"_"),53:l(function(){return D(_,"text-decoration:overline")},"_")}, $ ;return H[F]? $ =H[F]():4<F&&F<7? $ =I(_,"blink"):29<F&&F<38? $ =E(_,B.colors[F-30]):39<F&&F<48? $ =j(_,B.colors[F-40]):89<F&&F<98? $ =E(_,B.colors[8+(F-90)]):99<F&&F<108&&( $ =j(_,B.colors[8+(F-100)])), $ }l(v,"handleDisplay");function m(_){var F=_.slice(0);return _.length=0,F.reverse().map(function(B){return"</"+B+">"}).join("")}l(m,"resetStyles");function y(_,F){for(var B=[],H=_;H<=F;H++)B.push(H);return B}l(y,"range");function A(_){return function(F){return(_===null||F.category!==_)&&_!=="all"}}l(A,"notCategory");function w(_){_=parseInt(_,10);var F=null;return _===0?F="all":_===1?F="bold":2<_&&_<5?F="underline":4<_&&_<7?F="blink":_===8?F="hide":_===9?F="strike":29<_&&_<38||_===39||89<_&&_<98?F="foreground-color":(39<_&&_<48||_===49||99<_&&_<108)&&(F="background-color"),F}l(w,"categoryForCode");function C(_,F){return F.escapeXML?u.encodeXML(_):_}l(C,"pushText");function I(_,F,B){return B||(B=""),_.push(F),"<".concat(F).concat(B?' style="'.concat(B,'"'):"",">")}l(I,"pushTag");function D(_,F){return I(_,"span",F)}l(D,"pushStyle");function E(_,F){return I(_,"span","color:"+F)}l(E,"pushForegroundColor");function j(_,F){return I(_,"span","background-color:"+F)}l(j,"pushBackgroundColor");function z(_,F){var B;if(_.slice(-1)[0]===F&&(B=_.pop()),B)return"</"+F+">"}l(z,"closeTag");function q(_,F,B){var H=!1, $ =3;function U(){return""}l(U,"remove");function M(W,ee){retu
Previous : $ { o . deps }
Incoming : $ { r } ` ),(r==null||o.deps==null||!Ep(r,o.deps))&&(e(o),o.deps=r),o}throw eo()}l(Ji,"useHook");function ir(t,e,r){let{memoizedState:n}=Ji(t,o=>{o.memoizedState=e()},r);return n}l(ir,"useMemoLike");function Sp(t,e){return ir("useMemo",t,e)}l(Sp,"useMemo");function tr(t,e){return ir("useCallback",()=>t,e)}l(tr,"useCallback");function ro(t,e){return ir(t,()=>({current:e}),[])}l(ro,"useRefLike");function Ap(t){return ro("useRef",t)}l(Ap,"useRef");function Xi(){let t=to();if(t!=null&&t.currentPhase!=="NONE")t.hasUpdates=!0;else try{dt.getChannel().emit(xr)}catch{Se.warn("State updates of Storybook preview hooks work only in browser")}}l(Xi,"triggerUpdate");function no(t,e){let r=ro(t,typeof e=="function"?e():e),n=l(o=>{r.current=typeof o=="function"?o(r.current):o,Xi()},"setState");return[r.current,n]}l(no,"useStateLike");function wp(t){return no("useState",t)}l(wp,"useState");function xp(t,e,r){let n=r!=null?()=>r(e):e,[o,a]=no("useReducer",n);return[o,l(i=>a(s=>t(s,i)),"dispatch")]}l(xp,"useReducer");function Qi(t,e){let r=Gr(),n=ir("useEffect",()=>({create:t}),e);r.currentEffects.includes(n)||r.currentEffects.push(n)}l(Qi,"useEffect");function Cp(t,e=[]){let r=dt.getChannel();return Qi(()=>(Object.entries(t).forEach(([n,o])=>r.on(n,o)),()=>{Object.entries(t).forEach(([n,o])=>r.removeListener(n,o))}),[...Object.keys(t),...e]),tr(r.emit.bind(r),[r])}l(Cp,"useChannel");function Yr(){let{currentContext:t}=Gr();if(t==null)throw eo();return t}l(Yr,"useStoryContext");function Op(t,e){let{parameters:r}=Yr();if(t)return r[t]??e}l(Op,"useParameter");function _p(){let t=dt.getChannel(),{id:e,args:r}=Yr(),n=tr(a=>t.emit(Rr,{storyId:e,updatedArgs:a}),[t,e]),o=tr(a=>t.emit(Or,{storyId:e,argNames:a}),[t,e]);return[r,n,o]}l(_p,"useArgs");function Ip(){let t=dt.getChannel(),{globals:e}=Yr(),r=tr(n=>t.emit(Tr,{globals:n}),[t]);return[e,r]}l(Ip,"useGlobals");var o2=l(({name:t,parameterName:e,wrapper:r,skipIfNoParametersOrOptions:n=!1})=>{let o=l(a=>(i,s)=>{let u=s.parameters&&s.parameters[e];return u&&u.disable||n&&!a&&!u?i(s):r(i,s,{options:a,parameters:u})},"decorator");return(...a)=>typeof a[0]=="function"?o()(...a):(...i)=>{if(i.length>1)return a.length>1?o(a)(...i):o(...a)(...i);throw new Error( ` Passing stories directly into $ { t } ( ) is not allowed ,
instead use addDecorator ( $ { t } ) and pass options with the '${e}' parameter ` )}},"makeDecorator"),En=je(hi(),1),Tp=je(Vr(),1),ei=je(Lc(),1),Rp=je(hi(),1),Dp=(0,Rp.default)(1)(t=>Object.values(t).reduce((e,r)=>(e[r.importPath]=e[r.importPath]||r,e),{})),Zi=class{entries;constructor({entries:e}={v:5,entries:{}}){this.entries=e}entryFromSpecifier(e){let r=Object.values(this.entries);if(e==="*")return r[0];if(typeof e=="string")return this.entries[e]?this.entries[e]:r.find(a=>a.id.startsWith(e));let{name:n,title:o}=e;return r.find(a=>a.name===n&&a.title===o)}storyIdToEntry(e){let r=this.entries[e];if(!r)throw new Ea({storyId:e});return r}importPathToEntry(e){return Dp(this.entries)[e]}};l(Zi,"StoryIndexStore");var Fp=Zi,ti=Object.prototype.hasOwnProperty;function On(t,e,r){for(r of t.keys())if(Nt(r,e))return r}l(On,"find");function Nt(t,e){var r,n,o;if(t===e)return!0;if(t&&e&&(r=t.constructor)===e.constructor){if(r===Date)return t.getTime()===e.getTime();if(r===RegExp)return t.toString()===e.toString();if(r===Array){if((n=t.length)===e.length)for(;n--&&Nt(t[n],e[n]););return n===-1}if(r===Set){if(t.size!==e.size)return!1;for(n of t)if(o=n,o&&typeof o=="object"&&(o=On(e,o),!o)||!e.has(o))return!1;return!0}if(r===Map){if(t.size!==e.size)return!1;for(n of t)if(o=n[0],o&&typeof o=="object"&&(o=On(e,o),!o)||!Nt(n[1],e.get(o)))return!1;return!0}if(r===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(r===DataView){if((n=t.byteLength)===e.byteLength)for(;n--&&t.getInt8(n)===e.getInt8(n););return n===-1}if(ArrayBuffer.isView(t)){if((n=t.byteLength)===e.byteLength)for(;n--&&t[n]===e[n];);return n===-1}if(!r||typeof t=="object"){n=0;for(r in t)if(ti.call(t,r)&&++n&&!ti.call(e,r)||!(r in e)||!Nt(t[r],e[r]))return!1;return Object.keys(e).length===n}}return t!==t&&e!==e}l(Nt,"dequal");var kr=je(Kn(),1);function qe(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=Array.from(typeof t=="string"?[t]:t);n[n.length-1]=n[n.length-1].replace(/ \r ? \n ([ \t ]*) $ /,"");var o=n.reduce(function(s,u){var c=u.match(/ \n ([ \t ]+|(?! \s ).)/g);return c?s.concat(c.map(function(p){var d,f;return(f=(d=p.match(/[ \t ]/g))===null||d===void 0?void 0:d.length)!==null&&f!==void 0?f:0})):s},[]);if(o.length){var a=new RegExp( `
[ ] { ` +Math.min.apply(Math,o)+"}","g");n=n.map(function(s){return s.replace(a, `
` )})}n[0]=n[0].replace(/^ \r ? \n /,"");var i=n[0];return e.forEach(function(s,u){var c=i.match(/(?:^| \n )( *) $ /),p=c?c[1]:"",d=s;typeof s=="string"&&s.includes( `
` )&&(d=String(s).split( `
` ).map(function(f,g){return g===0?f:""+p+f}).join( `
` )),i+=d+n[u+1]}),i}l(qe,"dedent");var Bt=Symbol("incompatible"),_n=l((t,e)=>{let r=e.type;if(t==null||!r||e.mapping)return t;switch(r.name){case"string":return String(t);case"enum":return t;case"number":return Number(t);case"boolean":return String(t)==="true";case"array":return!r.value||!Array.isArray(t)?Bt:t.reduce((n,o,a)=>{let i=_n(o,{type:r.value});return i!==Bt&&(n[a]=i),n},new Array(t.length));case"object":return typeof t=="string"||typeof t=="number"?t:!r.value||typeof t!="object"?Bt:Object.entries(t).reduce((n,[o,a])=>{let i=_n(a,{type:r.value[o]});return i===Bt?n:Object.assign(n,{[o]:i})},{});default:return Bt}},"map"),Pp=l((t,e)=>Object.entries(t).reduce((r,[n,o])=>{if(!e[n])return r;let a=_n(o,e[n]);return a===Bt?r:Object.assign(r,{[n]:a})},{}),"mapArgsToTypes"),In=l((t,e)=>Array.isArray(t)&&Array.isArray(e)?e.reduce((r,n,o)=>(r[o]=In(t[o],e[o]),r),[...t]).filter(r=>r!==void 0):!(0,kr.default)(t)||!(0,kr.default)(e)?e:Object.keys({...t,...e}).reduce((r,n)=>{if(n in e){let o=In(t[n],e[n]);o!==void 0&&(r[n]=o)}else r[n]=t[n];return r},{}),"combineArgs"),jp=l((t,e)=>Object.entries(e).reduce((r,[n,{options:o}])=>{function a(){return n in t&&(r[n]=t[n]),r}if(l(a,"allowArg"),!o)return a();if(!Array.isArray(o))return pt.error(qe `
Invalid argType : '${n}.options' should be an array .
More info : https : //storybook.js.org/docs/react/api/argtypes
` ),a();if(o.some(d=>d&&["object","function"].includes(typeof d)))return pt.error(qe `
Invalid argType : '${n}.options' should only contain primitives . Use a 'mapping' for complex values .
More info : https : //storybook.js.org/docs/react/writing-stories/args#mapping-to-complex-arg-values
` ),a();let i=Array.isArray(t[n]),s=i&&t[n].findIndex(d=>!o.includes(d)),u=i&&s===-1;if(t[n]===void 0||o.includes(t[n])||u)return a();let c=i? ` $ { n } [ $ { s } ] ` :n,p=o.map(d=>typeof d=="string"? ` '${d}' ` :String(d)).join(", ");return pt.warn( ` Received illegal value for '${c}' . Supported options : $ { p } ` ),r},{}),"validateOptions"),Zt=Symbol("Deeply equal"),Nr=l((t,e)=>{if(typeof t!=typeof e)return e;if(Nt(t,e))return Zt;if(Array.isArray(t)&&Array.isArray(e)){let r=e.reduce((n,o,a)=>{let i=Nr(t[a],o);return i!==Zt&&(n[a]=i),n},new Array(e.length));return e.length>=t.length?r:r.concat(new Array(t.length-e.length).fill(void 0))}return(0,kr.default)(t)&&(0,kr.default)(e)?Object.keys({...t,...e}).reduce((r,n)=>{let o=Nr(t?.[n],e?.[n]);return o===Zt?r:Object.assign(r,{[n]:o})},{}):e},"deepDiff"),es="UNTARGETED";function ts({args:t,argTypes:e}){let r={};return Object.entries(t).forEach(([n,o])=>{let{target:a=es}=e[n]||{};r[a]=r[a]||{},r[a][n]=o}),r}l(ts,"groupArgsByTarget");function rs(t){return Object.keys(t).forEach(e=>t[e]===void 0&&delete t[e]),t}l(rs,"deleteUndefined");var ns=class{initialArgsByStoryId={};argsByStoryId={};get(e){if(!(e in this.argsByStoryId))throw new Error( ` No args known for $ { e } -- has it been rendered yet ? ` );return this.argsByStoryId[e]}setInitial(e){if(!this.initialArgsByStoryId[e.id])this.initialArgsByStoryId[e.id]=e.initialArgs,this.argsByStoryId[e.id]=e.initialArgs;else if(this.initialArgsByStoryId[e.id]!==e.initialArgs){let r=Nr(this.initialArgsByStoryId[e.id],this.argsByStoryId[e.id]);this.initialArgsByStoryId[e.id]=e.initialArgs,this.argsByStoryId[e.id]=e.initialArgs,r!==Zt&&this.updateFromDelta(e,r)}}updateFromDelta(e,r){let n=jp(r,e.argTypes);this.argsByStoryId[e.id]=In(this.argsByStoryId[e.id],n)}updateFromPersisted(e,r){let n=Pp(r,e.argTypes);return this.updateFromDelta(e,n)}update(e,r){if(!(e in this.argsByStoryId))throw new Error( ` No args known for $ { e } -- has it been rendered yet ? ` );this.argsByStoryId[e]=rs({...this.argsByStoryId[e],...r})}};l(ns,"ArgsStore");var Bp=ns,os=l((t={})=>Object.entries(t).reduce((e,[r,{defaultValue:n}])=>(typeof n<"u"&&(e[r]=n),e),{}),"getValuesFromArgTypes"),as=class{allowedGlobalNames;initialGlobals;globals;constructor({globals:e={},globalTypes:r={}}){this.set({globals:e,globalTypes:r})}set({globals:e={},globalTypes:r={}}){let n=this.initialGlobals&&Nr(this.initialGlobals,this.globals);this.allowedGlobalNames=new Set([...Object.keys(e),...Object.keys(r)]);let o=os(r);this.initialGlobals={...o,...e},this.globals=this.initialGlobals,n&&n!==Zt&&this.updateFromPersisted(n)}filterAllowedGlobals(e){return Object.entries(e).reduce((r,[n,o])=>(this.allowedGlobalNames.has(n)?r[n]=o:Se.warn( ` Attempted to set a global ( $ { n } ) that is not defined in initial globals or globalTypes ` ),r),{})}updateFromPersisted(e){let r=this.filterAllowedGlobals(e);this.globals={...this.globals,...r}}get(){return this.globals}update(e){this.globals={...this.globals,...this.filterAllowedGlobals(e)}}};l(as,"GlobalsStore");var kp=as,Np=je(Vr(),1),Mp=l(t=>typeof t=="string"?{name:t}:t,"normalizeType"),Lp=l(t=>typeof t=="string"?{type:t}:t,"normalizeControl"), $ p=l((t,e)=>{let{type:r,control:n,...o}=t,a={name:e,...o};return r&&(a.type=Mp(r)),n?a.control=Lp(n):n===!1&&(a.control={disable:!0}),a},"normalizeInputType"),Mr=l(t=>(0,Np.default)(t, $ p),"normalizeInputTypes"),Oe=l(t=>Array.isArray(t)?t:t?[t]:[],"normalizeArrays"),zp=qe `
2024-06-16 17:30:30 +02:00
CSF . story annotations deprecated ; annotate story functions directly :
- StoryFn . story . name => StoryFn . storyName
- StoryFn . story . ( parameters | decorators ) => StoryFn . ( parameters | decorators )
See https : //github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations for details and codemod.
2024-07-31 10:01:28 +02:00
` ;function oo(t,e,r){let n=e,o=typeof e=="function"?e:null,{story:a}=n;a&&(Se.debug("deprecated story",a),rt(zp));let i=Ja(t),s=typeof n!="function"&&n.name||n.storyName||a?.name||i,u=[...Oe(n.decorators),...Oe(a?.decorators)],c={...a?.parameters,...n.parameters},p={...a?.args,...n.args},d={...a?.argTypes,...n.argTypes},f=[...Oe(n.loaders),...Oe(a?.loaders)],g=[...Oe(n.beforeEach),...Oe(a?.beforeEach)],{render:h,play:b,tags:v=[]}=n,m=c.__id||Ka(r.id,i);return{moduleExport:e,id:m,name:s,tags:v,decorators:u,parameters:c,args:p,argTypes:Mr(d),loaders:f,beforeEach:g,...h&&{render:h},...o&&{userStoryFn:o},...b&&{play:b}}}l(oo,"normalizeStory");function ao(t,e=t.title,r){let{id:n,argTypes:o}=t;return{id:gn(n||e),...t,title:e,...o&&{argTypes:Mr(o)},parameters:{fileName:r,...t.parameters}}}l(ao,"normalizeComponentAnnotations");var qp=l(t=>{let{globals:e,globalTypes:r}=t;(e||r)&&Se.error("Global args/argTypes can only be set globally",JSON.stringify({globals:e,globalTypes:r}))},"checkGlobals"),Up=l(t=>{let{options:e}=t;e?.storySort&&Se.error("The storySort option parameter can only be set globally")},"checkStorySort"),ri=l(t=>{t&&(qp(t),Up(t))},"checkDisallowedParameters");function is(t,e,r){let{default:n,__namedExportsOrder:o,...a}=t,i=ao(n,r,e);ri(i.parameters);let s={meta:i,stories:{},moduleExports:t};return Object.keys(a).forEach(u=>{if(Fr(u,i)){let c=oo(u,a[u],i);ri(c.parameters),s.stories[c.id]=c}}),s}l(is,"processCSFFile");var Sn=je(Kn(),1),wt=l((...t)=>{let e={},r=t.filter(Boolean),n=r.reduce((o,a)=>(Object.entries(a).forEach(([i,s])=>{let u=o[i];Array.isArray(s)||typeof u>"u"?o[i]=s:(0,Sn.default)(s)&&(0,Sn.default)(u)?e[i]=!0:typeof s<"u"&&(o[i]=s)}),o),{});return Object.keys(e).forEach(o=>{let a=r.filter(Boolean).map(i=>i[o]).filter(i=>typeof i<"u");a.every(i=>(0,Sn.default)(i))?n[o]=wt(...a):n[o]=a[a.length-1]}),n},"combineParameters");function ss(t,e,r){let n=r(t);return o=>e(n,o)}l(ss,"decorateStory");function us({componentId:t,title:e,kind:r,id:n,name:o,story:a,parameters:i,initialArgs:s,argTypes:u,...c}={}){return c}l(us,"sanitizeStoryContextUpdate");function ls(t,e){let r={},n=l(a=>i=>{if(!r.value)throw new Error("Decorated function called without init");return r.value={...r.value,...us(i)},a(r.value)},"bindWithContext"),o=e.reduce((a,i)=>ss(a,i,n),t);return a=>(r.value=a,o(a))}l(ls,"defaultDecorateStory");function cs(t){return t!=null&&ps(t).includes("mount")}l(cs,"mountDestructured");function ps(t){let e=t.toString().match(/[^(]* \( ([^)]*)/);if(!e)return[];let r=Tn(e[1]);if(!r.length)return[];let n=r[0];return n.startsWith("{")&&n.endsWith("}")?Tn(n.slice(1,-1).replace(/ \s /g,"")).map(o=>o.replace(/:.*|=.*/g,"")):[]}l(ps,"getUsedProps");function Tn(t){let e=[],r=[],n=0;for(let a=0;a<t.length;a++)if(t[a]==="{"||t[a]==="[")r.push(t[a]==="{"?"}":"]");else if(t[a]===r[r.length-1])r.pop();else if(!r.length&&t[a]===","){let i=t.substring(n,a).trim();i&&e.push(i),n=a+1}let o=t.substring(n).trim();return o&&e.push(o),e}l(Tn,"splitByComma");function io(t,e,r){let{moduleExport:n,id:o,name:a}=t||{},i=so(t,e,r),s=l(async C=>{let I={};for(let D of[..."__STORYBOOK_TEST_LOADERS__"in Te&&Array.isArray(Te.__STORYBOOK_TEST_LOADERS__)?[Te.__STORYBOOK_TEST_LOADERS__]:[],Oe(r.loaders),Oe(e.loaders),Oe(t.loaders)]){if(C.abortSignal.aborted)return I;let E=await Promise.all(D.map(j=>j(C)));Object.assign(I,...E)}return I},"applyLoaders"),u=l(async C=>{let I=new Array;for(let D of[...Oe(r.beforeEach),...Oe(e.beforeEach),...Oe(t.beforeEach)]){if(C.abortSignal.aborted)return I;let E=await D(C);E&&I.push(E)}return I},"applyBeforeEach"),c=l(C=>C.originalStoryFn(C.args,C),"undecoratedStoryFn"),{applyDecorators:p=ls,runStep:d}=r,f=[...Oe(t?.decorators),...Oe(e?.decorators),...Oe(r?.decorators)],g=t?.userStoryFn||t?.render||e.render||r.render,h=vp(p)(c,f),b=l(C=>h(C),"unboundStoryFn"),v=t?.play??e?.play,m=cs(v);if(!g&&!m)throw new $ a({id:o});let y=l(C=>async()=>(await C.renderToCanvas(),C.canvas),"defaultMount"),A=t.mount??e.mount??r.mount??y,w=r.testingLibraryRender;return{...i,moduleExport:n,id:o,name:a,story:a,originalStoryFn:g,undecoratedSt
We 've detected a cycle in arg ' $ { e } ' . Args should be JSON - serializable .
2024-06-16 17:30:30 +02:00
Consider using the mapping feature or fully custom args :
- Mapping : https : //storybook.js.org/docs/react/writing-stories/args#mapping-to-complex-arg-values
- Custom args : https : //storybook.js.org/docs/react/essentials/controls#fully-custom-args
2024-07-31 10:01:28 +02:00
` ),{name:"other",value:"cyclic object"}):(r.add(t),Array.isArray(t)?{name:"array",value:t.length>0?Dn(t[0],e,new Set(r)):{name:"other",value:"unknown"}}:{name:"object",value:(0,Rn.default)(t,o=>Dn(o,e,new Set(r)))}):{name:"object",value:{}}},"inferType"),ds=l(t=>{let{id:e,argTypes:r={},initialArgs:n={}}=t,o=(0,Rn.default)(n,(i,s)=>({name:s,type:Dn(i, ` $ { e } . $ { s } ` ,new Set)})),a=(0,Rn.default)(r,(i,s)=>({name:s}));return wt(o,a,r)},"inferArgTypes");ds.secondPass=!0;var Hp=je(Vr(),1),Wp=je(Wc(),1),ni=l((t,e)=>Array.isArray(e)?e.includes(t):t.match(e),"matches"),Vp=l((t,e,r)=>!e&&!r?t:t&&(0,Wp.default)(t,(n,o)=>{let a=n.name||o;return(!e||ni(a,e))&&(!r||!ni(a,r))}),"filterArgTypes"),Gp=l((t,e,r)=>{let{type:n,options:o}=t;if(n){if(r.color&&r.color.test(e)){let a=n.name;if(a==="string")return{control:{type:"color"}};a!=="enum"&&Se.warn( ` Addon controls : Control of type color only supports string , received "${a}" instead ` )}if(r.date&&r.date.test(e))return{control:{type:"date"}};switch(n.name){case"array":return{control:{type:"object"}};case"boolean":return{control:{type:"boolean"}};case"string":return{control:{type:"text"}};case"number":return{control:{type:"number"}};case"enum":{let{value:a}=n;return{control:{type:a?.length<=5?"radio":"select"},options:a}}case"function":case"symbol":return null;default:return{control:{type:o?"select":"object"}}}}},"inferControl"),hs=l(t=>{let{argTypes:e,parameters:{__isArgsStory:r,controls:{include:n=null,exclude:o=null,matchers:a={}}={}}}=t;if(!r)return e;let i=Vp(e,n,o),s=(0,Hp.default)(i,(u,c)=>u?.type&&Gp(u,c,a));return wt(s,i)},"inferControls");hs.secondPass=!0;function Lr({argTypes:t,globalTypes:e,argTypesEnhancers:r,decorators:n,loaders:o,beforeEach:a,globals:i,initialGlobals:s,...u}){return i&&Object.keys(i).length>0&&rt(qe `
The preview . js 'globals' field is deprecated and will be removed in Storybook 9.0 .
Please use 'initialGlobals' instead . Learn more :
https : //github.com/storybookjs/storybook/blob/next/MIGRATION.md#previewjs-globals-renamed-to-initialglobals
` ),{...t&&{argTypes:Mr(t)},...e&&{globalTypes:Mr(e)},decorators:Oe(n),loaders:Oe(o),beforeEach:Oe(a),argTypesEnhancers:[...r||[],ds,hs],initialGlobals:wt(s,i),...u}}l(Lr,"normalizeProjectAnnotations");function ms(t){return async(e,r,n)=>{await t.reduceRight((o,a)=>async()=>a(e,o,n),async()=>r(n))()}}l(ms,"composeStepRunners");var Yp=l(t=>async()=>{let e=[];for(let r of t){let n=await r();n&&e.unshift(n)}return async()=>{for(let r of e)await r()}},"composeBeforeAllHooks");function Mt(t,e){return t.map(r=>r.default?.[e]??r[e]).filter(Boolean)}l(Mt,"getField");function ft(t,e,r={}){return Mt(t,e).reduce((n,o)=>{let a=Oe(o);return r.reverseFileOrder?[...a,...n]:[...n,...a]},[])}l(ft,"getArrayField");function kt(t,e){return Object.assign({},...Mt(t,e))}l(kt,"getObjectField");function Et(t,e){return Mt(t,e).pop()}l(Et,"getSingletonField");function lo(t){let e=ft(t,"argTypesEnhancers"),r=Mt(t,"runStep"),n=ft(t,"beforeAll");return{parameters:wt(...Mt(t,"parameters")),decorators:ft(t,"decorators",{reverseFileOrder:!(Te.FEATURES?.legacyDecoratorFileOrder??!1)}),args:kt(t,"args"),argsEnhancers:ft(t,"argsEnhancers"),argTypes:kt(t,"argTypes"),argTypesEnhancers:[...e.filter(o=>!o.secondPass),...e.filter(o=>o.secondPass)],globals:kt(t,"globals"),initialGlobals:kt(t,"initialGlobals"),globalTypes:kt(t,"globalTypes"),loaders:ft(t,"loaders"),beforeAll:Yp(n),beforeEach:ft(t,"beforeEach"),render:Et(t,"render"),renderToCanvas:Et(t,"renderToCanvas"),renderToDOM:Et(t,"renderToDOM"),applyDecorators:Et(t,"applyDecorators"),runStep:ms(r),tags:ft(t,"tags"),mount:Et(t,"mount"),testingLibraryRender:Et(t,"testingLibraryRender")}}l(lo,"composeConfigs");var $ r={},Kp="ComposedStory",Jp="Unnamed Story";function ys(t){return t?"default"in t?t.default:t:{}}l(ys,"extractAnnotation");function Xp(t){let e=Array.isArray(t)?t:[t];return $ r=lo(e.map(ys)), $ r}l(Xp,"setProjectAnnotations");var St=[];function Qp(t,e,r,n,o){if(t===void 0)throw new Error("Expected a story but received undefined.");e.title=e.title??Kp;let a=ao(e),i=o||t.storyName||t.story?.name||t.name||Jp,s=oo(i,t,a),u=n&&! $ r?.testingLibraryRender&&!r?.testingLibraryRender,c=Lr(lo([{...n,renderToCanvas:u?void 0:n?.renderToCanvas}, $ r,r??{}])),p=io(s,a,c),d=os(c.globalTypes),f=l(()=>{let m=uo({hooks:new Ki,globals:{...d,...c.initialGlobals},args:{...p.initialArgs},viewMode:"story",loaded:{},abortSignal:new AbortController().signal,step:l((y,A)=>p.runStep(y,A,m),"step"),canvasElement:globalThis?.document?.body,canvas:{},...p,context:null,mount:null});return m.context=m,p.renderToCanvas&&(m.renderToCanvas=async()=>{let y=await p.renderToCanvas?.({componentId:p.componentId,title:p.title,id:p.id,name:p.name,tags:p.tags,showError:l(A=>{},"showError"),showException:l(A=>{},"showException"),forceRemount:!0,storyContext:m,storyFn:l(()=>p.unboundStoryFn(m),"storyFn"),unboundStoryFn:p.unboundStoryFn},m.canvasElement);y&&St.push(y)}),m.mount=p.mount(m),m},"initializeContext"),g,h=l(async m=>{let y=f();return g&&(y.loaded=g.loaded),Object.assign(y,m),p.playFunction(y)},"backwardsCompatiblePlay"),b=l(m=>{let y=f();return Object.assign(y,m),gs(p,y)},"newPlay"),v=!p.renderToCanvas&&p.playFunction?h:!p.renderToCanvas&&!p.playFunction?void 0:b;return Object.assign(l(function(m){let y=f();return g&&(y.loaded=g.loaded),y.args={...y.initialArgs,...m},p.unboundStoryFn(y)},"storyFn"),{id:p.id,storyName:i,load:l(async()=>{for(let y of[...St].reverse())await y();St.length=0;let m=f();m.loaded=await p.applyLoaders(m),St.push(...(await p.applyBeforeEach(m)).filter(Boolean)),g=m},"load"),args:p.initialArgs,parameters:p.parameters,argTypes:p.argTypes,play:v,tags:p.tags})}l(Qp,"composeStory");function Zp(t,e,r){let{default:n,__esModule:o,__namedExportsOrder:a,...i}=t;return Object.entries(i).reduce((s,[u,c])=>Fr(u,n)?Object.assign(s,{[u]:r(c,n,e,u)}):s,{})}l(Zp,"composeStories");function ef(t){return t.extend({mount:l(async({mount:e,page:r},n)=>{await n(async(o,...a)=>{if(!("__pw_type"in o)||"__pw_type"in o&&o.__pw_type!=="jsx")throw new Error(qe `
Portable stories in Playwright CT only work when referencing JSX elements .
Please use JSX format for your components such as :
instead of :
await mount ( MyComponent , { props : { foo : 'bar' } } )
do :
await mount ( < MyComponent foo = "bar" / > )
More info : https : //storybook.js.org/docs/api/portable-stories-playwright
` );await r.evaluate(async s=>{let u=await globalThis.__pwUnwrapObject?.(s);return("__pw_type"in u?u.type:u)?.load?.()},o);let i=await e(o,...a);return await r.evaluate(async s=>{let u=await globalThis.__pwUnwrapObject?.(s),c="__pw_type"in u?u.type:u,p=document.querySelector("#root");return c?.play?.({canvasElement:p})},o),i})},"mount")})}l(ef,"createPlaywrightTest");async function gs(t,e){for(let o of[...St].reverse())await o();if(St.length=0,e.loaded=await t.applyLoaders(e),e.abortSignal.aborted)return;St.push(...(await t.applyBeforeEach(e)).filter(Boolean));let r=t.playFunction,n=t.usesMount;n||await e.mount(),!e.abortSignal.aborted&&r&&(n||(e.mount=async()=>{throw new Dr({playFunction:r.toString()})}),await r(e))}l(gs,"playStory");var oi=1e3,tf=1e4,bs=class{constructor(e,r,n){this.importFn=r,this.storyIndex=new Fp(e),this.projectAnnotations=Lr(n);let{initialGlobals:o,globalTypes:a}=this.projectAnnotations;this.args=new Bp,this.globals=new kp({globals:o,globalTypes:a}),this.hooks={},this.cleanupCallbacks={},this.processCSFFileWithCache=(0,En.default)(oi)(is),this.prepareMetaWithCache=(0,En.default)(oi)(fs),this.prepareStoryWithCache=(0,En.default)(tf)(io)}storyIndex;projectAnnotations;globals;args;hooks;cleanupCallbacks;cachedCSFFiles;processCSFFileWithCache;prepareMetaWithCache;prepareStoryWithCache;setProjectAnnotations(e){this.projectAnnotations=Lr(e);let{initialGlobals:r,globalTypes:n}=e;this.globals.set({globals:r,globalTypes:n})}async onStoriesChanged({importFn:e,storyIndex:r}){e&&(this.importFn=e),r&&(this.storyIndex.entries=r.entries),this.cachedCSFFiles&&await this.cacheAllCSFFiles()}async storyIdToEntry(e){return this.storyIndex.storyIdToEntry(e)}async loadCSFFileByStoryId(e){let{importPath:r,title:n}=this.storyIndex.storyIdToEntry(e),o=await this.importFn(r);return this.processCSFFileWithCache(o,r,n)}async loadAllCSFFiles(){let e={};return Object.entries(this.storyIndex.entries).forEach(([r,{importPath:n}])=>{e[n]=r}),(await Promise.all(Object.entries(e).map(async([r,n])=>({importPath:r,csfFile:await this.loadCSFFileByStoryId(n)})))).reduce((r,{importPath:n,csfFile:o})=>(r[n]=o,r),{})}async cacheAllCSFFiles(){this.cachedCSFFiles=await this.loadAllCSFFiles()}preparedMetaFromCSFFile({csfFile:e}){let r=e.meta;return this.prepareMetaWithCache(r,this.projectAnnotations,e.moduleExports.default)}async loadStory({storyId:e}){let r=await this.loadCSFFileByStoryId(e);return this.storyFromCSFFile({storyId:e,csfFile:r})}storyFromCSFFile({storyId:e,csfFile:r}){let n=r.stories[e];if(!n)throw new Ba({storyId:e});let o=r.meta,a=this.prepareStoryWithCache(n,o,this.projectAnnotations);return this.args.setInitial(a),this.hooks[a.id]=this.hooks[a.id]||new Ki,a}componentStoriesFromCSFFile({csfFile:e}){return Object.keys(this.storyIndex.entries).filter(r=>!!e.stories[r]).map(r=>this.storyFromCSFFile({storyId:r,csfFile:e}))}async loadEntry(e){let r=await this.storyIdToEntry(e),n=r.type==="docs"?r.storiesImports:[],[o,...a]=await Promise.all([this.importFn(r.importPath),...n.map(i=>{let s=this.storyIndex.importPathToEntry(i);return this.loadCSFFileByStoryId(s.id)})]);return{entryExports:o,csfFiles:a}}getStoryContext(e,{forceInitialArgs:r=!1}={}){return uo({...e,args:r?e.initialArgs:this.args.get(e.id),globals:this.globals.get(),hooks:this.hooks[e.id]})}addCleanupCallbacks(e,r){this.cleanupCallbacks[e.id]=r}async cleanupStory(e){this.hooks[e.id].clean();let r=this.cleanupCallbacks[e.id];if(r)for(let n of[...r].reverse())await n();delete this.cleanupCallbacks[e.id]}extract(e={includeDocsOnly:!1}){let{cachedCSFFiles:r}=this;if(!r)throw new Aa;return Object.entries(this.storyIndex.entries).reduce((n,[o,{type:a,importPath:i}])=>{if(a==="docs")return n;let s=r[i],u=this.storyFromCSFFile({storyId:o,csfFile:s});return!e.includeDocsOnly&&u.parameters.docsOnly||(n[o]=Object.entries(u).reduce((c,[p,d])=>p==="moduleExport"||typeof d=="function"?c:Array.isArray(d)?Object.assign(c,{[p]:d.slice().sort()}):Object.assign(c,{[p]:d}),{args:u.initialArgs})),n},{})}getSetStoriesPayload(){let e=this.extract({includeDocsOnly:!0}),r=Object.va
CSF Auto - title received a numeric fileName . This typically happens when
webpack is mis - configured in production mode . To force webpack to produce
filenames , set optimization . moduleIds = "named" in your webpack config .
` );let i=vs(String(t));if(o.exec(i)){if(!r){let s=i.replace(n,""),u=Fn([a,s]).split("/");return u=nf(u),u.join("/")}return a?Fn([a,r]):r}},"userOrAutoTitleFromSpecifier"),_2=l((t,e,r)=>{for(let n=0;n<e.length;n+=1){let o=of(t,e[n],r);if(o)return o}return r||void 0},"userOrAutoTitle"),ai=/ \s * \/ \s */,af=l((t={})=>(e,r)=>{if(e.title===r.title&&!t.includeNames)return 0;let n=t.method||"configure",o=t.order||[],a=e.title.trim().split(ai),i=r.title.trim().split(ai);t.includeNames&&(a.push(e.name),i.push(r.name));let s=0;for(;a[s]||i[s];){if(!a[s])return-1;if(!i[s])return 1;let u=a[s],c=i[s];if(u!==c){let d=o.indexOf(u),f=o.indexOf(c),g=o.indexOf("*");return d!==-1||f!==-1?(d===-1&&(g!==-1?d=g:d=o.length),f===-1&&(g!==-1?f=g:f=o.length),d-f):n==="configure"?0:u.localeCompare(c,t.locales?t.locales:void 0,{numeric:!0,sensitivity:"accent"})}let p=o.indexOf(u);p===-1&&(p=o.indexOf("*")),o=p!==-1&&Array.isArray(o[p+1])?o[p+1]:[],s+=1}return 0},"storySort"),sf=l((t,e,r)=>{if(e){let n;typeof e=="function"?n=e:n=af(e),t.sort(n)}else t.sort((n,o)=>r.indexOf(n.importPath)-r.indexOf(o.importPath));return t},"sortStoriesCommon"),I2=l((t,e,r)=>{try{return sf(t,e,r)}catch(n){throw new Error(qe `
Error sorting stories with sort parameter $ { e } :
> $ { n . message }
Are you using a V6 - style sort function in V7 mode ?
More info : https : //github.com/storybookjs/storybook/blob/next/MIGRATION.md#v7-style-story-sort
` )}},"sortStoriesV7"),Kr=new Error("prepareAborted"),{AbortController:ii}=globalThis;function Pn(t){try{let{name:e="Error",message:r=String(t),stack:n}=t;return{name:e,message:r,stack:n}}catch{return{name:"Error",message:String(t)}}}l(Pn,"serializeError");var Es=class{constructor(e,r,n,o,a,i,s={autoplay:!0,forceInitialArgs:!1},u){this.channel=e,this.store=r,this.renderToScreen=n,this.callbacks=o,this.id=a,this.viewMode=i,this.renderOptions=s,this.abortController=new ii,u&&(this.story=u,this.phase="preparing")}type="story";story;phase;abortController;canvasElement;notYetRendered=!0;rerenderEnqueued=!1;disableKeyListeners=!1;teardownRender=l(()=>{},"teardownRender");torndown=!1;async runPhase(e,r,n){this.phase=r,this.channel.emit(nt,{newPhase:this.phase,storyId:this.id}),n&&(await n(),this.checkIfAborted(e))}checkIfAborted(e){return e.aborted?(this.phase="aborted",this.channel.emit(nt,{newPhase:this.phase,storyId:this.id}),!0):!1}async prepare(){if(await this.runPhase(this.abortController.signal,"preparing",async()=>{this.story=await this.store.loadStory({storyId:this.id})}),this.abortController.signal.aborted)throw await this.store.cleanupStory(this.story),Kr}isEqual(e){return!!(this.id===e.id&&this.story&&this.story===e.story)}isPreparing(){return["preparing"].includes(this.phase)}isPending(){return["loading","beforeEach","rendering","playing"].includes(this.phase)}async renderToElement(e){return this.canvasElement=e,this.render({initial:!0,forceRemount:!0})}storyContext(){if(!this.story)throw new Error("Cannot call storyContext before preparing");let{forceInitialArgs:e}=this.renderOptions;return this.store.getStoryContext(this.story,{forceInitialArgs:e})}async render({initial:e=!1,forceRemount:r=!1}={}){let{canvasElement:n}=this;if(!this.story)throw new Error("cannot render when not prepared");let o=this.story;if(!n)throw new Error("cannot render when canvasElement is unset");let{id:a,componentId:i,title:s,name:u,tags:c,applyLoaders:p,applyBeforeEach:d,unboundStoryFn:f,playFunction:g,runStep:h}=o;r&&!e&&(this.cancelRender(),this.abortController=new ii);let b=this.abortController.signal,v=!1,m=o.usesMount;try{let y={...this.storyContext(),viewMode:this.viewMode,abortSignal:b,canvasElement:n,loaded:{},step:l((E,j)=>h(E,j,y),"step"),context:null,canvas:{},renderToCanvas:l(async()=>{let E=await this.renderToScreen(A,n);this.teardownRender=E||(()=>{}),v=!0},"renderToCanvas"),mount:l(async(...E)=>{this.callbacks.showStoryDuringRender?.();let j=null;return await this.runPhase(b,"rendering",async()=>{j=await o.mount(y)(...E)}),m&&await this.runPhase(b,"playing"),j},"mount")};y.context=y;let A={componentId:i,title:s,kind:s,id:a,name:u,story:u,tags:c,...this.callbacks,showError:l(E=>(this.phase="errored",this.callbacks.showError(E)),"showError"),showException:l(E=>(this.phase="errored",this.callbacks.showException(E)),"showException"),forceRemount:r||this.notYetRendered,storyContext:y,storyFn:l(()=>f(y),"storyFn"),unboundStoryFn:f};if(await this.runPhase(b,"loading",async()=>{y.loaded=await p(y)}),b.aborted)return;let w=await d(y);if(this.store.addCleanupCallbacks(o,w),this.checkIfAborted(b)||(!v&&!m&&await y.mount(),this.notYetRendered=!1,b.aborted))return;let C=this.story.parameters?.test?.dangerouslyIgnoreUnhandledErrors===!0,I=new Set,D=l(E=>I.add("error"in E?E.error:E.reason),"onError");if(this.renderOptions.autoplay&&r&&g&&this.phase!=="errored"){window.addEventListener("error",D),window.addEventListener("unhandledrejection",D),this.disableKeyListeners=!0;try{if(m?await g(y):(y.mount=async()=>{throw new Dr({playFunction:g.toString()})},await this.runPhase(b,"playing",async()=>g(y))),!v)throw new qa;this.checkIfAborted(b),!C&&I.size>0?await this.runPhase(b,"errored"):await this.runPhase(b,"played")}catch(E){if(this.callbacks.showStoryDuringRender?.(),await this.runPhase(b,"errored",async()=>{this.channel.emit(Cr,Pn(E))}),this.story.parameters.throwPlayFunctionExceptions!==!1)throw E;console.error(E)}if(!C&&I.size>0&&this.channel.emit(Ir,Array.from(I).map(Pn)),this.disableKeyListeners=!1,window.removeEventListener("unhandl
- Did you pass a component to the 'of' prop when the block only supports a story or a meta ?
- ... or vice versa ?
- Did you pass a story , CSF file or meta to the 'of' prop that is not indexed , ie . is not targeted by the 'stories' globs in the main configuration ? ` )}switch(n.type){case"component":return{...n,projectAnnotations:this.projectAnnotations};case"meta":return{...n,preparedMeta:this.store.preparedMetaFromCSFFile({csfFile:n.csfFile})};case"story":default:return n}}storyIdByName=l(e=>{let r=this.nameToStoryId.get(e);if(r)return r;throw new Error( ` No story found with that name : $ { e } ` )},"storyIdByName");componentStories=l(()=>this.componentStoriesValue,"componentStories");componentStoriesFromCSFFile=l(e=>this.store.componentStoriesFromCSFFile({csfFile:e}),"componentStoriesFromCSFFile");storyById=l(e=>{if(!e){if(!this.primaryStory)throw new Error("No primary story defined for docs entry. Did you forget to use ` < Meta > ` ?");return this.primaryStory}let r=this.storyIdToCSFFile.get(e);if(!r)throw new Error( ` Called \ ` storyById \` for story that was never loaded: ${ e } ` ) ; return this . store . storyFromCSFFile ( { storyId : e , csfFile : r } ) } , "storyById" ) ; getStoryContext = l ( e => ( { ... this . store . getStoryContext ( e ) , loaded : { } , viewMode : "docs" } ) , "getStoryContext" ) ; loadStory = l ( e => this . store . loadStory ( { storyId : e } ) , "loadStory" ) } ; l ( ws , "DocsContext" ) ; var xs = ws , Cs = class { constructor ( e , r , n , o ) { this . channel = e , this . store = r , this . entry = n , this . callbacks = o , this . id = n . id } type = "docs" ; subtype = "csf" ; id ; story ; rerender ; teardownRender ; torndown = ! 1 ; disableKeyListeners = ! 1 ; preparing = ! 1 ; csfFiles ; isPreparing ( ) { return this . preparing } async prepare ( ) { this . preparing = ! 0 ; let { entryExports : e , csfFiles : r = [ ] } = await this . store . loadEntry ( this . id ) ; if ( this . torndown ) throw Kr ; let { importPath : n , title : o } = this . entry , a = this . store . processCSFFileWithCache ( e , n , o ) , i = Object . keys ( a . stories ) [ 0 ] ; this . story = this . store . storyFromCSFFile ( { storyId : i , csfFile : a } ) , this . csfFiles = [ a , ... r ] , this . preparing = ! 1 } isEqual ( e ) { return ! ! ( this . id === e . id && this . story && this . story === e . story ) } docsContext ( e ) { if ( ! this . csfFiles ) throw new Error ( "Cannot render docs before preparing" ) ; let r = new xs ( this . channel , this . store , e , this . csfFiles ) ; return this . csfFiles . forEach ( n => r . attachCSFFile ( n ) ) , r } async renderToElement ( e , r ) { if ( ! this . story || ! this . csfFiles ) throw new Error ( "Cannot render docs before preparing" ) ; let n = this . docsContext ( r ) , { docs : o } = this . story . parameters || { } ; if ( ! o ) throw new Error ( "Cannot render a story in viewMode=docs if `@storybook/addon-docs` is not installed" ) ; let a = await o . renderer ( ) , { render : i } = a , s = l ( async ( ) => { try { await i ( n , o , e ) , this . channel . emit ( wr , this . id ) } catch ( u ) { this . callbacks . showException ( u ) } } , "renderDocs" ) ; return this . rerender = async ( ) => s ( ) , this . teardownRender = async ( { viewModeChanged : u } ) => { ! u || ! e || a . unmount ( e ) } , s ( ) } async teardown ( { viewModeChanged : e } = { } ) { this . teardownRender ? . ( { viewModeChanged : e } ) , this . torndown = ! 0 } } ; l ( Cs , "CsfDocsRender" ) ; var si = Cs , Os = class { constructor ( e , r , n , o ) { this . channel = e , this . store = r , this . entry = n , this . callbacks = o , this . id = n . id } type = "docs" ; subtype = "mdx" ; id ; exports ; rerender ; teardownRender ; torndown = ! 1 ; disableKeyListeners = ! 1 ; preparing = ! 1 ; csfFiles ; isPreparing ( ) { return this . preparing } async prepare ( ) { this . preparing = ! 0 ; let { entryExports : e , csfFiles : r = [ ] } = await this . store . loadEntry ( this . id ) ; if ( this . torndown ) throw Kr ; this . csfFiles = r , this . exports = e , this . preparing = ! 1 } isEqual ( e ) { return ! ! ( this . id === e . id && this . exports && this . exports === e . exports ) } docsContext ( e ) { if ( ! this . csfFiles ) throw new Error ( "Cannot render docs before preparing" ) ; return new xs ( this . channel , this . store , e , this . csfFiles ) } async renderToElement ( e , r ) { if ( ! this . exports || ! this . csfFiles || ! this . store . projectAnnotations ) throw new Error ( "Cannot render docs before preparing" ) ; let n = this . docsContext ( r ) , { docs : o } = this . store . projectAnnotations . parameters || { } ; if ( ! o ) throw new Error ( "Cannot render a story in viewMode=docs if `@storybook/addon-docs` is not installed" ) ; let a = { ... o , page : this . exports . default } , i = await o . renderer ( ) , { render : s } = i , u = l ( async ( ) => { try { await s ( n , a , e ) , this . channel . emit ( wr , this . id ) } catch ( c ) { this . callbacks . showException ( c ) } } , "renderDocs" ) ; return this . rerender = async ( ) => u ( ) , this . teardownRender = async ( { viewModeChanged : c } = { } ) => { ! c || ! e || ( i . unmount ( e ) , this . torndown = ! 0 ) } , u
Omitted potentially unsafe URL args .
More info : https : //storybook.js.org/docs/react/writing-stories/args#setting-args-through-the-url
` ),r),{})},"parseArgsParam"),{history:Bs,document:ot}=Te;function ks(t){let e=(t||"").match(/^ \/ story \/ (.+)/);if(!e)throw new Error( ` Invalid path '${t}' , must start with '/story/' ` );return e[1]}l(ks,"pathToId");var Ns=l(({selection:t,extraParams:e})=>{let r=typeof ot<"u"?ot.location.search:"",{path:n,selectedKind:o,selectedStory:a,...i}=jn.default.parse(r,{ignoreQueryPrefix:!0});return jn.default.stringify({...i,...e,...t&&{id:t.storyId,viewMode:t.viewMode}},{encode:!1,addQueryPrefix:!0})},"getQueryString"),vf=l(t=>{if(!t)return;let e=Ns({selection:t}),{hash:r=""}=ot.location;ot.title=t.storyId,Bs.replaceState({},"", ` $ { ot . location . pathname } $ { e } $ { r } ` )},"setPath"),Ef=l(t=>t!=null&&typeof t=="object"&&Array.isArray(t)===!1,"isObject"),er=l(t=>{if(t!==void 0){if(typeof t=="string")return t;if(Array.isArray(t))return er(t[0]);if(Ef(t))return er(Object.values(t).filter(Boolean))}},"getFirstString"),Sf=l(()=>{if(typeof ot<"u"){let t=jn.default.parse(ot.location.search,{ignoreQueryPrefix:!0}),e=typeof t.args=="string"?ci(t.args):void 0,r=typeof t.globals=="string"?ci(t.globals):void 0,n=er(t.viewMode);(typeof n!="string"||!n.match(/docs|story/))&&(n="story");let o=er(t.path),a=o?ks(o):er(t.id);if(a)return{storySpecifier:a,args:e,globals:r,viewMode:n}}return null},"getSelectionSpecifierFromPath"),Ms=class{selectionSpecifier;selection;constructor(){this.selectionSpecifier=Sf()}setSelection(e){this.selection=e,vf(this.selection)}setQueryParams(e){let r=Ns({extraParams:e}),{hash:n=""}=ot.location;Bs.replaceState({},"", ` $ { ot . location . pathname } $ { r } $ { n } ` )}};l(Ms,"UrlStore");var Af=Ms,wf=je(yp(),1),xf=je(Zn(),1),{document:De}=Te,pi=100,Ls=(t=>(t.MAIN="MAIN",t.NOPREVIEW="NOPREVIEW",t.PREPARING_STORY="PREPARING_STORY",t.PREPARING_DOCS="PREPARING_DOCS",t.ERROR="ERROR",t))(Ls||{}),wn={PREPARING_STORY:"sb-show-preparing-story",PREPARING_DOCS:"sb-show-preparing-docs",MAIN:"sb-show-main",NOPREVIEW:"sb-show-nopreview",ERROR:"sb-show-errordisplay"},xn={centered:"sb-main-centered",fullscreen:"sb-main-fullscreen",padded:"sb-main-padded"},fi=new wf.default({escapeXML:!0}), $ s=class{currentLayoutClass;testing=!1;preparingTimeout;constructor(){if(typeof De<"u"){let{__SPECIAL_TEST_PARAMETER__:e}=xf.default.parse(De.location.search,{ignoreQueryPrefix:!0});switch(e){case"preparing-story":{this.showPreparingStory(),this.testing=!0;break}case"preparing-docs":{this.showPreparingDocs(),this.testing=!0;break}default:}}}prepareForStory(e){return this.showStory(),this.applyLayout(e.parameters.layout),De.documentElement.scrollTop=0,De.documentElement.scrollLeft=0,this.storyRoot()}storyRoot(){return De.getElementById("storybook-root")}prepareForDocs(){return this.showMain(),this.showDocs(),this.applyLayout("fullscreen"),De.documentElement.scrollTop=0,De.documentElement.scrollLeft=0,this.docsRoot()}docsRoot(){return De.getElementById("storybook-docs")}applyLayout(e="padded"){if(e==="none"){De.body.classList.remove(this.currentLayoutClass),this.currentLayoutClass=null;return}this.checkIfLayoutExists(e);let r=xn[e];De.body.classList.remove(this.currentLayoutClass),De.body.classList.add(r),this.currentLayoutClass=r}checkIfLayoutExists(e){xn[e]||Se.warn(qe `
The desired layout : $ { e } is not a valid option .
The possible options are : $ { Object . keys ( xn ) . join ( ", " ) } , none .
` )}showMode(e){clearTimeout(this.preparingTimeout),Object.keys(Ls).forEach(r=>{r===e?De.body.classList.add(wn[r]):De.body.classList.remove(wn[r])})}showErrorDisplay({message:e="",stack:r=""}){let n=e,o=r,a=e.split( `
` );a.length>1&&([n]=a,o=a.slice(1).join( `
` ).replace(/^ \n /,"")),De.getElementById("error-message").innerHTML=fi.toHtml(n),De.getElementById("error-stack").innerHTML=fi.toHtml(o),this.showMode("ERROR")}showNoPreview(){this.testing||(this.showMode("NOPREVIEW"),this.storyRoot()?.setAttribute("hidden","true"),this.docsRoot()?.setAttribute("hidden","true"))}showPreparingStory({immediate:e=!1}={}){clearTimeout(this.preparingTimeout),e?this.showMode("PREPARING_STORY"):this.preparingTimeout=setTimeout(()=>this.showMode("PREPARING_STORY"),pi)}showPreparingDocs({immediate:e=!1}={}){clearTimeout(this.preparingTimeout),e?this.showMode("PREPARING_DOCS"):this.preparingTimeout=setTimeout(()=>this.showMode("PREPARING_DOCS"),pi)}showMain(){this.showMode("MAIN")}showDocs(){this.storyRoot().setAttribute("hidden","true"),this.docsRoot().removeAttribute("hidden")}showStory(){this.docsRoot().setAttribute("hidden","true"),this.storyRoot().removeAttribute("hidden")}showStoryDuringRender(){De.body.classList.add(wn.MAIN)}};l( $ s,"WebView");var Cf= $ s,Of=class extends hf{constructor(e,r){super(e,r,new Af,new Cf),this.importFn=e,this.getProjectAnnotations=r,Te.__STORYBOOK_PREVIEW__=this}};l(Of,"PreviewWeb");var{document:At}=Te,_f=["application/javascript","application/ecmascript","application/x-ecmascript","application/x-javascript","text/ecmascript","text/javascript","text/javascript1.0","text/javascript1.1","text/javascript1.2","text/javascript1.3","text/javascript1.4","text/javascript1.5","text/jscript","text/livescript","text/x-ecmascript","text/x-javascript","module"],If="script",di="scripts-root";function kn(){let t=At.createEvent("Event");t.initEvent("DOMContentLoaded",!0,!0),At.dispatchEvent(t)}l(kn,"simulateDOMContentLoaded");function zs(t,e,r){let n=At.createElement("script");n.type=t.type==="module"?"module":"text/javascript",t.src?(n.onload=e,n.onerror=e,n.src=t.src):n.textContent=t.innerText,r?r.appendChild(n):At.head.appendChild(n),t.parentNode.removeChild(t),t.src||e()}l(zs,"insertScript");function co(t,e,r=0){t[r](()=>{r++,r===t.length?e():co(t,e,r)})}l(co,"insertScriptsSequentially");function Tf(t){let e=At.getElementById(di);e?e.innerHTML="":(e=At.createElement("div"),e.id=di,At.body.appendChild(e));let r=Array.from(t.querySelectorAll(If));if(r.length){let n=[];r.forEach(o=>{let a=o.getAttribute("type");(!a||_f.includes(a))&&n.push(i=>zs(o,i,e))}),n.length&&co(n,kn,void 0)}else kn()}l(Tf,"simulatePageLoad");var i0=__STORYBOOK_CLIENT_LOGGER__,{deprecate:s0,logger:u0,once:Rf,pretty:l0}=__STORYBOOK_CLIENT_LOGGER__;var sr=(()=>{let t;return typeof window<"u"?t=window:typeof globalThis<"u"?t=globalThis:typeof window<"u"?t=window:typeof self<"u"?t=self:t={},t})();var Df=Object.create,qs=Object.defineProperty,Ff=Object.getOwnPropertyDescriptor,Us=Object.getOwnPropertyNames,Pf=Object.getPrototypeOf,jf=Object.prototype.hasOwnProperty,Bf=(t=>typeof ke<"u"?ke:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof ke<"u"?ke:e)[r]}):t)(function(t){if(typeof ke<"u")return ke.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),Be=(t,e)=>function(){return e||(0,t[Us(t)[0]])((e={exports:{}}).exports,e),e.exports},kf=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Us(e))!jf.call(t,o)&&o!==r&&qs(t,o,{get:()=>e[o],enumerable:!(n=Ff(e,o))||n.enumerable});return t},Ct=(t,e,r)=>(r=t!=null?Df(Pf(t)):{},kf(e||!t||!t.__esModule?qs(r,"default",{value:t,enumerable:!0}):r,t)),Nf=Be({"../../node_modules/pretty-format/node_modules/ansi-styles/index.js"(t,e){var r=(a=0)=>i=> ` \ x1B [ $ { 38 + a } ; 5 ; $ { i } m ` ,n=(a=0)=>(i,s,u)=> ` \ x1B [ $ { 38 + a } ; 2 ; $ { i } ; $ { s } ; $ { u } m ` ;function o(){let a=new Map,i={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43
` )!==-1&&(w=d.spacingOuter+v+w+d.spacingOuter+f),w= ` { $ { w } } ` ), ` $ { d . spacingInner + f + m . prop . open + y + m . prop . close } = $ { m . value . open } $ { w } $ { m . value . close } ` }).join("")};t.printProps=n;var o=(c,p,d,f,g,h)=>c.map(b=>p.spacingOuter+d+(typeof b=="string"?a(b,p):h(b,p,d,f,g))).join("");t.printChildren=o;var a=(c,p)=>{let d=p.colors.content;return d.open+(0,e.default)(c)+d.close};t.printText=a;var i=(c,p)=>{let d=p.colors.comment;return ` $ { d . open } <!-- $ { ( 0 , e . default ) ( c ) } -- > $ { d . close } ` };t.printComment=i;var s=(c,p,d,f,g)=>{let h=f.colors.tag;return ` $ { h . open } < $ { c } $ { p && h . close + p + f . spacingOuter + g + h . open } $ { d ? ` > ${ h . close } ${ d } ${ f . spacingOuter } ${ g } ${ h . open } </ ${ c } ` : ` ${ p && ! f . min ? "" : " " } / ` } > $ { h . close } ` };t.printElement=s;var u=(c,p)=>{let d=p.colors.tag;return ` $ { d . open } < $ { c } $ { d . close } \u2026$ { d . open } / > $ { d . close } ` };t.printElementAsLeaf=u}}),zf=Be({"../../node_modules/pretty-format/build/plugins/DOMElement.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=t.default=void 0;var e=po(),r=1,n=3,o=8,a=11,i=/^((HTML|SVG) \w *)?Element $ /,s=v=>{try{return typeof v.hasAttribute=="function"&&v.hasAttribute("is")}catch{return!1}},u=v=>{let m=v.constructor.name,{nodeType:y,tagName:A}=v,w=typeof A=="string"&&A.includes("-")||s(v);return y===r&&(i.test(m)||w)||y===n&&m==="Text"||y===o&&m==="Comment"||y===a&&m==="DocumentFragment"},c=v=>v?.constructor?.name&&u(v);t.test=c;function p(v){return v.nodeType===n}function d(v){return v.nodeType===o}function f(v){return v.nodeType===a}var g=(v,m,y,A,w,C)=>{if(p(v))return(0,e.printText)(v.data,m);if(d(v))return(0,e.printComment)(v.data,m);let I=f(v)?"DocumentFragment":v.tagName.toLowerCase();return++A>m.maxDepth?(0,e.printElementAsLeaf)(I,m):(0,e.printElement)(I,(0,e.printProps)(f(v)?[]:Array.from(v.attributes,D=>D.name).sort(),f(v)?{}:Array.from(v.attributes).reduce((D,E)=>(D[E.name]=E.value,D),{}),m,y+m.indent,A,w,C),(0,e.printChildren)(Array.prototype.slice.call(v.childNodes||v.children),m,y+m.indent,A,w,C),m,y)};t.serialize=g;var h={serialize:g,test:c},b=h;t.default=b}}),qf=Be({"../../node_modules/pretty-format/build/plugins/Immutable.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=t.default=void 0;var e=Jr(),r="@@__IMMUTABLE_ITERABLE__@@",n="@@__IMMUTABLE_LIST__@@",o="@@__IMMUTABLE_KEYED__@@",a="@@__IMMUTABLE_MAP__@@",i="@@__IMMUTABLE_ORDERED__@@",s="@@__IMMUTABLE_RECORD__@@",u="@@__IMMUTABLE_SEQ__@@",c="@@__IMMUTABLE_SET__@@",p="@@__IMMUTABLE_STACK__@@",d=E=> ` Immutable . $ { E } ` ,f=E=> ` [ $ { E } ] ` ,g=" ",h=" \u 2026",b=(E,j,z,q,G,L,_)=>++q>j.maxDepth?f(d(_)): ` $ { d ( _ ) + g } { $ { ( 0 , e . printIteratorEntries ) ( E . entries ( ) , j , z , q , G , L ) } } ` ;function v(E){let j=0;return{next(){if(j<E._keys.length){let z=E._keys[j++];return{done:!1,value:[z,E.get(z)]}}return{done:!0,value:void 0}}}}var m=(E,j,z,q,G,L)=>{let _=d(E._name||"Record");return++q>j.maxDepth?f(_): ` $ { _ + g } { $ { ( 0 , e . printIteratorEntries ) ( v ( E ) , j , z , q , G , L ) } } ` },y=(E,j,z,q,G,L)=>{let _=d("Seq");return++q>j.maxDepth?f(_):E[o]? ` $ { _ + g } { $ { E . _iter || E . _object ? ( 0 , e . printIteratorEntries ) ( E . entries ( ) , j , z , q , G , L ) : h } } ` : ` $ { _ + g } [ $ { E . _iter || E . _array || E . _collection || E . _iterable ? ( 0 , e . printIteratorValues ) ( E . values ( ) , j , z , q , G , L ) : h } ] ` },A=(E,j,z,q,G,L,_)=>++q>j.maxDepth?f(d(_)): ` $ { d ( _ ) + g } [ $ { ( 0 , e . printIteratorValues ) ( E . values ( ) , j , z , q , G , L ) } ] ` ,w=(E,j,z,q,G,L)=>E[a]?b(E,j,z,q,G,L,E[i]?"OrderedMap":"Map"):E[n]?A(E,j,z,q,G,L,"List"):E[c]?A(E,j,z,q,G,L,E[i]?"OrderedSet":"Set"):E[p]?A(E,j,z,q,G,L,"Stack"):E[u]?y(E,j,z,q,G,L):m(E,j,z,q,G,L);t.serialize=w;var C=E=>E&&(E[r]===!0||E[s]===!0);t.test=C;var I={serialize:w,test:C},D=I;t.default=D}}),Uf=Be({"../../node_modules/pretty-format/node_modules/react-is/cjs/react-is.development.js"(t){(function(){var e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"
$ { _e } ` )},{edgeSpacing:Q.spacingOuter,min:Q.min,spacing:Q.spacingInner},Q.colors)}catch(ae){throw new y(ae.message,ae.stack)}if(typeof ee!="string")throw new Error( ` pretty - format : Plugin must return type "string" but instead returned "${typeof ee}" . ` );return ee}function L(R,K){for(let Q=0;Q<R.length;Q++)try{if(R[Q].test(K))return R[Q]}catch(re){throw new y(re.message,re.stack)}return null}function _(R,K,Q,re,oe,W){let ee=L(K.plugins,R);if(ee!==null)return G(ee,R,K,Q,re,oe);let ae=j(R,K.printFunctionName,K.escapeRegex,K.escapeString);return ae!==null?ae:z(R,K,Q,re,oe,W)}var F={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},B=Object.keys(F),H=R=>R, $ =H({callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:1/0,maxWidth:1/0,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,theme:F});t.DEFAULT_OPTIONS= $ ;function U(R){if(Object.keys(R).forEach(K=>{if(!Object.prototype.hasOwnProperty.call( $ ,K))throw new Error( ` pretty - format : Unknown option "${K}" . ` )}),R.min&&R.indent!==void 0&&R.indent!==0)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.');if(R.theme!==void 0){if(R.theme===null)throw new Error('pretty-format: Option "theme" must not be null.');if(typeof R.theme!="object")throw new Error( ` pretty - format : Option "theme" must be of type "object" but instead received "${typeof R.theme}" . ` )}}var M=R=>B.reduce((K,Q)=>{let re=R.theme&&R.theme[Q]!==void 0?R.theme[Q]:F[Q],oe=re&&e.default[re];if(oe&&typeof oe.close=="string"&&typeof oe.open=="string")K[Q]=oe;else throw new Error( ` pretty - format : Option "theme" has a key "${Q}" whose value "${re}" is undefined in ansi - styles . ` );return K},Object.create(null)),V=()=>B.reduce((R,K)=>(R[K]={close:"",open:""},R),Object.create(null)),J=R=>R?.printFunctionName?? $ .printFunctionName,te=R=>R?.escapeRegex?? $ .escapeRegex,ue=R=>R?.escapeString?? $ .escapeString,ne=R=>({callToJSON:R?.callToJSON?? $ .callToJSON,colors:R?.highlight?M(R):V(),compareKeys:typeof R?.compareKeys=="function"||R?.compareKeys===null?R.compareKeys: $ .compareKeys,escapeRegex:te(R),escapeString:ue(R),indent:R?.min?"":le(R?.indent?? $ .indent),maxDepth:R?.maxDepth?? $ .maxDepth,maxWidth:R?.maxWidth?? $ .maxWidth,min:R?.min?? $ .min,plugins:R?.plugins?? $ .plugins,printBasicPrototype:R?.printBasicPrototype??!0,printFunctionName:J(R),spacingInner:R?.min?" ": `
` ,spacingOuter:R?.min?"": `
` });function le(R){return new Array(R+1).join(" ")}function ce(R,K){if(K&&(U(K),K.plugins)){let re=L(K.plugins,R);if(re!==null)return G(re,R,ne(K),"",0,[])}let Q=j(R,J(K),te(K),ue(K));return Q!==null?Q:z(R,ne(K),"",0,[])}var ye={AsymmetricMatcher:n.default,DOMCollection:o.default,DOMElement:a.default,Immutable:i.default,ReactElement:s.default,ReactTestComponent:u.default};t.plugins=ye;var Ee=ce;t.default=Ee}}),Hs=Be({"../../node_modules/diff-sequences/build/index.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var e="diff-sequences",r=0,n=(h,b,v,m,y)=>{let A=0;for(;h<b&&v<m&&y(h,v);)h+=1,v+=1,A+=1;return A},o=(h,b,v,m,y)=>{let A=0;for(;h<=b&&v<=m&&y(b,m);)b-=1,m-=1,A+=1;return A},a=(h,b,v,m,y,A,w)=>{let C=0,I=-h,D=A[C],E=D;A[C]+=n(D+1,b,m+D-I+1,v,y);let j=h<w?h:w;for(C+=1,I+=2;C<=j;C+=1,I+=2){if(C!==h&&E<A[C])D=A[C];else if(D=E+1,b<=D)return C-1;E=A[C],A[C]=D+n(D+1,b,m+D-I+1,v,y)}return w},i=(h,b,v,m,y,A,w)=>{let C=0,I=h,D=A[C],E=D;A[C]-=o(b,D-1,v,m+D-I-1,y);let j=h<w?h:w;for(C+=1,I-=2;C<=j;C+=1,I-=2){if(C!==h&&A[C]<E)D=A[C];else if(D=E-1,D<b)return C-1;E=A[C],A[C]=D-o(b,D-1,v,m+D-I-1,y)}return w},s=(h,b,v,m,y,A,w,C,I,D,E)=>{let j=m-b,z=v-b,q=y-m-z,G=-q-(h-1),L=-q+(h-1),_=r,F=h<C?h:C;for(let B=0,H=-h;B<=F;B+=1,H+=2){let $ =B===0||B!==h&&_<w[B],U= $ ?w[B]:_,M= $ ?U:U+1,V=j+M-H,J=n(M+1,v,V+1,y,A),te=M+J;if(_=w[B],w[B]=te,G<=H&&H<=L){let ue=(h-1-(H+q))/2;if(ue<=D&&I[ue]-1<=te){let ne=j+U-( $ ?H+1:H-1),le=o(b,U,m,ne,A),ce=U-le,ye=ne-le,Ee=ce+1,R=ye+1;E.nChangePreceding=h-1,h-1===Ee+R-b-m?(E.aEndPreceding=b,E.bEndPreceding=m):(E.aEndPreceding=Ee,E.bEndPreceding=R),E.nCommonPreceding=le,le!==0&&(E.aCommonPreceding=Ee,E.bCommonPreceding=R),E.nCommonFollowing=J,J!==0&&(E.aCommonFollowing=M+1,E.bCommonFollowing=V+1);let K=te+1,Q=V+J+1;return E.nChangeFollowing=h-1,h-1===v+y-K-Q?(E.aStartFollowing=v,E.bStartFollowing=y):(E.aStartFollowing=K,E.bStartFollowing=Q),!0}}}return!1},u=(h,b,v,m,y,A,w,C,I,D,E)=>{let j=y-v,z=v-b,q=y-m-z,G=q-h,L=q+h,_=r,F=h<D?h:D;for(let B=0,H=h;B<=F;B+=1,H-=2){let $ =B===0||B!==h&&I[B]<_,U= $ ?I[B]:_,M= $ ?U:U-1,V=j+M-H,J=o(b,M-1,m,V-1,A),te=M-J;if(_=I[B],I[B]=te,G<=H&&H<=L){let ue=(h+(H-q))/2;if(ue<=C&&te-1<=w[ue]){let ne=V-J;if(E.nChangePreceding=h,h===te+ne-b-m?(E.aEndPreceding=b,E.bEndPreceding=m):(E.aEndPreceding=te,E.bEndPreceding=ne),E.nCommonPreceding=J,J!==0&&(E.aCommonPreceding=te,E.bCommonPreceding=ne),E.nChangeFollowing=h-1,h===1)E.nCommonFollowing=0,E.aStartFollowing=v,E.bStartFollowing=y;else{let le=j+U-( $ ?H-1:H+1),ce=n(U,v,le,y,A);E.nCommonFollowing=ce,ce!==0&&(E.aCommonFollowing=U,E.bCommonFollowing=le);let ye=U+ce,Ee=le+ce;h-1===v+y-ye-Ee?(E.aStartFollowing=v,E.bStartFollowing=y):(E.aStartFollowing=ye,E.bStartFollowing=Ee)}return!0}}}return!1},c=(h,b,v,m,y,A,w,C,I)=>{let D=m-b,E=y-v,j=v-b,z=y-m,q=z-j,G=j,L=j;if(w[0]=b-1,C[0]=v,q%2===0){let _=(h||q)/2,F=(j+z)/2;for(let B=1;B<=F;B+=1)if(G=a(B,v,y,D,A,w,G),B<_)L=i(B,b,m,E,A,C,L);else if(u(B,b,v,m,y,A,w,G,C,L,I))return}else{let _=((h||q)+1)/2,F=(j+z+1)/2,B=1;for(G=a(B,v,y,D,A,w,G),B+=1;B<=F;B+=1)if(L=i(B-1,b,m,E,A,C,L),B<_)G=a(B,v,y,D,A,w,G);else if(s(B,b,v,m,y,A,w,G,C,L,I))return}throw new Error( ` $ { e } : no overlap aStart = $ { b } aEnd = $ { v } bStart = $ { m } bEnd = $ { y } ` )},p=(h,b,v,m,y,A,w,C,I,D)=>{if(y-m<v-b){if(A=!A,A&&w.length===1){let{foundSubsequence:ue,isCommon:ne}=w[0];w[1]={foundSubsequence:(le,ce,ye)=>{ue(le,ye,ce)},isCommon:(le,ce)=>ne(ce,le)}}let J=b,te=v;b=m,v=y,m=J,y=te}let{foundSubsequence:E,isCommon:j}=w[A?1:0];c(h,b,v,m,y,j,C,I,D);let{nChangePreceding:z,aEndPreceding:q,bEndPreceding:G,nCommonPreceding:L,aCommonPreceding:_,bCommonPreceding:F,nCommonFollowing:B,aCommonFollowing:H,bCommonFollowing: $ ,nChangeFollowing:U,aStartFollowing:M,bStartFollowing:V}=D;b<q&&m<G&&p(z,b,q,m,G,A,w,C,I,D),L!==0&&E(L,_,F),B!==0&&E(B,H, $ ),M<v&&V<y&&p(U,M,v,V,y,A,w,C,I,D)},d=(h,b)=>{if(typeof b!="number")throw new TypeError( ` $ { e } : $ { h } typeof $ { typeof b } is not a number ` );if(!Number.isSafeInteger(b))throw new RangeError( ` $ { e } : $ { h } value $ { b } is not a safe integer ` );if(b<0)throw new RangeError( ` $ { e } : $ { h } value $ { b } is a negative integer ` )},f=(h,b)=>{let
In order to be iterable , non - array objects must have a [ Symbol . iterator ] ( ) method . ` )}var p={bold:["1","22"],dim:["2","22"],italic:["3","23"],underline:["4","24"],inverse:["7","27"],hidden:["8","28"],strike:["9","29"],black:["30","39"],red:["31","39"],green:["32","39"],yellow:["33","39"],blue:["34","39"],magenta:["35","39"],cyan:["36","39"],white:["37","39"],brightblack:["30;1","39"],brightred:["31;1","39"],brightgreen:["32;1","39"],brightyellow:["33;1","39"],brightblue:["34;1","39"],brightmagenta:["35;1","39"],brightcyan:["36;1","39"],brightwhite:["37;1","39"],grey:["90","39"]},d={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},f=" \u 2026";function g(S,O){var k=p[d[O]]||p[O];return k?" \x 1B[".concat(k[0],"m").concat(String(S)," \x 1B[").concat(k[1],"m"):String(S)}function h(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=S.showHidden,k=O===void 0?!1:O,Y=S.depth,X=Y===void 0?2:Y,Z=S.colors,ie=Z===void 0?!1:Z,he=S.customInspect,we=he===void 0?!0:he,me=S.showProxy,Pe=me===void 0?!1:me,Ke=S.maxArrayLength,Dt=Ke===void 0?1/0:Ke,He=S.breakLength,Je=He===void 0?1/0:He,Xe=S.seen,Yt=Xe===void 0?[]:Xe,Ft=S.truncate,br=Ft===void 0?1/0:Ft,Kt=S.stylize,Jt=Kt===void 0?String:Kt,Pt={showHidden:!!k,depth:Number(X),colors:!!ie,customInspect:!!we,showProxy:!!Pe,maxArrayLength:Number(Dt),breakLength:Number(Je),truncate:Number(br),seen:Yt,stylize:Jt};return Pt.colors&&(Pt.stylize=g),Pt}function b(S,O){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f;S=String(S);var Y=k.length,X=S.length;return Y>O&&X>Y?k:X>O&&X>Y?"".concat(S.slice(0,O-Y)).concat(k):S}function v(S,O,k){var Y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:", ";k=k||O.inspect;var X=S.length;if(X===0)return"";for(var Z=O.truncate,ie="",he="",we="",me=0;me<X;me+=1){var Pe=me+1===S.length,Ke=me+2===S.length;we="".concat(f,"(").concat(S.length-me,")");var Dt=S[me];O.truncate=Z-ie.length-(Pe?0:Y.length);var He=he||k(Dt,O)+(Pe?"":Y),Je=ie.length+He.length,Xe=Je+we.length;if(Pe&&Je>Z&&ie.length+we.length<=Z||!Pe&&!Ke&&Xe>Z||(he=Pe?"":k(S[me+1],O)+(Ke?"":Y),!Pe&&Ke&&Xe>Z&&Je+he.length>Z))break;if(ie+=He,!Pe&&!Ke&&Je+he.length>=Z){we="".concat(f,"(").concat(S.length-me-1,")");break}we=""}return"".concat(ie).concat(we)}function m(S){return S.match(/^[a-zA-Z_][a-zA-Z_0-9]* $ /)?S:JSON.stringify(S).replace(/'/g," \\ '").replace(/ \\ "/g,'"').replace(/(^"|" $ )/g,"'")}function y(S,O){var k=o(S,2),Y=k[0],X=k[1];return O.truncate-=2,typeof Y=="string"?Y=m(Y):typeof Y!="number"&&(Y="[".concat(O.inspect(Y,O),"]")),O.truncate-=Y.length,X=O.inspect(X,O),"".concat(Y,": ").concat(X)}function A(S,O){var k=Object.keys(S).slice(S.length);if(!S.length&&!k.length)return"[]";O.truncate-=4;var Y=v(S,O);O.truncate-=Y.length;var X="";return k.length&&(X=v(k.map(function(Z){return[Z,S[Z]]}),O,y)),"[ ".concat(Y).concat(X?", ".concat(X):""," ]")}var w=Function.prototype.toString,C=/ \s *function(?: \s | \s * \/ \* [^(?:* \/ )]+ \* \/ \s *)*([^ \s \( \/ ]+)/,I=512;function D(S){if(typeof S!="function")return null;var O="";if(typeof Function.prototype.name>"u"&&typeof S.name>"u"){var k=w.call(S);if(k.indexOf("(")>I)return O;var Y=k.match(C);Y&&(O=Y[1])}else O=S.name;return O}var E=D,j=function(S){return typeof Buffer=="function"&&S instanceof Buffer?"Buffer":S[Symbol.toStringTag]?S[Symbol.toStringTag]:E(S.constructor)};function z(S,O){var k=j(S);O.truncate-=k.length+4;var Y=Object.keys(S).slice(S.length);if(!S.length&&!Y.length)return"".concat(k,"[]");for(var X="",Z=0;Z<S.length;Z++){var ie="".concat(O.stylize(b(S[Z],O.truncate),"number")).concat(Z===S.length-1?"":", ");if(O.truncate-=ie.length,S[Z]!==S.length&&O.truncate<=3){X+="".concat(f,"(").concat(S.length-S[Z]+1,")");break}X+=ie}var he="";return Y.length&&(he=v(Y.map(function(we){return[we,S[we]]}),O,y)),"".concat(k,"[ ").concat(X).concat(he?", ".concat(he):""," ]")}function q(S,O){var k=S.toJSON();if(k===null)return"Invalid Date";var Y=k.split("T"),X=Y[0];return O.stylize("".concat(X,"T").concat(b(Y[1],O.truncate-X.length-1)),"date")}functi
` )}function Wt(S,O){var k=S.getAttributeNames(),Y=S.tagName.toLowerCase(),X=O.stylize("<".concat(Y),"special"),Z=O.stylize(">","special"),ie=O.stylize("</".concat(Y,">"),"special");O.truncate-=Y.length*2+5;var he="";k.length>0&&(he+=" ",he+=v(k.map(function(Pe){return[Pe,S.getAttribute(Pe)]}),O,mr," ")),O.truncate-=he.length;var we=O.truncate,me=Tt(S.children,O);return me&&me.length>we&&(me="".concat(f,"(").concat(S.children.length,")")),"".concat(X).concat(he).concat(Z).concat(me).concat(ie)}var yr=typeof Symbol=="function"&&typeof Symbol.for=="function",bt=yr?Symbol.for("chai/inspect"):"@@chai/inspect",Ge=!1;try{var Vt=Bf("util");Ge=Vt.inspect?Vt.inspect.custom:!1}catch{Ge=!1}function et(){this.key="chai/loupe__"+Math.random()+Date.now()}et.prototype={get:function(S){return S[this.key]},has:function(S){return this.key in S},set:function(S,O){Object.isExtensible(S)&&Object.defineProperty(S,this.key,{value:O,configurable:!0})}};var tt=new(typeof WeakMap=="function"?WeakMap:et),lt={},Gt={undefined:function(S,O){return O.stylize("undefined","undefined")},null:function(S,O){return O.stylize(null,"null")},boolean:function(S,O){return O.stylize(S,"boolean")},Boolean:function(S,O){return O.stylize(S,"boolean")},number:H,Number:H,bigint: $ ,BigInt: $ ,string:ce,String:ce,function:G,Function:G,symbol:ye,Symbol:ye,Array:A,Date:q,Map:F,Set:V,RegExp:U,Promise:oe,WeakSet:function(S,O){return O.stylize("WeakSet{ \u 2026}","special")},WeakMap:function(S,O){return O.stylize("WeakMap{ \u 2026}","special")},Arguments:_e,Int8Array:z,Uint8Array:z,Uint8ClampedArray:z,Int16Array:z,Uint16Array:z,Int32Array:z,Uint32Array:z,Float32Array:z,Float64Array:z,Generator:function(){return""},DataView:function(){return""},ArrayBuffer:function(){return""},Error:It,HTMLCollection:Tt,NodeList:Tt},gr=function(S,O,k){return bt in S&&typeof S[bt]=="function"?S[bt](O):Ge&&Ge in S&&typeof S[Ge]=="function"?S[Ge](O.depth,O):"inspect"in S&&typeof S.inspect=="function"?S.inspect(O.depth,O):"constructor"in S&&tt.has(S.constructor)?tt.get(S.constructor)(S,O):lt[k]?lt[k](S,O):""},Rt=Object.prototype.toString;function Ye(S,O){O=h(O),O.inspect=Ye;var k=O,Y=k.customInspect,X=S===null?"null":n(S);if(X==="object"&&(X=Rt.call(S).slice(8,-1)),Gt[X])return Gt[X](S,O);if(Y&&S){var Z=gr(S,O,X);if(Z)return typeof Z=="string"?Z:Ye(Z,O)}var ie=S?Object.getPrototypeOf(S):!1;return ie===Object.prototype||ie===null?W(S,O):S&&typeof HTMLElement=="function"&&S instanceof HTMLElement?Wt(S,O):"constructor"in S?S.constructor!==Object?ae(S,O):W(S,O):S===Object(S)?W(S,O):O.stylize(String(S),X)}function P(S,O){return tt.has(S)?!1:(tt.set(S,O),!0)}function N(S,O){return S in lt?!1:(lt[S]=O,!0)}var pe=bt;r.custom=pe,r.default=Ye,r.inspect=Ye,r.registerConstructor=P,r.registerStringTag=N,Object.defineProperty(r,"__esModule",{value:!0})})}}),Gf=Ct(fo(),1),_0=Ct(Hs(),1),I0=Symbol("vitest:SAFE_COLORS"),Yf={bold:[" \x 1B[1m"," \x 1B[22m"," \x 1B[22m \x 1B[1m"],dim:[" \x 1B[2m"," \x 1B[22m"," \x 1B[22m \x 1B[2m"],italic:[" \x 1B[3m"," \x 1B[23m"],underline:[" \x 1B[4m"," \x 1B[24m"],inverse:[" \x 1B[7m"," \x 1B[27m"],hidden:[" \x 1B[8m"," \x 1B[28m"],strikethrough:[" \x 1B[9m"," \x 1B[29m"],black:[" \x 1B[30m"," \x 1B[39m"],red:[" \x 1B[31m"," \x 1B[39m"],green:[" \x 1B[32m"," \x 1B[39m"],yellow:[" \x 1B[33m"," \x 1B[39m"],blue:[" \x 1B[34m"," \x 1B[39m"],magenta:[" \x 1B[35m"," \x 1B[39m"],cyan:[" \x 1B[36m"," \x 1B[39m"],white:[" \x 1B[37m"," \x 1B[39m"],gray:[" \x 1B[90m"," \x 1B[39m"],bgBlack:[" \x 1B[40m"," \x 1B[49m"],bgRed:[" \x 1B[41m"," \x 1B[49m"],bgGreen:[" \x 1B[42m"," \x 1B[49m"],bgYellow:[" \x 1B[43m"," \x 1B[49m"],bgBlue:[" \x 1B[44m"," \x 1B[49m"],bgMagenta:[" \x 1B[45m"," \x 1B[49m"],bgCyan:[" \x 1B[46m"," \x 1B[49m"],bgWhite:[" \x 1B[47m"," \x 1B[49m"]},Kf=Object.entries(Yf);function ho(t){return String(t)}ho.open="";ho.close="";var T0=Kf.reduce((t,[e])=>(t[e]=ho,t),{isColorSupported:!1});var{AsymmetricMatcher:R0,DOMCollection:D0,DOMElement:F0,Immutable:P0,ReactElement:j0,ReactTestComponent:B0}=Gf.plugins;var Jf=Ct(fo(),1),k0=Ct(Ws(),1),{AsymmetricMatcher:N0,DOMCollection:M0,DOMElement:L0,Immutable: $ 0,ReactElement:z0,ReactTestComponent:q0}=Jf.plugins;Ct(fo(),1);Ct(Hs(),1);Ct(Ws(),1);var U0
` );return x.createElement("pre",{style:{margin:0,padding:"8px 10px 8px 36px",fontSize:st.size.s1,...e}},r.flatMap((n,o)=>{if(n.startsWith("expect(")){let p=hu(n,7),d=p&&7+p.length,f=p&&n.slice(d).match(/ \. (to|last|nth)[A-Z] \w + \( /);if(f){let g=d+f.index+f[0].length,h=hu(n,g);if(h)return["expect(",x.createElement(_o,{key: ` received _$ { p } ` ,value:p}),n.slice(d,g),x.createElement(Io,{key: ` expected _$ { h } ` ,value:h}),n.slice(g+h.length),x.createElement("br",{key: ` br$ { o } ` })]}}if(n.match(/^ \s *- /))return[x.createElement(Io,{key:n+o,value:n}),x.createElement("br",{key: ` br$ { o } ` })];if(n.match(/^ \s * \+ /)||n.match(/^Received: $ /))return[x.createElement(_o,{key:n+o,value:n}),x.createElement("br",{key: ` br$ { o } ` })];let[,a,i]=n.match(/^(Expected|Received): (.*) $ /)||[];if(a&&i)return a==="Expected"?["Expected: ",x.createElement(Io,{key:n+o,value:Oo(i),parsed:!0}),x.createElement("br",{key: ` br$ { o } ` })]:["Received: ",x.createElement(_o,{key:n+o,value:Oo(i),parsed:!0}),x.createElement("br",{key: ` br$ { o } ` })];let[,s,u]=n.match(/(Expected number|Received number|Number) of calls: ( \d +) $ /i)||[];if(s&&u)return[ ` $ { s } of calls : ` ,x.createElement(_t,{key:n+o,value:Number(u)}),x.createElement("br",{key: ` br$ { o } ` })];let[,c]=n.match(/^Received has value: (.+) $ /)||[];return c?["Received has value: ",x.createElement(_t,{key:n+o,value:Oo(c)}),x.createElement("br",{key: ` br$ { o } ` })]:[x.createElement("span",{key:n+o},n),x.createElement("br",{key: ` br$ { o } ` })]}))},Qh=fe.div({width:14,height:14,display:"flex",alignItems:"center",justifyContent:"center"}),Fu=({status:t})=>{let e=ur();switch(t){case de.DONE:return x.createElement(Qs,{color:e.color.positive,"data-testid":"icon-done"});case de.ERROR:return x.createElement(su,{color:e.color.negative,"data-testid":"icon-error"});case de.ACTIVE:return x.createElement(ou,{color:e.color.secondary,"data-testid":"icon-active"});case de.WAITING:return x.createElement(Qh,{"data-testid":"icon-waiting"},x.createElement(Zs,{color:en(.5,"#CCCCCC"),size:6}));default:return null}};function Zh(t){return Pu(t)||ju(t)}function Pu(t){return t&&typeof t=="object"&&"name"in t&&typeof t.name=="string"&&t.name==="AssertionError"}function ju(t){return t&&typeof t=="object"&&"message"in t&&typeof t.message=="string"&&t.message.startsWith("expect(")}var em=fe.div(()=>({fontFamily:st.fonts.mono,fontSize:st.size.s1,overflowWrap:"break-word",inlineSize:"calc( 100% - 40px )"})),tm=fe("div",{shouldForwardProp:t=>!["call","pausedAt"].includes(t.toString())})(({theme:t,call:e})=>({position:"relative",display:"flex",flexDirection:"column",borderBottom: ` 1 px solid $ { t . appBorderColor } ` ,fontFamily:st.fonts.base,fontSize:13,...e.status===de.ERROR&&{backgroundColor:t.base==="dark"?en(.93,t.color.negative):t.background.warning},paddingLeft:e.ancestors.length*20}),({theme:t,call:e,pausedAt:r})=>r===e.id&&{"&::before":{content:'""',position:"absolute",top:-5,zIndex:1,borderTop:"4.5px solid transparent",borderLeft: ` 7 px solid $ { t . color . warning } ` ,borderBottom:"4.5px solid transparent"},"&::after":{content:'""',position:"absolute",top:-1,zIndex:1,width:"100%",borderTop: ` 1.5 px solid $ { t . color . warning } ` }}),rm=fe.div(({theme:t,isInteractive:e})=>({display:"flex","&:hover":e?{}:{background:t.background.hoverable}})),nm=fe("button",{shouldForwardProp:t=>!["call"].includes(t.toString())})(({theme:t,disabled:e,call:r})=>({flex:1,display:"grid",background:"none",border:0,gridTemplateColumns:"15px 1fr",alignItems:"center",minHeight:40,margin:0,padding:"8px 15px",textAlign:"start",cursor:e||r.status===de.ERROR?"default":"pointer","&:focus-visible":{outline:0,boxShadow: ` inset 3 px 0 0 0 $ { r . status === de . ERROR ? t . color . warning : t . color . secondary } ` ,background:r.status===de.ERROR?"transparent":t.background.hoverable},"& > div":{opacity:r.status===de.WAITING?.5:1}})),om=fe.div({padding:6}),am=fe(ln)(({theme:t})=>({color:t.textMutedColor,margin:"0 3px"})),im=fe(pn)(({theme:t})=>({fontFamily:t.typography.fonts.base})),yu=fe("div")(({theme:t})=>({padding:"8px 10px 8px 36px",fontSize:st.size.s1,color:t.color.defaultText,pre:{margin:0,padding:0}})),sm=({exception:t})=>{if(ju(t))return se(mu,{...
$ { t . diff } ` :""} ` , style : { padding : 0 } } ) , se ( "p" , null , "See the full stack trace in the browser console." ) ) ; let e = t . message . split ( `
` ),r=e.length>1;return se(yu,null,se("pre",null,e[0]),r&&se("p",null,"See the full stack trace in the browser console."))},um=({call:t,callsById:e,controls:r,controlStates:n,childCallIds:o,isHidden:a,isCollapsed:i,toggleCollapsed:s,pausedAt:u})=>{let[c,p]=We(!1),d=!n.goto||!t.interceptable||!!t.ancestors.length;return a?null:se(tm,{call:t,pausedAt:u},se(rm,{isInteractive:d},se(nm,{"aria-label":"Interaction step",call:t,onClick:()=>r.goto(t.id),disabled:d,onMouseEnter:()=>n.goto&&p(!0),onMouseLeave:()=>n.goto&&p(!1)},se(Fu,{status:c?de.ACTIVE:t.status}),se(em,{style:{marginLeft:6,marginBottom:1}},se(No,{call:t,callsById:e}))),se(om,null,o?.length>0&&se(vt,{hasChrome:!1,tooltip:se(im,{note: ` $ { i ? "Show" : "Hide" } interactions ` })},se(am,{onClick:s},se(ru,null))))),t.status===de.ERROR&&t.exception?.callId===t.id&&se(sm,{exception:t.exception}))},lm=fe.div(({theme:t})=>({display:"flex",fontSize:t.typography.size.s2-1,gap:25})),cm=fe.div(({theme:t})=>({width:1,height:16,backgroundColor:t.appBorderColor})),pm=()=>{let[t,e]=We(!0),r=Vo().getDocsUrl({subpath:Kd,versioned:!0,renderer:!0});return ct(()=>{let n=setTimeout(()=>{e(!1)},100);return()=>clearTimeout(n)},[]),t?null:x.createElement(Xo,{title:"Interaction testing",description:x.createElement(x.Fragment,null,"Interaction tests allow you to verify the functional aspects of UIs. Write a play function for your story and you'll see it run here."),footer:x.createElement(lm,null,x.createElement(cn,{href:Yd,target:"_blank",withArrow:!0},x.createElement(lu,null)," Watch 8m video"),x.createElement(cm,null),x.createElement(cn,{href:r,target:"_blank",withArrow:!0},x.createElement(eu,null)," Read docs"))})},fm=fe.div(({theme:t})=>({height:"100%",background:t.background.content})),gu=fe.div(({theme:t})=>({borderBottom: ` 1 px solid $ { t . appBorderColor } ` ,backgroundColor:t.base==="dark"?en(.93,t.color.negative):t.background.warning,padding:15,fontSize:t.typography.size.s2-1,lineHeight:"19px"})),To=fe.code(({theme:t})=>({margin:"0 1px",padding:3,fontSize:t.typography.size.s1-1,lineHeight:1,verticalAlign:"top",background:"rgba(0, 0, 0, 0.05)",border: ` 1 px solid $ { t . appBorderColor } ` ,borderRadius:3})),bu=fe.div({paddingBottom:4,fontWeight:"bold"}),dm=fe.p({margin:0,padding:"0 0 20px"}),vu=fe.pre(({theme:t})=>({margin:0,padding:0,"&:not(:last-child)":{paddingBottom:16},fontSize:t.typography.size.s1-1})),hm=Sr(function({calls:t,controls:e,controlStates:r,interactions:n,fileName:o,hasException:a,caughtException:i,unhandledErrors:s,isPlaying:u,pausedAt:c,onScrollToEnd:p,endRef:d}){return se(fm,null,(n.length>0||a)&&se(ih,{controls:e,controlStates:r,status:u?de.ACTIVE:a?de.ERROR:de.DONE,storyFileName:o,onScrollToEnd:p}),se("div",{"aria-label":"Interactions list"},n.map(f=>se(um,{key:f.id,call:f,callsById:t,controls:e,controlStates:r,childCallIds:f.childCallIds,isHidden:f.isHidden,isCollapsed:f.isCollapsed,toggleCollapsed:f.toggleCollapsed,pausedAt:c}))),i&&!Zh(i)&&se(gu,null,se(bu,null,"Caught exception in ",se(To,null,"play")," function"),se(vu,{"data-chromatic":"ignore"},Eu(i))),s&&se(gu,null,se(bu,null,"Unhandled Errors"),se(dm,null,"Found ",s.length," unhandled error",s.length>1?"s":""," ","while running the play function. This might cause false positive assertions. Resolve unhandled errors or ignore unhandled errors with setting the",se(To,null,"test.dangerouslyIgnoreUnhandledErrors")," ","parameter to ",se(To,null,"true"),"."),s.map((f,g)=>se(vu,{key:g,"data-chromatic":"ignore"},Eu(f)))),se("div",{ref:d}),!u&&!i&&n.length===0&&se(pm,null))});function Eu(t){return t.stack|| ` $ { t . name } : $ { t . message } ` }var Ro={start:!1,back:!1,goto:!1,next:!1,end:!1},Su=({log:t,calls:e,collapsed:r,setCollapsed:n})=>{let o=new Map,a=new Map;return t.map(({callId:i,ancestors:s,status:u})=>{let c=!1;return s.forEach(p=>{r.has(p)&&(c=!0),a.set(p,(a.get(p)||[]).concat(i))}),{...e.get(i),status:u,isHidden:c}}).map(i=>{let s=i.status===de.ERROR&&o.get(i.ancestors.slice(-1)[0])?.status===de.ACTIVE?de.ACTIVE:i.status;return o.set(i.id,{...i,status:s}),{...i,status:s,childCallIds:a.get(i.id),isCollapsed:r.has(i.id),toggleCollapsed:
2024-06-16 17:30:30 +02:00
} catch ( e ) { console . error ( "[Storybook] One of your manager-entries failed: " + import . meta . url , e ) ; }