construct-hub-webapp 0.1.417 → 0.1.421

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/build/asset-manifest.json +40 -40
  2. package/build/assets/aqua-security.png +0 -0
  3. package/build/index.html +1 -1
  4. package/build/static/js/{0.75bd4211.chunk.js → 0.a7f674ff.chunk.js} +2 -2
  5. package/build/static/js/{0.75bd4211.chunk.js.map → 0.a7f674ff.chunk.js.map} +1 -1
  6. package/build/static/js/{1.de94dd4f.chunk.js → 1.f35221e2.chunk.js} +2 -2
  7. package/build/static/js/{1.de94dd4f.chunk.js.map → 1.f35221e2.chunk.js.map} +1 -1
  8. package/build/static/js/{10.63153bb8.chunk.js → 10.e8feffee.chunk.js} +2 -2
  9. package/build/static/js/{10.63153bb8.chunk.js.map → 10.e8feffee.chunk.js.map} +1 -1
  10. package/build/static/js/{11.95a7aff0.chunk.js → 11.51c51646.chunk.js} +2 -2
  11. package/build/static/js/{11.95a7aff0.chunk.js.map → 11.51c51646.chunk.js.map} +1 -1
  12. package/build/static/js/{12.755ea3fc.chunk.js → 12.879c4879.chunk.js} +2 -2
  13. package/build/static/js/{12.755ea3fc.chunk.js.map → 12.879c4879.chunk.js.map} +1 -1
  14. package/build/static/js/{13.d3fce156.chunk.js → 13.20edf1b3.chunk.js} +2 -2
  15. package/build/static/js/{13.d3fce156.chunk.js.map → 13.20edf1b3.chunk.js.map} +1 -1
  16. package/build/static/js/{14.e783508a.chunk.js → 14.d459baf5.chunk.js} +2 -2
  17. package/build/static/js/{14.e783508a.chunk.js.map → 14.d459baf5.chunk.js.map} +1 -1
  18. package/build/static/js/{15.06217ace.chunk.js → 15.6f08c52f.chunk.js} +3 -3
  19. package/build/static/js/{15.06217ace.chunk.js.LICENSE.txt → 15.6f08c52f.chunk.js.LICENSE.txt} +0 -0
  20. package/build/static/js/{15.06217ace.chunk.js.map → 15.6f08c52f.chunk.js.map} +1 -1
  21. package/build/static/js/{16.0b2ec5e5.chunk.js → 16.66f7ddc4.chunk.js} +2 -2
  22. package/build/static/js/{16.0b2ec5e5.chunk.js.map → 16.66f7ddc4.chunk.js.map} +1 -1
  23. package/build/static/js/{4.91a3f4bb.chunk.js → 4.9379ee71.chunk.js} +3 -3
  24. package/build/static/js/{4.91a3f4bb.chunk.js.LICENSE.txt → 4.9379ee71.chunk.js.LICENSE.txt} +0 -0
  25. package/build/static/js/{4.91a3f4bb.chunk.js.map → 4.9379ee71.chunk.js.map} +1 -1
  26. package/build/static/js/5.6ed86964.chunk.js +3 -0
  27. package/build/static/js/{5.fb19ba3d.chunk.js.LICENSE.txt → 5.6ed86964.chunk.js.LICENSE.txt} +0 -0
  28. package/build/static/js/{5.fb19ba3d.chunk.js.map → 5.6ed86964.chunk.js.map} +1 -1
  29. package/build/static/js/6.9f0ede0f.chunk.js +2 -0
  30. package/build/static/js/6.9f0ede0f.chunk.js.map +1 -0
  31. package/build/static/js/{7.f1806927.chunk.js → 7.2f43fb75.chunk.js} +2 -2
  32. package/build/static/js/{7.f1806927.chunk.js.map → 7.2f43fb75.chunk.js.map} +1 -1
  33. package/build/static/js/{8.73c2c7f3.chunk.js → 8.bda93301.chunk.js} +2 -2
  34. package/build/static/js/{8.73c2c7f3.chunk.js.map → 8.bda93301.chunk.js.map} +1 -1
  35. package/build/static/js/{9.8b744886.chunk.js → 9.8f5f5f7a.chunk.js} +2 -2
  36. package/build/static/js/{9.8b744886.chunk.js.map → 9.8f5f5f7a.chunk.js.map} +1 -1
  37. package/build/static/js/main.1a510fce.chunk.js +2 -0
  38. package/build/static/js/main.1a510fce.chunk.js.map +1 -0
  39. package/build/static/js/runtime-main.f8dbedfa.js +2 -0
  40. package/build/static/js/{runtime-main.b8868b3c.js.map → runtime-main.f8dbedfa.js.map} +1 -1
  41. package/cypress/integration/home.spec.ts +2 -2
  42. package/package.json +1 -1
  43. package/build/static/js/5.fb19ba3d.chunk.js +0 -3
  44. package/build/static/js/6.ca3456ca.chunk.js +0 -2
  45. package/build/static/js/6.ca3456ca.chunk.js.map +0 -1
  46. package/build/static/js/main.40e21094.chunk.js +0 -2
  47. package/build/static/js/main.40e21094.chunk.js.map +0 -1
  48. package/build/static/js/runtime-main.b8868b3c.js +0 -2
