1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[29,7276],{40357:(e,t,l)=>{l.r(t),l.d(t,{default:()=>a});const a=l(82967).Ay},54594:(e,t,l)=>{l.r(t),l.d(t,{default:()=>v});var a=l(55462),n=l(19115),i=l(53507),r=l(86710),c=l(83058),s=l(34440),d=l(77592),o=l(40357);var u=l(48567),y=l(15638),m=l(83648),A=l(99330);const _=function(e){const{image:t,dataCaptureHandler:l,skuId:n}=e,i=A.TYPEAHEAD_SEARCH_TYPE.RecentlyViewed;return t?.imageUrl?a.createElement("div",{className:"RecentlyViewedItem"},a.createElement("div",{className:"RecentlyViewedItem__recentlyViewed"},a.createElement(y.Ay,{secondary:!0,action:t?.action,onClick:()=>{l({searchTerm:n,searchType:i,targetUrl:t?.action?.url}),(0,m.LM)({url:t?.action?.url})}},a.createElement("div",{className:"RecentlyViewedItem__recentlyViewed__image"},a.createElement(u.Ay,{src:t?.imageUrl,alt:t?.altText,width:48,height:48}))))):null},w={image:n.shape({imageUrl:n.string,altText:n.string,action:n.shape({url:n.string})}),skuId:n.string,dataCaptureHandler:n.func};_.propTypes=w;const E=_;function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)({}).hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},V.apply(null,arguments)}const p=function(e){const{handleClearAllRecentlyViewed:t,dataCaptureHandler:l,recentlyViewedAction:n,invokeAction:s}=e,[d,o]=(0,a.useState)(null),u=d?.items||[],y=d?.title||{},m=d?.clearRecentlyViewedAction||{},A=(0,a.useRef)(null),_=(0,a.useCallback)(R({setData:o}),[o]),w=(0,a.useCallback)(f({recentlyViewedIdsRef:A},{setData:o,handleClearAllRecentlyViewed:t}),[t]),p=(0,a.useCallback)(L({recentlyViewedIdsRef:A,recentlyViewedAction:n},{invokeAction:s,handleActionAfter:_}),[A,n]);return(0,a.useEffect)(p,[p]),!d&&A.current?.length?a.createElement(g,null):A.current?.length&&u?.length?a.createElement("div",{className:"RecentlyViewedList"},a.createElement("div",{className:"RecentlyViewedList__header"},y?.text&&y?.htmlTag&&a.createElement(r.Ay,{textStyle:"body-2",htmlTag:y.htmlTag},y.text),m?.label&&a.createElement(i.Ay,{className:"RecentlyViewedList__clearAll",onClick:w,action:m,ariaHiddenIcon:!0,variant:"unstyled"},a.createElement(r.Ay,{htmlTag:"span",textStyle:"body-2",color:"neutral-600",textColor:"xsubtle"},m.label))),a.createElement("ul",{className:"RecentlyViewedList__recents"},u?.map((e,t)=>a.createElement("li",{key:`recently-viewed-${t}`},a.createElement(E,V({},(0,c.iU)({...e}),{dataCaptureHandler:l})))))):null},L=(e,t)=>()=>{const{recentlyViewedIdsRef:l,recentlyViewedAction:a}=e||{},{handleActionAfter:n,invokeAction:i}=t||{};l&&a&&n&&(l.current=(0,s.c7)({secure:!1,key:d.A.recentlyViewedSKUsForAutoSuggestion})?.recentlyViewedForAutoSuggest,i({...a,after:n}))},R=e=>t=>{const{setData:l}=e||{},{content:a}=t||{};a&&l&&l(a)},f=(e,t)=>()=>{const{recentlyViewedIdsRef:l}=e||{},{setData:a,handleClearAllRecentlyViewed:n}=t||{};a&&n&&(n(),l.current=[],a(e=>({...e,items:[]})))},g=()=>a.createElement("div",{className:"RecentlyViewedList__Loader--mainContainer"},a.createElement("div",{className:"RecentlyViewedList__Loader--textContainer"},a.createElement("div",{className:"RecentlyViewedList__Loader--title"},a.createElement(o.default,{displayType:"skeleton",size:"S",multipleLineLoader:!1})),a.createElement("div",{className:"RecentlyViewedList__Loader--clearAll"},a.createElement(o.default,{displayType:"skeleton",size:"S",multipleLineLoader:!1}))),a.createElement("div",{className:"RecentlyViewedList__Loader--cardContainer"},[...Array(4)].map((e,t)=>a.createElement("div",{key:t,className:"RecentlyViewedList__Loader--individualCards"},a.createElement(o.default,{displayType:"skeleton",size:"S",multipleLineLoader:!1}))))),h={handleClearAllRecentlyViewed:n.func.isRequired,dataCaptureHandler:n.func.isRequired,recentlyViewedAction:n.object.isRequired,invokeAction:n.func.isRequired};p.propTypes=h;const v=p}}]); 2//# sourceMappingURL=ulta-modules-RecentlyViewed-RecentlyViewed-js.0c28170c.chunk.js.map
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.