{"version":3,"file":"preview-BQRvVNnf.js","sources":["../../node_modules/@storybook/addon-links/dist/preview.mjs"],"sourcesContent":["import { global } from '@storybook/global';\nimport { makeDecorator, addons } from 'storybook/internal/preview-api';\nimport { STORY_CHANGED, SELECT_STORY } from 'storybook/internal/core-events';\nimport '@storybook/csf';\n\nvar PARAM_KEY=\"links\";var{document,HTMLElement}=global;var navigate=params=>addons.getChannel().emit(SELECT_STORY,params);var linksListener=e=>{let{target}=e;if(!(target instanceof HTMLElement))return;let element=target,{sbKind:kind,sbStory:story}=element.dataset;(kind||story)&&(e.preventDefault(),navigate({kind,story}));},hasListener=!1,on=()=>{hasListener||(hasListener=!0,document.addEventListener(\"click\",linksListener));},off=()=>{hasListener&&(hasListener=!1,document.removeEventListener(\"click\",linksListener));},withLinks=makeDecorator({name:\"withLinks\",parameterName:PARAM_KEY,wrapper:(getStory,context)=>(on(),addons.getChannel().once(STORY_CHANGED,off),getStory(context))});var decorators=[withLinks];\n\nexport { decorators };\n"],"names":["global","makeDecorator","addons","STORY_CHANGED","SELECT_STORY","PARAM_KEY","document","HTMLElement","navigate","params","linksListener","target","element","kind","story","hasListener","on","off","withLinks","getStory","context","decorators"],"mappings":"4BAAA,KAAA,CAAA,OAAAA,CAAA,EAAA,4BACA,CAAA,cAAAC,EAAA,OAAAC,CAAA,EAAA,iCACA,CAAA,cAAAC,EAAA,aAAAC,CAAA,EAAA,iCAGA,IAAIC,EAAU,QAAW,CAAC,SAAAC,EAAS,YAAAC,CAAW,EAAEP,EAAWQ,EAASC,GAAQP,EAAO,WAAU,EAAG,KAAKE,EAAaK,CAAM,EAAMC,EAAc,GAAG,CAAC,GAAG,CAAC,OAAAC,CAAM,EAAE,EAAE,GAAG,EAAEA,aAAkBJ,GAAa,OAAO,IAAIK,EAAQD,EAAO,CAAC,OAAOE,EAAK,QAAQC,CAAK,EAAEF,EAAQ,SAASC,GAAMC,KAAS,EAAE,eAAc,EAAGN,EAAS,CAAC,KAAAK,EAAK,MAAAC,CAAK,CAAC,EAAG,EAAEC,EAAY,GAAGC,EAAG,IAAI,CAACD,IAAcA,EAAY,GAAGT,EAAS,iBAAiB,QAAQI,CAAa,EAAG,EAAEO,EAAI,IAAI,CAACF,IAAcA,EAAY,GAAGT,EAAS,oBAAoB,QAAQI,CAAa,EAAG,EAAEQ,EAAUjB,EAAc,CAAC,KAAK,YAAY,cAAcI,EAAU,QAAQ,CAACc,EAASC,KAAWJ,IAAKd,EAAO,WAAU,EAAG,KAAKC,EAAcc,CAAG,EAAEE,EAASC,CAAO,EAAE,CAAC,EAAMC,EAAW,CAACH,CAAS","x_google_ignoreList":[0]}