@@ -1,2 +1,2 @@
1
- (this["webpackJsonpconstruct-hub-webapp"]=this["webpackJsonpconstruct-hub-webapp"]||[]).push([[8],{246:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(0),c=n(263),r={contribute:{event:{name:"Contribute Load"}},home:{event:{name:"Home Load"}},faq:{event:{name:"Frequently Asked Questions Load"}},packageProfile:{event:{name:"Package Profile Load"}},search:{event:{name:"Search Load"}},siteTerms:{event:{name:"Site Terms Load"}},notFound:{page:{pageType:"errorPage"},event:{name:"404 Page Load"}}},i=n(122),o=n(1),s=function(e){var t=e.children,n=e.meta,s=e.pageName,l=Object(i.b)(r[s]);Object(a.useEffect)((function(){l()}),[l]);var u=n.suffix,d=void 0===u||u,j=n.title,b=n.description,f=d?"".concat(j," - Construct Hub"):j;return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsxs)(c.a,{children:[!1,Object(o.jsx)("meta",{content:"width=device-width, initial-scale=1",name:"viewport"}),Object(o.jsx)("meta",{charSet:"utf-8"}),Object(o.jsx)("title",{children:f}),Object(o.jsx)("meta",{content:f,property:"og:title"}),Object(o.jsx)("meta",{content:f,name:"twitter:title"}),Object(o.jsx)("meta",{content:"summary",name:"twitter:card"}),Object(o.jsx)("meta",{content:b,name:"description"}),Object(o.jsx)("meta",{content:b,property:"og:description"}),Object(o.jsx)("meta",{content:b,name:"twitter:description"})]}),t]})}},256:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var a=n(6),c=n(14),r=n(126),i=function(e){return!e||e.length<1?[]:e.reduce((function(e,t){return t.highlight?[].concat(Object(c.a)(e),[t.highlight]):e}),[])},o=function(e){for(var t=e.packageTags,n=e.keywords,i=new Array,o=new Set,s=0,l=[].concat(Object(c.a)(function(e){return(null!==e&&void 0!==e?e:[]).filter((function(e){var t;return Boolean(null===(t=e.keyword)||void 0===t?void 0:t.label)})).map((function(e){var t;return Object(a.a)(Object(a.a)({},e),{},{id:null===(t=e.keyword)||void 0===t?void 0:t.label})}))}(t)),Object(c.a)(function(e){return!e||e.length<1?[]:e.filter((function(e){return Boolean(e)&&!r.a.has(e)})).map((function(e){return{id:e,keyword:{label:e}}}))}(n)));s<l.length;s++){var u=l[s],d=u.keyword.label.toLowerCase();o.has(d)||(i.push(u),o.add(d))}return i}},262:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(0),c=n(22),r=function(){var e=Object(c.h)().search;return Object(a.useMemo)((function(){return new URLSearchParams(e)}),[e])}},269:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(74),c=function(e){var t=Object(a.b)().data;return(null!==t&&void 0!==t?t:{})[e]}},270:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var a=n(5),c=n(0),r=n(22),i=n(121),o=n(13),s=n(262),l=i.d.TypeScript,u="preferred-language",d=function(e){return null!=e&&i.e.has(e)},j=function(e){if(d(e))return e;try{var t,n=null!==(t=localStorage.getItem(u))&&void 0!==t?t:"";if(d(n))return n}catch(a){}return l},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.updateUrl,n=e.updateSaved,i=Object(r.h)(),l=i.pathname,b=i.hash,f=Object(r.g)(),O=f.replace,h=Object(s.a)(),g=h.get(o.b.LANGUAGE),m=Object(c.useState)((function(){return j(g)})),v=Object(a.a)(m,2),x=v[0],p=v[1];Object(c.useEffect)((function(){d(g)&&g!==x&&p(g)}),[g]),Object(c.useEffect)((function(){g!==x&&t&&(h.set(o.b.LANGUAGE,x),O({pathname:l,hash:b,search:h.toString()}))}),[x,t]);var y=Object(c.useCallback)((function(e){if(p(e),n)try{localStorage.setItem(u,e)}catch(t){}}),[n]);return Object(c.useMemo)((function(){return[x,y]}),[x,y])}},281:function(e,t,n){"use strict";var a;n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return H})),function(e){e.Wide="wide"}(a||(a={}));var c=n(0),r=n(390),i=n(153),o=n(213),s=n(236),l=n(231),u=n(207),d=n(636),j=n(91),b=n(89),f=n(49),O=n(282),h=n(63),g=Object(h.a)("packageCard",["author","description","downloads","languages","published","title","version","comment","wideContainer"]),m=n(1),v=function(e){var t=e["data-testid"],n=e.tooltip,a=e.value;return Object(m.jsx)(l.a,{hasArrow:!0,isDisabled:!n,label:n,placement:"left",children:Object(m.jsx)(u.a,{"data-testid":t,fontSize:"xs",zIndex:1,children:a})})},x=function(){var e,t,n,a=U(),c=a.author,r=a.metadata.date,i=a.name,o=Object(j.b)().data,s=null===o||void 0===o||null===(e=o.packages)||void 0===e||null===(t=e[i])||void 0===t||null===(n=t.downloads)||void 0===n?void 0:n.npm,l="string"===typeof c?c:c.name,u=new Date(r);return Object(m.jsxs)(m.Fragment,{children:[void 0!==s&&Object(m.jsx)(v,{"data-testid":g.downloads,tooltip:"Download numbers are periodically sourced from the NPM registry",value:"".concat(s.toLocaleString()," weekly downloads")}),Object(m.jsx)(v,{"data-testid":g.published,value:Object(m.jsx)(O.a,{date:u,fontSize:"xs",formattedDate:Object(d.a)(u,{addSuffix:!0})})}),Object(m.jsx)(v,{"data-testid":g.author,value:Object(m.jsxs)(m.Fragment,{children:["By"," ",Object(m.jsx)(f.a,{color:"blue.500",to:Object(b.c)({query:l}),children:l})]})})]})},p=n(5),y=n(223),w=n(34),k=n(270),C=n(128),S=function(e){var t=e.comment;return Object(m.jsxs)(u.a,{"data-testid":g.comment,fontSize:"md",lineHeight:"tall",noOfLines:4,children:[Object(m.jsxs)(u.a,{as:"span",color:"blue.500",fontWeight:"bold",children:["Editor's note:"," "]}),t]})},D=function(){var e=Object(k.a)(),t=Object(p.a)(e,1)[0],n=U(),a=n.description,c=n.comment,i=n.metadata.constructFramework,s=n.name,l=n.version,d=null===i||void 0===i?void 0:i.name,j=null===i||void 0===i?void 0:i.majorVersion;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(r.b,{as:w.b,to:Object(b.a)({name:s,version:l,language:t}),children:Object(m.jsxs)(o.a,{align:"center",children:[Object(m.jsx)(C.a,{majorVersion:j,mr:2,name:d}),Object(m.jsx)(y.a,{as:"h3",color:"blue.800","data-testid":g.title,fontSize:"md",fontWeight:"bold",wordBreak:"normal",children:s})]})}),c?Object(m.jsx)(S,{comment:c}):Object(m.jsx)(u.a,{color:"blue.800","data-testid":g.description,fontSize:"md",lineHeight:"tall",noOfLines:4,children:a||"No description available."})]})},T=n(6),P=n(203),F=n(256),A=n(283),I=function(){var e,t,n=(null!==(e=null===(t=U())||void 0===t?void 0:t.metadata)&&void 0!==e?e:{}).packageTags,a=void 0===n?[]:n,c=Object(F.a)(a),r=Object(p.a)(c,1)[0];return Object(m.jsx)(P.a,{fontSize:"xs",children:Object(m.jsx)(A.a,Object(T.a)({},r))})},L=n(121),E=n(285),R={sm:5,md:6,lg:8},K=function(e){var t=e.isRounded,n=void 0!==t&&t,a=e.languages,c=e.name,r=e.size,i=void 0===r?"md":r,o=e.version,s=Object.keys(null!==a&&void 0!==a?a:{});return Object(m.jsx)(m.Fragment,{children:Object.entries(L.c).sort((function(e,t){var n=Object(p.a)(e,1)[0],a=Object(p.a)(t,1)[0];return L.a.indexOf(n)-L.a.indexOf(a)})).map((function(e){var t=Object(p.a)(e,2),a=t[0],r=t[1],l=a,u=l===L.d.TypeScript||s.includes(l),d=l===L.d.TypeScript||L.e.has(l);if(!u)return null;var j=r.name,f=r.icon,O=Object(m.jsx)(f,{"aria-label":"Supports ".concat(j),borderRadius:n?"50%":0,h:R[i],opacity:d?1:.2,w:R[i]});return Object(m.jsx)(E.a,{language:l,children:d?Object(m.jsx)(w.b,{"aria-label":"View package docs for ".concat(l),to:Object(b.a)({name:c,version:o,language:l}),children:O}):O},l)}))})},W=function(){var e=U();return Object(m.jsx)(K,Object(T.a)(Object(T.a)({},e),{},{size:"sm"}))},z=n(284),M=function(){var e=U(),t=e.keywords,n=void 0===t?[]:t,a=e.metadata.packageTags,c=void 0===a?[]:a,r=Object(F.b)({packageTags:c,keywords:n});return Object(m.jsx)(m.Fragment,{children:r.slice(0,10).map((function(e){var t=e.id,n=e.keyword,a=(n=void 0===n?{}:n).label,c=n.color;return Object(m.jsx)(z.a,{value:t,variant:c,children:a},t)}))})},V=function(){return Object(m.jsx)(r.a,{_hover:{"> article":{bg:"gray.50"}},children:Object(m.jsxs)(i.a,{as:"article",bg:"white",border:"base",borderRadius:"sm",boxShadow:"base",color:"blue.800","data-testid":g.wideContainer,h:"full",minH:"12.5rem",templateColumns:{base:"1fr",lg:"1fr 14rem"},w:"full",children:[Object(m.jsxs)(o.a,{direction:"column",justify:"space-between",p:5,sx:{gap:"0.5rem"},children:[Object(m.jsx)(s.a,{spacing:3,children:Object(m.jsx)(D,{})}),Object(m.jsx)(o.a,{align:"center",sx:{gap:"0.5rem"},wrap:"wrap",children:Object(m.jsx)(M,{})})]}),Object(m.jsxs)(o.a,{align:{base:"end",lg:"initial"},borderLeft:{lg:"base"},borderTop:{base:"base",lg:"none"},direction:{base:"row",lg:"column"},justify:"space-between",p:5,sx:{gap:"0.5rem"},children:[Object(m.jsxs)(s.a,{spacing:1,children:[Object(m.jsx)(I,{}),Object(m.jsx)(s.a,{spacing:1,children:Object(m.jsx)(x,{})})]}),Object(m.jsx)(s.a,{"data-testid":g.languages,direction:"row",spacing:2,children:Object(m.jsx)(W,{})})]})]})})},N=Object(c.createContext)(null),U=function(){return Object(c.useContext)(N)},H=function(e){var t=e.pkg,n=e.variant,c=void 0===n?a.Wide:n;return Object(m.jsx)(N.Provider,{value:t,children:c===a.Wide&&Object(m.jsx)(V,{})})}},282:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var a=n(6),c=n(24),r=n(17),i=n(203),o=n(648),s=n(1),l=["date","format","formattedDate"],u=Object(r.a)((function(e,t){var n=e.date,r=e.format,u=e.formattedDate,d=Object(c.a)(e,l);return Object(s.jsx)(i.a,Object(a.a)(Object(a.a)({as:"time",dateTime:n.toISOString(),ref:t},d),{},{children:null!==u&&void 0!==u?u:Object(o.a)(n,null!==r&&void 0!==r?r:"")}))}));u.displayName="Time"},283:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var a=n(236),c=n(235),r=n(207),i=n(1),o=function(e){var t=e.label,n=e.color,o=e.icon;return Object(i.jsxs)(a.a,{align:"center",direction:"row",spacing:2,children:[Object(i.jsx)(c.a,{alt:"".concat(t," icon"),src:o,w:4}),Object(i.jsx)(r.a,{color:n,fontWeight:"bold",children:t})]})}},284:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var a=n(6),c=n(24),r=n(640),i=n(89),o=n(49),s=n(1),l=["children","value","label","zIndex"],u=function(e){var t=e.children,n=e.value,u=e.label,d=void 0===u?n:u,j=e.zIndex,b=Object(c.a)(e,l);return Object(s.jsx)(o.a,{"aria-label":"Tag: ".concat(d),to:Object(i.c)({keywords:[n]}),zIndex:j,children:Object(s.jsx)(r.a,Object(a.a)(Object(a.a)({_hover:{textDecoration:"underline"}},b),{},{children:Object(s.jsx)(r.b,{children:t})}))})}},285:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(231),c=n(121),r=n(1),i=function(e){var t=e.children,n=e.language,i=c.e.has(n),o=c.b[n],s=i?"Click to view documentation in ".concat(o):"Documentation support for ".concat(o," is coming soon!");return Object(r.jsx)(a.a,{hasArrow:!0,label:s,placement:"top-start",children:Object(r.jsx)("span",{children:t})})}},647:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return Ce}));var a,c=n(153),r=n(246),i=n(236),o=n(223),s=n(94),l=n(14),u=n(4),d=n(6),j=n(5),b=n(0),f=n(48),O=n(90),h=n(388),g=n(654),m=n(207),v=n(30),x=n(213),p=n(650),y=n(1),w=function(e){var t=e.name,n=e.hint;return Object(y.jsxs)(x.a,{align:"center",mb:1,children:[Object(y.jsx)(o.a,{as:"h4",size:"sm",w:"max-content",children:t}),n?Object(y.jsxs)(p.a,{colorScheme:"dark",placement:"right",strategy:"fixed",children:[Object(y.jsx)(p.e,{children:Object(y.jsx)(x.a,{"aria-label":"Hint: ".concat(t),as:"button",ml:2,children:Object(y.jsx)(v.n,{h:3.5,w:3.5})})}),Object(y.jsxs)(p.d,{bg:"gray.700",borderRadius:"base",color:"white",fontSize:"sm",shadow:"whiteAlpha.300",children:[Object(y.jsx)(p.b,{bg:"gray.700"}),Object(y.jsx)(p.c,{children:Object(y.jsx)(m.a,{children:n})})]})]}):null]})},k=n(63),C=Object(k.a)("searchRedesign",["page","searchDetails","nextPage","prevPage","goToPage","sortButton","sortDropdown","sortItem","filtersPanel","cdkTypeFilter","cdkVersionFilter","filterItem","languagesFilter"]),S=function(e){var t=e["data-testid"],n=e.value,a=e.onValueChange,c=e.options,r=e.name,o=e.hint;return Object(y.jsxs)(i.a,{"data-testid":t,spacing:1,children:[Object(y.jsx)(w,{hint:o,name:r}),Object(y.jsx)(h.a,{onChange:a,value:n,children:Object(y.jsx)(i.a,{spacing:1,children:c.map((function(e){var t=e.display,n=e.value;return Object(y.jsx)(g.a,{value:n,children:Object(y.jsx)(m.a,{color:"gray.600","data-testid":C.filterItem,"data-value":n,isTruncated:!0,children:t})},n)}))})})]})},D=n(13),T=n(95),P=n(262),F=n(59),A=(a={},Object(u.a)(a,F.a.NameAsc,"A-Z"),Object(u.a)(a,F.a.NameDesc,"Z-A"),Object(u.a)(a,F.a.PublishDateAsc,"Oldest first"),Object(u.a)(a,F.a.PublishDateDesc,"Newest first"),Object(u.a)(a,F.a.DownloadsDesc,"Most downloads"),Object(u.a)(a,F.a.DownloadsAsc,"Least downloads"),a),I=function(e){var t=parseInt(e);return"NaN"==="".concat(t)?0:t},L=function(e){return e?decodeURIComponent(e).split(","):[]},E=Object(b.createContext)(void 0),R=function(){var e=Object(b.useContext)(E);if(!e)throw new Error("This hook must be called in a child of <SearchStateProvider />");return e},K=function(e){var t,n,a,c,r=e.children,i=Object(P.a)(),o=I(null!==(t=i.get(D.b.OFFSET))&&void 0!==t?t:"0"),s=decodeURIComponent(null!==(n=i.get(D.b.SEARCH_QUERY))&&void 0!==n?n:""),l=L(i.get(D.b.LANGUAGES)),u=i.get(D.b.TAGS),d=Object(b.useMemo)((function(){return L(u)}),[u]),j=i.get(D.b.KEYWORDS),f=Object(b.useMemo)((function(){return L(j)}),[j]),O=null!==(a=i.get(D.b.SORT))&&void 0!==a?a:void 0,h=null!==(c=i.get(D.b.CDK_TYPE))&&void 0!==c?c:void 0,g=i.get(D.b.CDK_MAJOR),m=g?I(g):void 0,v=Object(T.a)({defaultCdkMajor:m,defaultCdkType:h,defaultKeywords:f,defaultLanguages:l,defaultQuery:s,defaultSort:O,defaultTags:d});return Object(b.useEffect)((function(){s!==v.query&&v.setQuery(s)}),[s]),Object(b.useEffect)((function(){f.some((function(e){return!v.keywords.includes(e)}))&&v.setKeywords(f)}),[f]),Object(b.useEffect)((function(){d.some((function(e){return!v.tags.includes(e)}))&&v.setTags(d)}),[d]),Object(y.jsx)(E.Provider,{value:{limit:25,offset:o,query:s,searchAPI:v},children:r})},W=function(){var e,t=R().searchAPI,n=t.cdkType,a=t.setCdkType,c=t.cdkMajor,r=t.setCdkMajor,i=Object(O.b)(),o=Object(b.useMemo)((function(){var e=i.constructFrameworks,t=Object.entries(e).reduce((function(e,t){var n=Object(j.a)(t,2),a=n[0],c=n[1];return c.pkgCount<1?e:Object(d.a)(Object(d.a)({},e),{},Object(u.a)({},a,Object(d.a)({display:f.a[a],value:a},c)))}),{});return Object.keys(t).length?t:void 0}),[i]),s=Object(b.useMemo)((function(){var e;if(o&&n){var t=null===(e=o[n])||void 0===e?void 0:e.majorVersions;if(t)return Object(l.a)(t).sort((function(e,t){return e-t})).map((function(e){return{value:e.toString(),display:"".concat(f.a[n]," v").concat(e)}}))}}),[o,n]);if(!o)return null;return Object(y.jsxs)(y.Fragment,{children:[Object(y.jsx)(S,{"data-testid":C.cdkTypeFilter,hint:"Choose the right CDK for your IaC technology: AWS CDK for AWS CloudFormation, CDKtf for Terraform, or CDK8s for Kubernetes.",name:"CDK Type",onValueChange:function(e){var t=e;r(void 0),a(e?t:void 0)},options:[{display:"Any CDK Type",value:""}].concat(Object(l.a)(Object.values(o))),value:null!==n&&void 0!==n?n:""}),!!(s&&s.length>1)&&Object(y.jsx)(S,{"data-testid":C.cdkVersionFilter,hint:"Choose the major version of the CDK you're using to see only constructs that will work with that version.",name:"CDK Major Version",onValueChange:function(e){if(e){var t=parseInt(e,10);r(t)}else r(void 0)},options:[{display:"Any Major Version",value:""}].concat(Object(l.a)(s)),value:null!==(e=null===c||void 0===c?void 0:c.toString())&&void 0!==e?e:""})]})},z=n(229),M=n(231),V=n(209),N=n(211),U=n(158),H=function(e){var t=e.display,n=e.value,a=e.isDisabled,c=e.disabledHint,r=e.isChecked,i=e.onChange;return Object(y.jsx)(z.a,{isChecked:r,isDisabled:a,onChange:i,children:Object(y.jsx)(M.a,{hasArrow:!0,isDisabled:!a&&!c,label:c,placement:"right",children:Object(y.jsx)(m.a,{color:"gray.600","data-testid":C.filterItem,"data-value":n,isTruncated:!0,children:t})})},n)},q=function(e){var t=e["data-testid"],n=e.initialItemCount,a=e.hint,c=e.name,r=e.options,o=e.values,s=e.onValueChange,l=Object(V.a)(),u=function(e){return function(){s(e)}},j=r,f=[];n&&(j=r.slice(0,n),f=r.slice(n,r.length));var O=f.length>0;return Object(y.jsxs)(x.a,{"data-testid":t,direction:"column",children:[Object(y.jsx)(w,{hint:a,name:c}),Object(y.jsxs)(i.a,{mt:1,spacing:1,children:[j.map((function(e){return Object(b.createElement)(H,Object(d.a)(Object(d.a)({},e),{},{isChecked:o.includes(e.value),key:e.value,onChange:u(e.value)}))})),O&&Object(y.jsx)(N.a,{animateOpacity:!0,in:l.isOpen,unmountOnExit:!0,children:Object(y.jsx)(i.a,{spacing:1,children:f.map((function(e){return Object(b.createElement)(H,Object(d.a)(Object(d.a)({},e),{},{isChecked:o.includes(e.value),key:e.value,onChange:u(e.value)}))}))})})]}),O&&Object(y.jsx)(x.a,{align:"start",mt:1,children:Object(y.jsx)(U.a,{color:"gray.600",fontWeight:"normal",leftIcon:l.isOpen?Object(y.jsx)(v.f,{}):Object(y.jsx)(v.c,{}),onClick:l.onToggle,size:"sm",textAlign:"left",variant:"link",w:"auto",children:l.isOpen?"Show fewer options (".concat(j.length,")"):"Show more options (".concat(f.length,")")})})]})},B=function(){var e=R().searchAPI,t=e.keywords,n=e.setKeywords,a=Object(O.b)().keywords,c=Object(b.useMemo)((function(){var e=Object(l.a)(a.entries()).sort((function(e,t){return Object(j.a)(e,2)[1]<Object(j.a)(t,2)[1]?1:-1})).filter((function(e){var n=Object(j.a)(e,1)[0];return!t.includes(n)})).map((function(e){var t=Object(j.a)(e,1)[0];return{display:t,value:t}})).slice(0,25),n=t.filter((function(t){return!e.some((function(e){return e.value===t}))}));return[].concat(Object(l.a)(n.map((function(e){return{display:e,value:e}}))),Object(l.a)(e))}),[a,t]);return Object(y.jsx)(q,{"data-testid":C.languagesFilter,hint:"Focus the results by choosing one or more keywords reflecting the kind of construct you're looking for. Keywords are provided by construct authors.",initialItemCount:5,name:"Keywords",onValueChange:function(e){n(t.includes(e)?t.filter((function(t){return t!==e})):[].concat(Object(l.a)(t),[e]))},options:c,values:t})},G=n(121),Q=Object.entries(G.b).map((function(e){var t=Object(j.a)(e,2),n=t[0],a=t[1];return Object(d.a)({display:a,value:n},G.e.has(n)?{isDisabled:!1}:{isDisabled:!0,disabledHint:"".concat(G.b[n]," support is coming soon!")})})).sort((function(e,t){return e.isDisabled>t.isDisabled?1:-1})),_=function(){var e=R().searchAPI,t=e.languages,n=e.setLanguages;return Object(y.jsx)(q,{"data-testid":C.languagesFilter,hint:"Choose one or more languages. Results include constructs for use with at least one of the selected languages.",name:"Programming Language",onValueChange:function(e){var a=e;n(t.includes(a)?t.filter((function(e){return e!==a})):[].concat(Object(l.a)(t),[a]))},options:Q,values:t})},J=n(269),Y=function(){var e,t,n=(null!==(e=null===(t=Object(J.a)("packageTags"))||void 0===t?void 0:t.filter((function(e){return Boolean(e.searchFilter)})))&&void 0!==e?e:[]).reduce((function(e,t){var n,a,c=null===(n=t.searchFilter)||void 0===n?void 0:n.groupBy;return c?Object(d.a)(Object(d.a)({},e),{},Object(u.a)({},c,[].concat(Object(l.a)(null!==(a=e[c])&&void 0!==a?a:[]),[t]))):e}),{}),a=R().searchAPI,c=a.tags,r=a.setTags,i=function(e){r(c.includes(e)?c.filter((function(t){return t!==e})):[].concat(Object(l.a)(c),[e]))};return Object(y.jsx)(y.Fragment,{children:Object.entries(n).map((function(e){var t=Object(j.a)(e,2),n=t[0],a=t[1];return Object(y.jsx)(q,{name:n,onValueChange:i,options:a.map((function(e){return{display:e.searchFilter.display,value:e.id}})),values:c},n)}))})},Z="5.75rem",X=function(){return Object(y.jsx)(s.a,{borderRadius:"none",boxShadow:"none","data-testid":C.filtersPanel,display:{base:"none",md:"flex"},maxH:"calc(100vh - ".concat(Z," - 1.25rem)"),maxW:"23rem",minW:"100%",overflow:"hidden auto",p:4,pos:"sticky",top:Z,zIndex:"docked",children:Object(y.jsxs)(i.a,{color:"blue.800",h:"max-content",spacing:4,top:4,children:[Object(y.jsx)(o.a,{as:"h3",size:"sm",children:"Filters"}),Object(y.jsx)(W,{}),Object(y.jsx)(_,{}),Object(y.jsx)(Y,{}),Object(y.jsx)(B,{})]})})},$=n(203),ee=n(22),te=n(220),ne=n(208),ae=n(281),ce=Object(u.a)({},ae.b.Wide,(function(e){var t=e.items;return Object(y.jsx)(i.a,{spacing:4,children:t.map((function(e){return Object(y.jsx)(ae.a,{pkg:e,variant:ae.b.Wide},"".concat(e.name,"-").concat(e.version))}))})})),re=Object(b.memo)((function(e){var t=e.cardView,n=void 0===t?ae.b.Wide:t,a=e.items;if(e.loading||!a)return Object(y.jsx)(te.a,{children:Object(y.jsx)(ne.a,{size:"xl"})});var c=ce[n];return Object(y.jsx)(c,{items:a})}));re.displayName="PackageList";var ie=n(76),oe=n(127),se=n(89),le=n(212),ue=n(34),de=function(e){var t=e["data-testid"],n=e.icon,a=e.offset,c=e.getPageUrl,r={"aria-label":"Page ".concat(a," link"),borderRadius:"md",borderColor:"blue.500",colorScheme:"blue","data-testid":t,icon:Object(y.jsx)(n,{color:"blue.500",h:5,w:5}),mx:2,h:10,w:10,variant:"outline"};return void 0!==a?Object(y.jsx)(le.a,Object(d.a)(Object(d.a)({},r),{},{as:ue.b,to:c({offset:a})})):Object(y.jsx)(le.a,Object(d.a)(Object(d.a)({},r),{},{disabled:!0}))},je=n(234),be=function(e){var t=e["data-testid"],n=e.pageLimit,a=e.offset,c=e.getPageUrl,r=Object(b.useState)((a+1).toString()),i=Object(j.a)(r,2),o=i[0],s=i[1],l=Object(ee.g)().push;Object(b.useEffect)((function(){s((a+1).toString())}),[a]);return Object(y.jsxs)(x.a,{align:"center",as:"form",mx:2,onSubmit:function(e){e.preventDefault(),l(c({offset:parseInt(o)-1}))},children:[Object(y.jsx)(je.a,{colorScheme:"blue","data-testid":t,h:10,max:n+1,min:1,name:"page",onChange:function(e){e.preventDefault(),s(e.target.value)},p:0,textAlign:"center",type:"number",value:o,w:10}),Object(y.jsxs)(m.a,{ml:2,w:"max-content",children:["of ",n+1]})]})},fe=function(e){var t=e.offset,n=e.getPageUrl,a=e.pageLimit,c=t<a?t+1:void 0,r=t>0?t-1:void 0;return Object(y.jsxs)(i.a,{align:"center",direction:"row",justify:"space-between",maxW:"18rem",mx:"auto",spacing:4,w:"full",children:[Object(y.jsx)(de,{"data-testid":C.prevPage,getPageUrl:n,icon:v.d,offset:r}),Object(y.jsx)(be,{"data-testid":C.goToPage,getPageUrl:n,offset:t,pageLimit:a}),Object(y.jsx)(de,{"data-testid":C.nextPage,getPageUrl:n,icon:v.e,offset:c})]})},Oe=function(e){var t=e.children;return Object(y.jsx)(m.a,{as:"strong",color:"gray.700",children:t})},he=function(e){var t=e.first,n=e.count,a=e.last;return!t&&a>=n?Object(y.jsxs)(y.Fragment,{children:[Object(y.jsx)(Oe,{children:n})," of ",Object(y.jsx)(Oe,{children:n})]}):Object(y.jsxs)(y.Fragment,{children:[Object(y.jsxs)(Oe,{children:[n?t+1:n," - ",a>n?n:a]})," ","of ",Object(y.jsx)(Oe,{children:n})]})},ge=function(e){var t=e.limit,n=e.offset,a=e.count,c=e.filtered,r=e.query,i=t*n,o=i+t,s=a>0;return Object(y.jsxs)(m.a,{"data-testid":C.searchDetails,children:[s?Object(y.jsxs)(y.Fragment,{children:["Displaying ",Object(y.jsx)(he,{count:a,first:i,last:o})," ",c?"search results":"constructs"]}):Object(y.jsx)(y.Fragment,{children:c?"There were no search results":"No constructs found"}),r&&Object(y.jsxs)(y.Fragment,{children:[" for ",Object(y.jsx)(Oe,{children:r})]}),".",!s&&c&&Object(y.jsx)(y.Fragment,{children:" Try a different term."})]})},me=n(238),ve=n(52),xe=function(){var e=R().searchAPI,t=e.sort,n=e.setSort;return Object(y.jsx)(S,{hint:"Sets the order of search results",name:"Sorted By",onValueChange:function(e){n(e||void 0)},options:[{display:"Relevance",value:""}].concat(Object(l.a)(Object.entries(A).map((function(e){var t=Object(j.a)(e,2),n=t[0];return{display:t[1],value:n}})))),value:null!==t&&void 0!==t?t:""})},pe=function(){var e=Object(V.a)();return Object(y.jsxs)(y.Fragment,{children:[Object(y.jsx)(U.a,{colorScheme:"blue",display:{md:"none"},onClick:e.onOpen,rightIcon:Object(y.jsx)(v.c,{}),variant:"link",children:"Sorting and Filters"}),Object(y.jsxs)(me.a,Object(d.a)(Object(d.a)({},e),{},{placement:"bottom",children:[Object(y.jsx)(ve.h,{}),Object(y.jsxs)(me.b,{color:"blue.800",maxH:"full",children:[Object(y.jsx)(ve.g,{borderBottom:"base",children:"Sorting and Filters"}),Object(y.jsx)(ve.c,{}),Object(y.jsx)(ve.b,{children:Object(y.jsxs)(i.a,{color:"blue.800",pb:4,spacing:4,children:[Object(y.jsx)(xe,{}),Object(y.jsx)(W,{}),Object(y.jsx)(_,{}),Object(y.jsx)(Y,{}),Object(y.jsx)(B,{})]})})]})]}))]})},ye=n(230),we=function(){var e=R().searchAPI,t=e.sort,n=e.setSort,a=t?A[t]:"Relevance";return Object(y.jsxs)(x.a,{align:"center",children:[Object(y.jsx)(m.a,{children:"Sorted by"}),Object(y.jsxs)(ye.a,{children:[Object(y.jsx)(ye.b,{as:U.a,color:"blue.500","data-testid":C.sortButton,ml:2,pl:2,pr:2,py:1,rightIcon:Object(y.jsx)(v.c,{}),variant:"link",children:a}),Object(y.jsxs)(ye.f,{"data-testid":C.sortDropdown,minW:"180",zIndex:"sticky",children:[Object(y.jsx)(ye.e,{"data-testid":C.sortItem,"data-value":"",onClick:function(){return n(void 0)},children:"Relevance"},"Relevance"),Object.entries(A).map((function(e){var t=Object(j.a)(e,2),a=t[0],c=t[1];return Object(y.jsx)(ye.e,{"data-testid":C.sortItem,"data-value":a,onClick:function(){return n(a)},children:c},a)}))]})]})]})},ke=function(){var e=Object(b.useRef)(!0),t=Object(ee.g)().push,n=R(),a=n.query,c=n.searchAPI,o=n.offset,s=n.limit,l=c.keywords,u=c.languages,d=c.sort,j=c.cdkType,f=c.cdkMajor,O=c.onSearch,h=c.tags,g=Object(oe.a)({offset:o,limit:s,query:a,keywords:l,languages:u,cdkMajor:f,cdkType:j,sort:d,tags:h}),m=g.page,v=g.pageLimit,x=g.results,p=function(e){var t,n;return Object(se.c)({cdkMajor:f,cdkType:j,keywords:l,query:null!==(t=e.q)&&void 0!==t?t:a,languages:u,sort:d,offset:null!==(n=e.offset)&&void 0!==n?n:o,tags:h})};return Object(b.useEffect)((function(){x.length&&(o<0||o>v)&&t(p(o<0?{offset:0}:{offset:v}))}),[x,o,v]),Object(b.useEffect)((function(){e.current?e.current=!1:O({replace:!0})}),[d,l,u,j,f,h]),Object(b.useEffect)((function(){window.scrollTo(0,0)}),[m]),Object(y.jsx)(r.a,{meta:{title:a||"Search",description:a?"".concat(x.length," results for ").concat(a," at Construct Hub"):"Search reusable components for your cloud application"},pageName:"search",children:Object(y.jsxs)(i.a,{direction:"column",maxW:"100vw",pb:4,px:4,spacing:4,children:[Object(y.jsx)(ie.a,{bg:"white",onChange:c.onQueryChange,onSubmit:function(e){c.setSort(void 0),c.onSubmit(e)},value:c.query}),Object(y.jsxs)(i.a,{align:{base:"start",lg:"center"},direction:{base:"column-reverse",lg:"row"},justify:{base:"initial",lg:"space-between"},spacing:4,children:[Object(y.jsx)(ge,{count:x.length,filtered:!!a,limit:s,offset:o,query:a}),Object(y.jsx)($.a,{display:{base:"none",md:"initial"},children:Object(y.jsx)(we,{})}),Object(y.jsx)($.a,{display:{md:"none"},children:Object(y.jsx)(pe,{})})]}),Object(y.jsx)(re,{items:m}),Object(y.jsx)($.a,{w:"full",children:Object(y.jsx)(fe,{getPageUrl:p,offset:o,pageLimit:v})})]})})},Ce=function(){return Object(y.jsx)(K,{children:Object(y.jsx)(r.a,{meta:{title:"Search - Construct Hub",description:"Search Construct Libraries for AWS CDK, CDK8s, and CDKtf"},pageName:"search",children:Object(y.jsxs)(c.a,{"data-testid":C.page,gap:4,h:"full",maxW:"100%",px:{base:0,md:6},py:6,templateColumns:{base:"1fr",md:"auto 1fr"},templateRows:"1fr",children:[Object(y.jsx)(X,{}),Object(y.jsx)(ke,{})]})})})}}}]);
2
- //# sourceMappingURL=8.73c2c7f3.chunk.js.map
1
+ (this["webpackJsonpconstruct-hub-webapp"]=this["webpackJsonpconstruct-hub-webapp"]||[]).push([[8],{247:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(0),c=n(264),r={contribute:{event:{name:"Contribute Load"}},home:{event:{name:"Home Load"}},faq:{event:{name:"Frequently Asked Questions Load"}},packageProfile:{event:{name:"Package Profile Load"}},search:{event:{name:"Search Load"}},siteTerms:{event:{name:"Site Terms Load"}},notFound:{page:{pageType:"errorPage"},event:{name:"404 Page Load"}}},i=n(123),o=n(1),s=function(e){var t=e.children,n=e.meta,s=e.pageName,l=Object(i.b)(r[s]);Object(a.useEffect)((function(){l()}),[l]);var u=n.suffix,d=void 0===u||u,j=n.title,b=n.description,f=d?"".concat(j," - Construct Hub"):j;return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsxs)(c.a,{children:[!1,Object(o.jsx)("meta",{content:"width=device-width, initial-scale=1",name:"viewport"}),Object(o.jsx)("meta",{charSet:"utf-8"}),Object(o.jsx)("title",{children:f}),Object(o.jsx)("meta",{content:f,property:"og:title"}),Object(o.jsx)("meta",{content:f,name:"twitter:title"}),Object(o.jsx)("meta",{content:"summary",name:"twitter:card"}),Object(o.jsx)("meta",{content:b,name:"description"}),Object(o.jsx)("meta",{content:b,property:"og:description"}),Object(o.jsx)("meta",{content:b,name:"twitter:description"})]}),t]})}},257:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var a=n(6),c=n(14),r=n(127),i=function(e){return!e||e.length<1?[]:e.reduce((function(e,t){return t.highlight?[].concat(Object(c.a)(e),[t.highlight]):e}),[])},o=function(e){for(var t=e.packageTags,n=e.keywords,i=new Array,o=new Set,s=0,l=[].concat(Object(c.a)(function(e){return(null!==e&&void 0!==e?e:[]).filter((function(e){var t;return Boolean(null===(t=e.keyword)||void 0===t?void 0:t.label)})).map((function(e){var t;return Object(a.a)(Object(a.a)({},e),{},{id:null===(t=e.keyword)||void 0===t?void 0:t.label})}))}(t)),Object(c.a)(function(e){return!e||e.length<1?[]:e.filter((function(e){return Boolean(e)&&!r.a.has(e)})).map((function(e){return{id:e,keyword:{label:e}}}))}(n)));s<l.length;s++){var u=l[s],d=u.keyword.label.toLowerCase();o.has(d)||(i.push(u),o.add(d))}return i}},263:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(0),c=n(22),r=function(){var e=Object(c.h)().search;return Object(a.useMemo)((function(){return new URLSearchParams(e)}),[e])}},270:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(74),c=function(e){var t=Object(a.b)().data;return(null!==t&&void 0!==t?t:{})[e]}},271:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var a=n(5),c=n(0),r=n(22),i=n(122),o=n(13),s=n(263),l=i.d.TypeScript,u="preferred-language",d=function(e){return null!=e&&i.e.has(e)},j=function(e){if(d(e))return e;try{var t,n=null!==(t=localStorage.getItem(u))&&void 0!==t?t:"";if(d(n))return n}catch(a){}return l},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.updateUrl,n=e.updateSaved,i=Object(r.h)(),l=i.pathname,b=i.hash,f=Object(r.g)(),O=f.replace,h=Object(s.a)(),g=h.get(o.b.LANGUAGE),m=Object(c.useState)((function(){return j(g)})),v=Object(a.a)(m,2),x=v[0],p=v[1];Object(c.useEffect)((function(){d(g)&&g!==x&&p(g)}),[g]),Object(c.useEffect)((function(){g!==x&&t&&(h.set(o.b.LANGUAGE,x),O({pathname:l,hash:b,search:h.toString()}))}),[x,t]);var y=Object(c.useCallback)((function(e){if(p(e),n)try{localStorage.setItem(u,e)}catch(t){}}),[n]);return Object(c.useMemo)((function(){return[x,y]}),[x,y])}},282:function(e,t,n){"use strict";var a;n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return H})),function(e){e.Wide="wide"}(a||(a={}));var c=n(0),r=n(391),i=n(154),o=n(214),s=n(237),l=n(232),u=n(208),d=n(637),j=n(91),b=n(88),f=n(49),O=n(283),h=n(63),g=Object(h.a)("packageCard",["author","description","downloads","languages","published","title","version","comment","wideContainer"]),m=n(1),v=function(e){var t=e["data-testid"],n=e.tooltip,a=e.value;return Object(m.jsx)(l.a,{hasArrow:!0,isDisabled:!n,label:n,placement:"left",children:Object(m.jsx)(u.a,{"data-testid":t,fontSize:"xs",zIndex:1,children:a})})},x=function(){var e,t,n,a=U(),c=a.author,r=a.metadata.date,i=a.name,o=Object(j.b)().data,s=null===o||void 0===o||null===(e=o.packages)||void 0===e||null===(t=e[i])||void 0===t||null===(n=t.downloads)||void 0===n?void 0:n.npm,l="string"===typeof c?c:c.name,u=new Date(r);return Object(m.jsxs)(m.Fragment,{children:[void 0!==s&&Object(m.jsx)(v,{"data-testid":g.downloads,tooltip:"Download numbers are periodically sourced from the NPM registry",value:"".concat(s.toLocaleString()," weekly downloads")}),Object(m.jsx)(v,{"data-testid":g.published,value:Object(m.jsx)(O.a,{date:u,fontSize:"xs",formattedDate:Object(d.a)(u,{addSuffix:!0})})}),Object(m.jsx)(v,{"data-testid":g.author,value:Object(m.jsxs)(m.Fragment,{children:["By"," ",Object(m.jsx)(f.a,{color:"blue.500",to:Object(b.c)({query:l}),children:l})]})})]})},p=n(5),y=n(224),w=n(34),k=n(271),C=n(129),S=function(e){var t=e.comment;return Object(m.jsxs)(u.a,{"data-testid":g.comment,fontSize:"md",lineHeight:"tall",noOfLines:4,children:[Object(m.jsxs)(u.a,{as:"span",color:"blue.500",fontWeight:"bold",children:["Editor's note:"," "]}),t]})},D=function(){var e=Object(k.a)(),t=Object(p.a)(e,1)[0],n=U(),a=n.description,c=n.comment,i=n.metadata.constructFramework,s=n.name,l=n.version,d=null===i||void 0===i?void 0:i.name,j=null===i||void 0===i?void 0:i.majorVersion;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(r.b,{as:w.b,to:Object(b.a)({name:s,version:l,language:t}),children:Object(m.jsxs)(o.a,{align:"center",children:[Object(m.jsx)(C.a,{majorVersion:j,mr:2,name:d}),Object(m.jsx)(y.a,{as:"h3",color:"blue.800","data-testid":g.title,fontSize:"md",fontWeight:"bold",wordBreak:"normal",children:s})]})}),c?Object(m.jsx)(S,{comment:c}):Object(m.jsx)(u.a,{color:"blue.800","data-testid":g.description,fontSize:"md",lineHeight:"tall",noOfLines:4,children:a||"No description available."})]})},T=n(6),P=n(204),F=n(257),A=n(284),I=function(){var e,t,n=(null!==(e=null===(t=U())||void 0===t?void 0:t.metadata)&&void 0!==e?e:{}).packageTags,a=void 0===n?[]:n,c=Object(F.a)(a),r=Object(p.a)(c,1)[0];return Object(m.jsx)(P.a,{fontSize:"xs",children:Object(m.jsx)(A.a,Object(T.a)({},r))})},L=n(122),E=n(286),R={sm:5,md:6,lg:8},K=function(e){var t=e.isRounded,n=void 0!==t&&t,a=e.languages,c=e.name,r=e.size,i=void 0===r?"md":r,o=e.version,s=Object.keys(null!==a&&void 0!==a?a:{});return Object(m.jsx)(m.Fragment,{children:Object.entries(L.c).sort((function(e,t){var n=Object(p.a)(e,1)[0],a=Object(p.a)(t,1)[0];return L.a.indexOf(n)-L.a.indexOf(a)})).map((function(e){var t=Object(p.a)(e,2),a=t[0],r=t[1],l=a,u=l===L.d.TypeScript||s.includes(l),d=l===L.d.TypeScript||L.e.has(l);if(!u)return null;var j=r.name,f=r.icon,O=Object(m.jsx)(f,{"aria-label":"Supports ".concat(j),borderRadius:n?"50%":0,h:R[i],opacity:d?1:.2,w:R[i]});return Object(m.jsx)(E.a,{language:l,children:d?Object(m.jsx)(w.b,{"aria-label":"View package docs for ".concat(l),to:Object(b.a)({name:c,version:o,language:l}),children:O}):O},l)}))})},W=function(){var e=U();return Object(m.jsx)(K,Object(T.a)(Object(T.a)({},e),{},{size:"sm"}))},z=n(285),M=function(){var e=U(),t=e.keywords,n=void 0===t?[]:t,a=e.metadata.packageTags,c=void 0===a?[]:a,r=Object(F.b)({packageTags:c,keywords:n});return Object(m.jsx)(m.Fragment,{children:r.slice(0,10).map((function(e){var t=e.id,n=e.keyword,a=(n=void 0===n?{}:n).label,c=n.color;return Object(m.jsx)(z.a,{value:t,variant:c,children:a},t)}))})},V=function(){return Object(m.jsx)(r.a,{_hover:{"> article":{bg:"gray.50"}},children:Object(m.jsxs)(i.a,{as:"article",bg:"white",border:"base",borderRadius:"sm",boxShadow:"base",color:"blue.800","data-testid":g.wideContainer,h:"full",minH:"12.5rem",templateColumns:{base:"1fr",lg:"1fr 14rem"},w:"full",children:[Object(m.jsxs)(o.a,{direction:"column",justify:"space-between",p:5,sx:{gap:"0.5rem"},children:[Object(m.jsx)(s.a,{spacing:3,children:Object(m.jsx)(D,{})}),Object(m.jsx)(o.a,{align:"center",sx:{gap:"0.5rem"},wrap:"wrap",children:Object(m.jsx)(M,{})})]}),Object(m.jsxs)(o.a,{align:{base:"end",lg:"initial"},borderLeft:{lg:"base"},borderTop:{base:"base",lg:"none"},direction:{base:"row",lg:"column"},justify:"space-between",p:5,sx:{gap:"0.5rem"},children:[Object(m.jsxs)(s.a,{spacing:1,children:[Object(m.jsx)(I,{}),Object(m.jsx)(s.a,{spacing:1,children:Object(m.jsx)(x,{})})]}),Object(m.jsx)(s.a,{"data-testid":g.languages,direction:"row",spacing:2,children:Object(m.jsx)(W,{})})]})]})})},N=Object(c.createContext)(null),U=function(){return Object(c.useContext)(N)},H=function(e){var t=e.pkg,n=e.variant,c=void 0===n?a.Wide:n;return Object(m.jsx)(N.Provider,{value:t,children:c===a.Wide&&Object(m.jsx)(V,{})})}},283:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var a=n(6),c=n(24),r=n(17),i=n(204),o=n(649),s=n(1),l=["date","format","formattedDate"],u=Object(r.a)((function(e,t){var n=e.date,r=e.format,u=e.formattedDate,d=Object(c.a)(e,l);return Object(s.jsx)(i.a,Object(a.a)(Object(a.a)({as:"time",dateTime:n.toISOString(),ref:t},d),{},{children:null!==u&&void 0!==u?u:Object(o.a)(n,null!==r&&void 0!==r?r:"")}))}));u.displayName="Time"},284:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var a=n(237),c=n(236),r=n(208),i=n(1),o=function(e){var t=e.label,n=e.color,o=e.icon;return Object(i.jsxs)(a.a,{align:"center",direction:"row",spacing:2,children:[Object(i.jsx)(c.a,{alt:"".concat(t," icon"),src:o,w:4}),Object(i.jsx)(r.a,{color:n,fontWeight:"bold",children:t})]})}},285:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var a=n(6),c=n(24),r=n(641),i=n(88),o=n(49),s=n(1),l=["children","value","label","zIndex"],u=function(e){var t=e.children,n=e.value,u=e.label,d=void 0===u?n:u,j=e.zIndex,b=Object(c.a)(e,l);return Object(s.jsx)(o.a,{"aria-label":"Tag: ".concat(d),to:Object(i.c)({keywords:[n]}),zIndex:j,children:Object(s.jsx)(r.a,Object(a.a)(Object(a.a)({_hover:{textDecoration:"underline"}},b),{},{children:Object(s.jsx)(r.b,{children:t})}))})}},286:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(232),c=n(122),r=n(1),i=function(e){var t=e.children,n=e.language,i=c.e.has(n),o=c.b[n],s=i?"Click to view documentation in ".concat(o):"Documentation support for ".concat(o," is coming soon!");return Object(r.jsx)(a.a,{hasArrow:!0,label:s,placement:"top-start",children:Object(r.jsx)("span",{children:t})})}},648:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return Ce}));var a,c=n(154),r=n(247),i=n(237),o=n(224),s=n(94),l=n(14),u=n(4),d=n(6),j=n(5),b=n(0),f=n(48),O=n(89),h=n(389),g=n(655),m=n(208),v=n(30),x=n(214),p=n(651),y=n(1),w=function(e){var t=e.name,n=e.hint;return Object(y.jsxs)(x.a,{align:"center",mb:1,children:[Object(y.jsx)(o.a,{as:"h4",size:"sm",w:"max-content",children:t}),n?Object(y.jsxs)(p.a,{colorScheme:"dark",placement:"right",strategy:"fixed",children:[Object(y.jsx)(p.e,{children:Object(y.jsx)(x.a,{"aria-label":"Hint: ".concat(t),as:"button",ml:2,children:Object(y.jsx)(v.n,{h:3.5,w:3.5})})}),Object(y.jsxs)(p.d,{bg:"gray.700",borderRadius:"base",color:"white",fontSize:"sm",shadow:"whiteAlpha.300",children:[Object(y.jsx)(p.b,{bg:"gray.700"}),Object(y.jsx)(p.c,{children:Object(y.jsx)(m.a,{children:n})})]})]}):null]})},k=n(63),C=Object(k.a)("searchRedesign",["page","searchDetails","nextPage","prevPage","goToPage","sortButton","sortDropdown","sortItem","filtersPanel","cdkTypeFilter","cdkVersionFilter","filterItem","languagesFilter"]),S=function(e){var t=e["data-testid"],n=e.value,a=e.onValueChange,c=e.options,r=e.name,o=e.hint;return Object(y.jsxs)(i.a,{"data-testid":t,spacing:1,children:[Object(y.jsx)(w,{hint:o,name:r}),Object(y.jsx)(h.a,{onChange:a,value:n,children:Object(y.jsx)(i.a,{spacing:1,children:c.map((function(e){var t=e.display,n=e.value;return Object(y.jsx)(g.a,{value:n,children:Object(y.jsx)(m.a,{color:"gray.600","data-testid":C.filterItem,"data-value":n,isTruncated:!0,children:t})},n)}))})})]})},D=n(13),T=n(95),P=n(263),F=n(59),A=(a={},Object(u.a)(a,F.a.NameAsc,"A-Z"),Object(u.a)(a,F.a.NameDesc,"Z-A"),Object(u.a)(a,F.a.PublishDateAsc,"Oldest first"),Object(u.a)(a,F.a.PublishDateDesc,"Newest first"),Object(u.a)(a,F.a.DownloadsDesc,"Most downloads"),Object(u.a)(a,F.a.DownloadsAsc,"Least downloads"),a),I=function(e){var t=parseInt(e);return"NaN"==="".concat(t)?0:t},L=function(e){return e?decodeURIComponent(e).split(","):[]},E=Object(b.createContext)(void 0),R=function(){var e=Object(b.useContext)(E);if(!e)throw new Error("This hook must be called in a child of <SearchStateProvider />");return e},K=function(e){var t,n,a,c,r=e.children,i=Object(P.a)(),o=I(null!==(t=i.get(D.b.OFFSET))&&void 0!==t?t:"0"),s=decodeURIComponent(null!==(n=i.get(D.b.SEARCH_QUERY))&&void 0!==n?n:""),l=L(i.get(D.b.LANGUAGES)),u=i.get(D.b.TAGS),d=Object(b.useMemo)((function(){return L(u)}),[u]),j=i.get(D.b.KEYWORDS),f=Object(b.useMemo)((function(){return L(j)}),[j]),O=null!==(a=i.get(D.b.SORT))&&void 0!==a?a:void 0,h=null!==(c=i.get(D.b.CDK_TYPE))&&void 0!==c?c:void 0,g=i.get(D.b.CDK_MAJOR),m=g?I(g):void 0,v=Object(T.a)({defaultCdkMajor:m,defaultCdkType:h,defaultKeywords:f,defaultLanguages:l,defaultQuery:s,defaultSort:O,defaultTags:d});return Object(b.useEffect)((function(){s!==v.query&&v.setQuery(s)}),[s]),Object(b.useEffect)((function(){f.some((function(e){return!v.keywords.includes(e)}))&&v.setKeywords(f)}),[f]),Object(b.useEffect)((function(){d.some((function(e){return!v.tags.includes(e)}))&&v.setTags(d)}),[d]),Object(y.jsx)(E.Provider,{value:{limit:25,offset:o,query:s,searchAPI:v},children:r})},W=function(){var e,t=R().searchAPI,n=t.cdkType,a=t.setCdkType,c=t.cdkMajor,r=t.setCdkMajor,i=Object(O.b)(),o=Object(b.useMemo)((function(){var e=i.constructFrameworks,t=Object.entries(e).reduce((function(e,t){var n=Object(j.a)(t,2),a=n[0],c=n[1];return c.pkgCount<1?e:Object(d.a)(Object(d.a)({},e),{},Object(u.a)({},a,Object(d.a)({display:f.a[a],value:a},c)))}),{});return Object.keys(t).length?t:void 0}),[i]),s=Object(b.useMemo)((function(){var e;if(o&&n){var t=null===(e=o[n])||void 0===e?void 0:e.majorVersions;if(t)return Object(l.a)(t).sort((function(e,t){return e-t})).map((function(e){return{value:e.toString(),display:"".concat(f.a[n]," v").concat(e)}}))}}),[o,n]);if(!o)return null;return Object(y.jsxs)(y.Fragment,{children:[Object(y.jsx)(S,{"data-testid":C.cdkTypeFilter,hint:"Choose the right CDK for your IaC technology: AWS CDK for AWS CloudFormation, CDKtf for Terraform, or CDK8s for Kubernetes.",name:"CDK Type",onValueChange:function(e){var t=e;r(void 0),a(e?t:void 0)},options:[{display:"Any CDK Type",value:""}].concat(Object(l.a)(Object.values(o))),value:null!==n&&void 0!==n?n:""}),!!(s&&s.length>1)&&Object(y.jsx)(S,{"data-testid":C.cdkVersionFilter,hint:"Choose the major version of the CDK you're using to see only constructs that will work with that version.",name:"CDK Major Version",onValueChange:function(e){if(e){var t=parseInt(e,10);r(t)}else r(void 0)},options:[{display:"Any Major Version",value:""}].concat(Object(l.a)(s)),value:null!==(e=null===c||void 0===c?void 0:c.toString())&&void 0!==e?e:""})]})},z=n(230),M=n(232),V=n(210),N=n(212),U=n(159),H=function(e){var t=e.display,n=e.value,a=e.isDisabled,c=e.disabledHint,r=e.isChecked,i=e.onChange;return Object(y.jsx)(z.a,{isChecked:r,isDisabled:a,onChange:i,children:Object(y.jsx)(M.a,{hasArrow:!0,isDisabled:!a&&!c,label:c,placement:"right",children:Object(y.jsx)(m.a,{color:"gray.600","data-testid":C.filterItem,"data-value":n,isTruncated:!0,children:t})})},n)},q=function(e){var t=e["data-testid"],n=e.initialItemCount,a=e.hint,c=e.name,r=e.options,o=e.values,s=e.onValueChange,l=Object(V.a)(),u=function(e){return function(){s(e)}},j=r,f=[];n&&(j=r.slice(0,n),f=r.slice(n,r.length));var O=f.length>0;return Object(y.jsxs)(x.a,{"data-testid":t,direction:"column",children:[Object(y.jsx)(w,{hint:a,name:c}),Object(y.jsxs)(i.a,{mt:1,spacing:1,children:[j.map((function(e){return Object(b.createElement)(H,Object(d.a)(Object(d.a)({},e),{},{isChecked:o.includes(e.value),key:e.value,onChange:u(e.value)}))})),O&&Object(y.jsx)(N.a,{animateOpacity:!0,in:l.isOpen,unmountOnExit:!0,children:Object(y.jsx)(i.a,{spacing:1,children:f.map((function(e){return Object(b.createElement)(H,Object(d.a)(Object(d.a)({},e),{},{isChecked:o.includes(e.value),key:e.value,onChange:u(e.value)}))}))})})]}),O&&Object(y.jsx)(x.a,{align:"start",mt:1,children:Object(y.jsx)(U.a,{color:"gray.600",fontWeight:"normal",leftIcon:l.isOpen?Object(y.jsx)(v.f,{}):Object(y.jsx)(v.c,{}),onClick:l.onToggle,size:"sm",textAlign:"left",variant:"link",w:"auto",children:l.isOpen?"Show fewer options (".concat(j.length,")"):"Show more options (".concat(f.length,")")})})]})},B=function(){var e=R().searchAPI,t=e.keywords,n=e.setKeywords,a=Object(O.b)().keywords,c=Object(b.useMemo)((function(){var e=Object(l.a)(a.entries()).sort((function(e,t){return Object(j.a)(e,2)[1]<Object(j.a)(t,2)[1]?1:-1})).filter((function(e){var n=Object(j.a)(e,1)[0];return!t.includes(n)})).map((function(e){var t=Object(j.a)(e,1)[0];return{display:t,value:t}})).slice(0,25),n=t.filter((function(t){return!e.some((function(e){return e.value===t}))}));return[].concat(Object(l.a)(n.map((function(e){return{display:e,value:e}}))),Object(l.a)(e))}),[a,t]);return Object(y.jsx)(q,{"data-testid":C.languagesFilter,hint:"Focus the results by choosing one or more keywords reflecting the kind of construct you're looking for. Keywords are provided by construct authors.",initialItemCount:5,name:"Keywords",onValueChange:function(e){n(t.includes(e)?t.filter((function(t){return t!==e})):[].concat(Object(l.a)(t),[e]))},options:c,values:t})},G=n(122),Q=Object.entries(G.b).map((function(e){var t=Object(j.a)(e,2),n=t[0],a=t[1];return Object(d.a)({display:a,value:n},G.e.has(n)?{isDisabled:!1}:{isDisabled:!0,disabledHint:"".concat(G.b[n]," support is coming soon!")})})).sort((function(e,t){return e.isDisabled>t.isDisabled?1:-1})),_=function(){var e=R().searchAPI,t=e.languages,n=e.setLanguages;return Object(y.jsx)(q,{"data-testid":C.languagesFilter,hint:"Choose one or more languages. Results include constructs for use with at least one of the selected languages.",name:"Programming Language",onValueChange:function(e){var a=e;n(t.includes(a)?t.filter((function(e){return e!==a})):[].concat(Object(l.a)(t),[a]))},options:Q,values:t})},J=n(270),Y=function(){var e,t,n=(null!==(e=null===(t=Object(J.a)("packageTags"))||void 0===t?void 0:t.filter((function(e){return Boolean(e.searchFilter)})))&&void 0!==e?e:[]).reduce((function(e,t){var n,a,c=null===(n=t.searchFilter)||void 0===n?void 0:n.groupBy;return c?Object(d.a)(Object(d.a)({},e),{},Object(u.a)({},c,[].concat(Object(l.a)(null!==(a=e[c])&&void 0!==a?a:[]),[t]))):e}),{}),a=R().searchAPI,c=a.tags,r=a.setTags,i=function(e){r(c.includes(e)?c.filter((function(t){return t!==e})):[].concat(Object(l.a)(c),[e]))};return Object(y.jsx)(y.Fragment,{children:Object.entries(n).map((function(e){var t=Object(j.a)(e,2),n=t[0],a=t[1];return Object(y.jsx)(q,{name:n,onValueChange:i,options:a.map((function(e){return{display:e.searchFilter.display,value:e.id}})),values:c},n)}))})},Z="5.75rem",X=function(){return Object(y.jsx)(s.a,{borderRadius:"none",boxShadow:"none","data-testid":C.filtersPanel,display:{base:"none",md:"flex"},maxH:"calc(100vh - ".concat(Z," - 1.25rem)"),maxW:"23rem",minW:"100%",overflow:"hidden auto",p:4,pos:"sticky",top:Z,zIndex:"docked",children:Object(y.jsxs)(i.a,{color:"blue.800",h:"max-content",spacing:4,top:4,children:[Object(y.jsx)(o.a,{as:"h3",size:"sm",children:"Filters"}),Object(y.jsx)(W,{}),Object(y.jsx)(_,{}),Object(y.jsx)(Y,{}),Object(y.jsx)(B,{})]})})},$=n(204),ee=n(22),te=n(219),ne=n(209),ae=n(282),ce=Object(u.a)({},ae.b.Wide,(function(e){var t=e.items;return Object(y.jsx)(i.a,{spacing:4,children:t.map((function(e){return Object(y.jsx)(ae.a,{pkg:e,variant:ae.b.Wide},"".concat(e.name,"-").concat(e.version))}))})})),re=Object(b.memo)((function(e){var t=e.cardView,n=void 0===t?ae.b.Wide:t,a=e.items;if(e.loading||!a)return Object(y.jsx)(te.a,{children:Object(y.jsx)(ne.a,{size:"xl"})});var c=ce[n];return Object(y.jsx)(c,{items:a})}));re.displayName="PackageList";var ie=n(75),oe=n(128),se=n(88),le=n(213),ue=n(34),de=function(e){var t=e["data-testid"],n=e.icon,a=e.offset,c=e.getPageUrl,r={"aria-label":"Page ".concat(a," link"),borderRadius:"md",borderColor:"blue.500",colorScheme:"blue","data-testid":t,icon:Object(y.jsx)(n,{color:"blue.500",h:5,w:5}),mx:2,h:10,w:10,variant:"outline"};return void 0!==a?Object(y.jsx)(le.a,Object(d.a)(Object(d.a)({},r),{},{as:ue.b,to:c({offset:a})})):Object(y.jsx)(le.a,Object(d.a)(Object(d.a)({},r),{},{disabled:!0}))},je=n(235),be=function(e){var t=e["data-testid"],n=e.pageLimit,a=e.offset,c=e.getPageUrl,r=Object(b.useState)((a+1).toString()),i=Object(j.a)(r,2),o=i[0],s=i[1],l=Object(ee.g)().push;Object(b.useEffect)((function(){s((a+1).toString())}),[a]);return Object(y.jsxs)(x.a,{align:"center",as:"form",mx:2,onSubmit:function(e){e.preventDefault(),l(c({offset:parseInt(o)-1}))},children:[Object(y.jsx)(je.a,{colorScheme:"blue","data-testid":t,h:10,max:n+1,min:1,name:"page",onChange:function(e){e.preventDefault(),s(e.target.value)},p:0,textAlign:"center",type:"number",value:o,w:10}),Object(y.jsxs)(m.a,{ml:2,w:"max-content",children:["of ",n+1]})]})},fe=function(e){var t=e.offset,n=e.getPageUrl,a=e.pageLimit,c=t<a?t+1:void 0,r=t>0?t-1:void 0;return Object(y.jsxs)(i.a,{align:"center",direction:"row",justify:"space-between",maxW:"18rem",mx:"auto",spacing:4,w:"full",children:[Object(y.jsx)(de,{"data-testid":C.prevPage,getPageUrl:n,icon:v.d,offset:r}),Object(y.jsx)(be,{"data-testid":C.goToPage,getPageUrl:n,offset:t,pageLimit:a}),Object(y.jsx)(de,{"data-testid":C.nextPage,getPageUrl:n,icon:v.e,offset:c})]})},Oe=function(e){var t=e.children;return Object(y.jsx)(m.a,{as:"strong",color:"gray.700",children:t})},he=function(e){var t=e.first,n=e.count,a=e.last;return!t&&a>=n?Object(y.jsxs)(y.Fragment,{children:[Object(y.jsx)(Oe,{children:n})," of ",Object(y.jsx)(Oe,{children:n})]}):Object(y.jsxs)(y.Fragment,{children:[Object(y.jsxs)(Oe,{children:[n?t+1:n," - ",a>n?n:a]})," ","of ",Object(y.jsx)(Oe,{children:n})]})},ge=function(e){var t=e.limit,n=e.offset,a=e.count,c=e.filtered,r=e.query,i=t*n,o=i+t,s=a>0;return Object(y.jsxs)(m.a,{"data-testid":C.searchDetails,children:[s?Object(y.jsxs)(y.Fragment,{children:["Displaying ",Object(y.jsx)(he,{count:a,first:i,last:o})," ",c?"search results":"constructs"]}):Object(y.jsx)(y.Fragment,{children:c?"There were no search results":"No constructs found"}),r&&Object(y.jsxs)(y.Fragment,{children:[" for ",Object(y.jsx)(Oe,{children:r})]}),".",!s&&c&&Object(y.jsx)(y.Fragment,{children:" Try a different term."})]})},me=n(239),ve=n(52),xe=function(){var e=R().searchAPI,t=e.sort,n=e.setSort;return Object(y.jsx)(S,{hint:"Sets the order of search results",name:"Sorted By",onValueChange:function(e){n(e||void 0)},options:[{display:"Relevance",value:""}].concat(Object(l.a)(Object.entries(A).map((function(e){var t=Object(j.a)(e,2),n=t[0];return{display:t[1],value:n}})))),value:null!==t&&void 0!==t?t:""})},pe=function(){var e=Object(V.a)();return Object(y.jsxs)(y.Fragment,{children:[Object(y.jsx)(U.a,{colorScheme:"blue",display:{md:"none"},onClick:e.onOpen,rightIcon:Object(y.jsx)(v.c,{}),variant:"link",children:"Sorting and Filters"}),Object(y.jsxs)(me.a,Object(d.a)(Object(d.a)({},e),{},{placement:"bottom",children:[Object(y.jsx)(ve.h,{}),Object(y.jsxs)(me.b,{color:"blue.800",maxH:"full",children:[Object(y.jsx)(ve.g,{borderBottom:"base",children:"Sorting and Filters"}),Object(y.jsx)(ve.c,{}),Object(y.jsx)(ve.b,{children:Object(y.jsxs)(i.a,{color:"blue.800",pb:4,spacing:4,children:[Object(y.jsx)(xe,{}),Object(y.jsx)(W,{}),Object(y.jsx)(_,{}),Object(y.jsx)(Y,{}),Object(y.jsx)(B,{})]})})]})]}))]})},ye=n(231),we=function(){var e=R().searchAPI,t=e.sort,n=e.setSort,a=t?A[t]:"Relevance";return Object(y.jsxs)(x.a,{align:"center",children:[Object(y.jsx)(m.a,{children:"Sorted by"}),Object(y.jsxs)(ye.a,{children:[Object(y.jsx)(ye.b,{as:U.a,color:"blue.500","data-testid":C.sortButton,ml:2,pl:2,pr:2,py:1,rightIcon:Object(y.jsx)(v.c,{}),variant:"link",children:a}),Object(y.jsxs)(ye.f,{"data-testid":C.sortDropdown,minW:"180",zIndex:"sticky",children:[Object(y.jsx)(ye.e,{"data-testid":C.sortItem,"data-value":"",onClick:function(){return n(void 0)},children:"Relevance"},"Relevance"),Object.entries(A).map((function(e){var t=Object(j.a)(e,2),a=t[0],c=t[1];return Object(y.jsx)(ye.e,{"data-testid":C.sortItem,"data-value":a,onClick:function(){return n(a)},children:c},a)}))]})]})]})},ke=function(){var e=Object(b.useRef)(!0),t=Object(ee.g)().push,n=R(),a=n.query,c=n.searchAPI,o=n.offset,s=n.limit,l=c.keywords,u=c.languages,d=c.sort,j=c.cdkType,f=c.cdkMajor,O=c.onSearch,h=c.tags,g=Object(oe.a)({offset:o,limit:s,query:a,keywords:l,languages:u,cdkMajor:f,cdkType:j,sort:d,tags:h}),m=g.page,v=g.pageLimit,x=g.results,p=function(e){var t,n;return Object(se.c)({cdkMajor:f,cdkType:j,keywords:l,query:null!==(t=e.q)&&void 0!==t?t:a,languages:u,sort:d,offset:null!==(n=e.offset)&&void 0!==n?n:o,tags:h})};return Object(b.useEffect)((function(){x.length&&(o<0||o>v)&&t(p(o<0?{offset:0}:{offset:v}))}),[x,o,v]),Object(b.useEffect)((function(){e.current?e.current=!1:O({replace:!0})}),[d,l,u,j,f,h]),Object(b.useEffect)((function(){window.scrollTo(0,0)}),[m]),Object(y.jsx)(r.a,{meta:{title:a||"Search",description:a?"".concat(x.length," results for ").concat(a," at Construct Hub"):"Search reusable components for your cloud application"},pageName:"search",children:Object(y.jsxs)(i.a,{direction:"column",maxW:"100vw",pb:4,px:4,spacing:4,children:[Object(y.jsx)(ie.a,{bg:"white",onChange:c.onQueryChange,onSubmit:function(e){c.setSort(void 0),c.onSubmit(e)},value:c.query}),Object(y.jsxs)(i.a,{align:{base:"start",lg:"center"},direction:{base:"column-reverse",lg:"row"},justify:{base:"initial",lg:"space-between"},spacing:4,children:[Object(y.jsx)(ge,{count:x.length,filtered:!!a,limit:s,offset:o,query:a}),Object(y.jsx)($.a,{display:{base:"none",md:"initial"},children:Object(y.jsx)(we,{})}),Object(y.jsx)($.a,{display:{md:"none"},children:Object(y.jsx)(pe,{})})]}),Object(y.jsx)(re,{items:m}),Object(y.jsx)($.a,{w:"full",children:Object(y.jsx)(fe,{getPageUrl:p,offset:o,pageLimit:v})})]})})},Ce=function(){return Object(y.jsx)(K,{children:Object(y.jsx)(r.a,{meta:{title:"Search - Construct Hub",description:"Search Construct Libraries for AWS CDK, CDK8s, and CDKtf"},pageName:"search",children:Object(y.jsxs)(c.a,{"data-testid":C.page,gap:4,h:"full",maxW:"100%",px:{base:0,md:6},py:6,templateColumns:{base:"1fr",md:"auto 1fr"},templateRows:"1fr",children:[Object(y.jsx)(X,{}),Object(y.jsx)(ke,{})]})})})}}}]);
2
+ //# sourceMappingURL=8.bda93301.chunk.js.map