Files
components/assets/Tile.stories.761d4b91.js
T

52 lines
28 KiB
JavaScript

var Re=Object.defineProperty;var i=(e,t)=>Re(e,"name",{value:t,configurable:!0});import{b as W,r as c,j as m,a as F,F as se,R as le}from"./jsx-runtime.2e67363d.js";import{j as Pe}from"./iframe.9e9034b6.js";import{m as _e}from"./make-decorator.b4e813d2.js";import{S as Ee}from"./search.3ed26da9.js";/**
* @remix-run/router v1.0.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$.apply(this,arguments)}i($,"_extends$1");var C;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(C||(C={}));function Te(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:r,v5Compat:n=!1}=e,a;a=t.map((h,y)=>f(h,typeof h=="string"?null:h.state,y===0?"default":void 0));let s=u(r==null?a.length-1:r),o=C.Pop,l=null;function u(h){return Math.min(Math.max(h,0),a.length-1)}i(u,"clampIndex");function d(){return a[s]}i(d,"getCurrentLocation");function f(h,y,v){y===void 0&&(y=null);let x=Oe(a?d().pathname:"/",h,y,v);return we(x.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(h)),x}return i(f,"createMemoryLocation"),{get index(){return s},get action(){return o},get location(){return d()},createHref(h){return typeof h=="string"?h:H(h)},push(h,y){o=C.Push;let v=f(h,y);s+=1,a.splice(s,a.length,v),n&&l&&l({action:o,location:v})},replace(h,y){o=C.Replace;let v=f(h,y);a[s]=v,n&&l&&l({action:o,location:v})},go(h){o=C.Pop,s=u(s+h),l&&l({action:o,location:d()})},listen(h){return l=h,()=>{l=null}}}}i(Te,"createMemoryHistory");function we(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}i(we,"warning$1");function Ae(){return Math.random().toString(36).substr(2,8)}i(Ae,"createKey");function Oe(e,t,r,n){return r===void 0&&(r=null),$({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?T(t):t,{state:r,key:t&&t.key||n||Ae()})}i(Oe,"createLocation");function H(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}i(H,"createPath");function T(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}i(T,"parsePath");var Q;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Q||(Q={}));function Ie(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?T(t):t,a=ce(n.pathname||"/",r);if(a==null)return null;let s=ue(e);Le(s);let o=null;for(let l=0;o==null&&l<s.length;++l)o=Ve(s[l],a);return o}i(Ie,"matchRoutes");function ue(e,t,r,n){return t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n=""),e.forEach((a,s)=>{let o={relativePath:a.path||"",caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};o.relativePath.startsWith("/")&&(g(o.relativePath.startsWith(n),'Absolute route path "'+o.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),o.relativePath=o.relativePath.slice(n.length));let l=b([n,o.relativePath]),u=r.concat(o);a.children&&a.children.length>0&&(g(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),ue(a.children,t,u,l)),!(a.path==null&&!a.index)&&t.push({path:l,score:Ne(l,a.index),routesMeta:u})}),t}i(ue,"flattenRoutes");function Le(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Be(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}i(Le,"rankRouteBranches");const ke=/^:\w+$/,Me=3,De=2,$e=1,Ue=10,je=-2,Z=i(e=>e==="*","isSplat");function Ne(e,t){let r=e.split("/"),n=r.length;return r.some(Z)&&(n+=je),t&&(n+=De),r.filter(a=>!Z(a)).reduce((a,s)=>a+(ke.test(s)?Me:s===""?$e:Ue),n)}i(Ne,"computeScore");function Be(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}i(Be,"compareIndexes");function Ve(e,t){let{routesMeta:r}=e,n={},a="/",s=[];for(let o=0;o<r.length;++o){let l=r[o],u=o===r.length-1,d=a==="/"?t:t.slice(a.length)||"/",f=Fe({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d);if(!f)return null;Object.assign(n,f.params);let p=l.route;s.push({params:n,pathname:b([a,f.pathname]),pathnameBase:Ye(b([a,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(a=b([a,f.pathnameBase]))}return s}i(Ve,"matchRouteBranch");function We(e,t){return t===void 0&&(t={}),e.replace(/:(\w+)/g,(r,n)=>(g(t[n]!=null,'Missing ":'+n+'" param'),t[n])).replace(/(\/?)\*/,(r,n,a,s)=>{const o="*";return t[o]==null?s==="/*"?"/":"":""+n+t[o]})}i(We,"generatePath");function Fe(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=He(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let s=a[0],o=s.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:n.reduce((d,f,p)=>{if(f==="*"){let h=l[p]||"";o=s.slice(0,s.length-h.length).replace(/(.)\/+$/,"$1")}return d[f]=Ge(l[p]||"",f),d},{}),pathname:s,pathnameBase:o,pattern:e}}i(Fe,"matchPath");function He(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),fe(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,(o,l)=>(n.push(l),"([^\\/]+)"));return e.endsWith("*")?(n.push("*"),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}i(He,"compilePath");function Ge(e,t){try{return decodeURIComponent(e)}catch(r){return fe(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}i(Ge,"safelyDecodeURIComponent");function ce(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}i(ce,"stripBasename");function g(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}i(g,"invariant");function fe(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}i(fe,"warning");function Je(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?T(e):e;return{pathname:r?r.startsWith("/")?r:Ke(r,t):t,search:qe(n),hash:ze(a)}}i(Je,"resolvePath");function Ke(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}i(Ke,"resolvePathname");function N(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}i(N,"getInvalidPathError");function he(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=T(e):(a=$({},e),g(!a.pathname||!a.pathname.includes("?"),N("?","pathname","search",a)),g(!a.pathname||!a.pathname.includes("#"),N("#","pathname","hash",a)),g(!a.search||!a.search.includes("#"),N("#","search","hash",a)));let s=e===""||a.pathname==="",o=s?"/":a.pathname,l;if(n||o==null)l=r;else{let p=t.length-1;if(o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),p-=1;a.pathname=h.join("/")}l=p>=0?t[p]:"/"}let u=Je(a,l),d=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(d||f)&&(u.pathname+="/"),u}i(he,"resolveTo");const b=i(e=>e.join("/").replace(/\/\/+/g,"/"),"joinPaths"),Ye=i(e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),"normalizePathname"),qe=i(e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,"normalizeSearch"),ze=i(e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,"normalizeHash");class de{constructor(t,r,n){this.status=t,this.statusText=r||"",this.data=n}}i(de,"ErrorResponse");function Xe(e){return e instanceof de}i(Xe,"isRouteErrorResponse");/**
* React Router v6.4.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function G(){return G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},G.apply(this,arguments)}i(G,"_extends");function Qe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}i(Qe,"isPolyfill");const Ze=typeof Object.is=="function"?Object.is:Qe,{useState:et,useEffect:tt,useLayoutEffect:rt,useDebugValue:nt}=W;function at(e,t,r){const n=t(),[{inst:a},s]=et({inst:{value:n,getSnapshot:t}});return rt(()=>{a.value=n,a.getSnapshot=t,B(a)&&s({inst:a})},[e,n,t]),tt(()=>(B(a)&&s({inst:a}),e(i(()=>{B(a)&&s({inst:a})},"handleStoreChange"))),[e]),nt(n),n}i(at,"useSyncExternalStore$2");function B(e){const t=e.getSnapshot,r=e.value;try{const n=t();return!Ze(r,n)}catch{return!0}}i(B,"checkIfSnapshotChanged");function ot(e,t,r){return t()}i(ot,"useSyncExternalStore$1");const it=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",st=!it,lt=st?ot:at;"useSyncExternalStore"in W&&(e=>e.useSyncExternalStore)(W);const ut=c.exports.createContext(null),ct=c.exports.createContext(null),pe=c.exports.createContext(null),z=c.exports.createContext(null),w=c.exports.createContext(null),R=c.exports.createContext({outlet:null,matches:[]}),me=c.exports.createContext(null);function ft(e,t){let{relative:r}=t===void 0?{}:t;A()||g(!1);let{basename:n,navigator:a}=c.exports.useContext(z),{hash:s,pathname:o,search:l}=ge(e,{relative:r}),u=o;return n!=="/"&&(u=o==="/"?n:b([n,o])),a.createHref({pathname:u,search:l,hash:s})}i(ft,"useHref");function A(){return c.exports.useContext(w)!=null}i(A,"useInRouterContext");function P(){return A()||g(!1),c.exports.useContext(w).location}i(P,"useLocation");function ht(){return c.exports.useContext(w).navigationType}i(ht,"useNavigationType");function ve(e){return e.filter((t,r)=>r===0||!t.route.index&&t.pathnameBase!==e[r-1].pathnameBase)}i(ve,"getPathContributingMatches");function ye(){A()||g(!1);let{basename:e,navigator:t}=c.exports.useContext(z),{matches:r}=c.exports.useContext(R),{pathname:n}=P(),a=JSON.stringify(ve(r).map(l=>l.pathnameBase)),s=c.exports.useRef(!1);return c.exports.useEffect(()=>{s.current=!0}),c.exports.useCallback(function(l,u){if(u===void 0&&(u={}),!s.current)return;if(typeof l=="number"){t.go(l);return}let d=he(l,JSON.parse(a),n,u.relative==="path");e!=="/"&&(d.pathname=d.pathname==="/"?e:b([e,d.pathname])),(u.replace?t.replace:t.push)(d,u.state,u)},[e,t,a,n])}i(ye,"useNavigate");function dt(){let{matches:e}=c.exports.useContext(R),t=e[e.length-1];return t?t.params:{}}i(dt,"useParams");function ge(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=c.exports.useContext(R),{pathname:a}=P(),s=JSON.stringify(ve(n).map(o=>o.pathnameBase));return c.exports.useMemo(()=>he(e,JSON.parse(s),a,r==="path"),[e,s,a,r])}i(ge,"useResolvedPath");function pt(e,t){A()||g(!1);let r=c.exports.useContext(pe),{matches:n}=c.exports.useContext(R),a=n[n.length-1],s=a?a.params:{};a&&a.pathname;let o=a?a.pathnameBase:"/";a&&a.route;let l=P(),u;if(t){var d;let v=typeof t=="string"?T(t):t;o==="/"||((d=v.pathname)==null?void 0:d.startsWith(o))||g(!1),u=v}else u=l;let f=u.pathname||"/",p=o==="/"?f:f.slice(o.length)||"/",h=Ie(e,{pathname:p}),y=yt(h&&h.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:b([o,v.pathname]),pathnameBase:v.pathnameBase==="/"?o:b([o,v.pathnameBase])})),n,r||void 0);return t?m(w.Provider,{value:{location:G({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:C.Pop},children:y}):y}i(pt,"useRoutes");function mt(){let e=xt(),t=Xe(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},s={padding:"2px 4px",backgroundColor:n};return F(se,{children:[m("h2",{children:"Unhandled Thrown Error!"}),m("h3",{style:{fontStyle:"italic"},children:t}),r?m("pre",{style:a,children:r}):null,m("p",{children:"\u{1F4BF} Hey developer \u{1F44B}"}),F("p",{children:["You can provide a way better UX than this when your app throws errors by providing your own\xA0",m("code",{style:s,children:"errorElement"})," props on\xA0",m("code",{style:s,children:"<Route>"})]})]})}i(mt,"DefaultErrorElement");class xe extends c.exports.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location?{error:t.error,location:t.location}:{error:t.error||r.error,location:r.location}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?m(me.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}i(xe,"RenderErrorBoundary");function vt(e){let{routeContext:t,match:r,children:n}=e,a=c.exports.useContext(ut);return a&&r.route.errorElement&&(a._deepestRenderedBoundaryId=r.route.id),m(R.Provider,{value:t,children:n})}i(vt,"RenderedRoute");function yt(e,t,r){if(t===void 0&&(t=[]),e==null)if(r!=null&&r.errors)e=r.matches;else return null;let n=e,a=r==null?void 0:r.errors;if(a!=null){let s=n.findIndex(o=>o.route.id&&(a==null?void 0:a[o.route.id]));s>=0||g(!1),n=n.slice(0,Math.min(n.length,s+1))}return n.reduceRight((s,o,l)=>{let u=o.route.id?a==null?void 0:a[o.route.id]:null,d=r?o.route.errorElement||m(mt,{}):null,f=i(()=>m(vt,{match:o,routeContext:{outlet:s,matches:t.concat(n.slice(0,l+1))},children:u?d:o.route.element!==void 0?o.route.element:s}),"getChildren");return r&&(o.route.errorElement||l===0)?m(xe,{location:r.location,component:d,error:u,children:f()}):f()},null)}i(yt,"_renderMatches");var ee;(function(e){e.UseRevalidator="useRevalidator"})(ee||(ee={}));var J;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(J||(J={}));function gt(e){let t=c.exports.useContext(pe);return t||g(!1),t}i(gt,"useDataRouterState");function xt(){var e;let t=c.exports.useContext(me),r=gt(J.UseRouteError),n=c.exports.useContext(R),a=n.matches[n.matches.length-1];return t||(n||g(!1),a.route.id||g(!1),(e=r.errors)==null?void 0:e[a.route.id])}i(xt,"useRouteError");function St(e){let{basename:t,children:r,initialEntries:n,initialIndex:a}=e,s=c.exports.useRef();s.current==null&&(s.current=Te({initialEntries:n,initialIndex:a,v5Compat:!0}));let o=s.current,[l,u]=c.exports.useState({action:o.action,location:o.location});return c.exports.useLayoutEffect(()=>o.listen(u),[o]),m(Ct,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:o})}i(St,"MemoryRouter");function K(e){g(!1)}i(K,"Route");function Ct(e){let{basename:t="/",children:r=null,location:n,navigationType:a=C.Pop,navigator:s,static:o=!1}=e;A()&&g(!1);let l=t.replace(/^\/*/,"/"),u=c.exports.useMemo(()=>({basename:l,navigator:s,static:o}),[l,s,o]);typeof n=="string"&&(n=T(n));let{pathname:d="/",search:f="",hash:p="",state:h=null,key:y="default"}=n,v=c.exports.useMemo(()=>{let x=ce(d,l);return x==null?null:{pathname:x,search:f,hash:p,state:h,key:y}},[l,d,f,p,h,y]);return v==null?null:m(z.Provider,{value:u,children:m(w.Provider,{children:r,value:{location:v,navigationType:a}})})}i(Ct,"Router");function bt(e){let{children:t,location:r}=e,n=c.exports.useContext(ct),a=n&&!t?n.router.routes:Y(t);return pt(a,r)}i(bt,"Routes");var te;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(te||(te={}));new Promise(()=>{});function Y(e,t){t===void 0&&(t=[]);let r=[];return c.exports.Children.forEach(e,(n,a)=>{if(!c.exports.isValidElement(n))return;if(n.type===c.exports.Fragment){r.push.apply(r,Y(n.props.children,t));return}n.type!==K&&g(!1),!n.props.index||!n.props.children||g(!1);let s=[...t,a],o={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,hasErrorBoundary:n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle};n.props.children&&(o.children=Y(n.props.children,s)),r.push(o)}),r}i(Y,"createRoutesFromChildren");/**
* React Router DOM v6.4.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Rt(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,s;for(s=0;s<n.length;s++)a=n[s],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}i(Rt,"_objectWithoutPropertiesLoose");function Pt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}i(Pt,"isModifiedEvent");function _t(e,t){return e.button===0&&(!t||t==="_self")&&!Pt(e)}i(_t,"shouldProcessLinkClick");function q(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}i(q,"createSearchParams");function Et(e,t){let r=q(e);for(let n of t.keys())r.has(n)||t.getAll(n).forEach(a=>{r.append(n,a)});return r}i(Et,"getSearchParamsForLocation");const Tt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],wt=c.exports.forwardRef(i(function(t,r){let{onClick:n,relative:a,reloadDocument:s,replace:o,state:l,target:u,to:d,preventScrollReset:f}=t,p=Rt(t,Tt),h=ft(d,{relative:a}),y=At(d,{replace:o,state:l,target:u,preventScrollReset:f,relative:a});function v(x){n&&n(x),x.defaultPrevented||y(x)}return i(v,"handleClick"),m("a",{...p,href:h,onClick:s?n:v,ref:r,target:u})},"LinkWithRef"));var re;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(re||(re={}));var ne;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ne||(ne={}));function At(e,t){let{target:r,replace:n,state:a,preventScrollReset:s,relative:o}=t===void 0?{}:t,l=ye(),u=P(),d=ge(e,{relative:o});return c.exports.useCallback(f=>{if(_t(f,r)){f.preventDefault();let p=n!==void 0?n:H(u)===H(d);l(e,{replace:p,state:a,preventScrollReset:s,relative:o})}},[u,l,d,n,a,r,e,s,o])}i(At,"useLinkClickHandler");function Ot(e){let t=c.exports.useRef(q(e)),r=P(),n=c.exports.useMemo(()=>Et(r.search,t.current),[r.search]),a=ye(),s=c.exports.useCallback((o,l)=>{const u=q(typeof o=="function"?o(n):o);a("?"+u,l)},[a,n]);return[n,s]}i(Ot,"useSearchParams");var k="storybook/react-router-v6",It="reactRouter",S={CLEAR:"".concat(k,"/clear"),NAVIGATION:"".concat(k,"/navigation"),STORY_LOADED:"".concat(k,"/story-loaded"),ROUTE_MATCHES:"".concat(k,"/route-matches")},Lt=i(function(){var t=P();return"".concat(t.pathname).concat(t.search).concat(t.hash)},"useCurrentUrl"),Se=le.createContext([]),Ce=i(function(){return le.useContext(Se)},"useDeepRouteMatches");function kt(e,t){return Ut(e)||$t(e,t)||Dt(e,t)||Mt()}i(kt,"_slicedToArray$2");function Mt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}i(Mt,"_nonIterableRest$2");function Dt(e,t){if(!!e){if(typeof e=="string")return ae(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ae(e,t)}}i(Dt,"_unsupportedIterableToArray$2");function ae(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}i(ae,"_arrayLikeToArray$2");function $t(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],a=!0,s=!1,o,l;try{for(r=r.call(e);!(a=(o=r.next()).done)&&(n.push(o.value),!(t&&n.length===t));a=!0);}catch(u){s=!0,l=u}finally{try{!a&&r.return!=null&&r.return()}finally{if(s)throw l}}return n}}i($t,"_iterableToArrayLimit$2");function Ut(e){if(Array.isArray(e))return e}i(Ut,"_arrayWithHoles$2");var jt=i(function(){var t=P(),r=dt(),n=Ot(),a=kt(n,1),s=a[0],o=ht(),l=Ce(),u={};s.forEach(function(p,h){u[h]=p});var d=Lt(),f=l.map(function(p){return[p.route.path,p.params]});return function(p){switch(p){case S.STORY_LOADED:{var h={url:d,path:t.pathname,routeParams:r,searchParams:u,routeMatches:f,hash:t.hash,routeState:t.state};return{key:t.key,type:S.STORY_LOADED,data:h}}case S.NAVIGATION:{var y={url:d,path:t.pathname,routeParams:r,searchParams:u,hash:t.hash,routeState:t.state,routeMatches:f,navigationType:o};return{key:t.key,type:S.NAVIGATION,data:y}}case S.ROUTE_MATCHES:return{key:"matches-".concat(t.key,"-").concat(f.length),type:S.ROUTE_MATCHES,data:{matches:f}}}}},"useRouterEvent");function Nt(){var e={};return e.promise=new Promise(function(t,r){e.resolve=t,e.reject=r}),e}i(Nt,"defer");function V(e,t){return Ft(e)||Wt(e,t)||Vt(e,t)||Bt()}i(V,"_slicedToArray$1");function Bt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}i(Bt,"_nonIterableRest$1");function Vt(e,t){if(!!e){if(typeof e=="string")return oe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return oe(e,t)}}i(Vt,"_unsupportedIterableToArray$1");function oe(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}i(oe,"_arrayLikeToArray$1");function Wt(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],a=!0,s=!1,o,l;try{for(r=r.call(e);!(a=(o=r.next()).done)&&(n.push(o.value),!(t&&n.length===t));a=!0);}catch(u){s=!0,l=u}finally{try{!a&&r.return!=null&&r.return()}finally{if(s)throw l}}return n}}i(Wt,"_iterableToArrayLimit$1");function Ft(e){if(Array.isArray(e))return e}i(Ft,"_arrayWithHoles$1");var Ht=i(function(t){var r=t.children,n=Pe.getChannel(),a=P(),s=c.exports.useState(),o=V(s,2),l=o[0],u=o[1],d=c.exports.useState(!1),f=V(d,2),p=f[0],h=f[1],y=c.exports.useState([]),v=V(y,2),x=v[0],O=v[1],_=jt(),E=Ce(),I=c.exports.useRef(Nt());return c.exports.useLayoutEffect(function(){u(a)}),c.exports.useEffect(function(){p&&I.current.resolve()},[p]),c.exports.useEffect(function(){O(E);var L=setTimeout(function(){p||(h(!0),n.emit(S.STORY_LOADED,_(S.STORY_LOADED)))},0);return function(){return clearTimeout(L)}},[p,E]),c.exports.useEffect(function(){l!==void 0&&l.key!==a.key&&I.current.promise.then(function(){n.emit(S.NAVIGATION,_(S.NAVIGATION))})},[a]),c.exports.useEffect(function(){p&&E.length>x.length&&(O(E),n.emit(S.ROUTE_MATCHES,_(S.ROUTE_MATCHES)))},[E]),m(se,{children:r})},"RouterLogger");function Gt(e,t){return qt(e)||Yt(e,t)||Kt(e,t)||Jt()}i(Gt,"_slicedToArray");function Jt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}i(Jt,"_nonIterableRest");function Kt(e,t){if(!!e){if(typeof e=="string")return ie(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ie(e,t)}}i(Kt,"_unsupportedIterableToArray");function ie(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}i(ie,"_arrayLikeToArray");function Yt(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],a=!0,s=!1,o,l;try{for(r=r.call(e);!(a=(o=r.next()).done)&&(n.push(o.value),!(t&&n.length===t));a=!0);}catch(u){s=!0,l=u}finally{try{!a&&r.return!=null&&r.return()}finally{if(s)throw l}}return n}}i(Yt,"_iterableToArrayLimit");function qt(e){if(Array.isArray(e))return e}i(qt,"_arrayWithHoles");var zt=i(function(t){var r,n=t.children,a=t.browserPath,s=t.routePath,o=t.routeParams,l=t.searchParams,u=t.routeState,d=t.outlet,f=We(s,o),p=new URLSearchParams(l).toString(),h=p.length>0?"?".concat(p):"",y=c.exports.useState([]),v=Gt(y,2),x=v[0],O=v[1];R.Provider._context=new Proxy((r=R.Provider._context)!==null&&r!==void 0?r:{},{set:i(function(I,L,j){return L==="_currentValue"&&O(function(X){return j.matches.length>X.length?j.matches:X}),Reflect.set(I,L,j)},"set")});var _={search:h,state:u};return a!==void 0&&(_.pathname=a),a===void 0&&f!==""&&(_.pathname=f),m(Se.Provider,{value:x,children:m(St,{initialEntries:[_],children:m(bt,{children:m(K,{path:s,element:m(Ht,{children:n}),children:d&&m(K,{index:!0,element:d})})})})})},"StoryRouter");function U(e){return U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},U(e)}i(U,"_typeof");var Xt=_e({name:"withRouter",parameterName:It,wrapper:i(function(t,r,n){var a=n.parameters,s=a===void 0?{}:a,o=s.routePath,l=o===void 0?"*":o,u=s.routeParams,d=s.routeState,f=s.searchParams,p=s.outlet,h=s.browserPath;if(typeof l!="string")throw new Error("React Router decorator : `path` must be a string");if(u!==void 0&&U(u)!=="object")throw new Error("React Router decorator : `params` must be an object with strings as values");if(f!==void 0&&U(f)!=="object")throw new Error("React Router decorator : `search` must be an object with strings as values");return m(zt,{browserPath:h,routePath:l,routeParams:u,searchParams:f,routeState:d,outlet:p,children:t(r)})},"wrapper")});module&&module.hot&&module.hot.decline&&module.hot.decline();const Qt="_tile_1c4l6_1",Zt="_background_1c4l6_12",er="_textContainer_1c4l6_40",tr="_iconContainer_1c4l6_46",M={tile:Qt,background:Zt,textContainer:er,iconContainer:tr},D=i(({text:e,icon:t,linkTo:r,onClick:n})=>F(wt,{to:r,onClick:n,className:M.tile,children:[m("div",{className:M.background}),m("span",{className:M.iconContainer,children:m(t,{})}),m("span",{className:M.textContainer,children:e})]}),"Tile"),be=D;try{D.displayName="Tile",D.__docgenInfo={description:"",displayName:"Tile",props:{text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"FunctionComponent<Component<SVGProps<SVGSVGElement>>> & { title?: string | undefined; }"}},linkTo:{defaultValue:null,description:"",name:"linkTo",required:!0,type:{name:"string"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => unknown)"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/tile/Tile.tsx#Tile"]={docgenInfo:D.__docgenInfo,name:"Tile",path:"src/components/tile/Tile.tsx#Tile"})}catch{}const ur={parameters:{storySource:{source:`import React from "react";
import { withRouter } from "storybook-addon-react-router-v6";
// @ts-ignore
import { ReactComponent as Icon } from "../assets/search.svg";
import { ComponentStory, ComponentMeta } from "@storybook/react";
import Tile from "../components/tile";
import { Link } from "react-router-dom";
export default { title: "Tile", component: Tile, decorators: [withRouter] } as ComponentMeta<typeof Tile>;
const Template: ComponentStory<typeof Tile> = (args) => <Tile {...args} />;
export const defaultTile = Template.bind({});
defaultTile.args = {
icon: Icon,
};
`,locationsMap:{"default-tile":{startLoc:{col:46,line:13},endLoc:{col:74,line:13},startBody:{col:46,line:13},endBody:{col:74,line:13}}}}},title:"Tile",component:be,decorators:[Xt]},rr=i(e=>m(be,{...e}),"Template"),nr=rr.bind({});nr.args={icon:Ee};const cr=["defaultTile"];export{cr as __namedExportsOrder,ur as default,nr as defaultTile};
//# sourceMappingURL=Tile.stories.761d4b91.js.map