PageSourceSearch

https://www.educative.io/static/_next/static/chunks/788174-cb10dc4a475d757a.js

js educative.io collected 2026-09-24 08:38:05 UTC 108,075 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[788174,920825,248560,214901],{216962:function(e,t,n){"use strict";var r,l,s,a=n(523590);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}t.Z=function(e){return a.createElement("svg",i({width:20,height:20,viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=a.createElement("mask",{id:"cloudlab-feature-icon",fill:"#fff"},a.createElement("path",{d:"M4.167 17.083c-.532 0-.91-.237-1.134-.711-.224-.475-.17-.916.163-1.324l4.72-5.737V4.167h-.993a.605.605 0 0 1-.445-.18.605.605 0 0 1-.18-.446c0-.177.06-.325.18-.445s.268-.18.445-.18h6.154c.177 0 .325.06.445.18s.18.269.18.446-.06.326-.18.445a.605.605 0 0 1-.445.18h-.994V9.31l4.721 5.737c.333.408.387.85.163 1.324-.224.474-.602.711-1.134.711H4.167Zm0-1.25h11.666l-5-6.083V4.167H9.167V9.75l-5 6.083Z"}))),l||(l=a.createElement("path",{d:"M4.167 17.083c-.532 0-.91-.237-1.134-.711-.224-.475-.17-.916.163-1.324l4.72-5.737V4.167h-.993a.605.605 0 0 1-.445-.18.605.605 0 0 1-.18-.446c0-.177.06-.325.18-.445s.268-.18.445-.18h6.154c.177 0 .325.06.445.18s.18.269.18.446-.06.326-.18.445a.605.605 0 0 1-.445.18h-.994V9.31l4.721 5.737c.333.408.387.85.163 1.324-.224.474-.602.711-1.134.711H4.167Zm0-1.25h11.666l-5-6.083V4.167H9.167V9.75l-5 6.083Z",fill:"currentColor"})),s||(s=a.createElement("path",{d:"m3.033 16.372 1.357-.64-1.357.64Zm.163-1.324-1.159-.953-.004.006 1.163.947Zm4.72-5.737 1.159.953.342-.415V9.31h-1.5Zm0-5.144h1.5v-1.5h-1.5v1.5Zm-1.438-.18-1.062 1.06h.001l1.06-1.06Zm0-.89 1.06 1.06-1.06-1.06Zm7.044 0 1.062-1.06-.001-.001-1.06 1.06Zm0 .89-1.06-1.061 1.06 1.061Zm-1.439.18v-1.5h-1.5v1.5h1.5Zm0 5.144h-1.5v.538l.342.415 1.158-.953Zm4.721 5.737 1.164-.947-.005-.006-1.159.953Zm.163 1.324-1.356-.64 1.356.64Zm-12.8-.539-1.16-.952-2.015 2.452h3.175v-1.5Zm11.666 0v1.5h3.175l-2.016-2.452-1.159.952Zm-5-6.083h-1.5v.537l.342.415 1.158-.952Zm0-5.583h1.5v-1.5h-1.5v1.5Zm-1.666 0v-1.5h-1.5v1.5h1.5Zm0 5.583 1.159.953.34-.416V9.75h-1.5Zm-5 7.333v-1.5c-.039 0 .023-.006.115.052a.408.408 0 0 1 .093.08c.02.022.022.031.015.016l-1.357.64-1.356.642c.213.45.539.867 1.01 1.163.47.295.986.407 1.48.407v-1.5Zm-1.134-.711 1.357-.64c-.008-.017-.003-.01.002.016a.4.4 0 0 1-.028.234c-.011.024-.017.028-.005.013l-1.163-.947-1.163-.947a2.741 2.741 0 0 0-.616 1.402c-.067.55.05 1.063.26 1.51l1.356-.641Zm.163-1.324 1.158.953 4.721-5.737-1.158-.953-1.159-.953-4.72 5.737 1.158.953Zm4.72-5.737h1.5V4.167h-3V9.31h1.5Zm0-5.144v-1.5h-.993v3h.994v-1.5Zm-.993 0v-1.5a.9.9 0 0 1 .615.26l-1.06 1.06-1.06 1.06c.414.415.95.62 1.505.62v-1.5Zm-.445-.18 1.061-1.06a.9.9 0 0 1 .26.614h-3c0 .555.203 1.09.617 1.506l1.062-1.06Zm-.18-.446h1.5a.901.901 0 0 1-.26.616l-1.06-1.06-1.06-1.062c-.416.415-.62.952-.62 1.506h1.5Zm.18-.445 1.06 1.062a.9.9 0 0 1-.615.259v-3c-.554 0-1.09.203-1.505.618l1.06 1.061Zm.445-.18v1.5h6.154v-3H6.923v1.5Zm6.154 0v1.5a.9.9 0 0 1-.615-.26l1.06-1.06 1.061-1.06a2.104 2.104 0 0 0-1.506-.62v1.5Zm.445.18-1.06 1.06a.898.898 0 0 1-.26-.614h3c0-.555-.204-1.09-.618-1.506l-1.062 1.06Zm.18.446h-1.5a.903.903 0 0 1 .26-.616l1.06 1.061 1.06 1.061c.416-.415.62-.952.62-1.506h-1.5Zm-.18.445-1.06-1.061a.9.9 0 0 1 .615-.26v3c.555 0 1.09-.203 1.505-.618l-1.06-1.06Zm-.445.18v-1.5h-.994v3h.994v-1.5Zm-.994 0h-1.5V9.31h3V4.167h-1.5Zm0 5.144-1.158.953 4.721 5.737 1.158-.953 1.159-.953-4.721-5.737-1.159.953Zm4.721 5.737-1.163.947c.013.015.006.011-.005-.013a.399.399 0 0 1-.028-.234c.005-.027.01-.033.002-.017l1.357.64 1.356.642c.211-.447.328-.96.26-1.51a2.74 2.74 0 0 0-.615-1.402l-1.164.947Zm.163 1.324-1.357-.64c-.007.014-.004.005.015-.018a.407.407 0 0 1 .093-.079c.092-.058.154-.052.115-.052v3c.494 0 1.01-.112 1.48-.407a2.723 2.723 0 0 0 1.01-1.163l-1.356-.641Zm-1.134.711v-1.5H4.167v3h11.666v-1.5Zm-11.666-1.25v1.5h11.666v-3H4.167v1.5Zm11.666 0 1.16-.952-5-6.083-1.16.952-1.158.953 5 6.083 1.158-.953Zm-5-6.083h1.5V4.167h-3V9.75h1.5Zm0-5.583v-1.5H9.167v3h1.666v-1.5Zm-1.666 0h-1.5V9.75h3V4.167h-1.5Zm0 5.583-1.16-.952-5 6.083 1.16.952 1.159.953 5-6.084-1.16-.952Z",fill:"currentColor",mask:"url(#cloudlab-feature-icon)"})))}},94520:function(e,t,n){"use strict";var r,l=n(523590);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}t.Z=function(e){return l.createElement("svg",s({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=l.createElement("path",{d:"M8.33333 15h3.33337v-1.6667H8.33333V15ZM2.5 5v1.66667h15V5h-15ZM5 10.8333h10V9.16667H5v1.66663Z",fill:"currentColor"})))}},805003:function(e,t,n){"use strict";n.r(t);var r,l,s,a,i,o,c=n(523590);function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}t.default=function(e){return c.createElement("svg",d({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=c.createElement("path",{d:"M14.6503 2.84961C15.3164 2.84961 15.9467 3.11041 16.4179 3.58105V3.58203C16.8884 4.0527 17.1502 4.68206 17.1503 5.34863V14.6514C17.1497 16.0299 16.0288 17.1504 14.6503 17.1504H5.34857C4.68221 17.1504 4.05206 16.8887 3.58099 16.417C3.11043 15.946 2.84955 15.3164 2.84955 14.6504V5.34863C2.84973 3.97072 3.96996 2.84969 5.34857 2.84961H14.6503Z",
1stroke:"currentColor",strokeWidth:1.3,strokeMiterlimit:10})),l||(l=c.createElement("path",{d:"M7.99994 13.5H11.9999",stroke:"currentColor",strokeMiterlimit:10})),s||(s=c.createElement("path",{d:"M5.24988 9.33992L7.07752 7.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),a||(a=c.createElement("path",{d:"M8.9047 9.3522L7.07751 7.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),i||(i=c.createElement("path",{d:"M10.9999 9.35948L12.8271 7.52002",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),o||(o=c.createElement("path",{d:"M14.6547 9.37234L12.827 7.52014",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})))}},58652:function(e,t,n){"use strict";n.r(t);var r,l,s=n(523590);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}t.default=function(e){return s.createElement("svg",a({width:21,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=s.createElement("path",{d:"M10.5 1.7c1 0 2 .7 2.3 1.6h3.5c1 0 1.7.8 1.7 1.7v11.7c0 .9-.8 1.6-1.7 1.6h-12A1.7 1.7 0 0 1 3 16.7V5l.1-.6a1.7 1.7 0 0 1 1.6-1h3.5c.3-1 1.2-1.7 2.3-1.7Zm-5.8 15h11.6V5H4.7v11.7ZM10.5 3c-.3 0-.6.3-.6.6 0 .4.3.7.6.7s.6-.3.6-.7c0-.3-.3-.6-.6-.6Z",fill:"currentColor"})),l||(l=s.createElement("path",{d:"M6.3 13.3h5.9V15H6.3v-1.7ZM6.3 10h8.4v1.7H6.3V10ZM6.3 6.7h8.4v1.6H6.3V6.7Z",fill:"currentColor"})))}},267601:function(e,t,n){"use strict";n.r(t);var r,l,s=n(523590);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}t.default=function(e){return s.createElement("svg",a({width:20,height:20,fill:"none",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=s.createElement("path",{d:"M13.208 5.4h-11A1.38 1.38 0 0 0 .833 6.775V19.15l2.75-2.75h9.625a1.38 1.38 0 0 0 1.375-1.375v-8.25A1.38 1.38 0 0 0 13.208 5.4m0 9.625H3.013l-.805.804V6.775h11z",fill:"
1currentColor"})),l||(l=s.createElement("path",{fill:"currentColor",d:"M4.373 12.285h7.078v-1.18H4.373zm0-3.54h7.078v1.18H4.373zm11.96-1.685a.07.07 0 0 1-.069-.053l-.472-1.712a.58.58 0 0 0-.414-.407l-1.71-.432a.07.07 0 0 1-.055-.07c0-.032.022-.061.054-.07l1.712-.472a.58.58 0 0 0 .407-.413l.432-1.71a.072.072 0 0 1 .14-.001l.472 1.712c.054.2.212.355.413.407l1.71.432a.072.072 0 0 1 0 .14l-1.713.472a.58.58 0 0 0-.405.413l-.432 1.71a.07.07 0 0 1-.07.054"})))}},718619:function(e,t,n){"use strict";var r,l=n(523590);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}t.Z=function(e){return l.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"feather feather-bookmark"},e),r||(r=l.createElement("path",{d:"M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"})))}},800437:function(e,t,n){"use strict";n.r(t);var r,l=n(523590);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}t.default=function(e){return l.createElement("svg",s({width:12,height:12,viewBox:"0 0 12 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=l.createElement("path",{d:"M7.61989 4.66651L6.63989 1.43984C6.44656 0.80651 5.55322 0.80651 5.36656 1.43984L4.37989 4.66651H1.41322C0.766558 4.66651 0.499891 5.49984 1.02656 5.87318L3.45322 7.60651L2.49989 10.6798C2.30656 11.2998 3.02656 11.7998 3.53989 11.4065L5.99989 9.53984L8.45989 11.4132C8.97322 11.8065 9.69322 11.3065 9.49989 10.6865L8.54656 7.61318L10.9732 5.87984C11.4999 5.49984 11.2332 4.67318 10.5866 4.67318H7.61989V4.66651Z",fill:"currentColor"})))}},779264:function(e,t,n){"use strict";n.r(t);var r,l=n(523590);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}t.default=function(e){return l.createElement("svg",s({width:20,height:20,viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.5 2.5V8.33333H11.6667L14.125 5.875C13.0667 4.825 11.6083 4.16667 10 4.16667C6.78333 4.16667 4.16667 6.78333 4.16667 10C4.16667 13.2167 6.78333 15.8333 10 15.8333C13.2167 15.8333 15.8333 13.2167 15.8333 10H17.5C17.5 14.1417 14.1417 17.5 10 17.5C5.85833 17.5 2.5 14.1417 2.5 10C2.5 5.85833 5.85833 2.5 10 2.5C12.075 2.5 13.95 3.34167 15.3 4.7L17.5 2.5ZM9.16667 10.8333V6.66667H10.4167V10.125L13.35 11.8667L12.7083 12.9333L9.16667 10.8333Z",fill:"currentColor"})))}},356513:function(e,t,n){"use strict";var r,l=n(523590);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}t.Z=function(e){return l.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:14,height:14,fill:"none",viewBox:"0 0 14 14"},e),r||(r=l.createElement("path",{fill:"#22C55E",d:"M6.999.333A6.67 6.67 0 0 0 .332 7a6.67 6.67 0 0 0 6.667 6.667A6.67 6.67 0 0 0 13.665 7 6.67 6.67 0 0 0 7 .333Zm-1.334 10L2.332 7l.94-.94 2.393 2.387 5.06-5.06.94.946-6 6Z"})))}},402678:function(e,t,n){"use strict";var r,l,s=n(523590);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}t.Z=function(e){return s.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 40",width:50,height:40,fill:"none"},e),r||(r=s.createElement("path",{fill:"url(#fenzo-gradient-unique)",mask:"url(#fenzo-diamond-mask)",d:"M48.818 18.902 30.368.457a1.537 1.537 0 0 0-2.184 0l-3.177 3.176-3.181-3.18a1.54 1.54 0 0 0-2.18 0L1.183 18.914a1.545 1.545 0 0 0 0 2.185l18.445 18.444a1.543 1.543 0 0 0 2.188 0l3.177-3.172 3.177 3.177a1.554 1.554 0 0 0 2.185 0l18.463-18.463a1.545 1.545 0 0 0 0-2.184Z"})),l||(l=s.createElement("defs",null,s.createElement("linearGradient",{id:"fenzo-gradient-unique",x1:.73,x2:55.668,y1:2.5,y2:20.96,gradientUnits:"userSpaceOnUse"},s.createElement("stop",{stopColor:"#2563EB"}),s.createElement("stop",{offset:1,stopColor:"#64E4D0"})),s.createElement("mask",{id:"fenzo-diamond-mask"},s.createElement("rect",{width:50,height:40,fill:"white"}),s.createElement("path",{fill:"black",d:"M26.271 6.456A20.763 20.763 0 0 0 38.535 18.72c1.183.44 1.183 2.112 0 2.551A20.763 20.763 0 0 0 26.27 33.535c-.44 1.183-2.111 1.183-2.551 0A20.763 20.763 0 0 0 11.457 21.27c-1.183-.44-1.183-2.111 0-2.551A20.763 20.763 0 0 0 23.72 6.456c.44-1.182 2.112-1.182 2.551 0Z"})))))}},587491:function(e,t,n){"use strict";var r,l,s=n(523590);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}t.Z=function(e){return s.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 0 24 24",width:24},e),r||(r=s.createElement("path",{d:"M0 0h24v24H0z",fill:"none"})),l||(l=s.createElement("path",{d:"M19 6.4L17.6 5 12 10.6 6.4 5 5 6.4l5.6 5.6L5 17.6 6.4 19l5.6-5.6 5.6 5.6 1.4-1.4-5.6-5.6z"})))}},834914:function(e,t,n){"use strict";var r,l,s=n(523590);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}t.Z=function(e){return s.createElement("svg",a({width:20,height:20,viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=s.createElement("g",{clipPath:"url(#clip0_6146_1634)"},s.createElement("path",{d:"M15.8333 7.49992L16.875 5.20825L19.1666 4.16659L16.875 3.12492L15.8333 0.833252L14.7916 3.12492L12.5 4.16659L14.7916 5.20825L15.8333 7.49992Z",fill:"currentColor"}),s.createElement("path",{d:"M15.8333 12.4999L14.7916 14.7916L12.5 15.8333L14.7916 16.8749L15.8333 19.1666L16.875 16.8749L19.1666 15.8333L16.875 14.7916L15.8333 12.4999Z",fill:"currentColor"}),s.createElement("path",{d:"M9.58331 7.91659L7.49998 3.33325L5.41665 7.91659L0.833313 9.99992L5.41665 12.0833L7.49998 16.6666L9.58331 12.0833L14.1666 9.99992L9.58331 7.91659ZM8.32498 10.8249L7.49998 12.6416L6.67498 10.8249L4.85831 9.99992L6.67498 9.17492L7.49998 7.35825L8.32498 9.17492L10.1416 9.99992L8.32498 10.8249Z",fill:"currentColor"}))),l||(l=s.createElement("defs",null,s.createElement("clipPath",{id:"clip0_6146_1634"},s.createElement("rect",{width:20,height:20,fill:"white"})))))}},917451:function(e,t,n){"use strict";var r,l;n.d(t,{o:function(){return r}}),(l=r||(r={})).WAIT="WAIT",l.SUCCESS="SUCCESS",l.ERROR="ERROR",l.INFO="INFO"},366507:function(e,t,n){"use strict";n.d(t,{b:function(){return s}});var r=n(940938),l=n(628761);let s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.dL.COLLECTION,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.Ss.REGULAR;return(0,r.Z)({url:"/api/pinwork?work_type=".concat(t).concat(t===l.dL.PATH?"&path_type="+n:""),type:"PUT",data:e})}},561052:function(e,t,n){"use strict";n.d(t,{R:function(){return s}});var r=n(940938),l=n(628761);let s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.dL.COLLECTION;
1return(0,r.Z)({url:"/api/unpinwork?work_type=".concat(t),type:"PUT",data:e})}},129872:function(e,t,n){"use strict";n.d(t,{c:function(){return s}});var r=n(574101),l=n(167506);let s=e=>{Promise.all([n.e(758515),n.e(182890)]).then(n.bind(n,182890)).then(t=>{let n=t.default;(0,l.K)((0,r.jsx)(n,{params:e}))})}},26094:function(e,t,n){"use strict";n.r(t);var r=n(574101),l=n(441386),s=n(697279),a=n(770529),i=n.n(a),o=n(185077),c=n(676799),d=n(237818),u=n.n(d),h=n(937590),p=n(185078);t.default=e=>{let{showToast:t,icon:n="",iconClassName:a="",title:d="",onClose:f,additionalActionCTA:m}=e,v=(0,l.useRef)("undefined"!=typeof document&&document.createElement("div")),g=(0,l.useRef)(null),x=(0,c.a)("sm");return(0,l.useEffect)(()=>{let e="undefined"!=typeof document&&document.body;if(t&&e&&v.current){var n,r,l,s;let t=v.current;t.className="".concat(i().toastComponentStyleOne),t.style.zIndex=String(h.sM+1),t.style.top=x?"":"calc(var(--header-height) + var(--banner-height, 0rem) + var(--site-wide-banner-height, 0rem))",e.append(t);let a=null!==(l=null===u()||void 0===u()?void 0:null===(n=u().toastAnimationDuration)||void 0===n?void 0:n.replace("s",""))&&void 0!==l?l:"1",o=null!==(s=null===u()||void 0===u()?void 0:null===(r=u().toastAnimationStayDuration)||void 0===r?void 0:r.replace("s",""))&&void 0!==s?s:"3",c=1e3*Number(a)+1e3*Number(o);return g.current=setTimeout(()=>f(),c),()=>{try{t&&e&&e.contains(t)&&e.removeChild(t)}catch(e){(0,p.u)(Error("Error removing toast"),e)}clearTimeout(g.current)}}},[t,x,f]),t?(0,s.createPortal)((0,r.jsxs)("div",{className:"".concat(u().toastComponent," \n          ").concat(i().toastComponent," \n          ").concat(u()["toastAnimation-enter-active"],"\n          ").concat(i().defaultBackground,"\n          ").concat(i().successBorder," \n          ").concat(i().toastComponentBorder," \n          ").concat(i().width96," \n          ").concat(o.Z.className," \n          ").concat(o.Z.variable),children:[n&&(0,r.jsx)("span",{className:"".concat(i().flex," ").concat(i().marginTopHalf),children:(0,r.jsx)(n,{className:a})}),(0,r.jsxs)("div",{className:i().parentDiv,children:[d&&(0,r.jsx)("p",{className:i().title,children:d}),m&&(0,r.jsx)("span",{children:m})]})]}),v.current):null}},944139:function(e,t,n){"use strict";n.d(t,{VG:function(){return i.V},ik:function(){return o},xs:function(){return c}});var r=n(718102),l=n(129872),s=n(669473),a=n(750970),i=n(716370);let o=e=>{let{id:t,collection_id:n,doc_type:r,work_type:l,author_id:s,owned_by_reader:i,is_priced:o,course_url_slug:c}=e,d=o&&!i?"/page/preview/".concat(s,"/").concat(t):"/page/".concat(s,"/").concat(t),u=(0,a.Z)({authorId:String(s),collectionId:String(null!=t?t:n),courseUrlSlug:c,workType:r||l});return"page"===r?d:u},c=(e,t,n,a,i,o,c,d,u,h,p,f,m,v)=>{h?((0,r.q)({ru:p}),(0,s.Z)(c,d,u)):(n(e=>({...e,pinnedStatusData:{status:"WAIT",text:""}})),e({author_id:a,work_id:i},o).then(()=>{(0,s.Z)(c,d,u),n(e=>({pinned:!e.pinned,pinnedStatusData:{status:"",text:""}})),null==f||f(o),m("".concat(a,"_").concat(i),!t),v&&v()}).catch(e=>{let r=!["already bookmarked","not bookmarked"].some(t=>{var n,r;return null==e?void 0:null===(r=e.responseJSON)||void 0===r?void 0:null===(n=r.errorText)||void 0===n?void 0:n.includes(t)});n(e=>({...e,pinnedStatusData:{status:"",text:""}})),r?(0,l.c)({status:"ERROR",text:(null==e?void 0:e.statusText)==="Unauthorized"?"Unauthorized":"Could Not ".concat(t?"Unsave":"Save"," Collection")}):(n(e=>({...e,pinned:!e.pinned})),null==f||f(o))}))}},901416:function(e,t,n){"use strict";var r=n(574101),l=n(462031);t.Z=e=>{let{size:t=40,isShot:n=!1,color:s="text-indigo-500 dark:text-indigo-200"}=e;return(0,r.jsx)("div",{className:"flex w-full justify-center ".concat(n?"mb-24":""),children:(0,r.jsx)(l.Z,{isCentered:!0,size:t,color:s})})}},248560:function(e,t,n){"use strict";n.r(t);var r=n(574101),l=n(13858),s=n(26094),a=n(234780),i=n(409288),o=n(961574),c=n(718335),d=n(366507),u=n(561052),h=n(944139),p=n(901416),f=n(356513),m=n(142753),v=n(718619),g=n(861208);t.default=e=>{var t,n,x,y,w,S,_,C,b,L;let{pinned:j,setPinned:E,author_id:T,work_id:N,work_type:k,title:O,pinnedStatusData:I,eventCategory:R,eventActions:A,tileType:P,handleUnpinLearnSavedTab:Z,updateSavedWorkIds:B,btnClasses:M="",customStyle:z={},spinnerColor:F="text-indigo-500 dark:text-indigo-200",showToast:V=!1,setShowToast:D}=e,H=(0,l.usePathname)(),{userInfoState:q}=(0,g.su)(),W=(0,l.useRouter)(),U=null!==(t=null==P?void 0:P.toLowerCase())&&void 0!==t?t:"collection";return(0,r.jsxs)(i.default,{trigger:o.dQ,overlay:j?"Unsave this ".concat(U):"Save this ".concat(U),position:a.xR,showPointer:!1,children:[(0,r.jsx)("button",{className:"".concat(null!==(n=null==z?void 0:z.margin)&&void 0!==n?n:"m-0 mr-3 mt-2"," flex ").concat(null!==(x=null==z?void 0:z.height)&&void 0!==x?x:"h-10"," ").concat(null!==(y=null==z?void 0:z.width)&&void 0!==y?y:"w-10"," cursor-pointer items-center bg-transparent p-0 ").concat(null!==(w=null==z?void 0:z.iconHoverClass)&&void 0!==w?w:P===c.Y.PATH?"hover:bg-gray-D1200":"hover:bg-gray-L50 dark:hover:bg-gray-D1200"," disabled:bg-transparent ").concat(M),"aria-label":"Save/Unsave Button",onClick:e=>{e.preventDefault(),e.stopPropagation();let t=j?u.R:d.b;(0,h.xs)(t,j,E,T,N,k,R,j?A.unsave:A.save,O,q.loggedOut,H,j?Z:()=>{},B,!j&&D?()=>D(!0):void 0)}
1,disabled:"WAIT"===I.status&&!!(T&&N),children:"WAIT"===I.status?(0,r.jsx)(p.Z,{size:16,color:F}):j?(0,r.jsx)(v.Z,{className:"".concat(null!==(S=null==z?void 0:z.iconPinnedColorClass)&&void 0!==S?S:"fill-indigo-500 text-indigo-500 dark:fill-indigo-400 dark:text-indigo-400"," ").concat(null!==(_=null==z?void 0:z.iconSize)&&void 0!==_?_:"h-6 w-6")}):(0,r.jsx)(m.default,{className:"".concat(j?null!==(C=null==z?void 0:z.iconPinnedColorClass)&&void 0!==C?C:"fill-indigo-500 text-indigo-500 dark:fill-indigo-400 dark:text-indigo-400":null!==(b=null==z?void 0:z.iconUnPinnedColorClass)&&void 0!==b?b:"text-gray-L400 dark:text-gray-D500"," ").concat(null!==(L=null==z?void 0:z.iconSize)&&void 0!==L?L:"h-6 w-6")})}),V&&(0,r.jsx)(s.default,{showToast:V,icon:f.Z,iconClassName:"mt-0.5 w-4 h-4",title:"".concat(P," is saved"),onClose:()=>D(!1),additionalActionCTA:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"inline cursor-pointer p-0 underline",onClick:e=>{e.preventDefault(),e.stopPropagation(),W.push("/learn/saved")},children:"Click Here"})," ","to view saved ",P,"s"]})})]})}},649270:function(e,t,n){"use strict";n.d(t,{default:function(){return en}});var r,l,s,a,i=n(574101),o=n(13858),c=n(441386),d=n(884796),u=n(917451),h=n(676799),p=n(462031),f=n(436097),m=n(671750),v=n(544590),g=n(946003),x=n(771284),y=n(793808),w=n(953006),S=n(186692),_=e=>{let{filterName:t,options:n,onChangeOptions:r,isMultiFilter:l=!1,enableSearch:s=!1}=e,[a,o]=(0,c.useState)(""),[d,u]=(0,c.useState)(!1),h=(0,c.useRef)(null),p=(0,c.useRef)(),f=n.some(e=>e.checked),m=(0,c.useMemo)(()=>{let e=new Set;return n.filter(t=>{let n=t.id||t.name;return!e.has(n)&&(e.add(n),!0)})},[n]);(0,c.useEffect)(()=>{s&&m.length>0&&(p.current=new g.Z(m,{keys:["name"],threshold:.3,ignoreLocation:!0}))},[s,m]),(0,c.useEffect)(()=>{let e=e=>{h.current&&!h.current.contains(e.target)&&u(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,c.useEffect)(()=>{d||o("")},[d]);let v=(0,c.useMemo)(()=>{let e=m.filter(e=>e.checked);if(s&&a&&p.current){let t=p.current.search(a).map(e=>({...e.item})).filter(t=>!e.some(e=>e.id===t.id));return[...e,...t]}return l?[...m].sort((e,t)=>Number(t.checked)-Number(e.checked)):[...m]},[s,a,m,l]),_=(e,t)=>{r(l?n.map(n=>n.id===e?{...n,checked:t}:n):n.map(n=>({...n,checked:n.id===e&&t})))};return(0,i.jsxs)("div",{ref:h,className:"relative w-fit select-none",children:[(0,i.jsxs)("div",{className:"hover:bg-neutral-hover flex cursor-pointer items-center gap-x-3 rounded-full border border-solid px-4 py-2 ".concat(f?"bg-fill-hover s-brand-default":"s-gray-default"),onClick:()=>u(e=>!e),children:[(0,i.jsx)("p",{className:"content-default m-0",children:t}),(0,i.jsx)(y.Z,{className:"content-secondary fill-current transition-transform".concat(d?" rotate-180":"")})]}),d&&(0,i.jsxs)("div",{className:"s-gray-default bg-neutral-default absolute top-10 z-10 flex max-h-96 w-56 flex-col rounded-md border border-solid shadow-md",children:[s&&(0,i.jsx)("div",{className:"p-2",children:(0,i.jsx)(S.Z,{className:"lg:h-9",inputClass:"content-default-default placeholder:content-default-default",fontSizeClass:"font-normal text-sm content-default-default",hoverClasses:"hover:bg-white hover:dark:bg-gray-D1500",placeholder:"Search ".concat(t.toLowerCase()),defaultValue:"",type:"search",name:"search",autoComplete:"off",onChange:e=>{s&&o(e.target.value.trim())},borderStyling:"border border-solid border-gray-L100 lg:border-gray-L300 dark:border-gray-D1100 rounded"})}),(0,i.jsx)("div",{className:"overflow-y-scroll",children:v.map((e,t)=>{let{id:n,name:r,checked:s}=e;return(0,i.jsxs)("div",{className:"hover:bg-neutral-hover flex w-full cursor-pointer items-center gap-x-2 p-2",onClick:()=>_(n,!s),children:[(0,i.jsx)("div",{children:l?(0,i.jsx)(x.Z,{checked:s,"aria-label":r,onChange:()=>{}}):(0,i.jsx)(w.Z,{id:n,checked:s,"aria-label":r})}),(0,i.jsx)("p",{className:"content-default m-0",children:r})]},"".concat(n,"-").concat(t))})})]})]})},C=n(813114),b=n(997779),L=e=>{let{showLoadMore:t=!1}=e;return(0,i.jsxs)("div",{className:"flex h-full w-full flex-col items-center gap-y-5",style:{maxWidth:"1066px"},children:[(0,i.jsx)("div",{className:"grid w-full grid-cols-1 gap-y-4 sm:grid-cols-3 sm:gap-4 lg:grid-cols-4",children:Array.from({length:12}).map((e,t)=>(0,i.jsxs)(c.Fragment,{children:[(0,i.jsx)("div",{className:"tailwind-hidden sm:flex",children:(0,i.jsx)(C.Z,{})}),(0,i.jsx)("div",{className:"flex sm:hidden",children:(0,i.jsx)(b.SmallTrendingTileLoading,{})})]},"tile-".concat(t)))}),t&&(0,i.jsx)("div",{className:"flex h-11 w-72 bg-gray-L200 dark:bg-gray-D1100 lg:h-9 lg:w-28"})]})},j=n(634337),E=n(132217),T=n(850191),N=n(387335),k=n(162494),O=n(762254),I=n(252416),R=n(649726),A=e=>{let{isSmallScreen:t,results:n}=e;return(0,i.jsx)("div",{className:"grid w-full grid-cols-1 gap-y-4 sm:grid-cols-3 sm:gap-4 lg:grid-cols-4",children:n.map(e=>{let{_source:{id:n,author_id:r,collection_id:l,collection_title:s,brief_summary:a,collection_type:o,target_audience:c,read_time:d,url_slug:u,category_id:h,freemium_enabled:p,collections_group:f,is_priced:m,price:v,approval_update_time:g}}=e,x=new Date(new Date().setMonth(new Date().getMonth()-1)).toISOString();return t?"CODING_INTERVIEW_PREP"===f?(0,i.jsx)(j.Z,{featureType:E.z.ADAPTIVE_LEARNING,gaeEvent:{category:"LANDING_PAGE",action:"CLICKED_PAL_COLLECTION_TILE",label:"personalized interview prep"}}):"mock-interview"===o?(0,i.jsx)(I.D,{featureType:E.z.MOCK_INTERVIEW,dynamicTileContent:{title:s,redirectLink:"/mock-interview?category_id=".concat(h,"&interview_id=").concat(n),icon:(0,i.jsx)(T.default,{className:"h-5 w-5 fill-current","aria-label":"Mock Interview Tile Icon"}),colorClass:"text-orange-800",isFree:p,readTime:d}},n):(0,i.jsx)(R.Z,{hideIcons:!0,work:{author_id:String(r),id:l,title:s,brief_summary:a,workType:o,coverImageUrl:"",url:u,target_audience:c,read_time:d,course_url_slug:u}},n):"CODING_INTERVIEW_PREP"===f?(0,i.jsx)(k.Z,{featureType:E.z.ADAPTIVE_LEARNING,gaeEvent:{category:"LANDING_PAGE",action:"CLICKED_PAL_COLLECTION_TILE",label:"personalized interview prep"}}):"mock-interview"===o?(0,i.jsx)(k.o,{featureType:E.z.MOCK_INTERVIEW,dynamicTileContent:{title:s,briefSummary:a,redirectLink:"/mock-interview?category_id=".concat(h,"&interview_id=").concat(n),titleOverlay:"Mock Interview",icon:(0,i.jsx)(T.default,{className:"h-5 w-5 fill-current","aria-label":"Mock Interview Tile Icon"}),isFree:p,readTime:String(d)}},n):(0,i.jsx)(N.Z,{tileType:(0,O.ni)(o),title:s,authorId:r,workId:l,brief_summary:a,target_audience:c,readTime:d,workLink:(0,O.gV)(r,l,o,u),isFree:"true"!==m&&(0===v||null===v),isNew:g>=x},n)})})},P=n(882478),Z=n(437676),B=n(349419),M=n(926358),z=n(197314),F=n(994323),V=n(978755),D=n(450206),H=n(536257),q=n(942262),W=n(185078);(r=s||(s={})).NEW="New Only",r.FREE="Free";let U=e=>{switch(e){case z.d.MOCK_INTERVIEWS.toLowerCase():return[];case z.d.ASSESSMENTS.toLowerCase():case z.d.PROJECTS.toLowerCase():case z.d.CLOUDLABS.toLowerCase():case z.d.PATHS.toLowerCase():return["New Only"];case z.d.COURSES.toLowerCase():case z.d.ALL.toLowerCase():default:return["New Only","Free"]}},G=["Beginner","Intermediate","Advanced"],K=["All","Courses","Cloud Labs","Projects","Paths","Assessments","Mock Interviews"];(l=a||(a={}))[l.INIT=0]="INIT",l[l.LOADING=1]="LOADING",l[l.LOADED=2]="LOADED",l[l.ERROR=3]="ERROR";let Q=e=>e.map(e=>({id:e.toLowerCase().split(" ").join("-"),name:e,checked:!1}
1)),Y=e=>e===z.d.COURSES.toLowerCase()?{collection_type:["collection"]}:e===z.d.PATHS.toLowerCase()?{collection_type:["path"]}:e===z.d.CLOUDLABS.toLowerCase()?{collection_type:["standalone-cloud-lab"]}:e===z.d.ASSESSMENTS.toLowerCase()?{collection_type:["skill-assessment"]}:e===z.d.PROJECTS.toLowerCase()?{collection_type:["standalone-project"]}:e===z.d.MOCK_INTERVIEWS.toLowerCase()?{collection_type:["mock-interview"]}:{},J=e=>e?{target_audience:[e]}:{},X=e=>e.length>0?{category_id:e}:{},$=e=>e.length>0?{learner_tags:e}:{},ee=e=>"new-only"===e?{approval_update_time:{gte:new Date(new Date().setMonth(new Date().getMonth()-1)).toISOString()}}:"free"===e?{price:{gte:0,lte:0}}:{},et=e=>"free"===e?{is_priced:["false"]}:{};var en=e=>{var t,n,r,l,s,a,g,x,y,w,S,C;let{fromSearchV4:j=!1,ssrLearnerTagsByType:E,ssrMockInterviewCategories:T,enableAISearch:N=!1}=e,k=(0,h.a)("sm"),O=(0,o.useRouter)(),I=(0,o.useSearchParams)(),R=c.useRef(null),en=()=>{var e,t,n;return null!==(n=null===(e=I.get("query"))||void 0===e?void 0:e.toString())&&void 0!==n?n:N?"":null!==(t=I.get("aiquery"))&&void 0!==t?t:""},er=()=>{var e,t;let n=null!==(t=null===(e=I.get("tab"))||void 0===e?void 0:e.toString().toLowerCase().split(" ").join(""))&&void 0!==t?t:z.d.ALL;return Object.values(z.d).map(e=>e.toLowerCase()).includes(n)?n:z.d.ALL},el=()=>{var e;return null===(e=I.get("level"))||void 0===e?void 0:e.toString().toLowerCase()},es=()=>{var e;return null===(e=I.get("categories"))||void 0===e?void 0:e.toString().toLowerCase()},ea=()=>{var e;return null===(e=I.get("filter-by"))||void 0===e?void 0:e.toString().toLowerCase()},ei=()=>{var e;return null===(e=I.get("skills"))||void 0===e?void 0:e.toString().toLowerCase()},eo=c.useMemo(()=>{let{courses:e,paths:t,projects:n,cloudLabs:r,assessments:l}=E,s=new Map;return[e,t,n,r,l].forEach(e=>{e.forEach(e=>{s.has(e.title)||s.set(e.title,{id:e.id,title:e.title})})}),{all:Array.from(s.values()),courses:e,paths:t,projects:n,cloudLabs:r,assessments:l}},[E]),ec=e=>{switch(e){case z.d.COURSES.toLowerCase():return eo.courses;case z.d.PATHS.toLowerCase():return eo.paths;case z.d.PROJECTS.toLowerCase():return eo.projects;case z.d.CLOUDLABS.toLowerCase():return eo.cloudLabs;case z.d.ASSESSMENTS.toLowerCase():return eo.assessments;case z.d.MOCK_INTERVIEWS.toLowerCase():return[];case z.d.ALL.toLowerCase():default:return eo.all}},[ed,eu]=c.useState(N),[eh,ep]=c.useState(()=>Q(U(er()))),[ef,em]=c.useState(()=>Q(G)),[ev,eg]=c.useState(()=>[...ec(er())].sort((e,t)=>e.title.localeCompare(t.title)).map(e=>({id:e.id,name:e.title,checked:!1}))),[ex,ey]=c.useState(()=>[...T].sort((e,t)=>e.name.localeCompare(t.name)).map(e=>({id:e.id,name:e.name,checked:!1}))),[ew,eS]=c.useState(!1),[e_,eC]=c.useState(null),eb=c.useRef(!1),eL=(0,D.TL)(),[ej,eE]=c.useState(v.xv.INITIAL),[eT,eN]=c.useState(new Set),ek=c.useCallback(e=>{!e||ej===v.xv.PENDING||eT.has(e)||(eE(v.xv.PENDING),(0,M.b)(e,window.location.href).then(()=>{eE(v.xv.SUCCESS),eN(t=>new Set(t).add(e)),eL(V.n.show(f.lu,{status:u.o.SUCCESS,heading:"Thank you",text:"We've received your request for \"".concat(e,'" and will review it soon.'),showAllText:!0,customToastPosition:"top-20 left-1/2 -translate-x-1/2 sm:left-auto sm:translate-x-0 sm:right-6",customToastWidth:"w-96 sm:w-auto",customHeadingClasses:"content-emphasis font-bold text-base",customTextClasses:"content-default font-normal text-sm",showIcon:!1,customLeftBarColor:"bg-brand-disabled"})),setTimeout(()=>eE(v.xv.INITIAL),3e3)}).catch(()=>{eE(v.xv.ERROR),setTimeout(()=>eE(v.xv.INITIAL),3e3)}))},[ej,eT,eL]),[eO,eI]=c.useState(()=>{let e={};return K.forEach(t=>{e[t.toLowerCase().split(" ").join("")]={results:[],page:0,hasMoreResults:!0,loadingState:0,cachedInputs:{}}}),e});c.useEffect(()=>{eb.current||(eb.current=!0,(0,B.pr)(d.T.SEARCH_ASSISTANT_AGENT).then(JSON.parse).then(e=>{eC({userId:e.user_id,sessionId:e.session_id})}).catch(e=>{eb.current=!1,(0,W.u)(e)}))},[]),c.useEffect(()=>{let e=el(),t=Q(G);e&&(t.find(t=>{let{id:n}=t;return n===e.split(" ").join("-")}).checked=!0),em(t)},[el()]),c.useEffect(()=>{let e=ea(),t=Q(U(er())),n=e?e.split(",").map(e=>
1e.trim()).filter(Boolean).map(e=>e.toLowerCase().split(" ").join("-")):[];ep(t.map(e=>({...e,checked:n.includes(e.id)})))},[ea(),er()]),c.useEffect(()=>{var e,t,n,r;let l=er(),s=[...ec(l)].sort((e,t)=>e.title.localeCompare(t.title)),a=ea(),i=a?a.split(",").map(e=>e.trim()).filter(Boolean).map(e=>e.toLowerCase().split(" ").join("-")):[],o=new Set(Q(U(l)).map(e=>{let{id:t}=e;return t})),c=i.filter(e=>o.has(e)),d=null!==(n=null===(e=ei())||void 0===e?void 0:e.split(",").filter(Boolean))&&void 0!==n?n:[],u=new Set(s.map(e=>e.id)),h=d.filter(e=>u.has(e));eg(s.map(e=>({id:e.id,name:e.title,checked:h.includes(e.id)})));let p=null!==(r=null===(t=es())||void 0===t?void 0:t.split(",").filter(Boolean))&&void 0!==r?r:[];ey(e=>e.map(e=>({...e,checked:p.includes(e.id)})));let f=l===z.d.MOCK_INTERVIEWS.toLowerCase(),m=l===z.d.ALL.toLowerCase(),v=d.length!==h.length,g=!!es(),x=!!ei(),y=i.length!==c.length,w={},S=!1;f?x&&(w.skills=[],S=!0):m?v&&(w.skills=h,S=!0):(g||v)&&(g&&(w.categories=[]),w.skills=h,S=!0),y&&(w.filterBy=c,S=!0),S?eP(w):eR()},[en(),er(),el(),ea(),ei(),es()]),c.useEffect(()=>{new URLSearchParams(window.location.search).get("aiquery")&&N&&eS(!0)},[N]);let eR=function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(ew)return;let l=en(),s=er(),a=el(),i=ea(),o=ei(),c=es(),d=0===n;if(1===eO[s].loadingState)return;let{query:u,skillLevel:h,filterBy:p,page:f,searchTopics:m,categories:v}=eO[s].cachedInputs;(l!==u||a!==h||i!==p||n!==f||o!==m||c!==v)&&(eO[s]&&eI(e=>({...e,[s]:{results:d?[]:e[s].results,page:d?n:e[s].page,hasMoreResults:e[s].hasMoreResults,loadingState:1,cachedInputs:{query:l,skillLevel:a,filterBy:i,page:n,searchTopics:o,categories:c}}})),(0,F.TO)({query:l,page:n,filters:{...Y(s),...J(a),...$(null!==(e=null==o?void 0:o.split(",").filter(Boolean))&&void 0!==e?e:[]),...X(null!==(t=null==c?void 0:c.split(",").filter(Boolean))&&void 0!==t?t:[]),...et(i)},rangeFilters:{...ee(i)}}).then(e=>{let t=JSON.parse(e),r=t.hits.hits,l=t.page_size||12,a=r.length===l;eI(e=>({...e,[s]:{...e[s],results:d?r:[...e[s].results,...r],page:n,hasMoreResults:a,loadingState:2}}))}).catch(e=>{if(r<2){eR(n,r+1);return}eI(e=>({...e,[s]:{...e[s],loadingState:3}}))}))},eA=e=>!!e&&(!Array.isArray(e)||e.length>0),eP=e=>{var r;let{searchQuery:l=en(),tab:s=er(),level:a=el(),filterBy:i=ea(),skills:o=null===(t=ei())||void 0===t?void 0:t.split(",").filter(Boolean),categories:c=null===(n=es())||void 0===n?void 0:n.split(",").filter(Boolean)}=e,d={tab:s};l&&(d.query=l),eA(a)&&(d.level=a),eA(i)&&(d["filter-by"]=i),eA(o)&&(d.skills=o),eA(c)&&(d.categories=c);let u="/search".concat(j?"v4":"","?").concat(new URLSearchParams(d).toString());window.location.pathname.startsWith("/search")&&O.replace(u),null===(r=R.current)||void 0===r||r.blur()},eZ=en()&&(null===(r=eO[er()])||void 0===r?void 0:r.loadingState)===2&&!(null===(l=eO[er()])||void 0===l?void 0:l.hasMoreResults)&&!ew,eB=ej===v.xv.PENDING||ej===v.xv.SUCCESS||eT.has(en());return(0,i.jsxs)("main",{className:"bg-neutral-secondary flex min-w-full flex-col items-center",children:[(0,i.jsx)("div",{className:"bg-neutral-default flex w-full justify-center",children:(0,i.jsx)("div",{className:"w-full lg:mb-4 lg:mt-10",style:{maxWidth:"1140px"},children:(0,i.jsx)(m.Z,{enableAISearch:N,agentVisible:ed,toggleAgentVisibility:eu,updateQueryParams:eP})})}),(0,i.jsx)("div",{className:"bg-neutral-default sticky z-10 flex w-full justify-center overflow-x-auto px-4",style:{top:"calc(var(--header-height) + var(--banner-height))"},children:(0,i.jsx)("div",{className:"bg-neutral-default w-full",style:{maxWidth:"1140px"},children:(0,i.jsx)(q.Z,{"aria-label":"search-tabs",value:K.findIndex(e=>e.toLowerCase().split(" ").join("")===er()),children:K.map((e,t)=>(0,i.jsx)(H.Z,{ariaIndex:t,label:e,onClick:()=>{eP({tab:e.toLowerCase()})}},e))})})}),(0,i.jsx)("div",{className:"tailwind-hidden bg-neutral-default s-gray-default sticky z-10 w-full justify-center border-x-0 border-y border-solid px-4 py-3 shadow-md lg:flex",
1style:{top:"calc(var(--header-height) + var(--banner-height) + 46px)"},children:(0,i.jsxs)("div",{className:"flex w-full items-center justify-between",style:{maxWidth:"1140px"},children:[(0,i.jsxs)("div",{className:"flex items-center gap-x-3",children:[(0,i.jsx)("div",{className:"hover:content-brand-default content-default flex h-full cursor-pointer items-center",onClick:()=>{eP({level:[],filterBy:[],skills:[],categories:[]})},children:(0,i.jsx)("p",{className:"m-0",children:"Clear All"})}),er()!==z.d.MOCK_INTERVIEWS.toLowerCase()&&(0,i.jsx)(_,{filterName:"Filter By",options:eh,onChangeOptions:e=>{eP({filterBy:e.filter(e=>e.checked).map(e=>e.id.toLowerCase())})}}),er()!==z.d.MOCK_INTERVIEWS.toLowerCase()&&(0,i.jsx)(_,{filterName:"Skill Level",options:ef,onChangeOptions:e=>{eP({level:e.filter(e=>e.checked).map(e=>e.id.toLowerCase())})}}),er()!==z.d.MOCK_INTERVIEWS.toLowerCase()&&(0,i.jsx)(_,{filterName:"Topics",options:ev,onChangeOptions:e=>{eP({skills:e.filter(e=>e.checked).map(e=>e.id.toLowerCase())})},isMultiFilter:!0,enableSearch:!0}),[z.d.MOCK_INTERVIEWS.toLowerCase(),z.d.ALL.toLowerCase()].includes(er())&&(0,i.jsx)(_,{filterName:er()===z.d.MOCK_INTERVIEWS.toLowerCase()?"Topics":"Mock Interviews",options:ex,onChangeOptions:e=>{eP({categories:e.filter(e=>e.checked).map(e=>e.id.toLowerCase())})},isMultiFilter:!0,enableSearch:!0})]}),eZ&&(0,i.jsx)("span",{className:"text-sm font-normal ".concat(eB?"content-disabled cursor-not-allowed":"content-brand-default cursor-pointer"),onClick:()=>ek(en()),children:"Request a course for your query"})]})}),(0,i.jsxs)("div",{className:"flex w-full justify-center gap-x-3 py-4",style:{maxWidth:"1140px"},children:[(0,i.jsxs)("div",{className:"flex w-full flex-col items-center gap-y-5 p-4",children:[0===eO[er()].results.length&&[1,0].includes(eO[er()].loadingState)||ew?(0,i.jsx)(L,{showLoadMore:!0}):2===eO[er()].loadingState&&0===eO[er()].results.length?(0,i.jsx)(P.Z,{showRequestACourse:!1,tabName:er(),isExploreSubPage:!0}):null,!ew&&eO[er()].results.length>0&&(0,i.jsx)(A,{isSmallScreen:k,results:eO[er()].results}),!ew&&eO[er()].results.length>0&&eO[er()].hasMoreResults&&(0,i.jsx)("button",{className:"focus:no-outline outlined-default w-72 text-base lg:h-10 lg:w-auto lg:px-9",onClick:()=>eR(eO[er()].page+1),disabled:[0,1].includes(eO[er()].loadingState),children:1===eO[er()].loadingState?(0,i.jsx)(p.Z,{}):"Load More"}),eZ&&(0,i.jsxs)("div",{className:"lg:tailwind-hidden flex w-full flex-col items-center justify-center px-2 py-3 text-center",children:[(0,i.jsx)("span",{className:"content-default text-base font-normal",children:"Can't find what you're looking for?"}),(0,i.jsx)("span",{className:"text-base font-normal ".concat(eB?"content-disabled cursor-not-allowed":"content-brand-default cursor-pointer"),onClick:()=>ek(en()),children:"Request a course for your query"})]})]}),N&&(0,i.jsxs)(i.Fragment,{children:[ev.length>0&&e_?(0,i.jsx)(Z.Z,{searchString:en(),topics:null==ev?void 0:ev.map(e=>e.id),categories:null==ex?void 0:ex.map(e=>e.id),currentTopics:null!==(y=null===(s=ei())||void 0===s?void 0:s.split(",").filter(Boolean))&&void 0!==y?y:[],currentLevel:el(),currentCategories:null!==(w=null===(a=es())||void 0===a?void 0:a.split(",").filter(Boolean))&&void 0!==w?w:[],updateQueryParams:eP,setIsWaitingForAIQuery:eS,sharedSessionData:e_}):(0,i.jsx)(b.SearchAgentLoadingComponent,{}),ed&&(ev.length>0&&e_?(0,i.jsx)(Z.g,{searchString:en(),topics:null==ev?void 0:ev.map(e=>e.id),categories:null==ex?void 0:ex.map(e=>e.id),currentTopics:null!==(S=null===(g=ei())||void 0===g?void 0:g.split(",").filter(Boolean).map(e=>e))&&void 0!==S?S:[],currentLevel:el(),currentCategories:null!==(C=null===(x=es())||void 0===x?void 0:x.split(",").filter(Boolean).map(e=>e))&&void 0!==C?C:[],updateQueryParams:eP,setShowDiscoverabilityAgent:eu,setIsWaitingForAIQuery:eS,sharedSessionData:e_}):(0,i.jsx)(b.SearchAgentMobileLoadingComponent,{setShowDiscoverabilityAgent:eu}))]})]})]})}},568696:function(e,t,n){"use strict";var r=n(574101),l=n(13858),s=n(441386),a=n(372561),i=n(83374),o=n(360144),c=n(669473),d=n(98530),u=n(676799),h=n(357388),p=n(94520),f=n(58749
11),m=n(730273),v=n(186692);t.Z=e=>{let{updateQueryParams:t,placeholder:n="Search",onOpenFilters:g,onSearchSubmit:x}=e,y=s.useRef(null),w=(0,d.Ab)(),S=(0,l.useSearchParams)(),_=(0,u.a)("lg"),[C,b]=s.useState(""),[L,j]=s.useState(!1),E=s.useCallback(e=>{if((e.metaKey||e.ctrlKey)&&"k"===e.key){var t;e.preventDefault(),null===(t=y.current)||void 0===t||t.focus()}},[]),T=()=>{var e,t;return null!==(t=null===(e=S.get("query"))||void 0===e?void 0:e.toString())&&void 0!==t?t:""};return s.useEffect(()=>(((0,d.eE)()||(0,d.ED)()||a.F)&&!w&&h.YB.add(h.ge.KEYDOWN,E),()=>{h.YB.remove(h.ge.KEYDOWN,E)}),[E,w]),s.useEffect(()=>{b(T())},[S.get("query")]),(0,r.jsx)(v.Z,{"data-testid":"search-page-input",style:{height:"46px"},inputClass:"content-secondary placeholder:content-secondary",fontSizeClass:"font-medium text-sm content-secondary",bgClasses:"bg-neutral-default",hoverClasses:"hover:bg-neutral-default",borderStyling:"border-transparent lg:s-gray-default  lg:shadow-none shadow-md rounded-full",roundedStyling:"rounded-full",placeholder:n,value:C,startIcon:(0,r.jsx)(m.default,{className:"content-secondary fill-current"}),type:"search",name:"search",autoComplete:"off",ref:y,onKeyDown:e=>{if("Enter"===e.key){var n,r,l;let s=null!==(l=null===(n=y.current)||void 0===n?void 0:n.value)&&void 0!==l?l:"";(0,c.Z)("search_page","search","",null,{query:s,search_location:i.O.MAIN_SEARCH_BAR,search_type:o.V.STANDARD_SEARCH}),null==x||x(s),t({searchQuery:s}),e.stopPropagation(),null===(r=y.current)||void 0===r||r.blur()}},onFocus:()=>j(!0),onBlur:()=>{setTimeout(()=>j(!1),200)},onChange:e=>b(e.target.value),endIcon:(0,r.jsxs)("div",{className:"flex items-center justify-end gap-x-2",children:[L&&(null==C?void 0:C.length)>0&&(0,r.jsx)(f.Z,{className:"content-secondary cursor-pointer fill-current lg:h-5 lg:w-5",onClick:()=>{b(""),null==x||x(""),t({searchQuery:""}),y.current&&(y.current.value="")}}),_?(0,r.jsx)("button",{type:"button","data-testid":"search-open-filters-mobile","aria-label":"Open search filters",onClick:g,className:"flex cursor-pointer items-center border-none bg-transparent p-0",children:(0,r.jsx)(p.Z,{"aria-hidden":"true",focusable:"false",className:"content-secondary fill-current"})}):!w&&((0,d.eE)()||(0,d.ED)())&&(0,r.jsxs)("span",{className:"bg-neutral-secondary flex items-center gap-x-0.5 rounded-full px-1.5 py-1 text-xs font-medium text-gray-L500",children:[(0,r.jsx)("span",{children:(0,d.eE)()?"⌘":"Ctrl + "}),(0,r.jsx)("span",{children:"K"})]})]})})}},214901:function(e,t,n){"use strict";n.r(t);var r=n(574101),l=n(52668),s=n.n(l),a=n(441386),i=n(669473);let o=e=>{let{label:t,ariaIndex:n,isActive:l=!1,onClick:s,tabKey:a}=e;return(0,r.jsx)("button",{"data-testid":"search-tab-".concat(a),role:"tab","aria-selected":l,"aria-posinset":n+1,onClick:s,className:"shrink-0 cursor-pointer rounded-lg border border-solid px-4 py-2 text-sm font-medium transition-colors\n        ".concat(l?"s-brand-light content-brand-default bg-indigo-50 dark:bg-gray-D900":"bg-neutral-default s-gray-default content-secondary hover:s-brand-light hover:content-brand-default hover:bg-indigo-50 dark:hover:bg-gray-D900","\n      "),children:t})};t.default=e=>{let{tabs:t,activeTab:n,onTabClick:l}=e,c=a.useRef(null);return a.useEffect(()=>{c.current&&c.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[n]),(0,r.jsxs)("div",{"data-testid":"search-tablist",role:"tablist",style:{height:"40px",scrollbarWidth:"none",msOverflowStyle:"none"},className:"jsx-c12f021053e1107 mt-6 flex items-center gap-2 overflow-x-auto",children:[(0,r.jsx)(s(),{id:"c12f021053e1107",children:"div.jsx-c12f021053e1107::-webkit-scrollbar{display:none}"}),t.map((e,t)=>{let s=e.toLowerCase().split(" ").join(""),a=n===s;return(0,r.jsx)("div",{ref:a?c:null,className:"jsx-c12f021053e1107",children:(0,r.jsx)(o,{tabKey:s,label:e,ariaIndex:t,onClick:()=>{(0,i.Z)("search_page","CLICKED_VIEW_TAB",s,null,{page_section:"search_page"}),l(s)},isActive:a})},e)})]})}},483511:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return er}});var r,l,s,a,i,o,c,d,u,h,p=n(574101),f=n(441386),m=n(147494),v=n.n(m),g=n(237540),x=n.n(g);v().extend(x());let y=e=>{if(!e)return null;let t=v()(e),n=v()(),r=n.subtract(6,"month");if(t.isBefore(r))return null;let l=n.diff(t,"day");if(0===l)return"Updated today";if(1===l)return"Updated yesterday";if(l<8)return"Updated this week";if(l<30){let e=Math.floor(l/7);return"Updated ".concat(e," ").concat(1===e?"week":"weeks"," ago")}{let e=Math.floor(l/30);return"Updated ".concat(e," ").concat(1===e?"month":"months"," ago")}};var w=n(42505),S=n(234780),_=n(409288),C=n(961574),b=n(628761),L=n(720462),j=n(669473),E=n(523590);function T(){return(T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}var N=function(e){return E.createElement("svg",T({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=E.createElement("rect",{x:9,y:7,width:2.5,height:10,className:"fill-current content-secondary"})),l||(l=E.createElement("rect",{x:3.5,y:11,width:2.5,height:6,className:"fill-current content-secondary"})),s||(s=E.createElement("rect",{x:14.5,y:3,width:2.5,height:14,className:"fill-current content-secondary"})))},k=n(769928);function O(){return(O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}var I=function(e){return E.createElement("svg",O({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a||(a=E.createElement("rect",{x:9,y:7,width:2.5,height:10,className:"fill-current content-placeholder"})),i||(i=E.createElement("rect",{x:3.5,y:11,width:2.5,height:6,className:"fill-current content-secondary"})),o||(o=E.createElement("rect",{x:14.5,y:3,width:2.5,height:14,className:"fill-current content-placeholder"})))},R=n(216962);function A(){return(A=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}var P=function(e){return E.createElement("svg",A({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),c||(c=E.createElement("rect",{x:9,y:7,width:2.5,height:10,className:"fill-current content-secondary"})),d||(d=E.createElement("rect",{x:3.5,y:11,width:2.5,height:6,className:"fill-current content-secondary"})),u||(u=E.createElement("rect",{x:14.5,y:3,width:2.5,height:14,className:"fill-current content-placeholder"})))};function Z(){return(Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}var B=function(e){return E.createElement("svg",Z({width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),h||(h=E.createElement("path",{d:"m4 2.55 1.25.7L4.55 2l.7-1.25-1.25.7-1.25-.7.7 1.25-.7 1.25L4 2.55Zm6 4.9-1.25-.7.7 1.25-.7 1.25 1.25-.7 1.25.7-.7-1.25.7-1.25-1.25.7Zm1.25-6.7-1.25.7-1.25-.7.7 1.25-.7 1.25 1.25-.7 1.25.7-.7-1.25.7-1.25ZM7.437 3.395a.498.498 0 0 0-.705 0L.896 9.23a.498.498 0 0 0 0 .705l1.17 1.17c.195.194.51.194.705 0l5.83-5.83a.498.498 0 0 0 0-.705L7.436 3.395ZM6.92 6.14 5.86 5.08l1.22-1.22 1.06 1.06-1.22 1.22Z",fill:"currentColor"})))},M=n(805003),z=n(58652),F=n(267601),V=n(253425),D=n(800437),H=n(834914),q=n(852122),W=n(779264),U=n(567913),G=n(248560),K=n(544590),Q=n(884484);let Y={beginner:L.Z[0],intermediate:L.Z[1],advanced:L.Z[2]},J=e=>{let{tileType:t}=e,n=U.z5[t]||"bg-card-courses",r=U.GR[t]||"content-card-course",l=U.E0[t];return(0,p.jsxs)("div",{className:"flex items-center gap-1 rounded-full px-3 py-1 ".concat(n," ").concat(r),children:[l,(0,p.jsx)("span",{className:"text-xs font-medium",children:t})]})},X=()=>(0,p.jsx)("span",{className:"bg-badge-free tailwind-hidden content-light rounded px-2 py-0.5 text-xs font-normal sm:block",children:"Free"}),$=()=>(0,p.jsx)("span",{className:"bg-badge-trending tailwind-hidden content-light rounded px-2 py-0.5 text-xs font-normal sm:block",children:"New"});var ee=e=>{let{tileType:t,title:n,description:r,workLink:l,readTime:s,skillLevel:a,isFree:i=!1,isNew:o=!1,prefetch:c=!1,authorId:d,workId:u,workType:h,pinnedByReader:m=!1,collectionRating:v,lastMajorContentPublishedTime:g,collectionMetadataStats:x}=e,[E,T]=f.useState({pinned:m,pinnedStatusData:{status:"",text:""}}
1),[O,A]=f.useState(!1),Z=s?(0,Q.nM)(Number(s),!1,!1," h"," m",!1,h===b.dL.MOCK_INTERVIEW):null,U=a?Y[a.toLowerCase()]||a:null,ee=a?a.toLowerCase()===L.Z[0].toLowerCase()?(0,p.jsx)(I,{className:"h-4 w-4"}):a.toLowerCase()===L.Z[1].toLowerCase()?(0,p.jsx)(P,{className:"h-4 w-4"}):(0,p.jsx)(N,{className:"h-4 w-4"}):null,et=d&&u&&h,en=K.x3.get(t)||{category:"",clickAction:"",actions:{save:"",unsave:""}},er=y(g),el=f.useMemo(()=>{if(!x)return[];let e=[];x.lessons>0&&e.push({icon:z.default,label:"".concat(x.lessons," ").concat(1===x.lessons?"Lesson":"Lessons")});let t=2;x.cloudLabs>0&&(t+=1),x.mockInterviews>0&&(t+=1),x.projects>0&&(t+=1),x.breakoutSessions>0&&(t+=1),t>0&&e.push({icon:H.Z,label:"".concat(t," AI Features")}),x.mockInterviews>0&&e.push({icon:F.default,label:"Mock Interviews"}),x.cloudLabs>0?e.push({icon:R.Z,label:"Cloud Labs"}):x.projects>0&&e.push({icon:V.default,label:"Projects"});let n=(x.quizzes||0)>0,r=(x.assessments||0)>0;return(r||n)&&(r?e.push({icon:k.default,label:"Assessment"}):n&&e.push({icon:k.default,label:"".concat(x.quizzes," ").concat(1===x.quizzes?"Quiz":"Quizzes")})),x.breakoutSessions>0&&e.push({icon:M.default,label:"Breakout Rooms"}),x.mockInterviews>0&&e.length<5&&e.push({icon:B,label:"Expert Interview Coach"}),e},[x]);return f.useEffect(()=>{T(e=>({...e,pinned:m}))},[m]),(0,p.jsx)(w.default,{href:l,prefetch:c,className:"no-underline",onClick:()=>{if(en.clickAction&&en.category){let e={tile_type:t,title:n};d&&u&&(e.author_id=d,e.work_id=u),(0,j.Z)(en.category,en.clickAction,n,null,e)}},children:(0,p.jsxs)("div",{className:"bg-neutral-default s-gray-default w-full cursor-pointer rounded-lg border border-solid p-4 transition-shadow duration-200 hover:shadow-lg lg:p-5",style:{minHeight:"188px"},children:[(0,p.jsxs)("div",{className:"flex items-center justify-between",children:[(0,p.jsxs)("div",{className:"flex items-center gap-2",children:[(0,p.jsx)(J,{tileType:t}),o&&(0,p.jsx)($,{}),!o&&i&&(0,p.jsx)(X,{})]}),(0,p.jsxs)("div",{className:"content-secondary flex items-center gap-2 text-sm lg:gap-4",children:[(0,p.jsxs)("div",{className:"flex items-center gap-2 lg:gap-4",children:[U&&(0,p.jsxs)("div",{className:"flex items-center gap-1",children:[ee,(0,p.jsx)("span",{children:U})]}),er&&(0,p.jsxs)("div",{className:"tailwind-hidden items-center gap-1 lg:flex",children:[(0,p.jsx)(W.default,{className:"content-secondary h-4 w-4 fill-current"}),(0,p.jsx)("span",{children:er})]}),Z&&(0,p.jsxs)("div",{className:"flex items-center gap-1",children:[(0,p.jsx)(q.default,{className:"content-secondary h-4 w-4 fill-current"}),(0,p.jsx)("span",{children:Z})]}),v&&(0,p.jsxs)("div",{className:"flex items-center gap-1",children:[(0,p.jsx)(D.default,{className:"h-4 w-4 fill-current text-orange-500"}),(0,p.jsx)("span",{children:null==v?void 0:v.toFixed(1)})]})]}),et&&(0,p.jsx)(G.default,{pinned:E.pinned,setPinned:T,author_id:String(d),work_id:String(u),work_type:t.toLowerCase().includes(b.dL.PATH)?b.dL.PATH:b.dL.COLLECTION,title:n,pinnedStatusData:E.pinnedStatusData,eventCategory:en.category,eventActions:en.actions,updateSavedWorkIds:()=>{},tileType:t,showToast:O,setShowToast:A,customStyle:{margin:"m-0",height:"h-6",width:"w-6",iconSize:"h-5 w-5",iconHoverClass:"hover:bg-transparent"}})]})]}),(0,p.jsx)("div",{className:"content-emphasis m-0 mt-3 line-clamp-2 text-xl font-medium",dangerouslySetInnerHTML:{__html:n}}),(0,p.jsx)("p",{className:"content-default m-0 mt-2 line-clamp-2 text-sm lg:mt-3 lg:line-clamp-3",dangerouslySetInnerHTML:{__html:r}}),el.length>0&&(0,p.jsxs)("div",{className:"mt-3 flex flex-wrap gap-1",children:[el.slice(0,2).map((e,t)=>{let n=e.icon;return(0,p.jsxs)("div",{className:"bg-neutral-tertiary flex items-center gap-1.5 rounded-full px-3 py-1",children:[(0,p.jsx)(n,{className:"content-default h-3 w-3"}),(0,p.jsx)("span",{className:"content-default text-xs",children:e.label})]},t)}),(0,p.jsx)("div",{className:"tailwind-hidden flex-wrap gap-1 lg:flex",children:el.slice(2).map((e,t)=>{let n=e.icon;return(0,p.jsxs)("div",{className:"bg-neutral-tertiary flex items-center gap-1.5 rounded-full px-3 py-1",children:[(0,p.jsx)(n,{className:"content-default h-3 w-3"}),(0,p.jsx)("span",{className:"content-default text-xs",children:e.label})]},t+2)})}),el.length>2&&(()=>{let e=el.slice(2).map(e=>e.label),t=0===e.length?null:1===e.length?e[0]:"".concat(e.slice(0,-1).join(", ")," and ").concat(e.at(-1));return(0,p.jsx)(_.default,{trigger:C.t4,position:S.xR,rootClose:!0,showPointer:!1,onClick:e=>{e.preventDefault(),e.stopPropagation()},overlay:t&&(0,p.jsx)("span",{className:"text-xs text-white dark:text-gray-D1300",children:t}),children:(0,p.jsx)("div",{className:"flex items-center gap-1.5 p-1 lg:hidden",children:(0,p.jsxs)("span",{className:"content-default text-xs",children:[" ","+ ",el.length-2," more"]})})})})()]})]})})},et=n(718335),en=n(762254),er=e=>{let{results:t,pinnedWorks:n={}}=e;return(0,p.jsx)("div",{className:"flex w-full flex-col gap-4",children:t.map((e,t)=>{let{_source:r}=e,{id:l,author_id:s,collection_id:a,collection_title:i,brief_summary:o,collection_type:c,target_audience:d,read_time:u,url_slug:h,category_id:f,freemium_enabled:m,price:v,approval_update_time:g,collections_group:x,collection_metadata_stats:y,collection_rating:w,last_major_content_published_time:S}=r,_=null;if(y)try{_=JSON.parse(y)}catch(e){_=null}if(x===K.aU.CODING_INTERVIEW_PREP)return(0,p.jsx)("div",{"data-testid":"search-result-tile-".concat(t),children:(0,p.jsx)(ee,{tileType:et.Y.INTERVIEW_PREP,title:"Personalized Interview Prep",de
1scription:"Skip the LeetCode grind with a custom roadmap that adapts to your goals.",workLink:"/interview"})},l);let C=c!==b.dL.PATH&&(c===b.dL.MOCK_INTERVIEW?m:0===v||null===v),L=new Date(new Date().setMonth(new Date().getMonth()-1)).toISOString(),j=(0,en.ni)(c),E=(0,en.gV)(s,a,c,h,"",f,l),T=n["".concat(s,"_").concat(a)]||!1;return(0,p.jsx)("div",{"data-testid":"search-result-tile-".concat(t),children:(0,p.jsx)(ee,{tileType:j,title:i,description:o,workLink:E,readTime:u,skillLevel:d,isFree:C,isNew:g>=L,authorId:s,workId:a,workType:c,pinnedByReader:T,collectionRating:w,lastMajorContentPublishedTime:S,collectionMetadataStats:_})},l)})})}},586900:function(e,t,n){"use strict";var r=n(574101);t.Z=()=>(0,r.jsxs)("div",{className:"bg-neutral-pressed rounded-lg p-4 lg:p-6",style:{minHeight:"188px"},children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",style:{height:"26px"},children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"bg-neutral-default animate-pulse rounded-full",style:{height:"11px",width:"50px"}}),(0,r.jsx)("div",{className:"bg-neutral-default animate-pulse rounded-full",style:{height:"11px",width:"70px"}})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"bg-neutral-default w-14 animate-pulse rounded-full",style:{height:"11px"}}),(0,r.jsx)("div",{className:"bg-neutral-default tailwind-hidden w-32 animate-pulse rounded-full lg:block",style:{height:"11px"}}),(0,r.jsx)("div",{className:"bg-neutral-default tailwind-hidden w-4 animate-pulse rounded-full lg:block",style:{height:"11px"}}),(0,r.jsx)("div",{className:"bg-neutral-default w-4 animate-pulse rounded-full",style:{height:"11px"}})]})]}),(0,r.jsx)("div",{className:"mt-3",style:{height:"20px"},children:(0,r.jsx)("div",{className:"bg-neutral-default animate-pulse rounded-full",style:{height:"20px",width:"140px"}})}),(0,r.jsxs)("div",{className:"mb-1 mt-3 flex flex-col",style:{gap:"6px"},children:[(0,r.jsx)("div",{className:"bg-neutral-default w-full animate-pulse rounded-full",style:{height:"14px"}}),(0,r.jsx)("div",{className:"bg-neutral-default w-full animate-pulse rounded-full",style:{height:"14px"}}),(0,r.jsx)("div",{className:"bg-neutral-default w-full animate-pulse rounded-full",style:{height:"14px"}}),(0,r.jsx)("div",{className:"bg-neutral-default w-full animate-pulse rounded-full",style:{height:"14px"}})]})]})},769724:function(e,t,n){"use strict";var r=n(574101);n(441386);var l=n(586900);t.Z=()=>(0,r.jsxs)("div",{className:"flex flex-1 flex-col",style:{minHeight:"1156px"},children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",style:{height:"32px"},children:[(0,r.jsx)("div",{className:"bg-neutral-pressed animate-pulse rounded-full",style:{height:"18px",width:"120px"}}),(0,r.jsx)("div",{className:"bg-neutral-pressed animate-pulse rounded-full",style:{height:"13px",width:"100px"}})]}),(0,r.jsx)("div",{className:"mt-4 flex flex-col gap-4",children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,r.jsx)(l.Z,{},t))})]})},281405:function(e,t,n){"use strict";n.d(t,{default:function(){return eY}});var r,l,s,a,i,o,c,d,u=n(574101),h=n(13858),p=n(441386),f=n(37008),m=n(819559),v=n(628761),g=n(917451),x=n(940938),y=e=>(0,x.Z)({url:"/api/reader/saved-works-list",type:"POST",data:{work_list:JSON.stringify(e)}}),w=n(462031),S=n(436097),_=n(544590);let C=()=>!0;(r=i||(i={})).FETCH_START="FETCH_START",r.FETCH_SUCCESS="FETCH_SUCCESS",r.FETCH_ERROR="FETCH_ERROR",r.RESET="RESET";let b={isLoading:!1,error:null,data:null},L=(e,t)=>{switch(t.type){case i.FETCH_START:return{...e,isLoading:!0,error:null};case i.FETCH_SUCCESS:return{isLoading:!1,error:null,data:t.payload};case i.FETCH_ERROR:return{isLoading:!1,error:t.payload,data:null};case i.RESET:return b;default:return e}},j=async e=>{try{let t=await (0,x.Z)({url:"/api/sll/".concat(e),type:"GET"});return"string"==typeof t?JSON.parse(t):t}catch(t){return console.error("Failed to fetch Fenzo data for ID ".concat(e,":"),t),null}};function E(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((e,t)=>
1t(e),e)}let T=e=>"object"==typeof e&&!Array.isArray(e)&&"text"in e,N=e=>Array.isArray(e),k=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.fs,n=e.split("\n"),r=[],l="";for(let e of n){let n=e.trim();if(!n.startsWith("#")){if(""===n){if(l.trim()&&(r.push(l.trim()),l="",r.length>=t))break;continue}l+=(l?" ":"")+n}}l.trim()&&r.length<t&&r.push(l.trim());let s=r.join("\n\n");return s?"".concat(s,"..."):""},O=e=>e.find(e=>"MarkdownEditor"===e.type),I=e=>e.find(e=>"followups"===e.type),R=e=>t=>t&&T(t.content)?k(t.content.text,e):"",A=e=>e&&N(e.content)?e.content:[],P=e=>t=>E(t,O,R(e)),Z=e=>E(e,I,A),B=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.fs;if(!(null==e?void 0:null===(t=e.comp_list)||void 0===t?void 0:t.length))return null;let{comp_list:r}=e,l=P(n)(r),s=Z(r);return l||s.length?{paragraphs:l,followups:s}:null};var M=n(149553),z=n(42505),F=n(669473),V=n(951432),D=n(402678);let H=e=>{let{title:t,fenzoId:n=""}=e,r=new URLSearchParams({query:t,...n?{sllId:n}:{}});return"/ai-tutor?".concat(r.toString())};var q=n(612097),W=n.n(q),U=e=>{let{query:t}=e,[n,r]=p.useState(!1),l=H({title:t});p.useEffect(()=>{let e=setTimeout(()=>{r(!0)},4e3);return()=>clearTimeout(e)},[]);let s=n?W().fenzoGradientBorderStatic:W().fenzoGradientBorder;return(0,u.jsx)(z.default,{href:l,className:"w-full no-underline",onClick:()=>{(0,F.Z)("search_page","CLICKED_SLL_TILE","",null,{query:t,fenzo_source:"default_state"})},children:(0,u.jsxs)("div",{className:"".concat(s," ").concat(W().fenzoTileHeight," bg-neutral-default flex w-full cursor-pointer flex-col justify-center rounded-lg px-4\n                py-3 lg:py-4"),children:[(0,u.jsxs)("div",{className:"flex items-center justify-between",children:[(0,u.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,u.jsx)(D.Z,{className:"h-4 w-4 shrink-0"}),(0,u.jsx)("span",{className:"content-default text-xs font-medium",children:"Need a quick deep-dive here?"})]}),(0,u.jsxs)("div",{className:"group flex shrink-0 items-center gap-0.5 pl-4",children:[(0,u.jsx)("span",{className:"content-brand-default whitespace-nowrap text-xs font-medium",children:"Ask AI Tutor"}),(0,u.jsx)(V.Z,{className:"content-brand-default h-4 w-4 transition-transform duration-150 group-hover:translate-x-0.5"})]})]}),(0,u.jsx)("span",{className:"content-secondary mt-2 text-sm",children:"Let AI Tutor build you an interactive tutorial with visuals, runnable code, quizzes and more."})]})})},G=n(582719),K=n(606108),Q=n(100557),Y=n(728208),J=n.n(Y);let X=e=>e.length<=_.iv?e:"".concat(e.slice(0,_.iv-3),"..."),$=()=>(0,u.jsxs)("div",{className:"relative mt-2 h-9 overflow-hidden rounded-lg ".concat(J().contentWrapper),children:[(0,u.jsx)("div",{className:"bg-neutral-pressed h-3 w-full animate-pulse rounded-full"}),(0,u.jsx)("div",{className:"bg-neutral-pressed mt-1.5 h-3 w-3/4 animate-pulse rounded-full"}),(0,u.jsx)("div",{className:J().gradientOverlay})]}),ee=e=>{let{data:t,fenzoId:n,isExpanded:r,onFollowupClick:l}=e;return(0,u.jsxs)("div",{className:"".concat(J().contentWrapper," mt-2 overflow-hidden"),style:{maxHeight:r?"700px":"36px"},children:[(0,u.jsx)("div",{className:"content-secondary text-xs leading-relaxed lg:text-sm ".concat(t.followups.length>0?"":"mb-9"),children:(0,u.jsx)(K.default,{mdHtml:(0,G.c)({markdownText:t.paragraphs}),defaultStyles:!1})}),t.followups.length>0&&(0,u.jsx)("div",{className:"mb-10 mt-3 flex flex-wrap gap-2",children:t.followups.map((e,t)=>(0,u.jsxs)(z.default,{href:H({title:e,fenzoId:n}),onClick:()=>l(e),className:"\n    ".concat(J().followupPill,"\n    content-secondary\n    relative\n    block\n    rounded-full\n    px-3\n    py-1\n    pr-7\n    text-xs\n    no-underline\n  "),children:[X(e),(0,u.jsx)(V.Z,{className:" absolute right-2 top-1/2 h-3.5 w-3.5 shrink-0 -translate-y-1/2 "})]},t))}),!r&&(0,u.jsx)("div",{className:J().gradientOverlay})]})};var et=e=>{let{query:t,fenzoId:n,data:r,isLoading:l}=e,[s,a]=p.useReducer(e=>!e,!1),[i,o]=p.useReducer(()=>!0,!1),c=H({title:t,fenzoId:n});p.useEffect(()=>{let e=setTimeout(o,4e3);return()=>clearTimeout(e)},[]);let d=i?W().fenzoGradientBorderStatic:W().fenzoGradientBorder,h=!l&&r;return(0,u.jsxs)("div",{className:"".concat(d," bg-neutral-default relative flex w-full flex-col rounded-lg px-4 py-3"),children:[(0,u.jsxs)("div",{className:"flex items-center justify-between",children:[(0,u.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,u.jsx)(D.Z,{className:"h-4 w-4 shrink-0"}),(0,u.jsx)("span",{className:"content-default text-xs font-medium",children:"Fenzo Explanation"})]}),(0,u.jsxs)(z.default,{href:c,className:"group flex shrink-0 items-center gap-0.5 pl-4 no-underline",onClick:()=>{(0,F.Z)("search_page","CLICKED_SLL_TILE","",null,{query:t,fenzo_source:"result_state_dive_deeper"})},children:[(0,u.jsx)("span",{className:"content-brand-default whitespace-nowrap text-xs font-medium",children:"Dive deeper"}),(0,u.jsx)(V.Z,{className:"content-brand-default h-4 w-4 transition-transform duration-150 group-hover:translate-x-0.5"})]})]}),l||!r?(0,u.jsx)($,{}):(0,u.jsx)(ee,{data:r,fenzoId:n,isExpanded:s,onFollowupClick:e=>{(0,F.Z)("search_page","SLL_FOLLOWUP_CLICKED",e,null,{followup_query:e,original_query:t})}}),h&&(0,u.jsxs)("button",{type:"button",onClick:a,className:"s-brand-light bg-neutral-default hover:s-brand-bold absolute flex items-center rounded-full border border-solid py-1 pl-2.5 pr-1.5 ".concat(s?"bottom-3 left-1/2 -translate-x-1/2":"-bottom-2 left-1/2 -translate-x-1/2"),children:[(0,u.jsx)("span",{className:"content-secondary text-xs font-normal",children:s?"Show less":"Show more"}),(0,u.jsx)(Q.Z,{className:"content-secondary h-4 w-4 transition-transform duration-150 ".concat(s?"rotate-180":"")})]})]})};let en=e=>{var t,n,r,l,s;let{query:a,fenzoResult:o}=e,[c,d]=p.useReducer(L,b),h=(0,M.h)(e=>e.userConfig.loaded),f=null!==(r=(0,M.h)(e=>{var t,n;return null===(n=e.userConfig.data)||void 0===n?void 0:null===(t=n.constants)||void 0===t?void 0:t.sll_search_threshold_search_page}))&&void 0!==r?r:.86,m=null!==(l=(0,M.h)(e=>{var t,n;return null===(n=e.userConfig.data)||void 0===n?void 0:null===(t=n.constants)||void 0===t?void 0:t.fenzo_max_paragraphs}))&&void 0!==l?l:_.fs,v=null==o?void 0:null===(t=o._source)||void 0===t?void 0:t.id,g=null!==(s=null==o?void 0:o._score)&&void 0!==s?s:0,x=!!(v&&(null==o?void 0:null===(n=o._source)||void 0===n?void 0:n.title)),y=g>=Number(f);return(p.useEffect(()=>{if(!x||!v||!y){d({type:i.RESET});return}let e=!1;return d({type:i.FETCH_START}),j(v).then(t=>{if(e)return;let n=B(t,Number(m));n?d({type:i.FETCH_SUCCESS,payload:n}):d({type:i.FETCH_ERROR,payload:"Failed to parse response"})}),()=>{e=!0}},[x,v,y]),x&&v&&y)?(0,u.jsx)(et,{query:a,fenzoId:v,data:c.data,isLoading:c.isLoading||!h}):(0,u.jsx)(U,{query:a})};var er=e=>{let{query:t,fenzoResult:n}=e;return C()?(0,u.jsx)(en,{query:t,fenzoResult:n}):null},el=n(697279),es=n(94520),ea=n(587491),ei=n(730273),eo=n(197314),ec=n(186692);let ed={TOPICS:"Topics",FILTER_BY:"Filter By",SKILL_LEVEL:"Skill Level",MOCK_INTERVIEWS:"Categories",TOC_CONTENT_TYPES:"Features"};var eu=n(946003),eh=n(167506);let ep=e=>{n.e(777457).then(n.bind(n,777457)).then(t=>{let n=t.default;(0,eh.K)((0,u.jsx)(n,{...e,isOpen:!0}))})};var ef=n(343569),em=n(771284),ev=n(953006),eg=e=>{let{title:t,options:n,onChangeOptions:r,isMultiFilter:l=!1,searchQuery:s="",disableModal:a=!1}=e,[i,o]=p.useState(!1),c=p.useMemo(()=>new eu.Z(n,{keys:["name"],threshold:.3,ignoreLocation:!0}
1),[n]),d=p.useMemo(()=>{let e=n;return s.trim()&&(e=c.search(s).map(e=>e.item)),l&&(e=[...e].sort((e,t)=>e.checked&&!t.checked?-1:!e.checked&&t.checked?1:0)),e},[s,n,c,l]),h=p.useMemo(()=>i||s.trim()?d:d.slice(0,8),[d,i,s]),f=p.useMemo(()=>!s.trim()&&d.length>8,[d,s]),m=d.length-8,v=(e,t)=>{r(l?n.map(n=>n.id===e?{...n,checked:t}:n):n.map(n=>({...n,checked:n.id===e&&t})))};if(0===d.length&&s.trim())return null;let g=t.toLowerCase().replace(/\s+/g,"-");return(0,u.jsxs)("div",{"data-testid":"search-filter-category-".concat(g),className:"flex flex-col gap-3",children:[(0,u.jsx)("p",{className:"content-emphasis m-0 text-base font-medium",children:t}),h.map(e=>(0,u.jsxs)("div",{"data-testid":"search-filter-option-".concat(e.id),className:"flex cursor-pointer items-center gap-2",onClick:()=>v(e.id,!e.checked),children:[l?(0,u.jsx)(em.Z,{checked:e.checked,"aria-label":e.name,onChange:()=>{}}):(0,u.jsx)(ev.Z,{className:"border border-solid border-gray-L500",id:e.id,checked:e.checked,ariaLabel:e.name}),(0,u.jsx)("p",{className:"content-secondary m-0 text-sm",children:e.name})]},e.id)),f&&(0,u.jsx)("button",{className:"content-default m-0 cursor-pointer self-start border-none bg-transparent p-0  text-left text-xs font-medium underline hover:no-underline",onClick:()=>{!a&&d.length>8?ep({title:t,options:n,onApply:e=>{r(e),(0,ef.M)()},onClose:()=>(0,ef.M)()}):o(!i)},children:i?"Show less":"Show more (".concat(m,")")})]})},ex=e=>{let{tabName:t,filterByOptions:n,onChangeFilterByOptions:r,skillLevelOptions:l,onChangeSkillLevelOptions:s,topicsOptions:a,onChangeTopicsOptions:i,categoriesOptions:o,onChangeCategoriesOptions:c,tocContentTypesOptions:d,onChangeTocContentTypesOptions:h,onClearAll:p,searchQuery:f,showSearchBar:m,shouldSearchBarRemainVisible:v=!1,setShowSearchBar:g,setSearchQuery:x,onClose:y,disableModal:w=!1}=e,S=t===eo.d.MOCK_INTERVIEWS.toLowerCase(),_=t===eo.d.ALL.toLowerCase()||t===eo.d.COURSES.toLowerCase(),C=n.some(e=>e.checked)||l.some(e=>e.checked)||a.some(e=>e.checked)||o.some(e=>e.checked)||d.some(e=>e.checked);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"flex items-center justify-between",children:m&&!v?(0,u.jsx)(ec.Z,{className:"h-8",inputClass:"content-secondary placeholder:content-secondary",fontSizeClass:"font-normal text-sm content-secondary",bgClasses:"bg-neutral-default",hoverClasses:"",borderStyling:"border-transparent shadow-md",roundedStyling:"rounded-lg",placeholder:"Search filters",value:f,onChange:e=>x(e.target.value),startIcon:(0,u.jsx)(ei.default,{className:"content-secondary fill-current"}),endIcon:(0,u.jsx)(ea.Z,{className:"content-secondary h-5 w-5 cursor-pointer fill-current",onClick:()=>{g(!1),x("")}}),autoFocus:!0}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:"flex h-8 items-center gap-2",children:[(0,u.jsx)(es.Z,{className:"content-default h-5 w-5 fill-current"}),(0,u.jsx)("p",{className:"content-emphasis m-0 text-lg font-medium",children:"Filters"})]}),(0,u.jsx)("div",{className:"flex h-8 items-center gap-x-2",children:(0,u.jsxs)("div",{className:"flex items-center gap-3",children:[C&&(0,u.jsx)("button",{"data-testid":"search-filters-clear-all",className:"content-default cursor-pointer border-none bg-transparent text-left text-xs font-medium hover:underline lg:px-0",onClick:p,children:"Clear All"}),!v&&(0,u.jsx)(ei.default,{className:"content-emphasis h-5 w-5 cursor-pointer fill-current",onClick:()=>g(!0)}),y&&(0,u.jsx)(ea.Z,{className:"content-emphasis h-5 w-5 cursor-pointer fill-current",onClick:y})]})})]})}),v&&(0,u.jsx)(ec.Z,{className:"h-8",inputClass:"content-secondary placeholder:content-secondary",fontSizeClass:"font-normal text-sm content-secondary",bgClasses:"bg-neutral-default",hoverClasses:"",borderStyling:"s-gray-default",roundedStyling:"rounded-lg",placeholder:"Search filters",value:f,onChange:e=>x(e.target.value),startIcon:(0,u.jsx)(ei.default,{className:"content-secondary fill-current"}),autoFocus:!0}),!S&&n.length>0&&(0,u.jsx)(eg,{title:ed.FILTER_BY,options:n,onChangeOptions:r,isMultiFilter:!1,searchQuery:f,disableModal:w}),!S&&l.length>0&&(0,u.jsx)(eg,{title:ed.SKILL_LEVEL,options:l,onChangeOptions:s,isMultiFilter:!1,searchQuery:f,disableModal:w}),!S&&a.length>0&&(0,u.jsx)(eg,{title:ed.TOPICS,options:a,onChangeOptions:i,isMultiFilter:!0,searchQuery:f,disableModal:w}),S&&o.length>0&&(0,u.jsx)(eg,{title:ed.MOCK_INTERVIEWS,options:o,onChangeOptions:c,isMultiFilter:!0,searchQuery:f,disableModal:w}),_&&d.length>0&&(0,u.jsx)(eg,{title:ed.TOC_CONTENT_TYPES,options:d,onChangeOptions:h,isMultiFilter:!0,searchQuery:f,disableModal:w})]})},ey=e=>{let{isOpen:t,onClose:n,tabName:r,filterByOptions:l,skillLevelOptions:s,topicsOptions:a,categoriesOptions:i,tocContentTypesOptions:o,onApplyFilters:c}=e,[d,h]=p.useState(""),[f,m]=p.useState(!1),[v,g]=p.useState(!1),[x,y]=p.useState({filterBy:l,skillLevel:s,topics:a,categories:i,tocContentTypes:o});return(p.useEffect(()=>{t&&y({filterBy:l,skillLevel:s,topics:a,categories:i,tocContentTypes:o})},[t,l,s,a,i,o]),p.useEffect(()=>{g(!0)},[]),p.useEffect(()=>{t||(h(""),m(!1))},[t]),p.useEffect(()=>{if(!t)return;let e=document.body.style.overflow,n=document.documentElement.style.overflow;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",()=>{document.body.style.overflow=e,document.documentElement.style.overflow=n}},[t]),v)?(0,el.createPortal)((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"fixed inset-0 z-40 bg-black transition-opacity duration-300 lg:hidden ".concat(t?"opacity-50":"pointer-events-none opacity-0"),onClick:n}),(0,u.jsxs)("div",{"data-testid":"search-filters-drawer",className:"bg-neutral-default fixed inset-y-0 left-0 z-50 flex w-full max-w-md flex-col shadow-xl transition-transform duration-300 ease-in-out lg:hidden ".concat(t?"translate-x-0":"-translate-x-full"),children:[(0,u.jsx)("div",{className:"no-scrollbar flex flex-1 flex-col gap-5 overflow-y-auto p-5",children:(0,u.jsx)(ex,{tabName:r,filterByOptions:x.filterBy,onChangeFilterByOptions:e=>y(t=>({...t,filterBy:e})),skillLevelOptions:x.skillLevel,onChangeSkillLevelOptions:e=>y(t=>({...t,skillLevel:e})),topicsOptions:x.topics,onChangeTopicsOptions:e=>y(t=>({...t,topics:e})),categoriesOptions:x.categories,onChangeCategoriesOptions:e=>y(t=>({...t,categories:e})),tocContentTypesOptions:x.tocContentTypes,onChangeTocContentTypesOptions:e=>y(t=>({...t,tocContentTypes:e})),onClearAll:()=>{y({filterBy:x.filterBy.map(e=>({...e,checked:!1}
1)),skillLevel:x.skillLevel.map(e=>({...e,checked:!1})),topics:x.topics.map(e=>({...e,checked:!1})),categories:x.categories.map(e=>({...e,checked:!1})),tocContentTypes:x.tocContentTypes.map(e=>({...e,checked:!1}))})},searchQuery:d,showSearchBar:f,setShowSearchBar:m,setSearchQuery:h,onClose:n,shouldSearchBarRemainVisible:!0,disableModal:!0})}),(0,u.jsx)("div",{className:"bg-neutral-default border-gray-200 sticky bottom-0 border-t p-4",children:(0,u.jsx)("button",{"data-testid":"search-filters-apply",className:"bg-brand-default w-full rounded-lg py-3 text-base font-medium text-white",onClick:()=>{c(x),n()},children:"Apply Filters"})})]})]}),document.body):null},ew=e=>{let[t,n]=p.useState(""),[r,l]=p.useState(!1);return(0,u.jsx)("div",{"data-testid":"search-filters-sidebar",className:"tailwind-hidden sticky flex-col gap-5 self-start overflow-y-auto p-0.5 lg:flex",style:{maxWidth:"248px",width:"100%",maxHeight:"992px",top:"calc(var(--header-height) + var(--site-wide-banner-height))"},children:(0,u.jsx)(ex,{...e,searchQuery:t,showSearchBar:r,setShowSearchBar:l,setSearchQuery:n})})},eS=n(568696),e_=n(214901),eC=n(483511),eb=()=>(0,u.jsx)("div",{className:"bg-neutral-pressed tailwind-hidden mx-5 shrink-0 lg:block",style:{width:"1px"}}),eL=n(769724),ej=n(586900),eE=n(703248),eT=n.n(eE);let eN=()=>(0,u.jsxs)("div",{className:"".concat(eT().fenzoSkeletonHeight," bg-neutral-pressed flex w-full flex-col rounded-lg px-4 py-3 lg:py-4"),children:[(0,u.jsxs)("div",{className:"flex items-center justify-between",children:[(0,u.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,u.jsx)("div",{className:"bg-neutral-default animate-pulse rounded",style:{height:"16px",width:"16px"}}),(0,u.jsx)("div",{className:"bg-neutral-default animate-pulse rounded-full",style:{height:"14px",width:"180px"}})]}),(0,u.jsxs)("div",{className:"flex shrink-0 items-center gap-1 pl-4",children:[(0,u.jsx)("div",{className:"bg-neutral-default animate-pulse rounded-full",style:{height:"14px",width:"64px"}}),(0,u.jsx)("div",{className:"bg-neutral-default animate-pulse rounded",style:{height:"16px",width:"16px"}})]})]}),(0,u.jsx)("div",{className:"bg-neutral-default mt-2 w-full animate-pulse rounded-full",style:{height:"14px"}})]});var ek=()=>(0,u.jsxs)("div",{className:"flex w-full flex-1 flex-col",style:{minHeight:"1221px"},children:[(0,u.jsxs)("div",{className:"flex items-center justify-between",style:{height:"32px"},children:[(0,u.jsx)("div",{className:"bg-neutral-pressed animate-pulse rounded-full",style:{height:"18px",width:"120px"}}),(0,u.jsx)("div",{className:"bg-neutral-pressed animate-pulse rounded-full",style:{height:"13px",width:"100px"}})]}),(0,u.jsx)("div",{className:"mt-4",children:(0,u.jsx)(eN,{})}),(0,u.jsx)("div",{className:"mt-4 flex flex-col gap-4",children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,u.jsx)(ej.Z,{},t))})]}),eO=n(882478);(l=o||(o={})).SET_FILTER_BY="SET_FILTER_BY",l.SET_SKILL_LEVEL="SET_SKILL_LEVEL",l.SET_TOPICS="SET_TOPICS",l.SET_CATEGORIES="SET_CATEGORIES",l.SET_TOC_CONTENT_TYPES="SET_TOC_CONTENT_TYPES",l.CLEAR_ALL="CLEAR_ALL";let eI=(e,t)=>{switch(t.type){case"SET_FILTER_BY":return{...e,filterBy:t.payload};case"SET_SKILL_LEVEL":return{...e,skillLevel:t.payload};case"SET_TOPICS":return{...e,topics:t.payload};case"SET_CATEGORIES":return{...e,categories:t.payload};case"SET_TOC_CONTENT_TYPES":return{...e,tocContentTypes:t.payload};case"CLEAR_ALL":return{filterBy:e.filterBy.map(e=>({...e,checked:!1})),skillLevel:e.skillLevel.map(e=>({...e,checked:!1})),topics:e.topics.map(e=>({...e,checked:!1})),categories:e.categories.map(e=>({...e,checked:!1})),tocContentTypes:e.tocContentTypes.map(e=>({...e,checked:!1}))};default:return e}};var eR=n(926358);let eA=async e=>{try{var t;let n=await (0,x.Z)({url:"/api/sll/search/fenzo",type:"POST",data:{query:e}}),r="string"==typeof n?JSON.parse(n):n;return null!==(t=null==r?void 0:r.result)&&void 0!==t?t:null}catch(e){return console.error("Error fetching Fenzo results:",e),null}},eP=e=>{let{tabName:t,query:n,page:r,skillLevel:l,filterBy:s,searchTopics:a,categories:i}=e;return t===eo.d.ALL.toLowerCase()&&!!n&&0===r&&!l&&!s&&!a&&!i};var eZ=n(994323),eB=n(978755),eM=n(450206),ez=n(185078),eF=n(430285);(s=c||(c={})).NEW="New Only",s.FREE="Free",s.POPULAR="Popular";let eV=e=>{switch(e){case eo.d.MOCK_INTERVIEWS.toLowerCase():return[];case eo.d.ASSESSMENTS.toLowerCase():case eo.d.PROJECTS.toLowerCase():case eo.d.CLOUDLABS.toLowerCase():case eo.d.PATHS.toLowerCase():return["New Only"];case eo.d.COURSES.toLowerCase():return["New Only","Free"];case eo.d.ALL.toLowerCase():default:return["New Only","Free","Popular"]}},eD=["Beginner","Intermediate","Advanced"];(a=d||(d={}))[a.INIT=0]="INIT",a[a.LOADING=1]="LOADING",a[a.LOADED=2]="LOADED",a[a.ERROR=3]="ERROR";let eH=e=>e.map(e=>({id:e.toLowerCase().split(" ").join("-"),name:e,checked:!1}
1)),eq=e=>e?{target_audience:[e]}:{},eW=e=>e.length>0?{category_id:e}:{},eU=e=>e.length>0?{learner_tags:e}:{},eG=e=>"new-only"===e?{approval_update_time:{gte:new Date(new Date().setMonth(new Date().getMonth()-1)).toISOString()}}:"free"===e?{price:{gte:0,lte:0}}:{},eK=[...f.iw.IS_B2B?[]:[{id:"mock-interview",name:"Mock Interviews"}],{id:"project",name:"Projects"},{id:"cloud-lab",name:"Cloud Labs"}],eQ=e=>0===e.length?{}:{toc_content_types:e,collection_type:["collection"]};var eY=e=>{var t,n,r,l,s,a,i,c,d;let{fromSearchV4:x=!1,ssrLearnerTagsByType:C,ssrMockInterviewCategories:b}=e,L=(0,h.useRouter)(),j=(0,h.useSearchParams)(),E=()=>{var e,t;return null!==(t=null===(e=j.get("query"))||void 0===e?void 0:e.toString())&&void 0!==t?t:""},[T,N]=p.useState(!1),[k,O]=p.useState(()=>{var e,t;return null!==(t=null===(e=j.get("tab"))||void 0===e?void 0:e.toString().toLowerCase().split(" ").join(""))&&void 0!==t?t:eo.d.ALL}),[I,R]=p.useState(()=>{var e,t;return null!==(t=null===(e=j.get("query"))||void 0===e?void 0:e.toString())&&void 0!==t?t:""}),A=p.useRef(null),P=p.useRef(null),Z=()=>{var e,t;let n=null!==(t=null===(e=j.get("tab"))||void 0===e?void 0:e.toString().toLowerCase().split(" ").join(""))&&void 0!==t?t:eo.d.ALL;return!Object.values(eo.d).map(e=>e.toLowerCase()).includes(n)||f.iw.IS_B2B&&n===eo.d.MOCK_INTERVIEWS.toLowerCase()?eo.d.ALL:n},B=()=>{var e;return null===(e=j.get("level"))||void 0===e?void 0:e.toString().toLowerCase()},M=()=>{var e;return null===(e=j.get("categories"))||void 0===e?void 0:e.toString().toLowerCase()},z=()=>{var e;return null===(e=j.get("filter-by"))||void 0===e?void 0:e.toString().toLowerCase()},F=()=>{var e;return null===(e=j.get("skills"))||void 0===e?void 0:e.toString().toLowerCase()},V=()=>{var e;return null===(e=j.get("toc-types"))||void 0===e?void 0:e.toString().toLowerCase()},D=p.useMemo(()=>{let{courses:e,paths:t,projects:n,cloudLabs:r,assessments:l}=C,s=new Map;return[e,t,n,r,l].forEach(e=>{e.forEach(e=>{var t;let n=null!==(t=e.priority)&&void 0!==t?t:99,r=s.get(e.title);(!r||n<r.priority)&&s.set(e.title,{id:e.id,title:e.title,priority:n})})}),{all:Array.from(s.values()).sort((e,t)=>e.priority-t.priority||e.title.localeCompare(t.title)),courses:e,paths:t,projects:n,cloudLabs:r,assessments:l}},[C]),H=e=>{switch(e){case eo.d.COURSES.toLowerCase():return D.courses;case eo.d.PATHS.toLowerCase():return D.paths;case eo.d.PROJECTS.toLowerCase():return D.projects;case eo.d.CLOUDLABS.toLowerCase():return D.cloudLabs;case eo.d.ASSESSMENTS.toLowerCase():return D.assessments;case eo.d.MOCK_INTERVIEWS.toLowerCase():return[];case eo.d.ALL.toLowerCase():default:return D.all}},[q,W]=p.useState(()=>eH(eV(Z()))),[U,G]=p.useState(()=>eH(eD)),[K,Q]=p.useState(()=>H(Z()).map(e=>({id:e.id,name:e.title,checked:!1}))),[Y,J]=p.useState(()=>[...b].sort((e,t)=>e.name.localeCompare(t.name)).map(e=>({id:e.id,name:e.name,checked:!1}))),[X,$]=p.useState(()=>eK.map(e=>({...e,checked:!1}))),[ee,et]=p.useReducer(eI,{filterBy:q,skillLevel:U,topics:K,categories:Y,tocContentTypes:X}),en=p.useRef(null),el=p.useRef({}),es=p.useRef(null),ea=p.useRef({}),ei=(0,eM.TL)(),{data:ec}=(0,m.Pc)(),[ed,eu]=p.useState(_.xv.INITIAL),[eh,ep]=p.useState(new Set),[ef,em]=p.useState({}),ev=!!(null==ec?void 0:ec.user_id),eg=p.useCallback(e=>{!e||ed===_.xv.PENDING||eh.has(e)||(eu(_.xv.PENDING),(0,eR.b)(e,window.location.href).then(()=>{eu(_.xv.SUCCESS),ep(t=>new Set(t).add(e)),ei(eB.n.show(S.lu,{status:g.o.SUCCESS,heading:"Thank you",text:"We've received your request for \"".concat(e,'" and will review it soon.'),showAllText:!0,customToastPosition:"top-20 left-1/2 -translate-x-1/2 sm:left-auto sm:translate-x-0 sm:right-6",customToastWidth:"w-96 sm:w-auto",customHeadingClasses:"content-emphasis font-bold text-base",customTextClasses:"content-default font-normal text-sm",showIcon:!1,customLeftBarColor:"bg-brand-disabled"})),setTimeout(()=>eu(_.xv.INITIAL),3e3)}).catch(()=>{eu(_.xv.ERROR),setTimeout(()=>eu(_.xv.INITIAL),3e3)}))},[ed,eh,ei]),[ex,ej]=p.useState(()=>{let e={};return eF.eA.forEach(t=>{e[t.toLowerCase().split(" ").join("")]={results:[],page:0,hasMoreResults:!0,loadingState:0,cachedInputs:{},fenzoResult:void 0,isInitialLoad:!0,totalCount:void 0}}),e}),eE=null!==(i=null===(t=j.get("tab"))||void 0===t?void 0:t.toString().toLowerCase().split(" ").join(""))&&void 0!==i?i:eo.d.ALL;p.useEffect(()=>{O(eE)},[eE]);let eT=null!==(c=null===(n=j.get("query"))||void 0===n?void 0:n.toString())&&void 0!==c?c:"";p.useEffect(()=>{R(eT)},[eT]),p.useEffect(()=>{en.current||(ea.current={level:B(),filterBy:z(),skills:F(),categories:M(),tocTypes:V()})},[B(),z(),F(),M(),V()]),p.useEffect(()=>()=>{P.current&&clearTimeout(P.current),en.current&&clearTimeout(en.current),A.current&&A.current.abort()},[]),p.useEffect(()=>{let e=B(),t=eH(eD);if(e){let n=t.find(t=>{let{id:n}=t;return n===e.split(" ").join("-")});n&&(n.checked=!0)}G(t),en.current||et({type:o.SET_SKILL_LEVEL,payload:t})},[B()]),p.useEffect(()=>{let e=z(),t=eH(eV(Z())),n=e?e.split(",").map(e=>
1e.trim()).filter(Boolean).map(e=>e.toLowerCase().split(" ").join("-")):[],r=t.map(e=>({...e,checked:n.includes(e.id)}));W(r),en.current||et({type:o.SET_FILTER_BY,payload:r})},[z(),Z()]),p.useEffect(()=>{let e=V(),t=e?e.split(",").map(e=>e.trim()).filter(Boolean):[],n=eK.map(e=>({...e,checked:t.includes(e.id)}));$(n),en.current||et({type:o.SET_TOC_CONTENT_TYPES,payload:n})},[V(),Z()]),p.useEffect(()=>{var e,t,n,r;let l=Z(),s=H(l),a=z(),i=a?a.split(",").map(e=>e.trim()).filter(Boolean).map(e=>e.toLowerCase().split(" ").join("-")):[],c=new Set(eH(eV(l)).map(e=>{let{id:t}=e;return t})),d=i.filter(e=>c.has(e)),u=null!==(n=null===(e=F())||void 0===e?void 0:e.split(",").filter(Boolean))&&void 0!==n?n:[],h=new Set(s.map(e=>e.id)),p=u.filter(e=>h.has(e)),f=s.map(e=>({id:e.id,name:e.title,checked:p.includes(e.id)}));Q(f),en.current||et({type:o.SET_TOPICS,payload:f});let m=null!==(r=null===(t=M())||void 0===t?void 0:t.split(",").filter(Boolean))&&void 0!==r?r:[],v=Y.map(e=>({...e,checked:m.includes(e.id)}));J(v),en.current||et({type:o.SET_CATEGORIES,payload:v});let g=l===eo.d.MOCK_INTERVIEWS.toLowerCase(),x=l===eo.d.ALL.toLowerCase(),y=u.length!==p.length,w=!!M(),S=!!F(),_=i.length!==d.length,C=!!V(),b=x||l===eo.d.COURSES.toLowerCase(),L={},j=!1;g?S&&(L.skills=[],j=!0):x?y&&(L.skills=p,j=!0):(w||y)&&(w&&(L.categories=[]),L.skills=p,j=!0),!b&&C&&(L.tocTypes=[],j=!0),_&&(L.filterBy=d,j=!0),j?e$(L):eN()},[E(),Z(),B(),z(),F(),M(),V()]);let eN=function(){var e,t,n;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=E(),a=Z(),i=B(),o=z(),c=F(),d=M(),u=V(),h=0===r,{query:p,skillLevel:f,filterBy:m,page:v,searchTopics:g,categories:x,tocTypes:y}=ex[a].cachedInputs;if(s===p&&i===f&&o===m&&r===v&&c===g&&d===x&&u===y){2!==ex[a].loadingState&&ej(e=>({...e,[a]:{...e[a],loadingState:2,isInitialLoad:!1}}));return}A.current&&A.current.abort();let w=new AbortController;A.current=w,ex[a]&&ej(e=>({...e,[a]:{results:h?[]:e[a].results,page:h?r:e[a].page,hasMoreResults:e[a].hasMoreResults,fenzoResult:h?void 0:e[a].fenzoResult,loadingState:1,cachedInputs:{query:s,skillLevel:i,filterBy:o,page:r,searchTopics:c,categories:d,tocTypes:u},isInitialLoad:h,totalCount:e[a].totalCount}}));let S=eP({tabName:a,query:s,page:r,skillLevel:i,filterBy:o,searchTopics:c,categories:d})?eA(s):Promise.resolve(null),C=(0,eF.k2)(a),b=Object.keys(C).length>0?C:eF.PH;(0,eZ.TO)({query:s,page:r,pageSize:_.IV,filters:{...b,...eq(i),...eU(null!==(e=null==c?void 0:c.split(",").filter(Boolean))&&void 0!==e?e:[]),...eW(null!==(t=null==d?void 0:d.split(",").filter(Boolean))&&void 0!==t?t:[]),...eQ(null!==(n=null==u?void 0:u.split(",").filter(Boolean))&&void 0!==n?n:[])},rangeFilters:{...eG(o)},popularFilter:"popular"===o,signal:w.signal}).then(e=>{var t,n;if(w.signal.aborted)return;let l=JSON.parse(e),s=l.hits.hits,i=null===(n=l.hits)||void 0===n?void 0:null===(t=n.total)||void 0===t?void 0:t.value,o=l.page_size||_.IV,c=s.length===o;return S.then(e=>{if(w.signal.aborted)return;let t=h?s:[...ex[a].results,...s];ej(n=>({...n,[a]:{...n[a],results:t,page:r,hasMoreResults:c,loadingState:2,fenzoResult:e||n[a].fenzoResult,isInitialLoad:!1,totalCount:h?i:n[a].totalCount}})),A.current===w&&(A.current=null)})}).catch(e=>{var t;if(w.signal.aborted)return;if(A.current===w&&(A.current=null),l<2){eN(r,l+1);return}let n=(null==e?void 0:null===(t=e.responseJSON)||void 0===t?void 0:t.errorText)||"Search Failed";(null==e?void 0:e.status)>=500?(0,ez.u)(Error("Collection search API failed with status ".concat(e.status)),{statusCode:e.status,statusText:e.statusText,responseBody:e.responseText,errorMessage:n},{},{searchQuery:s,searchLocation:"enterprise_search_page",tabName:a,page:r,filterBy:o,skillLevel:i,searchTopics:c,categories:d,tocTypes:u,errorType:"collection_search_api_error"}):(0,ez.u)(e,{"Source of Error":"Search Page","Error Message":n}),ej(e=>({...e,[a]:{...e[a],loadingState:3}}))})};p.useEffect(()=>{let e=es.current;if(!e)return;let t=new IntersectionObserver(e=>{let[t]=e;if(!(null==t?void 0:t.isIntersecting))return;let n=ex[Z()];if(n){if(1===n.loadingState||!n.hasMoreResults)return;eN(n.page+1)}},{root:null,rootMargin:"200px",threshold:0});return t.observe(e),()=>t.disconnect()},[ex]),p.useEffect(()=>{var e;let t=(null===(e=ex[Z()])||void 0===e?void 0:e.results)||[];if(t.length>0&&ev){let e=t.filter(e=>{let{_source:t}=e;return t.collection_type!==v.dL.MOCK_INTERVIEW&&t.collection_type!==_.aU.FENZO&&t.collections_group!==_.aU.CODING_INTERVIEW_PREP}).map(e=>{let{_source:t}=e;return{work_id:"".concat(t.author_id,"_").concat(t.collection_id),work_type:t.collection_type}});e.length>0&&y(e).then(JSON.parse).then(e=>{em(e)}).catch(e=>{console.error("Failed to fetch saved works:",e)})}},[ex,ev]);let eY=()=>{let e=Z();ej(t=>({...t,[e]:{...t[e],loadingState:1,isInitialLoad:!0,totalCount:t[e].totalCount}})),window.scrollTo({top:0,behavior:"smooth"})},eJ=()=>{en.current&&clearTimeout(en.current),A.current&&A.current.abort(),en.current=setTimeout(()=>{en.current=null;let e={...el.current};el.current={},e$(e)},300)},eX=e=>!!e&&(!Array.isArray(e)||e.length>0),e$=e=>{var t,n,r,l,s,a,i,o,c,d,u,h;let p={searchQuery:null!==(l=e.searchQuery)&&void 0!==l?l:E(),tab:null!==(s=e.tab)&&void 0!==s?s:Z(),level:null!==(i=null!==(a=e.level)&&void 0!==a?a:ea.current.level)&&void 0!==i?i:B(),filterBy:null!==(c=null!==(o=e.filterBy)&&void 0!==o?o:ea.current.filterBy)&&void 0!==c?c:z(),skills:null!==(d=e.skills)&&void 0!==d?d:ea.current.skills?ea.current.skills.split(",").filter(
1Boolean):null===(t=F())||void 0===t?void 0:t.split(",").filter(Boolean),categories:null!==(u=e.categories)&&void 0!==u?u:ea.current.categories?ea.current.categories.split(",").filter(Boolean):null===(n=M())||void 0===n?void 0:n.split(",").filter(Boolean),tocTypes:null!==(h=e.tocTypes)&&void 0!==h?h:ea.current.tocTypes?ea.current.tocTypes.split(",").filter(Boolean):null===(r=V())||void 0===r?void 0:r.split(",").filter(Boolean)};ea.current={level:Array.isArray(p.level)?p.level.join(","):p.level,filterBy:Array.isArray(p.filterBy)?p.filterBy.join(","):p.filterBy,skills:Array.isArray(p.skills)?p.skills.join(","):p.skills,categories:Array.isArray(p.categories)?p.categories.join(","):p.categories,tocTypes:Array.isArray(p.tocTypes)?p.tocTypes.join(","):p.tocTypes};let f={tab:p.tab};p.searchQuery&&(f.query=p.searchQuery),eX(p.level)&&(f.level=p.level),eX(p.filterBy)&&(f["filter-by"]=p.filterBy),eX(p.skills)&&(f.skills=p.skills),eX(p.categories)&&(f.categories=p.categories),eX(p.tocTypes)&&(f["toc-types"]=p.tocTypes);let m=new URLSearchParams(f).toString(),v="/search".concat(x?"v4":"","?").concat(m);window.location.search!=="?".concat(m)&&(eY(),window.location.pathname.startsWith("/search")&&L.replace(v))},e0=E()&&(null===(r=ex[Z()])||void 0===r?void 0:r.loadingState)===2&&!(null===(l=ex[Z()])||void 0===l?void 0:l.hasMoreResults),e1=ed===_.xv.PENDING||ed===_.xv.SUCCESS||eh.has(E()),e5=Z(),e6=[1,0].includes(ex[e5].loadingState),e2=null===(d=null===(s=ex[e5])||void 0===s?void 0:s.isInitialLoad)||void 0===d||d,e3=k===eo.d.ALL.toLowerCase()&&I;return(0,u.jsx)("main",{className:"bg-neutral-secondary flex w-full justify-center p-4 lg:py-6",children:(0,u.jsxs)("div",{className:"w-full",style:{maxWidth:"1060px"},children:[(0,u.jsx)(eS.Z,{updateQueryParams:e$,onOpenFilters:()=>N(!0),onSearchSubmit:R}),(0,u.jsx)(e_.default,{tabs:eF.eA,activeTab:k,onTabClick:e=>{if(A.current){A.current.abort(),A.current=null;let e=Z();ej(t=>({...t,[e]:{...t[e],cachedInputs:{query:"",skillLevel:"",filterBy:"",page:-1,searchTopics:"",categories:"",tocTypes:""}}}))}P.current&&clearTimeout(P.current),en.current&&(clearTimeout(en.current),en.current=null),el.current={},O(e),P.current=setTimeout(()=>{let t=e===eo.d.ALL.toLowerCase()||e===eo.d.COURSES.toLowerCase();e$({tab:e,...!t&&V()?{tocTypes:[]}:{}})},150)}}),(0,u.jsxs)("div",{className:"mt-6 flex",children:[(0,u.jsx)(ew,{tabName:k,filterByOptions:ee.filterBy,onChangeFilterByOptions:e=>{et({type:o.SET_FILTER_BY,payload:e}),el.current={...el.current,filterBy:e.filter(e=>e.checked).map(e=>e.id.toLowerCase())},eJ()},skillLevelOptions:ee.skillLevel,onChangeSkillLevelOptions:e=>{et({type:o.SET_SKILL_LEVEL,payload:e}),el.current={...el.current,level:e.filter(e=>e.checked).map(e=>e.id.toLowerCase())},eJ()},topicsOptions:ee.topics,onChangeTopicsOptions:e=>{et({type:o.SET_TOPICS,payload:e}),el.current={...el.current,skills:e.filter(e=>e.checked).map(e=>e.id.toLowerCase())},eJ()},categoriesOptions:ee.categories,onChangeCategoriesOptions:e=>{et({type:o.SET_CATEGORIES,payload:e}),el.current={...el.current,categories:e.filter(e=>e.checked).map(e=>e.id.toLowerCase())},eJ()},tocContentTypesOptions:ee.tocContentTypes,onChangeTocContentTypesOptions:e=>{et({type:o.SET_TOC_CONTENT_TYPES,payload:e}),el.current={...el.current,tocTypes:e.filter(e=>e.checked).map(e=>e.id.toLowerCase())},eJ()},onClearAll:()=>{et({type:o.CLEAR_ALL}),en.current&&(clearTimeout(en.current),en.current=null),el.current={},A.current&&A.current.abort(),e$({level:[],filterBy:[],skills:[],categories:[],tocTypes:[]})}}),(0,u.jsx)(eb,{}),e6&&e2?e3?(0,u.jsx)(ek,{}):(0,u.jsx)(eL.Z,{}):(0,u.jsxs)("div",{"data-testid":"search-results-container",className:"flex flex-1 flex-col",style:{minHeight:"1156px"},children:[(0,u.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,u.jsxs)("p",{className:"content-emphasis m-0 text-lg font-medium",children:["Search Results"," ",ex[e5].results.length>0&&"(".concat(ex[e5].hasMoreResults&&void 0!==ex[e5].totalCount?ex[e5].totalCount:ex[e5].results.length,")")]}),e0&&(0,u.jsx)("span",{className:"tailwind-hidden text-sm font-normal lg:block ".concat(e1?"content-disabled cursor-not-allowed":"content-brand-default cursor-pointer"),onClick:()=>eg(E()),children:"Request a course for your query"})]}),(0,u.jsxs)("div",{className:"flex w-full flex-col items-center gap-y-4",children:[e5===eo.d.ALL.toLowerCase()&&E()&&(0,u.jsx)(er,{query:E(),fenzoResult:null===(a=ex[e5])||void 0===a?void 0:a.fenzoResult}),2===ex[Z()].loadingState&&0===ex[Z()].results.length?(0,u.jsx)(eO.Z,{showRequestACourse:!1,tabName:Z(),isExploreSubPage:!0}):null,ex[Z()].results.length>0&&(0,u.jsx)(eC.default,{results:ex[Z()].results,pinnedWorks:ef}),ex[Z()].results.length>0&&ex[Z()].hasMoreResults&&(0,u.jsx)("div",{ref:es,className:"flex min-h-10 w-full items-center justify-center py-4","aria-hidden":!0,"data-testid":"infinite-scroll-sentinel",children:1===ex[Z()].loadingState&&(0,u.jsx)(w.Z,{})}),e0&&(0,u.jsxs)("div",{className:"lg:tailwind-hidden flex w-full flex-col items-center justify-center px-2 py-3 text-center",children:[(0,u.jsx)("span",{className:"content-default text-base font-normal",children:"Can't find what you're looking for?"}),(0,u.jsx)("span",{className:"text-base font-normal ".concat(e1?"content-disabled cursor-not-allowed":"content-brand-default cursor-pointer"),onClick:()=>eg(E()),children:"Request a course for your query"})]})]})]}),(0,u.jsx)(ey,{isOpen:T,onClose:()=>N(!1),tabName:k,filterByOptions:q,skillLevelOptions:U,topicsOptions:K,categoriesOptions:Y,tocContentTypesOptions:X,onApplyFilters:e=>{let t=e.filterBy.filter(e=>e.checked).map(e=>e.id.toLowerCase()),n=e.skillLevel.filter(e=>e.checked).map(e=>e.id.toLowerCase());e$({filterBy:t,level:n,skills:e.topics.filter(e=>e.checked).map(e=>e.id.toLowerCase()),categories:e.categories.filter(e=>e.checked).map(e=>e.id.toLowerCase()),tocTypes:e.tocContentTypes.filter(e=>e.checked).map(e=>e.id.toLowerCase())})}})]})]})})}},430285:function(e,t,n){"use strict";n.d(t,{PH:function(){return a},eA:function(){return l},k2:function(){return s}});var r=n(197314);let l=["All","Courses","Cloud Labs","Projects","Paths","Assessments","Mock Interviews"],s=e=>e===r.d.COURSES.toLowerCase()?{collection_type:["collection"]}:e===r.d.PATHS.toLowerCase()?{collection_type:["path"]}:e===r.d.CLOUDLABS.toLowerCase()?{collection_type:["standalone-cloud-lab"]}:e===r.d.ASSESSMENTS.toLowerCase()?{collection_type:["skill-assessment"]}:e===r.d.PROJECTS.toLowerCase()?{collection_type:["standalone-project"]}:e===r.d.MOCK_INTERVIEWS.toLowerCase()?{collection_type:["mock-interview"]}:{},a={}},926358:function(e,t,n){"use strict";n.d(t,{b:function(){return a}});var r=n(940938),l=n(884796),s=n(863276);let a=(e,t)=>(0,r.Z)({url:"/api/userfeedback",type:"POST",data:{agent_id:l.T.SEARCH_ASSISTANT_AGENT,author_id:"",category_id:"",collection_id:"",email:"",image_id:"",interview_id:"",is_ask_author:"false",issue_type:"",message:"User searched ".concat(e),number_of_prompts_used:"0",page_id:"",page_url:t,path_author_id:"",path_id:"",rating:"",subject:"Content Request",time_consumed_in_seconds:"0",type:s.B.AGENT_LANDING_PAGE,url:""}})},788174:function(e,t,n){Promise.resolve().then(n.t.bind(n,986202,23)),Promise.resolve().then(n.t.bind(n,900596,23)),Promise.resolve().then(n.bind(n,439998)),Promise.resolve().then(n.bind(n,119572)),Promise.resolve().then(n.bind(n,211932)),Promise.resolve().then(n.t.bind(n,437841,23)),Promise.resolve().then(n.bind(n,845196)),Promise.resolve().then(n.t.bind(n,358064,23)),Promise.resolve().then(n.t.bind(n,866860,23)),Promise.resolve().then(n.bind(n,170736)),Promise.resolve().then(n.bind(n,232752)),Promise.resolve().then(n.t.bind(n,33420,23)),Promise.resolve().then(n.t.bind(n,325114,23)),Promise.resolve().then(n.bind(n,962462)),Promise.resolve().then(n.bind(n,712796)),Promise.resolve().then(n.bind(n,73132)),Promise.resolve().then(n.bind(n,857113)),Promise.resolve().then(n.t.bind(n,25352,23)),Promise.resolve().then(n.bind(n,191682)),Promise.resolve().then(n.bind(n,517080)),Promise.resolve().then(n.t.bind(n,756712,23)),Promise.resolve().then(n.bind(n,536806)),Promise.resolve().then(n.bind(n,631265)),Promise.resolve().then(n.bind(n,366962)),Promise.resolve().then(n.bind(n,252842)),Promise.resolve().then(n.bind(n,243263)),Promise.resolve().then(n.bind(n,152876)),Promise.resolve().then(n.bind(n,283868)),Promise.resolve().then(n.bind(n,800754)),Promise.resolve().then(n.bind(n,90236)),Promise.resolve().then(n.bind(n,971272)),Promise.resolve().then(n.bind(n,360673)),Promise.resolve().then(n.bind(n,831666)),Promise.resolve().then(n.bind(n,713095)),Promise.resolve().then(n.bind(n,649270)),Promise.resolve().then(n.bind(n,281405)
1)},686668:function(){},529769:function(e,t,n){"use strict";var r=n(732608);n(686668);var l=n(441386),s=l&&"object"==typeof l&&"default"in l?l:{default:l},a=void 0!==r&&r.env&&!0,i=function(e){return"[object String]"===Object.prototype.toString.call(e)},o=function(){function e(e){var t=void 0===e?{}:e,n=t.name,r=void 0===n?"stylesheet":n,l=t.optimizeForSpeed,s=void 0===l?a:l;c(i(r),"`name` must be a string"),this._name=r,this._deletedRulePlaceholder="#"+r+"-deleted-rule____{}",c("boolean"==typeof s,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=s,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var o="undefined"!=typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=o?o.getAttribute("content"):null}var t=e.prototype;return t.setOptimizeForSpeed=function(e){c("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),c(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},t.isOptimizeForSpeed=function(){return this._optimizeForSpeed},t.inject=function(){var e=this;if(c(!this._injected,"sheet already injected"),this._injected=!0,"undefined"!=typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(a||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,n){return"number"==typeof n?e._serverSheet.cssRules[n]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),n},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},t.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},t.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},t.insertRule=function(e,t){if(c(i(e),"`insertRule` accepts only strings"),"undefined"==typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var n=this.getSheet();"number"!=typeof t&&(t=n.cssRules.length);try{n.insertRule(e,t)}catch(t){return a||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var r=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,r))}return this._rulesCount++},t.replaceRule=function(e,t){if(this._optimizeForSpeed||"undefined"==typeof window){var n="undefined"!=typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!n.cssRules[e])return e;n.deleteRule(e);try{n.insertRule(t,e)}catch(r){a||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),n.insertRule(this._deletedRulePlaceholder,e)}}else{var r=this._tags[e];c(r,"old rule at index `"+e+"` not found"),r.textContent=t}return e},t.deleteRule=function(e){if("undefined"==typeof window){this._serverSheet.deleteRule(e);return}if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];c(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},t.flush=function(){this._injected=!1,this._rulesCount=0,"undefined"!=typeof window?(this._tags.forEac
1h(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},t.cssRules=function(){var e=this;return"undefined"==typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,n){return n?t=t.concat(Array.prototype.map.call(e.getSheetForTag(n).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},t.makeStyleTag=function(e,t,n){t&&c(i(t),"makeStyleTag accepts only strings as second parameter");var r=document.createElement("style");this._nonce&&r.setAttribute("nonce",this._nonce),r.type="text/css",r.setAttribute("data-"+e,""),t&&r.appendChild(document.createTextNode(t));var l=document.head||document.getElementsByTagName("head")[0];return n?l.insertBefore(r,n):l.appendChild(r),r},function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,[{key:"length",get:function(){return this._rulesCount}}]),e}();function c(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var d=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return t>>>0},u={};function h(e,t){if(!t)return"jsx-"+e;var n=String(t),r=e+n;return u[r]||(u[r]="jsx-"+d(e+"-"+n)),u[r]}function p(e,t){"undefined"==typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var n=e+t;return u[n]||(u[n]=t.replace(/__jsx-style-dynamic-selector/g,e)),u[n]}var f=function(){function e(e){var t=void 0===e?{}:e,n=t.styleSheet,r=void 0===n?null:n,l=t.optimizeForSpeed,s=void 0!==l&&l;this._sheet=r||new o({name:"styled-jsx",optimizeForSpeed:s}),this._sheet.inject(),r&&"boolean"==typeof s&&(this._sheet.setOptimizeForSpeed(s),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"undefined"==typeof window||this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var n=this.getIdAndRules(e),r=n.styleId,l=n.rules;if(r in this._instancesCounts){this._instancesCounts[r]+=1;return}var s=l.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[r]=s,this._instancesCounts[r]=1},t.remove=function(e){var t=this,n=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(n in this._instancesCounts,"styleId: `"+n+"` not found"),this._instancesCounts[n]-=1,this._instancesCounts[n]<1){var r=this._fromServer&&this._fromServer[n];r?(r.parentNode.removeChild(r),delete this._fromServer[n]):(this._indices[n].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[n]),delete this._instancesCounts[n]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],n=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return n[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,n;return t=this.cssRules(),void 0===(n=e)&&(n={}),t.map(function(e){var t=e[0],r=e[1];return s.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:n.nonce?n.nonce:void 0,dangerouslySetInnerHTML:{__html:r}})})},t.getIdAndRules=function(e){var t=e.children,n=e.dynamic,r=e.id;if(n){var l=h(r,n);return{styleId:l,rules:Array.isArray(t)?t.map(function(e){return p(l,e)}):[p(l,t)]}}return{styleId:h(r),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),m=l.createContext(null);m.displayName="StyleSheetContext";var v=s.default.useInsertionEffect||s.default.useLayoutEffect,g="undefined"!=typeof window?new f:void 0;function x(e){var t=g||l.useContext(m);return t&&("undefined"==typeof window?t.add(e):v(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}x.dynamic=function(e){return e.map(function(e){return h(e[0],e[1])}).join(" ")},t.style=x},52668:function(e,t,n){"use strict";e.exports=n(529769).style},770529:function(e){e.exports={successBorder:"SuccessToast_successBorder__ZQry9",dark:"dark",defaultBackgroun
1d:"SuccessToast_defaultBackground__HSms9",toastComponent:"SuccessToast_toastComponent__uy9yV",toastComponentBorder:"SuccessToast_toastComponentBorder__UP_ut",crossIcon:"SuccessToast_crossIcon__ktk2k",flex:"SuccessToast_flex__LGQzk",paddingLeft:"SuccessToast_paddingLeft__DsjG_",title:"SuccessToast_title__OnXyG",parentDiv:"SuccessToast_parentDiv__8f5_e",marginTopHalf:"SuccessToast_marginTopHalf__m9aLy",marginTopOne:"SuccessToast_marginTopOne__ikm2_",widthFit:"SuccessToast_widthFit__Vbp8N",width96:"SuccessToast_width96__wKbi5",width60:"SuccessToast_width60__W7j55",toastComponentStyleOne:"SuccessToast_toastComponentStyleOne__TBmxP"}},612097:function(e){e.exports={fenzoTileHeight:"FenzoDefaultState_fenzoTileHeight__gvO6l",fenzoGradientBorder:"FenzoDefaultState_fenzoGradientBorder__v9kjw",fenzoRotate:"FenzoDefaultState_fenzoRotate__3scoP",dark:"dark",fenzoGradientBorderStatic:"FenzoDefaultState_fenzoGradientBorderStatic__g7ylV"}},728208:function(e){e.exports={contentWrapper:"FenzoResultState_contentWrapper__euE0C",gradientOverlay:"FenzoResultState_gradientOverlay__FCVwb",dark:"dark",followupPill:"FenzoResultState_followupPill__CRHQZ"}},703248:function(e){e.exports={fenzoSkeletonHeight:"RightSectionSkeletonWithFenzo_fenzoSkeletonHeight__w2vEH"}},237818:function(e){e.exports={toastAnimationDurationValue:"1s",toastAnimationStayDurationValue:"3s",toastAnimationDuration:"1s",toastAnimationStayDuration:"3s",planPreviewAnimation:"questionnaireViewer_planPreviewAnimation__emsHS",shrinkHorizontally:"questionnaireViewer_shrinkHorizontally__jgP_o",expandHorizontally:"questionnaireViewer_expandHorizontally__Gs_6J","questionAnimation-enter-active":"questionnaireViewer_questionAnimation-enter-active__hyBNi",slideBottomToTop:"questionnaireViewer_slideBottomToTop__z_CkV","questionAnimation-exit-active":"questionnaireViewer_questionAnimation-exit-active__D65_D",slideTopToBottom:"questionnaireViewer_slideTopToBottom__9eL6M",planDetailsAnimation:"questionnaireViewer_planDetailsAnimation__9zth5","toastAnimation-enter-active":"questionnaireViewer_toastAnimation-enter-active__n_kJQ",slideTopToBottomToast:"questionnaireViewer_slideTopToBottomToast__P1zuz","closeableToastAnimation-enter-active":"questionnaireViewer_closeableToastAnimation-enter-active__Idt59",slideLeftToRight:"questionnaireViewer_slideLeftToRight__loaka","closeableToastAnimation-exit":"questionnaireViewer_closeableToastAnimation-exit__613e3",slideRightToLeft:"questionnaireViewer_slideRightToLeft__Ypet8","snackBar-enter-active":"questionnaireViewer_snackBar-enter-active__nXLlK","snackbar-exit-active":"questionnaireViewer_snackbar-exit-active__HN2TM","toastAnimation-enter-active-delay":"questionnaireViewer_toastAnimation-enter-active-delay__UG9Qu","dark-ripple":"questionnaireViewer_dark-ripple___8Nb0",rippleDark:"questionnaireViewer_rippleDark__9NmKN","light-ripple":"questionnaireViewer_light-ripple__3klS7",ripple:"questionnaireViewer_ripple__ifemp","sliding-overlay":"questionnaireViewer_sliding-overlay__1LbyK"}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.