(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9747],{67028:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/community/collections/[slug]",function(){return t(52430)}])},63254:function(e,n,t){"use strict";t.d(n,{Z:function(){return ThreadBreadcrumb}});var o=t(85893),l=t(45697),i=t.n(l),a=t(70694),r=t(65970);function ThreadBreadcrumb(e){var n=e.heading;return(0,o.jsx)("div",{className:"w-full",children:(0,o.jsx)(r.Z,{href:"/community",children:(0,o.jsx)(a.Z,{background:!0,className:"mb-fixed-xl",iconBg:"white",iconSize:"sm",item:{heading:n,icon:"arrow-left"},scaleIcons:"inline",themeColor:"grey-20"})})})}ThreadBreadcrumb.defaultProps={heading:"Learn to Loom"},ThreadBreadcrumb.propTypes={heading:i().string}},53974:function(e,n,t){"use strict";t.d(n,{Z:function(){return ThreadTestimonialCard}});var o=t(85893),l=t(93967),i=t.n(l),a=t(45697),r=t.n(a),d=t(25169);function TestimonialQuotation(e){var n=e.font,t=e.quotation,l=e.lineLength,a=e.transparent;return(0,o.jsx)("blockquote",{className:i()((0,d.h)(n).heading,a?"text-center":"md:text-center","thd-quote py-lg",l?"thd-max-".concat(l):"thd-max-2xl"),children:t})}var s=t(30830),u=t(3131),c=t(79682),m=t(92673),h=t(20434),v=t(56649);function ThreadTestimonialCard(e){var n,t,l,a,r,d,g,f,b,p=e.card,x=e.caseStudy,y=e.className,_=e.font,C=e.hideAvatar,T=e.hideLogos,j=e.themeColor,w=e.themeColorMode,N="white"===j,Z=null==p?void 0:null===(a=p.logo)||void 0===a?void 0:null===(l=a.image)||void 0===l?void 0:null===(t=l.asset)||void 0===t?void 0:null===(n=t.metadata)||void 0===n?void 0:n.dimensions,L=null==Z?void 0:Z.aspectRatio,S=(0,c.Z)(90,30,{aspectRatio:L,type:"horizontal-optimized"}),k=S.width,D=S.height,E="".concat(j,"-").concat({dark:"90",light:"10"}[w]),A="".concat(j,"-").concat({dark:"10",light:"90"}[w]);return(0,o.jsx)("figure",{className:i()(y,(0,m.b)(E).headerText,(0,m.b)(E).bg,"mx-auto thd-rounded-static",!N&&"p-fluid-sm lg:p-fluid-lg"),children:(0,o.jsxs)("div",{className:i()(N?"items-center":"md:items-center","flex flex-col justify-between md:h-full md:px-0"),style:{"--filter-color":null===(r=(0,m.b)(E))||void 0===r?void 0:r.logoFilter,"--logo-height":D+"px","--logo-width":k+"px"},children:[x&&(null==p?void 0:p.byline)&&(0,o.jsx)(u.Z,{byline:null==p?void 0:p.byline,themeColor:E}),(null==p?void 0:null===(d=p.logo)||void 0===d?void 0:d.image)&&!x&&!T&&(0,o.jsx)("img",{alt:null==p?void 0:null===(g=p.byline)||void 0===g?void 0:g.company,className:"thd-filter thd-logo w-full h-full",height:D,src:(0,h.ZP)(null==p?void 0:null===(f=p.logo)||void 0===f?void 0:f.image).url(),width:k,loading:"lazy"}),(null==p?void 0:p.quotation)&&(0,o.jsx)(TestimonialQuotation,{font:_,quotation:null==p?void 0:p.quotation,transparent:N}),!x&&(null==p?void 0:p.byline)&&(0,o.jsx)(u.Z,{byline:null==p?void 0:p.byline,hideAvatar:C,themeColor:E,transparent:N}),x&&(0,o.jsx)(s.Z,{buttonType:"secondary",color:A,cta:{link:"/customers/".concat((0,v.Z)(null==p?void 0:null===(b=p.byline)||void 0===b?void 0:b.company)),copy:"View Case Study"},size:"lg",type:"primary"})]})})}ThreadTestimonialCard.propTypes={card:r().object,caseStudy:r().bool,className:r().string,font:r().string,themeColor:r().string.isRequired,themeColorMode:r().string.isRequired},ThreadTestimonialCard.defaultProps={caseStudy:!1,themeColor:"violet",themeColorMode:"light",font:"xs"}},79195:function(e,n,t){"use strict";t.d(n,{Z:function(){return ThreadTestimonialCarousel}});var o=t(24043),l=t(85893),i=t(88780),a=t(84224),r=t(93967),d=t.n(r),s=t(67294),u=t(53974),c=t(92673),m=t(37926),h=t.n(m);function ThreadTestimonialCarousel(e){var n,t=e.bgVar,r=e.cards,m=e.className,v=e.font,g=e.lineLength,f=e.themeColorMode,b=e.hideLogos,p=(0,o._)((0,s.useState)(1),2),x=p[0],y=p[1],_=(0,o._)((0,s.useState)(!0),2),C=_[0],T=_[1];(0,s.useEffect)(function(){(1===x||x===r.length)&&T(!0)},[x,1,r.length]);var prev=function(){x>0&&y(function(e){return e-1})},j={0:"violet",1:"blue",2:"magenta",3:"green",4:"violet",5:"blue",6:"magenta",7:"green",8:"violet",9:"blue",10:"magenta",11:"green"},w=s.cloneElement((0,l.jsx)(u.Z,{card:r[0],font:v,index:-1===x,themeColor:j[0],themeColorMode:f},"cloneFirst")),N=s.cloneElement((0,l.jsx)(u.Z,{card:r[r.length-1],font:v,index:x===r.length,prev:prev,style:{transform:"translate3d(-100%, 0, 0)"},themeColor:j[(null==r?void 0:r.length)-1],themeColorMode:f},"cloneLast")),handleTransitionEnd=function(){0===x?(T(!1),y(r.length)):x===r.length+1&&(T(!1),y(1))};return(0,l.jsx)("section",{className:d()(h().container,m,"sm:gap-fluid-sm pb-fluid-lg lg:pb-0 lg:mb-fluid-lg overflow-x-hidden"),style:{"--gradientColor":t},children:(0,l.jsxs)("div",{className:"flex relative h-full w-full",children:[(0,l.jsx)("button",{"aria-label":"Previous testimonial",className:h().left,onClick:prev,type:"button",children:(0,l.jsx)(a.Z,{icon:(0,l.jsx)(i.Z,{}),size:"1.5em"})}),(0,l.jsx)("div",{className:"flex h-full w-full overflow-hidden",children:(0,l.jsxs)("div",{className:d()(h().content),onTransitionEnd:function(){return handleTransitionEnd()},style:{"--cardCount":r.length+2,"--transformValue":x,transition:C?void 0:"none","--curtainGradient":null===(n=(0,c.b)(null!=t?t:"white"))||void 0===n?void 0:n.bgVar},children:[N,null==r?void 0:r.map(function(e,n){return(0,l.jsx)(u.Z,{hideLogos:b,card:e,font:v,index:x===n+1,lineLength:g,themeColor:j[n],themeColorMode:f},n)}),w]})}),(0,l.jsx)("button",{"aria-label":"Next testimonial",className:h().right,onClick:function(){xslug.current)[@ in [$slug]]) > 0 && (\n _createdAt < $lastCreatedAt\n || (_createdAt == $lastCreatedAt && _id > $lastId)\n )] | order(_createdAt desc) [0...44] {\n "loomPage": *[_type=="learnLoomTemplate" && references(^._id)] {\n "slug": meta.slug.current,\n },\n _id,\n length,\n _createdAt,\n meta,\n categories[]->,\n loom {\n ...,\n thumbnail {\n altText,\n asset-> {\n url,\n metadata {\n dimensions {\n height,\n width\n }\n },\n }\n },\n },\n author-> {\n ...,\n avatar {\n altText,\n asset-> {\n url,\n metadata {\n dimensions {\n height,\n width\n }\n },\n }\n }\n },\n }\n}\n']);return _templateObject=function(){return e},e}var S=v()(function(){return Promise.all([t.e(9256),t.e(8809)]).then(t.bind(t,57900))},{loadableGenerated:{webpack:function(){return[57900]}}}),k=m()(_templateObject()),D=!0;function LearnCategoryTemplate(e){var n,t,i,s,c,m,h,v,D,E,A,P,M,q,z,B,I=e.accountNavData,O=e.eopData,$=e.footerNavData,R=e.initialData,V=e.logoData,F=e.navData,G=e.postData,J=e.testimonialData,Q=null==R?void 0:R.$slug,X=(0,l._)((0,g.useState)(G?G.looms:[]),2),U=X[0],H=X[1],K=(0,l._)((0,g.useState)((null==G?void 0:null===(t=G.looms)||void 0===t?void 0:t.length)>0?G.looms[G.looms.length-1]._createdAt:""),2),W=K[0],Y=K[1],ee=(0,l._)((0,g.useState)((null==G?void 0:null===(i=G.looms)||void 0===i?void 0:i.length)>0?G.looms[G.looms.length-1]._id:null),2),en=ee[0],et=ee[1],eo=(0,l._)((0,g.useState)([]),2),el=eo[0],ei=eo[1],ea=(0,g.useRef)();(0,g.useMemo)(function(){var e=(null==R?void 0:R.pinnedLooms)||[];ei(e.filter(function(e){return!!e}).map(function(e){return e.loom._id}));var n=(null==G?void 0:G.looms)||[];el.length&&n.length&&(n=n.filter(function(e){var n=e._id;return!el.includes(n)})),H((0,a._)(e).concat((0,a._)(n)))},[G,H,R,ei]);var er=(n=(0,o._)(function(){var e;return(0,r.Jh)(this,function(n){switch(n.label){case 0:if(null===en)return[2,[]];return[4,(0,L.gn)(k,{lastCreatedAt:W,lastId:en,slug:Q})];case 1:return(null==(e=n.sent().looms)?void 0:e.length)>0?(Y(e[e.length-1]._createdAt),et(e[e.length-1]._id),el.length&&(e=e.filter(function(e){var n=e._id;return!el.includes(n)})),H((0,a._)(U).concat((0,a._)(e)))):et(null),[2]}})}),function(){return n.apply(this,arguments)});(0,g.useEffect)(function(){if(ea&&ea.current){var e=new IntersectionObserver(function(e){e.some(function(e){return e.isIntersecting})&&er()},{threshold:.1});return ea.current&&e.observe(ea.current),function(){return e.disconnect()}}},[ea,er]);var ed=(null==R?void 0:R.category)&&(null==R?void 0:null===(s=R.category)||void 0===s?void 0:s._id)==="bb7a0cbb-1c2f-42c4-b6f8-048507de3390";return((0,g.useEffect)(function(){var e;(0,N.L9)(w.lJ,{source:"Learn to Loom Page ".concat(Q),category:null==R?void 0:null===(e=R.category)||void 0===e?void 0:e.title,isCommunityCollection:ed})},[Q]),null==R?void 0:R.category)?(0,d.jsxs)(b.Z,{accountNavData:I,footerNavData:$,name:"Learn to Loom Category [".concat(null==R?void 0:null===(m=R.meta)||void 0===m?void 0:null===(c=m.slug)||void 0===c?void 0:c.current,"]"),navData:F,children:[(0,d.jsx)(x.Z,{data:null==R?void 0:R.meta,isCustomDescription:null!==(B=null==R?void 0:null===(h=R.meta)||void 0===h?void 0:h.description)&&void 0!==B?B:(0,f.blockContentToPlainText)(null==R?void 0:null===(v=R.category)||void 0===v?void 0:v.description),isCustomImage:"https://cdn.sanity.io/images/pvn35iyy/production/74d348fb150b2f37076655b04c36ddf68eed23d5-1200x675.png",isCustomTitle:"".concat(null==R?void 0:null===(D=R.category)||void 0===D?void 0:D.title," | From The Loom Community | Community"),url:"https://patgrady.indiedemos.com/community/collections/".concat(null==R?void 0:null===(A=R.meta)||void 0===A?void 0:null===(E=A.slug)||void 0===E?void 0:E.current)}),(0,d.jsxs)("section",{className:"mx-auto mb-fluid-lg relative pt-fluid-md overflow-hidden translate-x-0",children:[(0,d.jsx)("div",{className:"absolute h-full left-0 pointer-events-none overflow-hidden top-0 w-full",children:(0,d.jsx)("div",{className:u()("thd-gradient-bubble-t",null===(P=(0,Z.b)("violet-20"))||void 0===P?void 0:P.bg)})}),(0,d.jsxs)("div",{className:"thd-container-max",children:[(0,d.jsx)(_.Z,{heading:"Community"}),(0,d.jsx)(T.Z,{bFont:"lg",gap:"mb-md",hFont:"xl",hLevel:"h1",header:{heading:null==R?void 0:null===(M=R.category)||void 0===M?void 0:M.title,subhead:null==R?void 0:null===(q=R.category)||void 0===q?void 0:q.description}})]}),(0,d.jsx)(p.Z,{allowInfiniteScroll:!0,cards:U,heading:null==R?void 0:null===(z=R.recommendedBlock)||void 0===z?void 0:z.heading,section:"collection",showCommunity:!0,showVideoCount:"12"}),en?(0,d.jsx)("div",{ref:ea}):null]}),V&&(0,d.jsx)(y.Z,{data:V,gradient:!0,lineLength:"xl",themeColor:"grey-10"}),J&&(0,d.jsx)(j.Z,{cards:null==J?void 0:J.list,className:"mb-fluid-lg",themeColorMode:"light"}),(null==O?void 0:O.cta)?(0,d.jsx)(C.Z,{cta:null==O?void 0:O.cta,heading:null==O?void 0:O.heading}):(0,d.jsx)("div",{className:"h-fluid-lg thd-prefooter",style:{"--footer-bg":"var(--thd-color-violet-10)"}})]}):(0,d.jsx)(S,{})}},37926:function(e){e.exports={container:"ThreadTestimonialCarousel_container__3hu57",left:"ThreadTestimonialCarousel_left__ioRt3",right:"ThreadTestimonialCarousel_right__9bhB0",content:"ThreadTestimonialCarousel_content__ODboU",avatar:"ThreadTestimonialCarousel_avatar__3d3SV"}}},function(e){e.O(0,[2786,2673,3358,37,9267,476,5153,5142,2374,900,7702,3523,562,4387,1792,1551,9774,2888,179],function(){return e(e.s=67028)}),_N_E=e.O()}]);